PerceptionDepthFrameSource PerceptionDepthFrameSource PerceptionDepthFrameSource PerceptionDepthFrameSource Class

Definition

A frame source that provides depth frames.

public : sealed class PerceptionDepthFrameSource : IPerceptionDepthFrameSource, IPerceptionDepthFrameSource2
public sealed class PerceptionDepthFrameSource : IPerceptionDepthFrameSource, IPerceptionDepthFrameSource2
Public NotInheritable Class PerceptionDepthFrameSource Implements IPerceptionDepthFrameSource, IPerceptionDepthFrameSource2
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

Active Active Active Active

Gets a boolean value indicating whether or not the source is active.

public : Platform::Boolean Active { get; }
public bool Active { get; }
Public ReadOnly Property Active As bool
var bool = perceptionDepthFrameSource.active;
Value
Platform::Boolean bool bool bool

A boolean value indicating whether or not the source is active.

Available Available Available Available

Gets a boolean value indicating whether or not the source is available.

public : Platform::Boolean Available { get; }
public bool Available { get; }
Public ReadOnly Property Available As bool
var bool = perceptionDepthFrameSource.available;
Value
Platform::Boolean bool bool bool

A boolean value indicating whether or not the source is available.

AvailableVideoProfiles AvailableVideoProfiles AvailableVideoProfiles AvailableVideoProfiles

Gets a read-only collection of video profiles that are currently available from the depth frame source.

public : IVectorView<PerceptionVideoProfile> AvailableVideoProfiles { get; }
public IReadOnlyList<PerceptionVideoProfile> AvailableVideoProfiles { get; }
Public ReadOnly Property AvailableVideoProfiles As IReadOnlyList<PerceptionVideoProfile>
var iReadOnlyList = perceptionDepthFrameSource.availableVideoProfiles;
Value
IVectorView<PerceptionVideoProfile> IReadOnlyList<PerceptionVideoProfile> IReadOnlyList<PerceptionVideoProfile> IReadOnlyList<PerceptionVideoProfile>

A read-only collection of video profiles that are currently available from the depth frame source.

CameraIntrinsics CameraIntrinsics CameraIntrinsics CameraIntrinsics

Gets a CameraIntrinsics value specifying the intrinsic properties of the depth frame source camera device.

public : CameraIntrinsics CameraIntrinsics { get; }
public CameraIntrinsics CameraIntrinsics { get; }
Public ReadOnly Property CameraIntrinsics As CameraIntrinsics
var cameraIntrinsics = perceptionDepthFrameSource.cameraIntrinsics;
Value
CameraIntrinsics CameraIntrinsics CameraIntrinsics CameraIntrinsics

A CameraIntrinsics value specifying the intrinsic properties of the depth frame source camera device.

DeviceId DeviceId DeviceId DeviceId

Gets a string value that identifies the device on the system.

public : Platform::String DeviceId { get; }
public string DeviceId { get; }
Public ReadOnly Property DeviceId As string
var string = perceptionDepthFrameSource.deviceId;
Value
Platform::String string string string

The identifier.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

DeviceKind DeviceKind DeviceKind DeviceKind

Gets a string value indicating the kind of physical device that generates the depth frames.

public : Platform::String DeviceKind { get; }
public string DeviceKind { get; }
Public ReadOnly Property DeviceKind As string
var string = perceptionDepthFrameSource.deviceKind;
Value
Platform::String string string string

A string value indicating the kind of physical device that generates the depth frames.

DisplayName DisplayName DisplayName DisplayName

Gets a string value indicating the display name of the depth frame source.

public : Platform::String DisplayName { get; }
public string DisplayName { get; }
Public ReadOnly Property DisplayName As string
var string = perceptionDepthFrameSource.displayName;
Value
Platform::String string string string

A string value indicating the display name of the depth frame source.

Id Id Id Id

Gets a string value indicating the unique ID of the depth frame source.

public : Platform::String Id { get; }
public string Id { get; }
Public ReadOnly Property Id As string
var string = perceptionDepthFrameSource.id;
Value
Platform::String string string string

A string value indicating the unique ID of the depth frame source.

IsControlled IsControlled IsControlled IsControlled

Gets a boolean value indicating whether or not the source is the subject of controller mode.

public : Platform::Boolean IsControlled { get; }
public bool IsControlled { get; }
Public ReadOnly Property IsControlled As bool
var bool = perceptionDepthFrameSource.isControlled;
Value
Platform::Boolean bool bool bool

