JP4064677B2 - Image processing apparatus, image processing method, and program causing computer to execute the method - Google Patents

Image processing apparatus, image processing method, and program causing computer to execute the method Download PDF

Info

Publication number
JP4064677B2
JP4064677B2 JP2002024631A JP2002024631A JP4064677B2 JP 4064677 B2 JP4064677 B2 JP 4064677B2 JP 2002024631 A JP2002024631 A JP 2002024631A JP 2002024631 A JP2002024631 A JP 2002024631A JP 4064677 B2 JP4064677 B2 JP 4064677B2
Authority
JP
Japan
Prior art keywords
image
inclination
angle
image data
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002024631A
Other languages
Japanese (ja)
Other versions
JP2003223643A (en
Inventor
敏文 山合
利夫 宮澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2002024631A priority Critical patent/JP4064677B2/en
Publication of JP2003223643A publication Critical patent/JP2003223643A/en
Application granted granted Critical
Publication of JP4064677B2 publication Critical patent/JP4064677B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Character Input (AREA)
  • Image Analysis (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、文字認識処理の前処理で文書画像に対する画像処理をおこなう、より詳しくは、文書の傾きを検出し補正するための画像処理装置、画像処理方法、およびその方法をコンピュータに実行させるプログラムに関する。
【0002】
【従来の技術】
従来における画像認識装置として、入力されたイメージ画像の外接矩形を抽出し、その外接矩形を用いて、入力されたイメージ画像の傾きを検出するものがある(たとえば、特開平3−213053号公報記載の「原稿傾き検出装置」)。また、特開平9−171538号公報の画像認識装置は、傾きの微小角度の検出を強化するため、あらかじめ所定の角度の傾きを有して検出する構成である。
【0003】
【発明が解決しようとする課題】
しかしながら、上記特開平3−213053号公報の装置では、原稿が入力された状態において所定の基準点を基準として傾きを検出するので、特に、傾きが微小角度である場合には、検出精度が十分に得られないという問題点がある。この点は、上記の特開平9−171538号公報においても指摘されている。
【0004】
この検出精度は、実際と検出値との微小な角度の相違である場合に限らない。検出方法によっては、「傾いていない」と判定する処理で誤認することがある。傾いていない画像に対し、この画像が「傾いていない」と判定する技術は、間違ったときの影響が非常に大きいため、通常の傾き検出よりも高い検出精度が要求されている。
【0005】
特開平9−171538号公報に記載の装置を用いれば、微小角の検出には優れた結果が得られるが、最初に傾ける所定の角度に対し、偶然、画像の傾き角度が同じ角度であった場合には、検出する角度が微小となり、上記同様に検出精度の問題が発生する。
【0006】
また、特開平9−171538号公報の方法では、最初の検出角度が所定値以下のみ所定の角度を回転させる最初の検出で、傾いていない画像に対し「大きく傾いている」、と判定された場合に誤認を修正することはできない。さらに、上記の各従来技術は、白黒の二値画像に対しての傾き検出の方法であり、カラーなど多値のイメージ画像に対する処理はおこなえない。
【0007】
この発明は、上述した従来技術による問題点を解消するため、入力された画像データの傾き角度や補正後の傾き角度の信頼性を検定することにより、より精度の高い検出結果を得ることができる画像認識装置、画像認識方法、およびその方法をコンピュータに実行させるプログラムを提供することを目的とする。
【0008】
【課題を解決するための手段】
上述した課題を解決し、目的を達成するため、本発明の画像処理装置は、入力画像の複製である複製画像を作成する複製作成手段と、前記入力画像の傾きである第1の傾きを検出する傾き検出手段と、検出された前記第1の傾きに基づいて前記入力画像を補正する傾き補正手段と、前記補正手段により補正された前記入力画像の傾きである第2の傾きを検出する傾き検出手段と、前記第1の傾きと前記第2の傾きとに基づいて該第1の傾きの正当性を判断する判断手段とを備え、前記判断手段において前記第1の傾きが正当であると判断された場合には、前記第1の傾きと前記第2の傾きの和に基づいて前記複製画像を補正し、補正された該複製画像を出力し、前記判断手段において前記第1の傾きが正当でないと判断された場合には、前記複製画像を出力することを特徴とする。
【0011】
この発明によれば、1度目の検出角度と2度目の検出角度という情報を用いて検定する構成であるため、2度目の検出結果では水平(0度)に近い値が得られるはずであり、逆に、1度目と2度目の検出結果を足し合わせたものが0度に近いという場合は、1度目で間違った角度補正をおこない、それを元に戻した結果であると簡単に両者を判別できるようになる。また、検定結果で傾きの検出結果が正当でない、と判断された場合に、複製された入力の画像データを結果出力するため、補正後の画像データを再度補正する手間を省き処理の効率化と画像品質の維持を図ることができる。また、画像の傾きの補正をおこない検定結果で正当である、と判定された場合に、1度目の補正画像は破棄することができ、複製された画像データに対する角度補正を、1度目と2度目の角度の和に基づき、ただ一度の補正でおこなえるようになる。これにより、補正にかかる回数を削減でき、画像のがたつきを防止して画像品質を維持できるようになる。
【0012】
また、この発明にかかる画像処理装置は、前記判断手段は、前記第2の傾きの絶対値が予め定められた閾値以下であれば、前記第1の傾きが正当であると判断することを特徴とすることを特徴とする。
【0013】
この発明によれば、しきい値を用いて検定するため、検定精度を向上できるようになる。
【0014】
また、この発明にかかる画像処理方法は、入力画像の複製である複製画像を作成し、前記入力画像の傾きである第1の傾きを検出し、検出された前記第1の傾きに基づいて前記入力画像を補正し、補正された前記入力画像の傾きである第2の傾きを検出し、前記第1の傾きと前記第2の傾きとに基づいて該第1の傾きの正当性を判断し、前記第1の傾きが正当であると判断された場合には、前記第1の傾きと前記第2の傾きの和に基づいて前記複製画像を補正し、補正された該複製画像を出力し、前記第1の傾きが正当でないと判断された場合には、前記複製画像を出力することを特徴とする。
【0016】
また、この発明にかかる画像処理方法は、前記第2の傾きの絶対値が予め定められた閾値以下であれば、前記第1の傾きが正当であると判断することを特徴とする。
【0017】
【発明の実施の形態】
以下に添付図面を参照して、この発明にかかる画像処理装置、画像処理方法およびその方法をコンピュータに実行させるプログラムの好適な実施の形態を詳細に説明する。
【0018】
図1は、本発明の画像認識装置の構成例を示すブロック図である。同図に示す画像認識装置100は、本発明の画像認識処理をマイクロプロセッサ等のデジタル処理により実行し得るために構築したものである。同図において、スキャナ101は、文書画像原稿を光学的に読み取り電気信号である画像データに変換する。CPU102は、本発明にかかる画像認識処理を画像認識処理プログラムに基づき実行する。
【0019】
画像認識処理プログラムは、プログラム格納ROM/RAM103、又はCD−ROM/FDなどの格納媒体104に格納される。CPU102は、この画像認識処理プログラムを読み出してワークエリアRAM105を用いて入力された画像データに対する後述する画像認識処理(分割処理および画像処理)を実行する。
【0020】
なお、CD−ROM/FDなどの格納媒体104に格納された画像認識処理プログラムは、CD−ROM/FDドライブ106によって読み出される。そして、画像認識プログラムにより処理された画像データは、CPU102の指示によりメモリ107に格納され、必要によりディスプレイ108に表示出力され、印字装置109から印字出力される。
【0021】
(実施の形態1)
図2は、実施の形態1による画像認識処理プログラムにより構成される各機能部を示すブロック図である。図示のように各機能は、画像入力部201と、画像傾き検出部202と、画像傾き検定部203と、画像傾き補正部204によって構成されている。
【0022】
画像入力部201には、画像データが入力される。この画像データは、二値、多値いずれであってもよい。画像傾き検出部202における画像データの傾きの検出は、画像データが二値の場合と、多値の場合とで異なる。画像データが二値の場合には、上記説明した特開平3−213053号公報の技術や、本出願人による特開平6−20092号公報に開示された装置、方法を使用することができる。たとえば、画像データが多値の場合であれば、画像のエッジ成分の外接矩形を直接取得し、特開平7−141465号公報に開示された方法に対し外接矩形を渡して傾きを検出する。
【0023】
画像傾き検定部203では、上記画像傾き検出部202と異なる別の検出方法で同一の画像データに対し再度角度検出をおこなう。そして、画像傾き検定部203は、再度角度検出した傾き検出角度(第2の検出結果)が、画像傾き検出部202で得られた傾き検出角度(第1の検出結果)と近い場合に結果が正しい(信頼性あり)と判定する。たとえば、本出願人による特開平6−150060号公報に記載された技術を用い、直線部分からの角度を検出しておこなう方法がある。
【0024】
画像傾き補正部204は、画像傾き検定部203で「信頼性あり」、とされた角度に−1(度)をかけた角度だけ、元画像(画像入力部201に入力された画像データ)を回転させる。
【0025】
以上の構成により、第1の検出時の検出角度が正しい傾き角度と大きく異なる場合には、「信頼性なし」となり傾きの補正を実行しないため、信頼性が向上できる。たとえば、傾いていない画像を誤検出して、さらに大きく傾けてしまう失敗を未然に防止できるようになる。
【0026】
図3は、文字認識(OCR)方法の処理内容全体を示すフローチャートである。上記画像データの傾き検出は、このような文字認識処理時の前処理として実行される(図中のスキュー補正に相当)。同図の処理概要を説明する。図示のように、入力される画像データは、二値の場合と、多値の場合では処理過程が異なる。
【0027】
二値の画像データの入力時には、画像の適正化後(ステップS301)、画像データの画像(文書)の方向が判別、補正される(ステップS302)。この後、スキュー補正され(ステップS303)、ステップS310に移行する。
【0028】
多値の画像データの入力時には、画像の適正化後(ステップS304)、画像補正用に二値化され(ステップS305)、画像の方向が判別、補正される(ステップS306)。この後、スキュー(傾き)補正される(ステップS307)。つぎに文書中の写真領域が抽出され(ステップS308)、画像データを認識用に二値化する(ステップS309)。
【0029】
ステップS310では、上記二値、および多値に対するスキュー補正等の処理後の画像データに基づき、ノイズ・網掛け除去をおこなう。この後、上記抽出した写真領域、文字領域、その他の領域等の領域識別処理をおこなう(ステップS311)。識別後の文字領域に対しては、文字認識(OCR)処理をおこない(ステップS312)、表領域に対しては表処理をおこない(ステップS313)、表中の文字領域のみステップS312での文字認識を実行させる。
【0030】
この後、文字認識で得られた文字データ(文字コード)に基づき、対応するフォント、文字色をそれぞれ設定し(ステップS314,315)、文字認識した中間結果データ(DRFと称す)を作成する(ステップS316)。この際、上記抽出された表領域に対する表をデータ作成する。この後、タイトルを抽出し(ステップS317)、最終的な中間結果データを作成し(ステップS318)、ワークエリアRAM105に格納後、文字認識結果をディスプレイ108等に出力する。
【0031】
上記画像の適正化処理(ステップS301,S304)について説明する。この処理は、入力された画像データの縦横の解像度(サイズ)に極端な差がある場合、小さな方のサイズを大きな方のサイズに合わせる処理である。この際、小さな方のサイズを整数倍に変倍することで、縦横の解像度を同じくらいの解像度に合わせる。ただし、変倍することで画像の最大サイズを超える場合は、変倍されないで処理をおこなう。具体的には、以下の式で変倍率を計算する。
【0032】
if(biXPelsPerMeter < biYPelsPerMeter){rate = (int)ceil((double) biYPelsPerMeter / biXPelsPerMeter − 0.5);}
【0033】
ここで、整数値rate × widthの値が、最大処理範囲を超える場合、rateをデクリメントして最大処理範囲を超えない程度まで小さくする。また一方、縦横の解像度の差が倍以上あり、補正すると最大処理画像サイズを超えるような画像データに対しては、入力エラーとして再入力を促す構成としてもよい。また、入力される画像データがインデックスカラーやグレーなどのカラーマップを持った多値画像であった場合、24ビットフルカラーへの変換処理をおこなう。これらの処理にはRGKのライブラリーを使用する。
【0034】
図4は、図3に記載の全体処理における画像の傾き補正に関する部分(ステップS301〜S310)に関する各処理をより詳細に説明したフローチャートである。特に、カラー(多値)の画像データ入力時に画像データが書き変わるタイミングを対応するステップ部分に併記してある。なお、図4において図3と同一の処理ステップには同一のステップ番号を附してある。
【0035】
画像認識装置100のCPU102は、スキャナ101等から入力された画像データの種別を判別する(ステップS401)。二値である場合には(ステップS401:二値画像)、ステップS301〜S303の処理を実行し、スキュー補正後の画像データに対し一度目(第1の検出結果)の文書方向が不明であるか否かを判別する(ステップS402)。文書方向が不明である場合には(ステップS402:Yes)、ステップS302を再実行する。文書方向が判断できれば(ステップS402:No)、ステップS310に移行する。
【0036】
一方、画像データの種別がカラーである場合には(ステップS401:カラー画像)、ステップS304〜S307の処理を実行し、スキュー補正後の画像データに対し一度目(第1の検出結果)の文書方向が不明であるか否かを判別する(ステップS403)。文書方向が不明である場合には(ステップS403:Yes)、ステップS306を再実行する。文書方向が判断できれば(ステップS403:No)、画像回転をおこない(ステップS404)、ステップS308以降の処理を実行する。
【0037】
上記処理において、カラーの画像データ入力時における画像書き換えのタイミングを説明する。カラーの画像データは、画像の適正化(ステップS304)、画像回転(ステップS404)時にそれぞれ書き換えられる。
【0038】
また、カラーの画像データに基づき作成される二値の画像データについての、作成、書き換え、破棄の各タイミングを説明する。画像適正化後の二値化(ステップS305)で二値の画像データが作成され、文書方向判別、補正(ステップS306)、および、スキュー補正(ステップS307)時にそれぞれ書き換えられる。また、この二値の画像データは画像回転(ステップS404)で破棄される。
【0039】
また、写真抽出(ステップS308)、および認識用二値化(ステップS309)時に二値の画像データが作成され、ノイズ・網掛け除去(ステップS310)で二値の画像データが書き換えられる。
【0040】
上記画像補正用二値化処理(ステップS305)の内容について説明する。この処理では、文書方向判別、スキュー検出に用いる二値画像を生成する。この二値の画像データで認識した方向や、傾き角度は、元のカラーの画像データに対して回転して補正をする(ステップS404)ので、その時点で二値の画像は必要なく、破棄している。
【0041】
(実施の形態2)
図5は、実施の形態2による画像認識処理プログラムにより構成される各機能部を示すブロック図である。実施の形態1で説明したと同様に各機能は、画像入力部201と、画像傾き検出部202と、画像傾き検定部203と、画像傾き補正部204によって構成されている。そして、画像傾き補正部204での傾き角度の補正に基づき、画像傾き検定部203で補正後の画像に対して傾きの検定をおこない、角度の正当性を確かめる構成の点が相違している。
【0042】
図6は、実施の形態2による処理内容を示すフローチャートである。まず、入力された画像データの傾き角度を検出する(ステップS601)。ここで傾き角度(angleA)が検出される。つぎに、検出された傾き角度を相殺するマイナスの補正角度(−angleA)で補正する(ステップS602)。つぎに、補正した角度を検定する(ステップS603)。
【0043】
ステップS603で実行する角度検定には、実施の形態1と異なり、最初の角度検出方法と同じ手法のものを使用しても悪影響は少ないという特徴がある。たとえば、補正後の画像を角度検出し、角度が0度付近であれば、補正は成功したと考えられる。この場合、正当性の評価(ステップS604)で、「正当性が高い」という結果を出力する。逆に、補正後の検出角度が大きい場合は、1度目の検出角度は怪しい「正当ではない」と判定する。なお、角度検定時、2度目の検出時に、1度目の検出時とは別の傾き検出方法を用いても構わない。
【0044】
(実施の形態3)
図7は、実施の形態3による処理内容を示すフローチャートである。実施の形態3では、1度目の検出角度と2度目の検出角度という情報を用いて検定する構成である。まず、入力された画像データの傾き角度を検出する(ステップS701)。ここで傾き角度(angleA)が検出される。つぎに、検出された傾き角度を相殺するマイナスの補正角度(−angleA)で補正する(ステップS702)。
【0045】
つぎに、補正した画像データの傾き角度を検出する(ステップS703)。ここで検出された結果は、傾き角度(angleB)である。つぎに、1度目の検出結果(angleA)と、2度目の検出結果(angleB)を検定する(ステップS704)。
【0046】
そして、正常に角度が検出できていれば、本来、2度目の検出結果(angleB)は水平(0度)に近い値が得られる。その場合、正当性の評価(ステップS705)では、検出結果が「正当性が高い」として終了する。逆に、1度目と2度目の検出結果を足し合わせたものが0度に近いという場合は、1度目で間違った角度補正をおこない、それを元に戻したということが言える。そのため、検出結果は「正当ではない」と判断する。この場合、一時保存していた元の画像データを角度検出後の補正結果として出力することができる。
【0047】
(実施の形態4)
実施の形態3では、上記実施の形態2で説明した正当性の評価(ステップS705)での判断において、2度目の検出結果にしきい値Th1を設けて検定する構成である。図8は、この実施の形態4の処理内容を示すフローチャートである。ステップS701〜S703までは図7と同様の処理を実行する。
【0048】
そして、正当性の評価時(ステップS801)には、ステップS704で得られた2度目の検出角度の絶対値をあらかじめ定めたしきい値Th1と比較する。2度目の検出角度がしきい値Th1以下であれば(ステップS801:Yes)、1度目の検出結果(angleA)に「正当性がある」と判断する(ステップS802)。一方、2度目の検出角度がしきい値Th1を超えていれば(ステップS801:No)、1度目の検出結果(angleA)は「正当ではない」と判断する(ステップS803)。
【0049】
このように、しきい値Th1として十分小さいと考えられる値(たとえば、0〜1度の範囲の値)を設定し、このしきい値Th1以下を用いて正当性を評価することにより、正当性の評価の信頼度を向上できるようになる。
【0050】
(実施の形態5)
実施の形態5では、1度目の傾き角度の検出時(たとえばステップS601,S701)に、しきい値Th2を用い検出の正当性を判断する。図9は、実施の形態5の処理内容を示すフローチャートである。ステップS701〜S703、ステップS801〜S803は、それぞれ図7,図8で説明した内容と同様の処理を実行する。
【0051】
1度目の傾き角度検出(ステップS701)後、この1度目の検出角度の絶対値を、しきい値Th2と比較判断する(ステップS901)。しきい値Th2としては十分小さいと考えられる値(たとえば、0〜1度の範囲の値)を設定する。そして、1度目の検出角度の絶対値が、しきい値Th2以下である場合には(ステップS901:Yes)、この1度目の傾き角度の検出値を信頼して「正当である」と評価する(ステップS902)。そして、傾きの検定(たとえばステップS603,S703)の処理を実行せず終了することができる。
【0052】
一方、1度目の検出角度の絶対値が、しきい値Th2を超える場合には(ステップS901:No)、つぎに、検出された傾き角度を相殺するマイナスの補正角度(−angleA)で補正し(ステップS702)、補正した画像データの傾き角度(angleB)を検出する(ステップS703)。この後、正当性の評価をおこない、ステップS704で得られた2度目の検出角度の絶対値をあらかじめ定めたしきい値Th1と比較する(ステップS801)。
【0053】
2度目の検出角度がしきい値Th1以下であれば(ステップS801:Yes)、1度目の検出結果(angleA)に「正当性がある」と判断する(ステップS802)。一方、2度目の検出角度がしきい値Th1を超えていれば(ステップS801:No)、1度目の検出結果(angleA)は「正当ではない」と判断する(ステップS803)。
【0054】
この構成によれば、1度目の検出後、ステップS901で傾き角度の評価をおこない、「正当である」評価時には、ステップS702以降の処理を省略でき、処理速度の高速化を図ることができる。なお、しきい値Th2の値を、しきい値Th1より小さな値とすることにより、傾きの検定(たとえばステップS603,S704)の処理の不実行時における判定を高精度に維持できる。すなわち、1度目の傾き角度の検出時にしきい値Th2を用いて高精度な検出をおこなえれば、検定をおこなわずとも画像の傾きの検出を高精度なものとして扱えるようになる。
【0055】
(実施の形態6)
実施の形態6では、検定時に1度目の検出角度と2度目の検出角度を使用し、2つの検出角度の和の絶対値をしきい値Th3を用いて評価する。図10は、実施の形態6の処理内容を示すフローチャートである。前述した実施の形態で説明した各処理内容には同一符号を附してある。
【0056】
まず画像データの画像に対する1度目の傾き角度(angleA)を検出し(ステップS701)、つぎに、検出された傾き角度を相殺するマイナスの補正角度(−angleA)で補正し(ステップS702)、補正した画像データの傾き角度(angleB)を検出する(ステップS703)。
【0057】
この後、検定処理をおこなう(ステップS1001)。ここでは、1度目の傾き角度の検出角度と、2度目の検出角度の和(angleA+B)を計算し、その和の絶対値をしきい値Th3と比較する。このしきい値Th3としては、たとえば、0〜1度の範囲の値を用いる。そして、この和の絶対値がしきい値Th3より小さければ(ステップS1001:Yes)、1度目(ステップS701)で検出した角度(angleA)は「正当ではない」と判断する(ステップS1002)。一方、この和の絶対値がしきい値Th3以上であれば(ステップS1001:No)、1度目で検出した角度は「正当である」と判断する(ステップS1003)。
【0058】
たとえば、ステップS1001での判断を具体的数値で説明する。1度目の画像の傾き検出結果(angleA)が3.5度であると、補正により−3.5傾けて、本来であれば傾きが0度になる。そして、補正後の画像に対する再度の傾き検出結果(angleB)で−3.3度の傾きが検出されたとする。この場合、検出角度の絶対値の和は、3.5+(−3.3)=0.2であり、十分に小さい値となる。そして、しきい値Th3が1度であるとすると、ステップS1001の判断はYesとなり「正当ではない」と判断される。
【0059】
これは、本来傾いていない画像を誤検出して傾きの補正をおこなった後、その画像に対する2度目の角度検出が比較的正しい値として得られた状態と考えることができる。このように、1度目の角度検出時に誤検出した場合には、角度の和が0度付近になる。したがって、このような場合、1度目の検出角度は「正当でない」と判断する。このような処理内容により、1度目の傾き角度検出に対する誤検出の有無を判断できるようになる。
【0060】
(実施の形態7)
実施の形態7は、画像の傾き補正をおこなう前に、あらかじめ入力画像の複製を作っておき、検定結果が「正当でない」と判定した場合に、この複製画像を最終結果として出力する構成である。図11は、この実施の形態7の処理内容を示すフローチャートである。
【0061】
まず、入力された画像データに対する画像の1度目の傾き角度(angleA)を検出する(ステップS701)。つぎに、この入力された画像データの複製を作成しておく(ステップS1101)。この後、入力された画像データに対し、検出された傾き角度を相殺するマイナスの補正角度(−angleA)で補正し(ステップS702)、補正した画像データの傾き角度(angleB)を検出する(ステップS703)。
【0062】
この後、検定処理をおこなう(ステップS1102)。この検定処理は、上述した各実施形態で説明したいずれの処理であってもよい(たとえば、ステップS704,S801,S1101)。この検定処理の結果、正当な条件を満たす場合(ステップS1102:Yes)、1度目で検出した角度(angleA)は「正当である」と判断する(ステップS1103)。
【0063】
一方、この検定処理の結果、正当な条件を満たさない場合(ステップS1102:No)、1度目で検出した角度(angleA)は「正当でない」と判断し(ステップS1104)、先にステップS1101で複製していた画像データを補正画像として出力する(ステップS1105)。
【0064】
他の処理例としては、入力された画像データを複製してこの複製された画像を角度補正した結果、正当性が得られない場合に、入力された元の画像データをそのまま出力する構成とすることもできる。いずれの場合においても、角度補正後の画像を再度回転処理して元に戻す処理を実行するものではない。このように、検定の結果、「正当でない」と判断された場合、複製された画像データを出力することで、1度補正した画像を再度逆回転させて元に戻すという処理を不要にできる。
【0065】
(実施の形態8)
実施の形態8は、画像の傾きの検定結果が「正当である」と判定された場合に、入力された画像を1度目の検出角度で補正した画像を出力する構成としたものである。図12は実施の形態8の処理内容を示すフローチャートである。
【0066】
まず、入力された画像データに対する画像の1度目の傾き角度(angleA)を検出する(ステップS701)。そして、入力された画像データに対し、検出された傾き角度を相殺するマイナスの補正角度(−angleA)で補正し(ステップS702)、補正した画像データの傾き角度(angleB)を検出する(ステップS703)。
【0067】
この後、検定処理をおこなう(ステップS1102)。この検定処理の結果、正当な条件を満たす場合(ステップS1102:Yes)、1度目で検出した角度(angleA)は「正当である」と判断し(ステップS1103)、S702において処理済みである1度目の補正した画像データを出力する(ステップS1201)。一方、この検定処理の結果、正当な条件を満たさない場合(ステップS1102:No)、1度目で検出した角度(angleA)は「正当でない」と判断する(ステップS1104)。
【0068】
実施の形態4で説明したように、正常に角度が検出できていれば、本来、2度目の検出結果(angleB)は水平(0度)に近い値が得られ、また、実際には±0.2〜0.4度程度の検出誤差もあるので、2度目の検出角度を反映した画像データを出力しても、大きく結果が変わらない。このように、実施の形態8によれば、検定後の画像出力を簡単に選択して処理の簡素化を図れるようになる。
【0069】
(実施の形態9)
実施の形態9では、検定結果で「正当性がある」と判定された場合に、入力画像に1度目の検出角度で補正した画像をさらに2度目の検出角度で補正した画像を出力する構成である。図13は、この実施の形態9における画像認識処理プログラムにより構成される各機能部を示すブロック図である。
【0070】
上記の実施の形態で説明したと同様に各機能は、画像入力部201と、画像傾き検出部202と、画像傾き検定部203と、画像傾き補正部204,1301によって構成されている。画像傾き検定部203は、画像傾き補正部204での傾き角度の補正に基づき、補正後の画像に対して傾きの検定をおこない、角度の正当性を確かめる。この後、画像傾き補正部1301は、検定結果で正当性があると判定された場合に、1度目の補正画像に対して2度目の検出角度を補正する。
【0071】
図14は実施の形態9の処理内容を示すフローチャートである。まず、入力された画像データに対する画像の1度目の傾き角度(angleA)を検出する(ステップS701)。そして、入力された画像データに対し、検出された傾き角度を相殺するマイナスの補正角度(−angleA)で補正し(ステップS702)、補正した画像データの傾き角度(angleB)を検出する(ステップS703)。
【0072】
この後、検定処理をおこなう(ステップS1102)。この検定処理の結果、正当な条件を満たす場合(ステップS1102:Yes)、1度目で検出した角度(angleA)は「正当である」と判断し(ステップS1103)、画像傾き補正部1301は、ステップS702において処理済みである1度目の補正した画像データを補正角度(−angleB)で補正し(ステップS1401)、この補正した画像データを出力する(ステップS1402)。一方、検定処理の結果、正当な条件を満たさない場合(ステップS1102:No)、1度目で検出した角度(angleA)は「正当でない」と判断する(ステップS1104)。
【0073】
上記処理内容によれば、画像傾き補正部1301での補正処理(ステップS1401)が加わるため、実施の形態8で説明した内容に比して処理ステップが増えた分だけ処理時間およびコストがかかるが、傾きの補正精度を少しでも向上したい場合に有効である。
【0074】
(実施の形態10)
実施の形態10は、補正をおこなう前にあらかじめ入力画像の複製を作っておき、検定結果が「正当である」と判定された場合に、上記画像傾き補正部1301で複製画像に対して1度目の検出角度と2度目の検出角度の和の角度を補正した画像を出力する構成である。
【0075】
図15は、実施の形態10による処理内容を示すフローチャートである。まず、入力された画像データに対する画像の1度目の傾き角度(angleA)を検出する(ステップS701)。つぎに、この入力された画像データの複製を作成しておく(ステップS1101)。そして、入力された画像データに対し、検出された傾き角度を相殺するマイナスの補正角度(−angleA)で補正し(ステップS702)、補正した画像データの傾き角度(angleB)を検出する(ステップS703)。
【0076】
この後、検定処理をおこなう(ステップS1102)。この検定処理の結果、正当な条件を満たす場合(ステップS1102:Yes)、1度目で検出した角度(angleA)は「正当である」と判断する(ステップS1103)。この場合、画像傾き補正部1301による補正処理を実行する(ステップS1501)。一方、検定処理の結果、正当な条件を満たさない場合(ステップS1102:No)、1度目で検出した角度(angleA)は「正当でない」と判断する(ステップS1104)。
【0077】
「正当である」場合の補正処理を具体的に説明すると、まず、ステップS702において処理済みである1度目の補正した画像データを破棄する。この破棄のタイミングは図4を用いて説明した時期に相当する。そして、ステップS1101で作成した複製画像を読み出す。また、1度目(ステップS701)と、2度目(ステップS703)で検出された角度の和(angleA+B)を算出する。そして、読み出した複製の画像データに対し−(angleA+B)の補正処理を一括して実行し、その結果を出力する(ステップS1502)。
【0078】
近年、補正処理では高速化のために処理ステップを少しでも削減するようになっているが、この場合、請求項9で説明したように同一の画像データに対して補正を何度もおこなうと画像のがたつきが生じ、最終的に同じ角度に補正した画像が得られるとしても、画像の品質は落ちることを防止することができるようになる。
【0079】
すなわち、この実施形態では、角度を検定するために作成した補正画像を破棄して以後使用せず、入力された画像データ(複製)に対して、1度目と2度目の検出角度の和による補正処理を実行することにより、補正処理の回数を最小限の1回に留めて、画像品質の低下を防止することができるようになる。
【0080】
上記処理内容の変形例としては、ステップS1102での検定処理(ステップS1103,S1104を含む)を実行せず、ステップS703の実行後にステップS1501を実行する構成とすることもできる。この際、1度目と2度目の検出結果の和を算出し、その和の角度だけ補正をおこなって出力する。これにより、検定処理のステップを不実行とする分だけ、処理ステップ記述の簡素化と処理時間の高速化が図れるようになる。
【0081】
(実施の形態11)
上述した実施の形態1〜10で説明した各処理内容では、いずれも入力される画像データが多値画像である場合と、二値画像である場合とでいずれも同一の処理内容で処理することができる。しかし、入力される画像データが多値画像である場合には、何らかの方法で二値化をおこない、その二値化された画像データを用いて画像の角度を検出することにより、メモリ容量を取らず処理も高速化できるようになる。
【0082】
したがって、実施の形態11では、実施の形態1〜10で説明した各処理において、入力される画像データが多値画像である場合には、これを検出するステップを設け、多値画像を二値化した後に各処理を実行する構成とする。この二値化の手法としては、固定しきい値の一様二値化や、判別分析方法を用いた手法など特に限定されない。
【0083】
以下、前述した実施の形態について二値化の処理を実行する構成を追加した内容を説明する。図16は、実施の形態11の構成を示すものであり、実施の形態1(図2)の構成に二値化の処理部を追加したブロック図である。図示のように各機能は、画像入力部201と、画像傾き検出部202と、画像傾き検定部203と、画像傾き補正部204と、多値/二値判定部1601と、多値の画像データを二値化する二値化処理部1602によって構成されている。
【0084】
また、図17は、実施の形態11における他の構成例を示すものであり、実施の形態2(図5)の構成に二値化の処理部を追加したブロック図である。図示のように、全体構成は図16と同一であり、画像傾き検定部203は、画像傾き補正部204での傾き角度の補正に基づき、補正後の画像に対して傾きの検定をおこない、角度の正当性を確かめる構成の点が相違している。このような構成時においても、多値/二値判定部1601と、多値の画像データを二値化する二値化処理部1602を追加するだけでよい。
【0085】
また、前述した実施の形態で説明した処理内容に二値化の処理内容を追加した場合の処理内容について説明する。図18は、この実施の形態11による処理内容を示すフローチャートである。同図に示す処理は、実施の形態4(図8)に記載した処理内容に対応し二値化の処理ステップを追加したものである。
【0086】
まず、入力された画像データが多値であるか二値であるかを検出する(ステップS1801)。多値であれば(ステップS1801:No)、この多値の画像データを二値化する(ステップS1802)。二値であれば(ステップS1801:Yes)、この二値の画像データを用いる。
【0087】
以降、図8で説明した内容と同様の各処理を実行する。なお、あらかじめの設定により、ステップS702における補正時には、二値化された後の画像データに対する補正に限らず、多値の画像データに対する補正を実行できるよう切り替え可能な構成にできる。この際、ステップS703では、ステップS702で補正した画像データ(二値あるいは多値のいずれか)に対する角度の検出をおこなうようにすればよい。
【0088】
(実施の形態12)
実施の形態12は、先に説明した実施の形態7(図11)の処理内容に、入力された画像データを二値化する処理を追加した構成である。図19は、実施の形態12の処理内容を示すフローチャートである。
【0089】
まず、入力された画像データが多値であるか二値であるかを検出する(ステップS1801)。二値であれば(ステップS1801:Yes)、この二値の画像データを用い、図11記載とほぼ同様の各処理(ステップS701〜S1105)を実行する。一方、多値であれば(ステップS1801:No)、この多値の画像データを二値化し(ステップS1802)、以下の処理(ステップS1901以降)を実行する。
【0090】
ステップS1901以降の処理は、基本的にステップS701以降の処理と同様であるが、画像の傾き検出(ステップS1901)後に、入力画像の複製は作成しない点が相違する。
【0091】
上記処理において、入力された画像データが二値の場合、補正をおこなう前にあらかじめ複製を作っておき(ステップS1101)、検定結果が「正当でない」と判定された場合には(ステップS1104)、入力が二値の場合はステップS1101で複製された画像データを出力し、また、多値の場合は入力された多値の画像データそのものを最終結果として出力する。これにより、入力された画像データが多値あるいは二値いずれの場合でも、角度検出に失敗した場合に入力された画像データそのものを出力できるようになる。
【0092】
(実施の形態13)
実施の形態13は、先に説明した実施の形態8(図12)の処理内容に、入力された画像データを二値化する処理を追加した構成である。図20は、実施の形態13の処理内容を示すフローチャートである。
【0093】
まず、入力された画像データが多値であるか二値であるかを検出する(ステップS1801)。二値であれば(ステップS1801:Yes)、この二値の画像データを用い、図12記載とほぼ同様の各処理(ステップS701以降)を実行する。一方、多値であれば(ステップS1801:No)、この多値の画像データを二値化し(ステップS1802)、以下の処理(ステップS1901以降)を実行する。
【0094】
ステップS1901以降の処理は、基本的にステップS701以降の処理と同様であるが、画像の傾き検出(ステップS1901)後に、入力画像の複製は作成しない点が相違する。
【0095】
上記処理において、入力された画像データが二値の場合、補正をおこなう前にあらかじめ複製を作っておき(ステップS1101)、検定結果が「正当である」と判定された場合には(ステップS1103)、入力が二値の場合はステップS702で角度補正された画像データを出力し、また、多値の場合は入力された多値の画像データを補正(ステップS1902で得られた−angleAで補正)したものを最終結果として出力する(ステップS2001)。これにより、入力された画像データが多値あるいは二値いずれの場合でも、角度検出に成功した場合に入力された画像データそのものに対して補正した画像データを出力できるようになる。
【0096】
なお、本実施の形態で説明した画像認識方法は、あらかじめ用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。このプログラムは、ハードディスク、フロッピー(R)ディスク、CD−ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。またこのプログラムは、上記記録媒体を介して、インターネット等のネットワークを介して配布することができる。
【0097】
【発明の効果】
以上説明したように、この発明によれば、画像の傾き角度が正しい傾き角度と大きく異なる場合には、補正をおこなわないため信頼性を向上させることができる。たとえば、傾いていない画像に対して傾きを誤検出し大きく傾けた補正をおこなうという失敗を未然に防止できる。特に、検定にかかる処理を実行せず、1度目と2度目の検出結果の和に基づき角度補正を実行するため、処理を簡素化でき、処理時間の高速化と処理プログラム記述の簡素化を図ることができる。
【0098】
また、1度目の検出角度と2度目の検出角度という情報を用いて検定する構成であるため、2度目の検出結果では水平(0度)に近い値が得られるはずであり、逆に、1度目と2度目の検出結果を足し合わせたものが0度に近いという場合は、1度目で間違った角度補正をおこない、それを元に戻した結果であると簡単に両者を判別できるようになる。また、検定結果で傾きの検出結果が正当でない、と判断された場合に、複製された入力の画像データを結果出力するため、補正後の画像データを再度補正する手間を省き処理の効率化と画像品質の維持を図ることができる。また、画像の傾きの補正をおこない検定結果で正当である、と判定された場合に、1度目の補正画像は破棄することができ、複製された画像データに対する角度補正を、1度目と2度目の角度の和に基づき、ただ一度の補正でおこなえるようになる。これにより、補正にかかる回数を削減でき、画像のがたつきを防止して画像品質を維持できるようになる。また、しきい値を用いて検定する構成により、検定精度を向上できるようになる。
【図面の簡単な説明】
【図1】 この発明の本実施の形態にかかる画像認識装置の構成例を示すブロック図である。
【図2】 実施の形態1による画像認識処理プログラムにより構成される各機能部を示すブロック図である。
【図3】 本発明の画像認識処理を含む文字認識(OCR)方法の処理内容全体を示すフローチャートである。
【図4】 図3に記載の全体処理における画像の傾き補正に関する部分の各処理をより詳細に説明したフローチャートである。
【図5】 実施の形態2による画像認識処理プログラムにより構成される各機能部を示すブロック図である。
【図6】 実施の形態2による処理内容を示すフローチャートである。
【図7】 実施の形態3による処理内容を示すフローチャートである。
【図8】 実施の形態4による処理内容を示すフローチャートである。
【図9】 実施の形態5による処理内容を示すフローチャートである。
【図10】 実施の形態6による処理内容を示すフローチャートである。
【図11】 実施の形態7による処理内容を示すフローチャートである。
【図12】 実施の形態8による処理内容を示すフローチャートである。
【図13】 実施の形態9における画像認識処理プログラムにより構成される各機能部を示すブロック図である。
【図14】 実施の形態9による処理内容を示すフローチャートである。
【図15】 実施の形態10による処理内容を示すフローチャートである。
【図16】 実施の形態11の構成を示すブロック図である。
【図17】 実施の形態11の他の構成例を示すブロック図である。
【図18】 実施の形態11による処理内容を示すフローチャートである。
【図19】 実施の形態12による処理内容を示すフローチャートである。
【図20】 実施の形態13による処理内容を示すフローチャートである。
【符号の説明】
100 画像認識装置
101 スキャナ
102 CPU
103 プログラム格納ROM/RAM
104 格納媒体
105 ワークエリアRAM
106 CD−ROM/FDドライブ
107 メモリ
108 ディスプレイ
109 印字装置
201 画像入力部
202 画像傾き検出部
203 画像傾き検定部
204,1301 画像傾き補正部
1601 多値/二値判定部
1602 二値化処理部
[0001]
BACKGROUND OF THE INVENTION
The present invention performs image processing on a document image in preprocessing of character recognition processing, and more specifically, an image processing apparatus, an image processing method, and a program for causing a computer to execute the method for detecting and correcting the tilt of the document About.
[0002]
[Prior art]
As a conventional image recognition apparatus, there is an apparatus that extracts a circumscribed rectangle of an input image image and detects the inclination of the input image image using the circumscribed rectangle (for example, disclosed in JP-A-3-213053) "Original tilt detection device"). Further, the image recognition apparatus disclosed in Japanese Patent Laid-Open No. 9-171538 has a configuration in which a predetermined angle of inclination is detected in advance in order to enhance detection of a minute angle of inclination.
[0003]
[Problems to be solved by the invention]
However, since the apparatus disclosed in Japanese Patent Laid-Open No. 3-213053 detects an inclination with a predetermined reference point as a reference in a state where a document is input, the detection accuracy is sufficient particularly when the inclination is a minute angle. There is a problem that cannot be obtained. This point is also pointed out in the above-mentioned Japanese Patent Laid-Open No. 9-171538.
[0004]
This detection accuracy is not limited to the minute difference between the actual value and the detected value. Depending on the detection method, it may be misidentified in the process of determining “not tilted”. The technique for determining that an image is not tilted with respect to an image that is not tilted has a great influence when it is wrong, and therefore requires higher detection accuracy than normal tilt detection.
[0005]
Using the apparatus described in Japanese Patent Application Laid-Open No. 9-171538, excellent results can be obtained for detection of minute angles, but the inclination angle of the image coincides with the predetermined angle that is initially inclined. In this case, the angle to be detected becomes minute, and the problem of detection accuracy occurs as described above.
[0006]
In the method disclosed in Japanese Patent Laid-Open No. 9-171538, it is determined that the first detection angle is “largely inclined” with respect to an image that is not inclined in the first detection in which the predetermined angle is rotated by a predetermined angle or less. In the case of false positives cannot be corrected. Further, each of the above-described conventional techniques is a method of detecting an inclination with respect to a black and white binary image, and cannot perform processing on a multi-value image image such as a color.
[0007]
In order to eliminate the above-described problems caused by the conventional technique, the present invention can obtain a more accurate detection result by examining the reliability of the tilt angle of the input image data and the tilt angle after correction. An object is to provide an image recognition apparatus, an image recognition method, and a program for causing a computer to execute the method.
[0008]
[Means for Solving the Problems]
In order to solve the above-described problems and achieve the object, an image processing apparatus according to the present invention detects a copy creation unit that creates a copy image that is a copy of an input image, and a first tilt that is the tilt of the input image. A tilt detecting unit that corrects the input image based on the detected first tilt, and a tilt that detects a second tilt that is the tilt of the input image corrected by the correcting unit. Detection means; and judgment means for judging the correctness of the first inclination based on the first inclination and the second inclination, wherein the first inclination is valid in the determination means. If it is determined, the duplicate image is corrected based on the sum of the first inclination and the second inclination, the corrected duplicate image is output, and the determination means determines the first inclination. If it is determined not to be legitimate, And outputting the manufacturing image.
[0011]
According to the present invention, since it is configured to test using information of the first detection angle and the second detection angle, the second detection result should be able to obtain a value close to horizontal (0 degree). Conversely, if the sum of the first and second detection results is close to 0 degrees, the wrong angle correction is performed at the first time, and it is easily determined that the result is the original result. become able to. In addition, when it is determined that the detection result of the inclination is not valid in the verification result, the duplicated input image data is output as a result, so that the trouble of correcting the corrected image data again can be saved and the processing efficiency can be improved. Image quality can be maintained. Further, when it is determined that the image inclination is corrected and the test result is valid, the first corrected image can be discarded, and the angle correction for the copied image data is performed for the first time and the second time. Based on the sum of the angles, it can be done with only one correction. As a result, the number of corrections can be reduced, and the image quality can be maintained by preventing image shakiness.
[0012]
In the image processing apparatus according to the present invention, the determination unit determines that the first inclination is valid if the absolute value of the second inclination is equal to or less than a predetermined threshold value. It is characterized by.
[0013]
According to the present invention, since the test is performed using the threshold value, the test accuracy can be improved.
[0014]
The image processing method according to the present invention creates a duplicate image that is a duplicate of an input image, detects a first tilt that is a tilt of the input image, and based on the detected first tilt, The input image is corrected, a second inclination that is the corrected inclination of the input image is detected, and the legitimacy of the first inclination is determined based on the first inclination and the second inclination. When it is determined that the first inclination is valid, the duplicate image is corrected based on the sum of the first inclination and the second inclination, and the corrected duplicate image is output. When it is determined that the first inclination is not valid, the duplicate image is output.
[0016]
The image processing method according to the present invention is characterized in that if the absolute value of the second inclination is not more than a predetermined threshold value, the first inclination is determined to be valid.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
Exemplary embodiments of an image processing apparatus, an image processing method, and a program for causing a computer to execute the method according to the present invention will be described below in detail with reference to the accompanying drawings.
[0018]
FIG. 1 is a block diagram illustrating a configuration example of an image recognition apparatus according to the present invention. The image recognition apparatus 100 shown in the figure is constructed so that the image recognition processing of the present invention can be executed by digital processing such as a microprocessor. In the figure, a scanner 101 optically reads a document image original and converts it into image data which is an electric signal. The CPU 102 executes image recognition processing according to the present invention based on an image recognition processing program.
[0019]
The image recognition processing program is stored in a storage medium 104 such as a program storage ROM / RAM 103 or a CD-ROM / FD. The CPU 102 reads out this image recognition processing program and executes image recognition processing (division processing and image processing) described later on the image data input using the work area RAM 105.
[0020]
Note that the image recognition processing program stored in the storage medium 104 such as a CD-ROM / FD is read by the CD-ROM / FD drive 106. The image data processed by the image recognition program is stored in the memory 107 in accordance with an instruction from the CPU 102, displayed on the display 108 as necessary, and printed out from the printing device 109.
[0021]
(Embodiment 1)
FIG. 2 is a block diagram illustrating each functional unit configured by the image recognition processing program according to the first embodiment. As illustrated, each function includes an image input unit 201, an image tilt detection unit 202, an image tilt test unit 203, and an image tilt correction unit 204.
[0022]
Image data is input to the image input unit 201. This image data may be binary or multi-valued. The detection of the inclination of the image data in the image inclination detection unit 202 differs depending on whether the image data is binary or multivalued. When the image data is binary, the technique disclosed in Japanese Patent Laid-Open No. 3-213053 and the apparatus and method disclosed in Japanese Patent Laid-Open No. 6-20092 by the present applicant can be used. For example, if the image data is multi-valued, the circumscribed rectangle of the edge component of the image is directly acquired, and the inclination is detected by passing the circumscribed rectangle to the method disclosed in JP-A-7-141465.
[0023]
The image inclination verification unit 203 performs angle detection again on the same image data by another detection method different from that of the image inclination detection unit 202. Then, the image inclination verification unit 203 obtains a result when the inclination detection angle (second detection result) detected again is close to the inclination detection angle (first detection result) obtained by the image inclination detection unit 202. Judge as correct (reliable). For example, there is a method in which an angle from a straight line portion is detected by using the technique described in Japanese Patent Application Laid-Open No. 6-150060 by the present applicant.
[0024]
The image tilt correction unit 204 outputs the original image (image data input to the image input unit 201) by an angle obtained by multiplying the angle determined as “reliable” by the image tilt test unit 203 by −1 (degrees). Rotate.
[0025]
With the above configuration, when the detection angle at the time of the first detection is significantly different from the correct inclination angle, the reliability is improved because “no reliability” is set and the correction of the inclination is not executed. For example, it is possible to prevent a failure in which an image that is not tilted is erroneously detected and tilted further.
[0026]
FIG. 3 is a flowchart showing the entire processing contents of the character recognition (OCR) method. The inclination detection of the image data is executed as a pre-process at the time of such character recognition processing (corresponding to skew correction in the figure). An outline of the processing in FIG. As shown in the figure, the input image data has a different process in the case of binary and multi-value.
[0027]
When binary image data is input, after the image is optimized (step S301), the direction of the image (document) of the image data is determined and corrected (step S302). Thereafter, the skew is corrected (step S303), and the process proceeds to step S310.
[0028]
When multi-valued image data is input, after the image is optimized (step S304), it is binarized for image correction (step S305), and the direction of the image is determined and corrected (step S306). Thereafter, skew (inclination) is corrected (step S307). Next, a photograph area in the document is extracted (step S308), and the image data is binarized for recognition (step S309).
[0029]
In step S310, noise and shading are removed based on the processed image data such as skew correction for the binary and multi-values. Thereafter, area identification processing such as the extracted photograph area, character area, and other areas is performed (step S311). Character recognition (OCR) processing is performed on the character area after identification (step S312), and table processing is performed on the table area (step S313). Only the character area in the table is recognized in step S312. Is executed.
[0030]
Thereafter, based on the character data (character code) obtained by character recognition, the corresponding font and character color are respectively set (steps S314 and 315), and intermediate result data (referred to as DRF) for character recognition is created ( Step S316). At this time, a table for the extracted table area is created. Thereafter, the title is extracted (step S317), final intermediate result data is created (step S318), stored in the work area RAM 105, and the character recognition result is output to the display 108 or the like.
[0031]
The image optimization process (steps S301 and S304) will be described. This processing is processing for adjusting the smaller size to the larger size when there is an extreme difference in the vertical and horizontal resolutions (sizes) of the input image data. At this time, the vertical and horizontal resolutions are adjusted to the same resolution by scaling the smaller size to an integral multiple. However, if the maximum size of the image is exceeded by scaling, the processing is performed without scaling. Specifically, the scaling factor is calculated by the following formula.
[0032]
if (biXPelsPerMeter <biYPelsPerMeter) {rate = (int) ceil ((double) biYPelsPerMeter / biXPelsPerMeter−0.5);}
[0033]
Here, when the value of the integer value rate × width exceeds the maximum processing range, the rate is decremented so as not to exceed the maximum processing range. On the other hand, a configuration may be adopted in which re-input is prompted as an input error for image data in which the difference between the vertical and horizontal resolutions is more than doubled and the correction exceeds the maximum processing image size. When the input image data is a multi-value image having a color map such as index color or gray, conversion processing to 24-bit full color is performed. RGK library is used for these processes.
[0034]
FIG. 4 is a flowchart illustrating in more detail each process related to a portion (steps S301 to S310) related to image inclination correction in the overall process illustrated in FIG. In particular, the timing at which image data is rewritten when color (multi-value) image data is input is shown in the corresponding step portion. In FIG. 4, the same processing steps as those in FIG. 3 are given the same step numbers.
[0035]
The CPU 102 of the image recognition apparatus 100 determines the type of image data input from the scanner 101 or the like (step S401). If it is binary (step S401: binary image), the processing of steps S301 to S303 is executed, and the first (first detection result) document direction is unknown for the image data after skew correction. It is discriminate | determined (step S402). If the document direction is unknown (step S402: Yes), step S302 is executed again. If the document orientation can be determined (step S402: No), the process proceeds to step S310.
[0036]
On the other hand, when the type of the image data is color (step S401: color image), the processing of steps S304 to S307 is executed, and the first (first detection result) document is applied to the image data after skew correction. It is determined whether or not the direction is unknown (step S403). If the document direction is unknown (step S403: Yes), step S306 is re-executed. If the document orientation can be determined (step S403: No), the image is rotated (step S404), and the processing after step S308 is executed.
[0037]
In the above processing, the timing of image rewriting when inputting color image data will be described. The color image data is rewritten at the time of image optimization (step S304) and image rotation (step S404).
[0038]
In addition, timings of creation, rewriting, and discarding of binary image data created based on color image data will be described. Binary image data is created by binarization after image optimization (step S305), and rewritten during document orientation determination, correction (step S306), and skew correction (step S307). The binary image data is discarded by image rotation (step S404).
[0039]
Also, binary image data is created at the time of photo extraction (step S308) and binarization for recognition (step S309), and the binary image data is rewritten by noise / shading removal (step S310).
[0040]
The contents of the image correction binarization process (step S305) will be described. In this process, a binary image used for document orientation determination and skew detection is generated. The direction and inclination angle recognized in the binary image data are corrected by rotating the original color image data (step S404), so the binary image is not necessary at that time and is discarded. ing.
[0041]
(Embodiment 2)
FIG. 5 is a block diagram showing each functional unit configured by the image recognition processing program according to the second embodiment. As described in the first embodiment, each function includes an image input unit 201, an image tilt detection unit 202, an image tilt test unit 203, and an image tilt correction unit 204. The difference is that the image inclination is corrected by the image inclination verification unit 203 based on the correction of the inclination angle by the image inclination correction unit 204 and the correctness of the angle is confirmed.
[0042]
FIG. 6 is a flowchart showing the processing contents according to the second embodiment. First, the tilt angle of the input image data is detected (step S601). Here, an inclination angle (angle A) is detected. Next, it correct | amends by the negative | minus correction | amendment angle (-angleA) which cancels the detected inclination angle (step S602). Next, the corrected angle is verified (step S603).
[0043]
Unlike the first embodiment, the angle verification executed in step S603 has a feature that even if the same method as the first angle detection method is used, there is little adverse effect. For example, when the angle of the corrected image is detected and the angle is around 0 degrees, the correction is considered successful. In this case, a result of “high validity” is output in the validity evaluation (step S604). Conversely, if the detected angle after correction is large, it is determined that the first detected angle is suspicious “not valid”. It should be noted that a tilt detection method different from the first detection time may be used at the time of angle verification, at the second detection time.
[0044]
(Embodiment 3)
FIG. 7 is a flowchart showing the processing contents according to the third embodiment. In the third embodiment, the test is performed using information of the first detection angle and the second detection angle. First, the tilt angle of the input image data is detected (step S701). Here, an inclination angle (angle A) is detected. Next, it correct | amends with the negative | minus correction | amendment angle (-angleA) which cancels the detected inclination angle (step S702).
[0045]
Next, the tilt angle of the corrected image data is detected (step S703). The result detected here is a tilt angle (angle B). Next, the first detection result (angle A) and the second detection result (angle B) are tested (step S704).
[0046]
If the angle can be detected normally, the second detection result (angle B) is essentially a value close to the horizontal (0 degree). In this case, in the validity evaluation (step S705), the detection result is “high validity” and the process ends. Conversely, if the sum of the first and second detection results is close to 0 degrees, it can be said that the wrong angle correction was performed at the first time, and the result was restored. Therefore, it is determined that the detection result is “not valid”. In this case, the original image data temporarily stored can be output as a correction result after angle detection.
[0047]
(Embodiment 4)
In the third embodiment, in the determination in the validity evaluation (step S705) described in the second embodiment, the second detection result is provided with a threshold value Th1 and verified. FIG. 8 is a flowchart showing the processing contents of the fourth embodiment. From step S701 to S703, the same processing as in FIG. 7 is executed.
[0048]
Then, at the time of validity evaluation (step S801), the absolute value of the second detection angle obtained in step S704 is compared with a predetermined threshold value Th1. If the second detection angle is equal to or smaller than the threshold value Th1 (step S801: Yes), it is determined that the first detection result (angle A) is “valid” (step S802). On the other hand, if the second detection angle exceeds the threshold value Th1 (step S801: No), it is determined that the first detection result (angle A) is “invalid” (step S803).
[0049]
As described above, the threshold Th1 is set to a value that is considered to be sufficiently small (for example, a value in the range of 0 to 1 degree), and the validity is evaluated by using the threshold Th1 or less. The reliability of evaluation can be improved.
[0050]
(Embodiment 5)
In the fifth embodiment, when the first tilt angle is detected (for example, steps S601 and S701), the threshold Th2 is used to determine the validity of the detection. FIG. 9 is a flowchart showing the processing contents of the fifth embodiment. In steps S701 to S703 and steps S801 to S803, processing similar to that described in FIGS. 7 and 8 is executed.
[0051]
After the first tilt angle detection (step S701), the absolute value of the first detected angle is compared with the threshold value Th2 (step S901). A value that is considered to be sufficiently small (for example, a value in the range of 0 to 1 degree) is set as the threshold Th2. If the absolute value of the first detected angle is equal to or smaller than the threshold Th2 (step S901: Yes), the detected value of the first tilt angle is trusted and evaluated as “valid”. (Step S902). And it can complete | finish, without performing the process of the test | inspection of inclination (for example, step S603, S703).
[0052]
On the other hand, if the absolute value of the first detected angle exceeds the threshold value Th2 (step S901: No), then the correction is made with a negative correction angle (-angle A) that cancels the detected tilt angle. (Step S702), the inclination angle (angle B) of the corrected image data is detected (Step S703). Thereafter, the validity is evaluated, and the absolute value of the second detection angle obtained in step S704 is compared with a predetermined threshold value Th1 (step S801).
[0053]
If the second detection angle is equal to or smaller than the threshold value Th1 (step S801: Yes), it is determined that the first detection result (angle A) is “valid” (step S802). On the other hand, if the second detection angle exceeds the threshold value Th1 (step S801: No), it is determined that the first detection result (angle A) is “invalid” (step S803).
[0054]
According to this configuration, after the first detection, the tilt angle is evaluated in step S901, and in the “valid” evaluation, the processing after step S702 can be omitted, and the processing speed can be increased. Note that, by setting the value of the threshold value Th2 to a value smaller than the threshold value Th1, it is possible to maintain the determination when the inclination test (for example, steps S603 and S704) is not executed with high accuracy. That is, if high-precision detection is performed using the threshold value Th2 at the time of detecting the first inclination angle, the detection of the inclination of the image can be handled as high-precision without performing verification.
[0055]
(Embodiment 6)
In the sixth embodiment, the first detection angle and the second detection angle are used at the time of verification, and the absolute value of the sum of the two detection angles is evaluated using the threshold value Th3. FIG. 10 is a flowchart showing the processing contents of the sixth embodiment. The same reference numerals are assigned to the processing contents described in the above-described embodiments.
[0056]
First, the first tilt angle (angle A) with respect to the image of the image data is detected (step S701), and then the correction is made with a negative correction angle (-angle A) that cancels the detected tilt angle (step S702). The tilt angle (angle B) of the image data thus detected is detected (step S703).
[0057]
Thereafter, a test process is performed (step S1001). Here, the sum of the detected angle of the first tilt angle and the second detected angle (angle A + B) is calculated, and the absolute value of the sum is compared with the threshold value Th3. As this threshold value Th3, for example, a value in the range of 0 to 1 degree is used. If the absolute value of this sum is smaller than the threshold value Th3 (step S1001: Yes), it is determined that the angle (angle A) detected at the first time (step S701) is “not valid” (step S1002). On the other hand, if the absolute value of the sum is equal to or greater than the threshold Th3 (step S1001: No), it is determined that the angle detected at the first time is “valid” (step S1003).
[0058]
For example, the determination in step S1001 will be described with specific numerical values. If the first tilt detection result (angle A) of the image is 3.5 degrees, the tilt is −3.5 by correction, and the tilt is originally 0 degrees. Then, it is assumed that a tilt of −3.3 degrees is detected in the tilt detection result (angle B) for the corrected image again. In this case, the sum of the absolute values of the detection angles is 3.5 + (− 3.3) = 0.2, which is a sufficiently small value. If the threshold value Th3 is 1 degree, the determination in step S1001 is Yes and it is determined that the threshold is not valid.
[0059]
This can be considered as a state in which the second angle detection for the image is obtained as a relatively correct value after erroneously detecting an image that is not originally tilted and correcting the tilt. In this way, if an error is detected during the first angle detection, the sum of the angles is close to 0 degrees. Therefore, in such a case, it is determined that the first detection angle is “invalid”. With such processing contents, it is possible to determine whether or not there is a false detection for the first tilt angle detection.
[0060]
(Embodiment 7)
Embodiment 7 is a configuration in which a copy of an input image is made in advance before correcting the inclination of the image, and this duplicated image is output as a final result when it is determined that the test result is “invalid”. . FIG. 11 is a flowchart showing the processing contents of the seventh embodiment.
[0061]
First, the first tilt angle (angle A) of the image with respect to the input image data is detected (step S701). Next, a copy of the input image data is created (step S1101). Thereafter, the input image data is corrected with a negative correction angle (-angle A) that cancels the detected tilt angle (step S702), and the tilt angle (angle B) of the corrected image data is detected (step S702). S703).
[0062]
Thereafter, a verification process is performed (step S1102). This verification process may be any process described in each of the above-described embodiments (for example, steps S704, S801, and S1101). As a result of this verification process, when a valid condition is satisfied (step S1102: Yes), it is determined that the angle (angle A) detected at the first time is “valid” (step S1103).
[0063]
On the other hand, if the valid condition is not satisfied as a result of the verification process (step S1102: No), the angle (angle A) detected at the first time is determined to be “invalid” (step S1104), and is first duplicated in step S1101. The processed image data is output as a corrected image (step S1105).
[0064]
As another example of processing, when the input image data is duplicated and the angle of the duplicated image is corrected and the correctness cannot be obtained, the original image data inputted is output as it is. You can also. In any case, the process of rotating the image after the angle correction again and returning it to the original is not executed. As described above, when it is determined as “invalid” as a result of the test, by outputting the duplicated image data, it is possible to eliminate the process of rotating the corrected image once again and returning it to the original state.
[0065]
(Embodiment 8)
The eighth embodiment is configured to output an image obtained by correcting the input image with the first detection angle when the image inclination test result is determined to be “valid”. FIG. 12 is a flowchart showing the processing contents of the eighth embodiment.
[0066]
First, the first tilt angle (angle A) of the image with respect to the input image data is detected (step S701). Then, the input image data is corrected with a negative correction angle (-angle A) that cancels the detected inclination angle (step S702), and the inclination angle (angle B) of the corrected image data is detected (step S703). ).
[0067]
Thereafter, a verification process is performed (step S1102). As a result of this verification process, when the valid condition is satisfied (step S1102: Yes), the angle (angle A) detected at the first time is determined to be “valid” (step S1103), and the first time processed at S702. The corrected image data is output (step S1201). On the other hand, if the valid condition is not satisfied as a result of the verification process (step S1102: No), it is determined that the angle (angle A) detected at the first time is “not valid” (step S1104).
[0068]
As described in the fourth embodiment, if the angle can be normally detected, the second detection result (angle B) is essentially a value close to the horizontal (0 degree), and actually ± 0. Since there is a detection error of about 2 to 0.4 degrees, even if image data reflecting the second detection angle is output, the result is not greatly changed. As described above, according to the eighth embodiment, it is possible to easily select the image output after the verification and simplify the processing.
[0069]
(Embodiment 9)
In the ninth embodiment, when it is determined that the test result is “valid”, an image obtained by correcting the input image with the first detection angle and further correcting with the second detection angle is output. is there. FIG. 13 is a block diagram showing each functional unit configured by the image recognition processing program according to the ninth embodiment.
[0070]
As described in the above embodiment, each function includes an image input unit 201, an image tilt detection unit 202, an image tilt test unit 203, and image tilt correction units 204 and 1301. Based on the correction of the tilt angle in the image tilt correction unit 204, the image tilt test unit 203 performs tilt test on the corrected image to confirm the correctness of the angle. Thereafter, the image inclination correction unit 1301 corrects the second detection angle with respect to the first corrected image when it is determined that the test result is valid.
[0071]
FIG. 14 is a flowchart showing the processing contents of the ninth embodiment. First, the first tilt angle (angle A) of the image with respect to the input image data is detected (step S701). Then, the input image data is corrected with a negative correction angle (-angle A) that cancels the detected inclination angle (step S702), and the inclination angle (angle B) of the corrected image data is detected (step S703). ).
[0072]
Thereafter, a verification process is performed (step S1102). As a result of this verification processing, when a valid condition is satisfied (step S1102: Yes), the angle (angle A) detected at the first time is determined to be “valid” (step S1103), and the image inclination correction unit 1301 performs step The first corrected image data processed in S702 is corrected with the correction angle (-angle B) (step S1401), and the corrected image data is output (step S1402). On the other hand, if the valid condition is not satisfied as a result of the verification process (step S1102: No), it is determined that the angle (angle A) detected at the first time is not valid (step S1104).
[0073]
According to the above processing content, since the correction processing (step S1401) in the image inclination correction unit 1301 is added, processing time and cost are increased by the amount of processing steps compared to the content described in the eighth embodiment. This is effective when it is desired to improve the inclination correction accuracy even a little.
[0074]
(Embodiment 10)
In the tenth embodiment, a copy of the input image is made in advance before correction, and when the test result is determined to be “valid”, the image inclination correction unit 1301 performs the first time on the copy image. And an image obtained by correcting the sum of the second detection angle and the second detection angle.
[0075]
FIG. 15 is a flowchart showing the processing contents according to the tenth embodiment. First, the first tilt angle (angle A) of the image with respect to the input image data is detected (step S701). Next, a copy of the input image data is created (step S1101). Then, the input image data is corrected with a negative correction angle (-angle A) that cancels the detected inclination angle (step S702), and the inclination angle (angle B) of the corrected image data is detected (step S703). ).
[0076]
Thereafter, a verification process is performed (step S1102). As a result of this verification process, when a valid condition is satisfied (step S1102: Yes), it is determined that the angle (angle A) detected at the first time is “valid” (step S1103). In this case, correction processing by the image inclination correction unit 1301 is executed (step S1501). On the other hand, if the valid condition is not satisfied as a result of the verification process (step S1102: No), it is determined that the angle (angle A) detected at the first time is not valid (step S1104).
[0077]
The correction process in the case of “valid” will be described in detail. First, the first corrected image data processed in step S702 is discarded. This discarding timing corresponds to the timing described with reference to FIG. The duplicate image created in step S1101 is read out. Further, the sum (angle A + B) of the angles detected at the first time (step S701) and the second time (step S703) is calculated. Then, the correction process of-(angle A + B) is collectively executed for the read duplicated image data, and the result is output (step S1502).
[0078]
In recent years, in the correction process, processing steps have been reduced as much as possible for speeding up. In this case, if the same image data is corrected many times as described in claim 9, Even if the image is wobbled and an image corrected to the same angle is finally obtained, it is possible to prevent the quality of the image from being degraded.
[0079]
In other words, in this embodiment, the corrected image created to verify the angle is discarded and is not used thereafter, and the input image data (duplicate) is corrected by the sum of the first and second detected angles. By executing the process, the number of correction processes can be kept to a minimum, and deterioration of image quality can be prevented.
[0080]
As a modified example of the above processing content, the configuration may be such that step S1501 is executed after step S703 without executing the verification process (including steps S1103 and S1104) in step S1102. At this time, the sum of the first detection result and the second detection result is calculated, and only the angle of the sum is corrected and output. As a result, the processing step description can be simplified and the processing time can be increased by the amount that the verification processing step is not executed.
[0081]
(Embodiment 11)
In each of the processing contents described in the first to tenth embodiments described above, both the case where the input image data is a multi-valued image and the case where it is a binary image are processed with the same processing contents. Can do. However, when the input image data is a multi-valued image, binarization is performed by some method, and the angle of the image is detected using the binarized image data, so that the memory capacity is reduced. The processing can also be accelerated.
[0082]
Therefore, in the eleventh embodiment, in each process described in the first to tenth embodiments, when the input image data is a multi-value image, a step for detecting this is provided, and the multi-value image is converted into a binary value. Each process is executed after being converted into a configuration. The binarization method is not particularly limited, such as uniform binarization of a fixed threshold or a method using a discriminant analysis method.
[0083]
In the following, description will be made regarding the contents of the embodiment described above with the addition of a configuration for executing binarization processing. FIG. 16 shows the configuration of the eleventh embodiment, and is a block diagram in which a binarization processing unit is added to the configuration of the first embodiment (FIG. 2). As illustrated, each function includes an image input unit 201, an image tilt detection unit 202, an image tilt test unit 203, an image tilt correction unit 204, a multi-value / binary determination unit 1601, and multi-value image data. It is comprised by the binarization process part 1602 which binarizes.
[0084]
FIG. 17 shows another configuration example in the eleventh embodiment, and is a block diagram in which a binarization processing unit is added to the configuration in the second embodiment (FIG. 5). As shown in the figure, the overall configuration is the same as that in FIG. 16, and the image inclination verification unit 203 performs an inclination test on the corrected image based on the correction of the inclination angle in the image inclination correction unit 204, and the angle The point of the configuration to confirm the legitimacy is different. Even in such a configuration, it is only necessary to add a multi-value / binary determination unit 1601 and a binarization processing unit 1602 that binarizes multi-value image data.
[0085]
Also, processing contents when binarization processing contents are added to the processing contents described in the above-described embodiment will be described. FIG. 18 is a flowchart showing the processing contents according to the eleventh embodiment. The processing shown in the figure corresponds to the processing content described in the fourth embodiment (FIG. 8) and is added with binarization processing steps.
[0086]
First, it is detected whether the input image data is multivalued or binary (step S1801). If it is multi-valued (step S1801: No), this multi-valued image data is binarized (step S1802). If it is binary (step S1801: Yes), this binary image data is used.
[0087]
Thereafter, the same processing as that described in FIG. 8 is executed. It should be noted that, by the setting in advance, at the time of correction in step S702, it is possible to make a switchable configuration so as to execute correction for multi-valued image data as well as correction for binarized image data. At this time, in step S703, an angle may be detected with respect to the image data (either binary or multivalued) corrected in step S702.
[0088]
(Embodiment 12)
In the twelfth embodiment, processing for binarizing input image data is added to the processing content of the seventh embodiment (FIG. 11) described above. FIG. 19 is a flowchart showing the processing contents of the twelfth embodiment.
[0089]
First, it is detected whether the input image data is multivalued or binary (step S1801). If it is binary (step S1801: Yes), this binary image data is used to execute each process (steps S701 to S1105) substantially the same as described in FIG. On the other hand, if it is multi-valued (step S1801: No), this multi-valued image data is binarized (step S1802), and the following processing (after step S1901) is executed.
[0090]
The processing after step S1901 is basically the same as the processing after step S701, except that a copy of the input image is not created after image inclination detection (step S1901).
[0091]
In the above process, if the input image data is binary, a copy is made in advance before correction (step S1101), and if the test result is determined to be “invalid” (step S1104), If the input is binary, the image data copied in step S1101 is output. If the input is multivalue, the input multivalued image data itself is output as the final result. As a result, regardless of whether the input image data is multivalued or binary, the input image data itself can be output when the angle detection fails.
[0092]
(Embodiment 13)
In the thirteenth embodiment, processing for binarizing input image data is added to the processing content of the eighth embodiment (FIG. 12) described above. FIG. 20 is a flowchart showing the processing contents of the thirteenth embodiment.
[0093]
First, it is detected whether the input image data is multivalued or binary (step S1801). If it is binary (step S1801: Yes), this binary image data is used to execute each process (step S701 and subsequent steps) substantially the same as described in FIG. On the other hand, if it is multi-valued (step S1801: No), this multi-valued image data is binarized (step S1802), and the following processing (after step S1901) is executed.
[0094]
The processing after step S1901 is basically the same as the processing after step S701, except that a copy of the input image is not created after image inclination detection (step S1901).
[0095]
In the above processing, if the input image data is binary, a copy is made in advance before correction (step S1101), and if the test result is determined to be “valid” (step S1103). If the input is binary, the angle-corrected image data is output in step S702. If the input is multi-value, the input multi-value image data is corrected (corrected with -angleA obtained in step S1902). The result is output as the final result (step S2001). As a result, regardless of whether the input image data is multi-valued or binary, it is possible to output corrected image data for the input image data itself when the angle detection is successful.
[0096]
Note that the image recognition method described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. This program is recorded on a computer-readable recording medium such as a hard disk, floppy (R) disk, CD-ROM, MO, and DVD, and is executed by being read from the recording medium by the computer. The program can be distributed via the recording medium and a network such as the Internet.
[0097]
【The invention's effect】
As described above, according to the present invention, when the tilt angle of the image is greatly different from the correct tilt angle, the correction is not performed, so that the reliability can be improved. For example, it is possible to prevent a failure that a tilt is erroneously detected and correction is performed with a large tilt with respect to an image that is not tilted. In particular, since the processing related to the verification is not performed and the angle correction is performed based on the sum of the first and second detection results, the processing can be simplified, the processing time can be increased, and the processing program description can be simplified. be able to.
[0098]
In addition, since the test is performed using the information of the detection angle of the first time and the detection angle of the second time, a value close to the horizontal (0 degree) should be obtained in the second detection result. If the result of adding the second detection result and the second detection result is close to 0 degree, the wrong angle correction is performed at the first time, and it can be easily discriminated if the result is the original result. . In addition, when it is determined that the detection result of the inclination is not valid in the verification result, the duplicated input image data is output as a result, so that the trouble of correcting the corrected image data again can be saved and the processing efficiency can be improved. Image quality can be maintained. Further, when it is determined that the image inclination is corrected and the test result is valid, the first corrected image can be discarded, and the angle correction for the copied image data is performed for the first time and the second time. Based on the sum of the angles, it can be done with only one correction. As a result, the number of corrections can be reduced, and the image quality can be maintained by preventing image shakiness. Further, the verification accuracy can be improved by the configuration in which the verification is performed using the threshold value.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration example of an image recognition apparatus according to an embodiment of the present invention.
FIG. 2 is a block diagram showing each functional unit configured by an image recognition processing program according to the first embodiment.
FIG. 3 is a flowchart showing the entire processing contents of a character recognition (OCR) method including image recognition processing according to the present invention.
4 is a flowchart illustrating in more detail each process of a portion related to image inclination correction in the overall process illustrated in FIG. 3;
FIG. 5 is a block diagram showing each functional unit configured by an image recognition processing program according to the second embodiment.
FIG. 6 is a flowchart showing processing contents according to the second embodiment.
FIG. 7 is a flowchart showing processing contents according to the third embodiment.
FIG. 8 is a flowchart showing processing contents according to the fourth embodiment.
FIG. 9 is a flowchart showing processing contents according to the fifth embodiment.
FIG. 10 is a flowchart showing processing contents according to the sixth embodiment.
FIG. 11 is a flowchart showing processing contents according to the seventh embodiment.
FIG. 12 is a flowchart showing processing contents according to the eighth embodiment.
FIG. 13 is a block diagram illustrating functional units configured by an image recognition processing program according to the ninth embodiment.
FIG. 14 is a flowchart illustrating processing contents according to the ninth embodiment.
FIG. 15 is a flowchart showing processing contents according to the tenth embodiment;
FIG. 16 is a block diagram showing a configuration of an eleventh embodiment.
FIG. 17 is a block diagram illustrating another configuration example of the eleventh embodiment.
FIG. 18 is a flowchart showing processing details according to the eleventh embodiment.
FIG. 19 is a flowchart showing processing contents according to the twelfth embodiment;
FIG. 20 is a flowchart showing processing contents according to the thirteenth embodiment;
[Explanation of symbols]
100 Image recognition device
101 scanner
102 CPU
103 Program storage ROM / RAM
104 Storage media
105 Work area RAM
106 CD-ROM / FD drive
107 memory
108 display
109 Printing device
201 Image input unit
202 Image tilt detection unit
203 Image tilt tester
204, 1301 Image inclination correction unit
1601 Multi-value / binary decision unit
1602 Binarization processing unit

