Reversing Order For Focus-Stacked Images

65 views
Skip to first unread message

Kevin Childress

unread,
Aug 7, 2015, 8:34:28 AM8/7/15
to Photography tips, hardware, and software

This may be old news to some but I wanted to share a pleasant discovery I made yesterday when working on my latest macro image. I've been using Zerene Stacker for the last several months for focus-stacking my macro projects. When I first obtained the program I had noticed an option for reversing the order of the image stack (where the ‘normal’ stacking order follows file names progressively) but I hadn't experimented with the option until yesterday. 

For a little background: one of the issues with focus stacking is the final composite typically has to be cropped on all four sides due to overlapping of all the frames being stacked (this is illustrated below). The first two screenshots below show a comparison between composites with the normal stacking order on left and the reversed stacking order on the right. Please ignore the heavy vignette in the comparisons - I'll come back to that in a moment. 

Both images were stacked from the same 124 progressively-focused frames but the two stacking orders show a big difference in results. Look at the top and bottom edges of the image stacked in the normal order. The streaks you see on both edges (most apparent on the bottom) show where each of the overlapping frames occur. The same overlaps occur on the side edges also but are somewhat hidden in the black vignette. The second screenshot shows a 1:1 view of the bottom edge where I measure approximately 480 pixels of overlapping frames. Clearly those overlapped edges get cropped away for the final image, so the point I'm making here is that we lose a lot of image resolution when having to crop away those edges. The amount of overlapped edges you have may differ from project-to-project depending on your focusing technique and how many frames you use for the focus stack. For this particular project, the total difference is approximately 960 pixels side-to-side and approximately 640 pixels top-to-bottom. That's a fair amount of resolution to give up right off the top.



Clearly the overlapped edges are not present in the reversed-order stack. And you may also notice the reversed-order stack shows an apparent larger image, as if there is more magnification in the second image. The apparent difference in magnification is also a result of the stacking order. So by looking at these comparisons it seems that reversed-order stacking is the clear winner, so why not reverse the order of images for all focus-stacking projects? Well, it just depends on one very important element when capturing the frames to begin with, and that involves the technique you use for focusing your lens. 

For those who don't understand focusing prime (non-telephoto) lenses like a macro lens: The main lens used in this project is an 85mm macro lens. It's 85mm, period, the focal length never changes. However, when the focus is adjusted, there are glass elements that move inside the lens. The glass elements move in one direction to focus on things further away from the camera, and move in the opposite direction to focus on things closer to the camera. So while the focal length is always 85mm, there is a perceptible difference in image magnification when the glass elements move during focusing. The next screenshot below illustrates the extremes in focusing that I used in this project. In this comparison the image on the left is the first frame captured which is focused on a point I decided would be the deepest zone of sharp focus. The image on the right is focused on the closest foreground element. You can see the same apparent difference in magnification as with the first screenshot above. 


Now back to the topic at hand which is choosing the order to stack your images. As I mentioned before, it just depends on the technique you use for focusing your lens to begin with. During capture you have to adjust lens focus in one of two ways: Either front-to-back, which means you focus on the foreground first and progressively refocus as you work toward the background. Or, back-to-front, which means you focus on the background first and progressively refocus as you work toward the foreground. As a matter of habit I typically focus front-to-back. There's no particular reason for me doing that - it's just the habit I got into when I started dabbling with focus stacking in late 2012. But for this project I decided to work from back-to-front. For whatever reason it just seemed that I could see things better in that order for this particular subject. When I first imported the files into Zerene Stacker I used the default stack order. After seeing all of the overlapping frame edges I remembered that I captured the frames in 'reverse order' than I typically would, so I reversed the order and allowed Zerene to re-stack the images. 

After seeing the results I then understood why Zerene would offer the option for reversing the order of the images being stackedc. The option is definitely accommodating to whichever direction you choose to focus your lens. If you're using a different program for focus stacking I recommend looking into a way to achieve similar results within that program.

About that heavy vignette: The vignetted area is the difference between the size of the image sensor versus the 'footprint' of the lens I used. This main lens used here is a DX lens shot on an FX body. The camera can 'auto-crop' the full-frame resolution to fit the DX lens footprint if the Auto-DX mode is enabled (which I have always used in the past) and produces 4800 x 3200-pixel images. For this project I disabled the Auto-DX mode to see if I could increase the resolution a bit with my own crop, which I was successful in doing. I was able to scrape out 5823 x 3734 pixels for this one so it does show some nice detail at full size.

And finally, here's the full-size final image from this project. I hope you enjoy!




© Tom Cooper

unread,
Aug 7, 2015, 9:06:34 AM8/7/15
to Photography tips, hardware, and software
For crying out loud, Kevin, all I did was mention focus breathing in one obscure post somewhere, and you go off and write a big long technical article about how to deal with it.
 
You are one obsessed dude. ;)
 
Tom

David Humphreys

unread,
Aug 8, 2015, 10:54:09 AM8/8/15
to Photography tips, hardware, and software
I'd say dedicated rather than obsessed. That's the only way to become as proficient as Kevin is. You don't get that good without putting some serious study into your work. No mean achievement when you know Kevin barely knew which end of a
camera to look through just a few short years ago.

Kevin Childress

unread,
Aug 10, 2015, 9:38:37 AM8/10/15
to Photography tips, hardware, and software
David Humphreys wrote:
... No mean achievement when you know Kevin barely knew which end of a camera to look through just a few short years ago.


Yeah, well, and at times I still screw that up!  Of course I have both of you (literally) to thank for whatever outcome has occurred ...   



© Tom Cooper

unread,
Aug 10, 2015, 11:31:58 AM8/10/15
to Photography tips, hardware, and software
Sorry, I can't give you advice on biomedical imaging. ;)
 
Are you planning on using focus stacking for this?
 
Tom

Kevin Childress

unread,
Aug 10, 2015, 1:03:48 PM8/10/15
to Photography tips, hardware, and software
© Tom Cooper wrote:
Sorry, I can't give you advice on biomedical imaging. ;)
 
Are you planning on using focus stacking for this?


HAHAHAHA!  And no, photo credit goes to David Brown for this one!  :)

 

© Tom Cooper

unread,
Aug 10, 2015, 2:54:31 PM8/10/15
to Photography tips, hardware, and software
It's just as well.  I wasn't looking forward to hearing how you immobilized your eye while you took 32 focus-stacked images every 0.1mm. =8-O
 
Tom

NJIEA

unread,
Sep 28, 2015, 4:02:16 PM9/28/15
to panoramio-...@googlegroups.com
User reported
Reply all
Reply to author
Forward
0 new messages