Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to print the type name but not the value?

Such as I have such code

Mat img = imread("blobn.png", 0);
cout << img.type();

The output is 0, But it is not my expectation. Is possible print the name CV_8UC1?

How to print the type name but not the value?

Such as I have such code

Mat img = imread("blobn.png", 0);
cout << img.type();

The output is 0, But it is not my expectation. Is possible print the name CV_8UC1 instead of the value 0?