PDA

View Full Version : Focus Stacking



Jackie Schuknecht
12-27-2014, 07:49 PM
I am trying to learn focus stacking. I was hoping for a tutorial from someone in macro, but maybe it is the "works". So I have a few questions, is it best to work tethered, or can you shoot from live view? Use a rail, or just adjust the focus manually and shoot? The fewer the shots, the less room for error? I had some success today, but just with very simple objects. I would appreciate any help, comments, from people who have some experience. Thanks in advance.

Ron Conlon
12-28-2014, 12:24 PM
Jackie: I had been working on this for some time, but kept putting it off because I felt I had more to learn. I still have more to learn, but I want to get something out there.

As for the number of frames, there are examples of both short and long stacks which are successful in Macro/Flora. The tethering software acquires an excessive number of frames, and can generate a hyperrealistic look. That may not be desirable or worth the disk space and processing power in some cases. So, it depends on what you are after.

I prefer tethered over liveview, because I can get a better, more detailed enlargement of the start and end points.

I have used manual focus and tethering to acquire. Tethering software makes it really easy, although it means more equipment in the field. I have not used a rail, although I used a bellow lens once, and that worked well.






A focus stack is compiled from the in-focus parts from a series of photos at different focal planes. It is most frequently used to compensate for the narrow depth of field in macrophotography but can also be used in other forms of photography.


At magnifications of 1x to 5x or more, the camera is moved on a rail to acquire the focus series--the rail is necessary to make the very small increments in focus which are required at high magnification. At lesser magnification, the focus ring of the lens can be moved manually or automatically with software. Both rail and focus ring result in changing perspective, which is overcome by alignment in software. However the series is acquired, the software works only if the series is ordered, but usually it does not matter if the order is front-to-back or back-to-front.


Most often stacking in software is done with algorithms of the pyramid class. These methods magnify noise, increase contrast and create haloes around high contrast edges. Because of this, the results will be better with low noise, even lighting and low contrast. Halos and other stacking artifacts can be removed by retouching in stacking software.


The ability of stacking software like Zerene to compensate for movement and changing perspective is remarkable. However, best results are obtained if movement is eliminated, so the camera should be on a tripod, the subject not moving. Diffused flash close to the subject and low ISO will ensure that noise and contrast are low, and that lighting is consistent and even.


The discussion groups at http://photomacrography.net are a rich source of information about how to light, acquire and process images at 1x and greater. The DYI ethos there is inspiring.


My experience is limited to two types of stack acquisition: 1) flowers or other large objects lit with flash lighting acquired with manual focus ring adjustment or tethering software and 2) live, slow-moving insects in the environment acquired by rocking with burst shooting with a diffused flash.


Lightbox flower stack acquisition
Setup: A radio-triggered remote flash in a lightbox with the camera on a tripod. The camera in manual mode (1/200s, f6 to f9, ISO 100). The lightbox setup I use is like the one that Steve Maxson describes on this site and elsewhere.
Focus: Tethering is best, liveview is next best. Identify the points of the object closest and farthest from the camera which you want focused. You may want to start and end a little beyond those points to make certain you have included every frame you want--in a stacked image out-of-focus bits can have a bump-on-a-nose prominence. Acquire the stack in software or by manually moving the focus ring. For manual acquisition I look at the focus ring for visual feedback and move it the smallest increment I can. When I move the lens too much and try to go back that usually generates a shot out of sequence which stymies the software, so be confident and soldier forward.

Live insect stack acquisition
It seems incredible that this actually works, but it does. Fire a burst of frames at an insect at high mag with a diffused flash while rocking forward. It certainly isn't successful all the time, but depending on the speed of the insect and the level of magnification, it can work without too much frustration if you aren't too ambitious. Camera settings in the ballpark of f/16 1/200 iso 800 flash manual focus.

Image processing: cleaning up the batch
Inspect the series and discard any frames which are off the near or far ends or otherwise unsuitable. With a light hand adjust the files in batch with a raw editor (ACR, LR etc)--"lightly" is here, because stacking can generate a lot of contrast. Save the files as 16-bit uncompressed tiffs.