A boolean value indicating whether or not the source is the subject of controller mode.

Properties Properties Properties Properties

Gets a read-only collection of frame source properties.

public : IMapView<Platform::String, Platform::Object> Properties { get; }
public IReadOnlyDictionary<string, object> Properties { get; }
Public ReadOnly Property Properties As IReadOnlyDictionary<string, object>
var iReadOnlyDictionary = perceptionDepthFrameSource.properties;
Value
IMapView<Platform::String, Platform::Object> IReadOnlyDictionary<string, object> IReadOnlyDictionary<string, object> IReadOnlyDictionary<string, object>

A read-only collection of frame source properties.

SupportedVideoProfiles SupportedVideoProfiles SupportedVideoProfiles SupportedVideoProfiles

Gets a read-only collection of video profiles that are supported by the depth frame source.

public : IVectorView<PerceptionVideoProfile> SupportedVideoProfiles { get; }
public IReadOnlyList<PerceptionVideoProfile> SupportedVideoProfiles { get; }
Public ReadOnly Property SupportedVideoProfiles As IReadOnlyList<PerceptionVideoProfile>
var iReadOnlyList = perceptionDepthFrameSource.supportedVideoProfiles;
Value
IVectorView<PerceptionVideoProfile> IReadOnlyList<PerceptionVideoProfile> IReadOnlyList<PerceptionVideoProfile> IReadOnlyList<PerceptionVideoProfile>

A read-only collection of video profiles that are supported by the depth frame source.

VideoProfile VideoProfile VideoProfile VideoProfile

Gets a PerceptionVideoProfile object indicating the current video profile.

public : PerceptionVideoProfile VideoProfile { get; }
public PerceptionVideoProfile VideoProfile { get; }
Public ReadOnly Property VideoProfile As PerceptionVideoProfile
var perceptionVideoProfile = perceptionDepthFrameSource.videoProfile;
Value
PerceptionVideoProfile PerceptionVideoProfile PerceptionVideoProfile PerceptionVideoProfile

A PerceptionVideoProfile object indicating the current video profile.

Methods

AcquireControlSession() AcquireControlSession() AcquireControlSession() AcquireControlSession()

Attempts to acquire Controller Mode on the depth frame source.

public : PerceptionControlSession AcquireControlSession()
public PerceptionControlSession AcquireControlSession()
Public Function AcquireControlSession() As PerceptionControlSession
var perceptionControlSession = perceptionDepthFrameSource.acquireControlSession();
Returns

If the attempt is successful, this returns a PerceptionControlSession object that can be used to control properties of the depth frame source. Otherwise, this returns null.

CanControlIndependentlyFrom(String) CanControlIndependentlyFrom(String) CanControlIndependentlyFrom(String) CanControlIndependentlyFrom(String)

This method returns a boolean value indicating whether or not the depth frame source can be controlled separately from another frame source.

public : Platform::Boolean CanControlIndependentlyFrom(Platform::String targetId)
public bool CanControlIndependentlyFrom(String targetId)
Public Function CanControlIndependentlyFrom(targetId As String) As bool
var bool = perceptionDepthFrameSource.canControlIndependentlyFrom(targetId);
Parameters
targetId
Platform::String String String String

A string representing the unique ID of the other frame source.

Returns
Platform::Boolean bool bool bool

True if the two sources can be controlled independently of one another; otherwise, false.

CreateWatcher() CreateWatcher() CreateWatcher() CreateWatcher()

Creates a new depth frame source watcher.

public : static PerceptionDepthFrameSourceWatcher CreateWatcher()
public static PerceptionDepthFrameSourceWatcher CreateWatcher()
Public Static Function CreateWatcher() As PerceptionDepthFrameSourceWatcher
var perceptionDepthFrameSourceWatcher = Windows.Devices.Perception.PerceptionDepthFrameSource.createWatcher();
Returns

FindAllAsync() FindAllAsync() FindAllAsync() FindAllAsync()

Finds all depth frame sources.

