File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments