In the case of perfectly aligned cameras with respect to the axes and having identical intrinsic parameters (same focal length and same principal point), the equations for three-dimensional reconstruction simplify significantly.
In this condition, the equations of perspective projection reduce to
Let us now focus solely on the stereoscopic case: for simplicity, we will denote the left camera with the subscript 1 and the right camera with 2. The alignment constraints impose ,
,
, and
, having placed, without loss of generality, the right camera at the center of the reference system. The quantity
is defined as the baseline.
The difference in the horizontal coordinates of the projections of the same point as viewed in the two images of the stereo pair is defined as disparity. This value is obtained by incorporating the alignment constraints into equation (9.15), resulting in
By inverting this simple relation and substituting it into equation (9.15), it is possible to derive the world coordinates corresponding to a point
in the right camera with disparity
:
As can be observed, each element is determined by the multiplicative factor of the baseline, the true scaling factor of the reconstruction, and by the inverse of the disparity
.
The coordinates obtained are sensor coordinates, referring to a specific stereoscopic configuration where orientation and positioning are aligned and coincide with the axes of the system. To transition from sensor coordinates to the generic case of world coordinates, with arbitrarily oriented cameras, a transformation must be applied that converts the coordinates from sensor to world, specifically the rotation matrix
and the translation
of the pin-hole coordinate, allowing us to express
By combining equation (9.17) with equation (9.18), it is possible to define a matrix such that the conversion between image point-disparity
and world coordinate
can be expressed in a very compact form as
| (9.19) |
Paolo medici