I want to make a program in Python that can take video input from a webcam and display it. And I also want the program to be able to identify colors. So the program can identify where all the reds are. Is this possible to be made in Python?
What library or libraries could I use for this? If it is not possible, is there a better language to use for this?
I’m making this program for Linux.
Then OpenCV is the way to go, http://opencv.willowgarage.com/wiki/InstallGuide , this might also help you
Displaying a webcam feed using OpenCV and Python
And I also want the program to be able to identify colors.I wouldn’t recommend doing image processing natively in python, since it can be quite intensive, theresnumpywhich is really great for general numeric operations orPILwhich focuses on images.In most cases screenshots will be taken as 3d matrices
image[xloc][yloc][rgbcolor]depending on the format that opencv returns. If you want to check for red then simply checkimage[xloc][yloc][red]is 255 or a value near that to see what kind of intensity you are looking for and the other two colors are zero or low, ie the color red, but try doing this using matrix operators innumpya standard for loop in python will take considerably longer.