# Structured light

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Structured_light
> Markdown URL: https://mediated.wiki/source/Structured_light.md
> Source: https://en.wikipedia.org/wiki/Structured_light
> Source revision: 1351416735
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Method of using light to measure a 3D object

A structured light pattern projected onto a surface (left)

**Structured light** is a method that measures the shape and depth of a three-dimensional object by [projecting](/source/Projector) a pattern of light onto the object's surface. The pattern can be either [stripes](/source/Stripe_(pattern)), grids, or dots. The resulting distortions of the projected pattern reveals the object's [solid geometry](/source/Solid_geometry) through [triangulation](/source/Triangulation_(computer_vision)), enabling the creation of a [3D model](/source/3D_model) of the object. The scanning process relies on coding techniques for accurately detailed measurement. The most widely used coding techniques are binary, Gray, and phase-shifting, each offering distinct advantages and drawbacks.

Structured light technology is applied across diverse fields, including industrial [quality control](/source/Quality_control), where it is used for precision inspection and [dimensional analysis](/source/Dimensional_analysis), and [cultural heritage preservation](/source/Conservation_and_restoration_of_cultural_property), where it assists in the documentation and restoration of [archaeological artifacts](/source/Artifact_(archaeology)). In [medical imaging](/source/Medical_imaging), it facilitates non-invasive [diagnostics](/source/Medical_diagnosis) and detailed surface mapping, particularly in applications such as [dental scanning](/source/Dental_scanning) and [orthotics](/source/Orthotics). [Consumer electronics](/source/Consumer_electronics) integrate structured light technology, with applications ranging from [facial recognition systems](/source/Facial_recognition_system) in [smartphones](/source/Smartphone) to motion-tracking devices like [Kinect](/source/Kinect). Some implementations, especially in facial recognition, use [infrared](/source/Infrared) structured light to enhance accuracy under varying lighting conditions.

## Process

For broader coverage of this topic, see [Triangulation (computer vision)](/source/Triangulation_(computer_vision)) and [Pattern recognition](/source/Pattern_recognition).

Structured light sources on display at the 2014 Machine Vision Show in Boston

An [Automatix](/source/Automatix) Seamtracker [arc welding](/source/Arc_welding) robot equipped with a camera and structured laser light source, enabling the robot to follow a welding seam automatically

Structured light measurement is a technique used to determine the three-dimensional coordinates of points on an object's surface. It involves a [projector](/source/Projector) and a camera positioned at a fixed distance from each other—known as the baseline—and oriented at specific angles. The projector casts a structured light pattern, which can be either [stripes](/source/Stripe_(pattern)), grids, or dots, onto the object's surface. The camera then captures the distortions in this pattern caused by the object's solid geometry, which reveal the surface shape. By analyzing these distortions, depth values can be calculated.[1][2]

The measurement process relies on [triangulation](/source/Triangulation_(computer_vision)), using the baseline distance and known angles to calculate depth from the pattern's displacement via [trigonometric](/source/Trigonometric) principles. When structured light hits a non-planar surface, the pattern distorts predictably, enabling a 3D reconstruction of the surface. Accurate reconstruction depends on system [calibration](/source/Calibration)—which establishes the precise geometric relationship between the projector and camera to prevent depth errors and, consequently, geometric distortions from misalignment—as well as the use of [pattern analysis](/source/Pattern_analysis) algorithms.[1][2][3]

## Types of coding

Structured light scanning relies on various coding techniques for 3D shape measurement. The most widely used ones are binary, Gray, and phase-shifting. Each method presents distinct advantages and drawbacks in terms of accuracy, computational complexity, sensitivity to [noise](/source/Noise_(signal_processing)), and suitability for dynamic objects. Binary and Gray coding offer reliable, fast scanning for static objects, while phase-shifting provides higher detail. Hybrid methods, such as binary defocusing and Fourier transform profilometry (FTP), balance speed and accuracy, enabling real-time scanning of moving 3D objects.[2][3][4]

### Binary coding

Binary coding uses alternating black and white [stripes](/source/Stripe_(pattern)), where each stripe represents a [binary digit](/source/Binary_digit). This method is computationally efficient and widely employed due to its simplicity. However, it requires the projection of multiple patterns sequentially to achieve high [spatial resolution](/source/Spatial_resolution). While this approach is effective for scanning static objects, it is less suitable for dynamic scenes due to the need for multiple image captures. In addition, the accuracy of binary coding is constrained by projector and camera [pixel](/source/Pixel) resolution, and it needs precise [thresholding](/source/Thresholding_(image_processing)) algorithms to distinguish projected stripes accurately.[4]

### Gray coding

Further information: [Gray code](/source/Gray_code)

