From: http://www.aiseminar.cn/html/18/t-618.html? Action-uchimage
The cvdrawcontours function is used to draw external and internal outlines on the image. When thickness> = 0, draw the contour line; otherwise fill in the section surrounded by the contour.
Void cvdrawcontours (cvarr * IMG, cvseq * contour,
Cvscalar external_color, cvscalar hole_color,
Int max_level, int Thickness = 1,
Int line_type = 8, cvpoint offset = cvpoint (0, 0 ));
IMG
The image on which the contour is to be drawn. Like other plot functions, the contour is the result of the ROI trim.
Contour
Pointer to the first contour.
External_color
The color of the outer contour.
Hole_color
The color of the inner contour.
Max_level
The maximum number of layers that draw a contour. If it is 0, only the contour is drawn; if it is 1, all the outlines of the contour and the contour are drawn; if it is 2, all the outlines of the same layer and lower layer are drawn after the contour, and so on; if the value is a negative value, the function does not draw the contour after the contour, but will draw its child contour until ABS (max_level)-1 layer.
Thickness
Draws the width of the contour line. If it is a negative value (for example, equal to cv_filled), the contour is drawn internally.
Line_type
The type of the contour line segment. For more information, see the cvline description.
Offset
Move the coordinates of all points according to the given value.