Bitmap image wrongly inverted
显示 更早的评论
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
采纳的回答
更多回答(1 个)
Image Analyst
2017-3-17
Subtract it from 255:
grayImage = uint8(255) - invertedGrayImage;
类别
在 帮助中心 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!