Friday, July 14, 2017

Focusing by Colour

Hopefully the title of this post is intriguing enough that even a few random surfers may have dropped in. So to make things self contained, here is a recap of where we are:
  • Magic Lantern is a fantastic piece of (software) technology, let down by the (Canon) hardware and users :-) 
  • For photographers we have ML Auto ETTR, Auto (RAW) Bracketing and Dual-ISO to help us control/optimise dynamic range, ie we can record the photons we need; 
  • For focus we now have my Focus Bar (FOCUS on the right), but it does have a couple of weaknesses. First, because the feedback is via the LCD, you may suffer from external light pollution, ie solar glare making the screen difficult/impossible to read. Second, not every photographer has perfect eyesight, ie reading small text! 
  • When focusing for landscapes or any image capture where you need full depth of field cover from a near field object to infinity, up until now, we have had three basic strategies we could use: 
    • Use the hyperfocal distance (HFD) approach and live with the fact that at infinity the focus will only just be acceptable; 
    • Use the Harold Merklinger approach of focusing at infinity - 
    • Try to focus stack as best we can by guessing the various focus points into the scene.
Of course, Canon ML users have my Focus Bar which allows you to use/adopt all three approaches in a fully controlled way, including perfect focus bracketing.

This post is all about the one weakness that ML can’t help us address, namely: the Canon hardware we use, ie the LCD screen, and our own eyesight shortfalls!

Let’s take the LCD screen first. One way to address the weakness here is to hope your camera has an articulating screen, and that you can angle it such that the screen is not occluded by sun glare. Another approach, and the one I use with my 5D3, is to shield the LCD. For example I use the Varavon Multifinder on my 5D3, but sadly this is not made any more.

As for eyesight problems. Well I can’t really say much here. Yes, ML may help a little, ie try and use bigger fonts for screen feedback, however, assuming sun glare is still there, and recognising that font size is not ‘infinity’ variable in ML, this approach won’t help that much.

We need another approach: which is what I am releasing in the latest version of FOCUS (download from the right). That is focusing by colour. Or for my American friends, who haven’t been corrupted by the French, because their founding fathers left English shores before the French language influenced my Mother Tongue, we will look at focusing by color :-)

The purpose of this approach is to ensure we can use the focus bar without needing to look at any distances or blur diameters, ie no text. All we will do is respond to colour cues on the screen, that should be readable in bright sunlight and with ‘old eyesight’, like mine!

First, let’s remind ourselves what the basic focus bar looks like. All the images in this post were taken from my EOSM (with the lens cap on), ie an APS-C cropped sensor, where I used the ‘normal’ (minimal quality) total blur (CoC) criterion setting of 19 microns. I have also chosen to use an 11mm focal length lens at F/5.6.

This first screen capture shows a typical focus bar at start up, telling me I’m focused at 71cm (bottom bar), that the near DoF is positioned at 45cm, that the far DoF is positioned at 1.62cm. We also see a representation of the focus field, in between the DoFs, eg the grey scale and defocus blur representations at the 10% distance points. At the bottom of the screen we also see “0cm(17)0cm”. What’s going on here?

Because, by default FOCUS is in focus stacking mode, and we haven’t taken an image yet, there is no ‘last DoF’ info to show, hence the 0cm. The (17) is telling us that the defocus component of the total blur criterion, ie 19microns, is 17microns. That is SQRT(Total_Blur^2 - Diffraction_Blur^2). Remember that diffraction blur only varies with aperture and is considered constant through the scene. In this case, at F/5.6, diffraction is low.

OK, nothing new in the Focus Bar so far. So let's illustrate the focusing by colour approach by assume we wish to carry out a focus bracket/stack, from a near field point of interest that we have focused on, and that we wish to capture the sharpest image we can at infinity, ie better than a 'barely acceptable', HFD capture.

This first screen image shows our illustrative starting point, where we have focused at 93cm and our near and far DoFs are 53cm and 3.58m respectively.

Let’s take our first capture.

As we can see nothing has changed in the top focus bar, as we haven’t changed our focus. But what we do see is an updating of the near and far DoFs of the last captured image, ie at the bottom of the screen.

