MATLAB File Help: cv.findContours Index
cv.findContours

Finds contours in a binary image

contours = cv.findContours(image)
contours = cv.findContours(image, 'OptionName', optionValue, ...)
[contours,hierarchy] = cv.findContours(...)

Input

Output

Options

The function retrieves contours from the binary image using the algorithm [Suzuki85]. The contours are a useful tool for shape analysis and object detection and recognition.

Note

The function does not take into account 1-pixel border of the image (it's filled with 0's and used for neighbor analysis in the algorithm), therefore the contours touching the image border will be clipped.

References

[Suzuki85]:

Satoshi Suzuki and others. "Topological structural analysis of digitized binary images by border following". Computer Vision, Graphics, and Image Processing, 30(1):32-46, 1985.

[TehChin89]:

C-H Teh and Roland T. Chin. "On the detection of dominant points on digital curves". Pattern Analysis and Machine Intelligence, IEEE Transactions on, 11(8):859-872, 1989.

See also