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

4 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Prodotti


Release

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by