• 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 / Blur circle size estimation by encircled energy

Blur circle size estimation by encircled energy

May 8, 2019 JimK 22 Comments

This is a continuation of a series of posts about blur management for landscape photography. The series starts here.

In the last post, I looked at blur circle profiles that resulted from a mixture of diffraction, pixel aperture, and defocus, and compared those profiles to the blur circle limits that I had derived from approximations. In this post, I’d like to add precision to the comparison by plotting the encircled energy as a function of distance from the center of the blur circles.

Let’s look at one such graph:

 

This is similar to what you saw yesterday, but I’ve only plotted the right half of the profile. We don’t lose any information by doing that, since the profiles are symmetric about their centers. The modeled aperture is f/8. What you’re looking at above is a cross-section of the blurs from each source. The yellow spike near the y-axis is the defocus blur, and in this case there’s none of that since the subject is perfectly in focus. The magenta box is the blur from the pixel aperture, which is assumed to be a pillbox with a diameter of the pixel pitch times the square root of the fill factor. The red curve is that of the diffraction. I convolved all three to get the blue curve, which is the combined effect of all three modeled blurs. And finally, the vertical line represents the limits of the blur circles that I’ve been showing you, using something called EED70 for the Airy disk diameter. The blur circle limits cross the convolved solution at about a quarter of the peak value.

There’s a new curve in the above graph. It’s green, and it’s the amount of energy that is encircled as you get further away from the center of the blur circle. It crosses the limit line at about 70%.

Here’s the same setup with the camera focused at 1000 meters:

Again, the encircled energy line crosses the limit line at about 75%.

One more, with the lens focused at 8 meters, so that defocus dominates.

Crosses at about 85%.

What’s a good encircled energy to use for the DOF optimizer? It doesn’t make any difference to the optimal f-stops and focused distances that are found. I’m not uncomfortable with the way these graphs look. In the limit as the image becomes progressively more unfocused, the limits I’m using will converge to the normal CoC diameters.

As a check, I did a run with the focal point and the subject at 30 m (which provides no defocus blur), and the fill factor set to 0.00001% (which provides no sampling blur):

Now all we have is diffraction, and this curve is substantially the same as the one in this document.

I can make it even closer by increasing the range of distances, but that’s good enough.

 

The Last Word

← Real and approximated blur profiles Stepping back from a forum →

