C#でのTesseract(テッセラクト)OCRを使った文字起こし・テキスト抽出
C# の Iron Tesseract を使用するには、IronTesseract インスタンスを作成し、言語と OCR 設定を構成してから、画像または PDF を含む OcrInput オブジェクトで Read() メソッドを呼び出します。 これは、Tesseract 5 の最適化されたエンジンを使用して、テキストの画像を検索可能な PDF に変換し、高精度な文字認識・テキスト抽出を実現します。
IronOCR は、Iron Tesseract と呼ばれるカスタマイズおよび最適化された Tesseract 5 を利用するための直感的な API を提供します。 IronOCRと IronTesseract を使用すると、テキストやスキャンした文書の画像をテキストおよび検索可能な PDF に変換できるようになります。 ライブラリは、125の国際言語をサポートし、BarCode読み取りやコンピュータビジョンのような高度な機能を含んでいます。
クイックスタート: C# で IronTesseract 構成をセットアップする
この例では、IronTesseract を特定の設定で構成し、1 行のコードで OCR を実行する方法を示します。
-
IronOCR をNuGetパッケージマネージャでインストール
PM > Install-Package IronOcr -
このコード スニペットをコピーして実行します。
var result = new IronOcr.IronTesseract { Language = IronOcr.OcrLanguage.English, Configuration = new IronOcr.TesseractConfiguration { ReadBarCodes = false, RenderSearchablePdf = true, WhiteListCharacters = "ABCabc123" } }.Read(new IronOcr.OcrInput("image.png")); -
実際の環境でテストするためにデプロイする
今日プロジェクトで IronOCR を使い始めましょう無料トライアル
基本的なOCRワークフロー
- 画像を読み取るためにNuGetでOCRライブラリをインストールする
- Utilize Custom `Tesseract 5` to perform OCR
- 画像やPDFファイルなどの処理したいドキュメントをロードする
- 抽出されたテキストをコンソールやファイルに出力する
- 結果を検索可能なPDFとして保存する
どのようにIronTesseractインスタンスを作成しますか?
このコードでTesseractオブジェクトを初期化する:
:path=/static-assets/ocr/content-code-examples/how-to/irontesseract-initialize-irontesseract.cs
using IronOcr;
IronTesseract ocr = new IronTesseract();
Imports IronOcr
Dim ocr As New IronTesseract()
さまざまな言語を選択したり、バーコードの読み取りを有効にしたり、文字をホワイトリスト/ブラックリストに登録したりすることで、IronTesseract の動作をカスタマイズできます。 IronOCRは、OCRプロセスを微調整するための包括的な設定オプションを提供します:
:path=/static-assets/ocr/content-code-examples/how-to/irontesseract-configure-irontesseract.cs
IronTesseract ocr = new IronTesseract
{
Configuration = new TesseractConfiguration
{
ReadBarCodes = false,
RenderHocr = true,
TesseractVariables = null,
WhiteListCharacters = null,
BlackListCharacters = "`ë|^",
},
MultiThreaded = false,
Language = OcrLanguage.English,
EnableTesseractConsoleMessages = true, // False as default
};
Dim ocr As New IronTesseract With {
.Configuration = New TesseractConfiguration With {
.ReadBarCodes = False,
.RenderHocr = True,
.TesseractVariables = Nothing,
.WhiteListCharacters = Nothing,
.BlackListCharacters = "`ë|^"
},
.MultiThreaded = False,
.Language = OcrLanguage.English,
.EnableTesseractConsoleMessages = True
}
設定が完了すると、Tesseract 機能を使用して OcrInput オブジェクトを読み取ることができます。 OcrInputクラスは、さまざまな入力フォーマットを読み込むための柔軟なメソッドを提供します:
:path=/static-assets/ocr/content-code-examples/how-to/irontesseract-read.cs
IronTesseract ocr = new IronTesseract();
using OcrInput input = new OcrInput();
input.LoadImage("attachment.png");
OcrResult result = ocr.Read(input);
string text = result.Text;
Dim ocr As New IronTesseract()
Using input As New OcrInput()
input.LoadImage("attachment.png")
Dim result As OcrResult = ocr.Read(input)
Dim text As String = result.Text
End Using
複雑なシナリオでは、マルチスレッド機能を活用して複数のドキュメントを同時に処理し、バッチ処理のパフォーマンスを大幅に向上させることができます。
Tesseractの高度な設定変数とは
IronOCR Tesseract インターフェースでは、IronOcr.TesseractConfiguration クラスを通じて Tesseract 構成変数を完全に制御できます。 これらの高度な設定により、低品質スキャンの修正や特定のドキュメント タイプの読み取りなど、特定の使用ケースに合わせて OCR のパフォーマンスを最適化できます。
コード内でTesseractコンフィギュレーションを使用するには?
:path=/static-assets/ocr/content-code-examples/how-to/irontesseract-tesseract-configuration.cs
using IronOcr;
using System;
IronTesseract Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.English;
Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd;
// Configure Tesseract Engine
Ocr.Configuration.TesseractVariables["tessedit_parallelize"] = false;
using var input = new OcrInput();
input.LoadImage("/path/file.png");
OcrResult Result = Ocr.Read(input);
Console.WriteLine(Result.Text);
Imports IronOcr
Imports System
Private Ocr As New IronTesseract()
Ocr.Language = OcrLanguage.English
Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd
' Configure Tesseract Engine
Ocr.Configuration.TesseractVariables("tessedit_parallelize") = False
Dim input = New OcrInput()
input.LoadImage("/path/file.png")
Dim Result As OcrResult = Ocr.Read(input)
Console.WriteLine(Result.Text)
IronOCRはまた、異なるドキュメントタイプに特化した設定を提供します。例えば、パスポートの読み取りやMICR小切手の処理では、特定の前処理フィルターや領域検出を適用して精度を向上させることができます。
財務文書の構成例
// Example: Configure for financial documents
IronTesseract ocr = new IronTesseract
{
Language = OcrLanguage.English,
Configuration = new TesseractConfiguration
{
PageSegmentationMode = TesseractPageSegmentationMode.SingleBlock,
TesseractVariables = new Dictionary<string, object>
{
["tessedit_char_whitelist"] = "0123456789.$,",
["テキストードヘビーnr"] = false,
["アウトラインあたりのエッジの最大子数"] = 10
}
}
};
// Apply preprocessing filters for better accuracy
using OcrInput input = new OcrInput();
input.LoadPdf("financial-document.pdf");
input.Deskew();
input.EnhanceResolution(300);
OcrResult result = ocr.Read(input);
// Example: Configure for financial documents
IronTesseract ocr = new IronTesseract
{
Language = OcrLanguage.English,
Configuration = new TesseractConfiguration
{
PageSegmentationMode = TesseractPageSegmentationMode.SingleBlock,
TesseractVariables = new Dictionary<string, object>
{
["tessedit_char_whitelist"] = "0123456789.$,",
["テキストードヘビーnr"] = false,
["アウトラインあたりのエッジの最大子数"] = 10
}
}
};
// Apply preprocessing filters for better accuracy
using OcrInput input = new OcrInput();
input.LoadPdf("financial-document.pdf");
input.Deskew();
input.EnhanceResolution(300);
OcrResult result = ocr.Read(input);
Imports IronOcr
' Example: Configure for financial documents
Dim ocr As New IronTesseract With {
.Language = OcrLanguage.English,
.Configuration = New TesseractConfiguration With {
.PageSegmentationMode = TesseractPageSegmentationMode.SingleBlock,
.TesseractVariables = New Dictionary(Of String, Object) From {
{"tessedit_char_whitelist", "0123456789.$,"},
{"テキストードヘビーnr", False},
{"アウトラインあたりのエッジの最大子数", 10}
}
}
}
' Apply preprocessing filters for better accuracy
Using input As New OcrInput()
input.LoadPdf("financial-document.pdf")
input.Deskew()
input.EnhanceResolution(300)
Dim result As OcrResult = ocr.Read(input)
End Using
すべてのTesseract構成変数の完全なリストは何ですか?
これらは IronTesseract.Configuration.TesseractVariables["key"] = value; を使用して設定できます。 設定変数を使用すると、特定のドキュメントで最適な結果を得るためにOCRの動作を微調整することができます。 OCR パフォーマンスの最適化に関する詳細なガイダンスについては、高速 OCR 設定ガイドを参照してください。
| Tesseract 設定変数 | デフォルト | 意味 |
|---|---|---|
| 分類番号cpレベル | 3 | クラスプルーナーレベルの数 |
| textord_debug_tabfind | 0 | デバッグタブの検出 |
| textord_debug_bugs | 0 | タブ検索のバグに関する出力をオンにする |
| textord_testregion_left | -1 | デバッグレポートの四角形の左端 |
| textord_testregion_top | -1 | デバッグレポートの四角形の上端 |
| テキストコード_テスト領域_右 | 2147483647 | デバッグ長方形の右端 |
| テキストコード_テスト領域_下 | 2147483647 | デバッグ用四角形の下端 |
| textord_tabfind_show_partitions | 0 | パーティション境界を表示し、>1 の場合は待機します |
| デバナガリ_スプリット_デバッグレベル | 0 | 分割された shiro-rekha プロセスのデバッグ レベル。 |
| アウトラインあたりのエッジの最大子数 | 10 | キャラクターアウトライン内の子の最大数 |
| エッジの最大子レイヤー数 | 5 | 文字アウトライン内のネストされた子の最大レイヤー数 |
| 孫あたりのエッジの子数 | 10 | チャッキングアウトラインの重要度比 |
| エッジの子の数の制限 | 45 | ブロブに許容される最大穴数 |
| エッジの最小非穴 | 12 | ボックス内の文字の最小ピクセル数 |
| エッジパス面積比 | 40 | Max lensq/area for acceptable child outline |
| textord_fp_chop_error | 2 | チョップセルの最大許容曲げ |
| textord_tabfind_show_images | 0 | Show image blobs |
| textord_skewsmooth_offset | 4 | スムーズファクター |
| textord_skewsmooth_offset2 | 1 | スムーズファクター |
| テキストードテストx | -2147483647 | 検査患者の座標 |
| テキストord_test_y | -2147483647 | 検査患者の座標 |
| 行内のテキストワードの最小ブロブ数 | 4 | 勾配をカウントする前の最小ブロブ数 |
| テキストードスプライン最小ブロブ | 8 | Min blobs in each spline segment |
| テキストフォードスプライン中央値勝利 | 6 | Size of window for spline segmentation |
| テキストオード最大ブロブオーバーラップ | 4 | Max number of blobs a big blob can overlap |
| テキストord_min_xheight | 10 | Min credible pixel xheight |
| textord_lms_line_trials | 12 | Number of linew fits to do |
| 古い穴あき損失数 | 10 | Max lost before fallback line used |
| pitsync_linear_version | 6 | Use new fast algorithm |
| ピットシンクフェイクデプス | 1 | Max advance fake generation |
| textord_tabfind_show_strokewidths | 0 | Show stroke widths |
| テキストードドットマトリックスギャップ | 3 | Max pixel gap for broken pixed pitch |
| テキストコードデバッグブロック | 0 | Block to do debug on |
| テキストピッチ範囲 | 2 | Max range test on pitch |
| テキストワード拒否権 | 5 | Rows required to outvote a veto |
| 方程式検出_保存_bi_image | 0 | Save input bi image |
| 方程式検出_save_spt_image | 0 | Save special character image |
| 方程式検出_保存_シード画像 | 0 | Save the seed image |
| 方程式検出_マージされた画像を保存 | 0 | Save the merged image |
| ポリデバッグ | 0 | Debug old poly |
| ポリワイドオブジェクトより良い | 1 | More accurate approx on wide things |
| 単語記録表示分割 | 0 | Display splits |
| textord_debug_printable | 0 | Make debug windows printable |
| textord_space_size_is_variable | 0 | If true, word delimiter spaces are assumed to have variable width, even though characters have fixed pitch. |
| textord_tabfind_show_initial_partitions | 0 | Show partition bounds |
| textord_tabfind_show_reject_blobs | 0 | Show blobs rejected as noise |
| textord_tabfind_show_columns | 0 | Show column bounds |
| textord_tabfind_show_blocks | 0 | Show final block bounds |
| textord_tabfind_find_tables | 1 | run table detection |
| デバナガリ_スプリット_デバッグイメージ | 0 | Whether to create a debug image for split shiro-rekha process. |
| textord_show_fixed_cuts | 0 | Draw fixed pitch cell boundaries |
| エッジ使用の新しいアウトラインの複雑さ | 0 | Use the new outline complexity module |
| エッジデバッグ | 0 | turn on debugging for this module |
| エッジの子供の修正 | 0 | Remove boxy parents of char-like children |
| ギャップマップデバッグ | 0 | Say which blocks have tables |
| ギャップマップの使用終了 | 0 | Use large space at start and end of rows |
| ギャップマップ_no_isolated_quanta | 0 | Ensure gaps not less than 2quanta wide |
| テキストードヘビーnr | 0 | Vigorously remove noise |
| textord_show_initial_rows | 0 | Display row accumulation |
| textord_show_parallel_rows | 0 | Display page correlated rows |
| textord_show_expanded_rows | 0 | Display rows after expanding |
| textord_show_final_rows | 0 | Display rows after final fitting |
| textord_show_final_blobs | Display blob bounds after pre-ass | |
| textord_test_landscape | 0 | Tests refer to land/port |
| textord_parallel_baselines | 1 | Force parallel baselines |
| テキストコード_ストレート_ベースライン | 0 | Force straight baselines |
| textord_old_baselines | 1 | |
| テキストード古いx高さ | 0 | Use old xheight algorithm |
| textord_fix_xheight_bug | 1 | Use spline baseline |
| textord_fix_makerow_bug | 1 | Prevent multiple baselines |
| textord_debug_xheights | 0 | Test xheight algorithms |
| textord_biased_skewcalc | 1 | Bias skew estimates with line length |
| textord_interpolating_skew | 1 | Interpolate across gaps |
| テキストード_新しい_初期_x高さ | 1 | Use test xheight mechanism |
| テキストード_デバッグ_ブロブ | 0 | Print test blob information |
| テキストード_本当に古い_x高さ | 0 | Use original wiseowl xheight |
| textord_oldbl_debug | 0 | Debug old baseline generation |
| textord_debug_baselines | 0 | Debug baseline generation |
| textord_oldbl_paradef | 1 | Use para default mechanism |
| textord_oldbl_split_splines | 1 | Split stepped splines |
| textord_oldbl_merge_parts | 1 | Merge suspect partitions |
| 古いbl_corrfix | 1 | Improve correlation of heights |
| 古いbl_xhfix | 0 | Fix bug in modes threshold for xheights |
| テキストードオクロプスモード | 0 | Make baselines for ocropus |
| textord_tabfind_only_strokewidths | 0 | Only run stroke widths |
| textord_tabfind_show_initialtabs | 0 | Show tab candidates |
| textord_tabfind_show_finaltabs | 0 | Show tab vectors |
| textord_show_tables | 0 | Show table regions |
| textord_tablefind_show_mark | 0 | Debug table marking steps in detail |
| textord_tablefind_show_stats | 0 | Show page stats used in table finding |
| textord_tablefind_recognize_tables | 0 | Enables the table recognizer for table layout and filtering. |
| textord_all_prop | ||
| textord_debug_pitch_test | ||
| textord_disable_pitch_test | ||
| テキストコード_fast_pitch_test | ||
| テキストコード_デバッグ_ピッチ_メトリック | ||
| textord_show_row_cuts | ||
| textord_show_page_cuts | ||
| テキストードピッチチート | ||
| textord_blockndoc_fixed | ||
| textord_show_initial_words | ||
| textord_show_new_words | ||
| textord_show_fixed_words | ||
| textord_blocksall_fixed | ||
| textord_blocksall_prop | ||
| textord_blocksall_testing | ||
| テキストードテストモード | ||
| textord_pitch_rowsimilarity | ||
| 単語の頭文字 | ||
| 単語の頭文字 | ||
| 単語のデフォルトプロパティ非スペース | ||
| 単語のデフォルト固定スペース | ||
| 単語数のデフォルト制限 | ||
| テキストワードの明確な広がり | ||
| テキストスペースサイズ比 | ||
| textord_spacesize_ratioprop | ||
| テキストord_fpiqr_ratio | ||
| テキストード最大ピッチiqr | ||
| テキストフォードfpの最小幅 | ||
| テキスト下線オフセット | ||
| ambigs_debug_level | ||
| デバッグレベルを分類する | ||
| 分類規範法 | ||
| マッチャーデバッグレベル | ||
| マッチャーデバッグフラグ | ||
| 分類学習デバッグレベル | ||
| マッチャー永続クラス最小値 | ||
| プロトタイプ作成のためのmatcher_min_examples | ||
| プロトタイプ作成のための十分な例のマッチング | ||
| 分類_適応_プロト_しきい値 | ||
| 分類_適応_特徴_しきい値 | ||
| 分類クラスプルーナーしきい値 | ||
| 分類クラスプルーナー乗数 | ||
| 分類_cp_カットオフ_強度 | ||
| 整数マッチャー乗数分類 | ||
| dawg_debug_level | ||
| ハイフンデバッグレベル | ||
| ストッパー_smallword_size | ||
| ストッパーデバッグレベル | ||
| tessedit_truncate_wordchoice_log | ||
| 最大試行回数 | ||
| 修復されていないBLOB | ||
| チョップデバッグ | ||
| チョップスプリット長さ | ||
| 同じ距離を切り取る | ||
| 最小アウトラインポイントを切り取る | ||
| チョップシームパイルサイズ | ||
| チョップインサイドアングル | ||
| 最小アウトライン面積 | ||
| チョップ中央最大幅 | ||
| チョップ_x_y_ウェイト | ||
| wordrec_debug_level | ||
| wordrec_max_join_chunks | ||
| セグメント検索デバッグレベル | ||
| セグメント検索最大痛みポイント | ||
| segsearch_max_futile_classifications | ||
| 言語モデルのデバッグレベル | ||
| 言語モデルngram順序 | ||
| 言語モデルビタービリストの最大プルーニング可能数 | ||
| 言語モデルビタービリストの最大サイズ | ||
| 言語モデルの最小複合長 | ||
| ワードレック_ディスプレイ_セグメンテーション | ||
| tessedit_pageseg_mode | ||
| tessedit_ocr_engine_mode | ||
| ページeg_devanagari_split_strategy | ||
| ocr_devanagari_split_strategy | ||
| bidi_debug | ||
| 適用ボックスデバッグ | ||
| 適用ボックスページ | ||
| tessedit_bigram_debug | ||
| デバッグノイズ除去 | ||
| ノイズ最大ブロブ | ||
| 単語あたりのノイズ最大値 | ||
| デバッグ_x_ht_レベル | ||
| 品質_最小_初期_アルファ値_必要 | ||
| tessedit_tess_adaption_mode | ||
| マルチ言語デバッグレベル | ||
| 段落デバッグレベル | ||
| tessedit_preserve_min_wd_len | ||
| クランチレーティングマックス | ||
| クランチポットインジケーター | ||
| クランチ_leave_lc_strings | ||
| クランチ_leave_uc_strings | ||
| クランチロングレペティション | ||
| crunch_debug | ||
| fixsp_non_noise_limit | ||
| fixsp_done_mode | ||
| デバッグ修正スペースレベル | ||
| x_ht_許容値 | ||
| x_ht_min_change | ||
| 上付き文字デバッグ | ||
| jpg_品質 | ||
| ユーザー定義dpi | ||
| 試す最小文字数 | ||
| suspect_level | ||
| suspect_short_words | ||
| tessedit_reject_mode | ||
| tessedit_image_border | ||
| 最小の正気のx高さピクセル | ||
| tessedit_ページ番号 | ||
| tessedit_parallelize | ||
| lstm_choice_mode | ||
| lstm_choice_iterations | ||
| tosp_debug_level | ||
| 中央値に十分なスペースのサンプル数 | ||
| tosp_redo_kern_limit | ||
| tosp_few_samples | ||
| tosp_short_row | ||
| tosp_sanity_method | ||
| テキストード最大ノイズサイズ | ||
| テキストコード_ベースライン_デバッグ | ||
| textord_noise_sizefraction | ||
| テキストードノイズトランスリミット | ||
| テキストードノイズカウント | ||
| 適応のための曖昧さの使用 | ||
| 優先順位付け部門 | ||
| 分類_有効_学習 | ||
| tess_cn_matching | ||
| tess_bn_マッチング | ||
| 分類_有効_適応_マッチャー | ||
| 事前に適応されたテンプレートを使用して分類する | ||
| 適応したテンプレートを分類して保存する | ||
| 分類_有効_適応型デバッガー | ||
| 非線形ノルムを分類する | ||
| disable_character_fragments | ||
| 分類デバッグ文字フラグメント | ||
| マッチャーデバッグ分離ウィンドウ | ||
| 分類_bln_数値_モード | ||
| ロードシステムドッグ | ||
| ロード頻度 | ||
| ロード_unambig_dawg | ||
| ロードパンクドッグ | ||
| ロード番号_dawg | ||
| ロードビグラムドッグ | ||
| uft8の最初のステップのみを使用する | ||
| ストッパー_受け入れられない選択肢 | ||
| セグメント非アルファベット文字 | ||
| ドキュメントの単語を保存 | ||
| マトリックス内のフラグメントのマージ | ||
| wordrec_enable_assoc | ||
| 強制単語連想 | ||
| チョップを有効にする | ||
| チョップ垂直クリープ | ||
| 新しいシームパイルを切り刻む | ||
| 固定ピッチ文字セグメントを想定 | ||
| 単語記録スキップなし真実のない単語 | ||
| wordrec_debug_blamer | ||
| wordrec_run_blamer | ||
| 代替選択肢を保存する | ||
| language_model_ngram_on | ||
| language_model_ngram_use_
only_first_uft8_step | ||
| 言語モデルngram空間_区切り言語 | ||
| 言語モデル使用シグモイド確実性 | ||
| tessedit_resegment_from_boxes | ||
| tessedit_resegment_from_line_boxes | ||
| tessedit_train_from_boxes | ||
| tessedit_make_boxes_from_boxes(箱から箱を作る | ||
| tessedit_train_line_recognizer | ||
| tessedit_dump_pageseg_images | ||
| tessedit_do_invert | ||
| tessedit_ambigs_training | ||
| tessedit_adaption_debug | ||
| applybox_learn_chars_and_char_frags_mode | ||
| applybox_learn_ngrams_mode | ||
| tessedit_display_outwords | ||
| tessedit_dump_choices | ||
| tessedit_timing_debug | ||
| tessedit_fix_fuzzy_spaces | ||
| tessedit_unrej_any_wd | ||
| tessedit_fix_hyphens | ||
| tessedit_enable_doc_dict | ||
| tessedit_debug_fonts | ||
| tessedit_debug_block_rejection | ||
| tessedit_enable_bigram_correction | ||
| tessedit_enable_dict_correction | ||
| ノイズ除去を有効にする | ||
| tessedit_minimal_rej_pass1 | ||
| tessedit_test_adaptation | ||
| テストpt | ||
| 段落テキストベース | ||
| lstm_use_matrix | ||
| テセディット_良質_アンレジ | ||
| tessedit_use_reject_spaces | ||
| tessedit_preserve_blk_rej_perfect_wds | ||
| tessedit_preserve_row_rej_perfect_wds | ||
| tessedit_dont_blkrej_good_wds | ||
| tessedit_dont_rowrej_good_wds | ||
| tessedit_row_rej_good_docs | ||
| tessedit_reject_bad_qual_wds | ||
| tessedit_debug_doc_rejection | ||
| tessedit_debug_quality_metrics | ||
| bland_unrej | ||
| unlv_tilde_crunching | ||
| hocr_font_info | ||
| hocr_char_boxes | ||
| クランチ早期マージテス失敗 | ||
| クランチ_アーリー_コンバート_バッド_unlv_chs | ||
| ひどいゴミ | ||
| クランチ_leave_ok_strings | ||
| crunch_accept_ok | ||
| crunch_leave_accept_strings | ||
| crunch_include_numerals | ||
| tessedit_prefer_joined_punct | ||
| tessedit_write_block_separators | ||
| tessedit_write_rep_codes | ||
| tessedit_write_unlv | ||
| tessedit_create_txt | ||
| tessedit_create_hocr | ||
| tessedit_create_alto | ||
| tessedit_create_lstmbox | ||
| tessedit_create_tsv | ||
| tessedit_create_wordstrbox | ||
| tessedit_create_pdf | ||
| textonly_pdf | ||
| suspect_constrain_1Il | ||
| tessedit_minimal_rejection | ||
| tessedit_zero_rejection | ||
| tessedit_word_for_word | ||
| tessedit_zero_kelvin_rejection | ||
| tessedit_rejection_debug | ||
| tessedit_flip_0O | ||
| rej_trust_doc_dawg | ||
| rej_1Il_use_dict_word | ||
| rej_1Il_trust_permuter_type | ||
| rej_use_tess_accepted | ||
| rej_use_tess_blanks | ||
| 良いパーミッションの使用を拒否 | ||
| rej_use_sensible_wd | ||
| 承認番号のアルファベット順 | ||
| tessedit_create_boxfile | ||
| tessedit_write_images | ||
| インタラクティブ表示モード | ||
| tessedit_override_permuter | ||
| tessedit_use_primary_params_model | ||
| textord_tabfind_show_vlines | ||
| textord_use_cjk_fp_model | ||
| poly_allow_detailed_fx | ||
| tessedit_init_config_only | ||
| テキスト式検出 | ||
| textord_tabfind_vertical_text | ||
| テキストord_tabfind_force_vertical_text | ||
| 単語間のスペースを保持する | ||
| pageseg_apply_music_mask | ||
| テキストコードシングルハイトモード | ||
| tosp_old_to_method | ||
| TOSP_OLD_TO_CONSTRIN_SP_KN | ||
| tosp_only_use_prop_rows | ||
| tosp_force_wordbreak_on_punct | ||
| tosp_use_pre_chopping | ||
| tosp_old_to_bug_fix | ||
| tosp_block_use_cert_spaces | ||
| tosp_row_use_cert_spaces | ||
| tosp_narrow_blobs_not_cert | ||
| tosp_row_use_cert_spaces1 | ||
| tosp_recovery_isolated_row_stats | ||
| tosp_only_small_gaps_for_kern。 | ||
| tosp_all_flips_fuzzy | ||
| tosp_fuzzy_limit_all | ||
| textord_no_rejects | ||
| textord_show_blobs | ||
| テキスト表示ボックス | ||
| テキストワードノイズ | ||
| テキストードノイズ再行 | ||
| テキストコードノイズデバッグ | ||
| 分類学習デバッグ文字列 | ||
| ユーザー単語ファイル | ||
| ユーザー単語の接尾辞 | ||
| ユーザーパターンファイル | ||
| ユーザーパターンサフィックス | ||
| 出力曖昧語ファイル | ||
| デバッグ用の単語 | ||
| tessedit_char_ブラックリスト | ||
| tessedit_char_whitelist | ||
| tessedit_char_ブラックリスト解除 | ||
| tessedit_write_params_to_file | ||
| ボックス露出パターンを適用する | ||
| chs_leading_punct('`" | ||
| chs_trailing_punct1 | ||
| chs_trailing_punct2)'`" | ||
| アウトライン_奇数 | %| | 標準外のアウトライン数 |
| outlines_2ij!?%":; | 標準外のアウトライン数 | |
| 数値句読点 | ., | Punct. chs expected WITHIN numbers |
| 認識されない文字 | | | Output char for unidentified blobs |
| ok_repeated_ch_non_alphanum_wds | -?*= | Allow NN to unrej |
| 競合セットI_l_1 | イル1 [] | Il1 conflict set |
| ファイルタイプ | .tif | Filename extension |
| tessedit_load_sublangs | ||
| ページセパレーター | ||
| 文字の標準範囲を分類する | ||
| 分類最大評価比率 | ||
| 分類最大確実性マージン | ||
| マッチャーの良好なしきい値 | ||
| マッチャー_信頼性の高い適応結果 | ||
| マッチャー完全しきい値 | ||
| マッチャー_悪い_マッチ_パッド | ||
| マッチャーレーティングマージン | ||
| マッチャー平均ノイズサイズ | ||
| マッチャークラスタリング最大角度デルタ | ||
| 不適合ジャンクペナルティの分類 | ||
| 評価スケール | ||
| 確実性スケール | ||
| tessedit_class_miss_scale | ||
| 適応剪定係数を分類する | ||
| 適応剪定しきい値の分類 | ||
| 文字断片分類_ガベージ確実性しきい値 | ||
| スペックル_large_max_size | ||
| スペックル評価ペナルティ | ||
| xheight_penalty_subscripts | ||
| xheight_penalty_inconsistent | ||
| セグメントペナルティ辞書頻出単語 | ||
| セグメントペナルティ辞書ケースOK | ||
| セグメントペナルティ辞書ケース不良 | ||
| セグメントペナルティ辞書非単語 | ||
| 確実性スケール | ||
| stopper_nondict_certainty_base | ||
| stopper_phase2_certainty_rejection_offset | ||
| stopper_certainty_per_char | ||
| stopper_allowable_character_badness | ||
| doc_dict_pending_threshold | ||
| doc_dict_確実性しきい値 | ||
| tessedit_certainty_threshold | ||
| chop_split_dist_knob | ||
| chop_overlap_knob | ||
| chop_center_knob | ||
| chop_sharpness_knob | ||
| chop_width_change_knob | ||
| chop_ok_split | ||
| chop_good_split | ||
| セグメント検索最大文字数比率 |
最良の結果を得るためには、OCRを適用する前にIronOCRの画像前処理フィルターを使用することをお勧めします。 これらのフィルタは、特に低品質スキャンや表のような複雑なドキュメントを扱うときに、劇的に精度を向上させることができます。
よくある質問
C#でのOCRのためのIronTesseractの設定方法は?
IronTesseractを設定するには、IronTesseractインスタンスを作成し、LanguageやConfigurationなどのプロパティを設定します。OCR言語(125のサポート言語から)を指定し、BarCode読み取りを有効にし、検索可能なPDF出力を設定し、文字のホワイトリストを設定することができます。例えば: var tesseract = new IronOcr.IronTesseract { Language = IronOcr.OcrLanguage.English, Configuration = new IronOcr.TesseractConfiguration { ReadBarCodes = false, RenderSearchablePdf = true } }.};
IronTesseractはどのような入力フォーマットに対応していますか?
IronTesseractはOcrInputクラスを通して様々な入力フォーマットを受け入れます。画像(PNG、JPGなど)、PDFファイル、スキャンしたドキュメントを処理することができます。OcrInputクラスは、これらの異なるフォーマットを読み込むための柔軟なメソッドを提供しており、テキストを含むほぼ全てのドキュメントに対してOCRを簡単に実行することができます。
IronTesseractを使ってテキストと一緒にBarCodeを読むことはできますか?
IronTesseractには高度なバーコード読み取り機能があります。TesseractConfigurationでReadBarCodes = trueを設定することでバーコード検出を有効にすることができます。これにより、一度のOCR操作で同じドキュメントからテキストとバーコードの両方のデータを抽出することができます。
スキャンした文書から検索可能なPDFを作成するには?
IronTesseractは、TesseractConfigurationでRenderSearchablePdf = trueを設定することで、スキャンした文書や画像を検索可能なPDFに変換することができます。これにより、元のドキュメントの外観を維持したまま、テキストが選択可能で検索可能なPDFファイルが作成されます。
IronTesseractはどの言語のOCRをサポートしていますか?
IronTesseractはテキスト認識のために125の国際言語をサポートしています。IronOcr.OcrLanguage.English、スペイン語、中国語、アラビア語など、IronTesseractインスタンスのLanguageプロパティを設定することで言語を指定することができます。
OCR時に認識される文字を制限することはできますか?
はい、IronTesseractではTesseractConfigurationのWhiteListCharactersプロパティを通して文字のホワイトリストとブラックリストが可能です。この機能は、認識対象を英数字のみに限定するなど、想定される文字セットがわかっている場合に精度の向上に役立ちます。
複数の文書を同時にOCRするにはどうすればよいですか?
IronTesseractはバッチ処理のためのマルチスレッド機能をサポートしています。並列処理を活用して複数のドキュメントを同時にOCRすることができ、大量の画像やPDFを扱う際のパフォーマンスを大幅に向上させます。
IronOCRはどのバージョンのTesseractを使用していますか?
IronOCRは、Iron Tesseractとして知られるTesseract 5のカスタマイズされ最適化されたバージョンを使用しています。この強化されたエンジンは、.NETアプリケーションとの互換性を維持しながら、標準的なTesseractの実装に比べて精度とパフォーマンスを向上させています。

