# Contours_Draw

## Using of command

Function draw contour to tested picture.

## Commands parameters

Command has 3 parameters:

1. Source picture: You need select source picture.Contours will be draw to this picture. Source picture must be activated before use of this function. You can select Picture_0 to Picture_19.
2. Contours: You need select contours array where contours which we want to draw are stored. You can select Contour_0 to Contour_19.
3. External color: You need select color of external contours.Left click on this parameter line opens color selection dialog
4. Hole color: You need select color of internal contours. Left click on this parameter line opens color selection dialog.
5. Max level: Maximal level for drawn contours. If 0, only contour is drawn. If 1, the contour and all contours following it on the same level are drawn. If 2, all contours following and all contours one level below the contours are drawn, and so forth. If the value is negative, the function does not draw the contours following after contour but draws the child contours of contour up to the (max level)-1 level.
6. Tickness: Thickness of lines the contours are drawn with. If it is negative the contour interiors are drawn.
7. Line type: Type of the contour segments:
   1. 8 - (or omitted) 8-connected line.
   2. 4 - 4-connected line.
   3. CV_AA - antialiased line.

## Error codes

1. Error code -11:Bad position of source picture in picture array. Position of source picture is not from range 0 to 19. Check test program file if command has correct format.
2. Error code -12:Bad position of contour in contours array. Position of contour is not from range 0 to 19. Check test program file if command has correct format.
3. Error code -13:Bad external contour color code. Check test program file if command has correct format.
4. Error code -14:Bad hole contour color code. Check test program if command has correct format.
5. Error code -15:Source picture is not alocated. Source picture must be alocated before use of this function.
6. Error code -100: OpenCV error. Explanation of this error will be displayed in result window.