跳過到頁腳內容

開始使用 OCR for Azure

C# + VB.NET: 國際語言 國際語言
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();

ocrTesseract.Language = OcrLanguage.Arabic;

using (var ocrInput = new OcrInput())
{
    ocrInput.LoadImage(@"images\arabic.gif");
    var ocrResult = ocrTesseract.Read(ocrInput);
    Console.WriteLine(ocrResult.Text);
}

// Example with a Custom Trained Font Being used:

var ocrTesseractCustomerLang = new IronTesseract();
ocrTesseractCustomerLang.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");
ocrTesseractCustomerLang.AddSecondaryLanguage(OcrLanguage.EnglishBest);

using (var ocrInput = new OcrInput())
{
    ocrInput.LoadPdf(@"images\mixed-lang.pdf");
    var ocrResult = ocrTesseractCustomerLang.Read(ocrInput);
    Console.WriteLine(ocrResult.Text);
}
Imports IronOcr
Imports System

Private ocrTesseract = New IronTesseract()

ocrTesseract.Language = OcrLanguage.Arabic

Using ocrInput As New OcrInput()
	ocrInput.LoadImage("images\arabic.gif")
	Dim ocrResult = ocrTesseract.Read(ocrInput)
	Console.WriteLine(ocrResult.Text)
End Using

' Example with a Custom Trained Font Being used:

Dim ocrTesseractCustomerLang = New IronTesseract()
ocrTesseractCustomerLang.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata")
ocrTesseractCustomerLang.AddSecondaryLanguage(OcrLanguage.EnglishBest)

Using ocrInput As New OcrInput()
	ocrInput.LoadPdf("images\mixed-lang.pdf")
	Dim ocrResult = ocrTesseractCustomerLang.Read(ocrInput)
	Console.WriteLine(ocrResult.Text)
End Using
Install-Package IronOcr

IronOCR 語言支持

IronOCR 支援 125 種國際語言。 除了預設安裝的英文之外,還可以透過 NuGet 將其他語言套件新增至您的 .NET 專案中,或從我們的語言頁面下載其他語言套件。

大多數語言都提供快速、標準(建議)和最佳品質三種版本。 最佳品質選項可能提供更準確的結果,但處理時間也會更慢。

使用 IronOCR 探索多種語言的 OCR 技術。

C# + VB.NET: 結果物件 結果物件
using IronOcr;
using IronSoftware.Drawing;

// We can delve deep into OCR results as an object model of
// Pages, Barcodes, Paragraphs, Lines, Words and Characters
// This allows us to explore, export and draw OCR content using other APIs/
var ocrTesseract = new IronTesseract();

ocrTesseract.Configuration.ReadBarCodes = true;

using var ocrInput = new OcrInput();
var pages = new int[] { 1, 2 };
ocrInput.LoadImageFrames("example.tiff", pages);

