필터 지우기
필터 지우기

How to automate image contrast adjustment using imcontrast or other ways?

조회 수: 8 (최근 30일)
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!

채택된 답변

Image Analyst
Image Analyst 2012년 10월 31일
Shaun, did you see under "See also" imadjust()? You can use imadjust() to programmatically fix up (linearly adjust) a whole bunch of images using code from the the FAQ to process the files. It should give a better appearance than histogram equalization, which always seems to give an unnatural unrealistic look because of the non-linear stretching.
  댓글 수: 1
Shaun VanWeelden
Shaun VanWeelden 2012년 10월 31일
Good Call, I guess I should have broadened my horizons when searching! Any info about the whole Clim thing though? I am just curious as to what that actually does and how to adjust it.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Harshit
Harshit 2012년 10월 31일
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

카테고리

Help CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by