Skip to content

Commit 0cfaeaa

Browse files
author
Matevz Morato
committed
Merge remote-tracking branch 'origin/main' into release_v2.28.0.0
2 parents 4d78636 + f82083c commit 0cfaeaa

6 files changed

Lines changed: 36 additions & 5 deletions

File tree

examples/ImageAlign/depth_align.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def getFps(self):
6868

6969
out.setStreamName("out")
7070

71-
sync.setSyncThreshold(timedelta(seconds=(1 / FPS) * 0.5))
71+
sync.setSyncThreshold(timedelta(seconds=0.5 / FPS))
7272

7373
# Linking
7474
camRgb.isp.link(sync.inputs["rgb"])

examples/ImageAlign/image_align.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
out.setStreamName("out")
3636

37-
sync.setSyncThreshold(timedelta(seconds=(1 / FPS) * 0.5))
37+
sync.setSyncThreshold(timedelta(seconds=0.5 / FPS))
3838

3939
cfgIn.setStreamName("config")
4040

examples/ImageAlign/thermal_align.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def getFps(self):
5959

6060
out.setStreamName("out")
6161

62-
sync.setSyncThreshold(timedelta(seconds=1/FPS * 0.5))
62+
sync.setSyncThreshold(timedelta(seconds=0.5 / FPS))
6363

6464
cfgIn.setStreamName("config")
6565

examples/ImageAlign/tof_align.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def getFps(self):
5050

5151
out.setStreamName("out")
5252

53-
sync.setSyncThreshold(timedelta(seconds=(1 / FPS)))
53+
sync.setSyncThreshold(timedelta(seconds=0.5 / FPS))
5454

5555
# Linking
5656
camRgb.isp.link(sync.inputs["rgb"])

examples/Sync/sync_all_cameras.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env python3
2+
3+
import cv2
4+
import depthai as dai
5+
6+
with dai.Device() as device:
7+
pipeline = dai.Pipeline()
8+
cams = device.getConnectedCameraFeatures()
9+
sync = pipeline.create(dai.node.Sync)
10+
for cam in cams:
11+
print(str(cam), str(cam.socket), cam.socket)
12+
cam_node = pipeline.create(dai.node.Camera)
13+
cam_node.setBoardSocket(cam.socket)
14+
cam_node.isp.link(sync.inputs[str(cam.socket)])
15+
16+
xout = pipeline.create(dai.node.XLinkOut)
17+
xout.setStreamName('sync')
18+
sync.out.link(xout.input)
19+
20+
# Start pipeline
21+
device.startPipeline(pipeline)
22+
q = device.getOutputQueue('sync', maxSize=10, blocking=False)
23+
while not device.isClosed():
24+
msgs = q.get()
25+
for (name, imgFrame) in msgs:
26+
print(f'Cam {name}, seq {imgFrame.getSequenceNum()}, tiemstamp {imgFrame.getTimestamp()}')
27+
cv2.imshow(name, imgFrame.getCvFrame())
28+
print('----')
29+
30+
if cv2.waitKey(1) == ord('q'):
31+
break

utilities/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ opencv-contrib-python==4.5.5.62 # Last successful RPi build, also covers M1 with
55
pyqt5>5,<5.15.6 ; platform_machine != "armv6l" and platform_machine != "armv7l" and platform_machine != "aarch64" and platform_machine != "arm64"
66
--extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/
77
# Latest version (note - it's yanked)
8-
PySimpleGUI==4.60.5
8+
PySimpleGUI-4-foss==4.60.4.1 # Mirror of final open-source release.
99
depthai

0 commit comments

Comments
 (0)