Wednesday, November 1, 2017

Yet another update of the Focus Bar

As readers of my blog know, I post for cathartic reasons and in the hope that others may benefit from my slow progress in becoming a better photographer.

Ever since I started writing Magic Lantern Lua scripts, I've 'suffered' from not being able to dynamically handle the Lua drawing with the Canon drawing.

In the latest version of the Focus Bar (FB) script (download on the right), I've decided to adopt a different approach.

In this version of the script the FB is hidden at start-up.

To expose the FB all you need to do is a greater than 3 sec halfshutter press: the camera's led will flash. To hide the FB simply do another greater than 3 sec halfshutter press.

Thus you can turn the FB display on and off, allowing you to cleanly access the Canon menus, eg MENU and INFO etc.

Thursday, October 26, 2017

Update on Focus Bar

For those that are users of my Focus Bar script, you may be interested in the latest version.

The latest changes are directed at the UI and making the script more ‘integrated’ with ML.

The first change is that the focus bar will not work if the lens is incompatible with the script. Also, the script switches off the ML DoF reporting, ie all DoF feedback is via the script.

The next change is that the focus bar will not show on start up, ie when the ML console is running, but will start as soon as you start focusing.

Next, when you are focusing beyond the hyperfocal distance, ie when the script shows the various infinity blurs (defocus blur, diffraction blur and total blur), the script shows the near DoF for three blur criteria: using the infinity defocus blur, twice the infinity defocus blur and the DoF based on using the ML set defocus blur, ie accounting for diffraction - this allows you to make the final focus decision based on the best DoF estimates.

Next, if you over focus, ie focus distance is greater than (lens reported) infinity, the script will warn you.

Finally, although I wrote the Focus Bar script for my own use, I freely share it with others. Having said this, I would welcome knowing if anyone, other than me, uses the script ;-)

The updated script can be found on the right.

PS remember to set the correct sensor info for your camera in the script.

Saturday, September 30, 2017

Focus Bar Update

Just a quick post to say I've updated my focus bar script (FOCUS on the right).

This version provides additional near depth of field distance information when you are optimising infinity focus.

If the full info option is selected (default) then you see both near and far depth of field infinity focus sets of data, ie:
  • In the far field, ie at infinity, you get a breakdown of the defocus, diffraction and total blurs in microns;
  • In the near field you get the depth of field distances that correspond to three 'blur scenarios', eg: infinity defocus blur, twice the infinity defocus blur and the ML CoC set defocus blur.
The script as provided is good for a visible band, full frame 5D3. For a cropped Infra Red camera, for example, you will need to tweak the script.

Thursday, September 21, 2017

Unlocking the power of the Hyperfocal Distance

I assume everyone reading this post is aware of the hyperfocal distance (HFD) focusing concept?

Simply focus at the HFD and everything from half the HFD to infinity will be ‘in focus’ according to a specified criterion, or more correctly not so out of focus that you can see the defocus.

If we ignore diffraction, the HFD is simply a function of the focal length, the aperture number and a blur criterion, usually called the Circle of Confusion (CoC).

If you have read my previous posts, you will know that the HFD is only ‘just’ acceptable, ie at infinity the defocus blur is the CoC. You will also know that you can achieve a far superior result by simply focusing at, say, Y times the HFD, as calculated with your ‘just acceptable, CoC: which will reduce the blur at infinity by the CoC/Y. Thus at a focus of 2xHFD(CoC), the blur at infinity will be the CoC/2.

With a typical (just acceptable, and no diffraction accounted for), full frame CoC of 0.03mm, ie 30 microns, you can therefore get a far field focus, all the way to infinity, that is always better than, say, 15 microns throughout the focus field: dropping to 0 at the point of focus. But of course in doing this you have reduced the near field depth of field.

Of course if we focus at infinity we achieve a blur of zero at infinity, but at the cost of reducing the near depth of field, ie HFD to infinity. Also defocus blurs less than two sensor pixels are rather meaningless. Thus you are over focusing with a digital camera if you focus at infinity.

To achieve the ultimate, of (very) near to infinity focus, you need to use focus stacking. That is you focus overlap various images and post process them to achieve an image with as large a depth of field that you want.

As readers of my blog know, if you have a Canon DSLR or EOSM, you can use my Magic Lantern Lua scripts to automate the process: taking all the guess work out, and automatically accounting for diffraction.

