Scanning software

Scanning software should deliver maximum information in the best possible form. It’s not necessary to avoid further processing, but it’s important to keep it possible and to perform processing steps that can be made automatically without losing important information. Choosing right scanning tools is important as mistakes in this process may result in the necessity of repeated scanning and processing. How is it with scanning negative films on Epson Perfection 2480 Photo?

The original Epson scanning software on Windows usually produces good results, but one must be careful to actually receive them. Obvious selections are setting colors to 48-bit (or 16-bit in case of bw negatives) and resolution to

  1. “Improvement” options should be all disabled, especially dust removal

that in my experience actually doesn’t remove any dust but removes many details instead (this is a pure software algorithm, the hardware doesn’t support any dust removal features). Note that unsharp masking has to be disabled for each scanned film field individually. When you forget it, you receive bad results when you try to apply unsharp masking later yourself. Usually the software produces good colors (better than I’m able to get from the negative by other means now) although manual corrections are often necessary during post-processing, as is common with color negatives. It happened to me once with a few strongly overexposed film fields that the software has chosen very aggressive color clipping and I had to adjust histogram settings and rescan the given fields again. The Epson software requires a lot of mouse clicks (on average more than 2 for each scanned field) and suffers from memory leaks, requiring occasional restarts.

On Linux the scanning process is more challenging. The SANE driver supports all the crucial hardware features and scanning half a film strip requires just a single scanner button press (when you use scanbuttond) and no mouse clicks. But here is a small 1:1 sample of what you receive (contrast is much increased in all the examples to demonstrate the problems more clearly):

epson-sane-quality.png

Note two things:

  1. The very ugly stripe about one quarter from the left in the image. This is not a scratch on the film, this is a systematic defect.
  2. The regular pattern of vertical one pixel wide darker and brighter stripes around edges of dark areas.

As for the special ugly stripe, it helps turning quality settings off (i.e. removing the ‘–high-quality=yes –quality-cal=yes’ scanimage command line options). I guess their meaning is reversed in the driver by mistake. So here is new result:

epson-sane.png

The extra stripe is gone, but the regular stripe pattern is still there. I’ve no idea why it’s there but I’ve seen something similar in the samples from other scanners on the net so it’s likely to be some common hardware feature. FWIW, scanning direction is vertical here. No such apparent stripes are present when the same image is scanned with the Epson software on Windows:

epson-epson.png

So I tried to get rid of the stripes by averaging each two neighboring stripes into a new “neutral” stripe. This operation shouldn’t lower resolution of the image, it may just soften it (and the actual scanner resolution doesn’t correspond to the scanned image size anyway). So it should be safe. Here is what I received after applying the following imagemagick commands:

convert -crop 199x158+0+0 image.png crop1.png
convert -crop 199x158+1+0 image.png crop2.png
composite -blend 50% crop1.png crop2.png result.png

epson-fixed.png

I think the result is pretty close (except for contrast adjustments) to what Epson software produces, so it’s probably the way to go.

All the things presented here may look clear and simple. But it took me long time coming from the first naive scanning attempts to discovering why the scanned images don’t look well and finally finding out all what’s described above. Now I know supporting a piece of hardware doesn’t mean just providing raw low-level drivers to the hardware. The hardware specific post-processing part is also very important and the user may receive poor results if this part is missing.

Booting Debian from a USB drive

I’ve recently installed Debian etch distribution on an external USB hard drive. I was positively surprised how smooth the installation process was and how well the resulting system worked. Especially Czech environment was complete and well set up for the Czech speaking user without any need of further adjustments. The release managers and the debian-installer team do clearly good work and Debian 4.0 freeze may be short.

The only problem was how to boot from the USB drive. Initially it appeared to be easy as the computer offered USB booting in BIOS. But that didn’t work, perhaps the BIOS was buggy. So I decided to make a bootable CD for the system.

