FastDeploy  latest
Fast & Easy to Deploy!
Public Member Functions | Static Public Member Functions | List of all members
fastdeploy::vision::Pad Class Reference

Processor for padding images. More...

#include <pad.h>

Inheritance diagram for fastdeploy::vision::Pad:
Inheritance graph
[legend]
Collaboration diagram for fastdeploy::vision::Pad:
Collaboration graph
[legend]

Public Member Functions

bool SetPaddingSize (int top, int bottom, int left, int right)
 Process the input images. More...
 
- Public Member Functions inherited from fastdeploy::vision::Processor
virtual bool operator() (FDMat *mat)
 operator () for calling processor in this way: processor(mat) More...
 
virtual bool operator() (FDMat *mat, ProcLib lib)
 operator () for calling processor in this way: processor(mat, lib) This function is for backward compatibility, will be removed in the near future, please use operator()(FDMat* mat) instead and set proc_lib in mat. More...
 
virtual bool operator() (FDMatBatch *mat_batch)
 operator () for calling processor in this way: processor(mat_batch) More...
 

Static Public Member Functions

static bool Run (Mat *mat, const int &top, const int &bottom, const int &left, const int &right, const std::vector< float > &value, ProcLib lib=ProcLib::DEFAULT)
 Process the input images. More...
 

Detailed Description

Processor for padding images.

Member Function Documentation

◆ Run()

bool fastdeploy::vision::Pad::Run ( Mat mat,
const int &  top,
const int &  bottom,
const int &  left,
const int &  right,
const std::vector< float > &  value,
ProcLib  lib = ProcLib::DEFAULT 
)
static

Process the input images.

Parameters
[in]matThe input image data, result = mat * alpha + beta
[in]toptop pad size of the output image.
[in]bottombottom pad size of the output image.
[in]leftleft pad size of the output image.
[in]rightright pad size of the output image.
[in]valuevalue vector used by padding of the output image.
[in]libto define OpenCV or FlyCV or CVCUDA will be used.
Returns
true if the process successed, otherwise false

◆ SetPaddingSize()

bool fastdeploy::vision::Pad::SetPaddingSize ( int  top,
int  bottom,
int  left,
int  right 
)
inline

Process the input images.

Parameters
[in]topset the value of the top parameter
[in]bottomset the value of the bottom parameter
[in]leftset the value of the left parameter
[in]rightset the value of the right parameter

The documentation for this class was generated from the following files: