17 #include "fastdeploy/vision/common/processors/base.h" 26 const std::vector<float>& beta = std::vector<float>(),
27 bool swap_rb =
false);
28 bool ImplByOpenCV(
FDMat* mat);
30 bool ImplByFlyCV(
FDMat* mat);
32 std::string Name() {
return "ConvertAndPermute"; }
42 static bool Run(
FDMat* mat,
const std::vector<float>& alpha,
43 const std::vector<float>& beta,
bool swap_rb =
false,
44 ProcLib lib = ProcLib::DEFAULT);
46 std::vector<float> GetAlpha()
const {
return alpha_; }
52 void SetAlpha(
const std::vector<float>& alpha) {
54 std::vector<float>().swap(alpha_);
55 alpha_.assign(alpha.begin(), alpha.end());
58 std::vector<float> GetBeta()
const {
return beta_; }
64 void SetBeta(
const std::vector<float>& beta) {
66 std::vector<float>().swap(beta_);
67 beta_.assign(beta.begin(), beta.end());
83 std::vector<float> alpha_;
84 std::vector<float> beta_;
void SetSwapRB(bool swap_rb)
Process the input images.
Definition: convert_and_permute.h:78
Processor for convert images with given paramters and permute images from HWC to CHW.
Definition: convert_and_permute.h:23
void SetBeta(const std::vector< float > &beta)
Process the input images.
Definition: convert_and_permute.h:64
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
void SetAlpha(const std::vector< float > &alpha)
Process the input images.
Definition: convert_and_permute.h:52
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16