how to give color for same pixel values?
Mostrar comentarios más antiguos
i need to assign color for pixels having same value.. can anyone help me?
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 19 de Oct. de 2013
0 votos
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 comentarios
sheno39
el 19 de Oct. de 2013
Editada: Image Analyst
el 19 de Oct. de 2013
Image Analyst
el 19 de Oct. de 2013
Editada: Image Analyst
el 19 de Oct. de 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
el 21 de Oct. de 2013
Editada: Walter Roberson
el 21 de Oct. de 2013
Image Analyst
el 21 de Oct. de 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
el 22 de Oct. de 2013
Image Analyst
el 22 de Oct. de 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
el 24 de Oct. de 2013
Categorías
Más información sobre Red en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!