I've recently configurated OpenCV in my machine as described in here.
I'm trying to run this simple code:
#include "opencv2/core/core.hpp"
#include <iostream>
using namespace std;
using namespace cv;
int main(int,char**)
{
Mat i = Mat::eye(4, 4, CV_64F);
i.at<double>(1,1) = CV_PI;
// First problem
cout << "i = " << i << ";" << endl;
Mat r = Mat(10, 3, CV_8UC3);
randu(r, Scalar::all(0), Scalar::all(255));
cout << "r (default) = " << r << ";" << endl << endl;
// Problematic Line:
cout << "r (python) = " << format(r,"python") << ";" << endl << endl;
return 0;
}
Which is part of one of the samples included in OpenCV 2.4.5. I should also note that I'm using Visual Studio 2008.
While debugging I get two problems. The first one is that the matrix i
isn't displayed at all in the console application (The following screenshot was taken right after the 11th line was executed).
The second problem is a run-time error, wich takes place while trying to execute line 17:
Any thoughts?