Finds contours in a binary image.
Sc = imfindContours(Sbw, rmode, method)
Input binary image
Contour retrieval mode, value 0-4 allowed
RETR_EXTERNAL
RETR_LIST
RETR_CCOMP
RETR_TREE
RETR_FLOODFILL
Contour approximation method, value 0-3 allowed
CHAIN_APPROX_NONE
CHAIN_APPROX_SIMPLE
CHAIN_APPROX_TC89_L1
CHAIN_APPROX_TC89_KCOS
List which contains the coordinates for contours, each in one item in list.
This function used to find the contours of a binary image, returned in lists of coordinates.
S = imread(fullpath(getIPCVpath() + "/images/coins_gray.jpg")); Sbw = im2bw(S,0.5); Sc = imfindContours(Sbw); implotContours(S,Sc,5) | ![]() | ![]() |