Stereo Reconstruction
Performs stereo reconstruction on the input images
Input
Two 2D image sets representing the left and the right camera view. The images must contain a camera calibration data component. Optionally a third image set can be passed, which represents a mask.
Output
Reconstructed depth and disparity maps
Description
The algorithm offers several stereo reconstruction algorithms for computing depth and disparity maps from stereo images. The input stereo images must have camera calibration and registration information in their meta data for the algorithm to work. The input images are first rectified and then passed to the selected stereo reconstruction algorithm. For the rectification the following parameters are availabe:
Rectification alpha - Parameter controlling the rectification with values between 0 (output image only contains valid pixels) and 1 (output image contains all pixels including mask pixel). A value of -1 applies an automated process to choosing the alpha value.
By default block matching
, semi-global block matching
and the learning-based Stereo CGI
and Stereo RAFT
algorithms are availabe. By checking Export rectified images the rectified images are also exported to the data model.
The most important parameters for the block-matching algorithms are:
Block size - Size of the patch in pixels used for matching left and right images. Only odd values are supported. Even values will be mapped to the next larger odd value.
Min disparity - Minimum disparity value in pixels to start search.
Num disparities - Maximum number of pixels to slide the patch over.
Uniqueness ratio - Controls how unique the match between the left and the right image needs to be in order to be accepted.
When a mask has been supplied to the algorithm, all pixels which are inside the mask are set to zero in the output disparity and depth map.
For the Stereo RAFT
algorithm the parameters are as follows (although default settings work well):
Init from previous computation - Marking this will store the computed disparity internally and subsequent computation will initialize the disparity from the previously stored disparity. Setting to true can help in better quality results in case of temporally smooth videos.
Number of refinements - Setting to a value greater than zero will perform that many refinement steps. Usually zero is enough. If required a value in range [1, 3]
can further improve the results.