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)

method
method
get(self) -> RawImageManipConfig: RawImageManipConfig
Retrieve configuration data for ImageManip.  Returns:     config for ImageManip
method
getColormap(self) -> Colormap: Colormap
Returns:     specified colormap
method
method
getCropXMax(self) -> float: float
Returns:     Bottom right X coordinate of crop region
method
getCropXMin(self) -> float: float
Returns:     Top left X coordinate of crop region
method
getCropYMax(self) -> float: float
Returns:     Bottom right Y coordinate of crop region
method
getCropYMin(self) -> float: float
Returns:     Top left Y coordinate of crop region
method
method
getInterpolation(self) -> Interpolation: Interpolation
Retrieve which interpolation method to use
method
method
getResizeHeight(self) -> int: int
Returns:     Output image height
method
getResizeWidth(self) -> int: int
Returns:     Output image width
method
isResizeThumbnail(self) -> bool: bool
Returns:     True if resize thumbnail mode is set, false otherwise
method
set(self, config: RawImageManipConfig) -> ImageManipConfig: ImageManipConfig
Set explicit configuration.  Parameter ``config``:     Explicit configuration
method
setCenterCrop(self, ratio: float, whRatio: float = 1.0) -> ImageManipConfig: ImageManipConfig
Specifies a centered crop.  Parameter ``ratio``:     Ratio between input image and crop region (0..1)  Parameter ``whRatio``:     Crop region aspect ratio - 1 equals to square, 1.7 equals to 16:9, ...
method
method
method
setCropRotatedRect(self, rr: RotatedRect, normalizedCoords: bool = True) -> ImageManipConfig: ImageManipConfig
Specifies crop with rotated rectangle. Optionally as non normalized coordinates  Parameter ``rr``:     Rotated rectangle which specifies crop  Parameter ``normalizedCoords``:     If true coordinates are in normalized range (0..1) otherwise absolute
method
setFrameType(self, type: RawImgFrame.Type) -> ImageManipConfig: ImageManipConfig
Specify output frame type.  Parameter ``name``:     Frame type
method
setHorizontalFlip(self, flip: bool) -> ImageManipConfig: ImageManipConfig
Specify horizontal flip  Parameter ``flip``:     True to enable flip, false otherwise
method
setInterpolation(self, interpolation: Interpolation) -> ImageManipConfig: ImageManipConfig
Specify which interpolation method to use  Parameter ``interpolation``:     type of interpolation
method
method
method
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
setRotationDegrees(self, deg: float) -> ImageManipConfig: ImageManipConfig
Specifies clockwise rotation in degrees  Parameter ``deg``:     Rotation in degrees
method
setRotationRadians(self, rad: float) -> ImageManipConfig: ImageManipConfig
Specifies clockwise rotation in radians  Parameter ``rad``:     Rotation in radians
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
setVerticalFlip(self, flip: bool)
Specify vertical flip  Parameter ``flip``:     True to enable vertical flip, false otherwise
method
setWarpBorderFillColor(self, red: int, green: int, blue: int) -> ImageManipConfig: ImageManipConfig
Specifies fill color for border pixels. Example:  - setWarpBorderFillColor(255,255,255) -> white  - setWarpBorderFillColor(0,0,255) -> blue  Parameter ``red``:     Red component  Parameter ``green``:     Green component  Parameter ``blue``:     Blue component
method
method
setWarpTransformFourPoints(self, pt: list [ Point2f ], normalizedCoords: bool) -> ImageManipConfig: ImageManipConfig
Specifies warp by supplying 4 points in either absolute or normalized coordinates  Parameter ``pt``:     4 points specifying warp  Parameter ``normalizedCoords``:     If true pt is interpreted as normalized, absolute otherwise
method
setWarpTransformMatrix3x3(self, mat: list [ float ]) -> ImageManipConfig: ImageManipConfig
Specifies warp with a 3x3 matrix  Parameter ``mat``:     3x3 matrix

Need assistance?

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