• 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 / D850 / Sigma 135/1.8 on D850: PDAF accuracy off-axis

Sigma 135/1.8 on D850: PDAF accuracy off-axis

January 10, 2018 JimK 6 Comments

This is a continuation of a series of posts on the Nikon D850.  The series starts here. You should be able to find all the posts about that camera in the Category List on the right sidebar, below the Articles widget. There’s a drop-down menu there that you can use to get to all the posts in this series; just look for “D850”.

Several people have complained that the AF Adjust setting on the D850 that gives the right average correction for an object on the lens axis (in the center of the finder), gives wildly wrong values when the subject is off axis. 

I’ve  spent the last two days reworking my Matlab code for analyzing autofocus errors so that it corrects for, and is thus tolerant of, target/camera misalignments. This has the result of making my on-axis tests quite accurate when it comes to measuring focusing error. 

Let me tell you a bit about how it works. When testing phase detection autofocus (PDAF) systems, I’ve added a step at the beginning where I make 32 contrast detection autofocus (CDAF) exposures at one of the lens-under-test’s best apertures. Then I go ahead and make 10 exposures at each aperture of interest using the PDAF system. I’ve set up the code to present me with a window where I can select the target area (in this case, the ramp of the LensAlign target) with the first CDAF image. I use that target area for all the images. The program measures the focal distance on the ramp for all 32 CDAF images. It throws out any points that are more than one standard deviation away from the mean and averages what’s left. That becomes the definition of zero focusing error. Of course, it’s only valid for the f-stop used for the CDAF images because of focus shift; I thought it would be too confusing — not to mention a PITA to execute — if I computed the zero focus shift point separately for each f-stop. I correct all the PDAF images with the data obtained from the CDAF one.

I do try to keep the lens axis perpendicular to the target, but it’s not critical anymore. 

Here’s the setup that I used for today’s tests:

The LensAlign target is on the tripod in the distance, lit by two Westcott LED panels. The camera is mounted to a stand that allows easy up/down and left/right movement without major changes to the direction of the lens axis. The Nikon remote on the camera stand’s tray is used to minimize vibration. I’m a belt-and-suspenders kind of guy, so I use a 1-second shutter delay, too.

With the target in the center of the image, here are the results for the Adobe RGB green channel:

Positive numbers for the vertical axis indicate backfocusing, and there is a bit of it; I haven’t tried to tune this lens yet, and the AF Adjust setting is zero.

For all three color channels:

All three color channels focus in about the same place at all apertures tested; this lens has low longitudinal chromatic aberration (LoCA). 

Now using the lower left PDAF focusing point:

The focal plane has moved back dramatically. This is not the result of field curvature; we are focusing and measuring at the same place in the image, and the PDAF shift is measured from the CDAF analysis. 

All the color channels:

Not much more to be learned from that, huh?

Next, I’ll do a similar test using a Nikon lens, probably the 105/4E.

D850

← a7SII star-eater workaround Nikon 105/1.4 on D850: PDAF accuracy off-axis →

Comments

  1. Andre Y says

    January 10, 2018 at 3:21 pm

    Very interesting results Jim! It sounds like you’re using the ramp instead of the focus plate for the input to the focus measure function?

    I don’t know how focus measure functions work, but does it tell you how far out of focus something is? I know you have to calibrate it (with the CDAF images?) but after that, does it spit out a number you can automatically convert into a focusing distance?

    Reply
    • JimK says

      January 10, 2018 at 5:21 pm

      If the target is perfectly aligned, then the middle of the ramp — and the CDAF pruned mean — produce the same number except for a LoCA-induced difference. But if the target is misaligned, that’s no longer true. It’s hard to keep the target alignment perfect when the target is off-axis, so I came up with this tweak. There is a way to make the focus measures tell me how far out of focus something is, but it’s not in any calibrated way, and I’m ignoring it. I get focus distance by seeing what part of the ramp is the sharpest.

      Reply
  2. Frans van den Bergh says

    January 10, 2018 at 10:23 pm

    Hi Jim,

    I understand that you take 32 CDAF samples to estimate your “true zero” on the focus distance scale. I am rather curious about the following statistics / parameters:
    1. What is the size of the ROI containing the scale (width/height in pixels)?
    2. What is the standard deviation of the focus distance (in mm) of those 32 CDAF shots?
    3. Lastly, how repeatable is FocusTune in its estimation of focus distance? If you choose a manual focus setting (say, close to zero on the scale), what is the standard deviation (and max-min) of FocusTune’s focus distance estimate over 10 repeated image captures at the chosen manual focus setting?

    -Frans

    Reply
    • JimK says

      January 11, 2018 at 8:27 am

      ——————–unpruned mu px————pruned mu px————–sigma px
      LL——————-124.332——————-124.056——————2.978
      Center—————127.152——————-125.785——————3.824

      ——————ROI rows——-ROI cols
      LL—————-918.000——–159.000
      Center————881.000——–286.000

      ——–unpruned mu mm—-pruned mu mm——- sigma mm——correction mm
      LL———-30.961———30.892————–0.742———0.069
      Center——32.993———32.638————–0.992———0.355

      I’m calling the operation that throws out the samples that are greater than one sigma from the mean (mu), pruning. The correction is the difference between the pruned mu and the unpruned mu.

      Does that help?

      I’m not using FocusTune anymore. I am using the code that I wrote that replicates some of that function, and does other stuff besides.

      Reply
      • Frans van den Bergh says

        January 12, 2018 at 12:46 am

        Yes, thanks, that helps!

        Your standard deviation on the focus distance (~0.75 mm to 1 mm) looks fairly good for such a small ROI. (although that standard deviation includes the repeatability of CDAF)

        What are you using to find the sharpness peak? Tenegrad?

        Reply
        • JimK says

          January 12, 2018 at 6:54 am

          What are you using to find the sharpness peak?

          This:

          https://www.mathworks.com/matlabcentral/fileexchange/27314-focus-measure?focused=8113992&tab=function&s_tid=gn_loc_drop

          with ‘BREN’.

          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

  • 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.