Pages: [1]   Go Down

Author Topic: Determining number of focus slices  (Read 6479 times)

Luis Argerich

  • Full Member
  • ***
  • Offline Offline
  • Posts: 155
  • Astrolandscaper
    • http://www.luisargerich.com/
Determining number of focus slices
« on: January 11, 2011, 02:22:07 pm »

Hi All,

I've been using focus-stacking to extend the DOF of some of my shots without running into diffraction problems.
So far I've been doing in-camera educated guesses about how many slices are needed.

I think that for a given focal length, aperture and distance to the foreground the number of slices should be mathematically calculable assuming for example a 20% overlap between slices and landscape orientation.

It would be useful for me to have a table such as

Focal      Distance to FG    Aperture  Slices
24mm    0.25mts              F2.8          4
etc...

The DOF numbers should be usable:
http://www.dofmaster.com/doftable.html

I just don't know how to do it. Can anyone give me a hand here?

Thanks!!
Luis

Luis Argerich

  • Full Member
  • ***
  • Offline Offline
  • Posts: 155
  • Astrolandscaper
    • http://www.luisargerich.com/
Re: Determining number of focus slices
« Reply #1 on: January 13, 2011, 10:21:02 pm »

 ::) ::) ::) ::)

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8913
Re: Determining number of focus slices
« Reply #2 on: January 14, 2011, 04:34:48 am »

Hi All,

I've been using focus-stacking to extend the DOF of some of my shots without running into diffraction problems.
So far I've been doing in-camera educated guesses about how many slices are needed.

I think that for a given focal length, aperture and distance to the foreground the number of slices should be mathematically calculable assuming for example a 20% overlap between slices and landscape orientation.

It would be useful for me to have a table such as

Focal      Distance to FG    Aperture  Slices
24mm    0.25mts              F2.8          4
etc...

The DOF numbers should be usable:
http://www.dofmaster.com/doftable.html

I just don't know how to do it. Can anyone give me a hand here?

Hi Luis,

The theory to make such a table is not too difficult, and the underlying formulas can be put in a spreadsheet to test different scenarios. You can also test different scenario's with on-line calculators, and put the results in a table that can be printed out and used in the field.

What you need to do, is pairing the rear DOF of a given focus distance with the front DOF of the next more distant focus distance, and repeat that for a number of DOF slices. Then put the focus distances in a table together with the focal length and aperture used. For focus stacking to work, you should use a strict COC assumption if you want to avoid alternating zones of more and less focus. I use a very critical COC parameter of 1.5x the sensel pitch to make sure that there is virtually no visible difference in sharpness in each DOF zone. That will result in a lot of slices if you need to span a significant distance range.

A program like Helicon Focus (Pro version) makes all that a lot easier with its companion program Helicon Remote. It allows to shoot tethered and based on front and rear of the total distance that needs to be covered it will automatically step the camera through the exposures, however many are required. The latest version also allows to combine that with bracketed exposures for HDR scenes. It does produce huge volumes of files very quickly though, but that's a concequence of stacking.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

Luis Argerich

  • Full Member
  • ***
  • Offline Offline
  • Posts: 155
  • Astrolandscaper
    • http://www.luisargerich.com/
Re: Determining number of focus slices
« Reply #3 on: January 14, 2011, 12:33:40 pm »

Ty for your comment!

I know Helicon Remote but that is impossible to use on the field for landscapes. I normally use the DOF preview button plus LCD chimping to check if I need 2, 3 or more slices, I think a table can make that easier.

I was wondering if there was a way to derive a formula (there should be) that will give you the # of slices. The iterative method you mention certainly works but takes a lot of manual work for each focal-lenght, aperture and distance to the foreground.

jeremypayne

  • Guest
Re: Determining number of focus slices
« Reply #4 on: January 14, 2011, 12:51:19 pm »

The latest version also allows to combine that with bracketed exposures for HDR scenes. It does produce huge volumes of files very quickly though, but that's a concequence of stacking.

Once and only once did I attempt a focus-stacked, stitched and bracketed HDR.

Just looking at all the files in LR made me dizzy. 

It would have to be one hell of a vista before I ever try that again!
Logged

elf

  • Full Member
  • ***
  • Offline Offline
  • Posts: 244
Re: Determining number of focus slices
« Reply #5 on: January 15, 2011, 01:58:10 am »

Here's one I did for macros.  http://www.efrench.members.winisp.net/programs/DOF-Macro.xlsm
 It's mainly for bellows draw, but DOF can also be determined.  The formula for macros is a bit different than for normal shots. 

There's a few links in this thread on Max Lyons TuFuse forum: http://www.tawbaware.com/forum2/viewtopic.php?t=6000
Logged

dwswager

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1375
Re: Determining number of focus slices
« Reply #6 on: October 13, 2014, 07:19:46 pm »

I'm building this spreadsheet right now so when I finish, I can post if you want it.

