Galician OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET geliştiricilerinin 126 dil, Galiçyaca dahil, içerisinden resimler ve PDF belgelerinden metin çıkarmalarını sağlayan bir C# yazılım bileşenidir.
Özellikle .NET geliştiricileri için tasarlanmış gelişmiş bir Tesseract çatallaması olup hız ve doğruluk açısından diğer Tesseract motorlarını sürekli olarak geride bırakır.
IronOcr.Languages.Galician İçeriği
Bu paket, .NET için 49 OCR dilini içerir, bunlar arasında:
- Galiçyaca
- GaliçyacaBest
- GaliçyacaFast
İndir
Galiçyaca Dil Paketi [galego]
Kurulum
Galician OCR paketini .NET projenizde kullanmak için ilk adım olarak yüklemelisiniz.
Install-Package IronOcr.Languages.Galician
Kod Örneği
Aşağıdaki C# kod örneği, bir resim veya PDF belgesinden Galiçyaca metin okumanın nasıl yapılacağını göstermektedir.
// Include the IronOcr library
using IronOcr;
class Program
{
static void Main()
{
// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Specify the language for OCR as Galician
Ocr.Language = OcrLanguage.Galician;
// Define the input source, here it is an image file
using (var Input = new OcrInput(@"images\Galician.png"))
{
// Perform the OCR process on the input image
var Result = Ocr.Read(Input);
// Retrieve the recognized text from the OCR result
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}
// Include the IronOcr library
using IronOcr;
class Program
{
static void Main()
{
// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Specify the language for OCR as Galician
Ocr.Language = OcrLanguage.Galician;
// Define the input source, here it is an image file
using (var Input = new OcrInput(@"images\Galician.png"))
{
// Perform the OCR process on the input image
var Result = Ocr.Read(Input);
// Retrieve the recognized text from the OCR result
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}
' Include the IronOcr library
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Instantiate the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Specify the language for OCR as Galician
Ocr.Language = OcrLanguage.Galician
' Define the input source, here it is an image file
Using Input = New OcrInput("images\Galician.png")
' Perform the OCR process on the input image
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text from the OCR result
Dim AllText = Result.Text
' Output the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
Yukarıdaki kodda:
- OCR motoru nesnesi oluşturmak için IronTesseract sınıfını kullanıyoruz.
- OCR dilini Galiçyaca olarak ayarladık; bu, OCR motorunun Galiçyaca metni doğru bir şekilde işlemesini sağlar.
- Daha sonra 'images\Galician.png' konumundaki görüntü dosyasını okuyarak tanınan metni alıyoruz.
- Son olarak, tanınan metni konsola yazdırıyoruz.

