AI Glossary / Computer vision and multimodal AI / Beginner
Depth image
Definition
A depth image is an image-shaped array whose values describe the depth of visible scene surfaces rather than their ordinary color or brightness. Each valid pixel associates a viewing location with a distance-related measurement or estimate. Its interpretation depends on the coordinate convention, units, calibration, and handling of missing values.
What it means
A color image tells a system how a scene looks. A depth image adds geometric information about where visible surfaces lie relative to a viewpoint.
The terms depth image and depth map are often used interchangeably. There is no universal technical boundary that makes them fundamentally different data types. This entry emphasizes the image representation and its correct interpretation in a processing pipeline.
Some formats store distance along the camera's optical axis, while others describe range along a viewing ray or use a transformed quantity. A displayed grayscale or colored picture may only be a visualization of the underlying values, not the actual numeric depth data.
How it works
Acquire or estimate depth using a suitable method, such as stereo vision, structured light, time of flight, rendering, or a learned model. These methods have different uncertainty and failure modes, even if they produce similarly shaped arrays.
Store each value with an explicit encoding and units. Keep invalid or unavailable measurements distinct from valid zero-like values according to the format's rules. Preserve calibration and camera-frame information needed to interpret pixel locations geometrically.
If a depth image is paired with color, establish whether the two are aligned to the same viewpoint and pixel grid. Equal image dimensions alone do not prove that corresponding pixels refer to the same surface.
Use calibrated projection geometry to convert valid depth samples into three-dimensional points where required. Validate the resulting geometry and avoid filling holes or smoothing boundaries without recognizing that such operations add assumptions to the measured or predicted data.
Three practical examples
1. Robot perception: A depth image supplies visible-surface geometry that a system can combine with other information for mapping or object interaction.
2. Product measurement: A calibrated imaging setup uses valid depth samples to estimate dimensions under tested material and distance conditions.
3. Visual effects: Depth data helps an application reason about foreground and background ordering when compositing a scene.
Think of it this way
Think of a photograph with a distance note attached to each visible spot. Instead of recording only that a spot looks blue, the note also says how far along a defined camera direction its surface lies.
The analogy does not mean every spot has a reliable note. Reflective surfaces, occlusions, low-confidence estimates, and sensor limits can leave gaps or wrong values. The note's units and meaning must be known before comparing it with another measurement.
Worked example
Suppose a calibrated pinhole camera stores optical-axis depth Z. Its focal lengths are fx = fy = 500 pixels, and its principal point is (320,240). A valid depth pixel at image coordinates (370,240) has Z = 2 meters.
The corresponding camera-frame coordinates are X = (370 - 320) × 2/500 = 0.2 meters, Y = (240 - 240) × 2/500 = 0, and Z = 2 meters.
The straight-line range from the camera center is the square root of (0.2² + 2²), approximately 2.01 meters. This differs from the stored optical-axis depth, illustrating why depth and ray distance should not be exchanged without checking conventions.
If the same stored numeric value were 2000 in a millimeter encoding, it would still represent two meters after conversion. Treating it as meters would produce a thousandfold scale error.
Illustrative case study
Fictional case: A small studio combines a color camera with a depth sensor to place virtual labels near products. The first prototype overlays depth values on equal-numbered color pixels and produces shifted labels near object edges.
The team discovers that the cameras have different viewpoints. It applies the appropriate calibration and alignment, then marks areas where a surface is visible to only one camera.
It also separates invalid depth from the display's darkest color. The revised interface makes missing geometry visible instead of interpreting it as a surface at a particular distance. Correct representation and alignment prove as important as the depth-producing device itself.
Common misconceptions and mistakes
Do not confuse a depth visualization with its numeric data. Color maps may be normalized differently for each frame.
Do not assume all depth images contain metric distance. Some learned predictions provide relative depth or require additional calibration.
Do not treat invalid values as ordinary measurements. Their encoding is format-specific and must be handled explicitly.
Do not assume a depth image describes hidden surfaces or a complete three-dimensional object. It usually represents visible surface information from one viewpoint, with occlusion and measurement gaps.
Business use
Depth images can make visual workflows more spatially informative, supporting measurement, interaction, and scene reconstruction. Their business value depends on geometry quality and the reliability of the full data path.
Validate units, calibration, coverage, latency, and behavior on difficult surfaces. Retain provenance showing whether values were measured, predicted, interpolated, or filtered. When downstream decisions depend on physical distances, compare against independent reference measurements rather than relying on a convincing three-dimensional visualization.
People also ask
Is a depth image the same as a normal photograph?
No. Its pixel values encode depth-related information, although it can be displayed as an ordinary-looking image.
Is depth image different from depth map?
The terms commonly overlap; exact usage depends on the system and documentation.
Can it be converted to a point cloud?
Usually, when valid depth values and the required camera geometry are available and their conventions are correctly interpreted.
Check your understanding
A format stores depth in millimeters and a pixel value is 1500. What is the depth in meters, and can a display color alone establish that value?
Answer: It is 1.5 meters. A display color cannot establish it without the visualization's mapping and the underlying encoding.
Related terms
- Depth map
- Disparity map
- range image
- camera calibration
- point cloud
- RGB-D image
- invalid measurement
Learn next
Inspect a small depth array together with its units and invalid-value convention. Convert a few valid pixels into camera-frame points, then compare optical-axis depth with straight-line range away from the image center.
More in Computer vision and multimodal AI
- Degrees-of-freedom ladder - In the supplied image-warping context, the degrees-of-freedom ladder is an explanatory hierarchy of two-dimensional transformation models: translation...
- Delaunay triangulation - Delaunay triangulation divides a set of planar points into non-overlapping triangles such that no input point lies strictly inside any triangle's circumcircle.
- Demosaicking - Demosaicking reconstructs full-color image values from measurements captured through a color filter array.
- Deriche edge detector - The Deriche edge detector is a classical image-edge method based on recursively implemented filters derived from edge-detection criteria related to Canny's...
- Dichromatic model - The dichromatic model, in computer vision, commonly refers to the dichromatic reflection model that describes observed surface color as a combination of...
- Differentiable image pipeline - A differentiable image pipeline is a sequence of image-processing operations through which useful derivatives can be computed with respect to inputs or...
Sources
ROS REP 118, Depth Images, official source text: https://raw.githubusercontent.com/ros-infrastructure/rep/master/rep-0118.rst . The specification was read for its explicit depth-axis, unit, encoding, and calibration conventions. Those ROS conventions are examples rather than universal requirements; the numerical geometry and studio case are original illustrations.
Previous: Depth First Search on Edges Next: Depth-limited search