Skip to content

Reconstructing 3D information🔗

There are many possibilities to derive 3D information from rectified stereo images.

  • Non-metrical information: If only non-metrical information about the surface of an object is needed, it may be sufficient to determine the disparities within the overlapping area of the stereo image pair by using the operator binocular_disparity for correlation-based stereo or binocular_disparity_mg for multigrid stereo . The differences between both stereo matching approaches are described here in more detail.

  • Distance of the object surface: If metrical information is required, the operator binocular_distance (correlation-based stereo) or binocular_distance_mg (multigrid stereo), respectively, can be used to extract the distance of the object surface from the stereo camera system.

  • 3D coordinate images: Having a disparity image of a rectified binocular stereo system, you can additionally derive the corresponding \(x\), \(y\), and \(z\) coordinates using disparity_image_to_xyz (see here).

  • 3D coordinates for selected points: To derive metrical information for selected points only, the operators disparity_to_distance or disparity_to_point_3d can be used. The first of these two operators calculates the distance \(z\) of points from the stereo camera system based on their disparity. The second operator calculates the \(x\), \(y\), and \(z\) coordinates from the row and column position of a point in the first rectified image and from its disparity (see here). Alternatively, the operator intersect_lines_of_sight can be used to calculate the \(x\), \(y\), and \(z\) coordinates of selected points (see here). Then, there is no need to determine the disparities in advance. Only the image coordinates of the conjugate points and the camera parameters are needed. This operator can also handle image coordinates of the original stereo images. Thus, the rectification can be omitted. In exchange, you must determine the conjugate points by yourself.

Note

Note that all operators that deal with disparities or distances require all input to be based on the rectified images. This applies to the image coordinates as well as to the camera parameters.