[sane-devel] anyone working on Lexmark X2330 support?

2008-06-29 Thread Paul Wise
On Sat, 2008-06-14 at 15:42 +0200, Gerard Klaver wrote:

 Let me know when you have something.

Ok, the attached c file works with my scanner. I haven't tested it
exhaustively yet, there are timing issues in general (grabbing the data
too slowly or too quickly leads to badness and the need for resetting)
and you have to edit the code to change the scan parameters, but it
works for me in a few cases (colour/greyscale at 150 DPI).

I'll do some more tweaking/testing, try to figure out some of the
unknown bits in the protocol and the advanced stuff the Lexmark Windows
app can do and make it a bit more robust with resetting the scanner to a
good state in case of failure.

To compile it with GCC you'll probably need to delete the first line,
I've been using tcc to merge compile+run into just run.

It needs libusb and libpng installed to compile/run and will write out
lexmark_scanner.png to the current directory and a bunch of debugging
output to stdout.

Hopefully some SANE developer can help me turn it into a SANE backend.
I'd also like to know if it is similar to any other scanners that are
already supported and maybe an existing driver should be extended.

I also wrote a short protocol document, not sure if that is useful to
SANE developers or not though.

-- 
bye,
pabs

http://pabs.zip.to
-- next part --
A non-text attachment was scrubbed...
Name: lexmark-x2330-scanner.c
Type: text/x-csrc
Size: 10857 bytes
Desc: not available
Url : 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080629/0a25344a/attachment-0001.c
 
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080629/0a25344a/attachment-0001.pgp
 


[sane-devel] How to accurately scan A4(210mmx297mm) size paper?

2008-06-29 Thread Nicolas
Yep
But was just warning eagleskycloud, whose concern was to get an exact
sized scan area, in mm
Can be possible with pixma too, but requires scanning at  600 dpi 
Which apparently is not possible with Canon's Win driver, but works fine
(up to 4800 dpi on some pixma models) with Sane pixma backend ;-)

Nicolas

Le samedi 28 juin 2008 ? 22:49 +0200, litlle girl a ?crit :
 Maybe beter scan bigger area and then crop/autocrop image, in the case
 of the pixma backend.
 LLG
 




[sane-devel] CIS scanners: to calibrate or not to calibrate :) this is the question (my scanner is mad and lazy :)

2008-06-29 Thread litlle girl
2008/6/28 Rene Rebe rene at exactcode.de:
 litlle girl wrote:

 The windows driver probably calibrates once, when the scanner is
 first used, and stores the reference data somewhere (file, registry,
 etc.).

 The SANE driver should try to do the same (not registry of course,
 but some /var/... whatever file-system location.

 Yours,

 --
  Ren? Rebe - ExactCODE GmbH - Europe, Germany, Berlin
  http://exactcode.de | http://t2-project.org | http://rene.rebe.name


 This is very good idea! :)
 I think calibrate.conf is good place to put calibrate data.

 calibrate.conf structure:
 vendor, product, mode (Lineart,Gray,Color) calibrate data

 Maybe recalibrate option will be needed :)

 As proecssed run with normal user's ID have to be able to
 write to it some Un*x a-like /var/state/sane/$backend-$model.raw
 file should be more suitable.

 But as I'm not in CPU-less scanners the backend authors
 will probably figure out what they like most.

 Yours,

 --
  Ren? Rebe - ExactCODE GmbH - Europe, Germany, Berlin
  http://exactcode.de | http://t2-project.org | http://rene.rebe.name


I've made some research,
I scan 3 times at lineart, gray and color mode and grep from log last
calibrated exposure_time.

