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