Gray coding, named after physicist [Frank Gray](/source/Frank_Gray_(researcher)), is a [binary encoding](/source/Binary_encoding) scheme designed to minimize errors by ensuring that only one bit changes at a time between successive values. This reduces transition errors, making it particularly useful in applications such as [analog-to-digital conversion](/source/Analog-to-digital_conversion) and optical scanning.[5] In structured light scanning, where Gray codes are used for pattern projection, a drawback arises as more patterns are projected: the stripes become progressively narrower, which can make them harder for cameras to detect accurately, especially in [noisy](/source/Noise_(signal_processing)) environments or with limited resolution. To mitigate this issue, advanced variations such as complementary Gray codes and phase-shifted Gray code patterns have been developed. These techniques introduce opposite or [phase-aligned](/source/Phase_(waves)) patterns to enhance [robustness](/source/Robustness_(computer_science)) as well as to aid in error detection and correction in complex scanning environments.[2][6]

### Phase-shifting

Phase-shifting techniques use [sinusoidal wave](/source/Sinusoidal_wave) patterns that gradually shift across multiple frames to measure depth. Unlike binary and Gray coding, which provide depth in discrete steps, phase-shifting allows for smooth, continuous depth measurement, resulting in higher precision. The main challenges are that depth ambiguities can occur because the repeating wave patterns make it difficult to determine exact distances, which requires extra [reference data](/source/Reference_data) or advanced processing to resolve, and, because multiple images are needed, this method is not ideal for moving objects—as motion can create distortions and introduce [artifacts](/source/Artifact_(error)) in the measurement.[4]

### Hybrid methods

To address the limitations of phase-shifting in dynamic environments, binary defocusing techniques have been developed, in which binary patterns are deliberately blurred to approximate sinusoidal waves. This approach integrates the efficiency of binary projection with the precision of phase-shifting, enabling high-speed 3D shape capture. Advances in high-speed [digital light processing](/source/Digital_light_processing) (DLP) projectors have further supported the adoption of these hybrid methods in applications requiring real-time scanning, including [biomedical imaging](/source/Biomedical_imaging) and industrial inspection.[3]

Fourier transform profilometry (FTP) measures the shape of an object using a single image of a projected pattern. It analyzes how the pattern deforms over the surface, enabling fast, full-field 3D shape measurement, even for moving objects. The process involves applying a [Fourier transform](/source/Fourier_transform) to convert the image into frequency data, filtering out unwanted components, and performing an inverse transform to extract depth information. Although FTP is often used alone, hybrid systems sometimes combine it with phase-shifting profilometry (PSP) or dual-frequency techniques to improve accuracy while maintaining high speed.[7][8]

## See also

- [Depth map](/source/Depth_map)

- [Dual photography](/source/Dual_photography)

- [Laser Dynamic Range Imager](/source/Laser_Dynamic_Range_Imager)

- [Lidar](/source/Lidar)

- [Light stage](/source/Light_stage)

- [Range imaging](/source/Range_imaging)

- [Stereoscopy](/source/Stereoscopy)

