Can we set the auto focus window in the imx219 8mp?

How can we set autofocus window settings on the IMX-219 8MP camera? I have tried to do it using “–autofocus-window 0.25,0.25,0.5,0.5”, but there is no effect on the focus.

I could crop the video image using “–roi 0.25,0.25,0.5,0.5”, and this worked.

Helpful suggestions are appreciated. Thanks in advance.

Hi,
Are you using a imx219 camera module with a autofocus lens?

Yes, camera-module with lens autofocus.

Hi,
Upon reviewing the source code, I discovered that this camera does not support the PDAF function, meaning it does not support “autofocus-windows.” If you are eager to have this function, I recommend choosing a camera that supports PDAF.

Okay. Thank you so much for your support.

Hello Dion,

I bought this camera: Arducam 12MP IMX708 Autofocus Camera Module.

Could you please tell me which tuning file I should use for the motorized autofocus? The continuous autofocus is not working with the current imx708.json tuning file. Thanks in advance.

Hi,
What command did you use to test the autofocus function of this camera module?

I used libcamera-vid command with --autofocus-mode as continous and also tried using --keypress “f”. the tuning file I used is /usr/share/libcamera/ipa/rpi/vc4/imx708.json

Hello Dion, do you have any suggestions?

Hi,
I wanna know if the autofocus mode worked as expected.

Hi Dion,

I can say that the autofocus mode in continuous is working, but it’s not completely correct. It’s not focusing on nearby objects very quickly. Whenever I change the resolution or ROI, the camera tries to focus and sets the default autofocus lens position to 12 (macro) or 15 (normal). Am I using the correct tuning file and algorithm?

Hi @VishalVijayan
How nearby it is?

Do you want a fixed focus distance?

nearby: 5 to 10 cm.

Do you want a fixed focus distance?
No, I want to control focus using both ways(deafult option): continous and mannual.

Hi,
The focus distance of B0312 is 10cm to infinity. That makes sense that the image is out of focus between 5 - 10cm.

You are using the correct tuning file and algorithm. And you should find that the autofocus speed of the camera is fast when it is trying to focus an object.