SAGA 9.4.2 | Tool Library Documentation

Stereo Match (OpenCV)


Description

Stereo Match.


References


Parameters

 NameTypeIdentifierDescriptionConstraints
InputLeft Imagegrid, inputLEFT--
Right Imagegrid, inputRIGHT--
OutputDisparity Imagegrid, outputDISPARITY--
Pointspoint cloud, output, optionalPOINTS--
OptionsGrid Systemgrid systemPARAMETERS_GRID_SYSTEM--
AlgorithmchoiceALGORITHM-Available Choices: [0] Block Matching [1] Modified Hirschmuller Default: 0
Minimum Disparityinteger numberDISP_MINMinimum 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 Disparitiesinteger numberDISP_NUMMaximum disparity minus minimum disparity. The value is always greater than zero.Minimum: 1 Default: 1
Block Sizeinteger numberBLOCKSIZEThe 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 Differenceinteger numberDIFF_MAXMaximum 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 Ratiointeger numberUNIQUENESSMargin 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 Sizeinteger numberSPECKLE_SIZEMaximum 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 Rangeinteger numberSPECKLE_RANGEMaximum 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 Thresholdinteger numberBM_TEXTURE-Minimum: 0 Default: 31
Prefilter Truncation Valueinteger numberBM_FILTER_CAPTruncation value for the prefiltered image pixels.Minimum: 0 Default: 31
ModechoiceSGBM_MODE-Available Choices: [0] Semi-Global Block Matching [1] HH [2] SGBM 3 Way Default: 0
Disparity Smoothness Parameter 1integer numberSGBM_P1The 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 2integer numberSGBM_P2The 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 Valueinteger numberSGBM_FILTER_CAPTruncation 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

Command Line


Usage: saga_cmd imagery_opencv 4 [-LEFT ] [-RIGHT ] [-DISPARITY ] [-POINTS ] [-ALGORITHM ] [-DISP_MIN ] [-DISP_NUM ] [-BLOCKSIZE ] [-DIFF_MAX ] [-UNIQUENESS ] [-SPECKLE_SIZE ] [-SPECKLE_RANGE ] [-BM_TEXTURE ] [-BM_FILTER_CAP ] [-SGBM_MODE ] [-SGBM_P1 ] [-SGBM_P2 ] [-SGBM_FILTER_CAP ]
  -LEFT:           	Left Image
	grid, input
  -RIGHT:          	Right Image
	grid, input
  -DISPARITY:      	Disparity Image
	grid, output
  -POINTS:         	Points
	point cloud, output, optional
  -ALGORITHM:      	Algorithm
	choice
	Available Choices:
	[0] Block Matching
	[1] Modified Hirschmuller
	Default: 0
  -DISP_MIN:       	Minimum Disparity
	integer number
	Minimum: 0
	Default: 0
  -DISP_NUM:       	Number of Disparities
	integer number
	Minimum: 1
	Default: 1
  -BLOCKSIZE:      	Block Size
	integer number
	Minimum: 0
	Default: 4
  -DIFF_MAX:       	Maximum Disparity Difference
	integer number
	Minimum: -1
	Default: 1
  -UNIQUENESS:     	Uniqueness Ratio
	integer number
	Minimum: 0
	Default: 15
  -SPECKLE_SIZE:   	Speckle Window Size
	integer number
	Minimum: 0
	Default: 100
  -SPECKLE_RANGE:  	Speckle Range
	integer number
	Minimum: 0
	Default: 2
  -BM_TEXTURE:     	Texture Threshold
	integer number
	Minimum: 0
	Default: 31
  -BM_FILTER_CAP:  	Prefilter Truncation Value
	integer number
	Minimum: 0
	Default: 31
  -SGBM_MODE:      	Mode
	choice
	Available Choices:
	[0] Semi-Global Block Matching
	[1] HH
	[2] SGBM 3 Way
	Default: 0
  -SGBM_P1:        	Disparity Smoothness Parameter 1
	integer number
	Minimum: 0
	Default: 8
  -SGBM_P2:        	Disparity Smoothness Parameter 2
	integer number
	Minimum: 0
	Default: 32
  -SGBM_FILTER_CAP:	Prefilter Truncation Value
	integer number
	Minimum: 0
	Default: 31