Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

print comparison matrix elements

$
0
0
I want to know why trying to access (and print) test matrix results in showing garbage: Mat A = (Mat_(3,3) << 0, -1.4, 0.2, -1, 5.4, -1, 0.1, -1.4, 0); cout << "A = " << endl << " " << A << endl << endl; Mat B = (Mat_(3,3) << 0, -1.4, 0.4, -2, 5.4, -11, 0, -1.42, 0); cout << "B = " << endl << " " << B << endl << endl; Mat test = Mat(3,3,CV_64F); test = ( A == B ); for ( int i = 0; i < 3; i++ ) { for (int j = 0; j < 2; j++ ) { cout << test.at(i,j) << endl; } } If I use just `cout << test ` it is ok ,but I want to know why the previous doesn't work. Thanks!

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>