Bitmap image wrongly inverted
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Thorsten
2017 年 3 月 17 日
[I, map] = imread('../../Downloads/scene_l.bmp');
imshow(I, map)
J = ind2rgb(I, map); % convert to non-indexed image
imshow(J)
0 件のコメント
その他の回答 (1 件)
Image Analyst
2017 年 3 月 17 日
Subtract it from 255:
grayImage = uint8(255) - invertedGrayImage;
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!