ライブ環境でテストする
ウォーターマークなしで本番環境でテストしてください。
必要な場所でいつでも動作します。
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
<p>IronOCRは125の国際言語をサポートしています。</p> <p>英語(デフォルトでインストールされている)以外の言語パックは、NuGetを介して、または当社のWebサイトからダウンロードしてお使いの.NETプロジェクトに追加することができます。<a href="/csharp/ocr/languages/" target="_blank" rel="nofollow noopener noreferrer">言語のページ</a>.</p> <p>ほとんどの言語は、Fast、Standardで利用可能です。(推奨される)最高品質。 ベストはより正確ですが、同時に遅くなります。</p>
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
<p>IronOCRは、Tesseract 5を使用してスキャンした各ページに対して高度な結果オブジェクトを返します。 次の各項目について <strong>位置データ、画像、テキスト、統計的な信頼性、代替シンボルの選択、フォント名、フォントサイズの装飾、フォントの重み、位置</strong> を含んでいます:</p> <ul> <li>ページ</li> <li>段落</li> <li>テキストの行</li> <li>ワード</li> <li>個々の文字</li> <li>バーコード</li> </ul>
製品、統合、ライセンスに関するご質問がある場合、Iron製品開発チームがお客様のご質問に対応いたします。Ironと連絡を取り、プロジェクトでライブラリを最大限に活用するための対話を始めましょう。
質問するパスポートのページ、請求書、銀行明細書、郵便物、名刺、領収書など、オプティカル文字認識(OCR)はパターン認識、コンピュータビジョン、および機械学習に基づく研究分野です。企業はOCRを部門横断的に活用し、会計および財務システム、ビジネスのデジタル化、企業コンテンツ管理、データ報告システムからテキストを抽出しています。
以下を日本語に翻訳しました: 他の製品の構築に加えて 成功事例IronOCRは、IronOCRというネイティブのC# OCRライブラリを使用して、Google TesseractやMicrosoft 2021 Azure Cognitive Servicesに価値を追加します。
もし99パーセントの精度で実世界の画像を変換したい場合は、続けてお読みください。IronOCRによって効率的で正確かつスケーラブルな、ほとんど人間のような光学文字認識(OCR)アプリケーションを構築する方法を紹介します。
光学文字認識 (OCR) は、さまざまな API が保護に対する高い信頼性を主張しているため、解決された現象と考えられています。しかし、さまざまな製品はしばしば硬直しており、現実のアプリケーションでは不正確になることが多いです。同様に、Tesseract OCR は、機械で印刷された高解像度の完璧なテキストで動作します。
大丈夫ですか?
現実の世界では、常に高解像度の完璧に印刷されたテキストや手書きテキストが存在するわけではありません。代わりに、回転、傾斜、低DPI、背景ノイズ、その他のデジタルの不完全さが存在しますが、IronOCRはこれらすべてを処理し、画像ファイルから手書きのテキストを抽出します。Windows、Linux、macOS、Microsoft Azure、AWS、Dockerを含むクロスプラットフォームサポートと共に、99.8 - 100パーセントの高精度で検索可能なドキュメントを保証します。それがC#開発者がIronOCRを選択する理由です。 IronOCR 標準のTesseract OCRを超えた付加価値の提供が重要です。
最高のツールを手に入れましょう!
上記に加えて、IronOCRは画像ドキュメントを迅速に処理する能力を提供します。さらに、IronOCR APIの機能には次のものも含まれています:
ネイティブの.dllやexesのインストールから単一の信頼できるソースへの移行 - シンプルなC#のAPIを使用し、以下をサポートする単一のネイティブ.NETコンポーネントライブラリを使用して開発します:
IronOCR APIの技術はそれだけでは終わりません。私たちの優れた技術を引き続き探求してください。 機能 さらに。 私たちはビジネスの複雑さを一歩ずつ軽減し、信頼できるソリューションを開発することで文書処理アプリケーションを合理化し、組み込み済みの業界をリードする機能を提供することでビジネス収益を最大化します。
私たちの光学式文字認識プロセスは、自動画像前処理から始まり、画像ファイルを強化して抽出応答率を向上させます。IronOCRは、ユーザーが例のベース画像ファイルを最適なバージョンに抽出できるようにすることで、仕事に価値を加えます。IronOCRは、すべての要件をカバーしています。
IronOCRサービスは300DPI(ドットパーインチ)の画像ファイルで最適に動作するため、200-300DPIの範囲を大きく外れた画像は、ターゲット範囲内に収まるようにリサンプリングされます。
これは、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時間年中無休の個別サポートにご連絡ください。ライフタイムによってニーズを拡張します。 ライセンスチームの規模に関わらず。
ライセンスを表示無料 コミュニティ開発ライセンス。商用ライセンスは$749から。
C# テッセラクト OCR (光学式文字認識)
ジムはIronOCRの開発において主要な役割を果たしています。ジムは、OCR用の画像処理アルゴリズムと読み取り方式を設計・構築しています。
比較を見るC# OCR (光学式文字認識) ASP.NET
ジェンマのチームが彼らのアーカイブソフトウェア用にIronOCRを使って画像からテキストを読み取る方法を学びましょう。ジェンマが自身のコードサンプルを共有しています。
Image to Text .NET チュートリアルIronのチームは、.NETソフトウェアコンポーネント市場で10年以上の経験を有しています。
10 の .NET API 製品 オフィス文書用