跳至頁尾內容
與其他組件的比較

IronOCR與Syncfusion OCR的比較

本文將比較兩種使用光學字元識別 (OCR) 的軟體程式庫,以自動化檢測和提取影像和掃描文件中的印刷文字。 首先,我們將討論兩個程式庫的功能。 接下來,我們將使用兩個程式庫生成的範例源程式碼檢查並比較它們的文字識別和提取功能。 最後,我們將比較這些程式庫的授權和定價。

本文將比較的程式庫有:

  • IronOCR
  • Syncfusion Essential PDF

1. Syncfusion OCR

Syncfusion 的 Essential PDF 程式庫整合了 OCR 功能,以實現對 PDF 文件中掃描影像的圖像文字處理。

Syncfusion 的 OCR 處理器可以與 Tesseract版本3(3.02和3.05)和4一起使用。該程式庫可在 .NET Core 和 ASP.NET 應用程式中使用。

Syncfusion Essential PDF 的 OCR 功能特點包括:

  • 對 PDF 文件執行 OCR 任務。 該程式庫的 OCRProcessor 類可用於對 PDF 檔案執行 OCR。 它基於 Tesseract 資料處理器,該處理器被認為是世界上最好的 OCR 處理器之一。
  • 對 PDF 文件的部分執行 OCR 任務。 使用者可以對 PDF 文件的特定頁面或區域執行 OCR。
  • 對影像執行 OCR 任務。 使用者可以從影像中提取文字資料以匯入其他應用程式。
  • 多語言支持。 谷歌的 Tesseract 引擎(Syncfusion 的擴展)目前支持超過60種語言,並嘗試支持更多語言。
  • 良好的準確性。 通過利用 Google 的 Tesseract 開源引擎,Syncfusion Essential PDF 可以在相當快的時間內實現非常好的文字準確性。

2. IronOCR

IronOCR 是一個 C# 軟體程式庫,允許 .NET 平台的開發者識別和讀取圖片和 PDF 文件中的文字。 它是一個專為 .NET 平台設計的 OCR 程式庫,使用強大的 Tesseract 引擎。Tesseract 版本3-5 可以在 Windows、macOS、Linux、Azure、AWS、Lambda、Mono 和 Xamarin Mac 上直接工作。

IronOCR 支持比任何其他可用的 OCR 引擎更多的語言,支持125種語言(預設僅安裝英語)。

.NET 開發者可以完全控制他們的文件,可以根據需要對其進行修改。

2.1. IronOCR 功能

IronOCR 提供了一種獨特的能力和功能組合,用於整合、簽名、匯出、閱讀圖像和從照片中提取細節,無論使用者的技術背景或硬體複雜程度如何。

2.1.1. 精確度

IronOCR SDK 在準確性方面超過其他 OCR 程式庫,準確率達到99.8%。

2.1.2. 修復低質量掃描和影像

IronOCR 類為 C# 開發者提供了廣泛的控制。 它為開發者提供了 OCR(影像和 PDF 轉換為文字)功能和在每個特定實例中精細調校的性能。

IronOCR 包含的配置選項允許程式庫處理不理想質量的影像。 這些配置包括:清理背景噪音、增強對比度、增強解析度、語言、策略、旋轉和校正、色彩空間、在深色背景上檢測白色文字以及輸入影像型別。

2.1.3. 語言

IronOCR 支持超過125種國際語言。

2.1.4. OCR 文字提取

Iron Tesseract 可以讀取多種影像格式以及 PDF 檔。 此功能在標準免費的 Tesseract 引擎中不可用。 如果您的掃描質量不佳,OCR 輸入允許您自動修復所需的屬性。

2.1.5. 影像優化濾波器

OCRInput 類為 C# 程式設計師提供了對輸入的細緻控制。 隨後,開發者對圖片輸入進行預處理以提高速度和準確性。 這消除了在 OCR 處理之前使用 Photoshop 批處理腳本或 ImageMagick 準備照片的需要。

2.1.6. 影像的 OCR 區域

IronOCR 允許其終端使用者對影像的特定區域進行 OCR。

2.1.7. OCRResult Class

IronOCR為每個使用Tesseract 3、4或5掃描的頁面返回一個先進的結果物件,這包括位置資料、影像、文字、統計信任度、替代符號選擇、字體名稱、字體大小、裝飾、字體粗細以及以下各項的定位資訊:

  • 頁面
  • 段落
  • 文字行
  • 單字
  • 單個字元
  • 條碼

