Polish 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 Polnisch, zu lesen. Es ist eine fortgeschrittene Abzweigung von Tesseract, die exklusiv for .NET-Entwickler entwickelt wurde und regelmäßig andere Tesseract-Engines sowohl in Geschwindigkeit als auch in Genauigkeit übertrifft.
Inhalt von IronOcr.Languages.Polish
Dieses Paket enthält 43 OCR-Sprachen for .NET:
- Polnisch
- PolishBest
- PolishFast
Download
Polnisches Sprachpaket [język polski]:
Installation
Das Erste, was zu tun ist, ist das polnische OCR-Paket in Ihr .NET-Projekt zu installieren.
Um dies mit dem NuGet-Paket-Manager zu installieren, führen Sie den folgenden Befehl aus:
Install-Package IronOcr.Languages.Polish
Beispielcode
Dieses C#-Codebeispiel zeigt, wie man mit IronOCR polnischen Text aus einem Bild oder einem PDF-Dokument liest.
// Install the IronOcr.Languages.Polish package via NuGet before using this code.
using IronOcr;
public class PolishOcrExample
{
public void ReadPolishTextFromImage()
{
// Initialize the IronTesseract object
var Ocr = new IronTesseract();
// Set the language to Polish
Ocr.Language = OcrLanguage.Polish;
// Provide the path to the image or PDF file containing Polish text
using (var Input = new OcrInput(@"images\Polish.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Display or process the recognized text
Console.WriteLine(AllText);
}
}
}
// Install the IronOcr.Languages.Polish package via NuGet before using this code.
using IronOcr;
public class PolishOcrExample
{
public void ReadPolishTextFromImage()
{
// Initialize the IronTesseract object
var Ocr = new IronTesseract();
// Set the language to Polish
Ocr.Language = OcrLanguage.Polish;
// Provide the path to the image or PDF file containing Polish text
using (var Input = new OcrInput(@"images\Polish.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Display or process the recognized text
Console.WriteLine(AllText);
}
}
}
' Install the IronOcr.Languages.Polish package via NuGet before using this code.
Imports IronOcr
Public Class PolishOcrExample
Public Sub ReadPolishTextFromImage()
' Initialize the IronTesseract object
Dim Ocr = New IronTesseract()
' Set the language to Polish
Ocr.Language = OcrLanguage.Polish
' Provide the path to the image or PDF file containing Polish text
Using Input = New OcrInput("images\Polish.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Display or process the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class
Dieses Skript initialisiert die OCR-Engine, legt die Sprache fest (Polnisch) und verarbeitet das Bild, das sich auf "images\Polish.png" befindet, um den Text zu extrahieren und anzuzeigen. Stellen Sie sicher, dass der Dateipfad korrekt ist und dass das OCR-Paket vor dem Ausführen des Codes installiert ist.

