Danish OCR in C# and .NET
이 문서의 다른 버전:
IronOCR 은 .NET 개발자가 덴마크어를 포함한 126개 언어로 된 이미지와 PDF 문서에서 텍스트를 읽을 수 있도록 해주는 C# 소프트웨어 구성 요소입니다.
이는 .NET 개발자 전용으로 제작된 Tesseract의 고급 포크 버전으로, 속도와 정확도 면에서 다른 Tesseract 엔진보다 뛰어난 성능을 보여줍니다.
IronOCR 의 내용.언어.덴마크어
이 패키지에는 .NET용 OCR 언어 61개가 포함되어 있습니다.
- 덴마크어
- 데니쉬베스트
- 덴마크 패스트푸드
- DanishFraktur
다운로드
덴마크어 학습 팩 [dansk]
설치
첫 번째 단계는 .NET 프로젝트에 덴마크어 OCR 패키지를 설치하는 것입니다.
Install-Package IronOcr.Languages.Danish
코드 예제
이 C# 코드 예제는 IronOCR 사용하여 이미지 또는 PDF 문서에서 덴마크어 텍스트를 읽습니다.
// Import the IronOcr namespace to access OCR functionalities
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract object, which will handle OCR operations
var Ocr = new IronTesseract();
// Set the language for OCR to Danish
Ocr.Language = OcrLanguage.Danish;
// Using a 'using' statement to ensure the OcrInput object is disposed of correctly
using (var Input = new OcrInput(@"images\Danish.png"))
{
// Perform OCR on the input image and store the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the result
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace to access OCR functionalities
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract object, which will handle OCR operations
var Ocr = new IronTesseract();
// Set the language for OCR to Danish
Ocr.Language = OcrLanguage.Danish;
// Using a 'using' statement to ensure the OcrInput object is disposed of correctly
using (var Input = new OcrInput(@"images\Danish.png"))
{
// Perform OCR on the input image and store the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the result
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace to access OCR functionalities
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize the IronTesseract object, which will handle OCR operations
Dim Ocr = New IronTesseract()
' Set the language for OCR to Danish
Ocr.Language = OcrLanguage.Danish
' Using a 'using' statement to ensure the OcrInput object is disposed of correctly
Using Input = New OcrInput("images\Danish.png")
' Perform OCR on the input image and store the result
Dim Result = Ocr.Read(Input)
' Extract the recognized text from the result
Dim AllText = Result.Text
' Output the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
이 예제는 IronOCR을 설정하여 이미지 파일에서 덴마크어 텍스트를 읽는 방법을 보여줍니다. IronTesseract 객체는 덴마크어를 사용하도록 구성되어 있으며, OcrInput으로 이미지를 로드합니다. Ocr.Read는 OCR을 수행하고 인식된 텍스트를 추출하여 출력합니다.

