22
Extending DOF with Photoshop CS4 Using the Auto-Blend Layers and Auto-Align Layers Commands Glenn E. Mitchell II, Ph.D. The Light’s Right Studio

ExtendingDOFWithPhotoshopCS4

Embed Size (px)

Citation preview

Page 1: ExtendingDOFWithPhotoshopCS4

Extending DOF withPhotoshop CS4

Using the Auto-Blend Layers and Auto-Align Layers Commands

Glenn E. Mitchell II, Ph.D.The Light’s Right Studio

Page 2: ExtendingDOFWithPhotoshopCS4
Page 3: ExtendingDOFWithPhotoshopCS4

Copyright © 2008, All Rights Reserved, Th e Light’s Right

http://www.thelightsright.com

Page 4: ExtendingDOFWithPhotoshopCS4

i

Table of Contents

Table of Contents

Introducti on

Chapter 1. Photographic Challenges.

Chapter 2. Extending DOF.

Chapter 3. Conclusion.

i

1

5

13

Page 5: ExtendingDOFWithPhotoshopCS4
Page 6: ExtendingDOFWithPhotoshopCS4

iii

Introduction

Introduction

Experienced macro and botanical photographers fi ght a continuous battle for Depth of Field (DOF). When you work close to a photographic subject, DOF can sometimes extend only a fraction of an inch. A fl ower with long stamens, like the Atamasco lily above, can be a real challenge. In fact, the photograph shown here is not possible with a single photographic exposure. To make the black tip of the pistil and all of the powdery stamens sharp would have been tricky enough. To look down inside the fl ower and see the petals sharp and even see defi nable details along the green leaves, DOF for a 35mm DSLR just doesn’t extend that far.

Flowers like this are a challenge for photographers. Close working distance, even the f/32 aperture of a macro lens cannot extend deep enough. Th is is the result of stacking four separate shots of the same fl ower in Adobe® Photoshop® CS4®.

Page 7: ExtendingDOFWithPhotoshopCS4

Prefaceiv

Th e example at the top is one of the stacked shots. Th e pistil and pollen grains are sharp. As noted, the powdery stamens are not completely in focus. Th is was shot at f/32 for maximum DOF. Th e example underneath is the stacked photo again. Th e diff erence in DOF is obvious, even at the reduced magnifi ca-tion for this tutorial.

Page 8: ExtendingDOFWithPhotoshopCS4

vPreface

I’m going to avoid the math, but the maximum DOF for this shot was approximately a little over 1 1/2 inches (5 cm). However, approximately one-half of that (three-quarter inch) would extend in front of the pistil and pollen grains. Th e math comes from using a Canon 1Ds MkII, a Canon 180mm “L” macro lens at f/32, and approximately 3 feet (1 meter) distant from the front surface of the pistil of the fl ower. Th e Canon 1Ds MkII is a full frame 35mm camera.

Th e pistil and stamens extended about 2 to 2 1/2 inches in front of the fl ower petals. To extend the focus from the pistil back to the petals would require at least 3 to 4x the DOF available from a 35mm camera and macro lens at minimum aperture.

With a lens of any less optical quality than the Canon 180mm “L” macro lens, an aperture of f/32 would make me extremely nervous. First, only a specialized macro lens can typically reach f/32. Such a tiny aperture is associated with diff raction, which would add softness. Fortunately, the Canon 180mm “L” lens is tack sharp uniformly across its Field of View (FOV) and diff raction is not a signifi cant issue even at f/32. Substitute a Canon 100mm EF macro lens and you would likely want to stick with f/16, maybe f/22. You would need more stacked images or you would have to move back further.

Photoshop CS4 to the Rescue! Maybe.

Photoshop CS4 has improved two features which, when combined, can extend DOF. Th e Auto-Align Layers command is used to superimpose stacked photos that are loaded as layers. Th e Auto-Blend Layers command is then used to blend features of a photograph from diff erent points of focus.

