Publications / 2025 / Deep transformer-enhanced dynamic structured light for three-dimensional moving object imaging

Deep transformer-enhanced dynamic structured light for three-dimensional moving object imaging

Peng Li, Pengkai Dou, Zhilong Su, Lei Lu, Wei Pan
Optics Express, 33(25):52084-52104
Phase-shift error map ε induced by Z-direction motion of the “Aphrodite” statue, as estimated by the proposed method. Fig. 8(c) of the paper.

In one sentenceWhen an object moves during phase-shifting structured-light capture, a transformer tracks its pixels across the fringe images and the motion-induced phase error is solved per pixel, cutting RMSE from 1.401 mm (standard phase shifting) to 0.072 mm on a moving plate.

The problem

Phase-shifting profilometry (PSP) projects a sequence of sinusoidal fringe patterns, each shifted by a known amount, and recovers the 3D shape of a surface from the phase of the captured images. It is robust to ambient light and to changes in surface reflectivity, but it needs at least three images, and the object must stay still while they are taken. If the object moves, each surface point is lit by different projector pixels and seen by different camera pixels in each frame, so the phase steps between frames are no longer the intended ones. The result is ripples, phase-unwrapping errors or a failed reconstruction.

Faster projectors and cameras reduce the problem but raise hardware cost, and the effect of motion still remains. Most error-estimation methods handle motion only along the depth direction and do not address the pixel mismatch caused by motion in other directions. Tracking-based compensation models such as Lu’s work well within the X–Y plane but handle Z-direction motion poorly, and methods that estimate a single global translation miss local, pixel-level motion differences. When an object moves in an arbitrary direction, every surface point has its own displacement and therefore its own phase error.

Schematic of a structured-light setup: a DLP projector casts vertical fringes through a DMD plane onto a moving statue, a camera records it on an image plane. A surface point S_m moves to S'_m, so its projected and observed positions shift. Panels (b) and (c) show the same 3D motion in X, Y, Z axes, split into an in-plane move from S_m to S_0 and a vertical move from S_0 to S'_m.
A moving statue under fringe projection. (a) The surface point Sm moves to S′m, so it is encoded by a different projector pixel and observed at a different camera pixel. (b–c) The 3D motion is split into in-plane motion in the X–Y plane (Sm to S0) and out-of-plane motion along Z (S0 to S′m). Fig. 1 of the paper.

How it works

The method keeps standard four-step phase shifting and adds two things: a learned tracker that finds where each pixel of one fringe image went in the next ones, and a pixel-wise model of the phase error that remains after that tracking. Both run inside a short sliding window of five frames.

  1. Model the motion-induced phase error. The projector cycles four-step fringes (π/2 apart) while the camera captures the moving object. The motion of each surface point is split into an in-plane displacement, which moves the point to another pixel (Δu, Δv), and a displacement along Z, which adds a phase error. The total phase error is the sum of the two.
  2. Track pixels with a transformer. The image sequence is split into windows of five frames, and the middle frame is the key frame. A COTR (COrrespondence TRansformer) network, initialised with its original pre-trained weights and fine-tuned on fringe images, matches query pixels in the key frame to the other four frames. A shared CNN backbone extracts features from both images, a transformer encoder–decoder relates them, and an MLP head predicts each match.
  3. Align the frames and solve for the Z error. The matches define a pixel-wise mapping that aligns all five frames so the same surface point is followed through the window. Within the short window, the Z-direction velocity is treated as constant, so each frame adds the same extra phase error ε, and frame n of the window (n = 1 to 5, key frame n = 3) carries a Z part of (n − 3)ε. Combining the intensities of the five frames gives three equations in the object phase Φ and ε. For small ε they reduce to a linear equation K1ε + K0 = 0, which is solved at every pixel, and the corrected phase Φ follows.
  4. Unwrap and reconstruct. The corrected wrapped phase is unwrapped with a three-frequency phase-shifting algorithm, using two sets of lower-frequency fringes projected alternately with the high-frequency ones, and converted into 3D shape with the calibrated camera–projector model.
  5. Slide the window. The window moves on by one frame, so each newly acquired image, together with the four before it, gives a new 3D shape of the object.
Pipeline diagram: a sliding window of fringe images with a key frame feeds a COTR motion-tracking block; tracked points across five fringe frames lead to a phase-shifting estimation step that produces a phase-shift error map ε and a wrapped phase image, followed by phase unwrapping and a colour-coded 3D reconstruction of a statue.
Framework overview. COTR tracks points between the key frame and the other frames of each sliding window; the phase-shifting estimation solves the error map ε and the wrapped phase, which is unwrapped and reconstructed in 3D. Fig. 3 of the paper.

