I have a B0475 64MP Camera module purchased from your website. I have downloaded your Arducamdemo.py program and I am running it just fine. However, I have noticed that in your program you have the option for “Camera restarts” and in your code you have a check to see if the camera has failed to return a frame and if that is the case you restart the camera.
My question is why do you need this ? why does the camera need a restart ? why should the camera return an empty frame that causes the need to do a camera restart ?
Here is a snippet from your program that deals with camera restarts.
while True:
ret, frame = cap.read()
if not ret:
if restart_times != 0:
print("Unable to read video frame")
success = False
for i in range(1, restart_times + 1):
print(f"reopen {i} times")
try:
cap.reStart()
success = True
break
except:
continue
if success:
continue
else:
print("reopen failed")
Hi,
Thank you for your inquiry regarding the camera restart functionality in our Arducamdemo.py program. There are two main reasons why we’ve implemented this feature:
Connection Issues: In some cases, poor physical connections or intermittent interface issues can lead to failures in frame acquisition. The restart function helps to recover from these temporary connection problems without requiring manual intervention.
Hot-Swapping Support: The demo program is designed to support hot-swapping of the camera while it’s running. This means you can disconnect and reconnect the camera during program execution. The restart functionality allows the program to detect when a camera has been reconnected and resume operation automatically.
Many thanks for your reply, but we are still having issues with the B0475 64MP USB cameras we purchased from your website.
We have downloaded and installed completely fresh images of Debian Bookworm 64bit via the Raspberry PI installer program and installed it on 9 different Raspberry Pi 5 4GB models connected to 9 different B0475 camera modules we purchased from yourselves. We have installed CV2 via the instructions given on your website (wiki).
Using very high speed and high quality Fibre optic USB cables.
Using 9 different Raspberry Pi 5 4GB models.
Using different SD Cards.
Testing with 9 different B0475 64MP Camera modules – all purchased from yourselves.
We have run your “Arducam_demo.py” program repeatedly over many days and weeks and it will randomly fail with a “select() timeout” error (see screenshot below).
Although your program will recover from this issue and restart, the whole process of detecting the camera has failed and restarting takes approx. 10 secs which is too long for us. We are using your cameras in a production environment and a 10 second delay means the machine will fail.
We have noticed that the issue seems to be when using CV2, if we run the qv4l2 program you also recommend as a test on your WIKI page the camera seems to run for days at a time with no issues. We really would prefer to use the camera with Python and ideally CV2 but do you have any other options we could try ? do you have some C++ code examples we could try ?
We desperately need a solution to this problem as we had planned to build many industrial machines using multiple B0475 cameras but this problem means we are now having to look for a replacement camera from another supplier.