Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you're close ! mat.data is unfortunately the uchar data pointer, you need to access the Mat with double, like:

console.log(myMean.doubleAt(0,0))

try with an all red image, you should get 255, 0, 0, 255 for the mean and all 0 for the stdev.

you're close ! !

mat.data is unfortunately the uchar data pointer, you need to access the Mat with double, like:

console.log(myMean.doubleAt(0,0))

try with an all red image, you should get 255, 0, 0, 255 for the mean and all 0 for the stdev.