how to give color for same pixel values?
Afficher commentaires plus anciens
i need to assign color for pixels having same value.. can anyone help me?
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 19 Oct 2013
0 votes
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 commentaires
sheno39
le 19 Oct 2013
Modifié(e) : Image Analyst
le 19 Oct 2013
Image Analyst
le 19 Oct 2013
Modifié(e) : Image Analyst
le 19 Oct 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
le 21 Oct 2013
Modifié(e) : Walter Roberson
le 21 Oct 2013
Image Analyst
le 21 Oct 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
le 22 Oct 2013
Image Analyst
le 22 Oct 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
le 24 Oct 2013
Catégories
En savoir plus sur Contrast Adjustment dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!