[comp.graphics] contrast enhancer

clldomps@cs.ruu.nl (Louis van Dompselaar) (04/08/91)

I'm looking for a reference to an article about how to
enhance the contrast of computer pictures.
I'm using a low-budget scanner which gives a kind of
blurry image. The contrast could be enhanced by just changing
the colours (gray-shades (32)) of the pixels, but this doesn't
improve the resolution, and loses a lot of details.

If the solution is (relatively) simple, could you please mail
it directly, because I'm not sure if I can get my hands on any
old articles (although our CS library seems to have a lot of them).

Louis
clldomps@praxis.cs.ruu.nl

rick@hanauma.stanford.edu (Richard Ottolini) (04/08/91)

In article <1991Apr08.100539.13053@cs.ruu.nl> clldomps@cs.ruu.nl (Louis van Dompselaar) writes:
>I'm looking for a reference to an article about how to
>enhance the contrast of computer pictures.

Some techniques:
(1) gamma correction: raise each sample to a signed power.  .5 or square root
is useful.  If you do this many times, then use table lookup for speed.

(2) Histogram equalization: sort the image samples into amplitude bins, then
redistribute them to fill the color space.

(3) Edge detector and derivative operators: 2-D FFT the image and weight the
higher frequencies.  A weight porportional to freuqency is the the first
derivative, but this may enchance contrast too strongly, so try something less.
A derivative operation can sometimes be implemented more cheaply by convolving
the image with small grid operater, e.g. {{1 -1} {-1 1}}.