Tuesday, May 30, 2017

Focus Stacking using the Focus Bar

In previous posts I introduced the focus bar, which is a Magic Lantern add-on via a Lua script.

This post is all about a new feature that helps with manual (sic) focus stacking.

Landscape focus stacking is more complicated than ‘simple’ macro focus stacking, where the near and far depths of field are very small, eg of the order of a millimetre, and symmetric about the plane of focus.

In landscape focus stacking we need to keep track of the near and far depths of field, which are not symmetric about the plane of focus, and that vary with focus, focal length and aperture.

Assuming you have the focus bar script up and running (download FOCUS on the right), you will have a new tool to do manual landscape focus stacking. Before discussing the workflow, it is worth a reminder on how the focus bar works, which for this post is put into Depth of Field mode, option -1. Also the focus bar diffraction is set to OFF and the ML diffraction set to ON, which maximises the amount of information that is presented on the Live View screen.

With the above setting you should see this:


Where: ODoFN is the optical only near DoF distance, ie zero diffraction is assumed (the blur used is that set in the ML setting); ODoFF is the optical only far DoF distance; TDoFN (left green dot) is the total near DoF with diffraction accounted for; TDoFF (right green dot) is the total far DoF with diffraction accounted for; and FP (red dot) is the focus plane (point). The ODOF distances are shown on the focus bar and the TDOF distances are shown at the bottom of the LV screen, just above the focus plane distance (assuming you have set Diffraction aware in the ML menu. Thus, with the focus bar set up this way, you have all the info you require to make informed decisions about your focus.

Note you can set the ML and focus bar DoFs independently according to your preferences. The useful combinations being:

  • ML = diffraction aware : Focus bar = diffraction off
  • ML = simple : Focus bar = diffraction on [My preference]
Because the focus bar is in its DoF mode, the grey shows the focus field. Black indicates where the (total) focus blur is equal to the ML set total blur (ie CoC) criterion, eg, say, 30 microns on a full frame (or whatever blur total you have set; remembering that total blurs should fall between, say, 30 (OK for on screen) and around half that (say 15 for quality printing), according to your final presentation needs. White indicates a blur of zero, which can only occur at the plane of focus and with zero diffraction.

Now we understand what we are looking at, let’s look at the generic situation, ie before we look at the workflow landscape focus stacking.

The focus stacking info is available once you take an image. As you capture an image the focus bar script registers the total near and far DoFs for that image. These reference DoFs are then used as you refocus to show the amount of focus overlap between the last image taken and any refocusing you are doing. The following chart (FB = diffraction OFF and ML = Diffraction aware) is illustrative:


The middle focus bar shows the status of the bar when the last image was captured. The focus bar at the top illustrates what you will see if you refocus towards the macro end; and the focus bar at the bottom illustrates what you will see if you refocus towards the infinity end.

In both cases the magenta area shows the focus overlap, ie the overlap between the total DoFs of the last image captured and the focus state you are in. The magenta area dynamically changes as you refocus, giving you full feedback on the focus overlap state relative to the last captured image.

One thing to note is that, as you refocus, you will observe that EOS lenses (Canon or not) do not have infinitely varying focus, ie they tend to refocus in steps, ie as you rotate the lens focus ring. Plus these steps vary across the focus range of the lens. Thus you will need to ‘play around’ with focus to ensure you have a suitable magenta area. Too much magenta means you are ‘wasting’ focus (see above), ie overlapping too much; no magenta showing means you have zero or less overlap.

In the illustration above, it is clear to see that the we have too much overlap, ie we are wasting focus; as, in a perfect world, the TDoFs (last to current) should be ‘just’ overlapping. But you will not see this condition very often, because of the lens-focus control. Thus you should be aiming for something like this, ie with the smallest magenta area relative to the green dots, ie the total DoF deltas:


The magenta between the total DoF (green dots) and the end of the focus bar, simply shows the difference between the current optical-only DoF, relative to the last image captured total DoF, ie with diffraction. Note this changes if you set the focus bar to show diffraction corrected focus field. Then things would look like this (which is what I personally prefer):



Whether you have the focus bar showing the optical focus field or the total, is a personal choice. For most, once you have played around with the optical presentation, you will likely switch the focus bar to showing the total DoFs, as these are the ones you are interested in. But note, in doing this, we are duplicating the information on the LV, ie the focus bar DoFs are the same as the ML DoFs; unless you switch these around ;-)

[Note at the time of posting the ML DoFs are ‘broken’; however, as the FOCUS script is now independent of ML calculated DoF info, the ML ‘problem’ can be ignored. The ML focus menus are still OK to use, ie to set DoFs to ‘simple’ or ‘diffraction aware’, ie FOCUS uses these menus.]

Now we understand how the focus overlap feedback works, let’s see it in action in a landscape still, photography example. As stated above, let’s assume we are on a tripod, composed and the exposure is optimally set; and that we wish to maximise what is in ‘high quality’ focus, ie from infinity down to close in the near field, and closer than we could capture in a single image.

In this scenario it is usually best to start focus bracketing at infinity. Thus, using the focus bar, all we need to do is focus towards infinity until the focus bar switches into infinity mode, where the near and far DoF distances switch to showing the near DoF distance that matches the infinity blur, and the far DoF shows the total blur at infinity. Also note that for the near DoF you can have the focus bar report the DoF distance based on the total blur at infinity, or twice this: your choice. This x2 option is only really of value if you are not focus stacking, and you wished to be reassured that your near DoF is going to cover the things of interest in the near field. Because we will likely be seeking out an infinity blur that is less than the blur criterion, we can afford, in the near field, to use a 2 x total blur as our criterion, ie for a single image capture.

The focus bar at infinity (assuming set to show total DoFs, ie green dots at the end of the focus bar) will look like this:



Here we see that we have focused to a point where the total blur at infinity, for the far DoF, is at 16 microns. This implies a high quality focus. Note, you should not over focus at infinity. It is best to focus until the infinity total blur doesn’t change, then back of until you see a change.

At this point we would take our first image; at which time the focus bar registers the total DoFs.

We now simply refocus towards away from infinity until we see the minimum amount of magenta. For example things would look like this:



We can repeat the above as many times as we wish. However, for the sake of this post, we will stop here and note that, after post processing the two focus brackets, say in Helicon Focus or Photoshop, we will have a final image that has a high quality depth of field from YYY to infinity.

Finally, here is an actual screen grab, showing the focus bar in its DoF and focus stacking mode, and following an image capture, ie showing the magenta overlap zone. In this screen capture we see the focus bar in optical mode and the ML info (at the bottom) in diffraction aware mode.


Bottom line: the latest focus bar’s ability to give you focus overlap information is a very powerful way of taking control of focusing. Once again, Magic Lantern shows us what cameras should be able to do: if only manufactures open their minds.

No comments:

Post a Comment