Check out Pixy CMUcam5 Sensor – fast vision sensor that can be taught to find objects!
Pixy addresses two problems: 1) Image sensors output lots of data, dozens of megabytes per second and 2) Processing this of data can overwhelm many processors.
By pairing a powerful dedicated processor with the image sensor – Pixy processes images from the image sensor and only sends the useful information to your microcontroller. The information is can be available through one of several protocols: UART serial, SPI, I2C, digital out, or analog out. So your Arduino or other microcontroller can talk easily with Pixy and still have plenty of CPU available for other tasks.
-Pixy uses a hue-based color filtering algorithm to detect objects. Pixy calculates the hue and saturation of each RGB pixel from the image sensor and uses these as the primary filtering parameters.
-Pixy remembers up to 7 different color signatures. If you need more than seven, you can use color codes (see below).
-Pixy can find literally hundreds of objects at a time.
-Pixy processed an entire 640×400 image frame every 1/50th of a second.
-You can get a complete update of all detected objects’ positions every 20 ms.
-Pixy is unique because you can physically teach it what you are interested in sensing.
Not only that, there is also PixyMon – an application that runs on your PC or Mac allowing you to see what Pixy sees, either as raw or processed video. It also allows you to configure your Pixy, set the output port and manage color signatures. PixyMon communicates with Pixy over a standard mini USB cable.
Buy Pixy CMUcam5 Sensor from Pakronics: