Cv2.FilterSpeckles Method
|
filters off speckles (small regions of incorrectly computed disparity)
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp
Syntaxpublic static void FilterSpeckles(
InputOutputArray img,
double newVal,
int maxSpeckleSize,
double maxDiff,
InputOutputArray buf = null
)
Public Shared Sub FilterSpeckles (
img As InputOutputArray,
newVal As Double,
maxSpeckleSize As Integer,
maxDiff As Double,
Optional buf As InputOutputArray = Nothing
)
public:
static void FilterSpeckles(
InputOutputArray^ img,
double newVal,
int maxSpeckleSize,
double maxDiff,
InputOutputArray^ buf = nullptr
)
static member FilterSpeckles :
img : InputOutputArray *
newVal : float *
maxSpeckleSize : int *
maxDiff : float *
?buf : InputOutputArray
(* Defaults:
let _buf = defaultArg buf null
*)
-> unit
OpenCvSharp.Cv2.FilterSpeckles = function(img, newVal, maxSpeckleSize, maxDiff, buf);
Parameters
- img
- Type: OpenCvSharp.InputOutputArray
The input 16-bit signed disparity image - newVal
- Type: System.Double
The disparity value used to paint-off the speckles - maxSpeckleSize
- Type: System.Int32
The maximum speckle size to consider it a speckle. Larger blobs are not affected by the algorithm - maxDiff
- Type: System.Double
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.InputOutputArray
The optional temporary buffer to avoid memory allocation within the function.
See Also