How to convert a grey-scale image into a reverse binary image
1 次查看(过去 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!