Re: Automatic Brightness and Contrast correction?

Jiri Baum (jiri@baum.com.au)
Sat, 6 Mar 1999 00:20:36 +1100 (EST)

Håkan Kvarnström:
> Does any one know how to achieve automated brightness and
> contrast correction for scans made using SANE?

Well, ppmnorm / pgmnorm would probably do most of what you're after... They
map the ligthest pixels to white, darkest to black and interpolate (you can
also give it the values manually). Check also pnmgamma, ppmbrighten,
ppmflash and probably some others I've missed.

> I have been experimenting with "ppmhist" to create histograms of images
> which I used to calculate correction values for brightness and contrast.
> The problem is that it requires me to scan the same image twice.

If you want to set the brightness/contrast directly at the scanner, you'll
naturally have to do two scans; the first one might be just a quick
pre-scan. Even automatic photocopiers do a quick half-scan to set
brightness.

HTH

Jiri

-- 
<jiri@baum.com.au>
We'll know the future has arrived when every mailer transparently
quotes lines that begin with "From ", but no-one remembers why.

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com