フッターコンテンツにスキップ
OCRツール

Azure OCR対Google OCR(OCR機能の比較)

今日のデジタル環境において、光学文字認識(OCR)技術は、画像、PDF、およびその他の文書から効率的にテキストを抽出しようとする企業にとって不可欠です。 使用可能な数多のOCRソリューションの中で、Microsoft Azure OCR、Google OCR、IronOCR は、それぞれ独自の機能と能力を提供する先行者として際立っています。 この記事では、これらのOCRサービス、その特長、およびどれを選ぶべきかについて説明します。

1. OCRサービスの紹介

OCRサービスとは、高度な機械学習アルゴリズムを活用して画像や文書からテキストを抽出するクラウドベースのプラットフォームです。 Azure OCR、Google OCR、およびIronOCRは、それぞれの強みと用途を持つ広く利用されているOCRサービスです。

2. Azure OCR

Microsoft Azure Cognitive Servicesスイートの一部であるAzure OCRツールは、信頼性が高くスケーラブルなテキスト認識タスクのソリューションを提供します。 広範な言語や文書形式をサポートしており、多様なユースケースに適しています。 Microsoft Azure OCRは深層学習モデルを駆使し、高精度なテキスト抽出を実現し、企業が文書処理ワークフローを効率化できるようにします。 Azureは、むしろコンピュータビジョンサービスのようです。

2.1 Azure OCRの主な機能

  • 言語サポート: Microsoft Azure OCRは、アラビア語や中国語のような複雑なスクリプトを含む70以上の言語をサポートしています。
  • 文書形式: 画像、PDF、スキャンされた文書を含む様々な文書形式を処理できます。
  • スケーラビリティ: Azure OCRは、大量のテキスト抽出リクエストをシームレスに処理するためにスケールし、企業レベルのアプリケーションに適しています。