public : static IAsyncOperation<IVectorView<PerceptionDepthFrameSource>> FindAllAsync()
public static IAsyncOperation<IReadOnlyList<PerceptionDepthFrameSource>> FindAllAsync()
Public Static Function FindAllAsync() As IAsyncOperation<IReadOnlyList<PerceptionDepthFrameSource>>( Of IVectorView )
var iAsyncOperation = Windows.Devices.Perception.PerceptionDepthFrameSource.findAllAsync();
Returns
IAsyncOperation<IVectorView<PerceptionDepthFrameSource>> IAsyncOperation<IReadOnlyList<PerceptionDepthFrameSource>> IAsyncOperation<IReadOnlyList<PerceptionDepthFrameSource>> IAsyncOperation<IReadOnlyList<PerceptionDepthFrameSource>>

When the method completes, it asynchronously returns a list of depth frame sources.

FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String)

Finds an depth frame source by looking up its unique ID.

public : static IAsyncOperation<PerceptionDepthFrameSource> FromIdAsync(Platform::String id)
public static IAsyncOperation<PerceptionDepthFrameSource> FromIdAsync(String id)
Public Static Function FromIdAsync(id As String) As IAsyncOperation( Of PerceptionDepthFrameSource )
var iAsyncOperation = Windows.Devices.Perception.PerceptionDepthFrameSource.fromIdAsync(id);
Parameters
id
Platform::String String String String

The unique ID of the depth frame source.

Returns

When this method completes, it asynchronously returns a depth frame source if one exists with the specified ID. Otherwise, this method asynchronously returns null.

IsCorrelatedWith(String) IsCorrelatedWith(String) IsCorrelatedWith(String) IsCorrelatedWith(String)

Checks whether or not the depth frame source is correlated with the target entity. If the result is true, a transform matrix can be retrieved to change coordinate basis from this depth frame source to the entity, or vice versa.

public : Platform::Boolean IsCorrelatedWith(Platform::String targetId)
public bool IsCorrelatedWith(String targetId)
Public Function IsCorrelatedWith(targetId As String) As bool
var bool = perceptionDepthFrameSource.isCorrelatedWith(targetId);
Parameters
targetId
Platform::String String String String

The unique ID of the target entity.

Returns
Platform::Boolean bool bool bool

True if a correlation exists, otherwise false.

OpenReader() OpenReader() OpenReader() OpenReader()

Gets a frame reader that reads frames from this depth frame source.

public : PerceptionDepthFrameReader OpenReader()
public PerceptionDepthFrameReader OpenReader()
Public Function OpenReader() As PerceptionDepthFrameReader
var perceptionDepthFrameReader = perceptionDepthFrameSource.openReader();
Returns

RequestAccessAsync() RequestAccessAsync() RequestAccessAsync() RequestAccessAsync()

Requests access to use depth frame sources.

public : static IAsyncOperation<PerceptionFrameSourceAccessStatus> RequestAccessAsync()
public static IAsyncOperation<PerceptionFrameSourceAccessStatus> RequestAccessAsync()
Public Static Function RequestAccessAsync() As IAsyncOperation( Of PerceptionFrameSourceAccessStatus )
var iAsyncOperation = Windows.Devices.Perception.PerceptionDepthFrameSource.requestAccessAsync();
Returns

When this method completes, it asynchronously returns a PerceptionFrameSourceAccessStatus indicating the result of the access request.

TryGetDepthCorrelatedCameraIntrinsicsAsync(PerceptionDepthFrameSource) TryGetDepthCorrelatedCameraIntrinsicsAsync(PerceptionDepthFrameSource) TryGetDepthCorrelatedCameraIntrinsicsAsync(PerceptionDepthFrameSource) TryGetDepthCorrelatedCameraIntrinsicsAsync(PerceptionDepthFrameSource)

Attempts to get the intrinsic properties of the depth camera that is correlated with this depth source.

public : IAsyncOperation<PerceptionDepthCorrelatedCameraIntrinsics> TryGetDepthCorrelatedCameraIntrinsicsAsync(PerceptionDepthFrameSource target)
public IAsyncOperation<PerceptionDepthCorrelatedCameraIntrinsics> TryGetDepthCorrelatedCameraIntrinsicsAsync(PerceptionDepthFrameSource target)
Public Function TryGetDepthCorrelatedCameraIntrinsicsAsync(target As PerceptionDepthFrameSource) As IAsyncOperation( Of PerceptionDepthCorrelatedCameraIntrinsics )
var iAsyncOperation = perceptionDepthFrameSource.tryGetDepthCorrelatedCameraIntrinsicsAsync(target);
Parameters
target
PerceptionDepthFrameSource PerceptionDepthFrameSource PerceptionDepthFrameSource PerceptionDepthFrameSource

