showing K means clusters image in colors rather than grey scale
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi
I have clustered my image into 8 different clusters
now I have got to this bit in the example on your web page https://uk.mathworks.com/help/images/examples/color-based-segmentation-using-k-means-clustering.html
pixel_labels = reshape(cluster_idx,nrows,ncols);
imshow(pixel_labels,[]), title('image labeled by cluster index');
but I want to display 8 different colors something like . . .
imshow(pixel_labels,'colormap', hot(8))
then show the colorbar
I know this should be easy but can't figure it out
thanks
Charlie
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Colormaps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!