Lineart
1st [gt68xx] gt68xx_generic_set_exposure_time: 0x300 0x3b3 0x40a
2nd [gt68xx] gt68xx_generic_set_exposure_time: 0x301 0x300 0x3fc
3rd [gt68xx] gt68xx_generic_set_exposure_time: 0x301 0x3b3 0x29c
Gray
1st [gt68xx] gt68xx_generic_set_exposure_time: 0x300 0x2c2 0x29c
2nd [gt68xx] gt68xx_generic_set_exposure_time: 0x341 0x3d2 0x29c
3rd [gt68xx] gt68xx_generic_set_exposure_time: 0x350 0x40b 0x44c
Color
1st [gt68xx] gt68xx_generic_set_exposure_time: 0x33b 0x2c8 0x29c
2nd [gt68xx] gt68xx_generic_set_exposure_time: 0x300 0x2c9 0x29c
3rd [gt68xx] gt68xx_generic_set_exposure_time: 0x300 0x2c7 0x29c

It doesnt make much sense :(
LLG



[sane-devel] CIS scanners: to calibrate or not to calibrate :) this is the question (my scanner is mad and lazy :)

2008-06-29 Thread litlle girl
AFE settings looks more stable:

grep \[gt68xx\] afe ./*
./color-1.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
./color-2.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
./color-3.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
./gray-1.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
./gray-2.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0f 0x04
./gray-3.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0e 0x03
./lineart-1.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0e 0x03
./lineart-2.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0e 0x03
./lineart-3.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0f 0x04

Reg.
LLG



[sane-devel] CIS scanners: to calibrate or not to calibrate :) this is the question (my scanner is mad and lazy :)

2008-06-29 Thread Rene Rebe
litlle girl wrote:
 AFE settings looks more stable:
 
 grep \[gt68xx\] afe ./*
 ./color-1.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
 ./color-2.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
 ./color-3.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
 ./gray-1.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
 ./gray-2.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0f 0x04
 ./gray-3.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0e 0x03
 ./lineart-1.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0e 0x03
 ./lineart-2.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0e 0x03
 ./lineart-3.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0f 0x04

Aside exposure and AFE the backend probably uploads a
scaling value for each image sensor element (white / dark
shading etc.?) that should be pretty constant.

(And no, I still have not read the genesys backend source
  to verify what it's doing, this is just from other
  educated experience.)

I bet the Windows driver also does not re-calibrate every
scan, at least the Mac driver for the Canon Lide 70 does
only calibrate once after unpacking.

Yours,

-- 
   Ren? Rebe - ExactCODE GmbH - Europe, Germany, Berlin
   http://exactcode.de | http://t2-project.org | http://rene.rebe.name



[sane-devel] anyone working on Lexmark X2330 support?

2008-06-29 Thread Gerard Klaver
On Sun, 2008-06-29 at 14:33 +0800, Paul Wise wrote:
 On Sat, 2008-06-14 at 15:42 +0200, Gerard Klaver wrote:
 
  Let me know when you have something.
 
 Ok, the attached c file works with my scanner. I haven't tested it
 exhaustively yet, there are timing issues in general (grabbing the data
 too slowly or too quickly leads to badness and the need for resetting)
 and you have to edit the code to change the scan parameters, but it
 works for me in a few cases (colour/greyscale at 150 DPI).
 
 I'll do some more tweaking/testing, try to figure out some of the
 unknown bits in the protocol and the advanced stuff the Lexmark Windows
 app can do and make it a bit more robust with resetting the scanner to a
 good state in case of failure.
 
 To compile it with GCC you'll probably need to delete the first line,
 I've been using tcc to merge compile+run into just run.
 
 It needs libusb and libpng installed to compile/run and will write out
 lexmark_scanner.png to the current directory and a bunch of debugging
 output to stdout.
 
 Hopefully some SANE developer can help me turn it into a SANE backend.
 I'd also like to know if it is similar to any other scanners that are
 already supported and maybe an existing driver should be extended.
 
 I also wrote a short protocol document, not sure if that is useful to
 SANE developers or not though.
 


Maybe using copy of the lexmark backend naming it lexmark2 or copy from
logitech1 backend (see http://gkall.hobby.nl/logitech-pagescan-usb.html)
to lexmark2 backend??

A quick check on your file seems that there are not many commands needed
to do a scan, so pasting into a backend will be not so much work.

I can take a look how i can paste it in a copy of the logitech1 backend.




-- 

m.vr.gr.
Gerard Klaver




[sane-devel] CIS scanners: to calibrate or not to calibrate :) this is the question (my scanner is mad and lazy :)

2008-06-29 Thread Gerhard Jaeger
Hi,

On Freitag, 27. Juni 2008, litlle girl wrote:
 Hi guyz,
 i recognize that win drivers dont calibrate my CIS scanner before scan.

Most probably it will calibrate. Right after installation of the drivers,
you'll be asked to insert a white calibration paper with black marks on
it. Then it starts calibration and stores this data somewhere.

 gt68xx backend is loosing about 20sec every time on calibrating!
 Is there any way to turn off gt68xx backend calibrating?

have a look @ the M12 entry, the flag GT68XX_FLAG_SHEET_FED
should do the trick. It'll avoid calibration.

The plustek-backend is able to store calibration data and to
read them back before scanning. This backend (and probably most
others also) needs the value from coarse calibration (the AFE stuff)
and the fine calibration (for each sensor pixel).
The calibration data is stored for each user in its ~/.sane directory.

HTH
Gerhard



[sane-devel] CIS scanners: to calibrate or not to calibrate :) this is the question (my scanner is mad and lazy :)

2008-06-29 Thread Pierre Willenbrock
Rene Rebe schrieb:
 litlle girl wrote:
 AFE settings looks more stable:

 grep \[gt68xx\] afe ./*
 ./color-1.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
 ./color-2.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
 ./color-3.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
 ./gray-1.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
 ./gray-2.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0f 0x04
 ./gray-3.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0e 0x03
 ./lineart-1.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0e 0x03
 ./lineart-2.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0e 0x03
 ./lineart-3.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0f 0x04
 
 Aside exposure and AFE the backend probably uploads a
 scaling value for each image sensor element (white / dark
 shading etc.?) that should be pretty constant.
 
 (And no, I still have not read the genesys backend source
   to verify what it's doing, this is just from other
   educated experience.)

I don't know what the gt68xx uses for calibration data,
but the highly experimental genesys/calibration-cache code stores(in 
memory only) for each combination of color mode and resolution:
* exposure time
* AFE offset and gain
* per pixel offset and gain(actually just the black/white levels, but 
the offset and gain are fully defined by those)

 I bet the Windows driver also does not re-calibrate every
 scan, at least the Mac driver for the Canon Lide 70 does
 only calibrate once after unpacking.
 
 Yours,
 

Regards,
   Pierre



[sane-devel] CIS scanners: to calibrate or not to calibrate :) this is the question (my scanner is mad and lazy :)

2008-06-29 Thread Rene Rebe
Hi,

Pierre Willenbrock wrote:
 Rene Rebe schrieb:
 litlle girl wrote:
 AFE settings looks more stable:

 grep \[gt68xx\] afe ./*
 ./color-1.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
 ./color-2.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
 ./color-3.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
 ./gray-1.log:[gt68xx] afe 0x0f 0x04 0x10 0x05 0x0f 0x04
 ./gray-2.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0f 0x04
 ./gray-3.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0e 0x03
 ./lineart-1.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0e 0x03
 ./lineart-2.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0e 0x03
 ./lineart-3.log:[gt68xx] afe 0x0f 0x04 0x0f 0x04 0x0f 0x04

 Aside exposure and AFE the backend probably uploads a
 scaling value for each image sensor element (white / dark
 shading etc.?) that should be pretty constant.
  
 (And no, I still have not read the genesys backend source
   to verify what it's doing, this is just from other
   educated experience.)
 
 I don't know what the gt68xx uses for calibration data,
 but the highly experimental genesys/calibration-cache code stores(in 
 memory only) for each combination of color mode and resolution:
 * exposure time
 * AFE offset and gain
 * per pixel offset and gain(actually just the black/white levels, but 
 the offset and gain are fully defined by those)

Yeah, my point was to write them out to some permanent
storage (filesystem) to cache the values and thus avoid 20-30s(++)
every time a user accesses the scanner.

 I bet the Windows driver also does not re-calibrate every
 scan, at least the Mac driver for the Canon Lide 70 does
 only calibrate once after unpacking.

 Yours,

 
 Regards,
   Pierre

-- 
   Ren? Rebe - ExactCODE GmbH - Europe, Germany, Berlin
   http://exactcode.de | http://t2-project.org | http://rene.rebe.name



[sane-devel] CIS scanners: to calibrate or not to calibrate :) this is the question (my scanner is mad and lazy :)

2008-06-29 Thread litlle girl
2008/6/29 Gerhard Jaeger gerhard at gjaeger.de:
 Hi,

 On Freitag, 27. Juni 2008, litlle girl wrote:
 Most probably it will calibrate. Right after installation of the drivers,
 you'll be asked to insert a white calibration paper with black marks on
 it. Then it starts calibration and stores this data somewhere.
Yes, i think too, that win calibrates scanner right after installation
of the drivers.
 Hi guyz,
 i recognize that win drivers dont calibrate my CIS scanner before scan.
I ment win dont calibrate every time :)

It was difficoult to see win calibration bacause my scanner Plustek
OpticSlim 2400+ dont need to insert a white calibration paper with
white and black marks on it, because white and black marks are inside
the scanner.

 gt68xx backend is loosing about 20sec every time on calibrating!
 Is there any way to turn off gt68xx backend calibrating?
 have a look @ the M12 entry, the flag GT68XX_FLAG_SHEET_FED
 should do the trick. It'll avoid calibration.


 The plustek-backend is able to store calibration data and to
 read them back before scanning. This backend (and probably most
 others also) needs the value from coarse calibration (the AFE stuff)
 and the fine calibration (for each sensor pixel).
 The calibration data is stored for each user in its ~/.sane directory.
 HTH
 Gerhard
Maybe code from plustek-backend will be usable in GT68XX backend??



[sane-devel] CIS scanners: to calibrate or not to calibrate :) this is the question (my scanner is mad and lazy :)

2008-06-29 Thread litlle girl
 I don't know what the gt68xx uses for calibration data,
 but the highly experimental genesys/calibration-cache code stores(in memory
 only) for each combination of color mode and resolution:
 * exposure time
 * AFE offset and gain
 * per pixel offset and gain(actually just the black/white levels, but the
 offset and gain are fully defined by those)

gt68xx uses for calibration data internal white and black marks inside
the scanner,
below the glas (at the -y positon of scanner head)

Regards
LLG



[sane-devel] Crazy idea :)

2008-06-29 Thread litlle girl
Hi,

flatbed scanners are scanning moving head forward,
there in no reason to loose time on moving head backward useles,
next page can be scanned at head backward move,
and then fliped horizontally.
What do you think?

Regards
LLG



[sane-devel] Crazy idea :)

2008-06-29 Thread Jan-Benedict Glaw
On Sun, 2008-06-29 20:22:23 +0200, litlle girl little.linux.girl at gmail.com 
wrote:
 flatbed scanners are scanning moving head forward,
 there in no reason to loose time on moving head backward useles,
 next page can be scanned at head backward move,
 and then fliped horizontally.
 What do you think?

Sure. Just send patches. (And a real name instead of litlle girl
would be nice, too.)

MfG, JBG

-- 
  Jan-Benedict Glaw  jbglaw at lug-owl.de  +49-172-7608481
  Signature of:Lauf nicht vor Deinem Gl?ck davon:
  the second  : Es k?nnte hinter Dir stehen!
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080629/d4d7f075/attachment.pgp