I have a small image with a black background and red lines in it and I need to count the red pixels. I know I need PIL, but I'm not sure which method to use. Then once I have the counts I need to equate them to a character, so if the red lines in the image form a circle and have x amount of red pixels, its = '0', and if the image forms a straight line and is found to have x amount of pixels it's = 'l'.
import Image
#mypic.jpg is the circle
im=image.open("mypic.jpg")
im.getcolors(R)
# if statement here
Any suggestions?