[sane-devel] Lexmark experimental backend

Stéphane VOLTZ stefdev at modulonet.fr
Tue May 23 13:20:05 UTC 2006


Le Dimanche 21 Mai 2006 03:41, Fred Odendaal a écrit :
> Stéphane,
>
> When I tried the default maximum scan size at 150dpi I got blue streaks
> down the middle of the scan. Also, it had the wrong initial y position
> as it scanned the area off the glass and didn't scan to the maximum y
> coordinate. It also rewound to far.
>
> When I tried smaller scans at 75 dpi, the colours were really wrong! The
> gain and offset registers are very different than the ones set by the
> Windows driver, so I assume something funny is happening in the
> calibration. When I took a quick look through the code a few questions
> came up:
>
>  1.  In the sanei_lexmark_x1100_offset_calibration function there is a
> while loop that loops through the ranges while its not the null range
> and the average is more than the offset_threshold. However, I can't find
> where the offset_threshold is being set. Is
> dev->sensor->offset_threshold set anywhere?

	threshold, gain targets and shading targets are set in lexmark_devices.c. 
They are loaded in attachLexmark () 
with 'lexmark_device->sensor=&(sensor_list[dn]);'

>
> 2. In the function sanei_lexmark_x1100_calibration you set the registers
> like this:
>       dev->shadow_regs[0x02] = dev->offset.red;
>       dev->shadow_regs[0x03] = dev->offset.red;
>       dev->shadow_regs[0x04] = dev->offset.green;
>       dev->shadow_regs[0x05] = dev->offset.green;
>       dev->shadow_regs[0x06] = dev->offset.blue;
>       dev->shadow_regs[0x07] = dev->offset.blue;
>
> Are you sure this is correct? For my scanner the:
> red offset is for shadow_regs[0x02] and shadow_regs[0x05]
> green offset is for shadow_regs[0x03] and shadow_regs[0x06]
> blue offset is for shadow_regs[0x04] and shadow_regs[0x07]
>
	You are right. For the A920, these are always set the same. So I didn't get 
the order right. I have fixed it in experimental CVS, with a few shading 
calibration imrpovements.

> Fred.
>

	I think I have a problem with sanei_lexmark_x1100_find_start_line(). The 
detected offet is always 0. I attach the picture produced by the scan in this 
function. The dark area of the dot is at bottom, while I think it is at the 
top for your scanner. Can you confirm it ? 
	Not finding home accurately will disturb shading calibration, and you'll have 
a "overexposed" band where the dot it on the final scan.

Regards,
	Stef

	



More information about the sane-devel mailing list