Processor for padding images.
More...
#include <pad.h>
|
bool | SetPaddingSize (int top, int bottom, int left, int right) |
| Process the input images. More...
|
|
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 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...
|
|
Processor for padding images.
◆ 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] | mat | The input image data, result = mat * alpha + beta |
[in] | top | top pad size of the output image. |
[in] | bottom | bottom pad size of the output image. |
[in] | left | left pad size of the output image. |
[in] | right | right pad size of the output image. |
[in] | value | value vector used by padding of the output image. |
[in] | lib | to 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] | top | set the value of the top parameter |
[in] | bottom | set the value of the bottom parameter |
[in] | left | set the value of the left parameter |
[in] | right | set the value of the right parameter |
The documentation for this class was generated from the following files:
- /fastdeploy/my_work/FastDeploy/fastdeploy/vision/common/processors/pad.h
- /fastdeploy/my_work/FastDeploy/fastdeploy/vision/common/processors/pad.cc