如何读取使用的tesseract OCR图像表中的数据? [英] How to read a table data from Images using Tesseract OCR?

查看:4053
本文介绍了如何读取使用的tesseract OCR图像表中的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是任何人都知道如何阅读和放大器;解析从图像的任何表数据。我使用asp.net应用程序和放大器;我已经成功地读取使用的tesseract-OCR API,但无法读取图像表数据。

Is anyone aware how read & parse any table data from the image. I am using asp.net application & I have successfully read data using Tesseract-OCR API but not able to read the table from Image.

请给用C#代码的解决方案。

Please give solution with c# code.

推荐答案

由于Tobltobs提到,的tesseract不会做布局分析。如果你想使用的tesseract正确提取和保存的表,你将需要解决的表分析问题,花时间培养引擎。没有为它来实现某种形式的表虽然检测的积极功能要求

As Tobltobs mentions, Tesseract doesn't do layout analysis. If you want to use Tesseract to properly extract and preserve the tables, you will need to solve the table analysis issues and spend time training the engine. There is an active feature request for it to implement some sort of table detection though.

另一种选择是使用商业OCR SDK来实现这一功能。一个这样的图书馆是 LEADTOOLS OCR SDK 已建表和放大器;细胞检测,并可以进行保存识别的文本和表格为Excel或HTML文件。下面是一个例子:
截图

Another option would be to use a commercial OCR SDK to achieve this functionality. One such library is the LEADTOOLS OCR SDK which has built in table & cell detection and can save the recognized text and table out as an Excel or html file. Here is an example:

和保存输出Excel中的截图:

and a screenshot of the saved output in Excel:

下面就是如何识别PDF文件,并保存为Excel中一些C#示例代码:

Here is some C# sample code on how to recognize a PDF and save it as Excel:

IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Advantage, false);
ocrEngine.Startup(null, null, null, null);
ocrEngine.AutoRecognizeManager.Run(@"C:\201609260949.pdf", @"C:\output.xls", DocumentFormat.Xls, null, null);

这篇关于如何读取使用的tesseract OCR图像表中的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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