Reset AutoExposureLock after call takePicture ()

I am having an issue with exposure lock in the Android Camera.Parameters camera class. I can lock the exposure before shooting, but when I call, the camera.takePicture(shutterCallback, rawCallback, jpegCallback)exposure will automatically begin to adjust again.

In addition, it getAutoExposureLock()still returns true, even if the preview and final saved images show the set exposure.

The Android documentation says that exposure lock will not be changed by shooting: http://developer.android.com/reference/android/hardware/Camera.Parameters.html#setAutoExposureLock(boolean)

What am I missing?

+5
source share
5 answers

Galaxy S4

Camera.Parameters parameters = mCamera.getParameters();
parameters.setAutoExposureLock(true);
mCamera.setParameters(parameters);
mCamera.startPreview();

takePicture reset true

Camera.Parameters parameters = mCamera.getParameters();
parameters.setAutoExposureLock(true);
mCamera.setParameters(parameters);

- . . exposureCompensation , ISO .

.

+2

. , camera.takePicture(shutterCallback, rawCallback, jpegCallback) ; camera.startPreview(); .

0

, API, , . ? !

0

true takePicture Samsung Galaxy Note 3. , . Exif jepgs , exposure time 1/120 1/400 .

, jpegs exposure time (1/120 ), brightness, exif. , , - - .

native_getParameters, 5. :

set("min-brightness", 5);
set("max-brightness", 5);

set("contrast", 5);
set("min-contrast", 5);
set("max-contrast", 5);

set("max-saturation", 5);
set("min-saturation", 5);
set("saturation", 5);

. . 500 exposure time= 1/120 ± 1 ( 1/125) brightness= 5 ± 0,1.

0
source

I had the same problem on S3. I put these lines at the beginning of the callback:

public void onPictureTaken(byte[] data, Camera camera) {
    //Relock the camera for S3 device
    camera.startPreview();
    UnLockCamera(camera);
    LockCamera(camera);
    // your code

Using the two functions below

public void LockCamera(Camera camera){
    //stop auto white balance and auto exposure lock
    Camera.Parameters params = camera.getParameters();
    if (params.isAutoExposureLockSupported()) {
        params.setAutoExposureLock (true);
    }
    if (params.isAutoWhiteBalanceLockSupported()) {
        params.setAutoWhiteBalanceLock(true);
    }
    camera.setParameters(params);
}
public void UnLockCamera(Camera camera){
    //stop auto white balance and auto exposure lock
    Camera.Parameters params = camera.getParameters();
    if (params.isAutoExposureLockSupported()) {
        params.setAutoExposureLock (false);
    }
    if (params.isAutoWhiteBalanceLockSupported()) {
        params.setAutoWhiteBalanceLock(false);
    }
    camera.setParameters(params);
}
0
source

All Articles