Is there a a function/code which can make the darker bits darker and the lighter bits lighter?
显示 更早的评论

just a random image I found on google. Is it possible to make the black parts (crack) darker and the background (concrete) lighter?
回答(3 个)
Matz Johansson Bergström
2014-8-21
0 个投票
If you have the image processing toolbox you can use imcontrast. http://www.mathworks.se/help/images/ref/imcontrast.html
Iain
2014-8-21
0 个投票
Yup.
Calculate the difference from the image's mid level (128 probably, but this depends on how you're dealing with the image), and multiply it by a number greater than 1. Add that difference back to the mid level.
Image Analyst
2014-8-22
0 个投票
You can use imadjust() or just pass in the range you want to see into imshow().
类别
在 帮助中心 和 File Exchange 中查找有关 Display 2-D Images 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!