Danish OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Outras versões deste documento:

O IronOCR é um componente de software C# que permite aos programadores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo o dinamarquês.

Trata-se de uma versão avançada do Tesseract, criada exclusivamente para desenvolvedores .NET , e que supera regularmente outros mecanismos do Tesseract tanto em velocidade quanto em precisão.

Conteúdo do IronOcr.Idiomas.Danish

Este pacote contém 61 linguagens de OCR for .NET:

  • Dinamarquês
  • DanishBest
  • DinamarquêsFast
  • Fraktur Dinamarquês

Baixar

Pacote de idioma dinamarquês [dansk]

Instalação

O primeiro passo é instalar o pacote OCR dinamarquês em seu projeto .NET .

Install-Package IronOcr.Languages.Danish

Exemplo de código

Este exemplo de código C# lê texto dinamarquês de uma imagem ou documento PDF usando o IronOCR.

// 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);
        }
    }
}
$vbLabelText   $csharpLabel

Este exemplo demonstra como configurar o IronOCR para ler texto em dinamarquês a partir de um arquivo de imagem. O objeto IronTesseract está configurado para usar o idioma dinamarquês, e uma imagem é carregada com OcrInput. Ocr.Read realiza o OCR, e o texto reconhecido é extraído e impresso.