title: how to call UndistortPoints
body: <p>i have an (x,y) point, a 3x3 camera matrix, and 4 distortion coefficients and i want to get the undistorted point.  my code looks like this...</p>
  
  <pre><code>double distorted_point_x = 10;
  double_distorted_point_y = 20;
  
  Emgu.CV.Matrix&lt;double&gt; distorted_point = new Emgu.CV.Matrix&lt;double&gt;(new double[,] {{distorted_point_x,distorted_point_y}});
  Emgu.CV.Matrix&lt;double&gt; undistorted_point = new Emgu.CV.Matrix&lt;double&gt;(new double[,] {{-1,-1}}); // init to -1
  Emgu.CV.Matrix&lt;double&gt; distortion_coefficients = new Matrix&lt;double&gt;(new double[] {0,0,0,0});
  Emgu.CV.Matrix&lt;double&gt; camera_matrix = new Matrix&lt;double&gt;(new double[,] {{0,0,0},{0,0,0},{0,0,0}});
  
  // copy the stuff; there's probably a more elegant way to copy but this works
  for (int row = 0; row &lt; 3; row++) {
      for (int col = 0; col &lt; 3; col++) {
          camera_matrix[row, col] = my_calibrated_camera_matrix[row, col];  
      }
  }
  
  CvInvoke.UndistortPoints(distorted_point, undistorted_point, camera_matrix, distortion_coefficients);
  
  undistorted_point_x = undistorted_point[0, 0];
  undistorted_point_y = undistorted_point[0, 1];
  </code></pre>
  
  <p>when i run (VS2010), i get this exception dumped out to exception log file:</p>
  
  <pre><code>UnhandledException: OpenCV: 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)
  </code></pre>
  
  <p>i have the undistort.cpp from opencv and i know that this is coming from a CV_ASSERT in cvUndistortPoints(). i wonder if it's bombing on the CV_MAT_TYPE() tests where it looks like it's expecting the matrix to have 2 channels.  (why would this be needed when the input is not image data?)  if it does need to be 2-channel, how do i specify that in the Matrix??  i tried using Mat, but i don't know how to initialize the content of a Mat.  i'd really appreciate any pointers.  thanks.</p>