Results

The system uses a high-speed camera at 512 × 512 pixels and 30 fps and a DLP projector. To fine-tune COTR, the authors captured 45 dynamic scenes of sculptures, toys and industrial parts on a shallow box of sand (about 5 cm deep), with 60 motions each, giving 2,700 pairs of pre- and post-motion fringe images (2,400 for training, 300 for validation). Ground-truth matches came from an extra blank image projected at each pose, on which a robust local optical flow method computed dense displacements. Training converged after about 1,400 epochs and took about 42 hours.

The ceramic plate was moved by a translation stage at 40° to the camera’s optical axis in 1 mm steps, with a 12-step phase-shifting measurement as ground truth. Standard PSP shows clear ripple distortion. Guo’s method smooths part of it, Lu’s method compensates only motion in the X–Y plane, and Wang’s method simplifies the phase-shift error, which leads to even larger errors. With steps of ±1, ±2 and ±3 mm, the RMS error of the proposed method stays below 0.1 mm (Fig. 6(f)). On the statue, PSP shows stripe artifacts and discontinuities along the edges, Guo’s method still has large errors at the edges, and Lu’s method leaves periodic ripples because Z-direction motion is not compensated; the proposed method recovers the contour more accurately.

Ceramic plate experiment: (a) setup sketch with plane, camera, projector and a 40 degree motion arrow; (b) a timeline t1 to t6 of fringe images; (c) five colour depth maps for PSP, Guo's, Lu's, Wang's methods and Ours; (d) error histograms labelled RMS 1.401, 1.384, 1.352, 2.028 and 0.072 mm; (e) cross-section profiles; (f) depth RMS error near 0.06 to 0.1 mm for moving speeds from minus 3 to 3 mm per step.
Moving ceramic plate. (a–b) Setup and acquisition; (c) reconstructions by PSP, Guo’s, Lu’s and Wang’s methods and the proposed method; (d) error histograms against the ground truth; (e) cross-sections at y = 325 pixels; (f) RMS error of the proposed method for motion steps from −3 to 3 mm. Fig. 6 of the paper.
Statue reconstructions by PSP, Guo's method, Lu's method, Ours and Ground Truth, each with two enlarged regions; PSP and Guo show holes and stripes. Below: cross-section profiles and a colour map of the phase error epsilon in radians over the statue.
“Aphrodite” statue moving at 40° to the optical axis. (a) Reconstructions with two enlarged regions per method; (b) profiles along pixel row y = 268; (c) the per-pixel phase error ε from Z-direction motion estimated by the method. Fig. 8 of the paper.

The method was also tested on a static statue next to a rotating one, on a rotating fan model with a smooth, weakly textured surface, on a statue on a continuously rotating platform, and on objects that translate and rotate at the same time. Under combined translation and rotation, the rotation adds phase deviations of up to about 1 rad in the outer regions, and the method still keeps most surface areas accurate. The authors note its limits: when the translation along Z is too large, phase-error estimation can still fail (marked regions in Fig. 12); the authors suggest increasing the projection rate or combining the framework with geometry-constraint-based or Gray-code-based unwrapping. Because the estimate relies on a five-frame window, the method works reliably for small inter-frame motion; standard frame rates suffice for slow to moderate motion, while fast objects need high-frame-rate cameras and projectors.

Two rows of 3D reconstructions of a statue in two views, colour-coded by height, with phase error maps on the right. The bottom row's second panel and error map have an orange box marking a region where the error map shows a large negative error.
Combined translation and rotation. Top row: rotation with translation along X; bottom row: rotation with translation along Z. (a, d) traditional PSP; (b, e) the proposed method; (c, f) estimated phase error maps ε. The boxed regions mark where very large Z displacement still defeats the error estimate. Fig. 12 of the paper.

Cite

@article{li2025deep,
  title={Deep transformer-enhanced dynamic structured light for three-dimensional moving object imaging},
  author={Li, Peng and Dou, Pengkai and Su, Zhilong and Lu, Lei and Pan, Wei},
  journal={Optics Express},
  volume={33},
  number={25},
  pages={52084--52104},
  year={2025},
  publisher={Optica Publishing Group},
  doi={10.1364/oe.579307}
}
Type
Article Journal
Topic
Structured Light & 3D Imaging
Venue
Optics Express, 33(25):52084-52104
Year
2025
DOI