Partager via


FaceDetector.FindFaces(Bitmap, FaceDetector+Face[]) Method

Definition

Finds all the faces found in a given android.graphics.Bitmap.

[Android.Runtime.Register("findFaces", "(Landroid/graphics/Bitmap;[Landroid/media/FaceDetector$Face;)I", "GetFindFaces_Landroid_graphics_Bitmap_arrayLandroid_media_FaceDetector_Face_Handler")]
public virtual int FindFaces (Android.Graphics.Bitmap? bitmap, Android.Media.FaceDetector.Face[]? faces);
[<Android.Runtime.Register("findFaces", "(Landroid/graphics/Bitmap;[Landroid/media/FaceDetector$Face;)I", "GetFindFaces_Landroid_graphics_Bitmap_arrayLandroid_media_FaceDetector_Face_Handler")>]
abstract member FindFaces : Android.Graphics.Bitmap * Android.Media.FaceDetector.Face[] -> int
override this.FindFaces : Android.Graphics.Bitmap * Android.Media.FaceDetector.Face[] -> int

Parameters

bitmap
Bitmap

the android.graphics.Bitmap graphic to be analyzed

faces
FaceDetector.Face[]

an array in which to place all found FaceDetector.Faces. The array must be sized equal to the <var>maxFaces</var> value set at initialization

Returns

the number of faces found

Attributes

Exceptions

if the Bitmap dimensions don't match the dimensions defined at initialization or the given array is not sized equal to the maxFaces value defined at initialization

Remarks

Java documentation for android.media.FaceDetector.findFaces(android.graphics.Bitmap, android.media.Face[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to