Effacer les filtres
Effacer les filtres

How would i convert a grayscale image to a false color image?

24 vues (au cours des 30 derniers jours)
jeremy wright
jeremy wright le 29 Août 2012
I would like to convert images that are grayscale to color. I need to find out a way to save images that look like what happens when you type image(grayscaleimage) into the code.

Réponses (1)

Image Analyst
Image Analyst le 29 Août 2012
For the first question on pseudocoloring, use colormap() or ind2rgb().
For the second question on saving a grayscale image, either really grayscale or one converted to rgb via ind2rgb(), use imwrite().
  3 commentaires
jeremy wright
jeremy wright le 30 Août 2012
I just thought of something, would I be able to color a video?
Image Analyst
Image Analyst le 30 Août 2012
So give it a colormap, like
pseudoColoredImage = ind2rgb(grayImage, jet(256));
You can pseudocolor a video by doing it one frame at a time and writing it back out as a color video. Use the VideoWriter class.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Red dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by