Method FilterSpeckles
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
FilterSpeckles(InputOutputArray, double, int, double, InputOutputArray)
filters off speckles (small regions of incorrectly computed disparity)
public static void FilterSpeckles(InputOutputArray img, double newVal, int maxSpeckleSize, double maxDiff, InputOutputArray buf = default)
Parameters
imgInputOutputArrayThe input 16-bit signed disparity image
newValdoubleThe disparity value used to paint-off the speckles
maxSpeckleSizeintThe maximum speckle size to consider it a speckle. Larger blobs are not affected by the algorithm
maxDiffdoubleMaximum 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.
bufInputOutputArrayThe optional temporary buffer to avoid memory allocation within the function.