nagyist / diadraw-air-camera-native-extension

Automatically exported from code.google.com/p/diadraw-air-camera-native-extension
0 stars 0 forks source link

White balance and exposure mode "auto" settings do not work as expected #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call setExposureMode or setWhiteBalanceMode and set white balance or 
exposure mode to the "Auto" setting (not continuous auto).
2. It corrects exposure and/or white balance once
3. Then it continues to adjust both if I point the camera at an area with 
different lighting

What is the expected output? What do you see instead?
It is supposed to perform one correction then lock the setting so if I point to 
a different area, exposure and white balance remain fixed. This does work with 
the focus setting perfectly, but not with exposure or white balance.

It's hard to tell for sure if the white balance is really affected since 
exposure changes everything so drastically, but I think it is. Exposure mode 
definitely is.

I have exhaustively checked my code to the point of not having any other 
setting except "auto" anywhere, and it still happens.

What version of the product are you using? On what operating system?
Latest update to the ANE, AIR 4.0, FlashBuilder 4.7, testing on an iPhone 5c 
running iOS 7.0.6.

Original issue reported on code.google.com by t...@tom-callahan.com on 22 Mar 2014 at 5:21

GoogleCodeExporter commented 9 years ago
Did some more research on this. White balance appears to work, but exposure 
does not really stay fixed once it's been set. 

The most usable setup I've been able to come up with is to switch to continuous 
auto on mouse down (touch start) with a Point for the priority area, then set 
to fixed on mouse up.

For example I'm inside, pointing it towards the end of a room with daylight 
outside and interior lights off. This makes for very bright windows and dim 
spaces between them, particularly the dark spot in the corner. 

Touching the screen switches to Continuous Auto. If I touch in the dark area it 
brightens until that area is correctly exposed and the windows are blown out 
and overexposed as expected. Releasing sets it to Fixed, and it stays that way. 
So far so good.

If (without moving the camera) I touch on the window it adjusts so the scene 
through the window is correctly exposed, meaning the interior areas are overly 
dark. Releasing sets it to Fixed and it stays that way. Again, this is correct.

Now, I touch on the dark area again, it auto-adjusts. I release, it's set to 
Fixed. Now if I move the camera to point out the window so all it's seeing is 
bright outside, what I expect to happen is that it remains overexposed since 
the exposure setting is supposedly fixed, but instead it auto-adjusts to 
correct the exposure.

So "Fixed" is not really completely fixed. It may be that this is not possible, 
maybe the iPhone (5c) camera is too smart for its own good?

Original comment by t...@tom-callahan.com on 31 Mar 2014 at 1:19

GoogleCodeExporter commented 9 years ago
Argh, never mind, I am a complete idiot. One typo that's been staring me right 
in the face was preventing the setting from applying correctly.

However, you might want to note that some devices don't support the Auto 
exposure or whitebalance modes -- including iPhone 5c. After getting my typo 
straightened out, it still wasn't working. I finally noticed that the status 
event was returning an "Exposure mode not supported" notice (you might want to 
consider having it throw an error instead of just a status event, and/or 
provide an "isSupported" option to check like you would in the native code. I 
have worked around the lack of "Auto" mode support by setting it to Continuous 
mode then setting it to Locked after 1500ms.

Original comment by t...@tom-callahan.com on 1 Apr 2014 at 1:55