Tesseract:指定文本区域 [英] Tesseract: Specifying regions of text
问题描述
我正在使用tesseract-ocr-3.01扫描许多表格.表单都遵循模板,因此我已经知道文本的区域/矩形在哪里.
I'm using tesseract-ocr-3.01 to scan many forms. The forms all follow a template, so I already know where the regions/rectangles of text are.
使用命令行工具时,是否可以将这些区域传递给tesseract?
Is there a way to pass those regions to tesseract when using the command-line tool?
推荐答案
I found the answer, thanks to this thread.
似乎tesseract支持uzn格式(用于unvl测试).
It seems that tesseract suports the uzn format (used in the unvl tests).
来自线程:
使用参数"-psm 4"调用tesseract并重命名uzn文件 图片名称相同的图片似乎可行.
Calling tesseract with parameter "-psm 4" and renaming the uzn file with the same name of the image seem works.
示例:如果我们有C:\input.tif
和C:\input.uzn
,我们可以这样做:
Example: If we have C:\input.tif
and C:\input.uzn
, we do this:
tesseract -psm 4 C:\input.tif C:\output
这篇关于Tesseract:指定文本区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!