how to give color for same pixel values?

1 回表示 (過去 30 日間)
sheno39
sheno39 2013 年 10 月 19 日
コメント済み: sheno39 2013 年 10 月 24 日
i need to assign color for pixels having same value.. can anyone help me?

採用された回答

Walter Roberson
Walter Roberson 2013 年 10 月 21 日
cmap = copper(22); %some color map
outimg = ind2rgb( uint8(locatn), cmap);
image(outimg);
  2 件のコメント
sheno39
sheno39 2013 年 10 月 22 日
sir this coding works for simple 5x5 matrix. but it is not working for image..
sheno39
sheno39 2013 年 10 月 23 日
sir can u help me to give different colors for different regions

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2013 年 10 月 19 日
What do you mean by "pixels having the same value"? Do you mean, say, pixels having red color? And so you want to assign a green color to all pixels having "red" values? Meanwhile, why don't you look at my color segmentation demos in Image Analyst's awesome File Exchange?
  8 件のコメント
sheno39
sheno39 2013 年 10 月 24 日
sir can u help me convert RGB image from linear index.
sheno39
sheno39 2013 年 10 月 24 日
編集済み: sheno39 2013 年 10 月 24 日
I used ind2rgb function. but i didn't get the correct output

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by