JP3957923B2 - Image classification apparatus and image classification method - Google Patents

Image classification apparatus and image classification method Download PDF

Info

Publication number
JP3957923B2
JP3957923B2 JP17157899A JP17157899A JP3957923B2 JP 3957923 B2 JP3957923 B2 JP 3957923B2 JP 17157899 A JP17157899 A JP 17157899A JP 17157899 A JP17157899 A JP 17157899A JP 3957923 B2 JP3957923 B2 JP 3957923B2
Authority
JP
Japan
Prior art keywords
similarity
difference
image
distance
horizontal distance
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
Application number
JP17157899A
Other languages
Japanese (ja)
Other versions
JP2001005962A (en
Inventor
健一 数見
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP17157899A priority Critical patent/JP3957923B2/en
Publication of JP2001005962A publication Critical patent/JP2001005962A/en
Application granted granted Critical
Publication of JP3957923B2 publication Critical patent/JP3957923B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Image Analysis (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像を所定の定型の画像に分類するための画像分類装置及び画像分類方法に関する。
【0002】
【従来の技術】
コンピュータの高性能化に伴い、大量の画像データを取り扱えるようになっており、多様な分野で利用されている。係る分野の1つとして、予め決定した定型の画像へ、入力した画像を分類することがある。
【0003】
例えば、銀行、商店等では、各種の帳票を介して商取引等が行われており、大量の帳票を取り扱うことを強いられている。係る実情に鑑み、大量の帳票を処理する分野で、帳票をスキャナ等で読取り、コンピュータ上で類似する定型帳票毎に自動的に分類する画像分類装置が提案されている。
【0004】
係る画像分類装置では、帳票に表されたテーブル(罫線の枠体)、文字、図形等に基づいて、分類する帳票と予め分類された定型帳票との類似度が判断され、最も類似度が高い定型帳票の分類にその帳票を振り分けるものである。
ここで、係る類似度の判断のうち、テーブルの類似度の判断は、テーブルの原点を基準として、テーブル中のセルの中心の距離、セルの個数、テーブル罫線の位置関係等、テーブルを構成する各部品の位置や個数の相違を類似度のペナルティ要素(類似度を否定する要素。)として実行されているのが現状である。
【0005】
【発明が解決しようとする課題】
しかし、スキャナ等による帳票の読取りは、必ずしも正確に読取られるとは限らず、読取られた画像に一定の歪みが生じ易い。このため、従来の画像分類装置におけるテーブルの類似度の判断によれば、テーブルの原点を基準として各セルの位置関係等を比較するため、読取時の歪みに起因して、セルがテーブル原点から離れるに従ってその距離の誤差が累積することとなり、本来類似度が高く評価されるべきものが、低く評価される場合があった。
【0006】
従って、本発明の目的は、画像の読取時の歪みによる影響を最小限にしつつ、画像の類似度を識別し得る画像分類装置、又は、画像分類方法を提供することにある。
【0007】
【課題を解決するための手段】
本発明によれば、入力画像を、予め分類された定型画像との類似度に従って分類するための画像分類装置であって、前記入力画像と前記定型画像との類似度を判定する類似度判定手段と、各々の前記定型画像が有するテーブルの各罫線の原点からの水平距離の情報と垂直距離の情報とを含む、該テーブルのデータを格納した記憶手段と、前記入力画像が有するテーブルの各罫線の原点からの水平距離の情報と垂直距離の情報を含む、該テーブルのデータを抽出する抽出手段と、抽出したテーブルのデータと、前記記憶手段に格納した各々のテーブルのデータとに基づいて、前記画像のテーブルと各々の前記定型画像のテーブルとの相似度を判定する相似度判定手段と、を備え、記相似度判定手段は、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分に基づいて、相似度を判定し、前記類似度判定手段は、少なくとも、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分を、類似度のペナルティ要素として類似度を判断し、かつ、前記相似度が高い場合は、前記水平距離の差分及び前記垂直距離の差分のペナルティを軽減することを特徴とする画像分類装置が提供される。
【0008】
この手段では、画像の類似度を判定するにあたり、比較される画像が有するテーブルの相似度が高い場合は前記水平距離の差分及び前記垂直距離の差分のペナルティが軽減され、類似度が高く評価される。すなわちテーブル原点から離れるに従って生じる距離の誤差の累積といった問題が軽減される。
従って、本発明は、画像の読取時の歪みによる影響を最小限にしつつ、画像の類似度を識別することができるという効果を奏する。
【0009】
また、本発明の装置においては、前記相似度判定手段は、前記水平距離の差分と前記水平距離との間の相関係数、及び、前記垂直距離の差分と前記垂直距離との間の相関係数、に基づいて、相似度を判定することもできる。
【0010】
また、本発明の装置においては、前記類似度判定手段は、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分と、テーブルを構成するセルの数の差と、を類似度のペナルティ要素として類似度を判断し、これらのペナルティ要素のうち、前記水平距離の差分及び前記垂直距離の差分については、前記相似度が高い場合は、ペナルティを軽減することもできる。
【0011】
また、本発明の装置においては、前記入力画像及び前記定型画像を、帳票に係る画像とすることができる。
【0012】
また、本発明によれば、入力画像を、予め分類された定型画像との類似度に従って分類するための画像分類方法であって、前記入力画像と前記定型画像との類似度を判定する類似度判定工程と、各々の前記定型画像が有するテーブルの各罫線の原点からの水平距離の情報と垂直距離の情報とを含む、該テーブルのデータをメモリに格納する記憶工程と、前記入力画像が有するテーブルの各罫線の原点からの水平距離の情報と垂直距離の情報を含む、該テーブルのデータを抽出する抽出工程と、抽出したテーブルのデータと、前記メモリに格納した各々のテーブルのデータとに基づいて、前記画像のテーブルと各々の前記定型画像のテーブルとの相似度を判定する相似度判定工程と、を含み、記相似度判定工程では、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分に基づいて、相似度を判定し、前記類似度判定工程では、少なくとも、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分を、類似度のペナルティ要素として類似度を判断し、かつ、前記相似度が高い場合は、前記水平距離の差分及び前記垂直距離の差分のペナルティを軽減することを特徴とする画像分類方法が提供される。
【0014】
また、本発明の方法においては、前記相似度判定工程では、前記水平距離の差分と前記水平距離との間の相関係数、及び、前記垂直距離の差分と前記垂直距離との間の相関係数、に基づいて、相似度を判定することもできる。
【0015】
また、本発明の方法においては、前記類似度判定工程では、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分と、テーブルを構成するセルの数の差と、を類似度のペナルティ要素として類似度を判断し、これらのペナルティ要素のうち、前記水平距離の差分及び前記垂直距離の差分については、前記相似度が高い場合は、ペナルティを軽減することもできる。
【0016】
また、本発明の方法においては、前記入力画像及び前記定型画像を、帳票に係る画像とすることができる。
【0017】
また、本発明によれば、入力画像を、予め分類された定型画像との類似度に従って分類するために、コンピュータを、各々の前記定型画像が有するテーブルの各罫線の原点からの水平距離の情報と垂直距離の情報とを含む、該テーブルのデータを格納した記憶手段、前記入力画像が有するテーブルの各罫線の原点からの水平距離の情報と垂直距離の情報を含む、該テーブルのデータを抽出する抽出手段、抽出したテーブルのデータと、前記記憶手段に格納した各々のテーブルのデータとに基づいて、前記画像のテーブルと各々の前記定型画像のテーブルとの相似度を判定する相似度判定手段、前記入力画像と前記定型画像との類似度を判定する類似度判定手段として機能させるプログラムを記録した記憶媒体であって、記相似度判定手段は、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分に基づいて、相似度を判定し、前記類似度判定手段は、少なくとも、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分を、類似度のペナルティ要素として類似度を判断し、かつ、前記相似度が高い場合は、前記水平距離の差分及び前記垂直距離の差分のペナルティを軽減することを特徴とする記憶媒体が提供される。
【0019】
また、本発明の記憶媒体においては、前記相似度判定手段は、前記水平距離の差分と前記水平距離との間の相関係数、及び、前記垂直距離の差分と前記垂直距離との間の相関係数、に基づいて、相似度を判定することもできる。
【0020】
また、本発明の記憶媒体においては、前記類似度判定手段は、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分と、テーブルを構成するセルの数の差と、を類似度のペナルティ要素として類似度を判断し、これらのペナルティ要素のうち、前記水平距離の差分及び前記垂直距離の差分については、前記相似度が高い場合は、ペナルティを軽減することもできる。
【0021】
また、本発明の記憶媒体においては、前記入力画像及び前記定型画像を、帳票に係る画像とすることができる。
【0022】
【発明の実施の形態】
以下、図面を参照して本発明の好適な実施の形態を詳細に説明する。
図1は、本発明の一実施形態に係る画像分類装置を示すブロック図である。
画像分類装置は、スキャナ1と、ディスクドライブ2と、メモリ3と、ディスプレイ4と、キーボード5と、プロセッサ6と、これらを機能的に接続するシステムバス7と、を備え、ここでは、帳票に係る画像を分類することを目的とするが、これには限定されない。何本かの罫線により複数の文字入力枠を構成するテーブルを含むものは、対象となる。
【0023】
スキャナ1は、分類する帳票を読取り、入力画像としてのその画像データを生成するものである。
ディスクドライブ2は、フロッピーディスク、MOディスク等の読み書き自在な記憶媒体からデータを読み書きするものであって、当該記憶媒体には、定型画像としての定型帳票のテーブルのデータが格納されている。
メモリ3は、読取った画像データの各情報を格納するためのものである。
【0024】
ディスプレイ4は、画像の分類の結果等を表示するためのものである。
キーボード5は、画像分類のための命令等を入力するためのものである。
プロセッサ6は、図示しないROM等に記憶されたプログラムに従って、画像分類のための処理を実行し、また、システムバス7を介して上記各構成を制御するためのものである。
【0025】
係る構成からなる画像分類装置では、以下の処理を実行する。
まず、分類する帳票をスキャナ1で読取り、その画像データを生成する。
プロセッサ6は、読取った画像データに対して、2値化処理を施し、黒ドットのヒストグラム法等の手法により、画像データをテーブル、テキスト、画像等のブロック毎に分割する。更に、分割された各ブロックの詳細なデータを求める。例えば、テーブルブロックであれば、罫線追跡手法等で、テーブルの詳細構造を求める。また、テキストブロックであれば、文字認識手段で文字コードに変換する。
【0026】
本実施形態では、特にテーブルブロックに関するデータを以下のように取り扱うことにより、帳票の類似度を判定する。
図2(a)は、これから分類する帳票のテーブル(テーブルA)の構造を示している。図中、実線で描かれた線分が、テーブルを構成する線分(以下、実罫線という。)であり、破線で描かれた線分は、実罫線を外枠まで延長したものである。以下、実罫線及びこれを延長した破線からなる線分を仮想罫線と称す。
また、図中、XA0乃至3及びYA0乃至3は、各仮想罫線の位置を表している。これらの位置データ及び仮想罫線のデータはメモリ3に格納される。
【0027】
次に、図3は、テーブルAの実罫線データを示している。この実罫線データもメモリ3に格納される。実罫線データは、仮想罫線毎に作成される。
図中、XALS0乃至3は、図2(a)におけるXA0乃至3の各位置にある縦の仮想罫線を示し、また、YALS0乃至3は、図2(a)におけるYA0乃至3の各位置にある横の仮想罫線を示している。
【0028】
本実施形態では、実罫線データは、各仮想罫線上の各位置間に実罫線が存在するか否かを「0」と「1」とで表した3ビットのデータとして表現する。
例えば、仮想罫線XALS0の実罫線データは、仮想罫線XALS0の区間YA0−YA1、区間YA1−YA2及び区間YA2−YA3のいずれにおいても実罫線が存在するから、「111」となる。一方、仮想罫線YALS2の実罫線データは、仮想罫線YALS2の区間XA0−XA1、区間XA1−XA2及び区間XA2−XA3のうち、区間XA1−XA2においてのみ実罫線が存在するから、「010」となる。なお、このビット数は、仮想罫線の数に対応して増減することは言うまでもない。
【0029】
次に、図2(a)の帳票に対して本実施形態に係る画像分類装置が実行する類似度の判定処理について説明する。図5は、係る処理のうち、特に帳票の相似度判断の処理を主として表したフローチャートである。
【0030】
ステップS101では、テーブルAの仮想罫線の数が、予め定めた閾値以上か否かを判定する。仮想罫線の数が少ない場合は、帳票の読取時の歪みによる影響が少なく、従来の類似度の識別手法で十分であると考えられるからである。閾値は、ここでは4としている。この判定は、縦の仮想罫線の数と横の仮想罫線の数とに区別して行い、いずれかの数が閾値以上であると判定した場合は、ステップS102へ進み、そうでない場合はステップS110へ進む。
【0031】
ステップS102では、類似度を判定する対象となる一の定型帳票のテーブルのデータをディスクドライブ2から読み出す。この場合、読み出し速度を上げるためにメモリ3から読み出してもよい。
以下、類似度を判定する対象となる定型帳票のテーブルの構造が、図2(b)に示すテーブルBであることを前提として説明する。なお、図4は、テーブルBの実罫線データを示している。テーブルB及びその実罫線データは、上述したテーブルAの場合と同様の考え方に基づいて定義されている。
【0032】
ステップS103では、テーブルAとテーブルBとの間で、各仮想罫線の原点(XA0、YA0)又は(XB0、YB0)からの距離の差分を算出する。距離の差分は、縦の仮想罫線と横の仮想罫線に分けて算出し、原点に近い方から順番に対応付けて算出する。具体的には、
縦の仮想罫線の距離の差分(水平距離の差分):Xi=|XAi−XBi|
横の仮想罫線の距離の差分(垂直距離の差分):Yi=|YAi−YBi|
である。なお、iは、原点からi番目の意味である。
【0033】
ステップS104では、ステップS103で求めた距離の差分に基づいて、相関係数を算出する。
【0034】
ここで、相関係数を求めるのは、ステップS103で求めた縦又は横の仮想罫線の距離の差分の値(XiとYi)をY軸に、また、テーブルA又はテーブルBのいずれかの縦又は横の仮想罫線の原点からの距離(XAi又はXBi、と、YAi又はYBi)をX軸にとって、縦・横それぞれの場合についてグラフを描いた場合、テーブルAとテーブルBとが相似形であれば、原点とそれらの各点を通る直線を引くことができるはずであるからである。
【0035】
これは、テーブルAとテーブルBとが相似形であれば、距離の差分(Xi,Yi)は原点から離れるに従って大きくなるからである。
そして、縦の仮想罫線に関する相関係数をγv、横の仮想罫線に関する相関係数をγhとすると、それらは、以下の式より算出できる。
【0036】
【数1】

Figure 0003957923
【0037】
なお、上式及び以降の計算では、テーブルAにおける仮想罫線の原点からの距離(XAi,YAi)を用いており、XAa=(ΣXAi)/i、YAa=(ΣXBi)/i、Xa=(ΣXi)/i,Ya=(ΣYi)/i,である。仮想罫線の原点からの距離について、テーブルBの値を用いてもよいことはいうまでもない。
【0038】
ステップS105では、ステップS104で求めた相関係数γv及びγhの値に基づいて、相関があるか否かについて判定する。
相関係数は、その絶対値が1である場合には、上述したグラフにおいて原点を通る直線が引けることとなり、その絶対値が小さくなるにつれてこれが困難となる。従って、相関係数が予め設定した閾値よりも高い場合は相似形である可能性が強いと判定できる。すなわち、仮想罫線に基づいて判断した場合に、テーブルAとテーブルBとが相似するか否かを判定することができる。
【0039】
相関係数γv及びγhの値が共に閾値より高い場合は、相似形であるとみなしステップS106へ進む。相関係数γv又はγhの値のいずれか一方が閾値より高い場合は、テーブルの横方向又は縦方向のいずれかのみが均等に縮小又は拡大されたとみなしてステップS108へ進む。相関係数γv及びγhの値のいずれもが閾値を超えていない場合は、ステップS110へ進む。
【0040】
なお、仮想罫線に基づいて判断した結果、両者が相似すると判定された場合は、実罫線データに基づいて実罫線の状態が同じか否かも判定することができる。
この判定は、対応する各仮想罫線毎に実罫線データを排他的論理和により演算することにより判定することができる。
【0041】
具体的には、図3及び図4に示された3ビットの各実罫線データについて排他的論理和の演算を行う。数式で表すと、以下の通りである。
【0042】
(XALSi)(EOR)(XBLSi)
(YALSi)(EOR)(YBLSi)
なお、(XALSi)とは、仮想罫線XALSiの実罫線データを表す。他も同様である。
【0043】
これらの排他的論理和の演算結果がすべて0であれば、実罫線の引かれているグリッド位置もすべて同じである。従って、実罫線がの引かれている位置が相対的に同じであり、両者がほぼ完全に相似形であることがいえる。ステップS105では、この実罫線の共通性の判断をも加えて後の処理を分岐させてもよい。
【0044】
ステップS106では、テーブルAとテーブルBとが相似することを類似度の計算に反映させるための変形係数を求めるための前手順として、縦の仮想罫線及び横の仮想罫線とのそれぞれの場合における推定回帰直線の傾き(Av、Ah)を算出する。
仮想罫線の個数をnv,nyとすれば、
【0045】
【数2】
Figure 0003957923
これらを、角度で表現すると、
【0046】
【数3】
Figure 0003957923
と表すことができる。なお、θv、θhはそれぞれ縦の仮想罫線、横の仮想罫線の場合を表す。
【0047】
ステップS107では、ステップS106で求めた推定回帰直線の傾きの角度に基づいて、変形係数を算出する。ここでは、仮想罫線の距離の差分か小さいとき(角度が低い)には、変形係数を小さく、差分が大きくなるに従い係数を大きくするために、以下の式により変形係数δv及びδhを求める。
【0048】
δv=δh=|sin(θv−θh)|
但し、|θv−θh|≧90°ならば|θv−θh|=90°とする。
【0049】
この式より、角度θv及びθhが同じ場合は、変形係数が0となり、テーブルAとテーブルBとが相似形であり、縦、横均等に縮小又は拡大されたテーブルであることになる。逆に、角度θv及びθhの差が大きい場合は、縦または横の縮小、拡大がアンバランスであり、変形係数が大になる。
【0050】
ステップS108では、ステップS105における判断で、閾値を超えると判定された相関係数がγvであった場合は、ステップS106における処理と同様の手法により、推定回帰直線の傾きAv及びその角度θvのみを求める。
【0051】
逆に、閾値を超えると判定された相関係数がγhであった場合は、ステップS106における処理と同様の手法により、推定回帰直線の傾きAh及びその角度θhのみを求める。
【0052】
ステップS109では、以下の式より、変形係数δv及びδhを求める。
【0053】
ステップS108で求めた推定回帰直線の傾きの角度がθvであった場合は、
δv=sinθv
δh=1
とする。
逆に、ステップS108で求めた推定回帰直線の傾きの角度がθhであった場合は、
δv=1
δh=sinθh
とする。
【0054】
ステップS110では、変形係数を一律に1とする。すなわち、
δv=1
δh=1
である。
【0055】
ステップS111では、ステップS107又はステップS109で定められた変形係数δを使用してテーブルの類似度を計算する。
セルの個数の多いテーブルのセル個数をセルmaxとすれば、
類似度=1−{δv(Σ(Xi/XAmax)+δh(ΣYi/YAmax)+セル個数の差/セルmax}
で類似度を求める。
相似形の場合には、1よりも小さい変形係数を乗じているので、距離の差分によるペナルティの割合が小さくなる。
【0056】
このように、本実施形態では、テーブル全体が似ているかをあらわす変形係数を用いることで、テーブル個々の部品の距離や個数で求まる類似度を、人のイメージで捕らえる類似度に近づけることができる。
更に、変形係数は、帳票の縮みや伸びによるスキャナーで読み取るテーブル座標値の変化に対しても、テーブルが相似形であれば類似度を高くする作用があるので、帳票の認識率を落とすことなく分類することができる。
【0057】
ステップS112では、全ての定型帳票について類似度を算出したか否かを判定する。算出した場合はステップS113へ進み、そうでない場合はステップS102へ戻り、別の定型帳票について類似度を算出する。
【0058】
ステップS113では、類似度が最も高かった定型帳票をディスプレイ4に表示し、ユーザに分類の結果を示す等の処理を行う。分類した帳票に関する情報は、ディスクドライブ2の記憶媒体へ格納することもできる。また、分類した帳票と定型帳票との類似度が総じて低かった場合は、その帳票を新たな定型帳票としてもよい。この場合、先に抽出したテーブルのデータ等をディスクドライブ2の記憶媒体へ格納することとなる。
【0059】
なお、本実施形態では、仮想罫線の距離の差分を類似度計算のペナルティとしているが、1ラインごとに実罫線の距離の差分をペナルティとして計算しても良い。この場合でも、相似形の判断には、仮想罫線の距離の差分を使用するだけでよいことは言うまでもない。
【0060】
この手法を、図6(a)のテーブル罫線データ構造の模式図を用いて計算手順を説明する。図6(b)のライン情報は、テーブル原点の水平仮想罫線に左上角が接するセルを0ライン目のセルと定義する。
次に、Y軸下の方向で最も近い罫線を1ライン目、同様に2ライン目と定義していく。各ライン情報は、X座標の個数、テーブル左端X座標を先頭としてセルの右下角X座標を記録する。
【0061】
0ライン目の罫線距離の差分の合計を△X0、
0ライン目のテーブル外枠の幅をXmax
0ライン目のセルの個数の差分を△C0、
0ライン目と1ライン目の距離を△Y0、
セル個数の多いテーブルのセル個数をセルmax、
テーブルの高さをYmax、
とすれば、
類似度=1−{Σ△Xi/Xmax+Σ△Yi/Ymax)+△C0/セルmax}
この式に成就した変形係数を乗ずることで、相似形を考慮した類似度を算出することができる。
【0062】
上記の計算では、X方向はラインごとに距離の差分を求めているが、Y方向は仮想罫線のみで距離の差分を求めている。また、標準的なテーブルは、Y方向の仮想罫線間の距離は、X方向に比べて小さいので、Y方向の距離の差分の変化か、類似度に与える影響は相対的に大さくなる。
【0063】
これらを考慮して、Y方向のペナルティに与える影響度を大きくするための重み付けをしてもよい。
垂み付け係数K:(K>1)とすると、
類似度=1−{Σ△Xi/Xmax+KΣ△Yi/Ymax)+△C0/セルmax}
とすることができる。
【0064】
以上、本発明の好適な実施形態について説明したが、本発明は、複数の機器(例えばホストコンピュータ、インタフェイス機器、リーダ、プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置など)に適用してもよい。
【0065】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0066】
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0067】
本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明した図5に示すフローチャートに対応するプログラムコードが格納されることになる。
【0068】
【発明の効果】
以上説明したように、本発明によれば、比較される画像のテーブルの相似度を高く評価するため、テーブル原点から離れるに従って生じる距離の誤差の累積といった問題が軽減され、画像の読取時の歪みによる影響を最小限にしつつ、画像の類似度を識別することができるという効果を奏する。
【図面の簡単な説明】
【図1】本発明の一実施形態に係る画像分類装置を示すブロック図である。
【図2】(a)分類する帳票のテーブル(テーブルA)の構造を示した図である。
(b)定型帳票(テーブルB)の構造を示した図である。
【図3】(a)テーブルAの縦罫線のデータを示した図である。
(b)テーブルAの横罫線のデータを示した図である。
【図4】(a)テーブルBの縦罫線のデータを示した図である。
(b)テーブルBの横罫線のデータを示した図である。
【図5】本発明の一実施形態に係る画像分類装置の処理を示したフローチャートである。
【図6】(a)テーブル罫線データ構造の模式図である。
(b)ライン情報を示した図である。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image classification apparatus and an image classification method for classifying an image into a predetermined fixed image.
[0002]
[Prior art]
With the high performance of computers, a large amount of image data can be handled and used in various fields. One of such fields is to classify input images into predetermined fixed images.
[0003]
For example, in banks, shops, etc., business transactions and the like are performed through various forms, and it is forced to handle a large amount of forms. In view of such a situation, an image classification apparatus that reads a form with a scanner or the like and automatically classifies similar forms on a computer in the field of processing a large amount of forms has been proposed.
[0004]
In such an image classification device, the similarity between a form to be classified and a pre-classified fixed form is determined based on a table (ruled line frame), characters, figures, and the like represented in the form, and the highest similarity is obtained. The form is assigned to the standard form classification.
Here, among the determinations of the similarity, the table similarity is determined based on the origin of the table, such as the distance between the centers of the cells in the table, the number of cells, and the positional relationship of the table ruled lines. At present, the difference in the position and number of each part is executed as a penalty factor for similarity (an element that denies similarity).
[0005]
[Problems to be solved by the invention]
However, reading a form by a scanner or the like is not always read accurately, and a certain distortion is likely to occur in the read image. For this reason, according to the determination of the similarity of the table in the conventional image classification apparatus, the positional relationship of each cell is compared with the origin of the table as a reference. As the distance increases, the error of the distance accumulates, and there is a case where what is supposed to be highly evaluated originally is evaluated low.
[0006]
Accordingly, an object of the present invention is to provide an image classification device or an image classification method that can identify the similarity of images while minimizing the influence of distortion during image reading.
[0007]
[Means for Solving the Problems]
According to the present invention, an image classification apparatus for classifying an input image according to a similarity with a pre-classified fixed image, the similarity determination means for determining the similarity between the input image and the fixed image When, including information of a horizontal distance and a vertical distance information from the origin of the border of the table with each of the fixed form image, a storage means for storing the data of the tables, each table borders that the input image has Based on the extraction means for extracting the data of the table, including the information on the horizontal distance and the vertical distance from the origin, the data of the extracted table, and the data of each table stored in the storage means, and a similarity determining means for determining a similarity between the boilerplate image table of the table and each of the images, before Symbol similarity determining means, between said fixed form image and the input image, Each other based on the difference of the difference and the vertical distance of said horizontal distance corresponding ruled lines, to determine the similarity, the similarity determination unit, at least, between the input image and the fixed image, another The difference of the horizontal distance and the difference of the vertical distance of the corresponding ruled line is used as a penalty factor of similarity, and when the similarity is high, the difference of the horizontal distance and the difference of the vertical distance There is provided an image classification device characterized by reducing the penalty .
[0008]
In this means, when determining the similarity of images, if the similarity of the tables included in the images to be compared is high , the penalty of the difference in the horizontal distance and the difference in the vertical distance is reduced, and the similarity is highly evaluated. The That is , the problem of accumulation of distance errors occurring as the distance from the table origin is reduced.
Therefore, the present invention has an effect that it is possible to identify the similarity of images while minimizing the influence of distortion during image reading.
[0009]
Further, in the apparatus of the present invention, the similarity determining means, the correlation coefficient between the difference and the horizontal distance of the horizontal distance, and the phase relationship between the difference between the vertical distance of the vertical distance The degree of similarity can also be determined based on the number.
[0010]
Further, in the apparatus according to the present invention, the similarity determination unit configures a table between the input image and the fixed image and the difference in the horizontal distance and the difference in the vertical distance between the ruled lines corresponding to each other. The similarity is determined using the difference in the number of cells to be a penalty element of similarity, and the difference in the horizontal distance and the difference in the vertical distance among these penalty elements is high when the similarity is high, Penalties can be reduced.
[0011]
In the apparatus of the present invention, the input image and the fixed image can be images related to a form.
[0012]
According to the present invention, there is also provided an image classification method for classifying an input image according to a similarity with a pre-classified fixed image, the similarity determining the similarity between the input image and the fixed image The input image includes a determination step, a storage step for storing data of the table in a memory, including information on a horizontal distance from an origin of each ruled line of the table included in each of the fixed images and information on a vertical distance. An extraction process for extracting data of the table, including information on horizontal distance and vertical distance from the origin of each ruled line of the table, extracted table data, and data of each table stored in the memory based on, anda similarity determination step of determining similarity between said fixed image table of the table and each of the images, before Symbol similarity determination process, the standard and the input image In between the image, based on the difference of the difference and the vertical distance of the horizontal distance of the ruled lines corresponding to each other, to determine the similarity, the degree of similarity determination step, at least, between the input image and the fixed form image Between the horizontal distance difference and the vertical distance difference of the ruled lines corresponding to each other as a penalty factor of similarity, and when the similarity is high, the difference in the horizontal distance And an image classification method characterized by reducing the penalty of the difference between the vertical distances .
[0014]
Further, in the method of the present invention, in the similarity judging process, the correlation coefficient between the difference and the horizontal distance of the horizontal distance, and the phase relationship between the difference between the vertical distance of the vertical distance The degree of similarity can also be determined based on the number.
[0015]
In the method of the present invention, in the similarity determination step, the horizontal distance difference and the vertical distance difference of the ruled lines corresponding to each other are configured between the input image and the standard image. The similarity is determined using the difference in the number of cells to be a penalty element of similarity, and the difference in the horizontal distance and the difference in the vertical distance among these penalty elements is high when the similarity is high, Penalties can be reduced.
[0016]
In the method of the present invention, the input image and the fixed image can be images related to a form.
[0017]
Further, according to the present invention, in order to classify the input image according to the similarity with the pre-classified fixed image, the computer is informed of the horizontal distance from the origin of each ruled line of the table of each fixed image. And storage means storing the table data including the vertical distance information, and extracting the table data including the horizontal distance information and the vertical distance information from the origin of each ruled line of the table included in the input image Extracting means for determining the similarity between the table of the image and the table of the fixed image based on the data of the extracted table and the data of each table stored in the storage means , a storage medium storing a program to function as a similarity determination means determines the similarity between the input image and the fixed image, before Symbol similarity determination means , Between the fixed form image and the input image, based on the difference of the difference and the vertical distance of the horizontal distance of the ruled lines corresponding to each other, to determine the similarity, the similarity determination unit, at least, the When the similarity is determined using the difference in horizontal distance and the difference in vertical distance between the ruled lines corresponding to each other between the input image and the fixed image as a penalty element of similarity, and the similarity is high Provides a storage medium characterized by reducing the penalty of the difference in the horizontal distance and the difference in the vertical distance .
[0019]
In the storage medium of the present invention, the similarity determination means includes a correlation coefficient between the horizontal distance difference and the horizontal distance, and a phase difference between the vertical distance difference and the vertical distance. The degree of similarity can also be determined based on the number of relationships.
[0020]
Further, in the storage medium of the present invention, the similarity determination unit stores a table of differences between the horizontal distance and the vertical distance of the ruled lines corresponding to each other between the input image and the fixed image, and a table. The similarity is determined using the difference in the number of cells constituting the penalty factor of the similarity, and the difference in the horizontal distance and the difference in the vertical distance among these penalty elements is high when the similarity is high. Penalty can be reduced.
[0021]
In the storage medium of the present invention, the input image and the standard image can be images related to a form.
[0022]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram showing an image classification apparatus according to an embodiment of the present invention.
The image classification apparatus includes a scanner 1, a disk drive 2, a memory 3, a display 4, a keyboard 5, a processor 6, and a system bus 7 that functionally connects them. The purpose is to classify such images, but is not limited thereto. A table including a plurality of character input frames including a plurality of ruled lines is a target.
[0023]
The scanner 1 reads a form to be classified and generates image data as an input image.
The disk drive 2 reads / writes data from / to a readable / writable storage medium such as a floppy disk or an MO disk, and the storage medium stores data of a table of a fixed form as a fixed form image.
The memory 3 is for storing each piece of information of the read image data.
[0024]
The display 4 is for displaying the result of image classification and the like.
The keyboard 5 is used for inputting a command for image classification.
The processor 6 performs processing for image classification according to a program stored in a ROM (not shown) or the like, and controls the above-described components via the system bus 7.
[0025]
The image classification apparatus having such a configuration executes the following processing.
First, a form to be classified is read by the scanner 1 and its image data is generated.
The processor 6 performs binarization processing on the read image data, and divides the image data into blocks such as a table, text, and image by a technique such as a black dot histogram method. Further, detailed data of each divided block is obtained. For example, in the case of a table block, the detailed structure of the table is obtained by a ruled line tracking method or the like. If it is a text block, it is converted into a character code by a character recognition means.
[0026]
In this embodiment, the similarity of a form is determined by handling data relating to a table block as follows.
FIG. 2A shows the structure of a table (table A) of forms to be classified from now on. In the drawing, a line segment drawn with a solid line is a line segment constituting the table (hereinafter referred to as a real ruled line), and a line segment drawn with a broken line is an extension of the real ruled line to the outer frame. Hereinafter, a line segment composed of a real ruled line and a broken line extending from the real ruled line is referred to as a virtual ruled line.
In the figure, XA0 to 3 and YA0 to 3 represent the positions of the virtual ruled lines. These position data and virtual ruled line data are stored in the memory 3.
[0027]
Next, FIG. 3 shows actual ruled line data of Table A. The actual ruled line data is also stored in the memory 3. The actual ruled line data is created for each virtual ruled line.
In the figure, XALS0 to 3 indicate vertical virtual ruled lines at positions XA0 to XA3 in FIG. 2A, and YALS0 to 3 are at positions YA0 to 3 in FIG. 2A. A horizontal virtual ruled line is shown.
[0028]
In the present embodiment, the real ruled line data is expressed as 3-bit data represented by “0” and “1” as to whether or not a real ruled line exists between each position on each virtual ruled line.
For example, the actual ruled line data of the virtual ruled line XALS0 is “111” because the actual ruled line exists in any of the sections YA0-YA1, YA1-YA2, and YA2-YA3 of the virtual ruled line XALS0. On the other hand, the actual ruled line data of the virtual ruled line YALS2 is “010” because the actual ruled line exists only in the section XA1-XA2 among the sections XA0-XA1, XA1-XA2, and XA2-XA3 of the virtual ruled line YALS2. . Needless to say, the number of bits increases or decreases according to the number of virtual ruled lines.
[0029]
Next, similarity determination processing executed by the image classification apparatus according to the present embodiment on the form shown in FIG. FIG. 5 is a flowchart mainly showing the process of determining similarity of forms among such processes.
[0030]
In step S101, it is determined whether or not the number of virtual ruled lines in Table A is equal to or greater than a predetermined threshold value. This is because, when the number of virtual ruled lines is small, there is little influence due to distortion at the time of reading a form, and it is considered that a conventional similarity degree identifying method is sufficient. The threshold is 4 here. This determination is performed by distinguishing between the number of vertical virtual ruled lines and the number of horizontal virtual ruled lines. If it is determined that one of the numbers is equal to or greater than the threshold value, the process proceeds to step S102. If not, the process proceeds to step S110. move on.
[0031]
In step S <b> 102, the data of the table of one standard form for which the similarity is determined is read from the disk drive 2. In this case, reading from the memory 3 may be performed in order to increase the reading speed.
Hereinafter, description will be made on the assumption that the structure of the table of the standard form for which the similarity is determined is the table B shown in FIG. FIG. 4 shows the actual ruled line data of Table B. The table B and its actual ruled line data are defined based on the same concept as in the case of the table A described above.
[0032]
In step S103, a difference in distance from the origin (XA0, YA0) or (XB0, YB0) of each virtual ruled line is calculated between table A and table B. The difference in distance is calculated separately for the vertical virtual ruled line and the horizontal virtual ruled line, and is calculated by associating in order from the side closer to the origin. In particular,
Difference in vertical virtual ruled line distance (difference in horizontal distance): Xi = | XAi−XBi |
Difference in distance between horizontal virtual ruled lines (difference in vertical distance): Yi = | YAi−YBi |
It is. Note that i is the i-th meaning from the origin.
[0033]
In step S104, a correlation coefficient is calculated based on the difference in distance obtained in step S103.
[0034]
Here, the correlation coefficient is obtained by using the difference value (Xi and Yi) of the distance between the vertical or horizontal virtual ruled lines obtained in step S103 on the Y axis, and the vertical axis of either table A or table B. Or, if the graph is drawn in the vertical and horizontal cases with the distance from the origin of the horizontal virtual ruled line (XAi or XBi, and YAi or YBi) as the X axis, table A and table B should be similar For example, it should be possible to draw a straight line passing through the origin and each of those points.
[0035]
This is because if the table A and the table B are similar, the distance difference (Xi, Yi) increases as the distance from the origin increases.
If the correlation coefficient for the vertical virtual ruled line is γv and the correlation coefficient for the horizontal virtual ruled line is γh, they can be calculated from the following equations.
[0036]
[Expression 1]
Figure 0003957923
[0037]
In the above formula and the following calculations, the distance (XAi, YAi) from the origin of the virtual ruled line in the table A is used, and XAa = (ΣXAi) / i, YAa = (ΣXBi) / i, Xa = (ΣXi ) / I, Ya = (ΣYi) / i. Needless to say, the value of the table B may be used for the distance from the origin of the virtual ruled line.
[0038]
In step S105, it is determined whether or not there is a correlation based on the values of the correlation coefficients γv and γh obtained in step S104.
When the correlation coefficient has an absolute value of 1, a straight line passing through the origin can be drawn in the above-described graph, and this becomes difficult as the absolute value decreases. Therefore, when the correlation coefficient is higher than a preset threshold value, it can be determined that there is a strong possibility of a similar shape. That is, when it is determined based on the virtual ruled line, it can be determined whether or not the table A and the table B are similar.
[0039]
When the values of correlation coefficients γv and γh are both higher than the threshold value, they are considered to be similar and the process proceeds to step S106. If either one of the correlation coefficients γv or γh is higher than the threshold value, only one of the horizontal direction and the vertical direction of the table is regarded as being uniformly reduced or enlarged, and the process proceeds to step S108. If neither of the correlation coefficients γv and γh exceeds the threshold value, the process proceeds to step S110.
[0040]
If it is determined that the two are similar as a result of the determination based on the virtual ruled line, it can also be determined whether or not the state of the actual ruled line is the same based on the actual ruled line data.
This determination can be made by calculating actual ruled line data by exclusive OR for each corresponding virtual ruled line.
[0041]
Specifically, an exclusive OR operation is performed on each 3-bit real ruled line data shown in FIGS. This is expressed by the following mathematical formula.
[0042]
(XALSi) (EOR) (XBLSi)
(YALSi) (EOR) (YBLSi)
Note that (XALSi) represents actual ruled line data of the virtual ruled line XALSi. Others are the same.
[0043]
If these exclusive OR calculation results are all 0, the grid positions where the actual ruled lines are drawn are all the same. Therefore, it can be said that the positions where the actual ruled lines are drawn are relatively the same, and the two are almost completely similar. In step S105, the determination of the commonality of the actual ruled line may be added and the subsequent processing may be branched.
[0044]
In step S106, estimation in each case of the vertical virtual ruled line and the horizontal virtual ruled line is performed as a pre-procedure for obtaining a deformation coefficient for reflecting the similarity between the table A and the table B in the calculation of the similarity. The slope (Av, Ah) of the regression line is calculated.
If the number of virtual ruled lines is nv, ny,
[0045]
[Expression 2]
Figure 0003957923
If these are expressed in angles,
[0046]
[Equation 3]
Figure 0003957923
It can be expressed as. Note that θv and θh represent vertical virtual ruled lines and horizontal virtual ruled lines, respectively.
[0047]
In step S107, a deformation coefficient is calculated based on the angle of inclination of the estimated regression line obtained in step S106. Here, when the difference between the virtual ruled line distances is small (the angle is low), the deformation coefficients δv and δh are obtained by the following equations in order to decrease the deformation coefficient and increase the coefficient as the difference increases.
[0048]
δv = δh = | sin (θv−θh) |
However, if | θv−θh | ≧ 90 °, | θv−θh | = 90 °.
[0049]
From this equation, when the angles θv and θh are the same, the deformation coefficient is 0, and the table A and the table B are similar, and are tables that are reduced or enlarged equally vertically and horizontally. On the contrary, when the difference between the angles θv and θh is large, the vertical or horizontal reduction / enlargement is unbalanced, and the deformation coefficient becomes large.
[0050]
In step S108, when the correlation coefficient determined to exceed the threshold in the determination in step S105 is γv, only the slope Av and the angle θv of the estimated regression line are obtained by the same method as the processing in step S106. Ask.
[0051]
Conversely, if the correlation coefficient determined to exceed the threshold is γh, only the slope Ah of the estimated regression line and its angle θh are obtained by the same method as the processing in step S106.
[0052]
In step S109, deformation coefficients δv and δh are obtained from the following equations.
[0053]
When the angle of inclination of the estimated regression line obtained in step S108 is θv,
δv = sin θv
δh = 1
And
Conversely, when the inclination angle of the estimated regression line obtained in step S108 is θh,
δv = 1
δh = sin θh
And
[0054]
In step S110, the deformation coefficient is uniformly set to 1. That is,
δv = 1
δh = 1
It is.
[0055]
In step S111, the similarity of the tables is calculated using the deformation coefficient δ determined in step S107 or step S109.
If the number of cells in a table with a large number of cells is the cell max,
Similarity = 1− {δv (Σ (Xi / XAmax) + δh (ΣYi / YAmax) + difference in number of cells / cell max}
Find the similarity with.
In the case of the similar shape, since the deformation coefficient smaller than 1 is multiplied, the penalty rate due to the difference in distance is reduced.
[0056]
As described above, in the present embodiment, by using the deformation coefficient that indicates whether the entire table is similar, the similarity obtained from the distance and the number of parts of each table can be brought close to the similarity captured by a human image. .
Furthermore, the deformation coefficient has the effect of increasing the similarity if the table is similar to the change in the table coordinate value read by the scanner due to the shrinkage or expansion of the form, so without reducing the form recognition rate. Can be classified.
[0057]
In step S112, it is determined whether or not similarities have been calculated for all standard forms. If it has been calculated, the process proceeds to step S113; otherwise, the process returns to step S102, and the similarity is calculated for another standard form.
[0058]
In step S113, the standard form with the highest similarity is displayed on the display 4, and processing such as showing the classification result to the user is performed. Information regarding the classified forms can also be stored in the storage medium of the disk drive 2. If the similarity between the classified form and the standard form is generally low, the form may be used as a new standard form. In this case, the previously extracted table data and the like are stored in the storage medium of the disk drive 2.
[0059]
In the present embodiment, the difference in the distance between the virtual ruled lines is used as a penalty for similarity calculation, but the difference in the distance between the actual ruled lines may be calculated as a penalty for each line. Even in this case, it is needless to say that it is only necessary to use the difference between the distances of the virtual ruled lines to determine the similar shape.
[0060]
The calculation procedure of this method will be described with reference to the schematic diagram of the table ruled line data structure in FIG. In the line information in FIG. 6B, a cell whose upper left corner is in contact with the horizontal virtual ruled line at the table origin is defined as a cell on the 0th line.
Next, the ruled line closest in the direction below the Y axis is defined as the first line, and similarly the second line. Each line information records the number of X coordinates and the lower right corner X coordinate of the cell starting from the left end X coordinate of the table.
[0061]
The total difference of the ruled line distance of the 0th line is ΔX0,
The width of the table outer frame on the 0th line is Xmax
The difference in the number of cells in the 0th line is ΔC0,
The distance between the 0th line and the 1st line is ΔY0,
The number of cells in a table with a large number of cells is set to cell max,
Ymax the height of the table,
given that,
Similarity = 1− {ΣΔXi / Xmax + ΣΔYi / Ymax) + ΔC0 / cell max}
By multiplying this equation by the deformation coefficient fulfilled, it is possible to calculate the similarity considering the similar shape.
[0062]
In the above calculation, a distance difference is obtained for each line in the X direction, but a distance difference is obtained using only virtual ruled lines in the Y direction. In the standard table, the distance between the virtual ruled lines in the Y direction is smaller than that in the X direction. Therefore, the change in the distance in the Y direction or the effect on the similarity is relatively large.
[0063]
In consideration of these, weighting may be performed to increase the degree of influence on the penalty in the Y direction.
Sagging coefficient K: (K> 1)
Similarity = 1− {ΣΔXi / Xmax + KΣΔYi / Ymax) + ΔC0 / cell max}
It can be.
[0064]
The preferred embodiment of the present invention has been described above. However, the present invention can be applied to a system composed of a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), but from a single device. The present invention may be applied to an apparatus (for example, a copying machine, a facsimile apparatus, etc.).
[0065]
Another object of the present invention is to supply a storage medium (or recording medium) in which a program code of software that realizes the functions of the above-described embodiments is recorded to a system or apparatus, and the computer (or CPU or CPU) of the system or apparatus. Needless to say, this can also be achieved by the MPU) reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
[0066]
Furthermore, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is determined based on the instruction of the program code. It goes without saying that the CPU or the like provided in the expansion card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
[0067]
When the present invention is applied to the above-described storage medium, the program code corresponding to the flowchart shown in FIG. 5 described above is stored in the storage medium.
[0068]
【The invention's effect】
As described above, according to the present invention, since the similarity of the tables of the images to be compared is highly evaluated, problems such as accumulation of distance errors that occur as the distance from the table origin is reduced, and distortion during image reading is reduced. It is possible to identify the degree of similarity of images while minimizing the influence of.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating an image classification device according to an embodiment of the present invention.
FIG. 2A is a diagram illustrating the structure of a table (table A) of forms to be classified.
(B) It is the figure which showed the structure of the fixed form (table B).
FIG. 3A is a diagram showing data of vertical ruled lines in table A;
(B) It is the figure which showed the data of the horizontal ruled line of Table A.
4A is a diagram showing data of vertical ruled lines in Table B. FIG.
(B) It is the figure which showed the data of the horizontal ruled line of Table B.
FIG. 5 is a flowchart showing processing of an image classification device according to an embodiment of the present invention.
FIG. 6A is a schematic diagram of a table ruled line data structure;
(B) It is the figure which showed line information.