Extending DOF with the Auto-Blend Layers command is a popular improvement to Photoshop CS4. Unfortu-nately, most of the tutorials and videos I’ve seen so far have not off ered a lot of practical advice with the technique. Th ey leave the reader/viewer with the impression that the technique is easy and fool-proof. Th e steps are easy to enumerate, but the practical application can be tricky, and it is far from fool-proof.

Page 9: ExtendingDOFWithPhotoshopCS4

Chapter 1

Page 10: ExtendingDOFWithPhotoshopCS4

2

Photographic Challenges

Photographic Challenges

Obtaining a handful of candidate photographs to stack together and extend DOF is not as easy as it sounds in theory. Most of the examples that I’ve seen in tutorials and videos have focused on blending exposures of stationary objects. Th e distance between camera and subject were much further than macro or near-macro.

Th e example in this tutorial is more typical. A fl ower at close distance. To add complications that are common enough, the photographs were taken outdoors under natural lighting on a bright overcast day. I already mentioned f/32 for maximum photographic DOF. Th at meant a relatively long exposure. 2 seconds in this case.

Start With Good Photographic Technique

Th e Canon 1Ds MkII has extremely fi ne resolution. 16.7 million pixels. which translates into 3504 x 2336 pixels. Any movement larger than a pixel while the shutter is open can result in a visible “ghost” added to the photograph. For the mathematically chal-lenged, that’s approximately 1/2336th of an inch in this case. Fortu-nately, the air was relatively still while I was taking the photographs: relatively being the important caveat. Th e air was not consistently still. A lily will sway in a slight breeze. Its stamens will dance about with even the tiniest gust of air.

Macro and botanical photographers are accustomed to waiting for the air to become still. You stand there behind the viewfi nder, repeatedly half depressing your cable release to keep the shutter activated and ready to fi re. With an exposure of 2 seconds, you’ll guess wrong and just as you depress the shutter button, an eddy of air will swirl and the fl ower will move. Extending DOF by stacking photos is possible with subjects like fl owers that move slightly. Forget it with a steadily moving subject. Th is is a technique more useful for rigid, stationary subjects or those with very minute move-ments.

TIPTIP

Use a solid tripod and solid head. Make sure to tighten the head so that the camera does not move as you twist the focus ring on the lens.

Page 11: ExtendingDOFWithPhotoshopCS4

Chapter 13

Be sure to use a cable release, a rigid tripod, and a solid head to minimize any movment of the camera while adjusting focus. Mirror lock is also strongly recommended.

I knew movement was going to be a challenge even with good macro technique. I took several sets of photos as insurance. Six or seven sets for each intended fi nal shot.

I was determined to come back with at least one or two sets of photos that could be successfully belnded together. To increase the chance of success, I also got out a pair of Canon 550EX fl ashes and a Canon ST-E3 Transmitter. I used my preferred 3:1 fl ash ratio for a more realistic shadow. Th at gave me an exposure of 1/60th second, which would stop movement from tiny gusts of air. I did not use the fl ash shots for this tutorial.

Taking three or four shots at diff erent points of focus is not so easy with macro or near macro subject. Th e amount of rotation of the focus ring is likely to be a tiny fraction of an inch. A macro focus rail will give you more control. It’s a piece of essential gear for a macro photographer. We do not change the focus on the lens. We move the lens slightly closer to or farther from the subject to change the point of focus. Th e fi ne gearing of the macro focus rail allows change of focus in very tiny increments, much fi ner than is possible with the focus ring on a macro lens.

Th e farther you can extend the photographic DOF, the fewer stacked photos that will be required. Fewer stacked photos increases the likelihood that Auto-Align Layers and Auto-Blend Layers can successful extend DOF. Extending photographic DOF means smaller apertures and longer exposures. You also need to get the front of the lens parallel to the subject.

Even With Care, It’s Still Hit Or Miss

