ImageManip
ImageManip node can be used to crop, rotate rectangle area or perform various image transforms: rotate, mirror, flip, perspective transform.For downscaling, ImageManip uses the bilinear/bicubic interpolation.How to place it
Python
C++
Python
Python
1pipeline = dai.Pipeline()
2manip = pipeline.create(dai.node.ImageManip)
Inputs and Outputs
Usage
Python
C++
Python
Python
1pipeline = dai.Pipeline()
2manip = pipeline.create(dai.node.ImageManip)
3
4manip.initialConfig.setResize(300, 300)
5manip.initialConfig.setFrameType(dai.ImgFrame.Type.BGR888p)
Image formats supported
ImageManip node supports the following image formats (more info in PR here):- Input formats supported: RGB/BGR, planar/interleaved, YUV/NV12, RAW8 and GRAY8
- Convert format to any other format mentioned above
- RAW16 (uint16,
depth
output) supported, but without color conversion capability
Limitations
Besides limitations mentioned above (unsupported frame formats), there are other limitations:- Due to HW warp constraint, rotating/warping can be done only on frames whose width values are multiples of 16
- Maximum output width of a frame is 4056 pixels
Examples of functionality
- Mono & MobilenetSSD
- RGB Encoding & Mono & MobilenetSSD
- RGB Camera Control
- ImageManip tiling - Using ImageManip for frame tiling
- ImageManip rotate - Using ImageManip to rotate color/mono frames
Reference
class
depthai.node.ImageManip(depthai.Node)
method
getWaitForConfigInput(self) -> bool: bool
See also: setWaitForConfigInput Returns: True if wait for inputConfig message, false otherwise
method
method
method
method
method
method
setMaxOutputFrameSize(self, arg0: int)
Specify maximum size of output image. Parameter ``maxFrameSize``: Maximum frame size in bytes
method
setNumFramesPool(self, arg0: int)
Specify number of frames in pool. Parameter ``numFramesPool``: How many frames should the pool have
method
method
method
setWaitForConfigInput(self, wait: bool)
Specify whether or not wait until configuration message arrives to inputConfig Input. Parameter ``wait``: True to wait for configuration message, false otherwise.
method
property
initialConfig
Initial config to use when manipulating frames
property
inputConfig
Input ImageManipConfig message with ability to modify parameters in runtime Default queue is blocking with size 8
property
inputImage
Input image to be modified Default queue is blocking with size 8
property
out
Outputs ImgFrame message that carries modified image.
Need assistance?
Head over to Discussion Forum for technical support or any other questions you might have.