Click or drag to resize

Cv2.MorphologyEx Method

Performs advanced morphological transformations

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp
Syntax
public static void MorphologyEx(
	InputArray src,
	OutputArray dst,
	MorphTypes op,
	InputArray element,
	Nullable<Point> anchor = null,
	int iterations = 1,
	BorderTypes borderType = BorderTypes.Constant,
	Nullable<Scalar> borderValue = null
)

Parameters

src
Type: OpenCvSharp.InputArray
Source image
dst
Type: OpenCvSharp.OutputArray
Destination image. It will have the same size and the same type as src
op
Type: OpenCvSharp.MorphTypes
Type of morphological operation
element
Type: OpenCvSharp.InputArray
Structuring element
anchor (Optional)
Type: System.Nullable<Point>
Position of the anchor within the element. The default value (-1, -1) means that the anchor is at the element center
iterations (Optional)
Type: System.Int32
Number of times erosion and dilation are applied. [By default this is 1]
borderType (Optional)
Type: OpenCvSharp.BorderTypes
The pixel extrapolation method. [By default this is BorderType.Constant]
borderValue (Optional)
Type: System.Nullable<Scalar>
The border value in case of a constant border. The default value has a special meaning. [By default this is CvCpp.MorphologyDefaultBorderValue()]
See Also