DepthAI v2 has been superseded by DepthAI v3. You are viewing legacy documentation.

ON THIS PAGE

  • ImageManipConfig
  • Examples of functionality
  • Reference

ImageManipConfig

This message can is used for cropping, warping, rotating, resizing, etc. an image in runtime. It can be sent from host/Script node to either ColorCamera or ImageManip.

Examples of functionality

Reference

class

depthai.ImageManipConfig(depthai.Buffer)

class
ResizeMode
Members:    NONE    LETTERBOX    CENTER_CROP    STRETCH
method
method
method
method
addCropRotatedRect(self, rect: RotatedRect, normalizedCoords: bool) -> ImageManipConfig: ImageManipConfig
Crops the image to the specified (rotated) rectangle  Parameter ``rect``:     RotatedRect to crop  Parameter ``normalizedCoords``:     If true, the coordinates are normalized to range [0, 1] where 1 maps to the     width/height of the image
method
method
method
method
method
addTransformAffine(self, mat: typing.Annotated [ list [ float ] , pybind11_stubgen.typing_ext.FixedSize ( 4 ) ]) -> ImageManipConfig: ImageManipConfig
Applies an affine transformation to the image  Parameter ``matrix``:     an array containing a 2x2 matrix representing the affine transformation
method
addTransformFourPoints(self, src: typing.Annotated [ list [ Point2f ] , pybind11_stubgen.typing_ext.FixedSize ( 4 ) ], dst: typing.Annotated [ list [ Point2f ] , pybind11_stubgen.typing_ext.FixedSize ( 4 ) ], normalizedCoords: bool) -> ImageManipConfig: ImageManipConfig
Applies a perspective transformation to the image  Parameter ``src``:     Source points  Parameter ``dst``:     Destination points  Parameter ``normalizedCoords``:     If true, the coordinates are normalized to range [0, 1] where 1 maps to the     width/height of the image
method
addTransformPerspective(self, mat: typing.Annotated [ list [ float ] , pybind11_stubgen.typing_ext.FixedSize ( 9 ) ]) -> ImageManipConfig: ImageManipConfig
Applies a perspective transformation to the image  Parameter ``matrix``:     an array containing a 3x3 matrix representing the perspective transformation
method
clearOps(self) -> ImageManipConfig: ImageManipConfig
Removes all operations from the list (does not affect output configuration)
method
getUndistort(self) -> bool: bool
Gets the undistort flag  Returns:     True if undistort is enabled, false otherwise
method
method
method
setFrameType(self, type: ImgFrame.Type) -> ImageManipConfig: ImageManipConfig
Sets the frame type of the output image  Parameter ``frameType``:     Frame type of the output image
method
setOutputCenter(self, c: bool) -> ImageManipConfig: ImageManipConfig
Centers the content in the output image without resizing  Parameter ``c``:     True to center the content, false otherwise
method
setOutputSize(self, w: int, h: int, mode: ImageManipConfig.ResizeMode = ...) -> ImageManipConfig: ImageManipConfig
Sets the output size of the image  Parameter ``w``:     Width of the output image  Parameter ``h``:     Height of the output image  Parameter ``mode``:     Resize mode. NONE - no resize, STRETCH - stretch to fit, LETTERBOX - keep     aspect ratio and pad with background color, CENTER_CROP - keep aspect ratio     and crop
method
setReusePreviousImage(self, reuse: bool) -> ImageManipConfig: ImageManipConfig
Instruct ImageManip to not remove current image from its queue and use the same for next message.  Parameter ``reuse``:     True to enable reuse, false otherwise
method
setSkipCurrentImage(self, skip: bool) -> ImageManipConfig: ImageManipConfig
Instructs ImageManip to skip current image and wait for next in queue.  Parameter ``skip``:     True to skip current image, false otherwise
method

Need assistance?

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