How to invert the colors in an image
53 次查看(过去 30 天)
显示 更早的评论
Hi, I want to invert the colors in a grayscale image that i am reading with matlab. Whenever the image is black, matlab gives me 0 values, and whenever the image is white matlab gives me certain values. I want to invert this so whenever is black matlab gives me the values and whenever is white matlab gives me 0 values. Can you help me with this? Thank you!
0 个评论
采纳的回答
更多回答(1 个)
Gerard Broussard
2020-8-2
You can also do something like
colormap(flipud(gray))
if you don't want ot re-compute the image you're working with
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!