I have ran the arducamstill function and get the 4 video feeds displayed, however they are useless to me unless I can perform depth mapping between two of the cameras of my choice.
How do I fix this? How do I get these cameras to work with OpenCV.
7.What attempts at troubleshooting have you already made?
Tried googling the error message given. Little to no information available online
8.How would you like us to help you?
Ok @wong I fixed the install error as I realised there was a typo. However now when I try to run the python script I get ‘open VIDEOIO(V4L2:/dev/video0): can’t open camera by index’
One more thing. I think this might be due to the errors I get with ./install_driver as described in the instructions, however I have found that even with this error it is the only way to get the arducam command able to display the camera feed without errors.
I am on the latest release of the Pi kernal but I followed the instructions to your downgrade patch and installed this before running ./install-driver.
The error comes from v4l.cpp when I run the Python command so I am presuming that this is still a problem with the drivers as this software does not seem to be able to recognise the device. The arducam function can still work fine however.
One more thing, I noticed that when downgrading and installing the drivers, I now have another video port /dev/video1 as well as /dev/vide0, is this expected functionality?
sorry for the late reply,
Sorry I didn’t explain clearly, the reason why opencv cannot be opened is that it does not support the current format:
[0]: ‘RGGB’ (8-bit Bayer RGRG/GBGB)
[2] ‘RG10’ (10-bit Bayer RGRG/GBGB)"
The firmware update tool I sent you is used to modify the current format so that opencv can support it.
Regarding the driver problem, it seems that you have been able to list the current camera-related information, then there is no problem with the driver (the video1 node is expected, and it has no effect on this camera)
It appears that the firmware update was not actually installed. Earlier when I did the ./firmware_update command it exited with no display on the command line.
I have moved to a new pi and when I try to do the update I get this ouput:
[INFO] Write update flag 2
[INFO] Write checksum
[INFO] Write update flag
[INFO] Sending… | | ETA: 0h05m58s
[ERROR] Write firmware data failed, ret: -1, block:1
Any thoughts as to what is causing this error? I am following the instructions as described on the pdf
It seems that the firmware update failed,
You can try to modify /boot/config.txt to look like this:
dtparam=i2c_vc=on,i2c_arm_baudrate=30000
dtparam=i2c_vc_baudrate=30000
When the update fails, you need to power off and restart.
Note: This update program was designed to work on Jetson Nano, so it does not work very well on Raspberry Pi.
Hello again @wong yesterday I managed to install the firmware update.
It succeeded only when I loaded up a clean version of Raspberry Pi OS and istalled the downgrade patch but not the driver. Then installing the driver allows me to use the camera with OpenCV.
However, the performance is extremely slow, pretty much unusable. I am getting around 0.2fps when I run 1_test.py, and when trying to capture chessboard pictures for calibration using 2_chess_cycle.py it cannot take pictures because it is running so slowly, the countdown timer goes past 0 and down into negative numbers infinitely.
I also now get different formats from running v4l2-ctl --formats-ext-ctl which are unsupported by the arducamstill tool. The three formats I get are BA81, pBAA and BG10 which all give unsupported format errors when running arducamstill.
You say the product is designed for Jetson Nano, can I expect a better performance on that platform?
Also, is there a way to reverse this firmware install? The stereovision python package is no longer being maintained and so I would prefer not to use that, and also I manged to get better performace for capturing images from the camera by extending the arducamstill.c program so I would prefer to go back to that since the performace with opencv and python is terrible.
I have question if there is a way how to speed up process on RPi4. I am also using opencv. I am streaming video trough opencv so the same as @jamesheaton. I also can work with black/white / grayscale images. Do you have any idea how to avoid this color conversion and stream more FPS ? I need at least around 25fps.
Can you tell me what module you use?
If you are using a bayer format module, it needs to use the CPU to do color conversion, and the speed is difficult to improve(depending on the CPU performance, or you can use hardware acceleration and need to write your own code).