JP4732626B2 - Form processing method, apparatus, and program - Google Patents
Form processing method, apparatus, and program Download PDFInfo
- Publication number
- JP4732626B2 JP4732626B2 JP2001216880A JP2001216880A JP4732626B2 JP 4732626 B2 JP4732626 B2 JP 4732626B2 JP 2001216880 A JP2001216880 A JP 2001216880A JP 2001216880 A JP2001216880 A JP 2001216880A JP 4732626 B2 JP4732626 B2 JP 4732626B2
- Authority
- JP
- Japan
- Prior art keywords
- background
- image
- processing
- density
- pixels
- 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
Images
Landscapes
- Character Input (AREA)
- Image Analysis (AREA)
Description
【0001】
【発明の属する技術分野】
この発明は、帳票処理方法および装置並びにプログラムに関し、特に、地紋等のある帳票類の記載事項を認識する帳票処理方法および装置並びにプログラムに関する。
【0002】
【従来の技術】
近年、画像処理技術や認識技術等の向上に伴って、様々な書類に対して文字認識処理を実施し、書類の記載事項を電子化する機会が増大してきている。このような文字認識処理を実施する装置としては、例えば、特開平4−111085号公報に記載されているパターン認識装置等がある。
【0003】
文字認識処理は、印字された文字はもちろんのこと、手書きされた文字をも認識することができる。しかしながら、その認識率は、種々の条件によって変化し、その条件によっては、文字の認識率が大幅に低下してしまう場合がある。
【0004】
例えば、文字認識処理の対象が帳票類である場合、当該帳票の下地に模様がある場合には、文字認識率が低下する可能性がある。特に、手形や小切手の金額欄等のように文字を記入する欄の下地に横縞模様等が入っている場合には、その傾向がより顕著である。
【0005】
【発明が解決しようとする課題】
上述のように、帳票類に対して文字認識処理を施す場合、対象となる帳票類の下地に模様がある場合には、文字認識率が低下する場合があった。このため、文字認識処理に先立って、帳票を読み取って得た帳票画像から下地部分を除去することが考えられる。
【0006】
しかしながら、無条件に帳票画像から下地部分を除去する処理を行った場合には、帳票画像によっては文字認識率が低下してしまうことがあった。
【0007】
そこで、この発明は、帳票画像からの下地除去を適切に行い、当該帳票画像中の文字の認識率を向上させることのできる帳票処理方法および装置並びにプログラムを提供することを目的とする。
【0008】
【課題を解決するための手段】
上述した目的を達成するため、請求項1の発明は、帳票を読み取って得た帳票画像に基づいて前記帳票の記入内容を認識する帳票処理方法において、前記帳票画像を読み取り、指定された領域の濃淡画像より文字が印字または記入されていない背景領域を切出し、前記切り出された背景領域に対して、背景の濃淡差を減少させる背景一様化処理を行い、前記背景一様化処理を行った帳票画像の各画素の方向毎の濃度勾配のうちの最大値を当該画素の濃度勾配強度とし、該濃度勾配強度値が所定値以上の画素が所定数以上ある場合に、前記背景領域に対して横縞模様や交差模様と縦縞模様との少なくとも一つの模様を除去するフィルタ処理を行い、該フィルタ処理の前後で、所定値以下の明るさの画素の数が所定割合以上減少した場合に、下地を除去する下地除去処理の前記認識における有効性があると判断し、前記有効性があると判定された場合は、前記帳票画像のうち、少なくとも文字記入欄に対して前記フィルタ処理による下地除去処理を実施し、前記下地除去処理を実施した後に前記記入内容の認識を行うことを特徴とする。
【0009】
また、請求項2の発明は、帳票を読み取って得た帳票画像に基づいて前記帳票の記入内容を認識する帳票処理装置において、前記帳票画像を読み取り、指定された領域の濃淡画像より文字が印字または記入されていない背景領域を切り出す切出手段と、前記切出手段により切り出された背景領域に対して、背景の濃淡差を減少させる背景一様化処理を行う背景一様化手段と、前記背景一様化手段により背景一様化処理を行った帳票画像の各画素の方向毎の濃度勾配のうちの最大値を当該画素の濃度勾配強度とし、前記濃度勾配強度値が所定値以上の画素が所定数以上ある場合に、前記背景領域に対して横縞模様や交差模様と縦縞模様との少なくとも一つの模様を除去するフィルタ処理を行い、該フィルタ処理の前後で、所定値以下の明るさの画素の数が所定割合以上減少した場合に、下地を除去する下地除去処理の前記認識における有効性があると判断する有効性判断手段と、前記有効性判断手段により有効性があると判定された場合は、前記帳票画像のうち、少なくとも文字記入欄に対して前記フィルタ処理による下地除去処理を実施する下地除去手段と、前記下地除去手段による下地除去処理を実施した後に前記記入内容の認識を行う認識手段とを具備することを特徴とする。
【0010】
また、請求項3の発明は、帳票を読み取って得た帳票画像に基づいて、コンピュータに前記帳票の記入内容を認識させる帳票処理プログラムにおいて、前記帳票画像を読み取り、指定された領域の濃淡画像より文字が印字または記入されていない背景領域を切り出す切出処理と、前記切出処理により切り出された背景領域に対して、背景の濃淡差を減少させる背景一様化処理と、前記背景一様化処理を行った帳票画像の各画素の方向毎の濃度勾配のうちの最大値を当該画素の濃度勾配強度とし、前記濃度勾配強度値が所定値以上の画素が所定数以上ある場合に、前記背景領域に対して横縞模様や交差模様と縦縞模様との少なくとも一つの模様を除去するフィルタ処理を行い、該フィルタ処理の前後で、所定値以下の明るさの画素の数が所定割合以上減少した場合に、下地を除去することの前記認識における有効性があると判断する有効性判断処理と、前記有効性判断処理により有効性があると判定された場合は、前記帳票画像のうち、少なくとも文字記入欄に対して前記フィルタ処理により下地を除去する下地除去処理と、前記下地除去処理を実施した後に前記記入内容の認識を行う認識処理とをコンピュータに実行させることを特徴とする。
【0018】
【発明の実施の形態】
以下、この発明に係る帳票処理方法および装置並びにプログラムの一実施の形態について、添付図面を参照して詳細に説明する。
【0019】
図1は、この発明を適用した帳票処理装置の構成例を示すブロック図である。
同図に示すように、帳票処理装置10は、画像入力部1と画像保持部2、2値化部3、文字切出部4、下地除去部5、文字認識部6、辞書データ保持部7、結果判定部8、結果出力部9を具備して構成される。なお、この帳票処理装置10は、ハードディスク等の周辺装置を含むコンピュータ装置および当該コンピュータ装置を動作させるソフトウェアにより構成することが可能である。
【0020】
画像入力部1は、帳票を読み取って得た帳票画像を取得するもので、図示しないスキャナ等から出力される画像データを受け付ける。画像保持部2は、画像入力部1が取得した帳票画像を保持する。2値化部3は、画像保持部2が保持している帳票画像(濃度画像)を2値画像に変換する。文字切出部4は、2値化部3が出力する2値画像中の指定された領域(例えば、金額欄)内の文字を切り出し、文字が記載されている領域を特定する。下地除去部5は、画像保持部2に保持されている帳票画像から下地の除去を行う。文字認識部6は、帳票画像中の文字を認識する。辞書データ保持部7は、文字認識部6が文字認識を行う際に必要な辞書データを保持している。結果判定部8は、文字認識部6による文字認識の精度を判定し、認識結果を出力するか拒絶するかを判定する。結果出力部9は、結果判定部8の判定結果に従って、認識結果を出力する。
【0021】
次に、帳票処理装置10の動作について説明する。図2は、帳票処理装置10の動作の流れを示すフローチャートである。
【0022】
まず、帳票処理装置10は、画像入力部1が帳票画像を取得し、これを画像保持部2に保持する(ステップ101)。
【0023】
続いて、2値化部3および文字切出部4で特定された金額欄中の文字位置の情報を用い、背景領域切出処理を行う(ステップ102)。背景領域切出処理は、金額欄等の予め指定された領域内の背景領域(ここでは、指定された領域内のうち、文字が印字または記入されていない領域を背景領域と称する)を切り出す処理であるが、その詳細については後述する。
【0024】
次に、下地除去部5により下地絵柄除去処理を行う(ステップ103)。下地絵柄除去処理は、画像保持部2に保持されている帳票画像から必要に応じて下地を除去する処理であるが、その詳細については後述する。
【0025】
次に、文字認識部6により個別文字認識処理を行う(ステップ104)。個別文字認識処理は、辞書データ保持部7に保持されている辞書を参照して、帳票画像中の文字を認識する処理であるが、その詳細については後述する。
【0026】
個別文字認識処理が終了すると、当該処理の結果に基づいて結果判定部8が、認識結果をリジェクトするか否かを判定する(ステップ105)。そして、その結果を結果出力部9が出力して(ステップ106)、処理を終了する。
【0027】
次に、ステップ102の背景領域切出処理について説明する。図3は、背景領域切出処理の流れを示すフローチャートである。
【0028】
背景領域切出処理では、まず、2値化部3が、画像保持部2に保持されている濃度画像を取得する(ステップ201)。ここで取得する濃度画像は、図4に示すような手形20のうち金額欄21等の部分画像や、図5に示すような小切手30のうち金額欄31等の部分画像である。この部分画像は、金額欄21、31以外にも文字が記入若しくは印字されている部分である場合もあり、その部分は、最終的に文字認識を施そうとする部分となる。なお、2値化部3は、必ずしも画像保持部2から濃度画像として部分画像を取得する必要はなく、帳票全体の濃度画像を取得した後に、必要な部分画像を予め指定された座標に基づいて取得するようにしてもよい。
【0029】
続いて、2値化部3は、取得した濃度画像からノイズの除去を行い(ステップ202)、ノイズを除去した濃度画像を2値化する(ステップ203)。
【0030】
次に、文字切出部4が、2値化部3により2値化された画像から文字を切り出す(ステップ204)。ここでの文字の切り出しは、文字認識を行うためではなく、文字が記入若しくは印字されている部分を特定するために行うものである。文字の切り出しを終えると、文字切出部4は、他の部分、つまり、文字が記入若しくは印字されていない部分を背景領域として決定する(ステップ205)。例えば、図6(a)に示す金額欄のように文字が左寄りに印字されている場合には、右寄りの領域41を背景領域とし、図6(b)に示す金額欄のように文字が右寄りに印字されている場合には、左寄りの領域42を背景領域とする。また、2値化部3が2値化した画像が、小切手の振出日欄であった場合には、図7に示すように、文字が記入若しくは印字されていない領域43を背景領域とする。
【0031】
次に、ステップ103の下地絵柄除去処理について説明する。図8は、下地絵柄除去処理の流れを示すフローチャートである。
【0032】
下地絵柄除去処理は、下地除去部5によって行われるが、下地除去部5は、まず、画像保持部2から濃度画像を取得する(ステップ301)。ここで取得する濃度画像は、上述の2値化部3が取得した濃度画像と同様に金額欄21や金額欄31等の部分画像である。なお、説明の都合上、ここで取得した濃度画像を「Image0」と称することとする。
【0033】
続いて、下地除去部5は、取得した濃度画像(Image0)から背景領域切出処理で決定された背景領域を切り出す(ステップ302)。同様に、切り出した背景領域を「Image1」と称することとする。
【0034】
次に、下地除去部5は、切り出した背景領域(Image1)に対して背景一様化処理を施す(ステップ303)。背景一様化処理は、背景の濃淡差を減少させる処理であり、その処理の流れは、図9に示すようになる。図9は、背景一様化処理の流れを示すフローチャートである。
【0035】
背景一様化処理では、下地除去部5が、まず、背景領域の画像(Image1)を取得する(ステップ331)。そして、取得した画像の濃度値のヒストグラムを作成し(ステップ332)、そのピーク値の濃度値Aを算出する(ステップ333)。濃度値Aを算出すると、Image1に対して濃度値A以上の濃度の全ての画素を濃度値Aの画素に変換し(ステップ334)、その変換した画像を出力する(ステップ335)。この処理により、ステップ332で作成したヒストグラムが、例えば、図10(a)に示すようなものである場合には、その処理結果は、同図(b)に示すようなものとなる。なお、図10においては、濃度値を8ビットで表し、濃度値0が黒、濃度値255が白となる。
【0036】
ところで、背景領域の画像(Image1)の濃度のヒストグラムは、その画像によって異なるものである。例えば、背景が縞模様の場合、比較的黒色に近い縞の幅が比較的白色に近い縞の幅よりも狭い場合には、図11(a)に示すような濃度ヒストグラムとなり、比較的黒色に近い縞の幅が比較的白色に近い縞の幅よりも広い場合には、図11(b)に示すような濃度ヒストグラムとなる。いずれの場合も、背景一様化処理を施すことで、白色に近い側の画素が濃度値Aの画素に変更されることとなる。なお、同様に、背景一様化処理を施した画像を「Image2」と称する。
【0037】
さて、背景一様化処理が終了すると、下地除去部5は、背景一様化処理が施された画像(Image2)の各画素の強度値Bを算出する(図8、ステップ304)。強度値Bの算出は、ロビンソンオペレータにより算出する。ロビンソンオペレータは、各画素の濃度勾配の強度を強度値として求めることができるが、その強度値の算出方法については、その詳細は、特開平4−111085号公報に記載されており、ここでは概略のみを説明する。
【0038】
図12は、ロビンソンオペレータを示した図であり、ロビンソンオペレータは、3×3画素の各画素に重みが付けられている8種類のマスクM0〜M7で構成されている。各マスクM0〜M7は、そのマスクが有する方向の勾配強度を抽出するためのものである。例えば、マスクM0により画像を走査すれば、各画素毎に図中上方向の勾配強度が求められる。同様に、マスクM1〜M7により画像を走査することによって、各画素毎に8方向毎の濃度勾配強度を求めることができる。このようにして各画素毎に求めた濃度勾配強度の中から最大値のものを当該画素の濃度勾配強度とする。
【0039】
Image2の各画素の強度値Bを求めると、下地除去部5は、その強度値Bが所定の値(例えば15)以上の画素が一定数以上あるか否かを判定する(図8、ステップ305)。ここでは、強度値が所定値以上の画素が一定数以上あるということは、その画像が文字認識に影響を与えるものとしている。
【0040】
判定の結果、強度値が所定値以上の画素が一定数以上あった場合には(ステップ305でYES)、下地除去部5は、背景領域の画像(Image1)に対してフィルタ処理を施す(ステップ306)。このフィルタ処理では、Image1に対して、例えば、図13(a)に示す垂直メジアンフィルタを用いる。垂直メジアンフィルタは、横縞模様や交差模様の除去に有効なフィルタである。
【0041】
垂直メジアンフィルタをかけた場合、ある注目画素に対して、注目画素と、その上下それぞれの4画素の計9画素のそれぞれの濃度値を取得し、その中央値、つまり、9画素の濃度値を昇順若しくは降順に並べた際の5番目の濃度値の値を注目画素の濃度値とするものである。これにより、9画素中で比較的暗い部分が4画素以下であれば、その注目画素は、比較的明るい濃度値に変わるため、結果的に比較的細くて黒い部分がなくなることになる。
【0042】
また、ステップ306のフィルタ処理に際しては、図13(b)に示す水平メジアンフィルタを用いてもよい。この水平メジアンフィルタは、縦縞模様の除去に有効なものであるため、垂直メジアンフィルタと水平メジアンフィルタを処理対象の画像に応じて使い分けてもよく、両者を同時に利用してもよい。なお、同様に、フィルタ処理を施した画像を「Image3」と称する。
【0043】
フィルタ処理が終了すると、下地除去部5は、背景領域の画像(Image1)を2値化するための2値化しきい値Cを算出し(ステップ307)、Image1のしきい値C以下の濃度値の画素数Dを算出するとともに(ステップ308)、Image3のしきい値C以下の濃度値の画素数Eを算出する(ステップ309)。そして、画素数Eが画素数Dの2分の1以下であった場合には(ステップ310でYES)、Image3を作成したのと同様のフィルタ処理を濃度画像(Image0)に施し(ステップ311)、その結果得られた濃度画像(Image4と称する)を出力して処理を終了する(ステップ312)。
【0044】
ところで、ステップ310で画像数Eが画素数Dの2分の1以下であるか否かを判定しているのは、フィルタ処理の有効性を確認しているもので、ここでは、図14(a)に示すようなImage1の濃度ヒストグラムが、フィルタ処理により(Image3)、図14(b)に示すような濃度ヒストグラムとなったことを確認している。つまり、フィルタ処理により、濃度ヒストグラムに現れる比較的明るい濃度の山と比較的暗い濃度の山のうち、比較的暗い濃度の山が減少したことが確認できればよいものとしている。これは、比較的明るい濃度の山は、上述した背景一様化処理で減少させることができるためである。
【0045】
また、ステップ306のフィルタ処理において、垂直メジアンフィルタのみを用いた場合に、画像数Eが画素数Dの2分の1未満であった場合には、ステップ306に戻って、水平メジアンフィルタを用いたフィルタ処理を行うようにしてもよい。
【0046】
ここで、メジアンフィルタについて補足すると、メジアンフィルタは、その窓幅を変更することで、その性質を変更することができる。例えば、上述の説明では、メジアンフィルタの窓幅を9としているが、この窓幅は、帳票類に多く使われる背景模様とチェックライタにより印字される文字を考慮して決定したのもである。チェックライタ文字には、縦縞と横縞のいずれかを有しているものがあるが、通常、黒色部分の割合が多い縞模様となっている。そして、メジアンフィルタの窓幅の設定により、チャックライタ文字の特徴を除去することなく、背景模様のみを除去することが可能となる。
【0047】
一方、Image2の各画素の強度値Bを求めた際に、その強度値Bから当該画像がが文字認識に影響を与えない、つまり、強度値Bが所定の値(例えば15)以上の画素が一定数未満であると判定した場合や(ステップ305でNO)、フィルタ処理の有効性が確認できなかった、つまり、画素数Eが画素数Dの2分の1を越えた場合には(ステップ310でNO)、下地除去部5は、画像保持部2から取得した濃度画像(Image0)をそのまま出力して処理を終了する(ステップ313)。
【0048】
最後に、ステップ104の個別文字認識処理について説明する。個別文字認識処理については、従来から実施されているどのような方法を用いてもよく、例えば、特開平4−111085号公報に記載されている方法を用いてもよい。このため、ここでは、個別文字認識処理については、概略のみを説明する。
【0049】
図15は、個別文字認識処理の流れを示すフローチャートである。個別文字認識処理は、文字認識部6が、下地除去部5の処理結果の画像(上述のImage0若しくはImage4)に対して行うもので、ます、当該画像に対して背景一様化処理を行う(ステップ401)。この背景一様化処理は、上述したものと同様の処理であり、背景の濃淡差を減少させる。
【0050】
続いて、文字認識部6は、背景一様化処理を施した画像に対して、そのコントラストの強調処理と(ステップ402)、平滑化処理を処理を実行する(ステップ403)。そして、平滑化を行った画像から文字の特徴量を算出し(ステップ404)、その特徴量を用いて辞書データ保持部7に保持されている辞書データとのマッチング処理を行い(ステップ405)、処理を終了する。
【0051】
【発明の効果】
以上説明したように、この発明によれば、帳票を読み取って得た帳票画像に対して、その一部分に下地除去処理を実施し、当該下地除去処理を実施した場合の有効性を確認した後に、帳票画像全体に対して下地除去処理を実施して文字認識処理を行うように構成したので、下地除去処理が有効な帳票画像に対しては、下地除去により文字認識の認識率を向上させることができ、下地除去処理が不要な帳票画像に対しては、下地除去処理を行わず、認識率の低下を回避できる。
【図面の簡単な説明】
【図1】この発明を適用した帳票処理装置の構成例を示すブロック図である。
【図2】帳票処理装置10の動作の流れを示すフローチャートである。
【図3】背景領域切出処理の流れを示すフローチャートである。
【図4】手形の画像例を示した図である。
【図5】小切手の画像例を示した図である。
【図6】背景領域の決定方法を説明するための図(1)である。
【図7】背景領域の決定方法を説明するための図(2)である。
【図8】下地絵柄除去処理の流れを示すフローチャートである。
【図9】背景一様化処理の流れを示すフローチャートである。
【図10】背景一様化処理を説明するための濃度ヒストグラムの例を示した図(1)である。
【図11】背景一様化処理を説明するための濃度ヒストグラムの例を示した図(2)である。
【図12】ロビンソンオペレータを示した図である。
【図13】メジアンフィルタの構成例を示した図である。
【図14】フィルタ処理の有効性を説明するための図である。
【図15】個別文字認識処理の流れを示すフローチャートである。
【符号の説明】
1 画像入力部
2 画像保持部
3 2値化部
4 文字切出部
5 下地除去部
6 文字認識部
7 辞書データ保持部
8 結果判定部
9 結果出力部
10 帳票処理装置
20 手形
21 金額欄
30 小切手
31 金額欄
41 領域
42 領域
43 領域
M0 マスク
M1 マスク
M2 マスク
M3 マスク
M4 マスク
M5 マスク
M6 マスク
M7 マスク[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a form processing method, apparatus, and program, and more particularly, to a form processing method, apparatus, and program for recognizing the description items of forms such as a background pattern.
[0002]
[Prior art]
In recent years, along with improvements in image processing technology, recognition technology, and the like, there are increasing opportunities to perform character recognition processing on various documents and digitize the items described in the documents. As an apparatus for performing such character recognition processing, for example, there is a pattern recognition apparatus described in Japanese Patent Laid-Open No. 4-111085.
[0003]
The character recognition process can recognize not only printed characters but also handwritten characters. However, the recognition rate varies depending on various conditions, and the character recognition rate may be significantly lowered depending on the conditions.
[0004]
For example, when the object of character recognition processing is a form, and there is a pattern on the background of the form, the character recognition rate may be reduced. This tendency is more conspicuous particularly when a horizontal stripe pattern or the like is included in the background of a field for entering characters such as a bill or check amount field.
[0005]
[Problems to be solved by the invention]
As described above, when character recognition processing is performed on a form or the like, if there is a pattern on the background of the target form or the like, the character recognition rate may decrease. For this reason, it is conceivable to remove the background portion from the form image obtained by reading the form prior to the character recognition process.
[0006]
However, when the process of removing the background portion from the form image unconditionally is performed, the character recognition rate may be lowered depending on the form image.
[0007]
Therefore, an object of the present invention is to provide a form processing method, apparatus, and program that can appropriately remove the background from the form image and improve the recognition rate of characters in the form image.
[0008]
[Means for Solving the Problems]
In order to achieve the above-mentioned object, the invention of
[0009]
According to a second aspect of the present invention, in the form processing apparatus for recognizing the entry contents of the form based on the form image obtained by reading the form, the form image is read and characters are printed from the grayscale image of the designated area. Or a cutting out means for cutting out a background area that is not filled, and a background uniformizing means for performing a background uniformizing process for reducing the difference in density of the background with respect to the background area cut out by the cutting out means; The maximum value of the density gradients in the direction of each pixel of the form image subjected to background uniformization processing by the background uniformizing means is the density gradient strength of the pixel, and the pixels having the density gradient strength value equal to or greater than a predetermined value Is applied to the background area to remove at least one pattern of horizontal stripes, crossing patterns and vertical stripes, and before and after the filter process, the brightness of a predetermined value or less When the number of primes has decreased by a predetermined percentage or more, the effectiveness determination means for determining that the background removal process for removing the background is effective in the recognition, and the effectiveness determination means have determined that there is effectiveness. In this case, at least the character entry column in the form image is subjected to background removal processing by the background processing by the filter processing, and the entry content is recognized after the background removal processing by the background removal device is performed. And a recognition means .
[0010]
According to a third aspect of the present invention, in the form processing program for causing a computer to recognize the entry contents of the form on the basis of the form image obtained by reading the form, the form image is read and the grayscale image of the designated area is used. A cutout process for cutting out a background area in which characters are not printed or written, a background uniformizing process for reducing a background density difference for the background area cut out by the cutout process, and the background uniformization When the maximum value of the density gradients in the direction of each pixel of the processed form image is set as the density gradient intensity of the pixel, and the number of pixels having the density gradient intensity value equal to or larger than a predetermined value is greater than or equal to a predetermined number, the background A filtering process is performed on the region to remove at least one of a horizontal stripe pattern, a cross pattern, and a vertical stripe pattern, and before and after the filtering process, the number of pixels having a brightness equal to or lower than a predetermined value is a predetermined percentage. If it is determined that the effectiveness of the removal of the background is effective in the recognition and the effectiveness determination process determines that the removal of the background is effective, Further, the present invention is characterized in that at least a background removal process for removing a background by the filtering process on at least a character entry column and a recognition process for recognizing the entry content after the background removal process is performed .
[0018]
DETAILED DESCRIPTION OF THE INVENTION
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an embodiment of a form processing method and apparatus and a program according to the present invention will be described in detail with reference to the accompanying drawings.
[0019]
FIG. 1 is a block diagram showing a configuration example of a form processing apparatus to which the present invention is applied.
As shown in the figure, the
[0020]
The
[0021]
Next, the operation of the
[0022]
First, in the
[0023]
Subsequently, using the information on the character position in the amount column specified by the binarizing
[0024]
Next, a background pattern removal process is performed by the background removal unit 5 (step 103). The background pattern removal process is a process of removing the background from the form image held in the
[0025]
Next, individual character recognition processing is performed by the character recognition unit 6 (step 104). The individual character recognition process is a process for recognizing characters in the form image with reference to the dictionary held in the dictionary
[0026]
When the individual character recognition process ends, the result determination unit 8 determines whether or not to reject the recognition result based on the result of the process (step 105). And the result output part 9 outputs the result (step 106), and complete | finishes a process.
[0027]
Next, the background area extraction process in
[0028]
In the background region extraction process, first, the
[0029]
Subsequently, the
[0030]
Next, the
[0031]
Next, the background pattern removal process in
[0032]
The background pattern removal process is performed by the
[0033]
Subsequently, the
[0034]
Next, the
[0035]
In the background uniformization process, the
[0036]
By the way, the density histogram of the image (Image 1) in the background region differs depending on the image. For example, when the background is a striped pattern, if the width of the stripes that are relatively black is narrower than the width of the stripes that are relatively white, the density histogram shown in FIG. When the width of the near stripe is wider than the width of the stripe near relatively white, a density histogram as shown in FIG. In any case, by performing the background uniformization process, the pixel on the side close to white is changed to a pixel of density value A. Similarly, an image that has undergone background uniformization processing is referred to as “Image2”.
[0037]
Now, when the background uniformizing process is completed, the
[0038]
FIG. 12 is a diagram showing the Robinson operator. The Robinson operator is composed of eight types of masks M0 to M7 in which each pixel of 3 × 3 pixels is weighted. Each of the masks M0 to M7 is for extracting the gradient strength in the direction of the mask. For example, if the image is scanned with the mask M0, the gradient strength in the upward direction in the figure is obtained for each pixel. Similarly, by scanning the image with the masks M1 to M7, it is possible to obtain the density gradient strength for each of the eight directions for each pixel. In this way, the maximum value of the density gradient intensities obtained for each pixel is set as the density gradient intensity of the pixel.
[0039]
When the intensity value B of each pixel of Image2 is obtained, the
[0040]
As a result of the determination, if there are a certain number of pixels having an intensity value equal to or greater than a predetermined value (YES in step 305), the
[0041]
When the vertical median filter is applied, the density value of a total of nine pixels including the target pixel and the four pixels above and below the target pixel is obtained for a certain target pixel, and the median value, that is, the density value of nine pixels is obtained. The value of the fifth density value when arranged in ascending or descending order is used as the density value of the target pixel. As a result, if the relatively dark portion in 9 pixels is 4 pixels or less, the target pixel changes to a relatively bright density value, and as a result, the relatively thin and black portion disappears.
[0042]
In the filtering process in
[0043]
When the filtering process is completed, the
[0044]
Incidentally, whether or not the number of images E is less than or equal to one-half of the number of pixels D in
[0045]
If only the vertical median filter is used in the filtering process of
[0046]
Here, supplementing the median filter, the median filter can change its property by changing its window width. For example, in the above description, the window width of the median filter is set to 9, but this window width is determined in consideration of a background pattern often used for forms and characters printed by a check writer. Some checkwriter characters have either vertical stripes or horizontal stripes, but usually have a striped pattern with a large proportion of black portions. By setting the window width of the median filter, only the background pattern can be removed without removing the characteristics of the chuck writer character.
[0047]
On the other hand, when the intensity value B of each pixel of Image2 is obtained, the image does not affect character recognition from the intensity value B, that is, pixels whose intensity value B is a predetermined value (for example, 15) or more. If it is determined that the number is less than a certain number (NO in step 305), the effectiveness of the filtering process cannot be confirmed, that is, if the number of pixels E exceeds one half of the number of pixels D (step In
[0048]
Finally, the individual character recognition process in
[0049]
FIG. 15 is a flowchart showing the flow of the individual character recognition process. The individual character recognition process is performed by the character recognition unit 6 on an image (Image0 or Image4 described above) as a result of processing by the
[0050]
Subsequently, the character recognition unit 6 performs contrast enhancement processing (step 402) and smoothing processing (step 403) on the image subjected to the background uniformization processing. Then, the feature amount of the character is calculated from the smoothed image (step 404), matching processing with the dictionary data held in the dictionary
[0051]
【The invention's effect】
As described above, according to the present invention, a form image obtained by reading a form is subjected to a background removal process on a part thereof, and after confirming the effectiveness when the background removal process is performed, Since the background removal process is performed on the entire form image to perform the character recognition process, it is possible to improve the recognition rate of character recognition by removing the background for the form image for which the background removal process is effective. In addition, for a form image that does not require background removal processing, the background removal processing is not performed, and a reduction in recognition rate can be avoided.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration example of a form processing apparatus to which the present invention is applied.
FIG. 2 is a flowchart showing an operation flow of the
FIG. 3 is a flowchart showing a flow of background region extraction processing;
FIG. 4 is a diagram illustrating an example of a bill image.
FIG. 5 is a diagram showing an example of an image of a check.
FIG. 6 is a diagram (1) illustrating a method for determining a background region.
FIG. 7 is a diagram (2) for explaining a background region determination method;
FIG. 8 is a flowchart showing the flow of a background pattern removal process.
FIG. 9 is a flowchart showing a flow of background equalization processing.
FIG. 10 is a diagram (1) illustrating an example of a density histogram for explaining background uniformization processing;
FIG. 11 is a diagram (2) illustrating an example of a density histogram for explaining background uniformization processing;
FIG. 12 is a diagram showing a Robinson operator.
FIG. 13 is a diagram illustrating a configuration example of a median filter.
FIG. 14 is a diagram for explaining the effectiveness of filter processing.
FIG. 15 is a flowchart showing a flow of individual character recognition processing.
[Explanation of symbols]
DESCRIPTION OF
Claims (3)
前記帳票画像を読み取り、指定された領域の濃淡画像より文字が印字または記入されていない背景領域を切出し、
前記切り出された背景領域に対して、背景の濃淡差を減少させる背景一様化処理を行い、
前記背景一様化処理を行った帳票画像の各画素の方向毎の濃度勾配のうちの最大値を当該画素の濃度勾配強度とし、該濃度勾配強度値が所定値以上の画素が所定数以上ある場合に、前記背景領域に対して横縞模様や交差模様と縦縞模様との少なくとも一つの模様を除去するフィルタ処理を行い、該フィルタ処理の前後で、所定値以下の明るさの画素の数が所定割合以上減少した場合に、下地を除去する下地除去処理の前記認識における有効性があると判断し、
前記有効性があると判定された場合は、前記帳票画像のうち、少なくとも文字記入欄に対して前記フィルタ処理による下地除去処理を実施し、
前記下地除去処理を実施した後に前記記入内容の認識を行う
ことを特徴とする帳票処理方法。In the form processing method for recognizing the entry contents of the form based on the form image obtained by reading the form,
Read the form image, cut out the background area where characters are not printed or filled in from the shaded image of the specified area,
A background uniformizing process is performed on the cut-out background area to reduce a background gradation difference,
The maximum value of the density gradients in the direction of each pixel of the form image subjected to the background uniforming process is set as the density gradient intensity of the pixel, and there are a predetermined number or more of pixels having the density gradient intensity value equal to or larger than a predetermined value. A filtering process for removing at least one of a horizontal stripe pattern, a cross pattern, and a vertical stripe pattern is performed on the background area, and the number of pixels having a brightness equal to or lower than a predetermined value is determined before and after the filtering process. When the ratio is reduced by more than a percentage, it is determined that the background removal process for removing the background is effective in the recognition,
If it is determined that there is validity, at least the character entry column of the form image is subjected to the background removal process by the filter process,
The form processing method, wherein the entry content is recognized after the background removal processing is performed.
前記帳票画像を読み取り、指定された領域の濃淡画像より文字が印字または記入されていない背景領域を切り出す切出手段と、
前記切出手段により切り出された背景領域に対して、背景の濃淡差を減少させる背景一様化処理を行う背景一様化手段と、
前記背景一様化手段により背景一様化処理を行った帳票画像の各画素の方向毎の濃度勾配のうちの最大値を当該画素の濃度勾配強度とし、前記濃度勾配強度値が所定値以上の画素が所定数以上ある場合に、前記背景領域に対して横縞模様や交差模様と縦縞模様との少なくとも一つの模様を除去するフィルタ処理を行い、該フィルタ処理の前後で、所定値以下の明るさの画素の数が所定割合以上減少した場合に、下地を除去する下地除去処理の前記認識における有効性があると判断する有効性判断手段と、
前記有効性判断手段により有効性があると判定された場合は、前記帳票画像のうち、少なくとも文字記入欄に対して前記フィルタ処理による下地除去処理を実施する下地除去手段と、
前記下地除去手段による下地除去処理を実施した後に前記記入内容の認識を行う認識手段と
を具備することを特徴とする帳票処理装置。In the form processing device that recognizes the entry contents of the form based on the form image obtained by reading the form,
A cutting means for reading the form image and cutting out a background area in which characters are not printed or filled in from a grayscale image of a designated area;
A background uniformizing means for performing a background uniformizing process for reducing a background density difference with respect to the background region cut out by the cutting means;
The maximum value of the density gradients in the direction of each pixel of the form image subjected to background uniformization processing by the background uniformizing unit is set as the density gradient strength of the pixel, and the density gradient strength value is equal to or greater than a predetermined value. When the number of pixels is greater than or equal to a predetermined number, the background region is subjected to a filter process for removing at least one of a horizontal stripe pattern, an intersecting pattern, and a vertical stripe pattern, and the brightness is equal to or less than a predetermined value before and after the filter process. Effectiveness determination means for determining that the recognition of the background removal processing for removing the background is effective in the recognition when the number of pixels decreases by a predetermined percentage or more;
If it is determined that the validity determination means is effective, the background removal means for performing the background removal processing by the filter processing on at least the character entry column of the form image,
A form processing apparatus comprising: recognition means for recognizing the entry content after performing the background removal processing by the background removal means .
前記帳票画像を読み取り、指定された領域の濃淡画像より文字が印字または記入されていない背景領域を切り出す切出処理と、
前記切出処理により切り出された背景領域に対して、背景の濃淡差を減少させる背景一様化処理と、
前記背景一様化処理を行った帳票画像の各画素の方向毎の濃度勾配のうちの最大値を当該画素の濃度勾配強度とし、前記濃度勾配強度値が所定値以上の画素が所定数以上ある場合に、前記背景領域に対して横縞模様や交差模様と縦縞模様との少なくとも一つの模様を除去するフィルタ処理を行い、該フィルタ処理の前後で、所定値以下の明るさの画素の数が所定割合以上減少した場合に、下地を除去することの前記認識における有効性があると判断する有効性判断処理と、
前記有効性判断処理により有効性があると判定された場合は、前記帳票画像のうち、少なくとも文字記入欄に対して前記フィルタ処理により下地を除去する下地除去処理と、
前記下地除去処理を実施した後に前記記入内容の認識を行う認識処理と
をコンピュータに実行させることを特徴とする帳票処理プログラム。Based on the form image obtained by reading the form, in the form processing program for causing the computer to recognize the entry contents of the form,
A cutting process for reading out the form image and cutting out a background area in which characters are not printed or filled in from a grayscale image of a designated area;
A background uniformization process for reducing a background shade difference with respect to a background region cut out by the cutting process;
The maximum value of the density gradients in the direction of each pixel of the form image subjected to the background uniforming process is defined as the density gradient intensity of the pixel, and there are a predetermined number or more of pixels having the density gradient intensity value equal to or greater than a predetermined value. A filtering process for removing at least one of a horizontal stripe pattern, a cross pattern, and a vertical stripe pattern is performed on the background area, and the number of pixels having a brightness equal to or lower than a predetermined value is determined before and after the filtering process. An effectiveness determination process for determining that the removal of the background is effective in the recognition when the ratio is decreased by more than a ratio ;
If it is determined that the validity is determined by the validity determination process, a background removal process for removing the background by the filter process for at least the character entry column in the form image;
A recognition process for recognizing the written content after performing the background removal process;
A form processing program characterized by causing a computer to execute .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001216880A JP4732626B2 (en) | 2001-07-17 | 2001-07-17 | Form processing method, apparatus, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001216880A JP4732626B2 (en) | 2001-07-17 | 2001-07-17 | Form processing method, apparatus, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2003030586A JP2003030586A (en) | 2003-01-31 |
JP4732626B2 true JP4732626B2 (en) | 2011-07-27 |
Family
ID=19051296
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2001216880A Expired - Fee Related JP4732626B2 (en) | 2001-07-17 | 2001-07-17 | Form processing method, apparatus, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4732626B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014132414A1 (en) | 2013-02-28 | 2014-09-04 | グローリー株式会社 | Character recognition method and character recognition system |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006085353A (en) | 2004-09-15 | 2006-03-30 | Nec Corp | Content distribution system, method therefor, accounting device, content distribution device and program |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03102470A (en) * | 1989-09-14 | 1991-04-26 | Fujitsu Ltd | Instrument processor |
JPH03113582A (en) * | 1989-09-27 | 1991-05-14 | Oki Electric Ind Co Ltd | Character background processing device |
JPH03252893A (en) * | 1990-03-02 | 1991-11-12 | Fuji Facom Corp | Character recognizing device |
JPH09503329A (en) * | 1994-12-20 | 1997-03-31 | インターナシヨナル・ビジネス・マシーンズ・コーポレーシヨン | How to separate foreground information in a document from background information |
JP2000306103A (en) * | 1999-04-26 | 2000-11-02 | Canon Inc | Method and device for information processing |
-
2001
- 2001-07-17 JP JP2001216880A patent/JP4732626B2/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03102470A (en) * | 1989-09-14 | 1991-04-26 | Fujitsu Ltd | Instrument processor |
JPH03113582A (en) * | 1989-09-27 | 1991-05-14 | Oki Electric Ind Co Ltd | Character background processing device |
JPH03252893A (en) * | 1990-03-02 | 1991-11-12 | Fuji Facom Corp | Character recognizing device |
JPH09503329A (en) * | 1994-12-20 | 1997-03-31 | インターナシヨナル・ビジネス・マシーンズ・コーポレーシヨン | How to separate foreground information in a document from background information |
JP2000306103A (en) * | 1999-04-26 | 2000-11-02 | Canon Inc | Method and device for information processing |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014132414A1 (en) | 2013-02-28 | 2014-09-04 | グローリー株式会社 | Character recognition method and character recognition system |
Also Published As
Publication number | Publication date |
---|---|
JP2003030586A (en) | 2003-01-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6080259B2 (en) | Character cutting device and character cutting method | |
JP3904840B2 (en) | Ruled line extraction device for extracting ruled lines from multi-valued images | |
KR100512831B1 (en) | Image processing method, apparatus and program storage medium | |
US7715628B2 (en) | Precise grayscale character segmentation apparatus and method | |
JPH096957A (en) | Binarization method for density image and image binarization device | |
JP3830998B2 (en) | Ruled line removal method and character recognition apparatus using the same | |
CN113033562A (en) | Image processing method, device, equipment and storage medium | |
JP4049560B2 (en) | Halftone dot removal method and system | |
CN117993406A (en) | Automatic two-dimensional bar code identification and reading method and system | |
CN111583156B (en) | Document image shading removing method and system | |
JP3416058B2 (en) | Character extraction method of gray image and recording medium recording the program | |
JP6144892B2 (en) | Image processing apparatus, image processing method, and program | |
JP4732626B2 (en) | Form processing method, apparatus, and program | |
CN111445402A (en) | Image denoising method and device | |
JP3150762B2 (en) | Gradient vector extraction method and character recognition feature extraction method | |
RU2520407C1 (en) | Method and system of text improvement at digital copying of printed documents | |
JP3237906B2 (en) | Inspection equipment for printed matter | |
JP4230960B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP4253265B2 (en) | Shadow detection apparatus, shadow detection method and shadow detection program, image processing apparatus using shadow detection apparatus, image processing method using shadow detection method, and image processing program using shadow detection program | |
JP2008225654A (en) | Image processing method, image processor, program, and program storage medium | |
JP3462727B2 (en) | Character string binarization device | |
Tribuzy et al. | Vehicle License Plate Preprocessing Techniques Using Graphical Interface | |
JP3848792B2 (en) | Character string recognition method and recording medium | |
JP3756660B2 (en) | Image recognition method, apparatus and recording medium | |
JP2000331118A (en) | Image processor and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080509 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100708 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100720 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100917 |
|
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: 20110419 |
|
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: 20110421 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140428 Year of fee payment: 3 |
|
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: 20140428 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |