跳至页脚内容
使用 IRONOCR
HTML 到 PDF: C# .NET 的快速教程

使用 IronOCR 从扫描图像中提取表格数据:现场演示回顾

从扫描图像中提取数据是一项常见的挑战,尤其是涉及到诸如表格等结构化数据时。 通过IronOCR的先进机器学习功能,现在您可以无缝地提取包括单元格值及其位置在内的表格数据。 在此演示中,Shadman Majid,软件销售工程师,逐步讲解代码实施过程,而Anne Lazarakis,销售与市场总监,则分享了Iron Software客户的实际用例。

真实世界的使用案例

Ironocr Extract Table Data 4 related to 真实世界的使用案例

解释者:Anne Lazarakis,销售与市场总监*

保险索赔处理(Opyn Market)

在美国高度监管的医疗保险行业中,像Opyn Market这样的公司仍然通过传真接收许多文件。 这些扫描的文件通常包含必须准确提取并输入内部系统的表格数据。 通过IronOCR,他们能够自动化这一过程,减少手动工作并消除人为错误的可能性。

物流与食品配送(iPAP)

iPAP,美国最大的奶酪分销商,使用IronOCR管理200多个客户订单。 他们的发票有多种格式,表格布局不一致。 IronOCR帮助他们从扫描文件中高效提取采购订单号、发货日期和项目详情,即使格式多样。 此自动化每年为他们节省了4万到4.5万美元。

Ironocr Extract Table Data 2 related to 物流与食品配送(iPAP)


技术概述

Ironocr Extract Table Data 5 related to 技术概述

Shadman Majid一起的实时编码课程,软件销售工程师*

IronOCR使用专有的机器学习模型从扫描文件中检测和提取表格数据。 此功能支持:

  • 表格单元格和坐标的提取
  • 扫描图像和多帧PDF的OCR
  • 与C#、VB.NET、.NET Standard、.NET Framework和.NET Core的兼容性

Ironocr Extract Table Data 3 related to 技术概述

要访问此功能,您需要:

这些包包括用于表结构检测和准确OCR的训练有素的ML模型。

提取表格的示例代码

下面是一个C#代码片段示例,演示如何使用IronOCR从图像中提取表格数据:

// Import the necessary IronOCR namespaces
using IronOcr;

// Initialize the IronTesseract to handle OCR processes
var Ocr = new IronTesseract();

// Load the image containing the table
using (var input = new OcrInput("invoice.jpg"))
{
    // Perform OCR and extract text data including tables
    var result = Ocr.Read(input);

    // Iterate through each page in the document
    foreach (var page in result.Pages)
    {
        // Iterate through each table found on the page
        foreach (var table in page.Tables)
        {
            Console.WriteLine("Table found:");
            // Iterate through each row in the table
            foreach (var row in table.Rows)
            {
                // Convert the row of cells to a comma-separated string
                var cells = string.Join(", ", row.Cells.Select(cell => cell.Text));
                Console.WriteLine(cells);
            }
        }
    }
}
// Import the necessary IronOCR namespaces
using IronOcr;

// Initialize the IronTesseract to handle OCR processes
var Ocr = new IronTesseract();

// Load the image containing the table
using (var input = new OcrInput("invoice.jpg"))
{
    // Perform OCR and extract text data including tables
    var result = Ocr.Read(input);

    // Iterate through each page in the document
    foreach (var page in result.Pages)
    {
        // Iterate through each table found on the page
        foreach (var table in page.Tables)
        {
            Console.WriteLine("Table found:");
            // Iterate through each row in the table
            foreach (var row in table.Rows)
            {
                // Convert the row of cells to a comma-separated string
                var cells = string.Join(", ", row.Cells.Select(cell => cell.Text));
                Console.WriteLine(cells);
            }
        }
    }
}
' Import the necessary IronOCR namespaces
Imports IronOcr

