Fakeh

2 min read

Professor Newman on…

How smartphones can calculate convincing background blur, or ‘fake bokeh’

The term ‘bokeh’ refers to the character of the out-of-focus blur rather than the blur itself.

It was coined in 1997 by Mike Johnson, a photographic journalist. He concluded, ‘It’s true that some photographers seldom or never take pictures in which anything is not sharp. For them, bokeh is not much of an issue when they’re working, although it’s still pertinent when they’re looking at other people’s pictures. For the rest of us, well, there’s nothing to be scared of.

It’s just another arrow in the creative quiver.’

Now that smartphones are the most-used cameras, the phone manufacturers have needed to cater for ‘the rest of us’. As has been discussed in this column before, the extent of out-of-focus blur depends on the size of the entrance pupil of the lens. In the case of phone lenses these are invariably small, so how can a phone provide what is required? The solution is often ascribed to ‘AI’, the present cure-all of choice, but in fact it’s a case of simple application of optical principles.

Out-of-focus blur can be thought of as the result of ‘painting’ an image using a brush, the size of which depends on the distance of the object being painted from the plane of focus. The further from that plane, the larger the brush (the bokeh depends on the shape and bristle pattern of the brush). The size of the brush is simple to determine, as is shown in the diagram. A convincing rendering can be produced by blurring objects using a blur function, with its extent dictated by the distance of the object from the in-focus part of the image. To do this, a depth map is required, giving the distance of each object from the camera. The collective term for the techniques that achieve this is photogrammetry, all of which work by correlating images of objects taken from different viewpoints. Higher-end phones, which have several cameras at slightly different locations on the back, can use these cameras to provide such images.

The distance between the cameras is small, so the depth map may not be very precise. But it can still be good enough to provide a good basis for the gradation of background blur.

Objects are rendered using a ‘brush’ sized according to distance from the plane of focus. Distant objects (A and B) are rendered with a large brush. Closer objects (C) with a smaller brush. Objects in the plane of focus are rendered without additional blur.

Depth-based blurring

Once a depth map is available, then the image is segm

This article is from...

Related Articles

Related Articles