Professional Documents
Culture Documents
I = imread('rice.png'); imshow(I) BW = im2bw(I, graythresh(I)); CC = bwconncomp(BW); L = labelmatrix(CC); RGB = label2rgb(L); figure, imshow(RGB) RGB2 = label2rgb(L, 'spring', 'c', 'shuffle'); figure, imshow(RGB2)