Icelandic 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:

IronOCR é um componente de software C# que permite aos programadores .NET ler textos de imagens e documentos PDF em 126 idiomas, incluindo islandê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údos do IronOcr.Languages.Icelandic

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

  • Islandês
  • IcelandicBest
  • IcelandicFast

Baixar

Pacote de idioma islandês [Íslenska]

Instalação

A primeira coisa que temos que fazer é instalar nosso pacote OCR Islandês no seu projeto .NET.

Install-Package IronOcr.Languages.Icelandic

Exemplo de código

Este exemplo de código C# lê texto em islandês de uma imagem ou documento PDF.

using IronOcr;

class Program
{
    static void Main()
    {
        // Create an instance of the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Icelandic
        Ocr.Language = OcrLanguage.Icelandic;

        // Load the image or PDF file to be processed
        using (var Input = new OcrInput(@"images\Icelandic.png"))
        {
            // Perform OCR on the input file
            var Result = Ocr.Read(Input);

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

            // Print the extracted text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
using IronOcr;

class Program
{
    static void Main()
    {
        // Create an instance of the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Icelandic
        Ocr.Language = OcrLanguage.Icelandic;

        // Load the image or PDF file to be processed
        using (var Input = new OcrInput(@"images\Icelandic.png"))
        {
            // Perform OCR on the input file
            var Result = Ocr.Read(Input);

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

            // Print the extracted text to the console
            System.Console.WriteLine(AllText);
        }
    }
}
$vbLabelText   $csharpLabel

Explicação

  • A classe IronTesseract faz parte da biblioteca IronOcr, projetada para realizar operações de OCR.
  • Ocr.Language = OcrLanguage.Icelandic; define o idioma OCR para islandês.
  • OcrInput toma o caminho para o arquivo de entrada (uma imagem ou um PDF) e o prepara para processamento.
  • Ocr.Read(Input) processa o arquivo de entrada e retorna o resultado do OCR.
  • Result.Text recupera todo o texto reconhecido do arquivo de entrada processado.

Certifique-se de ter a biblioteca IronOCR e seu pacote de idioma islandês instalado no seu projeto .NET para executar este exemplo com sucesso.