17 #include "fastdeploy/vision/common/processors/base.h" 19 #include <cvcuda/OpCustomCrop.hpp> 21 #include "fastdeploy/vision/common/processors/cvcuda_utils.h" 31 CenterCrop(
int width,
int height) : height_(height), width_(width) {}
32 bool ImplByOpenCV(
FDMat* mat);
34 bool ImplByFlyCV(
FDMat* mat);
37 bool ImplByCvCuda(
FDMat* mat);
40 std::string Name() {
return "CenterCrop"; }
50 static bool Run(
FDMat* mat,
const int& width,
const int& height,
51 ProcLib lib = ProcLib::DEFAULT);
57 cvcuda::CustomCrop cvcuda_crop_op_;
Processor for crop images in center with given type deafault is float.
Definition: center_crop.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
FDMatBatch contains batch data for preprocess.
Definition: mat_batch.h:28
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16