使用 C# 和 .NET 进行泰卢固语 OCR
This article was translated from English: Does it need improvement?
TranslatedView the article in English
Other versions of this document:
IronOCR 是一个 C# 软件组件,允许 .NET 程序员从图像和 PDF 文档中读取 126 种语言(包括泰卢固语)的文本。
它是 Tesseract 的一个高级分支,专为 .NET 开发人员构建,在速度和准确性方面通常优于其他 Tesseract 引擎。
IronOcr.Languages.Telugu 的内容
此软件包包含多个与泰卢固语相关的 .NET OCR 语言模型:
- 泰卢固语
- TeluguBest
- TeluguFast
- 泰卢固语字母
- TeluguAlphabetBest
- TeluguAlphabetFast
下载
泰卢固语语言包[泰卢固语]
安装
第一步是将Telugu OCR 包安装到您的 .NET 项目中。
Install-Package IronOCR.Languages.Telugu
代码示例
这是一个 C# 代码示例,用于从图像或 PDF 文档中读取泰卢固语文本。
// Ensure that you have installed the IronOCR.Languages.Telugu package before running this code.
using IronOcr;
public class TeluguOcrExample
{
public static void Main()
{
// Create a new IronTesseract instance
var Ocr = new IronTesseract();
// Specify the OCR language as Telugu
Ocr.Language = OcrLanguage.Telugu;
// Create a new OcrInput and specify the path to the image or PDF
using (var Input = new OcrInput(@"images\Telugu.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract and store the recognized text
var AllText = Result.Text;
// Output the recognized text to the console (optional)
Console.WriteLine(AllText);
}
}
}// Ensure that you have installed the IronOCR.Languages.Telugu package before running this code.
using IronOcr;
public class TeluguOcrExample
{
public static void Main()
{
// Create a new IronTesseract instance
var Ocr = new IronTesseract();
// Specify the OCR language as Telugu
Ocr.Language = OcrLanguage.Telugu;
// Create a new OcrInput and specify the path to the image or PDF
using (var Input = new OcrInput(@"images\Telugu.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract and store the recognized text
var AllText = Result.Text;
// Output the recognized text to the console (optional)
Console.WriteLine(AllText);
}
}
}' Ensure that you have installed the IronOCR.Languages.Telugu package before running this code.
Imports IronOcr
Public Class TeluguOcrExample
Public Shared Sub Main()
' Create a new IronTesseract instance
Dim Ocr = New IronTesseract()
' Specify the OCR language as Telugu
Ocr.Language = OcrLanguage.Telugu
' Create a new OcrInput and specify the path to the image or PDF
Using Input = New OcrInput("images\Telugu.png")
' Perform OCR on the input file
Dim Result = Ocr.Read(Input)
' Extract and store the recognized text
Dim AllText = Result.Text
' Output the recognized text to the console (optional)
Console.WriteLine(AllText)
End Using
End Sub
End Class$vbLabelText $csharpLabel
这段代码片段使用 IronOCR 包初始化 OCR 引擎,设置 OCR 处理的语言为泰卢固语,并从用户指定的输入图像文件中读取文本。





