MATLAB File Help: cv.StereoSGBM | Index |
Class for computing stereo correspondence using the semi-global block matching algorithm
The class implements the modified H. Hirschmuller algorithm [HH08] that differs from the original one as follows:
By default, the algorithm is single-pass, which means that you
consider only 5 directions instead of 8. Set Mode='HH'
in the
contructor to run the full variant of the algorithm but beware that it
may consume a lot of memory.
The algorithm matches blocks, not individual pixels. Though, setting
BlockSize=1
reduces the blocks to single pixels.
Mutual information cost function is not implemented. Instead, a simpler Birchfield-Tomasi sub-pixel metric from [BT96] is used. Though, the color images are supported as well.
Some pre- and post- processing steps from K. Konolige algorithm
cv.StereoBM are included, for example: pre-filtering (XSobel
type)
and post-filtering (uniqueness check, quadratic interpolation and
speckle filtering).
bm = cv.StereoSGBM('MinDisparity',0, ...);
bm.BlockSize = ...;
disparity = bm.compute(left, right);
[HH08]:
Heiko Hirschmuller. "Stereo processing by semiglobal matching and mutual information". Pattern Analysis and Machine Intelligence, IEEE Transactions on, 30(2):328-341, 2008.
[BT96]:
Stan Birchfield and Carlo Tomasi. "A pixel dissimilarity measure that is insensitive to image sampling". Pattern Analysis and Machine Intelligence, IEEE Transactions on, 20(4):401-406, 1998.
Superclasses | handle |
Sealed | false |
Construct on load | false |
StereoSGBM | Creates StereoSGBM object |
BlockSize | Matched block size, default 7 |
Disp12MaxDiff | Maximum allowed difference (in integer pixel units) in the |
MinDisparity | Minimum possible disparity value, default 0 |
Mode | one of 'SGBM' (default), 'SGBM3Way', or 'HH' (runs the full-scale |
NumDisparities | Maximum disparity minus minimum disparity, positive and divisble by |
P1 | first parameter controlling the disparity smoothness, default 0 |
P2 | second parameter controlling the disparity smoothness, default 0 |
PreFilterCap | Truncation value for prefiltering image pixels, default 0 |
SpeckleRange | Maximum disparity variation within each connected component (when |
SpeckleWindowSize | Maximum size of smooth disparity regions to consider their noise |
UniquenessRatio | uniqueness ratio, default 0 |
id | Object ID |
addlistener | Add listener for event. | |
clear | Clears the algorithm state. | |
compute | Computes disparity map for the specified stereo pair | |
delete | Destructor | |
empty | Checks if algorithm object is empty. | |
eq | == (EQ) Test handle equality. | |
findobj | Find objects matching specified conditions. | |
findprop | Find property of MATLAB handle object. | |
ge | >= (GE) Greater than or equal relation for handles. | |
getDefaultName | Returns the algorithm string identifier. | |
gt | > (GT) Greater than relation for handles. | |
Sealed | isvalid | Test handle validity. |
le | <= (LE) Less than or equal relation for handles. | |
load | Loads algorithm from a file or a string. | |
lt | < (LT) Less than relation for handles. | |
ne | ~= (NE) Not equal relation for handles. | |
notify | Notify listeners of event. | |
save | Saves the algorithm to a file. |