Financial OCR in C# and .NET
IronOCR ist eine C#-Softwarekomponente, die es .NET-Programmierern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Finanz, zu lesen.
Es ist eine erweiterte Abspaltung von Tesseract, die exklusiv for .NET-Entwickler entwickelt wurde und regelmäßig andere Tesseract-Engines sowohl in Bezug auf Geschwindigkeit als auch Genauigkeit übertrifft.
Inhalt von IronOcr.Languages.Financial
Dieses Paket enthält 16 OCR-Sprachen for .NET:
- Finanz
Download
Finanzsprache-Paket [Financial]
Installation
Das Erste, was wir tun müssen, ist, unser Finanz OCR-Paket in Ihr .NET-Projekt zu installieren.
Install-Package IronOcr.Languages.Financial
Beispielcode
Dieses C#-Codebeispiel liest finanziellen Text aus einem Bild oder PDF-Dokument.
// Import the IronOcr namespace
using IronOcr;
// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Financial
Ocr.Language = OcrLanguage.Financial;
// Create an OCR input object, specifying the path to the image or PDF
using (var Input = new OcrInput(@"images\Financial.png"))
{
// Perform OCR to read text from the input
var Result = Ocr.Read(Input);
// Retrieve the extracted text
var AllText = Result.Text;
}
// Import the IronOcr namespace
using IronOcr;
// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Financial
Ocr.Language = OcrLanguage.Financial;
// Create an OCR input object, specifying the path to the image or PDF
using (var Input = new OcrInput(@"images\Financial.png"))
{
// Perform OCR to read text from the input
var Result = Ocr.Read(Input);
// Retrieve the extracted text
var AllText = Result.Text;
}
' Import the IronOcr namespace
Imports IronOcr
' Instantiate the IronTesseract OCR engine
Private Ocr = New IronTesseract()
' Set the OCR language to Financial
Ocr.Language = OcrLanguage.Financial
' Create an OCR input object, specifying the path to the image or PDF
Using Input = New OcrInput("images\Financial.png")
' Perform OCR to read text from the input
Dim Result = Ocr.Read(Input)
' Retrieve the extracted text
Dim AllText = Result.Text
End Using
Erklärung:
- Verwendung von IronOcr: Dieser Namensraum enthält alle notwendigen Klassen für den OCR-Prozess.
- IronTesseract Klasse: Dies ist die Hauptklasse, die OCR-Aufgaben ermöglicht.
- Spracheinstellung: Durch die Einstellung der Sprache auf
Financialkann die OCR-Engine Finanzterminologie erkennen. - OcrInput Klasse: Sie nimmt einen Dateipfad, der das zu verarbeitende Bild oder die PDF-Datei angibt.
- Lesemethode: Wird auf
Ocr.Read(Input)ausgeführt, verarbeitet das Bild, um den Text basierend auf den angegebenen Eingabe- und Spracheinstellungen abzurufen. - Result.Text: Es speichert den erkannten Text aus dem Bild oder PDF.

