Ask Your Question

Revision history [back]

You are trying to print a pointer to mat instead of the mat. Replace the cout line with

cout << "O = " << endl << " " << O.at<float>(0,0) << endl << endl;

and it works. Notice the use of at<float>.