Wednesday, December 30, 2009

Scanning - and fixing - photos with XSANE

Regular readers know that I've been scanning photos on an HP flatbed printer-scanner-fax. Since I run Linux, I use XSANE, the standard scanning front end software on Linux.

This do a great job of letting me capture photos at whatever resolution I like (typically 150 dpi, but more on that later) and turn them into PNG photos to torture you, dear reader. But it also lets me do all sorts of correction, to turn bad or spoiled shots into good ones.

For example, here's a picture of #2 Son. The exposure barfed when the picture was taken, so the bottom of the photo was terribly over exposed. That's too bad, because he has quite a whimsical expression - which kept me from tossing the pic, but it never made it into the photo albums, either.


XSANE to the rescue! It has a preview pane, where you can select which part of the photo you want scanned. Here you see me grabbing the middle of the picture, turning it from portrait layout to landscape, and cropping the top and bottom of the shot.

Since I'm throwing away around half the picture, I bumped the scanning resolution up a bit (to 200 dpi in this case). This expands the picture, and lets me fill the screen with his whimsical expression.

The finished pic. Yay XSANE!

This is pretty basic stuff, but you can take it to the extreme. Consider a terrible photo of #1 Son, in Brussels:

I blame Brussels (well, the shot is not well composed). But #1 Son has a very interesting expression. Since nothing much else in the shot has any interest at all, let's zoom way, way in:

At 300 dpi it's starting to get grainy, but that's better. Brussels is a lot nicer when you stop looking at it!

One of the most useful things that I've found (and use on maybe 60% of the photos) is the "despeckle" feature, which removes the white spots from lint on the photo or scanner glass bed.

The downside is that it's time consuming, and all of you get subjected to more Borepatch photos. But it gives me a backup to all our photo albums, and I can get prints made by uploading the PNG file to one of the many photo printing services on the Internet.

4 comments:

NotClauswitz said...

It's ok to blame Brussels - I've been there and it's awful and poorly composed itself.

scotaku said...

Scan them at 300 dpi and then reduce the file to 150 dpi. This can help with cleaning up the image. It's one of those "tricks" (not the kind used by climate modelers) that I picked up a hojillion years ago. It works particularly well on scans of those 70s-era textured photographs.

TJP said...

I'm doing a long term project with a bunch of Kodachrome slides, and "despeckle" just isn't cutting it. It destroys edges and highlights, and actually just fattens points of color so that detail is destroyed. It's also of a fixed width, so changing resolution completely alters its effectiveness, since the dust gets bigger too.

The best way to remove dust is using the heal brush in either Photoshop or The GIMP. I thought it was a lot of work, too, until I included the time I spent undo-ing and re-doing despeckle to accommodate the quality of individual pictures. After removing thousands of black specks from 30 to 40 year-old slides, a few dabs with the heal brush on a print is no sweat.

The second tool in my retouching arsenal is the G'MIC plug-in for GIMP, (which is actually a super-plug-in with many features.) You need some CPU power to make it work quickly, but it's worth it because a little anisotropic smoothing does a much better job than a pixel fattener. (I'd attach a retouched sample of one of your photos if I could.) Trust me though, the two tools worked well and it took seconds.

For the other problems, I use a lens distortion plug-in to correct for specific lenses, and a chromatic aberration plug-in to fix color problems in uncorrected glass.

Borepatch said...

Scotaku, that sounds like a great trick. Thanks!

TJP, wow - thanks for the information-rich comment. As you can see from what I've been posting, I'm really just touching up snapshots. However, I'll check out your plugins, because I have some slides (landscapes) that will need more than the quick and dirty I've been using.

And The Gimp is a great tool. Big learning curve, but tons of power.