Question

I'm writing a camera application that requires the same exposure regardless of ambient light. Unfortunately, setExposureCompensation() only acts like an offset. Can I turn off this auto adjustment, or is this more of a pre-user hardware correction?

Was it helpful?

Solution

EDIT: So, for Android 4.0 and above, there is a setAutoExposureLock(boolean) that should work for what you need. It doesn't let you set the exposure yourself, but after the exposure is determined, you can lock it into its current exposure. You need to guard it with a check for isAutoExposureLockSupported(), though, to make sure the device supports that feature.

To get the same actual exposure every time, you'd need to be able to set a fixed ISO, shutter speed, and aperture. As you said, the exposure compensation only offsets from the metered exposure, which the camera determines automatically. To my knowledge, there's no built in way to set the ISO, the shutter speed, or the aperture values in Android.

OTHER TIPS

You should browse all your camera parameters to see if there are any related to ISO,shutter speed, and aperture.

Example:

Camera.Parameters params = mCamera.getParameters();
String sParams = params.flatten();
Log.d("TAG", "camera flatten: "+sParams);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top