Wednesday, January 13, 2010

Depth of Field Hack

Yesterday I went on a short walk through a ravine near my house. One good photo came from the shoot—it was a macro shot of a poky-looking weed that I thought would be interesting up close. I had heard something about getting everything you want in focus via some program that takes multiple exposures at different focus distances and combines them, but I don't have any such program. The idea seemed sound though, so I went ahead and took two of the exact same photo, just with a focus adjustment. Between the two images, I had the entire subject in focus, but the background was still a nice bokeh.

click to enlarge, or see it on Flickr
Aperture: f/2.6
Shutter Speed: 1/160
ISO: 80
Gorilla Pod

I pasted one image over the other in Photoshop, and then meticulously masked out the unfocused areas from the one on top. in a few places, the background was a slightly different color in one image due to the amount of lens blur on the pixels, but a little bit of healing brush fixed that quickly. It took kind of a long time, but now I have a nearly perfect depth of field: one that encompasses my entire subject (almost; there are still a few spots out of focus), but one that still throws the background into a nice, non-distracting bokeh.

After the masking was completed, I flattened the image and treated it like a single photo to continue post-processing.

Have any good depth of field shots? They don't have to be DoF hacks, just post links in the comments!


  1. That is definitely an interesting concept, and you did a great job. The subject is tack sharp and focused, and really stands out against the bokeh'd background.

  2. I had never heard of the technique. This is really cool. Well done!


Like what you see? Have a question? Leave me a comment!