MF_MT_DEPTH_VALUE_UNIT attribute

[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]

A value that defines the units for a depth value in a video frame.

Data type

UINT64

Remarks

The unit value is a UINT64 value in nanometers, in the range 1e - 9 meters. If this value is not present, the default value of the unit is 1e-3, which indicates each pixel level is measured in 1 millimeter in physical space.

Depth cameras cannot sense the depth of all pixels. When the confidence of a pixel is low, because of material, occlusion, or out of range etc, the depth value on that pixel can be invalid.

When a depth pixel value is 0, the pixel is invalid.

Some depth cameras attach bitmask metadata for each pixel in addition to the depth value to represent the reason why the depth of pixel is invalid, due to material, occlusion or out of range etc. We recommend that you avoid attaching such metadata as bits in depth value, because it will typically lead to difficulty when using such values in pixel shader. Instead. we recommend that you use a separate 8bit image buffer with same resolution and attach it as attribute of the IMFSample. Such metadata varies for each camera vendor and is not standardized by the platform. We recommend using full 16 bits for the depth value for easier processing downstream and using a fixed value such as 0 for invalidation.

Requirements

Requirement Value
Minimum supported client
Windows 10, version 1709 [desktop apps only]
Minimum supported server
Windows Server, version 1709 [desktop apps only]
Header
Mfapi.h