The Google Pixel 2 / Pixel 2 XL's single camera portrait mode is unlike any other: Here's how it works

Google’s just unveiled its Pixel 2 and 2 XL smartphones, and, as expected, they appear to feature the best smartphone cameras yet. Here's how they work.


Google’s just unveiled its Pixel 2 and Pixel 2 XL smartphones, and, as expected, they appear to feature the best smartphone cameras yet. However, at a time when dual cameras seem to be the only way forward, it’s surprising that Google has gone ahead with a single camera setup on both devices.

The Google Pixel 2 devices boast of the highest rated smartphone cameras yet

The Google Pixel 2 devices boast of the highest rated smartphone cameras yet

DxOMark is among the only imaging benchmark sites that at least tries to rate cameras, smartphone cameras included, using scientific tools and rigorous testing methodologies. They’ve rated the Pixel 2 and Pixel 2 XL’s cameras as best in class. With an overall score of 98, these phones have scored a whopping four points above that of the recently launched Apple iPhone 8 Plus and Samsung Galaxy Note 8.

That score is certainly well earned. Google has put in a lot of effort into the algorithms and hardware that make up the camera. One of the surprising features of the Pixel 2 phones was the inclusion of a portrait / depth effect mode. Made famous by Apple with the dual-camera toting iPhone 7 Plus, portrait mode essentially attempts to mimic the bokeh effect easily created by DSLR cameras. Bokeh is simply an effect where the background (and foreground) of a subject is blurred and the subject itself is in focus.

We like bokeh because it literally puts the subject in focus. All other noise is blurred out.

In a fancy camera like a DSLR, this effect is easily achieved with fast lenses and the camera’s large sensors. It’s also an analogue effect, a result of the way light interacts with large lenses with large aperture.

Smartphone camera lenses are so small that they're quite similar to pinhole cameras.

Smartphone camera lenses are so small that they're quite similar to pinhole cameras.

Smartphone cameras are virtually incapable of natural bokeh because their sensors and lenses are so small. While a smartphone might appear to have a lens with a “large” f/1.8 aperture, the equivalent aperture to an SLR will be more in the range of f/4.5 or higher. You don’t always get good bokeh at those apertures.

To overcome this issue, smartphone camera makers use a variety of techniques to create an image that replicates the bokeh effect. The easiest way of implementing this is to use object recognition on 2D images captured by a single camera. In this case, software algorithms (now enhanced with AI), determine the subject in an image, separate it from the scene and blur out the rest of the image. The problem here is that these algorithms aren’t very reliable and it’s easy to fool them.

With real bokeh, the foreground and background of a subject is blurred naturally

With real bokeh, the foreground and background of a subject is blurred naturally

The better way is to create a depth map of the scene. A depth map simply uses additional depth information to determine the distance of various objects in the scene from the camera. This can be done in various ways, one of which is using dual camera systems. In this method, a scene is observed from two different viewpoints. The parallax effect of this gives some idea of depth, exactly as our eyes perceive depth.

Dual camera systems as found on the iPhone 8 Plus and Note 8 use this parallax information to generate a more accurate depth map and then blur out the background in software. Object recognition also helps improve this process.

A depth map helps determine depth in a 2D scene. Image: Dominico

A depth map helps determine depth in a 2D scene. Image: Wikimedia/Dominico

Other camera systems like Apple’s TrueDepth camera system on the iPhone X uses structured light to generate an extremely accurate depth map. In the case of structured light, however, the technology is expensive and range is very limited.

With the Pixel 2’s camera, Google has found a new way to generate a depth map using a single camera system. Google feels that this is sufficient to generate a high-quality bokeh effect.

Many smartphone cameras today use a system of focussing called dual-pixel autofocus (DPAF), which is an advancement on traditional phase-detection autofocus (PDAF) technology.

Now PDAF works by using specific “phase-detection” pixels. These are tiny sensors that detect the “phase” of an image. Oversimplifying the process, these sensors work like an optical range-finder to try and align two separate “copies” of the scene. The degree of separation or overlap of the two “copies” determines the range of a point on the scene and the camera lens is instructed to adjust focus range accordingly. For a more detailed explanation, head here.

Smartphones must really on software tricks to simulate bokeh, and they're still not very good at it.

Smartphones must really on software tricks to simulate bokeh, and they're still not very good at it. From L - R: Honor 8 Pro, OnePlus 5, Samsung Galaxy S8

Here’s where things get a little complicated.

A pixel, in this case, refers to a sensor element that senses the incoming light and converts its intensity into electronic data for processing by the camera’s image processor. An array of these pixels — millions of them — form an image sensor. Processed data from this array is what results in the final image that you see.

Normally, each pixel sits under a micro lens which helps focus the incoming light at a microscopic level. In DPAF, a technology introduced by Canon in 2013, there are now two pixels under each lens. Both pixels capture different images resulting in a microscopic parallax effect that can be used to improve focus, just like a large-scale PDAF system.

Google is using this microscopic parallax effect to generate a depth map, and thus, bokeh.

There are issues with this process, notably because the pixels are mere microns apart. The resulting images cannot offer as good a bokeh effect as one captured from a proper dual-camera system, but it should, in theory, offer better bokeh than from a regular smartphone’s single camera system.

This was quite apparent in DxOMark’s testing as well. In its Pixel 2 camera review, DxOMark notes, “the background blur and bokeh are not as natural as that provided by the iPhone 8 Plus’s dual-camera system” and “you can see the improvements over the original Google Pixel, but even the Pixel 2 version shows some depth-estimation artefacts behind the model, as well as in high-frequency areas.”

That said, given the right conditions, the bokeh effect does seem to work well enough. Also, as noted by DxOMark, the Pixel 2’s incredible autofocus speed, HDR+ and as yet unmatched video performance tips the balance in its favour.

The bottom line is just this, Google appears to have created yet another incredible camera experience and as long as you don't mind a relatively compromised bokeh experience, you're not likely to have any complaints.


Find latest and upcoming tech gadgets online on Tech2 Gadgets. Get technology news, gadgets reviews & ratings. Popular gadgets including laptop, tablet and mobile specifications, features, prices, comparison.