Thread
:
counting pixels in an image(ocr)
View Single Post
•
•
Join Date: May 2008
Posts: 837
Reputation:
Solved Threads: 130
Paul Thompson
Offline
previously paulthom12345
Re: counting pixels in an image(ocr)
0
#
2
Dec 4th, 2008
Could you test how many pixels are red? Because a circle will require many more pixels to draw then a line.
I know when getting colours i used something like:
Help with Code Tags
python Syntax
(
Toggle Plain Text
)
import
Image
im = image.
open
(
"myPic.jpg"
)
for
pixel
in
im.
getdata
(
)
:
#check if it is red
import Image im = image.open("myPic.jpg") for pixel in im.getdata(): #check if it is red
Make it idiot proof and someone will make a better idiot.
Check out my Site
|
and join us on IRC
|
Python Specific IRC
Paul Thompson
View Public Profile
Visit Paul Thompson's homepage!
Find all posts by Paul Thompson