# Obtain camera coords from 3 x 4 camera matrix

Hello forum,

I am trying to find the coordinates of my Camera (X,Y,Z) using the technique shown here

However, I fond that because the points in my image does not have any height ie. Z = 0, the inverse of M becomes undefined. Would the camera coordinates I obtain be accurate if I define the all points in the world coordinate with a height of one ie. Z = 1 ? I would then just subtract the height of the camera by 1.

The technique I am using to obtain the camera matrix is shown here at 42:45 I also set a44 = 1

What do you mean by "if I define the all points in the world coordinate with a height of one ie. Z = 1 ?"

There is no world point coming in inside matrix P: it only contains camera intrinsics K, camera rotation R and camera center C.

You can place the camera (or your reference coordinate system) wherever you like, that would only influence the mapping of the 3D points into 2D camera sensor when you multiply P*t, where t is the coordinates vector of the point you are considering.

Sorry, the problem I am having is that all my points (X,Y,Z) lie on the same plane (on Z = 0) and therefore I am unsuccessful in using least squares fit to obtain the camera matrix