• site home
  • blog home
  • galleries
  • contact
  • underwater
  • the bleeding edge

the last word

Photography meets digital computer technology. Photography wins -- most of the time.

You are here: Home / The Last Word / Noise effects of Photoshop bilinear interpolation downsizing

Noise effects of Photoshop bilinear interpolation downsizing

September 22, 2014 JimK 2 Comments

When I last left you, the jury was out on the issue of whether the bilinear interpolation downsizing algorithm in Photoshop was the same as the one in Matlab. The jury is back.

“Mr. Foreman, have the jury reached a verdict?”

“We have, your honor.”

“May I hear it?”

“The algorithms are wildly different, as indicated by the spectra and rms value of downsampled noise images.”

“I thank and excuse you all.”

Here’s a graph that says a lot (the noise was measured in a space with the same nonlinearity as it the one in which it was originally generated):

rmsnoisePsbilinearGraph

There’s good news; below 50%, the noise is pretty much in line with where photographic equivalency says it should be. At ratios near 100%, there’s less noise than we’d think, and at numbers between 50.1%  and about 75%, there’s more noise than we’d think.

There is a discontinuity in the curve at 50%. I’ve plotted noise measurements for 49.9%, 50%, and 50.1% magnification. 50% and 49.9% are just about on top of one another, but 50.1% is substantially noisier.

We can learn something by looking at the spectra of some of the images.

There’s quite a bit of high frequency rolloff at 95% magnification:

BiL95pct

Less at 90%:

BiL90pct

Less at 80%:

BiL80pct

Hardly any at 70%:

BiL70pct

And flat at 50%:

BiL50pct

The curves stay flat below that.

From the rms noise and spectral curves, it appears that neither Matlab nor Photoshop are just picking the four points in the input image nearest to the required point in the output image, Matlab seems to do that if power-of-two reduction ratios aren’t used, but also seems to ignore points in the input image that are right over points in the output image. If they didn’t, for reduction ratios that consisted entirely of those points, there would be no noise reduction at all.

What’s Photoshop doing? Anybody who knows, please sing out.  I’m sure they’re not lying when they say they are using bilinear interpolation, but, from the low noise at high reduction ratios, they’re using a lot more than four points at those ratios.

Next up: Photoshop’s Bicubic Sharper.

The Last Word

← Photoshop Gaussian noise spectrum Noise effects of Photoshop Bicubic Sharper downsizing →

Comments

  1. Edward says

    September 22, 2014 at 7:26 pm

    The trouble with regarding pixels as points rather than rectangles, and considering only the four source points nearest to the destination point, is that it throws away a lot of information. At a scale of 0.2 you’re discarding 21 pixels worth of information, averaging the values of just four pixels, which limits the amount of noise reduction that can occur.

    The other interpretation of bilinear scaling is of a 1×1 pixel window moving across the original image, calculating the average of the four rectangular pixels it partially covers, weighted by the area of each pixel that it covers, sampled at the centre of each pixel in the new image.

    In order to avoid throwing away data, you could modify the algorithm for down-scaling by increasing the size of that window to the size of the pixels in the new image and calculating the weighted average of all the original image pixels it wholly or partially covers.

    The alternative would be to apply a blur function to the original image, with the radius linked to the scaling factor, ensuring that when you proceed with standard bilinear scaling, the four source pixels you base your new pixel value on are already partially averaged with the pixels around them.

    I suspect PS is using one of those approaches. Either one should reduce the noise in line with what photographic equivalency suggests.

    I’m not proficient in Matlab, but I’d expect these approaches to be pretty simple to implement – the big question would be, in the second version, exactly what blur function to use, and what parameters to use for a given scaling factor.

    Reply
    • Jim says

      September 22, 2014 at 9:29 pm

      That makes sense.

      I’ve already done some downscaling work in Matlab using pre-blur (AA) filters. Look back a couple of posts. It would be useful to know exactly how Ps does this (if indeed this is what it does) with bilinear and bicubic sharper, so I could implement the same algorithms in Malab. Trying to reverse engineer it might take a long time, and I could still be wrong.

      As to the simplicity of implementation of the above approach, it should be pretty easy; imresize allows user-supplied kernels.

      If the window size is increased, I’d need the details of that to code up a Matlab implementation that worked the same way.

      Jim

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

May 2025
S M T W T F S
 123
45678910
11121314151617
18192021222324
25262728293031
« Apr    

Articles

  • About
    • Patents and papers about color
    • Who am I?
  • How to…
    • Backing up photographic images
    • How to change email providers
    • How to shoot slanted edge images for me
  • Lens screening testing
    • Equipment and Software
    • Examples
      • Bad and OK 200-600 at 600
      • Excellent 180-400 zoom
      • Fair 14-30mm zoom
      • Good 100-200 mm MF zoom
      • Good 100-400 zoom
      • Good 100mm lens on P1 P45+
      • Good 120mm MF lens
      • Good 18mm FF lens
      • Good 24-105 mm FF lens
      • Good 24-70 FF zoom
      • Good 35 mm FF lens
      • Good 35-70 MF lens
      • Good 60 mm lens on IQ3-100
      • Good 63 mm MF lens
      • Good 65 mm FF lens
      • Good 85 mm FF lens
      • Good and bad 25mm FF lenses
      • Good zoom at 24 mm
      • Marginal 18mm lens
      • Marginal 35mm FF lens
      • Mildly problematic 55 mm FF lens
      • OK 16-35mm zoom
      • OK 60mm lens on P1 P45+
      • OK Sony 600mm f/4
      • Pretty good 16-35 FF zoom
      • Pretty good 90mm FF lens
      • Problematic 400 mm FF lens
      • Tilted 20 mm f/1.8 FF lens
      • Tilted 30 mm MF lens
      • Tilted 50 mm FF lens
      • Two 15mm FF lenses
    • Found a problem – now what?
    • Goals for this test
    • Minimum target distances
      • MFT
      • APS-C
      • Full frame
      • Small medium format
    • Printable Siemens Star targets
    • Target size on sensor
      • MFT
      • APS-C
      • Full frame
      • Small medium format
    • Test instructions — postproduction
    • Test instructions — reading the images
    • Test instructions – capture
    • Theory of the test
    • What’s wrong with conventional lens screening?
  • Previsualization heresy
  • Privacy Policy
  • Recommended photographic web sites
  • Using in-camera histograms for ETTR
    • Acknowledgments
    • Why ETTR?
    • Normal in-camera histograms
    • Image processing for in-camera histograms
    • Making the in-camera histogram closely represent the raw histogram
    • Shortcuts to UniWB
    • Preparing for monitor-based UniWB
    • A one-step UniWB procedure
    • The math behind the one-step method
    • Iteration using Newton’s Method

Category List

Recent Comments

  • bob lozano on The 16-Bit Fallacy: Why More Isn’t Always Better in Medium Format Cameras
  • JimK on Goldilocks and the three flashes
  • DC Wedding Photographer on Goldilocks and the three flashes
  • Wedding Photographer in DC on The 16-Bit Fallacy: Why More Isn’t Always Better in Medium Format Cameras
  • JimK on Fujifilm GFX 100S II precision
  • Renjie Zhu on Fujifilm GFX 100S II precision
  • JimK on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • Ivo de Man on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • JimK on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • JimK on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF

Archives

Copyright © 2025 · Daily Dish Pro On Genesis Framework · WordPress · Log in

Unless otherwise noted, all images copyright Jim Kasson.