- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
下面是我用来测试 Tesseract 性能的非常简单的程序。尽管图片是高质量且非常清晰的屏幕截图(不是带有颜色的复杂图片),但我得到的结果并不像预期的那样。请查看我的代码和下面的结果。我不确定是我做错了什么还是 Tesseract 引擎无法处理这个?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using tessnet2;
namespace ImageProcessTesting
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int up_lef_x = 1075;
int up_lef_y = 0070;
int bo_rig_x = 1430;
int bo_rig_y = 0095;
int width = bo_rig_x - up_lef_x;
int height = bo_rig_y - up_lef_y;
var bmpScreenshot = new Bitmap(width, height, PixelFormat.Format32bppArgb);
var gfxScreenshot = Graphics.FromImage(bmpScreenshot);
gfxScreenshot.CopyFromScreen(
1075,
0070,
0,
0,
Screen.PrimaryScreen.Bounds.Size,
CopyPixelOperation.SourceCopy);
// bmpScreenshot.Save("C:\\Users\\Exa\\Screenshot.png", ImageFormat.Png);
var image = bmpScreenshot;
var ocr = new Tesseract();
ocr.Init(@"C:\Users\Exa\Desktop\tessdata", "eng", false);
var result = ocr.DoOCR(image, Rectangle.Empty);
string result_str = "";
foreach (Word word in result)
result_str += word.Text;
MessageBox.Show(result_str);
}
}
}
最佳答案
96DPI 的屏幕截图通常不足以进行 OCR。正如写在Tesseract wiki :
There is a minimum text size for reasonable accuracy. You have to consider resolution as well as point size. Accuracy drops off below 10pt x 300dpi, rapidly below 8pt x 300dpi. A quick check is to count the pixels of the x-height of your characters. (X-height is the height of the lower case x.) At 10pt x 300dpi x-heights are typically about 20 pixels, although this can vary dramatically from font to font. Below an x-height of 10 pixels, you have very little chance of accurate results, and below about 8 pixels, most of the text will be "noise removed".
但是,如果您知道确切的字体是什么,您可以尝试重新训练 tesseract 以获得更好的结果。
关于c# - 超正方体 OCR : very inaccurate result,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37782246/
根据 Wikipedia 的说法,“拉丁文打字文本的准确识别现在被认为在很大程度上解决了可以提供清晰成像的应用程序(例如扫描打印文档)的问题。”但是,它没有给出引用。 我的问题是:这是真的吗?当前最先
我在将包含文本图像的 JPG 文件转换为文本文件时遇到问题。我尝试了 ABBYY 的 OCR SDK 和其他一些 OCR 来源,但没有一个包含格鲁吉亚语。 你能告诉我是否有任何可用于格鲁吉亚语的 OC
有人给了我一大堆惊人的信息。它是 200MB 的 .tiff 扫描公告图像,可以追溯到 40 年代。我想将其数字化,但我对 OCR 一无所知。一些早期的 Material 几乎无法被人类阅读,更不用说
我正在尝试通过 python-tesseract 使用 tesseract-OCR 来读取看起来像这样的低分辨率字体: 不幸的是,该图像返回 ZIJZHZI 我认为分辨率太低,这会导致问题。我试过放大
OCR 软件是否能够可靠地将如下图像转换为值列表? 更新: 更详细的任务如下: 我们有一个客户端应用程序,用户可以在其中打开报告。此报告包含一个值表。 但并不是每个报告看起来都一样——不同的字体、不同
我正在尝试使用 Tesseract-OCR检测其中包含纯文本的图像文本,但这些文本具有名为Journal 的手写字体。 例子: 结果不是最好的: Maxima! size` W (35) 有没有可能改
我已经开始了一个简单的项目,它必须获得一个包含带有上标的文本的图像,然后通过使用 OCR(目前我正在使用 tesseract)它必须识别上标字符 + 正常字符。 例如,我们有一个化学方程式,例如 Cl
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 8年前关闭。 Improve this q
我目前正在研究 OCR(波斯语), 尽管“fas.traineddata”在tessdata中可用,但是当我使用以下命令时,什么也没发生: import pytesseract from PIL im
我对文本片段中下标和上标的一般识别有疑问。 示例图片: 我使用 Tesseract 4.1.1 和 https://github.com/tesseract-ocr/tessdata_best 下可用
在过去的 3 个月里,我一直在尝试训练 Tesseract 通过识别我拥有的图像集合,由于真正的缺乏 正确的文档,以及非常高的复杂性,我开始 放弃将 Tesseract 作为解决方案。 我正在寻找一种
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 想改进这个问题?将问题更新为 on-topic对于堆栈溢出。 12 个月前关闭。 Improve this
已结束。此问题正在寻求书籍、工具、软件库等的推荐。它不满足Stack Overflow guidelines 。目前不接受答案。 我们不允许提出寻求书籍、工具、软件库等推荐的问题。您可以编辑问题,以便
下面是我的电表读数 52425.5(粗略)的图片: 什么程序/技术可以帮助我自动抄表?备注: 这是较为清晰的图像之一。许多图像都有静态。我可以忽略(让程序说“错误”)带有太多静态的图片。 相机有一个固
大写字母OCR(光学字符识别)的常见错误有哪些? 例如FOR -> FOB 最佳答案 要获得最准确的答案,最好使用针对您的问题的特定数据样本自行测试。不同字符/单词组合的错误率可能有很大差异,具体取决
对于我想教 Tesseract 将复选框识别为单词的客户。当 Tesseract 应该识别一个空的复选框时,它工作得很好。 此命令与 this 结合使用教程就像一个魅力,Tesseract 能够找到空
我正在使用 Tesseract OCR将扫描的 PDF 转换为纯文本。总体而言,它非常有效,但我对扫描文本的顺序有疑问。带有表格数据的文档似乎是逐列向下扫描,而更自然的方式是逐行扫描。一个非常小的例子
在哪里可以找到 cube 的 tesseract ocr 土耳其语扩展模式? 文件: tr.cube.fold tr.cube.lm tr.cube.nn tr.cube.params tr.cube
我正在编写一个用于训练 Tesseract OCR 图像的生成器。 在为 Tesseract OCR 的新字体生成训练图像时,最佳值是什么: 新闻部 以磅为单位的字体大小 字体是否应该抗锯齿 边界框是
我的文本带有一些不那么复杂的数学符号,如下所示。 Tesseract OCR 默认无法识别此类数学符号(+-、角度)。我如何通过 tesseract 识别这些数学符号? 最佳答案 只需使用以下语句:
我是一名优秀的程序员,十分优秀!