2.1.8. 一個文件中的多種語言

IronOCR 允許開發者在單個文件中使用多種語言。 這個功能對 .NET 服務提供者非常有益。

3. 在 Visual Studio 中啟動新專案

在本文中,我們將使用新的 Visual Studio 控制台應用來演示 IronOCR 和 Syncfusion Essential PDF 的 OCR 處理能力。

打開 Visual Studio 軟體,轉到文件選單,選擇 新專案。 然後,選擇 控制台應用

在相應的文字框中輸入專案名稱並選擇路徑。 接下來按下建立按鈕,然後選擇所需的.NET框架,如下圖所示:

A Comparison Between IronOCR and Syncfusion Essential PDF OCR, Figure 1

Visual Studio 專案現在將生成新的控制台應用的結構。 完成後將打開 program.cs 檔案。

A Comparison Between IronOCR and Syncfusion Essential PDF OCR, Figure 2

我們現在將把這兩個程式庫新增到專案中。

4. 安裝IronOCR程式庫

可以通過四種方式下載並安裝IronOCR程式庫。 這些是:

  1. 使用Visual Studio NuGet Package Manager
  2. 從NuGet網頁面直接下載。
  3. 從IronOCR網頁直接下載。
  4. 使用 Visual Studio 命令列。

4.1. 使用Visual Studio NuGet Manager

可以使用 Visual Studio NuGet Package Manager 在 C# 專案中整合 IronOCR。

通過點擊 工具 > NuGet 套件管理器 > 管理方案的 NuGet 套件... 存取 NuGet Package Manager GUI

A Comparison Between IronOCR and Syncfusion Essential PDF OCR, Figure 3

之後,將出現一個新窗口。 搜索 IronOCR 並在專案中安裝該套件。

A Comparison Between IronOCR and Syncfusion Essential PDF OCR, Figure 4

同樣的方法也可以用來安裝 IronOCR 的其他語言包。

4.2. 從 NuGet 網頁直接下載

可以通過以下說明從NuGet網站直接下載IronOCR:

  1. Navigate to the IronPDF NuGet Gallery Page.
  2. 從右側的選單中選擇下載套件選項。
  3. 雙擊下載的套件。 它將自動安裝。

4.3. 從 IronOCR 網頁直接下載

開發者可以從 IronOCR 網站 下載該程式庫並作為專案參考新增。

按照下面的說明在 Visual Studio 中新增該程式庫作為參考。

  1. 右鍵單擊方案窗口中的專案。
  2. 然後,選擇新增專案參考,並瀏覽下載的參考的位置。
  3. 接下來,點擊確定以新增參考。

4.4. 使用Visual Studio命令行

  1. 在 Visual Studio 中,轉到 工具 > NuGet 套件管理器 > 套件管理器控制台
  2. 在套件管理器控制台標籤中輸入以下內容:
Install-Package IronOcr
A Comparison Between IronOCR and Syncfusion Essential PDF OCR, Figure 5

現在,套件將在當前專案中下載/安裝完畢並準備使用。

A Comparison Between IronOCR and Syncfusion Essential PDF OCR, Figure 6

5. 安裝 Syncfusion Essential PDF OCR 程式庫

Syncfusion Essential PDF 可以通過三種不同的方式安裝。

  1. 使用Visual Studio NuGet Package Manager
  2. 從NuGet網頁面直接下載。
  3. 使用 Visual Studio 命令列。

5.1. 使用Visual Studio NuGet Manager

如同 IronOCR,開發者也可以使用 Visual Studio 的 NuGet 套件管理器安裝 Syncfusion 的 OCR 程式庫。

再次通過點擊 工具 > NuGet 套件管理器 > 管理方案的 NuGet 套件...存取套件管理器。

A Comparison Between IronOCR and Syncfusion Essential PDF OCR, Figure 7

搜索 Syncfusion OCR 並安裝合適的套件(應為 Syncfusion.PDF.OCR.Net.Core)。

A Comparison Between IronOCR and Syncfusion Essential PDF OCR, Figure 8

Syncfusion Essential PDF OCR 的附加語言包可以從GitHub下載。

5.2. 從 NuGet 網頁直接下載

按照這些指示從 NuGet 網站直接下載 Syncfusion Essential PDF OCR:

  1. Navigate to the package's NuGet Gallery page.
  2. 從右側的選單中選擇下載套件選項。
  3. 雙擊下載的套件。 它將自動安裝。
  4. 接下來,重新載入解決方案並開始在專案中使用它。

