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.

Details

  • FindFaces returns detected faces as a list of bounding boxes, each given in the form {{xmin,ymin},{xmax,ymax}}.
  • Coordinates {x,y} are assumed to be in the standard image coordinate system where x runs from 0 to width and y runs from 0 to height. Position {0,0} 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[image], a range for face size is automatically selected based on the dimensions of image.

Examples

open allclose all

Basic Examples  (2)

Find coordinates of faces in an image:

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

Extract subimages that include faces:

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

Detect and highlight a face in an image:

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

Scope  (2)

Properties & Relations  (1)

Possible Issues  (2)

See Also

ImageIdentify  Classify  CurrentImage  EdgeDetect  ImageKeypoints

Introduced in 2012
(9.0)