Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
Mat img = imread("my.jpeg");
cout << img.rows << " " << img.cols << " " << img.channels() << " " << img.type() << endl;

so, img.channels() holds the depth, img.type() the type of one channel(uchar, int, float, etc)