Draws contours in the image
Namespace: OpenCvSharp.CPlusPlus
Assembly: OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public void DrawContours( IEnumerable<IEnumerable<Point>> contours, int contourIdx, Scalar color, int thickness = 1, LineType lineType = LineType.Link8, IEnumerable<HierarchyIndex> hierarchy = null, int maxLevel = 2147483647, Nullable<Point> offset = null )
Parameters
- contours
- Type: System.Collections.GenericIEnumerableIEnumerablePoint
All the input contours. Each contour is stored as a point vector. - contourIdx
- Type: SystemInt32
Parameter indicating a contour to draw. If it is negative, all the contours are drawn. - color
- Type: OpenCvSharp.CPlusPlusScalar
Color of the contours. - thickness (Optional)
- Type: SystemInt32
Thickness of lines the contours are drawn with. If it is negative (for example, thickness=CV_FILLED ), the contour interiors are drawn. - lineType (Optional)
- Type: OpenCvSharpLineType
Line connectivity. - hierarchy (Optional)
- Type: System.Collections.GenericIEnumerableHierarchyIndex
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 it is 0, only the specified contour is drawn. If it is 1, the function draws the contour(s) and all the nested contours. If it is 2, the function draws the contours, all the nested contours, all the nested-to-nested contours, and so on. This parameter is only taken into account when there is hierarchy available. - offset (Optional)
- Type: SystemNullablePoint
Optional contour shift parameter. Shift all the drawn contours by the specified offset = (dx, dy)
See Also