But let’s assume that the on-screen text is not readable, ie sun glare on the LCD or failing eyesight. Let’s now start focus stacking towards infinity using colours alone.

Here is the screen capture when we have refocused but not yet taken our second image.

As we can read all the information let’s review what’s just happened. All we have done is refocus to 1.08m, ie from our original 93cm point. As a result of this the near and far DoFs have changed to 58cm and 7.8m respectively. Note that the DoF info at the bottom continues to show the previous image’s DoFs, eg 53cm and 3.58cm, plus the reminder that the defocus blur we are using is 17microns, ie following from the impact of the F/5.6 diffraction component.

But the major change on the screen, and what should be clear in any lighting conditions and with any eyesight, is the magenta bar.

The magenta bar is showing the focus overlap relative to the last image. In this case, noting the 10% distance marks on the focus bar, ie between the two DoFs, we can see that the overlap in about 40% of the DoF of this image.

You will have to take my word for it, that this 40% is the only solution available to me on this occasion, because the Canon lens control is not refined enough to give me other options.

So let’s take our second image (ignore the bright spot anomaly).

Now we see the magenta bar has vanished and that all the DoF info has updated, ie the current DoFs in the focus bar are showing 58cm and 7.80m, and the last image’s DoFs (at the bottom) are also showing as 58cm and 7.80m, ie the current image.

Let’s carry on refocusing towards infinity.

In this case (and this will be image-scene-setting dependent) we see that as we have focused passed the HFD, but that the focus point is less than infinity, ie 1.27m, and thus we have entered the infinity-focusing mode of the focus bar. In this mode a new focusing aid kicks in, the vertical bar on the right. You can also see the hint of magenta on the left of the focus bar, but note you may not as at infinity the bar is representing a huge distance, ie infinity ;-)

This vertical bar shows the focus breakdown of the total blur (CoC) criterion in microns, ie as set in the ML menu, the defocus blur component, ie the green bar, and the diffraction blur component, ie the yellow bar.

It just so happens in this case, this focus position shows that we are around the HFD point, as the focus bar is showing a total (defocus and diffraction) blur of 19microns, our total criterion, and the vertical infinity focus feedback is only showing the defocus and diffraction breakdown, ie the green and yellow areas, ie these two, taken together in quadrature, equals 19 microns.

Note also that the near DoF is showing 42cm, which is less than the first image we took! What’s going on here?

This is a feature of the focus bar (that can be changed) that I personally have set as a default. Namely, when you are optimising for infinity focus, ie planning to take a single image, you can set the near DoF to be calculated based on the defocus blur at infinity or twice this.

The above screen capture is thus showing the near DoF using twice the defocus blur at infinity. This feature is useful when you wish to optimise/minimise blur at infinity, ie low blur numbers, but know you can tolerate larger, relative blurs in the foreground, albeit less than the total criterion. In focus stacking mode, the focus bar’s near depth of field, when you are at infinity, can be ignored.

Clearly, we haven’t reached the optimum infinity focus yet, ie we are at the HFD focus position. So let’s keep focusing towards infinity.

The next few images show the feedback, with the final image showing that we have reached a limit, ie the green area has turned red. This alert is telling you that the defocus blur has reached a limit of twice the sensor pitch. Sensibly, it is not worth trying to reduce blur below this limit, hence the (red) warning. But note we are still only focusing at 7.60m.

So lets keep focusing towards infinity, which results in this situation.

Now we see the entire focus bar turn red, indicating that we have completely over focused and are ‘beyond infinity’, ie there is no more focus-based information to be gained. We need to back off focus, and take our final (3rd focus) bracket. Which tells us that our final bracket is at 3.84m and that our total infinity blur is 9 microns, ie double the infinity focus quality of an HFD capture.

Pulling all the above together, what we have done is use only colour feedback from the focus bar, after first focusing on a near field point of interest, eg using auto focus, and created a three image focus bracket set, namely these captures:

As we can see we have a sound focus bracket set, covering focus from a near field DoF distance of 53cm, out to an optimised infinity capture with a total blur at infinity of 9 microns (the best you could hope for).

I hope this new feature in the focus bar helps those that, like me, either struggle with small lettering or simply can’t beat the sunshine!

No comments:

Post a Comment