Draw contours from the contour image.
So = imdrawcontour(Slabel[, colormap[, thickness]])
Input labeled image
Colormap used to draw the contour
Thickness of the contours
Output contours in RGB
This function used to draw the contours in RGB, with colormap and thickness.
S = imread(fullpath(getIPCVpath() + "/images/coins_gray.jpg")); Sbw = im2bw(S,0.5); Sc = imfindContours(Sbw); Slabel = imcontour2label(S,Sc); So = imdrawContours(Slabel); imshow(im2uint8(So)); | ![]() | ![]() |
1. OpenCV 2.4 Online Documentation