0

I am trying to verify a solution to deprojecting a pixel point (u,v) into a 3D world location (x,y,z) using only the camera's extrinsic rotation and translation in addition to (u,v).

The proposed solution

I have modeled the problem in Unreal, where I have a virtual camera with world position (1077,1133,450) and rotation yaw=90, pitch=345, roll=0 degrees. I have an object of known 3D position (923,2500,0) seen by the 1280x720 camera at pixel location (771,426) or frame center position (131,-66).

The transpose of my rotation matrix is:

[[ 5.91458986e-17  9.65925826e-01 -0.00000000e+00]
[-1.00000000e+00  6.12323400e-17  0.00000000e+00]
[-1.58480958e-17 -2.58819045e-01  9.65925826e-01]]

My Tx_Ty_Tz matrix is:

[[-1094.39396119]
[ 1077.        ]
[ -141.42464373]]

My dx_dy_dz matrix is

[[ -63.75110454]
[-131.        ]
[  18.0479828 ]]

And I end up with location (-1593,50,0) as the deprojected world coordinate, which is clearly wrong. Is one of my matrices incorrectly calculated? If not, is the method provided flawed / incomplete?

  • I don't think that the solution you've linked to is a good one (but maybe I'm missing something?). The problem is that the units of your world coordinates are not the same scale as the ones in the camera frame (which depend on pixel size). The **d** vector from the post you linked to is still in camera frame it seems, and still needs multiplication by field of view etc to give you the 3d point in world coordinates. – Ash Dec 08 '19 at 10:58

1 Answers1

0

The proposed solution in the link does not appear to be accurate as the intrinsic camera matrix should be required for deprojection.