title: How do I inverse cv2.warpPerspective in python?
body: <p>I am testing an algorithm to align images with the ultimate goal of aligning two images taken from different perspectives. I would like to be able to transform, then un-transform an image using transformation matrices.</p>
  <p>I am able to generate the 3*3 transformation matrix H, and I have the original image img:</p>
  <pre><code>warped_image = cv2.warpPerspective(img, H, (320,240))
  </code></pre>
  <p>Now I want to transform warped_image back. i.e.</p>
  <pre><code>restored_image = cv2.warpPerspective(warped_image, H_inv, (320, 240))
  </code></pre>
  <p>How do I calculate the inverse transformation matrix <code>H_inv</code>?</p>