Color Recognition to play a video
I was wondering whether it was possible to have a web-cam picking up say the color red from a white background and then displaying a video that automatically plays. If someone could just point me to a tutorial or in the general direction it would be greatly appreciated. I'm guessing that it has to do with pixel comparison between the current frame and the previous frame with a value range for the color to look for. Am I way off or close?
perhaps a good start...
Tutorial 25: Tracking the Position of a Color in a Movie
and redball.mov ;)
The thing i dont really need the tracking part so much. I just need the program to recognize red has appeared on the screen and then play a video to show that.
as always with jitter you can reach the goal in diferent ways..
this is one,,, almost a cut and paste from the helpfile..
use a white background and put a red object in front of the camera..
ok so i get the detection part but how do i then tell max to play a video once red is detected?
First, read and understand jitter tutorial 1 and 4.
Once you set up a video you have a number of different choices with jit.qt.movie. Probably good to start with an if statement.
1) if numbers are greater than -1 sent the start message to jit.qt.movie, otherwise send a stop message.
2) you could always use the if statement to send a 1 or a 0 and then use that to change the rate attribute of the movie.