color-problem with imread and image
Show older comments
I'm working on a mirror anamorphosis by a cilindrical mirror. I'm having a problem with using colors. The problem can be reduced to this simple script:
picture = imread('pict.jpg')
image(picture)
This is the picture that I want to get:

This is the picture that I do get:

Does anyone know what went wrong? Many thanks.
5 Comments
Image Analyst
on 14 Aug 2017
Not sure what your edit was, but with what I see now, my answer below still stands.
Stephen23
on 14 Aug 2017
@Merijn Vangilbergen: you have an indexed image. You should read these:
Merijn Vangilbergen
on 15 Aug 2017
Omer Al Sumeri
on 5 May 2022
The answer is unclear to me, Can someone clarify?
Image Analyst
on 7 May 2022
@Omer Al Sumeri, sure. Just start a new thread and attach your indexed image file. There, show us a screenshot of what you're getting when you use my answer from below
[indexedImage, cmap] = imread('Charizard.jpg.png');
imshow(indexedImage, cmap);
Accepted Answer
More Answers (0)
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!