[sane-devel] about GT6801 CCD scanner

Henning Meier-Geinitz henning@meier-geinitz.de
Thu, 5 Dec 2002 12:54:10 +0100


Hi,

On Thu, Dec 05, 2002 at 06:52:57PM +0800, Fan Dan wrote:
>   I set base_xdpi of  Mustek 2400usb scanner  to 1200,

Probably ok.

> then the gray Image is OK. But when I scan in color Mode , the bytes per line only 1/3 of I 
> set.

Try setting ydpi_force_line_mode to e.g. 50. Usually the images are
scanned in pixel mode, that means the data of all colors is conatined
in each line:

RGBRGBRGB...

At higher resolutions, it's necessary to switch to line mode. In this
mode, only one color is included per line:

RRRRR...
GGGGG...
BBBBB...

Some scanners seem to don't support pixel mode at all so setting the
lower limit to 50 (or 0) may help. I'm not sure, if this is your
problem.

> In backend I can't understangding some parameters (what is the 
> difference of bace_xdpi and optical_xdpi?

Optical dpi is the resolution of the sensor. It's 1200 dpi in your
case most probably. The base dpi value is the unint, in which the
coordinates are given to the hardware. For most scanners it's the same
as the optical dpi.

> what's mean of ld_shift_r , 
> ld_shift_g, ld_shift_b? 

That's the linedistance correction. The three scan lines (red, gree,
blue) of the sensor are not exactly at the same place and so the color
planes are moved vertically by some pixels, if these values aren't set
correctly. The CIS scanners don't need linedistance correction
therefore the ld_shift_* values are 0 for them.

First, try to set-up the dpi values correctly. If your images look
correct, but the colors are wrong, check LampOrder. If the colors are
correct but there are vertical colored shadows, adjust ld_shift_*. See
the other CCD scanners for examples.


>   There are some parameters in model.
> static GT68xx_Model mustek_2400usb_command_model_info={
> 	"mustek-2400usb",			/* 	name		 */
> 	"Mustek",					/*	vendor	 */
> 	"Mustek 2400USB",			/*	model		 */
> 	"P9fw.usb",				/* firmware file name 	 */

> 	&mustek_gt6801_command_descriptor,	/* Model info 		*/
> 
> 	600,						/* optical_xdpi  */

Sure? I would expect 1200 here.

> 	1200,					/* optical_ydpi 	 */

Should be 2400, but you never know...

> 	1200,						/* base_xdpi 	600 

Ok.

> 	*/
> 	600,						/* base_ydpi	 */

I would also expect 1200 here.

> 	1200,					/* ydpi_force_line_mode	 */

See above.

> 	SANE_TRUE,				/* use base_ydpi for all 
> 	resolution 	*/				
> 	{600,300,150,75,50,0},		/* xdpi_value			 */
> 	{1200,600,300,100,50,0},	/*	ydpi_value		 */

1200 doesn't work for x?

> 	{8,0},					/* bpp_gray_values	 */
> 	{8,0},				/* bpp_color_values		 */

Did you try 12?

> 	SANE_FIX(15.0),			/*	start of scan area in mm */ 

That's much. That's an indication of a wrong x_dpi. At least that's
the highest value I have ever senn for the X start value.

> 	SANE_FIX(25.0),			/*    start of scan area in mm	 */

That's big, too.

> 	SANE_FIX(220.0),			/*	width of scan area 
> 	in mm			*/
> 	SANE_FIX(299),			/*	high of scan area in mm	 */
> 	SANE_FIX(0.0),			/*	start of white strip in mm */
> 	SANE_FIX(7.0),			/*	start of black mark in mm */
> 	
> 	SANE_FIX(0.0),			/*	start of scan area in TA 
> 	mode in mm	*/
> 	SANE_FIX(0.0),			/*	start of scan area in TA 
> 	mode in mm	*/
> 	SANE_FIX(100.0),			/* 	width of scan area 
> 	in TA mode in mm	*/
> 	SANE_FIX(100.0),			/*	high of scan area in 
> 	TA mode in mm	*/
> 	SANE_FIX(0.0),			/*	start of white strip in TA 
> 	mode in mm	*/
> 
> 	0,						/*	ld_shift_r */
> 	16,						/*	ld_shift_g */
> 	32,						/*	ld_shift_b */

May work, see above.

Did you need to change any other code? You said that the wait didn't
work? can you send me that part of code, too?

Bye,
  Henning