showing K means clusters image in colors rather than grey scale

6 ビュー (過去 30 日間)
cgenes
cgenes 2016 年 12 月 1 日
コメント済み: cgenes 2016 年 12 月 1 日
Hi
I have clustered my image into 8 different clusters
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
  1 件のコメント
cgenes
cgenes 2016 年 12 月 1 日
OK i figured it out - - I used
imagesc()

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeColormaps についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by