Dim
Point
功能
坐标点,用于保存图像像素点位置的结构体。
结构定义
struct Point {
Point()
: x(0), y(0) {};
Point(const uint32_t inputX, const uint32_t inputY)
: x(inputX), y(inputY) {};
uint32_t x = 0;
uint32_t y = 0;
};
参数说明
| 参数名 | 说明 |
|---|---|
| x,inputX | 横坐标(以图像左上角为原点)。 |
| y,inputY | 纵坐标(以图像左上角为原点)。 |
父主题: 通用数据结构
Color
功能
色彩值,用于图像处理补边功能,描述三通道色彩的结构体。
结构定义
struct Color {
Color()
: channel_zero(0), channel_one(0), channel_two(0) {};
Color(const uint32_t inputRed, const uint32_t inputGreen, const uint32_t inputBlue)
: channel_zero(inputRed), channel_one(inputGreen), channel_two(inputBlue) {};
uint32_t channel_zero;
uint32_t channel_one;
uint32_t channel_two;
};
参数说明
| 参数名 | 说明 |
|---|---|
| channel_zero,inputRed | 0号通道取值,范围[0, 255]。 例如:对于RGB_888格式图像,该通道为R;对于YUV格式图像,该通道为Y。 |
| channel_one,inputGreen | 1号通道取值,范围[0, 255]。 例如:对于RGB_888格式图像,该通道为G;对于YUV格式图像,该通道为U。 |
| channel_two,inputBlue | 2号通道取值,范围[0, 255]。 例如:对于RGB_888格式图像,该通道为B;对于YUV格式图像,该通道为V。 |
父主题: 通用数据结构
Dim
功能
补边值,用于图像处理“ImageProcessor”的补边功能,描述左、右、上、下四个方向补边的像素个数。
结构定义
struct Dim {
Dim()
: left(0), right(0), top(0), bottom(0) {};
Dim(const uint32_t inputDim)
: left(inputDim), right(inputDim), top(inputDim), bottom(inputDim) {};
Dim(const uint32_t inputLeft, const uint32_t inputRight, const uint32_t inputTop, const uint32_t inputBottom)
: left(inputLeft), right(inputRight), top(inputTop), bottom(inputBottom) {};
uint32_t left;
uint32_t right;
uint32_t top;
uint32_t bottom;
};
参数说明
| 参数名 | 说明 |
|---|---|
| left,inputLeft | 左侧补边像素数量。 |
| right,inputRight | 右侧补边像素数量。 |
| top,inputTop | 上方补边像素数量。 |
| bottom,inputBottom | 下方补边像素数量。 |
| inputDim | 左、右、上、下补边像素数量。 仅在使用**Dim(const uint32_t inputDim)**构造函数时,将左、右、上、下补边像素数量设为与inputDim相同的值。 |
父主题: 通用数据结构
TensorDType
功能
用于描述Tensor类的数据类型。
结构定义
enum class TensorDType {
UNDEFINED = -1,
FLOAT32 = 0,
FLOAT16 = 1,
INT8 = 2,
INT32 = 3,
UINT8 = 4,
INT16 = 6,
UINT16 = 7,
UINT32 = 8,
INT64 = 9,
UINT64 = 10,
DOUBLE64 = 11,
BOOL = 12
};
参数说明
| 参数名 | 说明 |
|---|---|
| UNDEFINED | 未定义类型。 |
| FLOAT32 | 32位浮点型。 |
| FLOAT16 | 16位浮点型。 |
| INT8 | 8为整型。 |
| INT32 | 32位整型。 |
| UINT8 | 8位无符号整型。 |
| INT16 | 16位整型。 |
| UINT16 | 16位无符号整型。 |
| UINT32 | 32位无符号整型。 |
| INT64 | 64位整型。 |
| DOUBLE64 | 64位双精度浮点型。 |
| BOOL | 布尔型。 |
父主题: 通用数据结构
VisionDataFormat
功能
图像数据格式排布形式。
结构定义
enum class VisionDataFormat {
NCHW = 0,
NHWC = 1
};
参数说明
| 参数名 | 说明 |
|---|---|
| NCHW | 图像数据按NCHW格式排布。 |
| NHWC | 图像数据按NHWC格式排布。 |
父主题: 通用数据结构
StreamFormat
功能
视频流数据格式,用于视频解码和视频编码。
结构定义
enum class StreamFormat {
H265_MAIN_LEVEL = 0,
H264_BASELINE_LEVEL = 1,
H264_MAIN_LEVEL = 2,
H264_HIGH_LEVEL = 3,
};
参数说明
| 参数名 | 说明 |
|---|---|
| H265_MAIN_LEVEL | H.265 格式视频流,主流画质。 |
| H264_BASELINE_LEVEL | H.264 格式视频流,基本画质。 |
| H264_MAIN_LEVEL | H.264 格式视频流,主流画质。 |
| H264_HIGH_LEVEL | H.264 格式视频流,高级画质。 |
父主题: 通用数据结构
在线提单