The key difference is that a depth image is a visual representation of a depth map.
Think of a depth map as the raw data and a depth image as how that data is shown to a person. They are closely related but serve distinct purposes in how depth information is stored, processed, and viewed.
Understanding Depth Information
Depth information in computer vision and 3D sensing refers to the distance of surfaces in a scene from a viewpoint, typically a camera or sensor. This data is crucial for tasks like 3D reconstruction, object recognition, navigation, and more.
Depth Map
- Nature: A depth map is fundamentally a data structure. It is a representation that stores the actual depth values for each pixel or point in a scene from a specific viewpoint.
- Data Type: The values stored in a depth map are typically numerical, representing distance.
- Units: As stated in the reference, the depth values are usually represented in metric units, such as meters. Other units like millimeters or centimeters can also be used depending on the sensor and application.
- Representation: A depth map provides a continuous representation of the scene's depth information, meaning it holds precise distance measurements.
- Purpose: Primarily used for computational tasks – algorithms process the numerical depth values for analysis, reconstruction, simulations, etc.
Depth Image
- Nature: A depth image is, as the reference puts it, a visual representation of the depth map. It is an image format derived from the depth map data.
- Data Type: While based on numerical depth, the data is mapped to pixel intensity or color values that can be displayed on a screen.
- Units: The pixel values in a depth image themselves do not directly represent metric units like meters. Instead, their intensity or color corresponds to the depth value from the underlying depth map. For instance, in a grayscale depth image:
- Darker pixels often represent objects closer to the viewpoint.
- Lighter pixels often represent objects farther away.
- Representation: A depth image provides a qualitative or relative visual representation of depth. It allows humans to easily see the depth structure of a scene.
- Purpose: Primarily used for visualization, inspection, and sometimes as an input for algorithms that work with image formats, where the pixel values are interpreted based on a known mapping to depth.
Key Differences at a Glance
Feature | Depth Map | Depth Image |
---|---|---|
What it is | Data structure storing actual depth values | Visual display of depth map data |
Content | Numerical depth values (e.g., meters, mm) | Pixel values (intensity, color) mapped to depth |
Units | Typically metric (meters, mm) | Unitless pixel values corresponding to depth |
Representation | Continuous, precise data representation | Visual, often grayscale or color, representation |
Primary Use | Computational processing, analysis, 3D modeling | Visualization, human interpretation |
Practical Examples
- Imagine a 3D sensor scanning a room. The sensor records the exact distance to every surface point it detects. This collection of precise distance measurements is stored as a depth map.
- To show you what the sensor "sees" in terms of depth, this depth map data is converted into a grayscale image where distance is mapped to brightness. This grayscale picture is the depth image. You can look at it and instantly see which objects are closer or farther based on how dark or light they appear.
- A robotic navigation system uses the numerical data in the depth map to calculate safe paths around obstacles based on their precise distance.
- A person checking the sensor output looks at the depth image to quickly visually assess the scene's depth structure.
In summary, while a depth map contains the core depth data, a depth image is the common way this data is presented visually.