But what if you don’t have Magic Lantern. How do you know where to focus and how many focus brackets to take?

This is where knowing the HFD for your focal length and aperture helps.

As most photographers seeking out large depths of field will be ‘landscapers’, they will know that you need to ‘balance’ the blurs caused by defocus (from the lens) and diffraction (from the aperture alone). Without proof, you want to be ‘in the middle’ with your aperture, ie not at F/2.8 or at F/16, if you wish to balance out the two blurs. Say, between F/8-F/11 on a full frame DSLR.

So we have now set one of the HFD variables: the aperture number, eg, say, F/8 (N). The focal length (FL), of course, will be fixed once you have composed: so that is known (and permanently fixed on a prime lens). This leaves the CoC, which we will leave at the accepted ‘just acceptable’ number of 0.03mm for 35mm full frame format.

Note for on screen/web presentation we could increase this and for high scrutiny print exhibition/judging we should consider reducing this ‘base’ CoC. For now, we will assume normal quality is an infinity blur or 30 microns and a high quality print blur at infinity will be between 10-15 microns.

Previous posts gave the HFD formula, which, in its (approximate) simplified form, is FL*FL/(N*CoC). Thus for a FL of 24mm, at F/10 and a CoC of 0.03, the HFD comes out at 1920mm (ie about 2m). Giving a depth of field of 1920/2 mm, ie 960mm through to infinity (at a defocus blur criterion of 0.03mm).

But what if you had a ‘point of interest’ at, say, 400mm, what focus bracketing strategy should you use? How many brackets should you take?

