Computing x,y,z coordinate (3D) from image point (2)

2.5k views Asked by At

Referring to the question: Computing x,y coordinate (3D) from image point

If I have the coordinate Z of the point measured in pixel (not in mm), how can I do the same thing shown in the question above?

1

There are 1 answers

3
Francesco Callari On

The calibration matrix A returned by calibrateCamera provides the scaling factors, when paired with the physical dimensions of the sensor. Use the calibrationMatrixValues routine to do the conversions. You can get the sensor dimensions from the camera spec sheet or (sometimes) from the image EXIF header.

Once you have the f_mm from it, it is Z_mm = f_mm / fx * Z_pixels.