While out photographing in nature, we all occasionally find a subject that might be better photographed at another time of day for better lighting conditions. But to delay may result in losing the moment and a change in the subject. A caterpillar crawling by, a dragonfly visiting a patch of flowers, one thing eating another thing, all of these scenes will change in a few moments; never mind waiting until early light tomorrow morning. In the worst of circumstances I’ll make some captures just as a record shot to document I did see the event; however, I will try to alter the lighting conditions, by adding or taking away light if possible, to make a better image capture.
Using flash effectively is often a challenge for many photographers, likely due to the lack of knowledge of how to use it, and for some the belief that anything can be fixed in software. I believe it’s a matter of learning a few techniques and modifying them as needed to fit different situations. Some will question why I didn’t rely on HDR techniques. HDR is difficult to do well; at least well enough so that it is difficult to tell it’s been done. The capabilities of today’s software products to brighten the shadows and darken the highlights may have been possible but for me, it is more work than correcting problems in the camera.[Read more…]
What Works, What Doesn’t
To further understand focus stacking and to compare the good, bad and ugly of Photoshop auto-merge, Helicon Focus and potentially other focus stacking software, I set out to capture sets of images to challenge the technique. I also spent a lot of time attempting to reduce or eliminate the haloing problem on the rattlesnake orchid image stacks. I tried dividing the image sets into smaller groups for stacking then combining the stacked images into another stack. That didn’t improve the image at all. I also tried reversing the order of the images in the stack, which did not improve the image either. One approach that salvaged the set of image captures was to change the objective for that image; merge the captures of the blossoms at the front of the plant instead of trying to have sharp details from front to back of the orchid. The image on the left is a section of the nine slice stack and the one on the right is a section of the stack of the five slices at the front of the subject. All of the background objects (the stem and farthest blossoms) are a softly rendered out-of-focus.
After photographing flowers, mushrooms, spiders and water drops, I now had 30 sets of image captures made to support my experiments with focus stacking. The first thing I did was to process the same sets of image captures in Helicon Focus software and Photoshop. In many cases one did a better job of merging the slices than the other, and occasionally neither product was able to cope with the elements in the composition.
Helicon Focus software did much better at combining the in-focus background with the in-focus foreground objects of my first image stack, the orchid from Costa Rica. However, that’s not to say that all the Helicon Focus composite images were error free. In fact, new types of errors occurred. In the Costa Rica orchid image, there were no noticeable halos or misalignments, and the composite images looked good with none of the pinched paper or edge overlap effects displayed in the image processed in Photoshop. One thing to keep in mind is that this image has a sharp foreground object, an out-of-focus background, and the images were taken with the camera and subject motionless. Also, Helicon Focus provides two processing methods and encourages the use of both to choose the best result. The image below is the result of Method B.
For convenience, I’ll compare a few of the many focus stacks I made from the subjects I photographed. The comparison of Photoshop and Helicon Focus image stacks is extensive and can be found HERE.
In the photograph of the rattlesnake orchid plant, the halo effects along the stem and the leaves were greatly reduced in Helicon Focus, but other anomalies appeared. At first glance it appears that Photoshop includes more area in the composite image. However, if the image were cropped to eliminate the mismatch along the edges of the image, it would be very similar to the Helicon Focus images. It is important to try both methods in Helicon Focus; Method A produced a nice soft background and Method B resulted in a mottled background, so method A was clearly the choice for this images set. There is a pine needle near the base of the large leaf at the back of the plant. In the Photoshop images it looks normal, but in the Helicon Focus image it appears in pieces. On review of the separate slices, I discovered I had absentmindedly removed the pine needle half way through the capture of the image slices. It hadn’t dawned on me to start the image captures from the start.
Photoshop ignored the fact that all the images did not contain the pine needle and masked the layers to include the whole pine needle in the image. To remove it by changing the masks of the separate layers in Photoshop might be complicated, but Helicon Focus includes a retouching tool that made short work of removing the pine needle from the final image. Another strange error occurs along the lower edge of the image which is very soft in an odd sort of way. Image 1 below is a corner of the method A result above, and image 2 is after retouching using the Helicon Focus retouching tool. It took less than a minute to make the changes.
The mushroom photo sets provided a challenge for both the products. In the most difficult set, two clusters of mushrooms spaced an inch or two apart are in the composition and part of the rear cluster is close to the background. This arrangement provided the opportunity to investigate where the halo artifact appears. The 25 captures were made at f/14. Unfortunately I did not take a similar set at a larger aperture for comparison. Method A worked best of the Helicon Focus options. The entire image is shown at the left and three areas are identified for detailed examination. The red outline indicates the composition of the second mushroom image described.
The cluster of mushrooms at the bottom of the composition (detail A) was a challenge for both Helicon Focus and Photoshop. The three mushroom caps overlap and the moss in the background is rendered in focus since the focus slices extend to include the other cluster of mushrooms. Both have a halo around the edge of the mushrooms that meet the background moss. Helicon Focus (both methods) has less of a halo, but would require some serious editing to use as a large print.
Detail B below shows Photoshop provides a very good composite image of the overlapping mushrooms with nice detail and good separation from the out-of-focus background. Method A of Helicon Focus shows a halo at the top of the mushroom cap, and the detail is lacking due to the somewhat muddy looking colors of the mushroom cap.
Detail C below is a crop that includes parts of three mushroom caps near the background. Photoshop again performed well with good merging of the detail in the mushroom caps, no haloing, and good selection of the background information. The Helicon Focus stack has significant problems rendering detail in the mushrooms and the background. Reviewing the twelve captures in this stack reveals that one or two of the captures had some additional brightness, probably due to a break in the clouds at the time of the captures.
Helicon Focus did not do well with the first mushroom focus stack but performed much better on other mushroom images taken on the same day under similar conditions. The camera was moved closer to capture only the top cluster of mushrooms. Although the aperture remained set at f/14, moving closer reduced the depth of field of each capture. Helicon Focus Method A (below) did the best at assembling the composite images with very few anomalies, and the background was a nice soft rendering. Photoshop did very well also but had a few areas (red circle) where the layer selected was not the optimum sharpness. The locations this happened in this image would have been fairly simple to fix by adding the image with the best detail as a layer to the composite, and mask in the proper sections. Helicon Focus Method B had the worst result with strange green bands and a background that was nearly psychedelic.
Another instance where the use of focus stacking has great benefit for me is when I want a foreground subject sharp, and the background softly out-of-focus, as in the example of the spider and web. I captured six sets of images and Helicon Focus had a difficult time with all of them due to the movement in the spider web, and exacerbated by variations in the lighting.
Photoshop aligned and merged the four captures in this stack, and the only anomaly in the image is circled above. It is a section of out-of-focus web that shows larger than the web in focus and somehow gets chosen as being sharpest. This was easily corrected by erasing the section of the out-of-focus web from two focus slices then merging. The misalignment in Helicon Focus was partially solved by aligning the images in the stack with Photoshop, saving each layer as a new image file, then combining them in Helicon Focus. This process worked well with some of the rattlesnake orchid images, and while Helicon Focus assembled the spider correctly (image not shown), it still had trouble with the spider web in some locations.
At first I was mystified by the haloing effect, but since Photoshop and Helicon Focus were exhibiting the same effect in the same places on the image, it was likely not related to the software processing. In fact it is an optical issue. To prove this to myself I set up an experiment with a subject that could be arranged so that one part of the subject overlapped a more distant part. I chose a branch of berries from a tree growing in my yard. To avoid some of the problems associated with subject movement or changes in brightness, I set up two analog lights indoors, placed the branch of berries in a clamp, and set the camera on a tripod. I also used the Helicon Remote software to control the collection of the focus slices. The closest and farthest points of focus are set in the software, which calculates how many focus steps can be made between the two settings. The user has a choice to reduce the number of captures, but I collected the maximum; I could always eliminate slices from the stack. Capturing the images in this way eliminated some of the sensitivities of the Helicon Focus software which are that the slices should be roughly equal in steps, should be the same brightness, and should be aligned perfectly.
When a subject is out-of-focus it appears as an ill-defined projection of the subject. When the focus point is on a background subject, in this case the stem, the berry is out-of-focus and extends beyond the in-focus berry. When the focus is on the berry, the stem is out-of focus. The area adjacent to the edge of the berry near the stem is impossible to capture in sharp focus, or at least without the out-of-focus foreground image overlapping. The images below were captured using the Helicon Remote acquisition control software with the camera set to an aperture of f8.
Neither Helicon Focus nor Photoshop, or any other focus stacking software, have a chance of correctly capturing and merging images of this type due to the optical phenomenon of the out-of-focus foreground subject making it impossible to get in-focus background subjects adjacent to the foreground subject. The examples below are crops (blue outline) of the full frame image above. The Helicon Focus and Photoshop composite images all fail to render the berry complete, although the Photoshop rendition is clearly closest to complete. Both methods in Helicon Focus appear to have difficulty in selecting the berry parts early in the process select slices that are more out-of-focus than optimum. They also exhibit significant halo around the berry and below the stem. The fourth image is a copy of the Photoshop image layered with two of the slices that include portions of the berry near the edge and the adjacent one toward the front. The image requires additional editing on and near the stick, likely layer masks, to completely correct the red color halo on the stick. Similar editing can be done on the Helicon Focus images using the included Retouching tool although it would most likely require some work using the masking capabilities in Photoshop.
There may also be a benefit to shooting at smaller apertures, and more exploration in that direction is needed. The images below are Helicon Focus processed, one set captured at f/2.8 and the other at f/8. The image comprising slices taken at f/8 are clearly better as expected; the out-of-focus blur should be smaller at a smaller aperture. For this composition editing the f/8 image would be manageable as the only difficult areas are between the berry and the stick. For a more complex image, such as the rattlesnake orchid, editing may be very extensive or even impossible.
Photoshop and Helicon Focus both have their strengths and weaknesses based on my observations. Shooting for focus stacking requires planning, just as photographing panoramas and multiple images for High Dynamic Range processing require planning. The images must be captured with the processing method in mind. For focus stacking, the best results will be had when the camera is on a tripod, the subject does not move, and the lighting is constant. This pretty much defines an indoor setting. However, much of nature is outdoors, where the light can be variable and the subject may move even though the camera is rock solid. While Helicon Focus generally does well at putting the image stacks together, added benefits are the Helicon Remote control of the image capture process and a sophisticated retouching tool. Photoshop provides the ability to align images in the stack that might be offset from others prior to stacking and can handle brightness variations between images in the stack, and I belive I will have some uses for this technique.
Focus Stacking in General
PROs: Useful tool to extend range of sharpness in an image.
—— — Useful to isolate subject and allow background to be rendered as soft focus.
CONs: May not be effective in cases where in-focus foreground objects overlap in-focus background objects.
PROs: Auto-Align corrects misalignments of captures prior to merging.
—- — Auto-Merge handles variations in color and brightness in captures.
CONs: Manual acquisition of image slices can leave gaps.
—— — Retouching final image by correcting mask layers can be tedious.
PROs: Some control over merging process.
— —- Two processes provided with adjustments.
—- —- Sophisticated retouching tool.
—– — Helicon Remote control of camera ensures sufficient number of slices captured.
CONs: Does not tolerate misaligned images in the stack.
—- —- Does not tolerate variation of brightness between images in the stack.
———-Use tripod or other stable mount for camera and lens
———-Control subject movement (shoot indoors, block air movement, subject choice)
———-Stable illumination of composition (subject and background)
———-Equal focus steps (use Helicon remote or other computer control of camera)
———-Smallest aperture appropriate for image
I haven’t yet decided if I will purchase Helicon Focus, but I will certainly continue to experiment with the free trial, which after 30 days limits the size of images produced and includes some marketing information on the stacked image. I’ll try additional images of flowers as I’d like to use the technique in my outdoor macro work, and will come up with methods to control illumination and subject movement outdoors.
Anomalies and (some) Fixes
As I experimented with capture and processing of images for focus stacking, I discovered some recurring anomalies that I had never heard about in any presentation or article that describe the technique. This is most disappointing if you rely on reviews and articles for product information, in addition to the advertisements, when making a purchase decision.
When capturing the images for a focus stacking operation, the focus point of the lens is set on various parts of the subject. This can be done in one of two ways; by adjusting the focus distance while keeping the camera position fixed, or by adjusting the camera position while keeping the focus distance fixed. One image presented three anomalies all related to the varying image magnification as a result of changing the focus distance. The focus slices taken of the orchid image below were accomplished by changing the focus distance with the camera in a fixed position on a tripod.
While the image layers all have the same pixel dimensions, it can be readily seen that the image content is different due to the slight difference in field of view that occurs from changing the focus distance but leaving the distance from the camera to the subject unchanged. The image of the orchid shows the difference in field of view of the closest and farthest focus of the six images after the images have been aligned by Photoshop. Photoshop’s auto-align feature will change the dimensions of the images so that the image content is aligned. Small variations will be ignored and most of the image elements will be aligned.
Keep in mind that the camera position was not changed during the series of images, but only the point in the image on which focus was set. In the above example the center image is the closest point of focus as evidenced by the near tip of the orchid’s sepal in focus.
Once the captures were aligned and merged, several anomalies were evident. One surprise was several series of black dots in the image. It took a while to realize these were out-of-focus insects in the background which were in a different location for each image capture in the stack. If they had been stationary objects in the background, they would have presented as one dot when the layers were aligned. I found the easiest way to eliminate this problem was to use the Spot Removal tool in Lightroom on the six image captures before merging them together. Another phenomenon was what looked like pinched paper along the edges of the merged image. I found that these are transitions between the edges of one image with that of another and larger image. As noted earlier the software changes the size of the image in the stack so that elements of the image are aligned causing an overlap of the edges of one layer with the next layer; the software must occasionally sense this as a sharp feature and preserves it in the composite image. This is easily fixed in the final image with cloning if it occurs, or by cropping if it is prevalent and fixing will take too much effort. Also, with the exception of this image stack the phenomenon rarely occurred on other images stacks that I made. In any case, with Photoshop merged images, edge cropping is often required. The effect along the edges of a stacked image usually present as bands of non-overlapping areas of the farthest slices. These are easily cropped from the composite image. Another edge effect is the transition of an element at the edge of a smaller layer with the same item that extends into a larger layer but at a different focus, which is also easily rectified by cropping. For this orchid I opted to layer in the whole leaf by merging the layers of the stack, added one of the images in the stack of which the leaf looked the best, and used a mask to blend the leaf to the stacked image. With the exception of the leaf in the lower left corner of the image, the edges consisted of distant out-of-focus background and no bands were evident, which is the reason for cloning in the full leaf in the corner.
Having waited all spring, my first images of the rattlesnake orchid were of the flower stem rising from the leaves, whose pattern gives the plant its name. The first image is a single exposure at f/22 and you can see that although the front leaves and the stem are in focus, the background leaves are out-of-focus. The second image is a 13 image stack taken at f/8 and you can see the improvement of sharpness from the front leaf to the back edge of the rear leaf. In addition, f/8 allows the background forest floor to remain somewhat out-of-focus, certainly enough to make for a more pleasing background.
The last two images are the first and last images in the stack and it is obvious by looking at the edges of the leaves near the sides of the image, that a significant shift in magnification as the lens is focused. Not a problem though, as Photoshop clearly accommodates this in the auto-align algorithms. However, it may be a good practice to check the composition at both the closest and farthest focus points to ensure that all important subject elements are in the frame before starting the image capture process. The distance from the front of leaf tip to the distant leaf tip in this example was 3.5 inches.
Now all I needed to do was wait for the blossoms to appear and I would be all set to photograph this interesting orchid. The images above were captured at the end of June, and I waited until early August for the orchid to develop so that some blossoms would be fully deployed.
The dimensions of the orchid’s leaf structure remained the same as the previous images; however, the stem had grown to be nine inches tall with the flower head at the top of the stem being two inches in height. Each fully deployed orchid blossom was .25 inches tall. If I captured the images to include the leaves as well as the blossoms, the details of the orchid would be minimized. My interest being in the structure of the orchid blossoms, I opted to photograph about the top two inches of the flower. Unless otherwise noted, all the images in this article were taken with a 5D Mark II and Sigma 150mm f/2.8 macro lens. The camera and lens were cradled on a beanbag on the ground, and light was provided on the flower by a 160-LED light panel on a small stand with natural light on the background. All of the images in this article have no sharpening applied to the composite images so that the effects of focus stacking can be better observed.
My first set of image slices were taken at f/8 at 1/25th second exposure. I made five captures starting with the focus point on the blossom in the lower left of the image. There is some image shift in the captures as I had to press buttons on the back of the camera to change magnifications on the display, and the camera position shifted slightly for each image since it was on a bean bag close to the ground. While a more stable tripod is preferred, this setup was adequate since the alignment function in Photoshop corrects the slight image shift. The five captures were selected in Lightroom, exported to Photoshop as layers in a single image, auto-aligned and auto-blended. The final image was cropped to eliminate dead space to the right of the flower.
A second set of captures was made with the camera/lens at its greatest magnification (closest focus). I took seven images from front to back at f/8 at 1/25th second exposure. The seven captures were selected in Lightroom, exported to Photoshop as layers in a single image, auto-aligned and auto-blended, and then cropped slightly to trim the edges. The resulting image looked good at first glance, but some areas of the image looked odd. The edges of some of the blossoms in the front of the plant appear to have halos and this occurs when there is another orchid or stem behind it. The stem is in focus except in areas near the edge of a blossom.
There are no less than 16 areas in this image that exhibit this effect. Is it a shortfall of the Photoshop auto-blend algorithms? I decided to process the same captures with the Helicon Focus software which is designed specifically for focus stacking, taking advantage of their 30-day free trial. The resulting stacked image, using the same captures as the previous image, was initially disappointing since the software was specifically for merging focus slices.
The two images below are an enlargement of the Photoshop auto-blend (left) and the Helicon Focus (right) processed images. On the left image, all three circles identify an out-of-focus band around the orchid. In the right image, the red area is much the same in both images. The blue area is handled better in Helicon Focus; there is still an out-of-focus band, but it is smaller. In the green area, it was not better, just different, having a different type of haloing in the Helicon Focus image. However, the structure of the blossom parts were much better handled in Helicon Focus, and obvious errors in the Photoshop merged image are identified by black circles. For convenience, a side-by-side collage of the two images is provided below.
There was another anomaly in the Helicon Focus composite image; it did not handle the out-of-focus background very well. After seeing this, I went back to the original captures and saw that the background of the flower did change brightness from image to image. The light on the flower was stable as it was lit with an LED lamp; however, the background (forest floor) was naturally lit and no measures were taken to control that illumination. The passing clouds varied the light on the background during the capture of the seven focus slices. Helicon Focus does not seem to handle that situation well. To be honest, at the time I did not study the capabilities or adjustments available in Helicon Focus. There may be some way to adjust for the proper merger of this type, it’s just not obvious. Photoshop on the other hand did a great job of merging the various background tones.
Closer inspection of the images processed with Photoshop show the same phenomena, a halo effect on the edges of a sharp foreground subject when it is overlapping a sharp background object. At first I thought I must be doing something incorrectly so I looked closely at the image files provided as a sample in the Helicon Focus. The same phenomena appear in this composite image, and it doesn’t change when the 25 captures are processed using the Photoshop technique.
Without doubt I consider focus stacking to be a valuable technique and set out to better understand the process, when it works best, and when it works poorly. I continued to capture image sets for focus stacking with the goal of better understanding the limitations of the technique and the software. In Part 3, I’ll present some examples comparing the performance of Helicon Focus and the Photoshop auto-align,/auto-blend, and the results of some experiments to explain the halo phenomemon.
A Technique to Increase Depth of Field of an Image
Ever notice how little is in focus when taking close-up images, even with the lens set at f/22? At the closest focus distance of a 100mm macro lens of 12 inches, the depth of field is only .33 inches at f/22 with a full-frame sensor, and only .21 inches with a cropped sensor body. Well, there’s nothing to be done about the laws of physics, but there is a technique that can be used to increase the range of focus in digital images. Focus stacking is the merging of the sharp sections of multiple image captures of the same scene. I became interested in this technique as an avenue to increase the depth of sharpness in my macro images, but it can also be useful in landscape images when circumstances require. What I most desire from this technique is the ability to have a subject sharp from front to back while maintaining a pleasing out-of-focus background.
I started my experimentation by capturing a series of images of an orchid on a recent trip to Costa Rica. At f/22, the range of focus did not capture the right and left orchid sepals in focus, and even if it did, such a small aperture resulted in more detail in the background than I wanted as seen in the first image below. I captured six images at f/13 with the intent of getting all parts of the orchid in focus, while rendering the background as softly out of focus as possible. I used a stacking technique in Photoshop CS5 to align and merge the images together. The second mage below is the composite image and even in this small sized image the complete focus of the flower and the more pleasing background blur are obvious.
This process is not a magic panacea for increasing depth of field. As this was my first time using this technique, I had several surprises; the composite orchid image was surprisingly well assembled, pulling together all the sharp elements of the image. However, there were some anomalies that required further editing to clean up the image, more about that later. Overall I was pleased with the result and throughout the summer I used the technique when the opportunity presented itself. My goal was to photograph a Rattlesnake Orchid that has been growing along the edge of the wooded section of my yard since 2005, and it has blossomed only twice; in 2008 and again this year. The blossom is a stem of many tiny orchids that grow in a spiral around the stem. I wanted to document this beautiful flower as well as the stages of growth, if I could.
One situation that focus staking serves as a useful tool it photographing a cluster or group of small subjects such as a cluster of mushrooms growing on the side of an old moss covered wood pile. The mushrooms I found have a deep ridged structure to the underside of the cap, and I wanted to capture this detail in a cluster of mushrooms. The span from the front edge of the mushrooms to the back edge of the most distant mushroom were about one inch. The first image is a single capture taken at f/22 and the second image is the composite image using 12 captures each at f/14 at 1/20 second and were aligned and merged using the Photoshop technique. The images were captured with a Canon 7D and Sigma 150mm f/2.8 macro lens mounted to a sturdy tripod. The starting point for capturing was determined by observation; I looked at the cluster of mushrooms from an angle that I could determine the edge closest to the camera, as well as the edge farthest from the camera.
To ensure accurate focus, and to accurately judge that the next section of the flower to be in focus overlapped the previous section, I used the Live View feature of the camera. Instead of viewing the image through the viewfinder to compose and focus, live view lifts the mirror in the camera and displays what the sensor will capture in the display on the back of the camera. It also has a feature to enlarge a small portion of the image, allowing critical focus.
When using a small aperture such as f/22, even a distant background shows some definition. In this example, while f22 captures the spider with adequate depth of field (DOF = .43 inch in this case), it results in too much detail in the background. As can be seen in this side view of an arrowhead micrathena, the distance from the top of the spinerets to the “arrow tips” of the abdomen is about 3/16 inch. To complicate matters, the spider was hanging from the center of the web. To isolate the spider and web from the background, focus stacking provides enough depth of field by blending several layers captured of the subject without extending significant depth of field to the background. The first image below is a single capture of f/22 and the second image is a composite of four captures at f8.
For the spider image, the web was also moving slightly in the breeze. Photoshop’s auto-align handled the slight offsets in position for each capture very well, and no artifacts from the process were evident.
Another good use of the focus stacking technique is the case where the subject is essentially flat, but the camera cannot be positioned so that the sensor plane is parallel to the subject. For this example I photographed water droplets on a window pane that formed due to condensation. A similar situation would be frost on the window in winter. I set the camera at an angle of about 15º in order to create the misalignment. The first image is a single capture at f/22. There is evident lack of sharpness on both sides. The second image is the last slice of 8 captures at f/8 with the right edge of the image in focus and the left side significantly out-of-focus. The thrid image is the 8 slice composite image and is sharp from edge to edge.
Focus staking has been demonstrated to be a useful tool to increase depth of field in these situations. There are anomalies that sometimes arise; some of which are easily fixed and others that are impossible to fix. In Part 2, I’ll present some of the image processing errors I discovered, and describe some methods to edit the final images. I’ll also describe my tests of the Helicon Focus software, a product specifically designed for focus stacking.