Click or drag to resize

Mat.FindContoursAsArray Method

Finds contours in a binary image. The source is an 8-bit single-channel image. Non-zero pixels are treated as 1’s. Zero pixels remain 0’s, so the image is treated as binary. The function modifies this image while extracting the contours.

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public Point[][] FindContoursAsArray(
	RetrievalModes mode,
	ContourApproximationModes method,
	Nullable<Point> offset = null
)

Parameters

mode
Type: OpenCvSharp.RetrievalModes
Contour retrieval mode
method
Type: OpenCvSharp.ContourApproximationModes
Contour approximation method
offset (Optional)
Type: System.Nullable<Point>
Optional offset by which every contour point is shifted. This is useful if the contours are extracted from the image ROI and then they should be analyzed in the whole image context.

Return Value

Type:Point[][]
Detected contours. Each contour is stored as a vector of points.
See Also