0

I am trying to map image coordinates to world coordinates for a particular dataset. I have the camera parameters available (both intrinsic and extrinsic). According to the equation, I need to take an inverse of the Homography matrix. However, when I try to do so, it fails as the Homography matrix for the camera turns out to be singular (non invertible).

H = K [ r1 | r2 | T ]

p(img) = H x p(w)

p(w) = H-1 x p(img)

The reason for using this form of Homography matrix is that I am finding Road coordinates, hence Z=0 Here, x is sign for matrix multiplication, H is the homography, K is the Intrinsic matrix, T is the Translational matrix , r1 and r2 are the first and second columns of the Rotational Matrix. p(img) are the image coordinates and p(img) are the world coordinates.

Getting values for the intrinsic and extrinsic parameters (https://github.com/ori-mrg/robotcar-dataset-sdk/blob/master/models/stereo_narrow_left.txt)

The homography matrix we get is singular: Homography matrix

Is there another way to map image to world coordinates?

  • you haven't shown how you calculate that damaged matrix. -- that text file you link to appears to contain fx, fy, cx, cy, and then a 4x4 transformation matrix that swaps some axes around. did you notice that? – Christoph Rackwitz Feb 24 '22 at 17:31
  • I have used fx, fy, cx, and cy to calculate K (intrinsics). The 4x4 matrix are the extrinsics that give us R1, R2 and T. Thats how I came up with the Homography Matrix – Karan Shah Feb 25 '22 at 04:49
  • the extrinsic matrix pans the camera away from its original view *entirely*. there will be no overlap of those views at all. what were you expecting to see? -- I would say the equations are questionable. it's been a long while since I last dealt with this stuff (breaking 3D/4x4 down to 2D/3x3) so I can't put my finger on it. check your [r1|r2|T]. is that singular already? – Christoph Rackwitz Feb 25 '22 at 07:52

0 Answers0