Effacer les filtres
Effacer les filtres

Why do I get an image in grey scale after imread the gif image?

2 vues (au cours des 30 derniers jours)
Anqi Li
Anqi Li le 10 Juil 2014
Commenté : Image Analyst le 11 Juil 2014
My original image is with colour. I read the image file and display it, then I got a grey scale image. Does anyone know how I can load the image without change the colour scale? My code is like this: clear; close all;
I = imread('abc.gif')
figure, imshow(I);

Réponses (1)

Image Analyst
Image Analyst le 10 Juil 2014
Don't name it I - that's a bad name - hard to tell the difference between I (upper case i), and l (lower case L), and 1. Plus it's not very descriptive.
Try this
[indexedImage, colorMap] = imread('abc.gif');
imshow(indexedImage);
colormap(colorMap);
colorbar;
  8 commentaires
Image Analyst
Image Analyst le 11 Juil 2014
You have it displayed 3 times. Each figure is using a different colormap.
Image Analyst
Image Analyst le 11 Juil 2014
Do you still not understand and need more explanation?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Blue 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