I posted earlier about my need to res down 60000 x 6000 images to 6000 x 6000. I was thinking about using Pixel Bender, but I came up with a workaround that does most of what I’d do in Pixel Bender, needs no programming, and works in all versions of Photoshop. They key idea is to use the bilinear interpolation capabilities of the Photoshop resize tool to do averaging, and to use repeated applications of that tool.
Rather than perform a one-dimensional averaging function explicitly as I was planning to do in Pixel Bender, I do a set of resizes, all with bilinear interpolation: first to 45562 x 6000, then to 30375 x 6000, then to 20250 x 6000, then to 13500 x 6000, then to 9000 x 6000, then to 6000 x 6000. I recorded a Photoshop action to speed things up and minimize mistakes.
Where do those weird numbers come from? Resizing down to 2/3 of the previous horizontal dimension gives me an image populated in equal parts with values from the original image and averages (thanks to the linear interpolation) of adjacent pixels. Repeating the operation spreads out the averaging.
Maybe the best way to visualize it is to look at an example:
Using linear interpolation also means that there is no averaging in the vertical direction.
Now, with the averaging done better, I’m seeing signal to noise ratios improve by more than a factor of three. Theory says the improvement should be the square root of ten.