Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

A structured-light depth camera is a sensor that helps a robot measure the 3D shape of nearby objects indoors. It projects a known pattern of infrared dots or grid lines onto a scene and observes how that pattern appears from a slightly different viewpoint. The distortion of the pattern reveals distance, edges, curves, and surface shape.

This matters because robots need depth information to grasp objects, avoid obstacles, map rooms, and interact safely with people.

The camera usually contains an infrared projector, an infrared camera, and processing electronics. Since the projector pattern is known ahead of time, the system can compare the observed pattern with the expected pattern and calculate depth using triangulation. Points that appear shifted more strongly are usually closer to the sensor, while smaller shifts often indicate farther surfaces.

Structured-light cameras work best at short to medium indoor ranges where lighting, surface texture, and object motion can be controlled.

Understanding Robotics: Structured-Light Depth Camera

The key calculation depends on geometry. The projector and camera sit a fixed distance apart, called the baseline. They view the same illuminated spot from different positions.

A spot on a near cup lands at a noticeably different image location than the same kind of spot on a far wall. Software finds this offset, called disparity. It combines the offset with the baseline and the camera focal length to estimate distance.

In words, depth equals focal length times baseline divided by disparity. This relationship explains an important limit. Far objects produce very small shifts, so a tiny measurement error can cause a large error in their reported depth.

Before a camera can make trustworthy measurements, it needs calibration. Calibration tells the system the exact position and angle of the projector relative to the camera. It also accounts for lens distortion.

Lenses can bend straight lines near an image edge, which would otherwise make the depth calculation wrong. Engineers often calibrate with a flat board covered in a precise checker pattern. The result is a model that connects each camera pixel to a viewing ray in real space.

A good depth image is not simply a picture with distances added. It is the result of careful geometric measurement.

Not every surface gives the sensor a useful reading. Dark materials can absorb much of the infrared light. Shiny metal, glass, and polished plastic can reflect the pattern away from the camera or create reflections from the wrong direction.

A clear window may look like an empty area because the pattern passes through it. Pattern shadows create another problem. If one object blocks the projector light, the camera cannot measure the hidden surface.

Fast motion can blur the projected dots during an exposure. Students may notice similar effects when a phone face scanner struggles in bright light, when a robot vacuum treats a reflective table leg strangely, or when a game motion sensor loses track of a moving hand.

Robots rarely use a depth map by itself. They turn depth pixels into groups of points that represent floors, boxes, hands, tools, or furniture. A grasping robot can estimate where the top surface of an object is, then choose an approach direction that avoids a collision.

A mobile robot can separate a nearby chair from the farther wall behind it. Depth readings are often filtered because individual pixels can be noisy or missing. Nearby pixels with similar distances are combined, while isolated impossible values are removed.

When learning this topic, pay attention to the difference between an image coordinate and a real distance. Also remember that a colored depth display is a visual choice.

The colors do not mean the object itself has changed. They represent numerical distance values chosen by the software.

Key Facts

  • Structured light measures depth by projecting a known IR pattern and observing how the pattern shifts on surfaces.
  • Triangulation relates depth to baseline and disparity: Z = fB / d.
  • Z is depth, f is focal length, B is the distance between projector and camera, and d is disparity.
  • Larger disparity usually means a closer object, while smaller disparity means a farther object.
  • Depth maps store distance values for many image pixels, often as a grayscale or color-coded image.
  • Structured-light cameras are most reliable indoors because strong sunlight can overwhelm infrared patterns.

Vocabulary

Structured light
Structured light is a sensing method that projects a known pattern onto a scene so depth can be found from how the pattern changes.
Infrared
Infrared is electromagnetic radiation with wavelengths longer than visible red light, often used by depth cameras because humans cannot see it.
Disparity
Disparity is the apparent shift in a projected or viewed point between two viewpoints, used to calculate distance.
Triangulation
Triangulation is a geometric method for finding distance by using angles or position differences from two separated locations.
Depth map
A depth map is an image in which each pixel stores the distance from the sensor to the visible surface at that point.

Common Mistakes to Avoid

  • Assuming the infrared pattern is visible to human eyes is wrong because most structured-light cameras use wavelengths outside the visible range.
  • Thinking a brighter dot always means a closer surface is wrong because brightness depends on reflectivity, angle, exposure, and distance, not depth alone.
  • Ignoring the baseline between projector and camera is wrong because the depth calculation depends directly on the separation distance B in Z = fB / d.
  • Using structured light in direct sunlight without checking performance is wrong because sunlight contains infrared that can wash out the projected pattern.

Practice Questions

  1. 1 A structured-light camera has focal length f = 580 pixels and baseline B = 0.075 m. If the measured disparity is d = 30 pixels, calculate the depth Z.
  2. 2 For the same camera with f = 580 pixels and B = 0.075 m, an object moves from Z = 1.5 m to Z = 0.75 m. Calculate the disparity at each distance using d = fB / Z.
  3. 3 A robot is scanning a glossy metal cup, a matte cardboard box, and a dark cloth bag indoors. Explain which surfaces may cause depth errors and why.