DepthMediaFrame.TryCreateCoordinateMapper(CameraIntrinsics, SpatialCoordinateSystem) DepthMediaFrame.TryCreateCoordinateMapper(CameraIntrinsics, SpatialCoordinateSystem) DepthMediaFrame.TryCreateCoordinateMapper(CameraIntrinsics, SpatialCoordinateSystem) DepthMediaFrame.TryCreateCoordinateMapper(CameraIntrinsics, SpatialCoordinateSystem) DepthMediaFrame.TryCreateCoordinateMapper(CameraIntrinsics, SpatialCoordinateSystem) Method

Definition

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)
DepthCorrelatedCoordinateMapper TryCreateCoordinateMapper(CameraIntrinsics cameraIntrinsics, SpatialCoordinateSystem coordinateSystem) const;
public DepthCorrelatedCoordinateMapper TryCreateCoordinateMapper(CameraIntrinsics cameraIntrinsics, SpatialCoordinateSystem coordinateSystem)
Public Function TryCreateCoordinateMapper(cameraIntrinsics As CameraIntrinsics, coordinateSystem As SpatialCoordinateSystem) As DepthCorrelatedCoordinateMapper
var depthCorrelatedCoordinateMapper = depthMediaFrame.tryCreateCoordinateMapper(cameraIntrinsics, coordinateSystem);

Parameters

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

An object representing the spatial coordinate system of the camera for which coordinates will be mapped using the DepthMediaFrame data.

Returns

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.