OcrResult ocrResult = ocrTesseract.Read(ocrInput);
foreach (var page in ocrResult.Pages)
{
    // Page object
    int PageNumber = page.PageNumber;
    string PageText = page.Text;
    int PageWordCount = page.WordCount;
    // null if we dont set Ocr.Configuration.ReadBarCodes = true;
    OcrResult.Barcode[] Barcodes = page.Barcodes;
    AnyBitmap PageImage = page.ToBitmap(ocrInput);
    double PageWidth = page.Width;
    double PageHeight = page.Height;
    double PageRotation = page.Rotation; // angular correction in degrees from OcrInput.Deskew()

    foreach (var paragraph in page.Paragraphs)
    {
        // Pages -> Paragraphs
        int ParagraphNumber = paragraph.ParagraphNumber;
        string ParagraphText = paragraph.Text;
        AnyBitmap ParagraphImage = paragraph.ToBitmap(ocrInput);
        int ParagraphX_location = paragraph.X;
        int ParagraphY_location = paragraph.Y;
        int ParagraphWidth = paragraph.Width;
        int ParagraphHeight = paragraph.Height;
        double ParagraphOcrAccuracy = paragraph.Confidence;
        OcrResult.TextFlow paragrapthText_direction = paragraph.TextDirection;
        foreach (var line in paragraph.Lines)
        {
            // Pages -> Paragraphs -> Lines
            int LineNumber = line.LineNumber;
            string LineText = line.Text;
            AnyBitmap LineImage = line.ToBitmap(ocrInput);
            int LineX_location = line.X;
            int LineY_location = line.Y;
            int LineWidth = line.Width;
            int LineHeight = line.Height;
            double LineOcrAccuracy = line.Confidence;
            double LineSkew = line.BaselineAngle;
            double LineOffset = line.BaselineOffset;
            foreach (var word in line.Words)
            {
                // Pages -> Paragraphs -> Lines -> Words
                int WordNumber = word.WordNumber;
                string WordText = word.Text;
                AnyBitmap WordImage = word.ToBitmap(ocrInput);
                int WordX_location = word.X;
                int WordY_location = word.Y;
                int WordWidth = word.Width;
                int WordHeight = word.Height;
                double WordOcrAccuracy = word.Confidence;
                foreach (var character in word.Characters)
                {
                    // Pages -> Paragraphs -> Lines -> Words -> Characters
                    int CharacterNumber = character.CharacterNumber;
                    string CharacterText = character.Text;
                    AnyBitmap CharacterImage = character.ToBitmap(ocrInput);
                    int CharacterX_location = character.X;
                    int CharacterY_location = character.Y;
                    int CharacterWidth = character.Width;
                    int CharacterHeight = character.Height;
                    double CharacterOcrAccuracy = character.Confidence;
                    // Output alternative symbols choices and their probability.
                    // Very useful for spellchecking
                    OcrResult.Choice[] Choices = character.Choices;
                }
            }
        }
    }
}
Imports IronOcr
Imports IronSoftware.Drawing

' We can delve deep into OCR results as an object model of
' Pages, Barcodes, Paragraphs, Lines, Words and Characters
' This allows us to explore, export and draw OCR content using other APIs/
Private ocrTesseract = New IronTesseract()

ocrTesseract.Configuration.ReadBarCodes = True

Dim ocrInput As New OcrInput()
Dim pages = New Integer() { 1, 2 }
ocrInput.LoadImageFrames("example.tiff", pages)

Dim ocrResult As OcrResult = ocrTesseract.Read(ocrInput)
For Each page In ocrResult.Pages
	' Page object
	Dim PageNumber As Integer = page.PageNumber
	Dim PageText As String = page.Text
	Dim PageWordCount As Integer = page.WordCount
	' null if we dont set Ocr.Configuration.ReadBarCodes = true;
	Dim Barcodes() As OcrResult.Barcode = page.Barcodes
	Dim PageImage As AnyBitmap = page.ToBitmap(ocrInput)
	Dim PageWidth As Double = page.Width
	Dim PageHeight As Double = page.Height
	Dim PageRotation As Double = page.Rotation ' angular correction in degrees from OcrInput.Deskew()

	For Each paragraph In page.Paragraphs
		' Pages -> Paragraphs
		Dim ParagraphNumber As Integer = paragraph.ParagraphNumber
		Dim ParagraphText As String = paragraph.Text
		Dim ParagraphImage As AnyBitmap = paragraph.ToBitmap(ocrInput)
		Dim ParagraphX_location As Integer = paragraph.X
		Dim ParagraphY_location As Integer = paragraph.Y
		Dim ParagraphWidth As Integer = paragraph.Width
		Dim ParagraphHeight As Integer = paragraph.Height
		Dim ParagraphOcrAccuracy As Double = paragraph.Confidence
		Dim paragrapthText_direction As OcrResult.TextFlow = paragraph.TextDirection
		For Each line In paragraph.Lines
			' Pages -> Paragraphs -> Lines
			Dim LineNumber As Integer = line.LineNumber
			Dim LineText As String = line.Text
			Dim LineImage As AnyBitmap = line.ToBitmap(ocrInput)
			Dim LineX_location As Integer = line.X
			Dim LineY_location As Integer = line.Y
			Dim LineWidth As Integer = line.Width
			Dim LineHeight As Integer = line.Height
			Dim LineOcrAccuracy As Double = line.Confidence
			Dim LineSkew As Double = line.BaselineAngle
			Dim LineOffset As Double = line.BaselineOffset
			For Each word In line.Words
				' Pages -> Paragraphs -> Lines -> Words
				Dim WordNumber As Integer = word.WordNumber
				Dim WordText As String = word.Text
				Dim WordImage As AnyBitmap = word.ToBitmap(ocrInput)
				Dim WordX_location As Integer = word.X
				Dim WordY_location As Integer = word.Y
				Dim WordWidth As Integer = word.Width
				Dim WordHeight As Integer = word.Height
				Dim WordOcrAccuracy As Double = word.Confidence
				For Each character In word.Characters
					' Pages -> Paragraphs -> Lines -> Words -> Characters
					Dim CharacterNumber As Integer = character.CharacterNumber
					Dim CharacterText As String = character.Text
					Dim CharacterImage As AnyBitmap = character.ToBitmap(ocrInput)
					Dim CharacterX_location As Integer = character.X
					Dim CharacterY_location As Integer = character.Y
					Dim CharacterWidth As Integer = character.Width
					Dim CharacterHeight As Integer = character.Height
					Dim CharacterOcrAccuracy As Double = character.Confidence
					' Output alternative symbols choices and their probability.
					' Very useful for spellchecking
					Dim Choices() As OcrResult.Choice = character.Choices
				Next character
			Next word
		Next line
	Next paragraph
