### Author Topic: Depth of Field Bar  (Read 4619 times)

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Depth of Field Bar
« on: November 16, 2018, 02:22:57 PM »
Back in May 2017 I introduced the idea of a focus bar for ML (https://www.magiclantern.fm/forum/index.php?topic=19505.0)

This first attempt was, in retrospect, too ambitious; as I attempted to cover everything to do with focusing. In other words in became too complicated and complex.

In this post I’m releasing a new ‘focus bar’ that is aimed at one thing, and, I believe, does this well. That is providing the ‘best’ focus info to inform our photography. The script is called DoF Bar and only runs in LV.

Here is a screen shot of the DoF Bar running on my 5D3.

The script’s menu just has two sub-menus. The first simply toggles the DoF Bar on and off. The second allows the user to tell the script what he/she wishes the minimum focus to be shown as: note this doesn’t need to correlate to the actual lens focus minimum. By default the minimum focus is 50cm.

The DoF Bar has three zones.

* Zone 1 (white) is from 0 to the minimum focus
* Zone 2 (green) is from the minimum focus to the hyperfocal point.
* Zone 3 (white/black/white) is from the hyperfocal point to 4x the hyperfocal distance.

Note that the black and white bars provide the following info: the green-back transition is at the hyperfocal; the black-white transition is at twice the hyperfocal; the white-black transition is at three times the hyperfocal; the end of the bar is at four times the hyperfocal. In blurs, assuming that an ML blur criterion of 30 has been set and (sic), for simplicity, that diffraction aware is off, these transitions occur at 30, 15, 10 and 7.5 microns.

The total required blur, ie ML set circle of confusion (CoC), is set in the normal ML menu. The user can have diffraction aware on or off.

For a full frame EOS, I suggest you set the ML blur (CoC) to 30, and for a crop EOS at 20; as, using the DOF Bar, you can achieve whatever infinity blur you need; but note that, because of the granularity of the Canon lens control, as you approach infinity the focus steps, and hence distance feedback, become rather coarse. Note that if diffraction aware is on, the defocus blur at the hyperfocal will, obviously, be less than the ML set CoC.

As the DoF Bar shows DoF info, you should switch off the ML DoF info display.

The left hand text, above the bar, shows the near depth of field distance.

The right hand text, above the bar, shows one of two pieces of information.

If the focus point is less than the hyperfocal, this box shows the far depth of field distance.

If the focus point is greater than zero, this box shows the infinity blur in microns. Obviously, when the focus is at infinity this will be zero; and when the focus is at the hyperfocal, this will be the defocus (sic) blur or CoC.

Note that infinity blurs less than, say, twice the size of a sensor pixel are rather wasted. So infinity blurs (FF) between 30 (ok quality) and, say, 10 (high quality) are where you should be aiming for; according to you image presentation needs, ie screen or a print being reviews by a judge in a competition.

Finally, below the bar, we see three hemispheres (dots). These dots correspond the current near depth of field, the focus distance and the far depth of field.
Thus in the example above we see the following: the near DoF is at 54cm; the far DoF at 1.4; the focus is at 71cm (from the lower ML menu); and the dots visually show this relative to the minimum focus, ie the white-green bar transition and the hyperfocal, ie the green-black bar transition.

But the DoF Bar has final feature that is the ‘killer feature’. Namely, if you take an image, dots above the bar record the near DoF, the focus point and the far DoF of that captured image.

Thus the screen would look like this for our example above:

As we have not yet refocused, the upper and lower dots coincide. So let’s now refocus to, say, 1.51m (as shown in the ML menu):

Here we see our new DoF info relative to the previous image and we see we have correctly focus bracketed, as the current near DoF is less than the last image’s far DoF.

So let’s take a second image here. The DoF bar now looks like this, with the upper dots having been reset to the latest captured image.

Finally, we keep refocusing and finally arrive at the position where we have a far DoF, infinity blur of 11 microns, ie a very high quality: as seen here.

Thus, in three images, we have focus bracketed from 54cm to infinity, and achieved an infinity blur of 11 microns.

I hope some find my latest script of value. I’m releasing it the script at the beta level, as I hope I may get some feedback to help refine it before I release it at version 1. The script may be downloaded here: https://gist.github.com/pigeonhill/fdbc6e2fbeed1206afcc47d69cee9591

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #1 on: November 17, 2018, 05:07:27 PM »
A few tweaks to the beta version. Download from the same link as in the first post.

The biggest addition is a 'Pro Mode'.

In pro mode when you are past the ML set hyperfocal, ie using blur info to select focus, and take an image, you will see two tick marks: above and below the bar.

The top (magenta) tick mark records the near DoF (sic) based on the blur that you were at when infinity focusing and captured an image.

The lower (magenta) tick shows the far DoF (sic) for the current focus.

Here is a screen capture showing the ticks.

Thus, in pro mode, you can decide to focus bracket using the standard DoF blur info (white dots) or the blur info that you decided when infinity focusing.

Note when using this approach, obviously, take your first image at a point greater than the hyperfocal distance, ie beyond the green bar.

Finally, if you change focal length or aperature, the top bar will reset, ie ready for you to take a new image.

As usual I welcome feedback and suggestions on the script.

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #2 on: November 18, 2018, 01:26:07 PM »
Version 1 Released : https://gist.github.com/pigeonhill/fdbc6e2fbeed1206afcc47d69cee9591

Here is the 'user manual' - which is also in the script:

Tips on using DoF Bar

Note: DoF Bar takes the ML set CoC as the total blur criterion at infinity. If diffraction aware is off this is the CoC used to calculate the ML hyperfocal, based on lens defocus blur alone, that DoF Bar uses. If diffraction aware is on, then the hyperfocal (H) is adjusted by ML, as the total blur is SQRT(defocus-blur^2 + diffraction-blur^2).

The bar is segregated into three zones (that you can adjust in the script).

The left hand (white) zone covers distances from zero (camera) to a minimum focus distance that you set (this does not have to be the actual lens minimum). Min focus is user set in the script’s menu and can be zero.

The middle (green) zone covers distances from your set min focus to the (diffraction aware) ML calculated hyperfocal.

Finally, the right hand bar (white/black/white) covers distances from H to 2H / 2H to 3H / 3H to 4H. This zone is used when ‘infinity focusing’, ie between H and the canon/ML infinity.

There are two ‘data areas’ above the bar. The left hand one always shows the current near DoF, as reported by ML.

The right hand data shows the current far DoF if the focus is less than the hyperfocal. If the focus is greater than the hyperfocal, this area shows the infinity blur (microns), which will be between the hyperfocal (defocus) blur and zero.

Before you capture an image, the Focus Bar shows three focusing fiducial markers as semi-dots below the bar. Red is the focus point and the left and right white ones show the near and far DoFs. As soon as you take your first image, if bracketing mode is set to off (see script’s menu), you will also see these dots mirrored on top of the bar, ie reflecting the current focus.

If you are in bracketing mode, once an image has been captured, the upper dots will now show the previously captured image’s DoF info, ie near-DoF, focus point and far DoF. You can now use these top and bottom dots to inform your focus bracketing, ie refocus until the lower far DoF is just greater that the upper near DoF (of the last image).

Note that due to the coarseness of the Canon distance reporting, you will not always be able to position your focus to exactly where you want: so be pragmatic.

If you are in Pro Mode (see script’s menu) two additional upper and lower dots will appear. The upper magenta semi-dots show the near DoF of the last captured image, if that image was taken beyond the hyperfocal. That is the near DoF at the infinity blur.

The lower magenta semi-dot shows the far DoF at the current focus, based on the infinity blur of the captured image. As you refocus, to achieve the perfect focus bracket, the DoF Bar will tell you when you have gone too far, by changing from magenta to yellow.

Thus all you need to do in Pro Mode, having taken an image at your selected infinity blur, is to ensure the two magenta dots are as close together as possible (that is as close as the Canon focus reporting allows).

Finally, as a safety feature, if you change the focal length, the aperture or the ML set CoC, the upper dots will reset to their ‘camera on’ state, ie not shown.

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #3 on: November 20, 2018, 09:58:05 PM »
'Final' update for now. This version adds in a couple of new features. Download from here: https://gist.github.com/pigeonhill/fdbc6e2fbeed1206afcc47d69cee9591

Here is the updated 'user manual' as embedded in the script:

DoF Bar is principally targeted at those that wish to obtain tack sharp images from infinity to a near-field point of interest, eg landscape and cityscape photographers.

It can, however, also be useful to those who simply wish to know more about their depths of field (DoFs), especially when focusing beyond the hyperfocal.

It goes without saying that DoF Bar only works with lenses that report focus distance, focal length and aperture. DoF Bar checks for this.

The current focus is always shown by ML on the ML bottom bar and DoF Bar assumes you have set metric units in ML.

DoF Bar is best suited, especially if focus bracketing, being used with lenses at the wider end, say 50mm or wider. However, it can be used with longer lenses,
but be warned: focus bracketing can become tiresome at long focal lengths ;-)

