JP4062866B2 - Character recognition device and character recognition method - Google Patents
Character recognition device and character recognition method Download PDFInfo
- Publication number
- JP4062866B2 JP4062866B2 JP2000201853A JP2000201853A JP4062866B2 JP 4062866 B2 JP4062866 B2 JP 4062866B2 JP 2000201853 A JP2000201853 A JP 2000201853A JP 2000201853 A JP2000201853 A JP 2000201853A JP 4062866 B2 JP4062866 B2 JP 4062866B2
- Authority
- JP
- Japan
- Prior art keywords
- character
- recognition
- section
- dividing
- extracting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title description 75
- 239000002131 composite material Substances 0.000 claims description 21
- 230000002093 peripheral effect Effects 0.000 claims description 11
- 238000000605 extraction Methods 0.000 description 38
- 230000015654 memory Effects 0.000 description 33
- 238000010586 diagram Methods 0.000 description 30
- 238000004364 calculation method Methods 0.000 description 8
- 241000220225 Malus Species 0.000 description 7
- 239000013598 vector Substances 0.000 description 7
- 239000011159 matrix material Substances 0.000 description 6
- 239000000284 extract Substances 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 241000282326 Felis catus Species 0.000 description 3
- 235000021016 apples Nutrition 0.000 description 2
- 235000009508 confectionery Nutrition 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000000491 multivariate analysis Methods 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
Images
Landscapes
- Character Discrimination (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は認識装置及び認識方法に関し,特に文字認識を行う認識装置及び文字認識を行う認識方法に関するものである。
【0002】
【従来の技術】
文字認識分野には,文字毎に,文字カテゴリに属しているすべての学習サンプルを用いて該文字の標準文字パターンを求め,求められた標準文字パターンを認識辞書に記憶しておく。認識するとき,入力された未知文字パターンを認識辞書に格納されているすべての標準文字パターンと比較し,もっとも近いものが認識の結果として出力される方法がもっとも一般的な認識方法である。ここで,文字特徴量の選択方法,標準文字パターンの作成方法,距離尺度或いは類似度尺度は認識精度を左右する重要な要素である。
【0003】
標準文字パターンの作成方法について,各文字毎に,文字カテゴリに属しているすべての学習サンプルの中心値を該文字の標準文字パターンとして認識辞書に記憶させ,認識辞書を作成する方法がある。しかし,文字カテゴリに属している学習サンプルの分布がばらつき,かつ数が多い場合は,認識率が低いという問題点がある。
【0004】
認識率を上げるために,各文字毎に複数の標準文字パターンを用いて認識を行う方法がある。例えば,特開昭63−129488号公報には,マルチフォント文字を認識するために,各文字毎に複数の標準文字パターンを認識辞書に記憶しておき,その認識辞書を用いて認識を行う方法が提案された。また,学習サンプルを学習しながら,対応している標準文字パターンを修正し,或いは新しい標準文字パターンを追加して,認識辞書を作成する方法がある。例えば,特開平7−28955号公報に記載されている方法が上記したものである。しかし,これらの方法には,認識辞書に標準文字パターンの数が多いので,認識時間が長いという問題があり,文字数が多い場合には,文字認識に要する処理時間は無視できないものとなる。
【0005】
認識時間を短縮するために,例えば,特開平10−162103号公報には,手書き文字学習サンプルを用いて手書き文字認識辞書,活字文字学習サンプルを用いて活字文字認識辞書をそれぞれ作成しておき,認識するとき,入力された未知文字が手書き文字か活字文字かを判断し,手書き文字の場合は手書き文字認識辞書,活字文字の場合は活字文字認識辞書を用いて認識を行う方法が提案されている。しかし,文字フォントの種類が多いので,文字フォントの種類をすべて区別するのは容易でないし,特に手書き文字の場合は,学習サンプルの分布が一定の法則に従わないので,1つの標準文字パターンで文字カテゴリに属しているすべての学習サンプルを表現するのは,認識率が低いという問題がある。
【0006】
距離尺度或いは類似度尺度については,これまで数多く提案されている。代表的なものは,シテイブロック距離,ユークリッド距離,重み付きユークリッド距離,マハラノビス距離,投影距離などが挙げられる。これらの方法は文献『画像の処理と認識』安居院猛・長尾智晴(1992,昭晃堂)と,『基本多変量解析』浅野長一郎・江島伸興(日本規格協会),“手書き文字認識における投影距離法”池田正幸・田中英彦・岡本達(情処学論,vol.24,no.1,pp.106−112,1983)に記載されている。文字X=(x1,x2,…,xn)と文字Y=(y1,y2,…,yn)の間のシテイブロック距離Dc(X,Y)は次の公式で計算する。ここで,|Z|はZの絶対値を表す。
【0007】
【数2】
【0008】
文字X=(x1,x2,…,xn)と文字Y=(y1,y2,…,yn)の間のユークリッド距離De(X,Y)は次の公式で計算する。
【0009】
【数3】
【0010】
文字iの学習サンプルをS1,S2,…。Skとし,サンプルS1,S2,…。Skの中心値,すなわち,文字iの標準文字パターンをUiで表す。文字X=(x1,x2,…,xn)と標準文字パターンUi=(ui1,ui2,…,uin)間の重み付きユークリッド距離Dw(X,Ui)は次の公式で計算する。
【0011】
【数4】
ここで,
【0012】
【数5】
である。文字X=(x1,x2,…,xn)と標準文字パターンUi=(ui1,ui2,…,uin)間のマハラノビス距離Dm(X,Ui)は次の公式で計算する。
【0013】
【数6】
ここで,Σiは文字iの学習サンプルの共分散行列を表し,Z−1は行列Zの逆行列であり,ZTは行列Zの転置行列である。パターンX=(x1,x2,…,xn)と標準パターンUi=(ui1,ui2,…,uin)間の投影距離Dt(X,Ui)は次の公式で計算する。
【0014】
【数7】
ここで,Φjはパターンの学習サンプルから計算された固有値を降順に並べたときにj番目に位置する固有値に対応する固有ベクトルであり,(α,β)はベクトルαとβの内積を表す。
【0015】
シテイブロック距離,ユークリッド距離及び重み付きユークリッド距離は比較的簡単に求められるが,高い認識率を保証するのは困難である。マハラノビス距離は,生起確率がχ2分布に従ったデータを対象としている距離であり,生起確率の高い分布の中心部分ほど距離が近く計算される。しかし,実際の文字の学習サンプルの分布はχ2分布に従っているわけではないので,認識率を保証できない。また,文字の共分散行列を記憶するため,認識辞書が巨大であり,莫大な計算時間がかかるので,実用性が低い。
【0016】
上述した従来技術には,2つの特徴がある。(1)1つ或いは複数の標準文字パターンで文字カテゴリを代表する;(2)文字パターンと文字パターン間の距離,或いは類似度を用いて文字パターンを比較する。次に従来技術の特徴(1)と(2)は誤認が発生する重要な原因であることを示す。
【0017】
文字カテゴリに属している学習サンプルは一般に一定の分布に従わない,集中して固まっている場合もあるし,ばらばらに分散している場合もある。1つの標準文字パターンで文字カテゴリを代表した場合は,図27に示すように,文字Pの認識範囲は,該文字の標準文字パターンを中心として(特徴(1)より),標準文字パターンともっとも遠い該文字カテゴリに属している学習サンプルと標準文字パターン間の距離を半径とする(特徴(2)より)多次元円E1になる。すなわち,入力された未知文字パターンがE1範囲に入ると,文字Pと認識される可能性が非常に高い。しかし,認識範囲E1は実際の文字学習サンプルの分布範囲E2より大きいため,多くの文字の認識範囲と重なってしまう。認識するとき,入力された未知文字パターンが重なっている範囲に入ると,間違って認識されることがある。例えば,図28に示すように,文字P1の実際の分布範囲E4と文字P2の実際の分布範囲E6と重なっていないが,文字P1の認識範囲E3と文字P2の認識範囲E5と重なっている。入力された未知文字Xが文字P1の実際の分布範囲E4に入るので,文字P1と認識されるはずであるが,XがP1とP2の重なっている認識範囲に入っているので,文字P2と間違って認識される。すなわち,Xと文字P2の標準文字パターン間の距離がXと文字P1の標準文字パターン間の距離より小さいので,文字P2と誤認される。
【0018】
文字毎に複数の標準文字を用いて認識を行う場合は,認識範囲が重なっている文字の数が少なくなり,認識精度がある程度改善されるが,本質的な解決法ではない。
【0019】
文字の分布に従って文字の認識範囲を縮小する,或いは文字の分布を想定して,認識範囲を想定した分布の形に近似するような距離関数,或いは類似度関数を用いて認識を行う場合は(例えば,重み付きユークリッド距離,マハラノビス距離など),認識範囲が重なっている文字の数が少なくなり,認識精度がある程度改善されるが,分布が一定の規則に従わない文字に対して,高い認識率を保証できない問題点があり,本質的な解決法ではない。
【0020】
【発明が解決しようとする課題】
本発明は,上述した事情に鑑みてなされたもので,文字カテゴリを代表する標準文字パターンを用いて文字認識を行うときの認識率低下問題を解決し,高い認識率かつ簡単な文字認識方法を提供することを目的とするものである。
【0021】
【課題を解決するための手段】
上記の課題を解決するため,本発明は,特許請求の範囲に記載のとおりの構成を採用している。すなわち,本発明の具体的な構成では,文字パターンのペリフェラル特徴量と,ストローク特徴量と,メッシュ特徴量をそれぞれ抽出し,抽出された3種類の特徴量を並べて該文字の複合特徴量を求め,各文字毎に,文字カテゴリに属しているすべての学習サンプルから,学習サンプル特徴量の各次元毎に,次元の値を列挙し,列挙した値を変換し,変換された各次元の値を該文字のカテゴリデータとして認識辞書に記憶させ,認識辞書を作成しておく。認識するとき,文字パターンと文字カテゴリ間の類似度の計算方法を用いて,入力された未知文字パターンと認識辞書に格納されているすべての文字カテゴリデータ間の類似度を計算し,もっとも類似な文字カテゴリを認識の結果として出力することにより文字を高精度・高速かつ簡単に認識することができる。
【0022】
また,本発明によれば,特徴量の分布に対応するビット列データからなる文字カテゴリデータと,認識対象の同様の文字パターンの文字パターンデータとを比較して文字認識を行なうので精度よく認識を行なえる。さらに,複数種類の特徴量のビット列パターンを連結させればより正確な認識が可能となる。
【0023】
なお,本発明は装置および方法として実現でき,またその方法の少なくとも一部をコンピュータプログラムとして実装することができる。このコンピュータプログラムを記録した記録媒体(プログラムパッケージ)や,当該コンピュータプログラムをコンピュータシステムにインストールするためのコンピュータプログラムを記録した記録媒体が,本発明の技術的な範囲に含まれることはもちろんである。
【0024】
【発明の実施の形態】
図1は,本発明の認識装置の実施の一形態を示すブロック図である。図中,1は1文字分の文字画像を入力する手段,2は文字のペリフェラル特徴量を抽出する手段,3は文字のストローク特徴量を抽出する手段,4は文字のメッシュ特徴量を抽出する手段,5は文字の複合特徴量を求める手段,6は文字パターンと文字カテゴリ間の類似度を計算する手段,7は認識手段,8は認識辞書作成手段,8aは認識辞書を格納する手段,9は文字カテゴリ作成手段,10は記憶手段である。
【0025】
メモリM1,M2及びM3は,それぞれ特徴量抽出手段2,3,4で抽出されたペリフェラル特徴量,ストローク特徴量及びメッシュ特徴量を格納する。メモリM4は,複合特徴量を求める手段5で求められた文字の複合特徴量を格納する。メモリM5は,認識辞書から認識手段7で検出された入力された未知文字パターンともっとも類似な文字の名前とカテゴリデータを格納する。
【0026】
特徴量抽出手段2は,文字画像入力手段1で入力された1文字分の文字画像をそれぞれ横に2A‐1区分,縦に2A‐1区分に分割し,文字画像の幅或いは高さの1/Pを各区分の走査範囲として,各区分を走査してペリフェラル特徴量を抽出する。特徴量格納手段2aは前記抽出されたペリフェラル特徴量をメモリM1に格納する。
【0027】
特徴量抽出手段3は,文字画像入力手段1で入力された1文字分の文字画像をそれぞれ横に2A‐1区分,縦に2A‐1区分に分割し,各区分の走査範囲を文字画像の幅或いは高さとして,各区分を走査してストローク特徴量を抽出する。特徴量格納手段3aは前記抽出されたストローク特徴量をメモリM2に格納する。
【0028】
特徴量抽出手段4は,文字画像入力手段1で入力された1文字分の文字画像をそれぞれサイズがb画像*b画像の子領域B個,2C個,D個に分割し,各子領域を走査してメッシュ特徴量を抽出する。特徴量格納手段4aは前記抽出されたメッシュ特徴量をメモリM3に格納する。
【0029】
複合特徴量を求める手段5は,前記抽出された3種類の特徴量を並べ,1つの特徴量として求める。複合特徴量格納手段5aは前記求められた複合特徴量をメモリM4に格納する。図2は文字の複合特徴量50を示している。複合特徴量50がペリフェラル特徴量51,ストローク特徴量52,メッシュ特徴量53から構成されている。
【0030】
文字カテゴリデータ作成手段9は,文字カテゴリに属しているすべての学習サンプルを用いて文字カテゴリデータを作成する。作成された各文字カテゴリデータを用いて,認識辞書作成手段8で認識辞書を作成する。作成された認識辞書を認識辞書格納手段8aで格納する。図3は認識辞書内の認識辞書データを示す図である。認識辞書データ60は,すべての文字(m個)のデータ61〜6mから構成されている。各文字のデータは文字の名前と文字カテゴリデータのベクトルから構成されている。
【0031】
認識手段7は,類似度計算手段6を用いて,認識辞書に格納されている文字カテゴリデータの中から,入力され未知文字パターンともっとも類似な文字カテゴリを求め,その結果をメモリM5に記憶させる。記憶手段10は,認識手段7で認識された文字の名前とカテゴリデータを格納する。
【0032】
次に本発明の文字認識装置の装置適用例として,情報端末装置に適用させた場合の装置構成について説明する。図4は本発明の文字認識装置を情報端末装置に適用させた場合の装置構成を示す図である。
【0033】
情報端末装置70は,キーボート71,外部記憶装置72,ディスプレイ73,プロセッサ部74から構成される。キーボート71は,ユーザが操作を指示するための入力装置であり,その他の入力装置が付加されていてもよい。外部記憶装置72は,入力された未知文字パターンのデータや,認識辞書のデータや,認識結果や,ソフトウェアを格納する。また,特徴量格納手段2a,3a,4a,複合特徴量格納手段5a,認識辞書格納手段8aをこの外部記憶装置72の一部として構成することができる。さらに,記憶手段10によって認識された文字の名前とカテゴリデータを格納してもよい。外部記憶装置72の具体例として,例えばハードディスクなどで構成することができる。ディスプレイ73は,ユーザに対するメッセージや認識文字のデータ,認識の結果などを表示するための出力装置である。もちろん他の出力装置が付加されていてもよい。プロセッサ部74は,外部記憶装置72に格納されているソフトウェアなどに従って,実際の処理を行う。プロセッサ部74は,具体的にマイクロプロセッサや,パーソナルコンピュータなどのコンピュータシステムで構成することができる。そして,文字特徴量抽出手段2,3,4,複合特徴量を求める手段5,文字カテゴリデータ作成手段9,類似度計算手段6,認識手段7は,このプロセッサ部74の上で動作するソフトウェアによって構成することができる。
【0034】
次に本発明の文字認識装置の動作をさらに詳細に説明する。まず,特徴量抽出手段2について説明する。
【0035】
図5は特徴量抽出手段2の実施の一形態を示すブロック図である。メモリM21〜メモリM24は文字画像入力手段1で入力された1文字分の文字画像を記憶する。
横領域分割手段21は,メモリM21に記憶している1文字分の文字画像を横にA区分に分割する。例えば,図8(a)は前記文字画像を横に4(A=4)区分に分割した様子を示している。横領域分割手段22は,前記横領域分割手段21で分割されたA区分に対して,k(k=1,2,…,A‐1)区分目の下半分とk+1区分目の上半分を1区分とし,メモリM22に記憶している1文字分の文字画像を横にA‐1区分に分割する。例えば,図8(b)は前記文字画像を横に3(A‐1=4‐1=3)区分に分割した様子を示している。縦領域分割手段23は,メモリM23に記憶している1文字分の文字画像を縦にA区分に分割する。例えば,図9(a)は前記文字画像を縦に4(A=4)区分に分割した様子を示している。縦領域分割手段24は,前記縦領域分割手段23で分割されたA区分に対して,k(k=1,2,…,A‐1)区分目の右半分とk+1区分目の左半分を1区分とし,メモリM24に記憶している1文字分の文字画像を縦に3(A‐1=4‐1=3)区分に分割した様子を示している。ここで,横区分数と縦区分数は異なってもかまわない。
【0036】
走査範囲制御手段26は,横区分に対して前記文字画像の外接矩形の左辺と右辺の計2辺から文字方向に文字の幅の1/Pまで走査することを制御し,縦区分に対して前記文字画像の外接矩形の上辺と下辺の計2辺から文字方向に文字の高さの1/Pまで走査することを制御する。ここで,Pは正整数である。
【0037】
特徴抽出手段25は,まず,領域分割手段21,22により分割された横の2A‐1区分の各区分毎に,前記走査範囲の制限手段26によって制限された走査範囲において,文字画像の左辺からa回走査し(a=前記文字画像の高さ/A),最初に文字を構成する画素(黒画素)にあたるまでの背景画像の画素数を計数し,a回走査して計数された画素数の平均値を求める。続いて,領域分割手段21,22により分割された横の2A‐1区分の各区分毎に,前記走査範囲の制限手段26によって制限された走査範囲において,文字画像の右辺からa回走査し(a=前記文字画像の高さ/A),最初に文字を構成する画素(黒画素)にあたるまでの背景画像の画素数を計数し,a回走査して計数された画素数の平均値を求める。また,領域分割手段23,24により分割された縦の2A‐1区分の各区分毎に,前記走査範囲の制限手段26によって制限された走査範囲において,文字画像の上辺からa回走査し(a=前記文字画像の幅/A),最初に文字を構成する画素(黒画素)にあたるまでの背景画像の画素数を計数し,a回走査して計数された画素数の平均値を求める。最後に,領域分割手段23,24により分割された縦の2A‐1区分の各区分毎に,前記走査範囲の制限手段26によって制限された走査範囲において,文字画像の下辺からa回走査し(a=前記文字画像の幅/A),最初に文字を構成する画素(黒画素)にあたるまでの背景画像の画素数を計数し,a回走査して計数された画素数の平均値を求める。図10(a),(b)は,A=4,P=3のとき,領域分割手段21,22により分割された横7(2A‐1)区分の特徴量を抽出する様子を示す図である。図10(c),(d)は,A=4,P=3のとき,領域分割手段23,24により分割された縦7(2A‐1)区分の特徴量を抽出する様子を示す図である。
【0038】
記憶手段2aは,特徴量抽出手段25によって抽出された特徴量を図1に示すメモリM1に格納する。
【0039】
次に特徴量抽出手段3について説明する。図6は特徴量抽出手段3の実施の一形態を示すブロック図である。メモリM31〜メモリM34は文字画像入力手段1で入力された1文字分の文字画像を記憶する。
【0040】
横領域分割手段31は,メモリM31に記憶している1文字分の文字画像を横にA区分に分割する。例えば,図8(a)は前記文字画像を横に4(A=4)区分に分割した様子を示している。横領域分割手段32は,前記横領域分割手段31で分割されたA区分に対して,k(k=1,2,…,A‐1)区分目の下半分とk+1区分目の上半分を1区分とし,メモリM32に記憶している1文字分の文字画像を横にA‐1区分に分割する。例えば,図8(b)は前記文字画像を横に3(A‐1=4‐1=3)区分に分割した様子を示している。縦領域分割手段33は,メモリM33に記憶している1文字分の文字画像を縦にA区分に分割する。例えば,図9(a)は前記文字画像を縦に4(A=4)区分に分割した様子を示している。縦領域分割手段34は,前記縦領域分割手段33で分割されたA区分に対して,k(k=1,2,…,A‐1)区分目の右半分とk+1区分目の左半分を1区分とし,メモリM34に記憶している1文字分の文字画像を縦に3(A‐1=4‐1=3)区分に分割した様子を示している。ここで,横区分数と縦区分数は異なってもかまわない。
【0041】
特徴抽出手段35は,まず,領域分割手段31,32により分割された横の2A‐1区分の各区分毎に,前記文字画像の幅を走査範囲として,文字画像の左辺からa回走査し(a=前記文字画像の高さ/A),背景画素(白画素)から文字を構成する画素(黒画素)に,及び文字を構成する画素(黒画素)から背景画素(白画素)に変化する回数を計数し,a回走査して計数された回数の平均値を求める。続いて,領域分割手段33,34により分割された縦の2A‐1区分の各区分毎に,文字画像の高さを走査範囲として,文字画像の上辺からa回走査し(a=前記文字画像の幅/A),背景画素(白画素)から文字を構成する画素(黒画素)に,及び文字を構成する画素(黒画素)から背景画素(白画素)に変化する回数を計数し,a回走査して計数された回数の平均値を求める。図11(a),(b)は,A=4のとき,領域分割手段31,32により分割された横7(2A‐1)区分の特徴量を抽出する様子を示す図である。図11(c),(d)は,A=4のとき,領域分割手段33,34により分割された縦7(2A‐1)区分の特徴量を抽出する様子を示す図である。
【0042】
記憶手段3aは,特徴量抽出手段35によって抽出された特徴量を図1に示すメモリM2に格納する。
【0043】
次に特徴量抽出手段4について説明する。図7は特徴量抽出手段4の実施の一形態を示すブロック図である。メモリM41〜メモリM44は文字画像入力手段1で入力された1文字分の文字画像を記憶する。
【0044】
子領域分割手段41は,メモリM41に記憶している1文字分の文字画像をサイズがb画素*b画素の子領域B個に分割する。例えば,図12(a)は子領域分割手段41で前記文字画像を16(B=16)個の子領域に分割した様子を示している。子領域分割手段42は,前記子領域分割手段41で分割されたB個の子領域に対して,前記文字画像の右側にある子領域以外の子領域毎に,子領域の右半分と右隣の子領域の左半分を1子領域とし,C個の子領域に分割する。図12(b)は子領域分割手段42で前記文字画像を12(B=16のとき)個の子領域に分割した様子を示している。子領域分割手段43は,前記子領域分割手段41で分割されたB個の子領域に対して,前記文字画像の下側にある子領域以外の子領域毎に,子領域の下半分と下隣の子領域の上半分を1子領域とし,C個の子領域に分割する。図12(c)は子領域分割手段43で前記文字画像を12(B=16のとき)個の子領域に分割した様子を示している。子領域分割手段44は,前記子領域分割手段42で分割されたC個の子領域に対して,前記文字画像の下側にある子領域以外の子領域毎に,子領域の下半分と下隣の子領域の上半分を1子領域とし,D個の子領域に分割する。図12(d)は子領域分割手段44で前記文字画像を9(B=16,C=12のとき)個の子領域に分割した様子を示している。ここで,bとBは共に正整数であり,b*B=文字画像の幅(或いは高さ)である。
【0045】
特徴抽出手段45は,領域分割手段41,42,43,44によりそれぞれ分割されたB,C,C,D個の子領域の各子領域毎に,子領域画像の左辺から走査し,文字を構成する画素(黒画素)数を計数する
【0046】
記憶手段4aは,特徴量抽出手段45によって抽出された特徴量を図1に示すメモリM3に格納する。
【0047】
次に文字の複合特徴量を求める手段5について説明する。複合特徴量を求める手段5は,特徴抽出手段2,特徴抽出手段3及び特徴抽出手段4によって抽出された特徴量を並べ,図1に示すメモリM4に記憶させる。
【0048】
次に認識辞書格納手段8aで文字カテゴリデータを格納するときの文字カテゴリデータの作成手段9について説明する。図13は文字カテゴリデータの作成手段9の実施の一形態を示すブロック図である。
【0049】
メモリM90は1文字のすべての学習サンプル特徴量を格納している。メモリM91,M92,M93,…,M9n(nは特徴量ベクトルの次元数)は,それぞれ特徴量の各次元の列挙した値を記憶する。
【0050】
文字サンプル特徴量の入力手段90は,1文字のすべての学習サンプル特徴量を入力し,メモリM90に記憶させる。
【0051】
列挙手段91は,メモリM90に格納している1文字のすべての学習サンプルの特徴量から,次元毎に,次元のとりうる値を列挙し,列挙した各次元の値をそれぞれメモリM91,M92,M93,…,M9n記憶させる。
【0052】
特徴量の変化範囲決定手段94は,文字画像分割手段41(42,43,44)で分割された子領域内の画素数b2(メッシュ特徴量の最大値)を文字特徴量の変化範囲とする。
【0053】
カテゴリデータの表現手段93は,図14に示すように,n次元のベクトルで表現し,各次元をb2+1個のビットで表す。
【0054】
列挙した値を変換する手段92は,メモリM91,M92,M93,…,M9nに格納している各次元の列挙した値を変換する。メモリM9i(i=1,2,…,n)に記憶しているi次元目の列挙した値{ei1,ei2,.…,eis}に対して,カテゴリデータのi次元目の第eij+1ビットの値を“1”と設定し(j=1,2,…,s),その以外のビットの値を“0”と設定する。
【0055】
格納手段8aは,求められたカテゴリデータを認識辞書に格納させる。
【0056】
図15(a)は,文字カテゴリに属している5つの学習サンプルを示している。ここで,文字特徴量の次元数n=6であり,文字特徴量の変化範囲が16である。従って,該文字カテゴリデータを6次元のベクトルで表し,各次元を17bitsで表す。図15(b)は,列挙手段91で列挙された各次元の値を示している。例えば,列挙された1次元目の値は3,4,6,8であり,2次元目の値は8,10,11,12である。図15(c)は,変換手段92で求められた文字カテゴリデータを示している。
【0057】
文字カテゴリデータの作成方法から分かるように,文字カテゴリデータは,n次元空間に,文字カテゴリに属しているすべての学習サンプルが各次元毎に現れる位置の範囲を示している。例えば,図16は文字カテゴリに属しているすべての学習サンプルが1次元目,2次元目に現れる位置範囲を示している。ここで,a1,a2は1次元目の位置範囲であり,b1,b2は2次元目の位置範囲である。各次元に現れる位置範囲は連続の場合もあるし,離散の場合もある。例えば,図15(c)に示している文字カテゴリデータに対して,1次元に現れる位置範囲は3〜4,6,8であり,2次元に現れる位置範囲は8,10〜12である。3,5,6次元の位置範囲は連続的なものであり,1,2,4次元の位置範囲は離散的なものである。文字カテゴリデータで示す該文字カテゴリに属している学習サンプルが各次元毎に現れる位置範囲は,該文字の認識範囲である。図16に示す4つの長方形は該文字の認識範囲である。図に示すように,この認識範囲は比較的に文字の学習サンプルの分布に近いので,認識範囲が重なっている文字の数を大幅に削減することができる。例えば,図17(a)に示している7つの文字P1,P2,…,P7について,従来の技術により,P1〜P7の認識範囲は図17(a)に示している点線円E11〜E17である。E11はE12及びE16と,E12はE11,E13,E15及びE16と,E13はE12及びE14と,E16はE11,E12,E15,E17と重なっている。しかし,本発明により,文字の認識範囲は図17(b)に示すE21〜E27である。図から分かるように,E21,E22,…,E27は相互に重なっていない。
【0058】
次に文字パターンと文字カテゴリ間の類似度を計算する手段6について説明する。類似度の計算手段6は,メモリM4に格納されている未知文字X=(x1,x2,…,xn)と認識辞書に格納している文字カテゴリデータCat(i)=(cat1(i),cat2(i),…,catn(i))間の類似度S(X,Cat(i))は次のように計算される。
【0059】
【数8】
ここで,f(a,b)=1, if bのa+1ビット目の値=1;f(a,b)=0, if bのa+1ビット目の値=0である。
【0060】
関数f()の定義から分かるように,入力された未知文字Xのj次元目の値xjはカテゴリデータのj次元目の位置範囲に入ると,類似度がすこし高くなる。逆に,入力された未知文字Xのj次元の値xjはカテゴリデータのj次元目の位置範囲以外に入ると,類似度がすこし低くなる。すべての次元に対して,f()=1なら,類似度=1であるので,カテゴリに属しているすべての学習サンプルと該文字のカテゴリデータ間の類似度は同じであり,“1”である。認識するとき,未知文字Xが文字カテゴリデータで示す文字Pの認識範囲に入ると,S(X,P)=1になり,文字Pが認識の結果として出力される。これは従来技術で実現できなかった部分である。
【0061】
本発明の文字カテゴリデータ作成方法及び文字パターンと文字カテゴリ間の類似度の計算方法は,人間の認識機能に近似するものである。人間はものの特徴を思い出すときに,ものの各特徴及び特徴量の変化範囲が思い出される。例えば,“リンゴ”の特徴を思い出すとき,“色は赤い,黄色い或いは青いなどがあり,黒はないこと;味は甘い,甘酢っぱいなどがあり,辛いはないこと;重さが150グラム位〜450グラム位;”などが自然に思い出される。つまり,人間は学習するとき,学習対象の各特徴量を取って,各特徴及び特徴量の変化範囲を記憶していることが考えられる。例えば,いろんな“リンゴ”を学習した後,“色”,“形”,“味”,“重さ”,“高さ”,“幅”等の特徴,“色”特徴量の変化範囲が“赤色,青色,黄色”,“重さ”特徴量の変化範囲が“150グラム位〜400グラム位”,“高さ”特徴量の変化範囲が“6cm位〜12cm位”などが記憶されるはずである。認識するとき,取れた特徴量の値は学習した“リンゴ”の特徴量の変化範囲内の場合は,“リンゴ”として認識されるはずである。勿論,人間は連想という機能を持っているので,未学習したリンゴも認識できる。これは,未学習したリンゴは,学習したリンゴに似ているからである。
【0062】
次に認識手段7について説明する。認識手段7は,文字と文字カテゴリ間の類似度を計算する手段6を用いて,メモリM4に格納している未知文字パターンと,認識辞書に格納されているすべての文字カテゴリデータ間の類似度を計算し,未知文字ともっとも類似な文字カテゴリを認識の結果としてメモリM5に出力する。
【0063】
次に入力された1文字分の文字画像から,特徴量抽出手段2で文字のペリフェラル特徴量を抽出するときの動作をフローチャートを用いて説明する。図18〜図21は特徴量抽出手段2の動作手順を示すフローチャートである。図18は文字画像を横に分割された2A‐1区分の各区分毎に,区分の左辺から該区分を走査して,該分区の特徴量を抽出する動作手順のフローチャートである。
〔S1〕:未処理の区分に移動し,該区分の行数の初期値をk=1と設定し,該区分の特徴量を表す変数Feaを初期化する。
〔S2〕:各区分に対して,該区分の一番上の行の一番左の画素を取り出す。
〔S3〕:取り出した画素が背景画素であるかどうかを判定し,背景画像の場合は,S4へ行く。背景画素でない場合は,S7へ行く。
〔S4〕:Fea=Fea+1。
〔S5〕:取り出した画素が該行の左側から該行の“幅/P”番目の画素であるかどうかを判定し,該行の“幅/P”番目の画素である場合は,S6へ行く。そうではない場合は,S7へ行く。
〔S6〕:取り出した画素の右の画素を取り出す。S3へ行く。
〔S7〕:下の行に移動し,k=k+1である。S8へ行く。
〔S8〕:該区分の全行が全て処理されたかどうかを判定し,全部処理された場合は,S9へ行く。また残った場合は,S2へ行く。
〔S9〕:該区分特徴量を求める。S10へ行く。
〔S10〕:横の2A‐1区分は全て処理されたかどうかを判定し,全部処理された場合は,終了する。もた残った区分があれば,S1へ行く。
【0064】
図19は文字画像を横に分割された2A‐1区分の各区分毎に,区分の右辺から該区分を走査して,該分区の特徴量を抽出する動作手順のフローチャートである。
〔S11〕:未処理の区分に移動し,該区分の行数の初期値をk=1と設定し,該区分の特徴量を表す変数Feaを初期化する。
〔S12〕:各区分に対して,該区分の一番上の行の一番右の画素を取り出す。
〔S13〕:取り出した画素が背景画素であるかどうかを判定し,背景画像の場合は,S14へ行く。背景画素でない場合は,S17へ行く。
〔S14〕:Fea=Fea+1。
〔S15〕:取り出した画素が該行の右側から該行の“幅/P”番目の画素であるかどうかを判定し,該行の“幅/P”番目の画素である場合は,S16へ行く。そうではない場合は,S17へ行く。
〔S16〕:取り出した画素の左の画素を取り出す。S13へ行く。
〔S17〕:下の行に移動し,k=k+1である。S18へ行く。
〔S18〕:該区分の全行が全て処理されたかどうかを判定し,全部処理された場合は,S19へ行く。また残った場合は,S12へ行く。
〔S19〕:該区分特徴量を求める。S20へ行く。
〔S20〕:横の2A‐1区分は全て処理されたかどうかを判定し,全部処理された場合は,終了する。もた残った区分があれば,S11へ行く。
【0065】
図20は文字画像を縦に分割された2A‐1区分の各区分毎に,区分の上端から該区分を走査して,該分区の特徴量を抽出する動作手順のフローチャートである。
〔S21〕:未処理の区分に移動し,該区分の列数の初期値をk=1と設定し,該区分の特徴量を表す変数Feaを初期化する。
〔S22〕:各区分に対して,該区分の一番左の列の一番上の画素を取り出す。
〔S23〕:取り出した画素が背景画素であるかどうかを判定し,背景画像の場合は,S24へ行く。背景画素でない場合は,S27へ行く。
〔S24〕:Fea=Fea+1。
〔S25〕:取り出した画素が該列の上端から該列の“高さ/P”番目の画素であるかどうかを判定し,該列の“高さ/P”番目の画素である場合は,S26へ行く。そうではない場合は,S27へ行く。
〔S26〕:取り出した画素の下の画素を取り出す。S23へ行く。
〔S27〕:右の列に移動し,k=k+1である。S28へ行く。
〔S28〕:該区分の全列が全て処理されたかどうかを判定し,全部処理された場合は,S29へ行く。また残った場合は,S22へ行く。
〔S29〕:該区分特徴量を求める。S30へ行く。
〔S30〕:縦の2A‐1区分は全て処理されたかどうかを判定し,全部処理された場合は,終了する。もた残った区分があれば,S21へ行く。
【0066】
図21は文字画像を縦に分割された2A‐1区分の各区分毎に,区分の下端から該区分を走査して,該分区の特徴量を抽出する動作手順のフローチャートである。
〔S31〕:未処理の区分に移動し,該区分の列数の初期値をk=1と設定し,該区分の特徴量を表す変数Feaを初期化する。
〔S32〕:各区分に対して,該区分の一番左の列の一番下の画素を取り出す。
〔S33〕:取り出した画素が背景画素であるかどうかを判定し,背景画像の場合は,S34へ行く。背景画素でない場合は,S37へ行く。
〔S34〕:Fea=Fea+1。
〔S35〕:取り出した画素が該列の下端から該列の“高さ/P”番目の画素であるかどうかを判定し,該列の“高さ/P”番目の画素である場合は,S36へ行く。そうではない場合は,S37へ行く。
〔S36〕:取り出した画素の上の画素を取り出す。S33へ行く。
〔S37〕:右の列に移動し,k=k+1である。S38へ行く。
〔S38〕:該区分の全列が全て処理されたかどうかを判定し,全部処理された場合は,S39へ行く。また残った場合は,S32へ行く。
〔S39〕:該区分特徴量を求める。S40へ行く。
〔S40〕:縦の2A‐1区分は全て処理されたかどうかを判定し,全部処理された場合は,終了する。もた残った区分があれば,S31へ行く。
【0067】
次に入力された1文字分の文字画像から,特徴量抽出手段3で文字のストローク特徴量を抽出するときの動作をフローチャートを用いて説明する。図22および図23は特徴量抽出手段3の動作手順を示すフローチャートである。図22は文字画像を横に分割された2A‐1区分の各区分毎に,区分の左辺から該区分を走査して,該分区の特徴量を抽出する動作手順のフローチャートである。
〔S41〕:未処理の区分に移動し,該区分の行数の初期値をk=1と設定し,該区分の特徴量を表す変数Feaを初期化する。
〔S42〕:各区分に対して,該区分の一番上の行の一番左の画素及び該画素の右隣の画素を取り出す。
〔S43〕:取り出した画素が該画素の左隣の画素と同じかどうかを判定し,同じの場合は,S46へ行く。同じではない場合は,S44へ行く。
〔S44〕:Fea=Fea+1。
〔S45〕:該行の画素がすべて処理された場合は,S47へ行く。そうではない場合は,S46へ行く。
〔S46〕:取り出した画素の右の画素を取り出す。S43へ行く。
〔S47〕:下の行に移動し,k=k+1である。S48へ行く。
〔S48〕:該区分の全行が全て処理されたかどうかを判定し,全部処理された場合は,S49へ行く。また残った場合は,S42へ行く。
〔S49〕:該区分特徴量を求める。S50へ行く。
〔S50〕:横の2A‐1区分は全て処理されたかどうかを判定し,全部処理された場合は,終了する。もた残った区分があれば,S41へ行く。
【0068】
図23は文字画像を縦に分割された2A‐1区分の各区分毎に,区分の上端から該区分を走査して,該分区の特徴量を抽出する動作手順のフローチャートである。
〔S51〕:未処理の区分に移動し,該区分の列数の初期値をk=1と設定し,該区分の特徴量を表す変数Feaを初期化する。
〔S52〕:各区分に対して,該区分の一番左の列の一番上の画素及び該画素の下の画素を取り出す。
〔S53〕:取り出した画素が該画素の上の画素と同じかどうかを判定し,同じの場合は,S56へ行く。同じではない場合は,S54へ行く。
〔S54〕:Fea=Fea+1。
〔S55〕:該列の画素がすべて処理された場合は,S57へ行く。そうではない場合は,S56へ行く。
〔S56〕:取り出した画素の下の画素を取り出す。S53へ行く。
〔S57〕:右の列に移動し,k=k+1である。S58へ行く。
〔S58〕:該区分の全列が全て処理されたかどうかを判定し,全部処理された場合は,S59へ行く。また残った場合は,S52へ行く。
〔S59〕:該区分特徴量を求める。S60へ行く。
〔S60〕:縦の2A‐1区分は全て処理されたかどうかを判定し,全部処理された場合は,終了する。もた残った区分があれば,S51へ行く。
【0069】
次に入力された1文字分の文字画像から,特徴量抽出手段4で文字のメッシュ特徴量を抽出するときの動作をフローチャートを用いて説明する。図24は特徴量抽出手段4の動作手順を示すフローチャートである。
〔S61〕:各子領域に対して,該子領域の一番上の行の一番左の画素を取り出す。
〔S62〕:取り出した画素が背景画素であるかどうかを判定し,背景画素の場合は,S65へ行く。背景画素ではない場合は,S63へ行く。
〔S63〕:該子領域の特徴量を1に増やす。
〔S64〕:該行の画素がすべて処理されたかどうかを判定する。すべて処理された場合は,S66へ行く。そうではない場合は,S65へ行く。
〔S65〕:取り出した画素の右の画素を取り出す。S62へ行く。
〔S66〕:下の行に移動する。S67へ行く。
〔S67〕:該子領域の全行が全て処理されたかどうかを判定し,全部処理された場合は,S68へ行く。また残った場合は,S61へ行く。
〔S68〕:B+2C+D個の子領域は全て処理されたかどうかを判定し,全部処理された場合は,終了する。もた残った子領域があれば,S69へ行く。
〔S69〕:未処理の子領域に移動する。S61へ行く。
【0070】
次に文字カテゴリに属しているすべての学習サンプルから,文字カテゴリデータを作成する手段9の動作をフローチャートを用いて説明する。図25は文字カテゴリデータ作成手段9の動作手順を示すフローチャートである。
〔S70〕:文字の個数をmと設定し,文字特徴量ベクトル及びカテゴリデータベクトルの次元数をnと設定する。文字の学習順番i=1と設定する。
〔S71〕:文字iの学習サンプルの個数をa(i)と設定し,次元数j=1と設定する;
〔S72〕:学習サンプル特徴量のj次元目の列挙した値を記憶する集合Sを空にする。カテゴリデータのj次元目の値Cat(i,j)=0と設定し,サンプルの学習順番k=1と設定する。
〔S73〕:文字iの第k番目の学習サンプルのj次元目の値Sam(i,k,j)が集合Sに含まれるかどうかを判断する。含まれている場合は,S75へ行く。含まれていない場合はS74へ行く。
〔S74〕:Sam(i,k,j)を集合Sにに加える。
〔S75〕:次に学習するサンプルを設定する。
〔S76〕:文字iのすべての学習サンプルを学習した場合は,S77へ行く。
学習するサンプルはまた残った場合は,S73へ行く。
〔S77〕:集合Sから1の要素eを取り出す。S78へ行く。
〔S78〕:Cat(i,j)の第e+1ビットに“1”を代入する。
〔S79〕:集合Sから要素eを削除する。S80へ行く。
〔S80〕:集合Sが空であるかどうかを判定する。空の場合は,S81へ行く。空ではない場合は,S77へ行く。
〔S81〕:次に学習する次元を設定する。
〔S82〕:すべての次元が処理されたら,S72へ行く。そうではない場合は,S83へ行く。
〔S83〕:次に学習する文字を設定する。
〔S84〕:すべての文字が学習された場合は,終了する。学習文字がまた残った場合は,S71へ行く。
【0071】
次に認識手段7の動作をフローチャートを用いて説明する。図26は認識手段7の動作手順を示すフローチャートである。
〔S90〕:認識辞書に格納している文字カテゴリデータの個数をmと設定し,文字カテゴリデータの比較順番i=1,最大類似度の初期値Smax=0,認識結果を記憶する変数Res=0にする。
〔S91〕:類似度計算手段6を用いて,入力された未知文字Xと認識辞書に格納されている文字iのカテゴリデータCat(i)間の類似度S(X,Cat(i))を計算する。
〔S92〕:類似度S(X,Cat(i))が最大類似度Smaxより大きい場合は,S93へ行く。大きくない場合は,S94へ行く。
〔S93〕:類似度S(X,Cat(i))を最大類似度Smaxにコピーし,文字iを認識の結果としてResに記憶させる。
〔S94〕:次に比較する文字カテゴリデータを設定する。
〔S95〕:すべての文字カテゴリデータが比較された場合は,終了する。比較する文字カテゴリデータがまた残った場合は,S91へ行く。
【0072】
次に本発明の認識装置を用いて,具体的に文字を認識したときの認識率及び認識速度について説明する。
【0073】
文字の学習サンプルは,紙に印刷された文字画像をスキャナでコンピュータに入力されたものである。文字の個数は3455個である。13種類の文字フォントから文字毎に平均700個の学習サンプルを用意した。A=16,B=64,C=56,D=49と設定し,本発明の特徴量抽出手段を用いて,411次元の複合特徴量(124次元のペリフェラル特徴量+62次元のストローク特徴量+225次元のメッシュ特徴量)を抽出した。
【0074】
文字毎に,該文字のすべての学習サンプルから該文字のカテゴリデータを求め,認識辞書を作成する。従来の認識方法と比較するために,文字毎に,文字カテゴリに属しているすべての学習サンプルの中心値を求め,各次元毎に,重みwiを求める。求められた文字カテゴリの中心値を該文字の代表とし,認識辞書を作成する。また,すべての文字に対して,文字カテゴリに属しているすべての学習サンプルを用いて,該文字カテゴリの共分散行列,固有値及び固有ベクトルを求める。
【0075】
本発明の認識方法及び従来の認識方法を用いて,学習したサンプルを認識する実験を行った。従来の認識方法は,それぞれシテイブロック距離,ユークリッド距離,重み付きユークリッド距離,投影距離(J=3)を用いて認識を行う方法である。次の表は実験の結果を表している。
【0076】
【表1】
【0077】
従来認識方法の中に,もっとも高い認識率は97.8%であり,平均認識時間は88msであった。本発明の認識方法の認識率は99.8%であり,平均認識時間は21msであった。
【0078】
従って,文字認識分野における未知文字を認識する問題に対して,より高い認識精度かつ高速に文字を認識することが可能になる。
【0079】
以上の説明から明らかなように,本実施例の認識装置は,文字の複合特徴量を抽出し,文字カテゴリに属しているすべての学習サンプルを用いて文字カテゴリデータを求め,求められた文字カテゴリデータを認識辞書に記憶させ認識辞書を作成しておく。文字を認識するとき,文字パターンと文字カテゴリ間の類似度の計算方法を用いて,入力された未知文字を前記作成された認識辞書に格納されているすべての文字カテゴリと比較し,もっとも類似な文字カテゴリを認識の結果として出力される。これにより,入力された未知文字を高精度・高速かつ簡単に認識することができる。
【0080】
【発明の効果】
以上説明したように,本発明によれば,特徴量の分布に対応するビット列データからなる文字カテゴリデータと,認識対象の同様の文字パターンの文字パタンデータとを比較して文字認識を行なうので学習サンプルの特徴量の分布に応じた類似となり,分布により精度が落ちることがない。さらに,複数種類の特徴量のビット列パターンを連結させればより正確な認識が可能となる。
【図面の簡単な説明】
【図1】 本発明の認識装置の実施の一形態を示すブロック図である。
【図2】 文字の複合特徴量を示す図である。
【図3】 認識辞書内のデータを示す図である。
【図4】 本発明の認識装置の構成を示す図である。
【図5】 特徴量抽出手段2の実施の一形態を示すブロック図である。
【図6】 特徴量抽出手段3の実施の一形態を示すブロック図である。
【図7】 特徴量抽出手段4の実施の一形態を示すブロック図である。
【図8】 横区分分割手段で分割された区分の様子を表す図である。
【図9】 縦区分分割手段で分割された区分の様子を表す図である。
【図10】 特徴量抽出手段2で文字“A”の特徴量を抽出する様子を示す図である。
【図11】 特徴量抽出手段3で文字“A”の特徴量を抽出する様子を示す図である。
【図12】 子領域分割手段で分割された子領域の様子を表す図である。
【図13】 文字カテゴリデータの作成手段9の実施の一形態を示すブロック図である。
【図14】 文字カテゴリデータの構造を示す図である。
【図15】 文字カテゴリデータを求める方法の説明図である。
【図16】 文字カテゴリデータの意味を説明する図である
【図17】 従来技術及び本発明の技術による文字の認識範囲を示す図である。
【図18】 特徴量抽出手段2の動作手順を示すフローチャートである。
【図19】 特徴量抽出手段2の動作手順を示すフローチャートである。
【図20】 特徴量抽出手段2の動作手順を示すフローチャートである。
【図21】 特徴量抽出手段2の動作手順を示すフローチャートである。
【図22】 特徴量抽出手段3の動作手順を示すフローチャートである。
【図23】 特徴量抽出手段3の動作手順を示すフローチャートである。
【図24】 特徴量抽出手段4の動作手順を示すフローチャートである。
【図25】 文字カテゴリデータの作成手段の動作手順を示すフローチャートである。
【図26】 認識手段の動作手順を示すフローチャートである。
【図27】 文字カテゴリに属している学習サンプルの分布範囲と認識範囲を示す図である。
【図28】 従来技術で認識を行うときの問題点を示す図である。
【符号の説明】
1 文字画像入力手段,2〜4 特徴量抽出手段,5 複合特徴量を求める手段,6 文字パターンとカテゴリ間の類似度の計算手段,7 認識手段,9文字カテゴリデータ作成手段,X 入力された未知文字,Cat(i) 認識辞書に格納している文字iのカテゴリデータ。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a recognition device and a recognition method, and more particularly to a recognition device that performs character recognition and a recognition method that performs character recognition.
[0002]
[Prior art]
In the character recognition field, for each character, a standard character pattern of the character is obtained using all learning samples belonging to the character category, and the obtained standard character pattern is stored in the recognition dictionary. The most common recognition method is to compare the input unknown character pattern with all the standard character patterns stored in the recognition dictionary and output the closest one as a result of recognition. Here, the character feature selection method, the standard character pattern creation method, the distance scale, or the similarity scale are important factors that affect the recognition accuracy.
[0003]
As a standard character pattern creation method, there is a method of creating a recognition dictionary by storing, for each character, the central value of all learning samples belonging to the character category in the recognition dictionary as the standard character pattern of the character. However, when the distribution of learning samples belonging to the character category varies and the number is large, there is a problem that the recognition rate is low.
[0004]
In order to increase the recognition rate, there is a method of performing recognition using a plurality of standard character patterns for each character. For example, Japanese Laid-Open Patent Publication No. 63-129488 discloses a method of storing a plurality of standard character patterns for each character in a recognition dictionary and recognizing using the recognition dictionary in order to recognize multi-font characters. Was proposed. There is also a method of creating a recognition dictionary by learning a learning sample, correcting a corresponding standard character pattern, or adding a new standard character pattern. For example, the method described in JP-A-7-28955 is as described above. However, these methods have a problem that recognition time is long because the number of standard character patterns in the recognition dictionary is large. If the number of characters is large, the processing time required for character recognition cannot be ignored.
[0005]
In order to shorten the recognition time, for example, in Japanese Patent Application Laid-Open No. 10-162103, a handwritten character recognition dictionary is created using a handwritten character learning sample, and a type character recognition dictionary is created using a printed character learning sample. When recognizing, a method has been proposed in which it is determined whether the input unknown character is a handwritten character or a printed character, and recognition is performed using a handwritten character recognition dictionary for handwritten characters and a printed character recognition dictionary for printed characters. Yes. However, since there are many types of character fonts, it is not easy to distinguish all types of character fonts. Especially in the case of handwritten characters, the distribution of learning samples does not follow a certain rule. Representing all learning samples belonging to the character category has a problem of low recognition rate.
[0006]
Many distance scales or similarity scales have been proposed. Typical examples include city block distance, Euclidean distance, weighted Euclidean distance, Mahalanobis distance, and projection distance. These methods are described in the literature “Image processing and recognition” Takeshi Aoi and Tomoharu Nagao (1992, Shogodo) and “Basic multivariate analysis” Choichiro Asano and Shinko Ejima (Japanese Standards Association), “Projection in Handwritten Character Recognition” The distance method is described in Masayuki Ikeda, Hidehiko Tanaka, Tatsu Okamoto (Theory of Information Processing, vol. 24, no. 1, pp. 106-112, 1983). Character X = (x 1 , X 2 , ..., x n ) And the letter Y = (y 1 , Y 2 , ..., y n City block distance D between c (X, Y) is calculated by the following formula. Here, | Z | represents the absolute value of Z.
[0007]
[Expression 2]
[0008]
Character X = (x 1 , X 2 , ..., x n ) And the letter Y = (y 1 , Y 2 , ..., y n ) Euclidean distance D between e (X, Y) is calculated by the following formula.
[0009]
[Equation 3]
[0010]
Learning sample of letter i 1 , S 2 , ... S k Sample S 1 , S 2 , ... S k Is the center value of i.e., the standard character pattern of letter i i Represented by Character X = (x 1 , X 2 , ..., x n ) And standard character pattern U i = (U i1 , U i2 , ..., u in ) Weighted Euclidean distance D between w (X, U i ) Is calculated by the following formula.
[0011]
[Expression 4]
here,
[0012]
[Equation 5]
It is. Character X = (x 1 , X 2 , ..., x n ) And standard character pattern U i = (U i1 , U i2 , ..., u in ) Mahalanobis distance D between m (X, U i ) Is calculated by the following formula.
[0013]
[Formula 6]
Where Σi represents the covariance matrix of the learning sample of letter i, and Z -1 Is the inverse of the matrix Z and Z T Is a transposed matrix of the matrix Z. Pattern X = (x 1 , X 2 , ..., x n ) And standard pattern U i = (U i1 , U i2 , ..., u in ) Projection distance D t (X, U i ) Is calculated by the following formula.
[0014]
[Expression 7]
Where Φ j Is an eigenvector corresponding to the eigenvalue located at the j-th when the eigenvalues calculated from the pattern learning samples are arranged in descending order, and (α, β) represents the inner product of the vectors α and β.
[0015]
The city block distance, the Euclidean distance, and the weighted Euclidean distance can be obtained relatively easily, but it is difficult to guarantee a high recognition rate. Mahalanobis distance has an occurrence probability of χ 2 This is the distance for the data according to the distribution, and the distance is calculated closer to the center of the distribution with a higher probability of occurrence. However, the distribution of the actual character learning sample is χ 2 The recognition rate cannot be guaranteed because it does not follow the distribution. In addition, since the covariance matrix of characters is stored, the recognition dictionary is huge, and enormous calculation time is required.
[0016]
The above-described prior art has two features. (1) A character category is represented by one or a plurality of standard character patterns; (2) A character pattern is compared using a distance between character patterns and a character pattern, or similarity. Next, features (1) and (2) of the prior art show that it is an important cause of misidentification.
[0017]
The learning samples belonging to the character category generally do not follow a certain distribution, may be concentrated and may be scattered apart. When the character category is represented by one standard character pattern, as shown in FIG. 27, the recognition range of the character P is centered on the standard character pattern of the character (from the feature (1)), and the most typical character pattern. The distance between the learning sample belonging to the distant character category and the standard character pattern is a radius (from the feature (2)) to become a multidimensional circle E1. That is, if the input unknown character pattern falls within the E1 range, the possibility of being recognized as the character P is very high. However, since the recognition range E1 is larger than the distribution range E2 of the actual character learning sample, it overlaps the recognition range of many characters. When recognizing, if the entered unknown character pattern enters the overlapping area, it may be recognized incorrectly. For example, as shown in FIG. 28, the actual distribution range E4 of the character P1 and the actual distribution range E6 of the character P2 do not overlap, but the recognition range E3 of the character P1 and the recognition range E5 of the character P2 overlap. Since the input unknown character X falls within the actual distribution range E4 of the character P1, it should be recognized as the character P1, but since X falls within the recognition range where P1 and P2 overlap, the character P2 It is recognized incorrectly. That is, since the distance between the standard character pattern of X and the character P2 is smaller than the distance between the standard character patterns of X and the character P1, it is mistaken for the character P2.
[0018]
When recognition is performed using a plurality of standard characters for each character, the number of characters with overlapping recognition ranges is reduced and the recognition accuracy is improved to some extent, but this is not an essential solution.
[0019]
When performing recognition using a distance function or similarity function that reduces the character recognition range according to the character distribution or assumes a character distribution and approximates the shape of the distribution assuming the recognition range ( (For example, weighted Euclidean distance, Mahalanobis distance, etc.), the number of characters with overlapping recognition ranges is reduced and the recognition accuracy is improved to some extent, but the recognition rate is high for characters that do not follow a certain distribution rule There is a problem that cannot be guaranteed, and it is not an essential solution.
[0020]
[Problems to be solved by the invention]
The present invention has been made in view of the above-described circumstances, and solves the problem of lowering the recognition rate when performing character recognition using a standard character pattern representing a character category, and provides a simple recognition method with a high recognition rate. It is intended to provide.
[0021]
[Means for Solving the Problems]
In order to solve the above-mentioned problems, the present invention adopts a configuration as described in the claims. That is, in the specific configuration of the present invention, the peripheral feature value, stroke feature value, and mesh feature value of the character pattern are extracted, and the extracted three types of feature values are arranged to obtain the composite feature value of the character. For each character, enumerate the dimension values for each dimension of the learning sample feature value from all the learning samples belonging to the character category, convert the enumerated values, and convert the converted values for each dimension. The character category data is stored in the recognition dictionary, and a recognition dictionary is created. When recognizing, the method of calculating the similarity between character patterns and character categories is used to calculate the similarity between the input unknown character pattern and all character category data stored in the recognition dictionary. By outputting the character category as a result of recognition, it is possible to recognize the character with high accuracy, high speed and easily.
[0022]
In addition, according to the present invention, character recognition is performed by comparing character category data composed of bit string data corresponding to the distribution of feature amounts with character pattern data of similar character patterns to be recognized, so that recognition can be performed with high accuracy. The Furthermore, more accurate recognition is possible by connecting bit string patterns of a plurality of types of feature values.
[0023]
The present invention can be realized as an apparatus and a method, and at least a part of the method can be implemented as a computer program. It goes without saying that a recording medium (program package) in which the computer program is recorded and a recording medium in which the computer program for installing the computer program in a computer system is recorded are included in the technical scope of the present invention.
[0024]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing an embodiment of a recognition apparatus of the present invention. In the figure, 1 is a means for inputting a character image for one character, 2 is a means for extracting a peripheral feature amount of a character, 3 is a means for extracting a stroke feature amount of a character, and 4 is a mesh feature amount of a character. Means, 5 means for determining the composite feature of the character, 6 means for calculating the similarity between the character pattern and the character category, 7 for recognition means, 8 for recognition dictionary creation means, 8a for means for storing the recognition dictionary,
[0025]
The memories M1, M2 and M3 store the peripheral feature value, the stroke feature value and the mesh feature value extracted by the feature
[0026]
The feature quantity extraction means 2 divides the character image for one character input by the character image input means 1 into 2A-1 sections horizontally and 2A-1 sections vertically, respectively. Peripheral feature values are extracted by scanning each section with / P as the scanning range of each section. The feature quantity storage means 2a stores the extracted peripheral feature quantity in the memory M1.
[0027]
The feature amount extraction means 3 divides the character image for one character inputted by the character image input means 1 into 2A-1 section horizontally and 2A-1 section vertically, and the scanning range of each section is divided into character images. Stroke feature values are extracted by scanning each section as width or height. The feature amount storage means 3a stores the extracted stroke feature amount in the memory M2.
[0028]
The feature
[0029]
The
[0030]
The character category
[0031]
The
[0032]
Next, as a device application example of the character recognition device of the present invention, a device configuration when applied to an information terminal device will be described. FIG. 4 is a diagram showing an apparatus configuration when the character recognition apparatus of the present invention is applied to an information terminal apparatus.
[0033]
The
[0034]
Next, the operation of the character recognition apparatus of the present invention will be described in more detail. First, the feature
[0035]
FIG. 5 is a block diagram showing an embodiment of the feature quantity extraction means 2. The memories M21 to M24 store a character image for one character input by the character image input means 1.
The horizontal region dividing means 21 divides the character image for one character stored in the memory M21 horizontally into A sections. For example, FIG. 8A shows a state in which the character image is divided into 4 (A = 4) sections horizontally. The horizontal area dividing means 22 divides the lower half of the k (k = 1, 2,..., A-1) section and the upper half of the k + 1 section from the A section divided by the horizontal area dividing means 21 into one section. The character image for one character stored in the memory M22 is divided horizontally into A-1 sections. For example, FIG. 8B shows a state in which the character image is divided into 3 (A-1 = 4-1 = 3) sections horizontally. The vertical area dividing means 23 divides the character image for one character stored in the memory M23 vertically into A sections. For example, FIG. 9A shows a state in which the character image is vertically divided into 4 (A = 4) sections. The vertical area dividing means 24 performs the right half of the k (k = 1, 2,..., A-1) section and the left half of the k + 1 section with respect to the A section divided by the vertical area dividing means 23. A state is shown in which one character image stored in the memory M24 is divided into three (A-1 = 4-1 = 3) sections vertically. Here, the number of horizontal divisions and the number of vertical divisions may be different.
[0036]
The scanning range control means 26 controls the horizontal section to scan from the total two sides of the circumscribed rectangle of the character image to 1 / P of the character width in the character direction. It controls scanning from the total two sides of the circumscribed rectangle of the character image to 1 / P of the character height in the character direction. Here, P is a positive integer.
[0037]
The feature extraction means 25 first starts from the left side of the character image in the scanning range restricted by the scanning range restriction means 26 for each of the horizontal 2A-1 divisions divided by the area division means 21 and 22. Scan a times (a = height of the character image / A), count the number of pixels in the background image up to the first pixel (black pixel) constituting the character, and count the number of pixels scanned a times Find the average value of. Subsequently, for each of the horizontal 2A-1 sections divided by the area dividing means 21 and 22, scanning is performed a times from the right side of the character image in the scanning range limited by the scanning range limiting means 26 ( a = height of the character image / A), the number of pixels of the background image up to the first pixel (black pixel) constituting the character is counted, and an average value of the counted number of pixels is obtained by scanning a times. . For each of the vertical 2A-1 sections divided by the area dividing means 23 and 24, scanning is performed a times from the upper side of the character image in the scanning range limited by the scanning range limiting means 26 (a = Width of the character image / A), the number of pixels of the background image up to the first pixel (black pixel) constituting the character is counted, and an average value of the counted number of pixels is obtained by scanning a times. Finally, for each of the vertical 2A-1 sections divided by the area dividing means 23 and 24, scanning is performed a times from the lower side of the character image in the scanning range limited by the scanning range limiting means 26 ( a = width of the character image / A), the number of pixels of the background image up to the first pixel (black pixel) constituting the character is counted, and an average value of the counted number of pixels is obtained by scanning a times. FIGS. 10A and 10B are diagrams showing how feature values of the horizontal 7 (2A-1) section divided by the area dividing means 21 and 22 are extracted when A = 4 and P = 3. is there. FIGS. 10C and 10D are diagrams showing how feature quantities of 7 vertical (2A-1) sections divided by the area dividing means 23 and 24 are extracted when A = 4 and P = 3. is there.
[0038]
The
[0039]
Next, the feature
[0040]
The horizontal region dividing means 31 divides the character image for one character stored in the memory M31 horizontally into A sections. For example, FIG. 8A shows a state in which the character image is divided into 4 (A = 4) sections horizontally. The horizontal area dividing means 32 divides the lower half of the k (k = 1, 2,..., A-1) section and the upper half of the k + 1 section into one section with respect to the A section divided by the horizontal area dividing means 31. The character image for one character stored in the memory M32 is divided horizontally into A-1 sections. For example, FIG. 8B shows a state in which the character image is divided into 3 (A-1 = 4-1 = 3) sections horizontally. The vertical area dividing means 33 divides the character image for one character stored in the memory M33 vertically into A sections. For example, FIG. 9A shows a state in which the character image is vertically divided into 4 (A = 4) sections. The vertical area dividing means 34 calculates the right half of the k (k = 1, 2,..., A-1) section and the left half of the k + 1 section with respect to the A section divided by the vertical area dividing means 33. A state is shown in which one character image stored in the memory M34 is divided into 3 (A-1 = 4-1 = 3) segments vertically. Here, the number of horizontal divisions and the number of vertical divisions may be different.
[0041]
The feature extraction means 35 first scans a character image width a times from the left side of the character image for each of the horizontal 2A-1 divisions divided by the area division means 31 and 32, using the width of the character image as a scanning range ( a = height of the character image / A), changes from a background pixel (white pixel) to a pixel (black pixel) constituting a character, and from a pixel (black pixel) constituting a character to a background pixel (white pixel) The number of times is counted, and an average value of the number of times counted is obtained by scanning a times. Subsequently, for each of the vertical 2A-1 sections divided by the area dividing means 33 and 34, the height of the character image is used as a scanning range and scanned a times from the upper side of the character image (a = the character image). Width / A), the number of changes from the background pixel (white pixel) to the pixel (black pixel) constituting the character, and from the pixel constituting the character (black pixel) to the background pixel (white pixel), The average value of the number of times counted by scanning is obtained. FIGS. 11A and 11B are diagrams illustrating a state in which the feature amount of the horizontal 7 (2A-1) section divided by the area dividing means 31 and 32 is extracted when A = 4. 11 (c) and 11 (d) are diagrams showing how the feature amount of the vertical 7 (2A-1) section divided by the area dividing means 33 and 34 is extracted when A = 4.
[0042]
The storage means 3a stores the feature quantity extracted by the feature quantity extraction means 35 in the memory M2 shown in FIG.
[0043]
Next, the feature
[0044]
The child area dividing means 41 divides the character image for one character stored in the memory M41 into B child areas of size b pixels * b pixels. For example, FIG. 12A shows a state in which the character image is divided into 16 (B = 16) child regions by the child region dividing means 41. The child area dividing means 42, for the B child areas divided by the child area dividing means 41, for each child area other than the child areas on the right side of the character image, The left half of the child area is divided into C child areas. FIG. 12B shows a state in which the character image is divided into 12 (when B = 16) child regions by the child region dividing means 42. The child area dividing means 43 lowers the lower half and the lower half of the child area for each of the B child areas divided by the child area dividing means 41 for each child area other than the child areas below the character image. The upper half of the adjacent child area is defined as one child area and is divided into C child areas. FIG. 12C shows a state in which the character image is divided into 12 (when B = 16) child regions by the child region dividing means 43. The child
[0045]
The feature extraction means 45 scans from the left side of the child area image for each child area of the B, C, C, and D child areas divided by the area dividing means 41, 42, 43, and 44, respectively. Count the number of pixels (black pixels)
[0046]
The
[0047]
Next, the
[0048]
Next, the character category data creation means 9 when the character category data is stored in the recognition dictionary storage means 8a will be described. FIG. 13 is a block diagram showing an embodiment of the character category
[0049]
The memory M90 stores all learning sample feature values of one character. The memories M91, M92, M93,..., M9n (n is the number of dimensions of the feature vector) store the enumerated values of each dimension of the feature.
[0050]
The character sample feature amount input means 90 inputs all the learning sample feature amounts of one character and stores them in the memory M90.
[0051]
The enumeration means 91 enumerates possible values of dimensions for each dimension from the feature values of all learning samples of one character stored in the memory M90, and the enumerated values of the dimensions are respectively stored in the memories M91, M92, M93, ..., M9n are stored.
[0052]
The feature amount change
[0053]
As shown in FIG. 14, the category data expression means 93 is represented by an n-dimensional vector, and each dimension is represented by b. 2 Represented by +1 bit.
[0054]
The means 92 for converting the enumerated values converts the enumerated values of each dimension stored in the memories M91, M92, M93, ..., M9n. Enumerated values {e stored in the memory M9i (i = 1, 2,..., N) {e i1 , E i2 ,. ..., e is } For the i-th dimension of the category data ij The value of the +1 bit is set to “1” (j = 1, 2,..., S), and the values of the other bits are set to “0”.
[0055]
The
[0056]
FIG. 15A shows five learning samples belonging to the character category. Here, the dimension number n of the character feature amount is 6 and the change range of the character feature amount is 16. Therefore, the character category data is represented by a 6-dimensional vector, and each dimension is represented by 17 bits. FIG. 15B shows the values of each dimension listed by the listing means 91. For example, the listed first dimension values are 3, 4, 6, and 8, and the second dimension values are 8, 10, 11, and 12. FIG. 15C shows character category data obtained by the conversion means 92.
[0057]
As can be seen from the method of creating character category data, the character category data indicates a range of positions where all learning samples belonging to the character category appear in each dimension in the n-dimensional space. For example, FIG. 16 shows a position range in which all learning samples belonging to the character category appear in the first and second dimensions. Here, a1 and a2 are the first-dimensional position range, and b1 and b2 are the second-dimensional position range. The position range that appears in each dimension may be continuous or discrete. For example, with respect to the character category data shown in FIG. 15C, the position range appearing in one dimension is 3 to 4, 6 and 8, and the position range appearing in two dimensions is 8, 10 to 12. The 3rd, 5th and 6th dimensional position ranges are continuous, and the 1st, 2nd and 4th dimensional position ranges are discrete. The position range where the learning sample belonging to the character category indicated by the character category data appears for each dimension is the recognition range of the character. Four rectangles shown in FIG. 16 are recognition ranges of the characters. As shown in the figure, the recognition range is relatively close to the distribution of character learning samples, so that the number of characters with overlapping recognition ranges can be greatly reduced. For example, for the seven characters P1, P2,..., P7 shown in FIG. 17A, the recognition range of P1 to P7 is the dotted circles E11 to E17 shown in FIG. is there. E11 overlaps E12 and E16, E12 overlaps E11, E13, E15, and E16, E13 overlaps E12 and E14, and E16 overlaps E11, E12, E15, and E17. However, according to the present invention, the character recognition range is E21 to E27 shown in FIG. As can be seen, E21, E22, ..., E27 do not overlap each other.
[0058]
Next, the
[0059]
[Equation 8]
Here, f (a, b) = 1, the value of the a + 1 bit of if b = 1; f (a, b) = 0, and the value of the a + 1 bit of if b = 0.
[0060]
As can be seen from the definition of the function f (), the value x of the jth dimension of the input unknown character X j When entering the position range of the jth dimension of the category data, the similarity is slightly higher. Conversely, the j-dimensional value x of the input unknown character X j If the position is outside the position range of the jth dimension of the category data, the similarity is slightly lower. If f () = 1 for all dimensions, similarity = 1, so the similarity between all learning samples belonging to a category and category data of the character is the same, and “1”. is there. When recognizing, if the unknown character X enters the recognition range of the character P indicated by the character category data, S (X, P) = 1, and the character P is output as a recognition result. This is a part that could not be realized by the prior art.
[0061]
The character category data creation method and the similarity calculation method between character patterns and character categories according to the present invention approximate human recognition functions. When a person remembers a feature of a thing, each feature of the thing and the change range of the feature amount are remembered. For example, when recalling the characteristics of “apple”, “the color is red, yellow or blue, there is no black; the taste is sweet, sweet and sour, etc., it is not spicy; ~ 450 grams or so; ”is naturally recalled. In other words, when learning, it is considered that each feature and the change range of the feature value are stored by taking each feature value to be learned. For example, after learning various “apples”, features such as “color”, “shape”, “taste”, “weight”, “height”, “width”, etc. “Red, Blue, Yellow”, “Weight” feature change range should be “150 to 400 gram”, “Height” feature change range should be “6 to 12 centimeter” It is. When recognizing, if the value of the obtained feature value is within the change range of the learned feature value of “apple”, it should be recognized as “apple”. Of course, since humans have a function called association, they can recognize unlearned apples. This is because an unlearned apple is similar to a learned apple.
[0062]
Next, the recognition means 7 will be described. The recognition means 7 uses the
[0063]
Next, an operation when the feature
[S1]: Move to an unprocessed section, set the initial value of the number of rows in the section as k = 1, and initialize a variable Fea representing the feature amount of the section.
[S2]: For each segment, the leftmost pixel in the top row of the segment is extracted.
[S3]: It is determined whether or not the extracted pixel is a background pixel. If it is a background image, the process goes to S4. If it is not a background pixel, go to S7.
[S4]: Fea = Fea + 1.
[S5]: It is determined whether or not the extracted pixel is the “width / P” th pixel of the row from the left side of the row, and if it is the “width / P” th pixel of the row, the process proceeds to S6. go. If not, go to S7.
[S6]: The right pixel of the extracted pixel is extracted. Go to S3.
[S7]: Move to the lower row and k = k + 1. Go to S8.
[S8]: It is determined whether or not all the rows in the section have been processed. If all the rows have been processed, the process goes to S9. If it remains, go to S2.
[S9]: The segment feature amount is obtained. Go to S10.
[S10]: It is determined whether or not all the horizontal 2A-1 sections have been processed. If all sections have been processed, the process ends. If there is a remaining segment, go to S1.
[0064]
FIG. 19 is a flowchart of an operation procedure for extracting the feature amount of each segment by scanning the segment from the right side of each segment of the 2A-1 segment obtained by dividing the character image horizontally.
[S11]: Move to an unprocessed section, set an initial value of the number of rows in the section as k = 1, and initialize a variable Fea representing the feature amount of the section.
[S12]: For each segment, the rightmost pixel in the top row of the segment is extracted.
[S13]: It is determined whether or not the extracted pixel is a background pixel. If it is a background image, the process goes to S14. If it is not a background pixel, go to S17.
[S14]: Fea = Fea + 1.
[S15]: It is determined whether or not the extracted pixel is the “width / P” th pixel of the row from the right side of the row, and if it is the “width / P” th pixel of the row, the process proceeds to S16. go. If not, go to S17.
[S16]: The pixel to the left of the extracted pixel is extracted. Go to S13.
[S17]: Move to the lower row and k = k + 1. Go to S18.
[S18]: It is determined whether or not all the lines in the section have been processed. If all the lines have been processed, the process goes to S19. If it remains, go to S12.
[S19]: The segment feature amount is obtained. Go to S20.
[S20]: It is determined whether or not all of the horizontal 2A-1 sections have been processed. If there is any remaining segment, go to S11.
[0065]
FIG. 20 is a flowchart of an operation procedure for extracting the feature amount of each segment by scanning the segment from the upper end of each segment of the 2A-1 segment obtained by vertically dividing the character image.
[S21]: Move to an unprocessed section, set an initial value of the number of columns in the section as k = 1, and initialize a variable Fea representing the feature amount of the section.
[S22]: For each section, the top pixel in the leftmost column of the section is extracted.
[S23]: It is determined whether or not the extracted pixel is a background pixel. If it is a background image, the process goes to S24. If it is not a background pixel, go to S27.
[S24]: Fea = Fea + 1.
[S25]: It is determined whether or not the extracted pixel is the “height / P” th pixel of the column from the upper end of the column, and if it is the “height / P” th pixel of the column, Go to S26. If not, go to S27.
[S26]: A pixel below the extracted pixel is extracted. Go to S23.
[S27]: Move to the right column and k = k + 1. Go to S28.
[S28]: It is determined whether or not all the columns of the section have been processed. If all the columns have been processed, the process goes to S29. If it remains, go to S22.
[S29]: The segment feature amount is obtained. Go to S30.
[S30]: It is determined whether or not all vertical 2A-1 sections have been processed. If all sections have been processed, the process ends. If there is a remaining segment, go to S21.
[0066]
FIG. 21 is a flowchart of an operation procedure for extracting the feature amount of each segment by scanning the segment from the lower end of each segment of each 2A-1 segment obtained by vertically dividing the character image.
[S31]: Move to an unprocessed section, set an initial value of the number of columns in the section as k = 1, and initialize a variable Fea representing the feature amount of the section.
[S32]: For each section, the bottom pixel in the leftmost column of the section is extracted.
[S33]: It is determined whether or not the extracted pixel is a background pixel. If it is a background image, the process goes to S34. If it is not a background pixel, go to S37.
[S34]: Fea = Fea + 1.
[S35]: It is determined whether or not the extracted pixel is the “height / P” th pixel of the column from the lower end of the column, and if it is the “height / P” th pixel of the column, Go to S36. If not, go to S37.
[S36]: A pixel above the extracted pixel is extracted. Go to S33.
[S37]: Move to the right column and k = k + 1. Go to S38.
[S38]: It is determined whether all the columns of the section have been processed. If all the columns have been processed, the process goes to S39. If it remains, go to S32.
[S39]: The segment feature amount is obtained. Go to S40.
[S40]: It is determined whether or not all vertical 2A-1 sections have been processed. If all sections have been processed, the process ends. If there is any remaining segment, go to S31.
[0067]
Next, an operation when the feature
[S41]: Move to an unprocessed section, set the initial value of the number of rows in the section as k = 1, and initialize the variable Fea representing the feature amount of the section.
[S42]: For each segment, the leftmost pixel in the top row of the segment and the pixel to the right of the pixel are extracted.
[S43]: It is determined whether or not the extracted pixel is the same as the pixel adjacent to the left side of the pixel. If not, go to S44.
[S44]: Fea = Fea + 1.
[S45]: If all pixels in the row have been processed, go to S47. If not, go to S46.
[S46]: The right pixel of the extracted pixel is extracted. Go to S43.
[S47]: Move to the lower row and k = k + 1. Go to S48.
[S48]: It is determined whether or not all lines in the section have been processed. If all the lines have been processed, the process goes to S49. If it remains, go to S42.
[S49]: The segment feature amount is obtained. Go to S50.
[S50]: It is determined whether or not all the horizontal 2A-1 sections have been processed. If all sections have been processed, the process ends. If there is any remaining segment, go to S41.
[0068]
FIG. 23 is a flowchart of an operation procedure for extracting the feature amount of each segment by scanning the segment from the upper end of each segment of the 2A-1 segment obtained by vertically dividing the character image.
[S51]: Move to an unprocessed section, set an initial value of the number of columns in the section as k = 1, and initialize a variable Fea representing the feature amount of the section.
[S52]: For each segment, the top pixel and the pixel below the pixel in the leftmost column of the segment are extracted.
[S53]: It is determined whether or not the extracted pixel is the same as the pixel above the pixel. If it is the same, the process goes to S56. If not, go to S54.
[S54]: Fea = Fea + 1.
[S55]: If all the pixels in the column have been processed, go to S57. If not, go to S56.
[S56]: The pixel below the extracted pixel is extracted. Go to S53.
[S57]: Move to the right column and k = k + 1. Go to S58.
[S58]: It is determined whether all the columns of the section have been processed. If all the columns have been processed, the process goes to S59. If it remains, go to S52.
[S59]: The segment feature amount is obtained. Go to S60.
[S60]: It is determined whether or not all vertical 2A-1 sections have been processed. If all sections have been processed, the process ends. If there is a remaining segment, go to S51.
[0069]
Next, an operation when the feature
[S61]: For each child region, the leftmost pixel in the top row of the child region is extracted.
[S62]: It is determined whether or not the extracted pixel is a background pixel. If it is a background pixel, the process goes to S65. If it is not a background pixel, the process goes to S63.
[S63]: The feature amount of the child region is increased to 1.
[S64]: It is determined whether all the pixels in the row have been processed. If all are processed, go to S66. If not, go to S65.
[S65]: The right pixel of the extracted pixel is extracted. Go to S62.
[S66]: Move to the lower line. Go to S67.
[S67]: It is determined whether or not all the rows in the child area have been processed. If all the rows have been processed, the process goes to S68. If it remains, go to S61.
[S68]: It is determined whether or not all B + 2C + D child areas have been processed. If all the child areas have been processed, the process ends. If there is any remaining child area, go to S69.
[S69]: Move to an unprocessed child area. Go to S61.
[0070]
Next, the operation of the
[S70]: The number of characters is set to m, and the number of dimensions of the character feature vector and the category data vector is set to n. Character learning order i = 1 is set.
[S71]: Set the number of learning samples of the letter i as a (i) and set the number of dimensions as j = 1;
[S72]: The set S for storing the enumerated values of the j-th dimension of the learning sample feature quantity is emptied. The value Cat (i, j) of the jth dimension of the category data is set to 0, and the learning order k of the sample is set to 1.
[S73]: It is determined whether the set S includes the value Sam (i, k, j) of the j-th dimension of the k-th learning sample of the character i. If it is included, go to S75. If not, go to S74.
[S74]: Add Sam (i, k, j) to the set S.
[S75]: A sample to be learned next is set.
[S76]: If all the learning samples of the letter i have been learned, go to S77.
If samples to be learned remain, go to S73.
[S77]: One element e is extracted from the set S. Go to S78.
[S78]: “1” is substituted into the e + 1-th bit of Cat (i, j).
[S79]: The element e is deleted from the set S. Go to S80.
[S80]: It is determined whether or not the set S is empty. If it is empty, go to S81. If it is not empty, go to S77.
[S81]: The next dimension to be learned is set.
[S82]: When all dimensions are processed, go to S72. If not, go to S83.
[S83]: The character to be learned next is set.
[S84]: If all characters have been learned, the process ends. If the learning characters remain, go to S71.
[0071]
Next, the operation of the
[S90]: The number of character category data stored in the recognition dictionary is set to m, the character category data comparison order i = 1, and the maximum similarity initial value S max = 0 and the variable Res = 0 for storing the recognition result is set.
[S91]: Using the similarity calculation means 6, the similarity S (X, Cat (i)) between the input unknown character X and the category data Cat (i) of the character i stored in the recognition dictionary is obtained. calculate.
[S92]: The similarity S (X, Cat (i)) is the maximum similarity S max If larger, go to S93. If not, go to S94.
[S93]: Similarity S (X, Cat (i)) is set to maximum similarity S max And the letter i is stored in Res as a result of recognition.
[S94]: Character category data to be compared next is set.
[S95]: If all character category data have been compared, the process ends. If character category data to be compared still remains, go to S91.
[0072]
Next, the recognition rate and recognition speed when a character is specifically recognized using the recognition apparatus of the present invention will be described.
[0073]
The character learning sample is a character image printed on paper and input to a computer by a scanner. The number of characters is 3455. An average of 700 learning samples were prepared for each character from 13 types of character fonts. A = 16, B = 64, C = 56, D = 49 are set, and the feature quantity extraction means of the present invention is used to obtain a 411-dimensional composite feature quantity (124-dimensional peripheral feature quantity + 62-dimensional stroke feature quantity + 225). Dimensional mesh features) were extracted.
[0074]
For each character, category data of the character is obtained from all learning samples of the character, and a recognition dictionary is created. For comparison with the conventional recognition method, the center value of all the learning samples belonging to the character category is obtained for each character, and the weight w for each dimension. i Ask for. A recognition dictionary is created with the center value of the obtained character category as a representative of the character. For all characters, the covariance matrix, eigenvalues, and eigenvectors of the character category are obtained using all learning samples belonging to the character category.
[0075]
An experiment for recognizing a learned sample was performed using the recognition method of the present invention and the conventional recognition method. The conventional recognition method is a method of performing recognition using the city block distance, the Euclidean distance, the weighted Euclidean distance, and the projection distance (J = 3), respectively. The following table shows the results of the experiment.
[0076]
[Table 1]
[0077]
Among the conventional recognition methods, the highest recognition rate was 97.8%, and the average recognition time was 88 ms. The recognition rate of the recognition method of the present invention was 99.8%, and the average recognition time was 21 ms.
[0078]
Therefore, it is possible to recognize characters with higher recognition accuracy and at a higher speed with respect to the problem of recognizing unknown characters in the character recognition field.
[0079]
As is clear from the above description, the recognition apparatus of the present embodiment extracts the composite feature quantity of characters, obtains character category data using all learning samples belonging to the character category, and obtains the obtained character category. Data is stored in a recognition dictionary and a recognition dictionary is created. When recognizing characters, the method of calculating similarity between character patterns and character categories is used to compare the input unknown characters with all character categories stored in the created recognition dictionary. The character category is output as a result of recognition. As a result, the input unknown character can be easily recognized with high accuracy, high speed, and high speed.
[0080]
【The invention's effect】
As described above, according to the present invention, character category data composed of bit string data corresponding to the distribution of feature values is compared with character pattern data of similar character patterns to be recognized, so that character recognition is performed. Similar to the distribution of sample features, accuracy is not reduced by the distribution. Furthermore, more accurate recognition is possible by connecting bit string patterns of a plurality of types of feature values.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of a recognition apparatus of the present invention.
FIG. 2 is a diagram illustrating a composite feature amount of characters.
FIG. 3 is a diagram showing data in a recognition dictionary.
FIG. 4 is a diagram showing a configuration of a recognition apparatus according to the present invention.
FIG. 5 is a block diagram showing an embodiment of a feature
FIG. 6 is a block diagram showing an embodiment of a feature
FIG. 7 is a block diagram showing an embodiment of the feature quantity extraction means 4;
FIG. 8 is a diagram illustrating a state of a division divided by a horizontal division dividing unit.
FIG. 9 is a diagram illustrating a state of a division divided by a vertical division dividing unit.
FIG. 10 is a diagram illustrating a state in which a feature amount of a character “A” is extracted by the feature
FIG. 11 is a diagram illustrating a state in which a feature amount of the character “A” is extracted by the feature
FIG. 12 is a diagram illustrating a state of a child area divided by a child area dividing unit.
FIG. 13 is a block diagram showing an embodiment of character category
FIG. 14 is a diagram illustrating a structure of character category data.
FIG. 15 is an explanatory diagram of a method for obtaining character category data.
FIG. 16 is a diagram for explaining the meaning of character category data;
FIG. 17 is a diagram illustrating a character recognition range according to the conventional technique and the technique of the present invention.
FIG. 18 is a flowchart showing an operation procedure of the feature
FIG. 19 is a flowchart showing an operation procedure of the feature
FIG. 20 is a flowchart showing an operation procedure of the feature
FIG. 21 is a flowchart showing an operation procedure of the feature
FIG. 22 is a flowchart showing an operation procedure of the feature
FIG. 23 is a flowchart showing an operation procedure of the feature
FIG. 24 is a flowchart showing an operation procedure of the feature
FIG. 25 is a flowchart showing an operation procedure of a character category data creation unit;
FIG. 26 is a flowchart showing an operation procedure of a recognition unit.
FIG. 27 is a diagram showing a distribution range and a recognition range of learning samples belonging to a character category.
FIG. 28 is a diagram illustrating a problem when recognition is performed using a conventional technique.
[Explanation of symbols]
1 character image input means, 2 to 4 feature quantity extraction means, 5 composite feature quantity calculation means, 6 character pattern and category similarity calculation means, 7 recognition means, 9 character category data creation means, X input Unknown character, Cat (i) Category data of character i stored in recognition dictionary.
Claims (2)
前記文字パターンの複合特徴量を抽出する手段は,文字のペリフェラル特徴量を抽出する手段と,文字のストローク特徴量を抽出する手段と,文字のメッシュ特徴量を抽出する手段とを備え,
前記文字のペリフェラル特徴量を抽出する手段は,1文字分の文字画像を入力する手段と,前記文字画像を記憶する手段と,前記文字画像の領域を分割する手段と,文字の特徴量を取るための走査範囲の制限手段と,前記文字画像の背景画像の特徴を取る手段とを有し,
前記文字画像の領域を分割する手段は,前記文字画像の領域を横にA区分に分割する手段と,前記横に分割されたA区分に対して,k(k=1,2,…,A‐1)区分目の下半分とk+1区分目の上半分を1区分とし,横にA‐1区分に分割する手段と,前記文字画像の領域を縦にA区分に分割する手段と,前記縦に分割されたA区分に対して,k(k=1,2,…,A‐1)区分目の右半分とk+1区分目の左半分を1区分とし,縦にA‐1区分に分割する手段を有することを特徴とする文字認識装置。 In a character recognition device for character recognition, means for extracting a composite feature quantity of a character pattern, means for creating character category data for each character, means for creating a recognition dictionary using the created character category data, All the character category data stored in the recognition dictionary with the input unknown character pattern using the means for calculating the similarity. And the most similar character category is output as a recognition result,
The means for extracting the composite feature amount of the character pattern comprises means for extracting a peripheral feature amount of the character, means for extracting the stroke feature amount of the character, and means for extracting the mesh feature amount of the character,
The means for extracting the peripheral feature value of the character includes means for inputting a character image for one character, means for storing the character image, means for dividing the region of the character image, and character feature amount Means for limiting the scanning range, and means for taking the characteristics of the background image of the character image,
It said means for dividing an area of a character image, means for dividing the A segment an area of the character image in the horizontal, with respect to divided Category A to the horizontal, k (k = 1,2, ... , A -1) A means for dividing the lower half of the section and the upper half of the (k + 1) section into one section, horizontally dividing the A-1 section, means for dividing the character image region vertically into the A section, and dividing the length vertically Means for dividing the right half of the k (k = 1, 2,..., A-1) section and the left half of the (k + 1) section into one section and dividing it vertically into the A-1 section. Yes features and to Rubun shape recognition device to.
前記文字パターンの複合特徴量を抽出する手段は,文字のペリフェラル特徴量を抽出する手段と,文字のストローク特徴量を抽出する手段と,文字のメッシュ特徴量を抽出する手段とを備え,
前記文字のストローク特徴量を抽出する手段は,1文字分の文字画像を入力する手段と,前記文字画像を記憶する手段と,前記文字画像の領域分割手段と,前記文字画像のストローク特徴量を抽出する手段とを有し,
前記文字画像の領域分割手段は,前記文字画像の領域を横にA区分に分割する手段と,前記横に分割されたA区分に対して,k(k=1,2,…,A‐1)区分目の下半分とk+1区分目の上半分を1区分とし,横にA‐1区分に分割する手段と,前記文字画像の領域を縦にA区分に分割する手段と,前記縦に分割されたA区分に対して,k(k=1,2,…,A‐1)区分目の右半分とk+1区分目の左半分を1区分とし,縦にA‐1区分に分割する手段を有することを特徴とする文字認識装置。 In a character recognition device for character recognition, means for extracting a composite feature quantity of a character pattern, means for creating character category data for each character, means for creating a recognition dictionary using the created character category data, All the character category data stored in the recognition dictionary with the input unknown character pattern using the means for calculating the similarity. And the most similar character category is output as a recognition result,
The means for extracting the composite feature amount of the character pattern comprises means for extracting a peripheral feature amount of the character, means for extracting the stroke feature amount of the character, and means for extracting the mesh feature amount of the character,
The means for extracting the stroke characteristic amount of the character includes means for inputting a character image for one character, means for storing the character image, region dividing means for the character image, and stroke characteristic amount of the character image. Means for extracting,
The character image region dividing means includes means for dividing the character image region horizontally into A sections, and k (k = 1, 2,..., A-1) with respect to the horizontally divided A sections. ) The lower half of the section and the upper half of the (k + 1) section are divided into one section, horizontally divided into A-1 sections, means for dividing the character image area vertically into the A sections, and the vertical division for a division, k (k = 1,2, ... , a-1) was classified as Category th right half and k + 1 division th left half a segment, to have a means for dividing the a-1 divided vertically features and to Rubun shape recognizer that.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000201853A JP4062866B2 (en) | 2000-07-04 | 2000-07-04 | Character recognition device and character recognition method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000201853A JP4062866B2 (en) | 2000-07-04 | 2000-07-04 | Character recognition device and character recognition method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2002024765A JP2002024765A (en) | 2002-01-25 |
| JP4062866B2 true JP4062866B2 (en) | 2008-03-19 |
Family
ID=18699462
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000201853A Expired - Fee Related JP4062866B2 (en) | 2000-07-04 | 2000-07-04 | Character recognition device and character recognition method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4062866B2 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100755534B1 (en) * | 2006-04-04 | 2007-09-06 | 오성훈 | Drain road |
| CN101354704B (en) | 2007-07-23 | 2011-01-12 | 夏普株式会社 | Apparatus for making grapheme characteristic dictionary and document image processing apparatus having the same |
| CN101354703B (en) * | 2007-07-23 | 2010-11-17 | 夏普株式会社 | Document image processing device and document image processing method |
| CN115830599B (en) * | 2023-02-08 | 2023-04-21 | 成都数联云算科技有限公司 | Industrial character recognition method, model training method, device, equipment and medium |
-
2000
- 2000-07-04 JP JP2000201853A patent/JP4062866B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2002024765A (en) | 2002-01-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6081620A (en) | System and method for pattern recognition | |
| US6104833A (en) | Pattern recognizing apparatus and method | |
| US4975975A (en) | Hierarchical parametric apparatus and method for recognizing drawn characters | |
| US7327883B2 (en) | Character recognition system and method | |
| Heutte et al. | A structural/statistical feature based vector for handwritten character recognition | |
| CN101937513B (en) | Information processing apparatus and information processing method | |
| US7233697B2 (en) | Character recognition device and a method therefor | |
| US5539840A (en) | Multifont optical character recognition using a box connectivity approach | |
| CN107368831A (en) | English words and digit recognition method in a kind of natural scene image | |
| JP2010134957A (en) | Pattern recognition method | |
| US5272766A (en) | OCR system for recognizing user-specified custom fonts in addition to standard fonts using three-layer templates | |
| JP4062866B2 (en) | Character recognition device and character recognition method | |
| EP0617381B1 (en) | Character recognition | |
| JP2007058882A (en) | Pattern recognition device | |
| JPH09245125A (en) | Pattern recognition device and dictionary correction method in the device | |
| JPH04114560A (en) | Automatic document input device | |
| CN116343229A (en) | Natural Scene Braille Character Recognition Based on Mining Edge Features | |
| CA2421673C (en) | Character recognition system and method | |
| CN119942252B (en) | Aluminum profile classification method | |
| JP2001202521A (en) | Pattern recognition device and method | |
| Sas et al. | Semi-supervised handwritten word segmentation using character samples similarity maximization and evolutionary algorithm | |
| CN120411453A (en) | A system for designing and automatically generating agricultural product packaging | |
| JPH02125391A (en) | Associative matching recognition system | |
| Flora et al. | A Survey on Feature Extraction Methods & Classifiers for Handwritten Gurmukhi Character Recognition | |
| Li et al. | Gene classification using an improved SVM classifier with soft decision boundary |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040109 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070327 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070410 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070611 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070821 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071019 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20071211 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20071224 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110111 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120111 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120111 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130111 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130111 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140111 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |