Sundanese OCR in C# and .NET

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

IronOCR은 .NET 개발자가 순다어를 포함한 126개 언어로 된 이미지와 PDF 문서에서 텍스트를 읽을 수 있도록 해주는 C# 소프트웨어 구성 요소입니다.

이는 .NET 개발자 전용으로 개발된 Tesseract의 고급 포크 버전으로, 속도와 정확도 면에서 다른 Tesseract 엔진보다 뛰어난 성능을 보여줍니다.

IronOcr의 내용.언어.순다어

이 패키지에는 .NET용 OCR 언어 52개가 포함되어 있습니다.

  • 순다족
  • 순다네즈베스트
  • 순다식

다운로드

순다어 언어 팩 [Basa Sunda]

설치

먼저 해야 할 일은 순다어 OCR 패키지를 .NET 프로젝트에 설치하는 것입니다.

Install-Package IronOcr.Languages.Sundanese

코드 예제

이 C# 코드 예제는 이미지 또는 PDF 문서에서 순다어 텍스트를 읽습니다.

// Import the IronOcr namespace
using IronOcr;

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

        // Specify the language the OCR engine should use
        Ocr.Language = OcrLanguage.Sundanese;

        // Initialize the OCR input with an image file containing Sundanese text
        using (var Input = new OcrInput(@"images\Sundanese.png"))
        {
            // Process the input and get the result
            var Result = Ocr.Read(Input);

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

            // Output the recognized text
            System.Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

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

        // Specify the language the OCR engine should use
        Ocr.Language = OcrLanguage.Sundanese;

        // Initialize the OCR input with an image file containing Sundanese text
        using (var Input = new OcrInput(@"images\Sundanese.png"))
        {
            // Process the input and get the result
            var Result = Ocr.Read(Input);

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

            // Output the recognized text
            System.Console.WriteLine(AllText);
        }
    }
}
$vbLabelText   $csharpLabel

설명

  • OCR 기능을 사용하기 위해 먼저 IronOcr 네임스페이스를 가져옵니다.
  • 우리의 주요 OCR 엔진 역할을 하는 IronTesseract 인스턴스를 생성합니다.
  • 엔진이 순다어 텍스트를 읽을 것으로 예상하도록 Language 속성을 OcrLanguage.Sundanese로 설정합니다.
  • OCR 엔진을 위한 이미지 파일 소스를 지정하기 위해 OcrInput 객체를 생성합니다.
  • Read 메서드는 입력을 처리하고 텍스트 인식을 시도합니다.
  • 인식된 텍스트는 AllText 변수에 저장된 후 콘솔에 출력됩니다.

이 설정을 통해 .NET 환경에서 IronOCR 라이브러리를 사용하여 이미지에서 순다어 텍스트를 안정적으로 인식할 수 있습니다.