jakaskerl
We've tried using all of the different autofocus modes, but with no success. Here's the part of our pipeline that sets up the initial control to use autofocus:
cam.initialControl.setAutoFocusMode(dai.CameraControl.AutoFocusMode.CONTINUOUS_VIDEO)
cam.initialControl.setAutoWhiteBalanceMode(dai.CameraControl.AutoWhiteBalanceMode.AUTO)
cam.initialControl.setSceneMode(dai.CameraControl.SceneMode.FACE_PRIORITY)
cam.initialControl.setAutoExposureEnable()
cam.initialControl.setSharpness(0)
cam.initialControl.setLumaDenoise(0)
cam.initialControl.setChromaDenoise(4)
It seems like no matter what autofocus mode we choose, once the camera settles on a lens position, it does not change as the person moves further/closer. Ideally, we would like to dynamically set the region for the AF so that it focuses on the bounding box of the detected face. I'm guessing that would likely improve the AF logic rather than focusing on a wider area by default. However, calling setAutoFocusRegion()
in the script doesn't seem to behave as we expected it to.
We are setting the Auto Exposure region in the script using setAutoExposureRegion()
, and that is working well for us.
FWIW, these cameras are running on UVC, which is why we are relying on the script for control of things like auto exposure region/potentially auto focus logic.