Image processing: stacking
Choice of Software: My recommendation is Zerene Stacker. It works on multiple platforms and they have a 30 day free trial. I have also used Helicon Focus and Photoshop. Don't bother with Photoshop, it isn't worth the frustration. Helicon Focus is excellent, but I prefer Zerene because it handles changing perspective and movement better and the stacks look more detailed. There is a freeware stacking program (CombineZP) that others use--it doesn't work on the Mac so I have not tried it.
Choice of stacking algorithm: Zerene and Helicon can generate composites using different algorithms, Pyramid and Depth Mapping. Pyramid gives the contrasty/sharp/detailed appearance, and Depth Mapping a more natural appearance. If you want a hyperrealistic look to your stack, go with Pyramid. If you want that stack of cookies on a plate to look appetizing, go with Depth Mapping. In Zerene, you can do both algorithms and retouch one into the other.
Retouching: Zerene and Helicon have powerful, intuitive retouching tools which allow you to brush in from any frame or other composite from the stack. I have used this mostly in the case of stacks of live insects where the insect moved an antenna during the stack and the composite now has 3 or 6 antennae. Sometimes the composite will have a halo around the object, particularly for high key photos, which can be removed in retouching. Sometimes there are bobbles where objects cross at very different focal planes which need to be retouched. In a handheld stack, the moving camera may result in bobbles at the edges of the frame which can be retouched or cropped out.

Image Processing: finishing touches
Stacking generates a lot detail and contrast, and the studio shots are in a controlled setting so little further processing is required. Sharpening or increased contrast are typically not needed.




Note and tips
1) Tethering software stack acquisition is simple, only requiring you to identify the start and end points. I have used Helicon Remote--I love it. You can more clearly identify where you want to start and end the stack by enlarging the liveview on the laptop. It calculates the focus steps it should make, and acquires the stack on your laptop. You can go have a coffee. It does fequently acquire many more frames than you would do manually, and more than are necessary. You could choose to stack every second image in the series without loss of quality.
2) It may be that some of the difficulty that others have in acquiring stacks comes in manually moving the focus. I use a 200mm Nikkor (and have used a bellows lens on one occasion). This huge, heavy lens has a wonderful smooth manual focus action with consistent resistance and no play. It may be that it is more difficult to acquire the stack with other lenses. Perhaps a focussing rail would be a good alternative to a new lens, although the discussions seem to point to the more expensive rails as the only ones worth the money.

Jackie Schuknecht
12-28-2014, 02:29 PM
Invaluable information Ron, thanks for taking the time and sharing what you have learned so far. Greatly appreciated. I think you have cut off hours of research time and experimentation.

Diane Miller
12-28-2014, 09:42 PM
Yes, great information, thanks from me also. I need to delve further into stacking. Have only scratched the surface.

Ron Conlon
12-30-2014, 06:46 PM
Following are instructions to generate a stack from a large object.


Difficulty increases with magnification, so try a stack at less than macro magnification first. A plate of cookies on a table is just about the right size as a subject. Mount the camera on a tripod, with liveview manual focussing, remote release, manual camera settings, and flash lighting. I used two radio-triggered remote flashes, one diffused flash at low power (~1/64) close to the cookies for directional light, and one flash near full power pointing 45 degrees upward at a wall to provide nondirectional, general light.


Camera settings: (manual) iso 100, 1/200, f8*, manual focus, 50mm f1.4 normal lens


1) Shoot test shots and adjust to get the exposure perfect.
2) Identify the near and far parts that should be in focus. Because out-of-focus parts can look out of place in a stack, pick a wider range than you might need in the end.
3) Manually focus in liveview on the nearest point or just nearer than the nearest point. Take your hand off the lens and fire the shutter.
4) Looking closely at the focus ring for visual feedback, manually move it the smallest increment you can.
5) Take your hand off the lens, fire a shot and repeat 4 and 5 until you have gone past the farthest focus point you identified in step 2.
6) Inspect your files in a RAW editor. Discard extra files from the ends. When batch processing the RAW files keep in mind that stacking adds contrast and detail.
7) Save copies of the adjusted RAW files as 16 bit uncompressed tiffs†.
8) Align/stack the files in Zerene Stacker with both PMax§ and DMap. Save both output files as tiffs.
9) Open in Photoshop, and choose the most pleasing (for the cookies it is likely to be DMap), and adjust to taste.


* Ideally you want the aperture which gives the sharpest image, a few stops down from wide open.
† While Helicon Focus can stack RAW images, it won't use the adjusted RAW files, just the raw RAWs and it outputs a tiff not a RAW file, so I don't see an advantage.
§ You might also want to set Zerene to "retain UDR image" to generate a second version of the PMax output file for another version to choose from.


