Mat src = imread("E:/cats.jpg"); // 加载图像
int width = src.cols; // 宽
int height = src.rows; // 高
int dim = src.channels(); // 通道数
int img_depth = src.depth(); //深度
int img_type = src.type(); //数据类型
depth的取值:
CV_8U 0
CV_8S 1
CV_16U 2
CV_16S 3
CV_32S 4
CV_32F 5
CV_64F 6
CV_USRTYPE1 7
type取值