Tamil OCR in C# and .NET
This article was translated from English: Does it need improvement?
Translated
View the article in English
本文檔的其他版本:
IronOCR是一個 C# 軟體元件,允許.NET設計師從圖像和 PDF 文件中讀取 126 種語言(包括泰米爾語)的文字。
它是 Tesseract 的一個高級分支,專為.NET開發人員構建,在速度和準確性方面通常優於其他 Tesseract 引擎。
IronOCR的內容。語言。泰米爾語
此軟體包包含 102 種適用於.NET的 OCR 語言:
- 泰米爾語
- 泰米爾語Best
- 泰米爾語Fast
- 泰米爾字母
- 泰米爾字母Best
- 泰米爾字母Fast
下載
泰米爾語語言包[தமிழ]
安裝
我們首先需要做的就是將我們的泰米爾語OCR 套件安裝到您的.NET專案中。
Install-Package IronOcr.Languages.Tamil
程式碼範例
此 C# 程式碼範例從圖像或 PDF 文件中讀取泰米爾語文字。
// Ensure IronOcr.Languages.Tamil package is installed
using IronOcr;
var Ocr = new IronTesseract();
// Set the language to Tamil for OCR processing
Ocr.Language = OcrLanguage.Tamil;
using (var Input = new OcrInput(@"images\Tamil.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Get the recognized text
var AllText = Result.Text;
// Display the recognized text (for example purpose)
Console.WriteLine(AllText);
}
// Ensure IronOcr.Languages.Tamil package is installed
using IronOcr;
var Ocr = new IronTesseract();
// Set the language to Tamil for OCR processing
Ocr.Language = OcrLanguage.Tamil;
using (var Input = new OcrInput(@"images\Tamil.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Get the recognized text
var AllText = Result.Text;
// Display the recognized text (for example purpose)
Console.WriteLine(AllText);
}
Imports IronOcr
' Ensure IronOcr.Languages.Tamil package is installed
Dim Ocr As New IronTesseract()
' Set the language to Tamil for OCR processing
Ocr.Language = OcrLanguage.Tamil
Using Input As New OcrInput("images\Tamil.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Get the recognized text
Dim AllText = Result.Text
' Display the recognized text (for example purpose)
Console.WriteLine(AllText)
End Using
$vbLabelText
$csharpLabel
IronTesseract類別用於初始化和設定 OCR 引擎。Ocr.Language屬性指定用於 OCR 的語言套件。OcrInput類別與包含泰米爾文字的圖像檔案路徑一起使用。Ocr.Read()方法處理圖像並提取文字。 最後,辨識出的文字儲存在AllText中,可依需求使用。

