色彩值,用于图像处理补边功能,描述三通道色彩的结构体。
1 2 3 4 5 6 7 8 9 10 | 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。 |