Not sure if this is the place to post this since i don’t know if its a hardware or code issue but I figured I’d give it a go since I’m pretty lost.
I’m messing around with the autofocus.py code using B0121 camera and have successfully ran it and captured focused images. But now I’m trying to tweak the autofocus.py code such that it refocuses periodically whenever image clarity is reduced by X amount of frame. I thought this would be done by replacing the break in line 70 of the original autofocus.py code. But the camera won’t refocus after the initial autofocus.
I keep running into the issue where the camera cuts out after the initial autofocus and image capture. I have to manually unplug the camera to regain control and manually stop the script.
here is my setup:
the HDMI cables are needed for the end product
I’m not too sure what’s causing this issue but it’s only when I use the focusing functional. It doesn’t cut out when I do multiple image capture without it.
I tried this but I am still getting the same issue. I’m able to refocus at a set time period but when i add in the camera capture into the code if causes the freeze up/display cut out. Is there a way to reset the camera after taking the image?
Is it possible to have the autofocus run over the CSI to HDMI Cable Extension and hdmi cable? Right now I just have the sda/scl on the camera connected directly to the raspberry pi but that won’t be possible in the end product i’m working on. Can I solder wires from the csi extension module to camara on one end and then do the same on the other csi module to the Pi? If so, would I just do pin A on the CSI module to SDA and B to SCL? And then pin a and b on the other csi module to the pi?
Thank you for the reply. So no additional connections are needed from the camera or csi/hdmi extension to the pi (3b+) other than the csi connections ribbon to run the autofocus?