Go to a  "printer friendly" view of this message which allow an easy print Printer-friendly copy Go to the page which allows you to send this topic link and a message to a friend Email this topic to a friend
Forums Lobby MASTER YOUR VISION - BY SPECIALTY Micro, Macro & Close-up (Public) topic #46700
View in linear mode

Subject: "How to calculate the focus increments when stacking" Previous topic | Next topic
mahasuresh Registered since 03rd Jan 2008Tue 24-Jan-12 05:12 PM
447 posts Share on Facebook Share on Twitter Share on Linkedin    Click to send email to this author Click to send private message to this authorClick to view this author's profile
"How to calculate the focus increments when stacking"


Plano, US
          

Hi

I am trying to try some focus stacking. I have a very cheap focus rail. Can any one tell me how to calculate the Focus increments? I think it depends on the DOF for a particular aperture etc, but i would stop my guesses here and leave it to the experts to help.

As always, your inputs are appreciated.

Thanks
Suresh

Visit my Nikonians gallery.

Visit my Nikonians gallery.

Visit my Nikonians gallery.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

Replies to this topic
Subject Author Message Date ID
Reply message RE: How to calculate the focus increments when stacking
DeanAZ Moderator
24th Jan 2012
1
Reply message RE: How to calculate the focus increments when stacking
buddyro48 Silver Member
27th Jan 2012
4
Reply message RE: How to calculate the focus increments when stacking
rb4good Silver Member
24th Jan 2012
2
Reply message RE: How to calculate the focus increments when stacking
domer2760 Silver Member
27th Jan 2012
3
Reply message RE: How to calculate the focus increments when stacking
mahasuresh
28th Jan 2012
5
Reply message RE: How to calculate the focus increments when stacking
jarvicj Silver Member
03rd Feb 2012
6
Reply message RE: How to calculate the focus increments when stacking
domer2760 Silver Member
03rd Feb 2012
7
Reply message RE: How to calculate the focus increments when stacking
Vlad_IT Silver Member
06th Mar 2012
8
Reply message RE: How to calculate the focus increments when stacking
TashSt Silver Member
06th Mar 2012
9
     Reply message RE: How to calculate the focus increments when stacking
domer2760 Silver Member
07th Mar 2012
10
          Reply message RE: How to calculate the focus increments when stacking
TashSt Silver Member
07th Mar 2012
11

DeanAZ Moderator Expert nature photographer Nikonian since 28th Apr 2007Tue 24-Jan-12 09:26 PM
3707 posts Share on Facebook Share on Twitter Share on Linkedin    Click to send email to this author Click to send private message to this authorClick to view this author's profile
#1. "RE: How to calculate the focus increments when stacking"
In response to Reply # 0


Phoenix, US
          

I don't have a focus rail but if I am manually adjusting the focus on the lens I move it the smallest amount I can. I typically use software to control the focus while my camera and subject are in a fixed position. I try for smaller steps and more images in general as it is easy to discard extra frames and impossible to retake images after the fact. With a rail you can move the camera in a more precise fashion.

You may want to use a ruler as a subject and do a few tests to see what will work for you. With a wider aperture you have a shallower DOF and will need more images to get complete coverage within the overall DOF you are after. I would not use the DOF at the aperture you are using as the increment, however. If the DOF was 1 cm, you should move the rail a distance less than 1 cm. Just as when you are stitching panoramas you need some overlap between the images side to side, with stacking you need overlap front to back between frames to avoid processing artifacts where the software can't find anything suitably sharp in a region among all the images in a stack.


Dean
Phoenix, Arizona USA
Nikonians Team Member
Website: The Splendid Silence of Light

Recent Trips: Grand Canyon 2012 Glen Canyon 2012 West Clear Creek

Visit my Nikonians gallery.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

    
buddyro48 Silver Member Nikonian since 12th Feb 2009Fri 27-Jan-12 11:55 PM
235 posts Share on Facebook Share on Twitter Share on Linkedin    Click to send email to this author Click to send private message to this authorClick to view this author's profile
#4. "RE: How to calculate the focus increments when stacking"
In response to Reply # 1
Fri 27-Jan-12 11:56 PM by buddyro48

