Bitmap image wrongly inverted
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 17 Mär. 2017
Subtract it from 255:
grayImage = uint8(255) - invertedGrayImage;
Kategorien
Mehr zu Convert Image Type finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!