pythonnumpyopencvcameracamera-matrix

Why is inverse intrinsic matrix denoted with dimensions [3, 4]?


I am working with the multinerf Framework from Google Research. It's great to work with and things are actually pretty clear down to the paragraph existing data loaders under Intrinsic camera poses:

Intrinsic camera poses

pixtocams= [N, 3, 4] numpy array of inverse intrinsic matrices, OR [3, 4] numpy array of a single shared inverse intrinsic matrix. These should be in OpenCV format, e.g.

camtopix = np.array([
  [focal,     0,  width/2],
  [    0, focal, height/2],
  [    0,     0,        1],
])
pixtocam = np.linalg.inv(camtopix)

I don't quite understand why they are talking about an inverse intrinsic matrix (or matrices) of the dimensions [3, 4]. The inverse intrinsic matrix should have the dimensions [3, 3], shouldn't it?


Solution

  • I think that it's a typo, since you can't really invert a 3x4 matrix (it must be singular). You're right that the dimensions should be 3x3. You can see that immediately below the passage you quoted, they give this example of an inverse intrinsic matrix:

    camtopix = np.array([
      [focal,     0,  width/2],
      [    0, focal, height/2],
      [    0,     0,        1],
    ])
    pixtocam = np.linalg.inv(camtopix)
    

    which is 3x3.