Claims (5)

入力画像の複製である複製画像を作成する複製作成手段と、
前記入力画像の傾きである第1の傾きを検出する傾き検出手段と、
検出された前記第1の傾きに基づいて前記入力画像を補正する傾き補正手段と、
前記補正手段により補正された前記入力画像の傾きである第2の傾きを検出する傾き検出手段と、
前記第1の傾きと前記第2の傾きとに基づいて該第1の傾きの正当性を判断する判断手段とを備え、
前記判断手段において前記第1の傾きが正当であると判断された場合には、前記第1の傾きと前記第2の傾きの和に基づいて前記複製画像を補正し、補正された該複製画像を出力し、
前記判断手段において前記第1の傾きが正当でないと判断された場合には、前記複製画像を出力することを特徴とする画像処理装置。
A duplicate creation means for creating a duplicate image that is a duplicate of the input image;
Inclination detecting means for detecting a first inclination which is an inclination of the input image;
Inclination correcting means for correcting the input image based on the detected first inclination;
Inclination detecting means for detecting a second inclination which is an inclination of the input image corrected by the correcting means;
Determining means for determining the validity of the first inclination based on the first inclination and the second inclination;
When the determination means determines that the first inclination is valid, the duplicate image is corrected based on the sum of the first inclination and the second inclination, and the corrected duplicate image is corrected. Output
An image processing apparatus that outputs the duplicate image when the determination unit determines that the first inclination is not valid .
前記判断手段は、前記第2の傾きの絶対値が予め定められた閾値以下であれば、前記第1の傾きが正当であると判断することを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the determination unit determines that the first inclination is valid if the absolute value of the second inclination is equal to or less than a predetermined threshold value. . 入力画像の複製である複製画像を作成し、Create a duplicate image that is a duplicate of the input image,
前記入力画像の傾きである第1の傾きを検出し、Detecting a first inclination which is an inclination of the input image;
検出された前記第1の傾きに基づいて前記入力画像を補正し、Correcting the input image based on the detected first inclination;
補正された前記入力画像の傾きである第2の傾きを検出し、Detecting a second inclination which is the inclination of the corrected input image;
前記第1の傾きと前記第2の傾きとに基づいて該第1の傾きの正当性を判断し、Determining the legitimacy of the first slope based on the first slope and the second slope;
前記第1の傾きが正当であると判断された場合には、前記第1の傾きと前記第2の傾きの和に基づいて前記複製画像を補正し、補正された該複製画像を出力し、If it is determined that the first slope is valid, the duplicate image is corrected based on the sum of the first slope and the second slope, and the corrected duplicate image is output.
前記第1の傾きが正当でないと判断された場合には、前記複製画像を出力することを特徴とする画像処理方法。An image processing method comprising: outputting the duplicate image when it is determined that the first inclination is not valid.
前記第2の傾きの絶対値が予め定められた閾値以下であれば、前記第1の傾きが正当であると判断することを特徴とする請求項3に記載の画像処理方法。4. The image processing method according to claim 3, wherein if the absolute value of the second inclination is equal to or less than a predetermined threshold value, it is determined that the first inclination is valid. 前記請求項3または4に記載された方法をコンピュータに実行させることを特徴とするプログラム。A program causing a computer to execute the method according to claim 3 or 4.
JP2002024631A 2002-01-31 2002-01-31 Image processing apparatus, image processing method, and program causing computer to execute the method Expired - Fee Related JP4064677B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002024631A JP4064677B2 (en) 2002-01-31 2002-01-31 Image processing apparatus, image processing method, and program causing computer to execute the method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002024631A JP4064677B2 (en) 2002-01-31 2002-01-31 Image processing apparatus, image processing method, and program causing computer to execute the method

