相机流去畸变
最后更新
still、video 和 preview 流进行去畸变,而 isp 流将保持不变。演示
设置
Command Line
1git clone https://github.com/luxonis/depthai-python.git
2cd depthai-python/examples
3python3 install_requirements.py源代码
Python
PythonGitHub
1#!/usr/bin/env python3
2
3import depthai as dai
4import cv2
5
6pipeline = dai.Pipeline()
7
8# Define sources and outputs
9camRgb: dai.node.Camera = pipeline.create(dai.node.Camera)
10
11#Properties
12camRgb.setBoardSocket(dai.CameraBoardSocket.CAM_A)
13camRgb.setSize((1280, 800))
14
15# Linking
16videoOut = pipeline.create(dai.node.XLinkOut)
17videoOut.setStreamName("video")
18camRgb.video.link(videoOut.input)
19
20ispOut = pipeline.create(dai.node.XLinkOut)
21ispOut.setStreamName("isp")
22camRgb.isp.link(ispOut.input)
23
24with dai.Device(pipeline) as device:
25 video = device.getOutputQueue(name="video", maxSize=1, blocking=False)
26 isp = device.getOutputQueue(name="isp", maxSize=1, blocking=False)
27
28 while True:
29 if video.has():
30 cv2.imshow("video", video.get().getCvFrame())
31 if isp.has():
32 cv2.imshow("isp", isp.get().getCvFrame())
33 if cv2.waitKey(1) == ord('q'):
34 break流水线
需要帮助?
请访问讨论论坛以获取技术支持或您可能有的任何其他问题。