You are Einstein

(A Processing program for science exhibitions)

Andreas Freise

2010

This Processing sketch creates a virtual mirror with the computer screen and a web camera. A face detection algorithm is used to replace all frontal faces with a picture of Einstein. The image below shows a screenshot of the program in action.


This sketch has been developed for the use in science exhibition as a fun element. It can, for example, be shown on a large screen in the entrance area of an exhibition or a particular room in order to make people stop and take a closer look.

We used a slightly different version of this sketch during the exhibition Looking for Black Holes with Lasers at British Science Festival in Birmingham. At that time we chose to display a question mark hovering above people's heads. We could see that especially children started to play with the application: by drawing smiley faces on paper or covering parts of their faces they started to test the face detection algorithm.

This program is provided as Processing source code. It has been tested on Mac OS X. To run this application please download and install Processing and also the OpenCV framework, as explained on this page. You must have Java installed and have a web camera that is recognised by Processing. (The sketch works as is with OpenCV 1.0.0 and Processing 1.5.1. You probably need to adapt the sketch for newer versions of OpenCV and/or Processing.)

You can use the following key commands:

  • <ESC>: end application
  • <SPACE>: save snapshot as image

The application has been built with Processing; it has been developed for the British Science Festival in Birmingham. See also our other Processing examples.