Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

And it also seems to work this way ...

for(MatOfPoint cont : contours)            
 {            
            Count += 1;
            Moments mu = Imgproc.moments(cont, false);
            SumOfMoments += mu.get_m10();
            Mass += mu.get_m00();
}

And it also seems to work this way ...

for(MatOfPoint cont : contours)            
 {            
     Count += 1;
     Moments mu = Imgproc.moments(cont, false);
     SumOfMoments += mu.get_m10();
     Mass += mu.get_m00();
}