17 #include "fastdeploy/vision/common/processors/base.h" 19 #include <cvcuda/OpConvertTo.hpp> 21 #include "fastdeploy/vision/common/processors/cvcuda_utils.h" 31 explicit Cast(
const std::string& dtype =
"float") : dtype_(dtype) {}
32 bool ImplByOpenCV(
Mat* mat);
34 bool ImplByFlyCV(
Mat* mat);
37 bool ImplByCvCuda(
FDMat* mat);
39 std::string Name() {
return "Cast"; }
47 static bool Run(
Mat* mat,
const std::string& dtype,
48 ProcLib lib = ProcLib::DEFAULT);
50 std::string GetDtype()
const {
return dtype_; }
55 cvcuda::ConvertTo cvcuda_convert_op_;
Processor for cast images with given type deafault is float.
Definition: cast.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
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16