Western Frisian OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

126 Daha Fazla Dil

IronOCR, .NET kodlayıcılarının 126 dilde, Batı Frizce de dahil olmak üzere, resimlerden ve PDF belgelerinden metin okumasını sağlayan bir C# yazılım bileşenidir.

Tesseract'ın ileri düzey bir çatallamasıdır, yalnızca .NET geliştiricileri için oluşturulmuş olup hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakmaktadır.

IronOcr.Languages.WesternFrisian'in İçeriği

Bu paket, .NET için 67 OCR dilini içerir:

  • WesternFrisian
  • WesternFrisianBest
  • WesternFrisianFast

İndirme

Batı Frizce Dil Paketi [Frysk]

Kurulum

Yapmamız gereken ilk şey, .NET projenize Batı Frizce OCR paketini yüklemektir.

Install-Package IronOcr.Languages.WesternFrisian

Kod Örneği

Bu C# kod örneği, bir resim veya PDF belgesinden Batı Frizce metin okur.

// Import the IronOcr library
using IronOcr;

class WesternFrisianOcrExample
{
    static void Main()
    {
        // Create a new instance of IronTesseract, which is the OCR engine 
        var Ocr = new IronTesseract();

        // Set the language to Western Frisian
        Ocr.Language = OcrLanguage.WesternFrisian;

        // Perform OCR on a given image
        using (var Input = new OcrInput(@"images\WesternFrisian.png"))
        {
            // Read the input image and store the result
            var Result = Ocr.Read(Input);

            // Extract the text from the result
            string AllText = Result.Text;

            // Output the recognized text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr library
using IronOcr;

class WesternFrisianOcrExample
{
    static void Main()
    {
        // Create a new instance of IronTesseract, which is the OCR engine 
        var Ocr = new IronTesseract();

        // Set the language to Western Frisian
        Ocr.Language = OcrLanguage.WesternFrisian;

        // Perform OCR on a given image
        using (var Input = new OcrInput(@"images\WesternFrisian.png"))
        {
            // Read the input image and store the result
            var Result = Ocr.Read(Input);

            // Extract the text from the result
            string AllText = Result.Text;

            // Output the recognized text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr library
Imports IronOcr

Friend Class WesternFrisianOcrExample
	Shared Sub Main()
		' Create a new instance of IronTesseract, which is the OCR engine 
		Dim Ocr = New IronTesseract()

		' Set the language to Western Frisian
		Ocr.Language = OcrLanguage.WesternFrisian

		' Perform OCR on a given image
		Using Input = New OcrInput("images\WesternFrisian.png")
			' Read the input image and store the result
			Dim Result = Ocr.Read(Input)

			' Extract the text from the result
			Dim AllText As String = Result.Text

			' Output the recognized text to the console
			System.Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

Bu örnekte, biz:

  • OCR motorunu IronTesseract ile başlatın.
  • OCR işlemini OcrLanguage.WesternFrisian dil seçeneğini kullanarak Batı Frizce metni tanıyacak şekilde ayarlayın.
  • images\WesternFrisian.png konumundaki resim dosyasını okuyun.
  • Tanınan metni AllText'da depolayın ve konsola yazdırın.