DoF Bar uses the ML set Circle of Confusion (CoC), ie the total (sic) blur criterion at the hyperfocal. The total_blur being SQRT(lens_defocus_blur^2 + diffraction_blur^2). With diffraction blur
linearly varying with aperture alone.

If ML diffraction aware is off the ML CoC used to calculate the hyperfocal, ie based on lens defocus blur alone. If diffraction aware is on,
then the (lens-defocus-based) hyperfocal (H) is calculated by ML after diffraction is accounted for, ie lens_defocus_blur = SQRT(total_blur^2 - diffraction_blur^2).

You can use DoF Bar with diffraction, ie to really nail your focus quality! But be warned: apertures much beyond, say, F/16, on a full frame, are not practicable with diffraction on.

The bar is segregated into three sub-bars, each with different scaling.

The left hand (white) sub-bar covers distances from zero (assumed to be the camera's sensor) to a minimum focus distance that you set (this does not have to be the actual lens minimum).
This min focus is only a visualisation aid. The min focus is user set in the script’s menu and can be zero.

Hint: move your lens to the macro end until the near depth of field doesn't change. You may consider this to be your min focus and set this in the menu ;-)

The middle (green) sub-bar covers distances from your set min focus to the (diffraction aware) ML calculated hyperfocal distance (H). Thus, if the min focus is set to zero, the green bar will go from zero to H.

The right hand sub-bar (white/black/white) covers distances from H to 2H / 2H to 3H / 3H to 4H. This zone is used when ‘infinity focusing’, ie beyond the Ml calculated H.
Note that infinity blurs go in proportion to the multiples of H. Thus if focused at 3H, your infinity blur will be that at H (as set/calculated by ML) divided by 3, ie a third of that at H.

Defocus blurs less than twice the sensor pitch are rather meaningless. Thus H/4 is a pragmatic limit. Thus indicating the sweet spot for infinity focusing as between H and 4H.
For example, on a 5D3 twice the sensor pitch is about 13 microns. Whereas the ML set (full frame) blur will typically be set to 30 microns, as this is recognised as an OK criterion to use for normal viewing of an image.

Thus, on a full frame you should be aiming for blurs from 30 microns (OK quality) to twice the sensor pitch (highest quality).

Of course, for digital viewing, blurs can be less than for close scrutiny print viewing. So, unless you know the final presentation mode,
it is best to seek infinity blurs between 30 to 8 on a full frame, and 30*crop to 8 on a crop sensor.

All DoF Bar menus are remembered at camera close, so you don't have to keep entering your settings once you have arrived at your preferred configuration.

If you have selected the 'Dynamic Bar' option, ie it is not set to OFF, then the DoF Bar will only show the green bar, if certain criteria are met.

The left hand of the bar will always be the lesser of the current near DoF and the near DoF of the last image taken. If DoF mode selected, the right hand will be at H if both the current and last far DoFs are greater than H;
or at the greatest of last far DoF and current far DoF. If Hyperfocal mode selected, the right hand will always be at H.
These two dynamic modes become useful as you focus towards the macro end, so the advice is have the Dynamic Bar switched on. Just try it ;-)