5.3. 使用 Visual Studio 命令列

  1. 在 Visual Studio 中,轉到 工具 > NuGet 套件管理器 > 套件管理器控制台
  2. 在套件管理器控制台標籤中輸入以下內容:
Install-Package Syncfusion.PDF.OCR.Net.Core -Version 20.2.0.38
A Comparison Between IronOCR and Syncfusion Essential PDF OCR, Figure 9

現在,套件將在當前專案中下載/安裝完畢並準備使用。

6. 對 PDF 文件執行 OCR

IronOCR 和 Syncfusion OCR 都能在 PDF 文件上執行 OCR。 在這裡,我們將討論如何在 Visual Studio 中使用它們。

6.1. 使用 IronOCR 提取 PDF OCR 文字

只需幾行程式碼,開發者就可以對整個 PDF 或特定頁面/部分進行 OCR。 請考慮下面的程式碼片段。

using IronOcr;

var Ocr = new IronTesseract();
using (var Input = new OcrInput())
{
    // Add a PDF document and specify a password if needed
    Input.AddPdf("example.pdf", "password");
    // Read the textual content from the PDF
    var Result = Ocr.Read(Input);
    // Display the text in the console
    Console.WriteLine(Result.Text);
}
using IronOcr;

var Ocr = new IronTesseract();
using (var Input = new OcrInput())
{
    // Add a PDF document and specify a password if needed
    Input.AddPdf("example.pdf", "password");
    // Read the textual content from the PDF
    var Result = Ocr.Read(Input);
    // Display the text in the console
    Console.WriteLine(Result.Text);
}
Imports IronOcr

Private Ocr = New IronTesseract()
Using Input = New OcrInput()
	' Add a PDF document and specify a password if needed
	Input.AddPdf("example.pdf", "password")
	' Read the textual content from the PDF
	Dim Result = Ocr.Read(Input)
	' Display the text in the console
	Console.WriteLine(Result.Text)
End Using
$vbLabelText   $csharpLabel

6.2. 使用 Syncfusion Essential PDF OCR 執行 PDF OCR 文字提取

您可以使用 OCRProcessor 類在 PDF 文件以及文件的區域上執行 OCR。 查看下面的程式碼範例以獲取上下文。

using Syncfusion.OCRProcessor;
using Syncfusion.Pdf.Parsing;

