17 #include "fastdeploy/vision/common/processors/base.h" 22 class LetterBoxResize :
public Processor {
24 LetterBoxResize(
const std::vector<int>& target_size,
25 const std::vector<float>& color) {
26 target_size_ = target_size;
30 std::string Name() {
return "LetterBoxResize"; }
32 virtual bool operator()(Mat* mat, ProcLib lib = ProcLib::DEFAULT);
34 static bool Run(Mat* mat,
const std::vector<int>& target_size,
35 const std::vector<float>& color,
36 ProcLib lib = ProcLib::DEFAULT);
39 std::vector<int> target_size_;
40 std::vector<float> color_;
virtual bool operator()(FDMat *mat)
operator () for calling processor in this way: processor(mat)
Definition: base.cc:80
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16