Latin OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET kodlayıcılarının Latin dahil olmak üzere 126 dilde görüntülerden ve PDF belgelerinden metin okumalarına olanak tanıyan bir C# yazılım bileşenidir.
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.Latin İçeriği
Bu paket, .NET için 40 OCR dili içerir:
- Latin
- LatinBest
- LatinFast
İndirme
Latin Dil Paketi [latine]
Kurulum
İlk yapmamız gereken şey, .NET projenize Latin OCR paketimizi yüklemektir.
Install-Package IronOcr.Languages.Latin
Kod Örneği
Bu C# kod örneği, bir görüntü veya PDF belgesinden Latin 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
- Bu örnek,
IronTesseractnesnesini başlatmayı ve OCR dilini Latin olarak ayarlamayı göstermektedir. OcrInput, giriş dosyasını kapsar; bu durumda, Latin metni içeren bir resim.Ocr.Readyöntemi girişi işler ve tanınan metni çıkarabileceğiniz birOcrResultnesnesi döndürür.

