[sane-devel] Backend calibration data storage...

Matthew Duggan stauff@guarana.org
Wed, 20 Aug 2003 08:33:46 +1000

On Tue, Aug 19, 2003 at 02:39:37PM +0200, Gerhard Jaeger wrote:
> Hi there,
> I remember, that there once was a discussion 'bout saving backend specific
> data somewhere, but I could not find this discussion anymore.
> this will be my fall-back solution, but the better one will be to save the
> calibration data on on the disc...


For the canon_pp backend we received two types of calibration
information: a gamma curve, the format of which we didn't quite 
understand (but it works good if you just feed it back to the scanner 
later), and light & dark current readings for the LIDE LED/sensor

Without the light/dark current value, the scanners produce nasty streaky
images.  Without the gamma curve the scanners produce blue ugly or 
yellow images, depending on the model.

The backend saves both pieces of calibration information in a configurable
location which defaults to ~/.sane/canon_pp-calibration-portname if no
setting is given.  The setting can be changed on a per-port basis in
canon_pp.conf.  I don't mind changing that if need be, but I think we
should try and be consistant with this.  I decided that making a
configurable calibration file was most useful because it allowed a
multi-user system to take advantage of only having to calibrate once.

The driver should be robust in loading this file and fall-back to 
calibrating in memory, although it's a rather slow process so users 
will want to avoid it if possible.


- Matthew