【发布时间】:2018-12-15 05:10:02
【问题描述】:
我目前正在使用 Windows 7、Python 3.6 和 pytesseract 处理扫描图像。图像包含文本和表格区域 - 它看起来有点像这样:https://tex.stackexchange.com/questions/49300/wrap-text-around-a-tabular。
我想获取表格区域的坐标,以便将图像裁剪到该部分。显然,tesseract 定义了具有不同属性的区域(PolyBlockTypes 参见https://tesseract.patagames.com/help/html/T_Patagames_Ocr_Enums_PolyBlockType.htm) - 但我不知道如何使用 pytesseract 获取该信息。
谁能帮帮我?我想通过使用 pytesseract 或其他 python 函数来解决这个问题。
编辑:我目前的做法是
pytesseract.image_to_data(image='< ... >', config='-c gapmap_debug=1')
虽然配置 gapmap_debug=1 似乎没有任何效果......至少我没有得到输出。我错过了什么吗?更多配置选项请见http://www.sk-spell.sk.cx/tesseract-ocr-parameters-in-302-version
【问题讨论】:
标签: python image-processing python-tesseract