title: undistorting/ dewarping a picture with 4 points on a plane
body: <p>I'd like to <code>dewarp</code> an image using <code>python</code> (<code>opencv/PIL</code> etc.). I have 4 points of which I know that they should form a rectangular on a plane. </p>
  
  <p>In gimp I can manually <code>dewarp</code> the picture using<code>backwards-correction</code>, but I'd like to write a program, that doesn't rely on <code>gimp</code>.</p>
  
  <p>All the functions I have found rely on a transformation <code>matrix</code>, so I guess it would be sufficient to give me some pointers on how to calculate the correct <code>matrix</code>.</p>
  
  <p>Greets &amp; thanks for the help</p>