Class StereoBM
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Semi-Global Stereo Matching
public class StereoBM : StereoMatcher, IDisposable
- Inheritance
-
StereoBM
- Implements
- Inherited Members
Properties
PreFilterCap
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.
public int PreFilterCap { get; set; }
Property Value
PreFilterSize
public int PreFilterSize { get; set; }
Property Value
PreFilterType
public int PreFilterType { get; set; }
Property Value
ROI1
public Rect ROI1 { get; set; }
Property Value
ROI2
public Rect ROI2 { get; set; }
Property Value
SmallerBlockSize
public int SmallerBlockSize { get; set; }
Property Value
TextureThreshold
public int TextureThreshold { get; set; }
Property Value
UniquenessRatio
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.
public int UniquenessRatio { get; set; }
Property Value
Methods
Create(int, int)
Creates StereoBM object. You can then call Compute() to compute disparity for a specific stereo pair.
public static StereoBM Create(int numDisparities = 0, int blockSize = 21)
Parameters
numDisparitiesintthe disparity search range. For each pixel algorithm will find the best disparity from 0 (default minimum disparity) to numDisparities. The search range can then be shifted by changing the minimum disparity.
blockSizeintthe linear size of the blocks compared by the algorithm. The size should be odd (as the block is centered at the current pixel). 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.
Returns
- StereoBM
A new StereoBM instance.