Class Warp
Defined in File Warp.hpp
Inheritance Relationships
Base Type
public dai::DeviceNodeCRTP< DeviceNode, Warp, WarpProperties >(Template Class DeviceNodeCRTP)
Class Documentation
-
class Warp : public dai::DeviceNodeCRTP<DeviceNode, Warp, WarpProperties>
Warp node. Capability to crop, resize, warp, … incoming image frames.
Public Functions
-
void setOutputSize(std::tuple<int, int> size)
Sets output frame size in pixels
- Parameters:
size – width and height in pixels
-
void setOutputSize(int width, int height)
-
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)
-
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 setHwIds(std::vector<int> ids)
Specify which hardware warp engines to use
- Parameters:
ids – Which warp engines to use (0, 1, 2)
-
std::vector<int> getHwIds() const
Retrieve which hardware warp engines to use.
-
void setInterpolation(dai::Interpolation interpolation)
Specify which interpolation method to use
- Parameters:
interpolation – type of interpolation
-
dai::Interpolation getInterpolation() const
Retrieve which interpolation method to use.
-
inline DeviceNodeCRTP()
-
inline DeviceNodeCRTP(std::unique_ptr<Properties> props)
-
inline DeviceNodeCRTP(std::unique_ptr<Properties> props, bool confMode)
Public Members
-
Input inputImage = {*this, {"inputImage", DEFAULT_GROUP, DEFAULT_BLOCKING, DEFAULT_QUEUE_SIZE, {{{DatatypeEnum::ImgFrame, true}}}, DEFAULT_WAIT_FOR_MESSAGE}}
Input image to be modified Default queue is blocking with size 8
-
Output out = {*this, {"out", DEFAULT_GROUP, {{{DatatypeEnum::ImgFrame, true}}}}}
Outputs ImgFrame message that carries warped image.
Public Static Attributes
-
static constexpr const char *NAME = "Warp"
-
void setOutputSize(std::tuple<int, int> size)