Create a labeled image from the contours list
So = imcontour2label(S,Sc)
Input image
Contours list
Output labeled image
This function used to create a labeled image from a contours list
S = imread(fullpath(getIPCVpath() + "/images/coins_gray.jpg")); Sbw = im2bw(S,0.5); Sc = imfindContours(Sbw); So = imcontour2label(S,Sc); imshow(So,rainbowcolormap(size(Sc))); | ![]() | ![]() |
1. OpenCV 2.4 Online Documentation