Next page
Install-Package IronOcr

IronOCR 使用 Tesseract 5 掃描每一頁,並傳回一個進階結果物件。 這包含位置資料、圖像、文字、統計置信度、替代符號、字體名稱、字號裝飾、字體粗細以及每個元素的位置

  • 段落
  • 文字行
  • 單字 個人特質 條碼

探索如何使用 IronOCR 讀取 OCR 結果

Human Support related to Azure OCR API

由我們的開發團隊直接提供人力支援

無論是產品、整合或 License 方面的疑問,Iron 產品開發團隊都能隨時支援您的所有問題。請與 Iron 聯絡並展開對話,讓我們的函式庫在您的專案中發揮最大效用。

提出問題
Image To Text related to Azure OCR API

.NET 中 Azure 的 OCR 閱讀引擎

您的 Microsoft Azure OCR 解決方案可處理不完整的影像

不論是護照頁、發票、銀行對帳單、信件、名片或收據;光學字元辨識 (OCR) 是一個以模式識別、電腦視覺和機器學習為基礎的研究領域。

除了建立其他成功案例之外,IronOCR 還為 Google Tube 增加價值。IronOCR 為 Google Tesseract 和 Microsoft 2021 Azure Cognitive Services 增添了 IronOCR 的價值 - 一個原生的 C# OCR 函式庫。

如果您希望以 99% 的準確度轉換真實世界中的圖片 - 那麼請繼續閱讀,瞭解 IronOCR 如何讓您建立一個有效率、準確、可擴充且幾近人性化的光學字元識別應用程式。

IronOCR 是具有市場競爭力與領先市場的光學字元識別之間的差異

由於不同的 API 對於保護所宣稱的巨大信心,光學字元識別 (OCR) 被認為是一種已解決的現象。然而,各種產品往往僵化且不準確,以致於在實際應用中失敗。

Sounds good?

Only the real world does not always have perfectly printed and handritten text with high-resolution.IronOCR 可以處理所有數位瑕疵,包括從影像檔中擷取手寫文字。我們確保 99.8 - 100% 準確、可搜尋的文件,並提供跨平台支援,包括 Windows、Linux、macOS、Microsoft Azure、AWS 和 Docker - C# 開發人員選擇 IronOCR 而非 (基本) Tesseract OCR 是有原因的 - 這一切都是為了增加價值。

