CameraX AutoFoxus and AutoExposure

179 views
Skip to first unread message

Michael Bramley

unread,
Jan 25, 2021, 1:55:27 PMJan 25
to Android CameraX Discussion Group
Hi,

I am investigating the functionality of CameraX and am trying to find out
if there is a way to manually control turning these off/on AutoFcus and AutoExposure.

Thank you,
mike

Eric Ng

unread,
Jan 25, 2021, 2:00:07 PMJan 25
to Michael Bramley, Android CameraX Discussion Group
Hi Michael,

Leo answered this in one of our issue trackers:
Currently, ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY is that option drives CameraX to take pictures as soon as possible. It will not trigger/wait any 3A operations/states and immediately request image to camera service.

Hope that helps 

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/09dc0f77-fca1-402c-a048-aa57bb31ccb7n%40android.com.


--
-Eric Ng

Eric Ng

unread,
Jan 25, 2021, 2:23:45 PMJan 25
to Michael Bramley, Android CameraX Discussion Group

On Mon, Jan 25, 2021, 11:12 AM Michael Bramley <michael....@gmail.com> wrote:
HI Eric,

What about ImageAnalysis. Our application is only using Preview and ImageAnalyssi.

Thank you,
mike

tonyt...@google.com

unread,
Jan 25, 2021, 11:48:01 PMJan 25
to Android CameraX Discussion Group, Eric Ng, michael....@gmail.com
You may turn off AF/AE by using Camera2CameraControl to set CONTROL_AF_MODE_OFF and CONTROL_AE_MODE_OFF. Note that setting these options will affect both Preview and ImageAnalysis. Means the repeating results will not do metering continuously (e.g. the preview will probably be out of focus when the lens moves). Also all AF/AE related features like CameraControl#startFocusAndMetering will not work.

Eino-Ville Talvala

unread,
Jan 26, 2021, 1:19:28 PMJan 26
to tonyt...@google.com, Android CameraX Discussion Group, Eric Ng, michael....@gmail.com
Using AF_MODE_OFF / AE_MODE_OFF will switch exposure and focus to manual control; that's fine if the app wants to set custom exposure/focus values, but if the goal is to just freeze the current values, it may be better to use CONTROL_AE_LOCK.  For focus, locking can be done via CONTROL_AF_TRIGGER.


Patrick Liao

unread,
Mar 15, 2021, 3:14:31 AMMar 15
to Android CameraX Discussion Group, Eino-Ville Talvala, Android CameraX Discussion Group, Eric Ng, michael....@gmail.com, tonyt...@google.com
Hi Eino,

Just curious...

What if I set CONTROL_AE_MODE to CONTROL_AE_LOCK and modified CONTROL_AE_ANTIBANDING_MODE and send both capture requests in one shot? Would CameraX (or camera2 in this case) look for the next best settings that adheres the ANTIBANDING_MODE (50Hz/60Hz) then lock AE or would the ANTIBANDING_MODE setting be neglected? This is somewhat crucial for video capture. 

Eino-Ville Talvala

unread,
Mar 15, 2021, 1:30:17 PMMar 15
to Patrick Liao, Android CameraX Discussion Group, Eric Ng, michael....@gmail.com, tonyt...@google.com
Once you set AE_LOCK, all exposure values stop changing immediately; so if you change ANTIBANDING_MODE at the same time, it won't take effect.  If you want to wait for ANTIBANDING_MODE to take effect before you lock exposure, then I'd recommend watching the AE_STATE capture result value; change ANTIBANDING_MODE, wait for AE_STATE to be CONVERGED, and then set AE_LOCK.



Reply all
Reply to author
Forward
0 new messages