![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175493/image.jpeg)
different color for different region of image
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi I have an image, I wonder how to assign different color for different region in the image? For example how can I choose one colormap for blue rectangle and one colormap for green rectangle and the rest of figure uses different colormap.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/145234/image.jpeg)
0 commentaires
Réponse acceptée
Image Analyst
le 31 Août 2014
That's precisely what my demo does. It's attached below the image. I have a freehand region version (also attached) if you're interested.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175493/image.jpeg)
4 commentaires
Image Analyst
le 1 Sep 2014
Well don't run that part of the script again - the part that reads in the original image. Just run the part that asks for the region and colorizes it. Put it in a for or while loop if you want.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Blue dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!