H 291 / 3212010s

Depth-Map Portrait

Depth-map portrait / computational portrait mode. 2017: Pixel 2 portrait mode as a vivid milestone

Typeface · Quicksand

Google Research: Estimated depth map and derived uncertainty, 2017.
Google Research: Estimated depth map and derived uncertainty, 2017.Google Research, technical illustration of the photo by Sam Kweskin.View source ↗

Prompt

Apply a Depth-Map Portrait effect, keeping the face and principal subject sharply resolved while progressively blurring background regions according to apparent distance. Preserve natural skin texture, soft background light discs, and believable focus transitions, with only faint segmentation softness around stray hairs. Keep the original subject and composition.

Identify

Face in focus, background blurred depending on estimated distance.

Principle

Segmentation1 and depth mapping2 control artificial defocusing.

Example

Pixel 2: Portrait mode, 2017.

Try it out

Test hair, eyeglasses, and objects in front of your body.

Background

In 2017, Google explained the Pixel 2 portrait mode as a combination of image processing, person masking, and depth estimation. The main camera is particularly illustrative: Split sensor pixels provide two slightly different views through different parts of the same lens. A depth map is then estimated from this. Together with segmentation, this determines how much individual image areas are blurred. The process is therefore more than simply isolating a person from a generally blurred background. In the example explained, a pastry in front of the person must be treated differently than the more distant surroundings. In the exercise, look for similar borderline cases. These will help you determine whether a portrait filter actually takes depth of field into account.

Distinction

A person mask is not a depth map; both pieces of information can be used together.

Aftermath

The look refers back to optical depth of field, but its flaws also arise from masks and estimated geometry.

Further examples · 7 images

AI illustration: The glass in the foreground remains sharp while the background is blurred
02 AI illustration: The glass in the foreground remains sharp while the background is blurredThe glass in the foreground remains sharp while the background is blurred. This demonstrates depth-aware processing where objects closer than the subject are excluded from the background defocus.Illustration generated for the Atlas (AI)
AI illustration: The foreground macarons and the woman are in sharp focus, while the stree
03 AI illustration: The foreground macarons and the woman are in sharp focus, while the streeThe foreground macarons and the woman are in sharp focus, while the street background shows progressive blurring. This illustrates a multi-layered depth map separating near objects from distant scenery.Illustration generated for the Atlas (AI)
AI illustration: A woman wears glasses with hair strands in focus against a blurred cafe
04 AI illustration: A woman wears glasses with hair strands in focus against a blurred cafeA woman wears glasses with hair strands in focus against a blurred cafe. The depth map maintains sharpness on complex foreground edges while blurring distant lights.Illustration generated for the Atlas (AI)
AI illustration: A man holds a donut in the foreground against a brick wall
05 AI illustration: A man holds a donut in the foreground against a brick wallA man holds a donut in the foreground against a brick wall. The donut and hands are sharp, showing how the depth map prioritizes foreground objects over the background.Illustration generated for the Atlas (AI)
AI illustration: A split image shows a portrait alongside its corresponding depth map
06 AI illustration: A split image shows a portrait alongside its corresponding depth mapA split image shows a portrait alongside its corresponding depth map. The heat map visualization demonstrates how segmentation values determine the variable blur levels applied to the scene.Illustration generated for the Atlas (AI)
AI illustration: A child blows bubbles that appear at varying distances from the lens
07 AI illustration: A child blows bubbles that appear at varying distances from the lensA child blows bubbles that appear at varying distances from the lens. The depth mapping ensures bubbles close to the face remain sharp while the playground behind is blurred.Illustration generated for the Atlas (AI)

Question

Why is a sharply focused object in front of the face a possible error?

Show possible answer +

With a corresponding optical focus plane, it should be less sharp; a simple face mask can confuse its spatial position.

Sources