Galician OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
이 문서의 다른 버전:

IronOCR는 .NET 개발자가 이미지와 PDF 문서에서 갈리시안을 포함한 126개의 언어로 텍스트를 추출할 수 있게 해주는 C# 소프트웨어 컴포넌트입니다.

이는 .NET 개발자를 위해 특별히 설계된 Tesseract의 고급 분기 버전으로, 속도와 정확성 면에서 다른 Tesseract 엔진을 꾸준히 능가합니다.

IronOcr.Languages.Galician의 내용

이 패키지는 .NET을 위한 49개의 OCR 언어를 포함하고 있습니다, 다음을 포함하여:

  • 갈리시아어
  • 갈리시아어최고
  • 갈리시아어빠름

다운로드

갈리시안 언어 팩 [galego]

설치

갈리시안 OCR 패키지를 .NET 프로젝트에 사용하려면 먼저 설치해야 합니다.

Install-Package IronOcr.Languages.Galician

코드 예제

다음 C# 코드 예제는 이미지나 PDF 문서에서 갈리시안 텍스트를 읽는 방법을 보여줍니다.

// Include the IronOcr library
using IronOcr;

class Program
{
    static void Main()
    {
        // Instantiate the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Specify the language for OCR as Galician
        Ocr.Language = OcrLanguage.Galician;

        // Define the input source, here it is an image file
        using (var Input = new OcrInput(@"images\Galician.png"))
        {
            // Perform the OCR process on the input image
            var Result = Ocr.Read(Input);

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

            // Output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Include the IronOcr library
using IronOcr;

class Program
{
    static void Main()
    {
        // Instantiate the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Specify the language for OCR as Galician
        Ocr.Language = OcrLanguage.Galician;

        // Define the input source, here it is an image file
        using (var Input = new OcrInput(@"images\Galician.png"))
        {
            // Perform the OCR process on the input image
            var Result = Ocr.Read(Input);

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

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

위 코드에서:

  • IronTesseract 클래스를 사용하여 OCR 엔진 객체를 생성합니다.
  • OCR 언어를 갈리시안으로 설정하여 OCR 엔진이 갈리시안 텍스트를 정확하게 처리하도록 합니다.
  • 그런 다음 "images\Galician.png"에 있는 이미지 파일을 읽고 인식된 텍스트를 가져옵니다.
  • 마지막으로 인식된 텍스트를 콘솔에 출력합니다.