nndeploy C++ API  0.2.0
nndeploy C++ API
Static Public Member Functions | List of all members
nndeploy::preprocess::OpenCvConvert Class Reference

#include <opencv_convert.h>

Static Public Member Functions

static int convertFromBorderType (base::BorderType src)
 
static int convertFromCvtColorType (base::CvtColorType src)
 
static int convertFromDataType (base::DataType src)
 
static int convertFromInterpType (base::InterpType src)
 
static cv::Scalar convertFromScalar (const base::Scalar2d &src)
 
static bool convertToBatchTensor (const cv::Mat &src, device::Tensor *dst, bool normalize, float *scale, float *mean, float *std, int batch)
 
static bool convertToTensor (const cv::Mat &src, device::Tensor *dst, bool normalize, float *scale, float *mean, float *std)
 cast + normalize + premute More...
 
static bool normalize (const cv::Mat &src, cv::Mat &dst, base::DataType data_type, float *scale, float *mean, float *std)
 

Detailed Description

Definition at line 24 of file opencv_convert.h.

Member Function Documentation

◆ convertFromBorderType()

static int nndeploy::preprocess::OpenCvConvert::convertFromBorderType ( base::BorderType  src)
static

◆ convertFromCvtColorType()

static int nndeploy::preprocess::OpenCvConvert::convertFromCvtColorType ( base::CvtColorType  src)
static

◆ convertFromDataType()

static int nndeploy::preprocess::OpenCvConvert::convertFromDataType ( base::DataType  src)
static

◆ convertFromInterpType()

static int nndeploy::preprocess::OpenCvConvert::convertFromInterpType ( base::InterpType  src)
static

◆ convertFromScalar()

static cv::Scalar nndeploy::preprocess::OpenCvConvert::convertFromScalar ( const base::Scalar2d src)
static

◆ convertToBatchTensor()

static bool nndeploy::preprocess::OpenCvConvert::convertToBatchTensor ( const cv::Mat &  src,
device::Tensor dst,
bool  normalize,
float *  scale,
float *  mean,
float *  std,
int  batch 
)
static

◆ convertToTensor()

static bool nndeploy::preprocess::OpenCvConvert::convertToTensor ( const cv::Mat &  src,
device::Tensor dst,
bool  normalize,
float *  scale,
float *  mean,
float *  std 
)
static

cast + normalize + premute

Returns
true
false

◆ normalize()

static bool nndeploy::preprocess::OpenCvConvert::normalize ( const cv::Mat &  src,
cv::Mat &  dst,
base::DataType  data_type,
float *  scale,
float *  mean,
float *  std 
)
static
Parameters
srcmust uint8_t
dst
data_type
scale
mean
std
Returns
true
false

The documentation for this class was generated from the following file: