Given a pair of rectified images from a stereo camera, the Stereo Disparity algorithm uses high-quality dense stereo matching to produce an output image of the same resolution as the input with left-right disparity information. This allows for inferring the depth of the scene captured by the left and right images.
Left image
Right image
Disparity map
Confidence map
Implementation
The stereo disparity estimator uses semi-global matching algorithm (SGM) to compute the disparity for the CUDA backend. The OFA backend (that can be combined with VIC and PVA backends) does an advanced version of the SGM algorithm to optimize memory bandwidth and performance.
The main differences of the advanced version of SGM in OFA backend and the SGM in CUDA backend are:
CUDA has a higher memory footprint, which may restrict the algorithm usage as it may exhaust the GPU memory
OFA allows up to 8192x8192 input image resolution without consuming CPU or GPU memory resources
Runs stereo processing on a pair of images and outputs a disparity map.
Usage
Language:
Import VPI module
import vpi
Estimate the disparity between left and right input VPI images, using 5x5 window and 64 maximum disparity. Optionally, the resulting disparity image is converted to U8, with range [0,255], suited for display.
Include the header that defines the needed functions and structures. ColorImageFormat algorithm will be needed to process the disparity output for display.
Runs stereo processing on a pair of images and outputs a disparity map.
Optionally, the resulting disparity image can be converted to U8 format and the disparity values are rescaled to fit in [0,255] range, suited for display.
Hirschmüller, Heiko (2005). "Accurate and efficient stereo processing by semi-global matching and mutual information".
IEEE Conference on Computer Vision and Pattern Recognition. pp. 807–814.
Generated by NVIDIA | Mon Aug 25 2025 17:09:57 | eeda9b47535f4495f14488456721a9f74236cef3