Tool Stereo Match (OpenCV)
Stereo Match.
References
- Author: O.Conrad (c) 2014
- Menu: Garden|Imagery
Parameters
Name | Type | Identifier | Description | Constraints | |
---|---|---|---|---|---|
Input | Left Image | Grid, input | LEFT | - | - |
Right Image | Grid, input | RIGHT | - | - | |
Output | Disparity Image | Grid, output | DISPARITY | - | - |
Points (*) | Point Cloud, output, optional | POINTS | - | - | |
Options | Grid System | Grid system | PARAMETERS_GRID_SYSTEM | - | - |
Algorithm | Choice | ALGORITHM | - | Available Choices: [0] Block Matching [1] Modified Hirschmuller Default: 0 | |
Minimum Disparity | Integer | DISP_MIN | Minimum possible disparity value. Normally, it is zero but sometimes rectification algorithms can shift images, so this parameter needs to be adjusted accordingly. | Minimum: 0 Default: 0 | |
Number of Disparities | Integer | DISP_NUM | Maximum disparity minus minimum disparity. The value is always greater than zero. | Minimum: 1 Default: 1 | |
Block Size | Integer | BLOCKSIZE | The linear size of the blocks compared by the algorithm. Larger block size implies smoother, though less accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher chance for algorithm to find a wrong correspondence. | Minimum: 0 Default: 4 | |
Maximum Disparity Difference | Integer | DIFF_MAX | Maximum allowed difference (in integer pixel units) in the left-right disparity check. Set it to a non-positive value to disable the check. | Minimum: -1 Default: 1 | |
Uniqueness Ratio | Integer | UNIQUENESS | Margin in percentage by which the best (minimum) computed cost function value should "win" the second best value to consider the found match correct. Normally, a value within the 5-15 range is good enough. | Minimum: 0 Default: 15 | |
Speckle Window Size | Integer | SPECKLE_SIZE | Maximum size of smooth disparity regions to consider their noise speckles and invalidate. Set it to 0 to disable speckle filtering. Otherwise, set it somewhere in the 50-200 range. | Minimum: 0 Default: 100 | |
Speckle Range | Integer | SPECKLE_RANGE | Maximum disparity variation within each connected component. If you do speckle filtering, set the parameter to a positive value, it will be implicitly multiplied by 16. Normally, 1 or 2 is good enough. | Minimum: 0 Default: 2 | |
Texture Threshold | Integer | BM_TEXTURE | - | Minimum: 0 Default: 31 | |
Prefilter Truncation Value | Integer | BM_FILTER_CAP | Truncation value for the prefiltered image pixels. | Minimum: 0 Default: 31 | |
Mode | Choice | SGBM_MODE | - | Available Choices: [0] Semi-Global Block Matching [1] HH [2] SGBM 3 Way Default: 0 | |
Disparity Smoothness Parameter 1 | Integer | SGBM_P1 | The larger the value, the smoother the disparity. Parameter 1 is the penalty on the disparity change by plus or minus 1 between neighbor pixels. The algorithm requires Parameter 2 > Parameter 1. | Minimum: 0 Default: 8 | |
Disparity Smoothness Parameter 2 | Integer | SGBM_P2 | The larger the value, the smoother the disparity. Parameter 2 is the penalty on the disparity change by more than 1 between neighbor pixels. The algorithm requires Parameter 2 > Parameter 1. | Minimum: 0 Default: 32 | |
Prefilter Truncation Value | Integer | SGBM_FILTER_CAP | Truncation value for the prefiltered image pixels. The algorithm first computes x-derivative at each pixel and clips its value by [-preFilterCap, preFilterCap] interval. The result values are passed to the Birchfield-Tomasi pixel cost function. | Minimum: 0 Default: 31 | |
(*) optional |
Command-line
Usage: saga_cmd imagery_opencv 4 [-LEFT <str>] [-RIGHT <str>] [-DISPARITY <str>] [-POINTS <str>] [-ALGORITHM <str>] [-DISP_MIN <num>] [-DISP_NUM <num>] [-BLOCKSIZE <num>] [-DIFF_MAX <num>] [-UNIQUENESS <num>] [-SPECKLE_SIZE <num>] [-SPECKLE_RANGE <num>] [-BM_TEXTURE <num>] [-BM_FILTER_CAP <num>] [-SGBM_MODE <str>] [-SGBM_P1 <num>] [-SGBM_P2 <num>] [-SGBM_FILTER_CAP <num>] -LEFT:<str> Left Image Grid, input -RIGHT:<str> Right Image Grid, input -DISPARITY:<str> Disparity Image Grid, output -POINTS:<str> Points Point Cloud, output, optional -ALGORITHM:<str> Algorithm Choice Available Choices: [0] Block Matching [1] Modified Hirschmuller Default: 0 -DISP_MIN:<num> Minimum Disparity Integer Minimum: 0 Default: 0 -DISP_NUM:<num> Number of Disparities Integer Minimum: 1 Default: 1 -BLOCKSIZE:<num> Block Size Integer Minimum: 0 Default: 4 -DIFF_MAX:<num> Maximum Disparity Difference Integer Minimum: -1 Default: 1 -UNIQUENESS:<num> Uniqueness Ratio Integer Minimum: 0 Default: 15 -SPECKLE_SIZE:<num> Speckle Window Size Integer Minimum: 0 Default: 100 -SPECKLE_RANGE:<num> Speckle Range Integer Minimum: 0 Default: 2 -BM_TEXTURE:<num> Texture Threshold Integer Minimum: 0 Default: 31 -BM_FILTER_CAP:<num> Prefilter Truncation Value Integer Minimum: 0 Default: 31 -SGBM_MODE:<str> Mode Choice Available Choices: [0] Semi-Global Block Matching [1] HH [2] SGBM 3 Way Default: 0 -SGBM_P1:<num> Disparity Smoothness Parameter 1 Integer Minimum: 0 Default: 8 -SGBM_P2:<num> Disparity Smoothness Parameter 2 Integer Minimum: 0 Default: 32 -SGBM_FILTER_CAP:<num> Prefilter Truncation Value Integer Minimum: 0 Default: 31