Skip to content

Structured-light decoding

Recover projector-camera correspondences from a sequence of known projected patterns.

Try it on your image ↓

VISUAL WALKTHROUGH3D vision
REFERENCE INPUTProjected stripe sequence

A calibrated projector illuminates the scene with known patterns.

RESULTUse calibration to recover shape

The calibrated geometry converts correspondences to surface depth. This curved grid illustrates the reconstruction.

STEP 03 / 03

Use calibration to turn correspondences into 3D geometry.

Illustrative example. The stages explain the method; they are not a live OpenCV execution.

Try it on an image

YOUR IMAGE · REAL OPENCV

Experiment at pixel level

Open full lab ↗

Generate Gray-code projector patterns. These do not transform the input photo; decoding physical depth requires a synchronized camera capture for every projected pattern.

The engine loads on your first run. Your images stay in this browser.

Input448 × 320
OutputWaiting for a result

Scroll over either image to zoom at the pointer. Use the scrollbars to pan both views over the same relative area. Zoom is relative to the input; pixel coordinates belong to each image. Warps can change scene correspondence.

Pixel inspector RGBA · native values · matched scale · 9 × 9 output pixels
Hover to inspect. Click to pin a pixel.
Input
Select a pixel

Output
Select a pixel

Sample models and licenses

When to use it

Measure scene shape with a calibrated projector and camera under controlled capture.

How it works

  1. 01Project and capture the required pattern sequence.
  2. 02Decode intensity changes into projector coordinates or phase.
  3. 03Use calibration to turn correspondences into 3D geometry.

projected codes → decoded correspondences → triangulation

What to tune

Gray-code and sinusoidal methods have different sequences and calibration requirements. Thresholds govern accepted illumination evidence.

Where it breaks down

Motion between captures, shadows and reflections invalidate codes. Pattern generation alone is not a complete reconstruction.

TypeScript API

Open an entry for its exact overloads, parameter descriptions, result ownership and pinned upstream source.

All of these calls execute on the CPU. Native objects need explicit disposal. See matrices and ownership and build compatibility.