There are two 'info areas’ above the bar. The left hand one always shows the current near DoF, as reported by ML.

The right hand info area shows the current (ML) far DoF if the focus distance is less than (ML) H. If the focus is greater than the ML H, this info area shows the infinity blur (in microns) at the current focus distance,
which will be between the ML calculated hyperfocal (defocus) blur (ie ML CoC if diffraction aware is off) and zero if focused at infinity. Blurs of zero only occur at the point of focus.

Before you capture an image (focused at greater than H), the Focus Bar shows three focusing fiducial markers/semi-dots below the bar. Red is the focus point and the left and right white semi-dots show the near and far DoFs.

As soon as you take your first image, if bracketing mode is set to off (script’s menu), all you will see are these dots mirrored on top of the bar, ie reflecting the current focus.

If you are in bracketing mode, once an (sic) image has been captured (following camera switch on), the upper dots will now be positioned at the captured image’s points of interest, ie near-DoF, focus point and far DoF.

The current focus white far DoF semi-dots will turn blue when you have opened a 'focus gap' between your last image taken and the current focus.

You can now use these top and bottom dots to inform your focus bracketing, ie refocus until the lower far DoF is just greater that the upper near DoF (of the last image), ie white and not blue.

If you are focusing at a Canon indicated infinity, the lower dots will turn black as you are in a potential over focusing mode, according to the lens you are using. You should back off.

