在生产中测试无水印。
随时随地为您服务。
获取30天的完全功能产品。
几分钟内即可启动和运行。
在您的产品试用期间,全面访问我们的支持工程团队。
在当今的数字化时代,光学字符识别技术(光学字符识别)对于希望从图像、PDF 和其他文档中高效提取文本的企业来说,"图像提取 "技术已变得不可或缺。 在众多 OCR 解决方案中,Microsoft Azure OCR 与 Google OCR 以及IronOCR这些工具都是领先的竞争者,各自都具有独特的特点和功能。 在本文中,我们将讨论这些 OCR 服务、它们的功能以及选择哪一种。
OCR 服务是基于云的平台,利用先进的机器学习算法从图像和文档中提取文本。 Azure OCR、Google OCR 和 IronOCR 是广泛使用的 OCR 服务,各有其优势和应用。
"(《世界人权宣言》)Azure OCR作为 Microsoft Azure 认知服务套件的一部分,该工具为文本识别任务提供了可靠、可扩展的解决方案。 它支持多种语言和文件格式,适用于不同的使用情况。 Microsoft Azure OCR 利用深度学习模型实现高精度文本提取,使企业能够高效简化文档处理工作流程 Azure 更像是一种计算机视觉服务。
using Microsoft.Azure.CognitiveServices.Vision.ComputerVision;
using Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models;
using System;
class Program
{
static async Task Main(string [] args)
{
// Create an instance of the ComputerVisionClient
ComputerVisionClient client = new ComputerVisionClient(new ApiKeyServiceClientCredentials("YOUR_API_KEY"))
{
Endpoint = "https://YOUR_REGION.api.cognitive.microsoft.com/"
};
// Specify the image URL
string imageUrl = "https://example.com/image.jpg";
// Perform OCR on the image
OcrResult result = await client.RecognizePrintedTextAsync(true, imageUrl);
// Display the extracted text
foreach (var region in result.Regions)
{
foreach (var line in region.Lines)
{
foreach (var word in line.Words)
{
Console.Write(word.Text + " ");
}
Console.WriteLine();
}
}
}
}
using Microsoft.Azure.CognitiveServices.Vision.ComputerVision;
using Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models;
using System;
class Program
{
static async Task Main(string [] args)
{
// Create an instance of the ComputerVisionClient
ComputerVisionClient client = new ComputerVisionClient(new ApiKeyServiceClientCredentials("YOUR_API_KEY"))
{
Endpoint = "https://YOUR_REGION.api.cognitive.microsoft.com/"
};
// Specify the image URL
string imageUrl = "https://example.com/image.jpg";
// Perform OCR on the image
OcrResult result = await client.RecognizePrintedTextAsync(true, imageUrl);
// Display the extracted text
foreach (var region in result.Regions)
{
foreach (var line in region.Lines)
{
foreach (var word in line.Words)
{
Console.Write(word.Text + " ");
}
Console.WriteLine();
}
}
}
}
Imports Microsoft.Azure.CognitiveServices.Vision.ComputerVision
Imports Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models
Imports System
Friend Class Program
Shared Async Function Main(ByVal args() As String) As Task
' Create an instance of the ComputerVisionClient
Dim client As New ComputerVisionClient(New ApiKeyServiceClientCredentials("YOUR_API_KEY")) With {.Endpoint = "https://YOUR_REGION.api.cognitive.microsoft.com/"}
' Specify the image URL
Dim imageUrl As String = "https://example.com/image.jpg"
' Perform OCR on the image
Dim result As OcrResult = Await client.RecognizePrintedTextAsync(True, imageUrl)
' Display the extracted text
For Each region In result.Regions
For Each line In region.Lines
For Each word In line.Words
Console.Write(word.Text & " ")
Next word
Console.WriteLine()
Next line
Next region
End Function
End Class
谷歌 OCR作为 Google 云服务提供商的一部分,.NET、Java、Python 或 Node.js 为文本识别和文档分析提供了强大的平台。 利用谷歌先进的机器学习算法,它可以提供准确的文本提取功能,并通过云计算提供图像标注和对象检测等附加功能。 谷歌云平台 OCR 广泛应用于各行各业的发票处理、表格识别和内容数字化等任务。
using Google.Cloud.Vision.V1;
using Google.Protobuf;
using System.IO;
using Google.Apis.Auth.OAuth2;
var clientBuilder = new ImageAnnotatorClientBuilder { CredentialsPath = "path-to-credentials.json" };
var client = clientBuilder.Build();
var image = Image.FromFile("path-to-your-image.jpg");
var response = client.DetectText(image);
foreach (var annotation in response)
{
Console.WriteLine(annotation.Description);
}
using Google.Cloud.Vision.V1;
using Google.Protobuf;
using System.IO;
using Google.Apis.Auth.OAuth2;
var clientBuilder = new ImageAnnotatorClientBuilder { CredentialsPath = "path-to-credentials.json" };
var client = clientBuilder.Build();
var image = Image.FromFile("path-to-your-image.jpg");
var response = client.DetectText(image);
foreach (var annotation in response)
{
Console.WriteLine(annotation.Description);
}
Imports Google.Cloud.Vision.V1
Imports Google.Protobuf
Imports System.IO
Imports Google.Apis.Auth.OAuth2
Private clientBuilder = New ImageAnnotatorClientBuilder With {.CredentialsPath = "path-to-credentials.json"}
Private client = clientBuilder.Build()
Private image = System.Drawing.Image.FromFile("path-to-your-image.jpg")
Private response = client.DetectText(image)
For Each annotation In response
Console.WriteLine(annotation.Description)
Next annotation
IronOCR由 Iron Software 开发的.NET OCR 库是一款适用于.NET 应用程序的多功能 OCR 库,具有业界领先的 OCR 精确度和性能。 与基于云的 OCR 服务不同,IronOcr 提供内部文本提取功能,因此适合需要数据隐私和安全的应用。 IronOCR在精确性方面表现出色,尤其是在涉及复杂布局和噪声图像的场景中,使其成为寻求可靠OCR功能的企业的首选。
IronOCR 可使用 NuGet 软件包管理器 for Console 安装,只需运行以下命令即可。
打开 Visual Studio,创建一个新项目或打开一个现有项目。
现在从新出现的列表中选择软件包管理器控制台。
Install-Package IronOcr
安装 IronOCR 需要一些时间,但一旦完成,我们就可以进入编码示例。
using IronOcr;
using System;
class Program
{
static void Main(string [] args)
{
// Specify the path to the image file
string imagePath = "path-to-your-image.jpg";
// Instantiate the IronTesseract OCR engine
var ocr = new IronTesseract();
// Set the language for text recognition
ocr.Language = OcrLanguage.English;
// Perform text recognition on the image
var result = ocr.Read(imagePath);
// Display the extracted text
Console.WriteLine("Extracted Text:");
Console.WriteLine(result.Text);
}
}
using IronOcr;
using System;
class Program
{
static void Main(string [] args)
{
// Specify the path to the image file
string imagePath = "path-to-your-image.jpg";
// Instantiate the IronTesseract OCR engine
var ocr = new IronTesseract();
// Set the language for text recognition
ocr.Language = OcrLanguage.English;
// Perform text recognition on the image
var result = ocr.Read(imagePath);
// Display the extracted text
Console.WriteLine("Extracted Text:");
Console.WriteLine(result.Text);
}
}
Imports IronOcr
Imports System
Friend Class Program
Shared Sub Main(ByVal args() As String)
' Specify the path to the image file
Dim imagePath As String = "path-to-your-image.jpg"
' Instantiate the IronTesseract OCR engine
Dim ocr = New IronTesseract()
' Set the language for text recognition
ocr.Language = OcrLanguage.English
' Perform text recognition on the image
Dim result = ocr.Read(imagePath)
' Display the extracted text
Console.WriteLine("Extracted Text:")
Console.WriteLine(result.Text)
End Sub
End Class
在所有 OCR 工具中,Azure OCR、Google Vision API 和IronOCR众所周知,.NET、Java、Python 或 Node.js 是功能强大的 OCR 解决方案,可为文本提取任务提供高准确性和高性能。 虽然 Azure OCR 和 Google OCR 提供基于云的 OCR 服务,具有可扩展的基础设施和广泛的语言支持,但 IronOcr 作为最准确的解决方案脱颖而出。
IronOCR 脱颖而出,尤其适用于需要内部文本提取和卓越准确性的应用。 通过利用 IronOCR,企业可以简化文档处理工作流程,提高数据提取的准确性,并从扫描的文档和图像中获取有价值的见解,从而使其成为首选。
要了解有关 IronOCR 及其服务的更多信息,请访问网站IronOCR 文档页面许可证,让你开始改变处理图像的方式。