RootEncoder icon indicating copy to clipboard operation
RootEncoder copied to clipboard

Enable/disable Auto exposure

Open legosaro opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. I need a method to ensure that the camera automatically adjusts its exposure settings for optimal image brightness in varying lighting conditions.

Describe the solution you'd like Add the method enableAutoExposure in the Camera2ApiManager class with the following code:

builderInputSurface.set( CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON );

legosaro avatar Nov 14 '24 11:11 legosaro

Added here: https://github.com/pedroSG94/RootEncoder/commit/9222c21b5f8b71f2033136a2487ccb88bd62ea86

pedroSG94 avatar Nov 14 '24 22:11 pedroSG94

Hi Pedro, thank you for the update!
"I have a question for you, is this check correct: val modes = characteristics.secureGet(CameraCharacteristics.CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES) ?: return false

I found this: val modes = characteristics.secureGet(CameraCharacteristics.CONTROL_AE_AVAILABLE_MODES)

Another question, I tried using the two methods (enable/disable) but I didn't see any difference, why is that?

Thanks in advance

legosaro avatar Nov 15 '24 09:11 legosaro

I fixed the check error. About the question if I can see any different. No, I'm not sure the reason but the code should be correct now

pedroSG94 avatar Nov 20 '24 20:11 pedroSG94