Pixy (
http://cmucam.org/projects/cmucam5) is a vision system that can be used to add computer vision to your Arduino, Raspberry Pi, or BeagleBone project. Once you have taught it the color to detect, it can send you the position and size of the detected objects.