17 #include "fastdeploy/vision/common/processors/base.h" 25 Normalize(
const std::vector<float>& mean,
const std::vector<float>&
std,
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(
Mat* mat);
32 bool ImplByFlyCV(
Mat* mat);
35 bool ImplByCuda(
FDMat* mat);
39 bool ImplByCvCuda(
FDMat* mat);
42 std::string Name() {
return "Normalize"; }
65 static bool Run(
Mat* 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);
71 std::vector<float> GetAlpha()
const {
return alpha_; }
72 std::vector<float> GetBeta()
const {
return beta_; }
87 std::vector<float> alpha_;
88 std::vector<float> beta_;
FDTensor object used to represend data matrix.
Definition: fd_tensor.h:31
Definition: float16.h:572
Processor for Normalize images with given paramters.
Definition: normalize.h:23
FDMat is a structure for replace cv::Mat.
Definition: mat.h:34
void SetSwapRB(bool swap_rb)
Process the input images.
Definition: normalize.h:82
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
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16