Back to FabImage Studio website

You are here: Start » Filter Reference » OpenCV » Structural Analysis and Shape Descriptors » cvDrawContours

cvDrawContours


Module: OpenCV

Draws contour outlines or filled contours.

Name Type Range Description
Input value
inImage Image Input image.
Input value
inContours PathArray All the input contours.
Input value
inContourIdx Integer -1 - Parameter indicating a contour to draw. If it is negative, all the contours are drawn.
Input value
inColor Pixel Color of the contours.
Input value
inThickness Integer -1 - Thickness of lines the contours are drawn with. If it is negative, the contour interiors are drawn.
Input value
inLineType CvLineTypes Line connectivity.
Input value
inHierarchy IntegerArrayArray* Optional information about hierarchy. It is only needed if you want to draw only some of the contours.
Input value
inMaxLevel Integer 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.
Input value
inOffset Location* Contour shift parameter.
Output value
outImage Image Output image.

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Each array in inHierarchy must be an array made from 4 elements.
DomainError inContourIdx is greater than number of contours in cvDrawContours.
DomainError Number of elements in inHierarchy must be the same as in inContours in cvDrawContours.

Complexity Level

This filter is available on Basic Complexity Level.