Escolar Documentos
Profissional Documentos
Cultura Documentos
:
:
:
Python 2.7.9:PIL(Python
Imaging Library) 1.1.7PyTesser 0.0.1Tesseract OCR
3.02 Python
:
from PIL import Image
img = Image.open('5.png')
img = img.convert("RGBA")
pixdata = img.load()
RGB
for y in xrange(img.size[1]):
for x in xrange(img.size[0]):
if pixdata[x, y] != (0, 0, 0, 255):
pixdata[x, y] = (255, 255, 255, 255)
for
im_orig = Image.open('5.png')
big = im_orig.resize((116, 56), Image.NEAREST)
ext = ".tif"
big.save("input-NEAREST" + ext)
.tif
from pytesser import *
image = Image.open('input-NEAREST.tif')
print (image_to_string(image))
Tesseract OCR .tif
DEMO:
4G7L
9koO
time
tm
:
DEMO