Table of Contents

Method Erode

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Erode(InputArray, OutputArray, InputArray, Point?, int, BorderTypes, Scalar?)

Erodes an image by using a specific structuring element.

public static void Erode(InputArray src, OutputArray dst, InputArray element, Point? anchor = null, int iterations = 1, BorderTypes borderType = BorderTypes.Constant, Scalar? borderValue = null)

Parameters

src InputArray

The source image

dst OutputArray

The destination image. It will have the same size and the same type as src

element InputArray

The structuring element used for dilation. If element=new Mat(), a 3x3 rectangular structuring element is used

anchor Point?

Position of the anchor within the element. The default value (-1, -1) means that the anchor is at the element center

iterations int

The number of times erosion is applied

borderType BorderTypes

The pixel extrapolation method

borderValue Scalar?

The border value in case of a constant border. The default value has a special meaning. [By default this is CvCpp.MorphologyDefaultBorderValue()]