DepthMediaFrame
DepthMediaFrame
DepthMediaFrame
DepthMediaFrame
Class
Definition
Represents a VideoMediaFrame that contains depth video data.
public : sealed class DepthMediaFrame : IDepthMediaFrame, IDepthMediaFrame2public sealed class DepthMediaFrame : IDepthMediaFrame, IDepthMediaFrame2Public NotInheritable Class DepthMediaFrame Implements IDepthMediaFrame, IDepthMediaFrame2// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
Remarks
Get an instance of this class by accessing the DepthMediaFrame property of the VideoMediaFrame class.
For how-to guidance on using MediaFrameSource to capture frames, see Process media frames with MediaFrameReader.
Properties
DepthFormat DepthFormat DepthFormat DepthFormat
Gets an object that describes the format of the depth data in the DepthMediaFrame.
public : DepthMediaFrameFormat DepthFormat { get; }public DepthMediaFrameFormat DepthFormat { get; }Public ReadOnly Property DepthFormat As DepthMediaFrameFormat// You can use this property in JavaScript.
An object that describes the format of the depth data in the DepthMediaFrame.
FrameReference FrameReference FrameReference FrameReference
Gets the MediaFrameReference wrapper object associated with the DepthMediaFrame, which provides access to format information and other properties of the media frame.
public : MediaFrameReference FrameReference { get; }public MediaFrameReference FrameReference { get; }Public ReadOnly Property FrameReference As MediaFrameReference// You can use this property in JavaScript.
The MediaFrameReference wrapper object associated with the DepthMediaFrame
MaxReliableDepth MaxReliableDepth MaxReliableDepth MaxReliableDepth
Gets a value that specifies the maximum reliable depth value for the camera that captured the depth frame.
public : unsigned int MaxReliableDepth { get; }public uint MaxReliableDepth { get; }Public ReadOnly Property MaxReliableDepth As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
A value that specifies the maximum reliable depth value for the camera that captured the depth frame.
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
Remarks
A depth camera may not be able to reliably sense the depth for the full range of the UInt16 value that is used to express depth in a depth media frame. The value of MaxReliableDepth is set by the depth camera device to indicate the upper limit of values within the UInt16 range for which the device can reliably capture depth data. You can safely clamp depth pixel values greater than this value. The lower limit of reliable depth values is specified with the MinReliableDepth property. These properties are expressed in the same units as the individual depth pixel values. You can convert MaxReliableDepth to meters by multiplying it by the value of the DepthScaleInMeters property of the DepthFormat property of the DepthMediaFrame object.
MinReliableDepth MinReliableDepth MinReliableDepth MinReliableDepth
Gets a value that specifies the minimum reliable depth value for the camera that captured the depth frame.
public : unsigned int MinReliableDepth { get; }public uint MinReliableDepth { get; }Public ReadOnly Property MinReliableDepth As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
A value that specifies the minimum reliable depth value for the camera that captured the depth frame.
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
Remarks
A depth camera may not be able to reliably sense the depth for the full range of the UInt16 value that is used to express depth in a depth media frame. The value of MinReliableDepth is set by the depth camera device to indicate the lower limit of values within the UInt16 range for which the device can reliably capture depth data. You can safely clamp depth pixel values lower than this value. The upper limit of reliable depth values is specified with the MaxReliableDepth property. These properties are expressed in the same units as the individual depth pixel values. You can convert MinReliableDepth to meters by multiplying it by the value of the DepthScaleInMeters property of the DepthFormat property of the DepthMediaFrame object.
VideoMediaFrame VideoMediaFrame VideoMediaFrame VideoMediaFrame
Gets the VideoMediaFrame associated with the DepthMediaFrame.
public : VideoMediaFrame VideoMediaFrame { get; }public VideoMediaFrame VideoMediaFrame { get; }Public ReadOnly Property VideoMediaFrame As VideoMediaFrame// You can use this property in JavaScript.
The VideoMediaFrame associated with the DepthMediaFrame.
Methods
TryCreateCoordinateMapper(CameraIntrinsics, SpatialCoordinateSystem) TryCreateCoordinateMapper(CameraIntrinsics, SpatialCoordinateSystem) TryCreateCoordinateMapper(CameraIntrinsics, SpatialCoordinateSystem) TryCreateCoordinateMapper(CameraIntrinsics, SpatialCoordinateSystem)
Attempts to create a DepthCorrelatedCoordinateMapper for the DepthMediaFrame. This object provides methods for mapping pixel coordinates from a MediaFrameSource camera to the coordinate system of a different MediaFrameSource or to 3D space.
public : DepthCorrelatedCoordinateMapper TryCreateCoordinateMapper(CameraIntrinsics cameraIntrinsics, SpatialCoordinateSystem coordinateSystem)public DepthCorrelatedCoordinateMapper TryCreateCoordinateMapper(CameraIntrinsics cameraIntrinsics, SpatialCoordinateSystem coordinateSystem)Public Function TryCreateCoordinateMapper(cameraIntrinsics As CameraIntrinsics, coordinateSystem As SpatialCoordinateSystem) As DepthCorrelatedCoordinateMapper// You can use this method in JavaScript.
- cameraIntrinsics
- CameraIntrinsics CameraIntrinsics CameraIntrinsics CameraIntrinsics
An object that describes the distortion model of the MediaFrameSource camera for which coordinates will be mapped using the DepthMediaFrame data.
- coordinateSystem
- SpatialCoordinateSystem SpatialCoordinateSystem SpatialCoordinateSystem SpatialCoordinateSystem
An object representing the spatial coordinate system of the camera for which coordinates will be mapped using the DepthMediaFrame data.
A DepthCorrelatedCoordinateMapper if the operation was successful; otherwise, null.
Remarks
The DepthCorrelatedCoordinateMapper returned by this method will use depth data from the DepthMediaFrame to map coordinates from one media frame or MediaFrameSource to the coordinate system of another media frame or MediaFrameSource. The parameters to this method specify the camera intrinsics and coordinate system of the original coordinates to be mapped.
Get static camera intrinsics for a MediaFrameSource by calling TryGetCameraIntrinsics. Get the static coordinate system for a MediaFrameSource by accessing the CoordinateSystem property of the MediaFrameSourceInfo associated with the frame source. Get dynamic camera instrinsics by accessing CameraIntrinsics property of a VideoMediaFrame. Get the dynamic coordinate system from a MediaFrameReference with the CoordinateSystem property.
You specify the camera intrinsics and coordinate system of the target frame or frame source, to which the source points will be mapped, when you call the mapping methods of the DepthCorrelatedCoordinateMapper.