Processor for Normalize and Permute images from HWC to CHW.
More...
#include <normalize_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 > &mean, const std::vector< float > &std, bool is_scale=true, const std::vector< float > &min=std::vector< float >(), const std::vector< float > &max=std::vector< float >(), ProcLib lib=ProcLib::DEFAULT, bool swap_rb=false) |
| Process the input images. More...
|
|
Processor for Normalize and Permute images from HWC to CHW.
◆ Run()
bool fastdeploy::vision::NormalizeAndPermute::Run |
( |
FDMat * |
mat, |
|
|
const std::vector< float > & |
mean, |
|
|
const std::vector< float > & |
std, |
|
|
bool |
is_scale = true , |
|
|
const std::vector< float > & |
min = std::vector<float>() , |
|
|
const std::vector< float > & |
max = std::vector<float>() , |
|
|
ProcLib |
lib = ProcLib::DEFAULT , |
|
|
bool |
swap_rb = false |
|
) |
| |
|
static |
Process the input images.
- Parameters
-
[in] | mat | The input image data, result = mat * alpha + beta |
[in] | mean | target mean vector of output images |
[in] | std | target std vector of output images |
[in] | max | max value vector to be in target image |
[in] | min | min value vector to be in target image |
[in] | lib | to define OpenCV or FlyCV or CVCUDA will be used. |
[in] | swap_rb | to define whether to swap r and b channel order |
- Returns
- true if the process successed, otherwise false
◆ SetAlpha()
void fastdeploy::vision::NormalizeAndPermute::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::NormalizeAndPermute::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::NormalizeAndPermute::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/normalize_and_permute.h
- /fastdeploy/my_work/FastDeploy/fastdeploy/vision/common/processors/normalize_and_permute.cc