Note: the DoF dots work from near to far as well as far to near.

Due to the coarseness of the Canon distance reporting, you will not always be able to position your focus to exactly where you want: so do the best you can.

If you are in Pro Mode (set in the script’s menu) two additional upper and lower (magenta) semi-dots will appear. The upper magenta semi-dot shows the near DoF of the last captured image you took beyond H (sic), using the infinity blur
at that point to calculate the near DoF. The lower magenta semi-dot shows the far DoF at the current focus, once again using the infinity blur criterion established when you captured your image beyond H.

As you refocus, to achieve the perfect focus bracket, the lower magenta semi-dot will change from magenta to blue when you have opened up a focus gap.

This infinity blur criterion will be used until you take another image beyond H, or change, for example, the focal length or aperture.

Thus you can use focus bracketing at, say, image sequences less than H, BUT, remember, you must have taken at least one image at or beyond H, as DoF Bar uses the infinity blur associated with the last image taken beyond H.

In Pro Mode, having taken an image at your selected infinity blur, all you need to do to ensure the two magenta dots are as close together as possible (that is as close as the Canon focus reporting allows);
and both are magenta, ie if the lower turns blue you need to refocus or accept where you are if the current far (white) DoF marker is still white, meaning that you are using the ML set/calculated blur.

If both magenta and white far DoFs of the current focus are blue, you will have a (real) focus gap.

If you change the focal length, the aperture or the ML set CoC; the DoF Bar will reset to its ‘camera on’ state, ie the upper dots will disappear until you take another image beyond H.

DoF Bar will tell you when you have over pushed your aperture and diffraction is too high, as the dots will collapse to the focus distance.

A final 'warning': remember that the equations that ML and DoF Bar use are good approximations, based on mathematically simplifying the lens. If you use the ML DOF info and the DoF Bar at the macro end; all should be OK as long as your brackets overlap, as they should.

(C) Garry George 2018

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #4 on: November 22, 2018, 09:43:38 PM »
Have taken the opportunity to tidy up some of the DoF Bar functionality. The download remains here: https://gist.github.com/pigeonhill/fdbc6e2fbeed1206afcc47d69cee9591

Here is the DoF Bar User Guide, that is embedded in the script:

