VideoTrigger is a generic Processing application for triggering events based on motion detection within regions of a video stream. The user defines polygonal regions within a video image (such as a webcam or video file) and a threshold of motion: when the video inside the region changes, a trigger is fired.

This work was commissioned by the Fabric Workshop and Museum for an upcoming installation, but it is free for anyone to use or alter. The first included example allows anyone to make a video beatbox: simply draw a region on the video image, drop a sample into the region, and it will be triggered every time you move into that region.

The second example writes to Pachube every time motion is detected in each region. You can combine this with Pachube’s “triggers” function to make a DIY home alarm with a webcam: get notified via email or text any time someone walks onto your yard (but not when cars drive by on your street).

The source is on github and includes two demo applications: * Sound File triggering (not yet finished!) * Pachube updating

From: