ImageManip node. Capability to crop, resize, warp, ... incoming image frames.
More...
#include <ImageManip.hpp>
|
bool | getWaitForConfigInput () const |
|
| ImageManip (const std::shared_ptr< PipelineImpl > &par, int64_t nodeId) |
|
| ImageManip (const std::shared_ptr< PipelineImpl > &par, int64_t nodeId, std::unique_ptr< Properties > props) |
|
void | setCenterCrop (float ratio, float whRatio=1.0f) |
|
void | setCropRect (float xmin, float ymin, float xmax, float ymax) |
|
void | setFrameType (ImgFrame::Type name) |
|
void | setHorizontalFlip (bool flip) |
|
void | setKeepAspectRatio (bool keep) |
|
void | setMaxOutputFrameSize (int maxFrameSize) |
|
void | setNumFramesPool (int numFramesPool) |
|
void | setResize (int w, int h) |
|
void | setResizeThumbnail (int w, int h, int bgRed=0, int bgGreen=0, int bgBlue=0) |
|
void | setWaitForConfigInput (bool wait) |
|
void | setWarpMesh (const std::vector< Point2f > &meshData, int width, int height) |
|
void | setWarpMesh (const std::vector< std::pair< float, float >> &meshData, int width, int height) |
|
std::unique_ptr< Node > | clone () const override |
|
const char * | getName () const override |
|
virtual std::unique_ptr< Node > | clone () const =0 |
| Deep copy the node. More...
|
|
AssetManager & | getAssetManager () |
| Get node AssetManager as a reference. More...
|
|
const AssetManager & | getAssetManager () const |
| Get node AssetManager as a const reference. More...
|
|
std::vector< Input * > | getInputRefs () |
| Retrieves reference to node inputs. More...
|
|
std::vector< const Input * > | getInputRefs () const |
| Retrieves reference to node inputs. More...
|
|
std::vector< Input > | getInputs () |
| Retrieves all nodes inputs. More...
|
|
virtual const char * | getName () const =0 |
| Retrieves nodes name. More...
|
|
std::vector< Output * > | getOutputRefs () |
| Retrieves reference to node outputs. More...
|
|
std::vector< const Output * > | getOutputRefs () const |
| Retrieves reference to node outputs. More...
|
|
std::vector< Output > | getOutputs () |
| Retrieves all nodes outputs. More...
|
|
Pipeline | getParentPipeline () |
|
const Pipeline | getParentPipeline () const |
|
| Node (const std::shared_ptr< PipelineImpl > &p, Id nodeId, std::unique_ptr< Properties > props) |
| Constructs Node. More...
|
|
virtual | ~Node ()=default |
|
|
ImageManipConfig | initialConfig |
|
Input | inputConfig {*this, "inputConfig", Input::Type::SReceiver, true, 8, {{DatatypeEnum::ImageManipConfig, true}}} |
|
Input | inputImage {*this, "inputImage", Input::Type::SReceiver, true, 8, true, {{DatatypeEnum::ImgFrame, true}}} |
|
Output | out {*this, "out", Output::Type::MSender, {{DatatypeEnum::ImgFrame, true}}} |
|
Properties & | properties |
| Underlying properties. More...
|
|
const Id | id |
| Id of node. More...
|
|
Properties & | properties |
|
|
constexpr static const char * | NAME = "ImageManip" |
|
|
void | setWarpMesh (const float *meshData, int numMeshPoints, int width, int height) |
|
ImageManip node. Capability to crop, resize, warp, ... incoming image frames.
Definition at line 15 of file ImageManip.hpp.
◆ ImageManip() [1/2]
dai::node::ImageManip::ImageManip |
( |
const std::shared_ptr< PipelineImpl > & |
par, |
|
|
int64_t |
nodeId |
|
) |
| |
◆ ImageManip() [2/2]
dai::node::ImageManip::ImageManip |
( |
const std::shared_ptr< PipelineImpl > & |
par, |
|
|
int64_t |
nodeId, |
|
|
std::unique_ptr< Properties > |
props |
|
) |
| |
◆ getProperties()
◆ getWaitForConfigInput()
bool dai::node::ImageManip::getWaitForConfigInput |
( |
| ) |
const |
◆ setCenterCrop()
void dai::node::ImageManip::setCenterCrop |
( |
float |
ratio, |
|
|
float |
whRatio = 1.0f |
|
) |
| |
◆ setCropRect()
void dai::node::ImageManip::setCropRect |
( |
float |
xmin, |
|
|
float |
ymin, |
|
|
float |
xmax, |
|
|
float |
ymax |
|
) |
| |
◆ setFrameType()
◆ setHorizontalFlip()
void dai::node::ImageManip::setHorizontalFlip |
( |
bool |
flip | ) |
|
◆ setKeepAspectRatio()
void dai::node::ImageManip::setKeepAspectRatio |
( |
bool |
keep | ) |
|
◆ setMaxOutputFrameSize()
void dai::node::ImageManip::setMaxOutputFrameSize |
( |
int |
maxFrameSize | ) |
|
Specify maximum size of output image.
- Parameters
-
maxFrameSize | Maximum frame size in bytes |
Definition at line 68 of file ImageManip.cpp.
◆ setNumFramesPool()
void dai::node::ImageManip::setNumFramesPool |
( |
int |
numFramesPool | ) |
|
Specify number of frames in pool.
- Parameters
-
numFramesPool | How many frames should the pool have |
Definition at line 64 of file ImageManip.cpp.
◆ setResize()
void dai::node::ImageManip::setResize |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
◆ setResizeThumbnail()
void dai::node::ImageManip::setResizeThumbnail |
( |
int |
w, |
|
|
int |
h, |
|
|
int |
bgRed = 0 , |
|
|
int |
bgGreen = 0 , |
|
|
int |
bgBlue = 0 |
|
) |
| |
◆ setWaitForConfigInput()
void dai::node::ImageManip::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. |
Definition at line 56 of file ImageManip.cpp.
◆ setWarpMesh() [1/3]
void dai::node::ImageManip::setWarpMesh |
( |
const float * |
meshData, |
|
|
int |
numMeshPoints, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
|
private |
◆ setWarpMesh() [2/3]
void dai::node::ImageManip::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 |
Definition at line 111 of file ImageManip.cpp.
◆ setWarpMesh() [3/3]
void dai::node::ImageManip::setWarpMesh |
( |
const std::vector< std::pair< float, float >> & |
meshData, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
◆ initialConfig
Initial config to use when manipulating frames
Definition at line 34 of file ImageManip.hpp.
◆ inputConfig
◆ inputImage
Input image to be modified Default queue is blocking with size 8
Definition at line 46 of file ImageManip.hpp.
◆ NAME
constexpr static const char* dai::node::ImageManip::NAME = "ImageManip" |
|
staticconstexpr |
◆ out
◆ rawConfig
The documentation for this class was generated from the following files: