Click or drag to resize
CvInvokeDrawContours Method
Draws contours outlines or filled contours.

Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: (
public static void DrawContours(
	IInputOutputArray image,
	IInputArray contours,
	int contourIdx,
	MCvScalar color,
	int thickness = 1,
	LineType lineType = LineType.EightConnected,
	IInputArray hierarchy = null,
	int maxLevel = 2147483647,
	Point offset = null


Type: Emgu.CVIInputOutputArray
Image where the contours are to be drawn. Like in any other drawing function, the contours are clipped with the ROI
Type: Emgu.CVIInputArray
All the input contours. Each contour is stored as a point vector.
Type: SystemInt32
Parameter indicating a contour to draw. If it is negative, all the contours are drawn.
Type: Emgu.CV.StructureMCvScalar
Color of the contours
thickness (Optional)
Type: SystemInt32
Thickness of lines the contours are drawn with. If it is negative the contour interiors are drawn
lineType (Optional)
Type: Emgu.CV.CvEnumLineType
Type of the contour segments
hierarchy (Optional)
Type: Emgu.CVIInputArray
Optional information about hierarchy. It is only needed if you want to draw only some of the contours
maxLevel (Optional)
Type: SystemInt32
Maximal level for drawn contours. If 0, only contour is drawn. If 1, the contour and all contours after it on the same level are drawn. If 2, all contours after and all contours one level below the contours are drawn, etc. If the value is negative, the function does not draw the contours following after contour but draws child contours of contour up to abs(maxLevel)-1 level.
offset (Optional)
Type: System.DrawingPoint
Shift all the point coordinates by the specified value. It is useful in case if the contours retrieved in some image ROI and then the ROI offset needs to be taken into account during the rendering.
See Also