Latin 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 sürümleri:

IronOCR, .NET kodlayıcılarının Latin dahil 126 dilde resimlerden ve PDF belgelerinden metin okumasına olanak tanıyan bir C# yazılım bileşenidir.

Bu, Tesseract'ın .NET geliştiricileri için özel olarak oluşturulmuş gelişmiş bir çatalıdır ve hem hız hem de doğruluk açısından diğer Tesseract motorlarından düzenli olarak daha iyi performans gösterir.

IronOcr.Languages.Latin içeriği

Bu paket, .NET için 40 OCR dili içerir:

  • Latince
  • LatinceBest
  • LatinceFast

İndir

Latince Dil Paketi [latine]

Kurulum

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

Install-Package IronOcr.Languages.Latin

Kod Örneği

Bu C# kod örneği, bir görüntüden veya PDF belgesinden Latince metni okur.

// Install the IronOcr.Languages.Latin package via NuGet
using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Latin;

// Create an OCR input object by specifying the image or PDF file path
using (var Input = new OcrInput(@"images\Latin.png"))
{
    // Perform OCR on the input
    var Result = Ocr.Read(Input);
    // Retrieve the recognized text
    var AllText = Result.Text;
    // Log or process the recognized text
}
// Install the IronOcr.Languages.Latin package via NuGet
using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Latin;

// Create an OCR input object by specifying the image or PDF file path
using (var Input = new OcrInput(@"images\Latin.png"))
{
    // Perform OCR on the input
    var Result = Ocr.Read(Input);
    // Retrieve the recognized text
    var AllText = Result.Text;
    // Log or process the recognized text
}
' Install the IronOcr.Languages.Latin package via NuGet
Imports IronOcr

Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Latin

' Create an OCR input object by specifying the image or PDF file path
Using Input = New OcrInput("images\Latin.png")
	' Perform OCR on the input
	Dim Result = Ocr.Read(Input)
	' Retrieve the recognized text
	Dim AllText = Result.Text
	' Log or process the recognized text
End Using
$vbLabelText   $csharpLabel
  • Bu örnek, IronTesseract nesnesinin başlatılmasını ve OCR dilinin Latin olarak ayarlanmasını göstermektedir.
  • OcrInput, giriş dosyasını, bu durumda Latin metni içeren bir görüntüyü kapsar.
  • Ocr.Read yöntemi, girişi işler ve tanınan metni çıkarabileceğiniz bir OcrResult nesnesi döndürür.