For the record, here is the process of making a bootable CD for an etch system on an external USB drive. Some steps may be redundant, I don’t know, but the final CD worked and this is what matters.

  • Connect the USB drive to a similar computer, mount it and chroot into it.
  • Install the ‘initramfs-tools’ package.
  • Add the following module names to ‘/etc/initramfs-tools/modules': ‘usb-ehci’, ‘usb-ohci’, ‘usb-uhci’, ‘scsi-mod’, ‘sd-mod’, ‘usb-storage’.
  • Run ‘update-initramfs’.
  • You can leave the chrooted environment now.
  • Install ‘syslinux’ and read its documentation.
  • Create a syslinux working directory as described in the syslinux documentation. Name the kernel image file ‘linux’ unless you want to change the defaults. Don’t forget to put the following option (the only one required) into ‘isolinux.cfg': ‘APPEND initrd=initrd.img root=/dev/sda1′ (change the names of the initrd file and root partition accordingly).
  • Make the ISO image, burn it onto CD and boot it.

Scanning print films with Epson 2480

I’ve switched almost completely from using a compact digital camera to using a film camera this year. I scan my 35 mm negatives with a low-end flatbed scanner, namely Epson Perfection 2480 Photo. It is possible to obtain reasonable results using that cheap device, but it’s not easy. I’ve been learning a lot during the process and I’d like to share my experience in the posts here, perhaps it helps someone.

First, what can one expect?

As for the scanner dynamic range, I think it’s sufficient for scanning amateur print films, I haven’t observed any problems in this area.

As for the scanner resolution, Epson claims something about 2400 dpi regarding that scanner. I’d say such numbers are pure marketing crap nowadays for two reasons: 1. it’s not defined what the number means; 2. whatever it’s supposed to mean it has probably little to do with reality, i.e. the real scanner resolution. According to internet rumours and my own observations, such as down and upsampling scanned pictures and comparing scans with prints, I estimate the actual scanner resolution performance is very roughly around 1000 ppi. That means the spatial information the scanner is able to capture from a standard 35 mm film field is present in a picture of a minimum size of about 1500×1000 pixels.

So in theory the scanner should be sufficient for both my primary target medium, a 1280×1024 computer screen, and my secondary media, occasional prints not larger than A4. In practice it’s not that easy but more on this next time.

Wouldn’t it be worth to buy a better scanner? I don’t have any experience with current more expensive scanners, but from what I’ve read and seen on the net, I think they provide somewhat better results with significantly higher comfort for much more money. Higher Epson flatbed scanners such as 4×90 or V7x0 produce better results and offer hardware features for dust removal, but increase in the device cost is significantly higher than increase in the resulting scan quality. Low-end “4000 dpi” dedicated film scanners give even better results for even more money. Drum scanners produce much better scans than Epson 2480 for 100 times more money. Basically it’s your choice whether you invest much more money into better scanning hardware producing good results or much more time into scanning process using a cheap scanner producing acceptable results. Or whether you buy a good digital camera equipment and get rid of scanning entirely.

CUPS 1.2 finally working

About a week ago, I’ve upgraded CUPS from 1.1 to 1.2 on my print server. I know one should never touch a working CUPS installation, but as Debian 4.0 is based on CUPS 1.2 I’d have to make the upgrade sooner or later anyway.

Of course, after the upgrade my printing stopped working as usually. As this was my second CUPS 1.1 to 1.2 upgrade attempt I already knew about some problems of the upgrade process and could get run at least the CUPS HTTP and IPP interfaces. But the printers worked in weird ways such as printing a single page in several pieces put on separate sheets or stopping to work after finishing a printing job.

To keep the story short, after a week of various efforts I ended up with complete removal of printing software on the server and its reinstallation. Then the CUPS HTTP configuration interfaces started to offer right configuration items and after a few attempts I could get my printing run properly.

I can only hope that after the upcoming Debian 4.0 release Debian slows down its release cycle again, so that I won’t have to suffer all the software upgrade headaches each one or two years… In the meantime, let we software developers think more about impact of the changes we make to our great software.