title: Inverse Perspective Transform?
body: <p>I am trying to find the bird's eye image from a given image. I also have the  rotations and translations (also intrinsic matrix) required to convert it into the bird's eye plane. My aim is to find an inverse homography matrix(3x3).</p>
  
  <pre><code>rotation_x = np.asarray([[1,0,0,0],
                          [0,np.cos(R_x),-np.sin(R_x),0],
                          [0,np.sin(R_x),np.cos(R_x),0],
                          [0,0,0,1]],np.float32)
  
  translation = np.asarray([[1, 0, 0, 0],
                           [0, 1, 0, 0 ],
                           [0, 0, 1, -t_y/(dp_y * np.sin(R_x))],
                           [0, 0, 0, 1]],np.float32)
  
  intrinsic = np.asarray([[s_x * f / (dp_x  ),0, 0, 0],
                         [0, 1 * f / (dp_y ) ,0, 0 ],
                         [0,0,1,0]],np.float32)
  
  #The Projection matrix to convert the image coordinates to 3-D domain from (x,y,1) to (x,y,0,1); Not sure if this is the right approach
  projection = np.asarray([[1, 0, 0],
                          [0, 1, 0],
                          [0, 0, 0],
                          [0, 0, 1]], np.float32)
  
  homography_matrix =  intrinsic @  translation @ rotation  @ projection
  
  inv = cv2.warpPerspective(source_image, homography_matrix,(w,h),flags = cv2.INTER_CUBIC  | cv2.WARP_INVERSE_MAP)
  </code></pre>
  
  <p>My question is, Is this the right approach, as I can manual set a suitable <code>ty,rx</code>, but not for the one <code>(ty,rx)</code> which is provided. </p>