Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Thanks Berak. On my opencv version 3.3.1 , I got outputs

10000.5 500.032 -485.257 24231.6

So probably my opencv version has this bug :)

My code was, as you posted,

Mat mtest(960,1280,CV_16U); randn(mtest,10000, 500); Scalar M,D; meanStdDev(mtest,M,D); std::cout << M(0) << " " << D(0) << std::endl; Mat m2t = mtest.reshape(0,1); meanStdDev(m2t,M,D); std::cout << M(0) << " " << D(0);

Thanks Berak. On my opencv version 3.3.1 , I got outputs

10000.5 500.032
-485.257 24231.6

24231.6

So probably my opencv version has this bug :)

My code was, as you posted,

Mat mtest(960,1280,CV_16U);
randn(mtest,10000, 500);
Scalar M,D;
meanStdDev(mtest,M,D);
std::cout << M(0) << " " << D(0) << std::endl;
Mat m2t = mtest.reshape(0,1);
meanStdDev(m2t,M,D);
std::cout << M(0) << " " << D(0);

D(0);