title: Undistort video frames with OpenCV
body: <p>I have been trying to calibrate my camera with OpenCV2 for a while now. I have searched all over the internet (especially the documentation) for some existing codes, which can give me the answer to my simple question, but have found nothing. It might be useful for the others !</p>
  
  <p>I've followed <a href="http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html" rel="nofollow">this tutorial</a> to generate a .xml file with all the stuff for the undistort function (<a href="http://pastebin.com/G82PXneF" rel="nofollow">here it is</a>).</p>
  
  <p>My questions are <strong>how</strong> should I use <em>undistort(...)</em> :</p>
  
  <ul>
  <li><p>What matrix correspond to wich argument of <em>undistort</em> ?</p></li>
  <li><p>Do I have to call undistort at each new frame (object : <em>Mat</em>) or there is a method in C++ in order to do it once on the camera (object : <em>VideoCapture</em>) ?</p></li>
  <li><p>Is there any tool or OpenCV methods wich take .xml maxtrix and do it for us ?</p></li>
  </ul>
  
  <p>PS: When we'll manage to do it, I'll upload some code here for the community, if such tool doesn't already exist.</p>