Santa Maria, US
          

Hi Dean,

Could you elaborate on the .."I typically use software to control the focus"...statement in your post..??

Just when I start to think I am getting close enough to understanding the "Focus Stacking" information to try it myself, something else gets tossed at me that make me wonder if I do understand it..

Thanks much,
Michael

Visit my Nikonians gallery.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

rb4good Silver Member Nikonian since 22nd May 2006Tue 24-Jan-12 11:14 PM
4166 posts Share on Facebook Share on Twitter Share on Linkedin    Click to send email to this author Click to send private message to this authorClick to view this author's profile
#2. "RE: How to calculate the focus increments when stacking"
In response to Reply # 0


Rocky Hill, US
          

Suresh, check out "Macro Focus Rail First Attempt" by scenicshutterbug,which is also on this page.

Rick

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

domer2760 Silver Member Fellow Ribbon awarded for his frequent assistance to other members by sharing his perspective, skills and expertise, especially with infrared and macro photography. Nikonian since 23rd Oct 2010Fri 27-Jan-12 05:50 AM
731 posts Share on Facebook Share on Twitter Share on Linkedin    Click to send email to this author Click to send private message to this authorClick to view this author's profile
#3. "RE: How to calculate the focus increments when stacking"
In response to Reply # 0


Ann Arbor, US
          

Suresh contacted me directly after reading my response to Karen (senicshutterbug) in the “Macro Focus Rail First Attempt” thread. Suresh asked for some examples of how to do these calculations. I thought I would embellish my reply and post it here.

First, the disclaimers.
1. This is not the only way to do focus stacking. These are merely examples of how to use a focus rail to move the camera.

2. I apologize to all of those Nikonians who take stunning hand-held focus stacks. This discussion is directed toward people who are just getting started.

3. My final disclaimer is that I am a scientist by profession and I sincerely apologize to those of you who have a low tolerance for geek-speak .

General Parameters

A. Use Aperture Priority or Manual Exposure. Settings must remain constant while taking the stack or you will have perspective problems (trust me, it makes a mess). P mode means “Poor” in focus-stacking parlance.

B. Use center weighted or matrix metering. With spot metering, your stack will contain dark and light images as the metering spot moves over light and dark areas.

C. Manual focus works best. (I did not believe at first, but I do now). This means that your dedicated focus-stacking lens can be an older, less expensive manual focus lens. I use a $35.00, 50mm series E MF lens on a bellows for some of my focus stacking.

D. You will need a sturdy tripod or support base and a remote release. Turn off the VR.

OK, how do we do this?

1. Compose the photo and focus sharply on one area of the subject.
2. Measure the distance from the end of the lens to that focus point. This is your subject distance.
3. Plug the appropriate information into a DOF calculator such as the one at http://www.dofmaster.com/dofjs.html to obtain the thickness of the in-focus slices. Some DOF calculators (e.g., the one from the Nikonians) provide the data as near focus and far focus. With these calculators, you need to add the near and far focus distances. The dofmaster calculator provides the total DOF distance and the near and far focus DOF – use the total distance.

First example – focus stack of a large marble

Parameters:
Camera D300
Lens: 105mm Macro lens
Working distance: 25.4 cm (10 inches)
Aperture: f/16

The calculator will tell you that your depth of field is 0.22 cm (0.11 cm in front of, and 0.11 cm behind the focal point).


How Far to Move the Camera on the Rail

You could make your slices by moving the focus rail 2.2 mm (0.22 cm) at a time but that would not give you any focal overlap. Focal overlap is needed so that the stacking software can stitch the images together. For most images, I like a 20% overlap so my slices have to be 20% smaller than the maximum value. The calculation is (2.2- (2.2 x 0.20) or 2.2 x 0.8). You can also get by with less overlap. For instance, the calculation for 10% overlap would be 2.2 x 0.9.

