OpenCV JavaScript - meanStdDev
I'm having a hard time trying understand how to extract the Mean and Stddev from the function cv.meanStdDev in the JS version of OpenCV.
I've tried the following JS code, but I'm struggling with how to get the Mean and Stddev from the meanStdDev function:
let myMean = new cv.Mat(1,4,cv.CV_64F);
let myStddev = new cv.Mat(1,4,cv.CV_64F);
cv.meanStdDev(img, myMean, myStddev);
I can't seem to find any documentation about this function on the site https://docs.opencv.org/3.4/d5/d10/tu...
Thanks in advance for any help.
are there any errors ? where is the actual problem, now ?
The problem is I'm not sure how to get the scalar value for the Mean or Stddev from this function. I've tried various ways, with the latest being: let stddev = myStddev.data[0];
But I'm not sure that the numbers are correct, or even if this is the correct approach at computing the Mean and Stddev of an image (img in this example).
Thanks