Catalan OCR in C# and .NET
이 문서의 다른 버전:
IronOCR 은 .NET 개발자가 카탈루냐어를 포함한 126개 언어로 된 이미지와 PDF 문서에서 텍스트를 읽을 수 있도록 해주는 C# 소프트웨어 구성 요소입니다.
이는 .NET 개발자 전용으로 제작된 Tesseract의 고급 포크 버전으로, 속도와 정확도 면에서 다른 Tesseract 엔진보다 뛰어난 성능을 보여줍니다.
IronOCR 의 내용.언어.카탈루냐어
이 패키지에는 .NET용 OCR 언어 46개가 포함되어 있습니다.
- 카탈루냐어
- 카탈란베스트
- 카탈란패스트
다운로드
카탈로니아어 언어 팩 [català]
설치
먼저 해야 할 일은 .NET 프로젝트에 카탈루냐어 OCR 패키지를 설치하는 것입니다.
Install-Package IronOcr.Languages.Catalan
코드 예제
이 C# 코드 예제는 이미지 또는 PDF 문서에서 카탈루냐어 텍스트를 읽습니다.
// Import the IronOcr namespace to use its OCR functionality
using IronOcr;
class CatalanOcrExample
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the language for OCR processing to Catalan
Ocr.Language = OcrLanguage.Catalan;
// Define the input image or PDF from which you want to read the text
using (var Input = new OcrInput(@"images\Catalan.png"))
{
// Perform OCR reading on the input
var Result = Ocr.Read(Input);
// Retrieve all recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace to use its OCR functionality
using IronOcr;
class CatalanOcrExample
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the language for OCR processing to Catalan
Ocr.Language = OcrLanguage.Catalan;
// Define the input image or PDF from which you want to read the text
using (var Input = new OcrInput(@"images\Catalan.png"))
{
// Perform OCR reading on the input
var Result = Ocr.Read(Input);
// Retrieve all recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace to use its OCR functionality
Imports IronOcr
Friend Class CatalanOcrExample
Shared Sub Main()
' Create a new instance of the IronTesseract class
Dim Ocr = New IronTesseract()
' Set the language for OCR processing to Catalan
Ocr.Language = OcrLanguage.Catalan
' Define the input image or PDF from which you want to read the text
Using Input = New OcrInput("images\Catalan.png")
' Perform OCR reading on the input
Dim Result = Ocr.Read(Input)
' Retrieve all recognized text
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class
이 코드에서:
- 우리는 OCR 작업을 처리하기 위해
IronTesseract의 인스턴스를 생성합니다. Ocr.Language는 카탈로나어로 지정되어 OCR 엔진이 카탈로나어 언어 모델을 사용하여 이미지를 처리해야 함을 나타냅니다.- 우리는 이미지나 PDF 문서의 파일 경로를 지정하기 위해
OcrInput를 사용합니다. Ocr객체에서Read메서드가 호출되며, OCR 읽기 결과는 변수Result에 저장됩니다.- 마지막으로,
Result.Text는 인식된 텍스트를 포함하며, 이는 콘솔에 출력됩니다.