The depth frame source to try to get intrinsic properties of.

Returns

If the attempt is successful, this returns a read-only collection of PerceptionDepthCorrelatedCameraIntrinsics objects specifying the intrinsic properties of the camera used by the correlated depth frame source. Otherwise, this returns null.

TryGetDepthCorrelatedCoordinateMapperAsync(String, PerceptionDepthFrameSource) TryGetDepthCorrelatedCoordinateMapperAsync(String, PerceptionDepthFrameSource) TryGetDepthCorrelatedCoordinateMapperAsync(String, PerceptionDepthFrameSource) TryGetDepthCorrelatedCoordinateMapperAsync(String, PerceptionDepthFrameSource)

Attempts to get a coordinate mapper that maps from depth frame image space to depth frame space.

public : IAsyncOperation<PerceptionDepthCorrelatedCoordinateMapper> TryGetDepthCorrelatedCoordinateMapperAsync(Platform::String targetId, PerceptionDepthFrameSource depthFrameSourceToMapWith)
public IAsyncOperation<PerceptionDepthCorrelatedCoordinateMapper> TryGetDepthCorrelatedCoordinateMapperAsync(String targetId, PerceptionDepthFrameSource depthFrameSourceToMapWith)
Public Function TryGetDepthCorrelatedCoordinateMapperAsync(targetId As String, depthFrameSourceToMapWith As PerceptionDepthFrameSource) As IAsyncOperation( Of PerceptionDepthCorrelatedCoordinateMapper )
var iAsyncOperation = perceptionDepthFrameSource.tryGetDepthCorrelatedCoordinateMapperAsync(targetId, depthFrameSourceToMapWith);
Parameters
targetId
Platform::String String String String

The unique ID of the depth frame source to try to map to.

depthFrameSourceToMapWith
PerceptionDepthFrameSource PerceptionDepthFrameSource PerceptionDepthFrameSource PerceptionDepthFrameSource

The depth frame source to try to map to. This should be in a correlation group with the depth frame source.

Returns

If the two sources are correlated, this method returns a PerceptionDepthCorrelatedCoordinateMapper. Otherwise, it returns null. This method returns asynchronously.

TryGetTransformTo(String, Matrix4x4) TryGetTransformTo(String, Matrix4x4) TryGetTransformTo(String, Matrix4x4) TryGetTransformTo(String, Matrix4x4)

Gets the transform from the depth frame source to the target entity and sets hasResult to true, if a correlation exists. If a correlation does not exist, hasResult is set to false and result is not modified.

public : Platform::Boolean TryGetTransformTo(Platform::String targetId, Matrix4x4 result)
public bool TryGetTransformTo(String targetId, Matrix4x4 result)
Public Function TryGetTransformTo(targetId As String, result As Matrix4x4) As bool
var bool = perceptionDepthFrameSource.tryGetTransformTo(targetId, result);
Parameters
targetId
Platform::String String String String

The unique ID of the target entity.

result
Matrix4x4 Matrix4x4 Matrix4x4 Matrix4x4

If a correlation exists, this will be set to a 4x4 transform matrix that changes basis from the depth frame source coordinate system to the target entity coordinate system.

Returns
Platform::Boolean bool bool bool

True if a correlation exists, otherwise false.

TrySetVideoProfileAsync(PerceptionControlSession, PerceptionVideoProfile) TrySetVideoProfileAsync(PerceptionControlSession, PerceptionVideoProfile) TrySetVideoProfileAsync(PerceptionControlSession, PerceptionVideoProfile) TrySetVideoProfileAsync(PerceptionControlSession, PerceptionVideoProfile)

Attempts to set a video profile on this depth frame source. Requires an active Controller Mode control session on this frame source.

public : IAsyncOperation<PerceptionFrameSourcePropertyChangeResult> TrySetVideoProfileAsync(PerceptionControlSession controlSession, PerceptionVideoProfile profile)
public IAsyncOperation<PerceptionFrameSourcePropertyChangeResult> TrySetVideoProfileAsync(PerceptionControlSession controlSession, PerceptionVideoProfile profile)
Public Function TrySetVideoProfileAsync(controlSession As PerceptionControlSession, profile As PerceptionVideoProfile) As IAsyncOperation( Of PerceptionFrameSourcePropertyChangeResult )
var iAsyncOperation = perceptionDepthFrameSource.trySetVideoProfileAsync(controlSession, profile);
Parameters
controlSession
PerceptionControlSession PerceptionControlSession PerceptionControlSession PerceptionControlSession

