Table of Contents

Method MorphologyEx

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

MorphologyEx(InputArray, OutputArray, MorphTypes, InputArray, Point?, int, BorderTypes, Scalar?)

Performs advanced morphological transformations

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

Parameters

src InputArray

Source image

dst OutputArray

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

op MorphTypes

Type of morphological operation

element InputArray

Structuring element

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

Number of times erosion and dilation are applied. [By default this is 1]

borderType BorderTypes

The pixel extrapolation method. [By default this is BorderType.Constant]

borderValue Scalar?

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