Class DisparityWLSFilter
- Namespace
- OpenCvSharp.XImgProc
- Assembly
- OpenCvSharp.dll
Disparity map filter based on Weighted Least Squares filter (in form of Fast Global Smoother that is a lot faster than traditional Weighted Least Squares filter implementations) and optional use of left-right-consistency-based confidence to refine the results in half-occlusions and uniform areas.
public class DisparityWLSFilter : DisparityFilter, IDisposable
- Inheritance
-
DisparityWLSFilter
- Implements
- Inherited Members
Properties
- DepthDiscontinuityRadius
DepthDiscontinuityRadius is a parameter used in confidence computation. It defines the size of low-confidence regions around depth discontinuities.
- LRCthresh
LRCthresh is a threshold of disparity difference used in left-right-consistency check during confidence map computation. The default value of 24 (1.5 pixels) is virtually always good enough.
- Lambda
Lambda is a parameter defining the amount of regularization during filtering. Larger values force filtered disparity map edges to adhere more to source image edges. Typical value is 8000.
- SigmaColor
SigmaColor is a parameter defining how sensitive the filtering process is to source image edges. Large values can lead to disparity leakage through low-contrast edges. Small values can make the filter too sensitive to noise and textures in the source image. Typical values range from 0.8 to 2.0.
Methods
- Create(StereoMatcher)
Convenience factory method that creates an instance of DisparityWLSFilter and sets up all the relevant filter parameters automatically based on the matcher instance. Currently supports only StereoBM and StereoSGBM.
- CreateGeneric(bool)
More generic factory method, creates an instance of DisparityWLSFilter and executes basic initialization routines. When using this method you will need to set up the ROI, matchers and other parameters by yourself.
- GetConfidenceMap()
Get the confidence map that was used in the last Filter call. It is a CV_32F one-channel image with values ranging from 0.0 (totally untrusted regions of the raw disparity map) to 255.0 (regions containing correct disparity values with a high degree of confidence).
- GetROI()
Get the ROI used in the last Filter call.