title: How to get the mass center of a contour ? Android opencv
body: <p>This is the c++ code.</p>
  
  <pre><code>vector&lt;Moments&gt; mu(contours.size() );
    for( int i = 0; i &lt; contours.size(); i++ ){
        mu[i] = moments( contours[i], false );
    }
  
  //Mass center
  vector&lt;Point2f&gt; mc( contours.size() );
    for( int i = 0; i &lt; contours.size(); i++ ){ 
      mc[i] = Point2f( mu[i].m10/mu[i].m00 , mu[i].m01/mu[i].m00 ); 
    }
  </code></pre>
  
  <p>This is my code so far in android. I can't convert the mass center to android.</p>
  
  <pre><code>//moments
  List&lt;Moments&gt; mu = new ArrayList&lt;Moments&gt;(contours.size());
    for (int i = 0; i &lt; contours.size(); i++) {
      mu.add(i, Imgproc.moments(contours.get(i), false));
    }
  
  //mass center
  List&lt;MatOfPoint2f&gt; mc = new ArrayList&lt;MatOfPoint2f&gt;(contours.size()); 
    for( int i = 0; i &lt; contours.size(); i++ ){
      mc.add((mu.get(i).get_m10() / mu.get(i).get_m00() ,   mu.get(i).get_m01()/mu.get(i).get_m00()));
    }
  </code></pre>
  
  <p>Error in this line :</p>
  
  <pre><code>mc.add((mu.get(i).get_m10() / mu.get(i).get_m00() , mu.get(i).get_m01()/mu.get(i).get_m00()));
  </code></pre>
  
  <p>Thanks in advance.</p>