[sane-devel] Colored vertical stripes with Visioneer Xerox DocuMate 510
stef.dev at free.fr
Mon Sep 27 16:12:06 UTC 2010
Le Saturday 25 September 2010 22:58:03 chris guirl, vous avez écrit :
> Hi, I recently got this model scanner and tried it out. It works fine
> in grayscale but when I scan color images, there are wide, repeating
> vertical bars overlaying the image.
> It is not dissimilar to the problem in the picture from the thread
> "[sane-devel] Vertical bands with Lexmark X1150". However in this case
> there is a much more pronounced effect with brightly colored stripes
> blended with much of the image.
> I'll get a sample uploaded soon, the scanner is currently in use (it
> works fine with the manufacturer's drivers in Windows).
> I am using Ubuntu 10.04 x86-64 (kernel 2.6.32-25), with sane and xsane
> installed via .deb packages: libsane 1.0.21-0ubuntu1, sane-utils
> 1.0.21-0ubuntu1, xsane and xsane common 0.996-2ubuntu3.
> I'm a programmer and happy to hack on the driver, if necessary, since
> I have the equipment and can easily test it...but I'm not quite sure
> where to start as this is my first time working with sane or any
> scanning on Linux for that matter.
> Chris Guirl
pixels on the CCD sensor aren't exactly the same on a CCD sensor. To
adjust for this differences the lexmark backend scans a pure white area. The
scanned value for each pixel is used to compute a correction coefficient.
The targetted area is the white area between a black round spot (used to
locate home position) and the glass off the effective scan area. It is located
'under the roof' of the scanner and can only be seen by disassembling the
scanner. I seems that this isn't enough to get good white data. To my opinion,
the best solution is to scan backward (ie move the head to the top of scanner
and away from the glass). I hope the area there is better, but I can't know
for sure. The problem is that these scanners don't have a mechanical system to
prevent the moving sensor going to far, and it may hit the top of the casing.
It happened to me quite a few times, and I had no damage since I always kept a
hand free to unplug the power cable. But think of it before doing the
following code change:
Currently, shading calibration is done in 'forward' direction, then a
scan is done backward to put back the sensor to start position. The code is in
lexmark_low.c, in the sanei_lexmark_low_shading_calibration() function. The
direction of the scan is driven by bit 3 of register 0xc6.
To go backward we do line 4987:
regs[0xc6] &= 0xF7;
Move it before the first low_simple_scan() line 4881,
regs[0xc6] |= 0x08;
where it was to get to back to 'forward' direction. You might rename the
debug file names as well to reflect this direction change. They are written
when DEEP_DEBUG is defined in lexmark.h . Currently 8 lines are scanned, maybe
there is room to scan more lines when scanning backward. You might try to
increase this value. Adding a define for this line number would be handy and
would improve the current code.
Don't hesitate to ask me for more information and advice.
More information about the sane-devel