Retrieves contours from the binary image and returns the number of retrieved contours.
Namespace: OpenCvSharp
Assembly: OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static int FindContours( CvArr image, CvMemStorage storage, out CvSeq<CvPoint> firstContour, int headerSize, ContourRetrieval mode )
Parameters
- image
- Type: OpenCvSharpCvArr
The source 8-bit single channel image. Non-zero pixels are treated as 1’s, zero pixels remain 0’s - that is image treated as binary. To get such a binary image from grayscale, one may use cvThreshold, cvAdaptiveThreshold or cvCanny. The function modifies the source image content. - storage
- Type: OpenCvSharpCvMemStorage
Container of the retrieved contours. - firstContour
- Type: OpenCvSharpCvSeqCvPoint
Output parameter, will contain the pointer to the first outer contour. - headerSize
- Type: SystemInt32
Size of the sequence header, >=sizeof(CvChain) if method=CV_CHAIN_CODE, and >=sizeof(CvContour) otherwise. - mode
- Type: OpenCvSharpContourRetrieval
Retrieval mode.
Return Value
Type: Int32The number of retrieved contours.
See Also