Bitmap image wrongly inverted
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Andrew Davis
le 17 Mar 2017
Réponse apportée : Image Analyst
le 17 Mar 2017
Hi all,
I am reading a black and white bitmap (.bmp) image using
imread('filepath');
However, for this certain image the picture comes through as the complement of itself. i.e. the colours/intensities are inverted. I have tried using
imread('filepath', 'bmp');
as well.
Any ideas? I have attached the image in question, along with the output that is given.
Thanks
0 commentaires
Réponse acceptée
Thorsten
le 17 Mar 2017
[I, map] = imread('../../Downloads/scene_l.bmp');
imshow(I, map)
J = ind2rgb(I, map); % convert to non-indexed image
imshow(J)
0 commentaires
Plus de réponses (1)
Image Analyst
le 17 Mar 2017
Subtract it from 255:
grayImage = uint8(255) - invertedGrayImage;
0 commentaires
Voir également
Catégories
En savoir plus sur Convert Image Type 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!