Estonian OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Bu belgenin diğer versiyonları:

IronOCR, Estonca dahil olmak üzere 126 dildeki metinleri görüntülerden ve PDF belgelerinden okuma yeteneğine sahip .NET geliştiricileri için bir C# yazılım bileşenidir. Tesseract'ın ileri düzey bir çatallamasıdır, yalnızca .NET geliştiricileri için oluşturulmuş olup hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakmaktadır.

IronOcr.Languages.Estonian'ın İçeriği

Bu paket, .NET için aşağıdaki OCR dillerini içerir:

  • Estonca
  • EstonianBest
  • EstonianFast

İndirme

Estonca Dil Paketi [eesti]

Kurulum

Yapmamız gereken ilk şey, Estonca OCR paketimizi .NET projenize yüklemektir.

Install-Package IronOcr.Languages.Estonian

Kod Örneği

Bu C# kod örneği, bir görüntü veya PDF belgesinden Estonca metin okur.

// Import the IronOcr namespace
using IronOcr;

// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();

// Set the OCR language to Estonian
Ocr.Language = OcrLanguage.Estonian;

// Load the image or PDF from which text needs to be extracted
using (var Input = new OcrInput(@"images\Estonian.png"))
{
    // Perform OCR to read text from the specified input
    var Result = Ocr.Read(Input);

    // Extract all the recognized text from the OCR result
    var AllText = Result.Text;
}
// Import the IronOcr namespace
using IronOcr;

// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();

// Set the OCR language to Estonian
Ocr.Language = OcrLanguage.Estonian;

// Load the image or PDF from which text needs to be extracted
using (var Input = new OcrInput(@"images\Estonian.png"))
{
    // Perform OCR to read text from the specified input
    var Result = Ocr.Read(Input);

    // Extract all the recognized text from the OCR result
    var AllText = Result.Text;
}
' Import the IronOcr namespace
Imports IronOcr

' Create a new instance of the IronTesseract class
Private Ocr = New IronTesseract()

' Set the OCR language to Estonian
Ocr.Language = OcrLanguage.Estonian

' Load the image or PDF from which text needs to be extracted
Using Input = New OcrInput("images\Estonian.png")
	' Perform OCR to read text from the specified input
	Dim Result = Ocr.Read(Input)

	' Extract all the recognized text from the OCR result
	Dim AllText = Result.Text
End Using
$vbLabelText   $csharpLabel

Kod Açıklaması:

  • IronTesseract: Bu, IronOCR tarafından sunulan OCR işlemlerini gerçekleştirmek için kullanılan birincil sınıftır.
  • Ocr.Language: Bu özelliği ayarlayarak, OCR sırasında hangi dilin kullanılacağını belirleriz. Burada, Estonca'ya ayarlanmıştır.
  • OcrInput: Okumak istediğimiz görüntü veya PDF belgesini belirtmek için kullanılır. Girdi olarak bir dosya yolu alır.
  • Ocr.Read(Input): Bu yöntem, belirtilen girdiyi işler ve üzerinde OCR gerçekleştirir.
  • Result.Text: Bu özellik, görüntü veya PDF belgesinden başarılı bir şekilde tanınan ve çıkarılan tüm metni içerir.