The cookie stack was assembled from 10 images f/8 1/250s ISO 100 50mm/f1.4G D800E. I used the DMap output from Zerene because it made the cookies look more appetizing, and retouched in some of the PMax UDR output in Zerene because DMap screwed up in some small regions at the back of the plate.


To see how stacked shots of insects are made and to get an idea of the direction you can go, take a look at these detailed instructions (PDF) from Brooke Alexander and Sam Droege of the USGS Bee Inventory and Monitoring Laboratory.


<ftp: ftpext.usgs.gov="" pub="" er="" md="" laurel="" droege="" how%20to%20take%20macrophotographs%20of%20insects% 20biml%20lab2.pdf=""></ftp:>

Nancy Bell
12-31-2014, 01:32 PM
Thank you for all this really helpful information! The cookies look delicious :S3:!

Edward Arthur
12-31-2014, 06:35 PM
I use a focus rail and this software: http://zerenesystems.com/cms/stacker. Good tutorials there as well.

DickLudwig
01-01-2015, 12:43 PM
I use a focus rail and this software: http://zerenesystems.com/cms/stacker. Good tutorials there as well.
I use the same.

Diane Miller
01-01-2015, 05:03 PM
I use the focus ring, incremented as Ron describes. Quick and easy, no additional equipment needed, just a sturdy tripod and light touch. Has always worked well. The big problem with any software is when very 3D objects overlay one another, such as shooting a hibiscus from almost looking straight down into it. Some software handles it well with care in processing (Zerene, and apparently the newest Helicon). Some, such as Photoshop, can't handle it.

I'm going to go make cookies now....

Ron Conlon
01-01-2015, 05:38 PM
The crossing of two objects at very different distances is very challenging for the stacking sofware, and when you look at the individual files you can see why. The near object is blurred and larger when you are focussed on the far object, so you are asking the software to see and reconstruct through or around that blur. The pyramid method is better at this, and it is my impression that Zerene's runs at a higher resolution than Helicon's and it does a better job here too. Still, even with Zerene these crossings need retouching in the stacking software, and some cloning to restore the missing information.

I was leery of spending the money necessary to get a decent rail. Lots of fun can be had without. You can't do without good stacking software, however.

Ron Conlon
01-01-2015, 07:29 PM
My lighbox setup from the back side.

The editor hides links in between less than/greater than pairs, so the link my post above doesn't show. My comment and the link follow.

"To see how stacked shots of insects are made and to get an idea of the direction you can go, take a look at these detailed instructions (PDF) from Brooke Alexander and Sam Droege of the USGS Bee Inventory and Monitoring Laboratory."
ftp://ftpext.usgs.gov/pub/er/md/laurel/Droege/How%20to%20Take%20MacroPhotographs%20of%20Insects% 20BIML%20Lab2.pdf


Here are instructions to make a more challenging stack from a smaller subject, like a small scape. The procedure is similar to the previous, except I have added considerable detail on the lighting used--a lightbox, along with tips for dealing with the greater difficulty.


Camera settings: (manual) iso 100, 1/200, f8, manual focus, macro lens, Tripod and shutter release. Subject in a lightbox (described below).


I have two examples, one manually focussed and one acquired automatically with tethering software.


For both subjects I wanted a dramatic effect, so I shot with a black background in a lightbox. My lightbox is a small plastic "milk crate" with an ~ 6x7 inch hole centered in the bottom, lined with white paper, set on its side. Stores (like Target) now sell white plastic containers for storage which don't require the paper. The flower and remote flash are in the box. The flash is typically at low power (~1/64-1/32) and is pointed straight up in the front corner of the box. I shoot through the hole in the bottom of the box. At a distance of 1-3 feet behind the flower and lightbox is a sheet of black flocked paper (Edmund Optical). Other backgrounds can be used, like oof vegetation photos. The distance of the background from the lightbox can be altered to alter saturation/brightness of the background.


The acquisition steps are the same as for the easy stack above, but the larger magnification makes the focus steps more critical and harder to carry out.


1) Shoot test shots and adjust to get the exposure perfect.
2) Identify the near and far parts that should be in focus. Because out-of-focus parts can look out of place in a stack, pick a wider range than you might need in the end.
3) Manually focus in liveview on the nearest point or just nearer than the nearest point. Take your hand off the lens and fire the shutter.
4) Looking closely at the focus ring for visual feedback, manually move it the smallest increment you can.
5) Take your hand off the lens, fire a shot and repeat 4 and 5 until you have gone past the farthest focus point you identified in step 2.
6) Inspect your files in a RAW editor. Discard extra files from the ends. When batch processing the RAW files keep in mind that stacking adds contrast and detail.
7) Save copies of the adjusted RAW files as 16 bit uncompressed tiffs.
8) Align/stack the files in Zerene Stacker with both PMax and DMap. Save both output files as tiffs.
9) Open in Photoshop, and choose the most pleasing (for the flowers it is likely to be PMax), and adjust to taste.


Instead of manually moving the focus ring as I did in the case of the dill, tethering software can be used to acquire the stack as I did for the autumn clematis. The camera I used for the dill could not focus the lens, so tethering software couldn't automate the process. But even without automation you can use tethering software to give a larger, more accurate preview of the focus.


In the lightbox setup, I use a flashlight or high intensity lamp to throw enough light into the box so that I can pick the end points of the stack. Even with the extra light and live tethered view on the laptop, picking the start and the end can be challenging, as it was for the clematis seeds, where the wispy bits were hard to resolve. In this case I used a wire on a weighted base in the box, moving the end of the wire to the near and far ends of the range so that I could see those points to mark them in the tethering software.


I have used only one software for tethering, Helicon Remote. Other tethering software promises to do the same or similar. After the near and far points are designated, Helicon Remote will calculate the number of focus steps based on the depth/aperture/lens, and acquire the frames giving the flashe(s) enough time to regenerate.


Many of the tethering and stacking programs will work with an automated rail, the StackShot, which is a popular choice (I have no experience with it). The better mechanical rails seem to cost about as much as the automated StackShot.


The dill flower stack was assembled from 24 images f/6.3 1/200s ISO 100 200mm D5100 manually focused for each step. Given a second chance, I probably would have used f/8 and tethering software to acquire the frames. The stack was assembled as a PMax (UDR) output in Zerene, retouched in Zerene to put the stem out of focus by brushing in from an image or two in the series, because I thought it looked better that way.
<http: www.birdphotographers.net="" forums="" showthread.php="" 121912="">http://www.birdphotographers.net/forums/showthread.php/121912


The autumn clematis stack was ~140 files acquired automatically by Helicon Remote. The D800E body is able to focus this lens, has a full frame sensor compared to the D5100 crop sensor and has many more pixels. I stacked versions in Zerene using both the full series and every second frame, with no degradation in quality that I could see. Other experiments I have conducted like this have shown that stacks at about every third (Helicon Remote default) frame begin to show some slight degradation in quality. I had to free up a lot of hard disk space for the stack to compile successfully. A rare frame can be bad due to seeming loss of flash sync, so it doesn't hurt to have a little bit of redundancy, but at the default settings the software is still collecting a silly number of frames. I was mostly curious if there where the limitations for stacking are, and I haven't reached them yet. D800E 200mm, flash, 1/250s f8 iso 100.
<http: www.birdphotographers.net="" forums="" showthread.php="" 125263="">http://www.birdphotographers.net/forums/showthread.php/125263


In Helicon Remote, the "interval" setting determines the fineness of the automated acquisition steps. If you uncheck the Auto button next to the interval, you can reset it to 2, for example, to capture every second step instead of every step at 1.


</http:></http:>

Don Railton
01-08-2015, 07:09 PM
Hi Jackie.

I have just found this thread and don't have time to read through it all right now, but plan to later on tonight after work. Apologies then if I repeat what others have said. I took the current 'image of the week' (lilly). it Was my first serious attempt at stacking and macro photography and I was surprised with the result. Lilly is a 5 image stack where I manually moved the lens. I initially tried stacking with CS6 but was not happy with the result. I actually went to the BPN site to the macro forum to find software/techniques that others were using and found one of Ron's images and that he used Helicon software, which I subsequently downloaded and used to stack the image. I had never used Helicon before and found it quite satisfying to get a good result knowing you know nothing about what you are doing other than using the photography basics. I have since downloaded Helicon remote which can do the acquisition of the stack via a tether where you set the start and end points via live view and Helicon remote sorts out the focus increment and drives the lens.. It makes things even easier. Not delved in other stacking software and I am sure they are good too. The end result is macro photography and stacking is an area I want to spend more time in.. I know this sound like a helicon advert but its actually what I did, hope it helps...

DON

