$sudo apt-get install python-imaging
$ sudo easy_install PIL
from PIL import Image im = Image.open('7039.jpg')
imgry = im.convert('L') imgry.show()
threshold = 140 table = [] for i in range(256): if i < threshold: table.append(0) else: table.append(1) out = imgry.point(table, '1') out.show()
from PIL import Image from pytesser import pytesser image = Image.open('7039.jpg') print pytesser.image_file_to_string('7039.jpg') print pytesser.image_to_string(image)
本版积分规则 发表回复 回帖并转播 回帖后跳转到最后一页
QQ咨询|关于我们|Archiver|手机版|小黑屋|( 辽ICP备15012455号-4 ) Powered by 期权论坛 X3.2 © 2001-2016 期权工具网&期权论坛 Inc.
下载期权论坛手机APP