Chapter 3

Structured Light Systems

Structured light systems achieve exceptional depth accuracy by projecting known patterns onto a scene and analyzing how these patterns deform on surfaces. This technology powers Apple's Face ID and enables sub-millimeter precision depth mapping for applications demanding the highest accuracy.

Fundamental Principles

Structured light 3D sensing operates on the principle of triangulation. A projector emits a known pattern of light onto the scene, and a camera positioned at a fixed baseline distance from the projector captures the deformed pattern. By comparing the captured pattern to the original projected pattern, the system can calculate the 3D coordinates of each point through geometric triangulation.

The key insight is that points at different depths will cause the projected pattern to shift by different amounts when viewed from the camera's perspective. Points closer to the sensor cause larger shifts (disparity), while distant points cause smaller shifts. This relationship between disparity and depth follows a well-defined geometric relationship that allows precise depth calculation.

Depth = (Baseline × Focal_Length) / Disparity

The accuracy of structured light systems depends critically on several factors: the precision of the projected pattern, the resolution of the camera sensor, the accuracy of the calibration between projector and camera, and the signal-to-noise ratio of the captured image. Industrial high-precision structured light scanners can achieve depth accuracy better than 0.1mm at close range (under 1 meter).

Pattern Projection Techniques

Random Dot Patterns

Apple's Face ID TrueDepth system projects a pseudo-random pattern of over 30,000 infrared dots onto the user's face. The randomness ensures that each small region of the pattern is unique, allowing unambiguous matching between the projected and captured patterns. The dots are generated by a diffractive optical element (DOE) that splits a single infrared laser beam into the dot array.

Random dot patterns provide several advantages: they work on surfaces of any texture or color, provide dense depth sampling across the entire field of view, and are resistant to pattern aliasing issues that can affect regular grid patterns. The main challenge is the computational complexity of matching 30,000+ dots in real-time, which requires specialized hardware acceleration.

Coded Light Patterns

Some structured light systems use specially designed coded patterns where each local region of the pattern contains a unique code that can be identified even in partial views. Gray code patterns, for example, use binary encoded stripes where each position is uniquely identified by the sequence of light and dark stripes. Multiple pattern projections with different spatial frequencies allow depth calculation with high accuracy and reduced ambiguity.

The advantage of coded patterns is robust pattern identification even with occlusions or partial views. The disadvantage is that multiple pattern projections may be required, which limits the achievable frame rate and creates issues with moving scenes.

Single-Shot vs Multi-Shot

Single-shot techniques project one pattern and capture one image, enabling high frame rates suitable for real-time applications like face tracking and gesture recognition. Multi-shot techniques project a sequence of patterns, achieving higher accuracy at the cost of lower frame rates. The choice depends on whether the application prioritizes speed or precision.

Apple Face ID TrueDepth System

The TrueDepth camera system represents the most widely deployed structured light implementation, deployed widely across the iPhone and iPad product lines since its introduction in the iPhone X in 2017. Understanding its architecture provides insight into practical structured light system design.

System Architecture

The TrueDepth system consists of several key components integrated into a compact module:

Depth Calculation Pipeline

When Face ID activates, the following sequence completes in a time too short for the user to notice:

  1. Pattern Projection: The VCSEL illuminates and the DOE projects the 30,000-dot pattern onto the user's face.
  2. Image Capture: The infrared camera captures the deformed pattern, with exposure time optimized for the infrared illumination intensity.
  3. Dot Detection: Specialized hardware (Apple states that the Neural Engine is used to process Face ID data) detects the location of each dot in the captured image with sub-pixel precision.
  4. Pattern Matching: Each detected dot is matched to its corresponding dot in the reference pattern, using local pattern geometry and global consistency constraints.
  5. Disparity Calculation: The shift between each dot's projected position and captured position yields a disparity value.
  6. Depth Mapping: Using the calibrated baseline and focal length, disparities are converted to depth values, creating a dense depth map.
  7. Face Processing: The depth map is processed to extract facial landmarks, create a mathematical representation of face geometry, and compare against enrolled face data.

Security and Anti-Spoofing

According to figures published by Apple, Face ID has a false acceptance rate of approximately 1 in 1,000,000, lower than the same company's fingerprint authentication (Touch ID, 1 in 50,000). Apple also notes that this figure can differ for twins and for children under 13. The depth information is critical for anti-spoofing:

Calibration and Accuracy

Structured light systems require precise calibration to achieve high accuracy. Calibration determines the geometric relationship between the projector and camera, including their positions, orientations, and optical properties.

Calibration Procedure

