Spanish OCR in C# and .NET
이 문서의 다른 버전:
IronOCR은 .NET 개발자가 스페인어를 포함한 126개 언어로 된 이미지와 PDF 문서에서 텍스트를 읽을 수 있도록 해주는 C# 소프트웨어 구성 요소입니다.
이는 .NET 개발자 전용으로 개발된 Tesseract의 고급 포크 버전으로, 속도와 정확도 면에서 다른 Tesseract 엔진보다 뛰어난 성능을 보여줍니다.
IronOcr의 내용.언어.스페인어
이 패키지에는 .NET용 OCR 언어 옵션이 여러 개 포함되어 있습니다.
- 스페인어
- 스페인 최고
- 스페인어 빠른
- 스페인어 (옛날 방식)
- 스페인 올드베스트
- 스페인 올드패스트
다운로드
스페인어 학습 팩 [español]
설치
먼저 해야 할 일은 .NET 프로젝트에 스페인어 OCR 패키지를 설치하는 것입니다.
Install-Package IronOcr.Languages.Spanish
코드 예제
이 C# 코드 예제는 이미지 또는 PDF 문서에서 스페인어 텍스트를 읽습니다.
// Import the IronOcr namespace
using IronOcr;
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Spanish
Ocr.Language = OcrLanguage.Spanish;
// Use a using block to manage the OcrInput resource
using (var Input = new OcrInput(@"images\Spanish.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all text from the OCR result
var AllText = Result.Text;
// The 'AllText' variable now contains the Spanish text
}
// Import the IronOcr namespace
using IronOcr;
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Spanish
Ocr.Language = OcrLanguage.Spanish;
// Use a using block to manage the OcrInput resource
using (var Input = new OcrInput(@"images\Spanish.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all text from the OCR result
var AllText = Result.Text;
// The 'AllText' variable now contains the Spanish text
}
' Import the IronOcr namespace
Imports IronOcr
' Create a new instance of the IronTesseract class
Private Ocr = New IronTesseract()
' Set the OCR language to Spanish
Ocr.Language = OcrLanguage.Spanish
' Use a using block to manage the OcrInput resource
Using Input = New OcrInput("images\Spanish.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract all text from the OCR result
Dim AllText = Result.Text
' The 'AllText' variable now contains the Spanish text
End Using
위 코드는 IronOCR 라이브러리를 활용하여 Spanish.png라는 이름의 이미지 파일에서 스페인어 텍스트를 읽고 추출하는 방법을 보여줍니다. 필요한 네임스페이스를 포함하고, 필요한 경우 using 블록 내에서 리소스를 적절하게 처리해야 합니다.

