nndeploy C++ API  0.2.0
nndeploy C++ API
cvt_resize_crop_norm_trans.h
Go to the documentation of this file.
1 
2 #ifndef NNDEPLOY_PREPROCESS_CVT_RESIZE_CROP_NORM_TRANS_H_
3 #define NNDEPLOY_PREPROCESS_CVT_RESIZE_CROP_NORM_TRANS_H_
4 
5 #include "nndeploy/base/any.h"
6 #include "nndeploy/base/common.h"
8 #include "nndeploy/base/log.h"
9 #include "nndeploy/base/macro.h"
10 #include "nndeploy/base/object.h"
12 #include "nndeploy/base/status.h"
13 #include "nndeploy/base/string.h"
14 #include "nndeploy/dag/edge.h"
15 #include "nndeploy/dag/node.h"
16 #include "nndeploy/device/buffer.h"
17 #include "nndeploy/device/device.h"
19 #include "nndeploy/device/tensor.h"
22 
23 namespace nndeploy {
24 namespace preprocess {
25 
27  public:
28  CvtResizeCropNormTrans(const std::string &name) : dag::Node(name) {
29  key_ = "nndeploy::preprocess::CvtResizeCropNormTrans";
30  desc_ =
31  "cv::Mat to "
32  "device::Tensor[cvtcolor->resize->crop->normalize->transpose]";
33  param_ = std::make_shared<CvtResizeCropNormTransParam>();
34  this->setInputTypeInfo<cv::Mat>();
35  this->setOutputTypeInfo<device::Tensor>();
36  }
37  CvtResizeCropNormTrans(const std::string &name,
38  std::vector<dag::Edge *> inputs,
39  std::vector<dag::Edge *> outputs)
40  : dag::Node(name, inputs, outputs) {
41  key_ = "nndeploy::preprocess::CvtResizeCropNormTrans";
42  desc_ =
43  "cv::Mat to "
44  "device::Tensor[cvtcolor->resize->crop->normalize->transpose]";
45  param_ = std::make_shared<CvtResizeCropNormTransParam>();
46  this->setInputTypeInfo<cv::Mat>();
47  this->setOutputTypeInfo<device::Tensor>();
48  }
50 
51  virtual base::Status run();
52 };
53 
54 } // namespace preprocess
55 } // namespace nndeploy
56 
57 #endif // NNDEPLOY_PREPROCESS_CVTCOLOR_RESIZE_CROP_H_
Node base class.
Definition: node.h:171
virtual base::Status run()
Run node (pure virtual function)
CvtResizeCropNormTrans(const std::string &name, std::vector< dag::Edge * > inputs, std::vector< dag::Edge * > outputs)
#define NNDEPLOY_CC_API
api
Definition: macro.h:29