[sane-devel] LiDE 90 Calibration

Pierre Willenbrock pierre at pirsoft.dnsalias.org
Thu Sep 4 19:59:10 UTC 2008

guillaume.gastebois at free.fr schrieb:
> Hello,
> It seems that in Windows snoop calibration of LiDE 90 is done with
 > half CCD even if scanning is in full sensor resolution.
> Is it so in sane ?
> If not, is it usefull to implement it ? Where to do that ?

To be on the safe side, all calibration steps are using the same 
settings(minus motor control, but that is hardly calibratable) as the 
final scan. This is to keep all possibly hidden parameters the same.

Theoretically, it would be okay to just keep the calibration for one 
half and one full calibration setting, since that is the only setting 
that may change the sensor characteristics. It should be possible to 
calculate the rest.

If the function that scales from full resolution to half resolution is 
known(for example the average), one could theoretically calculate that, 
too, but if it is not the average, this may get complicated. (My scanner 
sort of adds adjacent pixels.)

The LED, offset and gain calibration steps can(should be able to) work 
with any resolution, only the shading calibration needs to be adjusted 
to fill the correct locations of the shading calibration data set.

The former steps can be found in genesys_gl841.c. The shading 
calibration is in genesys.c:

* genesys_flatbed_calibration
controls all calibration steps

* sanei_genesys_init_shading_data
clears the shading data. not strictly needed, both chips have a setting 
to ignore the shading data.

* dev->model->cmd_set->init_regs_for_shading
sets up the scanning parameters(call into the chip specific vtable).

* genesys_dark_shading_calibration
* genesys_dummy_dark_shading
* genesys_white_shading_calibration
* genesys_dark_white_shading_calibration
Different methods to acquire dark and bright samples to be stored in 
dev->dark_average_data and dev->white_average_data.

* genesys_send_shading_coefficient
finally calculates and sends the shading coefficients. look in the 
CCD_CANONLIDE90 case for the actual code doing the calculations. This 
has not seen a lot of changes after i got it to work. This uses the data 
stored in dev->dark_average_data and dev->white_average_data.

The main changes needed would be in the init_regs_for_scanning and 
genesys_send_shading_coefficient functions. The rest should work with that.

This could be very useful when the calibration cache code gets commited, 
because it would reduce the number of calibrations to at most 2. 
(Currently it is in the experimental repository, and i could not get 
myself to add support in the gl646-part, yet.)

> Regards
> Guillaume


More information about the sane-devel mailing list