Factory calibration typically involves these steps:

  1. Intrinsic Calibration: Determine the camera's focal length, principal point, and lens distortion parameters by capturing images of a known calibration target (typically a checkerboard pattern) at various positions and orientations.
  2. Projector Calibration: Characterize the projector's optical parameters, treating it as an "inverse camera" that emits rather than captures light.
  3. Stereo Calibration: Determine the relative position and orientation (baseline) between the camera and projector. This is the most critical parameter for depth accuracy.
  4. Nonlinearity Correction: Characterize and compensate for any nonlinearities in the depth measurement, such as temperature dependencies or systematic errors at different ranges.

Sources of Error

Even with careful calibration, several factors can affect depth accuracy:

Common Error Sources

Performance Characteristics

Parameter Typical Range Notes
Accuracy 0.1-1mm @ 0.5m Depends on pattern density, baseline, and calibration quality
Operating Range 0.2-2m Longer for room-scale products (e.g., Orbbec Astra)
Field of View 60-120° Determined by DOE design
Depth Resolution 640x480 to 1280x960 Dot density limits effective resolution
Frame Rate 15-60 fps Lower for multi-shot methods
Latency 30-100ms Depends on whether matching is hardware-accelerated

This table summarizes representative ranges reflecting general trends; they are neither values set by the standard nor published specifications of any particular product. Apple does not publish the depth accuracy, resolution, or power consumption of the Face ID module. For reference, the WIA-SEMI-013 Phase 4 face authentication application template specifies structured light or dToF, accuracy better than 1mm at 0.3-0.6m, at least 30 fps, and total latency under 100ms as its requirements.

Other Structured Light Systems

Intel RealSense SR300 (Discontinued)

Intel's RealSense SR300 series used coded light patterns with an IR laser projector and camera. Unlike passive stereo systems, the projected pattern provided texture even on featureless surfaces, improving depth quality. The system was used for close-range facial scanning and object recognition applications but was later discontinued; the current RealSense lineup centers on the D400-series active stereo cameras covered in Chapter 4.

Orbbec Astra

Orbbec's Astra series structured light sensors target robotics and industrial applications. The Astra Pro, for example, combines RGB and depth cameras in a single unit, providing synchronized color and depth at VGA resolution (640x480) and 30fps. The system works from 0.6-8 meters, a longer range than Face ID type systems, making it suitable for room-scale environment sensing.

Microsoft Kinect

The original Xbox 360 Kinect (Kinect v1) used PrimeSense structured light technology (PrimeSense was acquired by Apple in 2013). It projected a coded infrared pattern using a laser and DOE, achieving depth sensing for full-body motion tracking. Despite being discontinued, it demonstrated the viability of low-cost structured light for consumer applications.

Structured Light Pattern Types Comparison

Pattern Type Characteristics Advantages Use Cases
Random Dots Pseudo-random array, 10k-30k points Dense coverage, texture independent Face ID, close-range scanning
Gray Code Binary encoded stripes, sequential High accuracy, unambiguous Industrial metrology, 3D scanning
Sinusoidal Patterns Phase-shifted sine waves, 3-4 patterns Sub-pixel accuracy, smooth surfaces Quality inspection, reverse engineering
Coded Patterns Spatial frequency modulation Single-shot capable, fast Real-time tracking, AR/VR

Applications Beyond Face ID

3D Scanning and Modeling

Structured light provides the accuracy needed for high-quality 3D scanning of objects, faces, and bodies. Applications include:

Augmented Reality

High-accuracy depth enables realistic AR occlusion, where virtual objects correctly appear behind real objects. Face tracking for AR filters and effects (like Snapchat lenses) benefits from the detailed facial geometry that structured light provides.

Gesture Recognition

The detailed hand geometry from structured light enables sophisticated gesture recognition, including individual finger tracking. This enables touchless interfaces for medical devices, industrial controls, and accessibility applications.

Design Considerations

When to Choose Structured Light:

Limitations to Consider:

Future Directions

Structured light technology continues to evolve:

Summary

Key Takeaways:

Review Questions

  1. In a structured light system with a 50mm baseline and a 600-pixel focal length, what depth corresponds to a disparity of 30 pixels?
  2. Explain how random dot patterns reduce ambiguity in correspondence matching.
  3. Compare single-shot and multi-shot methods, and state which you would use for tracking a moving face and for inspecting a stationary part.
  4. Distinguish the roles of the flood illuminator and the dot projector in the TrueDepth system.
  5. What does it mean to calibrate a projector as an "inverse camera"?
  6. Calculate the depth error at 1m caused by a 10μm baseline uncertainty with a 25mm baseline.
  7. Explain why structured light performance degrades in outdoor sunlight and how this can be mitigated.
  8. Among structured light, iToF, and active stereo, which is best suited for a dental scanner, and why?