获取图像的长、宽、通道数

Mat srcImage = imread("D:\\photo\\花.png");

int deapth = srcImage.channels();     / /通道数,channels是函数,注意括号

int width = srcImage.rows;        / /宽

int height = srcImage.cols;       / /长

猜你喜欢

转载自www.cnblogs.com/YAO-a-YAO/p/11635626.html
今日推荐