Back to Projects
3D Vision

Structured Light 3D Reconstruction

Sub-millimeter 3D surface reconstruction using multi-frequency phase-shifting fringe projection, achieving 20 ฮผm accuracy.

November 5, 2023 GitHub
3D Reconstruction Fringe Projection Python Phase Unwrapping

Overview

This project implements a complete structured-light 3D scanner using phase-shifting fringe projection profilometry (FPP). Target applications include quality control of precision machined parts and reverse engineering.

Principle

A DLP projector casts sinusoidal fringe patterns onto the object surface:

In(x,y)=A(x,y)+B(x,y)cosโกโ€‰โฃ(ฯ•(x,y)+2ฯ€nN)I_n(x, y) = A(x,y) + B(x,y)\cos\!\left(\phi(x,y) + \frac{2\pi n}{N}\right)

where AA is background illumination, BB is modulation amplitude, ฯ•\phi is the phase encoding depth, and NN is the number of phase steps (we use N=4N = 4).

Phase Retrieval

Using four-step phase-shifting, the wrapped phase is recovered as:

ฯ•w(x,y)=arctanโกโ€‰โฃ(I3โˆ’I1I0โˆ’I2)\phi_w(x,y) = \arctan\!\left(\frac{I_3 - I_1}{I_0 - I_2}\right)

Phase unwrapping is performed using a multi-frequency heterodyne approach. Two additional fringe frequencies f1f_1 and f2f_2 generate a synthetic wavelength:

ฮ›12=f1f2โˆฃf1โˆ’f2โˆฃ\Lambda_{12} = \frac{f_1 f_2}{|f_1 - f_2|}

This extends the unambiguous measurement range to cover the full object depth range.

Calibration

Camera and projector are calibrated using Zhang's planar checkerboard method. The stereo calibration produces the fundamental matrix F\mathbf{F} and the projection matrices Pc\mathbf{P}_c, Pp\mathbf{P}_p used for triangulation.

Results

| Specification | Value | |---|---| | Accuracy (RMS) | 20 ฮผm | | Point density | ~2M points per scan | | Measurement volume | 200 ร— 150 ร— 50 mm | | Scan time | 1.2 s |

Tech Stack

PythonNumPySciPyOpenCVOpen3DC++