Post Reply 
(17Bii) - my first "program"; a Depth of Field calculator for the 17Bii
12-08-2019, 11:19 PM
Post: #4
RE: (17Bii) - my first "program"; a Depth of Field calculator for the 17Bii
(12-08-2019 10:37 PM)Don Shepherd Wrote:  You could also do it this way (a little less verbose):

0 x L( DM : D x 1000 ) X
L( HFD : FL ^ 2 ÷ ( APERT x COC ) ) X
L( NP : ( ( HFD x G( DM ) ) ÷ ( HFD + ( G( DM ) - FL ) ) ) ÷ 1000 ) X
L( FP : ( ( HFD x G( DM ) ) ÷ ( HFD - ( G( DM ) - FL ) ) ) ÷ 1000 ) X
L( HFD : HFD ÷ 1000 ) +
IF( FP < 0 : 0 : FP - NP )

Beautiful equation.

Of course! That happens when you only work on an equation on paper, without thinking of optimising it ;-)

BTW; I typed in mine in the actual 17Bii now (not the iPhone app), and it works fine ... just not sure about what is the best order of the variables yet.

For those who do not know what a Depth of Field calculator is; it is a tool used for photography to estimate how much will be in focus in your photo. Because there is a gradual transition from "in focus" to "out of focus", there is a focus area, rather than a focus point. That has to do with resolution of the medium (print, slides, digital display), and viewing distance. The Circle of Confusion basically is (taking a huge shortcut in explaining here) a measure for the maximum image blur that is invisible for the viewer. This Wikipedia article offers a very good explanation:

Anyway, for the Fujifilm APS-C sensor, I use a value of around 0.010 ~ 0.015. For paper prints, 0.015 is already overkill, due to the low resolution. For digital crops out of an image, the acceptable sharpness is much tighter.

As an example; the Fujifilm X100T camera has a 23mm lens, an APS-C sensor (let's use CoC=0.015), and a working aperture (which defines how much light comes in) range of between f/2.8 and f/11. Again, for more details, Wikipedia is an excellent source.

Last aspect; hyperfocal distance is the subject distance where everything behind the subject seems in focus (is acceptable sharp to the viewer). In this case, the sharpness range runs from HFD/2 to infinity. Focussing farther than the HFD only increases the nearest "in focus" point, but does not have a real effect on the farthest point (infinity plus a bit is still infinity). For practical reasons, I usually focus at easy distances, like 10 meters.

So, to use the equation, I enter the following in my 17Bii:

FL=23mm (the fixed lens focal length of the X100T)
COC=0.015 (or 0.010, if you want to stay on the safe side)
APERT=8 (f/8, which is a good start for light cloud daylight photos outside)

And we want to see if this ensures that "everything" will be in focus:

Solving for TDOF gives a value of "0", which in this context means that the DoF is infinite.
RCL HFD gives 4.40833 (which is interesting; I would have been safe with a focus distance of 5 meters, which btw is not marked on the lens scale ... markers are at e.g. 1, 2, 10, and INF distances).
RCL NP gives 3.06446, so everything from 3.1m to infinity will be sharp.

Now with a telelens, let's say with a focal length of 210mm (on a camera with the same sensor, e.g. the X-T1).

Let's go with a subject distance of 10m again (but that may well be below the minimum focus distance of the lens!), and try to make a nice portrait with a blurry background. For that reason, we'll start with an aperture value of f/4:

So now we enter:

FL=210mm (the focal length to which we set our telelens)
COC=0.015 (or 0.010, if you want to stay on the safe side)
APERT=4 (f/4, which should ensure a nice blurriness ... avoiding the "bokeh" word here)

And the results weget:

TDOF = 0.26644 (so only 26cm in total will be in focus!)
HFD = 735 (so at f/4, you'd need to focus at an object 735m away to have a fully sharp background!)
NP = 9.87
FP = 10.14

So that means that, if the eyes of our subject are a 10 meters, everything 14cm behind that is out of focus, and everything 13cm in front will be out of focus too. And if we had chosen an even larger aperture, e.g. f/2.8, it might have well been that even the subject's ears would be out of focus! (in fact, everything more than 9.4cm behind the eyes would be, just like everything 9cm in front).

So you see that DoF and hyperfocal distance calculations are very useful for photographers, since they help to estimate what the resulting photo will look like.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: (17Bii) - my first "program"; a Depth of Field calculator for the 17Bii - jthole - 12-08-2019 11:19 PM

User(s) browsing this thread: 1 Guest(s)