DoF Bar is principally targeted at those that wish to obtain 'tack sharp' images from infinity to a near-field point of interest, eg landscape and cityscape photographers.

It can, however, also be useful to those who simply wish to know more about depth of field (DoF), especially when focusing beyond the hyperfocal, but short of 'infinity'.

It goes without saying that DoF Bar only works in LV and with lenses that report focus distance, focal length and aperture. DoF Bar checks for this and will only show itself if it is able to so do.

When bracketing, DoF Bar is best being used at the wider end, say 50mm or wider. However, it can be used with longer lenses, but be warned: focus bracketing can become tiresome at long focal lengths ;-)

For example, a 100mm lens at F/10, using an infinity defocus blur of, say, 10 microns, will have a hyperfocal distance of about 100m. Thus the number of focus brackets to cover from 1m, say, to infinity will be 50.

Where the number of focus brackets can be estimated from (H/2X), where X is the near Dof of the nearest point of interest.

The current focus is always shown by ML on the ML bottom bar and DoF Bar assumes you have set metric units in ML. DoF Bar will switch off ML shown DoFs, as they are not needed.

DoF Bar menu appears under the ML Focus menu. All DoF Bar menu states are remembered at camera close, so you don't have to keep entering your settings once you have arrived at your preferred configuration.

DoF Bar uses the ML set Circle of Confusion (CoC), ie the total (sic) blur criterion at the hyperfocal. The total_blur being calculated from SQRT(lens_defocus_blur^2 + diffraction_blur^2). With diffraction blur linearly varying with aperture alone, ie a lens at F/8 has twice the diffraction blur of one at F/4.

If ML diffraction aware is set to off, the ML (total) CoC is, obviously, only based on lens defocus blur. If ML diffraction aware is on, then the (lens defocus based) hyperfocal (H) is calculated by ML after diffraction is accounted for, ie lens_defocus_blur = SQRT(total_blur^2 - diffraction_blur^2).
If diffraction is too high, ie diffraction blur > total blur, the near and far DoFs will collapse to the focus point.

So, be warned: according to your ML set CoC, apertures much beyond, say, F/16, on a full frame (less than this on a crop sensor camera), are not practicable with diffraction on, ie you begin to lose DoF because of diffraction.

Because of diffraction, many photographers try and capture images around F/8 to F/10, as pushing things to F/16, whilst resulting in larger DoF, may introduce loss of image quality because of other factors, eg lens design.

You can switch DoF Bar on and off, ie hide it in LV, via the script's menu.

If DoF Bar 'disappears', for whatever reason, then simply carry out a half_shutter press or refocus or change lens state (length or aperture). This will return DoF Bar to LV.

The bar is segregated into three sub-bars, each with different scalings; in order to maximise the info presented in the bar.

