Re: Adjusting contrast and brightness

David Fox (dsfox@cogsci.ucsd.edu)
02 Dec 1998 11:36:36 -0800

"William L. Sebok" <wls@astro.umd.edu> writes:

> David Fox says:
>
> > What I miss from the Windows scanning software is the way it could
> > automatically choose good settings for the brightness and contrast
> > based on the selected section of the preview. I'm interested in
> > implementing this for xscanimage, can anyone point me to a good
> > algorithm for doing this, or to a source of good algorithms?
>
> Actually, automatically choosing brightness, contrast and gamma from
> a selection on the preview is exactly the feature on the windows
> driver for my Umax S12 that I miss most in sane. That and being
> able to zoom the preview window to make a decently precise
> selection.

Well, then I suppose we can begin to make a few conjectures. One
approach would be to interactively modify the appearance of the
preview image based on the current settings of the controls. This
could be done based on a calibration run performed on a test image
which would record the behavior of the scanner at various settings.
My preliminary tests show that my HP 3c scanner exhibits a fairly
linear response to these controls. Perhaps it could be built into the
back end. A larger and/or adjustable preview area will be an
essential prerequisite to making this useful.

A real-time display of the brightness histogram of the preview image
might be a useful stopgap measure.

Having the software actually select the contrast and brightness and
gamma is a lot trickier, with subjective elements. Its one of those
problems, like the travelling salesman problem, that are impossible in
theory but solved in practice every day. Are the algorithms for doing
this proprietary, or are there no image processing experts here? I
know about image synthesis, but not much about image processing.

My slide scanner also does color cast removal under Windows. I
believe this is done by actually examining the color of the emulsion
by adjusting the focus. Its not working under Sane yet so I can't
investigate this right now.

-- 
David Fox           http://hci.ucsd.edu/dsf             xoF divaD
UCSD HCI Lab                                         baL ICH DSCU

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