Comments

  1. Brandon Dube says

    May 8, 2019 at 6:53 pm

    How do you calculate EE? I’ve found the naive method to be garbage unless you’re ridiculously oversampled, and Baliga and Cohn’s way is not all that reliable either, +/- 2% at best, and it “turns around” and heads for zero after a large enough radius.

    Reply
    • JimK says

      May 8, 2019 at 8:20 pm

      I’m just progressively integrating as the radius increases.

      runningSum = 1.0;
      result = ones(originRow+1,1); %assigns 1 to center
      for r = originRow+1:nRows
      runningSum = runningSum + 2 * pi * (r – originRow) * profile(r);
      result(r – originRow + 1) = runningSum;
      end

      I’m sampling at 100 nm spacing.

      Note the earlier graphs I posted were wrong. Sorry.

      Reply
      • Brandon Dube says

        May 8, 2019 at 8:54 pm

        Well, that’s about Q=50, which I would say is (super) ridiculously oversampled.

        Are you sure the results are good? For the in-focus case, the airy radius is 5.4 microns, at which point you would expect 83.8% encircled energy from just diffraction. The blur is larger with other factors, so we should expect less EE, maybe something like 60% even. Your plot looks to be around 90% or so, which would be the case for the second zero of the airy pattern (90.9%, anyway).

        I can send you the analytic form for the EE of the airy pattern if you want to do some investigation of (technique) vs truth. I suspect you have a domain-not-large-enough problem.

        Reply
        • JimK says

          May 8, 2019 at 9:13 pm

          I’d be happy to see the analytic form. I see what you mean about the domain size. I’ll look at that in the morning.

          Thanks.

          Reply
          • Brandon Dube says

            May 9, 2019 at 9:21 am

            Sure — the equation is 1 – J0^2(r) – J1^2(r), where J0 and J1 are bessel functions.

            I emailed you a plot I made with prysm – it has a curve for just the airy disk, numerically derived using Baliga and Cohn’s method, and for the AD convolved with a pixel aperture equal to 5.3*.76 um in diameter, calculated the same way. You should expect wiggles in the EE, related to the zeros of the airy disk. It seems the pixel aperture serves to wash those away, which makes intuitive sense since the rings will blur into the ‘valleys’ so to speak.

            Reply
        • JimK says

          May 9, 2019 at 8:37 am

          I found an error in the EE calculation. Now it’s:

          runningSum = 0.0;
          result = zeros(originRow+1,1);
          for r = originRow:nRows
          runningSum = runningSum + …
          pi * ((r + 1 – originRow)^2 – (r – originRow)^2) * profile(r);
          result(r – originRow + 1) = runningSum;
          end

          I revised the graphs and added a diffraction-only graph to the post as a check . It looks pretty much the same as the plot that I found in a set of Cal Tech lecture notes:

          http://web.ipac.caltech.edu/staff/fmasci/home/astro_refs/PSFtheory.pdf

          Thanks for all your help.

          Reply
          • JimK says

            May 9, 2019 at 10:10 am

            Even better: trapezoids instead of rectangles for the integration:

            runningSum = 0.0;
            result = zeros(originRow+1,1);
            for r = originRow:nRows
            runningSum = runningSum + …
            pi * ((r + 1 – originRow)^2 – (r – originRow)^2) * …
            ((profile(r) + profile(min(r+1,nRows))) / 2.0);
            result(r – originRow + 1) = runningSum;
            end

            Reply
  2. Jack Hogan says

    May 9, 2019 at 12:16 am

    Hi Jim,

    Defocus disk diameter = 8NW20. Based on your 1000m plot above, at f/8 that would mean that W20 is 16/64=0.25um about 1/2 lambda. Take a look at the 1/2 lambda PSF in Figure 2 below: not quite a top hat

    https://www.strollswithmydog.com/simple-model-for-sharpness-in-digital-cameras-spherical-aberration/

    Reply
    • Brandon Dube says

      May 9, 2019 at 9:24 am

      8 fno squared, not 8 fno. The correct notation is W020, not W20.

      Reply
      • Jack Hogan says

        May 9, 2019 at 2:20 pm

        No, the diameter of the geometrical defocus disk is 8N*W20, do your homework before speaking out of your derriere.

        As for W20 vs W020 see H.H.Hopkins – and whatever.

        Reply
  3. Ilya Zakharevich says

    September 24, 2019 at 1:31 am

    Well, it LOOKS so much wrong that I do not even know where to start…

    First of all, are you assuming a coherent source, or a non-coherent one? Are you assuming a “point” source, or a “linear” source? It looks like you are taking different assumption in different sections of your calculations…

    For example, for a point source defocus would give √(r²-x²) instead of a pillbox…

    > “I convolved all three to get the blue curve, which is the combined effect of all three modeled blurs.”

    Nope, taking convolution is not a correct way to combine the defects. (I’m not fully woken — maybe it IS correct for a non-coherent source? Definitely not for a coherent one…)

    Reply
    • JimK says

      September 24, 2019 at 5:54 am

      Incoherent source. I don’t generally photograph coherent sources.

      Reply
      • Ilya Zakharevich says

        September 24, 2019 at 8:57 pm

        How do you know? Coherence has a measure: coherence length. For example, look at two possible paths through a defocused lens. Say that the optical paths differ by 1µm. Would these rays create an interference pattern, or would they de-phase enough to “not interfere”?

        Myself, I’m very fuzzy about the order of magnitude of coherence length from natural sources. I could not find a source I can trust…

        Reply
    • JimK says

      September 24, 2019 at 5:56 am

      These are for point spread functions.

      Reply
      • Ilya Zakharevich says

        September 24, 2019 at 10:07 pm

        Then, as I said, the “base curve” for defocus is wrong. (It cannot be the same as for the square sensel, right?)

        Reply
        • JimK says

          September 25, 2019 at 8:53 am

          It is approximately the same, since there is falloff on microlens coverage in the corners.

          Reply
          • Ilya Zakharevich says

            September 25, 2019 at 11:34 pm

            Well, then *both* need to be fixed…

            Reply
            • JimK says

              September 26, 2019 at 5:38 am

              Please construct a model the way you think is right, test it, post the results, and then come back here and post a link to that post in these comments.

              Reply
              • Ilya Zakharevich says

                September 26, 2019 at 5:12 pm

                Got your point! Sorry, Jim, if this came up as patronizing!

                Let me retry: ”**In a perfect world,** *both* would need to be fixed…” 😉

                ======================

                (BTW: I did. Many years ago. But you have the same ability to google for it as I. — I do not remember were/how I published it. Probably on Google Groups???)

                Reply
                • Ilya Zakharevich says

                  September 26, 2019 at 5:18 pm

                  And: my model ALSO did not take into account finiteness of the length of coherence (even NOW, after a decade or two, I do not know how to do it!). And, definitely — and obviously, it was not as nicely written as what you do!

                  Finally: this looks just a proper place to remind how much I appreciate all that you do! (THIS is the main reason for my : when I see that tiny changes may improve it, I want to point it out. The purpose is absolutely not to annoy you! Sorry again!)

                • Ilya Zakharevich says

                  September 27, 2019 at 9:23 pm

                  Oups, it looks like your posting software does not allow ⟨less-than⟩ and ⟨greater-than⟩ marks! The unclear place in the preceding post should look like:

                     “THIS is the main reason for my ⟨pedantic mode/⟩: when I …”

                • JimK says

                  September 28, 2019 at 6:20 am

                  It allows html. That’s a side effect.

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

  • 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
  • Ivo de Man 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.