Welsh 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 언어 세 가지 버전이 포함되어 있습니다.

  • 웨일스어
  • 웨일스 베스트
  • 웨일즈 패스트

다운로드

웨일스어 학습 자료 [Cymraeg]

설치

첫 번째 단계는 .NET 프로젝트에 웨일스어 OCR 패키지를 설치하는 것입니다.

Install-Package IronOcr.Languages.Welsh

코드 예제

이 C# 코드 예제는 이미지 또는 PDF 문서에서 웨일스어 텍스트를 읽는 방법을 보여줍니다.

// Import the IronOcr namespace
using IronOcr;

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

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

        // Read text from the given image
        using (var Input = new OcrInput(@"images\Welsh.png"))
        {
            // Perform OCR and get the result
            var Result = Ocr.Read(Input);

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

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

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

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

        // Read text from the given image
        using (var Input = new OcrInput(@"images\Welsh.png"))
        {
            // Perform OCR and get the result
            var Result = Ocr.Read(Input);

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

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

이 코드에서:

  • OCR 기능에 액세스하려면 IronOcr 네임스페이스를 사용하여 시작합니다.
  • IronOCR에서 OCR 작업을 수행하기 위해 제공하는 주요 클래스인 IronTesseract의 인스턴스를 생성합니다.
  • OCR 언어는 Ocr.Language = OcrLanguage.Welsh를 사용하여 웰시어로 설정됩니다.
  • OCR 처리를 위해 images 디렉토리에 위치한 이름이 Welsh.png인 이미지 파일을 엽니다.
  • 마지막으로, Ocr.Read(Input) 메서드가 이미지에서 텍스트를 읽고, 추출된 텍스트는 AllText에 저장됩니다.
  • 인식된 웨일스어 텍스트가 콘솔에 출력됩니다.