17 #include "fastdeploy/vision/common/processors/base.h" 19 #include <cvcuda/OpResize.hpp> 21 #include "fastdeploy/vision/common/processors/cvcuda_utils.h" 31 Resize(
int width,
int height,
float scale_w = -1.0,
float scale_h = -1.0,
32 int interp = 1,
bool use_scale =
false) {
38 use_scale_ = use_scale;
41 bool ImplByOpenCV(
FDMat* mat);
43 bool ImplByFlyCV(
FDMat* mat);
46 bool ImplByCvCuda(
FDMat* mat);
48 std::string Name() {
return "Resize"; }
62 static bool Run(
FDMat* mat,
int width,
int height,
float scale_w = -1.0,
63 float scale_h = -1.0,
int interp = 1,
bool use_scale =
false,
64 ProcLib lib = ProcLib::DEFAULT);
77 std::tuple<int, int> GetWidthAndHeight() {
78 return std::make_tuple(width_, height_);
84 float scale_w_ = -1.0;
85 float scale_h_ = -1.0;
87 bool use_scale_ =
false;
89 cvcuda::Resize cvcuda_resize_op_;
Processor for Resize images.
Definition: resize.h:29
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
bool SetWidthAndHeight(int width, int height)
Process the input images.
Definition: resize.h:71
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16