Faking Depth of Field
April 30, 2011

The distance between the nearest and farthest objects in a scene that appear focused in an image, is the Depth of Field.
There is no "win" equation for the amount of Depth of Field, for some images it is desirable to have most of the image in focus and while for other images almost nothing.
Depth of field is determined by several factors, like lens focal length, f-number, sensor size or camera to subject distance.
The amount of DOF, like shallow DOF comes at a price, sometimes untouchable for us mortals.
Yes, a Nikkor 200 f/2 or a Canon 85 f/1.2 will solve most of your DOF issues...but...i do not want to sell a kidney for that.
So..."If you can't make it, fake it"
As with most of my tutorials, you will need Photoshop to achieve the desired effect, "Lens Blur" being the filter that will do the job.
But...you need a depth map to create the desired effect, otherwise the blur will be applied evenly on the image without any depth.
"Lens blur" filter will blur the image based on a mask, "Transparency", "Layer Mask" or "Alpha Channel"
Easiest method is to create "A layer mask" by pressing "Add Vector mask" button under layers. After layer mask is created, select layer mask from "Channels" and using "Gradient Tool" draw a vertical gradient.
Mask will look like this ( channels screenshot inside )

First step is done, rush quickly to "Filters" and then to "Blur, Lens Blur". Go to "Depth Map" and change "source" to "Layer mask", increase blur focal distance for more shallow depth of field.
Mouse over for the result:

Wait a minute!! While it looks miles better than the original image, something does not look right. Acording to our depth map the effect is correct but the brain tells us that the red ball should be in focus!
You're right...so where's the problem?
It's the depth map (layer mask).
In order to create a credible effect a new depth map will be required. Image has to be analyzed to identify which objects are closer to the subject...or maybe, you would like to focus on "8 ball" and leave the rest out of focus.
I created a new depth mask using the same gradient tool but this time "circle marquee tool" defined the focus/out of focus areas.
Correct depth mask would be:

Head on to Lens Blur filter and apply it with new Layer Mask as new source.
Mouse over for the result:

I specifically chose a simple image with round shapes so you could understand the process but more advance techniques can be used for complex shots.
And remember, a fast lens will do wonders for your photos but sometimes you don;t need it!

