PerceptionColorFrameSource
PerceptionColorFrameSource
PerceptionColorFrameSource
PerceptionColorFrameSource
Class
Definition
A frame source that provides color frames.
public : sealed class PerceptionColorFrameSource : IPerceptionColorFrameSource, IPerceptionColorFrameSource2public sealed class PerceptionColorFrameSource : IPerceptionColorFrameSource, IPerceptionColorFrameSource2Public NotInheritable Class PerceptionColorFrameSource Implements IPerceptionColorFrameSource, IPerceptionColorFrameSource2// You can use this class in JavaScript.
- Attributes
| 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// You can use this property in JavaScript.
- 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// You can use this property in JavaScript.
- 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 color frame source.
public : IVectorView<PerceptionVideoProfile> AvailableVideoProfiles { get; }public IReadOnlyList<PerceptionVideoProfile> AvailableVideoProfiles { get; }Public ReadOnly Property AvailableVideoProfiles As IReadOnlyList<PerceptionVideoProfile>// You can use this property in JavaScript.
- Value
- IVectorView<PerceptionVideoProfile> IReadOnlyList<PerceptionVideoProfile> IReadOnlyList<PerceptionVideoProfile> IReadOnlyList<PerceptionVideoProfile>
A read-only collection of video profiles that are currently available from the color frame source.
CameraIntrinsics CameraIntrinsics CameraIntrinsics CameraIntrinsics
Gets a CameraIntrinsics value specifying the intrinsic properties of the color frame source camera device.
public : CameraIntrinsics CameraIntrinsics { get; }public CameraIntrinsics CameraIntrinsics { get; }Public ReadOnly Property CameraIntrinsics As CameraIntrinsics// You can use this property in JavaScript.
A CameraIntrinsics value specifying the intrinsic properties of the color 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// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The identifier.
| 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 color frames for this source.
public : PlatForm::String DeviceKind { get; }public string DeviceKind { get; }Public ReadOnly Property DeviceKind As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
A string value indicating the kind of physical device that generates the color frames for this source.
DisplayName DisplayName DisplayName DisplayName
Gets a string value indicating the display name of the color frame source.
public : PlatForm::String DisplayName { get; }public string DisplayName { get; }Public ReadOnly Property DisplayName As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
A string value indicating the display name of the color frame source.
Id Id Id Id
Gets a string value indicating the unique ID of the color frame source.
public : PlatForm::String Id { get; }public string Id { get; }Public ReadOnly Property Id As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
A string value indicating the unique ID of the color 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// You can use this property in JavaScript.
- 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<string, object> Properties { get; }public IReadOnlyDictionary<string, object> Properties { get; }Public ReadOnly Property Properties As IReadOnlyDictionary<string, object>// You can use this property in JavaScript.
- 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 color frame source.
public : IVectorView<PerceptionVideoProfile> SupportedVideoProfiles { get; }public IReadOnlyList<PerceptionVideoProfile> SupportedVideoProfiles { get; }Public ReadOnly Property SupportedVideoProfiles As IReadOnlyList<PerceptionVideoProfile>// You can use this property in JavaScript.
- Value
- IVectorView<PerceptionVideoProfile> IReadOnlyList<PerceptionVideoProfile> IReadOnlyList<PerceptionVideoProfile> IReadOnlyList<PerceptionVideoProfile>
A read-only collection of video profiles that are supported by the color 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// You can use this property in JavaScript.
A PerceptionVideoProfile object indicating the current video profile.
Methods
AcquireControlSession() AcquireControlSession() AcquireControlSession() AcquireControlSession()
Attempts to acquire Controller Mode on the color frame source.
public : PerceptionControlSession AcquireControlSession()public PerceptionControlSession AcquireControlSession()Public Function AcquireControlSession() As PerceptionControlSession// You can use this method in JavaScript.
If the attempt is successful, this returns a PerceptionControlSession object that can be used to control properties of the color 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 color 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// You can use this method in JavaScript.
- targetId
- PlatForm::String String String String
A string representing the unique ID of the other frame source.
Returns true if the two sources can be controlled independently of one another, otherwise returns false.
CreateWatcher() CreateWatcher() CreateWatcher() CreateWatcher()
Creates a new color frame source watcher.
public : static PerceptionColorFrameSourceWatcher CreateWatcher()public static PerceptionColorFrameSourceWatcher CreateWatcher()Public Static Function CreateWatcher() As PerceptionColorFrameSourceWatcher// You can use this method in JavaScript.
A new color frame source watcher.
FindAllAsync() FindAllAsync() FindAllAsync() FindAllAsync()
Finds all color frame sources.
public : static IAsyncOperation<IVectorView<PerceptionColorFrameSource>> FindAllAsync()public static IAsyncOperation<IReadOnlyList<PerceptionColorFrameSource>> FindAllAsync()Public Static Function FindAllAsync() As IAsyncOperation( Of IReadOnlyListPerceptionColorFrameSource )// You can use this method in JavaScript.
When the method completes, it asynchronously returns a list of color frame sources.
FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String)
Finds an color frame source by looking up its unique ID.
public : static IAsyncOperation<PerceptionColorFrameSource> FromIdAsync(PlatForm::String id)public static IAsyncOperation<PerceptionColorFrameSource> FromIdAsync(String id)Public Static Function FromIdAsync(id As String) As IAsyncOperation( Of PerceptionColorFrameSource )// You can use this method in JavaScript.
- id
- PlatForm::String String String String
The unique ID of the color frame source.
When this method completes, it asynchronously returns a color 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 color 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 color 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// You can use this method in JavaScript.
- targetId
- PlatForm::String String String String
The unique ID of the target entity.
Returns true if a correlation exists, otherwise returns false.
OpenReader() OpenReader() OpenReader() OpenReader()
Gets a frame reader that reads frames from this color frame source.
public : PerceptionColorFrameReader OpenReader()public PerceptionColorFrameReader OpenReader()Public Function OpenReader() As PerceptionColorFrameReader// You can use this method in JavaScript.
Returns a frame reader that reads frames from this color frame source.
RequestAccessAsync() RequestAccessAsync() RequestAccessAsync() RequestAccessAsync()
Requests access to use color frame sources.
public : static IAsyncOperation<PerceptionFrameSourceAccessStatus> RequestAccessAsync()public static IAsyncOperation<PerceptionFrameSourceAccessStatus> RequestAccessAsync()Public Static Function RequestAccessAsync() As IAsyncOperation( Of PerceptionFrameSourceAccessStatus )// You can use this method in JavaScript.
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 color source.
public : IAsyncOperation<PerceptionDepthCorrelatedCameraIntrinsics> TryGetDepthCorrelatedCameraIntrinsicsAsync(PerceptionDepthFrameSource correlatedDepthFrameSource)public IAsyncOperation<PerceptionDepthCorrelatedCameraIntrinsics> TryGetDepthCorrelatedCameraIntrinsicsAsync(PerceptionDepthFrameSource correlatedDepthFrameSource)Public Function TryGetDepthCorrelatedCameraIntrinsicsAsync(correlatedDepthFrameSource As PerceptionDepthFrameSource) As IAsyncOperation( Of PerceptionDepthCorrelatedCameraIntrinsics )// You can use this method in JavaScript.
- correlatedDepthFrameSource
- PerceptionDepthFrameSource PerceptionDepthFrameSource PerceptionDepthFrameSource PerceptionDepthFrameSource
The depth frame source to try to get intrinsic properties of.
If the attempt is successful, this will return 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 color frame image space to depth frame space.
public : IAsyncOperation<PerceptionDepthCorrelatedCoordinateMapper> TryGetDepthCorrelatedCoordinateMapperAsync(PlatForm::String targetSourceId, PerceptionDepthFrameSource correlatedDepthFrameSource)public IAsyncOperation<PerceptionDepthCorrelatedCoordinateMapper> TryGetDepthCorrelatedCoordinateMapperAsync(String targetSourceId, PerceptionDepthFrameSource correlatedDepthFrameSource)Public Function TryGetDepthCorrelatedCoordinateMapperAsync(targetSourceId As String, correlatedDepthFrameSource As PerceptionDepthFrameSource) As IAsyncOperation( Of PerceptionDepthCorrelatedCoordinateMapper )// You can use this method in JavaScript.
- targetSourceId
- PlatForm::String String String String
The unique ID of the depth frame source to try to map to.
- correlatedDepthFrameSource
- PerceptionDepthFrameSource PerceptionDepthFrameSource PerceptionDepthFrameSource PerceptionDepthFrameSource
The depth frame source to try to map to. This should be in a correlation group with the color frame source.
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)
This method returns the transform from the color 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// You can use this method in JavaScript.
- 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 color frame source coordinate system to the target entity coordinate system.
Returns 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 color 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 )// You can use this method in JavaScript.
- controlSession
- PerceptionControlSession PerceptionControlSession PerceptionControlSession PerceptionControlSession
A PerceptionControlSession representing active control of this frame source.
The video profile to set.
This method returns an PerceptionFrameSourcePropertyChangeResult object asynchonously. 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 that indicates success.
Events
ActiveChanged ActiveChanged ActiveChanged ActiveChanged
Subscribes to the ActiveChanged event.
public : event TypedEventHandler ActiveChanged<PerceptionColorFrameSource, object>public event TypedEventHandler ActiveChanged<PerceptionColorFrameSource, object>Public Event ActiveChanged<PerceptionColorFrameSource, object>// You can use this event in JavaScript.
AvailableChanged AvailableChanged AvailableChanged AvailableChanged
Subscribes to the AvailableChanged event.
public : event TypedEventHandler AvailableChanged<PerceptionColorFrameSource, object>public event TypedEventHandler AvailableChanged<PerceptionColorFrameSource, object>Public Event AvailableChanged<PerceptionColorFrameSource, object>// You can use this event in JavaScript.
CameraIntrinsicsChanged CameraIntrinsicsChanged CameraIntrinsicsChanged CameraIntrinsicsChanged
Subscribes to the CameraIntrinsicsChanged event.
public : event TypedEventHandler CameraIntrinsicsChanged<PerceptionColorFrameSource, object>public event TypedEventHandler CameraIntrinsicsChanged<PerceptionColorFrameSource, object>Public Event CameraIntrinsicsChanged<PerceptionColorFrameSource, object>// You can use this event in JavaScript.
PropertiesChanged PropertiesChanged PropertiesChanged PropertiesChanged
Subscribes to the PropertiesChanged event.
public : event TypedEventHandler PropertiesChanged<PerceptionColorFrameSource, PerceptionFrameSourcePropertiesChangedEventArgs>public event TypedEventHandler PropertiesChanged<PerceptionColorFrameSource, PerceptionFrameSourcePropertiesChangedEventArgs>Public Event PropertiesChanged<PerceptionColorFrameSource, PerceptionFrameSourcePropertiesChangedEventArgs>// You can use this event in JavaScript.
VideoProfileChanged VideoProfileChanged VideoProfileChanged VideoProfileChanged
Subscribes to the VideoProfileChanged event.
public : event TypedEventHandler VideoProfileChanged<PerceptionColorFrameSource, object>public event TypedEventHandler VideoProfileChanged<PerceptionColorFrameSource, object>Public Event VideoProfileChanged<PerceptionColorFrameSource, object>// You can use this event in JavaScript.