17 #include "fastdeploy/vision/common/processors/base.h" 26 const std::vector<float>&
std,
bool is_scale =
true,
27 const std::vector<float>& min = std::vector<float>(),
28 const std::vector<float>& max = std::vector<float>(),
29 bool swap_rb =
false);
30 bool ImplByOpenCV(
FDMat* mat);
32 bool ImplByFlyCV(
FDMat* mat);
35 bool ImplByCuda(
FDMat* mat);
39 bool ImplByCvCuda(
FDMat* mat);
42 std::string Name() {
return "NormalizeAndPermute"; }
65 static bool Run(
FDMat* mat,
const std::vector<float>& mean,
66 const std::vector<float>& std,
bool is_scale =
true,
67 const std::vector<float>& min = std::vector<float>(),
68 const std::vector<float>& max = std::vector<float>(),
69 ProcLib lib = ProcLib::DEFAULT,
bool swap_rb =
false);
75 void SetAlpha(
const std::vector<float>& alpha) {
77 std::vector<float>().swap(alpha_);
78 alpha_.assign(alpha.begin(), alpha.end());
85 void SetBeta(
const std::vector<float>& beta) {
87 std::vector<float>().swap(beta_);
88 beta_.assign(beta.begin(), beta.end());
104 std::vector<float> alpha_;
105 std::vector<float> beta_;
FDTensor object used to represend data matrix.
Definition: fd_tensor.h:31
Definition: float16.h:572
void SetBeta(const std::vector< float > &beta)
Process the input images.
Definition: normalize_and_permute.h:85
void SetAlpha(const std::vector< float > &alpha)
Process the input images.
Definition: normalize_and_permute.h:75
Processor for Normalize and Permute images from HWC to CHW.
Definition: normalize_and_permute.h:23
FDMat is a structure for replace cv::Mat.
Definition: mat.h:34
Processor base class for processors in fastdeploy/vision/common/processors.
Definition: base.h:42
FDMatBatch contains batch data for preprocess.
Definition: mat_batch.h:28
void SetSwapRB(bool swap_rb)
Process the input images.
Definition: normalize_and_permute.h:99
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16