I came back with several candidate sets for stacking together. Th e process of aligning photos and selecting deiff erent features to blend for maximum sharpness overall is not yet a perfect process. Th e Auto-Align Layers and Auto-Blend Layers commands work reasonably well.

Several of my candidate sets did not blend as well as I had hoped. Th ere was no way to tell until I loaded them into Photoshop and ran them through the process of aligning them and blending them.

TIPTIP

A macro focusing rail is ideal for attempting to extend DOF for macro or near-macro shots.

Page 12: ExtendingDOFWithPhotoshopCS4

4Photographic Challenges

Remember, this is Adobe Photoshop’s fi rst attempt at DOF blending. I expect the technology will improve with future versions of Photoshop.

Imperfect as the technique is, you can use it successfully even with macro and near-macro subjects. Th e example we’ll be working with in this tutorial - the close-up of a white Atamasco lily - is impossible to obtain with a single photographic exposure.

Page 13: ExtendingDOFWithPhotoshopCS4

Chapter 2

Page 14: ExtendingDOFWithPhotoshopCS4

6

Extending DOF

Extending DOF

Step One. Load A Stack Of Photos.

Th e fi rst step is to load a stack of photographs into Photoshop. Th e easiest way to do this is to use a feature in Adobe Bridge CS4. Select the group of photos you intend to blend together in Photoshop. Under the Tools menu, choose the Photoshop | Load Files Into Photoshop Layers submenu item.

Th e result will be a multilayer image loaded in Photoshop CS4. You should probably close Adobe Bridge at this point to free up system resources. Th e Auto-Align Layers and Auto-Blend Layers commands are RAM-intensive.

Adobe Bridge CS4 supports the stacking of multiple photographs as separate layers in a Photoshop image. Th is is the fi rst step in blending photographs to extend DOF.

Page 15: ExtendingDOFWithPhotoshopCS4

Chapter 27

Layer stack before alignment. Layer stack after alignment.

Use the Auto projection option for blending DOF.

Page 16: ExtendingDOFWithPhotoshopCS4

8Extending DOF

Here is the aligned result. As you change focus, subject magnifi cation changes. There can also be subject movements. It is common for areas of a layer to be left with no pixels.

Step 2. The Auto-Align Layers . . . Command.

Th e second step is to apply the Auto-Align Layers . . . command from the Edit menu item. Make sure to have all of the layers active before initiating the Auto-Align Layers . . . command. Select the Auto projection option.

Th e Auto-Align Layers . . . and Auto-Blend Layers . . . commands are not new to Photoshop CS4. Th ere are tutorials that describe them as new or give you that impression. Th ey have been improved however. Th ey were added to Photoshop CS3 and they were expected to be used in tandem to stitch together a panorama from several shots. Th at’s still their primary intended use.

You will typically want to leave Vignette Removal and Geometric Distortion unchecked. Th ey are more appropriate for panoramas using extreme wide angle lens. Vignette Removal corrects lens vignetting, which is darkened edges. Th is can result from lens aberrations or from using a lens shade or a big fi lter stack on extreme wide angle lenses. Geometric Distortion corrects for pincushion and barrel distortion. Again, more likely a problem with a wide angle lens.

Th e example below is the result after running the Auto-Align Layers . . . command on a stack of four photos. As you change focus, subject magnifi cation changes. Th ere can also be subject movement between shots. Th e aligned layers can show the tell-tale pattern of checkerboards where there are no pixels. In the example below, it looks like an edge eff ect.

Page 17: ExtendingDOFWithPhotoshopCS4

Chapter 29

Layer stack after blending.

Use the Stack Images and the Seamless Tones and Colors options.

Page 18: ExtendingDOFWithPhotoshopCS4

10Extending DOF

Here is an example of the layer masks generated by the Auto-Blend Layers . . . command. In this case, the layer is being used primarily for details along the white petals. The stamens and pistil are black, which hides them from blending.

Step 3. The Auto-Blend Layers . . . Command.

