Sunday, September 25, 2022

QDFS: now with more functionality

As readers of my blog know, my scripts are biased towards wide angle, deep focus and high dynamic range scenes. That is scenes that require complex image capture bracket sets that benefit from scripting.

Although I have several EOSMs, which run scripts under Magic Lantern, and an EOS R, which doesn't yet run ML, my current photography is directed towards the CHDK cameras I have, and in particular the M3 and EF-M lenses.

The latest release of Quasi Depth of Field Script (QDFS), which may be downloaded from the right, now includes several features that are directed at the landscape photographer. For instance, the script will:

  • Detect if you are using Canon's three image exposure bracketing and you can change Canon setting as the script is running (see below)
  • Allows you to capture an ETTR-based, two image ISO or Tv bracket at a defined Ev relative to the base exposure, to complement the Canon three bracket capability
  • If enabled, the CHDK console will now also display the current exposure's delta Ev, relative to a reference exposure
  • A reference exposure is established at start up and whenever the Canon shutter is pressed in ALT mode
  • Pressing the INFO button toggles through the Canon display settings you have set up (your choice), including showing the screen to change various Canon settings, like the AEB and showing the Canon histogram
  • Pressing MENU button hides the QDFS graphics, ie to create a clean screen as an aid to composing
  • If enabled (Get Mag = Dynamic in the script’s menu), you can recalibrate the DoF scale in realtime. This is best accomplished by setting the focus just short of, but close to, the hyperfocal and just when the Canon upper/lower distances change and pressing SET
  • Pressing the RIGHT button will ETTR the exposure, ie set exposure for the highlights, from where you can tweak the exposure further
  • Pressing the LEFT button will ETTL the exposure, ie set exposure for the shadows, from where you can tweak the exposure further
  • The script show additional information, such the delta exposure (Ev), relative to the reference exposure, thus allowing you to survey the scene by using the ETTR and ETTL buttons
  • Pressing the M-Fn button will capture the requested exposure brackets, after which you can use QDFS to set the next focus, if required.

The following screen captures illustrate the above.

In the above we see a typical script start up view. The focus has been set to the camera's minimum focus, in this case 150mm with the 11-22mm lens, We also see DoF scale shows us where the hyperfocal is (red line), and highlights fractions of the hyperfocal, ie H/2. H/4, ...H/32 and the minimum focus. We also see in the console area at the bottom that the total lens rotation count to (data) infinity is 613 and that we are at 0, ie minimum focus.. The display also shows the Canon reported focus, ie the lower and upper values that Canon is reporting at the current focus. As we are at minimum focus, we are well away from the hyperfocal, ie at H/14.1. Finally, as we haven't yet changed exposure, the delta Ev reading is 0Ev.

In this next screen grab we see focus has been moved to beyond the hyperfocal and that QDFS now displays the infinity defocus blur in microns, 11 microns in this case at about 1.3 x the hyperfocal, as opposed to the focus distance in mm. Although not shown here, toggling the INFO button will allow you to display the Canon histogram.

As we are overexposed, it is a simple matter to press the RIGHT button and let QDFS set an ETTR exposure for the highlights, as below:

Here we see that the exposure is 5Ev from the initial exposure and at this point we press the Canon shutter, to create a reference point:

In the above we see the delta Ev has been zeroed and that the current focus, and DoF, is shown above the QDFS central scale. This reference will remain in place as we refocus, thus allowing us to return to the last focus position, as shown below: 

In the above we see the DoF reporting is red, indicating our current focus position has a focus gap relative to the last image or, in this case, the last referenced focus. We also see that QDFS is reporting we are at 352mm from the sensor plane, whereas the Canon upper and lower reporting is 360 and 400mm. So who is right? Well neither. Canon is giving us a range, where as QDFS appears not to be inside the Canon range, although is very close. For non macro DoF setting we are good enough, remember we are using a thin lens model for a complex lens design that we don’t know; but if you wanted to recalibrate you could, by moving focus until the Canon value just changes and then press the SET button. You can also tell QDFS what distance you wish use for calibration at start up, ie H, H/2 or H/3.

The final thing to show is that we can easily return to our referenced focus (yellow) and then press the LEFT button to set an ETTL exposure:

In the above we see the ETTL exposure is 5Ev away from the ETTR one. With this information we can decide how many exposure brackets we need for the scene, eg can we 'get away' with just two, the ETTR and the ETTL exposures, or do we need additional exposure brackets. 

I hope landscape photographers see the value/power of the script and in future posts I'll provide insight into the QDFS and LBS scripts with real information from the field.

As usual I welcome any feedback on this post or any of my posts.



  1. Very interesting and well explained! Curious about postings from the field. Due to lack of a DSLM I will stay with my DSLR for the moment. A question from a novice: in order to install ML DOFIS & MUSIC on Canon DSLR do I need the magic lantern/lua fix and replace it with ML nightly build or is it sufficient to just send your script files to the SD card with ML nightly build? Thanks a lot for work.

  2. Very interesting and well explained! Keep posting from the field.

  3. I am new to this. How do I get this feature on my EOS M3?

  4. @Aviator you need to first load CHDK then load the QDFS. If you search my blog for QDFS you’ll be able to read about QDFS from the start of its development. It only runs on the M3 ;-)