FaceDetectionEffect
FaceDetectionEffect
FaceDetectionEffect
FaceDetectionEffect
Class
Definition
Represents an effect that attempts to detect faces in a video stream.
public : sealed class FaceDetectionEffect : IFaceDetectionEffect, IMediaExtensionpublic sealed class FaceDetectionEffect : IFaceDetectionEffect, IMediaExtensionPublic NotInheritable Class FaceDetectionEffect Implements IFaceDetectionEffect, IMediaExtension// You can use this class in JavaScript.
- Attributes
Windows 10 requirements
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
Get an instance of this class by passing a FaceDetectionEffectDefinition object into AddVideoEffectAsync.
Properties
DesiredDetectionInterval DesiredDetectionInterval DesiredDetectionInterval DesiredDetectionInterval
Gets or sets the time span for which face detection should be performed.
public : TimeSpan DesiredDetectionInterval { get; set; }public TimeSpan DesiredDetectionInterval { get; set; }Public ReadWrite Property DesiredDetectionInterval As TimeSpan// You can use this property in JavaScript.
- Value
- TimeSpan TimeSpan TimeSpan TimeSpan
The time span for which face detection should be performed.
Enabled Enabled Enabled Enabled
Gets or sets a value indicating whether face detection is enabled.
public : PlatForm::Boolean Enabled { get; set; }public bool Enabled { get; set; }Public ReadWrite Property Enabled As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if face detection is enabled; otherwise, false.
Methods
SetProperties(IPropertySet) SetProperties(IPropertySet) SetProperties(IPropertySet) SetProperties(IPropertySet)
Sets properties on the IMediaExtension.
public : void SetProperties(IPropertySet configuration)public void SetProperties(IPropertySet configuration)Public Function SetProperties(configuration As IPropertySet) As void// You can use this method in JavaScript.
Parameters
- configuration
- IPropertySet IPropertySet IPropertySet IPropertySet
The property set.
Remarks
This method is inherited from the IMediaExtension interface and is not intended to be used from your code. Instead, set the properties of the FaceDetectionEffect directly.
Events
FaceDetected FaceDetected FaceDetected FaceDetected
Occurs when a face is detected.
public : event TypedEventHandler FaceDetected<FaceDetectionEffect, FaceDetectedEventArgs>public event TypedEventHandler FaceDetected<FaceDetectionEffect, FaceDetectedEventArgs>Public Event FaceDetected<FaceDetectionEffect, FaceDetectedEventArgs>// You can use this event in JavaScript.