How to setUp Video or Optical stabilization?

226 views
Skip to first unread message
Assigned to tonyt...@google.com by eri...@google.com

Tomáš Válek

unread,
Dec 20, 2021, 11:02:09 AM12/20/21
to Android CameraX Discussion Group
Hello,

For CameraCharacteristics.CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
camera returns:
CONTROL_VIDEO_STABILIZATION_MODE_OFF  and CONTROL_VIDEO_STABILIZATION_MODE_ON

and for CameraCharacteristics.LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
camera returns:
LENS_OPTICAL_STABILIZATION_MODE_OFF and LENS_OPTICAL_STABILIZATION_MODE_ON

how can I setup stabilization for preview and video recording?

I tried it to setup via Camera2CameraControl + captureRequestOptions setCaptureRequestOption(CaptureRequest.CONTROL_VIDEO_STABILIZATION_MODE, CaptureRequest.CONTROL_VIDEO_STABILIZATION_MODE_ON)
or
setCaptureRequestOption(CaptureRequest.LENS_OPTICAL_STABILIZATION_MODE, CaptureRequest.LENS_OPTICAL_STABILIZATION_MODE_ON)
after cameraProvider.bindToLifecycle(...) but I don't see any changes.

Device Pixel 2, Android 11

Thank you.

tonyt...@google.com

unread,
Dec 22, 2021, 1:09:52 AM12/22/21
to Android CameraX Discussion Group, Tomáš Válek
How these options work highly depend on the camera framework and the device. AFAIK for digital stabilization (CONTROL_VIDEO_STABILIZATION_MODE), it will be automatically enabled when a video stream is configured. So it should already be enabled and there won't be any difference after explicitly set CONTROL_VIDEO_STABILIZATION_MODE_ON.

Tomáš Válek

unread,
Jan 20, 2022, 3:36:44 AM1/20/22
to Android CameraX Discussion Group, tonyt...@google.com, Tomáš Válek
OK that's digital stabilization but why don't I see any changes when setup optical stabilization? (LENS_OPTICAL_STABILIZATION_MODE_ON)

Dne středa 22. prosince 2021 v 7:09:52 UTC+1 uživatel tonyt...@google.com napsal:
Reply all
Reply to author
Forward
0 new messages