I'm using the IMX477 autofocus camera from Arducam model BO369 and using the rgb_camera_control.py from https://github.com/luxonis/depthai-python/tree/main/examples/ColorCamera. I have used this successfully with the luxonis OAK-FFC-IMX378 to do autofocus but when I use it with the IMX477 I can get images but the autofocus doesn't do anything. I also purchased one of the IMX477 autofocus for Raspberry Pi and that works using the Arducam library https://github.com/ArduCAM/RaspberryPi/tree/master/Motorized_Focus_Camera/python. I purchased 2 of these IMX477 cameras for depthai with the same results, so I'm pretty sure it isn't a hardware issue. How do I get autofocus to work?
IMX477 autofocus
Hi BryanO,
Thanks for reporting this issue. Auto-focus should be supported for this Arducam module, but it's possible the sensor is misdetected as IMX378 instead of IMX477. Streaming would still work, but that a wrong auto-focus driver to be selected in firmware. A possible workaround is to delay a bit the I2C enumeration of the sensor. Could you try with the latest release 2.14.1.0 this patched firmware:
https://artifacts.luxonis.com/artifactory/tmp/fw-fix-imx477-detect.mvcmd
(internal note: same as https://artifacts.luxonis.com/artifactory/luxonis-myriad-snapshot-local/depthai-device-side/cf7c7f7bcf2bdd754d334be0b401a14f7e566ad1/)
Set the path to it as an environment variable:
DEPTHAI_DEVICE_BINARY=/home/user/Downloads/fw-fix-imx477-detect.mvcmd
How to set the env var depends on the terminal used. Can also be done by adding at the very beginning of rgb_camera_control.py
:
import os
os.environ['DEPTHAI_DEVICE_BINARY'] = '/home/user/Downloads/fw-fix-imx477-detect.mvcmd'
The script should print a warning:
[2022-01...] [warning] Overriding firmware: /home/user/Downloads/fw-fix-imx477-detect.mvcmd
Let us know if this helps. If it doesn't, I'll try to prepare a different workaround.
Luxonis-Alex thank you for the suggestion. when I click your link for the patched firmware, it is asking for a login user and password. what should I use?
BryanO Sorry, a permission was not properly set for a newly added category, and I missed testing without logging out. Should be fixed now. Thanks!
works great! thank you for the quick reply!
@BryanO The latest release 2.15.0.0
should contain the fix for this IMX477 focus control issue.