OpenCV Mat图像类型与图像深度的关系
2012-03-30 14:40 星空下 阅读(3177) 评论(0) 收藏 举报1、Mat::type
Returns the type of a matrix element.C++: int Mat::type() const
The method returns a matrix element type. This is an identifier compatible with the CvMat type system, like CV_16SC3
or 16-bit signed 3-channel array, and so on.
2、Mat::depth
Returns the depth of a matrix element.
C++: int Mat::depth() const
The method returns the identifier of the matrix element depth (the type of each individual channel). For example, for
a 16-bit signed 3-channel array, the method returns CV_16S .
由帮助的内容可知,type包含通道信息,例如CV_8UC3,而深度信息depth不包含通道信息,例如CV_8U.
梅花香自苦寒来
浙公网安备 33010602011771号