Bringing Dual Pixel Raw to Reikan FoCal

With the introduction of the EOS 5D Mark IV, Canon opened up some new possibilities for image processing with the introduction of Dual Pixel Raw files.  Following on from our previous post on the subject, we’ve been investigating how these files can help with autofocus calibration and general camera analysis.  The answer is… quite a lot!

Dual Pixel Raw with Reikan FoCal
Image © Canon Europe. Dual Pixel Sensor Structure.

A brief introduction

Canon introduced the first Dual Pixel sensor in the EOS 70D camera to bring an unprecedented autofocus system to the live view capability of this camera.  By cutting each pixel in half and having the halves look in slightly different directions, the camera can determine how to quickly and accurately focus at almost any point on the sensor.

The Dual Pixel system has been used on the sensors of the 7D Mark II, 80D, 1D X Mark II and now the 5D Mark IV.  However, up until this most recent camera the dual-pixel magic was kept solely inside the camera.

With the addition of Dual Pixel Raw capability, Canon now allows the information from both halves of these pixels to be saved in the image files.  Canon themselves have demonstrated a few tricks that can be performed with this extra information within their DPP software – micro refocusing of images, shifting of bokeh and reduction of ghosting.

How can FoCal use this information?

The Dual Pixel Raw files contain all the information necessary to determine the focus position at any point on the sensor.  Not only can we find out how far from “perfect focus” any point is, but we can also find out which direction the focus is shifted in – front or back.  All this information from a single image file!

We can use this information to improve confidence in microadjustment calibration results, to figure out calibration values from the AF Consistency test, and to determine focus shift in the Aperture Sharpness test.  There’s more details below…

Fully Auto Calibration

The fully automatic test can use the dual-pixel information to determine the correct AF Microadjustment.  This can be used in tandem with the “normal” FoCal analysis results in order to confirm validity of the suggested value.

Here’s an example – the pink area shows the result of the dual-pixel analysis, and the black line is the result of the FoCal analysis.  They are both very close here (less than 1 AF Microadjustment until apart) so we can be very confident of the calibration result:

Dual Pixel Raw - AF Microadjustment Calibration with Reikan FoCal
image-14633
Dual Pixel Raw – AF Microadjustment Calibration with Reikan FoCal

The Front/Back Focus chart (Chart 7) shows how the AF Microadjustment shifts across the range.  When enabled, this chart is entirely constructed from the dual-pixel information:

Dual Pixel Raw - Back/Front Focus in Fully Auto Calibration with Reikan FoCal
image-14634
Dual Pixel Raw – Back/Front Focus in Fully Auto Calibration with Reikan FoCal

Autofocus Consistency

Things get a little more interesting with the AF Consistency test.  Running with Dual Pixel Raw files, we can measure the shift to perfect focus for each image… which means we can tell how calibrated the camera is from this test alone!

Here’s an example of a well calibrated run:

Dual Pixel Raw - AF Consistency with Reikan FoCal
image-14635
Dual Pixel Raw – AF Consistency with Reikan FoCal

And looking at the Absolute Focus Error chart (Chart 4), we can see that the measured focus offset (determined from the dual-pixel data) is very close to perfect.  “Perfect focus” has a value of 0 and is indicated with the blue line, and the red line indicates our result which is very close to 0.

Focus Error using Dual Pixel Raw with Reikan FoCal
image-14636
Small Focus Error using Dual Pixel Raw with Reikan FoCal

Take a look at the Test Results panel too – there’s a new “DPR Suggested AFMA” value, which indicates “-2 (Calibrated)”.  This says that the recommended AF Microadjustment calculated from the dual-pixel data is -2, and the camera is currently set very close to this value so can be considered calibrated.

Taking a poorly calibrated example (the camera AF Microadjustment was set to +20 and the test run again):

Large Focus Error using Dual Pixel Raw with Reikan FoCal
image-14637
Large Focus Error using Dual Pixel Raw with Reikan FoCal

It’s clear to see that the results are far from the blue line – all the way up around +23 (yes, this value can go above +/- 20 as it’s showing an offset rather than an actual calibration value).  This means that the perfect focus is around 23 AF Microadjustment steps away from the current value set on the camera… or an absolute value of -3 as suggested in the “DPR Suggested AFMA” result line.  The current value is producing a large back-focus (the text is actually the wrong way round in the window!)

So, with Dual Pixel Raw files, we can run an AF Consistency test and get an AF Microadjustment calibration value!

Aperture Sharpness

Again, dual-pixel data can give extra insight into lens performance when running the Aperture Sharpness test.

