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

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?

 Accepted Answer

Try this:
[I,cmap]=imread('pineapple.png');
imshow(I,'colormap',cmap)

More Answers (0)

Categories

Find more on Convert Image Type in Help Center and File Exchange

Products

Release

R2016b

Community Treasure Hunt

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

Start Hunting!