A PerceptionControlSession representing active control of this frame source.

Returns

This method returns an PerceptionFrameSourcePropertyChangeResult object asynchronously. If the control session was still active when the video profile was set, and if the video profile is supported and can be activated, this will be a result indicating success.

Events

ActiveChanged ActiveChanged ActiveChanged ActiveChanged

Subscribes to the ActiveChanged event.

public : event TypedEventHandler ActiveChanged<PerceptionDepthFrameSource,  object>
public event TypedEventHandler ActiveChanged<PerceptionDepthFrameSource,  object>
Public Event TypedEventHandler ActiveChanged( Of ( Of PerceptionDepthFrameSource ), ( Of  object ))
function onActiveChanged(eventArgs){/* Your code */}


perceptionDepthFrameSource.addEventListener("activeChanged", onActiveChanged);
perceptionDepthFrameSource.removeEventListener("activeChanged", onActiveChanged);

AvailableChanged AvailableChanged AvailableChanged AvailableChanged

Subscribes to the AvailableChanged event.

public : event TypedEventHandler AvailableChanged<PerceptionDepthFrameSource,  object>
public event TypedEventHandler AvailableChanged<PerceptionDepthFrameSource,  object>
Public Event TypedEventHandler AvailableChanged( Of ( Of PerceptionDepthFrameSource ), ( Of  object ))
function onAvailableChanged(eventArgs){/* Your code */}


perceptionDepthFrameSource.addEventListener("availableChanged", onAvailableChanged);
perceptionDepthFrameSource.removeEventListener("availableChanged", onAvailableChanged);

CameraIntrinsicsChanged CameraIntrinsicsChanged CameraIntrinsicsChanged CameraIntrinsicsChanged

Subscribes to the CameraIntrinsicsChanged event.

public : event TypedEventHandler CameraIntrinsicsChanged<PerceptionDepthFrameSource,  object>
public event TypedEventHandler CameraIntrinsicsChanged<PerceptionDepthFrameSource,  object>
Public Event TypedEventHandler CameraIntrinsicsChanged( Of ( Of PerceptionDepthFrameSource ), ( Of  object ))
function onCameraIntrinsicsChanged(eventArgs){/* Your code */}


perceptionDepthFrameSource.addEventListener("cameraIntrinsicsChanged", onCameraIntrinsicsChanged);
perceptionDepthFrameSource.removeEventListener("cameraIntrinsicsChanged", onCameraIntrinsicsChanged);

PropertiesChanged PropertiesChanged PropertiesChanged PropertiesChanged

Subscribes to the PropertiesChanged event.

public : event TypedEventHandler PropertiesChanged<PerceptionDepthFrameSource,  PerceptionFrameSourcePropertiesChangedEventArgs>
public event TypedEventHandler PropertiesChanged<PerceptionDepthFrameSource,  PerceptionFrameSourcePropertiesChangedEventArgs>
Public Event TypedEventHandler PropertiesChanged( Of ( Of PerceptionDepthFrameSource ), ( Of  PerceptionFrameSourcePropertiesChangedEventArgs ))
function onPropertiesChanged(eventArgs){/* Your code */}


perceptionDepthFrameSource.addEventListener("propertiesChanged", onPropertiesChanged);
perceptionDepthFrameSource.removeEventListener("propertiesChanged", onPropertiesChanged);

VideoProfileChanged VideoProfileChanged VideoProfileChanged VideoProfileChanged

Subscribes to the VideoProfileChanged event.

public : event TypedEventHandler VideoProfileChanged<PerceptionDepthFrameSource,  object>
public event TypedEventHandler VideoProfileChanged<PerceptionDepthFrameSource,  object>
Public Event TypedEventHandler VideoProfileChanged( Of ( Of PerceptionDepthFrameSource ), ( Of  object ))
function onVideoProfileChanged(eventArgs){/* Your code */}


perceptionDepthFrameSource.addEventListener("videoProfileChanged", onVideoProfileChanged);
perceptionDepthFrameSource.removeEventListener("videoProfileChanged", onVideoProfileChanged);