- [Structured Illumination Microscopy (SIM)](/source/Super-resolution_microscopy#Structured_illumination_microscopy_(SIM))

- [Structured-light 3D scanner](/source/Structured-light_3D_scanner) – Sensor that can create 3D scans using visible light

- [Time-of-flight camera](/source/Time-of-flight_camera)

## References

1. ^ [***a***](#cite_ref-Geng_1-0) [***b***](#cite_ref-Geng_1-1) Geng, Jason (2011). "Structured-light 3D surface imaging: a tutorial". *Advances in Optics and Photonics*. **3** (2): 128–160. [Bibcode](/source/Bibcode_(identifier)):[2011AdOP....3..128G](https://ui.adsabs.harvard.edu/abs/2011AdOP....3..128G). [doi](/source/Doi_(identifier)):[10.1364/AOP.3.000128](https://doi.org/10.1364%2FAOP.3.000128).

1. ^ [***a***](#cite_ref-Lu_2-0) [***b***](#cite_ref-Lu_2-1) [***c***](#cite_ref-Lu_2-2) [***d***](#cite_ref-Lu_2-3) Lu, Xingyu (2024). "SGE: structured light system based on Gray code with an event camera". *Optics Express*. **32** (26): 46044–46057. [arXiv](/source/ArXiv_(identifier)):[2403.07326](https://arxiv.org/abs/2403.07326). [Bibcode](/source/Bibcode_(identifier)):[2024OExpr..3246044L](https://ui.adsabs.harvard.edu/abs/2024OExpr..3246044L). [doi](/source/Doi_(identifier)):[10.1364/OE.538396](https://doi.org/10.1364%2FOE.538396).

1. ^ [***a***](#cite_ref-Zhang_3-0) [***b***](#cite_ref-Zhang_3-1) [***c***](#cite_ref-Zhang_3-2) Zhang, Song (2018). "High-speed 3D shape measurement with structured light methods: A review". *Optics and Lasers in Engineering*. **106**: 119–131. [Bibcode](/source/Bibcode_(identifier)):[2018OptLE.106..119Z](https://ui.adsabs.harvard.edu/abs/2018OptLE.106..119Z). [doi](/source/Doi_(identifier)):[10.1016/j.optlaseng.2018.02.017](https://doi.org/10.1016%2Fj.optlaseng.2018.02.017).

1. ^ [***a***](#cite_ref-Salvi_2004_4-0) [***b***](#cite_ref-Salvi_2004_4-1) [***c***](#cite_ref-Salvi_2004_4-2) Salvi, Joaquim; Pagès, Jordi; Batlle, Joan (2004). "Pattern codification strategies in structured light systems". *[Pattern Recognition](/source/Pattern_Recognition_(journal))*. **37** (4): 827–849. [Bibcode](/source/Bibcode_(identifier)):[2004PatRe..37..827S](https://ui.adsabs.harvard.edu/abs/2004PatRe..37..827S). [doi](/source/Doi_(identifier)):[10.1016/j.patcog.2003.10.002](https://doi.org/10.1016%2Fj.patcog.2003.10.002).

1. **[^](#cite_ref-5)** [Doran, Robert W.](/source/Robert_W._Doran) (2007). "The Gray Code". *Journal of Universal Computer Science*. **13** (11): 1573–1597. [doi](/source/Doi_(identifier)):[10.3217/jucs-013-11-1573](https://doi.org/10.3217%2Fjucs-013-11-1573).

1. **[^](#cite_ref-Kim_6-0)** Kim, Daesik; Ryu, Moonwook; Lee, Sukhan (2008). *Antipodal gray codes for structured light*. 2008 IEEE International Conference on Robotics and Automation. Pasadena, CA. pp. 3016–3021. [doi](/source/Doi_(identifier)):[10.1109/ROBOT.2008.4543668](https://doi.org/10.1109%2FROBOT.2008.4543668).

1. **[^](#cite_ref-7)** Rosenberg, Ori Izhak; Abookasis, David (2020). "Hybrid method combining orthogonal projection Fourier transform profilometry and laser speckle imaging for 3D visualization of flow profile". *Journal of Modern Optics*. **67** (13): 1197–1209. [Bibcode](/source/Bibcode_(identifier)):[2020JMOp...67.1197R](https://ui.adsabs.harvard.edu/abs/2020JMOp...67.1197R). [doi](/source/Doi_(identifier)):[10.1080/09500340.2020.1823503](https://doi.org/10.1080%2F09500340.2020.1823503).

1. **[^](#cite_ref-8)** Chen, Liang-Chia; Ho, Hsuan-Wei; Nguyen, Xuan-Loc (2010). "Fourier transform profilometry (FTP) using an innovative band-pass filter for accurate 3-D surface reconstruction". *Optics and Lasers in Engineering*. **48** (2): 218–225. [Bibcode](/source/Bibcode_(identifier)):[2010OptLE..48..182C](https://ui.adsabs.harvard.edu/abs/2010OptLE..48..182C). [doi](/source/Doi_(identifier)):[10.1016/j.optlaseng.2009.04.004](https://doi.org/10.1016%2Fj.optlaseng.2009.04.004).

## External links

- [Projector-Camera Calibration Toolbox](https://code.google.com/p/procamcalib/)

- [Tutorial on Coded Light Projection Techniques](http://eia.udg.es/~qsalvi/Tutorial_Coded_Light_Projection_Techniques_archivos/v3_document.html)

- [Structured light using pseudorandom codes](https://ieeexplore.ieee.org/document/667888)

- [High-accuracy stereo depth maps using structured light](https://web.archive.org/web/20060816023556/http://community.middlebury.edu/~schar/papers/structlight/)

- [A comparative survey on invisible structured light](http://pagesperso-orange.fr/fofi/Downloads/Fofi_EI2004.pdf)

- [A Real-Time Laser Range Finding Vision System](http://www.seattlerobotics.org/encoder/200110/vision.htm)

- [Dual-frequency Pattern Scheme for High-speed 3-D Shape Measurement](https://web.archive.org/web/20110513090802/http://vis.uky.edu/~realtime3d/Doc/Manuscripts/Dual-frequency%20pattern%20scheme%20for%20high-speed%203-D%20shape%20measurement.pdf)

- [High-Contrast Color-Stripe Pattern for Rapid Structured-Light Range Imaging](https://link.springer.com/chapter/10.1007/978-3-540-24670-1_8)

---
Adapted from the Wikipedia article [Structured light](https://en.wikipedia.org/wiki/Structured_light) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Structured_light?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
