title: Passing Point2f [] as arguments for getAffineTransform() in Javacv
body: <p>I am trying to implement the face alignment implementation C++ bit found <a href="http://blog.csdn.net/lichengyu/article/details/23383789" rel="nofollow">here</a> in java using javacv but I am stuck at how to pass </p>
  
  <p>point2f[] as point2f in getAffineTransform().</p>
  
  <p>This is what I have been able to come up with;</p>
  
  <pre><code>    //face alignment begin
  Point2f[] srcTri = new Point2f[3];
  Point2f[] dstTri = new Point2f[3];
  
  Mat src_mat= new Mat(orig);
  Mat dst_mat= new Mat(input);
  Mat warp_mat = new Mat( 2, 3, CV_32FC1);
  
  //Set the dst image the same type and size as src
  Mat warp_dst = new Mat(src_mat.rows(), src_mat.cols(), src_mat.type());
  
  //Set your 3 points to calculate the  Affine Transform
  srcTri[0] = new Point2f((float)landmarks[5*2], (float)landmarks[5*2+1]);
  srcTri[1] = new Point2f((float)landmarks[6*2], (float)landmarks[6*2+1]);
  srcTri[2] = new Point2f((float)landmarks[0*2], (float)landmarks[0*2+1]);
  
  dstTri[0] = new Point2f((float)landmarks[5*2], (float)landmarks[5*2+1]);
  dstTri[1] = new Point2f((float)landmarks[6*2], (float)landmarks[6*2+1]);
  dstTri[2] = new Point2f((float)landmarks[0*2], (float)landmarks[0*2+1]);
  
  //Get the Affine Transform 
  warp_mat = getAffineTransform( srcTri, dstTri ); //This is where I have problems. getAffineTransform() expects Point2f but I have Point2f[]
  
  //Apply the Affine Transform just found to the src image
  warpAffine(src_mat, warp_dst, warp_mat, warp_dst.size()); 
  
  //show images
  imshow("src", src_mat);
  imshow("dst", dst_mat);
  imshow("warp_dst", warp_dst);
  waitKey(0);
  
  //face alignment end
  </code></pre>
  
  <p>Someone please show me how I should pass srcTri and dstTri as Point2f to getAffineTransform() or how to convert Point2f[] to Point2f. Is it even possible to do so?
  How can get the landmarks into a Point2f that can be accepted as an argument in getAfflineTransform() ? </p>
  
  <p>I will gladly appreciate your help on how to navigate here.</p>