Icelandic OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET programcılarının İzlandaca dahil olmak üzere 126 dildeki resimlerden ve PDF belgelerinden metin okumasını sağlayan bir C# yazılım bileşenidir. Bu, .NET geliştiricileri için özel olarak geliştirilmiş Tesseract'ın gelişmiş bir çatallaması olup, hem hız hem de doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakır.
IronOcr.Languages.Icelandic İçeriği
Bu paket, .NET için 52 OCR dili içerir:
- İzlandaca
- IcelandicBest
- IcelandicFast
İndirme
İzlandaca Dil Paketi [Íslenska]
Kurulum
İlk yapmamız gereken şey İzlandaca OCR paketimizi .NET projenize yüklemektir.
Install-Package IronOcr.Languages.Icelandic
Kod Örneği
Bu C# kod örneği, bir resim veya PDF belgesinden İzlandaca metin okur.
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Icelandic
Ocr.Language = OcrLanguage.Icelandic;
// Load the image or PDF file to be processed
using (var Input = new OcrInput(@"images\Icelandic.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Print the extracted text to the console
System.Console.WriteLine(AllText);
}
}
}
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Icelandic
Ocr.Language = OcrLanguage.Icelandic;
// Load the image or PDF file to be processed
using (var Input = new OcrInput(@"images\Icelandic.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Print the extracted text to the console
System.Console.WriteLine(AllText);
}
}
}
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create an instance of the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the language to Icelandic
Ocr.Language = OcrLanguage.Icelandic
' Load the image or PDF file to be processed
Using Input = New OcrInput("images\Icelandic.png")
' Perform OCR on the input file
Dim Result = Ocr.Read(Input)
' Extract all recognized text from the result
Dim AllText = Result.Text
' Print the extracted text to the console
System.Console.WriteLine(AllText)
End Using
End Sub
End Class
Açıklama
IronTesseractsınıfı, OCR işlemlerini gerçekleştirmek için tasarlanmış olan IronOCR kütüphanesinin bir parçasıdır.Ocr.Language = OcrLanguage.Icelandic;OCR dilini İzlandaca olarak ayarlar.OcrInputgiriş dosyasının (bir resim veya PDF) yolunu alır ve işlemler için hazırlar.Ocr.Read(Input)giriş dosyasını işler ve OCR sonucunu döndürür.Result.Textişlenmiş girdiden tanınan tüm metni alır.
Bu örneği başarıyla çalıştırmak için IronOCR kütüphanesini ve İzlandaca dil paketini .NET projenize yüklediğinizden emin olun.

