Detect Faces in Real Time

Track faces on your computers camera.

code

X

how it works

This example was live-coded at the Wolfram Research booth at SXSW, March 11, 2014.

CurrentImage returns an image from your computers camera:

In[1]:=
X
In[2]:=
X

FindFaces returns the corner coordinates of rectangles in the image that contain faces:

In[3]:=
X
Out[3]=

Show the image overlaid with red rectangles that mark the faces:

In[4]:=
X
Out[4]=

Wrap that code with Dynamic to make it update in real time:

In[5]:=
X