Claims (12)

入力画像を、予め分類された定型画像との類似度に従って分類するための画像分類装置であって、
前記入力画像と前記定型画像との類似度を判定する類似度判定手段と、
各々の前記定型画像が有するテーブルの各罫線の原点からの水平距離の情報と垂直距離の情報とを含む、該テーブルのデータを格納した記憶手段と、
前記入力画像が有するテーブルの各罫線の原点からの水平距離の情報と垂直距離の情報を含む、該テーブルのデータを抽出する抽出手段と、
抽出したテーブルのデータと、前記記憶手段に格納した各々のテーブルのデータとに基づいて、前記画像のテーブルと各々の前記定型画像のテーブルとの相似度を判定する相似度判定手段と、を備え、
記相似度判定手段は、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分に基づいて、相似度を判定し、
前記類似度判定手段は、少なくとも、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分を、類似度のペナルティ要素として類似度を判断し、かつ、前記相似度が高い場合は、前記水平距離の差分及び前記垂直距離の差分のペナルティを軽減することを特徴とする画像分類装置。
An image classification device for classifying an input image according to a similarity with a pre-classified fixed image,
Similarity determination means for determining the similarity between the input image and the fixed image;
Storage means for storing data of the table, including information on a horizontal distance from an origin of each ruled line of the table included in each of the fixed images and information on a vertical distance ;
Extraction means for extracting data of the table, including information on the horizontal distance from the origin of each ruled line of the table included in the input image and information on the vertical distance ;
Similarity degree determination means for determining the degree of similarity between the image table and each of the fixed image tables based on the extracted table data and the data of each table stored in the storage means; ,
Before Symbol similarity determining means, between said fixed form image and the input image, based on the difference of the difference and the vertical distance of the horizontal distance of the ruled lines corresponding to each other, to determine the similarity,
The similarity determination means determines similarity using at least the difference in horizontal distance and the difference in vertical distance between the corresponding ruled lines as a penalty factor for similarity between the input image and the fixed image. And when the said similarity degree is high, the penalty of the difference of the said horizontal distance and the difference of the said vertical distance is reduced, The image classification apparatus characterized by the above-mentioned .
前記相似度判定手段は、前記水平距離の差分と前記水平距離との間の相関係数、及び、前記垂直距離の差分と前記垂直距離との間の相関係数、に基づいて、相似度を判定することを特徴とする請求項1に記載の画像分類装置。The similarity determining means, the correlation coefficient between the difference and the horizontal distance of the horizontal distance, and the correlation coefficient between the difference between the vertical distance of the vertical distance, based on the similarity The image classification apparatus according to claim 1, wherein the determination is performed. 前記類似度判定手段は、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分と、テーブルを構成するセルの数の差と、を類似度のペナルティ要素として類似度を判断し、これらのペナルティ要素のうち、前記水平距離の差分及び前記垂直距離の差分については、前記相似度が高い場合は、ペナルティを軽減することを特徴とする請求項1又は2に記載の画像分類装置。The similarity determination means includes a difference between the horizontal distance and the vertical distance between the ruled lines corresponding to each other between the input image and the standard image, and a difference in the number of cells constituting the table. Similarity is judged as a penalty element of similarity, and among these penalty elements, the difference in the horizontal distance and the difference in the vertical distance is reduced when the similarity is high. The image classification device according to claim 1 or 2. 前記入力画像及び前記定型画像が、帳票に係る画像であることを特徴とする請求項1乃至3のいずれか1項に記載の画像分類装置。  The image classification apparatus according to claim 1, wherein the input image and the fixed image are images related to a form. 入力画像を、予め分類された定型画像との類似度に従って分類するための画像分類方法であって、
前記入力画像と前記定型画像との類似度を判定する類似度判定工程と、
各々の前記定型画像が有するテーブルの各罫線の原点からの水平距離の情報と垂直距離の情報とを含む、該テーブルのデータをメモリに格納する記憶工程と、
前記入力画像が有するテーブルの各罫線の原点からの水平距離の情報と垂直距離の情報を含む、該テーブルのデータを抽出する抽出工程と、
抽出したテーブルのデータと、前記メモリに格納した各々のテーブルのデータとに基づいて、前記画像のテーブルと各々の前記定型画像のテーブルとの相似度を判定する相似度判定工程と、を含み、
記相似度判定工程では、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分に基づいて、相似度を判定し、
前記類似度判定工程では、少なくとも、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分を、類似度のペナルティ要素として類似度を判断し、かつ、前記相似度が高い場合は、前記水平距離の差分及び前記垂直距離の差分のペナルティを軽減することを特徴とする画像分類方法。
An image classification method for classifying an input image according to a similarity with a pre-classified fixed image,
A similarity determination step of determining a similarity between the input image and the fixed image;
A storage step of storing the data of the table in a memory, including information on a horizontal distance from an origin of each ruled line of the table included in each of the fixed images and information on a vertical distance ;
An extraction step of extracting data of the table, including information on the horizontal distance from the origin of each ruled line of the table included in the input image and information on the vertical distance ;
A similarity determination step of determining a similarity between the table of the image and the table of each of the standard images based on the extracted table data and the data of each table stored in the memory;
Prior Symbol similarity determination step, between the fixed form image and the input image, based on the difference of the difference and the vertical distance of the horizontal distance of the ruled lines corresponding to each other, to determine the similarity,
In the similarity determination step, at least similarity between the input image and the fixed image is determined by using the horizontal distance difference and the vertical distance difference of the ruled lines corresponding to each other as penalty factors of similarity. And when the said similarity degree is high, the penalty of the difference of the said horizontal distance and the difference of the said perpendicular distance is reduced, The image classification method characterized by the above-mentioned .
前記相似度判定工程では、前記水平距離の差分と前記水平距離との間の相関係数、及び、前記垂直距離の差分と前記垂直距離との間の相関係数、に基づいて、相似度を判定することを特徴とする請求項5に記載の画像分類方法。In the similarity degree determination process, the correlation coefficient between the difference and the horizontal distance of the horizontal distance, and the correlation coefficient between the difference between the vertical distance of the vertical distance, based on the similarity The image classification method according to claim 5, wherein the determination is performed. 前記類似度判定工程では、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分と、テーブルを構成するセルの数の差と、を類似度のペナルティ要素として類似度を判断し、これらのペナルティ要素のうち、前記水平距離の差分及び前記垂直距離の差分については、前記相似度が高い場合は、ペナルティを軽減することを特徴とする請求項5又は6に記載の画像分類方法。In the similarity determination step, the difference between the horizontal distance and the vertical distance between the ruled lines corresponding to each other between the input image and the standard image, and the difference in the number of cells constituting the table, Similarity is judged as a penalty element of similarity, and among these penalty elements, the difference in the horizontal distance and the difference in the vertical distance is reduced when the similarity is high. The image classification method according to claim 5 or 6. 前記入力画像及び前記定型画像が、帳票に係る画像であることを特徴とする請求項5乃至7のいずれか1項に記載の画像分類方法。  The image classification method according to claim 5, wherein the input image and the standard image are images related to a form. 入力画像を、予め分類された定型画像との類似度に従って分類するために、コンピュータを、
各々の前記定型画像が有するテーブルの各罫線の原点からの水平距離の情報と垂直距離の情報とを含む、該テーブルのデータを格納した記憶手段、
前記入力画像が有するテーブルの各罫線の原点からの水平距離の情報と垂直距離の情報を含む、該テーブルのデータを抽出する抽出手段、
抽出したテーブルのデータと、前記記憶手段に格納した各々のテーブルのデータとに基づいて、前記画像のテーブルと各々の前記定型画像のテーブルとの相似度を判定する相似度判定手段、
前記入力画像と前記定型画像との類似度を判定する類似度判定手段
として機能させるプログラムを記録した記憶媒体であって、
記相似度判定手段は、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分に基づいて、相似度を判定し、
前記類似度判定手段は、少なくとも、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分を、類似度のペナルティ要素として類似度を判断し、かつ、前記相似度が高い場合は、前記水平距離の差分及び前記垂直距離の差分のペナルティを軽減することを特徴とする記憶媒体。
In order to classify the input image according to the similarity with the pre-classified fixed image, the computer is
Storage means for storing data of the table, including horizontal distance information and vertical distance information from the origin of each ruled line of the table of each of the fixed images;
Extraction means for extracting data of the table, including information on a horizontal distance and information on a vertical distance from the origin of each ruled line of the table included in the input image;
Similarity determination means for determining similarity between the table of images and the table of each fixed image based on the data of the extracted table and the data of each table stored in the storage means,
Similarity determination means for determining the similarity between the input image and the fixed image ;
A storage medium storing a program that functions as
Before Symbol similarity determining means, between said fixed form image and the input image, based on the difference of the difference and the vertical distance of the horizontal distance of the ruled lines corresponding to each other, to determine the similarity,
The similarity determination means determines similarity using at least the difference in horizontal distance and the difference in vertical distance between the corresponding ruled lines as a penalty factor for similarity between the input image and the fixed image. When the similarity is high , the storage medium is characterized by reducing a penalty of the difference in the horizontal distance and the difference in the vertical distance .
前記相似度判定手段は、前記水平距離の差分と前記水平距離との間の相関係数、及び、前記垂直距離の差分と前記垂直距離との間の相関係数、に基づいて、相似度を判定することを特徴とする請求項9に記載の記憶媒体。The similarity determining means, the correlation coefficient between the difference and the horizontal distance of the horizontal distance, and the correlation coefficient between the difference between the vertical distance of the vertical distance, based on the similarity The storage medium according to claim 9, wherein the storage medium is determined. 前記類似度判定手段は、前記入力画像と前記定型画像との間で、相互に対応する罫線の前記水平距離の差分及び前記垂直距離の差分と、テーブルを構成するセルの数の差と、を類似度のペナルティ要素として類似度を判断し、これらのペナルティ要素のうち、前記水平距離の差分及び前記垂直距離の差分については、前記相似度が高い場合は、ペナルティを軽減することを特徴とする請求項9又は10に記載の記憶媒体。The similarity determination means includes a difference between the horizontal distance and the vertical distance between the ruled lines corresponding to each other between the input image and the standard image, and a difference in the number of cells constituting the table. Similarity is judged as a penalty element of similarity, and among these penalty elements, the difference in the horizontal distance and the difference in the vertical distance is reduced when the similarity is high. The storage medium according to claim 9 or 10. 前記入力画像及び前記定型画像が、帳票に係る画像であることを特徴とする請求項9乃至11のいずれか1項に記載の記憶媒体。  The storage medium according to claim 9, wherein the input image and the standard image are images related to a form.
JP17157899A 1999-06-17 1999-06-17 Image classification apparatus and image classification method Expired - Fee Related JP3957923B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17157899A JP3957923B2 (en) 1999-06-17 1999-06-17 Image classification apparatus and image classification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17157899A JP3957923B2 (en) 1999-06-17 1999-06-17 Image classification apparatus and image classification method