Equip yourself with the best!

除了上述功能,IronOCR 還能讓您及時處理影像文件。如果這還不是全部,IronOCR API 功能還包括以下幾點:

  • 透過 OCR 擷取幾乎所有檔案、圖片或 PDF 上的列印文字,精確度極高,速度快如閃電
  • 文字擷取 PDF 與圖片轉換成可搜尋的文件,並具有完美的視覺與空間表現
  • 不需要 exes 或 C++ 程式碼
  • 完整的 PDF OCR 支援
  • 相容於 MVC、WebApp、Desktop、Console 與 Server 應用程式
  • 完整的 .NET OCR 支援。支援 .NET Core、Standard 及 FrameWork
  • 使用 C# & VB .NET 閱讀。
  • 將 OCR 匯出至 XHTML
  • 支援多執行緒
  • 支援 125 種國際語言 - 即用型語言套件與自訂建置
  • 擷取影像、座標、統計資料、字型等
  • 將 Tesseract OCR 重新分配至商業與專屬應用程式內
  • 本機執行、無需 SaaS
  • Microsoft Cognitive Services 的 OCR 服務的絕佳替代方案

幾乎無限制的功能 - IronOCR 是數位工作區的「光學字元辨識 OCR 工具」

從本機的 .NET 檔案轉換至 IronOCR。dlls 或 exes 安裝轉換為單一真實資料來源 - 使用單一、原生的 .NET 元件庫開發,使用簡單的 C# API 支援:

  • .NET Framework 4.5 及以上版本
  • .NET Standard 2.0 及以上版本 (包括 3.x & .NET 5 Beta)
  • .
  • .NET Core 2.0 及以上版本 (包括 3.x 和 .NET 5 Beta)
  • .NET 5
  • Xamarin for macOS

