Panjabi 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 언어 46개가 포함되어 있습니다.

  • 펀자브어
  • 펀자비베스트
  • 펀자비패스트

다운로드

Panjabi 언어 팩 [ਪਜਾਬੀ]

설치

먼저 .NET 프로젝트에 Panjabi OCR 패키지를 설치해야 합니다.

Install-Package IronOcr.Languages.Panjabi

코드 예제

이 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();

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

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

            // Extract and store the recognized text from the OCR result
            var AllText = Result.Text;
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

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

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

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

            // Extract and store the recognized text from the OCR result
            var AllText = Result.Text;
        }
    }
}
$vbLabelText   $csharpLabel

설명

  • IronTesseract : IronOCR에서 OCR 작업을 위해 제공하는 주요 클래스입니다.
  • Ocr.Language : OCR 엔진이 사용할 언어를 지정합니다. 여기서는 언어가 펀자브어로 설정되어 있습니다.
  • OcrInput : 이 클래스는 OCR을 수행할 입력 파일(이미지 또는 PDF)을 지정하는 데 사용됩니다.
  • Ocr.Read() : 이 메서드는 실제 OCR 작업을 수행하고 추출된 텍스트를 포함하는 결과를 반환합니다.
  • Result.Text : 이 변수에는 입력 파일에 OCR을 수행한 후 추출된 텍스트가 포함됩니다.

이 예제는 .NET 애플리케이션에서 IronOCR 라이브러리를 사용하여 이미지 또는 PDF 문서에서 펀자브어 텍스트를 효과적으로 추출하는 방법을 보여줍니다.