Ron Conlon
01-13-2015, 10:09 AM
The success rate of the following is low, so be prepared for many wasted shots.


Subject: a slow-moving insect, for example in the cool, early morning.


Camera settings: shutter set to burst/continuous, (manual) iso 400, 1/200, f16, manual focus, macro lens, handheld, a flash (~1/64-1/16) mounted on camera or lens to bring light source as close as possible to the subject.


1) Fire some test shots and adjust exposure.
2) Starting at the near focus point of the insect, shoot a burst while rocking forward.
3) Repeat until exhaustion sets in.


There are several difficulties here--getting a series of shots that encompass the insect, movement of the insect, movement of the frame, movement of parts of the insect. The first two difficulties lead to failures, the last two can be dealt with in software.


The first difficulty, encompassing the insect in focus in the series, perhaps can be mitigated with practice but is inherently hard.


The second difficulty, a moving insect, can be minimized by selecting a cold insect, as you might find on a cold morning.


The movement of the frame as you rock forward is handled amazingly well by Zerene Stacker and much less well by Helicon Focus. In Zerene, the edges of the mismatched frames will be useless noise because of the changing framing, but you can retouch the edges from source frames into the composite to restore them with a large brush.


The movement of parts of the insect (say, a movement of an antenna) can be corrected by retouching in software. Select one nice in-focus antenna and erase the others by retouching.


This technique is frequently use by folks who do live insect macrophotography at magnifications greater than 1x. I didn't believe it would work until I tried it myself--actually it works about only 1 in 10 times or less, depending on the magnification. The folks who do this more frequently also have a lot of failed stacks, so it is par for the course.


An example insect stack, handheld rocking forward:
http://www.birdphotographers.net/forums/showthread.php/122842
11 frames, hot-shoe mounted diffused flash, D5100 200mm f10 1/200s ISO 640

Ron Conlon
04-23-2015, 06:19 AM
Just two quick notes on things I have learned more recently.

For a lot of the spring flowers stacked, I find that the PMax stacking in Zerene produces contrast and detail which overwhelms the soft colors of spring, and so many or most look better when stacked using DMap (depth mapping).

The lightbox produces a very even light, and I was wanting some variation, particularly some fall off and directional light. For fall off, I put the flower beyond the light box, rather than in it, and put a window in the back side of the lightbox to limit the size of the light source to just outside the frame. If the flower is close to the lightbox, a nice fall-off of light can be obtained. For directional light, the light box is not shot through, but put to one side of the flower--again with a window to make the light source a little smaller.

Diane Miller
04-23-2015, 10:40 AM
Thanks for the further information, Ron. I just shot some dogwoods this morning with focus stacking -- now to see if I can get a decent result.

Could you post a picture of your new lighting setup? Sounds like the light box is now acting as a very large reflector on a studio light...?

Ron Conlon
04-23-2015, 10:56 AM
I will post a photo. You are correct about the lightbox acting like a studio light/reflector when at the side, but in some setups I can use it somewhat lik a ring light in that I shoot through it.
Starting with the same milk crate lined with white paper with a flash in it and a window cut in the bottom.
Pseudo-ring light: I shoot through windows in the box--the window shown cut into the bottom, and then a second window opposite made by taping a piece of white cardboard with a window in the center over the open end of the box. Flower and camera are outside the box on opposite sides, flower close to the box to generate maximal fall-off, window next to the flower as small as possible without showing up at the edges of the frame for the same reason.
And I can use it like a diffuser by placing it to one side (closing the window away from the flower because I am not shooting through it, and again limiting the size of the window facing the flower.

Ron Conlon
04-25-2015, 07:08 PM
I took such an embarrassingly bad photo of my setup, and the setup is ugly to begin with, so I went with a diagram instead. The impetus was a discussion of Magda Indigo's lighting on photo.net. Magda isn't very revealing, and the discussion didn't lead to any specifics. However, the bottom line was that to get significant fall off the light source needs to be close and small (of course). In contrast to the setup with the subject and the flash inside a box which gives extremely even lighting, the subject is put outside the box, but very close to it, and the size is limited to a window just outside of the camera's view.

Diane Miller
04-26-2015, 01:17 PM
Interesting setup! Thanks for posting. You could change the width of the back window in the second setup, by sliding pieces in from the sides to give the effect of a tall, thin studio lightbox or light strip.

Setups are always ugly, including bird feeders, but what lovely pictures they can render!