觀看David Jones, Agorus, 使用Iron Suite創造新效能
觀看Milan Jovanović使用IronPDF
觀看我們的團隊產品演示
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。
IronOCR 支援125種國際語言。 除了預設安裝的英語外,其他語言包可以通過NuGet添加到您的 .NET 專案中,或從我們的語言頁面下載。
大多數語言有快速、標準(推薦)和最佳品質可供選擇。 最佳品質選項可能提供更準確的結果,但處理時間也會較長。
探索使用 IronOCR 的多語言 OCR。
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
IronOCR 為它使用 Tesseract 5 掃描的每個頁面返回一個先進的結果對象。 這包含位置數據、圖像、文本、統計置信度、替代符號選擇、字體名稱、字體大小裝飾、字體粗細和位置,每個項目如下:
探索如何使用 IronOCR 讀取 OCR 結果
無論是產品、集成還是許可問題,Iron 產品開發團隊隨時支持您的所有問題。與 Iron 取得聯繫,開始對話,以便在項目中充分利用我們的庫。
無論是護照頁面、發票、銀行對賬單、郵件、名片還是收據;光學字符識別 (OCR) 是一個基於模式識別、計算機視覺和機器學習的研究領域。公司利用 OCR 跨部門地從會計和金融系統、業務數字化、企業內容管理和數據報告系統中提取文本。
此外還構建其他成功案例。IronOCR 為 Google Tesseract 和 Microsoft 2021 Azure 認知服務增值,提供 IronOCR - 一個原生 C# OCR 庫。
如果您希望將真實的圖片轉換為 99% 的準確度,請繼續閱讀,看看 IronOCR 如何讓您構建一個高效、準確、可擴展、幾乎如人般的光學字符識別應用程序。
光學字符識別 (OCR) 被認為是一種被解決的現象,由於不同的 API 在保護方面表現出巨大的信心。然而,許多產品通常僵硬且不準確,無法在現實世界中應用。同樣,Tesseract OCR 適用於機器打印、高清晰度、完美的文本。聽起來不錯?但真正的世界並不總是擁有完美印刷和書寫的高分辨率文本。相反,旋轉、扭曲、低 DPI、背景噪音和所有數字瑕疵的是由 IronOCR 處理,包括從圖像文件中提取手寫文本。我們能夠確保 99.8 - 100% 準確、可搜尋的文檔,支持多平台,包括 Windows、Linux、macOS、Microsoft Azure、AWS 和 Docker - 這就是為什麼 C# 開發者選擇IronOCR 而非(基礎)Tesseract OCR - 一切都是關於增值。
裝備最好的工具!
除了以上功能,IronOCR 還使您能夠迅速處理圖像文檔。如果這還不夠,IronOCR API 的功能還包括以下內容:
從原生 .dll 或 exes 安裝轉變為單一的事實來源 —— 使用簡單的 C# API 開發一個原生 .NET 組件庫,支持:
IronOCR API 的藝術不僅限於此;您可以繼續探索我們的技術優勢功能。我們通過開發可靠的解決方案來簡化文件處理應用程式,從而減少商業複雜性,並通過提供行業領先功能來最大化商業收入,已經嵌入:
我們的光學字符識別過程始於自動圖像預處理,以改善圖像文件,提高提取響應速度。IronOCR 為您的工作增值,因為它允許用戶將示例基礎圖像文件提取為最優版本。IronOCR 涵蓋所有基礎:
由於 IronOCR 服務在 300DPI(每英寸點數)的圖像文件上最佳運行,任何明顯超出 200-300 DPI 範圍的圖像將重新採樣以適合目標範圍。
這意味着將 600 DPI 圖像下採樣為 300 DPI 或將 100 DPI 圖像上採樣為 200 DPI,具有 99%的置信度。
由於 IronOCR 認知服務的設計是針對單色圖像運行的,因此任何彩色或灰度圖像將使用自適應二值化算法轉換為單色。
該算法比較區域內的像素密度,確定用於將像素轉換為單色的閾值。
IronOCR 尋找文本行和字符模式,自動校正和旋轉輸入圖像資源至所需的方向。
通過 IronOCR,圖像文件會自動分析噪聲的存在和數量。噪音基本上是掃描圖像上的“雜點”。我們的自適應算法然後根據噪音顆粒的大小移除噪音。
一旦樣本圖像文件被預處理,IronOCR 便將輸入圖像文件分解為不同的處理區域。
另一個準備階段是將參考圖像分解為不同的邏輯區域。IronOCR 首先使用空白和模式在圖像中定位文本和圖片;文本區域與圖像分開。
然後將其分區為區段、列和文本塊。識別出來的圖像和剩餘的非文本像素在文本識別過程中被排除在外,並包括在智能輸出中。然後 IronOCR 使用網格線和文本塊將文本區域標識為表格。
執行多個相互連接的步驟,將像素斑點轉換為用戶可搜索的單行文本。例如包含字符分割、自適應分類、字典參考和其他相關過程,這些過程促成了最佳提取文本。
使用 IronOCR API 服務,我們通過多個數據文件範例在多種語言中對我們的工具進行了測試,包括單字級別、符號準確性和 Microsoft Office 格式中的佈局保留。雖然某些參數是自動測試的;其他包括視覺檢查。
IronOCR 允許您跨平台添加 OCR 功能,使用多種輸入格式轉換為用户可搜索的純文本串。要提升生產力與 IronOCR,請通過我們的免費教程文檔開始使用,我們的教程將指引您使用 IronOCR。立即下載我們的 NuGet 包安裝程序,並通過免費試用密鑰探索或隨時連接 24/7 的個人支持。無論您的團隊規模如何,都可以使用我們的終身許可證來滿足您的需求。
兼容 .NET, VB.NET, C#
免費 社區開發許可證。商業許可證從 $749 開始。
C# Tesseract OCR
Jim 在 IronOCR 的開發中是一位領導人物。Jim 設計和構建影像處理算法及 OCR 的讀取方法。
C# OCR ASP.NET
學習 Gemma 的團隊如何使用 IronOCR 從影像中讀取文本以用於他們的檔案存檔軟件。Gemma 分享了她自己的代碼樣本。
Iron 的團隊有超過 10 年的 .NET 軟件組件市場經驗。
直接與我們的開發團隊交談
清晰的在線手冊,以簡單的英語編寫。
免費開發許可證。商業版從 $749 起。
使用 NuGet 或 DLL 在幾分鐘內開始。
無需信用卡
試用表單已提交成功。您的試用密鑰應該在電子郵件裡。如果沒有,請聯繫support@ironsoftware.com
您的試用密鑰應該在電子郵件裡。如果沒有,請聯繫support@ironsoftware.com
免費開始
在生產環境中測試而不帶水印。適用於您所需的任何地方。
獲得 30 天完整功能產品。幾分鐘內即可運行。
在您的產品試用期間全面訪問我們的支持技術團隊
無需信用卡或帳戶創建
您的試用密鑰應在電子郵件中。如果沒有,請聯繫support@ironsoftware.com
授權從$749起售。 有問題嗎?聯繫我們。
預約無需承諾的諮詢
完成以下表單或發送電子郵件至 sales@ironsoftware.com
您的詳細信息將始終保密。
預訂 30 分鐘的個人演示。
無須合約、無須卡號、無任何長期綁約。
版權所有 © Iron Software 2013-2025