www.pudn.com > colorseg.zip > showClusters.m, change:2003-03-09,size:290b


function nothing = showClusters(masks)

figure;
[h,w,c] = size(masks);

numClusters=size(masks,3);
showme = zeros(h,w);

for ind=1:numClusters
    indices=find(masks(:,:,ind)~=0);
    showme(indices) = ind;
end

imagesc(showme)
colormap(bone(numClusters+1))
colorbar;
axis image;
axis off;