1. OpenCV matrix data type
CV _ <bit_depth> (S | U | F) C <number_of_channels>
S = signed integer U = unsigned integer F = floating point type
E. g .:
CV_8UC1 refers to an 8-bit unsigned integer single-channel matrix,
CV_32FC2 is a 32-bit floating-point dual-channel matrix.
So we can see the following three forms: Gray, RGB, and RGBA.
'Cv _ 8UC1 '(gray-scale), 'cv _ 8uc3' (RGB) or 'cv _ 8UC4' (RGBA ).
2. About colors
Extracted from http://www.cnblogs.com/and_he/archive/2012/12/22/ARGB.html below
A: Transparency
R: red
G: Green
B: Blue
Bitmap. config ARGB_4444: each pixel occupies four places, that is, A = 4, R = 4, G = 4, B = 4. Therefore, one pixel occupies 4 + 4 + 4 + 4 = 16 digits.
Bitmap. config ARGB_8888: each pixel occupies four places, that is, A = 8, R = 8, G = 8, B = 8, so A pixel occupies 8 + 8 + 8 + 8 = 32
Bitmap. Config RGB_565: each pixel occupies four places, namely, R = 5, G = 6, B = 5, and no transparency. Therefore, each pixel occupies 5 + 6 + 5 = 16 digits.
Bitmap. Config ALPHA_8: each pixel occupies four places, with only transparency and no color.