8 |
VietOCR.NET
9 |
概要
10 |
VietOCR.NETは.NET WPF で書かれたTesseract OCRエンジンのGUIフロントエンドです。一般的な画像形式やマルチページTIFF形式の文字認識をサポートします。このプログラムはOCR処理につきまとう誤認識を修正する後処理をし、認識結果の正解率を向上させます。コマンドラインから実行すればコンソールアプリケーションとしても機能します。
11 |
バッチ処理がサポートされるようになりました。プログラムは監視フォルダ内の新しい画像ファイルを監視し、OCRエンジンを通して自動処理し出力フォルダに認識結果を出力します。
12 |
システム要件
13 |
Microsoft .NET Framework 4.8 再配布可能パッケージ。
14 |
15 | If you encounter "Exception has been thrown by the target of an invocation" errors, please install
16 | Microsoft Visual C++ 2022 Redistributable Package.
17 |
18 |
インストール
19 |
20 | If you do not have authority to install under C:\Program Files folder,
21 | you can specify another folder in Install Installation Folder dialog.
22 |
23 |
Scanning support is provided via the Windows Image Acquisition Library v2.0.
24 |
25 | PDF support is possible via GPL Ghostscript. After installation of the library, please ensure the dynamic
26 | load library gsdll64.dll is in the search path by setting the Path
27 | environment variable, which is accessible through Windows' Control Panel >
28 | System > Advanced tab > Environment Variables. For instance, append the following
29 | to Path variable value for GS version 10.06.0:
30 |
31 |
32 | ;C:\Program Files\gs\gs10.06.0\bin
33 |
34 |
35 | Spellcheck functionality is available through Hunspell, whose
36 | dictionary
37 | files (.aff, .dic) should be placed in dict
38 | folder of VietOCR.
39 |
40 |
説明
41 |
42 | Language data packs
43 | for Tesseract should be decompressed into tesseract installation folder;
44 | the data files, whose names start with ISO639-3 codes, will be placed in the tessdata
45 | subdirectory. VietOCR also provides support for downloading and installing selected
46 | language packs via Download Language Data menu item. Depending on the location
47 | of the tessdata folder, you may be required to run the program as admin
48 | to be able to install the downloaded data into the folder if it is inside a system
49 | folder, such as in C:\Program Files.
50 |
51 |
ベトナム語の言語データはTimes New Roman、Arial、Verdana、Courier Newのフォントで生成されています。そのためよく似たフォントグリフを持つ画像ではより良い認識成功率を示すでしょう。サポートしているフォントと違った見かけのフォントグリフを持つ画像をOCRするには、一般的に、特別にそれらの書体をTesseractに学習させた別の言語データパックを生成してください。一部のVNI、TCVN3(ABC)フォントの言語データも最新バージョンにバンドルされています。
52 |
53 | Images to be OCRed should be scanned at resolution from at least 200 DPI (dot per
54 | inch) to 400 DPI in monochrome (black&white) or grayscale. Scanning at higher
55 | resolutions will not necessarily result in better recognition accuracy, which currently
56 | can be higher than 97% for Vietnamese, and the next release of Tesseract may improve
57 | it even further. Even so, the actual rates still depend greatly on the quality of
58 | the scanned image. The typical settings for scanning are 300 DPI and 1 bpp (bit
59 | per pixel) black&white or 8 bpp grayscale uncompressed TIFF or PNG format.
60 |
61 |
スクリーンショット モードは低解像度の画像に対して、スクリーン プリントのように300dpiで再スケーリングし認識率を向上させます。
62 |
63 | In addition to the built-in text postprocessing algorithm, you can add your own
64 | custom text replacement scheme via a UTF-8-encoded tab-delimited text file named x.DangAmbigs.txt,
65 | where x is the ISO639-3 language code. Both plain and Regex text replacements are supported.
66 |
67 |
68 | You can put init-only and non-init control parameters in tessdata/configs/tess_configs
69 | and tess_configvars files, respectively, to modify Tesseract's
70 | behaviour.
71 |
72 |
組込みのツールにはOCR操作が便利になるように複数の画像やPDFファイルを単一のものに結合したり、メモリ不足例外が発生しそうな大きなPDFファイルを小さく分割したりする機能があります。
73 |
後処理
74 |
誤認識は一般的に3つのカテゴリに分類できます。誤認識の多くは文字の大文字/小文字に関係し(例 HOA、nhắC)、一般的なUnicode用テキストエディタで簡単に修正できます。他の多くの誤認識は、ダイアクリティカルマークの欠落、似ている形状の間違った文字など(huu – hưu、mang – marg、h0a – hoa、la – 1a、uhìu - nhìn)のOCR処理結果です。またこれらはスペルチェッカプログラムによって簡単に修正できます。組込みの後処理機能は前述の誤りの多くを修正するのに役立ちます。
75 |
誤認識の最後のカテゴリはセマンティックエラーであり、検出するのが最も困難です。これはその単語が辞書内では有効なエントリですが、文脈としては間違っていることを意味します。(例 tinh – tình、vân – vấn)これらのエラーはエディタを通して読み、元画像に応じてそれらを手作業で修正する必要があります。
76 |
組込み機能を使用してOCR誤認識の最初の2つのカテゴリを修正する方法は次のとおりです。
77 |
78 | - 行をグループ化します。各行が別々の1行段落としてOCRされるように、行が属する段落にグループ化してください。書式メニュー下の改行を削除機能を使用します。詩ではこの操作が必要ない場合があるので注意してください。
79 | - 文字ケースエラーの大部分を修正するために、同じく書式メニュー下の文字ケースを変更を選択し[センテンスケース]を選択します。残った文字ケースエラーの部分を見つけて修正します。
80 | - 統合スペルチェックを使用してスペルミスエラーを修正します。
81 |
82 |
以上の処理により一般的な誤認識の大部分を除去できます。残るセマンティックエラーは少ないですが、人間がエディタを通して読み、スキャン元の文書のようにその文書を編集する必要があります。
83 |
質問がある場合は VietOCRフォーラムに投稿してください。
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------