how to give color for same pixel values?

2 visualizzazioni (ultimi 30 giorni)
i need to assign color for pixels having same value.. can anyone help me?

Risposta accettata

Walter Roberson
Walter Roberson il 21 Ott 2013
cmap = copper(22); %some color map
outimg = ind2rgb( uint8(locatn), cmap);
image(outimg);
  2 Commenti
sheno39
sheno39 il 22 Ott 2013
sir this coding works for simple 5x5 matrix. but it is not working for image..
sheno39
sheno39 il 23 Ott 2013
sir can u help me to give different colors for different regions

Accedi per commentare.

Più risposte (1)

Image Analyst
Image Analyst il 19 Ott 2013
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 Commenti
sheno39
sheno39 il 24 Ott 2013
sir can u help me convert RGB image from linear index.
sheno39
sheno39 il 24 Ott 2013
Modificato: sheno39 il 24 Ott 2013
I used ind2rgb function. but i didn't get the correct output

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by