Software Stack
DepthAI

ON THIS PAGE

  • ImageManip multiple operations
  • Demo
  • Setup
  • Pipeline
  • Source code

ImageManip multiple operations

This example showcases multiple ImageManip operations in a row (one after another):All of this is done within the single ImageManip node in the pipeline. Note that operations order is important, as operations are applied in the order they are set.

Demo

Setup

This example requires the DepthAI v3 API, see installation instructions.

Pipeline

Source code

Python
C++

Python

Python
GitHub
1import depthai as dai
2import cv2
3
4pipeline = dai.Pipeline()
5
6camRgb = pipeline.create(dai.node.Camera).build(dai.CameraBoardSocket.CAM_A)
7manip = pipeline.create(dai.node.ImageManip)
8
9
10manip.initialConfig.setOutputSize(1270, 710, dai.ImageManipConfig.ResizeMode.LETTERBOX)
11manip.initialConfig.addCrop(50, 100, 500, 500)
12manip.initialConfig.addFlipVertical()
13manip.initialConfig.setFrameType(dai.ImgFrame.Type.NV12)
14manip.setMaxOutputFrameSize(2709360)
15
16camRgb.requestOutput((1920, 1080)).link(manip.inputImage)
17
18out = manip.out.createOutputQueue()
19
20pipeline.start()
21
22print(manip.initialConfig)
23
24while True:
25    inFrame = out.get()
26    if inFrame is not None:
27        cv2.imshow("Show frame", inFrame.getCvFrame())
28        key = cv2.waitKey(1)
29        if key == ord('q'):
30            break

Need assistance?

Head over to Discussion Forum for technical support or any other questions you might have.