In many cases, such as in portrait or macro photography, we are interested in making a sharp main subject stand out from an unfocused, blurry background. Nevertheless, the background (and/or in some cases, the foreground) can be very important for the overall impression of the image. It should not be distracting, but it should not be uniform and boring either. Ideally, it conveys some of the atmosphere, location, distance, scale, or other relevant context of the scene. The perceived quality of the out of focus areas is known as the bokeh.

When is a bokeh good or bad? A good bokeh is often characterized as smooth, creamy, buttery or even swirly, while a bad bokeh is often described as nervous, busy or harsh. Obviously, much of this is highly subjective. Technically speaking, there are several factors contriburing to the bokeh including the scene itself, the lighting conditions, and the lens. Some lenses (or even manufacturers) have a repuration for creating a beautiful bokeh, while others are known for introducing unwanted patterns such as hard edges, outlines, duplicated structures or onion rings around highlights.

Unfortunately, these aspects are largely depending on technical details of the lens design of which we know little. Nevertheless, the bokeh also depends on the degree of blurring, which we can calculate using the formulas developed for the depth of field. For this, we will have a look at out of focus highlights.

Mandalay Palace wall and moat, with Mandalay Hill in the distance
Mandalay Palace wall and moat, with Mandalay Hill in the distance

Fig. 8.

Moat and wall of Mandalay Palace, with Mandalay Hill in the distance. The nearest light beside the bastion is about 200 m away, the furthest on the hill about 3700 m. Left: focused at infinity, right: focused at about 1 m.

Size of highlights

... under construction ...

... specular highlights ... The other important factor is the size of the blur spot.

For simplicity, we assume that we have a point light source at infinity.

size of bokeh highlight b in the background, according to equation (D3b)

b / (h - hfar) = a / hfar (B1)

and with f-stop A, according to equation (A1)

b = f (h - hfar) / (A hfar) (B2)

for infinity, with f = hfar

b = (h - f) / A (B3)

... with focusing distance d instead of h ...