Archive for April, 2007

Different upsampling options

Wednesday, April 18th, 2007

Upsampling is a bad thing, but sometimes it’s a necessary evil. Why upsample? Well, because not all of us can afford this puppy.

So without further ado — prompted by a post by the highly regarded Dr. B. Kanarek at Pentax Forums — I started exploring the upsampling options available to the k10d owner with access to Photoshop (e.g., me). And then I went a little further into post-processing to improve upon those results, using Photoshop CS2 and a trial version of Genuine Fractals.

To begin: here is a crop (at 100%) from a PEF RAW file, opened in PSCS2 via Adobe Camera Raw. Full frame was 3872×2592. Side note: 3872×2592 is “10.0 MP” — in the sense that there are 10,036,224 pixels in an image of that size — but the actual RGB 16-Bits/Channel “size” is 57.4 MB! An uncropped 10 MP image is almost perfect for 19″x13″ inkjet output @200 ppi. So if you’re printing, say, 8″x10″, you can crop an area that’s 30% of the original size and still not have to upsample (for inkjet; for offset at 8-1/2″x11″ — 300dpi minimum — you couldn’t crop beyond, at most, 85% of the original area).

Note: no sharpening or other corrections have been made to this image outside of ACR, by desing. It’s best to upsample before making other changes, because otherwise anything you do to the image will just become exaggerated when you upsample.

This crop is 504×378 ppi.

Test Original (crop)


Below is the a further crop of the above image upsampled via “Nearest Neighbor” to 800×600 (158% — I’ll get to why I picked that scale later). Nearest Neighbor doesn’t add or create any new color data — think of a tile mosaic using only the same color tiles. That’s why it looks more bitmapped. This isn’t really a usable upsampling technique — but it’s a good control, because it’s essentially what the original, unaffected image looks like at this scale.

Test Upsampled Nearest Neighbor (crop)


Next up is the same crop of the original image (not the NN version) upsampled via Bicubic resampling. Bicubic is the Photoshop default for resampling, for good reason. It’s an all-purpose, versatile algorithm suitable for most images. In this case, it seems a little soft — but obviously, no visible bitmap effect.

Test Upsampled Bicubic Sharper (crop)


Bicubic is nice, but this photo has a lot of hard edges (well, they’re supposed to be hard). We’ll sharpen afterwards, of course, but what if we could sharpen while we upsample? Tah-dah: “Bicubic Sharper” resampling. There’s also a “Bicubic Smoother” option, but we’re going to ignore it for this test, because it’s not what we’re after. The difference is subtle, but it’s there. And remember, we’re only upsampling at a little over 150% — the difference would be greater at larger sizes.

Test Upsampled Bicubic Sharper (crop)


Now comes the reason that I used the scale percentage that I did — ACR can interpolate a 10MP RAW file at a reolution up to 25.3 MP (6144×4133). What does that look like? Frankly, I was disappointed — it’s almost exactly the same as Bicubic Sharper (I thought it would be better). Here it is:

Test Upsampled ACR (crop)


And to step outside the PS box: here’s Genuine Fractals. GF is definitely better at holding edges, but it also tends to smooth out interior detail and can look almost like the “crystallize” filter at extreme scales. In this case, though — best so far.

Test Upsampled GF (crop)


Now, sharpening: to cut to the chase, I’m just going to concentrate on the Bicubic Sharper and Genuine Fractals versions. Here’s Bicubic Sharper, with an Unsharp Mask applied (settings of 270%, radius of .4 pixels and 0 threshhold — thanks Ben)…

Test Upsampled Bicubic Sharper and USM (crop)


And Genuine Fractals with the same Unsharp Mask:

Test Upsampled Genuine Fractals and USM (crop)


Last but not least, hey — CS2 has a new “Smart Sharpen” filter! Applied here to the Bicubic Sharper version (settings: 200%, radius of 1.5 pixels, and “Remove Gaussian Blur” — which was more effective than “Remove Lens Blur”; probably because lens blur is analog in its origins while resampling is, like a gaussian blur, digital).

Test Upsampled Bicubic Sharper and Smart Sharpen (crop)


And finally, the Genuine Fractals upsample with the Smart Sharpen filter (interestingly, both “Remove Lens Blur” and “Remove Gaussian Blur” produced the same results). It’s a little flat, to be sure, but quite sharp despite the upsampling. Which is what this was all about.

Test Upsampled Genuine Fractals and Smart Sharpen (crop)

The point of this little exercise was as a baseline for comparing other techniques (still to come). I welcome your comments!