Portuguese OCR in C# and .NET
Andere Versionen dieses Dokuments:
IronOCR ist eine C#-Softwarekomponente, die es .NET-Entwicklern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Portugiesisch, zu lesen.
Es ist eine fortschrittliche Abspaltung von Tesseract, die ausschließlich for .NET-Entwickler gebaut wurde und regelmäßig andere Tesseract-Engines sowohl in Geschwindigkeit als auch Genauigkeit übertrifft.
Inhalt von IronOcr.Languages.Portuguese
Dieses Paket enthält 55 OCR-Sprachen for .NET:
- Portugiesisch
- PortugiesischBeste
- PortugueseFast
Download
Portugiesisches Sprachpaket [português]
Installation
Das Erste, was wir tun müssen, ist, unser portugiesisches OCR-Paket in Ihrem .NET-Projekt zu installieren.
Install-Package IronOcr.Languages.Portuguese
Beispielcode
Dieses C#-Beispielcode liest portugiesischen Text aus einem Bild oder PDF-Dokument.
// Required using directive for IronOcr
using IronOcr;
var Ocr = new IronTesseract();
// Specify the language for OCR as Portuguese
Ocr.Language = OcrLanguage.Portuguese;
// Load the image or PDF from which to read the text
using (var Input = new OcrInput(@"images\Portuguese.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
// Required using directive for IronOcr
using IronOcr;
var Ocr = new IronTesseract();
// Specify the language for OCR as Portuguese
Ocr.Language = OcrLanguage.Portuguese;
// Load the image or PDF from which to read the text
using (var Input = new OcrInput(@"images\Portuguese.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
' Required using directive for IronOcr
Imports IronOcr
Private Ocr = New IronTesseract()
' Specify the language for OCR as Portuguese
Ocr.Language = OcrLanguage.Portuguese
' Load the image or PDF from which to read the text
Using Input = New OcrInput("images\Portuguese.png")
' Perform OCR on the input
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text
Dim AllText = Result.Text
' Output the extracted text
Console.WriteLine(AllText)
End Using
Dieser Code demonstriert, wie man die IronOCR-Bibliothek einrichtet und benutzt, um portugiesischen Text aus einem Bild zu lesen. Stellen Sie sicher, dass der Pfad zum Bild oder PDF-Dokument korrekt ist. Der erkannte Text wird in der Variable AllText gespeichert und auf der Konsole ausgegeben.

