linux - 文本 block 内的 tesseract 整数识别

标签 linux opencv ubuntu ocr tesseract

我对 tesseract 和 openCV 都很陌生。我正在构建一个简单的 Linux 应用程序来口述纸上的打印文本。使用 tesseract 我设法进行了文本 block 识别,但是如果文本 block 中有一个整数,则该数字将被省略。例子 输入: “你好,这是我 2014 年的 1080p 3D 视频” 输出: “你好,这是我的 3D 视频,分辨率为 1080p”

有人遇到过这个问题吗?

开放式简历:2.4.9 Tesseract:V3.02 轻音:1.71 操作系统:Ubuntu 64 位 14.04 LTS

问候

最佳答案

我以前没见过这个,但我知道你有时可以用页面段模式改变这种行为。您在使用自动页面分割吗?尝试一些其他设置并输入每个 block 、行甚至单词的文本。您可以根据手册通过以下方式更改Page Seg Mode:

-psm N
Set Tesseract to only run a subset of layout analysis and assume a certain form of image. The options for N are:

0 = Orientation and script detection (OSD) only.
1 = Automatic page segmentation with OSD.
2 = Automatic page segmentation, but no OSD, or OCR.
3 = Fully automatic page segmentation, but no OSD. (Default)
4 = Assume a single column of text of variable sizes.
5 = Assume a single uniform block of vertically aligned text.
6 = Assume a single uniform block of text.
7 = Treat the image as a single text line.
8 = Treat the image as a single word.
9 = Treat the image as a single word in a circle.
10 = Treat the image as a single character.

关于linux - 文本 block 内的 tesseract 整数识别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27889851/

相关文章:

eclipse - 在ubuntu的eclipse中安装软件遇到错误

linux - 我如何知道 Virtualbox VM 何时准备好接受 SSH 连接?

linux - 如何将bash中的readkey包装在一个变量中

python-2.7 - 在 Anaconda 中安装 opencv python 包

python - 使用opencv提取图像的轮廓作为连续路径

linux - 错误 : RROR] Process or Namespace not found. PM2 错误 Linux 服务器与 github 操作

linux - 当我们在写入文件时删除文件会发生什么?

linux mkdir 目录中的目录

python - Keras 和 OpenCV (CV2) 作为 Python 可执行文件的依赖项?

apache - Prestashop 1.7 安装 Ubuntu 14.04 LAMP 重定向太多