JP2004094427A - Slip image processor and program for realizing the same device - Google Patents

Slip image processor and program for realizing the same device Download PDF

Info

Publication number
JP2004094427A
JP2004094427A JP2002252347A JP2002252347A JP2004094427A JP 2004094427 A JP2004094427 A JP 2004094427A JP 2002252347 A JP2002252347 A JP 2002252347A JP 2002252347 A JP2002252347 A JP 2002252347A JP 2004094427 A JP2004094427 A JP 2004094427A
Authority
JP
Japan
Prior art keywords
frame
form image
characters
image
area
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.)
Pending
Application number
JP2002252347A
Other languages
Japanese (ja)
Other versions
JP2004094427A5 (en
Inventor
Minenobu Seki
関 峰伸
Shoji Ikeda
池田 尚司
Yutaka Sako
酒匂 裕
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2002252347A priority Critical patent/JP2004094427A/en
Publication of JP2004094427A publication Critical patent/JP2004094427A/en
Publication of JP2004094427A5 publication Critical patent/JP2004094427A5/ja
Pending legal-status Critical Current

Links

Images

Landscapes

  • Character Input (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a pattern recognizing method and a device for realizing highly precise pattern recognition by fetching the surface of a document as a concentration image, and generating a binary image suitable for the recognition of characters, symbols, and marks even when the document image is constituted of various color frame lines, pre-print characters, backgrounds, entry characters, symbols and marks. <P>SOLUTION: A document such as a slip is inputted as an image, and a frame structure described in the document is extracted on the inputted document image, and the inside of the document image is divided into a plurality of areas based on the acquired frame structure, and a binary threshold suitable for recognizing characters, symbols, and marks described in the frame is calculated for each of the divided areas, and a binary image is generated for each of the divided areas by using the obtained threshold, and the recognition of the characters, symbols, and marks is executed on the basis of the generated binary image. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、文書の表面を濃淡画像として取り込み、この画像から文字、記号、マーク等のパターンを認識するパターン認識方法及びパターン認識装置に関するものである。
【0002】
【従来の技術】
文字、記号、マーク等のパターン認識の中で、文字を認識する場合を例に述べる。記号、マークのパターンを認識する場合も同様である。
一般的に文書の濃淡画像から文字認識を行う場合,文字の部分が黒,背景が白となるように2値化処理を行い,この処理で生成された2値画像から文字を切り出し、その文字の形から文字の識別を行う。この2値化方法には様々な方法が存在し、これらは2つの観点から分類できる。一つは、閾値を決定するための処理単位であり、代表的なものは▲1▼画像中の指定された全領域(全面領域)、▲2▼着目する画素を中心とする近傍の微小領域(局所領域)、▲3▼画像をメッシュ状に分割した領域(メッシュ領域)、を処理単位とする方法である。もう一つは、閾値を決定するための特徴量であり、代表的なものには(a)濃淡値の頻度分布、(b)濃淡値の平均値、中央値、最大値、最小値を用いる方法がある。▲1▼全面領域を処理単位とする場合、斎藤泰一,山田博三,“2平均中点の荷重平均を採用するしきい値選定法と2値化評価用データ”電子情報通信学会論文誌,D−2,Vol.J83−D−2,No.2,pp.575−583に記載の方法で、(a)の特徴量をもとに判別分析基準やk−means法による2値化方法を用いるのが一般的である。▲2▼局所領域を処理単位とする場合、Oivid Deu Tier,Anbil K.Jain,“Goal−Directed Evaluation of Binarization Methods”,IEEE Trans.Pattern Analysis and Machine Intelligence,vol.17,no.12,pp.1191−1201,1995.に記載のように、(b)の特徴量(平均値)を閾値として2値化するのが一般的である。図11にその例を示す。▲3▼メッシュ領域を処理単位とする場合、特開平6−4706にあるように、一度(b)の特徴量(平均値)を用いて全面を2値化し、その2値画像から文字切りだしを行い、その文字切りだし結果から、一つの文字のサイズを推定し、一つの文字毎の領域(メッシュ状)に分割し、分割した領域毎に改めて(b)の特徴量(平均値)を用いて2値化する方法がある。
帳票等の記入枠を多く含む文書画像において、文書中の枠内の文字をすべて認識する場合、図3に示すように、文書画像を入力し(301)、文書全面を上記のいずれかの方法で全面の2値画像を生成し(302)、生成した2値画像から枠構造を抽出し(303)、2値画像内を枠毎の領域に分割し(304)、枠領域毎に文字切りだし行い、文字認識を行う(305)。そして、文書画像内にある複数の枠のうち、その一部の枠内の文字だけを読取る場合は、特開2000−293629にあるように、例えば図4に示すような文書画像を入力し(401)、入力された画像内の帳票位置を検出し(402)、スキャナ取り込み時の帳票伸縮を検出し、予め用意しておいた同一フォーマットの帳票画像の枠位置情報をもとに、濃淡画像内の読取りたい枠の領域を推定し切り出す(403)。そして、切り出された領域(切り出し領域)で、上記のいずれかの方法を用いて2値化を行い(405)、得られた2値画像から枠構造を抽出し(406)、2値画像内を枠毎の領域に分割し(407)、文字認識を行う(408)。ただし、帳票用紙のサイズのばらつき、画像内の帳票位置の検出誤差、スキャナ取り込み時の帳票伸縮検出誤差があり、切り出し領から記入枠や記入枠内の文字がはみ出してしまう場合がある。このため切り出す領域は推定した枠位置よりも少し広い領域を切り出さなければならない。
【0003】
【発明が解決しようとする課題】
文字、記号、マーク等のパターン認識の中で、文字を認識する場合を例に述べる。記号、マークのパターンを認識する場合も同様である。
帳票等の文書画像には、様々な色の枠線、プレ印刷文字、背景、記入文字で構成されているものがある。このような帳票を多値画像として入力し、その多値画像内にある一部の枠内の文字を認識する場合の読取り領域は、例えば図6のように、(601)の記入文字(濃い)、(602)の記入文字(薄い)、(603)の枠線(濃い)、(604)のプレ印刷文字、(605)の枠線(薄い)、(606)の背景部(濃い)、(607)の背景部(薄い)で構成される。この読取り領域内を2値化する場合を考える。従来の技術で述べた▲1▼全面領域を処理単位として2値化を行うと、読取り領域内の濃淡分布は図7のように、図6中の(601)の濃淡分布である(701)、図6中の(602)の濃淡分布である(702)、図6中の(603)の濃淡分布である(703)、図6中の(604)の濃淡分布である(704)、図6中の(605)の濃淡分布である(705)、図6中の(606)の濃淡分布である(706)、図6中の(607)の濃淡分布である(707)となる。そして2値化閾値は図8に示す閾値A(801)、閾値B(802)となる。しかし、閾値Aによる2値化結果は図9となり、読取り対象の文字“6 30”を抽出することができず、その他の文字のみ抽出しているため、文字の認識ができない。また閾値Bによる2値化結果は図10であり、目的の文字が濃い背景部分に塗りつぶされてしまい、文字の認識ができない。このように従来の技術▲1▼の方法では、読取り領域内に様々な濃淡値の枠線、プレ印刷文字、背景、記入文字がある場合、濃淡分布が複雑に重なり合うため、読取りたい文字とそのまわりの背景を区別できるような閾値を推定することが難しくなるという問題がある。また従来の技術で述べた▲2▼局所領域を処理単位として2値化を行うと、記入文字の濃淡値(702)とプレ印刷文字の濃淡値(704)が低く(濃く)、背景色の濃淡値(706)が高い(薄い)場合、図12に示すように、記入文字とプレ印刷文字がともに抽出されるため記入文字とプレ印刷文字が重なってしまい(1201、1202)、文字を正しく認識できない。また記入文字の背景色の濃淡値(702)が低く(濃く)、プレ印刷文字の濃淡値(704)と背景色の濃淡値(706)が高い(薄い)場合(ただしプレ印刷文字の濃淡値は背景の濃淡値よりも低い)、図13に示すように、プレ印刷文字の一部が欠けてしまい、文字を正しく認識できない。また図14に示すように枠線の濃淡値(703)が低く、記入文字の濃淡値(702)が高い場合の2値化結果は図15となり、記入文字の一部が欠けてしまい文字を正しく認識できない。そして従来の技術で述べた▲3▼のメッシュ領域を処理単位として2値化を行うと、帳票内の文字のピッチ、大きさは様々であり、記入文字とプレ印刷文字は重なる場合があるため、文字毎(メッシュ状)に区切ることは困難である。ゆえに、それぞれのメッシュ領域内には様々な濃淡値の記入文字、プレ印刷文字、枠線、背景が含まれる場合が生じ、▲1▼▲2▼の2値化方法と同じ問題が発生する。そして、上記の問題は文書中の枠内の文字すべてを認識する場合にも同様に発生する。
また、文字認識結果の確認のために認識領域の2値画像をディスプレイに表示する場合、上記の問題が発生するため、認識対象の文字のかすれ、潰れや、認識対象となる枠のずれが生じるため、認識結果の確認が困難になる場合がある。
【0004】
本発明はこのような従来技術がもっていた問題を鑑みてなされたものであって、帳票をはじめとする様々な色の枠線、プレ印刷文字、背景、記入文字で構成されている文書画像であっても、それぞれの枠内に記入された文字の認識に適した2値画像を生成し、精度の高い文字認識を実現し、また目視による認識結果の確認を容易にすることができる文字認識方法及び文字認識装置を提供することを目的とする。
【0005】
【課題を解決するための手段】
前記課題を解決するために、本願の開示する代表的な発明は、様々な色の枠線、プレ印刷文字、背景、記入文字で構成されている文書画像であっても、その濃淡画像から文字認識に適した2値画像を生成する方法であって、文書全体の濃淡画像、あるいはその一部分を入力し(101)、その画像から文書に記載された枠の構造を抽出し(102)、得られた枠構造をもとに入力画像内を複数の領域に分割し(103)、分割された領域毎に文字認識に好適な2値化閾値を算出し(104)、得られた閾値を用いて分割された領域毎に2値画像を生成する(105)ことを特徴とする。
【0006】
さらに帳票等の文書画像から文字、記号、マーク等のパターンを認識する方法において、文書中の特定の枠内にある文字を認識する場合に、文書の表面を濃淡画像として入力し、画像中にある文書の位置を検出し、予め同じフォーマットの文書内の枠位置を計測することにより用意しいておいたフォーマット(枠位置)情報を用いることにより、入力画像中から認識対象となる文字が記載される枠が存在する位置を推定し、推定した枠位置を上下左右に拡大し、拡大した領域を入力画像から切り出し、切り出した部分領域画像中の枠構造を抽出し、枠毎に枠内に記入されている文字を認識するのに適した2値化閾値を算出し、得られた閾値を用いて枠毎に2値画像を生成し、枠毎に文字認識を行うことを特徴としている。
【0007】
【発明の実施の形態】
以下、図を用いて本願発明を説明する。本願の開示する発明は、図1に示すように、文書全体の濃淡画像、あるいはその一部分を入力し(101)、その画像から文書に記載された枠の構造を抽出し(102)、得られた枠構造をもとに入力画像内を複数の領域に分割し(103)、分割された領域毎に文字認識に好適な2値化閾値を算出し(104)、得られた閾値を用いて分割された領域毎に2値画像を生成する(105)ことを特徴とする。本願の構成により様々な色の枠線、プレ印刷文字、背景、記入文字で構成されている文書画像であっても、それぞれの枠内に記入された文字の認識に適した2値画像を生成し、精度の高い文字認識を実現する。
本発明の一実施例である帳票の枠内の文字を読取る方法の処理フローを示す図26を用いて本願発明の全体的フローを詳細に説明する。まず、ステップ101にて画像を入力する。入力される画像は濃淡画像であり、図6のように様々な濃淡値を持つ記入文字、プレ印刷文字、枠線、背景で構成される。
次にステップ2601において、入力画像中の帳票位置を検出する。これは、図28に示すように入力画像には、帳票部分と黒背景部分があり、入力画像中のどの位置に帳票が存在するのかを求めるものである。具体的には、入力画像の4隅のいずれかを原点とし、帳票の4隅座標を求める。
【0008】
次にステップ2602において、読取り対象の文字が記載されている枠の領域を入力画像から切りだす。予め読取り対象となる帳票と同じフォーマットの帳票を用いて帳票内に記載されている枠の位置座標を計測し、図27のフォーマット情報記憶部(209)にフォーマット情報として保持しておく。そして、このフォーマット情報の枠位置座標をもとに読取り対象の文字が記載されている枠の領域を切り出す。この際、画像取り込み時の帳票伸縮補正、傾き補正を行う。しかし、帳票位置検出、帳票伸縮補正、傾き補正の誤差や、帳票用紙のサイズのばらつきがあるため、読取り対象となる枠の4隅を正確に切り出すことはできず、保持していた枠の位置と読取る画像上の枠の位置がずれる場合がある。保持していた枠の位置情報をそのまま用いて領域を切り出し、その位置がずれた場合、読取り対象となる文字が欠けてしまい、読取ることができない場合がある。そこで枠の領域の切り出し処理では、予め保持しておいた帳票の枠の位置から推定した領域を上下左右に拡大した範囲を切り出す。この領域を切り出し領域と呼ぶ。図6に切り出し領域を例示する。この場合(602)を含み、領域の中心にある枠が読取り対象となる枠である。拡大する範囲は予め設定しておく。例えば、予め(A,B,C,D)を定数として設定しておき、予め保持しておいた帳票の枠の位置から推定した領域を上方向にAmm,下方向にBmm,左方向にCmm,右方向にDmmに拡大する。本構成により、切り出し領域内には読取り対象の文字が完全に含まれ、文字認識精度が向上する。また、認識結果の目視確認のために切り出し領域の画像を表示する際、読取り対象の文字が完全に含まれるため、確認が容易になる。
次に、ステップ102において、切り出し領域内の存在する記入枠の構造を抽出する。枠の構造を抽出するとは、枠を構成する罫線の位置を検出し(図16)、検出された罫線によって囲まれる閉領域を検出することによって個々の枠の位置を算出することである(図17)。図中の1701、1702、1703、1704、1705、1706、1707、1708は、枠構造抽出を行い、得られた個々の枠領域を示す。罫線の位置の検出は、一度全面を従来の技術で述べた▲2▼局所領域の平均値を閾値として2値化を行い、得られた2値画像から水平、垂直に連なる黒画素を検出することで行う。ただし、他の方法として森 俊二,坂倉 栂子,“画像認識の基礎2”,p3−11,オーム社,にあるように多値画像からハフ変換法を用いて検出する方法等を用いることもできる。また枠の位置の検出方法には様々な方法があるが、検出された水平方向の罫線と垂直方向の罫線の交点を検出し、検出した交点を辿り、交点を頂点とするような閉領域を検出する方法も用いることができる。
【0009】
枠構造を抽出した後、ステップ103において、図18に示すように得られた枠構造の情報を用いて切り出された濃淡画像内を枠毎の領域に分割する。この際、一つ一つの枠領域(単一枠領域)は、枠線の領域と枠線の領域に囲まれる領域(文字が記入される領域)に分割される。これにより、以降の処理において枠線の色を考慮しなくてもよい。 次に、ステップ104において単一枠領域毎に文字認識に適した2値化閾値を算出する。ステップ102にて枠構造を抽出するために生成した2値画像は用いず、改めて文字の認識に適した2値画像を生成する。ここでの2値化閾値の算出方法は、従来の技術で述べたk−means法を用いる。k−means法は代表的なクラスタリング手法の一つであり、数値あるいは数値ベクトルを持つデータを、予め指定した数のグループ(クラスタ)に分割する方法である。文字認識に適した2値化閾値を算出するために、領域内の各画素を、輝度値を用いてクラスタリングすることにより、文字、プレ印刷文字、背景の画素を区別する。2値化閾値の算出方法には、従来の技術で述べたように他に様々な方法があり、例えば判別分析を用いた方法でも2値化可能であるが、尚、k−means法は計算量が少なく処理時間が短くて済み、また精度の面でも他に劣らないという利点がある。ただし、帳票などの一般に使用されている文書画像中の単一枠領域内には、図6に記載するように1801や1807のように記入文字と背景、プレ印刷文字と背景の2色が存在する場合と、1804のように記入文字とプレ印刷文字と背景の3色が存在する場合のいずれかの場合であることが多い。そこで、枠領域内の濃淡値のヒストグラムを作成し、得られたヒストグラムに対してk−means法で2つのクラスタへのクラスタリング(以降クラスタリング(2)とする)と3つのクラスタへのクラスタリング(以降クラスタリング(3)とする)を行い、閾値を算出する。図20に1801の濃淡ヒストグラム、図21に1807の濃淡ヒストグラム、図19に1804の濃淡ヒストグラムを示す。前もって単一枠領域内が何色で構成されるかがわかる場合は、予め設定しておいた数のクラスタリングを行えば良い。一方で多種のフォーマットの文書画像を扱う場合、それぞれの枠領域内の色数を事前に調べておくことは困難であるし、同種類の文書の同一位置の枠領域でもプレ印刷文字がある場合とない場合がある等、色数が限定されていない場合があるため、単一枠領域毎に、クラスタリング(2)とクラスタリング(3)を行い、それぞれ閾値を算出する。尚、扱う帳票によりクラスタ数は2若しくは3には限られない。ここでクラスタリング(3)を行うと、図19に示すように2つの閾値が算出されるが、帳票に記入される文字、すなわち読取り対象の文字は、一般にプレ印刷文字よりも濃淡値が低い(濃い)ことから、得られた2つの閾値のうち濃淡値が低い方である閾値C(1904)を用いる。本実施例で取扱う帳票の単一枠領域内には上記のように2色、あるいは3色のみ存在したが、2値化を行う領域内にN色存在する場合には、N個のクラスタへのクラスタリングを行うことで各画素を分割することが考えられる。
【0010】
次にステップ2607において、単一枠領域毎に算出した2つの閾値を用いて、単一枠領域内を2値化し2枚の2値画像を生成する。1804を閾値C(1904)で2値化した結果が図22であり、1804を閾値D(1905)で2値化した結果が図23である。図22に示すように、閾値Cで2値化した場合には、プレ印刷文字を除き、記入文字のみを黒画素とすることができるが、図23で示すように閾値Dで2値化した場合には記入文字とプレ印刷文字が重なってしまい、文字を正しく認識することができない。
【0011】
次にステップ2609において、単一枠領域毎に文字認識を行う。このこのとき単一枠領域毎に、異なる2値化閾値(クラスタリング(2)による閾値とクラスタリング(3)による閾値)による2枚の2値画像があり、この2枚の2値画像に対して、それぞれ文字認識を行う。
【0012】
次にステップ2610において、単一枠領域毎に得られた2値化閾値の異なる2組の文字認識結果のうち、枠内に記載される文字列の知識(金額、氏名、住所等)と一致する文字認識結果を読取り結果として出力する。文字列の知識とは、各帳票に記載されるべき個々の情報の属性をいい、枠内に記載される文字列の表記パターン、或いは全パターンのデータベースである。例えば金額ならば¥マーク、数字の羅列、カンマで構成される等の情報が格納され、氏名、住所ならば、記入される全氏名、全住所の表記パターンが蓄積される。そして、これらは図2のフォーマット情報記録部209に予め保持しておく。
【0013】
図27は、上記実施例の構成図である。図中、2701は帳票を濃淡画像として読み込むスキャナ等の濃淡画像を入力する手段、2702は読み込んだ濃淡画像、処理途中の2値画像を記憶しておく手段、2704は読み込んだ濃淡画像中の帳票の位置(4隅座標)を検出する手段、2705は読取り対象の文字が記載されている部分を濃淡画像から切り出す手段、2706は帳票の枠構造を抽出する手段、2607は濃淡画像内を枠毎の領域に分割する手段、2708は画像内の部分領域毎に文字認識に適した2値画像を生成する2値化閾値を算出する手段、2709は2708で得られた閾値により画像内の部分領域の2値画像を生成する手段、2710は2709で生成した2値画像から文字を切り出し、文字認識を行う手段、2711は2710で得られた文字認識結果のうち、読取り対象の枠内に記載される文字列の知識(金額、氏名、住所等)と一致するものを出力する手段である。2706は2712の枠構造を抽出するための2値化手段と2713の罫線を抽出する手段と2714の枠の位置検出する手段で構成される。そして、2715は2705にて文字が記載されている部分を切り出す際に用いる帳票のフォーマット(枠位置)情報を保持しておく手段、2716は2711で用いる文字列の知識を保持しておく手段である。
2718は認識結果を目視により確認するための2値画像表示部である。
尚、以上開示した本願発明はプログラムで実現し、コンピュータ等の情報機器で実行することもできる。
【0014】
【発明の効果】
本発明によれば、帳票等の文書画像中の文字、記号、マーク等のパターン認識方法において、文書画像中の枠構造を抽出した後、この枠構造の情報を用いて文書画像内を一つ一つの枠領域に分割し、枠領域毎に枠内に記載されたパターンを認識するのに適した2値化閾値を算出し、この閾値を用いて2値画像(2値画像A)を生成することによって、様々な色の枠線、プレ印刷文字、背景、記入文字で構成されている文書画像であっても、認識に好適な2値画像を生成することが可能となり認識の精度を上げることができる。また認識結果を確認するためのディスプレイに表示する2値画像を2値画像Aにすることによって、様々な色の枠線、プレ印刷文字、背景、記入文字で構成されている文書画像であっても、かすれや潰れのない認識対象の文字を表示でき、また認識対象の枠を正確に表示できるため、認識結果を目視にて確認することが容易になる。
【図面の簡単な説明】
【図1】本発明を表す処理フローを示す図。
【図2】実施例の構成図。
【図3】帳票内の文字すべてを読取る場合の従来法による処理フローを示す図。
【図4】帳票内の特定の位置にある文字を読取る場合の従来法による処理フローを示す図。
【図5】枠構造抽出処理の処理フローの例を示す図。
【図6】様々な濃淡値の枠線、記入文字、プレ印刷文字、背景で構成される画像の例を示す図。
【図7】読取り領域内の濃淡ヒストグラムを示す図。
【図8】読取り領域の濃淡ヒストグラムをもとに算出した二値化閾値(A,B)を示す図。
【図9】閾値A(801)による二値画像を示す図。
【図10】閾値B(802)による二値画像を示す図。
【図11】局所領域毎の二値化法を示す図。
【図12】局所領域毎の二値化法による二値画像例(1)を示す図。
【図13】局所領域毎の二値化法による二値画像例(2)を示す図。
【図14】濃い枠線に近接して薄い文字が存在する場合の多値画像を示す図。
【図15】濃い枠線に近接して薄い文字が存在する場合の局所領域毎の二値化法による二値画像を示す図。
【図16】罫線検出結果を示す図。
【図17】枠検出結果を示す図。
【図18】枠情報による領域分割画像を示す図。
【図19】枠領域(1804)の濃淡ヒストグラムを示す図。
【図20】枠領域(1801)の濃淡ヒストグラム(2)を示す図。
【図21】枠領域(1807)の濃淡ヒストグラム(3)を示す図。
【図22】閾値C(1904)による枠領域(1804)の二値画像を示す図。
【図23】閾値D(1905)による枠領域(1804)の二値画像を示す図。
【図24】閾値E(2003)による枠領域(1801)の二値画像を示す図。
【図25】閾値F(2103)による枠領域(1807)の二値画像を示す図。
【図26】実施例の処理フローを示す図。
【図27】実施例の入力画像の構成を示す図。
【符号の説明】
601…記入文字(濃い)、602…記入文字(薄い)、603…枠線(濃い)、604…プレ印刷文字、605…枠線(薄い)、606…背景部(濃い)、607…背景部(薄い)、701…図6中の上部に存在する記入文字列“000257003”と図6中の右部に存在する記入文字“1”の濃淡分布、702…図6の中心付近に存在する記入文字“6,30”の濃淡分布、703…図6中の太い枠線の濃淡分布、704…図6中のプレ印刷文字“込期限,月,日,営業所”の濃淡分布、705…図6中の細い枠線の濃淡分布、706…図6中の中心部に存在する濃い背景部分の濃淡分布、707…図6中の薄い背景部分の濃淡分布、801、802…図6の濃淡ヒストグラムからk−means法により得られた閾値、1201、1202…局所領域毎の二値化法による二値画像例によって、記入文字とプレ印刷文字が重なる部分、1301、1302…局所領域毎の二値化法による二値画像例によって、プレ印刷文字が欠けた部分、1701、1702、1703、1704、1705、1706、1707、1708…枠構造抽出を行い、得られた個々の枠領域、1801、1802、1803、1804、1805、1806、1807、1808…枠構造の情報を用いて画像内を分割し、得られた個々の枠領域、1901…枠領域(1804)に存在する記入文字の濃淡分布、1902…枠領域(1804)に存在するプレ印刷文字の濃淡分布、1903…枠領域(1804)に存在する背景の濃淡分布、1904、1905…枠領域(1804)の濃淡ヒストグラムからk−means法を用いて算出した2値化閾値(C、D)、2001…枠領域(1801)に存在する記入文字の濃淡分布、2002…枠領域(1801)に存在する背景の濃淡分布、2003…枠領域(1801)の濃淡ヒストグラムからk−means法を用いて算出した2値化閾値(E)、2101…枠領域(1807)に存在するプレ印刷文字の濃淡分布、2102…枠領域(1807)に存在する背景の濃淡分布、2103…枠領域(1807)の濃淡ヒストグラムからk−means法を用いて算出した2値化閾値(F)。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a pattern recognition method and a pattern recognition device that captures the surface of a document as a gray-scale image and recognizes patterns such as characters, symbols, and marks from the image.
[0002]
[Prior art]
An example will be described in which characters are recognized in pattern recognition of characters, symbols, marks, and the like. The same applies when recognizing a symbol or mark pattern.
In general, when character recognition is performed from a gray image of a document, binarization processing is performed so that the character part is black and the background is white, and the character is cut out from the binary image generated by this processing, and the character is extracted. Characters are identified from the form There are various binarization methods, which can be classified from two viewpoints. One is a processing unit for determining a threshold, and typical examples are (1) the entire designated area (entire area) in the image, and (2) a minute area near the pixel of interest. (Local area), and (3) a method in which an image is divided into meshes (mesh area) as processing units. The other is a feature amount for determining a threshold value, and typical ones use (a) frequency distribution of gray values, (b) average, median, maximum, and minimum values of gray values. There is a way. {Circle around (1)} When the whole area is used as the processing unit, Taiichi Saito and Hirozo Yamada, "Threshold Selection Method Using Weighted Average of Two Mean Midpoints and Data for Binary Evaluation" Transactions of IEICE , D-2, Vol. J83-D-2, No. 2, pp. In the method described in 575-583, it is general to use a discriminant analysis criterion or a binarization method based on the k-means method based on the feature amount of (a). {Circle around (2)} When a local region is used as a processing unit, Ovid Deu Tier, Anbil K. et al. Jain, "Goal-Directed Evaluation of Binarization Methods", IEEE Trans. See Pattern Analysis and Machine Intelligence, vol. 17, no. 12, pp. 1191-1201, 1995. As described in (1), binarization is generally performed using the feature amount (average value) of (b) as a threshold value. FIG. 11 shows an example. {Circle around (3)} When the mesh area is used as a processing unit, as described in JP-A-6-4706, the entire surface is binarized once using the feature amount (average value) of (b), and characters are cut out from the binary image. Is performed, the size of one character is estimated from the character segmentation result, the character is divided into regions (mesh shape) for each character, and the characteristic amount (average value) of (b) is newly calculated for each divided region. There is a method of binarizing by using this.
In the case of recognizing all characters in a frame in a document in a document image including a lot of entry frames such as a form, the user inputs the document image as shown in FIG. Generates a binary image of the entire surface (302), extracts a frame structure from the generated binary image (303), divides the binary image into regions for each frame (304), and cuts characters for each frame region Then, character recognition is performed (305). Then, when reading only characters in a part of the plurality of frames in the document image, a document image as shown in FIG. 4 is input as disclosed in JP-A-2000-293629 ( 401), a form position in the input image is detected (402), form expansion / contraction at the time of scanning is detected, and a grayscale image is prepared based on frame position information of a form image of the same format prepared in advance. The area of the frame to be read within is estimated and cut out (403). Then, binarization is performed on the cut-out area (cut-out area) using any of the above methods (405), and a frame structure is extracted from the obtained binary image (406). Is divided into regions for each frame (407), and character recognition is performed (408). However, there are variations in the size of the form paper, errors in detecting the position of the form in the image, and errors in detecting expansion and contraction of the form when taking in the scanner, so that the entry frame and characters in the entry frame may protrude from the cutout area. For this reason, it is necessary to cut out a region that is slightly wider than the estimated frame position.
[0003]
[Problems to be solved by the invention]
An example will be described in which characters are recognized in pattern recognition of characters, symbols, marks, and the like. The same applies when recognizing a symbol or mark pattern.
Some document images such as forms are composed of various color frame lines, preprinted characters, backgrounds, and entered characters. When such a form is input as a multi-valued image and characters in some of the frames in the multi-valued image are recognized, the reading area (601) is, for example, as shown in FIG. ), (602) written characters (light), (603) frame lines (dark), (604) preprinted characters, (605) frame lines (light), (606) background portion (dark), It consists of a background part (thin) of (607). Consider a case where the reading area is binarized. When binarization is performed using the whole area as a processing unit as described in (1) of the prior art, the gray level distribution in the reading area is the gray level distribution of (601) in FIG. 6 as shown in FIG. 7 (701). 6, (703) which is the gray scale distribution of (602) in FIG. 6, (703) which is the gray scale distribution of (603) in FIG. 6, and (704) which is the gray scale distribution of (604) in FIG. 6 (705) which is the gray scale distribution of (605) in FIG. 6, (706) which is the gray scale distribution of (606) in FIG. 6, and (707) which is the gray scale distribution of (607) in FIG. Then, the binarization threshold values are the threshold value A (801) and the threshold value B (802) shown in FIG. However, the binarization result based on the threshold value A is shown in FIG. 9, and the character “630” to be read cannot be extracted. Since only the other characters are extracted, the character cannot be recognized. FIG. 10 shows a binarization result based on the threshold value B. The target character is painted over a dark background portion, and the character cannot be recognized. As described above, according to the method of the prior art (1), when there are various shades of frame lines, pre-printed characters, backgrounds, and entered characters in the reading area, the grayscale distribution is complicatedly overlapped. There is a problem that it becomes difficult to estimate a threshold value that can distinguish the surrounding background. When binarization is performed using the local region as a processing unit as described in (2) in the related art, the gray value (702) of the written character and the gray value (704) of the pre-printed character are low (dark), and the background color is low. When the gray value (706) is high (thin), as shown in FIG. 12, the input character and the pre-print character are both extracted, so that the input character and the pre-print character overlap (1201, 1202), and the character is correctly I can't recognize. Also, when the shade value (702) of the background color of the input character is low (dark), and the shade value (704) of the pre-print character and the shade value (706) of the background color are high (light) (however, the shade value of the pre-print character) Is lower than the density value of the background), as shown in FIG. 13, a part of the pre-printed character is missing, and the character cannot be correctly recognized. In addition, as shown in FIG. 14, when the gray value (703) of the frame line is low and the gray value (702) of the input character is high, the binarization result is as shown in FIG. I cannot recognize it correctly. When binarization is performed using the mesh area of (3) described in the prior art as a processing unit, the pitch and size of characters in a form are various, and written characters and preprinted characters may overlap. , It is difficult to divide each character (mesh shape). Therefore, in each mesh area, there may be cases where various shaded characters, preprinted characters, frame lines, and backgrounds are included, and the same problem as the binarization method of (1) and (2) occurs. The above problem also occurs when all the characters in the frame in the document are recognized.
Further, when a binary image of a recognition area is displayed on a display to confirm the result of character recognition, the above-described problem occurs, so that characters to be recognized are blurred or crushed, and a frame to be recognized is shifted. Therefore, it may be difficult to confirm the recognition result.
[0004]
The present invention has been made in view of such a problem of the related art, and includes a document image including various forms of frame lines, such as a form, a preprinted character, a background, and an input character. Even if there is, character recognition that generates a binary image suitable for recognizing characters entered in each frame, realizes highly accurate character recognition, and can easily confirm the recognition result visually. It is an object to provide a method and a character recognition device.
[0005]
[Means for Solving the Problems]
In order to solve the above-mentioned problem, a representative invention disclosed in the present application is to provide a character image from a grayscale image of a document image including a frame line of various colors, a preprinted character, a background, and an input character. This is a method for generating a binary image suitable for recognition. A grayscale image of the entire document or a part thereof is input (101), and a frame structure described in the document is extracted from the image (102). The input image is divided into a plurality of regions based on the obtained frame structure (103), a binarization threshold suitable for character recognition is calculated for each of the divided regions (104), and the obtained threshold is used. A binary image is generated for each divided region (105).
[0006]
Furthermore, in a method of recognizing a pattern of characters, symbols, marks, etc. from a document image such as a form, when recognizing a character in a specific frame in the document, input the surface of the document as a grayscale image, and By using the format (frame position) information prepared by detecting the position of a certain document and measuring the frame position in a document of the same format in advance, the characters to be recognized from the input image are described. Estimate the position where the frame exists, expand the estimated frame position up, down, left and right, cut out the enlarged area from the input image, extract the frame structure in the cut out partial area image, and fill in the frame for each frame It is characterized in that a binarization threshold suitable for recognizing a given character is calculated, a binary image is generated for each frame using the obtained threshold, and character recognition is performed for each frame.
[0007]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the present invention will be described with reference to the drawings. According to the invention disclosed in the present application, as shown in FIG. 1, a gray-scale image of the entire document or a part thereof is input (101), and the frame structure described in the document is extracted from the image (102). The input image is divided into a plurality of regions based on the frame structure (103), a binarization threshold suitable for character recognition is calculated for each of the divided regions (104), and the obtained threshold is used. A binary image is generated for each of the divided areas (105). According to the configuration of the present application, a binary image suitable for recognizing characters entered in each frame is generated even for a document image composed of various color frame lines, preprinted characters, backgrounds, and entered characters. And realizes highly accurate character recognition.
An overall flow of the present invention will be described in detail with reference to FIG. 26 which shows a processing flow of a method of reading characters in a form frame according to an embodiment of the present invention. First, in step 101, an image is input. The input image is a grayscale image, and is composed of input characters having various grayscale values, preprinted characters, a frame line, and a background as shown in FIG.
Next, in step 2601, a form position in the input image is detected. In this method, as shown in FIG. 28, the input image includes a form portion and a black background portion, and the position in the input image where the form exists is obtained. Specifically, one of the four corners of the input image is set as the origin, and the four corner coordinates of the form are obtained.
[0008]
Next, in step 2602, the area of the frame in which the character to be read is described is cut out from the input image. The position coordinates of the frame described in the form are measured in advance using a form in the same format as the form to be read, and stored as format information in the format information storage unit (209) in FIG. Then, based on the frame position coordinates of the format information, a frame region in which the character to be read is described is cut out. At this time, form expansion / contraction correction and inclination correction at the time of image capture are performed. However, due to errors in form position detection, form expansion / contraction correction, and inclination correction, and variations in the size of form paper, the four corners of the frame to be read cannot be accurately cut out, and the position of the held frame The position of the frame on the image to be read may be shifted. If the area is cut out using the held position information of the frame as it is, and the position is shifted, the character to be read may be missing and reading may not be possible. Therefore, in the frame area cutout processing, a range obtained by expanding the area estimated from the position of the form frame held in advance up, down, left, and right is cut out. This area is called a cutout area. FIG. 6 shows an example of the cutout area. Including the case (602), the frame at the center of the area is the frame to be read. The enlargement range is set in advance. For example, (A, B, C, D) is set in advance as a constant, and the area estimated from the position of the previously held form frame is Amm in the upward direction, Bmm in the downward direction, and Cmm in the leftward direction. , To the right to Dmm. With this configuration, the character to be read is completely included in the cutout area, and the character recognition accuracy is improved. Further, when displaying the image of the cut-out area for visual confirmation of the recognition result, the character to be read is completely included, so that the confirmation becomes easy.
Next, in step 102, the structure of the entry frame existing in the cutout area is extracted. To extract the structure of a frame means to calculate the position of each frame by detecting the position of a ruled line constituting the frame (FIG. 16) and detecting a closed area surrounded by the detected ruled line (FIG. 16). 17). Reference numerals 1701, 1702, 1703, 1704, 1705, 1706, 1707, and 1708 denote individual frame regions obtained by performing frame structure extraction. The position of the ruled line is detected by binarizing the entire surface once using the average value of the local region as a threshold as described in the prior art (2), and detecting horizontal and vertical black pixels from the obtained binary image. Do it by doing. However, as another method, a method of detecting from a multi-valued image using a Hough transform method as described in Shunji Mori and Tsugako Sakakura, “Basics of Image Recognition 2”, p3-11, Ohmsha, etc. may be used. it can. There are various methods for detecting the position of the frame, but the intersection of the detected horizontal ruled line and the vertical ruled line is detected, the detected intersection is traced, and a closed region having the intersection as a vertex is detected. A detection method can also be used.
[0009]
After the frame structure is extracted, in step 103, the inside of the shaded image cut out using the information on the frame structure obtained as shown in FIG. 18 is divided into regions for each frame. At this time, each frame area (single frame area) is divided into a frame area and an area surrounded by the frame area (an area where characters are written). This eliminates the need to consider the color of the frame line in the subsequent processing. Next, in step 104, a binarization threshold suitable for character recognition is calculated for each single frame area. A binary image suitable for character recognition is generated again without using the binary image generated for extracting the frame structure in step 102. The binarization threshold is calculated using the k-means method described in the related art. The k-means method is one of typical clustering methods, and is a method of dividing data having a numerical value or a numerical vector into a predetermined number of groups (clusters). In order to calculate a binarization threshold suitable for character recognition, each pixel in the region is clustered using a luminance value to distinguish a character, a preprinted character, and a background pixel. As described in the related art, there are various other methods for calculating the binarization threshold. For example, binarization can be performed by a method using discriminant analysis. However, the k-means method is a calculation method. There is an advantage that the amount is small and the processing time is short, and the accuracy is not inferior to the others. However, in a single frame area in a commonly used document image such as a form, there are two colors of a written character and a background and a preprinted character and a background like 1801 and 1807 as shown in FIG. In many cases, there are cases where there are three colors, that is, an input character, a preprinted character, and a background as in 1804. Therefore, a histogram of gray values in the frame area is created, and the obtained histogram is clustered into two clusters (hereinafter referred to as clustering (2)) and clustered into three clusters (hereinafter referred to as clustering (2)) by the k-means method. Clustering (3)) to calculate a threshold value. FIG. 20 shows the density histogram of 1801, FIG. 21 shows the density histogram of 1807, and FIG. 19 shows the density histogram of 1804. If it is known in advance how many colors are included in a single frame area, a predetermined number of clusterings may be performed. On the other hand, when handling document images of various formats, it is difficult to check the number of colors in each frame area in advance, and there are pre-printed characters even in the same position of a frame area of the same type of document In some cases, for example, the number of colors is not limited. For example, clustering (2) and clustering (3) are performed for each single frame region, and threshold values are calculated. The number of clusters is not limited to two or three depending on the form to be handled. Here, when the clustering (3) is performed, two thresholds are calculated as shown in FIG. 19, but the characters to be entered in the form, that is, the characters to be read, generally have lower grayscale values than the preprinted characters ( Therefore, the threshold value C (1904), which is the lower of the two gray levels, is used. Although only two colors or three colors exist in the single frame area of the form handled in this embodiment as described above, if N colors exist in the area to be binarized, the cluster is divided into N clusters. It is conceivable to divide each pixel by performing clustering.
[0010]
Next, in step 2607, the inside of the single frame area is binarized using the two threshold values calculated for each single frame area to generate two binary images. FIG. 22 shows a result of binarizing 1804 with a threshold C (1904), and FIG. 23 shows a result of binarizing 1804 with a threshold D (1905). As shown in FIG. 22, when binarized by the threshold C, only the entered characters can be black pixels except for the pre-printed characters, but binarized by the threshold D as shown in FIG. In this case, the entered characters and the pre-printed characters overlap, and the characters cannot be correctly recognized.
[0011]
Next, in step 2609, character recognition is performed for each single frame area. At this time, for each single frame area, there are two binary images with different binarization thresholds (threshold by clustering (2) and threshold by clustering (3)). Perform character recognition.
[0012]
Next, in step 2610, of the two sets of character recognition results with different binarization thresholds obtained for each single frame region, the character recognition results (e.g., amount, name, address, etc.) described in the frame match. The character recognition result to be output is output as a reading result. The knowledge of a character string refers to the attribute of each piece of information to be described in each form, and is a database of notation patterns of character strings described in the frame or all patterns. For example, if the amount is money, information such as a mark, a series of numbers, and commas is stored. If the name is an address, the notation patterns of all names and addresses to be entered are stored. These are stored in the format information recording unit 209 of FIG. 2 in advance.
[0013]
FIG. 27 is a configuration diagram of the above embodiment. In the figure, reference numeral 2701 denotes a means for inputting a gray image such as a scanner which reads a form as a gray image, 2702 denotes a read gray image, means for storing a binary image being processed, and 2704 denotes a form in the read gray image. Means for detecting the position (coordinates of the four corners), 2705 means for cutting out the portion where the characters to be read are described from the shaded image, 2706 means for extracting the frame structure of the form, and 2607 means the inside of the shaded image for each frame. Means 2708 for calculating a binarization threshold for generating a binary image suitable for character recognition for each partial area in the image, and 2709 means a partial area in the image based on the threshold obtained in 2708. Means for generating a binary image of 2710, means for cutting out characters from the binary image generated in 2709 and performing character recognition, and 2711 means for recognizing the character recognition result obtained in 2710. Chi is a means for outputting a match with the knowledge of the character string to be described in the reading target in the frame (amount, name, address, etc.). Reference numeral 2706 denotes a binarizing unit for extracting the frame structure of 2712, a unit for extracting the ruled line of 2713, and a unit for detecting the position of the frame of 2714. Reference numeral 2715 denotes a unit for holding information on a format (frame position) of a form used when cutting out a portion where characters are described in 2705, and 2716 denotes a unit for holding knowledge of a character string used in 2711. is there.
Reference numeral 2718 denotes a binary image display unit for visually confirming the recognition result.
The present invention disclosed above can be realized by a program and executed by an information device such as a computer.
[0014]
【The invention's effect】
According to the present invention, in a pattern recognition method for characters, symbols, marks, and the like in a document image such as a form, after extracting a frame structure in the document image, one information in the document image is extracted using information of the frame structure. It divides into one frame area, calculates a binarization threshold suitable for recognizing a pattern described in the frame for each frame area, and generates a binary image (binary image A) using this threshold. By doing so, it is possible to generate a binary image suitable for recognition even if the document image is composed of various color frame lines, preprinted characters, backgrounds, and entered characters, thereby improving recognition accuracy. be able to. Further, by changing the binary image displayed on the display for confirming the recognition result to the binary image A, it is possible to obtain a document image composed of various color frame lines, preprinted characters, backgrounds, and entered characters. Also, since the character to be recognized without blurring or crushing can be displayed, and the frame to be recognized can be accurately displayed, it is easy to visually confirm the recognition result.
[Brief description of the drawings]
FIG. 1 is a diagram showing a processing flow representing the present invention.
FIG. 2 is a configuration diagram of an embodiment.
FIG. 3 is a diagram showing a processing flow according to a conventional method when reading all characters in a form.
FIG. 4 is a diagram showing a processing flow according to a conventional method when reading a character at a specific position in a form.
FIG. 5 is a diagram showing an example of a processing flow of a frame structure extraction process.
FIG. 6 is a view showing an example of an image composed of various grayscale frame lines, written characters, preprinted characters, and a background.
FIG. 7 is a diagram showing a light and shade histogram in a reading area.
FIG. 8 is a diagram showing binarization thresholds (A, B) calculated based on a density histogram of a reading area.
FIG. 9 is a view showing a binary image based on a threshold value A (801).
FIG. 10 is a diagram showing a binary image based on a threshold value B (802).
FIG. 11 is a diagram showing a binarization method for each local region.
FIG. 12 is a diagram showing an example (1) of a binary image by a binarization method for each local region.
FIG. 13 is a diagram showing an example (2) of a binary image by a binarization method for each local region.
FIG. 14 is a diagram showing a multi-value image when a light character exists near a dark frame line.
FIG. 15 is a diagram showing a binary image by a binarization method for each local region when a light character exists near a dark frame line.
FIG. 16 is a diagram showing a ruled line detection result.
FIG. 17 is a view showing a frame detection result.
FIG. 18 is a diagram showing an area division image based on frame information.
FIG. 19 is a view showing a density histogram of a frame area (1804).
FIG. 20 is a view showing a density histogram (2) of a frame area (1801).
FIG. 21 is a view showing a density histogram (3) of a frame area (1807).
FIG. 22 is a view showing a binary image of a frame area (1804) based on a threshold value C (1904).
FIG. 23 is a view showing a binary image of a frame area (1804) based on a threshold value D (1905).
FIG. 24 is a view showing a binary image of a frame area (1801) based on a threshold value E (2003).
FIG. 25 is a view showing a binary image of a frame area (1807) based on a threshold value F (2103).
FIG. 26 is a diagram showing a processing flow of the embodiment.
FIG. 27 is a diagram illustrating a configuration of an input image according to the embodiment.
[Explanation of symbols]
601: Entry characters (dark), 602: Entry characters (light), 603: Border line (dark), 604: Pre-printed characters, 605: Border line (light), 606: Background part (dark), 607 ... Background part (Thin), 701: shading distribution of the entry character string “000257003” existing at the top in FIG. 6 and the entry character “1” existing at the right in FIG. 6, 702: entry existing near the center of FIG. Shade distribution of characters "6, 30", 703: shade distribution of thick frame line in FIG. 6, 704 ... shade distribution of pre-printed characters "post-date, month, day, business office" in FIG. 6, the density distribution of the thin frame line, 706... The density distribution of the dark background portion existing at the center in FIG. 6, 707 the density distribution of the thin background portion in FIG. 6, 801, 802. , Threshold values obtained by the k-means method from 02: a portion where the entered character overlaps the pre-printed character according to the binary image example by the local region-based binarization method; 1301, 1302 ... the pre-printed character is formed by the binary image example according to the local region-based binarization method. Missing portions, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708 ... frame structure extraction is performed, and the obtained individual frame regions, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808 ... The image is divided using the information on the frame structure, and the obtained individual frame areas are obtained, 1901... Distribution of the density of the characters existing in the frame area (1804), 1902... Preprinted characters existing in the frame area (1804) , Distribution of the background existing in the frame area (1804), 1904, 1905, density histogram of the frame area (1804) Binarization thresholds (C, D) calculated from the data using the k-means method, 2001: shading distribution of characters entered in the frame area (1801), 2002: shading of the background existing in the frame area (1801) Distribution, 2003: binarization threshold (E) calculated from the density histogram of the frame area (1801) using the k-means method, 2101: Density distribution of preprinted characters existing in the frame area (1807), 2102: frame The gray level distribution (F) of the background existing in the area (1807), 2103..., Calculated from the gray level histogram of the frame area (1807) using the k-means method.

Claims (9)

画像入力部と、処理部を有する帳票画像処理装置であって、
上記処理部は、
上記画像入力部を介して入力された帳票画像から記入枠を検出するステップと、上記検出された記入枠の情報を用いて上記帳票画像を分割するステップと、
上記分割された領域毎に2値化のための閾値を算出するステップと、
上記領域毎に上記閾値を用いて2値化を行うステップと、
を制御することを特徴とする帳票画像処理装置。
An image input unit, a form image processing apparatus having a processing unit,
The processing unit includes:
Detecting an entry frame from the form image input via the image input unit, and dividing the form image using information on the detected entry frame,
Calculating a threshold value for binarization for each of the divided areas;
Performing binarization using the threshold value for each of the regions;
A form image processing apparatus characterized by controlling
上記分割するステップは、上記検出された記入枠毎に行うことを特徴とする請求項1記載の帳票画像処理装置。2. The form image processing apparatus according to claim 1, wherein the dividing step is performed for each of the detected entry frames. 上記分割するステップは、さらに上記記入枠の線領域と上記記入枠の線領域に囲まれる領域とを分割することを特徴とする請求項1又は2に記載の帳票画像処理装置。3. The form image processing apparatus according to claim 1, wherein the dividing step further divides the line area of the entry frame and an area surrounded by the line area of the entry frame. 上記帳票画像処理装置はさらに帳票のフォーマット情報を記憶する記憶部を有し、上記制御部は、
上記フォーマット情報を用いて上記2値化された帳票画像中の記入文字を認識するステップをさらに制御することを特徴とする請求項1乃至3に記載の帳票画像処理装置。
The form image processing apparatus further includes a storage unit that stores format information of the form, and the control unit includes:
4. The form image processing apparatus according to claim 1, further comprising a step of recognizing a character entered in the binarized form image using the format information.
上記処理部は、上記記入枠の検出ステップに先駆けて、上記帳票画像の2値化を行うステップをさらに制御することを特徴とする請求項1乃至4のいずれかに記載の帳票画像処理装置。5. The form image processing apparatus according to claim 1, wherein the processing unit further controls a step of binarizing the form image prior to the step of detecting the entry frame. 上記2値化のための閾値を算出するステップは、
上記領域内の濃淡値のヒストグラムを作成し、該ヒストグラムの分布を用いて上記領域内の画素を複数の予め設定されたグループ数それぞれへクラスタリングを行い、設定されたグループ数毎に得られたクラスタリング結果から閾値をそれぞれ算出し、
上記2値化を行うステップは上記閾値毎に行い、
上記2値化された画像それぞれについて上記文字の認識を行い、記憶手段に記憶される文字列知識と上記各認識結果を比較し、該比較結果に基づいて何れかの上記認識結果を出力することを特徴とする請求項4又は5に記載の帳票画像処理装置。
The step of calculating the threshold value for binarization includes:
A histogram of gray values in the region is created, and pixels in the region are clustered into a plurality of preset groups using the distribution of the histogram. Calculate thresholds from the results,
The step of performing the binarization is performed for each of the thresholds,
Recognizing the characters for each of the binarized images, comparing the character string knowledge stored in the storage unit with the respective recognition results, and outputting any of the recognition results based on the comparison results. The form image processing apparatus according to claim 4 or 5, wherein:
帳票画像の入力手段と、
上記入力手段を介して入力される帳票画像のフォーマット情報記憶する記憶手段とを有する帳票画像処理装置であって、
上記フォーマット情報から入力された帳票画像中の読み取り領域の座標を検出する手段と、
上記座標で指定される領域を所定値拡大した領域を切り出す手段と、
上記切り出された切り出し領域から枠を検出して、該切り出し領域を枠毎に分割する手段と、
上記枠毎に2値化閾値を算出する手段と、
上記閾値を用いて上記枠毎に2値画像を生成する手段と、
上記2値画像中の文字認識を行う手段と、を有することを特徴とするパターン認識装置。
Input means for a form image,
Storage means for storing format information of the form image input via the input means,
Means for detecting the coordinates of the reading area in the form image input from the format information,
Means for cutting out an area obtained by enlarging the area specified by the coordinates by a predetermined value;
Means for detecting a frame from the cut-out region, and dividing the cut-out region for each frame;
Means for calculating a binarization threshold for each frame,
Means for generating a binary image for each frame using the threshold value;
Means for recognizing characters in the binary image.
上記切り出し領域を表示する表示手段をさらに有することを特徴とする請求項7記載のパターン認識装置。8. The pattern recognition apparatus according to claim 7, further comprising a display unit for displaying the cutout area. 画像入力部を介して帳票画像を取得するステップと、
該帳票画像から記入枠を検出するステップと、
上記検出された記入枠の情報を用いて上記帳票画像を分割するステップと、
上記分割された領域毎に2値化のための閾値を算出するステップと、
上記領域毎に上記閾値を用いて2値化を行うステップと、
上記2値化された領域毎に文字認識を行うステップと、
を有する特徴とするパターン認識方法をコンピュータに実行させるためのプログラム。
Obtaining a form image via the image input unit;
Detecting an entry frame from the form image;
Dividing the form image using the information of the detected entry frame,
Calculating a threshold value for binarization for each of the divided areas;
Performing binarization using the threshold value for each of the regions;
Performing character recognition for each of the binarized areas;
A program for causing a computer to execute a pattern recognition method characterized by having:
JP2002252347A 2002-08-30 2002-08-30 Slip image processor and program for realizing the same device Pending JP2004094427A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002252347A JP2004094427A (en) 2002-08-30 2002-08-30 Slip image processor and program for realizing the same device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002252347A JP2004094427A (en) 2002-08-30 2002-08-30 Slip image processor and program for realizing the same device

Publications (2)

Publication Number Publication Date
JP2004094427A true JP2004094427A (en) 2004-03-25
JP2004094427A5 JP2004094427A5 (en) 2005-10-27

Family

ID=32058640

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002252347A Pending JP2004094427A (en) 2002-08-30 2002-08-30 Slip image processor and program for realizing the same device

Country Status (1)

Country Link
JP (1) JP2004094427A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006277092A (en) * 2005-03-28 2006-10-12 Fuji Xerox Co Ltd Character and image segmentation device, character and image segmentation method, and program
JP2008191467A (en) * 2007-02-06 2008-08-21 Nippon Hoso Kyokai <Nhk> Mixed-model initial value calculation device and mixed-model initial value calculation program
JP2009237925A (en) * 2008-03-27 2009-10-15 Glory Ltd Method for sorting ballots, its program, recording medium recording the program, and ballot sorter
JP2014071556A (en) * 2012-09-28 2014-04-21 Hitachi Omron Terminal Solutions Corp Image processor, image processing method, and program
JP2018180872A (en) * 2017-04-12 2018-11-15 富士ゼロックス株式会社 Document processing device and program
JP2019016066A (en) * 2017-07-04 2019-01-31 Necソリューションイノベータ株式会社 Feature shape extraction device, feature shape extraction method and program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006277092A (en) * 2005-03-28 2006-10-12 Fuji Xerox Co Ltd Character and image segmentation device, character and image segmentation method, and program
JP2008191467A (en) * 2007-02-06 2008-08-21 Nippon Hoso Kyokai <Nhk> Mixed-model initial value calculation device and mixed-model initial value calculation program
JP2009237925A (en) * 2008-03-27 2009-10-15 Glory Ltd Method for sorting ballots, its program, recording medium recording the program, and ballot sorter
JP2014071556A (en) * 2012-09-28 2014-04-21 Hitachi Omron Terminal Solutions Corp Image processor, image processing method, and program
JP2018180872A (en) * 2017-04-12 2018-11-15 富士ゼロックス株式会社 Document processing device and program
JP2019016066A (en) * 2017-07-04 2019-01-31 Necソリューションイノベータ株式会社 Feature shape extraction device, feature shape extraction method and program

Similar Documents

Publication Publication Date Title
CN111814722B (en) Method and device for identifying table in image, electronic equipment and storage medium
CN110766014B (en) Bill information positioning method, system and computer readable storage medium
CN106960208B (en) Method and system for automatically segmenting and identifying instrument liquid crystal number
CN102567300B (en) Picture document processing method and device
US5410611A (en) Method for identifying word bounding boxes in text
US6778703B1 (en) Form recognition using reference areas
US6839466B2 (en) Detecting overlapping images in an automatic image segmentation device with the presence of severe bleeding
CN108596166A (en) A kind of container number identification method based on convolutional neural networks classification
US6704456B1 (en) Automatic image segmentation in the presence of severe background bleeding
JP4694613B2 (en) Document orientation determination apparatus, document orientation determination method, program, and recording medium therefor
JP2008171417A (en) Method of detecting substantially rectangular object in image, method of estimating background color in image, computer- readable medium, device for detecting substantially rectangular objects in image, and device for estimating background color in image
JP2002133426A (en) Ruled line extracting device for extracting ruled line from multiple image
CN111259878A (en) Method and equipment for detecting text
CN110598566A (en) Image processing method, device, terminal and computer readable storage medium
CN115457565A (en) OCR character recognition method, electronic equipment and storage medium
CN111626292B (en) Text recognition method of building indication mark based on deep learning technology
CN112446262A (en) Text analysis method, text analysis device, text analysis terminal and computer-readable storage medium
CN113158895A (en) Bill identification method and device, electronic equipment and storage medium
CN111126266B (en) Text processing method, text processing system, equipment and medium
CN111626145A (en) Simple and effective incomplete form identification and page-crossing splicing method
CN112883926B (en) Identification method and device for form medical images
CN113392819A (en) Batch academic image automatic segmentation and labeling device and method
JP2004094427A (en) Slip image processor and program for realizing the same device
JPH11306325A (en) Method and device for object detection
CN115797939A (en) Two-stage italic character recognition method and device based on deep learning

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20050223

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050617

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050617

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050617

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20060511

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060511

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080502

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080624

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20081021