How to convert a grey-scale image into a reverse binary image
1 view (last 30 days)
Show older comments
Hardit Singh
on 13 Dec 2019
Answered: Image Analyst
on 15 Dec 2019
![cup.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/254401/cup.jpeg)
0 Comments
Accepted Answer
Walter Roberson
on 13 Dec 2019
Rbin = YourImage <= 42;
2 Comments
Walter Roberson
on 15 Dec 2019
I assure you that it does work, with the exception of TIFF images that use IEEE floating point representation (these exist but are rare)
More Answers (1)
Image Analyst
on 15 Dec 2019
Try this:
grayImage = 255 - grayImage; % Assuming your image is uint8. Use 65535 if it's uint16.
0 Comments
See Also
Categories
Find more on Import, Export, and Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!