Spanish OCR in C# and .NET
Andere Versionen dieses Dokuments:
IronOCR ist eine C#-Softwarekomponente, die .NET-Entwicklern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Spanisch, 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.Spanish
Dieses Paket enthält mehrere OCR-Sprachoptionen for .NET:
- Spanisch
- SpanischBest
- SpanischSchnell
- SpanischAlt
- SpanischAltBest
- SpanischAltSchnell
Download
Spanisches Sprachpaket [español]
Installation
Das erste, was wir tun müssen, ist unser spanisches OCR-Paket in Ihr .NET-Projekt zu installieren.
Install-Package IronOcr.Languages.Spanish
Beispielcode
Dieses C#-Codebeispiel liest Spanischen Text aus einem Bild- oder PDF-Dokument.
// Import the IronOcr namespace
using IronOcr;
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Spanish
Ocr.Language = OcrLanguage.Spanish;
// Use a using block to manage the OcrInput resource
using (var Input = new OcrInput(@"images\Spanish.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all text from the OCR result
var AllText = Result.Text;
// The 'AllText' variable now contains the Spanish text
}
// Import the IronOcr namespace
using IronOcr;
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Spanish
Ocr.Language = OcrLanguage.Spanish;
// Use a using block to manage the OcrInput resource
using (var Input = new OcrInput(@"images\Spanish.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all text from the OCR result
var AllText = Result.Text;
// The 'AllText' variable now contains the Spanish text
}
' Import the IronOcr namespace
Imports IronOcr
' Create a new instance of the IronTesseract class
Private Ocr = New IronTesseract()
' Set the OCR language to Spanish
Ocr.Language = OcrLanguage.Spanish
' Use a using block to manage the OcrInput resource
Using Input = New OcrInput("images\Spanish.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract all text from the OCR result
Dim AllText = Result.Text
' The 'AllText' variable now contains the Spanish text
End Using
Der obige Code demonstriert, wie man die IronOCR Bibliothek verwendet, um spanischen Text aus einer Bilddatei mit dem Namen Spanish.png zu lesen und zu extrahieren. Stellen Sie sicher, dass Sie die notwendigen Namensräume einbeziehen und die Ressourcen gegebenenfalls innerhalb von using-Blöcken angemessen verwalten.

