Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

3D points from Reprojection Q Matrix

Hello everyone,

I have been working with the reprojection matrix [Q] in a stereo configuration to get 3D coordinates from a 2D image. The [Q] matrix is described as :

image description

To get 3D points from 2D points in an image, I should be able to use this matrix as follows :

image description

By doing the matrix multiplication, I get the 3 following formulas for x, y and z coordinates in 3D :

  1. x_3D = (x_pixel - Cx) / (-1/Tx * d)
  2. y_3D = (y_pixel - Cy) / (-1/Tx * d)
  3. z_3D = f / (-1/Tx * d)

    where x_pixel and y_pixel are the x and y position of the point in the image, Tx is the distance between my 2 cameras and d is the disparity.

However, if I look on the internet for triangulation formulas to express XYZ coordinates from a 2D image, I can only find the formula I found for the z coordinate. For x and y coordinates, I do not find a similar formula, here is what I found :

  1. x_3D = x_pixel * z_3D / f
  2. y_3D = y_pixel * z_3D / f

What is the relation between the formulas given using the Q matrix, where Cx, Cy and Tx appear and the formulas given for the triangulation ?

Thank you.