Publications (2)

Publication Number Publication Date
JP2001005962A JP2001005962A (en) 2001-01-12
JP3957923B2 true JP3957923B2 (en) 2007-08-15

Family

ID=15925757

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17157899A Expired - Fee Related JP3957923B2 (en) 1999-06-17 1999-06-17 Image classification apparatus and image classification method

Country Status (1)

Country Link
JP (1) JP3957923B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006201885A (en) * 2005-01-18 2006-08-03 Sharp Corp Image decision unit, method, and program, and image forming unit and program, image decision program, and computer-readable recording medium

Also Published As

Publication number Publication date
JP2001005962A (en) 2001-01-12

Similar Documents

Publication Publication Date Title
US9792494B2 (en) Image processing apparatus, method, and program capable of recognizing hand gestures
JP3904840B2 (en) Ruled line extraction device for extracting ruled lines from multi-valued images
EP3620981A1 (en) Object detection method, device, apparatus and computer-readable storage medium
US20030161523A1 (en) MICR-based optical character recognition system and method
JP2002342756A (en) Method for detecting position of eye and mouth in digital image
US7526107B2 (en) Card issuing system, card issuing method, and machine readable medium storing thereon card issuing program
JP3864246B2 (en) Image processing method, image processing system, and program
JP2761467B2 (en) Image segmentation device and character recognition device
JP2019130275A (en) Medical image processing apparatus, medical image processing method, program, and medical image processing system
US10121088B2 (en) System and method for straightening curved page content
US20030118211A1 (en) Watermark information extraction apparatus and method of controlling thereof
CN107358718B (en) A kind of crown word number identification method, device, equipment and storage medium
EP3843038A1 (en) Image processing method and system
JP3957923B2 (en) Image classification apparatus and image classification method
JP2000235619A (en) Surface image processor and its program storage medium
JP3733310B2 (en) Document format identification device and identification method
JP2015099566A (en) Feature calculation device, method and program
EP1246122A2 (en) Palmprint region dividing device and palmprint region dividing method thereof, and palmprint region dividing program
US7929773B2 (en) Method for recognizing characters
JPH10162102A (en) Character recognition device
JP3946043B2 (en) Form identification device and identification method
US20030002062A1 (en) Image processing apparatus, method and program, and storage medium
JP2658137B2 (en) Character recognition method
JP3547897B2 (en) Image processing device
JPH11143990A (en) Method and device for recognizing character and recording medium in which method for recognizing character is recorded

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040614

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7426

Effective date: 20040614

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20040614

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061106

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061113

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070112

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070205

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070404

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: 20070427

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070509

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: 20100518

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110518

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120518

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120518

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130518

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140518

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees