How to convert a grey-scale image into a reverse binary image
3 ビュー (過去 30 日間)
古いコメントを表示
I have images like the one shown above and I want to convert the image to a binary image where the black parts are white and the rest of the image is black. How would I approach solving this problem?
0 件のコメント
採用された回答
Walter Roberson
2019 年 12 月 13 日
Rbin = YourImage <= 42;
2 件のコメント
Walter Roberson
2019 年 12 月 15 日
I assure you that it does work, with the exception of TIFF images that use IEEE floating point representation (these exist but are rare)
その他の回答 (1 件)
Image Analyst
2019 年 12 月 15 日
Try this:
grayImage = 255 - grayImage; % Assuming your image is uint8. Use 65535 if it's uint16.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Import, Export, and Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!