Autofocus on IMX298?

Good day,

Sorry if this is a repeat question but I have searched for quite some time with no luck. I am unable to find any information on autofocus on the IMX298. From its appearance it seems to have the capability but I can’t find reliable information about it (either yes or no). A few weeks ago I seemed to get it to work but have since reinstalled and upgraded various packages and am unable to get the focus to work now.

To add context, some of the information on the website is unclear, as it states on the IMX298 web page:

“Please note that it is the RAW sensor that doesn’t include ISP (Image Signal Processing) on the image sensor chip, so it only supports manual exposure, manual white balance, manual gain settings.”

Yet auto white balance and auto exposure seem to work when I run the demos.

If you could please clarify what the capabilities are for this unit (also including autofocus) I would appreciate it. It might also help to put it on the relevant web pages to inform potential customers if these capabilities are in fact available.

Also, could you please let me know if there is any hardware datasheet / manual available, which might help to understand the workings and addresses of the sensor better for troubleshooting purposes?

Kind regards,


Sorry for my late reply.

I have been on business trip recently. For the imx298’s hardware it does has focus motor. Due to on PI platform, we can’t get the ISP support, we can’t get the AF report. So the sensor does not support auto focus, just support manual focus. We will release new imx298 UVC camera, which support auto focus function with ISP.


Thank you for letting me know. It’s unfortunate, as the unit is somewhat useless if the software isn’t able to support the hardware.

Could you please let me know if there is a way to hard-code the focus setting, as I see it’s always initialised to 150 but don’t know where this is set. In my current application using a hard-coded focus is an option but I don’t see any example where one can initialise the focus to a specific value and keep it there.


Sorry for my late reply. Arducam release a API int arducam_set_control(CAMERA_INSTANCE camera_instance, int ctrl_id, int value);

You can use it to set the focus value. arducam_set_control(V4L2_CID_FOCUS_ABSOLUTE, value);

Let me know if you need more help.