Re: Scanning and interpolation

Nick Lamb (njl98r@ecs.soton.ac.uk)
Fri, 23 Apr 1999 09:28:45 +0100 (BST)

On Fri, 23 Apr 1999, Ole W. Saastad wrote:

> I have played some time with scanning software (AGFA and HP) and
> especially tested the best way of scanning, 100, 200, 300 dpi, and
> 1200 dpi (interpolated). The file size differ a lot but they are reduced
> afterwards to equal with jpg compression. Apparently it looks like the
> interpolation routines (HP) do a good job. It looks like the picture
> scanned with 1200 dpi have higher resolution than the one scanned with
> only 300 dpi, which is the optical resolution of the scanner.
> The best result is obtained by scanning in 1200 dpi and reducing the
> file with jpg compression, even though I had expected scanning in 300
> dpi to as good as 1200 dpi.

Huh? The best result was a damaged low resolution version of an interpolated
image? I think your idea of "best" is very different from mine.

If you compare your images to a magnified view of the original image you
should see that the 300 dpi SANE image (before JPEG compression) is more
faithful than the others. You'll also see that the artificially added
smoothing in the interpolated image, while pleasing to the eye, doesn't
even slightly resemble the real image detail.

> SANE does no interpolation and will only deliver the optical resolution
> of the scanner. Is the apparent enhancement of the picture only an
> illusion?

(1) Yes. (2) No. The image you scanned was so bad, that it was improved
by being blurred and smoothed, and having sharp constrasts removed.

> It seems that the resolution is higher also when blowing the picture up
> to see each individual pixel. Even if the illusion is only apparent to the
> eye it could in many cases make the pictures look better.

> It might be a good idea to introduce interpolation into SANE ? Is the
> algorithms behind this free ? Or are these routines known for all ?
> How is the interpolation done ? Close to the hardware or on the picture
> after scanning ? E.g. could it be done in GIMP ? - Or must it be a driver
> routine ?

I'd be happy to see a backend-frontend design which interposed between
the hardware driver and the SANE GUI to give users a smoothly interpolated
version of their photo. Of course, if you want this done properly it
should be done in a good image editing package, like GIMP. I certainly
DON'T want to see interpolation done "seamlessly" in the drivers or in
the scanimage applications, because this process gives very poor quality.

In the HP ScanJet IIcx here the interpolation is done in hardware. Since
you don't see interpolation in SANE, I'm forced to conclude that your
scanner doesn't do hardware interpolation, which is probably for the best.

AFAIK The routines normally used in scanner hardware/ software are very
very simple. There is probably some advantage to knowing about the optics
and A2D convertor in detail, but I doubt that sort of information is even
used. If you really want higher resolution, there's no alternative but
to buy a better scanner.

Nick.

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com