I have followed the whole tutorial untill this part: Creating a Mat object explicitly
My problem starts when i try to run the first lines of code. That is:
#include "opencv2/core/core.hpp"
#include <iostream>
using namespace std;
using namespace cv;
int main()
{
Mat O = Mat::ones(2, 2, CV_32F);
cout << "O = " << endl << " " << O << endl << endl;
return 0;
}
I then get the following pop-up window
Has anyone run into the same problem?
I am runing this on Microsoft Visual Studio Ultimate 2013 RC, Windows 7 x64. All includes, libraries and paths are right set. I have noticed that the program runs well if i instead have this line:
cout << "O = " << endl << " " << O.at<float>(0, 0) << endl << endl;
It seems that there is a problem when combining cout
with Mat
. Does somebody know how to solve this? Thanks.