Color Recognition to play a video

Mar 24, 2011 at 10:36pm

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?

Mar 24, 2011 at 11:35pm

perhaps a good start…

Tutorial 25: Tracking the Position of a Color in a Movie

and ;)

Mar 25, 2011 at 12:20am

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.

Mar 25, 2011 at 1:40am

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..

– Pasted Max Patch, click to expand. –
Mar 25, 2011 at 1:44pm

ok so i get the detection part but how do i then tell max to play a video once red is detected?

Mar 27, 2011 at 3:17pm

First, read and understand jitter tutorial 1 and 4.

Once you set up a video you have a number of different choices with Probably good to start with an if statement.
1) if numbers are greater than -1 sent the start message to, 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.


You must be logged in to reply to this topic.