How do I underexpose a camera image in Windows Phone? - windows-phone-7

I'm trying to get the camera on my Windows Phone to take an underexposed image. I've gone through the PhotoCamera class documentation as well as this tutorial. While I can access the raw camera data and manipulate the buffer before the image is saved this is not sufficient as I need to modify the camera's capture setting.
I'm trying to prevent the highlights from blowing out, because the camera's metering has been fooled by the scene and has decided to overexpose. When the highlights are blown out, the RGB values are 255, 255, 255 and there's nothing I can do to recover any lost detail.
On my non-phone camera, it's common to underexpose such scenes by using the EV compensation facility. Am I missing something or does Windows Phone 7.5 really lack such basic camera functionality?

The Windows Phone 7 camera always selects an exposure time automatically. The only control the user has over this is the 'metering mode', where they can tell the camera to expose based on the average image intensity, or the centre of the image.
Unfortunately you cannot change this setting through the camera API.

Related

How to change the camera in three.js / editor using only scripts?

How to change the type of camera used in three.js/editor? I want to do this using scripts, and not using the add camera button (Add → Orthographic Camera). I try to announce the camera again, but I can't. I'm trying to check the view of the main camera using the function (console. log(camera)) — the console shows that the camera has changed. But, when you click the PLAY button, the view remains the same as it was. Thank you for your help and feedback, I am very grateful for this!
It is not possible to do what you are looking for since cameras are handled within the editor. You can't use scripts to change the type of camera used for rendering.
In general, there is no full support for orthographic cameras in the editor. For example the editor's controls only support perspective cameras as well as the app player that playbacks exported/published applications. However, there is a feature request at GitHub that tracks the improvement of orthographic camera support:
https://github.com/mrdoob/three.js/issues/16008

deciveOrientationControls seems to be distorting the camera when defining xyz for the camera

I'm still new to Three.js but I've been loving it's capabilities so far. One thing I've been working on is a 360 that depending on whether or not you've on a desktop/mobile device it'll load different controls. The problem I'm seeing is the DeviceOrientationControls.js is moving the camera hugely out of place when I try to define an XYZ.
Here's a link: http://www.freeptools.com/mapster/testing-360s2.php
If I ignore the XYZ and just set the Z position of the camera to 1, then the device orientation controls works perfectly as expected.
The script is here: http://www.freeptools.com/mapster/js/360widget-dev2.js. The camera positions are being defined around line 392. I'm not sure what's causing this, but it doesn't seem to be device specific.
EDIT: I'm including some photos to demonstrate this
OrbitControls: http://freeptools.com/mapster/uploads/normal.png
DeviceOrientationControls:
http://freeptools.com/mapster/uploads/distorted.png

Threejs Rotating object with device orientation control

I am trying to achieve an effect similar to one of the cardboard app examples that Google has put out with their cardboard app called the 'exhibit'. I have a 3D object that I want to rotate using device orientation control. Right now with just the device orientation control, I can view the 3D object but when I turn around, the camera rotates (it seems) causing the object to fall out of view until I turn all the way back around to where it was in the beginning. In other words the camera seems to rotate in its axis as I look around. What I want is to be able to rotate the object as I turn around.
Kinda like this example http://threejs.org/examples/#misc_controls_orbit except I want to rotate using device orientation control.
Any idea how I can incorporate this feature?
Thank you for your assistance.
The answer to my own question for future seekers is to replace camera in
controls = new THREE.DeviceOrientationControls(camera, true);
with the 3D object you are trying to rotate.

WP7 XNA + SilverLight + Touch = Wrong Coordinates?

I'm using the mixed XNA/SL programming model where the Silverlight content is rendered by UIElementRenderer. However, it appears that there is a 40 pixel offset between the screen coordinates reported by touch (GestureSample) and the actual coordinates where the contents of the page are rendering.
It appears to be space reserved for the SystemTray in Silverlight apps.
My question is: is there an API I can call to dynamically return this offset so I don't have to hard-code it?
Thanks!
I don't actually think there is any such offset. Since the GestureSample has accurate screen coordinates, your problem is probably with drawing the silverlight UI. Make sure that you don't have any view/projection transforms active on your SpriteBatch when you draw the uiRenderer texture.
If you were using a transform to draw your game scene, you might just want to end that SpriteBatch and start up a new one for screen UI.

how to Map a window to 3D

I'm searching for how to render window to 3D windows Texture on D3D
for example, the windows aero-glass's preview.
a window or part of window that has a windows handler is rendered to a d3d device(i guess aero glass is maked by d3d).
my project is a 3D interective media. it is an AR project using HMD and Hand Recognizing.(Like a 3d touch interaction )My part is 3D Rendering. The WPF can do this. But i don't find the way how to do it with D3D.
Who knows the way or it is impossible on D3D? if you know, please notice me a KEYWORD that using to Google.
thanks to reading and your attention. i'm not native english user and i'm sorry that if you feel my english seems ugly.
I may suggest using dynamic textures. You first create a texture of the desired size and format. Then you get its surface, obtain HDC and pass it to a window you want be drawn. Showing a texture thru d3d device shouldn't be a problem.

Resources