Scanner 23 May 2004 Status In the 2.4 and early 2.6 kernels, the scanner was supported by a kernel module. In the recent 2.6 kernels, the scanner is supported by libusb. To make the transition, do this:
Commands
Software
Guides
OCR 28 February 2005 This time I used Kooka to scan, saved pgm files, straightened the images in the gimp, and converted with gocr -v 7 -i kscan*pgm -o test.txtGood results; a page in 5 seconds, but needs cleaning. Also try tesseract-ocr, a command line ocr tool 26 August 2004 The optical character recognition program GOCR works well on clean non-italic fonts. The .tif format is supposed to work if you have the netpbm package installed, but it didn't work for me -- look into this. I used the Gimp to generate .pcx files, which gocr accepts with no problems. The program tolerates minor deviations from correct orientation -- at least on the order of a degree or two. Software
gocr -i input-file.pcx -o output-file.txtThe result was definitely acceptable, though it's years behind the OCR program I've been using in Windows: no training, no manual mode where you see the image and pick the right words, and no dictionary or spell check -- even weird characters occur frequently, such as accented i's. Still, it's plenty good enough to be useful. Installation history On 13 June 2005 I tested Tim's donated UMAX Astra 2200 usb scanner as a drop-in replacement of the Agfa on Sigillo, plugging in its power and usb. It is seen and scans, but just texture. I set the type to usb in /etc/sane.d/umax.config and tried some low-level commands: # scanimage -LThat also produced a pink textured image, like a weave, with no signs of picking up anything. On 23 May 2004 I noticed the scanner was not working -- it had been working fine earlier, on a 2.6 kernel, but I don't recall exactly when it stopped working. After 2.6.3 the scanner module was no longer present, so that's likely the time. I ran # sane-find-scannerSo far so good. Then, # scanimage -LStill looks good. Then I ran kooka, and it sees only the webcam, not the scanner. I read instructions in /usr/share/doc/libsane/README.Debian.gz that /etc/hotplug/usb/libsane.usermap contains a list of supported scanners, and find AGFA-Gevaert NV|SnapScan 1212U listed. I then have a look at /etc/hotplug/usb/libusbscanner, which just seems to set the permissions -- and I find that this is working fine -- the scanner at /proc/bus/usb/002/006 (or 007) gets its permissions set to root.scanner and 660. So why isn't it detected by kooka and xsane? The /etc/sane directory does not exist, and the scanner doesn't need a dll file. I try this: scanimage -d snapscan:libusb:002:007No luck. Then I read these instructions and try cat /proc/bus/usb/devices The device node -- if I need a device node -- is /dev/usb/scanner0. However, this should be handled by hotplug. Somehow hotplug is not starting the right driver, which is also called usbscanner -- or is it? locate usbscannerfinds only /etc/hotplug/usb/libusbscanner, from the libsane package. I upgrade the package: Setting up libsane (1.0.14-2) ...I now have something in /etc/sane.d/snapscan.conf -- I uncomment the line # For USB scanners also specify bus=usb, e.g.This should really be in debconf, or the preinstallation script. I disconnect and reconnect the scanner and now get this: May 23 15:35:53 sigillo kernel: usb 2-1.7: USB disconnect, address 5Now we get a driver. But kooka still doesn't see the device under user steen (I didn't try root, but see below). In the libsane package I also see this: /etc/sane.d/snapscan.confFrom the man page, I discover that the driver expects to see the device on /dev/usb/scanner0 -- how does that work on the 2.6.5 kernel? And this general stuff: /usr/share/doc/libsane/PROBLEMSI now try: # export SANE_DEBUG_SNAPSCAN=2Oodles of it, garbage on screen, and the scanner doesn't do a proper scan -- but it moves! I then try # scanimage -LSo clearly scanimage expects to find the device on /dev/usb/scanner0, and so far it's not been symlinked correctly (hotplug should handle this). I rebooted and now this worked: scanimage -d snapscan:libusb:002:006 >image.pnmHowever, this only works for user root -- other users don't see the scanner. I add user steen to group scanner, but still don't see the device. However, in X I can now issue (as user root) xsane snapscan:libusb:002:006and get a perfect scan. Ditto for kooka -d snapscan:libusb:002:006So we're sort of in business. I run (as user steen) strace sane-find-scannerand see this: open("/proc/bus/usb/002/006", O_RDONLY) = -1 EACCES (Permission denied)I'll try logging out and back in. OK, that worked. User steen, member of group scanner, now sees and can use the scanner. |