ROBOMATICS / Blog

3D machine vision in industry: how it works and when you need it

3D machine vision gives a system more than an image: it also gives the distance to every visible point. From this data you can calculate a part's position and orientation in space, its height, volume or deviations in shape. Where a 2D camera sees only an outline, a 3D camera or 3D scanner sees the spatial form. That is why 3D vision is so often the basis for a robot that has to find and pick a part on its own.

What a 3D camera delivers

The output of a 3D camera usually comes in two forms:

  • Point cloud - a set of points in space, each with X, Y and Z coordinates. It is used for measurement and for finding planes, axes and edges.
  • Depth map - an image in which every pixel holds the distance to the object. It is convenient to process much like an ordinary photo, for example when looking for the highest points of a pile.

A standard 2D image is often captured at the same time, so colour or texture information can be combined with the geometry.

The main 3D technologies

Structured light

A projector casts a known pattern onto the object, and a camera observes how the pattern is distorted by the surface. Depth is calculated from that distortion. Structured light can reach sub-millimetre accuracy and high resolution, but a measurement takes longer and the object usually has to stay still. The exception is the Photoneo MotionCam-3D, designed for moving objects. We cover these devices in more detail in Photoneo PhoXi and MotionCam-3D.

Time-of-flight (ToF) cameras

A ToF camera emits light and measures how long it takes to travel to the object and back. This produces a depth map of the whole scene at once. ToF cameras are fast, robust and cover a large area, but their resolution is lower and their accuracy is at millimetre to centimetre level. More in our article on ToF 3D cameras.

Laser triangulation

A laser projects a line and a camera views it from an angle. Each frame gives one surface profile, and the full 3D model is built up as the object moves under the scanner or the scanner moves over the object. This suits conveyors and continuous products, where there is motion anyway.

Stereo vision

Two cameras capture the same scene from slightly different positions, much like human eyes. Depth is calculated from how far the same point is shifted between the two images. Stereo vision works well on textured surfaces; for smooth, uniformly coloured surfaces a pattern is sometimes projected as well.

When 2D is enough and when you need 3D

A 2D camera is the simpler and cheaper solution, so it is always worth checking first whether it will do the job. 2D is usually enough when:

  • the part is flat or always lies in the same plane;
  • you need to read characters, QR codes or instrument displays;
  • you are checking colour or contrast differences, labels or kit completeness.

For example, on a metrology test bench we read the LCD displays of water meters once per second with four 2D cameras - 3D is not needed there.

You need 3D when:

  • height, volume or shape matters, not just the outline;
  • parts lie in a pile or at random and the robot has to find a pick point;
  • contrast between part and background is low, but the height differs;
  • you need to determine a part's tilt or its axis in space.

Accuracy: what it depends on

The accuracy of a 3D system is not determined by the datasheet alone. The key factors are:

  1. Technology. ToF cameras typically work at millimetre to centimetre level, structured light at sub-millimetre level. According to the manufacturer, the accuracy of the Photoneo PhoXi family ranges from 25 to 500 µm, depending on the model.
  2. Distance and field of view. The larger the area a camera covers, the fewer points fall on each millimetre.
  3. Surface. Dark, transparent and especially shiny surfaces cause missing or false points. See 3D scanning of shiny surfaces.
  4. Calibration. Without accurate calibration, even a good scanner will give wrong coordinates.
  5. Processing. Fusing several frames, filtering and artefact removal reduce noise considerably.

3D vision with robots

For a robot to use the output of a 3D camera, hand-eye calibration is carried out: it establishes where the camera is relative to the robot. A point found by the camera can then be converted into robot coordinates. The camera can be mounted above the work area or on the robot itself - in that case the robot points the scanner where it is needed and can scan the object from several sides.

Our example is a log feeding cell that we are currently commissioning. A ToF 3D camera is mounted above the pile of logs; the software finds the logs and estimates their axis, length and ends, and a KUKA KR 60-3 robot picks a log and feeds it into the feed rollers of a processing machine. In projects like this we follow the principle "AI suggests, safety permits": motion is always permitted by the safety circuit, never by a neural network.

How we start

Our main focus is machine vision, especially 3D. We work with ToF 3D cameras and with Photoneo PhoXi and MotionCam-3D scanners. We start vision projects with a trial on your real parts, so that before any larger investment you can see whether the chosen technology fits. More about the service under machine vision services; to discuss the details, use our contact page.

Our services →

Have a task?

Tell us what you want to automate

Discuss a project → +370 679 34222