Created
August 11, 2015 15:49
-
-
Save octohedron/1206fab973a5ad0f5d22 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clean the background noise, if color != black, then set to white. | |
for y in xrange(img.size[1]): | |
for x in xrange(img.size[0]): | |
if not(pixdata[x, y][0] > threshold \ | |
and pixdata[x, y][1] > threshold \ | |
and pixdata[x, y][2] > threshold): | |
pixdata[x, y] = (0, 0, 0, 255) | |
else: | |
pixdata[x, y] = (255, 255, 255, 255) | |
counter = 0; | |
old_x = -1; | |
letterlist = [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment