In photography, bokeh is the aesthetic quality of the blur produced in the out-of-focus parts of an image produced by a lens. Bokeh has been defined as “the way the lens renders out-of-focus points of light”. Differences in lens aberrations and aperture shape cause some lens designs to blur the image in a way that is pleasing to the eye, while others produce blurring that is unpleasant or distracting (“good” and “bad” bokeh, respectively). Bokeh occurs for parts of the scene that lie outside the depth of field. Photographers sometimes deliberately use a shallow focus technique to create images with prominent out-of-focus regions.
Bokeh is often most visible around small background highlights, such as specular reflections and light sources, which is why it is often associated with such areas. However, bokeh is not limited to highlights; blur occurs in all out-of-focus regions of the image.
Bokeh can be simulated by convolving the image with a kernel that corresponds to the image of an out-of-focus point source taken with a real camera. Unlike conventional convolution, this convolution has a kernel that depends on the distance of each image point and – at least in principle – has to include image points that are occluded by objects in the foreground. Also, bokeh is not just any blur. To a first approximation, defocus blur is convolution by a uniform disk, a more computationally intensive operation than the “standard” Gaussian blur; the former produces sharp circles around highlights whereas the latter is a much softer effect. Diffraction may alter the effective shape of the blur. Some graphics editors have a filter to do this, usually called “Lens Blur.”