cout'ing a Mat

asked 2013-09-04 18:32:20 -0500

thevidyy gravatar image

updated 2013-09-04 18:33:01 -0500

I'm going through the opencv documentation and the example code:

Mat M(2,2, CV_8UC3, Scalar(0,0,255));

cout << "M = " << endl << " " << M << endl << endl;

fails to run because of cout. How can I use cout on a Mat so that I can output the entire matrix?

edit retag flag offensive close merge delete

Comments

What is the error you get? Did you include <iostream> and use the right namespace (using namespace std;)?

Mathieu Barnachon gravatar imageMathieu Barnachon ( 2013-09-04 19:03:02 -0500 )edit