Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

mixing (outdated) c and c++ code is a terrible idea here. you can safely use meanStdDev() like this:

Mat gimage = ... // your input
Mat gray_img;
cvtColor(gimage, gray_img, CV_RGB2GRAY);
Scalar m; // mean
Scalar s; // stdev
meanStdDev(gray_img, m,s);