2.2 コード例(C#)

using Microsoft.Azure.CognitiveServices.Vision.ComputerVision;
using Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models;
using System;
using System.Threading.Tasks;

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;
using System.Threading.Tasks;

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
Imports System.Threading.Tasks

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
$vbLabelText   $csharpLabel

2.2.1 出力

Azure OCR対Google OCR(OCR機能比較):図1 - Azure OCRコードのコンソール出力

3. Google OCR

Google OCRは、Google Cloudサービスプロバイダーの一部として、テキスト認識と文書分析のための強力なプラットフォームを提供します。 Googleの高度な機械学習アルゴリズムを活用して、正確なテキスト抽出機能を提供し、クラウドコンピューティングを介して画像ラベリングやオブジェクト検出などの追加機能を備えています。 GoogleクラウドプラットフォームOCRは、請求書処理、フォーム認識、コンテンツのデジタル化など、様々な業界で広く使用されています。

3.1 Google OCRの主な機能

  • 多言語サポート: Google OCRは200以上の言語をサポートし、ラテン文字、キリル文字、漢字を含む複数のスクリプトのテキストを認識できます。
  • 画像分析: ラベル検出、顔検出、ランドマーク認識などの高度な画像分析機能を提供します。
  • Google Cloudサービスとの統合: Google OCRは他のGoogle CloudビジョンAPIサービスとシームレスに統合され、開発者が文書管理と分析の総合的なソリューションを構築できるようにします。

3.2 コード例(C#)

using System;
using Google.Cloud.Vision.V1;

class Program
{
    static void Main(string[] args)
    {
        // Configure the ImageAnnotator client with credentials
        var clientBuilder = new ImageAnnotatorClientBuilder { CredentialsPath = "path-to-credentials.json" };
        var client = clientBuilder.Build();

        // Load the image from file
        var image = Image.FromFile("path-to-your-image.jpg");

        // Perform text detection on the image
        var response = client.DetectText(image);

        // Display the detected text
        foreach (var annotation in response)
        {
            Console.WriteLine(annotation.Description);
        }
    }
}
using System;
using Google.Cloud.Vision.V1;

class Program
{
    static void Main(string[] args)
    {
        // Configure the ImageAnnotator client with credentials
        var clientBuilder = new ImageAnnotatorClientBuilder { CredentialsPath = "path-to-credentials.json" };
        var client = clientBuilder.Build();

        // Load the image from file
        var image = Image.FromFile("path-to-your-image.jpg");

        // Perform text detection on the image
        var response = client.DetectText(image);

        // Display the detected text
        foreach (var annotation in response)
        {
            Console.WriteLine(annotation.Description);
        }
    }
}
Imports System
Imports Google.Cloud.Vision.V1

Friend Class Program
	Shared Sub Main(ByVal args() As String)
		' Configure the ImageAnnotator client with credentials
		Dim clientBuilder = New ImageAnnotatorClientBuilder With {.CredentialsPath = "path-to-credentials.json"}
		Dim client = clientBuilder.Build()

		' Load the image from file
		Dim image As System.Drawing.Image = System.Drawing.Image.FromFile("path-to-your-image.jpg")

		' Perform text detection on the image
		Dim response = client.DetectText(image)

		' Display the detected text
		For Each annotation In response
			Console.WriteLine(annotation.Description)
		Next annotation
	End Sub
End Class
$vbLabelText   $csharpLabel

3.2.1 出力

Azure OCR対Google OCR(OCR機能比較):図2 - Google OCRコードのコンソール出力

4. IronOCR

IronOCRは、Iron Softwareが開発した、業界最高のOCR精度とパフォーマンスを提供する.NETアプリケーション用の多用途なOCRライブラリです。 クラウドベースのOCRサービスとは異なり、IronOCRはオンプレミステキスト抽出機能を提供し、データのプライバシーとセキュリティを必要とするアプリケーションに適しています。 IronOCRは特に複雑なレイアウトやノイズの多い画像を含むシナリオで精度が優れ、信頼性の高いOCR機能を求める企業にとっての選ばれる選択肢となっています。

4.1 IronOCRの主な機能

  • 高精度: IronOCRはテキスト認識で優れた精度を提供し、様々な文書タイプや言語にわたって信頼できる結果を保証します。
  • オンプレミスOCR: 機密文書を外部サービスに頼らずにローカルで処理するためのオンプレミステキスト抽出機能を提供します。
  • 多用途な言語サポート: IronOCRは125以上の言語をサポートし、多言語テキスト認識をシームレスに行うための包括的な言語パックを提供します。

4.2 IronOCRのインストール

IronOCRはNuGetパッケージマネージャーコンソールを使用してインストールできます。 以下のコマンドを実行してください。

  1. Visual Studioを開き、新しいプロジェクトを作成するか、既存のプロジェクトを開きます。
  2. ツールバーで、ツールに移動し、NuGetパッケージマネージャーを選択します。

Azure OCR対Google OCR(OCR機能比較):図3 - Visual Studio NuGetパッケージマネージャーの見つけ方

  1. 新しく表示されたリストからパッケージマネージャーコンソールを選択します。
  2. 次にコンソールが表示され、以下のコマンドを実行し、Enterキーを押します。
Install-Package IronOcr

IronOCRのインストールには数瞬かかりますが、完了したらコーディング例に進むことができます。

4.3 コード例(C#)

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
            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
            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 With {.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
$vbLabelText   $csharpLabel

4.3.1 出力

Azure OCR対Google OCR(OCR機能比較):図4 - IronOCRコードのコンソール出力

5. 比較評価

5.1 精度とパフォーマンス

  • Microsoft Azure OCRとGoogle OCRは、広範なアプリケーションに適した高精度なテキスト抽出を提供します。
  • IronOCRは特に複雑なレイアウトやノイズの多い画像を含むシナリオで精度が優れています。

5.2 統合のしやすさ

  • Microsoft Azure OCRとGoogle Cloudソリューションは、クラウドアプリケーションやサービスとの簡単な統合を提供するクラウドベースのOCRサービスを提供します。
  • IronOCRはオンプレミスOCR機能を提供し、.NETアプリケーションとのシームレスな統合を実現し、直感的なAPIと充実したドキュメントを備えています。

5.3 スケーラビリティ

  • Microsoft Azure OCRとGoogle OCRは、大量のテキスト抽出リクエストをシームレスに処理するためにスケールし、企業レベルのアプリケーションに適しています。
  • IronOCRのスケーラビリティは、オンプレミスで動作するアプリケーションのインフラストラクチャに依存します。

この記事では、ZIPファイルの重要性、その利点、およびさまざまなアプリケーションにおけるそれらの抽出の重要性を探りました。

すべてのOCRツールの中で、Azure OCR、Google Vision API、およびIronOCRは、テキスト抽出タスクの高精度とパフォーマンスを提供する強力なOCRソリューションとして知られています。 Azure OCRとGoogle OCRは、スケーラブルなインフラストラクチャと広範な言語サポートを備えたクラウドベースのOCRサービスを提供する一方で、IronOCRは最も正確なソリューションとして際立っています。

特にオンプレミステキスト抽出と優れた精度を必要とするアプリケーションにおいて、IronOCRが際立っています。 IronOCRを活用することで、企業は文書処理ワークフローを効率化し、データ抽出の精度を向上させ、スキャンした文書や画像から貴重なインサイトを引き出せるため、選ばれる選択肢となっています。

IronOCR資料ページを訪れ、画像の取り扱い方法を変えるスタート地点となるようにするために、IronOCRとそのサービスの詳細をぜひご覧ください。

Kannaopat Udonpant
ソフトウェアエンジニア
ソフトウェアエンジニアになる前に、Kannapatは北海道大学で環境資源の博士号を修了しました。博士号を追求する間に、彼はバイオプロダクションエンジニアリング学科の一部である車両ロボティクスラボラトリーのメンバーになりました。2022年には、C#のスキルを活用してIron Softwareのエンジニアリングチームに参加し、IronPDFに注力しています。Kannapatは、IronPDFの多くのコードを執筆している開発者から直接学んでいるため、この仕事を大切にしています。同僚から学びながら、Iron Softwareでの働く社会的側面も楽しんでいます。コードやドキュメントを書いていない時は、KannapatはPS5でゲームをしたり、『The Last of Us』を再視聴したりしていることが多いです。