FaceTracker FaceTracker FaceTracker FaceTracker Class

Definition

Detects faces in VideoFrame objects and tracks faces across subsequent video frames.

public : sealed class FaceTracker : IFaceTrackerpublic sealed class FaceTracker : IFaceTrackerPublic NotInheritable Class FaceTracker Implements IFaceTracker// 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)

Properties

IsSupported IsSupported IsSupported IsSupported

Gets a value indicating whether the FaceTracker class is supported on the current device.

public : static PlatForm::Boolean IsSupported { get; }public static bool IsSupported { get; }Public Static ReadOnly Property IsSupported As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

True if FaceTracker; otherwise, false.

MaxDetectableFaceSize MaxDetectableFaceSize MaxDetectableFaceSize MaxDetectableFaceSize

Gets or sets the maximum detectable face size, in pixels.

public : BitmapSize MaxDetectableFaceSize { get; set; }public BitmapSize MaxDetectableFaceSize { get; set; }Public ReadWrite Property MaxDetectableFaceSize As BitmapSize// You can use this property in JavaScript.
Value
BitmapSize BitmapSize BitmapSize BitmapSize

The maximum detectable face size, in pixels.

MinDetectableFaceSize MinDetectableFaceSize MinDetectableFaceSize MinDetectableFaceSize

Gets or sets the minimum detectable face size, in pixels.

public : BitmapSize MinDetectableFaceSize { get; set; }public BitmapSize MinDetectableFaceSize { get; set; }Public ReadWrite Property MinDetectableFaceSize As BitmapSize// You can use this property in JavaScript.
Value
BitmapSize BitmapSize BitmapSize BitmapSize

The minimum detectable face size, in pixels.

Methods

CreateAsync() CreateAsync() CreateAsync() CreateAsync()

Creates a new instance of the FaceTracker class.

public : static IAsyncOperation<FaceTracker> CreateAsync()public static IAsyncOperation<FaceTracker> CreateAsync()Public Static Function CreateAsync() As IAsyncOperation( Of FaceTracker )// You can use this method in JavaScript.
Returns

An asynchronous operation that returns a FaceTracker instance upon successful completion.

GetSupportedBitmapPixelFormats() GetSupportedBitmapPixelFormats() GetSupportedBitmapPixelFormats() GetSupportedBitmapPixelFormats()

Returns a list of the bitmap pixels formats supported by the FaceTracker on the current device.

public : static IVectorView<BitmapPixelFormat> GetSupportedBitmapPixelFormats()public static IReadOnlyList<BitmapPixelFormat> GetSupportedBitmapPixelFormats()Public Static Function GetSupportedBitmapPixelFormats() As IReadOnlyList( Of BitmapPixelFormat )// You can use this method in JavaScript.
Returns
IVectorView<BitmapPixelFormat> IReadOnlyList<BitmapPixelFormat> IReadOnlyList<BitmapPixelFormat> IReadOnlyList<BitmapPixelFormat>

A list of the bitmap pixels formats supported by the FaceTracker on the current device.

IsBitmapPixelFormatSupported(BitmapPixelFormat) IsBitmapPixelFormatSupported(BitmapPixelFormat) IsBitmapPixelFormatSupported(BitmapPixelFormat) IsBitmapPixelFormatSupported(BitmapPixelFormat)

Queries whether the specified bitmap pixel format is supported by the FaceTracker on the current device.

public : static PlatForm::Boolean IsBitmapPixelFormatSupported(BitmapPixelFormat bitmapPixelFormat)public static bool IsBitmapPixelFormatSupported(BitmapPixelFormat bitmapPixelFormat)Public Static Function IsBitmapPixelFormatSupported(bitmapPixelFormat As BitmapPixelFormat) As bool// You can use this method in JavaScript.
Parameters
bitmapPixelFormat
BitmapPixelFormat BitmapPixelFormat BitmapPixelFormat BitmapPixelFormat

The bitmap pixel format for which support is queried.

Returns
PlatForm::Boolean bool bool bool

True if the specified bitmap pixel format is supported; otherwise, false.

ProcessNextFrameAsync(VideoFrame) ProcessNextFrameAsync(VideoFrame) ProcessNextFrameAsync(VideoFrame) ProcessNextFrameAsync(VideoFrame)

Asynchronously processes a VideoFrame for face detection.

public : IAsyncOperation<IVector<DetectedFace>> ProcessNextFrameAsync(VideoFrame videoFrame)public IAsyncOperation<IList<DetectedFace>> ProcessNextFrameAsync(VideoFrame videoFrame)Public Function ProcessNextFrameAsync(videoFrame As VideoFrame) As IAsyncOperation( Of IListDetectedFace )// You can use this method in JavaScript.
Parameters
videoFrame
VideoFrame VideoFrame VideoFrame VideoFrame

The VideoFrame in which faces are detected or tracked.

Returns
IAsyncOperation<IVector<DetectedFace>> IAsyncOperation<IList<DetectedFace>> IAsyncOperation<IList<DetectedFace>> IAsyncOperation<IList<DetectedFace>>

An asynchronous operation that returns a list of DetectedFace objects upon successful completion.

Remarks

The provided SoftwareBitmap must be in a supported pixel format. Use GetSupportedBitmapPixelFormats to retrieve a list of supported pixel formats for the current device. Use IsBitmapPixelFormatSupported to test whether a given pixel format is supported.

See Also