Latin OCR in C# and .NET
이 문서의 다른 버전:
IronOCR은 126개의 언어를 포함하여 라틴어로 이미지와 PDF 문서에서 텍스트를 읽을 수 있는 .NET 개발자용 C# 소프트웨어 구성 요소입니다.
이는 .NET 개발자 전용으로 개발된 Tesseract의 고급 포크 버전으로, 속도와 정확도 면에서 다른 Tesseract 엔진보다 뛰어난 성능을 보여줍니다.
IronOcr.Languages.Latin의 내용
이 패키지에는 .NET 용 OCR 언어 40개가 포함되어 있습니다.
- Latin
- LatinBest
- LatinFast
다운로드
라틴어 언어 팩 [latine]
설치
우리가 해야 할 첫 번째 일은 .NET 프로젝트에 Latin OCR 패키지를 설치하는 것입니다.
Install-Package IronOcr.Languages.Latin
코드 예제
이 C# 코드 예제는 이미지 또는 PDF 문서에서 라틴어 텍스트를 읽습니다.
// Install the IronOcr.Languages.Latin package via NuGet
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Latin;
// Create an OCR input object by specifying the image or PDF file path
using (var Input = new OcrInput(@"images\Latin.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Log or process the recognized text
}
// Install the IronOcr.Languages.Latin package via NuGet
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Latin;
// Create an OCR input object by specifying the image or PDF file path
using (var Input = new OcrInput(@"images\Latin.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Log or process the recognized text
}
' Install the IronOcr.Languages.Latin package via NuGet
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Latin
' Create an OCR input object by specifying the image or PDF file path
Using Input = New OcrInput("images\Latin.png")
' Perform OCR on the input
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text
Dim AllText = Result.Text
' Log or process the recognized text
End Using
- 이 예제는
IronTesseract객체를 초기화하고 OCR 언어를 라틴어로 설정하는 방법을 보여줍니다. OcrInput은(는) 입력 파일을 캡슐화하며, 이 경우 라틴어 텍스트가 포함된 이미지를 나타냅니다.Ocr.Read메서드는 입력을 처리하고 인식된 텍스트를 추출할 수 있는OcrResult객체를 반환합니다.

