[sane-devel] Canon LiDE 90

Guillaume Gastebois guillaume.gastebois at free.fr
Sat Feb 9 18:45:06 UTC 2008


Hello,

Why calibration is so long (~50/60s) ?

What are /* Start of white strip in mm (y) */ and /* Start of black mark 
in mm (x) */ in genesys_devices.c ?

Regarding the log file you said :
W  ! 0x23 ! 0x050 ! dac value rgb(offset value)
W  ! 0x2b ! 0x028 ! pga gain rgb
But on debug, I see that these two registers are never written.

Another thing : when scaning in color the leds are blue ????

Pierre Willenbrock a écrit :
> Guillaume Gastebois schrieb:
>> Hello,
>>
>> I need a little bit more informations befor testing (sorry for my poor knowledge
>> in scanner)
>>
>> Selon Pierre Willenbrock <pierre at pirsoft.dnsalias.org>:
>>
>>> I don't know why the image colors are reversed, but it may be worth
>>> trying to flip the sign bits in Genesys_Frontend. If that does nothing,
>>> we need to handle that in code(or i am missing some setting of the gl841).
>>> The other thing you have seen is the half-resolution mode, used for
>>> greater speed when doing lower(i.E. not full) resolutions.
>>>
>> How do you explain yhat with half resolution the image seems to be grayscale and
>> without it seems to be lineart ?
> 
> If you look closely, you see that the image is not exactly lineart. When
> doing half resolution, the sensitivity of the scanner sensor changes,
> and thus needs a different afe setup. That should be handled gracefully
> by the offset/gain calibration, once those are working.
> 
>>>> Subsidary question : what is the small white (perhaps black) rectangle
>>>> in the middle up off page (for calibration) ?
>>> That may be a small metal clamp holding the glass or the calibration
>>> strip. That is the black(i.E. white) part at the very top.
>>>
>> Under this small rectangle I have a vertical more clear line(same height). Is it
>> because I need to tweek calibration area (without this small rectangle) ?
>>
>>> To summarize, it is a good idea to have bit 4 on, bit 5 is the half
>>> resolution switch. I'd put 0x10 into the 0x6c gpio register.
>>>
>>> As for the calibration area, you will need to change some code:
>>> * comment out genesys_gl841.c:4220:(line numbers may differ)
>>>   status = gl841_feed(dev, 280);/*feed to white strip. canon lide 35 only.*/
>>> * the same for genesys_gl841.c:4821:
>>>   status = gl841_feed(dev, 280);/*feed to white strip. canon lide 35 only.*/

When I comment out these lines the result is very bad (sample 
http://ggastebois.free.fr/lide90_snoop/toto_10_0_0_comment.jpg)

>>>
>>> then you can try what happens when you turn on the led_calibration and
>>> the coarse_gain_calibration. offset_calibration needs a bit more
>>> changes. i think i am having the code needed lying around somewhere.
>>> essentially, the offset calibration needs to be done with leds off.
>>> the shading calibration does need even more changes.
>>>
>> Where to find led_calibration, coarse_gain_calibration ? How to turn them on ?
>> For personnal information : what is shading calibration ????
> 
> They are called by genesys_flatbed_calibration, i think i requested to
> comment them out earlier.

OK, sorry, I did that some days ago. My last mail and sample images were 
WITH led_calibration and coarse_gain_calibration.

> 
> There are three things to calibrate for:
> 1) the mapping from sensor voltages to numbers, to not lose color space
> by clipping lower brightness to 0 or higher brightness to 65535.
> ideally, you don't ever see 0 or 65535 from the afe. This is mainly the
> job of offset/gain calibration, but the led-exposure is a factor to this.
> 2) the color intensities relative to each other. We try to get each
> colored LED to lead to similar voltages in the sensor during its
> exposure. This is calibrated by led_calibration
> 3) Variations between the sensor cells. each sensor cell has it's own
> sensitivity and black voltage, so there needs to be a
> per-pixel-correction. This is done by shading_calibration.
> 
> Additionally, the shading_calibration is by-color, so this is the place
> where we map each color channel to the correct range, as the
> led_calibration is not that exact.
> 
>>> Additionally, if you can't get the afe to switch the sign, you need to
>>> do that in the calibration functions(i.E. 65535-value).
>>>
>> Only in calibration function ?
> 
> For now, that should be enough. We are not interested in the actual
> output image, yet.
> 
> Regards,
>   Pierre
> 
>> Regards
>> Guillaume
>>
>>> Regards,
>>>   Pierre
>>>
> 
> 
> 
Regards
Guillaume




More information about the sane-devel mailing list