// Initialize the OCR processor
using (OCRProcessor processor = new OCRProcessor(@"TesseractBinaries\"))
{
    // Load the input PDF document
    PdfLoadedDocument lDoc = new PdfLoadedDocument("Input.pdf");
    // Set the OCR language
    processor.Settings.Language = Languages.English;
    // Perform OCR on the loaded PDF
    processor.PerformOCR(lDoc, @"TessData\");
    // Save the processed PDF
    lDoc.Save("Sample.pdf");
    // Close the document
    lDoc.Close(true);
}
using Syncfusion.OCRProcessor;
using Syncfusion.Pdf.Parsing;

// Initialize the OCR processor
using (OCRProcessor processor = new OCRProcessor(@"TesseractBinaries\"))
{
    // Load the input PDF document
    PdfLoadedDocument lDoc = new PdfLoadedDocument("Input.pdf");
    // Set the OCR language
    processor.Settings.Language = Languages.English;
    // Perform OCR on the loaded PDF
    processor.PerformOCR(lDoc, @"TessData\");
    // Save the processed PDF
    lDoc.Save("Sample.pdf");
    // Close the document
    lDoc.Close(true);
}
Imports Syncfusion.OCRProcessor
Imports Syncfusion.Pdf.Parsing

' Initialize the OCR processor
Using processor As New OCRProcessor("TesseractBinaries\")
	' Load the input PDF document
	Dim lDoc As New PdfLoadedDocument("Input.pdf")
	' Set the OCR language
	processor.Settings.Language = Languages.English
	' Perform OCR on the loaded PDF
	processor.PerformOCR(lDoc, "TessData\")
	' Save the processed PDF
	lDoc.Save("Sample.pdf")
	' Close the document
	lDoc.Close(True)
End Using
$vbLabelText   $csharpLabel

7. 對影像執行 OCR

這兩個程式庫都能在 C#.NET 和 .NET Core 應用程式中對影像執行 OCR。

7.1. 使用 IronOCR 執行影像的 OCR

IronOCR 能夠自動檢測並讀取從不完美掃描的影像中提取文字,只需兩行程式碼。

using IronOcr;

// Perform OCR and read text from the specified image
var Result = new IronTesseract().Read(@"images\11111.png").Text;
using IronOcr;

// Perform OCR and read text from the specified image
var Result = new IronTesseract().Read(@"images\11111.png").Text;
Imports IronOcr

' Perform OCR and read text from the specified image
Private Result = (New IronTesseract()).Read("images\11111.png").Text
$vbLabelText   $csharpLabel

OCR 輸入影像

A Comparison Between IronOCR and Syncfusion Essential PDF OCR, Figure 10

OCR OUTPUT from IMAGE
OCR Output
Simple Data Outputs:
» NET Text Strings
» Barcode & QR Data & Images
Structured Data Outputs:
» Pages
» Blocks
» Paragraphs
» Lines
» Words
» Characters
Export Documents:
» Searchable PDFs
» hOCR / HTML Export
» Images of any Page, Text Element or Barcode

7.2. 使用 Syncfusion Essential PDF OCR 處理器對影像執行 OCR

Syncfusion Essential PDF 能夠以非常高的準確度從影像中提取文字。

using System.Drawing;
using Syncfusion.OCRProcessor;

// Initialize the OCR processor
using (OCRProcessor processor = new OCRProcessor(@"TesseractBinaries\"))
{
    // Load the input image
    Bitmap image = new Bitmap("11111.jpeg");
    // Set the OCR language
    processor.Settings.Language = Languages.English;
    // Perform OCR on the loaded image
    string ocrText = processor.PerformOCR(image, @"TessData\");
}
using System.Drawing;
using Syncfusion.OCRProcessor;

// Initialize the OCR processor
using (OCRProcessor processor = new OCRProcessor(@"TesseractBinaries\"))
{
    // Load the input image
    Bitmap image = new Bitmap("11111.jpeg");
    // Set the OCR language
    processor.Settings.Language = Languages.English;
    // Perform OCR on the loaded image
    string ocrText = processor.PerformOCR(image, @"TessData\");
}
Imports System.Drawing
Imports Syncfusion.OCRProcessor

' Initialize the OCR processor
Using processor As New OCRProcessor("TesseractBinaries\")
	' Load the input image
	Dim image As New Bitmap("11111.jpeg")
	' Set the OCR language
	processor.Settings.Language = Languages.English
	' Perform OCR on the loaded image
	Dim ocrText As String = processor.PerformOCR(image, "TessData\")
End Using
$vbLabelText   $csharpLabel

OCR 輸入影像

A Comparison Between IronOCR and Syncfusion Essential PDF OCR, Figure 11

OCR OUTPUT from IMAGE
OCR Output
Simple Data Output:
+ NET Text Strings
Dee eT Nd
tC eke ass
Biren)
Soy
Seg
ors
eae
eed
TLC
eres
Smt d
See amr'
etd ieot

8. 授權

using IronOCR 和 Syncfusion Essential PDF 都需要軟體授權。

8.1. IronOCR 授權

IronOCR 為個人非商業專案提供免費開發授權。

IronOCR 提供商業授權的不同價格結構。 Lite 套件從 $999 開始,無額外成本。 所有授權包括30天退款保證、一年的軟體支援和升級、開發、測試、場景和生產有效性以及永久授權(一次性購買)。 可以從 此頁面了解更多關於 IronOCR 的完整價格結構和授權資訊。

只需一次性支付 $1,599,您便可獲得 SaaS 和 OEM 產品的免版稅再分發。

A Comparison Between IronOCR and Syncfusion Essential PDF OCR, Figure 12

8.2. Syncfusion Essential PDF 授權

Syncfusion Essential PDF 提供三種型別的開發者授權,但不提供 SaaS 和 OEM 覆蓋範圍。

  • 社區授權。 社區授權對於開發人員和最多5名開發者的小公司是免費的。 它還包括即時支援。
  • 零售授權。 零售授權是基於年度的授權,必須為組織中的每個開發人員單獨購買。 零售授權從每年每位開發人員 $995 開始。
  • 無限授權。 此選項以較低的價格在同一年基礎上為整個組織提供授權。

產品授權頁面上查看整個 Syncfusion Essential PDF 的授權結構(以及其他 Syncfusion 組件)。

A Comparison Between IronOCR and Syncfusion Essential PDF OCR, Figure 13

9. 結論

IronOCR 支持約125種全球語言。 其處理能力包括:在 PDF 文件或影像的部分執行 OCR 的能力,從 PDF 和照片中提取文字的能力,以及對質量不佳的圖像進行校正的能力,等等。 IronOCR 以速度和準確性為優先。 它的準確率為99.8%,比市面上其他任何 Tesseract 驅動的 OCR 程式庫都要高。 IronOCR 開箱即用,無需性能調整或影像預處理。

Syncfusion Essential PDF OCR 也使用 Google 開源的 Tesseract 引擎。它能夠在整個文件或文件的特定部分執行 OCR。 Syncfusion 的 OCR 程式庫支持超過60種國際語言。

IronOCR 授權具有終身有效性,提供無限支援和 SaaS 與 OEM 覆蓋範圍。 另一方面,Syncfusion Essential PDF OCR 提供基於年度的授權。 IronOCR 價格從 $999 開始,而 Syncfusion 價格從每年 $995 開始。

通過購買完整的Iron Suite以折扣價格獲得 IronOCR 及其他四種 Iron 軟體產品。 Iron Suite 中捆綁的產品包括:

  1. IronPDF
  2. IronOCR
  3. IronXL
  4. IronBarcode
  5. IronWebScraper

Iron Software 的授權頁面包含上述五種產品的價格和授權的更多詳細資訊。

請注意Syncfusion Essential PDF 是其相關所有者的註冊商標。 本網站與 Syncfusion Essential PDF 無關、未經其認可或資助。 所有產品名稱、標誌和品牌均為其各自所有者的財產。 比較僅供資訊用途,並反映撰寫時獲得的公開資訊。

常見問題

如何使用 C# 對影像進行 OCR?

您可以使用 IronOCR 在 C# 中對影像進行 OCR。它提供從多種影像格式中提取文字的方法,具有高準確性並支持超過 125 種語言。

使用IronOCR進行OCR任務有什麼優勢?

IronOCR 提供卓越的 99.8% 準確率,支持對特定文件區域進行 OCR,具備影像優化功能以應對低品質掃描,並支持多種語言。

IronOCR 與 Syncfusion 的 OCR 功能比較如何?

雖然兩者皆使用 Tesseract 引擎,但 IronOCR 支持更多版本(3-5)及語言(125+),提供更高的準確性及增強的影像校正能力,相較於 Syncfusion 的 OCR。

IronOCR 提供哪些授權選項?

IronOCR 提供免費開發授權供個人使用,商業授權從 1599 美元的一次性費用起,包括永久授權以及 SaaS/OEM 覆蓋。

我可以使用 IronOCR 從掃描的 PDF 文件中提取文字嗎?

是的,IronOCR 可以通過其基於 Tesseract 的 OCR 功能從掃描的 PDF 文件中提取文字,確保高準確性及語言支持。

IronOCR支持哪些平台?

IronOCR 多功能且支持多個平台,包括 Windows、macOS、Linux、Azure、AWS、Lambda、Mono,以及 Xamarin Mac。

IronOCR 如何處理低品質影像的掃描?

IronOCR 包括增強影像品質的功能,例如背景噪音清理、對比度增強和解析度調整,改善低品質影像的 OCR 結果。

IronOCR 是否可以對文件的特定區域進行 OCR?

是的,IronOCR 允許使用者指定文件的特定區域或頁面進行 OCR,提供靈活性及對文字提取過程的控制。

如何將 IronOCR 整合到 .NET 專案中?

IronOCR 可以透過 Visual Studio 的 NuGet 套件管理器、NuGet 網站,或者從 IronOCR 網站下載,整合到 .NET 專案中。

Kannaopat Udonpant
軟體工程師
在成為軟體工程師之前,Kannapat在日本北海道大學完成了環境資源博士學位。在攻讀學位期間,Kannapat還成為車輛機器人實驗室的一員,該實驗室隸屬於生產工程系。在2022年,他憑藉C#技能加入了Iron Software的工程團隊,專注於IronPDF。Kannapat珍視他的工作,因為他能直接向撰寫大部分IronPDF程式碼的開發者學習。除了同儕學習,Kannapat還喜歡在Iron Software工作的社交方面。不寫程式碼或文件時,Kannapat通常在他的PS5上玩遊戲或重看The Last of Us。

Iron 支援團隊

我們線上24小時,每週5天。
聊天
電子郵件
給我打電話