文档阅读
使用IronOCR准确提取发票和报告中的文本和数据,并更快地构建功能。
文档阅读
1
阅读扫描文档
将物理文档和基于图像的 PDF 准确数字化为机器可读文本。非常适合创建可搜索的档案、自动输入纸质表格中的数据,以及使扫描内容可访问和可索引。我们的引擎擅长处理常见的扫描瑕疵。
了解如何:在 C# 中使用读取扫描文档using IronOcr;
using System;
// Instantiate OCR engine
var ocr = new IronTesseract();
// Configure OCR engine
using var input = new OcrInput();
input.LoadImage("potter.tiff");
// Perform OCR
OcrResult result = ocr.ReadDocument(input);
Console.WriteLine(result.Text);Imports IronOcr
Imports System
' Instantiate OCR engine
Dim ocr As New IronTesseract()
' Configure OCR engine
Using input As New OcrInput()
input.LoadImage("potter.tiff")
' Perform OCR
Dim result As OcrResult = ocr.ReadDocument(input)
Console.WriteLine(result.Text)
End Using2
阅读发票文件
从发票中智能提取结构化数据,实现应付账款工作流程自动化。除了简单的文本提取外,还能捕捉发票号码、到期日、总金额和供应商名称等键值对,甚至可以跨不同的布局和模板。
了解如何:阅读文档中的复杂表格using IronOcr;
// Instantiate OCR engine
var ocr = new IronTesseract();
// Enable table detection
ocr.Configuration.ReadDataTables = true;
using var input = new OcrPdfInput("sample.pdf");
var result = ocr.Read(input);
// Retrieve the data
var table = result.Tables[0].DataTable;
// Print the retrieved item to the console
Console.WriteLine($"The first item in the table is: {result.Tables[0].DataTable.Rows[0][0]}");Imports IronOcr
' Instantiate OCR engine
Dim ocr As New IronTesseract()
' Enable table detection
ocr.Configuration.ReadDataTables = True
Using input As New OcrPdfInput("sample.pdf")
Dim result = ocr.Read(input)
' Retrieve the data
Dim table = result.Tables(0).DataTable
' Print the retrieved item to the console
Console.WriteLine($"The first item in the table is: {result.Tables(0).DataTable.Rows(0)(0)}")
End Using3
读取照片
将智能手机照片和相机图像转化为可用文本。适用于捕捉收据用于费用跟踪、将白板笔记数字化、从产品标签中提取信息或从路标和海报中读取文本的移动应用程序。
了解如何:在 C# 中使用读取照片using IronOcr;
var ocr = new IronTesseract();
using var inputPhoto = new OcrInput();
inputPhoto.LoadImageFrame("ocr.tiff", 0);
// Read photo
OcrPhotoResult result = ocr.ReadPhoto(inputPhoto);
// Extract the text in the first region
string textinregion = result.TextRegions[0].TextInRegion;
// Print the text in the first region
Console.WriteLine($"Full Scnned Photo Text: {textinregion}");Imports IronOcr
Dim ocr = New IronTesseract()
Using inputPhoto = New OcrInput()
inputPhoto.LoadImageFrame("ocr.tiff", 0)
' Read photo
Dim result As OcrPhotoResult = ocr.ReadPhoto(inputPhoto)
' Extract the text in the first region
Dim textinregion As String = result.TextRegions(0).TextInRegion
' Print the text in the first region
Console.WriteLine($"Full Scnned Photo Text: {textinregion}")
End Using4
阅读截图
即时捕捉和处理应用程序窗口、用户界面或网页内容中的屏幕文本。通过读取其他应用程序的用户界面元素,实现与这些应用程序的无缝集成。
了解如何:在 C# 中使用读取屏幕截图using IronOcr;
using System;
using System.Linq;
// Instantiate OCR engine
var ocr = new IronTesseract();
using var inputScreenshot = new OcrInput();
inputScreenshot.LoadImage("screenshotOCR.png");
// Perform OCR
OcrPhotoResult result = ocr.ReadScreenShot(inputScreenshot);
// Output screenshot information
Console.WriteLine(result.Text);Imports IronOcr
Imports System
Imports System.Linq
' Instantiate OCR engine
Dim ocr = New IronTesseract()
Using inputScreenshot = New OcrInput()
inputScreenshot.LoadImage("screenshotOCR.png")
' Perform OCR
Dim result As OcrPhotoResult = ocr.ReadScreenShot(inputScreenshot)
' Output screenshot information
Console.WriteLine(result.Text)
End Using准备开始了吗?
Nuget Downloads 6,236,385|版本:2026.9刚刚发布