how to give color for same pixel values?
Ältere Kommentare anzeigen
i need to assign color for pixels having same value.. can anyone help me?
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 19 Okt. 2013
0 Stimmen
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 Kommentare
sheno39
am 19 Okt. 2013
Bearbeitet: Image Analyst
am 19 Okt. 2013
Image Analyst
am 19 Okt. 2013
Bearbeitet: Image Analyst
am 19 Okt. 2013
I don't understand what it means when you say the location is 17 or 19 or 21. In a 2D image, there are immediate 8 neighbors. So I could possibly see a 1-8 if you define where they are located (like 1 is the upper left neighbor and you go around clockwise so that 8 is the left neighbor), but you have at least 21 locations. Where are they?
sheno39
am 21 Okt. 2013
Bearbeitet: Walter Roberson
am 21 Okt. 2013
Image Analyst
am 21 Okt. 2013
But I still don't know what this uncommented code does. Can you tell me what a location of 21 means? Is it the linear index or something?
sheno39
am 22 Okt. 2013
Image Analyst
am 22 Okt. 2013
colormaps can only go up to 256 while linear indexes can far exceed that so you can't use a colormap. You'd have to create an RGB image from the linear index but I don't see how that would be meaningful. What you'll see is a gradient from upper left to lower right in color because, overall, that's how the linear indexes will go. How does that help?
sheno39
am 24 Okt. 2013
Kategorien
Mehr zu Red finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!