' Initialize the IronTesseract to handle OCR processes
Private Ocr = New IronTesseract()

' Load the image containing the table
Using input = New OcrInput("invoice.jpg")
	' Perform OCR and extract text data including tables
	Dim result = Ocr.Read(input)

	' Iterate through each page in the document
	For Each page In result.Pages
		' Iterate through each table found on the page
		For Each table In page.Tables
			Console.WriteLine("Table found:")
			' Iterate through each row in the table
			For Each row In table.Rows
				' Convert the row of cells to a comma-separated string
				Dim cells = String.Join(", ", row.Cells.Select(Function(cell) cell.Text))
				Console.WriteLine(cells)
			Next row
		Next table
	Next page
End Using
$vbLabelText   $csharpLabel
  • 加载图像: 脚本首先初始化IronTesseract引擎并加载名为invoice.jpg的图像文件进行处理。
  • OCR执行: 它对输入执行OCR以提取文本数据,特别关注任何表格。
  • 表格提取: 脚本遍历每个检测到的表格及其行,以结构化的方式输出单元格内容。

确保您在运行此脚本之前安装了必需的IronOCR NuGet包。


结论

IronOCR使从扫描文件中自动提取复杂表格数据变得容易。 无论您是在医疗、物流、金融还是制造业,这一解决方案都提供了可靠性、准确性和节省成本的效率。 只需几行代码,您就可以消除手动数据输入并减少人为错误。

想看看它的实际效果吗? 立即预约我们的工程师进行现场演示此处

常见问题解答

如何使用 C# 从扫描图像中提取表格数据?

您可以使用 IronOCR 的高级机器学习功能从扫描图像中提取表格数据。该过程包括使用 IronTesseract 引擎在图像上执行 OCR 并提取信息,包括单元格值及其坐标。

从扫描文档中提取表格数据的实际应用有哪些?

实际应用包括通过从传真文档中提取表格数据自动化保险索赔处理,以及在物流管理客户订单中,其中发票格式各异且表格布局不一致,如 Opyn Market 和 iPAP 等公司所示。

IronOCR 提供了哪些技术能力用于表格数据提取?

IronOCR 提供了例如提取表格单元格及坐标、扫描图像和多帧 PDF 的 OCR 以及与 C#、VB.NET、.NET Standard、.NET Framework 和 .NET Core 的兼容性等功能。

使用 IronOCR 提取表格数据的代码涉及哪些步骤?

该过程包括初始化 IronTesseract 引擎、加载图像、执行 OCR 以提取文本数据,并遍历每个检测到的表格及其行以输出单元格内容。

提取表格数据需要哪些包?

您需要 IronOCR NuGet 包以及 IronOcr.Extensions.AdvancedScanning 包,以利用必要的训练 ML 模型进行表格检测和准确的 OCR。

IronOCR 如何在医疗保健和物流行业提升效率?

IronOCR 通过自动化从扫描的文档中提取复杂的表格数据来减少人工劳动和人为错误,为医疗保健和物流等行业提供显着的效率和成本节约。

我可以看到 IronOCR 功能的现场演示吗?

可以,您可以预约与 Iron Software 工程师进行现场演示,了解 IronOCR 的实际运行情况及其在提取表格数据方面的能力。

Kannaopat Udonpant
软件工程师
在成为软件工程师之前,Kannapat 在日本北海道大学完成了环境资源博士学位。在攻读学位期间,Kannapat 还成为了车辆机器人实验室的成员,隶属于生物生产工程系。2022 年,他利用自己的 C# 技能加入 Iron Software 的工程团队,专注于 IronPDF。Kannapat 珍视他的工作,因为他可以直接从编写大多数 IronPDF 代码的开发者那里学习。除了同行学习外,Kannapat 还喜欢在 Iron Software 工作的社交方面。不撰写代码或文档时,Kannapat 通常可以在他的 PS5 上玩游戏或重温《最后生还者》。