Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4049

Camera board • Re: Help! Trouble Synchronising Global Shutter Camera (IMX296) with Pi 5

$
0
0
I suggest you:

First:
1) verify you're starting the camera w/o the MAS soldered first (master). Then wait 2 seconds min. and start the slave/sink camera (MAS soldered).

Second if needed:
2) double check the connections - the breadboard and lack of soldered connections could contribute to miscommunication

The rpi5 works with with stereo GS cameras, refer to my post requesting feedback. However, some crucial features are broken including circular buffers and segmented recording.

I have now soldered the jumper cables to the camera boards rather than rely on contact of cables to the terminals

Code:

echo 1 > /sys/module/imx296/parameters/trigger_mode

Code:

~ $ modinfo imx296filename:       /lib/modules/<kernel version>/kernel/drivers/media/i2c/imx296.ko.xzlicense:        GPLauthor:         Laurent Pinchart <laurent.pinchart@ideasonboard.com>description:    Sony IMX296 Camera driversrcversion:     6B851572554BEC8CC83283Aalias:          of:N*T*Csony,imx296lqC*alias:          of:N*T*Csony,imx296lqalias:          of:N*T*Csony,imx296llC*alias:          of:N*T*Csony,imx296llalias:          of:N*T*Csony,imx296C*alias:          of:N*T*Csony,imx296depends:        videodev,v4l2-async,regmap-i2c,v4l2-fwnode,mcintree:         Yname:           imx296vermagic:       6.6.51+rpt-rpi-v8 SMP preempt mod_unload modversions aarch64parm:           trigger_mode:Set trigger mode: 0=default, 1=XTRIG (int) <<<<<<<<<<<<<<<<<
Or add "imx296.trigger_mode=1" to /boot/firmware/cmdline.txt
Or create a file /etc/modprobe.d/options_imx296.conf with the contents

Code:

imx296 trigger_mode=1

I've added "imx296.trigger_mode=1" to /boot/firmware/cmdline.txt

Now I'm able to run both the cameras but when I tried to test the synchronisation with the script below

Code:

from picamera2 import Picamera2import timepicam2left = Picamera2(0)picam2right = Picamera2(1)left_config = picam2left.create_video_configuration({"format":"RGB888", "size":(740,320) },raw=None)right_config = picam2right.create_video_configuration({"format":"RGB888", "size":(740,320) },raw=None)picam2left.configure(left_config)picam2right.configure(right_config)picam2left.start()time.sleep(2)picam2right.start()left_img = picam2left.capture_array()right_img = picam2right.capture_array()t1 = picam2left.capture_metadata()['SensorTimestamp']t2 = picam2right.capture_metadata()['SensorTimestamp']print(t1 - t2)picam2right.close()picam2left.close()
I get the output
Screenshot 2025-01-09 015053.png
Showing that there are 66660000 micro seconds difference in SensorTimstamp.

Have I missed a step somewhere?

Again, thank you very much everyone for helping!

Statistics: Posted by jh-p — Thu Jan 09, 2025 2:00 am



Viewing all articles
Browse latest Browse all 4049

Trending Articles