File Exchange

image thumbnail

AUTO CONTRAST

version 1.1.0.0 (1.31 KB) by Divakar Roy
Automatic adjustment of contrast of images

13 Downloads

Updated 25 May 2009

View License

Automatically adjusts the contrast of images(color/gray) to the "optimum" level, using contrast stretching.

Comments and Ratings (12)

why sort instead of imhist? sorting several million pixels is much more time consuming.

hi..can you explains more about the heuristic values. Can i used other values other than what you put. thank you in adcanced for your response.

darkAlert

Good job!
I was looking it is this!
This is algorithm which used in the Preview MAC OS X app!

thx!

Divakar Roy

Wan, those are purely heuristic values.

can u explain how did u set the limit in this coding.
and how did you calculate that limit?
tq for response

gomathi

sir,
this code works really good. can u help to wirte code for 'Perceptually Motivated Automatic Color Contrast Enhancement' paper.

Divakar Roy

Nurul,

If input_img and output_img are the input and output filenames, this is how you run it:
>> autocontrast(input_img,output_img);

Thanks!

hi,
how to run this coding?

KIMO ORAN

but i need to calculate a contraste locale
thanks

m m

Bruce b

This works really well for adjusting images with poor contrast! Thanks

Y L

Updates

1.1.0.0

Run-time reduced by 90% !!

1.0.0.0

Simplified code and faster operation

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: CONTRAST CONTROLLER