[sane-devel] scanner photography/ howto adapt sane

m. allan noah kitno455 at gmail.com
Tue Jan 19 01:44:56 UTC 2010


On Mon, Jan 18, 2010 at 11:01 AM, Jo Dierickx <dierickxjo at gmail.com> wrote:
> Hi,
> my name is jo, i live in Belgium, and I'm a photographer.
>  I attached a canoscan lide 30 to my cambo technical camera.  Pictures of
> and by this project can be seen here:
> http://picasaweb.google.be/dierickxjo/ScannerProject# .
> I have two problems;
> 1. the ccd seems very sensitive to infrared, does anybody knows which
> spectrum of the IR should be blocked out, since there seems to be a
> difference in the spectra of available IR cutoff filters.

perhaps you can find the maker of the ccd/cis chips and get the info
from them? Sony and Toshiba are the biggest names, IIRC.

> 2. I was thinking of writing extra routines to sane, so i was able to gain
> more control over the scanning process. Since this scanner is used as a
> "camera" i was wondering what need to be fiddled with to make some input
> parameters to obtain some sort of exposure control.

This is difficult, because cis machines control exposure by lighting
LEDs for longer periods. You have removed the LEDs.

> I know the scanner measures a black and a white spot and then does some
> calculations and set its "aperture" and its speed.

most scanners do a measurement of a white and a black area, or a
measurement of the same white area, once with the lamp on, and once
with it off. This is used for calibration. The speed is governed
purely by a static table of motor and sensor capabilities, usually
embedded in the scanner or the driver. There are no 'f/stops' in a
scanner, because the aperture is fixed.

> I think speed defins the resolution of a camera.

The 'y' resolution is controlled by the motor speed. The 'x'
resolution is generally only an even divisor of the chip's fundamental
resolution (often 600 or 1200 dpi). Any intermediate resolutions must
be interpolated.

> The white and block spot measurement i think is something like "gain"?!

On a per-cell basis, there are two pieces of information- offset and
gain. They are used to correct for inconsistencies in the performance
of individual cells (eyes) in the sensors. When you make a dark scan,
some cells will still read gray, so you subtract an amount to get them
similar to their neighbors. This is offset. When you make a light
scan, some cells read gray, so you multiply their data by some amount
to get them similar to their neighbors, after you have applied the
offset. This is gain.

> So in a way i need to say to the scanner okay measure your black spot
> (altough it will be always the same blackest of black since there is no
> light (NONE) inside the camera. And then when I open the camera i could hold
> a white paper in the actual light and then say to the scanner, measure your
> white spot.

This will work, provided that the scanner chip is so stupid that it
relies on the driver to perform this work. If the scanner is at all
'smart', you will not be able to do this, because the scanner will
become confused.

> Point is i've done some programming in the past, and i tried to read some of
> sane, but it's to much for me to find where and what i need to adapt.
> Can anyone point me in the right direction? I guess it's the back and the
> front end I should adapt.

You should be able to do everything in the backend. You will need to
add several options to perform each stage of calibration (dark scans
for offset, light scans for gain) independently. Then you can remove
your lens cap at the right moment.

allan
-- 
"The truth is an offense, but not a sin"



More information about the sane-devel mailing list