Here’s a fairly well focused Aperture Sharpness test on the Canon EF 40mm f/2.8 STM lens:

Dual Pixel Raw - Aperture Sharpness with Reikan FoCal
image-14638
Dual Pixel Raw – Aperture Sharpness with Reikan FoCal

All good – this is a fairly normal profile showing a decent lens.  The sharpness doesn’t change much from wide open until diffraction starts affecting the image.  But that’s not the whole story…

Take a look at the “DPR Focus Shift” chart:

Dual Pixel Raw - Focus Shift in Aperture Sharpness with Reikan FoCal
image-14639
Dual Pixel Raw – Focus Shift in Aperture Sharpness with Reikan FoCal

Here, we can see a couple of interesting things.  

Firstly, what appeared to be “perfect focus” when we started the test is actually 1 AF Microadjustment until away (this is the value of the red line at f/2.8).

Secondly, there’s a pretty large focus shift.  Remember, the Aperture Sharpness test does not change the focus of the lens.  What we’re seeing here is a consequence of the lens design – as the aperture stops down from f/2.8 through to f/4, the focus point of the lens shifts almost 4 AF Microadjustment points away, then starts to return.

What this focus shift means in reality is that if you manually focused the lens at f/4, you’d get a sharper picture than if you used autofocus (this is because normal camera autofocus operates with the lens wide open).

When will Dual Pixel Raw be available in FoCal?

Most of the implementation is done for handling Dual Pixel Raw files.  All the necessary conversion and analysis processing is finished, and FoCal has been optimised to handle the Dual Pixel Raw files as fast as possible.  However, there’s a bit of tidying needed and testing to make sure things are robust and work in all situations (especially that nothing is broken for non 5D Mark IV users!)

We want to get this functionality out quickly, but there are some other important updates that we need to get into FoCal too.  We will get it to you as soon as possible though!

8 comments on “Bringing Dual Pixel Raw to Reikan FoCal

  • Great feature, I just prolonged my update license to get the 5D mark 4 support. This will greatly enhance the focus tuning experience.

    Reply
  • Glad to hear that you’re having success utilizing Canon’s Dual Pixel capabilities to assist with micro adjustment calibration.

    I attended a preview of the 5D IV at Canon’s facility in Southern California and asked one of the product specialists about the possibility of the camera’s two focusing systems “talking” with each other to assist with micro adjustment.

    After a brief pause and some thought the Rep agreed that might be possible.

    Your tests and data show that possibility is very real. I’m looking forward to the inclusion of this feature with great anticipation.

    Reply
    • Henrik Olsen says:

      @Reed Given PDAF issues using previous Canon gear (latest being 7D II and 5D III), I would looove to see the two techs talk together (on-sensor dual pixel AF and traditional PDAF). Of course the traditionel PDAF (mirror down) should be able to calibrate itself based on dual pixel info, and it should do so in a much more thorough matter than available manually through current AFMA. It should be individually for all focus points and different distances (I’ve been through too much inconsistency here to know real issues exists, although Canon, CPS and reps often say otherwise). A simple multidimensional lookup table/matrix with AFMA for different combinations should be obvious. It could even determine correction trends on-the-fly, by comparing actual acquired focus through mirror-down PDAF with dual pixel focus analysis (post capture) – spotting repeated trends per focus point (e.g. compensating titled planes), focal distance, lens, focal length and aperture (breathing). I hope Canon surely have thought of these potentials. Come on, Canon. Take this great opportunity and make it happen, please. Should even be possible as a firmwareupgrade.

      @Reikan Have you noticed better traditional PDAF consistency (mirror down) with the Mark IV than with the Mark III (including across different focal points)? Would be interesting to see some stats between bodies and lenses, how much needed AFMA variance there is across focal points.

      Reply
  • That is fantastic news – you guys are really going above and beyond. Can’t wait to give that a try once it is released!

    Reply
    • Hi Bernard,

      Thank you for your interest in FoCal.

      It’s still somewhat early days as we investigate what might be possible and how well it might work for 5D Mark IV users. When it makes it in to a release and whether that includes both Plus and Pro are all things yet to determine 🙂

      Best Regards,
      Dave

      Reply
      • So this feature won’t happen within..maybe 3 weeks? So I could just calibrate my stuff now with the old method instead of waiting?

        Reply
        • Hi Peter,

          3 weeks from now is possible, it will be in the next release but it’s likely for the introduction it won’t replace the normal calibration routines but rather add to the information presented. Time line is uncertain at the moment but within 3-4 weeks is our current aim with the plan that future releases will build on what’s possible.

          Best Regards,
          Dave

          Reply

Leave a Reply

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