As I understand it, and I'm no expert, there are 2 issues to address:

1. Taking enough slices at appropriate focus distances such that you don't get banding of infocus and out of focus parts of the image.

2. Not taking too many slices such that the software can't actually pick out the apprpriate parts of each image to composite. 

There is an iPhone app called FocusStacker that does this, but I don't use iOS and apparently it defaults to f/11.


Logged

Manoli

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2296
Re: Determining number of focus slices
« Reply #7 on: October 14, 2014, 04:18:35 am »

There is an iPhone app called FocusStacker that does this, but I don't use iOS and apparently it defaults to f/11.

A good reason to use iOS and no, not true

I'm building this spreadsheet right now so when I finish, I can post if you want it.

Alternatively use Bart 's DOF tool (section3) available as a web page
http://bvdwolf.home.xs4all.nl/main/foto/dofplan/dofplan.html






[/quote]
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8913
Re: Determining number of focus slices
« Reply #8 on: October 14, 2014, 04:46:45 am »

I'm building this spreadsheet right now so when I finish, I can post if you want it.

As I understand it, and I'm no expert, there are 2 issues to address:

1. Taking enough slices at appropriate focus distances such that you don't get banding of infocus and out of focus parts of the image.

2. Not taking too many slices such that the software can't actually pick out the apprpriate parts of each image to composite.  

There is an iPhone app called FocusStacker that does this, but I don't use iOS and apparently it defaults to f/11.

Hi,

Not to discourage the educational exercise of rolling one's own solution, but I've published a webpage based tool that (in addition to loads of other things) also calculates the required number of focus slices and their reach, in section 3 of the tool. It could be simplified for the focus stacking task alone, but the other parameters are also needed for proper input parameters.

Without the proper input parameters, there is a risk of over-specifying the number of slices, e.g. when only small output is required. Pixel perfect stacks may require huge numbers of slices, which are also hard to create for landscapes (how does one dial in the exact focus distance?). Some clever DIY solutions with tape might do the trick for lenses with an external focus distance indicator. There are also utilities (e.g. Helicon Remote) that allow to remotely control the stacking operation for lenses that allow electronic focus control.

Cheers,
Bart

P.S. Ah, 'Manoli' beat me to it ;)
Logged
== If you do what you did, you'll get what you got. ==

dwswager

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1375
Re: Determining number of focus slices
« Reply #9 on: October 14, 2014, 11:59:55 am »

Hi,

Not to discourage the educational exercise of rolling one's own solution, but I've published a webpage based tool that (in addition to loads of other things) also calculates the required number of focus slices and their reach, in section 3 of the tool. It could be simplified for the focus stacking task alone, but the other parameters are also needed for proper input parameters.

Without the proper input parameters, there is a risk of over-specifying the number of slices, e.g. when only small output is required. Pixel perfect stacks may require huge numbers of slices, which are also hard to create for landscapes (how does one dial in the exact focus distance?). Some clever DIY solutions with tape might do the trick for lenses with an external focus distance indicator. There are also utilities (e.g. Helicon Remote) that allow to remotely control the stacking operation for lenses that allow electronic focus control.

Cheers,
Bart

P.S. Ah, 'Manoli' beat me to it ;)


Thanks.  I'm not looking for perfect in landscape because even things that are stationary, are actually moving or vibrating to some degree.  Just trying to learn.  I'm an engineer so I like to know WHY!  I try not to let the theoretical interfere with the practical and let the left brain go crazy sometimes, but for a right brain guy, it is tough sometimes.
Logged

dwswager

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1375
Re: Determining number of focus slices
« Reply #10 on: October 14, 2014, 12:10:58 pm »

A good reason to use iOS and no, not true

Alternatively use Bart 's DOF tool (section3) available as a web page
http://bvdwolf.home.xs4all.nl/main/foto/dofplan/dofplan.html

Yes, a good reason, but too many bad reasons so I use a 2 year old Galaxy Note II soon to be a Note 4, though I own a lot of AAPL stock so keep buying em!

I had heard there is no way to change the f-stop in FocusStacker, so I assume he was just using f/11 or setting it to the smallest aperture possible based on diffraction limits.  Glad to hear it isn't so limited.
Logged

Hening Bettermann

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 945
    • landshape.net
Re: Determining number of focus slices
« Reply #11 on: October 14, 2014, 05:51:24 pm »

> Bart: Some clever DIY solutions with tape might do the trick for lenses with an external focus distance indicator.

In this thread
http://www.luminous-landscape.com/forum/index.php?topic=62513.new;topicseen#new
bill t. has advised one such method.

 

dwswager

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1375
Re: Determining number of focus slices
« Reply #12 on: October 16, 2014, 09:55:43 am »

Hi,

Not to discourage the educational exercise of rolling one's own solution, but I've published a webpage based tool that (in addition to loads of other things) also calculates the required number of focus slices and their reach, in section 3 of the tool. It could be simplified for the focus stacking task alone, but the other parameters are also needed for proper input parameters.

