For each label,
unique color is given. Here is another
example for labeling and extracting the components. Read the image, ‘coins.png’
, convert it into binary and fill the holes. Then perform labeling and
extraction.