OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Wed, 28 Jan 2015 13:09:52 -0600Is there a built-in function to calculate the variance of a cv::Mat ?http://answers.opencv.org/question/53985/is-there-a-built-in-function-to-calculate-the-variance-of-a-cvmat/ This is in order to normalize the cv::Mat before feeding it to an ANNWed, 28 Jan 2015 12:59:02 -0600http://answers.opencv.org/question/53985/is-there-a-built-in-function-to-calculate-the-variance-of-a-cvmat/Answer by Guanta for <p>This is in order to normalize the cv::Mat before feeding it to an ANN</p>
http://answers.opencv.org/question/53985/is-there-a-built-in-function-to-calculate-the-variance-of-a-cvmat/?answer=53987#post-id-53987Yes, there exist the function [meanStdDev()](http://docs.opencv.org/modules/core/doc/operations_on_arrays.html?highlight=meanstd#meanstddev). Since the standard deviation is the square root of the variance, you just need to square the result. Wed, 28 Jan 2015 13:09:52 -0600http://answers.opencv.org/question/53985/is-there-a-built-in-function-to-calculate-the-variance-of-a-cvmat/?answer=53987#post-id-53987