Tigrinya OCR in C# and .NET
IronOCR, Tigrinya dahil olmak üzere 126 dilde resimlerden ve PDF belgelerinden metin okuyan bir C# yazılım bileşenidir. Tesseract'ın, yalnızca .NET geliştiricileri için özel olarak oluşturulmuş gelişmiş bir dalıdır ve hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakır.
IronOcr.Languages.Tigrinya İçeği
Bu paket, .NET için 49 OCR dilini içerir:
- Tigrinya
- TigrinyaEn İyi
- TigrinyaHızlı
İndir
Tigrinya Dil Paketi [ትግርኛ]
Kurulum
İlk yapmamız gereken şey, .NET projenize Tigrinya OCR paketini yüklemek.
Install-Package IronOcr.Languages.Tigrinya
Kod Örneği
Bu C# kod örneği, bir resim veya PDF belgesinden Tigrinya metni okur.
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract to perform OCR
var Ocr = new IronTesseract();
// Set the OCR language to Tigrinya
Ocr.Language = OcrLanguage.Tigrinya;
// Using statement ensures the OcrInput object is disposed of after use
using (var Input = new OcrInput(@"images\Tigrinya.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all text recognized in the image and store it in a variable
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
}
}
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract to perform OCR
var Ocr = new IronTesseract();
// Set the OCR language to Tigrinya
Ocr.Language = OcrLanguage.Tigrinya;
// Using statement ensures the OcrInput object is disposed of after use
using (var Input = new OcrInput(@"images\Tigrinya.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all text recognized in the image and store it in a variable
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
}
}
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of IronTesseract to perform OCR
Dim Ocr = New IronTesseract()
' Set the OCR language to Tigrinya
Ocr.Language = OcrLanguage.Tigrinya
' Using statement ensures the OcrInput object is disposed of after use
Using Input = New OcrInput("images\Tigrinya.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract all text recognized in the image and store it in a variable
Dim AllText = Result.Text
' Output the extracted text
Console.WriteLine(AllText)
End Using
End Sub
End Class
Açıklama
- IronTesseract: Metin tanıma işlemini gerçekleştirmek için IronOCR'dan özel bir sınıftır.
- Ocr.Language: OCR motoru tarafından kullanılacak dili ayarlar. Bu örnek için Tigrinya olarak ayarlanmıştır.
- OcrInput: Bu durumda, metne dönüştürülecek giriş kaynağını, bir resmi temsil eder.
- Ocr.Read(Input): Belirtilen giriş üzerinde OCR işlemi yapar ve sonuçları döndürür.
- Sonuç.Metin: OCR işlemi sonrası giriş resminden çıkarılan metni içerir.
- Console.WriteLine(AllText): Çıkarılan metni konsola çıktılar. Bu satır isteğe bağlıdır ve konsol çıktısına ihtiyaç duyulmuyorsa kaldırılabilir.

