FindFaces

FindFaces[image]
attempts to find human faces in image and returns a list of bounding boxes.

FindFaces[image, {min, max}]
finds faces whose approximate pixel widths range from min to max.

DetailsDetails

  • FindFaces returns detected faces as a list of bounding boxes, each given in the form .
  • Coordinates are assumed to be in the standard image coordinate system where x runs from to width and y runs from to height. Position corresponds to the bottom-left corner of the image.
  • For multichannel images, FindFaces operates on grayscale intensities.
  • In FindFaces[image, size], the following forms can be used for size:
  • {min,max}faces of size min through max in pixels
    {Scaled[amin],Scaled[amax]}faces of relative size amin to amax
  • In FindFaces[img], a range for face size is automatically selected based on the dimensions of img.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Find coordinates of faces in an image:

In[1]:=
Click for copyable input
Out[1]=

Extract subimages that include faces:

In[2]:=
Click for copyable input
Out[2]=

Detect and highlight a face in an image:

In[1]:=
Click for copyable input
Out[1]=
New in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »