Structured light is an active 3D sensing technique that projects a known pattern of light onto a scene and computes depth from how that pattern appears deformed to a camera viewing it from a different angle. Among sensors in robotics, a structured light sensor gives robots dense, accurate surface geometry at short range, which makes it a standard choice for bin picking, inspection, assembly verification and close-range manipulation.
The method belongs to the family of triangulation-based depth sensing, together with stereo vision, and differs from time-of-flight sensors, which measure the travel time of light instead of its geometry. Because the system adds its own texture to the scene, it can measure featureless surfaces that passive stereo cameras struggle with.
How structured light recovers depth by triangulation
A structured light sensor recovers depth by triangulating each observed pattern element against the known position of the projector. The system consists of a projector (a laser with a diffractive optical element, a DLP micromirror device or an LCD module), at least one camera, and a fixed baseline distance between them, typically between 50 mm and 300 mm.
The processing chain has three stages. First, the camera captures the pattern on the scene. Second, the software solves the correspondence problem: for every camera pixel it identifies which projector column or pattern feature illuminated that point. Third, the known geometry from calibration turns each correspondence into a ray intersection, which yields a 3D point. The result is a depth map or a point cloud with one measurement per decoded pixel.
Depth error grows with distance. For a triangulation sensor, the depth uncertainty is roughly proportional to the square of the distance divided by the baseline and focal length, so doubling the working distance approximately quadruples the error. This relationship explains why structured light excels at ranges below about 2 m and is rarely used for long-range navigation.
The following table lists the main components and the parameter each one controls.
| Component | Function | Parameter it controls |
|---|---|---|
| Projector | Emits the coded pattern | Pattern resolution, brightness, wavelength |
| Camera | Records the deformed pattern | Lateral resolution, exposure, frame rate |
| Baseline | Separates projector and camera | Depth precision versus occlusion |
| Decoder | Solves pixel correspondences | Robustness to noise and reflections |
| Calibration model | Maps pixels to rays | Absolute accuracy of 3D points |
Pattern coding strategies and their trade-offs
The pattern coding strategy determines whether a structured light sensor favors speed or precision. Temporal coding uses a sequence of images, while spatial coding packs all the information into a single frame.
Temporal multiplexing projects several patterns in sequence, such as binary or Gray code stripes followed by phase-shifted sinusoidal fringes. Each pixel accumulates a unique code over time, which produces very precise depth but requires the scene to stay still for the whole sequence. Spatial coding projects one pattern, often a pseudo-random dot pattern in near infrared, and identifies each dot by its local neighborhood, which tolerates motion at the cost of lower resolution.
The table compares the most common coding schemes used in robotic sensors.
| Coding scheme | Frames per measurement | Typical precision | Motion tolerance |
|---|---|---|---|
| Binary or Gray code | 8 to 12 | Medium, limited by stripe width | Low |
| Phase shifting | 3 to 12 | High, sub-pixel | Low |
| Gray code plus phase shift | 10 to 20 | Very high, tens of micrometers | Very low |
| Pseudo-random dot pattern | 1 | Moderate, millimeters | High |
| Single line laser stripe | 1 per profile | High along the line | Requires scanning motion |
A laser line profiler is a special case: it projects one stripe and builds a full surface only when the object or the sensor moves, which suits conveyor inspection and weld seam tracking.
Structured light compared with other depth sensors
Structured light offers the highest close-range accuracy among common robotic depth sensors but has the shortest useful range and the weakest outdoor performance. The choice between it, stereo vision, time-of-flight sensors and LiDAR depends mainly on working distance, ambient light and required precision.
| Method | Principle | Typical range | Outdoor use | Main strength |
|---|---|---|---|---|
| Structured light | Active triangulation | 0.1 to 3 m | Poor | Dense, precise close-range data |
| Active stereo | Two cameras plus texture projector | 0.2 to 10 m | Fair | Works with or without projector |
| Time-of-flight sensor | Phase or pulse timing | 0.2 to 10 m | Fair | Compact, no baseline needed |
| LiDAR | Pulsed laser ranging | 1 to 200 m | Good | Long range, wide field of view |
A depth camera may use any of these principles internally, so the term describes the product category, while structured light describes the measuring principle. Many active stereo cameras borrow the structured light idea of projecting a random infrared texture but still match pixels between two cameras rather than against the projector.
Selecting and configuring a sensor for robotic tasks
Selecting a structured light sensor starts from the working volume and the smallest feature the robot must resolve. Integrators then check cycle time, surface properties and mounting constraints before committing to a model.
| Application | Recommended configuration | Reason |
|---|---|---|
| Bin picking of metal parts | Multi-frame phase shifting, blue or NIR light | Precision and resistance to reflections |
| Mobile manipulator grasping | Single-shot NIR dot pattern | Tolerates arm and platform motion |
| Weld seam tracking | Laser line profiler on the torch | High-rate profiles along the seam |
| Dimensional inspection | Gray code plus phase shift, fixed mount | Micrometer-level repeatability |
| Palletizing and depalletizing | Wide-field sensor with long baseline | Larger volume at acceptable precision |
Configuration matters as much as hardware. Engineers set exposure per surface type, often fusing several exposures for parts with both dark and shiny regions, and perform hand-eye calibration so that measured points transform correctly into the robot base frame. A sensor mounted on the wrist gives flexible viewpoints, while a fixed overhead mount avoids repeated calibration errors and keeps cycle times predictable.
Limitations and failure modes
Structured light fails mainly when the projected pattern cannot be seen clearly or decoded correctly. Experienced integrators plan for these failure modes during cell design rather than after commissioning.
- Ambient light interference: sunlight contains strong near-infrared energy that washes out the pattern, so outdoor use is unreliable without narrow-band filters and high-power projection.
- Specular and transparent surfaces: polished metal reflects the pattern away or creates false points, and glass lets it pass through; polarization filters, coatings or multiple viewpoints mitigate this.
- Occlusion and shadows: points visible to the camera but not to the projector produce missing data, and longer baselines increase this effect.
- Interreflections and subsurface scattering: concave parts and translucent plastics create indirect illumination that biases depth.
- Motion during multi-frame capture: a moving scene corrupts temporal codes and produces ripple artifacts.
- Multi-sensor crosstalk: two projectors aimed at the same area confuse each other unless their exposures are synchronized or separated by wavelength.
A common misconception is that a higher projector resolution alone improves accuracy. In practice, calibration quality, thermal stability and the baseline geometry usually limit accuracy before pattern resolution does.
In plain words
Structured light works like shining a striped or dotted pattern onto an object and watching how the lines bend. On a flat wall the stripes look straight. On a curved cup they bend around its shape. A camera placed slightly to the side sees exactly how much each stripe moved, and a computer turns those shifts into distances.
The key idea is simple: the sensor knows what pattern it sent, so any distortion it sees must come from the shape of the surface. This gives robots a detailed 3D picture of nearby objects, but it works best indoors and at arm’s length.
A real-world example
An automotive supplier uses a six-axis robot to pick cast aluminum brackets from a deep bin, where the parts lie in random orientations. A structured light sensor is mounted above the bin at about 1.2 m and uses phase shifting with blue light, which reduces the effect of the shiny cast surfaces.
Each scan takes about 0.4 s and produces several million points with a depth precision of roughly 0.2 mm. Pose estimation software matches the point cloud against the CAD model, selects a reachable bracket and sends a grasp pose to the robot. With hand-eye calibration verified weekly, the cell reaches a pick success rate above 99 percent and replaced a manual loading station that previously required one operator per shift.