For 20% overlap, your slices are: 2.2 mm x 0.8 = 1.76 mm

For 10% overlap, your slices are: 2.2mm x 0.9 = 1.98 mm

For 5% overlap, your slices are: 2.2mm x 0.95 = 2.09 mm

This tells you that your slices have to be around, but not more than 2 mm. You cannot accurately move the camera 1.76 mm so practically speaking, this means you move the rail 2 mm at a time.


How many slices to shoot

Measure the distance from the nearest point you want to be in focus to the farthest point. You can do this with a ruler or by using the rail to focus on the nearest and farthest points. Note the numerical values on the rail for the starting and ending points. The difference is the number of millimeters you need to cover.

Let's say you want to cover 30 mm

Your slices are 2 mm so you will need to take at least 15 photos to cover that distance. I usually take one or two extra just in case. Electrons are cheap.

Generating the Stack

Bring the nearest point into sharp focus. To get this first slice in focus, I turn on Live View and use the magnify button on the back of the camera to zoom in on the nearest thing I want to be in focus. I manually focus the lens and continue from there. Do not touch the lens again until after the stack is finished. Leave the lens on manual focus because the camera will try to focus every time you actuate the shutter. This can cause perspective problems.

Alternative Approaches
You don't have to calculate how many slices to make.
1. You can bring your nearest point of interest into sharp focus and move the focus rail in 2 mm increments until you get to the point on the rail where you previously noted (in the measurement phase) that the last point was in focus (I would add two more photos, but that's me)

2. You can shoot tethered or use Live View and move the rail in 2 mm increments until the last point of interest is sharply in focus.

3. You can do the same as number 2 but use the viewfinder. Please note that touching the camera can cause problems by moving the field of view.

----------------------------

Second example: Flowers

Camera D300
Lens: 24-120mm zoom at 80mm
Working distance: 30 inches
Aperture: f/8

The calculated depth of field is 1.02 inches
-------
20% overlap = 1.02 x 0.8 = 0.81 inches (21 mm)

10% overlap = 1.02 x 0.9 = 0.92 inches (23 mm)

5% overlap = 1.02 x 0.95 = 0.96 inches (24 mm)
-----

20 mm is an easy increment to measure on the rail.
------
If you want to cover 4 inches (100 mm) you will need to shoot at least 5 slices.

Bring the closest point into focus, shoot, move the rail 20 mm, and shoot again for 5 (minimum, 7 for me) photos or until the last important point is in sharp focus.

Macrophotography is a slow and painstaking process. Focus stacking is even more so, especially when you are first starting out.

I hope this is helpful.

Dan
Ann Arbor, Michigan

Visit my Nikonians gallery.

My Flickr Photostream.
Visit my Infrared Photo Blog.
Follow me on Facebook.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

    
mahasuresh Registered since 03rd Jan 2008Sat 28-Jan-12 04:23 PM
447 posts Share on Facebook Share on Twitter Share on Linkedin    Click to send email to this author Click to send private message to this authorClick to view this author's profile
#5. "RE: How to calculate the focus increments when stacking"
In response to Reply # 3


Plano, US
          

Dan. Fantastic explanation. I do not need to look any further on focus stacking. Thanks a lot. It is for this reason, i am with Nikonians. Thanks again!

Visit my Nikonians gallery.

Visit my Nikonians gallery.

Visit my Nikonians gallery.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

    
jarvicj Silver Member Nikonian since 05th Jun 2004Fri 03-Feb-12 04:29 AM
150 posts Share on Facebook Share on Twitter Share on Linkedin    Click to send email to this author Click to send private message to this authorClick to view this author's profile
#6. "RE: How to calculate the focus increments when stacking"
In response to Reply # 3


Henderson, US
          

Dan,
Thanks for the explanation. I've always wanted to try this, but not sure quite what to do. GO BLUE!
Carl

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

        
domer2760 Silver Member Fellow Ribbon awarded for his frequent assistance to other members by sharing his perspective, skills and expertise, especially with infrared and macro photography. Nikonian since 23rd Oct 2010Fri 03-Feb-12 11:53 PM
731 posts Share on Facebook Share on Twitter Share on Linkedin    Click to send email to this author Click to send private message to this authorClick to view this author's profile
#7. "RE: How to calculate the focus increments when stacking"
In response to Reply # 6


Ann Arbor, US
          

Carl,
Glad to help.
One other small thing I do when focus stacking. I shoot in RAW and JPG basic. I load the JPGs into the focus-stacking software and generate the stack. The small JPGs will stack quickly and you can evaluate the resulting image for focus gaps, halos, and other crazy things. If the stack is good, I go back and do the RAW processing on one image and apply those actions to all the other images. It is a waste of time to do post processing on images that will not stack well.

I hope to see some of your stacked images in next month's focus-stacking challenge in this forum.

BTW - Thanks for the GO BLUE shout out but I am a Notre Dame grad. I get a lot of razzing from my MICHIGAN friends on certain days of the year.

Dan
Ann Arbor, Michigan

Visit my Nikonians gallery.

My Flickr Photostream.
Visit my Infrared Photo Blog.
Follow me on Facebook.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

    
Vlad_IT Silver Member Nikonian since 21st Sep 2011Tue 06-Mar-12 08:55 PM
1023 posts Share on Facebook Share on Twitter Share on Linkedin    Click to send email to this author Click to send private message to this authorClick to view this author's profile
#8. "RE: How to calculate the focus increments when stacking"
In response to Reply # 3
Wed 07-Mar-12 03:43 PM by Vlad_IT

US
          

Last week I bought my first macro lens (Tamron 90 f/2.8) for D7000 and last night bought and I downloaded ControlMyNikon (CMN), as I was impressed with the offered features at the low price.

Not sure what I was trying to achieve, but in one of the tutorial videos for CMN they say that this software works reliably in Focus Stacking mode with AF Nikkors and some Sigmas and they cannot guaranty it will work well for other 3-rd party lenses. I decided to put to test my Tamron 90 AF as well as to see how focus stacking works in my 2-days old Photoshop CS5. (Yep, NAS slowly gets under my skin, LOL). I definitely wanted to do some tests just to prove everything is working fine. I will try some more “artistic” focus stacking this weekend.

I was limited in lighting choice as did not want to use speedlight in the middle of the night, so I settled on Black & White shopping label and a tabletop lamp. I did in-camera custom WB, Aperture Priority mode set to highest aperture at my focus distance (f/4) and +1 exposure compensation. I found that for my working distance (around 7 inches) I needed 40 steps in increment of 1 step (the most finest possible for lens’ AF mechanism) to cover just over 1.5 inches of DOF at f/4, as i set label at some angle to the lens. I also set exposure delay (1 second for D7000). just to minimize blur from a mirror slap.

Given my notebook has only 4GB of RAM I used jpeg normal image quality, instead of RAW. The bottom line, some 45 images later, I loaded them from LR to PS CS5 as layers and processed for alignment and focus stacking. It took over 30 minutes, maybe even closer to 45 minutes – I did not time the process as I did not know what to expect – I got final TIFF image in whopping 3.2GB size. I had to crop out the edges though, downsampled it to 1200 pixels at the longest side and total size under 300k. No other post processing or sharpening.

And the reason I’m impressed with this simple image is because I had several shots with no black ink in focus (like between “H 07” and the barcode itself) – Each of the program did exactly what they supposed to do and I can see hi-res TIFF image the paper’s texture!!! Nothing got messed up!

For new CMN users – Camera needs to be preset before tethering to a single focus point, AF-S mode and Release priority as opposite to default value for AF-s “Focus Priority”. Otherwise camera will not take a picture if AF system cannot detect proper focus.


Best regards,
Vlad



Attachment #1, (jpg file)

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

    
TashSt Silver Member Fellow Ribbon awarded for her great compositional insight and talent, as she is always willing to experiment with new perspectives. This is particularly evident in the exceptional, captivating images she posts in the Nude Forum where she always shares in the Nikonians spirit.
Nikonian since 23rd Jul 2011Tue 06-Mar-12 09:49 PM
543 posts Share on Facebook Share on Twitter Share on Linkedin    Click to send email to this author Click to send private message to this authorClick to view this author's profile
#9. "RE: How to calculate the focus increments when stacking"
In response to Reply # 3


AU
          

this is probably one of the best posts I have seen on this subject.

Being a 'beginner' focus stacker myself, it was very well communicated information.









(unfortunately, for me, I have discalculia so can't do the numbers thing, and use my eye to pull the focus for the next shot, so no rail.. but why does the rail move the camera and not focus pull? is it just another way to kill a cat?)

www.impressstphotography.com

Visit my Nikonians gallery.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

        
domer2760 Silver Member Fellow Ribbon awarded for his frequent assistance to other members by sharing his perspective, skills and expertise, especially with infrared and macro photography. Nikonian since 23rd Oct 2010Wed 07-Mar-12 12:48 AM
731 posts Share on Facebook Share on Twitter Share on Linkedin    Click to send email to this author Click to send private message to this authorClick to view this author's profile
#10. "RE: How to calculate the focus increments when stacking"
In response to Reply # 9


Ann Arbor, US
          

Tash,
The ControlMyNikon program described by Vlad (above) automates the focus shifting that you do manually. Technically speaking, focus shifting can be another way to "skin the cat." Focus shifting has been avoided in the past because some (cheaper and older) lenses change their focal length (and/or aperture) as you adjust the focus. Focus shifting with these lenses will cause perspective problems that software cannot correct. The "move the camera" approach works for all types of lenses.

People who use the handheld "move the camera" approach often set up their camera at a fixed focus point (they also set up their flash arm to point speedlight(s) at this point). When in the field, they lean toward the subject until it is in focus, snap, lean in further, snap, and repeat. This appears to provide a steadier platform for handheld focus stacking because you don't move your hands and your forehead stays firmly against the camera. You may find other ways that work for you.

As for your discalculia, didn't your teachers tell you that Algebra could save your life some day?

Cheers!

Dan
Ann Arbor, Michigan

Visit my Nikonians gallery.

My Flickr Photostream.
Visit my Infrared Photo Blog.
Follow me on Facebook.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

            
TashSt Silver Member Fellow Ribbon awarded for her great compositional insight and talent, as she is always willing to experiment with new perspectives. This is particularly evident in the exceptional, captivating images she posts in the Nude Forum where she always shares in the Nikonians spirit.
Nikonian since 23rd Jul 2011Wed 07-Mar-12 09:38 PM
543 posts Share on Facebook Share on Twitter Share on Linkedin    Click to send email to this author Click to send private message to this authorClick to view this author's profile
#11. "RE: How to calculate the focus increments when stacking"
In response to Reply # 10


AU
          

Hi dan

ah yes, thanks for that. It makes perfect sense wrt the DOF.. I should have already remembered that (only it doesn't seem to be a problem with the macro lens I have).
much much more learning for me in this area.


If Algebra is going to save my life I am doomed... doomed and I won't even be able to figure out why..


www.impressstphotography.com

Visit my Nikonians gallery.

  

Alert Printer-friendly copy | Reply | Reply with quote | Top

Forums Lobby MASTER YOUR VISION - BY SPECIALTY Micro, Macro & Close-up (Public) topic #46700 Previous topic | Next topic


Take the Nikonians Tour and learn more about being a Nikonian Wiki /FAQ /Help Listen to our MP3 photography radio channels Find anything on Nikon and imaging technology - fast!

Copyright © Nikonians 2000, 2014
All Rights Reserved

Nikonians®, NikoScope® and NikoniansAcademy™ are trademarks owned by Nikonians.org.
Nikon®, Nikonos® and Nikkor® are registered trademarks of Nikon Corporation.