

Introducción práctica a la visión artificial
A 2D machine vision system analyses brightness and colour values in a flat image. It is ideal for tasks such as code reading, presence checking, print inspection and outline measurement. In contrast, 3D machine vision measures the height or depth of visible points on an object, representing the result as a height map or point cloud, and is therefore better suited to tasks that depend on shape, volume or position in space. The choice between the two depends on whether the information required by the task is visible as contrast or exists only as geometry.
2D vision is the established standard for most inspection tasks. It is fast and cost-effective, and supported by well-established software tools. However, 3D vision has become far more accessible and is the better option whenever height, volume or the exact pose of a part is important. Many applications use a combination of the two: a 3D sensor measures the shape, while a 2D image is used to check the print, colour or surface marks.
Left side:
Using 2D, measuring the diameter is possible, but the surface cannot be analysed using the same set-up.


Right side:
Using 3D it is possible to measure both the diameter and the size of the deformation with the same set-up.
A 2D camera records the light that reaches each pixel, as grey values or colours. Software then finds edges, patterns, characters, codes or colour differences in the image. With suitable optics, stable backlighting and proper calibration, 2D systems can locate edges and hole positions with subpixel resolution. The achievable measurement accuracy depends on the complete optical, mechanical and software setup.
2D vision depends on contrast. A feature is only visible when lighting, optics and camera make it stand out from its surroundings. That works well for printed information, clear edges and surface marks, and less well for shallow dents, height differences or parts that have the same colour as the background.
Several techniques reach beyond a plain 2D image without a full 3D sensor. Shape from shading and photometric stereo combine images taken under light from different directions to reveal surface topography, such as dents and scratches on glossy metal. Some pattern matching tools estimate the 3D orientation of a known object from a single 2D image. These approaches are useful for detecting surface features, but they generally do not provide the same direct and robust metric height measurement as a calibrated 3D sensor.
A or sensor measures the distance to each point, using laser triangulation, structured light, stereo vision or time-of-flight. The result is a height image or a point cloud in real-world units. Because 3D data describes geometry directly, it is often less affected by variations in colour, print and surface brightness than a purely 2D inspection. However, material properties, reflectivity, transparency and surface texture can still affect 3D measurement quality.


Take a cylindrical part that needs two checks: its diameter and a dent in its surface. A 2D camera with backlighting can measure the outer diameter very precisely from the part’s silhouette. A dent may not affect the silhouette and may produce little contrast in the 2D image. A calibrated 3D measurement, such as laser triangulation with a suitable scan setup, can capture the surface profile of the dent. In practice, the most robust solution may combine both methods: 2D for the diameter and 3D for the surface geometry.




Measurement of slightest height deviations (highlighted)
| Criterion | 2D machine vision | 3D machine vision |
|---|---|---|
Information |
Brightness or colour per pixel |
Height or depth per point |
Depends on contrast |
Yes |
Less dependent on colour and print, but still affected by surface properties and reflectivity |
Typical tasks |
Codes, print, presence, outlines, surface marks |
Height, volume, shape, deformation, 3D pose |
Speed |
Very high |
High, but strongly dependent on the sensing method, field of view and required resolution |
Data volume and processing requirements |
Lower |
Higher, more complex algorithms |
System cost and setup |
Lower, mature tools |
Higher, needs calibration |
Robot guidance |
Parts on a flat plane |
Parts in any position, including bins |
1. Is the information visible as contrast?
Print, codes, colour and clear edges suit 2D.
2. Does the task depend on height, depth or volume?
Fill levels in opaque containers, bead height, flatness or volume point to 3D.
3. Do defects change shape more than appearance?
Dents, bulges and warping are often clearer in 3D.
4. Where do the parts lie?
Parts on a flat conveyor in a known plane can be located in 2D. Parts stacked or lying randomly in a bin prefer 3D.
5. Does colour or print vary?
When appearance varies but geometry is constant, 3D gives more stable results.
6. What do budget and cycle time allow?
2D systems are usually simpler and faster to process. If 2D solves the task reliably, it is the more efficient choice.
When both kinds of information matter, a combined setup or a 3D sensor that also delivers an intensity image covers both.
There is no universally better choice between 2D and 3D machine vision. 2D is usually the most efficient option when the inspection depends on contrast, colour, print or outlines. 3D becomes essential when height, depth, volume, deformation or spatial position matters. In many demanding applications, combining both technologies provides the most reliable result.
The best approach is to first and then select the imaging technology, optics, illumination and software accordingly.
STEMMER IMAGING offers both 2D and 3D technologies from a manufacturer-independent portfolio:
and , and for 2D inspection, and based on laser triangulation, structured light, stereo vision, time-of-flight and line confocal imaging. Line-scan cameras are a 2D technology and are particularly suitable for continuous materials, webs, films and cylindrical surfaces moving through the inspection system.
Because we offer both, our recommendation follows the task, not a preferred technology. 3D is not automatically better than 2D. It is the better choice only when the inspection requires geometric information that cannot be obtained reliably from contrast in a 2D image.
2D machine vision evaluates a flat image of brightness or colour values, while 3D machine vision measures the height or depth of every point and delivers a height image or point cloud. 2D suits codes, print, presence and outline measurement. 3D suits height, volume, shape and the position of parts in space.
Use 3D when the task depends on height, depth, volume or shape, when defects change geometry more than appearance, when parts lie randomly in bins, or when colour and print vary while geometry stays constant. If the required information is clearly visible as contrast, 2D is usually the simpler and faster choice.
3D systems usually cost more and need calibration and more processing power, because they capture and evaluate more data. Prices for 3D sensors have fallen considerably, and pre-calibrated 3D smart sensors reduce setup effort. For tasks that need geometry, 3D is often the only reliable solution.
A conventional 2D camera does not measure height directly; it records brightness or colour values. Techniques such as shape from shading and photometric stereo can provide information about surface relief from multiple images, but they generally do not offer the same direct, calibrated height measurement as a dedicated 3D sensor.
Yes. Many applications use a 3D sensor for shape and a 2D camera for print, codes or colour. Many 3D sensors also deliver an intensity image alongside the height data, so one sensor can cover both tasks.
Not always. If parts are lying flat in a known plane and their orientation can be determined from a 2D image, 2D vision may be sufficient. For parts that are stacked, tilted or randomly positioned in a bin, 3D vision is often preferred because it provides additional information about height, visibility and spatial pose.
2D machine vision systems are often fast, cost-effective and comparatively simple to integrate. They are well suited to code reading, print inspection, presence checks, colour inspection and measurements on a flat plane.
3D systems generally require more complex calibration, data processing and mechanical integration. Their performance can also be affected by reflective, transparent or highly absorptive surfaces, depending on the sensing method.


Describe your application in 5 brief steps. We’ll work with you to find the right solution.
Turn our industry expertise and comprehensive services into your competitive advantage. Our experts will be happy to show you the potential for your company and work with you to realise tailor-made solutions to suit your requirements. We look forward to hearing from you and will get back to you promptly.

