3

According to offical google team statement the CONTROL_AE_EXPOSURE_COMPENSATION manual change is broken on Android 5.1. I'm lookin for a workaround for couple of days and the only one I found is connected to SENSOR_INFO_SENSITIVITY_RANGE. However, I found some difficulties in using it. My code look like this:

if(!modeDisabled){
                    mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_OFF);
                    modeDisabled=true;
                }
                range1 = characteristics.get(CameraCharacteristics.SENSOR_INFO_SENSITIVITY_RANGE);
                minmin = range1.getLower();
                maxmax = range1.getUpper();
                int iso = ((i * (maxmax - minmin)) / 100 + minmin);
                mPreviewRequestBuilder.set(CaptureRequest.SENSOR_SENSITIVITY, iso);


mCaptureSession.setRepeatingRequest(mPreviewRequestBuilder.build(), null, mBackgroundHandler);

Of course the 'i' value is a progress value taken from the seekbar and everyting is closed in OnProgressChanged function.

The problem is that there are no visible changes when manipulating the seekbar. I'd be really gratetful for any help.

sliwkacz
  • 387
  • 2
  • 4
  • 18

1 Answers1

1

CONTROL_AE_EXPOSURE_COMPENSATION isn't broken in Android 5.1 in general, it was disabled on the Nexus 6 only (and will be re-enabled in a future update).

If you're disabling auto-exposure, you probably also need to set the exposure time, in addition to the sensitivity. You also preferably need to set the frame duration, though the defaults for both are probably 1/30s, which is reasonable. You can also copy the latest values for those from the most-recent capture result that did you auto-exposure.

That said, you should still see some sort of change here. Is it possible that you're overwriting your capture request elsewhere right after you set this one as the repeating request? You can check the returned capture results to see what the sensitivity setting the camera device is receiving is.

Eddy Talvala
  • 17,243
  • 2
  • 42
  • 47
  • I am using [this](https://stackoverflow.com/questions/42852933/how-to-set-the-control-ae-exposure-compensation-in-camera2-api-on-android) but on seek bar progress change i am not seeing visible changes for exposure. –  Nov 28 '18 at 07:13
  • if anyone can help me with this https://stackoverflow.com/questions/68529131/camera-2-manually-checking-if-iso-and-shutter-speed-are-supported – Mohammad Elsayed Jul 26 '21 at 11:36