Troubleshooting attempts you’ve made?
Read manuals and changed resolution
What help do you need?
I’ve got the 4 * 6MP autofocus and compiled it and everything is working fine. I can execute to get the image however it is quite slow. The output from a time command is below:
pi@fourcampi:~ $ time libcamera-still -n --viewfinder-width 2312 --viewfinder-height 1736
[43:24:44.179766890] [3078] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3572-e13ccdd5
[43:24:44.189743458] [3079] WARN CameraSensorProperties camera_sensor_properties.cpp:163 No static properties available for 'arducam_64mp'
[43:24:44.189825031] [3079] WARN CameraSensorProperties camera_sensor_properties.cpp:165 Please consider updating the camera sensor properties database
[43:24:44.190445134] [3079] ERROR CameraSensor camera_sensor.cpp:591 'arducam_64mp 10-001a': Camera sensor does not support test pattern modes.
[43:24:44.231074619] [3079] WARN RPI raspberrypi.cpp:1263 Mismatch between Unicam and CamHelper for embedded data usage!
[43:24:44.232156752] [3079] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[43:24:44.232487600] [3079] INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a to Unicam device /dev/media0 and ISP device /dev/media3
[43:24:44.233734860] [3078] INFO Camera camera.cpp:1029 configuring streams: (0) 2312x1736-YUV420
[43:24:44.234426462] [3079] INFO RPI raspberrypi.cpp:764 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 2312x1736-SBGGR10_1X10 - Selected unicam format: 2312x1736-pBAA
real 0m5.494s
user 0m0.162s
sys 0m0.127s
It seems to be a consistent ~5.5 seconds regardless of the resolution; note that I’m not writing the image to disk. I’m trying to understand where the time is taken up here; is it transferring the image to the RPi from the quad HAT or is it the Quad HAT? When running for real I’ll just be setting the camera up once and then leaving it open - would that be quicker? I’m looking for a capture rate of ~1 second, is that realistic from this device?
Thanks for your help - the device itself is great; I just need a bit more speed on the capture.
Hi,
Due to the RPI CSI interface data bandwidth limit. the sensor’s source framerate is very slow in order to make sure the CSI controller can receive normally. But the 5s is too long. I want to know how do you measure the time? Which command you are using?
At first I just used a stop watch but as you can see above I used the bash ‘time’ command. Note that I’m not running libcamera-vid but using libcamera-still.
Please accept my apologies on this; I’ve been pulled to another project but I’m back on this now. Please see the results of the tests below:
pi@camhat:~ $ time libcamera-still --nopreview -t 5000 --viewfinder-width 2312 --viewfinder-height 1736 -o pi_hawk_eye.jpg
[0:46:33.860652183] [843] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3729-5f595cca
[0:46:33.866828042] [845] WARN CameraSensorProperties camera_sensor_properties.cpp:174 No static properties available for 'arducam_64mp'
[0:46:33.866921301] [845] WARN CameraSensorProperties camera_sensor_properties.cpp:176 Please consider updating the camera sensor properties database
Open i2c bus error: No such file or directory
[0:46:33.884256114] [845] WARN RPI raspberrypi.cpp:1274 Mismatch between Unicam and CamHelper for embedded data usage!
[0:46:33.884822219] [845] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[0:46:33.885038142] [845] INFO RPI raspberrypi.cpp:1398 Registered camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a to Unicam device /dev/media3 and ISP device /dev/media0
[0:46:33.885765745] [843] INFO Camera camera.cpp:1029 configuring streams: (0) 2312x1736-YUV420
[0:46:33.886163278] [845] INFO RPI raspberrypi.cpp:763 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 2312x1736-SBGGR10_1X10 - Selected unicam format: 2312x1736-pBAA
[0:46:39.258146779] [843] INFO Camera camera.cpp:1029 configuring streams: (0) 9152x6944-YUV420 (1) 9152x6944-SBGGR10_CSI2P
[0:46:39.269348547] [845] INFO RPI raspberrypi.cpp:763 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 9152x6944-SBGGR10_1X10 - Selected unicam format: 9152x6944-pBAA
[0:46:42.579948690] [845] WARN V4L2 v4l2_videodevice.cpp:1780 /dev/video0[14:cap]: Zero sequence expected for first frame (got 1)
Still capture image received
real 0m15.503s
user 0m1.427s
So we have 15 seconds to capture, trying again with 1 second:
pi@camhat:~ $ time libcamera-still --nopreview -t 1000 --viewfinder-width 2312 --viewfinder-height 1736 -o pi_hawk_eye.jpg
[0:50:01.978116321] [858] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3729-5f595cca
[0:50:01.984625917] [860] WARN CameraSensorProperties camera_sensor_properties.cpp:174 No static properties available for 'arducam_64mp'
[0:50:01.984719304] [860] WARN CameraSensorProperties camera_sensor_properties.cpp:176 Please consider updating the camera sensor properties database
Open i2c bus error: No such file or directory
[0:50:02.002033733] [860] WARN RPI raspberrypi.cpp:1274 Mismatch between Unicam and CamHelper for embedded data usage!
[0:50:02.002597651] [860] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[0:50:02.002813352] [860] INFO RPI raspberrypi.cpp:1398 Registered camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a to Unicam device /dev/media3 and ISP device /dev/media0
[0:50:02.003575545] [858] INFO Camera camera.cpp:1029 configuring streams: (0) 2312x1736-YUV420
[0:50:02.004042039] [860] INFO RPI raspberrypi.cpp:763 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 2312x1736-SBGGR10_1X10 - Selected unicam format: 2312x1736-pBAA
[0:50:02.598026157] [860] WARN V4L2 v4l2_videodevice.cpp:1780 /dev/video0[14:cap]: Zero sequence expected for first frame (got 2)
[0:50:03.360853925] [858] INFO Camera camera.cpp:1029 configuring streams: (0) 9152x6944-YUV420 (1) 9152x6944-SBGGR10_CSI2P
[0:50:03.363935697] [860] INFO RPI raspberrypi.cpp:763 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 9152x6944-SBGGR10_1X10 - Selected unicam format: 9152x6944-pBAA
[0:50:06.604820446] [860] WARN V4L2 v4l2_videodevice.cpp:1780 /dev/video0[14:cap]: Zero sequence expected for first frame (got 1)
Still capture image received
real 0m12.139s
user 0m1.304s
sys 0m0.499s
We are at 12.1 seconds so we reduced the -t parameter by 4000 and we are about 3500 lower. Maybe writing the image to disk takes time so let’s no have an output:
pi@camhat:~ $ time libcamera-still --nopreview -t 1000 --viewfinder-width 2312 --viewfinder-height 1736
[0:52:08.637692821] [917] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3729-5f595cca
[0:52:08.643989039] [919] WARN CameraSensorProperties camera_sensor_properties.cpp:174 No static properties available for 'arducam_64mp'
[0:52:08.644066556] [919] WARN CameraSensorProperties camera_sensor_properties.cpp:176 Please consider updating the camera sensor properties database
Open i2c bus error: No such file or directory
[0:52:08.661232674] [919] WARN RPI raspberrypi.cpp:1274 Mismatch between Unicam and CamHelper for embedded data usage!
[0:52:08.661758223] [919] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[0:52:08.661942295] [919] INFO RPI raspberrypi.cpp:1398 Registered camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a to Unicam device /dev/media3 and ISP device /dev/media0
[0:52:08.662735341] [917] INFO Camera camera.cpp:1029 configuring streams: (0) 2312x1736-YUV420
[0:52:08.663167706] [919] INFO RPI raspberrypi.cpp:763 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 2312x1736-SBGGR10_1X10 - Selected unicam format: 2312x1736-pBAA
[0:52:09.257292762] [919] WARN V4L2 v4l2_videodevice.cpp:1780 /dev/video0[14:cap]: Zero sequence expected for first frame (got 2)
real 0m1.462s
user 0m0.113s
sys 0m0.081s
That looks good, we are down to 1.5 seconds; what happens if we drop the delay to 100ms:
pi@camhat:~ $ time libcamera-still --nopreview -t 100 --viewfinder-width 2312 --viewfinder-height 1736
[0:53:02.844739009] [926] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3729-5f595cca
[0:53:02.854157430] [928] WARN CameraSensorProperties camera_sensor_properties.cpp:174 No static properties available for 'arducam_64mp'
[0:53:02.854233985] [928] WARN CameraSensorProperties camera_sensor_properties.cpp:176 Please consider updating the camera sensor properties database
Open i2c bus error: No such file or directory
[0:53:02.882180512] [928] WARN RPI raspberrypi.cpp:1274 Mismatch between Unicam and CamHelper for embedded data usage!
[0:53:02.882964113] [928] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[0:53:02.883243499] [928] INFO RPI raspberrypi.cpp:1398 Registered camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a to Unicam device /dev/media3 and ISP device /dev/media0
[0:53:02.884497039] [926] INFO Camera camera.cpp:1029 configuring streams: (0) 2312x1736-YUV420
[0:53:02.885130698] [928] INFO RPI raspberrypi.cpp:763 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 2312x1736-SBGGR10_1X10 - Selected unicam format: 2312x1736-pBAA
[0:53:03.482975950] [928] WARN V4L2 v4l2_videodevice.cpp:1780 /dev/video0[14:cap]: Zero sequence expected for first frame (got 2)
real 0m1.299s
user 0m0.107s
sys 0m0.095s
OK we are about 1.3 seconds which ties in means that the camera probably has a startup time of ~1 second. We will need to see if we can connect, keep that open and run a grab in C - which is what I’ll do next. Thanks for your help I think I can move forward here.