OpenCV学习笔记——Mat类型数据存储

时间:2023-12-19 11:26:38

CV_[The number of bits per item][Signed or Unsigned][Type Prefix]C[The channel number]

比如 CV_8UC3 表示使用8位的 unsigned char 型,每个像素由三个元素组成三通道。

Mat_<uchar>对应的是CV_8U,

Mat_<char>对应的是CV_8S,

Mat_<int>对应的是CV_32S,

Mat_<float>对应的是CV_32F,

Mat_<double>对应的是CV_64F

[1] http://blog.csdn.net/yang_xian521/article/details/7107786

[2] http://www.opencv.org.cn/opencvdoc/2.3.2/html/doc/tutorials/core/mat%20-%20the%20basic%20image%20containe/mat%20-%20the%20basic%20image%20container.html#matthebasicimagecontainer