title: How to format xy points for undistortPoints with the python cv2 api?
body: <p>I'm having trouble formatting the x,y list of points to pass to undistortPoints (opencv 2.4.1).</p>
  
  <p>The error message is c++ specific and complains about the array of points not being of type CV_32FC2.  Shouldn't I be able to pass in an Nx2 numpy array?</p>
  
  <pre><code>import cv2
  
  camera_matrix = array(mat('1.3e+03, 0., 6.0e+02; 0., 1.3e+03, 4.8e+02; 0., 0., 1.'), dtype=float32)
  dist_coeffs = array(mat('-2.4-01, 9.5e-02, -4.0e-04, 8.9e-05, 0.'), dtype=float32)
  
  test = zeros((10,2), dtype=float32)
  
  print test.shape, type(test)
  
  xy_undistorted = cv2.undistortPoints(test, camera_matrix, dist_coeffs)
  </code></pre>
  
  <p>results in:</p>
  
  <pre><code>opencv/modules/imgproc/src/undistort.cpp:279: error: (-215) CV_IS_MAT(_src) &amp;&amp; CV_IS_MAT(_dst) &amp;&amp; (_src-&gt;rows == 1 || _src-&gt;cols == 1) &amp;&amp; (_dst-&gt;rows == 1 || _dst-&gt;cols == 1) &amp;&amp; _src-&gt;cols + _src-&gt;rows - 1 == _dst-&gt;rows + _dst-&gt;cols - 1 &amp;&amp; (CV_MAT_TYPE(_src-&gt;type) == CV_32FC2 || CV_MAT_TYPE(_src-&gt;type) == CV_64FC2) &amp;&amp; (CV_MAT_TYPE(_dst-&gt;type) == CV_32FC2 || CV_MAT_TYPE(_dst-&gt;type) == CV_64FC2) in function cvUndistortPoints
  </code></pre>
  
  <p>In samples/python2/video.py there is usage of projectPoints which takes an array and reshapes it (-1,3) resulting in an Nx3 array for that function, it seems like the same format should work here.</p>