Tesseract:指定文本区域 [英] Tesseract: Specifying regions of text

查看:139
本文介绍了Tesseract:指定文本区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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.tifC:\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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