Technical Specs
Warning: The user must be aware that by calling this service, the current parameter settings for the
camera component are irrecoverably lost.
This service requires no arguments.
This service returns no response.
6.2 Stereo matching
The stereo matching component uses the rectified stereo-image pair and computes disparity, error, and confidence
images.
6.2.1 Computing disparity images
After rectification, the left and right images have the nice property that an object point is projected onto the same
pixel row in both images. That point’s pixel column in the right image is always lower than or equal to the same
point’s pixel column in the left image. The term disparity signifies the difference between the pixel columns in
the right and left images and expresses the depth or distance of the object point from the rc_visard. The disparity
image stores the disparity values of all pixels in the left camera image.
The larger the disparity, the closer the object point. A disparity of 0 means that the projections of the object point
are in the same image column and the object point is at infinite distance. Often, there are pixels for which disparity
cannot be determined. This is the case for occlusions that appear on the left sides of objects, because these areas
are not seen from the right camera. Furthermore, disparity cannot be determined for textureless areas. Pixels for
which the disparity cannot be determined are marked as invalid with the special disparity value of 0. To distinguish
between invalid disparity measurements and disparity measurements of 0 for objects that are infinitely far away,
the disparity value for the latter is set to the smallest possible disparity value above 0.
To compute disparity values, the stereo matching algorithm has to find corresponding object points in the left and
right camera images. These are points that represent the same object point in the scene. For stereo matching,
the rc_visard uses SGM (Semi-Global Matching), which offers brief run times and a great accuracy, especially at
object borders, fine structures, and in weakly textured areas.
A key requirement for any stereo matching method is the presence of texture in the image, i.e., image-intensity
changes due to patterns or surface structure within the scene. In completely untextured regions such as a flat white
wall without any structure, disparity values can either not be computed or the results are erroneous or have low
confidence (see Confidence and error images, Section 6.2.3). The texture in the scene should not be an artificial,
repetitive pattern, since those structures may lead to ambiguities and hence to wrong disparity measurements.
If the rc_visard has to work in untextured environments, then a static artificial texture can be projected onto the
scene using an external pattern projector. This pattern should be random-like and not contain repetitive structures.
6.2.2 Computing depth images and point clouds
The following equations show how to compute an object point’s actual 3D coordinates 𝑃
𝑥
, 𝑃
𝑦
, 𝑃
𝑧
in the sensor
coordinate frame (Section 3.7) from the disparity image’s pixel coordinates 𝑝
𝑥
, 𝑝
𝑦
and the disparity value 𝑑 in
pixels:
𝑃
𝑥
=
𝑝
𝑥
· 𝑡
𝑑
𝑃
𝑦
=
𝑝
𝑦
· 𝑡
𝑑
𝑃
𝑧
=
𝑓 · 𝑡
𝑑
,
(6.2.1)
6.2. Stereo matching 33