Why my colour image cannot display when using imread and imshow?

4 vues (au cours des 30 derniers jours)
Atifah Samuri
Atifah Samuri le 8 Nov 2021
Commenté : Atifah Samuri le 9 Nov 2021
I= imread ('pineapple.png');
imshow(I)
I am using this code. When I run the code, it display the grayscale image. Why the normal image not display?

Réponse acceptée

Kevin Holly
Kevin Holly le 8 Nov 2021
Try this:
[I,cmap]=imread('pineapple.png');
imshow(I,'colormap',cmap)

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Produits


Version

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by