title: Image transformation in OpenCV
body: <p>This question is related to this question: <a href="https://stackoverflow.com/questions/10196198/how-to-remove-convexity-defects-in-sudoku-square"><code>How to remove convexity defects in sudoku square</code></a></p>
  
  <p>I was trying  to implement <a href="https://stackoverflow.com/a/10226971/1134940"><code>nikie's answer</code></a> in <code>Mathematica to OpenCV-Python</code>. But i am stuck at the final step of procedure. </p>
  
  <p>ie I got the all intersection points in square like below:</p>
  
  <p><img src="https://i.stack.imgur.com/fTZBd.png" alt="enter image description here"></p>
  
  <p>Now, i want to transform this into a perfect square of size (450,450) as given below:</p>
  
  <p><img src="https://i.stack.imgur.com/Pjc5D.png" alt="enter image description here"></p>
  
  <p>(Never mind the brightness difference of two images).</p>
  
  <p><strong>Question:</strong>
  How can i do this in OpenCV-Python? I am using <code>cv2</code> version.</p>