imread() wrong gray values
24 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Kaijun
le 26 Mar 2020
Réponse apportée : Walter Roberson
le 27 Mar 2020
When I tried to imread an simple gray scale image I drew in paint.net, the gray scale of the image data was totally off -- the background changed from origianl white (255) to some random gray value (55).


1 commentaire
Image Analyst
le 27 Mar 2020
Unfortunately you forgot to attach your image with the paper clip icon. I'll check back tomorrow.
Réponse acceptée
Walter Roberson
le 27 Mar 2020
The image file is not RGB, it is an colormapped image.
[img,cmap] = imread('image.png');
RGB = ind2rgb(img,cmap);
imshow(RGB)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!