Once again, not wishing to frighten off readers off with lots of equations, the number of brackets can be estimated from dividing the closest point of interest (400mm above) into half the HFD (and round up to the next integer.

Thus, in the example above we simply do the following calculation: 1920/(2*400), or 2.4, which we round up to 3. That is we need to take three brackets to capture the full near field.

But this begs the question: where do I focus those brackets?

Once again, the HFD comes to the rescue.

Without proof, and assuming each focus bracket just touches its adjacent bracket, the nth bracket needs to be focused at HFD/(2n-1). For example in our above three bracket example we would focus at HFD, HFD/3, HFD/5. The near and far depths of field of each bracket being HFD/(2*n) and HFD/(2(n-1)).

For the ‘perfect’ bracketing set, I would also take a bracket at 2*HFD, which would result in the following (illustrative) focus strategy. Note in this example we have not addressed the bracket to bracket overlap. We will deal with that in a subsequent post.

Bottom line: for those that tend to do landscape photography and use a ‘sweet’ spot for focal length and aperture, it is relatively easy to remember the HFD (or HFDs). Once you know the HFD, all you need to do is multiple or divide this by integers, typically between 2 and 9.

In future posts I’ll deal with focus overlapping when focus bracketing.

Tuesday, September 5, 2017

Revisiting some basics

In previous posts I have discussed the ‘normal’ hyperfocal distance (HFD = H) and why it is not (sic) the optimum focus strategy for landscape and architectural photographers trying to get high quality depth of field images, from near to far.

Assuming a ‘simple lens’, and ignoring diffraction, the HFD may be estimated from the following:

Where f is the focal length, N the aperture number and B the defocus blur at infinity, eg what some call the Circle of Confusion, eg for a full frame camera this is often quoted as 0.03mm (30 microns).

If we assume that f term is (very) small relative to the other term and that the blur at infinity can be less than the minimum acceptable blur, then the above simplifies to:

Where Q is a focus quality term, relative to the normal, minimally acceptable blur. Q will typically be between unity and, say, 2ish. For example, if Q is 2, then the blur at infinity would be 15 microns, rather than the ‘normal’ 30 microns.

Understanding this very simple equation is the starting point for maximising the focus quality in your (landscape) images.

Before moving on, it is worth remembering that (defocus) blurs less that two sensor pixels are ‘meaningless’. Thus if we assume, for illustration, a sensor pixel size of, say, 7 microns, then the sensible defocus blur range is between 14 microns (2 x 7) and 30 microns: which leads to Q being between 1 and 2ish.

To emphasis this point, for on-screen work you will ‘get away’ with blurs of 30 microns, or more. For high quality printing, at close scrutiny, eg by judges or in a gallery, you should use defocus blurs of, say, half of this, say 15 microns on a full frame.

Remember that diffraction will always add additional blurring to your image, and that diffraction blurring varies linearly with aperture, ie shooting at F/16 will double the diffraction blur compared to an image captured at F/8.

For high quality work, it is not advisable to push the aperture too much: unless you have to. Most would suggest a ‘sweet spot’ for a full frame DSLR of between F/8-F/11.

The key take away from the above is that, for full depth of field photography, you should focus beyond the (minimally acceptable) HFD, but not more than twice that HFD.

But what if you want to really maximise your depth of field, ie from infinity to near. Well we know the ‘secret’ here is to focus bracket, ie recover the defocus in the near field.

If you are a Canon shooter you can make use of the various Magic Lantern tools at your disposal, including my auto landscape bracketing script and my focus bar script. But what if you don’t have Magic Lantern. Is there a simple focus bracketing approach?

The answer is yes.

Without proof, the optimum (high quality) two-bracket focus stacking approach is to take the first image at Q times the (normal) HFD and the second one at Q times the HFD divided by 3.

Thus if Q is unity and HFD is the ‘just acceptable’ HFD, ie a defocus blur of the minimum quality, that is often used, then focus your two focus brackets at the (usual) HFD and at HFD/3.

If you wish to capture a higher (optimally focused) quality bracket set, then focus at 2xHFD and 2xHFD/3.

The resulting blur (defocus) field for a high quality (single) capture (Q = 2) looks like this – compared to the defocus field for a (normal) HFD shot, say a B of 0.03mm:

Here we see the real advantage of focusing at 2xHFD, ie the far field, beyond H never gets ‘worse’ than a blur of B/2, ie you have doubled the far field focus quality.

Once again, without proof, taking HFD (or H) as that given by the minimal acceptable blur (say 0.03mm), we can take a high quality focus bracket set at 2xHFD and 2xHFD/3, that results in the near field depth of field being better than if we had focused a single image at the (normal) HFD.

What has been gained is quality of focus in the near field, to complement the far field, as illustrated below, ie for a Q of 2, the near DoF at a blur of B is 2*H/5, ie Q.H/(3+Q).

Finally, I appreciate that not everyone likes reading posts with equations or numbers: in fact some get ‘really turned off’. However, the fact is, to get the most out of your cameras you do need to understand some of the (basic) ‘science and maths’ that is going on behind the scenes.

Monday, August 28, 2017

Summer is designed for Infra Red photography

It's August Bank Holiday here in the UK and a chance to get out and explore the local area from my house, on foot, with my IR converted EOSM, with an 11-22mm lens. The explorations today included a local moated house.

The camera is also 'hacked' with two grips and an LCD viewer from

My post processing is mainly (totally for the images below) in LR.

After applying a linear 'gamma' and an IR DNG profile to recover the white balance to a more reasonable starting position in LR, I then make good use of dehaze and other LR sliders to get the look I'm after.

 As usual, I welcome any feedback on my post and images.

Saturday, August 12, 2017

Something different

Most of my posts are about achieving the best exposure or focus that you can: so I decided a while ago to 'try something different'.

Pinhole photography!

The other day my new lens arrived: a pinhole lens from thingyfy

Unlike other pinhole lens, or one you make yourself, the Thingyfy lens has variable apertures. From 0.1 to 0.8mm.

The lens has a focal length of 50mm, which can be changed by using extension tubes.

The ability to dial-an-aperture is the real selling point for me, as the Prober-Wellman equation in the visible bands shows the optimum pinhole size varies with focal length and M, the magnification, which is simply the focal length divided by the subject distance from the aperture:
Others have plotted the above for various focal lengths and magnifications:
For landscape work, where M approaches 0, for a 50mm focal length the optimum pinhole diameter is about 0.25mm.

So what does an image look like with my new lens?

Here are a few test images taken this afternoon. Both typical scenes around us at the moment: crops and cricket (note I shot when the bowler was running).

Both images benefited from being ETTRed via Magic Lantern, of course; and were post processed in Lightroom and Photoshop. At ISO100 the ETTR exposure was 5s on one and 3.2s on the other.

One of the downsides of pinhole photography is that you are shooting at very high f/stops, ie in the above images at F/200. At such F/stops you will see every dust particle and therefore you will need to carry out a bit of post processing. I'll be writing about post processing in another post.

Obviously pinhole photography is a statement: it creates ethereal images that are the antitheses of every thing I tried to do in photography, up until now. I'm looking forward to exploring the new lens, including IR pinhole photography.