17 #include "fastdeploy/vision/common/processors/base.h" 19 #include <cvcuda/OpResize.hpp> 21 #include "fastdeploy/vision/common/processors/cvcuda_utils.h" 31 ResizeByShort(
int target_size,
int interp = 1,
bool use_scale =
true,
32 const std::vector<int>& max_hw = std::vector<int>()) {
33 target_size_ = target_size;
36 use_scale_ = use_scale;
38 bool ImplByOpenCV(
FDMat* mat);
40 bool ImplByFlyCV(
FDMat* mat);
43 bool ImplByCvCuda(
FDMat* mat);
46 std::string Name() {
return "ResizeByShort"; }
58 static bool Run(
FDMat* mat,
int target_size,
int interp = 1,
59 bool use_scale =
true,
60 const std::vector<int>& max_hw = std::vector<int>(),
61 ProcLib lib = ProcLib::DEFAULT);
64 double GenerateScale(
const int origin_w,
const int origin_h);
66 std::vector<int> max_hw_;
70 cvcuda::Resize cvcuda_resize_op_;
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
Processor for resize images by short edge.
Definition: resize_by_short.h:29
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16