Nature Photographers Network
This is the preserved archive of the original Nature Photographers Network. The community continues at naturephotographers.network.

stacking - image size changes with focus

Discussion

7 replies
Posted by Dan Schwartz on July 11, 2017 at 4:29 PM
I have a Nikon D7200 with the 18 - 140 zoom. I've started trying focus stacking and I noticed that the image size changes significantly as I change the focus. Is this because of the zoom lens structure, would it still do that if I got a macro lens (I'm looking at the Sigma 105)?  Does the change in image size interfere with PS blending the stack?
Stacking is usually at 140mm, on tripod, sometimes with lens extensions for macro - same size changes.
Thank you very much.
Dan Schwartz
Posted by Dennis Plank on July 11, 2017 at 11:53 PM
Hi Dan:

I don't know of any difference between a general purpose lens and a macro lens in this regard.  I believe even the built-in PS blending can adjust for it automatically.  I haven't done a huge number of stacks, but I've never had an issue on the ones I've done.
Posted by Philip Hodgkins on July 12, 2017 at 7:40 AM
PS uses "content aware" to fill in the gaps. Sometimes it works and sometimes it doesn't. Stacking programs follow an algorithm to proportionally expand the succeeding images. The trick is to make as many or as few shots to get all the sharp edges. Sometimes it works and sometimes it doesn't. More often subject movement creates an insoluble editing problem. Then, all you need to do is delete the ones that don't come together or edit when possible.
Posted by Wick Smith on July 12, 2017 at 7:53 AM
Dan,
I had the same problem with a 100mm macro lens (non-zoom).  When I changed the focus to capture different layers of focus, the size of the final image changed slightly.  I was told by someone on this forum (I don't remember who, but it was a big help) at the time that this is a standard occurrence with almost any lens, even prime lenses.  

His suggestion was to leave room around the edges of a subject when shooting your stacking layers.  When you drop the photos into Photoshop and auto-align them, then auto-stack for focus sharpness, you'll get a bit of weirdness around the edges due to the differing focal lengths of each image.  You can then crop out the edges and end up with what you need. clear and crisp.  

I hope this helps.  
Posted by John Reed on July 12, 2017 at 9:47 AM
Interesting.  I've had the same problem with flowers where there will remain an out of focus fringe around one blossom due to it being out of focus on one of the images but "covered" by the sharp image of the same flower from another shot in the stack.  I have found no way to get around that other than tedious retouching around the edges of the sharp flower which then makes the whole process frustrating and not worth the time.  If there is a way around this, by all means point me to it.
Posted by Mark Seaver on July 12, 2017 at 11:02 AM
Dan, the change in image size either with changing focus or changing camera position is fundamental optics, there are subtle differences if you move the camera versus if you change the focus, but all good stacking software takes either approach into account. You can simulate what PS is up to using Wick's method of loading your stack as layers into PS, selecting all layers and do an auto-align image, then you can step through the layers and see that they cover different areas.  To avoid the "wierdness" around the frame edges, make sure that the closest image is the bottom layer, then you can crop to it's area for the final result. 

In my stacking software testing, I found that for macro/close-up stacks PS ALWAYS left small soft spots in the middle of large sharp areas.  At NPN display sizes these soft spots can be ignored, but they will show up in a large print or if displayed on a large monitor.  (I assume that these are due to the "content aware" fill approach that Phil mentions.
Posted by Dan Schwartz on July 12, 2017 at 2:00 PM
Thank you all for your responses and suggestions!
As long as the software takes care of it, I won't worry about the size changes and just keep practicing my technique.
I will alos take a few more shots so I can remove one and still have enough sharpness. At 140mm my min aperture is 5.6 so 3 or 4 seems to be enough for sharpness, though I don't get much separation from the background.
Posted by Igor Doncov on July 14, 2017 at 2:26 AM
It seems to me that the process of focusing a lens is actually changing the focal distance between subject and camera. As you turn the focus ring the distance from lens to sensor is slightly changing. As a result the image is changing (point of view). That's what I always thought. The way to combat it is to use wider lenses and smaller apertures which seems to defeat the purpose of doing focus stacking. I don't have much experience in that but I think I understand the optics causing the files to not align perfectly.