The left hand (white) sub-bar covers distances from zero (an estimate of the camera's sensor plane) to a minimum focus distance that you set (this does not have to be the actual lens minimum).

This min focus is only a visualisation aid. The min focus is user set in the script’s menu and can be zero.

Hint: move your lens to the macro end until the near depth of field doesn't change. You may consider this to be your min focus and set this in the menu ;-)

The middle (green) sub-bar covers distances from your set min focus to the (diffraction aware) ML calculated hyperfocal distance (H). Thus, if the min focus is set to zero, the green bar will go from zero to H.

The right hand sub-bar (with three zones, white/black/white) covers distances from H to 2H / 2H to 3H / 3H to 4H. This zone is used when ‘infinity focusing’, ie beyond the ML calculated H.

Note that infinity blurs go in proportion to the multiples of H. Thus if focused at 3H, your infinity blur will be that at H (the defocus blur as set/calculated by ML) divided by 3, ie a third of that at H.

As defocus blurs less than twice the sensor pitch are rather meaningless; DoF Blur uses H/4 as a pragmatic limit.

In Pro mode (see below) DoF Bar will only allow you to set infinity blurs between H and 4H. For example, on a 5D3 twice the sensor pitch is about 13 microns. Whereas the ML set (full frame) blur will typically be set to 30 microns, as this is recognised as an OK criterion to use for 'normal' viewing of an image. The min infinity blur in this case is 30/4, which is about 8 microns, ie slightly less than the 'sensible' sensor limit.

Of course, for digital viewing, blurs can be more than for close scrutiny print viewing. But, unless you know the final presentation mode and what blur you wish to achieve, it is best to seek infinity blurs between 30 to, say, 12 on a full frame, and, say, 20 to, say, 8 on a crop sensor. DoF Bar, of course, helps you by indicating the sweet spot, ie green blurs.

If you have selected the 'Dynamic Bar' option, ie it is not set to OFF, then the DoF Bar will only show the green bar, if certain criteria are met.

The left hand of the bar will always be the lesser of the current near DoF and the near DoF of the last image taken. If DoF mode selected, the right hand will be at H if both the current and last far DoFs are greater than H; or at the greatest of last far DoF and current far DoF. If Hyperfocal mode selected, the right hand will always be at H.

These two dynamic modes become useful as you focus towards the macro end, so the advice is have the Dynamic Bar switched on. Just try it ;-)

There are three 'info areas’ above the bar. The left hand one always shows the current near DoF distance, as reported by ML.

The right hand info area shows the current (ML) far DoF distance if the focus distance is less than (ML) H. If the focus is greater than the ML H, this info area shows the infinity blur (in microns) at the current focus distance,  which will be between the ML calculated hyperfocal (defocus) blur (ie ML CoC if diffraction aware is off) and zero if focused at infinity. Blurs of zero only occur at the point of focus.

The third info area only appears in Pro mode and shows the current ML calculated defocus blur (diffraction aware sensitive) and the infinity blur that is currently set. The infinity blur is set by taking an image between H and 4*H.

This infinity blur will then remain in force UNTIL the lens state changes, ie aperture or focal length. If you change lens state, you will need to take another image between H and 4*H to reset the infinity blur.

Or, put another way, if you wish to reset the infinity blur, all you need do is change lens state and take an image between H and 4*H.

In its non-bracketing mode, Focus Bar shows the three main focusing fiducial markers/semi-dots below the bar. Red is the focus point and the left and right white semi-dots show the near and far DoFs as calculated by ML.

As soon as you take your first image (anywhere), if bracketing mode is set to off (script’s menu), all you will see are these dots mirrored on top of the bar and these will remain mirrored as you refocus.

However, if you are in bracketing mode, once an image has been captured, the upper dots will now be (remain) positioned at the last captured image’s points of interest, ie near-DoF, focus point and far DoF.

The current focus white far DoF semi-dots will turn blue when you have opened a 'focus gap' between your last image taken and the current focus.

You can now use these top and bottom dots to inform your focus bracketing, ie refocus until the lower far DoF is just greater that the upper near DoF (of the last image), ie white and not blue.

Thus, in bracketing mode, you can focus bracket from anywhere at anytime.

If you are focusing at the Canon/ML indicated infinity, the lower dots will turn black as you are in a potential over focusing state, according to the lens you are using. This is only a warning, but remember that pro mode does not work beyond a focus of 4*H.

Note: the (non-Pro) DoF dots work in any focusing direction, from near to far as well as far to near.

Due to the coarseness of the Canon distance reporting, you may not always be able to position your focus to exactly where you want: so do the best you can.

If you are in Pro Mode (set in the script’s menu) two additional upper and lower (magenta) semi-dots will appear. The upper magenta semi-dot shows the near DoF of the last captured image you took between H and 4*H, using the infinity blur at that point to calculate the (infinity blur based) near DoF. The lower magenta semi-dot shows the (infinity blur based) far DoF at the current focus, once again using the infinity blur criterion established when you captured your image between H and 4*H.

As you refocus, to achieve the perfect focus bracket, the lower magenta semi-dot will change from magenta to blue when you have opened up a focus gap. Note in Pro mode you should focus bracket from far to near.

