Skip to content

Commit a5e40a2

Browse files
committed
Added example that undistorts wide fov color cam
1 parent ce2627c commit a5e40a2

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

examples/Camera/camera_undistort.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import depthai as dai
2+
import cv2
3+
4+
pipeline = dai.Pipeline()
5+
6+
# Define sources and outputs
7+
camRgb: dai.node.Camera = pipeline.create(dai.node.Camera)
8+
9+
#Properties
10+
camRgb.setBoardSocket(dai.CameraBoardSocket.CAM_A)
11+
camRgb.setSize((1280, 800))
12+
13+
# Linking
14+
videoOut = pipeline.create(dai.node.XLinkOut)
15+
videoOut.setStreamName("video")
16+
camRgb.video.link(videoOut.input)
17+
18+
ispOut = pipeline.create(dai.node.XLinkOut)
19+
ispOut.setStreamName("isp")
20+
camRgb.isp.link(ispOut.input)
21+
22+
with dai.Device(pipeline) as device:
23+
video = device.getOutputQueue(name="video", maxSize=1, blocking=False)
24+
isp = device.getOutputQueue(name="isp", maxSize=1, blocking=False)
25+
26+
while True:
27+
if video.has():
28+
cv2.imshow("video", video.get().getCvFrame())
29+
if isp.has():
30+
cv2.imshow("isp", isp.get().getCvFrame())
31+
if cv2.waitKey(1) == ord('q'):
32+
break

0 commit comments

Comments
 (0)