Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Please refer to the following references for more information:


Rectification will make the left and right images fronto-parallel:

img1

Relation between depth of a triangulated point and disparity is the following:

img2

From equation:

eq1

you will get [Eq. 1].

In OpenCV notation, depth of a triangulated point is calculated with:

eq2


The 4x4 disparity-to-depth mapping matrix Q is:

eq3

The relation between 3D point in homogeneous coordinate and disparity is:

eq4

eq5

Remember that 2D image point expressed in pixel can be converted to meter in the normalized camera frame (Z=1) with:

eq6

If left principal point c_x and right principal point c'_x are equals, we get the original equation to compute the depth:

eq7

Minus sign should come from if you compute d = (u - u') or d = (u' - u).

As everything is in homogeneous coordinate, 3D point is retrieved with:

eq8