Method

<< Click to Display Table of Contents >>

Navigation:  NxLib API > Tree > Cameras > BySerialNo > 120001 (a stereo camera) > Parameters > DisparityMap > StereoMatching >

Method

The method to use for stereo matching.

Format

String

"Correlation"

Use correlation-based stereo matching.


"SgmAligned"

Use Semi-Global-Matching with axis-aligned propagation.


"SgmDiagonal"

Use Semi-Global-Matching with diagonal propagation.


"SgmAlignedAndDiagonal"

Use Semi-Global-Matching with both axis-aligned and diagonal propagation.

 

Semi-Global-Matching

For Semi-Global-Matching, the method specifies the type of optimization that is carried out on the cost function.

"SgmAligned" propagates the cost along 4 paths that correspond to the pixel axes of the rectified images.

"SgmDiagonal" propagates the cost along 4 paths that correspond to all 45 degree pixel diagonals.

"SgmAlignedAndDiagonal" propagates the cost along 8 paths, both axis-aligned and diagonal. This setting yields the best matching results, but also has the slowest performance.

Note: The Aligned and Diagonal profiles have similar runtime, but object edges that are approximately aligned with one of the propagation directions might be estimated less accurately. You might for example choose the Diagonal profile, if you expect you object edges to be mostly pixel axis aligned and Aligned for best results on non-pixel aligned object boundaries.

See the image below for an example using 8 optimization directions. At each pixel the 8 incoming optimization paths are summed up to find the best disparity value for this pixel.

propagation

 

Sequence Correlation Stereo Matching

This method uses multiple images produced by cameras with FlexView. It finds the disparity for a pixel in the left image by correlating the corresponding pixel sequence (i.e. the same pixel across the different images) with all pixel sequences in the disparity range in the right image. The best disparity is the one where the pixel sequences have the highest correlation.

This method often has better accuracy and can resolve smaller details than Semi-Global-Matching, but it needs at least 8 image pairs.

SequenceCorrelation

Note: In order to use correlation-based stereo matching, you need to enable FlexView and take at least 8 image pairs. Otherwise it will default to "SgmAlignedAndDiagonal"

 

Default Value

"SgmAlignedAndDiagonal"