Processor for convert images with given paramters and permute images from HWC to CHW.
More...
#include <convert_and_permute.h>
|
void | SetAlpha (const std::vector< float > &alpha) |
| Process the input images. More...
|
|
void | SetBeta (const std::vector< float > &beta) |
| Process the input images. More...
|
|
void | SetSwapRB (bool swap_rb) |
| 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 (FDMat *mat, const std::vector< float > &alpha, const std::vector< float > &beta, bool swap_rb=false, ProcLib lib=ProcLib::DEFAULT) |
| Process the input images. More...
|
|
Processor for convert images with given paramters and permute images from HWC to CHW.
◆ Run()
bool fastdeploy::vision::ConvertAndPermute::Run |
( |
FDMat * |
mat, |
|
|
const std::vector< float > & |
alpha, |
|
|
const std::vector< float > & |
beta, |
|
|
bool |
swap_rb = false , |
|
|
ProcLib |
lib = ProcLib::DEFAULT |
|
) |
| |
|
static |
Process the input images.
- Parameters
-
[in] | mat | The input image data,result = mat * alpha + beta |
[in] | alpha | The alpha channel data |
[in] | beta | The beta channel data |
[in] | lib | to define OpenCV or FlyCV or CVCUDA will be used. |
- Returns
- true if the process successed, otherwise false
◆ SetAlpha()
void fastdeploy::vision::ConvertAndPermute::SetAlpha |
( |
const std::vector< float > & |
alpha | ) |
|
|
inline |
Process the input images.
- Parameters
-
[in] | alpha | set the value of the alpha parameter |
◆ SetBeta()
void fastdeploy::vision::ConvertAndPermute::SetBeta |
( |
const std::vector< float > & |
beta | ) |
|
|
inline |
Process the input images.
- Parameters
-
[in] | beta | set the value of the beta parameter |
◆ SetSwapRB()
void fastdeploy::vision::ConvertAndPermute::SetSwapRB |
( |
bool |
swap_rb | ) |
|
|
inline |
Process the input images.
- Parameters
-
[in] | swap_rb | set the value of the swap_rb parameter |
The documentation for this class was generated from the following files:
- /fastdeploy/my_work/FastDeploy/fastdeploy/vision/common/processors/convert_and_permute.h
- /fastdeploy/my_work/FastDeploy/fastdeploy/vision/common/processors/convert_and_permute.cc