Th e third step is to apply the Auto-Blend Layers . . . command from the Edit menu item. Th e order of these steps does matter. Make sure to run the Auto-Align Layers . . . command before the Auto-Blend Layers . . . command for best results with this technique.

Th e Auto-Blend Layers . . . command will select portions from each layer with the sharpest focus to blend together in a fi nal result. Th is is achieved by adding a layer mask to each layer. Where the mask is white, detail from that layer will blend in the composite image. Where the mask is black, detail from that layer will be rejected. Intermediate shades of gray allow intermediate blending.

Th e example below is one of the layer masks that resulted from the Auto-Blend Layers . . . command. Th is was obviously the layer from the stacked photo where the point of focus was on the surface detail of the white petals. Th e stamens and pistil are black. Th eir details will be drawn from another photo in the stack. In this example, it is the areas that correspond to the petals that are white, allowing the detail from this layer to to become visible in the composite photograph.

Page 19: ExtendingDOFWithPhotoshopCS4

Chapter 211

You can usually fi nd a layer with the detail to restore. Duplicate it and replace the layer mask with a Hide All layer mask (one fi lled with black). You can then use the Brush tool at low to moderate Opacity to restore the lost detail.

Page 20: ExtendingDOFWithPhotoshopCS4

12Extending DOF

Be sure to carefully examine your photograph for tiny artifacts from from the DOF blending with the Auto-Align Layers . . . and Auto-Blend Layers . . . commands.

Step 4. Retouching.

Th e fi nal step is to retouch the composite photograph. As I mentioned, the current implementation in Photoshop CS4 does a reasonably good job of blending together a stack of photographs. You should carefully examine your photograph. Th ere are likely to be a few isolated areas where the blending was less than perfect. Many tutorials fail to mention this.

In the example below, there are a couple of blurry patches and also a rather pronouced edge artifact that looks like stray black pixels. Martin Evening off ers one solution in his recent book Adobe Photoshop CS4 for Photographers. He recommends saving a version of the aligned layers as a Layer Group, adding a Hide All layer mask to each (i.e., layer masks fi lled with black to make them invisible). It’s a workable solution when you do not expect to run up against system resource limitations. I prefer instead to wait and then duplicate any layer that might be needed for retouching the blended composite. In the case of the example in this tutorial, the detail for the blurry edges was very likely to lay along the layer with the petal details. I duplicated that layer and replaced its layer mask so I could use the Brush tool with white to restore the details. Th e stray black pixels were easier to handle. I waited until I added a layer for the Dust & Scratches fi lter. Th e fl ower (very typical) had plenty of dust and dirt. I created a duplicate layer, applied the Dust & Scratches fi lter, and then used the Healing Brush on the same layer to dab out those stray pixels.

Page 21: ExtendingDOFWithPhotoshopCS4

Chapter 3

Page 22: ExtendingDOFWithPhotoshopCS4

14

Conclusion

Conclusion

Photoshop CS4 has added to our creative opportunities with the improvements to the Auto-Align Layers and Auto-Blend Layers commands.

In practice, I found that I needed several candidate stacks with subjects that are not rigidly still. For macro and near-macro subjects like fl owers, a macro focusing rail also improves the likelihood of a successful DOF blend. I had a few stacks from this same point of view that did not blend successfully. Th ere were simply too many blend-ing artifacts to make it worthwhile to retouch manually.

Th e improved Auto-Blend Layers command appears to be a bit buggy in the early Photoshop CS4 release. It appears to suff er from a memory leak, at least with Windows operating systems. It is also very RAM-hungry. With photos from the current crop of Canon, Nikon, and Sony professional and prosumer DSLRs, you will likely only be able to blend a small handful of photographs unless you take steps to reduce the memory foot-print, like converting to 8-bits per channel, reducing the size of the photos, and clearing the cache.

I fi nd this to be an exciting new technique. I hope it improves your digital photography. Cheers!

Th e ability to stack multiple shots of the same subject allows us to extend DOF in a way that is impossible with a camera and lens alone.