Structured light is the shortest route from a 2D camera to 3D measurement: project a known pattern onto the part, photograph the deformation the part imposes on it, and compute height from that deformation. The pattern you project decides what you can measure. A single line, scanned across the part, yields a complete profile by triangulation, at the cost of relative motion and scan time. A dot grid delivers depth at discrete points in one exposure and nothing in between. A grid paired with a shadow screen reaches transparent parts that return no light to a camera. Below are the geometry, the numbers that drive the choice, a worked example with lens, exposure and scan speed, and the checks to run before you order.
Which pattern should I project: a line, dots or a grid?
Project a line when you need the whole cross-section or a full height map, and dots only when depth at a few discrete points in one exposure is enough — the line must be scanned, the dots land in a single shot, and that scan-versus-shot difference decides the pattern.
What each pattern does to the image, and what that buys:
| Pattern | Depth from | What you get | Motion needed | Typical job |
|---|---|---|---|---|
| Single line | Triangulation on the line's sideways shift | Every point along the line; the full surface once scanned | Line or part scans | Dimensions and profiles of most opaque parts |
| Dot grid | Distortion of the projected grid | Depth only where the dots land | None, single exposure | Height checks at discrete points on moving parts |
| Grid or dots with a shadow screen | Shadow and triangulation | Geometry of refractive parts | Part scans | Glass, clear plastic |
The dot grid does not interpolate. With dots 5 mm apart, a 0.5 mm dent between two dots never enters your data; the line would catch it, the dots cannot. The line pays for that coverage with time: it sees one cross-section per exposure, so the part — or the light — must travel the whole inspection length before you hold a surface. Choose by the measurement you must make, not by what a demo happens to show.
How does a projected line measure height?
The projector throws the line at an angle to the camera axis, so height moves the line's image sideways: 1 mm of part height shifts the image by M × tan θ millimetres on the sensor, and converting that shift back is the whole measurement.
Put the camera normal to a reference plane and project the light plane at an angle θ from the camera axis. A surface h millimetres above the plane then moves the line's image by M · h · tan θ, where M is the lens magnification. Find the line's centre to a fraction of a pixel in every column, subtract the flat-reference position, and each column becomes one height sample; stacked over a scan, the columns form a height map. How to create a 2D image from laser triangulation walks through that assembly, and structured light 3D cameras: projector pixel mapping to 3D points covers the coordinate mapping underneath it.
Two geometry rules follow. First, θ trades resolution against shadowing: a steeper angle moves the image further per millimetre of height but gives steep walls more chance to block the light from the camera. Second, magnification must hold constant across the height range, which is why telecentric optics appear in demanding profile work — laser line profiling with a telecentric lens is the pattern to copy.
How many points does a dot grid give, and how fast?
A 12 × 12 dot grid at 5 mm pitch gives 144 depth points on a 60 mm part in a single exposure — one flash, one frame — and measures nothing between the dots.
Distortion-based decoding is local and single-shot. On a flat reference plane the grid images as a perfect lattice; height displaces each dot by an amount set by its height and its distance from the projector's optical axis, so comparing captured positions against the reference lattice returns one (x, y, z) per dot. Nothing scans and nothing waits, which suits parts that cannot hold still for a sweep — but the dot pitch is your spatial resolution, full stop.
Dense grids raise the point count and raise a second problem: telling one dot from its neighbours. Practical projectors break the symmetry by encoding the pattern — spacing or size varied in a known sequence — so the decoder can re-identify dots after displacement. Strobing the projector for the exposure shortens the flash and sharpens the dots; how to synchronize camera emitter patterns is the procedure.
How do I measure transparent parts with structured light?
Use the shadow method: project the grid through the clear part onto a diffuse plate behind it, and the refracted, displaced pattern on the plate encodes the part's thickness and slope — which is how you dimension refractive parts that defeat direct triangulation.
Direct triangulation fails on refractive parts because they transmit instead of scattering: the projected light passes through, and the camera has nothing at the part itself to see. The fix is to give the light somewhere to land — a diffuse screen behind the part — and to photograph the screen as the object. Where the part is thick or wedged, refraction bends the rays and shifts the pattern; the displacement field, calibrated against the empty-screen image, recovers the geometry. Scanning the part past the grid then builds the full dimensional record, the same coverage argument as the single line.
How fast must I scan for the resolution I need?
One profile per resolution step along travel: at 100 mm/s conveyor speed and 0.1 mm steps you need 1000 profiles per second, and exposure must stay near 0.1 ms so motion smear stays at a tenth of a step.
The arithmetic, for the same 60 mm part at 100 mm/s with 0.1 mm steps:
- Profile rate = 100 mm/s ÷ 0.1 mm = 1000 profiles/s.
- Profiles per part = 60 mm ÷ 0.1 mm = 600, so the part spends 0.6 s in the scan.
- Smear: 100 mm/s × exposure ≤ 0.01 mm gives exposure ≤ 0.1 ms — strobe the projector for it.
- An encoder on the moving axis tags every profile with position, so profiles land on the height-map grid whatever the speed does between steps.
This is line-rate arithmetic, the same division that sizes a line scan camera; how to set the line rate of a line scan camera uses it, and the calculator below runs your numbers.
The result is rows of profiles — a height map. When the downstream step wants XYZ, 2.5D height map to 3D point cloud: pixels to XYZ is the conversion, and on wide webs the same coverage trade returns in line-scan 2.5D systems such as the MV-HLVS-16K100-L60, with 16K resolution and a 120 kHz sampling rate.
What lens and geometry give the depth resolution I need?
Depth resolution is the object-side pixel size divided by tan θ and by your sub-pixel factor: with a 5 µm pixel, 0.08 magnification, θ = 25° and 1/10-pixel line fitting, expect about 0.013 mm of height noise per profile.
Here p is the sensor pixel pitch and S the sub-pixel factor: S = 10 means you locate the line centre to a tenth of a pixel. Carry the same 60 mm example through with an 80 mm field of view, staging margin included, and an illustrative 1280-pixel sensor of 5 µm pixels, 6.4 mm wide:
- Magnification M = 6.4 mm ÷ 80 mm = 0.08.
- Object-side pixel = 5 µm ÷ 0.08 = 62.5 µm, so the 60 mm part spans 60 ÷ 0.0625 = 960 pixels across.
- Lens focal length at 200 mm working distance: f = 200 × 0.08 ÷ 1.08 = 14.8 mm — fit a 16 mm lens.
- Height noise Δz = 5 µm ÷ (0.08 × tan 25° × 10) = 5 ÷ 0.373 ≈ 13 µm, call it 0.013 mm per profile.
Depth of field is rarely the constraint at this magnification. Total DOF ≈ 2 · c · N · (1 + M) / M², so with c = 10 µm, a two-pixel blur allowance, and N = f/4: 2 × 0.010 mm × 4 × 1.08 ÷ 0.0064 = 13.5 mm — far more than a few millimetres of part relief. Open the aperture for light rather than stopping down for focus, because every stop closed doubles the light the projector must supply. Run your own aperture in the depth of field calculator. And when 0.013 mm is not fine enough, improve S first: careful sub-pixel fitting, as in sub-pixel depth sampling, costs less than a new lens.
Should I buy a 3D sensor or build my own rig?
Buy the sensor when a factory-calibrated profiler or structured-light camera already covers your field of view — the pattern engine and its calibration arrive done — and build only when the pattern itself is the variable you control.
The 3D sensors category splits along the same line as the pattern table. Laser profilers are line-plus-camera pairs with the triangulation solved for you:
- Type
- Laser profiler
- Type
- Laser profiler
- Type
- Stereo / structured light
A laser galvanometer design steers the light instead of the part, which suits parts too heavy or too fixtured to move. For single-shot patterns, a projected structured-light camera integrates projector and imager in one housing:
- Type
- Stereo / structured light
If you build instead, the pattern source comes first: the LS-SPC-0103 is a 200 x 150 mm structured light source, and special lights is where to browse.
- Size
- 200-400 mm
- Voltage
- 24 V
- Type
- Structured
What you take on with a self-built rig is calibration: camera intrinsics from a known target — MATLAB dot pattern camera calibration shows one self-built route — plus the projector-to-camera geometry from reference-plane captures. If the method choice is still open wider than patterns, industrial 3D camera selection compares stereo, ToF and structured light head to head.
When is structured light the wrong tool?
Pass on structured light when the surface defeats the pattern: mirror finishes reflect the line out of the lens, near-black parts absorb it, and steep walls shadow it from the camera — no pattern survives those.
Each failure has a first response before you change methods. Mirror-like flats answer to coaxial or diffuse geometry rather than oblique triangulation; steep walls answer to a smaller θ or a second camera on the other side; dark parts answer to power, wavelength and exposure budget — machine vision light wavelengths covers which band your surface returns best. When fine detail on faces matters more than range, structured light versus stereo depth compares the reconstruction quality to expect.
What should I check before ordering?
Six checks: field of view against the part plus its staging error, height range against depth of field, profile rate against line speed, θ against the steepest wall, surface finish against the method, and laser class against your enclosure.
- Field of view covers the part plus positioning error — the 80 mm over a 60 mm part above is a third wider than the part, not decoration.
- Height range fits the depth of field at your f-number (13.5 mm at f/4 in the example).
- Profile rate and exposure meet the speed and smear limits (1 kHz and 0.1 ms above).
- θ resolves what you need without shadowing your worst wall (0.013 mm at θ = 25° above).
- The surface returns the pattern: test the actual material, not a stand-in of similar colour.
- The laser class fits the enclosure and interlocks you can actually build.
Start from the camera finder or open the system configurator at the camera step and settle camera, lens and light in one pass. More measurement guides sit on the 3D vision topic page, and if the pattern choice is still tied after the numbers, send the part, the tolerance and the line speed through the contact page — those three usually decide it.
Questions
Can I get a full surface from a dot grid by projecting more dots?
No — you only ever measure where light lands, so density buys point count, not coverage, and it costs you elsewhere: past a few hundred dots the decoder starts confusing neighbours, so the pattern must be encoded, and encoding trades away part of the density you just bought. If the requirement says surface or profile, the answer is a line and a scan.
What triangulation angle should I pick?
Start between 20° and 30°. Depth resolution scales as 1/tan θ, so steepening from 25° to 35° makes the height number about a third smaller (tan 25° = 0.47 against tan 35° = 0.70), but every degree also narrows the range of wall slopes the camera can still see and pushes the rig wider. Go steeper only when the depth budget demands it and the part has no near-vertical walls.
Should the part move, or should the pattern move?
Whichever axis you can drive accurately. A conveyor or stage moving the part is the default because the encoder is already there; a galvanometer or moving projector head scans the light instead, which suits parts too heavy or too fixtured to move. Accuracy follows the driven axis: 0.1 mm steps need 0.1 mm-class position knowledge, however you generate the motion.
Does the colour of the projected pattern matter?
It matters at the edges. On hot metal the part's own red-to-infrared glow can swamp a red laser, so blue or green projection is the usual fix. Speckle from a coherent laser also sets a floor on line-centre precision; a broader-band source softens it. Choose the band your surface actually returns — test the real material, not a colour chip.
How do I calibrate a rig I build myself?
Two calibrations, not one. First the camera intrinsics from a known target — a dot or checker board imaged at several poses. Second the projector-to-camera geometry: project onto a flat reference plane at two or more known heights and fit the shift-to-height slope; that slope is your scale factor. Re-run both after any mechanical change — a bumped lens moves the scale factor before it visibly moves the image.




