MakeBorderConfig
功能
用于在图像处理补边功能,定义具体的补边配置,可设置图像补边的左、右、上、下像素个数、补边颜色常数和补边类型。
结构定义
struct MakeBorderConfig {
enum BorderType {
BORDER_CONSTANT = 0,
BORDER_REPLICATE,
BORDER_REFLECT,
BORDER_REFLECT_101
};
uint32_t left;
uint32_t right;
uint32_t top;
uint32_t bottom;
uint32_t channel_zero;
uint32_t channel_one;
uint32_t channel_two;
BorderType borderType;
};
参数说明
参数名 |
输入/输出 |
说明 |
|---|---|---|
left |
输入 |
左侧补边像素数量。 |
right |
输入 |
右侧补边像素数量。 |
top |
输入 |
上方补边像素数量。 |
bottom |
输入 |
下方补边像素数量。 |
channel_zero |
输入 |
0号通道取值,范围[0, 255]。 |
channel_one |
输入 |
1号通道取值,范围[0, 255]。 |
channel_two |
输入 |
2号通道取值,范围[0, 255]。 |
borderType |
输入 |
补边类型。
|
“channel_zero”、“channel_one”、“channel_two”,依次对应各图像通道,例如:使用RGB时,“channel_zero”对应R,“channel_one”对应G通道,“channel_two”对应B通道。
父主题: 通用数据结构