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, foreground) can be quite 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. 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, doubled lines, 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.
... 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)|
|b||=||f (h - hfar) / (A hfar)||(B2)|
for infinity, with f = hfar
|b||=||(h - f) / A||(B3)|
... with focusing distance d instead of h ...