Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 600

Issue with meanStdDev() result and Mat channels

$
0
0
**meanStdDev()** is not giving the correct calculation of mean and standard. I want it to give mean/stdev for each corresponding column. The code follows, Mat_ C = (Mat_(2,6) << 1, 0, 3, 1, 0, 5, 6, 2, 0, 4, 0, 9), E=Mat::zeros(9, 9, CV_8UC1); Mat mn, stdev; meanStdDev(C.reshape(C.cols),mn,stdev); std::cout << C.reshape(C.cols) << endl<< mn << std::endl; It gives the following results, [1, 0, 3, 1, 0, 5; 6, 2, 0, 4, 0, 9] [2.5; 1; 0; 0; 0; 0] You can see that the calculated mean value is corrent only for the first 2 positions

Viewing all articles
Browse latest Browse all 600

Latest Images

Trending Articles



Latest Images