How to automate image contrast adjustment using imcontrast or other ways?
Show older comments
So I am trying to adjust the contrast of an entire directory of images in the most efficient manner possible. I do not know enough about image processing yet to know how to adjust the pixel values manually so I found imcontrast which seems like a great tool that will really allow the people using my program to have the control that they need. Really though, it is kind of overkill so I thought I would try and identify what imcontrast was actually doing. It looks like after some doc reading and google searching that it simply adjusts the "CLim" values and magically the contrast is adjusted.. That seems much to simple.. Just in case that was the case, I struggled trying to set the axes CLim values both in my script and through the "Property Inspector" to no affect whatsoever, so if anybody could provide an example of how to set the CLim values through a script that would be terrific.
More importantly, I was wondering if any of you awesome people had suggestions on how to automate the process. Every image in the directory needs more or less the same contrast adjustment..
Thanks for the help and I will be happy to answer follow-up questions if I was unclear about a part.
Thanks in advance!
Accepted Answer
More Answers (1)
Harshit
on 31 Oct 2012
1 vote
Hi Shaun, If you requires similar adjustment you can use histogram equalization in a loop where you can read all the images and apply it on each of them. It enhances the contrast by expanding the histogram. Here is wiki page : http://en.wikipedia.org/wiki/Histogram_equalization and histeq is the command. Regards, Harshit
1 Comment
Shaun VanWeelden
on 31 Oct 2012
Categories
Find more on Contrast Adjustment 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!