Some original image labels are retained; figure captions and explanations are provided in English.

PART III · 3D VISION · Depth imaging

3D Imaging: Stereo Vision, Laser Triangulation, Structured Light and ToF

Stereo, laser triangulation, structured light and ToF are compared for inspections that need height or depth information. A stereo example calculates how a small disparity error affects depth, followed by the steps from point cloud to measurement. Missing points on reflective metal and practical accuracy tests help frame the choice between methods.

Article sectionsWhen is 2D imaging insufficient?How is depth calculated in stereo vision?Choosing between stereo, laser triangulation, structured light and ToFWhat information is missing from a 2D camera image?From point clouds to measurementsHow do 3D imaging methods differ physically?How should a 3D system's accuracy be tested?Why can shiny metal produce incomplete point clouds?Frequently asked questions

When is 2D imaging insufficient?

A 2D camera alone may not provide enough information to measure height, surface profile, volume, depth or separation between planes. A 2D image is a projection: very different 3D shapes can generate similar images. Different lighting directions or known geometric constraints sometimes provide depth cues, but these should not be confused with a general-purpose, reliable depth measurement.

For example, an overhead silhouette may not reveal whether a cap is fully seated. Its horizontal position can be correct while it remains 2 mm too high. In that case, laser triangulation, structured light, stereo vision or another suitable depth sensor is a more appropriate family of solutions.

How is depth calculated in stereo vision?

Stereo systems view the same object with two cameras. After appropriate calibration and rectification, the horizontal difference between corresponding image points is called disparity. In ideal parallel, rectified geometry, approximate depth is given by Z = f_px × B / d, where B is the distance between camera centers, f_px is focal length in pixels and d is disparity in pixels. OpenCV stereo depth.

Stereo baseline, disparity and depth
FIGURE Original schematic showing two cameras, a target point, the baseline and the ideal relationship Z=f·B/d.

For example, with B = 80 mm, f_px = 1,200 pixels and d = 96 pixels, the result is Z = 1,000 mm. A disparity difference of just one pixel can change depth by roughly 10 mm. These figures illustrate the theoretical sensitivity of a particular stereo arrangement; actual accuracy also depends on matching errors, calibration and optics.

Difficult conditions for stereo: textureless surfaces, reflective metals, repetitive patterns, occlusions and low contrast. Passive stereo is therefore not necessarily the best choice for every industrial metal-surface measurement.

Choosing between stereo, laser triangulation, structured light and ToF

Laser triangulation estimates a height profile by observing the position of a projected laser line on a surface. Moving the sensor or part can assemble a 3D surface. It is common in profile-inspection stations, where calibration, reflectivity, scan speed and laser safety must be considered.

Structured light projects known patterns to recover geometry. It can produce dense depth data on complex shapes, but shiny surfaces, motion and ambient light are important limitations.

Time of flight, or ToF, estimates distance from the timing or phase of returned emitted light. It can be convenient for larger working volumes, but tight tolerances require careful evaluation of resolution, multipath and surface effects.

Passive stereo relies on matching two images and therefore requires sufficient texture and common visibility. Laser- and projector-based methods provide additional structure through active illumination.

False-color height-map visualization of a 3D result
FIGURE An original synthetic height field shown with two color mappings; not an actual sensor measurement.
Method Suitable scenario Main limitation
Single 2D camera Planar contours, presence checks and planar measurements No direct depth information
Stereo Textured 3D scenes and larger volumes Texture, matching and baseline constraints
Laser triangulation Cross-section profiles, steps and height measurements Scanning motion, surface and speed effects
Structured light Dense 3D surface scanning Motion, reflections and ambient light
ToF Coarse to medium-resolution depth across larger volumes Resolution and multipath limitations

This table is not a universal performance ranking. Manufacturer documentation and real samples must support application-specific validation. Compare measurement uncertainty, cycle time, reliability and integration cost, not resolution alone.

What information is missing from a 2D camera image?

A conventional camera projects a scene's color and brightness distribution onto a two-dimensional plane. Calibration can correct some geometric distortion, but it does not independently recover the height of every unknown point. A 0.2 mm depression in a metal part may be difficult to distinguish reliably in 2D if it creates little visible shading. A method providing actual height or profile information may be necessary.

How does depth uncertainty arise in stereo vision?

For an ideal rectified stereo arrangement, depth is Z = f·B/d, where f is focal length in pixels, B is the baseline between camera centers, and d is the horizontal difference between corresponding image points. Smaller disparity means greater depth, so small matching errors cause larger depth errors at longer distances. The approximation |ΔZ| ≈ Z²·|Δd|/(f·B) explains this growth.

