Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Understand the OpenCV matrix types (CV_8UC4, CV_32FC 1).
Understand the OpenCV matrix types (CV_8UC4, CV_32FC 1).
Matrix data type

CV _ & ltbit _ depth & gt(S | U | F)C & lt; Number of channels & gt

S = signed integer U = unsigned integer F = floating point type.

1-bit _ depth- number of bits-stands for 8 bits, 16 bits, 32 bits, 64 bits-for example, for example, such as.

If you now create a Mat object to store a grayscale image, and the size of this image is 100 wide and 100 high, then this

Gray image has 10000 pixels, and each pixel occupies 8 bits in memory space, so it is right.

It should be CV_8

2-s | u | f-s- stands for signed int-signed plastic.

3-C & lt; Number of channels & gt- indicates the number of channels in an image, for example: