opencv数据类型对应关系

结构类型 数据类型 数据点表示实例 空间大小 MIN MAX
单通道
CV_8UC1 uchar Mat.at(rows, cols) 8bits 0 255
CV_8SC1 char Mat.at(rows, cols) 8bits -128 127
CV_16UC1 ushort Mat.at(rows, cols) 16bits 0 65535
CV_16SC1 short Mat.at(rows, cols) 16bits -32768 32767
CV_32SC1 int Mat.at(rows, cols) 32bits -2147483648 2147483647
CV_32FC1 float Mat.at(rows, cols) 32bits 1.18*〖10〗^(-38) 3.40*〖10〗^38
CV_64FC1 double Mat.at(rows, cols) 64bits 2.23*〖10〗^(-308) 1.79*〖10〗^308
三通道
CV_8UC3 Vec3b Mat.at(rows, cols)[ layer] 8bits 0 255
CV_8SC3
CV_16UC3 Vec3w Mat.at(rows, cols)[ layer] 16bits 0 65535
CV_16SC3 Vec3s Mat.at(rows, cols)[ layer] 16bits -32768 32767
CV_32SC3 Vec3i Mat.at(rows, cols)[ layer] 32bits -2147483648 2147483647
CV_32FC3 Vec3f Mat.at(rows, cols)[ layer] 32bits 1.18*〖10〗^(-38) 3.40*〖10〗^38
CV_64FC3 Vec3d Mat.at(rows, cols)[ layer] 64bits 2.23*〖10〗^(-308) 1.79*〖10〗^308

注:
Height = Mat.rows;
Width = Mat.cols;

你可能感兴趣的:(OpenCV,C++)