Western Frisian OCR in C# and .NET

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

Mais 126 idiomas

O IronOCR é um componente de software C# que permite aos programadores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo o frísio ocidental.

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

Conteúdo de IronOcr.Idiomas.Frísio Ocidental

Este pacote contém 67 idiomas de OCR for .NET:

  • Frísio Ocidental
  • WesternFrisianBest
  • Jejum Frísio Ocidental

Baixar

Pacote de idiomas Frísio Ocidental [Frysk]

Instalação

A primeira coisa que precisamos fazer é instalar nosso pacote OCR para Frísio Ocidental em seu projeto .NET .

Install-Package IronOcr.Languages.WesternFrisian

Exemplo de código

Este exemplo de código C# lê texto em frísio ocidental a partir de uma imagem ou documento PDF.

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

Neste exemplo, nós:

  • Inicializar o mecanismo de OCR IronTesseract.
  • Configurar o processo de OCR para reconhecer texto em frisão ocidental usando a opção de idioma OcrLanguage.WesternFrisian.
  • Ler um arquivo de imagem localizado no caminho images\WesternFrisian.png.
  • Armazenar o texto reconhecido em AllText e imprimi-lo no console.