C# 和 .NET 中的克丘亚语 OCR
This article was translated from English: Does it need improvement?
TranslatedView the article in English
IronOCR 是一个 C# 软件组件,允许 .NET 程序员从图像和 PDF 文档中读取 126 种语言(包括克丘亚语)的文本。
它是 Tesseract 的一个高级分支,专为 .NET 开发人员构建,在速度和准确性方面通常优于其他 Tesseract 引擎。
IronOcr.Languages.Quechua 的内容
此软件包包含 46 种适用于 .NET 的 OCR 语言:
克丘亚语
- QuechuaBest
- QuechuaFast
下载
英语语言包[英语] 下载为Zip 文件
- 使用NuGet安装
安装
我们首先需要做的是将我们的Quechua OCR 包安装到您的 .NET 项目中。
Install-Package IronOCR.Languages.Quechua
代码示例
这段 C# 代码示例从图像或 PDF 文档中读取克丘亚语文本。
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Quechua
Ocr.Language = OcrLanguage.Quechua;
// Wrap OCR input within a using statement for resource management
using (var Input = new OcrInput(@"images\Quechua.png"))
{
// Perform OCR read operation on the input image
var Result = Ocr.Read(Input);
// Retrieve the recognized text from the result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Quechua
Ocr.Language = OcrLanguage.Quechua;
// Wrap OCR input within a using statement for resource management
using (var Input = new OcrInput(@"images\Quechua.png"))
{
// Perform OCR read operation on the input image
var Result = Ocr.Read(Input);
// Retrieve the recognized text from the result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the OCR language to Quechua
Ocr.Language = OcrLanguage.Quechua
' Wrap OCR input within a using statement for resource management
Using Input = New OcrInput("images\Quechua.png")
' Perform OCR read operation on the input image
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text from the result
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class$vbLabelText $csharpLabel
代码中添加了注释,以便清晰地说明和理解使用 IronOcr 实现 Quechua OCR 的每个步骤。 确保"images\Quechua.png"指向您系统上已存在的克丘亚语图像文件。