WORKED EXAMPLE · IDEAL MODEL
f = 1000 px, B = 0.1 m, d = 100 px

The target depth is Z = 1000×0.1/100 = 1 m. A one-pixel matching error produces approximately 0.01 m, or 10 mm, of depth variation. This is only the ideal model's approximate sensitivity: calibration, optics, surface texture and matching algorithms add uncertainty in real systems.

MethodSuitable conditionsKey constraints
StereoTextured surfaces, passive outdoor imaging, medium to long rangeMatching repetitive or textureless surfaces; occlusion
Laser triangulationProfile and height measurement; conveyor scanningReflective or dark surfaces, eye safety and speed synchronization
Structured lightDense geometry in static or controlled scenesProjection contrast, bright ambient light and motion
ToFRapid area-wide depth estimationMultipath, reflectivity and application-dependent resolution

From point clouds to measurements

A 3D sensor usually provides an x-y-z point cloud or height map. Measurement starts by isolating the relevant surface and aligning it to a reference plane or CAD geometry. Metrics such as depression depth, curvature, gap, volume or flatness can then be extracted. Report point spacing, z-noise, scan-direction sampling and the missing-point fraction together to make results meaningful.

How should a 3D sensor choice be validated?

Do not rely solely on a catalog claim such as 0.01 mm precision. Distinguish resolution, repeatability and accuracy, and check the stated working-distance and surface conditions. Test matte and glossy samples, different colors, slanted edges and vibration at production speed. Compare results with independent reference measurements before acceptance.

How do 3D imaging methods differ physically?

Passive stereo triangulates corresponding points in two images. Structured light projects known patterns and uses their observed changes to infer depth. A laser profiler typically acquires one cross-section with a narrow line; movement of the part or sensor assembles a surface from successive profiles. ToF measures the time or phase associated with light's round trip.

These distinctions also determine data format. A laser profiler yields profiles assembled over time, a ToF camera a depth matrix, and structured light a dense collection of surface points. The production requirement determines data volume, real-time processing load and ambient-light sensitivity together.

Where 3D methods obtain their informationPassive image matching, projected structure or light travel time StereoMatch pointsin two viewsDisparityLasertriangulationGeometric shiftof a laser lineProfileStructuredlightDistortion ofprojected patternsDense depthToFLight returntime or phaseDepth field
FIGURE Stereo, laser triangulation, structured light and ToF infer depth from different physical observations.

How should a 3D system's accuracy be tested?

First clarify what precision means technically: axis sampling interval, repeatability or absolute height error? These measures are not interchangeable. Test the sensor at different working distances using known height steps, reference planes or suitably calibrated artifacts. On highly reflective and dark surfaces, report missing-data fraction, point-cloud noise and registration errors together.

On moving lines, synchronize the profiler with the conveyor encoder. If profiles are captured at fixed time intervals while line speed changes, physical sampling along the motion direction becomes uneven. Such distortion can systematically affect length or volume even when the image looks acceptable.

Why can shiny metal produce incomplete point clouds?

Shiny surfaces strongly influence the direction and intensity of returned light. Specular reflection can saturate a laser profiler or weaken its observed line. Uniform and repetitive textures make stereo correspondence difficult. Multipath and surface reflectivity affect ToF distance estimates. These are different error mechanisms requiring method-specific tests.

Automatically filling missing regions from neighboring points can conceal a physical depression or defect. A better approach is to retain raw and filtered point clouds separately, report missing-data fractions by product group and state the reliability of the region used for measurement.

Why are coordinate systems critical in 3D measurement?

A sensor's x-y-z coordinates are generally expressed in its own reference frame. Comparison with a conveyor, robot or CAD model requires transformation into part coordinates. That transformation matters as much as the measurement itself. Moving the reference plane or fixture changes the meaning of measurement points relative to the part, even without changing sensor calibration.

Ideal stereo depth calculator

Calculating…

Approximation for an ideal rectified stereo model; not a guarantee of real measurement accuracy.

Frequently asked questions

Is a stereo camera more precise than a laser profiler?

There is no universal ranking. Working distance, calibration, surface texture and resolution determine suitability.

Can ToF measure to 0.01 mm?

Do not assume that capability. Validate the sensor's stated accuracy and repeatability under the application's actual conditions.

What is a point cloud useful for?

Samples of 3D coordinates support estimates of surface geometry, height, flatness, volume and position.

Technical references

This article combines explanations supported by technical references with educational numerical examples. The example system values are not measurements from an actual facility.