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 da dahil olmak üzere 126 dildeki görüntü ve PDF belgelerinden metin okumalarına olanak tanıyan 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.Danish İçeriği

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

  • Danca
  • DancaEnİyi
  • DancaHızlı
  • DancaFraktur

İndirme

Danca Dil Paketi [dansk]

Kurulum

İlk adım, .NET projenize Danish OCR paketini kurmaktır.

Install-Package IronOcr.Languages.Danish

Kod Örneği

Bu C# kod örneği, IronOCR kullanarak bir görüntü veya PDF belgesinden Danca metin 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, IronOCR'i bir resim dosyasindan Danca metin okuyacak sekilde ayarlamayi göstermektedir. IronTesseract nesnesi, Danca dilini kullanacak sekilde konfigure edilmis ve OcrInput ile bir resim yuklenmistir. Ocr.Read OCR'i gerceklestirir ve taninan metin cikartilarak yazdirilir.