b = unsigned char
w = unsigned short
s = short
i = int
f = float
d = double
U=无符号整型
S=符号整型
F=浮点型
int type; //矩阵类型
宏命名规则:CV_(位数)+(数据类型)+(通道数)
CV_8UC1 CV_8UC2 CV_8UC3 CV_8UC4 CV_8UC(n) CV_8SC1 CV_8SC2 CV_8SC3 CV_8SC4 CV_8SC(n)
CV_16UC1 CV_16UC2 CV_16UC3 CV_16UC4 CV_16UC(n) CV_16SC1 CV_16SC2 CV_16SC3 CV_16SC4 CV_16SC(n)
CV_32SC1 CV_32SC2 CV_32SC3 CV_32SC4 CV_32SC(n) CV_32FC1 CV_32FC2 CV_32FC3 CV_32FC4 CV_32FC(n)
CV_64FC1 CV_64FC2 CV_64FC3 CV_64FC4 CV_64FC(n)
Size size; //矩阵大小
size_t step; //矩阵行步长
step=AUTO_STEP;
const Scalar& s; //通道像素值,最多可表示4个通道的像素值
int ndims; //矩阵维度
typedef Vec<uchar, 2> Vec2b;
typedef Vec<uchar, 3> Vec3b;
typedef Vec<uchar, 4> Vec4b;
typedef Vec<short, 2> Vec2s;
typedef Vec<short,3> Vec3s;
typedef Vec<short,4> Vec4s;
typedef Vec<int, 2> Vec2i;
typedef Vec<int, 3> Vec3i;
typedef Vec<int, 4> Vec4i;
typedef Vec<float, 2> Vec2f;
typedef Vec<float, 3> Vec3f;
typedef Vec<float, 4> Vec4f;
typedef Vec<float, 6> Vec6f;
typedef Vec<double, 2> Vec2d;
typedef Vec<double, 3> Vec3d;
typedef Vec<double, 4> Vec4d;
typedef Vec<double, 6> Vec6d;
原文:https://www.cnblogs.com/k5bg/p/11096507.html