How Depth Masks Use Dual-Pixel Raw in Photo Editing

Dual-Pixel RAW (DPRAW) technology embeds physical depth information directly into an image file by capturing two distinct perspectives from each sensor pixel. Modern photo editing applications harness this embedded phase-detection data to generate precise 3D depth maps of a scene. By utilizing depth range masks, photographers and retouchers can isolate and adjust specific spatial planes—such as foregrounds, subjects, or backgrounds—based entirely on physical distance from the camera lens rather than relying solely on luminance, color, or manual masking brushes.

Dual-Pixel CMOS sensors feature pixels composed of two independent photodiodes situated beneath a shared microlens. When capturing a photo, each photodiode records the scene from a slightly different optical angle—one left-looking and one right-looking. When saved as a Dual-Pixel RAW file, the image retains both sub-pixel streams instead of combining them into a single value. This minute displacement between the two sub-pixel readouts creates disparity, effectively functioning like binocular human vision at the pixel level.

Image editing software, such as Adobe Lightroom, Camera Raw, or Canon Digital Photo Professional, analyzes this phase disparity across the frame. By calculating the shift between the paired signals, the processor determines the relative distance of every element within the composition. The software translates this calculation into a continuous 8-bit or 16-bit depth map, assigning values based on whether an object is positioned in the near foreground, at the plane of critical focus, or in the distant background.

Editors access this information through a depth range mask tool. Users define a target range on a depth slider or click a specific focal plane within the frame. The software then generates an automated mask based on the spatial depth map, ignoring standard visual barriers like color similarities or high-contrast edges. If a subject wears clothing identical in color to the backdrop, a standard color or luminance mask would struggle to separate them; a depth range mask separates them cleanly because they occupy different focal distances.

Depth range masks powered by dual-pixel data offer superior edge fidelity, particularly around complex textures such as flyaway hair, glass, water droplets, and semi-transparent foliage. Because the selection is derived from optical phase measurements rather than algorithmic edge-detection heuristics, the mask respects the natural drop-off of focus.

This workflow enables highly realistic post-processing adjustments. Photographers can simulate shallower depth of field by gradually increasing blur on elements designated as the background, inject atmospheric perspective such as mist or haze between distinct depth planes, or adjust exposure and color balance on an underexposed subject without altering the background lighting. Dual-pixel depth range masking transforms a traditionally flat raw file into a flexible three-dimensional environment for targeted optical editing.