1 | initial version |
it gets easier to see, if you first construct a point from your moments:
for( int i = 0; i < contours.size(); i++ ) {
Point2f p = new Point2f( mu.get(i).get_m10() / mu.get(i).get_m00() , mu.get(i).get_m01()/mu.get(i).get_m00() )
mc.add(i, p);
}