Re: SANE & exposure times

Ewald R. de Wit (ewald@pobox.com)
Thu, 29 Jul 1999 20:08:33 +0200

Nick Lamb (njl98r@ecs.soton.ac.uk) wrote:
> There is a third option which won't have me (or anyone else) crying out
> for the lost precision from messing about with my data in the backend,
> while avoiding having to put the same code in every frontend...

Like, how many frontends are there? It is easy to implement and if
it's not implemented then flatbed users won't miss a thing.

> You can write "proxy" backends in SANE, like sane-net, which look like
> both a front-end and a back-end. This means that Coolscan need only
> know how to do standard SANE stuff (+ Exposures or whatever exported
> as a SANE well-known-option) and the frontend need know nothing about
> negatives, but the proxy will do any mangling for you.

My frontend *wants* to know about negatives. It wants to know the exact
film density and do stuff with it. I don't need no stinking proxy
mangling my pure raw scandata before it enters my precious enhance routines!

> This way users who want e.g. exciting multiple-scan mangling, or cool
> exposure time compensation algorithms, can use them without everyone
> having to put up with the overhead, delay, and/or loss of precision.

The disadvantages you mention are only when it's implemented in the
backend. The more I thought about it the more I felt that exposure time
correction should be in the frontend. Anyway I've implemented it in my
experimental frontend and it works great.

What I would like to propose for filmscanners, is to export the
SANE_NAME_SCAN_EXPOS_TIME_R
SANE_NAME_SCAN_EXPOS_TIME_G
SANE_NAME_SCAN_EXPOS_TIME_B

or (exclusive or)

SANE_NAME_SCAN_EXPOS_TIME

as SANE_Fixed values, where a value of 1 denotes the normal exposure time,
that is the exposure time where scanning air (no slide at all) will just
saturate the corresponding RGB channel(s). So a SANE_NAME_SCAN_EXPOS_TIME_R
of 0.5 would fill the red channel exactly half way, etc.

Further, I like to put these lines in sane/saneopts.h:

#define SANE_NAME_DENSITY_RANGE "optical-density-range"
#define SANE_TITLE_DENSITY_RANGE "Optical density range"

I like to have this option exported as a SANE_Fixed too.
This is a value that's dependent on the make and model of the scanner.
For example, most 10 bits scanners have a density range of about 3.0 .

Note that increasing the exposure time will shift the density range
but not change it. Say a 4x increased exposure will shift a OD range
of 3.0 from 0.6 to 3.6. So by knowing both the normalized exposure
time and the OD range, we now have access to the densitometrically
correct film data.

-- 
  --  Ewald

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