专业化阅读
超越普通文本。使用专用的高性能工具准确读取护照(MRZ)、支票(MICR)、车牌和条形码。
专业化阅读
1
读取车牌
建立强大的自动车牌识别 (ANPR) 系统,用于自动停车管理、安全门访问和车辆跟踪。我们的引擎经过训练,能够从各种角度、距离和照明条件下准确读取车牌。
了解如何:使用 IronOCR 阅读车牌using IronOcr;
using System;
var ocr = new IronTesseract();
ocr.Configuration.WhiteListCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_";
using var inputLicensePlate = new OcrInput();
inputLicensePlate.LoadImage("plate.jpeg");
// Read license plate
OcrLicensePlateResult result = ocr.ReadLicensePlate(inputLicensePlate);
// Retrieve license plate number and confidence value
string output = $"{result.Text}\nResult Confidence: {result.Confidence}";
Console.WriteLine(output);Imports IronOcr
Imports System
Dim ocr = New IronTesseract()
ocr.Configuration.WhiteListCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"
Using inputLicensePlate = New OcrInput()
inputLicensePlate.LoadImage("plate.jpeg")
' Read license plate
Dim result As OcrLicensePlateResult = ocr.ReadLicensePlate(inputLicensePlate)
' Retrieve license plate number and confidence value
Dim output As String = $"{result.Text}{vbLf}Result Confidence: {result.Confidence}"
Console.WriteLine(output)
End Using2
读取护照
通过即时从国际护照和身份证的机器可读区域 (MRZ) 提取数据,简化身份验证和客户入职流程。消除人工输入错误,加快办理登机手续或合规流程。
了解如何:在 C# 中使用 Read Passportusing IronOcr;
using System;
// Instantiate OCR engine
var ocr = new IronTesseract();
using var inputPassport = new OcrInput();
inputPassport.LoadImage("passport.jpg");
// Perform OCR
OcrPassportResult result = ocr.ReadPassport(inputPassport);
// Output name and passport number
Console.WriteLine(result.PassportInfo.GivenNames);
Console.WriteLine(result.PassportInfo.PassportNumber);Imports IronOcr
Imports System
' Instantiate OCR engine
Dim ocr = New IronTesseract()
Using inputPassport = New OcrInput()
inputPassport.LoadImage("passport.jpg")
' Perform OCR
Dim result As OcrPassportResult = ocr.ReadPassport(inputPassport)
' Output name and passport number
Console.WriteLine(result.PassportInfo.GivenNames)
Console.WriteLine(result.PassportInfo.PassportNumber)
End Using3
MICR 支票阅读
// Import the IronOCR namespace
using IronOcr;
// Create a new instance of IronTesseract for performing OCR operations
var Ocr = new IronTesseract();
// Set the OCR language to MICR to recognize magnetic ink characters
// Must have MICR (IronOcr.Languages.MICR) installed beforehand
Ocr.Language = OcrLanguage.MICR;
// Specify the file path of the input image containing MICR text
using (var Input = new OcrInput())
{
Input.LoadImage("sampleChequeImage.png");
// Run the OCR engine to read the MICR text from the input image
var Result = Ocr.Read(Input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
}' Import the IronOCR namespace
Imports IronOcr
' Create a new instance of IronTesseract for performing OCR operations
Dim Ocr = New IronTesseract()
' Set the OCR language to MICR to recognize magnetic ink characters
' Must have MICR (IronOcr.Languages.MICR) installed beforehand
Ocr.Language = OcrLanguage.MICR
' Specify the file path of the input image containing MICR text
Using Input = New OcrInput()
Input.LoadImage("sampleChequeImage.png")
' Run the OCR engine to read the MICR text from the input image
Dim Result = Ocr.Read(Input)
' Output the recognized text to the console
Console.WriteLine(Result.Text)
End Using4
阅读 BarCode 和 QR 码
检测和解码所有主要的一维和二维条形码格式,包括 QR 码。适用于库存管理、物流跟踪、销售点系统和移动票务应用的多功能解决方案。
了解如何:在.NET C#中读取 BarCode 和 QR 码using IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Enable barcode reading
ocrTesseract.Configuration.ReadBarCodes = true;
// Add PDF
using var imageInput = new OcrPdfInput("pdfWithBarcodes.pdf");
// Perform OCR
OcrResult ocrResult = ocrTesseract.Read(imageInput);
// Output detected barcodes and text values
Console.WriteLine(ocrResult.Text);
Console.WriteLine(ocrResult.Barcodes[0].Value);Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Enable barcode reading
ocrTesseract.Configuration.ReadBarCodes = True
' Add PDF
Using imageInput = New OcrPdfInput("pdfWithBarcodes.pdf")
' Perform OCR
Dim ocrResult As OcrResult = ocrTesseract.Read(imageInput)
' Output detected barcodes and text values
Console.WriteLine(ocrResult.Text)
Console.WriteLine(ocrResult.Barcodes(0).Value)
End Using5
计算机视觉 OCR
利用计算机视觉的强大功能,使用我们训练有素的高级模型检测文本。IronOCR 利用 OpenCV 来识别图像中包含文本的区域,尤其有助于识别文档中存在大量噪点和分散文本块的图像!
了解如何:计算机视觉中的OCR 教程(许可证、字幕、发票)using IronOcr;
var ocr = new IronTesseract();
using var input = new OcrInput();
input.LoadImage("sample.png");
// Make sure to also install IronOcr.Extensions.AdvancedScan to use this method
input.FindTextRegion(Scale: 2.0, DilationAmount: 20, Binarize: true, Invert: true);
OcrResult result = ocr.Read(input);
string resultText = result.Text;Imports IronOcr
Dim ocr = New IronTesseract()
Using input = New OcrInput()
input.LoadImage("sample.png")
' Make sure to also install IronOcr.Extensions.AdvancedScan to use this method
input.FindTextRegion(Scale:=2.0, DilationAmount:=20, Binarize:=True, Invert:=True)
Dim result As OcrResult = ocr.Read(input)
Dim resultText As String = result.Text
End Using准备开始了吗?
Nuget Downloads 6,236,385|版本:2026.9刚刚发布