The infinity blur criterion will remain fixed until you change the focal length, aperture or the ML set hyperfocal by changing the CoC in ML.

Thus you can use focus bracketing at, say, image sequences less than H, BUT, in Pro mode you must have taken at one image between H and less than 4*H, and, of course, focus stack from far to near.

In Pro Mode, having taken an image at your selected infinity blur, all you need to do on subsequent focus brackets is to ensure the two magenta dots (top = last near DoF and bottom = current far DoF based on infinity blur) are as close together as possible (that is as close as the Canon focus reporting allows); and both are magenta, ie if the lower turns blue you need to refocus or accept where you are if the current far (white) DoF marker is still white, meaning that you are between the ML set/calculated blur and the infinity blur DoFs.

If both magenta and white far DoFs of the current focus are blue, you will have a (real) focus gap that needs fixing.

In Pro mode the middle Info area reminds you of the blurs that are being used to calculate the white and magenta DoF dots, ie ML set (at the OK focus quality level) and your currently active infinity blur (high quality).

If you change the focal length, the aperture or the ML set CoC; the DoF Bar will reset to its ‘camera on’ state, eg the upper dots will disappear, until you take another image. Plus, in Pro mode, the infinity blur based info will be reset and you will need to take an image between H and 4*H to establish a new (Pro mode) infinity blur.

Finally, you can use DoF Bar as a visualization tool. For instance to gauge/set a maximum DoF by simply adjusting aperture and looking at the changing DoFs until they are at their maximum and suit your needs.

Caveat emptor: remember that the equations that ML and DoF Bar use are good approximations away from the macro end, based on mathematically simplifying the lens. In other words, don't use DoF Bar with a macro lens!

Finally here is a demo screen shot of Pro mode.

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #5 on: November 24, 2018, 10:05:31 PM »
Corrected a silly programing error that resulted in the DoFs being incorrectly reported.

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #6 on: November 25, 2018, 08:44:35 AM »
Just to say, as I'm likely the only Forum user of DoF Bar, I'm will not be making any more post here.

The current version is at 1.3

You can always see further progress on my blog at photography.grayheron.net

#### IDA_ML

• Hero Member
• Posts: 864
##### Re: Depth of Field Bar
« Reply #7 on: November 25, 2018, 12:30:54 PM »
Garry, your work is definitely very interesting and useful.  Pesonally, I follow it with interest but your posts are very difficult to understand.  That is why people do not respond.  If you provide a step by step guide on how to use the DOF bar in real life shooting conditions and also a few convincing examples, I am sure, many people will be willing to try.

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #8 on: November 25, 2018, 12:45:47 PM »
@IDA_ML

I appreciate what you are saying, however, I’m not trying to sell my work, simply offer it ‘as seen’ so that others may benefit.

I’ll continue to use my blog to discuss my photography and experiments and will try and find time to give a few examples of using DOF Bar.

Cheers

Garry

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #9 on: November 27, 2018, 11:16:35 PM »
@IDA_ML and '@all'

In attempt to redress the observation about the difficulty in following my posts/work, I've decided to write a two part tutorial on the power of using blurs to inform focus.

Hint: if you can master blurs, use infinity-blurs and use the Rule of Ten, even if you don't use the DoF Bar, you will have a very powerful technique in your head.

Part 1, which you can find here http://photography.grayheron.net/2018/11/focus-tutorial-part-1.html lays out the basics of using blur and the Rule of Ten.

In part 2 I will discuss using the DOF Bar.

Please let me know if this helps: or if my posts are still 'too difficult' to follow ;-)

Cheers

Garry

#### ItsMeLenny

• Hero Member
• Posts: 927
• 550D
##### Re: Depth of Field Bar
« Reply #10 on: November 28, 2018, 12:00:21 AM »
Haven't been on the ML forums for a little while, but I'm not sure why there's no other responses.

This looks pretty cool!! And I will try it out in the next couple of days.

