how to give color for same pixel values?
Mostra commenti meno recenti
i need to assign color for pixels having same value.. can anyone help me?
Risposta accettata
Più risposte (1)
Image Analyst
il 19 Ott 2013
0 voti
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
il 19 Ott 2013
Modificato: Image Analyst
il 19 Ott 2013
Image Analyst
il 19 Ott 2013
Modificato: Image Analyst
il 19 Ott 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
il 21 Ott 2013
Modificato: Walter Roberson
il 21 Ott 2013
Image Analyst
il 21 Ott 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
il 22 Ott 2013
Image Analyst
il 22 Ott 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
il 24 Ott 2013
Categorie
Scopri di più su Red in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!