Class ImageManip
Defined in File ImageManip.hpp
Inheritance Relationships
Base Type
public dai::NodeCRTP< Node, ImageManip, ImageManipProperties >(Template Class NodeCRTP)
Class Documentation
-
class ImageManip : public dai::NodeCRTP<Node, ImageManip, ImageManipProperties>
ImageManip node. Capability to crop, resize, warp, … incoming image frames.
Public Functions
-
void setCropRect(float xmin, float ymin, float xmax, float ymax)
-
void setCenterCrop(float ratio, float whRatio = 1.0f)
-
void setResize(int w, int h)
-
void setResizeThumbnail(int w, int h, int bgRed = 0, int bgGreen = 0, int bgBlue = 0)
-
void setHorizontalFlip(bool flip)
-
void setKeepAspectRatio(bool keep)
-
void setWaitForConfigInput(bool wait)
Specify whether or not wait until configuration message arrives to inputConfig Input.
- Parameters:
wait – True to wait for configuration message, false otherwise.
-
bool getWaitForConfigInput() const
See also
- Returns:
True if wait for inputConfig message, false otherwise
-
void setNumFramesPool(int numFramesPool)
Specify number of frames in pool.
- Parameters:
numFramesPool – How many frames should the pool have
-
void setMaxOutputFrameSize(int maxFrameSize)
Specify maximum size of output image.
- Parameters:
maxFrameSize – Maximum frame size in bytes
-
void setWarpMesh(const std::vector<Point2f> &meshData, int width, int height)
Set a custom warp mesh
- Parameters:
meshData – 2D plane of mesh points, starting from top left to bottom right
width – Width of mesh
height – Height of mesh
-
void setWarpMesh(const std::vector<std::pair<float, float>> &meshData, int width, int height)
Public Members
-
ImageManipConfig initialConfig
Initial config to use when manipulating frames
-
Input inputConfig = {*this, "inputConfig", Input::Type::SReceiver, true, 8, {{DatatypeEnum::ImageManipConfig, true}}}
Input ImageManipConfig message with ability to modify parameters in runtime Default queue is blocking with size 8
-
Input inputImage = {*this, "inputImage", Input::Type::SReceiver, true, 8, true, {{DatatypeEnum::ImgFrame, true}}}
Input image to be modified Default queue is blocking with size 8
Public Static Attributes
-
static constexpr const char *NAME = "ImageManip"
Protected Functions
-
virtual Properties &getProperties()
-
void setCropRect(float xmin, float ymin, float xmax, float ymax)