Polish OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, C# yazılım bileşeni olarak, .NET geliştiricilerine Lehçe dahil 126 dildeki görüntülerden ve PDF belgelerinden metin okuma imkanı tanır. Tesseract'ın geliştirilmiş bir dalıdır, yalnızca .NET geliştiricileri için geliştirilmiştir ve hem hız hem de doğruluk bakımından diğer Tesseract motorlarını düzenli olarak geride bırakır.
IronOcr.Languages.Polish İçeriği
Bu paket, .NET için 43 OCR dilini içerir:
- Lehçe
- LehçeEnIyi
- LehçeHızlı
İndirme
Lehçe Dil Paketi [język polski]:
Kurulum
Yapmanız gereken ilk şey, .NET projenize Lehçe OCR paketini kurmaktır.
NuGet Paket Yöneticisi kullanarak yüklemek için şu komutu çalıştırın:
Install-Package IronOcr.Languages.Polish
Kod Örneği
Bu C# kod örneği, IronOCR kullanarak bir görüntü veya PDF belgesinden Lehçe metin okuma işlemini gösterir.
// 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
Bu betik, OCR motorunu başlatır, dili (Lehçe) belirtir ve "images\Polish.png" adresindeki görüntüyü işleyerek metni çıkartır ve görüntüler. Dosya yolunun doğru olduğundan ve OCR paketinin kodu çalıştırmadan önce yüklendiğinden emin olun.

