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

4 Ansichten (letzte 30 Tage)
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?

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by