IronOCR API 的藝術並未就此結束;您可以繼續進一步探索我們的技術優勢 功能。我們透過開發可靠的解決方案來簡化文件處理應用程式,並透過提供業界領先的功能來最大化業務收益,從而一步一步地降低業務複雜性。.NET OCR API 功能

  • 本地 OCR 操作,無雲端意味著更多安全性
  • 創建優化的低品質、嘈雜和失真的掃描資源
  • 讀取 PDF、多頁 TIFF 檔案
  • 可將任何 OCR Scan 樣本儲存為 PDF 文件或 XHTML,以供使用者搜尋
  • 純文字、Barcode 資料,以及包含段落、行、單字和字元的 OCR 結果類別
  • IronOCR API Edge:滿足電腦視覺?

    我們的光學字元識別流程從自動化影像預處理開始,以增強可提高擷取回應率的影像檔案。IronOCR 可讓使用者將範例基礎影像檔案擷取成本身的最佳版本,為您的工作增值。IronOCR 涵蓋了所有基礎:

    解析度增強

    由於 IronOCR 服務最適用於 300DPI (Dots Per Inch) 影像檔案,任何明顯超出 200-300 DPI 的影像都會重新取樣,以符合目標範圍。

    這表示將 600 DPI 的影像向下取樣至 300 DPI,或將 100 DPI 的影像向上取樣至 200 DPI,置信度高達 99%。

    二值化

    由於 IronOCR 認知服務專為單色影像而設計,因此任何彩色或灰階影像都會利用自適應二值化演算法轉換為單色影像。

    該演算法會比較某個區域內的像素密度,以決定將像素轉換為單色所使用的臨界值。

    自動旋轉與偏斜校正

    IronOCR 會尋找文字行和文字樣式,以自動偏斜校正輸入的影像資源,並將其旋轉為所需的方向。

    適應性雜訊移除

    使用 IronOCR,影像檔案會自動分析雜訊的存在與數量。雜訊基本上是在掃描影像上發現的 「斑點」。

    當樣本影像檔案經過預先處理後,IronOCR 即會將輸入的影像檔案分割成不同的處理區域。

    分區

    另一個預先準備階段是將參考影像分割成不同的邏輯區域。IronOCR 首先會借助空白和圖案來定位影像中的文字和圖片;文字區域會從影像中分離出來。

    然後,影像會被分割成不同的區域 - 段落、欄位和文字區塊。圖片和其餘的非文字像素會在文字識別過程中被識別省略,並包含在智慧輸出中。之後,IronOCR 會在網格線和文字區塊的幫助下,將文字區域標示為表格。

    文字識別功能

    執行多個相互連結的步驟,將圖素塊轉換為使用者可以搜尋的單行文字線程。

    Tried-and-Tested Multiple Parameters

    利用 IronOCR API 服務,我們已透過多種語言的多個資料檔案範例測試我們的工具,其中包括 Microsoft Office 格式的字級、符號準確度和版面保留。雖然有些參數是自動測試;但其他參數則包括視覺檢查。

    與 IronOCR 連結 - 理想的 OCR 認知服務解決方案

    IronOCR 可讓您在可搜尋的純文字字串中,加入具備多種輸入格式的 OCR 跨平台功能。要利用 IronOCR 增強您的生產力,請從我們免費的 教學文件開始,它會引導您使用 IronOCR。立即下載我們的 NuGet 套件安裝程式,並使用免費試用金鑰或 24/7 個人支援進行探索。無論您的團隊規模如何,我們的終生 License都能滿足您的需求。

    工作內容 .NET, VB.NET, C#

    檢視授權
    支援:
    • .NET Framework 4.0 及以上版本支援 C#、VB、F#
    • Microsoft Visual Studio..NET 開發 IDE 圖示
    • NuGet 安裝程式支援 Visual Studio
    • 與 JetBrains ReSharper C# 語言助理相容
    • 與 Microsoft Azure C# .NET 主機平台相容

    授權與定價

    免費社群開發授權。商業授權 749 美元起。

    專案 C# + VB.NET 函式庫授權

    專案

    開發人員 C# + VB.NET 函式庫授權

    開發人員

    組織 C# + VB.NET 函式庫授權

    組織架構

    Agency C# + VB.NET Library Licensing

    代理機構

    SaaS C# + VB.NET 函式庫授權

    SaaS

    OEM C# + VB.NET 函式庫授權

    OEM

    檢視完整授權選項  

    來自 .NET 社群的 OCR 教學

    .NET Tesseract 替代品 | IronOCR for .NET

    C# Tesseract OCR

    Jim Baker 是 Iron 的開發工程師,負責開發 OCR 產品。

    IronOCR 與 Tesseract 在 .NET 中的比較

    Jim 一直是 IronOCR 開發的領導人物。 Jim 設計並建立 OCR 的影像處理演算法與讀取方法。

    查看比較
    在 .NET | 中將文字轉換為圖片教學

    C# OCR ASP.NET

    Gemma Beckford - 微軟解決方案工程師

    來自 .NET 影像的文字

    瞭解 Gemma 的團隊如何使用 IronOCR 來為他們的歸檔軟體讀取影像中的文字。Gemma 分享她自己的程式碼範例。

    圖片轉換為文字的 .NET 教學
    數以千計的開發人員使用 IronOcr 來...

    會計與財務系統

    • # 收據
    • # 報告
    • # 發票列印
    為 ASP.NET 會計與財務系統新增 PDF 支援

    商業數位化

    • # 文件
    • # 訂購與標籤
    • # 紙張替換
    C# 業務數位化使用案例

    企業內容管理

    • # 內容製作
    • # 文件管理
    • # 內容分發
    .NET CMS PDF 支援

    資料與報告應用程式

    • # 效能追蹤
    • # 趨勢繪圖
    • # 報告
    C# PDF 報告
    Iron Software 企業 .NET 元件開發人員

    成千上萬的企業、政府、中小企業和開發人員都信任 Iron 軟體產品。

    Iron 的團隊在 .NET 軟體元件市場擁有超過 10 年的經驗。

    Medcode
    Nexudus
    GE
    澳大利亞新西蘭
    Foley
    Vireq
    Marval
    Equinor