Use webcam as a sensor + Arduino

Hello Everyone,

My idea is using a webcam + arduino + max/msp to make a simple interactive flash animation project.
I was wondering if anyone knows how to use “webcam as a sensor” to detect motion objects, and then trigger the flash animation.

In fact, I have used photoresistor as a sensor to trigger the animation and it works however, the light response isn’t stable.

Can anyone help me with that or give me some suggestions.

Very appreciate.
Jiun

Motion analysis is a bit beyond what the Arduino is capable of and in any case where would you attach a webcam? I’m working on something similar with audio and I’m looking to use either a modulated infrared beam or, if I can’t get the distance that way, some sort of ultrasound transciever. On the other hand, if you just want to detect motion in a room, passive infrared devices (PIR) are cheap (since they’re widely used in security systems) and have a good range. They should also be “stable” in the sense that you can adjust them to prevent false positives.