pi-webcam
pi-webcam copied to clipboard
Consider testing with the Arducam 12MP IMX477 with autofocus
Not quite sure how I would be able to get the pipeline to work just glancing at the example Python code (https://github.com/ArduCAM/RaspberryPi/blob/master/Motorized_Focus_Camera/Autofocus.py), but Riding Nerdy on YouTube mentioned that camera has a built-in AF motor that is software-controlled.
Would need to use something like OpenCV + a contrast-detect algorithm to lock focus. It's not going to compete with a mirrorless camera, but it would be interesting to see if it could be used as a webcam with autofocus—total price of the unit is a slight bit more than the HQ camera + 6mm lens, but not by much.
It looks like many of the ArduCam products have autofocus: https://www.arducam.com/product-category/cameras-for-raspberrypi/raspberry-pi-camera-raspistill-raspvivid/?filter_focus-type=auto
There's also an explanation of the types of focus as well as an overview about enabling the motor and autofocus with some Python code and OpenCV, respectively. https://www.arducam.com/raspberry-pi-camera/autofocus/
You could use this one for instance which is cheaper although no lens (which some might prefer): https://www.arducam.com/product/raspberry-pi-camera-5mp-autofocus-motorized-focus-camera-b0176/ Personally I'd rather use a $15 CCM versus an ~$90 module with a lens. Coding will probably be easier too.