I am trying to do some basic algebraic operations on matrices. I would like to use the class Mat from openCV. I used the following simple code which wouldn't work:
void main()
{
float data[2][5] = {{1,2,3,4,5},{7,8,9,10,11}};
Mat H = Mat(2, 5, CV_8UC1, data);
cout << H.at<float>(0,0);
//OR:
cout << H;
}
Now I have already encountered a similar problem in loading an image by the imread function. I've overcomed it by starting from C and then pass to C++:
IplImage* Csrc = cvLoadImage("D:/picture.jpg");
Mat src(Csrc);
which did work. Could anyone help with the scalars matrices? How could I print the entries for example ? Thank you.