I'm having a problem with the exposure lock in the Android Camera.Parameters class. I'm able to lock the exposure before taking a picture, but upon calling camera.takePicture(shutterCallback, rawCallback, jpegCallback)
the exposure starts auto-adjusting again.
Also, getAutoExposureLock()
still returns true
even though the preview and the final saved images show adjusted exposure.
The Android documentation says the exposure lock won't be changed by taking a picture: http://developer.android.com/reference/android/hardware/Camera.Parameters.html#setAutoExposureLock(boolean)
What am I missing?
I managed to lock exposure compensation on my Galaxy S4
Camera.Parameters parameters = mCamera.getParameters();
parameters.setAutoExposureLock(true);
mCamera.setParameters(parameters);
mCamera.startPreview();
Then in each takePicture
callback I basically reset the lock to true
Camera.Parameters parameters = mCamera.getParameters();
parameters.setAutoExposureLock(true);
mCamera.setParameters(parameters);
This manages to do something. All images captured are almost equally bright. Changing exposureCompensation
has no effect, but when changing ISO the exposure time is automagically adjusted.
I'll dig some more into this and update this post accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With