pytesser_v0.0.1

所属分类:模式识别(视觉/语音等)
开发工具:Python
文件大小:2176KB
下载次数:109
上传日期:2009-12-30 09:05:19
上 传 者xmh0729
说明:  Python实现的图像识别源码,可用来自动识别验证码
(OCR)

文件列表:
pytesser_v0.0.1 (0, 2009-12-29)
pytesser_v0.0.1\AUTHORS (273, 2007-05-06)
pytesser_v0.0.1\ChangeLog (48, 2007-05-06)
pytesser_v0.0.1\errors.py (424, 2007-03-10)
pytesser_v0.0.1\errors.pyc (1053, 2009-12-17)
pytesser_v0.0.1\LICENSE (558, 2007-05-06)
pytesser_v0.0.1\NOTICE (337, 2007-05-06)
pytesser_v0.0.1\PAM30.pyc (79788, 2009-12-17)
pytesser_v0.0.1\pytesser.py (1843, 2009-12-17)
pytesser_v0.0.1\tessdata (0, 2009-12-17)
pytesser_v0.0.1\tessdata\blackText.params (2772, 2006-06-17)
pytesser_v0.0.1\tessdata\configs (0, 2009-12-17)
pytesser_v0.0.1\tessdata\configs\api_config (1012, 2006-06-17)
pytesser_v0.0.1\tessdata\configs\api_resaljet (760, 2006-06-17)
pytesser_v0.0.1\tessdata\configs\box.train (412, 2006-06-30)
pytesser_v0.0.1\tessdata\configs\inter (97, 2006-06-17)
pytesser_v0.0.1\tessdata\configs\oldapi_config (815, 2006-06-17)
pytesser_v0.0.1\tessdata\configs\oldbox.train (816, 2006-06-17)
pytesser_v0.0.1\tessdata\configs\variable_config (1785, 2006-06-17)
pytesser_v0.0.1\tessdata\configs\var_api_config (1068, 2006-06-17)
pytesser_v0.0.1\tessdata\configs\var_box.train (1071, 2006-06-17)
pytesser_v0.0.1\tessdata\confsets (12, 2006-06-17)
pytesser_v0.0.1\tessdata\DangAmbigs (235, 2007-01-18)
pytesser_v0.0.1\tessdata\fmtable.cls (132988, 2006-06-17)
pytesser_v0.0.1\tessdata\fnetwts (751, 2006-06-17)
pytesser_v0.0.1\tessdata\freq-dawg (720, 2006-06-17)
pytesser_v0.0.1\tessdata\inttemp (676716, 2006-06-17)
pytesser_v0.0.1\tessdata\netwts (1369167, 2006-06-17)
pytesser_v0.0.1\tessdata\newdiff.asccodes (561, 2006-06-17)
pytesser_v0.0.1\tessdata\normproto (39772, 2006-06-17)
pytesser_v0.0.1\tessdata\pffmtable (548, 2006-06-17)
pytesser_v0.0.1\tessdata\soptable.cls (198305, 2006-06-17)
pytesser_v0.0.1\tessdata\tessconfigs (0, 2009-12-17)
pytesser_v0.0.1\tessdata\tessconfigs\batch (2188, 2006-12-28)
pytesser_v0.0.1\tessdata\tessconfigs\matdemo (2251, 2006-07-12)
pytesser_v0.0.1\tessdata\tessconfigs\old_batch (2263, 2006-06-17)
pytesser_v0.0.1\tessdata\tessconfigs\segdemo (2086, 2006-07-12)
pytesser_v0.0.1\tessdata\tessconfigs\var_batch (2308, 2006-06-17)
pytesser_v0.0.1\tessdata\test_matrix (3306, 2006-06-17)
... ...

Introduction: ============ PyTesser is an Optical Character Recognition module for Python. It takes as input an image or image file and outputs a string. PyTesser uses the Tesseract OCR engine (an Open Source project at Google), converting images to an accepted format and calling the Tesseract executable as an external script. A Windows executable is provided along with the Python scripts. The scripts should work in Linux as well. PyTesser: http://code.google.com/p/pytesser/ Tesseract: http://code.google.com/p/tesseract-ocr/ Dependencies: ============= PIL is required to work with images in memory. PyTesser has been tested with Python 2.4 in Windows XP. http://www.pythonware.com/products/pil/ Installation: ============== PyTesser has no installation functionality in this release. Extract pytesser.zip into directory with other scripts. Necessary files are listed in Dependencies below. Usage: ================================ >>> from pytesser import * >>> im = Image.open('phototest.tif') >>> text = image_to_string(im) >>> print text This is a lot of 12 point text to test the ocr code and see if it works on all types of file format. The quick brown dog jumped over the lazy fox. The quick brown dog jumped over the lazy fox. The quick brown dog jumped over the lazy fox. The quick brown dog jumped over the lazy fox. >>> try: ... text = image_file_to_string('fnord.tif', graceful_errors=False) ... except errors.Tesser_General_Exception, value: ... print "fnord.tif is incompatible filetype. Try graceful_errors=True" ... print value ... fnord.tif is incompatible filetype. Try graceful_errors=True Tesseract Open Source OCR Engine read_tif_image:Error:Illegal image format:Compression Tessedit:Error:Read of file failed:fnord.tif Signal_exit 31 ABORT. LocCode: 3 AbortCode: 3 >>> text = image_file_to_string('fnord.tif', graceful_errors=True) >>> print "fnord.tif contents:", text fnord.tif contents: fnord >>> text = image_file_to_string('fonts_test.png', graceful_errors=True) >>> print text 12 pt And Arnazwngw few dwscotheques provwde jukeboxes Tames Amazmgly few dnscotheques pmvxde Jukeboxes 24 pt: Arial: Amazingly few discotheques provide jul
近期下载者

相关文件


收藏者