Without the proper input parameters, there is a risk of over-specifying the number of slices, e.g. when only small output is required. Pixel perfect stacks may require huge numbers of slices, which are also hard to create for landscapes (how does one dial in the exact focus distance?). Some clever DIY solutions with tape might do the trick for lenses with an external focus distance indicator. There are also utilities (e.g. Helicon Remote) that allow to remotely control the stacking operation for lenses that allow electronic focus control.

Cheers,
Bart

P.S. Ah, 'Manoli' beat me to it ;)

Bart,

Was wondering if you can answer or point me to a reference for how to adjust the CoC to account for diffraction.  While your tool is both fascinating and educational, there isn't any theory attached and it clearly wasn't designed for the purpose I have in mind.  I simply want to start with a CoC and adjust for diffraction based on the Sensor/Pixel size and aperture.   The Image attached shows basically what I'm looking for, but does not address any theory nor how to adjust the CoC in to get equivalent near and far limits for total blur size limits.

Example...Lets say I use the Zeiss formula d/1730.  For a D7100 that would give a CoC of about 0.016mm.  What is the math necessary to adjust this value in the DOF calculations to account for diffraction blur at a particular aperture?

The other thing missing in almost all the discussions are where diminishing returns and practical realities overwhelm the theoretical computations.  Basically, when 3 slices are essentially the same as 5 slices?



Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8913
Re: Determining number of focus slices
« Reply #13 on: October 16, 2014, 11:12:12 am »

Bart,

Was wondering if you can answer or point me to a reference for how to adjust the CoC to account for diffraction.  While your tool is both fascinating and educational, there isn't any theory attached and it clearly wasn't designed for the purpose I have in mind.

Hi,

No problem. Diffraction as a CoC parameter is a bit tricky, because its effect is a gradual reduction of (micro-)contrast, no hard disk-like CoC cut-off like with defocus. That's why I've chosen to implement it as a warning that the MTF at Nyquist is reduced to a certain percentage. It's only when it reduces the contrast to zero, that I also let it increase the CoC. The theory (or here) is built into the functionality.

Diffraction reduces the MTF to zero at a spatial frequency of; cycle/mm = 1 / (wavelength x aperturenumber) or higher frequencies (e.g. 1/(0.000564 x 16) = 110.8 cy/mm or 4.512 micron pixel size , for 564nm luminance weighted data at f/16). Different wavelengths will have different zero MTF cut-offs.

For Focus stacking I adopt the strict rule that the CoC diameter, and/or the Diffraction diameter (of the first Airy disk zero, which accounts for about 83.8% of the diffracted signal), never exceeds the size of 1 sensel. That would mean that focus slices exactly join at their DoF boundaries, no need to use a multiplier for additional overlap.

Quote
The other thing missing in almost all the discussions are where diminishing returns and practical realities overwhelm the theoretical computations.  Basically, when 3 slices are essentially the same as 5 slices?

Well, that's where the viewing distance of the result comes in ... One could also use the amount of downsampling or upsampling as a parameter for pixel perfect slice depth. When the differences in (observed/perceived) sharpness are smaller than some lower threshold (whether expressed in pixels or angular resolution), then that's where I'd draw the line of relevance.

We can technically calculate where the DOF zone of one slice starts and ends, which is where the next slice's DOF zone would have to start or end. But when we do not magnify our image to the level where we can visually discriminate between individual pixels then we're being too strict and will produce more/thinner slices than necessary.

Another element is, how accurately/consistently can we dial in those required focus distances? That's where tools like Helicon Remote and similar camera focus controllers can help a lot.

Cheers,
Bart
« Last Edit: October 16, 2014, 11:20:49 am by BartvanderWolf »
Logged
== If you do what you did, you'll get what you got. ==

dwswager

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1375
Re: Determining number of focus slices
« Reply #14 on: October 17, 2014, 11:05:40 am »

Ok, I just tried Helicon Remote with my Samsung Galaxy Note 2.  Gonna take some learning.

My only issue is that it seemed to calculate way more shots than I would think necessary.

26mm, f/8, D7100.  Near focus object was about 2.8ft and far focus object was about 19 ft and it calculated 12 images.  Think I might have done something wrong setting the A and B focus points.

Thanks for all the help!
Logged

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8913
Re: Determining number of focus slices
« Reply #15 on: October 17, 2014, 12:42:24 pm »

Ok, I just tried Helicon Remote with my Samsung Galaxy Note 2.  Gonna take some learning.

My only issue is that it seemed to calculate way more shots than I would think necessary.

26mm, f/8, D7100.  Near focus object was about 2.8ft and far focus object was about 19 ft and it calculated 12 images.  Think I might have done something wrong setting the A and B focus points.

I don't think it's wrong, my tool calculated 11 images. Close focusing will generate the need for many more slices (due to the limited close-up DOF).

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==
Pages: [1]   Go Up