Click or drag to resize
CvInvokeFindContourTree Method
Retrieves contours from the binary image as a contour tree. The pointer firstContour is filled by the function. It is provided as a convenient way to obtain the hierarchy value as int[,]. The function modifies the source image content

Namespace: Emgu.CV
Assembly: Emgu.CV.World (in Emgu.CV.World.dll) Version: (
public static int[,] FindContourTree(
	IInputOutputArray image,
	IOutputArray contours,
	ChainApproxMethod method,
	Point offset = null


Type: Emgu.CVIInputOutputArray
The source 8-bit single channel image. Non-zero pixels are treated as 1s, zero pixels remain 0s - 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
Type: Emgu.CVIOutputArray
Detected contours. Each contour is stored as a vector of points.
Type: Emgu.CV.CvEnumChainApproxMethod
Approximation method (for all the modes, except CV_RETR_RUNS, which uses built-in approximation).
offset (Optional)
Type: System.DrawingPoint
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: Int32
The contour hierarchy
See Also