Microsoft OCR 工具(C# 替代方案)
OCR(光學字元識別)技術對於各種規模的企業都是至關重要的。 它可以有效地掃描、儲存和分析資料,否則這些工作將耗時且複雜難處理。
Microsoft的OCR工具提供強大的選項來簡化您的數位轉型過程。 這些工具允許更快速且更有效的文件處理,讓您有更多時間專注於發展業務的重要任務。 在本文中,我們將探討如何利用強大的Microsoft OCR工具來簡化您的操作流程。
OneNote:Microsoft工具
如果您需要從圖像中提取文字,Microsoft OneNote是一個有用的工具。 OneNote是一個多功能的筆記應用程式,提供一個平台來捕捉、儲存和組織各種形式的資訊,如文字、圖片、音訊和影片。 它也是從圖像或文件列印件中複製文字的有價值工具,省去了手動輸入文字的時間與精力。
使用OneNote提取文字
要使用OneNote從圖像中提取文字,請按以下步驟進行:
- 啟動OneNote應用程式。
-
使用"插入"選項插入圖像文件或直接將圖像文件拖放到OneNote視窗中。
OneNote插入功能區
-
右鍵點擊圖片,然後從選單中選擇"從圖片複製文字"。
在內容選單中從圖片複製文字
-
最後,將複製的文字粘貼到任何所需的位置,以存取從掃描圖像中提取的文字。
文字來源於從圖像複製的文字
這就是您如何使用OneNote掃描任何圖片。
Microsoft Vision Studio
Microsoft認知服務提供"從圖片提取文字"功能,利用AI來掃描圖像並準確識別文字。 這項服務使用者友好,僅需上傳圖片或PDF文件。資訊會被高準確地轉錄,確保提取的文字準確代表圖像或PDF文件的內容。
此外,提取的文字可以是多種語言,使該服務可供世界各地的使用者使用。 使用Microsoft認知服務的"從圖片提取文字"功能,從圖片中提取有價值資料變得簡單,並能夠提高分析效率與任務執行效果。
使用Microsoft Vision Studio提取文字
要使用"從圖片提取文字"功能,您可以存取Microsoft Azure的Vision Studio網站。 然而,這項服務需要訂閱Azure。 一旦購買訂閱,您將能夠從掃描的文件中存取提取的文字。 以下是參考的範例輸出圖像。
圖像用於其文字掃描
A9T9 Microsoft免費OCR軟體
A9T9免費OCR軟體是一個多功能工具,讓Windows使用者能夠輕鬆地將紙質文件轉換為數位文字。 其簡單的拖放功能允許即時識別多種語言的文字,包括英語、德語、中文、韓語和印度語。 此軟體可從掃描的圖像或PDF文件中提取資料,並將其轉換為可編輯、可搜尋的格式。
此軟體支援多種輸出格式,如Rich Text、TXT或CSV,以及影像格式如BMP、TIF或PDF。 它還有自動文件校正功能。 此軟體能快速且準確地識別多種語言的圖片文字,甚至那些具有透明背景的圖片。 A9T9的高準確率、低成本和易於安裝使它成為尋找免費OCR軟體方案的Windows使用者的首選。
使用A9T9複製文字
您可以從Microsoft Store下載A9T9軟體。 安裝後,開啟A9T9軟體並上傳圖像或PDF文件。
使用A9T9複製文字
一旦圖像或文件載入,點擊"開始OCR"按鈕。 這將從掃描的文件或圖像中提取文字並在右側的文字區域顯示。
文字顯示在右側
您可以選擇OCR語言,並可以複製文字或將其保存為Word文件。
Office Lens
Office Lens是一個專為捕捉和組織筆記、白板、選單、標誌及其他書寫或視覺資訊的工具。 此應用提供優於傳統筆記的替代方案,消除了手寫筆記的需求和遺失重要資訊的可能性。
Office Lens允許使用者輕鬆捕捉草圖、手寫筆記、繪圖和方程式,並校正圖像陰影及傾斜角度以提升可讀性。 它還具備OCR(光學字元識別)功能,使使用者能夠將圖像中的文字數位化並編輯。
不幸的是,Microsoft已停止Windows版本的Office Lens。 現在,它僅在行動裝置上可用。 此外,Microsoft Office Document Imaging已在Microsoft Word 2010中移除。
IronOCR:C# OCR程式庫
IronOCR是一個供.NET開發者使用的強大C# OCR程式庫。 它能夠在掃描的文件和圖像上提供完整的OCR功能,使開發者能夠輕鬆地自動化基於文件的工作流程。 IronOCR具有簡單的API和最少的配置,易於整合到現有系統中。
該程式庫提供簡單的API,易於以最少配置整合到現有系統中。 它支援廣泛的輸入文件格式,包括JPEG、TIFF、GIF、BMP、PDF、多頁TIFF和多文件掃描,還可以從不同方向的圖片中讀取文字。
IronOCR的進階功能包括去除噪聲,幫助減少圖像失真並提高文字提取結果的準確性。 支援超過125種語言,包括英語、法語、德語、西班牙語和日語,使該程式庫適合幾乎任何需要高品質OCR結果而不需人工介入的應用程式。
使用IronOCR提取文字
能夠輕鬆地從PDF文件中提取文字,可以指定特定頁碼或提取文件所有頁面的文字。 使用適當的工具可以簡化和提高效率。
using IronOcr;
using System;
var ocrTesseract = new IronTesseract();
using (var ocrInput = new OcrInput())
{
// Add the entire PDF for OCR processing
ocrInput.AddPdf("example.pdf");
// Alternatively, OCR selected page numbers from a password-protected PDF
ocrInput.AddPdfPages("example.pdf", new [] { 1, 2, 3 }, "password");
// Perform OCR and get the result
var ocrResult = ocrTesseract.Read(ocrInput);
// Output the extracted text
Console.WriteLine(ocrResult.Text);
}
using IronOcr;
using System;
var ocrTesseract = new IronTesseract();
using (var ocrInput = new OcrInput())
{
// Add the entire PDF for OCR processing
ocrInput.AddPdf("example.pdf");
// Alternatively, OCR selected page numbers from a password-protected PDF
ocrInput.AddPdfPages("example.pdf", new [] { 1, 2, 3 }, "password");
// Perform OCR and get the result
var ocrResult = ocrTesseract.Read(ocrInput);
// Output the extracted text
Console.WriteLine(ocrResult.Text);
}
Imports IronOcr
Imports System
Private ocrTesseract = New IronTesseract()
Using ocrInput As New OcrInput()
' Add the entire PDF for OCR processing
ocrInput.AddPdf("example.pdf")
' Alternatively, OCR selected page numbers from a password-protected PDF
ocrInput.AddPdfPages("example.pdf", { 1, 2, 3 }, "password")
' Perform OCR and get the result
Dim ocrResult = ocrTesseract.Read(ocrInput)
' Output the extracted text
Console.WriteLine(ocrResult.Text)
End Using
以下是輸出結果:
在Visual Studio Debug Console中的輸出
除了從PDF文件中提取文字,您還可以輕鬆地讀取條形碼。 該程式庫提供簡單的程式碼實現來讀取條形碼,使其成為多種基於文件工作流程的多用途工具。 請參考以下程式碼:
using IronOcr;
using System;
var ocrTesseract = new IronTesseract();
ocrTesseract.Configuration.ReadBarCodes = true;
// Read barcodes from an image file
using (var ocrInput = new OcrInput(@"images\imageWithBarcode.png"))
{
var ocrResult = ocrTesseract.Read(ocrInput);
// Iterate through the detected barcodes and print their values
foreach (var barcode in ocrResult.Barcodes)
{
Console.WriteLine(barcode.Value);
}
}
using IronOcr;
using System;
var ocrTesseract = new IronTesseract();
ocrTesseract.Configuration.ReadBarCodes = true;
// Read barcodes from an image file
using (var ocrInput = new OcrInput(@"images\imageWithBarcode.png"))
{
var ocrResult = ocrTesseract.Read(ocrInput);
// Iterate through the detected barcodes and print their values
foreach (var barcode in ocrResult.Barcodes)
{
Console.WriteLine(barcode.Value);
}
}
Imports IronOcr
Imports System
Private ocrTesseract = New IronTesseract()
ocrTesseract.Configuration.ReadBarCodes = True
' Read barcodes from an image file
Using ocrInput As New OcrInput("images\imageWithBarcode.png")
Dim ocrResult = ocrTesseract.Read(ocrInput)
' Iterate through the detected barcodes and print their values
For Each barcode In ocrResult.Barcodes
Console.WriteLine(barcode.Value)
Next barcode
End Using
程式碼的輸入/輸出
IronOCR能夠支援低DPI和噪聲圖片,並在處理前增強它們。
using IronOcr;
using System;
var ocrTesseract = new IronTesseract();
// Process a noisy image by deskewing and denoising it
using (var ocrInput = new OcrInput(@"images\image.png"))
{
ocrInput.Deskew(); // Corrects for skewness in the image
ocrInput.DeNoise(); // Reduces visual noise for better recognition
// Perform OCR and print the text
var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);
}
using IronOcr;
using System;
var ocrTesseract = new IronTesseract();
// Process a noisy image by deskewing and denoising it
using (var ocrInput = new OcrInput(@"images\image.png"))
{
ocrInput.Deskew(); // Corrects for skewness in the image
ocrInput.DeNoise(); // Reduces visual noise for better recognition
// Perform OCR and print the text
var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);
}
Imports IronOcr
Imports System
Private ocrTesseract = New IronTesseract()
' Process a noisy image by deskewing and denoising it
Using ocrInput As New OcrInput("images\image.png")
ocrInput.Deskew() ' Corrects for skewness in the image
ocrInput.DeNoise() ' Reduces visual noise for better recognition
' Perform OCR and print the text
Dim ocrResult = ocrTesseract.Read(ocrInput)
Console.WriteLine(ocrResult.Text)
End Using
結論
總而言之,光學字元識別(OCR)是對於各種規模企業來說的重要工具,可以讓它們有效地掃描、儲存和處理資訊,否則這些工作將很複雜且耗時。 Microsoft提供多種OCR工具,包括OneNote、Microsoft Vision Studio和A9T9免費OCR軟體,它們可以簡化流程並節約時間。
IronOCR是一個裝置齊全的OCR程式庫,是可供選擇的OCR工具中的突潛選項之一。 它易於與C#及VB.NET應用程式整合,提供優異的準確性和多語言及圖片格式識別,並具有免費試用期,授權費用從$999起。 IronOCR是尋求提升數位轉型的企業的一項有價值投資。 這些OCR工具各具特色,能滿足不同的需求,使它們成為企業希望提升其數位轉型的珍貴資產。




