Danish OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Bu belgenin diğer versiyonları:

IronOCR, .NET kodlayıcılarının Danca dahil 126 dilde resimler ve PDF belgeleri üzerinden metin okumasını sağlayan bir C# yazılım bileşenidir.

Bu, özel olarak .NET geliştiricileri için hazırlanmış, Tesseract'ın ileri düzey 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.Danish İçeriği

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

  • Danca
  • DancaEn iyi
  • DancaFast
  • DancaFraktur

İndir

Danca Dil Paketi [dansk]

Kurulum

Yapılması gereken ilk adım, .NET projenize Danca OCR paketini yüklemektir.

Install-Package IronOcr.Languages.Danish

Kod Örneği

Bu C# kod örneği, IronOCR kullanarak bir resim veya PDF belgesinden Danca metni okur.

// Import the IronOcr namespace to access OCR functionalities
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract object, which will handle OCR operations
        var Ocr = new IronTesseract();

        // Set the language for OCR to Danish
        Ocr.Language = OcrLanguage.Danish;

        // Using a 'using' statement to ensure the OcrInput object is disposed of correctly
        using (var Input = new OcrInput(@"images\Danish.png"))
        {
            // Perform OCR on the input image and store the result
            var Result = Ocr.Read(Input);

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

            // Output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace to access OCR functionalities
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract object, which will handle OCR operations
        var Ocr = new IronTesseract();

        // Set the language for OCR to Danish
        Ocr.Language = OcrLanguage.Danish;

        // Using a 'using' statement to ensure the OcrInput object is disposed of correctly
        using (var Input = new OcrInput(@"images\Danish.png"))
        {
            // Perform OCR on the input image and store the result
            var Result = Ocr.Read(Input);

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

            // Output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace to access OCR functionalities
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Initialize the IronTesseract object, which will handle OCR operations
		Dim Ocr = New IronTesseract()

		' Set the language for OCR to Danish
		Ocr.Language = OcrLanguage.Danish

		' Using a 'using' statement to ensure the OcrInput object is disposed of correctly
		Using Input = New OcrInput("images\Danish.png")
			' Perform OCR on the input image and store the result
			Dim Result = Ocr.Read(Input)

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

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

Bu örnek, bir görüntü dosyasından Danca metni okumak için IronOCR'nin nasıl kurulacağını göstermektedir. IronTesseract nesnesi Danca dilini kullanacak şekilde yapılandırılır ve OcrInput ile bir görüntü yüklenir. Ocr.Read OCR işlemini gerçekleştirir ve tanınan metin çıkarılır ve PRINT edilir.