This is a simple color detection program made with processing. This code will turn on your camera. Wherever your mouse is on the canvas, it will tell you wether the area your mouse is over is black, white or blue. Using a similar technique, I am working on a face detection algorithm. MAKE SURE YOUR VIDEO LIBRARY IS INSTALLED AND WORKING BEFORE USING THIS CODE. THIS WILL ONLY WORK ON PROCESSING. IF YOU DO NOT KNOW WHAT PROCESSING IS, GO TO processing.org AND VISIT THE DOWNLOAD PAGE.
To use this piece of code, click see inside. Then click on the sprite named 'code'. Then go to costumes, double click the text. Then copy it (crtl c or command c) then paste it on to the processing sketch (crtl v or command v). I could have put the code here BUT the bad word detector seems to think that the code I have written has swear words or something...