how to give color for same pixel values?

2 次查看(过去 30 天)
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Red 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by