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

4 views (last 30 days)
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

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

More Answers (0)

Products


Release

R2016b

Community Treasure Hunt

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

Start Hunting!