JP4442977B2 - Character recognition device, character image interpolation method, and recording medium recording character image interpolation program - Google Patents
Character recognition device, character image interpolation method, and recording medium recording character image interpolation program Download PDFInfo
- Publication number
- JP4442977B2 JP4442977B2 JP2000028855A JP2000028855A JP4442977B2 JP 4442977 B2 JP4442977 B2 JP 4442977B2 JP 2000028855 A JP2000028855 A JP 2000028855A JP 2000028855 A JP2000028855 A JP 2000028855A JP 4442977 B2 JP4442977 B2 JP 4442977B2
- Authority
- JP
- Japan
- Prior art keywords
- character
- frame line
- character frame
- interpolation
- image
- 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 - Lifetime
Links
- 238000000034 method Methods 0.000 title claims description 40
- 238000001514 detection method Methods 0.000 claims description 45
- 238000000926 separation method Methods 0.000 claims description 3
- 230000002093 peripheral effect Effects 0.000 description 25
- 238000010586 diagram Methods 0.000 description 21
- 238000012217 deletion Methods 0.000 description 5
- 230000037430 deletion Effects 0.000 description 5
- 230000015654 memory Effects 0.000 description 4
- 239000013598 vector Substances 0.000 description 4
- 238000012015 optical character recognition Methods 0.000 description 3
- 230000000149 penetrating effect Effects 0.000 description 3
- 230000007704 transition Effects 0.000 description 3
- 230000003936 working memory Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Landscapes
- Character Input (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は文字認識装置に関し、特に、原稿読み取り時の文字枠や罫線(以下、文字枠線と記す)の消去時に生じた文字イメージ部分の補間技術に関する。
【0002】
【従来の技術】
光学的文字読取装置(OCR)では帳票や原稿上の文字を読み取って電気信号に変換し文字イメージを出力するが、帳票には、通常、文字枠線が印刷されており文字は文字枠線内に収まるように印刷或いは記入されるので、読み取りの障害にならないように文字枠線は記入者に認識できるが装置には検出できないドロップアウトカラーで印刷されている場合が多い。
【0003】
しかし、ドロップアウトカラーは特殊な色のため帳票の印刷コストが高くなりがちな点やドロップアウトカラーは通常OCRに対し1色に決まっているので帳票の種類によって色分けをすることができない点、及びドロップアウトカラーは非常に色が淡いので見づらい点、等の不都合がある。
【0004】
上述したような不具合を解消するため、文字枠線を非ドロップアウトカラーで印刷した帳票を光学的に読み取って文字を認識する場合に、その前段処理として文字枠線を検出して消去する枠線消去(除去)処理を行うように構成した文字認識装置がある。
【0005】
【発明が解決しようとする課題】
しかしながら、上記枠線消去処理を行う際、文字枠と文字ストロークが図14(b)に示すように接触交差していると、接触交差している個所の文字ストロークのイメージも消去され欠落してしまうのでこの個所のイメージを補間する必要がある。
【0006】
枠線消去を行った場合の文字枠線との交差部分の欠落個所の補間方法として、図14(a)に示すように、文字枠線と文字ストロークが接触交差している個所A,Bを検出し、同時に個所における文字ストロークの方向DA,DBを検出し、A,Bの位置関係やDA,DBの向きなどを考慮して補間するか否かを判定し、補間すると判定された場合、交差部分の欠落個所(交差個所A,Bで挟まれた文字枠線の部分)の領域の埋め方法が考えられる。
【0007】
しかし、この方法では図14(a)に示したように文字ストロークが文字枠線Fを貫いて交差している場合には補間できるが、図14(b)に示すように文字ストロークが文字枠線Fを貫くことなく接触している状態の場合には補間することができないといった問題点があった。これにより、例えば、文字イメージが一文字ずつ切り出され認識処理に供せられるとき本来一つの文字イメージを形成するブロックが図14(b)のように別々のブロックK1、K2に別れてしまい、2つの文字として認識されてしまう可能性があるといった問題点もあった。
【0008】
本発明は、上記問題点に鑑みてなされたものであり、非ドロップアウトカラーで印刷された帳票原稿上の文字認識を行う際の文字枠線消去処理時に、文字枠線と共に消去された接触交差部分について、文字ストロークが文字枠線を貫かずに接触している場合にも文字枠線と共に消去された文字イメージ部分を補間し得る文字認識装置及び文字イメージ補間方法の提供を目的とする。
【0009】
【課題を解決するための手段】
上記課題を解決するために、請求項1に記載の発明では、原稿の読み取りイメージから切り出されたフィールドイメージの傾きを補正した傾き補正後のフィールドイメージからフィールドを構成する文字枠線を検出し、検出した文字枠線を消去することにより文字枠線イメージを消去する文字枠線消去手段と、この文字枠線消去手段によって文字枠線が消去された文字イメージから1文字ずつ文字イメージを切り出す切り出し手段と、この切り出された文字イメージの認識処理を行う文字認識手段と、を備えた文字認識装置において、文字枠線消去手段によって文字枠線が消去された文字イメージのうち、文字枠線の消去によって欠落した部分を補間する文字イメージ補間手段を備え、文字イメージ補間手段は、傾き補正後のフィールドイメージにおいて、文字枠線消去手段による文字枠線の消去前に文字ストロークが文字枠線を貫くように交差していた交差個所およびストローク方向や文字イメージ部分が文字枠線に重複するように接触交差していた接触交差個所を検出する接触交差個所検出手段と、接触交差個所検出手段によって検出された交差個所のうち、ある交差個所Aについて文字枠線から所定距離だけ離れた位置から該交差個所Aでその文字枠線と交差するように文字ストロークを伸張したとき伸張した先に交差個所Bがあった場合に交差個所Aの属する文字ストロークと交差個所Bの属する文字ストロークを同一文字ストロークとして交差個所A,Bの位置情報とストローク方向情報を補間対象領域情報として補間対象登録テーブルに登録するストローク方向補間決定手段と、接触交差個所検出手段によって検出された接触交差個所のうち、ストローク方向補間決定手段によって補間対象登録テーブルに登録された補間対象領域に属する交差個所を除き、文字枠線の接触交差個所の全ての組み合わせについて、対になった接触交差個所が隣接しているか否かをそれぞれ判定し、更に隣接していると判定された接触交差個所の対が文字枠線から所定距離以上離れているか否かを判定し、文字枠線からそれぞれ所定距離以上離れていると判定された接触交差個所の対の位置情報を補間対象領域情報として補間対象登録テーブルに登録する文字枠線補間決定手段と、補間対象登録テーブルに登録されている補間対象領域情報を基に文字枠線と共に消去された文字イメージ部分を補間する文字イメージ補間処理手段と、を有することを特徴とする文字認識装置を提供する。
【0016】
また、請求項2に記載の発明では、原稿の読み取りイメージから切り出されたフィールドイメージの傾きを補正した傾き補正後のフィールドイメージからフィールドを構成する文字枠線を検出し、検出した文字枠線を消去して文字枠線イメージを消去し、文字枠線が消去された文字イメージから1文字ずつ文字イメージを切り出して文字イメージの認識処理を行う文字認識を行う文字認識装置における、文字枠線と共に消去された文字イメージ部分を補間する文字イメージ補間方法であって、傾き補正後のフィールドイメージにおいて、文字枠線の消去前に文字ストロークが文字枠線を貫くように交差していた交差個所およびストローク方向や文字イメージ部分が文字枠線に重複するように接触交差していた接触交差個所を検出する接触交差個所検出ステップ、接触交差個所検出ステップによって検出された交差個所のうち、ある交差個所Aについて文字枠線から所定距離だけ離れた位置から該交差個所Aを経て該文字枠線と交差するように文字ストロークを伸張したとき伸張した先に交差個所Bがあった場合に交差個所Aの属する文字ストロークと交差個所Bの属する文字ストロークを同一文字ストロークとして交差個所A,Bの位置情報とストローク方向情報を補間対象領域情報として補間対象登録テーブルに登録するストローク方向補間決定ステップ、接触交差個所検出ステップによって検出された接触交差個所のうち、ストローク方向補間決定ステップによって補間対象登録テーブルに登録された補間対象領域に属する交差個所を除き、文字枠線の接触交差個所の全ての組み合わせについて、対になった接触交差個所が隣接しているか否かをそれぞれ判定する隣接判定ステップ、隣接判定ステップで隣接していると判定された接触交差個所の対が文字枠線からそれぞれ所定距離以上離れているか否かを判定する離間距離判定ステップ、離間距離判定ステップで文字枠線から所定距離以上離れていると判定された接触交差個所の対の位置情報を補間対象領域情報として補間対象登録テーブルに登録する補間対象領域情報登録ステップ、補間対象登録テーブルに登録されている補間対象領域情報を基に文字枠線と共に消去された文字イメージ部分を補間する文字イメージ補間処理ステップ、からなることを特徴とする文字イメージ補間方法を提供する。
【0020】
【発明の実施の形態】
[文字認識装置の構成例]
図1は文字認識装置の一実施例の構成を示すブロック図であり、図1(a)は全体構成図、図1(b)は文字枠線除去部の構成例を示すブロック図である。
【0021】
図1(a)で、文字認識装置1は、帳票読み取り部2、文字枠線除去部3、文字切り出し部4、認識部5、制御部6及びRAMや磁気ディスク等のメモリ(図示せず)から構成されている。
【0022】
帳票読み取り部2は帳票を光学的に読み取って電気信号に変換し、帳票イメージを出力する。また、文字枠線除去部3は帳票読み取り部2で読み取った帳票イメージから文字枠線を検出して文字枠線のイメージを除去した文字イメージを出力する。
また、文字切り出し部4は、文字枠線除去部3によって文字枠線が除去されたイメージから1文字ずつの文字イメージを切り出し、出力する。また、文字認識部5は辞書部(図示せず)を備え、文字切り出し部4によって取得された文字イメージから特徴検出を行った後、辞書部に登録された標準的な特徴量との距離計算等を行って文字認識を行い、認識文字コード又は棄却コードを出力する。
また、制御部6はCPUおよびその周辺回路からなり、上述の各構成部分の動作を制御する。また、上記文字枠線除去部3、文字切り出し部4、認識部5は実施例ではプログラムモジュールからなり、ROM或いは磁気ディスクやフロッピディスク等のリムバブルなメモリに記録され、文字認識装置1の起動時に適時読み出されてRAMに記憶され制御部6の制御化で実行制御される。
【0023】
[文字枠線除去部の構成例]
図1(b)で、文字枠線除去部3は、フィールドイメージ切り出し部31、フィールドイメージ回転補正部32、文字枠線検出部33、文字枠線消去部34及び補間処理部35を備えている。
フィールドイメージ切り出し部31はフィールド情報を基に帳票イメージからフィールドの領域座標を算出し、フィールドイメージを切り出す。また、フィールドイメージ回転補正部32はフィールドイメージ切り出し部31によって切り出されたフィールドイメージを帳票の傾きに応じて回転し、文字枠線が水平及び垂直な状態になるよう補正する。
また、文字枠線検出部33はフィールドイメージ回転補正部32によって傾き補正されたフィールドイメージからフィールドを構成する文字枠線(縦線及び横線)の位置を検出する(図2)。
また、文字枠線消去部34は文字枠線検出部33によって検出された文字枠線イメージを消去する。これにより、フィールドイメージから文字枠線検出部33によって検出された文字枠線(縦線及び横線)部分に交差或いは接触交差するフィールドイメージ部分が消去されたフィールドイメージが出力される。
また、補間処理部35は、文字枠線消去部34によって文字枠線が消去されたフィールドイメージから接触交差個所(後述)を検出し、文字ストロークのうち文字枠線の消去によって欠落した部分を補間することにより文字ストロークを復元する。
【0024】
[文字枠線検出部による文字枠線の位置情報検出方法]
図2は、文字枠線検出部33によってフィールドイメージから検出される文字枠線の位置情報の説明図である。
図2で、記号IMはフィールドイメージ回転補正部32によって傾き補正されたフィールドイメージを示す。文字枠線検出部33は横文字枠線領域及び縦文字枠線領域を検出する(フィールドの帳票イメージ上での位置は制御部6により算出される。また、フィールドの傾きも制御部6により算出される)。また、文字枠線検出部33によって検出される横文字枠線領域及び縦文字枠線領域の位置情報は図示のような横長の矩形領域(HF1、HF2)及び縦長の矩形領域(VF1〜VF5)の形で保持される。なお、この場合、横方向はフィールドイメージの左端から右端まで、縦方向はフィールドイメージの上端から下端までとする。
【0025】
[文字枠線消去部の構成例]
図3は、文字枠線消去部34の一実施例の構成を示すブロック図であり、図3(a)は文字枠線消去部の構成例、図3(b)は文字枠線周辺領域残骸消去処理部の構成例を示すブロック図である。
【0026】
図3(a)で、文字枠線消去部34は、文字枠線領域黒画素消去処理部341及び文字枠線周辺領域残骸消去処理部342からなっており、文字枠線領域黒画素消去処理部341はフィールドイメージから前述(図2)した横文字枠領域及び縦文字枠領域の黒画素(この例では黒画素としたがこれに限定されない。つまり、文字枠線のイメージを構成する画素)を消去し、文字枠線周辺領域残骸消去処理部342は文字枠線の周辺の文字枠線の消し残された残骸及びノイズを検出し、消去する。
【0027】
(文字枠線周辺領域残骸消去処理部)
図3(b)で、文字枠線周辺領域残骸消去処理部342は、文字枠線周辺領域設定部343、黒画素ブロック化部344、黒画素ブロック消去判定部345、黒画素ブロック消去部346からなっている。
文字枠線周辺領域設定部343は文字枠線の周辺に残存消去処理を施す領域である文字枠線周辺領域を設定し(文字枠線領域については後述)、黒画素ブロック化部344は文字枠線周辺領域内の黒画素ブロック(この例では黒画素としたがこれに限定されない。つまり、文字枠線の消し忘れ部分を構成する画素やノイズ等を含むかたまり部分)をラベリングする。
また、黒画素ブロック消去判定部345は黒画素ブロック化部344によりラべリングされた黒画素ブロックをその大きさ及び位置等の判定条件を基にして消去するか否かの判定を行い、黒画素ブロック消去部346は黒画素ブロック消去判定部345により消去判定された黒画素ブロックのイメージを消去する。
【0028】
図4は縦の文字枠線を例とした文字枠線周辺領域残骸消去処理部342による処理の説明図であり、図5は文字枠線周辺領域残骸消去処理部342の動作の一実施例(縦の文字枠線の場合の動作例)を示すフローチャートである。
【0029】
図4で、記号Fは縦の文字枠線領域(イメージは消去済み)、記号SAは左側の文字枠線周辺領域、記号SA0は左側の文字枠線周辺領域SAの左端のライン、記号SBは右側の文字枠線周辺領域、記号SB0は右側の文字枠線周辺領域SBの右端のライン、記号K1〜K4は黒画素ブロックである。
【0030】
ステップS1:(文字枠線周辺領域の設定)
制御部6は、文字枠線周辺領域設定部343で、左側の文字枠線周辺領域SAを文字枠線領域Fの左隣に数ドットの幅で設定し、同様に、右側の文字枠線周辺領域SBを文字枠線領域Fの右隣に数ドットの幅で設定する。
【0031】
ステップS2:(黒画素ブロックのラベリング)
上記ステップS1で設定された左右の文字枠線周辺領域SA、SBには黒画素の連続したかたまり(ブロック)部分がある。このような黒画素ブロックのうち、文字枠線の消し忘れ部分やノイズ等による部分を消去するための準備動作として、制御部6は、黒画素ブロック化部344で文字枠線周辺領域SA、SB内の黒画素のかたまり毎にラベリング(それら黒画素のかたまりに標識を付す(例えば番号付けする)こと)を行ない、それぞれ黒画素ブロックとする。
ステップS3:(黒画素ブロック消去判定(1)、ブロック幅の判定)
次に、制御部6は黒画素ブロック消去判定部345でこのステップ及び続くS4、S5の3条件による判定を行う。
まず、第1の消去判定条件として黒画素ブロックの幅が所定幅α(実施例ではα=1ドット)以下か否かを調べ、α以下の場合にはS4に遷移し、そうでない場合にはこの黒画素ブロックは文字枠線の消し忘れ(残骸)やノイズではないと判定してS7に遷移する。
【0032】
ステップS4:(黒画素ブロック消去判定(2)、画素数の判定)
次に、制御部6は、第2の消去判定条件として、この黒画素ブロック内の総画素数を調べ、総画素数が所定個数β(実施例ではβ=5)以下か否かを調べ、β以下の場合にはS5に遷移し、そうでない場合にはこの黒画素ブロックは文字枠線の消し忘れ(残骸)やノイズではないと判定してS7に遷移する。
【0033】
ステップS5:(黒画素ブロック消去判定(3)、端部接触の判定)
次に、制御部6は、第3の消去判定条件として、この黒画素ブロックが左右のの文字枠線周辺領域SA、SBのラインSA0又はSB0に接触しているか否かを調べ、接触している場合にはS6に遷移し、そうでない場合にはこの黒画素ブロックは文字枠線の消し忘れ(残骸)やノイズではないと判定してS7に遷移する。
【0034】
ステップS6:(黒画素ブロックの消去)
制御部6は、判定対象の黒画素ブロックが上記ステップS3〜S5の3条件を全て満たしているとき、この黒画素ブロックを文字枠線の消し忘れ(残骸)やノイズとして消去する。
【0035】
ステップS7:(次の黒画素ブロックの有無判定)
制御部6は上記ステップS1で設定した左右の文字枠線周辺領域SA、SB内の黒画素ブロックのすべてについて上記ステップS3〜S5の判定を行うまでS3に戻ってS3〜S5の判定を繰り返す。
図4の例では黒画素ブロックK1、K4は上記図5のステップS3〜S5の条件に全て該当するので消去されるが、黒画素ブロックK2、K3は条件1(ステップS3)に該当しないので消去されない。
【0036】
なお、上記図4の説明図及び図5のフローチャートでは文字枠線周辺領域残骸消去処理部342の動作中、縦の文字枠線の場合について説明したが、横の文字枠線の場合についても、上記図4及び図5の説明で「左」を「上」に、「右」を「下」に置きかえれば同様にして文字枠線の消し忘れ(残骸)やノイズを消去することができる。
【0037】
[補間処理部の構成例]
図6は補間処理部35の一実施例の構成を示すブロック図であり、補間処理部35は、接触交差個所検出部36、ストローク方向補間決定部37、横文字枠線補間決定部38及び塗り潰し補間処理部39から構成されている。
【0038】
接触交差個所検出部36は文字枠線が消去されたフィールドイメージから文字ストロークが文字枠線を貫くように交差した交差個所や文字イメージと文字枠線が重複するように接触交差した接触交差個所(後述)を検出する。また、ストローク方向補間決定部37は接触交差個所検出部36によって検出された交差個所について、交差している文字ストロークを伸張し、伸張した先に交差個所があった場合に両交差区間で囲まれた領域を同じ文字ストロークの一部と判定し、補間対象テーブル40に登録する。ここで、補間対象テーブル40は補間決定された交差個所や接触交差個所の組み合わせ情報を登録保持しておくテーブルであり、文字認識装置1の起動時にメモリ内に確保される。また、横文字枠線補間決定部38は接触交差個所検出部36で検出された接触交差個所のうち、横文字枠線における接触交差個所のうち文字枠線の上側に位置する接触交差個所の組み合わせ(図7)について、後述する棄却条件による補間決定を行い、全ての条件で棄却されない場合に両接触交差区間で囲まれた領域を同じ文字ストロークの一部と決定し、補間対象テーブル40に登録する。また、塗り潰し補間処理部39は補間対象テーブル40に登録された交差個所や接触交差個所の組み合わせ情報を基に交差個所や接触交差個所に囲まれた台形領域を塗り潰す。これにより、文字枠線の消去によって欠落した文字ストローク部分を復元したフィールドイメージを得ることができる。なお、実施例では補間処理部35に横文字枠線補間決定部38を設けるように構成したが、更に、接触交差個所検出部36で検出された接触交差個所のうち、縦文字枠線における接触交差個所のうち文字枠線の右側(或いは左側)に位置する接触交差個所の組み合わせについて、横文字枠線補間決定部38と同様の補間決定を行い、全ての条件で棄却されない場合に両接触交差区間で囲まれた領域を同じ文字ストロークの一部と決定し、補間対象テーブル40に登録する縦文字枠補間決定部(図示せず)を設けるようにしてもよい。
【0039】
1.接触交差個所検出部図7は横文字枠線と文字ストロークとの交差個所の説明図であり、図8は接触交差個所検出部36の動作例を示すフローチャートである。接触交差個所は図7に示すように文字枠線Fを文字ストロークKが貫いて交差している個所の位置情報((P0、Q0)、(P3、Q3)と該個所における文字ストロークの方向の情報(ベクトルDP、DQ)からなり、接触交差個所検出部36により下記に示すような動作で検出される。なお、図7、図8では文字ストロークと交差する上側の横文字枠線との交差個所を検出する場合を例としたが、文字ストロークと交差する下側の横文字枠線との交差個所を検出する場合も同様である。また、文字ストロークと交差する左右の縦文字枠線との交差個所を検出する場合も上・下を左右に読み替えれば同様である。
【0040】
ステップT1:(文字枠線との接触範囲P0−Q0の検出)
図8で、制御部6は、接触交差個所検出部36で、図7に示すように文字枠線領域Fより1ドット外側の線L0上を走査し、文字ストロークKと文字枠線領域Fとの交差範囲P0−Q0が黒画素か否かを調べ、黒画素を検出した場合にはP0、Q0の位置情報(座標値)を交差個所情報及び黒画素範囲情報としてそれぞれ作業メモリに記憶し、カウンタTの値を1にセットしてT2に遷移し、そうでない場合には交差個所検出処理を終了する。
【0041】
ステップT2:(ストローク方向検出用位置情報(PT、QT)の検出)
次に、文字枠線領域Fよリ1+Tドット外側の線LT(Tはカウンタの値、T=1なら線L1)上を走査し、線分PT−QT(カウンタT=1なら線分P1−Q1)が黒画素か否かを調べ、線分PT−QTが黒画素の場合はこれを黒画素範囲としてT3に遷移し、そうでない場合には交差個所検出処理を終了する。
【0042】
ステップT3:(PT、QTの有効性判定)
作業メモリに記憶した前回の黒画素範囲情報から得られる前回の黒画素範囲(線分PT−1−PT−1)と今回の黒画素範囲(線分PT−QT)を比較し、今回の黒画素範囲が有効かを次の判定条件を基に判定し、有効な場合はPT、QTを黒画素範囲情報(=ストローク方向検出用位置情報)として作業メモリに記憶されている前回の黒画素範囲情報に上書きしてT4に遷移し、無効の場合には交差個所検出処理を終了する。(判定条件):前回の交差範囲と今回の黒画素範囲が隣接している場合に有効、離れている場合は無効、なお、文字枠線に接触している文字によっては文字枠線上で交差個所が複数個所生じる(例えば、文字「Q」や「3」の場合、図に示すように下側が文字枠線と交差した場合、交差個所が2個所生ずる)場合があるが、この場合は前回の交差範囲に最も近い今回の黒画素範囲とする。
【0043】
ステップT4:(検出回数の上限判定)
カウンタTに1を加えカウンタTの値が3を超えるまで(つまり、3回)上記ステップT2、T3を繰り返す。なお、この例では繰り返す回数を3としたがこれに限定されない。
【0044】
ステップT5:(方向DP、DQの設定)
作業メモリに記憶されている交差個所情報(P0、Q0(図7)の値(座標値))と、黒画素範囲情報、つまり、ストローク方向検出用位置情報(PT、QTの値(図7の例ではP3、Q3の座標値))を取り出して、PTとP0、QTとQ0を結ぶベクトル(図7の例ではP3とP0、QTとQ0を結ぶベクトル)を求め、ベクトルDP、ベクトルDQとする。以上の動作により交差個所P0〜P3(PT)、Q0〜Q3(QT)及びストローク方向DP、DQを得ることができる。
【0045】
2.ストローク方向補間決定部
図9は横文字枠線の上側の交差個所を対象としたストローク方向補間決定部37によるストローク方向補間決定処理動作の説明図である。図9で、交差個所Aの文字ストローク方向DP、DQを文字枠線Fを挟んだ下側に伸張する。下側の交差個所Bの前後には予めMドット(M=3程度)の許容範囲を設定しておき、伸張したDP、DQの先がその許容範囲に含まれる場合、交差個所Aの属する文字ストロークKAと交差個所Bの属する文字ストロークKBは同一の文字ストロークであると決定し、補間対象テーブル40に登録する。以上の処理を全ての交差個所の組み合わせで行う。なお、上記図9の説明では、横文字枠線の上側の交差個所を規準とした下側の交差個所を対象とし、ストローク方向決定処理について述べたが、横文字枠線の下側の交差個所を規準とし、上側の交差個所を対象としたストローク方向決定処理についても上記説明において「上」を「下」、「下」を「上」に読み替えることによって同様に行うことができる。また、縦文字枠線の左側の交差個所を規準とし、右側の交差個所を対象としたストローク方向決定処理についても「上」を「左」、「下」を「右」に読み替えることによって行うことができ、右側の交差個所を規準とし、左側の交差個所を対象としたストローク方向決定処理も「上」を「右」、「下」を「左」に読み替えることにより同様にして行うことができる。
【0046】
3.横文字枠線補間決定部
一般に、文字は文字枠の下側によせて書かれることが多い。従って、文字枠線と重複するようにして接触する文字ストロークの接触交差は上側の文字枠線ではほとんど発生せず、下側の文字枠線で頻繁に発生する。そこで、本実施例では横文字枠線補間決定部38は下側の文字枠線についてのみ補間決定を行っている。なお、同様の補間処理を縦の文字枠線に行うこともできる。
【0047】
図10は横文字枠線補間決定部38の動作例を示すフローチャートである。
ステップU1:(複数の接触交差個所の有無判定)
制御部6は、横文字枠線補間決定部38で、文字枠線消去後の対象文字イメージについて接触交差個所検出部36による動作(図8)によって取得した接触交差個所が2個所以上あるか否かを調べ2個所以上ある場合にはU2に遷移し、1個所の場合は横文字枠線補間決定処理を終了する。
【0048】
ステップU2:(2個所の接触交差個所の組み合わせ抽出)
複数の接触交差個所のうち2個所の接触交差個所の組み合わせの一つを抽出し(ステップU7から戻った場合には前回までにステップU3〜U5の判定処理済みの組み合わせを除いたもののうちから一つの組み合わせを抽出する)。U3に遷移して第1の判定条件による補間決定処理を行う。
【0049】
ステップU3:(接触交差個所が補間決定済みか否かの判定)
ストローク方向補間決定部37による補間決定(図8)の信頼性は高いので交差個所が両方ともストローク補間決定手段37によって補間決定されている場合は、横文字枠線で消去された両者間を補間する必要はない(図11(a))。そこで、補間対象テーブル40を調べ、両者が補間対象テーブル40に登録されていれば両方ともストローク補間決定手段37によって補間決定されていると判定してU7に遷移し、そうでない場合(図11(c))はU4に遷移して第2の判定条件に基づく補間決定処理を行う。
【0050】
図11の例で説明すると、図11(a)の場合は横文字枠線Fと接触交差している文字「0」の横文字枠線Fの上側での2個所の接触交差個所AS1、AT1がストローク方向補間決定部37によって下側の接触交差個所B11、B22との間でストローク補間決定されているので横枠文字線補間の必要はない(この場合、横文字枠線の補間を行うと、図11(b)に示すように文字「0」とは異なるイメージとなり、認識処理の際、「0」とは異なった文字として認識されるか認識不能文字として棄却される結果となる)。
また、図11(c)の場合は、横文字枠線Fと接触交差している文字「3」は横文字枠線Fの上側の2個所の接触交差個所AS3、AT3で接触交差しているが下側の接触交差個所がない(つまり、横文字枠線に突き出たストロークはない)ので、ストローク方向補間決定部37ではストローク補間決定を行わない。従って、接触交差個所AS3−AT3間に相当する横文字枠線を補間する必要がある(この場合、横文字枠線の補間を行うと文字「3」に近いイメージとなる)。
【0051】
ステップU4:(接触交差個所の隣接判定)
数字のみを認識する場合は、数字のイメージは縦方向から見て複数のブロックに分割されないので、接触交差個所が隣同士の場合のみ横文字枠方向の補間を行うようにするため、判定対象となっている2つの接触交差個所の位置を接触交差個所検出部36による動作(図8)によって取得した他の接触交差個所の位置と比較し、判定対象となっている2つの接触交差個所が隣接している場合にはU5に遷移して第3の判定条件に基づく補間決定処理を行い、隣接していない場合にはU7に遷移する。
【0052】
図12の例で説明すると、図12(a)の場合は補間決定対象となっている接触交差個所AS1は補間対象接触交差個所AT1と隣り同士ではないので棄却される。また、図12(b)の例は本ステップの判定なしの場合、つまり、接触交差個所AS2と補間対象接触交差個所AT2を塗り潰して補間してみた例であり、数字「3」の下側が伸びたバランスの悪いイメージとなってしまっている。図12(c)の例は補間決定対象となっている接触交差個所AS3と補間対象接触交差個所AT3が隣り同士なので、本ステップの隣接判定により補間決定した後、補間された状態を示す(バランスのよい数字「3」のイメージが復元される)。
【0053】
ステップU5:(交差個所の文字枠との間隔の判定)
ある文字枠Zについて、交差により隣接する文字枠を貫いて文字ストロークが浸入する場合が生じるが、この場合浸入したストロークと文字枠Zの文字ストロークを補間してしまわないようにする必要がある(図13(b))。
このため、第3の判定条件としてある文字枠の文字ストロークについて接触交差個所がそれぞれ左右の文字枠から所定距離以上離れているか否かを判定し、所定距離以上離れていない場合はU7に遷移し、そうでない場合はU6に遷移して補間処理を行う。
図13の例で説明すると、図13(a)の例は数字「7」の文字イメージの接触交差個所AS1、AT1のうち、左側の接触交差個所AS1は左側の縦文字枠からINH以上離れているが右側の接触交差個所AT1は右側の縦文字枠からINH以上離れていないので接触交差個所AS1、AT1の間を補間しないとした例である。
また、図13(b)の例は本ステップによる判定を行わなかった例を示し、数字「7」の文字イメージの接触交差個所AS2、AT2のうち、左側の接触交差個所AS2は左側の縦文字枠からINH(所定値)以上離れているが右側の接触交差個所AT2は右側の縦文字枠からINH以上離れていない場合に補間を行うと「7」のはずの文字イメージが「2」又は「Z」様の文字イメージに変わってしまうといった現象を示している。
【0054】
また、図13(c)の例は数字「2」の文字イメージの接触交差個所AS3、AT3とも左右の縦文字枠からINH以上離れているので、接触交差個所AS3、AT3の間を補間した例であり、この場合は下側の横文字枠によって消された文字イメージ「2」の下側のイメージが補間され正しい文字イメージ「2」が復元されている。
【0055】
ステップU6:(補間対象テーブルへの登録)
上記ステップU3〜U5の判定処理をクリアした接触交差個所を補間対象テーブル40に登録する。
【0056】
ステップU7:(補間決定終了判定)
制御部6は、上記ステップU2で抽出した接触交差個所の組み合わせの全てについて上記ステップU3〜U4の判定が終了した場合には横文字枠線補間決定部38に基づく動作を終了し、塗り潰し補間処理部39に遷移し、そうでない場合にはU2に戻る。
【0057】
以上、本発明の一実施例について説明したが本発明は上記実施例に限定されるものではなく、種々の変形実施が可能であることはいうまでもない。
【0058】
【発明の効果】
上記説明したように、第1、第2の発明の文字認識装置及び第3、第4の発明の文字イメージ補間方法によれば、文字枠線除去時に消去された文字枠線を文字ストロークが貫くように交差している場合だけでなく、文字枠線に重複するように接触交差していた文字イメージ部分をも検出し、消去された文字イメージ部分を補間できるので、文字ストロークが文字枠線を貫くことなく接触している状態の場合でも消去された文字イメージ部分を補間して文字イメージを復元することができる。これにより、例えば、文字イメージが一文字ずつ切り出され認識処理に供せられるとき本来一つの文字イメージを形成するブロックが図14(b)のように別々のブロックK1、K2に別れてしまうといった現象の発生を抑制できる。
【0059】
また、ある交差個所Aについて文字枠線から所定距離だけ離れた位置から該交差個所Aを経て該文字枠線と交差するように文字ストロークを伸張したとき伸張した先に交差個所Bがあった場合に交差個所Aの属する文字ストロークと交差個所Bの属する文字ストロークを同一文字ストロークと判定するので、交差個所A、Bの距離とは無関係に交差個所A、Bとストローク方向で定まる補間対象領域について文字イメージの補間を行うことができる。
【0060】
【図面の簡単な説明】
【図1】文字認識装置の一実施例の構成を示すブロック図である。
【図2】枠線検出部33によってフィールドイメージから検出される文字枠線の位置情報の説明図である。
【図3】文字枠線消去部の一実施例の構成を示すブロック図であり、
【図4】縦の文字枠線の場合における文字枠線周辺領域残骸消去処理部の説明図である。
【図5】文字枠線周辺領域残骸消去処理部の動作の一実施例(縦の文字枠線の場合の動作例)を示すフローチャートである。
【図6】補間処理部の一実施例の構成を示すブロック図である。
【図7】横文字枠線と文字ストロークとの交差個所の説明図である。
【図8】交差個所検出部の動作例を示すフローチャートである。
【図9】横文字枠線の上側との交差個所を対象としたストローク方向決定部によるストローク方向決定処理動作の説明図である。
【図10】横文字枠線補間決定部の動作例を示すフローチャートである。
【図11】接触交差個所と横文字補間決定処理の説明図である。
【図12】接触交差個所の隣接関係と横文字補間決定処理の説明図である。
【図13】接触交差個所及び文字枠の間隔と横文字補間決定処理の説明図である。
【図14】従来技術による文字ストロークイメージの補間方法の説明図である。
【符号の説明】
1 文字認識装置
3 文字枠線除去部(文字枠線除去手段)
4 文字切り出し部(文字切り出し手段)
5 認識部(文字認識手段)
31 フィールドイメージ切り出し部(フィールドイメージ切り出し手段)
32 フィールドイメージ回転補正部(傾き補正手段)
33 文字枠線検出部(文字枠線検出手段)
34 文字枠線消去部(文字枠線消去手段)
35 補間処理部(文字イメージ補間手段)
36 接触交差個所検出部(交差個所検出手段、接触交差個所検出手段)
37 文字ストローク方向補間決定部(文字ストローク方向検出手段、文字ストローク補間決定手段)
38 横文字枠線補間決定部(隣接判定手段、離間距離判定手段)
39 塗り潰し補間処理部(文字ストローク補間手段、接触交差個所補間手段)
341 文字枠線領域黒画素消去処理部(文字枠線イメージ消去手段)
342 文字枠線周辺領域残骸消去処理部(残骸消去手段)
F 文字枠線
K 文字ストローク
DP、DQ 文字ストローク方向[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a character recognition device, and more particularly to a technique for interpolating a character image portion generated at the time of erasing a character frame or ruled line (hereinafter referred to as a character frame line) when reading a document.
[0002]
[Prior art]
An optical character reader (OCR) reads characters on a form or document, converts them into electrical signals, and outputs a character image. However, a character frame line is usually printed on the form, and the character is within the character frame line. Therefore, the character frame line is often printed in a dropout color that can be recognized by the writer but cannot be detected by the apparatus so as not to hinder reading.
[0003]
However, because the dropout color is a special color, the printing cost of the form tends to be high, and since the dropout color is usually set to one color for OCR, the color cannot be classified according to the type of form, and The dropout color is very light and difficult to see.
[0004]
In order to solve the above-mentioned problems, when a character is recognized by optically reading a form with a character border printed in non-dropout color, a border that detects and erases the character border as the preceding process. There is a character recognition device configured to perform erasure (removal) processing.
[0005]
[Problems to be solved by the invention]
However, when performing the frame erasing process, if the character frame and the character stroke intersect with each other as shown in FIG. 14B, the image of the character stroke where the contact intersects is also erased and lost. Therefore, it is necessary to interpolate the image at this point.
[0006]
As shown in FIG. 14 (a), as a method of interpolating the missing part of the intersection with the character frame line when the frame line is erased, the points A and B where the character frame line and the character stroke intersect are contacted. When detecting, simultaneously detecting the direction DA, DB of the character stroke at the location, determining whether to interpolate in consideration of the positional relationship between A, B, the direction of DA, DB, etc. A method of filling the region of the missing portion of the intersection (the portion of the character frame line sandwiched between the intersections A and B) can be considered.
[0007]
However, in this method, interpolation can be performed when the character stroke intersects the character frame line F as shown in FIG. 14A, but the character stroke is converted into the character frame as shown in FIG. There is a problem that interpolation cannot be performed in the case where the contact is made without penetrating the line F. As a result, for example, when a character image is cut out character by character and subjected to recognition processing, a block that originally forms one character image is separated into separate blocks K1 and K2 as shown in FIG. There was also a problem that it might be recognized as a character.
[0008]
The present invention has been made in view of the above problems, and the contact intersection erased together with the character frame line at the time of character frame line erase processing when performing character recognition on a document document printed in non-dropout color. It is an object of the present invention to provide a character recognition apparatus and a character image interpolation method that can interpolate a character image portion erased together with a character frame line even when the character stroke is in contact without penetrating the character frame line.
[0009]
[Means for Solving the Problems]
In order to solve the above-mentioned problem, in the invention described in
[0016]
According to the second aspect of the present invention, from the read image of the original,Detect the character frame lines that make up the field from the field image after tilt correction, which corrects the tilt of the cropped field image, and erase the detected character frame lines.Characters erased together with character frame lines in character recognition devices that perform character recognition by erasing character frame line images, cutting out character images character by character from character images from which character frame lines have been deleted, and performing character image recognition processing A character image interpolation method for interpolating an image part,In the field image after skew correction, the intersection where the character stroke intersects the character frame line before erasing the character frame line, and the crossing direction so that the stroke direction and the character image part overlap the character frame line. Among the crossing points detected by the touching crossing point detection step for detecting the touching crossing point, and the crossing point detection step, a certain crossing point A passes through the crossing point A from a position separated from the character frame line by a predetermined distance. When the character stroke is extended so as to intersect with the character frame line, if there is an intersection B before the extension, the character stroke to which the intersection A and the character stroke to which the intersection B belongs are regarded as the same character stroke. , B position information and stroke direction information are registered in the interpolation target registration table as interpolation target area information. Among the contact intersections detected by the direction interpolation determination step and the contact intersection detection step, except for the intersections belonging to the interpolation target area registered in the interpolation target registration table by the stroke direction interpolation determination step, the character frame line contact intersection For all combinations of locations, an adjacent determination step for determining whether or not a pair of contact intersection locations are adjacent to each other. A pair of contact intersection locations determined to be adjacent in the adjacent determination step is a character frame line. The distance information determination step for determining whether or not a distance is more than a predetermined distance from each other, the position information of the pair of contact intersections determined to be more than the predetermined distance from the character frame line in the distance determination step Interpolation target area information registration step registered in the interpolation target registration table as registered in the interpolation target registration table Character image interpolation step of interpolating the character image portion is erased along with the character border based on the interpolation target area information and,A character image interpolation method characterized by comprising:
[0020]
DETAILED DESCRIPTION OF THE INVENTION
[Configuration example of character recognition device]
FIG. 1 is a block diagram showing a configuration of an embodiment of a character recognition apparatus, FIG. 1A is an overall configuration diagram, and FIG. 1B is a block diagram showing a configuration example of a character frame line removal unit.
[0021]
1A, a
[0022]
The
The
The control unit 6 includes a CPU and its peripheral circuits, and controls the operations of the above-described components. The character frame
[0023]
[Configuration example of character border removal unit]
In FIG. 1B, the character frame
The field
The character frame
Further, the character frame
Further, the
[0024]
[Character frame line position information detection method by the character frame line detector]
FIG. 2 is an explanatory diagram of character frame line position information detected from the field image by the character frame
In FIG. 2, a symbol IM indicates a field image whose inclination is corrected by the field image
[0025]
[Configuration example of the character border removal part]
FIG. 3 is a block diagram showing a configuration of one embodiment of the character frame
[0026]
In FIG. 3A, the character frame
[0027]
(Character border area debris erasure processing part)
In FIG. 3B, the character frame line peripheral region debris
A character frame line peripheral
Further, the black pixel block
[0028]
FIG. 4 is an explanatory diagram of processing by the character frame line peripheral region debris
[0029]
In FIG. 4, symbol F is a vertical character frame area (image has been erased), symbol SA is a left character frame line peripheral area, symbol SA0 is a leftmost line of left character frame line peripheral area SA, and symbol SB is The right character frame line peripheral region, symbol SB0 is the rightmost line of the right character frame line peripheral region SB, and symbols K1 to K4 are black pixel blocks.
[0030]
Step S1: (Character frame border area setting)
The control unit 6 uses the character frame line peripheral
[0031]
Step S2: (black pixel block labeling)
The left and right character frame line peripheral areas SA and SB set in step S1 include a continuous block (block) portion of black pixels. In such a black pixel block, as a preparatory operation for erasing a character frame line forgotten portion or a portion due to noise or the like, the control unit 6 uses the black pixel
Step S3: (Black pixel block erasure determination (1), block width determination)
Next, the control unit 6 performs determination based on this step and the following three conditions of S4 and S5 in the black pixel block
First, as a first erasure determination condition, it is checked whether or not the width of the black pixel block is equal to or smaller than a predetermined width α (α = 1 dot in the embodiment). If it is equal to or smaller than α, the process proceeds to S4. It is determined that the black pixel block is not forgotten to erase the character frame (remains) or noise, and the process proceeds to S7.
[0032]
Step S4: (Black pixel block erasure determination (2), determination of the number of pixels)
Next, the control unit 6 checks the total number of pixels in the black pixel block as the second erasure determination condition, checks whether the total number of pixels is equal to or less than a predetermined number β (β = 5 in the embodiment), If it is equal to or less than β, the process proceeds to S5. Otherwise, it is determined that the black pixel block is not forgotten to erase the character frame (remains) or noise, and the process proceeds to S7.
[0033]
Step S5: (Black pixel block erasure determination (3), edge contact determination)
Next, as a third erasure determination condition, the control unit 6 checks whether or not the black pixel block is in contact with the left and right character frame line peripheral area SA, SB line SA0 or SB0. If yes, the process proceeds to S6. If not, it is determined that this black pixel block is not forgotten to erase the character frame (remains) or noise, and the process proceeds to S7.
[0034]
Step S6: (Erase of black pixel block)
When the black pixel block to be determined satisfies all the three conditions of steps S3 to S5, the control unit 6 erases the black pixel block as forgetting to erase the character frame line (remnant) or noise.
[0035]
Step S7: (Determining the presence or absence of the next black pixel block)
The control unit 6 returns to S3 and repeats the determinations of S3 to S5 until the determinations of Steps S3 to S5 are performed for all the black pixel blocks in the left and right character frame line peripheral areas SA and SB set in Step S1.
In the example of FIG. 4, the black pixel blocks K1 and K4 are erased because they all meet the conditions of steps S3 to S5 in FIG. 5, but the black pixel blocks K2 and K3 are erased because they do not meet the condition 1 (step S3). Not.
[0036]
4 and the flowchart of FIG. 5 described the case of the vertical character frame line during the operation of the character frame line peripheral region debris erasing
[0037]
[Configuration example of interpolation processing unit]
FIG. 6 is a block diagram showing a configuration of an embodiment of the
[0038]
The contact
[0039]
1. FIG. 7 is an explanatory diagram of the intersection of the horizontal character frame line and the character stroke, and FIG. 8 is a flowchart showing an operation example of the contact
[0040]
Step T1: (Detection of contact range P0-Q0 with character frame line)
In FIG. 8, the control unit 6 scans the line L0 that is one dot outside the character frame line area F as shown in FIG. Whether or not the intersection range P0-Q0 is a black pixel. If a black pixel is detected, position information (coordinate values) of P0 and Q0 is stored in the working memory as intersection location information and black pixel range information, The value of the counter T is set to 1 and a transition is made to T2. Otherwise, the intersection detection process is terminated.
[0041]
Step T2: (Detection of stroke direction detection position information (PT, QT))
Next, scanning is performed on the line LT (T is the value of the counter, line L1 if T = 1) outside the character frame line area F by 1 + T dots, and the line segment P1-QT (if the counter T = 1, the line segment P1- It is checked whether or not Q1) is a black pixel. If the line segment PT-QT is a black pixel, the transition is made to T3 as a black pixel range. If not, the intersection detection process is terminated.
[0042]
Step T3: (PT, QT validity determination)
Previous black pixel range obtained from previous black pixel range information stored in working memory(Line segment PT-1-PT-1)And the black pixel range (line segment)PT-QT) And whether the current black pixel range is valid is determined based on the following determination conditions. If valid, PT and QT are stored in the work memory as black pixel range information (= position information for detecting the stroke direction). The previous black pixel range information is overwritten and the process proceeds to T4. When the information is invalid, the intersection detection process is terminated. (Judgment condition): Valid when the previous intersection and the current black pixel range are adjacent, invalid when separated, and depending on the character that is in contact with the character border, the intersection on the character border May occur (for example, in the case of the letter “Q” or “3”, if the lower side intersects with the character frame line as shown in the figure, two intersections will occur). The current black pixel range closest to the intersection range is set.
[0043]
Step T4: (upper limit determination of the number of detections)
Steps T2 and T3 are repeated until 1 is added to the counter T and the value of the counter T exceeds 3 (that is, 3 times). In this example, the number of repetitions is 3, but the present invention is not limited to this.
[0044]
Step T5: (Setting of directions DP and DQ)
Crossing point information (values of P0 and Q0 (FIG. 7) (coordinate values)) stored in the working memory and black pixel range information, that is, stroke direction detection position information (PT and QT values (in FIG. 7) In the example, the coordinate values of P3 and Q3) are taken out, and vectors connecting PT and P0, QT and Q0 (vectors connecting P3 and P0 and QT and Q0 in the example of FIG. 7) are obtained, and vectors DP and DQ are obtained. To do. By the above operation, the intersections P0 to P3 (PT) and Q0 to Q3 (QT) and the stroke directions DP and DQ can be obtained.
[0045]
2. Stroke direction interpolation determination unit
FIG. 9 is an explanatory diagram of the stroke direction interpolation determination processing operation by the stroke direction
[0046]
3. Horizontal character frame line interpolation decision unit
In general, characters are often written on the lower side of a character frame. Therefore, the contact intersection of the character strokes that come in contact with the character frame line hardly occurs in the upper character frame line, and frequently occurs in the lower character frame line. Therefore, in this embodiment, the horizontal character frame line
[0047]
FIG. 10 is a flowchart showing an operation example of the horizontal character frame line
Step U1: (determining whether there are a plurality of contact intersections)
The control unit 6 determines whether or not there are two or more contact intersections acquired by the operation of the contact intersection detection unit 36 (FIG. 8) for the target character image after the character frame line deletion in the horizontal character frame line
[0048]
Step U2: (Combination extraction of two contact intersections)
One of the combinations of the two contact intersections is extracted from the plurality of contact intersections (when returning from step U7, one of the combinations excluding the combinations subjected to the determination processing in steps U3 to U5 until the previous time) One combination). After transitioning to U3, an interpolation determination process based on the first determination condition is performed.
[0049]
Step U3: (Determining whether or not the contact intersection has been determined to be interpolated)
Since the reliability of the interpolation determination by the stroke direction interpolation determination unit 37 (FIG. 8) is high, if both of the intersections are determined to be interpolated by the stroke interpolation determination means 37, interpolation between the two erased by the horizontal character frame line is performed. It is not necessary (FIG. 11 (a)). Therefore, the interpolation target table 40 is examined, and if both are registered in the interpolation target table 40, it is determined that both are determined to be interpolated by the stroke
[0050]
Referring to the example of FIG. 11, in the case of FIG. 11A, two contact intersections AS <b> 1 and AT <b> 1 on the upper side of the horizontal character frame line F of the character “0” in contact with the horizontal character frame line F are strokes. Since the stroke interpolation is determined between the lower intersection intersections B11 and B22 by the direction
In the case of FIG. 11C, the character “3” that is in contact with the horizontal character frame line F is in contact at the two contact intersections AS3 and AT3 above the horizontal character frame line F. Since there is no contact intersection on the side (that is, there is no stroke protruding from the horizontal character frame line), the stroke direction
[0051]
Step U4: (Adjacent judgment of contact intersection)
When recognizing only numbers, the image of the numbers is not divided into multiple blocks when viewed from the vertical direction.Therefore, interpolation is performed in the horizontal character frame direction only when the contact intersections are adjacent to each other. Are compared with the positions of other contact intersections acquired by the operation of the contact intersection detection unit 36 (FIG. 8), and the two contact intersections to be judged are adjacent to each other. If it is, the process proceeds to U5 to perform interpolation determination processing based on the third determination condition. If it is not adjacent, the process proceeds to U7.
[0052]
In the example of FIG. 12, in the case of FIG. 12A, the contact intersection part AS <b> 1 that is an interpolation determination target is rejected because it is not adjacent to the interpolation target contact intersection part AT <b> 1. Further, the example of FIG. 12B is an example in which this step is not determined, that is, an example in which the contact intersection part AS2 and the interpolation target contact intersection part AT2 are filled and interpolated, and the lower side of the number “3” extends. It has become an unbalanced image. In the example of FIG. 12C, since the contact intersection AS3 and the interpolation intersection AT3 to be interpolated are adjacent to each other, the interpolation is performed by the adjacency determination in this step, and the interpolated state is shown (balance). The image of the good number “3” is restored).
[0053]
Step U5: (Determination of the distance from the character frame at the intersection)
For a certain character frame Z, there may occur a case where a character stroke penetrates through an adjacent character frame due to an intersection. In this case, it is necessary not to interpolate the entered stroke and the character stroke in the character frame Z ( FIG. 13B).
Therefore, it is determined whether or not the contact intersections are separated from the left and right character frames by a predetermined distance or more with respect to the character stroke of the character frame as the third determination condition. If not, the process proceeds to U6 to perform interpolation processing.
Referring to the example of FIG. 13, in the example of FIG. 13 (a), the contact intersection AS1 on the left side of the character image contact number AS1 and AT1 of the number “7” is separated from the left vertical character frame by INH or more. However, since the right contact intersection AT1 is not separated from the right vertical character frame by INH or more, the contact intersection AS1, AT1 is not interpolated.
Further, the example of FIG. 13B shows an example in which the determination in this step is not performed, and among the contact intersections AS2 and AT2 of the character image of the number “7”, the left contact intersection AS2 is the left vertical character. When interpolation is performed when the contact intersection portion AT2 on the right side is not more than INH or more from the right vertical character frame, the character image that should be “7” is “2” or “ This shows a phenomenon that the character image is changed to “Z”.
[0054]
In the example of FIG. 13C, the contact intersections AS3 and AT3 of the character image of the number “2” are both separated from the vertical character frame on the left and right by INH or more, so that the contact intersections AS3 and AT3 are interpolated. In this case, the lower image of the character image “2” erased by the lower horizontal character frame is interpolated to restore the correct character image “2”.
[0055]
Step U6: (Register to interpolation target table)
The contact intersection where the determination process in steps U3 to U5 is cleared is registered in the interpolation target table 40.
[0056]
Step U7: (Interpolation determination end determination)
The control unit 6 terminates the operation based on the horizontal character frame line
[0057]
As mentioned above, although one Example of this invention was described, this invention is not limited to the said Example, It cannot be overemphasized that various deformation | transformation implementation is possible.
[0058]
【The invention's effect】
As explained above, the firstThe secondAccording to the character recognition device of the invention and the character image interpolation method of the third and fourth inventions, the character frame line erased when the character frame line is removedNot only when the character strokes crossThe character image part that intersected the contact so as to overlap the character frame lineAlsoSince the character image part detected and erased can be interpolated, the character stroke is in contact without penetrating the character frame line.soAlsoThe erased character image partThe character image can be restored by interpolation. As a result, for example, when a character image is cut out character by character and subjected to recognition processing, a block that originally forms one character image is divided into separate blocks K1 and K2 as shown in FIG. 14B. Generation can be suppressed.
[0059]
Further, when a character stroke is extended from a position separated from the character frame line by a predetermined distance from a character frame line so as to intersect the character frame line, there is an intersection B at the extended point. Since the character stroke to which the intersection A and the character stroke to which the intersection B belongs are determined as the same character stroke, the interpolation target area determined by the intersection A and B and the stroke direction regardless of the distance between the intersections A and B. Interpolation of character images can be performed.
[0060]
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an embodiment of a character recognition device.
FIG. 2 is an explanatory diagram of character frame line position information detected from a field image by a frame
FIG. 3 is a block diagram showing a configuration of an embodiment of a character frame line erasing unit;
FIG. 4 is an explanatory diagram of a character frame line peripheral region debris erasure processing unit in the case of a vertical character frame line.
FIG. 5 is a flowchart showing an example of the operation of the character frame line peripheral area debris erasure processing unit (operation example in the case of a vertical character frame line);
FIG. 6 is a block diagram illustrating a configuration of an embodiment of an interpolation processing unit.
FIG. 7 is an explanatory diagram of an intersection of a horizontal character frame line and a character stroke.
FIG. 8 is a flowchart illustrating an operation example of an intersection detection unit.
FIG. 9 is an explanatory diagram of a stroke direction determination processing operation performed by a stroke direction determination unit for the intersection with the upper side of the horizontal character frame line.
FIG. 10 is a flowchart illustrating an operation example of a horizontal character frame line interpolation determination unit;
FIG. 11 is an explanatory diagram of contact intersection locations and horizontal character interpolation determination processing;
FIG. 12 is an explanatory diagram of adjacent relations of contact intersections and horizontal character interpolation determination processing;
FIG. 13 is an explanatory diagram of contact intersections and character frame intervals and horizontal character interpolation determination processing;
FIG. 14 is an explanatory diagram of a character stroke image interpolation method according to the prior art.
[Explanation of symbols]
1 Character recognition device
3 Character frame line removal unit (character frame line removal means)
4 Character cutout part (character cutout means)
5 recognition part (character recognition means)
31 Field image cutout unit (field image cutout means)
32 field image rotation correction unit (tilt correction means)
33 Character frame line detection unit (character frame line detection means)
34 Character frame line deletion part (character frame line deletion means)
35 Interpolation processing unit (character image interpolation means)
36 Contact intersection detection unit (intersection detection means, contact intersection detection means)
37 Character stroke direction interpolation determining unit (character stroke direction detecting means, character stroke interpolation determining means)
38 Horizontal character frame line interpolation determination unit (adjacent determination means, separation distance determination means)
39 Fill interpolation processing unit (character stroke interpolation means, contact intersection interpolation means)
341 Character frame line area black pixel erasure processing section (character frame line image erasure means)
342 Character frame line peripheral area debris erasure processing part (debris erasure means)
F Character border
K character stroke
DP, DQ Character stroke direction
Claims (2)
前記文字枠線消去手段によって文字枠線が消去された文字イメージのうち、文字枠線の消去によって欠落した部分を補間する文字イメージ補間手段を備え、
前記文字イメージ補間手段は、
前記傾き補正後のフィールドイメージにおいて、前記文字枠線消去手段による文字枠線の消去前に文字ストロークが文字枠線を貫くように交差していた交差個所およびストローク方向や文字イメージ部分が文字枠線に重複するように接触交差していた接触交差個所を検出する接触交差個所検出手段と、
前記接触交差個所検出手段によって検出された交差個所のうち、ある交差個所Aについて文字枠線から所定距離だけ離れた位置から該交差個所Aでその文字枠線と交差するように文字ストロークを伸張したとき伸張した先に交差個所Bがあった場合に交差個所Aの属する文字ストロークと交差個所Bの属する文字ストロークを同一文字ストロークとして交差個所A,Bの位置情報とストローク方向情報を補間対象領域情報として補間対象登録テーブルに登録するストローク方向補間決定手段と、
前記接触交差個所検出手段によって検出された接触交差個所のうち、前記ストローク方向補間決定手段によって補間対象登録テーブルに登録された補間対象領域に属する交差個所を除き、文字枠線の接触交差個所の全ての組み合わせについて、対になった接触交差個所が隣接しているか否かをそれぞれ判定し、更に隣接していると判定された接触交差個所の対が文字枠線から所定距離以上離れているか否かを判定し、文字枠線からそれぞれ所定距離以上離れていると判定された接触交差個所の対の位置情報を補間対象領域情報として補間対象登録テーブルに登録する文字枠線補間決定手段と、
前記補間対象登録テーブルに登録されている補間対象領域情報を基に文字枠線と共に消去された文字イメージ部分を補間する文字イメージ補間処理手段と、
を有することを特徴とする文字認識装置。The character frame line image is erased by detecting the character frame lines constituting the field from the field image after the inclination correction obtained by correcting the inclination of the field image cut out from the read image of the original, and erasing the detected character frame line. Character frame line erasure means, cutout means for cutting out character images one character at a time from the character image from which the character frame lines have been deleted by the character frame line erasure means, and character recognition means for performing recognition processing of the cut out character image In a character recognition device comprising
Of the character image a character frame line is erased by said character frame blanking means comprises a character image interpolation means for interpolating the missing portion by erasing the character border,
The character image interpolation means includes:
In the field image after the tilt correction, the intersection where the character stroke crosses the character frame line before erasing the character frame line by the character frame line erasing means, the stroke direction, and the character image portion are the character frame line. Contact intersection detection means for detecting a contact intersection where the contact intersection has occurred so as to overlap
Among the crossing points detected by the contact crossing point detecting means, the character stroke is extended so that the crossing point A crosses the character frame line at a crossing point A from a position separated by a predetermined distance from the character frame line. When there is a crossing point B ahead of the extension, the character stroke to which the crossing point A belongs and the character stroke to which the crossing point B belongs are regarded as the same character stroke, and the position information and stroke direction information of the crossing points A and B are interpolated area information. Stroke direction interpolation determining means to be registered in the interpolation target registration table as
Of the contact intersections detected by the contact intersection detection unit, all of the character frame line contact intersections except for the intersections belonging to the interpolation target area registered in the interpolation target registration table by the stroke direction interpolation determination unit. For each combination, it is determined whether or not the paired contact intersections are adjacent to each other, and whether or not the pair of contact intersections determined to be adjacent to each other is at least a predetermined distance from the character frame line. Character frame line interpolation determining means for registering position information of a pair of contact intersections determined to be apart from the character frame line by a predetermined distance or more as interpolation target area information in the interpolation target registration table;
Character image interpolation processing means for interpolating the character image portion erased together with the character frame line based on the interpolation target area information registered in the interpolation target registration table;
A character recognition device comprising:
前記傾き補正後のフィールドイメージにおいて、文字枠線の消去前に文字ストロークが文字枠線を貫くように交差していた交差個所およびストローク方向や文字イメージ部分が文字枠線に重複するように接触交差していた接触交差個所を検出する接触交差個所検出ステップ、
前記接触交差個所検出ステップによって検出された交差個所のうち、ある交差個所Aについて文字枠線から所定距離だけ離れた位置から該交差個所Aを経て該文字枠線と交差するように文字ストロークを伸張したとき伸張した先に交差個所Bがあった場合に交差個所Aの属する文字ストロークと交差個所Bの属する文字ストロークを同一文字ストロークとして交差個所A,Bの位置情報とストローク方向情報を補間対象領域情報として補間対象登録テーブルに登録するストローク方向補間決定ステップ、
前記接触交差個所検出ステップによって検出された接触交差個所のうち、前記ストローク方向補間決定ステップによって補間対象登録テーブルに登録された補間対象領域に属する交差個所を除き、文字枠線の接触交差個所の全ての組み合わせについて、対になった接触交差個所が隣接しているか否かをそれぞれ判定する隣接判定ステップ、
前記隣接判定ステップで隣接していると判定された接触交差個所の対が文字枠線からそれぞれ所定距離以上離れているか否かを判定する離間距離判定ステップ、
前記離間距離判定ステップで文字枠線から所定距離以上離れていると判定された接触交差個所の対の位置情報を補間対象領域情報として補間対象登録テーブルに登録する補間対象領域情報登録ステップ、
前記補間対象登録テーブルに登録されている補間対象領域情報を基に文字枠線と共に消去された文字イメージ部分を補間する文字イメージ補間処理ステップ、
からなることを特徴とする、文字イメージ補間方法。 Detects the character border lines that make up the field from the field image after tilt correction, which corrects the tilt of the field image cut out from the scanned image of the original, erases the detected character border lines, erases the character border line images, Character image interpolation that interpolates the character image portion deleted together with the character frame line in the character recognition device that performs character image recognition processing by cutting out the character image one character at a time from the character image from which the character frame line has been deleted A method,
In the field image after the tilt correction, the intersection where the character stroke intersects the character frame line before erasing the character frame line and the contact intersection so that the stroke direction and the character image part overlap the character frame line. A contact intersection detection step for detecting a contact intersection that has been
Among the crossing points detected by the contact crossing point detection step, the character stroke is extended so that the crossing point A crosses the character frame line through the crossing point A from a position separated from the character frame line by a predetermined distance. When there is a crossing point B ahead of the extension, the character stroke to which the crossing point A belongs and the character stroke to which the crossing point B belongs are regarded as the same character stroke, and the position information and the stroke direction information of the crossing points A and B are interpolated. Stroke direction interpolation determination step to be registered in the interpolation target registration table as information,
Of the contact intersections detected by the contact intersection detection step, all of the character frame line contact intersections except for the intersections belonging to the interpolation target area registered in the interpolation target registration table by the stroke direction interpolation determination step. Adjacent determination step for determining whether or not the paired contact intersections are adjacent to each other,
A separation distance determination step for determining whether or not the pair of contact intersections determined to be adjacent in the adjacent determination step is a predetermined distance or more from the character frame line, respectively.
Interpolation target area information registration step of registering, in the interpolation target registration table, position information of a pair of contact intersections determined to be separated from the character frame line by a predetermined distance or more in the separation distance determination step as interpolation target area information;
A character image interpolation processing step of interpolating the character image portion erased together with the character frame line based on the interpolation target area information registered in the interpolation target registration table;
A character image interpolation method comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000028855A JP4442977B2 (en) | 2000-02-07 | 2000-02-07 | Character recognition device, character image interpolation method, and recording medium recording character image interpolation program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000028855A JP4442977B2 (en) | 2000-02-07 | 2000-02-07 | Character recognition device, character image interpolation method, and recording medium recording character image interpolation program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2001222682A JP2001222682A (en) | 2001-08-17 |
| JP4442977B2 true JP4442977B2 (en) | 2010-03-31 |
Family
ID=18554192
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000028855A Expired - Lifetime JP4442977B2 (en) | 2000-02-07 | 2000-02-07 | Character recognition device, character image interpolation method, and recording medium recording character image interpolation program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4442977B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4830331B2 (en) * | 2005-03-28 | 2011-12-07 | 富士ゼロックス株式会社 | Character image cutting device and program |
| CN113537229B (en) * | 2021-08-27 | 2024-08-20 | 广州广电运通金融电子股份有限公司 | Bill image generation method, device, computer equipment and storage medium |
-
2000
- 2000-02-07 JP JP2000028855A patent/JP4442977B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JP2001222682A (en) | 2001-08-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2986383B2 (en) | Method and apparatus for correcting skew for line scan images | |
| CN101452444B (en) | A Method for Rapid Editing and Typesetting of Handwritten Information | |
| WO2001003416A1 (en) | Border eliminating device, border eliminating method, and authoring device | |
| JP3936436B2 (en) | Table recognition method | |
| JP3615333B2 (en) | Ruled line eraser | |
| JP4442977B2 (en) | Character recognition device, character image interpolation method, and recording medium recording character image interpolation program | |
| JP2868134B2 (en) | Image processing method and apparatus | |
| JP3927171B2 (en) | Noise removing apparatus and method, program, and recording medium | |
| JP2995650B2 (en) | Ruled line removal method | |
| JP3794285B2 (en) | Optical character reader | |
| JPH117493A (en) | Character recognition processor | |
| JP3019897B2 (en) | Line segmentation method | |
| JPH08221518A (en) | Optical character reader | |
| JP2003317107A (en) | Ruled line extraction method and apparatus | |
| JP2010258627A (en) | Image processing apparatus, image processing method, program, and storage medium | |
| JP4105376B2 (en) | Figure detection circuit | |
| JP2868392B2 (en) | Handwritten symbol recognition device | |
| JP4250828B2 (en) | Character recognition device | |
| JP4867400B2 (en) | Image processing apparatus and program | |
| JP3344069B2 (en) | Character segmentation device | |
| JP2954218B2 (en) | Image processing method and apparatus | |
| CN121354150A (en) | A method and system for handwritten table structure recognition and collaborative processing with Excel | |
| JP3106791B2 (en) | Selection item recognition device | |
| JP2000339408A (en) | Character segmentation device | |
| JP4544691B2 (en) | Character reader |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20040608 |
|
| RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20040608 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070205 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090820 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090901 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091029 |
|
| 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: 20100105 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100112 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4442977 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130122 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160122 Year of fee payment: 6 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| EXPY | Cancellation because of completion of term |