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

Camera board • Re: feedback requested on dual GS camera design

$
0
0
Reporting an update: the design above appears to work as expected, only 17 microseconds apart

Here is the prototype built to the spec above:
Image

Here is the code snippet for the test:

Code:

try:            with Picamera2(cam1) as picam1, Picamera2(cam2) as picam2:                picam1 = self.configure_picam2(picam1)                picam2 = self.configure_picam2(picam2)                                picam1.start()                picam2.start()                while True:                    frame1 = picam1.capture_array()                    frame2 = picam2.capture_array()                    lux1 = picam1.capture_metadata()['Lux']                    lux2 = picam2.capture_metadata()['Lux']                    ts1 = picam1.capture_metadata()['SensorTimestamp']                    timestamp1 = self.printable_timestamp(ts1)                    ts2 = picam2.capture_metadata()['SensorTimestamp']                    timestamp2 = self.printable_timestamp(ts2)                    print(f'\rLux1: {lux1}, Lux2: {lux2}. Cam1 ts: {timestamp1} Cam2 ts: {timestamp2}' , end='')                    cv2.imshow('Master/Bottom', frame1)                    cv2.imshow('Slave/Top', frame2)                    if cv2.waitKey(1) & 0xFF == ord('q'):                        break                                except Exception as e:
And here is the resulting timestamps, only 17 microseconds difference:

Code:

Lux1: 230.70010375976562, Lux2: 102.81550598144531. Cam1 ts: 2024-02-22 06:34:56.445845 Cam2 ts: 2024-02-22 06:34:56.445862
NOTE: the lux difference is only because the cameras are not both looking at the same object (yet) I have some physical alignment to do still.

Statistics: Posted by ddbaron — Thu Feb 22, 2024 12:47 pm



Viewing all articles
Browse latest Browse all 5372

Trending Articles