![]() | 1 | initial version |
your for loops are all broken, rather use a simple cout << some_mat << endl;
to print them out, you'll see, everything is correct, then.
![]() | 2 | No.2 Revision |
your for loops are all broken, rather use a simple
cout << some_mat <<
endl;endl;
to print them out, or, if those are large, a roi of it:
cout << some_mat(Rect(0,0,10,10)) << endl;
you'll see, everything is correct, then.
see, if your image is of type CV_32S, you would have to use:
mat.at<int>(y,x);
to access it, not any type you like. again, writing loops like above is bad,slow, and error-prone, avoid that at all cost !
![]() | 3 | No.3 Revision |
your for loops are all broken, rather use a simple
cout << some_mat << endl;
to print them out, or, if those are large, a roi of it:
cout << some_mat(Rect(0,0,10,10)) << endl;
you'll see, everything is correct, then.
see, if your image is of type CV_32S, you would have to use:
mat.at<int>(y,x);
to access it, not any type you like. again, writing loops like above is bad,slow, and error-prone, avoid that at all cost !