filters off speckles (small regions of incorrectly computed disparity)
Namespace: OpenCvSharp.CPlusPlus
Assembly: OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static void FilterSpeckles( InputOutputArray img, double newVal, int maxSpeckleSize, double maxDiff, InputOutputArray buf = null )
Parameters
- img
- Type: OpenCvSharp.CPlusPlusInputOutputArray
The input 16-bit signed disparity image - newVal
- Type: SystemDouble
The disparity value used to paint-off the speckles - maxSpeckleSize
- Type: SystemInt32
The maximum speckle size to consider it a speckle. Larger blobs are not affected by the algorithm - maxDiff
- Type: SystemDouble
Maximum difference between neighbor disparity pixels to put them into the same blob. Note that since StereoBM, StereoSGBM and may be other algorithms return a fixed-point disparity map, where disparity values are multiplied by 16, this scale factor should be taken into account when specifying this parameter value. - buf (Optional)
- Type: OpenCvSharp.CPlusPlusInputOutputArray
The optional temporary buffer to avoid memory allocation within the function.
See Also