nndeploy C++ API  0.2.0
nndeploy C++ API
cvt_norm_trans.h
Go to the documentation of this file.
1 
2 #ifndef _NNDEPLOY_PREPROCESS_CVT_NORM_TRANS_H_
3 #define _NNDEPLOY_PREPROCESS_CVT_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  CvtNormTrans(const std::string &name) : dag::Node(name) {
29  key_ = "nndeploy::preprocess::CvtNormTrans";
30  desc_ = "cv::Mat to device::Tensor[cvtcolor->normalize->transpose]";
31  param_ = std::make_shared<CvtNormTransParam>();
32  this->setInputTypeInfo<cv::Mat>();
33  this->setOutputTypeInfo<device::Tensor>();
34  }
35  CvtNormTrans(const std::string &name, std::vector<dag::Edge *> inputs,
36  std::vector<dag::Edge *> outputs)
37  : dag::Node(name, inputs, outputs) {
38  key_ = "nndeploy::preprocess::CvtNormTrans";
39  desc_ = "cv::Mat to device::Tensor[cvtcolor->normalize->transpose]";
40  param_ = std::make_shared<CvtNormTransParam>();
41  this->setInputTypeInfo<cv::Mat>();
42  this->setOutputTypeInfo<device::Tensor>();
43  }
44  virtual ~CvtNormTrans() {}
45 
46  virtual base::Status run();
47 };
48 
49 } // namespace preprocess
50 } // namespace nndeploy
51 
52 #endif /* _NNDEPLOY_PREPROCESS_CVTCOLOR_BN_H_ */
Node base class.
Definition: node.h:171
virtual base::Status run()
Run node (pure virtual function)
CvtNormTrans(const std::string &name)
CvtNormTrans(const std::string &name, std::vector< dag::Edge * > inputs, std::vector< dag::Edge * > outputs)
#define NNDEPLOY_CC_API
api
Definition: macro.h:29