INTERACTIVE PROGRAMMING 101: Detecting the Presence of a Person in a Room using a Webcam

Recently I had the opportunity of doing some programming for artist Angie Eng on her upcoming exhibition, DOOM AND GLOOM at Harvestworks in New York City. The installation consists of three hung paintings and video projections which are activated when a visitor stands in front of them. 

For the interaction we used camera tracking with 3 inexpensive web cams. We found Logitech C270 USB Webcams for $22.99.

Attached is a max patch I made that takes a snapshot of a background and checks all new incoming video frames against that snapshot. If the overall brightness of new frames is different than the that of the snapshot by a defined threshold - the presence of an experiencer is assumed. For demonstration purposes I made a line of text change from "something is here" to "something is not here" depending on my own presence in the video above. 

To use the patch attached above you must have Max 7 installed. A little working knowledge of Max is assumed here but if not maybe the basic principles are applicable in another programming language. 

Angie's show opens December 16th at Harvestworks and runs until the 31st. It features music by Rhys Chatham, Jean Philippe Gross, and Charlemagne Palestine.