title: Testing number of outliers of opencv warpAffine
body: <p>I'm using opencv to estimate the affine transform between two images (let's call it A and B, and I want to estimate from A to B), and I need to implement RANSAC to get the best estimation possible. So far, my framework for RANSAC (considering I already have the keypoints for both images and the matches between them):</p>
  
  <p>1: Choose 3 random matches, and use the matching points from A and B as input to the function getAffineTransform;</p>
  
  <p>2: Use the function warpAffine to warp the points from A, and compare the results with the points of B., getting the rate of outliers: e;</p>
  
  <p>3: Considering the size of my sample is 3 points (getAffineTransform needs 3 points to find  the transform) and I have the rate of outliers e, I can find the number of times I need to run RANSAC to have a high probability of finding a good estimation, which is N times;</p>
  
  <p>4: Rerun steps 1 and 2 N times keeping the transform with the smallest outlier rate;</p>
  
  <p>While the basic Idea seems to be fine, I'm having some trouble with the execution, specifically step 2. My problem is, I'm not sure how I can test for the number of outliers. I thought about mapping the points of A to B with warpAffine, but I'm almost sure it wouldn't work because I believe the function would interpret my Mat of points (which is an Mx2 Mat, with M the number of points and each column the coordinates x and y of the point) as an Image, instead of a set of points I want to map. How can I do this?</p>
  
  <p>I'm using opencv 2.4.2 with c++.</p>