Why cv::Mat object can be output directly with std::cout?

Viewed 72

In opencv official tutorial(Creating a Mat object explicitly), there is code like this:

    Mat M(2,2, CV_8UC3, Scalar(0,0,255));
    cout << "M = " << endl << " " << M << endl << endl;

But when I look into the source code of Mat class, I can't find why Mat object can be output with cout << since there isn't overload function like operator << or even something like ostream &?

0 Answers
Related