Fwd: Re: [sane-devel] Lexmark experimental backend]

Stéphane VOLTZ stefdev at modulonet.fr
Tue Jun 6 05:40:38 UTC 2006


Le Dimanche 28 Mai 2006 20:20, Fred Odendaal a écrit :
> Stef,
>
> You are correct about the dot. I've attached 2 files:
> find_start_lexmark1.pnm - This was with SANE_DEBUG_SANEI_USB=255
> find_start_lexmark2.pnm - This was with SANE_DEBUG_SANEI_USB unset.
>
> As you can see the picture gets better with usb logging turned off. I
> think the real problem function is
> sanei_lexmark_x1100_search_home_bwd(). It should have stopped the scan
> head and positioned it inside the dot. The white space at the top of
> each file is the distance past the dot that the scan head moved in the
> reverse direction. In this function after the scan is stopped from
> moving in the backward direction it is moved forward half the distance
> of the dot plus the maximum no. of lines the buffer will hold. This is
> done by the call to sanei_lexmark_x1100_move_fwd(). When I comment this
> line out the picture gets even better. In other words, this function
> isn't moving forward, but continuing backwards making our position even
> worse!
>
> The sanei_lexmark_x1100_find_start_line() function is working as it
> should. It simply scans what should be enough lines to scan past the dot
> into white space and return the number of white lines past the dot.
> Since the distance to the scanning area from the dot is known we simply
> subtract how far past the dot we've moved from this number to see how
> far we still have to go.
>
> regards,
> Fred O.

	Hello,

	you wre right, the trouble was with  sanei_lexmark_x1100_search_home_bwd()
which was scanning too far. To correct it, I made it read only one line of
data (2500 bytes) at a time. So when it finds the dot and then stop, it is
right on it. So we don't need to move forward a little. Now origin finding is
slower but much more reliable.
	This change uncovered a bug in the way I modified rewind. So I had to change
it. It now goes back by the bottom right y coordinate plus a fixed amount
which is the distance between start of visible area and the "origin dot".
	I tweaked a little the calibration values. Picture are now close to the
quality of my other scanner.

	I think that the current version is in good shape.

Regards,
	Stef

-------------------------------------------------------



More information about the sane-devel mailing list