JP3785306B2 - Image processing method and apparatus - Google Patents
Image processing method and apparatus Download PDFInfo
- Publication number
- JP3785306B2 JP3785306B2 JP2000174170A JP2000174170A JP3785306B2 JP 3785306 B2 JP3785306 B2 JP 3785306B2 JP 2000174170 A JP2000174170 A JP 2000174170A JP 2000174170 A JP2000174170 A JP 2000174170A JP 3785306 B2 JP3785306 B2 JP 3785306B2
- Authority
- JP
- Japan
- Prior art keywords
- color
- data
- image
- image data
- plane
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Character Input (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、帳票のイメージからOCR用画像データを生成する画像処理方法及びその装置に関し、特に、カラー画像データからOCR用画像データを生成する画像処理方法及びその装置に関する。
【0002】
金融機関、郵便局等において、新規預金、預金引出し、振込み等の帳票の自動処理が文字認識(OCR)技術により可能となってきた。このような帳票の自動処理のため、帳票のイメージからOCR用画像データを作成する必要がある。
【0003】
【従来の技術】
図20は、OCR帳票の説明図であり、OCR帳票の一例としての振込み依頼書4を示す。記入文字の周囲は、赤色枠40で囲われている。又、押印41は、ご依頼人の右側個所の「検印欄」になされている。ここでの印影は、システム処理する上で、銀行支店の担当者の検印である。押印41も赤色である。
【0004】
上位アプリケーションの文字認識エンジンは、この記入枠40内の手書き又は活字文字を認識する。このため、赤色系をドロップアウトし、OCR帳票の記入枠等の赤色系を落した、黒文字のみが残る文字認識用画像が必要である。
【0005】
この文字認識用画像を得る方法として、次の方法が知られている。
(1)ドロップアウトカラー特性バンドの光源で帳票を読み取るOCR用イメージリーダを使用する。例えば、文字認識用の帳票イメージデータを取得するため、赤色光源(又は赤色フィルタ)を照射して、赤系の記入枠をドロップアウトして、帳票を読み取る。
(2)OCR文字認識向けイメージリーダに、フルカラーCCDセンサを搭載したカラーイメージリーダを使用する。このイメージリーダでは、一般のフルカラー読み取りやプレーン画像を読み取ることなどの多目的に利用できるメリットがある。この場合、OCRにて従来使用されている赤ドロップアウトカラーを読み取る場合には、低解像度であるRプレーンを使用する。
【0006】
【発明が解決しようとする課題】
しかしながら、従来技術では、次の問題がある。
(1)OCR用イメージリーダを使用する方法では、OCRに用途が限られ、例えば、印影の抽出等他の用途に利用できない。
(2)カラーイメージリーダを使用する方法は、1画素をRGBで構成しているため、ドロップアウトカラー色を利用すると、解像度が低下し、文字認識のエラーレートが高くなる。特に、手書きの漢字を認識することが困難である。
【0007】
従って、本発明の目的は、多用途のカラーイメージリーダを利用しても、高精度の文字認識を可能とするOCR用画像データを生成するための画像処理方法及びその装置を提供するにある。
【0008】
本発明の他の目的は、カラー画像データから高解像度のOCR用画像データを生成するための画像処理方法及びその装置を提供するにある。
【0009】
本発明の更に他の目的は、カラー画像データから簡易に文字認識できるOCR用画像データを生成するための画像処理方法及びその装置を提供するにある。
【0010】
【課題を解決するための手段】
この目的の達成のため、本発明の帳票イメージをカラーセンサで読み取ったカラー画像データからOCR用画像データを生成する画像処理方法において、 前記カラー画像データから輝度データを生成するステップと、前記カラー画像データから認識すべき文字以外の色をドロップアウトした色の画像データを抽出するステップと、前記ドロップアウトした色の画像データで前記輝度データをフィルタリングして、前記OCR用画像データを作成するステップとを有する。そして、前記生成ステップは、1つの2次元センサに複数の色のカラーフィルタ配列のフィルターで覆った前記カラーセンサの多値の前記カラー画像データを各々補完処理して、前記2次元センサの解像度の前記複数の色の各々の多値のプレーンデータを作成するステップと、前記生成した各色の多値のプレーンデータから多値の前記輝度データを生成するステップと、前記生成された多値の輝度データから2値化された輝度データを生成するステップからなり、前記抽出ステップは、前記2次元センサの解像度の前記ドロップアウトした色の多値のプレーンデータを抽出するステップと、前記抽出した多値のプレーンデータを2値化処理して、前記色の2値化された画像データを作成するステップからなり、前記作成ステップは、前記ドロップアウトした色の2値化された画像データで前記2値化された輝度データをフィルタリングして、前記OCR用画像データを作成するステップからなる。
【0011】
本発明の画像処理装置は、帳票イメージを読み取り、カラー画像データを生成するイメージリーダと、前記カラー画像データから輝度データを生成し、且つ前記カラー画像データから認識すべき文字以外の色をドロップアウトした色の画像データを抽出し、前記ドロップアウトした色の画像データで前記輝度データをフィルタリングして、前記OCR用画像データを作成する画像処理ユニットとを有する。そして、前記イメージリーダは、1つの2次元センサに複数の色のカラーフィルタ配列のフィルターで覆ったカラーセンサを有し、前記画像処理ユニットは、前記カラーセンサの多値の前記カラー画像データを各々補完処理して、前記2次元センサの解像度の前記複数の色の各々の多値のプレーンデータを作成し、前記生成した各色の多値のプレーンデータから多値の前記輝度データを生成し、前記生成された多値の輝度データから2値化された輝度データを生成し、且つ前記2次元センサの解像度の前記ドロップアウトした色の多値のプレーンデータを2値化処理して、前記色の2値化された画像データを作成し、前記ドロップアウトした色の2値化された画像データで前記2値化された輝度データをフィルタリングして、前記OCR用画像データを作成する。
【0012】
本発明は、カラー画像データの輝度データを使用する。輝度データは、各RGBの輝度であり、解像度は高い。しかし、輝度データは、特定色をドロップアウトできない。そこで、カラー画像データからドロップアウトカラー色の画像データを抽出し、この画像データで、高解像度の輝度データをフィルタリングすることにより、輝度データからドロップアウトカラーの部分を除去する。これにより、ドロップアウトカラーを除去した高解像度の輝度データをOCR用画像データとして、生成できる。これにより、高精度の文字認識が可能となる。
【0013】
又、本発明の画像処理方法では、前記生成ステップは、前記カラー画像データから2値化された輝度データを生成するステップであり、前記抽出ステップは、前記カラー画像データから前記ドロップアウトした色の画像データを抽出し、補完処理して、前記色のプレーンデータを作成するステップと、前記プレーンデータを2値化処理して、前記色の画像データを作成するステップとからなることにより、2値データのフィルタリング処理が可能となり、フィルタリング処理が容易且つ高速となる。
【0014】
更に、本発明の画像処理方法では、前記生成ステップは、多値の前記カラー画像データから多値の輝度データを生成するステップと、前記多値の輝度データに対し、設定された矩形フィルタ内の濃度分散値から2値化処理するステップとを有することにより、局所的に最適な2値化ができ、情報部分である文字の欠落を防止できる。
【0015】
更に、本発明の画像処理方法では、前記色の画像データを作成するステップは、前記プレーンデータの濃度平均に基ずいて、2値化閾値を算出するステップと、前記プレーンデータを2値化閾値で2値化するステップとを有することにより、輝度データの文字部分の欠落のないマスクデータを生成できる。
【0016】
更に、本発明の画像処理方法では、前記2値化閾値を算出するステップは、前記プレーンデータのプレーンを縮小するステップと、前記縮小されたプレーンデータの濃度平均に基ずいて、2値化閾値を算出するステップとを有し、前記2値化するステップは、前記縮小されたプレーンデータを2値化閾値で2値化するステップと、前記2値化されたプレーンデータのプレーンを拡大するステップとを有することにより、高速にマスクデータを生成できる。
【0017】
【発明の実施の形態】
以下、本発明を、帳票認識装置、OCR画像生成処理、他の実施の形態に分けて、説明する。
【0018】
[帳票認識装置]
図1は、本発明の一実施の形態の帳票認識装置のブロック図、図2は、図1のカラーイメージリーダの外観図、図3は、図1の画像処理機構のブロック図、図4乃至図7は、図3の各プレーンの生成処理の説明図、図8は、図1の画像処理フロー図である。
【0019】
図1に示すように、帳票処理装置は、カラーイメージリーダ1と処理装置2とからなる。カラーイメージリーダ1は、図2に示すように、読み取るべき帳票4をセットするベット(帳票台座)10と、ベット10の帳票のイメージを読み取るオーバーヘッド15とを有する。図1に示すように、オーバーヘッド15には、2次元カラーCCD(Charge Coupled Device)11が設けられている。読み取り回路12は、カラーCCD11の読み取り動作を制御する。増幅回路13は、カラーCCD11の読み取り出力を増幅する。A/D(アナログ/デジタル)変換器14は、増幅されたアナログ読み取り信号をデジタル信号に変換する。このイメージリーダ1は、カラー読み取りが出来、且つ非接触である。又、2次元センサを用いているため、読み取り速度も速い。尚、図2では、通番印字器16が、オプションとして設けられている。
【0020】
処理装置2は、デスクトップ型パーソナルコンピュータで構成され、ホストコンピュータに接続されている。処理装置2は、データ処理ユニット(CPU)20と、画像メモリ22と、画像処理機構21と、表示装置と、ファイルとを有する。データ処理ユニット20は、CPU,メモリ等で構成され、帳票イメージ処理を実行する。CPU20内に、CPU20が実行するソフトウェアを、ブロック30〜32で示す。上位アプリケーション31は、帳票処理プログラムである。制御部30は、上位アプリケーション31の要求した画像処理を行うため、イメージリーダ1、画像処理機構21を制御する。OCRエンジン32は、上位アプリケーション31により起動され、文字認識処理を行う。
【0021】
図3乃至図7を用いて、画像処理機構21を説明する。図3に示すように、カラーCCD11からRGBデータが出力され、画像メモリ22で、1画面(帳票)のRGBデータが保持される。画像生成部50は、画像メモリ22のRGBデータから各々Yプレーン画像、Rプレーン画像、Gプレーン画像、Bプレーン画像を生成する。
【0022】
図4に示すように、カラーCCD11は、通常CCD上に、各々RGBのフィルタ(オンチップフィルタ)を被せたものであり、市松構造をなしている。1画素は、R,G(Gr,Gb),Bの4つの素子で構成されている。そのRGBフィルタを経由して取得した画像が、RGB画像として、CCD11から出力される。解像度は、240dpiである。
【0023】
レッドフィルタRは、ピーク波長が650nm,グリーンフィルタGは、ピーク波長が540nm、ブルーフィルタBは、ピーク波長が470nmの帯域でフィルタリングを行い、カラー画像として、RGBで構成される。
【0024】
画像生成部50は、市松模様のCCDの配列構造から、カラーCCD11の出力RGBからR,G,Bの各プレーンの画像(多値)を生成して、Yプレーンの画像Yを生成する。
【0025】
R画像は、レッドフィルタRを経由しており、赤色系をドロップアウトする特徴がある。例えば、赤系の色で記入枠がプレプリントされているOCR帳票では、赤記入枠が除去され、黒記入文字等の赤以外の色のみがR画像として生成される。
【0026】
G画像は、グリーンフィルタGを経由しており、グリーン系色をドロップアウトする特徴がある。ドロップアウトする能力は低い。例えば、印影の朱肉は、赤色で押印されているため、印影を読み取る確実な方法として、G画像を使用する場合が多い。
【0027】
B画像は、ブルーフィルタBを経由しており、ブルー系色をドロップアウトする特徴がある。単独で利用するよりは、カラー画像RGBのBプレーンとして利用される。
【0028】
前述のように、1画素は、4つの素子で構成されるため、入力原画240dpiと同一の解像度240dpiのプレーン画像を得るには、プレーン分割し、画素補完処理を行う。図4は、Rプレーンの補完処理を示し、画素Rの周囲の8画素R1〜R8は、以下の式により作成する。
【0029】
次に、図5は、Gプレーンの補完処理を示し、画素Gの周囲の4画素G1〜G4は、以下の式により作成する。
【0030】
更に、図6は、Bプレーンの補完処理を示し、画素Bの周囲の8画素B1〜B8は、以下の式により作成する。
【0031】
次に、Yプレーン画像(240dpi)の生成を図7により、説明する。Y画像は、モノクロ画像と称されている。各RGB画像がそれぞれ固有のフィルタを経由して読まれた画像であるため、特定の色成分をドロップアウトしているのに対し、Y画像は、各色の成分をそのまま出力する輝度データである。このYプレーン画像は、RGBプレーン画像から生成できる。即ち、以下の比率計算式により、RGBからYを生成する。
【0032】
Y=0.299×R+0.587×G+0.114×B
上記式から、明らかなように、Gプレーン画像の比率が高いのは、Gプレーン内に色成分が多く含まれるためである。このように、各RGBを個々に分離し、結合することにより、モノクロ画像を生成できる。
【0033】
図3に戻り、2値化処理部51は、多値のY,R,G画像を2値化し、Y,R,G画像(2値化)を生成する。前述のY,R,Gプレーン画像は、256階調を保有した多値イメージデータで構成されている。文字認識や印鑑照合等のコンピュータで認識、照合処理する場合は、性能等を考慮する必要があり、2値化処理部51は、256階調の多値イメージデータを「0又は1」の2値化イメージデータに変換する。
【0034】
OCR画像生成部52は、後述するように、以下の手順で、OCR画像データを生成する。先ず、それぞれのプレーン画像はそれぞれの受光センサでフィルタされているので、赤ドロップアウトカラーであればRプレーンを使用する。Rプレーン上では、ドロップアウトカラー部分はドロップアウトしており文字部分は低解像度(120dpi相当)となっている。このRプレーン画像を文字部分の情報欠落がないようにOR間引き演算にて、1/4の大きさに縮小を行う。縮小されたプレーン画像中の背景部と文字部分でダイナミックな2階調分離(大津法2値化処理)を行う。大津法2値化されたプレーン画像を縮小前の大きさに画像を戻す。文字部分を潰れぎみにすることで後のY信号(輝度信号)とのフィルタで高精細な画像が取得できる。
【0035】
文字部分を高精細にするためにY信号(輝度信号)を使用する。Y信号は、全てのプレーン画像の演算合成であるので、もともと高精細(240dpi相当)である。このY信号に対しては浮動的2値化処理(Niblack法2値化)を行い、なるべく情報(文字カスレ)を出すように2値化を行う。この場合、ドロップアウトカラー部分は浮動的2値化処理で黒画素(ドロップアウトしない)となるが、後でプレーン画像とフィルタ合成することで不必要な情報は消すことができる。Rプレーン2値とY信号(輝度信号)2値をフィルタすることで高精細なドロップアウトカラー画像を生成する。この場合、単純なANDマスク演算で画像生成が可能である。
【0036】
尚、大津法2値化処理については、文献、大津展之:"判別および最小2乗基準に基づく自動しきい値選定法", 電子情報通信学会論文誌, J63-D, vol.4, pp.349-356(1980)により詳細に開示されている。又、Niblack法2値化処理については、文献、W.Niblack:"An Introduction to Digital Image Processing",pp.115-116,Englewood Cliffs, N.J.:Prentice Hall(1986)により、詳細に示されている。
【0037】
図8に沿い、帳票イメージ処理を説明する。
(S100)上位アプリケーション31は、制御部30に読み取りを指示する。読み取り指示は、読み取り指示と、要求画像で構成されている。要求画像は、文字認識画像2値、印影画像2値のように指定される。勿論、この読み取り指示は、イメージリーダ1のベッド10に帳票を搭載した後である。
(S110)制御部30は、イメージリーダ1の読み取り回路12にカラーCCD11の読み取りを指示する。これにより、カラーCCD11は、読み取りを開始し、アンプ13、A/D変換器14を介しRGBデータを出力する。
(S120)このRGBデータは、画像メモリ22に格納される。これにより、読み取りは終了し、オペレータは、帳票を取り外すことができる。
(S130)この格納後、制御部30の指示により、画像処理部21は、上位の要求した画像を生成する前述の画像処理を行う。これにより、画像処理部21の図示しないメモリに各プレーン画像が格納される。
(S140)制御部30は、上位の要求画像をプレーンメモリから上位アプリケーション31に通知する。OCR画像は、OCRエンジン32で文字認識処理される。
【0038】
このように、高解像度の輝度データを用いて、ドロップアウトカラーのOCR用画像データを生成できる。ドロップアウトカラーのため、文字枠等が除去され、高解像度の文字画像が得られる。従って、文字認識が正確となり、特に手書き漢字のような複雑な文字認識を正確にできる。
[OCR画像生成]
以下、実施例として240dpi赤ドロップアウトカラー画像作成の例で説明する。
【0039】
図9は、OCR画像処理のフロー図、図10は、R(2値)データ生成動作の説明図、図11は、大津法2値化処理の説明図、図12は、輝度信号の2値化処理のフロー図、図13は、そのNiblack2値化処理の説明図、図14は、その文字のカスレ部分の推定処理の説明図、図15は、そのフィルタ処理の説明図、図16は、フィルタ処理の動作説明図である。
【0040】
図9に示すように、原画像を入力して画素補完処理(プレーン毎に分割,輝度信号の作成)を行っても、Rプレーン59は情報量が少ないため画素数では240dpiであるが解像度的には低解像度(120dpi相当)である。
【0041】
Rプレーン画像59に対して1/4相当にOR演算間引き60を行う。OR演算間引きをする目的は、後の輝度信号画像とフィルタマスクする際に、輝度信号の情報(文字)を欠落させないためと、高速にRプレーン59を2値化するためである。図10に示すように、1/4プレーンの画素Raは、Rプレーンの画素R1〜R4の矩形マトリクス中で2番目に濃度が濃いものをセレクトする。
【0042】
次に、1/4縮尺されたRプレーン画像に対して大津法2値化処理61を行う。Rプレーン画像は、ドロップアウトしているので、背景部と文字部とのダイナミックスライス(閾値)で2値化を行う。大津法2値化は、図11に示すように、イメージ中のヒストグラム(各濃度値の画素数)を計算し、ヒストグラム(濃度分布)から、以下の式で、生起確率分布と全体濃度平均を求める。生起確率分布からクラス間分散を求めて2値化閾値を算出する。
【0043】
このクラス間分散値が最大である濃度値を2値化スライスレベルとして決定し、各画素の濃度値をこのスライスレベルでスライスして、2値化する。
更に、2値化されたRプレーン画像を元の大きさに戻す。即ち、4倍拡大処理62して、240dpi輝度信号とフィルタマスクするために元の大きさ240dpiの画像データ63に戻す。
【0044】
一方、図9及び図12に示すように、輝度信号Y多値64に対してNiblack法2値化65を行う。輝度信号は、240dpiの高精細画像であるため、浮動的に2値化をおこない情報をすべて出力する。但し、Niblack法2値化は、ソフトウェア上で処理するには時間がかかる処理であるので、文字のカスレ部分のみを推定(図14)して、その部分のみNiblack法2値化を行う。
【0045】
図13に示すように、Niblack法2値化は、矩形フィルタ(フィルタの大きさは任意)を設定し、フィルタ内の濃度分散値g2から背景部か情報部を判別する。濃度分散値g2が分散閾値(σmin)以上であれば,注目画素[k]の濃度の閾値Sを求め、注目画素の濃度値と閾値Sとを比較して、その白画素か黒画素かを判定する。局所領域に対して閾値を設定していくので、情報の欠落が少ない。
【0046】
今回の実施例では、OCR向け手書き文字認識画像の生成しているので7×7のフィルタを設定している(手書き文字のストローク幅は3ドット程度であるので7×7のフィルタが望ましい)。
【0047】
又、 閾値を求めたい注目画素(k)に対して、上下左右3画素ずつ矩形領域を設定するため、注目画素が背景(フィルタ内も背景のみ)であれば、図13の背景閾値σminで、判定式(1)により、背景と判断される。また、濃度絶対値を見ていないので、7×7フィルタ内に文字ストロークがすべて被ってしまった場合にも、背景と見なされてしまうが、後で述べる「文字カスレの推定」で文字ストローク部分内は黒に補完できる。フィルタ内に文字ストロークと背景が入っている場合には、濃度分散値g2が、背景閾値σmin以上となり、図13の注目画素kの閾値Sを図13の式(2)から求める。注目画素が求まった閾値S以下の濃度であれば黒画素となり、以上であれば白画素と判断する。
【0048】
更に、求まった図13の(2)式のroot(g2)に対して係数(-0.1)を乗算する。閾値Sをアンダーぎみにして,文字周辺のノイズを抑えるようにすることもできる。
【0049】
次に、輝度信号の文字のカスレ部分を推定するために、Rプレーン2値化で使用した大津法2値化閾値算出方法を摘要する。図14に示すように、輝度信号全体画像を大津法でダイナミックな2階調分離閾値Otを求め、その閾値Otを中心として低い濃度方向(黒となる濃度)と高い濃度方向(白となる濃度)に対して比率a,bを設定する。 即ち、文字カスレ部分推定エリアの算出は、下記の式による。
【0050】
カスレ範囲の係数:a= 0.10 〜 0.90 b= 0.10 〜 0.90
黒領域の濃度平均:b#ave= 濃度分布0 〜 Otの濃度平均
白領域の濃度平均:w#ave= 濃度分布Ot 〜 255の濃度平均
かすれ範囲の下限bt= ((1.0-a)× ot)+(a×b#ave)
かすれ範囲の上限wt= ((1.0-b)× ot)+(b×w#ave)
上記の推定エリア(wt〜bt)の濃度値の注目画素に対して、Niblack2値化を行い、それ以外のb#aveのエリアの画素は黒,w#aveエリアの画素は白と判断することにより、大幅な高速処理が可能である。a,bの比率は大きくすれば局所2値化の部分が多くなるが、あまり大きくしてしまうと手書き文字を2値化する場合には無駄な処理になってしまう。今回の実施例では、カスレ範囲の係数をa=0.35,b=0.62(全体の5〜8%をNiblack処理:文字記入数により比率は変動する)にすることで、100パーセント処理を行った画像と同等レベルの結果が得られた。
【0051】
そして、図9及び図15、図16に示すように、輝度信号2値データ66とRプレーン2値データ63に対してマスクフィルタ合成処理67する。即ち、それぞれ2値化された画像を単純ANDマスク合成することで、図16の合成画像68に示すように、ドロップアウト部分はRプレーンの画像63から、文字部分(情報部分)は輝度信号の画像66から情報を取り出すことができる。
【0052】
このように、各RGBの輝度であり、解像度が高い輝度データを使用する。しかし、輝度データは、特定色をドロップアウトできない。そこで、カラー画像データからドロップアウトカラー色の画像データを抽出し、この画像データで、高解像度の輝度データをフィルタリングすることにより、輝度データからドロップアウトカラーの部分を除去する。これにより、ドロップアウトカラーを除去した高解像度の輝度データをOCR用画像データとして、生成できる。これにより、高精度の文字認識が可能となる。
【0053】
又、カラー画像データから2値化された輝度データを生成し、カラー画像データからドロップアウトした色の画像データを抽出し、補完処理して、色のプレーンデータを作成した後、プレーンデータを2値化処理して、色の画像データを作成することにより、2値データのフィルタリング処理が可能となり、フィルタリング処理が容易且つ高速となる。
【0054】
更に、多値の前記カラー画像データから多値の輝度データを生成し、多値の輝度データに対し、設定された矩形フィルタ内の濃度分散値から2値化処理するNiblack法により、局所的に最適な2値化ができ、情報部分である文字の欠落を防止できる。
【0055】
更に、プレーンデータの濃度平均に基ずいて、2値化閾値を算出し、プレーンデータを2値化閾値で2値化する大津法等の2値化処理により、輝度データの文字部分の欠落のないマスクデータを生成できる。
【0056】
更に、2値化閾値を算出するステップは、プレーンデータのプレーンを縮小するステップと、縮小されたプレーンデータの濃度平均に基ずいて、2値化閾値を算出するステップからなり、2値化するステップは、縮小されたプレーンデータを2値化閾値で2値化するステップと、2値化されたプレーンデータのプレーンを拡大するステップとを有することにより、高速にマスクデータを生成できる。
【0057】
実施例として、図20の前述のOCR帳票の一例としての振込み依頼書4の画像データで、図17及び図18により、説明する。このOCR帳票4では、記入文字の周囲は、赤色枠40で囲われている。又、押印41は、ご依頼人の右側個所の「検印欄」になされている。ここでの印影は、システム処理する上で、銀行支店の担当者の検印である。押印41も赤色である。
【0058】
図17に示すように、前述のOCR帳票4のY信号2値データ66は、記入枠40、記入文字、押印41が現れている。一方、Rプレーン2値画像データ63は、赤色の記入枠40、押印41がドロップアウトされ、記入文字が現れている。Y信号2値データ66を、Rプレーン2値データ63でマスク合成処理67を行い、OCR用画像データ68を得る。このOCR用画像データ68の拡大図が図18である。即ち、高解像度のY信号から、ドロップアウト色の部分が除去されていることがわかる。
【0059】
このOCR用画像データの特徴を、図19により、説明する。図19は、記入枠に囲まれた「北海道拓殖」の手書き文字の、Y信号2値画像66を、Rプレーン2値画像63、OCR用画像68を示す。Y信号2値画像66は、高解像度であるが、記入枠が残る。Rプレーン画像63は、記入枠は除去されるが、文字は低解像度である。OCR用画像68は、高解像度であり、記入枠も除去されている。
【0060】
前述の図1のシステムでは、上位アプリケーション31は、読み取り指示に順序読みモードを指定し、要求画像に、1回目は、文字認識画像2値を、2回目は、印影画像2値を指定する。
【0061】
制御部30は、要求「文字認識画像2値」に対し、OCR処理部52で2値化されたOCR画像(2値)を上位に転送する。このOCR画像(2値)は、赤色系をドロップアウトするので、OCR帳票の記入枠等の赤色系を落し、黒文字のみが残る。このため、文字認識画像として、最適な画像である。前述のように、OCR画像(2値)は、高解像度の文字画像を表し、且つ文字認識の記入枠40が全てドロップアウトされ、且つ押印41もドロップアウトされている。
【0062】
続いて、「印影画像2値」の画像要求に対し、2値化処理部51で2値化されたG画像(2値)を上位に転送する。このG画像(2値)は、印影朱肉の赤色系を最も感度良く画像として表現する特徴を持つ。このため、印影画像として、最適な画像である。G画像(2値)は、印影41が明確に画像として現れている。勿論、この時は、赤色系を画像出力するため、文字認識の記入枠40等も画像に残る。上位31は、G画像から、印影領域を切り出し、ホストへ転送する。ホストでは、この印影画像により、検印の確認を行う。
【0063】
[他の実施の形態]
上述の実施の態様の他に、本発明は、次のような変形が可能である。
(1)OCR帳票を、振込み依頼書を例に説明したが、預金引出し、新規預金等の他のOCR帳票に適用できる。更に、OCR帳票に限らず、他の画像処理用帳票に適用できる。
(2)カラー読み取り素子を、CCDで説明したが、CMOSセンサ等他の読み取り素子を利用できる。
(3)ドロップアウトカラーを赤色系で説明したが、他の色であっても良い。
【0064】
以上、本発明を実施の形態により説明したが、本発明の主旨の範囲内で種々の変形が可能であり、これらを本発明の範囲から排除するものではない。
【0065】
(付記1)帳票イメージをカラーセンサで読み取ったカラー画像データからOCR用画像データを生成する画像処理方法において、前記カラー画像データから輝度データを生成するステップと、前記カラー画像データから認識すべき文字以外の色をドロップアウトした色の画像データを抽出するステップと、前記ドロップアウトした色の画像データで前記輝度データをフィルタリングして、前記OCR用画像データを作成するステップとを有することを特徴とする画像処理方法。
【0066】
(付記2)付記1の画像処理方法において、前記生成ステップは、前記カラー画像データから2値化された輝度データを生成するステップであり、前記抽出ステップは、前記カラー画像データから前記ドロップアウトした色の画像データを抽出し、補完処理して、前記色のプレーンデータを作成するステップと、前記プレーンデータを2値化処理して、前記色の画像データを作成するステップとからなることを特徴とする画像処理方法。
【0067】
(付記3)付記2の画像処理方法において、前記生成ステップは、多値の前記カラー画像データから多値の輝度データを生成するステップと、前記多値の輝度データに対し、設定された矩形フィルタ内の濃度分散値から2値化処理するステップとを有することを特徴とする画像処理方法。
【0068】
(付記4)付記2の画像処理方法において、前記色の画像データを作成するステップは、前記プレーンデータの濃度平均に基ずいて、2値化閾値を算出するステップと、前記プレーンデータを2値化閾値で2値化するステップとを有することを特徴とする画像処理方法。
【0069】
(付記5)付記4の画像処理方法において、前記2値化閾値を算出するステップは、前記プレーンデータのプレーンを縮小するステップと、前記縮小されたプレーンデータの濃度平均に基ずいて、2値化閾値を算出するステップとを有し、前記2値化するステップは、前記縮小されたプレーンデータを2値化閾値で2値化するステップと、前記2値化されたプレーンデータのプレーンを拡大するステップとを有することを特徴とする画像処理方法。
【0070】
(付記6)帳票イメージを読み取り、カラー画像データを生成するイメージリーダと、前記カラー画像データから輝度データを生成し、且つ前記カラー画像データから認識すべき文字以外の色をドロップアウトした色の画像データを抽出し、前記ドロップアウトした色の画像データで前記輝度データをフィルタリングして、前記OCR用画像データを作成する画像処理ユニットとを有することを特徴とする画像処理装置。
【0071】
(付記7)付記6の画像処理装置において、前記処理ユニットは、前記カラー画像データから2値化された輝度データを生成し、前記カラー画像データから前記ドロップアウトした色の画像データを抽出し、補完処理して、前記色のプレーンデータを作成して、前記プレーンデータを2値化処理して、前記色の画像データを作成することを特徴とする画像処理装置。
【0072】
(付記8)付記7の画像処理装置において、前記処理ユニットは、多値の前記カラー画像データから多値の輝度データを生成し、前記多値の輝度データに対し、設定された矩形フィルタ内の濃度分散値から2値化処理することを特徴とする画像処理装置。
【0073】
(付記9)付記7の画像処理装置において、前記処理ユニットは、前記プレーンデータの濃度平均に基ずいて、2値化閾値を算出し、前記プレーンデータを2値化閾値で2値化することを特徴とする画像処理装置。
【0074】
(付記10)付記9の画像処理装置において、前記処理ユニットは、前記プレーンデータのプレーンを縮小し、前記縮小されたプレーンデータの濃度平均に基ずいて、2値化閾値を算出し、前記縮小されたプレーンデータを2値化閾値で2値化した後、前記2値化されたプレーンデータのプレーンを拡大することを特徴とする画像処理装置。
【0075】
【発明の効果】
以上説明したように、本発明によれば、次の効果を奏する。
2次元カラーセンサに配置された各色のピクセルの各RGBの輝度であり、解像度の高い輝度データを使用するが、輝度データは、特定色をドロップアウトできないため、カラー画像データからドロップアウトカラー色の画像データを抽出し、この画像データで、高解像度の輝度データをフィルタリングすることにより、輝度データからドロップアウトカラーの部分を除去する。又、2次元カラーセンサに配置された各色のピクセルの各RGBの輝度データを、2次元カラーセンサの分解能のデータに補完処理して、これらのデータから解像度の高い輝度データを作成し、補完処理した高解像度のドロップアウトカラー色のデータでフィルタリングする。これにより、ドロップアウトカラーを除去した高解像度の輝度データをOCR画像用データとして、作成できる。これにより、高精度の文字認識が、2次元カラーセンサを用いて、実現できる。
【図面の簡単な説明】
【図1】本発明の一実施の形態の帳票処理装置のブロック図である。
【図2】図1のイメージリーダの外観図である。
【図3】図1の画像処理機構のブロック図である。
【図4】図3の画像生成部のRプレーン生成処理の説明図である。
【図5】図3の画像生成部のGプレーン生成処理の説明図である。
【図6】図3の画像生成部のBプレーン生成処理の説明図である。
【図7】図3の画像生成部のYプレーン生成処理の説明図である。
【図8】本発明の一実施の形態の読み取り処理フロー図である。
【図9】本発明の一実施の形態のOCR画像生成処理フロー図である。
【図10】図9のR(2値)生成処理フロー図である。
【図11】図10の大津法2値化処理の説明図である。
【図12】図9のY(2値)生成処理の説明図である。
【図13】図12のNiblack法の説明図である。
【図14】図12の文字カスレ推定処理の説明図である。
【図15】図9のマスク合成処理のフロー図である。
【図16】図15のマスク合成処理の説明図である。
【図17】図9の処理によるOCR画像生成動作の説明図である。
【図18】図17のOCR画像の拡大図である。
【図19】図9の処理によるOCR画像の説明図である。
【図20】従来技術を説明するためのOCR帳票の説明図である。
【符号の説明】
1 イメージリーダ
2 処理装置
20 CPU
21 画像メモリ
22 画像処理機構
30 制御部
31 上位アプリケーション
4 帳票
11 カラーCCD[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method and apparatus for generating OCR image data from a form image, and more particularly to an image processing method and apparatus for generating OCR image data from color image data.
[0002]
In financial institutions, post offices, etc., automatic processing of forms such as new deposits, deposit withdrawals, and transfers has become possible through character recognition (OCR) technology. For such automatic form processing, it is necessary to create OCR image data from the form image.
[0003]
[Prior art]
FIG. 20 is an explanatory diagram of an OCR form, and shows a
[0004]
The character recognition engine of the host application recognizes the handwritten or printed characters in the
[0005]
The following methods are known as methods for obtaining this character recognition image.
(1) An OCR image reader that reads a form with a light source of a dropout color characteristic band is used. For example, in order to acquire form image data for character recognition, a red light source (or red filter) is irradiated, a red entry frame is dropped out, and the form is read.
(2) A color image reader equipped with a full color CCD sensor is used as an image reader for OCR character recognition. This image reader has an advantage that it can be used for various purposes such as general full-color reading and plain image reading. In this case, when reading a red dropout color conventionally used in OCR, an R plane having a low resolution is used.
[0006]
[Problems to be solved by the invention]
However, the prior art has the following problems.
(1) In the method using the image reader for OCR, the application is limited to OCR, and cannot be used for other purposes such as extraction of seals.
(2) In the method using a color image reader, since one pixel is composed of RGB, when a dropout color is used, the resolution decreases and the character recognition error rate increases. In particular, it is difficult to recognize handwritten Chinese characters.
[0007]
Accordingly, an object of the present invention is to provide an image processing method and apparatus for generating OCR image data that enables highly accurate character recognition even when a versatile color image reader is used.
[0008]
Another object of the present invention is to provide an image processing method and apparatus for generating high-resolution OCR image data from color image data.
[0009]
Still another object of the present invention is to provide an image processing method and apparatus for generating OCR image data that can be easily recognized from color image data.
[0010]
[Means for Solving the Problems]
To achieve this object, in an image processing method for generating OCR image data from color image data obtained by reading a form image of the present invention with a color sensor, a step of generating luminance data from the color image data, and the color image Extracting image data of a color obtained by dropping out colors other than characters to be recognized from the data, filtering the luminance data with the image data of the dropped-out color, and generating the OCR image data; HaveThen, the generating step complements each of the multi-valued color image data of the color sensor covered with a filter of a color filter array of a plurality of colors in one two-dimensional sensor, and sets the resolution of the two-dimensional sensor. Creating multi-value plane data for each of the plurality of colors; generating multi-value luminance data from the generated multi-value plane data for each color; and the generated multi-value luminance data. And generating the binarized luminance data, the extracting step extracting the multi-value plane data of the dropped-out color of the resolution of the two-dimensional sensor, and extracting the multi-value of the extracted multi-value The method includes a step of binarizing plain data to create binarized image data of the color. Wherein in the binarized image data of a color that dropout by filtering the binarized luminance data, comprising the step of creating the image data for the OCR.
[0011]
An image processing apparatus according to the present invention reads a form image and generates color image data, generates luminance data from the color image data, and drops out colors other than characters to be recognized from the color image data. An image processing unit that extracts the image data of the selected color and filters the luminance data with the image data of the dropped-out color to create the OCR image data.The image reader includes a color sensor covered with a filter of a color filter array of a plurality of colors in one two-dimensional sensor, and the image processing unit receives each of the multi-valued color image data of the color sensor. Complement processing, creating multi-value plane data of each of the plurality of colors of the resolution of the two-dimensional sensor, generating multi-value luminance data from the generated multi-value plane data of each color, Binarized luminance data is generated from the generated multivalued luminance data, and the multivalued plane data of the dropped-out color at the resolution of the two-dimensional sensor is binarized, A binarized image data is created, and the binarized luminance data is filtered by the binarized image data of the color that has been dropped out, and the OCR image data is filtered. To create the data.
[0012]
The present invention uses luminance data of color image data. The luminance data is the luminance of each RGB, and the resolution is high. However, the luminance data cannot drop out a specific color. Therefore, dropout color image data is extracted from the color image data, and the high-resolution luminance data is filtered with this image data, thereby removing the dropout color portion from the luminance data. Thereby, high-resolution luminance data from which the dropout color has been removed can be generated as OCR image data. Thereby, highly accurate character recognition becomes possible.
[0013]
In the image processing method of the present invention, the generating step is a step of generating luminance data binarized from the color image data, and the extracting step is a step of calculating the color of the dropout color from the color image data. The image data is extracted and complemented to generate the color plane data, and the plane data is binarized to generate the color image data. Data filtering processing is possible, and filtering processing is easy and fast.
[0014]
Further, in the image processing method of the present invention, the generation step includes a step of generating multi-value luminance data from the multi-value color image data, and a step in a rectangular filter set for the multi-value luminance data. By including the step of binarization processing from the density dispersion value, it is possible to perform binarization optimally locally, and to prevent missing characters that are information portions.
[0015]
Furthermore, in the image processing method of the present invention, the step of creating the color image data includes: calculating a binarization threshold value based on an average density of the plane data; and converting the plane data into the binarization threshold value. And the step of binarizing can generate mask data in which the character portion of the luminance data is not missing.
[0016]
Furthermore, in the image processing method of the present invention, the step of calculating the binarization threshold includes the step of reducing the plane of the plane data and the binarization threshold based on the density average of the reduced plane data. And the step of binarizing includes the step of binarizing the reduced plane data with a binarization threshold and the step of enlarging the plane of the binarized plane data The mask data can be generated at high speed.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present invention will be described by dividing it into a form recognition device, an OCR image generation process, and other embodiments.
[0018]
[Form recognition device]
1 is a block diagram of a form recognition apparatus according to an embodiment of the present invention, FIG. 2 is an external view of a color image reader of FIG. 1, FIG. 3 is a block diagram of an image processing mechanism of FIG. FIG. 7 is an explanatory diagram of the generation processing of each plane of FIG. 3, and FIG. 8 is an image processing flowchart of FIG.
[0019]
As shown in FIG. 1, the form processing apparatus includes a
[0020]
The
[0021]
The
[0022]
As shown in FIG. 4, the
[0023]
The red filter R has a peak wavelength of 650 nm, the green filter G has a peak wavelength of 540 nm, and the blue filter B has a peak wavelength of 470 nm.
[0024]
The
[0025]
The R image passes through the red filter R, and has a characteristic of dropping out the red system. For example, in an OCR form in which an entry frame is preprinted in a red color, the red entry frame is removed, and only a color other than red, such as a black entry character, is generated as an R image.
[0026]
The G image passes through the green filter G and has a feature of dropping out a green color. The ability to drop out is low. For example, since the imprint vermilion is stamped in red, the G image is often used as a reliable method for reading the imprint.
[0027]
The B image passes through the blue filter B and has a feature of dropping out a blue color. Rather than using it alone, it is used as the B plane of the color image RGB.
[0028]
As described above, since one pixel is composed of four elements, in order to obtain a plane image having the
[0029]
Next, FIG. 5 shows the G plane complement processing, and the four pixels G1 to G4 around the pixel G are created by the following equations.
[0030]
Further, FIG. 6 shows B plane complementation processing, and the eight pixels B1 to B8 around the pixel B are created by the following equations.
[0031]
Next, generation of a Y plane image (240 dpi) will be described with reference to FIG. The Y image is called a monochrome image. Since each RGB image is an image read through a unique filter, a specific color component is dropped out, whereas a Y image is luminance data that directly outputs each color component. This Y plane image can be generated from an RGB plane image. That is, Y is generated from RGB by the following ratio calculation formula.
[0032]
Y = 0.299 × R + 0.587 × G + 0.114 × B
As is apparent from the above formula, the reason why the ratio of the G plane image is high is that many color components are included in the G plane. In this way, a monochrome image can be generated by individually separating and combining RGB.
[0033]
Returning to FIG. 3, the binarization processing unit 51 binarizes the multivalued Y, R, and G images to generate a Y, R, and G image (binarization). The aforementioned Y, R, and G plane images are composed of multi-value image data having 256 gradations. When performing recognition and collation processing by a computer such as character recognition and seal collation, it is necessary to consider performance and the like, and the binarization processing unit 51 converts 256-level multi-valued image data of “0 or 1” to 2 Convert to valued image data.
[0034]
As described later, the OCR
[0035]
A Y signal (luminance signal) is used to make the character portion high definition. Since the Y signal is an arithmetic synthesis of all plane images, it is originally high definition (equivalent to 240 dpi). Floating binarization processing (Niblack method binarization) is performed on the Y signal, and binarization is performed so as to output information (character blur) as much as possible. In this case, the dropout color portion becomes a black pixel (not dropped out) by the floating binarization process, but unnecessary information can be erased later by performing filter synthesis with the plain image. A high-definition dropout color image is generated by filtering the R plane binary and the Y signal (luminance signal) binary. In this case, an image can be generated by a simple AND mask operation.
[0036]
As for the binarization processing of the Otsu method, the literature, Nobuyuki Otsu: “Automatic threshold selection method based on discrimination and least squares criterion”, IEICE Transactions, J63-D, vol.4, pp .349-356 (1980). The Niblack method binarization is described in detail in the literature, W. Niblack: “An Introduction to Digital Image Processing”, pp. 115-116, Englewood Cliffs, NJ: Prentice Hall (1986). .
[0037]
The form image processing will be described with reference to FIG.
(S100) The
(S110) The
(S120) This RGB data is stored in the
(S130) After this storage, according to an instruction from the
(S140) The
[0038]
In this manner, it is possible to generate dropout color OCR image data using high-resolution luminance data. Due to the dropout color, the character frame and the like are removed, and a high-resolution character image is obtained. Therefore, character recognition becomes accurate, and complex character recognition such as handwritten Chinese characters can be made accurate.
[OCR image generation]
Hereinafter, an example of creating a 240 dpi red dropout color image will be described as an example.
[0039]
9 is a flowchart of OCR image processing, FIG. 10 is an explanatory diagram of R (binary) data generation operation, FIG. 11 is an explanatory diagram of Otsu method binarization processing, and FIG. 12 is a binary of a luminance signal. FIG. 13 is an explanatory diagram of the Niblack binarization process, FIG. 14 is an explanatory diagram of an estimation process of the blurred portion of the character, FIG. 15 is an explanatory diagram of the filter process, and FIG. It is operation | movement explanatory drawing of a filter process.
[0040]
As shown in FIG. 9, even if pixel complement processing (division for each plane and creation of luminance signal) is performed by inputting the original image, the
[0041]
The OR operation thinning 60 is performed on the
[0042]
Next, the Otsu
[0043]
The density value having the maximum inter-class variance value is determined as a binarized slice level, and the density value of each pixel is sliced at this slice level and binarized.
Further, the binarized R-plane image is returned to the original size. That is, the
[0044]
On the other hand, as shown in FIGS. 9 and 12,
[0045]
As shown in FIG. 13, in the Niblack method binarization, a rectangular filter (the size of the filter is arbitrary) is set, and the background portion or the information portion is discriminated from the density dispersion value g2 in the filter. If the density dispersion value g2 is equal to or greater than the dispersion threshold (σmin), the density threshold S of the pixel of interest [k] is obtained, and the density value of the pixel of interest is compared with the threshold S to determine whether the pixel is white or black. judge. Since the threshold is set for the local region, there is little loss of information.
[0046]
In this embodiment, since the handwritten character recognition image for OCR is generated, a 7 × 7 filter is set (the stroke width of the handwritten character is about 3 dots, so a 7 × 7 filter is desirable).
[0047]
In addition, since a rectangular area is set for each pixel of interest (k) for which a threshold value is to be calculated, three pixels in the upper, lower, left, and right directions, if the pixel of interest is a background (in the filter and only the background), the background threshold σmin in FIG. The background is determined by the determination formula (1). In addition, since the absolute value of density is not observed, even if the character stroke is completely covered in the 7 × 7 filter, it is regarded as the background, but the character stroke portion is determined by “estimation of character blur” described later. The inside can be complemented with black. When the character stroke and the background are included in the filter, the density dispersion value g2 is equal to or greater than the background threshold σmin, and the threshold S of the pixel of interest k in FIG. 13 is obtained from Expression (2) in FIG. If the pixel of interest has a density equal to or lower than the obtained threshold value S, the pixel is a black pixel.
[0048]
Further, the root (g) of the formula (2) in FIG.2) Is multiplied by a coefficient (-0.1). It is also possible to suppress noise around the character by setting the threshold value S as an undertone.
[0049]
Next, the Otsu method binarization threshold value calculation method used in the R-plane binarization in order to estimate the blurred portion of the character of the luminance signal is summarized. As shown in FIG. 14, a dynamic two-tone separation threshold value Ot is obtained from the entire luminance signal image by the Otsu method, and a low density direction (dark density) and a high density direction (dark density) are centered on the threshold value Ot. ) For the ratios a and b. That is, the character blur portion estimation area is calculated according to the following equation.
[0050]
Scratch range coefficient: a = 0.10 to 0.90 b = 0.10 to 0.90
Average density in black area: b # ave = Average density of
White area density average: w # ave = density distribution Ot ~ 255 density average
Lower limit of blurred range bt = ((1.0-a) x ot) + (a x b # ave)
Upper limit of blurred range wt = ((1.0-b) x ot) + (b x w # ave)
Niblack binarization is performed on the pixel of interest with the density value in the above estimated area (wt to bt), and other pixels in the b # ave area are determined to be black and pixels in the w # ave area are determined to be white. Therefore, it is possible to perform a large speed processing. If the ratio of a and b is increased, the portion of local binarization increases. However, if the ratio of a and b is increased too much, it becomes useless processing when binarizing a handwritten character. In this example, the coefficient of the blur range is set to a = 0.35, b = 0.62 (5-8% of the whole is Niblack processing: the ratio varies depending on the number of characters entered), and the image subjected to 100% processing The same level of results were obtained.
[0051]
Then, as shown in FIGS. 9, 15, and 16, mask
[0052]
In this way, luminance data having a high resolution and a luminance of each RGB is used. However, the luminance data cannot drop out a specific color. Therefore, dropout color image data is extracted from the color image data, and the high-resolution luminance data is filtered with this image data, thereby removing the dropout color portion from the luminance data. Thereby, high-resolution luminance data from which the dropout color has been removed can be generated as OCR image data. Thereby, highly accurate character recognition becomes possible.
[0053]
In addition, binarized luminance data is generated from the color image data, and the image data of the color dropped out from the color image data is extracted and complemented to create color plane data. By creating the color image data by performing the binarization process, it becomes possible to perform the filtering process of the binary data, and the filtering process becomes easy and fast.
[0054]
Further, multi-value luminance data is generated from the multi-value color image data, and the multi-value luminance data is locally processed by the Niblack method in which binarization processing is performed from the density dispersion value in the set rectangular filter. Optimal binarization can be performed, and missing characters that are information portions can be prevented.
[0055]
Further, the binarization threshold value is calculated based on the average density of the plane data, and the binarization process such as the Otsu method for binarizing the plane data with the binarization threshold value eliminates the loss of the character portion of the luminance data. No mask data can be generated.
[0056]
Further, the step of calculating the binarization threshold includes the step of reducing the plane of the plane data and the step of calculating the binarization threshold based on the density average of the reduced plane data. The step includes the step of binarizing the reduced plane data with a binarization threshold and the step of enlarging the plane of the binarized plane data, so that mask data can be generated at high speed.
[0057]
As an example, the image data of the
[0058]
As shown in FIG. 17, in the Y signal
[0059]
The characteristics of the OCR image data will be described with reference to FIG. FIG. 19 shows a Y signal
[0060]
In the system of FIG. 1 described above, the
[0061]
In response to the request “character recognition image binary”, the
[0062]
Subsequently, the G image (binary) binarized by the binarization processing unit 51 is transferred to the upper level in response to the image request “binary impression image binary”. This G image (binary) has a feature that expresses the red color of the seal imprint as the image with the highest sensitivity. For this reason, it is an optimal image as an imprint image. In the G image (binary), the
[0063]
[Other embodiments]
In addition to the above-described embodiments, the present invention can be modified as follows.
(1) Although the OCR form has been described by taking the transfer request form as an example, it can be applied to other OCR forms such as deposit withdrawal and new deposit. Furthermore, the present invention can be applied not only to OCR forms but also to other image processing forms.
(2) Although the color reading element has been described as a CCD, other reading elements such as a CMOS sensor can be used.
(3) Although the dropout color has been described as red, other colors may be used.
[0064]
As mentioned above, although this invention was demonstrated by embodiment, a various deformation | transformation is possible within the range of the main point of this invention, and these are not excluded from the scope of the present invention.
[0065]
(Appendix 1) In an image processing method for generating image data for OCR from color image data obtained by reading a form image with a color sensor, a step of generating luminance data from the color image data, and a character to be recognized from the color image data A step of extracting image data of a color in which a color other than the above is dropped out, and a step of creating the OCR image data by filtering the luminance data with the image data of the color that has been dropped out. Image processing method.
[0066]
(Supplementary Note 2) In the image processing method according to
[0067]
(Supplementary note 3) In the image processing method according to
[0068]
(Supplementary Note 4) In the image processing method according to
[0069]
(Supplementary Note 5) In the image processing method of
[0070]
(Supplementary Note 6) An image reader that reads a form image and generates color image data, an image of color that generates luminance data from the color image data, and drops out colors other than characters to be recognized from the color image data An image processing apparatus comprising: an image processing unit that extracts data and filters the luminance data with the image data of the color that has been dropped out to generate the OCR image data.
[0071]
(Supplementary note 7) In the image processing apparatus according to
[0072]
(Supplementary note 8) In the image processing apparatus according to
[0073]
(Supplementary note 9) In the image processing apparatus according to
[0074]
(Supplementary note 10) In the image processing apparatus according to supplementary note 9, the processing unit reduces the plane of the plane data, calculates a binarization threshold based on a density average of the reduced plane data, and reduces the reduction An image processing apparatus characterized in that the binarized plane data is binarized with a binarization threshold, and then the plane of the binarized plane data is expanded.
[0075]
【The invention's effect】
As described above, the present invention has the following effects.
Of each color pixel placed in the 2D color sensorThe luminance data of each RGB is high-resolution luminance data. However, since the luminance data cannot drop out a specific color, the image data of the dropout color is extracted from the color image data. By filtering the resolution luminance data, the dropout color portion is removed from the luminance data.Also, the RGB luminance data of each color pixel arranged in the two-dimensional color sensor is complemented to the resolution data of the two-dimensional color sensor, and high-resolution luminance data is created from these data, and the complementary processing is performed. Filter with high resolution dropout color data.As a result, high-resolution luminance data from which the dropout color is removed can be created as OCR image data. This enables high-precision character recognition.Realized using a two-dimensional color sensorit can.
[Brief description of the drawings]
FIG. 1 is a block diagram of a form processing apparatus according to an embodiment of the present invention.
2 is an external view of the image reader of FIG. 1. FIG.
3 is a block diagram of the image processing mechanism of FIG. 1. FIG.
4 is an explanatory diagram of R plane generation processing of the image generation unit in FIG. 3; FIG.
FIG. 5 is an explanatory diagram of G plane generation processing of the image generation unit in FIG. 3;
6 is an explanatory diagram of a B plane generation process of the image generation unit of FIG. 3;
7 is an explanatory diagram of a Y plane generation process of the image generation unit of FIG. 3;
FIG. 8 is a flowchart of a reading process according to the embodiment of this invention.
FIG. 9 is an OCR image generation processing flowchart according to an embodiment of the present invention.
10 is an R (binary) generation process flow diagram of FIG. 9; FIG.
FIG. 11 is an explanatory diagram of the Otsu method binarization processing of FIG. 10;
12 is an explanatory diagram of the Y (binary) generation process of FIG. 9. FIG.
13 is an explanatory diagram of the Niblack method of FIG. 12. FIG.
FIG. 14 is an explanatory diagram of the character blur estimation process in FIG. 12;
FIG. 15 is a flowchart of the mask composition process of FIG. 9;
16 is an explanatory diagram of the mask composition process of FIG. 15;
17 is an explanatory diagram of an OCR image generation operation by the process of FIG.
18 is an enlarged view of the OCR image of FIG.
FIG. 19 is an explanatory diagram of an OCR image obtained by the process of FIG.
FIG. 20 is an explanatory diagram of an OCR form for explaining the prior art.
[Explanation of symbols]
1 Image reader
2 processing equipment
20 CPU
21 Image memory
22 Image processing mechanism
30 Control unit
31 Top applications
4 forms
11 Color CCD
Claims (2)
前記カラー画像データから輝度データを生成するステップと、
前記カラー画像データから認識すべき文字色以外の色をドロップアウトした色の画像データを抽出するステップと、
前記ドロップアウトした色の画像データで前記輝度データをフィルタリングして、前記OCR画像データを作成するステップとを有し、
前記生成ステップは、
1つの2次元センサに複数の色のカラーフィルタ配列のフィルターで覆った前記カラーセンサの多値の前記カラー画像データを各々補完処理して、前記2次元センサの解像度の前記複数の色の各々の多値のプレーンデータを作成するステップと、
前記生成した各色の多値のプレーンデータから多値の前記輝度データを生成するステップと、
前記生成された多値の輝度データから2値化された輝度データを生成するステップと、
前記抽出ステップは、
前記2次元センサの解像度の前記ドロップアウトした色の多値のプレーンデータを抽出するステップと、
前記抽出した多値のプレーンデータを2値化処理して、前記色の2値化された画像データを抽出するステップからなり、
前記作成ステップは、
前記ドロップアウトした色の2値化された画像データで前記2値化された輝度データをフィルタリングして、前記OCR用画像データを作成するステップからなり、
前記色の2値化された画像データを作成するステップは、
前記プレーンデータを縮小するステップと、
前記縮小されたプレーンデータの濃度平均に基づいて、2値化閾値を算出するステップと、
前記縮小されたプレーンデータを前記2値化閾値で2値化するステップと、
前記2値化されたプレーンデータのプレーンを拡大するステップとを有することを
特徴とする画像処理方法。In an image processing method for generating image data for OCR from color image data obtained by reading a form image with a color sensor,
Generating luminance data from the color image data;
Extracting image data of a color obtained by dropping out a color other than the character color to be recognized from the color image data;
Filtering the luminance data with the image data of the dropped-out color to create the OCR image data,
The generating step includes
Each of the plurality of color image data of the resolution of the two-dimensional sensor is complemented by each of the multi-valued color image data of the color sensor covered with a filter of a color filter array of a plurality of colors on one two-dimensional sensor. Creating multi-value plane data;
Generating multi-valued luminance data from the generated multi-value plane data of each color;
Generating binarized luminance data from the generated multi-valued luminance data;
The extraction step includes
Extracting the drop-out color multi-value plane data of the resolution of the two-dimensional sensor;
The extracted multi-value plane data is binarized to extract binarized image data of the color;
The creating step includes
Filtering the luminance data in which the binarized with binarized image data of a color that is the drop-out, Ri Do the step of creating image data for the OCR,
The step of creating the binarized image data of the color includes:
Reducing the plane data;
Calculating a binarization threshold based on a density average of the reduced plane data;
Binarizing the reduced plane data with the binarization threshold;
And enlarging the plane of the binarized plane data .
前記カラー画像データから輝度データを生成し、且つ前記カラー画像データから認識すべき文字色以外の色をドロップアウトした色の画像データを抽出し、前記ドロップアウトした色の画像データで前記輝度データをフィルタリングして、前記OCR画像データを作成する画像処理ユニットとを有し、
前記イメージリーダは、1つの2次元センサに複数の色のカラーフィルタ配列のフィルターで覆ったカラーセンサを有し、
前記画像処理ユニットは、
前記カラーセンサの多値の前記カラー画像データを各々補完処理して、前記2次元センサの解像度の前記複数の色の各々の多値のプレーンデータを作成し、前記生成した各色の多値のプレーンデータから多値の前記輝度データを生成し、前記生成された多値の輝度データから2値化された輝度データを生成し、且つ前記2次元センサの解像度の前記ドロップアウトした色の多値のプレーンデータを2値化処理して、前記色の2値化された画像データを作成し、前記ドロップアウトした色の2値化された画像データで前記2値化された輝度データをフィルタリングして、前記OCR用画像データを作成し、
更に、前記色の2値化された画像データを作成するため、前記プレーンデータを縮小し、前記縮小されたプレーンデータの濃度平均に基づいて、2値化閾値を算出し、前記縮小されたプレーンデータを前記2値化閾値で2値化し、前記2値化されたプレーンデータのプレーンを拡大することを
特徴とする画像処理装置。An image reader that reads form images and generates color image data;
Luminance data is generated from the color image data, and image data of a color in which a color other than a character color to be recognized is dropped out of the color image data is extracted. The luminance data is extracted from the image data of the dropped out color. An image processing unit for filtering and creating the OCR image data,
The image reader has a color sensor covered with a filter of a plurality of color filter arrays in one two-dimensional sensor,
The image processing unit includes:
The multi-value color image data of the color sensor is complemented to generate multi-value plane data of each of the plurality of colors having the resolution of the two-dimensional sensor, and the generated multi-value plane of each color Multi-value luminance data is generated from the data, binary luminance data is generated from the generated multi-value luminance data, and the multi-value of the dropped-out color of the resolution of the two-dimensional sensor is generated. The binarization processing of the plane data is performed to create the binarized image data of the color, and the binarized luminance data is filtered by the binarized image data of the dropout color. , Create the OCR image data ,
Further, in order to create binary image data of the color, the plane data is reduced, a binarization threshold value is calculated based on a density average of the reduced plane data, and the reduced plane An image processing apparatus characterized in that data is binarized with the binarization threshold and the plane of the binarized plane data is enlarged .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000174170A JP3785306B2 (en) | 2000-06-09 | 2000-06-09 | Image processing method and apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000174170A JP3785306B2 (en) | 2000-06-09 | 2000-06-09 | Image processing method and apparatus |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2005380121A Division JP4163211B2 (en) | 2005-12-28 | 2005-12-28 | Image processing method and image processing apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2001351067A JP2001351067A (en) | 2001-12-21 |
| JP3785306B2 true JP3785306B2 (en) | 2006-06-14 |
Family
ID=18676253
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000174170A Expired - Fee Related JP3785306B2 (en) | 2000-06-09 | 2000-06-09 | Image processing method and apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3785306B2 (en) |
-
2000
- 2000-06-09 JP JP2000174170A patent/JP3785306B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2001351067A (en) | 2001-12-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2008085695A (en) | Digital watermark embedding device and detection device | |
| JP2003228712A (en) | Method for identifying text-like pixel from image | |
| JPH0957201A (en) | Specific color area extraction method and specific color area removal method | |
| CN110807747B (en) | Document image noise reduction method based on foreground mask | |
| JP2003152995A (en) | Image processing device | |
| US5388167A (en) | Document image processing system and document image processing method | |
| JP2000207489A (en) | Character extraction method, apparatus and recording medium | |
| JPH04315272A (en) | Graphic recognizing device | |
| JP4441300B2 (en) | Image processing apparatus, image processing method, image processing program, and recording medium storing the program | |
| US6983071B2 (en) | Character segmentation device, character segmentation method used thereby, and program therefor | |
| JP3785306B2 (en) | Image processing method and apparatus | |
| JP4163211B2 (en) | Image processing method and image processing apparatus | |
| Murguia | Document segmentation using texture variance and low resolution images | |
| JP4259950B2 (en) | Image recognition apparatus, image recognition program, and recording medium | |
| JP2001127999A (en) | Device and method for processing image | |
| JPH11341295A (en) | Image processing method | |
| JP4383429B2 (en) | Form image processing method and apparatus | |
| JP3839221B2 (en) | Form image processing method and apparatus | |
| JP3020293B2 (en) | Attribute determination method | |
| JP4008715B2 (en) | Form reading device and form reading processing program | |
| JP3485975B2 (en) | Specific color area extraction method and specific color area removal method | |
| JP3949954B2 (en) | Dropout color identification processing program, method, and apparatus | |
| JP2006003993A (en) | License plate recognition device | |
| JP3759349B2 (en) | Image analysis apparatus and image analysis method | |
| JP2000148908A (en) | Document image processing method, apparatus and recording medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050310 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050329 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050530 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20051101 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20051228 |
|
| 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: 20060314 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060317 |
|
| 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: 20100324 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100324 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110324 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110324 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120324 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130324 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130324 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140324 Year of fee payment: 8 |
|
| LAPS | Cancellation because of no payment of annual fees |