title: List of CvPoint2D32f to cvMat to calculate Homography using JavaCV
body: <p><strong>Using JavaCV.</strong> I have a 2 sets of CvPoint2D32f points in an ArrayList one from an image caputer from a mobile phone and another from a known image source that is constant.</p>
  
  <p>I want to apply the <code>cvFindHomogrpahy()</code> Method using these points to find a Homography Matrix between the points. I am using the following code to try and do this but I am stuck on how to get from the points I know to the 2 <code>cvMat</code> that the <code>cvFindHomogrpahy()</code> Method takes as parameters:</p>
  
  <pre><code>matsrc = cvCreateMat(points.size(), 2, CV_32FC1);
  matdst = cvCreateMat(known.size(), 2, CV_32FC1);
  
  for(int s=0; s &lt; points.size(); s++){
       CvPoint2D32f p = (CvPoint2D32f)points.get(i).get("Point");
       //Add this point to matsrc                         
  }
  
  for(int s=0; s &lt; known.size(); s++){
       CvPoint2D32f p = (CvPoint2D32f)known.get(i).get("Point");
       //Add this point to matdst                         
  }
  
  
  CvMat mat = cvCreateMat(3, 3, CV_32FC1);
  cvFindHomography(matsrc, matdst, mat); //Here the matrices created are used to find the 3x3 Homography transform Matrix
  </code></pre>
  
  <p>Am I going about this the totally wrong way? </p>