I am using Ras Pi Compute Module 3+ to use the Synchronized Stereo Camera HAT connected with two IMX 219 cameras. I am now able to use OpenCV in python to get images in half resolution combined mode (by default) (640x480 pixels).
However, when I run ./list_format in MIPI_Camera/RPI, I got “init camera status = 4099” and I did not see any devices as shown in the document’s screenshot.
Can anyone help me with this issue?
Also, when I try to use Arducam Sensor Extension Cable (B0186) with the HAT, the HAT does not work anymore. Is there a way to fix this?
Just need to connect the camera to the CM3 camera0 interface.
preview-camera0.c is our demo for CM3 module. You just need to
cd MIPI_Camera/RPI
make preview-camera0
Then run the demo using ./preview-camera0
Arducam Sensor Extension Cable (B0186) is designed for native Pi platform instead of our stereo hat. Due to the speed limit, we are not ensure if it can be used on stereo hat if try to reduce the sensor clock.
I used the system image that is provided by the seller (which can be found from chinese wiki), and I believe they changed some device tree. The details of the change are written in the wiki.
In terms of connection, I just connect the 6 pins accordingly and the CSI camera cable to camera0 slot.
Please let me know if you need more information. Thank you!
I do get some image after connecting HAT to camera slot1.
However, the frame rate is extremely low and the FOV seems to be not complete.
You can compare the images I got from directly using OpenCV in Python and using the preview-camera:
This is from OpenCV which has bigger FOV and the frame rate is good.
This is from preview-camera0. The FOV is smaller and frame rate is low.
Also, when using preview-camera0, the camera closes by itself after around half a minute.
It prints the following message:
pi@raspberrypi:~/MIPI_Camera/RPI $ ./preview-camera0
Open camera…
Found sensor imx219 at address 10
Setting the resolution…
Can’t open the file
mmal: Failed to fix lens shading, use the default mode!
Current resolution is 1920x1080
Notice:You can use the list_format sample program to see the resolution and control supported by the camera.
Start preview…
Reset the focus…
Failed to set focus, the camera may not support this control.
Setting the exposure…
Setting the exposure…
Setting the hfilp…
Failed to set hflip, the camera may not support this control.
Enable Auto Exposure…
Enable Auto White Balance…
Setting the resolution…
Can’t open the file
mmal: Failed to fix lens shading, use the default mode!
Current resolution is 3264x2464
Stop preview…
Close camera…
pi@raspberrypi:~/MIPI_Camera/RPI $ ./preview-camera0
Open camera…
Found sensor imx219 at address 10
Setting the resolution…
Can’t open the file
mmal: Failed to fix lens shading, use the default mode!
Current resolution is 1920x1080
Notice:You can use the list_format sample program to see the resolution and control supported by the camera.
Start preview…
Reset the focus…
Failed to set focus, the camera may not support this control.
Setting the exposure…
Setting the exposure…
Setting the hfilp…
Failed to set hflip, the camera may not support this control.
Enable Auto Exposure…
Enable Auto White Balance…
Setting the resolution…
mmal: Failed to stop sensor.
Can’t open the file
mmal: Failed to fix lens shading, use the default mode!
mmal: Failed to start sensor.
mmal: Failed to enable camera
set resolution status = 3
My questions are the following:
I want to use full-resolution combined feature, but why the FOV is getting smaller? I thought in full-resolution combined mode, the FOV will be bigger than default (I assume in OpenCV it is default half-resolution combined).
Why is the frame rate so low? I actually tried with a single camera (not HAT) connected to camera slot 1 and use preview-camera0. It also gives me low frame rate video.
Great to hear you have got some images. About the FOV and frame speed. There are something to do with the sensor init configuration.
Do you use our new MIPI_Camera library? For single camera I have optimized our sensor configuration recently and improve the frame speed. About the stereo camera hat, Due to bandwidth limitation, the total bandwidth is about 140M. We are working on improve the speed.