FaceDetector FaceDetector FaceDetector FaceDetector Class

Definition

Detects faces in a SoftwareBitmap.

public : sealed class FaceDetector : IFaceDetectorpublic sealed class FaceDetector : IFaceDetectorPublic NotInheritable Class FaceDetector Implements IFaceDetector// 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 FaceDetector 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 FaceDetector; 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 FaceDetector class.

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

DetectFacesAsync(SoftwareBitmap) DetectFacesAsync(SoftwareBitmap) DetectFacesAsync(SoftwareBitmap) DetectFacesAsync(SoftwareBitmap)

Asynchronously detects faces in the provided SoftwareBitmap.

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

The image data to be processed for face detection.

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 for this method and its overloads. 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

DetectFacesAsync(SoftwareBitmap, BitmapBounds) DetectFacesAsync(SoftwareBitmap, BitmapBounds) DetectFacesAsync(SoftwareBitmap, BitmapBounds) DetectFacesAsync(SoftwareBitmap, BitmapBounds)

Asynchronously detects faces in the provided SoftwareBitmap within the specified search area.

public : IAsyncOperation<IVector<DetectedFace>> DetectFacesAsync(SoftwareBitmap image, BitmapBounds searchArea)public IAsyncOperation<IList<DetectedFace>> DetectFacesAsync(SoftwareBitmap image, BitmapBounds searchArea)Public Function DetectFacesAsync(image As SoftwareBitmap, searchArea As BitmapBounds) As IAsyncOperation( Of IListDetectedFace )// You can use this method in JavaScript.
Parameters
image
SoftwareBitmap SoftwareBitmap SoftwareBitmap SoftwareBitmap

The image data to be processed for face detection.

searchArea
BitmapBounds BitmapBounds BitmapBounds BitmapBounds

The bounds within the SoftwareBitmap in which face detection will be performed.

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.

See Also

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

Returns a list of the bitmap pixels formats supported by the FaceDetector 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 FaceDetector on the current device.

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

Queries whether the specified bitmap pixel format is supported by the FaceDetector 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.

See Also