0

I'm trying to build an iOS to detect image changes from Camera.

OpenCV's iOS SDK kindly provides a delegate method passing cv::Mat&.

How can I calculate "Coefficient of Variation" using cv::Mat& ?

Should I look for a solution from combining multiple methods using cv::Mat& ?

Being a novice to OpenCV, I'll be immensely grateful to receive any hint.

petershine
  • 3,190
  • 1
  • 25
  • 49
  • Mat is just a matrix, it's up to you to fill it with meaningful values. What's the coefficient of variation? – Miki Oct 13 '15 at 21:12

1 Answers1

0

You should indeed use the various Mat methods provided by the opencv, Some required for calculating Coefficient of Variation are :

meanStdDev : This will return you mean intensity value of the input mat and another Mat of the same size as the input Mat containing the values of deviation from the mean value.

mean You may also like to find out the mean value of the output Mat.

Also depending upon the various mathematical operations, you should have a look at the available methods and try to get the desired results using that methods only

Never try to iterate over the whole Mat and then perform computations, it is lot more slower than the inbuilt methods on Mat.

ZdaR
  • 22,343
  • 7
  • 66
  • 87