|
7 | 7 | pipeline = dai.Pipeline() |
8 | 8 |
|
9 | 9 | # Rotate color frames |
10 | | -camRgb = pipeline.createColorCamera() |
| 10 | +camRgb = pipeline.create(dai.node.ColorCamera) |
11 | 11 | camRgb.setPreviewSize(640, 400) |
12 | 12 | camRgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P) |
13 | 13 | camRgb.setInterleaved(False) |
14 | 14 |
|
15 | | -manipRgb = pipeline.createImageManip() |
| 15 | +manipRgb = pipeline.create(dai.node.ImageManip) |
16 | 16 | rgbRr = dai.RotatedRect() |
17 | 17 | rgbRr.center.x, rgbRr.center.y = camRgb.getPreviewWidth() // 2, camRgb.getPreviewHeight() // 2 |
18 | 18 | rgbRr.size.width, rgbRr.size.height = camRgb.getPreviewHeight(), camRgb.getPreviewWidth() |
19 | 19 | rgbRr.angle = 90 |
20 | 20 | manipRgb.initialConfig.setCropRotatedRect(rgbRr, False) |
21 | 21 | camRgb.preview.link(manipRgb.inputImage) |
22 | 22 |
|
23 | | -manipRgbOut = pipeline.createXLinkOut() |
| 23 | +manipRgbOut = pipeline.create(dai.node.XLinkOut) |
24 | 24 | manipRgbOut.setStreamName("manip_rgb") |
25 | 25 | manipRgb.out.link(manipRgbOut.input) |
26 | 26 |
|
27 | 27 | # Rotate mono frames |
28 | | -monoLeft = pipeline.createMonoCamera() |
| 28 | +monoLeft = pipeline.create(dai.node.MonoCamera) |
29 | 29 | monoLeft.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P) |
30 | 30 | monoLeft.setBoardSocket(dai.CameraBoardSocket.LEFT) |
31 | 31 |
|
32 | | -manipLeft = pipeline.createImageManip() |
| 32 | +manipLeft = pipeline.create(dai.node.ImageManip) |
33 | 33 | rr = dai.RotatedRect() |
34 | 34 | rr.center.x, rr.center.y = monoLeft.getResolutionWidth() // 2, monoLeft.getResolutionHeight() // 2 |
35 | 35 | rr.size.width, rr.size.height = monoLeft.getResolutionHeight(), monoLeft.getResolutionWidth() |
36 | 36 | rr.angle = 90 |
37 | 37 | manipLeft.initialConfig.setCropRotatedRect(rr, False) |
38 | 38 | monoLeft.out.link(manipLeft.inputImage) |
39 | 39 |
|
40 | | -manipLeftOut = pipeline.createXLinkOut() |
| 40 | +manipLeftOut = pipeline.create(dai.node.XLinkOut) |
41 | 41 | manipLeftOut.setStreamName("manip_left") |
42 | 42 | manipLeft.out.link(manipLeftOut.input) |
43 | 43 |
|
|
0 commit comments