Class Warp

Inheritance Relationships

Base Type

Class Documentation

class Warp : public dai::NodeCRTP<Node, Warp, WarpProperties>

Warp node. Capability to crop, resize, warp, … incoming image frames.

Public Functions

Warp(const std::shared_ptr<PipelineImpl> &par, int64_t nodeId)
Warp(const std::shared_ptr<PipelineImpl> &par, int64_t nodeId, std::unique_ptr<Properties> props)
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.

Public Members

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

Output out = {*this, "out", Output::Type::MSender, {{DatatypeEnum::ImgFrame, true}}}

Outputs ImgFrame message that carries warped image.

Public Static Attributes

static constexpr const char *NAME = "Warp"

Protected Functions

virtual Properties &getProperties()