Finds contours in a binary image.
Namespace: OpenCvSharp.CPlusPlus
Assembly: OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static Point[][] FindContoursAsArray( InputOutputArray image, ContourRetrieval mode, ContourChain method, Nullable<Point> offset = null )
Parameters
- image
- Type: OpenCvSharp.CPlusPlusInputOutputArray
Source, 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 the image while extracting the contours. - mode
- Type: OpenCvSharpContourRetrieval
Contour retrieval mode - method
- Type: OpenCvSharpContourChain
Contour approximation method - offset (Optional)
- Type: SystemNullablePoint
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: PointDetected contours. Each contour is stored as a vector of points.
See Also