Taking a look at your blog also.

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #11 on: November 28, 2018, 08:00:35 AM »
@ItsMeLenny

It would be great to have a different pair of eyes test DoF Bar. As I said previously, I write my scripts as a bit of fun and for my use, but I'm more than happy for others to use them.

BTW using the Rule of 10 to estimate your hyperfocal is a very powerful way to get optimum focus for landscapes, where you desire everything to be tack sharp from far to near.

As we know, if you just use the hyperfocal you will only get an image at infinity that is 'only' just meeting your blur criterion.

Also if you just focus short of this, you will lose a lot in the far field and quickly.

Bottom line, if you use a single image hyperfocal approach, at least focus beyond it a little.

Finally, here is the updated chart that shows what I mean by controlling (dialing in) the infinity blur you wish, just by knowing the hyperfocal:

#### IDA_ML

• Hero Member
• Posts: 864
##### Re: Depth of Field Bar
« Reply #12 on: November 28, 2018, 09:47:59 AM »
That's much better, Gary!

I am looking forward to your Part 2 of the tutorial. Please include a step-by-step guide for practical use.

#### john5788

• New to the forum
• Posts: 3
##### Re: Depth of Field Bar
« Reply #13 on: November 29, 2018, 09:46:47 PM »
I mostly lurk on these forums, but I signed into my account just to say that this script looks very interesting and I'll likely load it onto my cameras to use. I just didn't want OP to feel like this script was created and no one cares or wants to use it.

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #14 on: November 29, 2018, 10:14:43 PM »
@john5788

Thanks. Please let me know if you need any help with it. It works on my 5D3 and EOSM.

If you are not familiar with thinking in blurs, you may wish to read Part 1 of my tutorial on my blog.

The power of DoF Bar is the info it gives you when infinity focusing, ie focusing past the hyperfocal, and focus bracketing.

Cheers

Garry

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #15 on: December 01, 2018, 03:41:34 PM »
In the latest version (https://gist.github.com/pigeonhill/fdbc6e2fbeed1206afcc47d69cee9591) I've corrected a couple of bugs and added a new pro feature.

In Pro Mode you now have two options. One continues to give you additional DoF info based on the image you took between H and 4*H, ie when you were infinity focusing.

The new option provides an estimate of the number of brackets required between where you are currently focused and H. In this mode the screen looks like this:

Here we see that: the lens is focused at 1.35m (bottom ML bar); that the near DoF is at 82cn; that the far DoF is at 4.01m; and that you will need about 2 brackets to cover from here to the hyperfocal.

Note the white bar continues to show the user set 'min focus', 500mm here (note this is just a reference visual); and that the three bars on the right are at H (green to white)-2H-3H-4H.

I will be issuing a full tutorial soon, but for those that understand DoFs and blurs etc I'm issuing this release so others can explore DoF Bar.

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #16 on: December 04, 2018, 10:34:27 PM »
Still working on some in-depth tutorials on DoF Bar

It's very stable and the info provided is now very informative, at least for those who use blur info to get the optimum focus.

The script contains the latest 'user manual'.

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #17 on: December 08, 2018, 06:42:45 PM »
Here is the promised first tutorial on DoF Bar.

http://photography.grayheron.net/2018/12/dof-bar-getting-started.html

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #18 on: December 09, 2018, 05:38:44 PM »
In this next tutorial on using the DoF Bar, I show how easy it is to get perfect, in-camera focus bracket set: http://photography.grayheron.net/2018/12/dof-bar-simple-focus-bracketing.html

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #19 on: February 09, 2020, 10:56:26 PM »
An update to show the focus position in the middle of the bar.

You can select "Show Focus" on the Pro menu.

#### garry23

• Contributor
• Hero Member
• Posts: 2049
##### Re: Depth of Field Bar
« Reply #20 on: February 10, 2020, 09:04:00 AM »
OK, it was annoying me, so here is a minor update shows the focus position with units: Note DoF Bar switches ML to metric