Publications (2)

Publication Number Publication Date
JP2003223643A JP2003223643A (en) 2003-08-08
JP4064677B2 true JP4064677B2 (en) 2008-03-19

Family

ID=27747022

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002024631A Expired - Fee Related JP4064677B2 (en) 2002-01-31 2002-01-31 Image processing apparatus, image processing method, and program causing computer to execute the method

Country Status (1)

Country Link
JP (1) JP4064677B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8807671B2 (en) 2011-05-03 2014-08-19 Julius Blum Gmbh Lockable ejection device with overload mechanism

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007336143A (en) * 2006-06-14 2007-12-27 Ricoh Co Ltd Image processing apparatus
US9865038B2 (en) * 2015-11-25 2018-01-09 Konica Minolta Laboratory U.S.A., Inc. Offsetting rotated tables in images

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8807671B2 (en) 2011-05-03 2014-08-19 Julius Blum Gmbh Lockable ejection device with overload mechanism

Also Published As

Publication number Publication date
JP2003223643A (en) 2003-08-08

Similar Documents

Publication Publication Date Title
JP4928310B2 (en) License plate recognition device, control method thereof, computer program
US5748809A (en) Active area identification on a machine readable form using form landmarks
JP3727971B2 (en) Document processing apparatus and document processing method
US7106904B2 (en) Form identification method
KR101235226B1 (en) Image processor and image processing method and recording medium
JPH11219407A (en) Document image recognizing device and storage medium for document image recognizing program
JPH1139428A (en) Direction correcting method for document video
WO2006035677A1 (en) Image processing method and image processing device
Cardoso et al. A connected path approach for staff detection on a music score
JP4064677B2 (en) Image processing apparatus, image processing method, and program causing computer to execute the method
JP2000163595A (en) Mark detecting method and device
JP3558493B2 (en) Paper alignment device, paper alignment method, and computer-readable recording medium recording paper alignment program
JP5251489B2 (en) Image processing apparatus and image processing program
JP4872895B2 (en) Face centerline detection device
JP3090070B2 (en) Form identification method and device
CN112800824A (en) Processing method, device and equipment for scanning file and storage medium
JPH07230525A (en) Method for recognizing ruled line and method for processing table
JP3187895B2 (en) Character area extraction method
KR100469999B1 (en) Authentication watermarking method and apparatus of binary still image using hash value of image
JP4517667B2 (en) Document image collation device, document image alignment method and program
JP2004241827A (en) Image processing apparatus, image processing method, image processing program, and storage medium
JP3055484B2 (en) Character recognition apparatus and method
JP4580520B2 (en) Character recognition method and character recognition apparatus
JPH05344330A (en) Picture area discriminating device
JPH11250179A (en) Character reocognition device and its method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040712

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070123

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070326

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070925

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071126

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071227

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4064677

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110111

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120111

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130111

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140111

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees