Curious Minds

Clear answers to science and history questions

Depth Cameras Explained: How They Measure Distance

· 5 min read · Science

Depth cameras measure distance to objects by emitting or projecting a pattern of light and analyzing the returned signal, producing a 3‑dimensional map of the scene.

Background and History

The idea of capturing depth dates back to the 1960s with laser rangefinders, but practical consumer depth sensing began in the 2000s. Early systems used structured light, where a known pattern is projected onto a surface and a camera records the deformation of that pattern. In 2010, Microsoft released the Kinect for Xbox, popularizing depth sensing in gaming. Since then, a variety of technologies—time‑of‑flight, stereo vision, and active illumination—have entered both research and commercial markets.

How Depth Cameras Work

Depth cameras can be grouped into three main categories. Each relies on a different principle to determine how far an object is from the sensor.

  • Structured‑Light Systems – A projector emits a grid or dot pattern. The camera captures the distorted pattern; by comparing it to the original, the system triangulates depth. The original Kinect used this method.
  • Time‑of‑Flight (ToF) Sensors – A short laser pulse or LED light is sent out, and the camera measures the time it takes for light to return. Because light travels at a known speed, the delay directly translates to distance. Intel RealSense D415 and D435 are common ToF examples.
  • Stereo Vision – Two or more cameras capture the same scene from slightly different viewpoints. By matching corresponding points between images and calculating disparities, depth is inferred. This approach is similar to human binocular vision and is used in many robotics platforms.

Each technique has trade‑offs in accuracy, range, resolution, and environmental sensitivity. For instance, structured‑light excels at close ranges (e.g., 0.5–3 m) and offers high spatial detail, but it struggles in bright outdoor light. Time‑of‑flight can work outdoors but may suffer from multipath interference, while stereo vision is inexpensive but requires good texture and lighting for reliable matching.

Choosing the Right Depth Camera

When selecting a depth sensor, consider the following factors:

  1. Operating Range – Define the minimum and maximum distances you need. A sensor that works well at 1 m may be useless for a 10 m surveillance application.
  2. Resolution and Accuracy – Depth resolution is measured in millimeters. For robotics, 1–2 mm is typical; for consumer AR, 5–10 mm may suffice.
  3. Lighting Conditions – Structured‑light sensors need controlled lighting; ToF sensors can handle outdoors but may need ambient light rejection.
  4. Processing Power – Some cameras deliver raw depth frames that require GPU‑based post‑processing; others include onboard processing.
  5. Power and Size – Portable applications favor lightweight, low‑power modules such as the Intel RealSense L515.
  6. Software Ecosystem – Check for SDK support, community libraries (OpenCV, ROS), and integration with your platform.

For example, a hobbyist building a home‑automation robot might choose the low‑cost ZED Mini stereo camera, while an industrial inspection line would likely opt for a high‑accuracy ToF sensor like the Basler ToF‑S1.

Common Problems and Troubleshooting

Depth cameras can exhibit several issues. Recognizing symptoms and applying the right fixes can save time.

  • Noise and Graininess – Often caused by low light or high ambient illumination. Increase sensor exposure, add infrared illumination, or use a sensor with a higher dynamic range.
  • Missing Depth Data – Frequently occurs on shiny, reflective, or transparent surfaces. Use structured‑light with a matte diffuser or switch to a ToF sensor that can handle specular reflections.
  • Multipath Interference – In ToF sensors, light can bounce off multiple surfaces before returning. Employ sensors with pulsed lasers and short pulse widths, or use software algorithms that filter out outliers.
  • Calibration Drift – Over time, sensor alignment can shift. Re‑calibrate using a checkerboard pattern or the manufacturer’s calibration routine.
  • Bandwidth Bottlenecks – High‑resolution depth streams can saturate USB 3.0 or Ethernet links. Use a dedicated camera interface or compress data on the fly.

Comparisons to Other 3D Sensing Methods

Depth cameras sit alongside other technologies such as LiDAR, structured‑light projectors, and photogrammetry. A quick comparison:

MethodRangeResolutionTypical Use
Structured‑Light0.5–3 mHigh (sub‑mm)AR, robotics, gaming
Time‑of‑Flight0.1–10 mModerate (1–5 mm)Industrial, automotive, drones
Stereo Vision0.5–5 mVariable (depends on texture)Vision systems, 3D reconstruction
LiDAR10–200 mCoarse (10–50 cm)Autonomous vehicles, mapping
PhotogrammetryVariableHigh (sub‑mm with many shots)Architecture, archaeology

Choosing between them depends on application constraints: cost, required accuracy, environmental conditions, and data processing capabilities.

Costs and Market Availability

Depth cameras range from under $30 for entry‑level stereo modules to several thousand dollars for high‑end industrial ToF units. Prices are influenced by sensor resolution, processing power, and brand support. Open‑source projects often use the Raspberry Pi Camera Module paired with a low‑cost depth overlay, while commercial robotics kits may bundle a depth camera with a microcontroller and software stack.

Safety Considerations

Depth cameras use near‑infrared (NIR) or visible light. The NIR wavelengths employed are typically below 1.4 µm, which is safe for human eyes and skin. However, high‑power laser pulses in some ToF sensors can pose eye hazards if directed at the eye. Manufacturers comply with IEC 60825‑1 laser safety standards, but users should avoid pointing the sensor directly at people’s faces or reflective surfaces that could redirect the beam.

Alternatives and Complementary Technologies

Depending on the use case, other sensors can complement or replace depth cameras:

  • RGB Cameras with Depth Estimation – Machine‑learning models can predict depth from a single RGB image, useful when hardware cost must be minimized.
  • Stereo Cameras with LIDAR – Combining a stereo pair with a sparse LiDAR gives both dense texture and accurate long‑range depth.
  • Ultrasonic Sensors – Cheap and safe for short‑range (e.g., < 2 m) obstacle detection, especially in robotics.
  • Structured Light Projectors – Standalone projectors can be used to generate patterns for depth calculation in a custom pipeline.

Frequently Asked Questions

What is the difference between structured‑light and time‑of‑flight?

Structured‑light projects a known pattern and uses triangulation to compute depth, giving high resolution at close ranges. Time‑of‑flight sends a pulse and measures return time, allowing longer ranges but usually lower spatial detail.

Can depth cameras be used outdoors?

Time‑of‑flight sensors can operate outdoors, but they must handle strong sunlight. Structured‑light systems typically require controlled lighting and are better suited for indoor use.

Do I need a separate infrared camera for depth sensing?

Most depth cameras integrate an infrared sensor for depth calculation; you do not need a separate unit. However, if you want to capture color and depth simultaneously, you can pair a depth camera with an RGB camera.

How do I calibrate a depth camera?

Use a checkerboard pattern and follow the manufacturer’s calibration routine. Calibration aligns the depth and color streams and corrects lens distortion.

Is depth data affected by temperature?

Yes, extreme temperatures can alter sensor timing and lens focus. Most consumer sensors are rated for 0–40 °C; for industrial use, check the datasheet for temperature specifications.

In this article
  1. Background and History
  2. How Depth Cameras Work
  3. Choosing the Right Depth Camera
  4. Common Problems and Troubleshooting
  5. Comparisons to Other 3D Sensing Methods
  6. Costs and Market Availability
  7. Safety Considerations
  8. Alternatives and Complementary Technologies
  9. Frequently Asked Questions