AI Glossary / Computer vision and multimodal AI / Beginner

Depth map

Definition

A depth map associates image locations with estimates or measurements of scene depth. It describes how visible surfaces are arranged relative to a viewpoint and can support three-dimensional reasoning, rendering, or measurement. A depth map may contain metric depths, relative depths, or another explicitly defined depth-related encoding, so its meaning must be checked before use.

What it means

A conventional image can make a nearby small object and a distant large object look similar in size. A depth map adds information about their spatial relationship, subject to the method that produced it.

Depth map and depth image are commonly overlapping terms. This entry emphasizes how a map is produced and used, rather than inventing a strict distinction between two names that many systems treat as synonyms.

A depth map is generally viewpoint-dependent. It does not automatically describe the back of an object or everything hidden behind the nearest visible surface. It is also distinct from a height map, which usually measures elevation relative to a reference surface or coordinate system.

How it works

Choose a depth-producing method appropriate to the data and task. Stereo methods infer geometry from corresponding views; active sensors use emitted signals; rendering computes depth from a known scene; learned models infer depth from patterns in their inputs.

Convert the output into a documented representation. For example, disparity is related to depth through calibrated stereo geometry, while a monocular model may produce a relative ordering or a scale-dependent prediction rather than immediately trustworthy metric distance.

Preserve validity and confidence information when available. A map may include missing measurements, uncertain boundaries, or areas where the model extrapolates from prior experience instead of strong direct evidence.

Use the map in a downstream task and evaluate that task independently. Occlusion handling, surface reconstruction, and measurement can have different tolerance for depth errors. Filtering or completing a map changes its evidential status and should be distinguished from the original observations.

Three practical examples

1. Image compositing: Depth ordering helps determine whether a virtual object should appear in front of or behind visible scene surfaces.

2. Scene reconstruction: Several calibrated depth maps can contribute to a larger geometric model when their viewpoints and uncertainties are handled correctly.

3. Measurement support: A validated metric map helps estimate distances or dimensions of suitable visible objects within the setup's tested operating range.

Think of it this way

Think of a weather map whose numbers describe distance instead of temperature. Nearby map cells can be compared only if they use the same units and reference convention.

The analogy also shows why a colorful display is not enough. The legend matters, missing data matter, and a smoothed estimate should not be confused with a direct reading. Depth additionally depends on camera geometry and visibility, which ordinary geographic maps handle differently.

Worked example

Consider a calibrated rectified stereo system with focal length 600 pixels and baseline 0.12 meters. Two visible points have disparities of 24 and 12 pixels.

Using Z = fB/d, their optical-axis depths are 600 × 0.12 / 24 = 3 meters and 600 × 0.12 / 12 = 6 meters. The smaller disparity corresponds to the farther point under this model.

Now suppose a separate monocular model outputs relative depth values 0.3 and 0.6 for the same locations. Without knowing its convention and scale, those numbers cannot simply be read as meters. Some models instead output inverse-depth-like values, which reverse the larger-means-farther interpretation.

The example shows why a depth map must travel with documentation about quantity, units, calibration, and validity. Similar visual patterns or array dimensions do not make two maps numerically interchangeable.

Illustrative case study

Fictional case: A design agency uses predicted depth to create a moving-photo effect. Relative depth is sufficient to separate broad foreground and background layers for this visual purpose.

A colleague then proposes using the same map to estimate room dimensions. The team tests it against known measurements and finds that visual plausibility does not establish metric scale or accurate distances.

It keeps the map for the creative effect and uses a separately calibrated measurement workflow for dimensions. The distinction is based on the evidence each task needs, not on whether both outputs happen to be called depth maps.

Common misconceptions and mistakes

Do not equate plausible depth ordering with accurate metric distance. A map can look convincing while having incorrect scale or local geometry.

Do not confuse disparity, inverse depth, optical-axis depth, and ray range. Their relationships require the correct definitions and calibration.

Do not assume a completed map contains measurements at every filled pixel. Hole filling and learned completion introduce estimates that may fail near boundaries or unseen surfaces.

Do not compare maps using only a global average error. A localized failure at an object boundary can matter greatly to compositing, reconstruction, or interaction even when most pixels are accurate.

Business use

Depth maps can make images useful for spatial tasks beyond appearance recognition. They support visual effects, geometric reconstruction, and measurement workflows when the output quality matches the decision being made.

Select evaluation measures according to the application. Include depth accuracy, boundary behavior, invalid coverage, temporal stability for video, and performance on unfamiliar scenes. Preserve source images and the map's production method so reviewers can tell whether a value came from calibrated sensing, geometric inference, learned prediction, or later interpolation.

People also ask

Does every depth map use meters?

No. The representation may use other units, relative values, inverse depth, or a display encoding.

Can one ordinary photograph produce a depth map?

A learned or model-based method can estimate one, but its scale and accuracy depend on assumptions and training rather than direct stereo correspondence alone.

Is a depth map a complete 3D model?

Usually not. A single viewpoint leaves hidden surfaces unobserved and may contain invalid or uncertain regions.

Check your understanding

A predicted depth map orders the foreground correctly but has unknown scale. Is it sufficient to report a table's length in centimeters?

Answer: No. Metric measurement requires an established scale and validated geometry, not merely correct near-versus-far ordering.

Related terms

  • Depth image
  • Disparity map
  • monocular depth estimation
  • stereo vision
  • inverse depth
  • range image
  • depth completion
  • occlusion

Learn next

Compare a metric sensor map with a relative predicted map of a simple scene containing known distances. Document each convention and test ordering, scale, and boundary accuracy separately before selecting a downstream use.

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 specification source: https://raw.githubusercontent.com/ros-infrastructure/rep/master/rep-0118.rst . OpenCV, Depth Map from Stereo Images: https://docs.opencv.org/3.4.18/dd/d53/tutorial_py_depthmap.html . Both primary documentation sources were read for representation and stereo geometry. The comparisons and agency case are original teaching examples.

Previous: Depth-limited search Next: Depthwise separable convolutional neural network

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer