JP4318874B2 - Blurred image correction apparatus, image reading apparatus, image forming apparatus, and program - Google Patents

Blurred image correction apparatus, image reading apparatus, image forming apparatus, and program Download PDF

Info

Publication number
JP4318874B2
JP4318874B2 JP2001262813A JP2001262813A JP4318874B2 JP 4318874 B2 JP4318874 B2 JP 4318874B2 JP 2001262813 A JP2001262813 A JP 2001262813A JP 2001262813 A JP2001262813 A JP 2001262813A JP 4318874 B2 JP4318874 B2 JP 4318874B2
Authority
JP
Japan
Prior art keywords
image
blur correction
filter
blur
character
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
JP2001262813A
Other languages
Japanese (ja)
Other versions
JP2003078765A (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 JP2001262813A priority Critical patent/JP4318874B2/en
Publication of JP2003078765A publication Critical patent/JP2003078765A/en
Application granted granted Critical
Publication of JP4318874B2 publication Critical patent/JP4318874B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Scanning Arrangements (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、ボケ画像補正装置及びプログラムに関する。
【0002】
【従来の技術】
フラッドベットスキャナを用いて読み取る原稿の多くはシート状の原稿であり、コンタクトガラス上に開閉自在の圧板を設け、コンタクトガラス上に原稿を載置した後に圧板を閉じて原稿をスキャンするようにしている。しかし、原稿としてはシート状のものに限られず、ブック原稿(本、冊子など)も原稿として扱われることがあり、そのような場合にもコンタクトガラス上にブック原稿を載置し、原稿をスキャンすることになる。
【0003】
ところが、原稿としてブック原稿を用いた場合には、図27に示すように、ブック原稿100のページ綴じ部101がコンタクトガラス102から浮き上がってしまう。このようにブック原稿100のページ綴じ部101がコンタクトガラス102から浮き上がってしまった場合には、ページ綴じ部101が焦点面から離れてしまうため、浮き上がった部分のスキャン画像には、画像歪み、影、文字ぼけなどの画像劣化が発生する。劣化した画像のページ綴じ部101は読みにくく、OCRにより文字認識処理を行うときの認識率が著しく低下する。特に、厚手製本ではその割合が高く、また、ブック原稿100のページ綴じ部101を焦点面から離れないように加圧作業した場合には、ブック原稿100自体を破損してしまうこともある。
【0004】
このような問題を解決すべく、画像の濃度情報から物体の3次元形状を推定する方法を用いて、画像の歪みを補正する方法が提案されている。このような画像の濃度情報から物体の3次元形状を推定する方法としては、
T. Wada, H. Uchida and T. Matsuyama, “Shape from Shading with Interreflections under a Proximal Light Source: Distortion-Free Copying of an Unfolded Book”, International Journal Computer Vision 24(2), 125-135(1997)
に記載されているShape from Shadingと呼ばれる方法が代表的な例である。
【0005】
また、特開平5-161002号公報には、三角測量方式により書籍の形状を測定し、歪みを補正する方法が提案されている。
【0006】
さらに、特開平11-41455号公報には、読み取りスキャン画像のページ外形の形状を用いて書籍表面の3次元形状を推定する方法が提案されている。
【0007】
【発明が解決しようとする課題】
ところで、ブック原稿のコンタクトガラスからの浮き上がりが高くなるほどボケの程度は増すので、ブック原稿の表面形状変化による文字ボケの補正処理の際に、スキャン画像全体に同一の文字ボケ補正処理を施した場合には、地肌領域のノイズが強調されたり、写真領域のコントラストが不自然になったり、浮き上がりの深い部分と浅い部分とで文字ボケ補正にむらが生じたりするという問題がある。
【0008】
しかしながら、前述したShape from Shadingと呼ばれる方法によれば、歪み補正処理の際に幾何学的歪み補正と輝度補正とを行っているが、文字ボケ補正は行っていない。
【0009】
また、特開平5-161002号公報に記載されている方法によれば、ラプラシアン処理により文字ボケ補正を行っているが、文字ボケ補正(エッジ強調処理)を行うときのノイズの影響を考慮していない。加えて、特開平5-161002号公報に記載されている方法によれば、書籍表面形状変化による文字ボケの状況変化を考慮していないし、写真領域と文字領域とを区別して処理してない。このように写真領域と文字領域とを区別して処理していない場合、写真領域をエッジ強調すると画像のコントラストが高くなりすぎる場合がある。
【0010】
さらに、特開平11-41455号公報に記載されている方法でも、文字ボケ補正(エッジ強調処理)を行うときのノイズの影響を考慮していないし、写真領域と文字領域とを区別して処理してない。
【0011】
本発明の目的は、ブック原稿の表面形状変化による文字ボケの補正処理の際に、地肌領域のノイズが強調されてしまうのを抑制するとともに、写真領域のコントラストが不自然になってしまうのを防止し、最適な文字ボケ補正を行うことができるボケ画像補正装置及びプログラムを提供することである。
【0012】
本発明の目的は、浮き上がりの深い部分と浅い部分とでの文字等のボケ補正にムラが生じることを防止することができるボケ画像補正装置及びプログラムを提供することである。
【0013】
本発明の目的は、ブック原稿のコンタクトガラスからの浮きの高さが0の場合には、ボケ補正処理の実施を回避することで、処理の高速化を図ることができるボケ画像補正装置及びプログラムを提供することである。
【0014】
【課題を解決するための手段】
請求項1記載の発明のボケ画像補正装置は、コンタクトガラス上に載置されたブック原稿を画像読取手段により読み取ったスキャン画像のボケを補正するボケ画像補正装置において、前記スキャン画像から各種領域を判別して抽出する領域判別抽出手段と、前記スキャン画像に基づいて前記ブック原稿の前記コンタクトガラスからの浮きの高さを推定する高さ推定手段と、前記領域判別抽出手段により抽出された前記各種領域に基づきパラメータを設定することでボケ補正フィルタの幅及び強度を調節し、さらに、前記高さ推定手段により推定された前記浮きの高さに基づきパラメータの重み係数を設定することでボケ補正フィルタの強度を調節し、前記スキャン画像の前記各種領域に適したボケ補正処理を施すボケ画像補正手段と、を備え、前記ボケ画像補正手段が、前記各種領域のうち文字矩形領域に対して、前記ボケ補正フィルタの幅を他の領域に比べて相対的に狭くするとともに、前記ボケ補正フィルタの強度を他の領域に比べて相対的に大きくし、その中で、当該文字矩形領域中の文字矩形サイズが小さいほど前記ボケ補正フィルタの幅を狭くする。
【0015】
したがって、スキャン画像の各種領域に関して強度調節及び幅調節可能なフィルタを用いて適応的にボケ補正処理が施される。これにより、ブック原稿の表面形状変化による文字ボケの補正処理の際に、例えば地肌領域のノイズが強調されてしまうのを抑制することが可能になるとともに、写真領域のコントラストが不自然になってしまうのを防止することが可能になるので、最適な文字ボケ補正を行うことが可能になる。
また、ブック原稿の表面形状変化によりボケてしまった文字矩形領域が確実にエッジ強調されるので、スキャン画像の文字が読み易くなり、さらには、文字矩形サイズが小さいほどエッジ強調されるので、さらにスキャン画像の文字が読み易くなる。
【0016】
請求項2記載の発明は、請求項1記載のボケ画像補正装置において、前記ボケ画像補正手段が、前記文字矩形領域に対して、前ボケ補正フィルタの幅を調節するパラメータの値が他の領域に比べて小さく設定されたフィルタ(請求項2に記載の(1)式で示されるフィルタ)を用いて、前記フィルタの強度を調節するパラメータの値が他の領域に比べて大きく設定された所定の計算式(請求項2に記載の(2)式)により、前記ボケ補正処理を施した画像を出力し、さらに、所定の計算式における前記フィルタの強度を調節するパラメータの重み係数を、前記浮きの高さに応じて設定する。
【0017】
したがって、ブック原稿のコンタクトガラスからの浮きの高さが推定され、この浮きの高さに応じて各種領域に対するフィルタの強度が調節される。これにより、ブック原稿のコンタクトガラスからの浮きの高さが高くなるに従ってフィルタの強度を増すことが可能になるので、浮き上がりの深い部分と浅い部分とでの文字等のボケ補正にムラが生じることを防止することが可能になる。
【0032】
請求項3記載の発明のプログラムは、コンタクトガラス上に載置されたブック原稿を画像読取手段により読み取ったスキャン画像のボケ補正をコンピュータに実行させるプログラムであって、前記コンピュータに、前記スキャン画像から各種領域を判別して抽出する領域判別抽出機能と、前記スキャン画像に基づいて前記ブック原稿の前記コンタクトガラスからの浮きの高さを推定する高さ推定機能と、前記領域判別抽出機能により抽出された前記各種領域に基づきパラメータを設定することでボケ補正フィルタの幅及び強度を調節し、さらに、前記高さ推定手段により推定された前記浮きの高さに基づきパラメータの重み係数を設定することでボケ補正フィルタの強度を調節し、前記スキャン画像の前記各種領域に適したボケ補正処理を施すボケ画像補正機能と、を実行させ、前記ボケ画像補正機能が、前記各種領域のうち文字矩形領域に対して、前ボケ補正フィルタの幅を他の領域に比べて相対的に狭くするとともに、前記ボケ補正フィルタの強度を他の領域に比べて相対的に大きくし、その中で、当該文字矩形領域中の文字矩形サイズが小さいほど前記ボケ補正フィルタの幅を狭くする。
【0033】
したがって、スキャン画像の各種領域に関して強度調節及び幅調節可能なフィルタを用いて適応的にボケ補正処理が施される。これにより、ブック原稿の表面形状変化による文字ボケの補正処理の際に、例えば地肌領域のノイズが強調されてしまうのを抑制することが可能になるとともに、写真領域のコントラストが不自然になってしまうのを防止することが可能になるので、最適な文字ボケ補正を行うことが可能になる。
また、ブック原稿の表面形状変化によりボケてしまった文字矩形領域が確実にエッジ強調されるので、スキャン画像の文字が読み易くなり、さらには、文字矩形サイズが小さいほどエッジ強調されるので、さらにスキャン画像の文字が読み易くなる。
【0034】
請求項4記載の発明は、請求項3記載のプログラムにおいて、前記ボケ画像補正機能が、前記文字矩形領域に対して、前ボケ補正フィルタの幅を調節するパラメータの値が他の領域に比べて小さく設定されたフィルタ(請求項4に記載の(1)式で示されるフィルタ)を用いて、前記フィルタの強度を調節するパラメータの値が他の領域に比べて大きく設定された所定の計算式(請求項4に記載の(2)式)により、前記ボケ補正処理を施した画像を出力し、さらに、所定の計算式における前記フィルタの強度を調節するパラメータの重み係数を、前記浮きの高さに応じて設定する。
【0035】
したがって、ブック原稿のコンタクトガラスからの浮きの高さが推定され、この浮きの高さに応じて各種領域に対するフィルタの強度が調節される。これにより、ブック原稿のコンタクトガラスからの浮きの高さが高くなるに従ってフィルタの強度を増すことが可能になるので、浮き上がりの深い部分と浅い部分とでの文字等のボケ補正にムラが生じることを防止することが可能になる。
【0046】
【発明の実施の形態】
本発明の実施の一形態を図1ないし図26に基づいて説明する。本実施の形態のボケ画像補正装置は画像形成装置であるデジタル複写機に備えられており、画像読取装置としてはデジタル複写機のスキャナ部が適用されている。
【0047】
ここで、図1はスキャナ部1の構成を示す縦断正面図である。図1に示すように、スキャナ部1は、原稿を載置するコンタクトガラス2と、原稿の露光用の露光ランプ3および第一反射ミラー4からなる第一走行体5と、第二反射ミラー6および第三反射ミラー7からなる第二走行体8と、原稿の画像を読み取る撮像素子としてのCCD(Charge Coupled Device)9と、このCCD9に結像させるためのレンズユニット10と、原稿を載置する基準になるとともにコンタクトガラス2のズレや外れを防止する原稿スケール11と、この原稿スケール11の下側に設置されたシェーディング補正用の白基準板12と、フレーム14とを備えている。CCD9はセンサボード13上に形成されている。
【0048】
原稿の走査時には、第一走行体5および第二走行体8はステッピングモータ24(図3参照)によって副走査方向に移動する。すなわち、第一走行体5および第二走行体8がコンタクトガラス2の下を走行して、露光ランプ3で原稿を露光走査し、その反射光を第一反射ミラー4、第二反射ミラー6および第三反射ミラー7で反射して、レンズユニット10を通してCCD9に結像させる。ここに、画像読取手段が実現されている。
【0049】
このようなスキャナ部1は、このスキャナ部1で読み取られた原稿の画像に基づく画像データに応じ、例えば電子写真方式で用紙上に画像の形成を行う画像印刷装置であるプリンタ部(図示せず)を備えるデジタル複写機16に搭載されている。図2は、スキャナ部1を搭載したデジタル複写機16の上部部分を示す斜視図である。図2に示すように、スキャナ部1には、コンタクトガラス2に対して開閉自在な圧板17と、この圧板17の開閉を検出する開閉センサ18とが設けられている。なお、デジタル複写機16に備えられるプリンタとしては、電子写真方式のほか、インクジェット方式、昇華型熱転写方式、銀塩写真方式、直接感熱記録方式、溶融型熱転写方式など、種々の印刷方式を適用することができる。その具体的な構成については周知であるため、詳細な説明は省略する。
【0050】
図3は、スキャナ部1の制御系の電気的な接続を示すブロック図である。図3に示すように、この制御系は、スキャナ部1の全体を制御するメイン制御部19に、CCD9で読み取った画像データに各種の画像処理を施す回路である画像処理部20と、第一走行体5および第二走行体8を制御する回路である走行体制御部21と、デジタル複写機16への各種操作を受け付け、また、各種メッセージを表示する操作パネル22と、CCD9で読み取った画像データや所定のデータ等を記憶するメモリ23とが接続されている。なお、操作パネル22には、コピー開始を宣言するためのコピースタートキー等が設けられている。また、走行体制御部21には、露光ランプ3と、第一走行体5および第二走行体8を駆動するステッピングモータ24と、第一走行体5および第二走行体8がホームポジションにあるか否かを検出するスキャナホームポジションセンサ(HPセンサ)25と、開閉センサ18とが接続されている。
【0051】
ここで、図4は画像処理部20の基本的な内部構成を示すブロック図である。図4に示すように、画像処理部20は、原稿をCCD9により読み取ったアナログ画像信号の増幅処理やデジタル変換処理等を行うアナログビデオ処理部26、シェーディング補正処理を行うシェーディング補正処理部27、シェーディング補正処理後のデジタル画像信号に、MTF補正、変倍処理、γ補正等の各種画像データ処理を行いスキャン画像を生成する画像データ処理部28、スキャン画像のボケ画像補正機能を含む歪み補正機能を実現する画像歪み補正部29から構成されている。以上のような画像処理後のデジタル画像信号は、メイン制御部19を介してプリンタ部に送信されて、画像形成に供される。
【0052】
メイン制御部19は、図5に示すように、各部を集中的に制御するCPU(Central Processing Unit)31を備えており、このCPU31には、BIOSなどを記憶した読出し専用メモリであるROM(Read Only Memory)32と、各種データを書換え可能に記憶してCPU31の作業エリアとして機能するRAM(Random Access Memory)33とがバス34で接続されており、マイクロコンピュータを構成している。さらにバス34には、制御プログラムが記憶されたHDD35と、CD(Compact Disc)−ROM37を読み取るCD−ROMドライブ36と、プリンタ部等との通信を司るインタフェース(I/F)38とが接続されている。
【0053】
図5に示すCD−ROM37は、この発明の記憶媒体を実施するものであり、所定の制御プログラムが記憶されている。CPU31は、CD−ROM37に記憶されている制御プログラムをCD−ROMドライブ36で読み取り、HDD35にインストールする。これにより、メイン制御部19は、後述するような各種の処理を行うことが可能な状態となる。
【0054】
なお、記憶媒体としては、CD−ROM37のみならず、DVDなどの各種の光ディスク、各種光磁気ディスク、フロッピーディスクなどの各種磁気ディスク、半導体メモリ等、各種方式のメディアを用いることができる。また、インターネットなどのネットワークからプログラムをダウンロードし、HDD35にインストールするようにしてもよい。この場合に、送信側のサーバでプログラムを記憶している記憶装置も、この発明の記憶媒体である。なお、プログラムは、所定のOS(Operating System)上で動作するものであってもよいし、その場合に後述の各種処理の一部の実行をOSに肩代わりさせるものであってもよいし、ワープロソフトなど所定のアプリケーションソフトやOSなどを構成する一群のプログラムファイルの一部として含まれているものであってもよい。
【0055】
次に、メイン制御部19に設けられたCPU31が制御プログラムに基づいて実行する各種処理の内容について説明する。ここでは、CPU31が実行する処理のうち、本実施の形態のスキャナ部1が備える特長的な機能であるスキャン画像のボケ画像補正機能を実現するボケ画像補正装置である画像歪み補正部29におけるスキャン画像のボケ補正処理についてのみ説明する。
【0056】
図6は、スキャン画像のボケ補正処理の流れを概略的に示すフローチャートである。なお、ここでは、図7に示すように、ブック原稿40がそのページ綴じ部41とスキャナ部1の画像読み取りの主走査方向とが平行になるように位置させてコンタクトガラス2に載置されている場合について説明する。
【0057】
まず、ステップS1において、3次元形状の復元を行い、この3次元形状に基づいてスキャン画像の歪み補正を行う。以下において、図8を参照しつつ形状補正処理について詳細に説明する。
【0058】
図8に示すように、まずステップS11において、画像データ処理部28から出力されたコンタクトガラス2に載置されているブック原稿40のスキャン画像を入力する。ここで、図9は入力した画像の一例を示したものである。そして、図10に示すように、入力されたブック原稿40のスキャン画像には、ページ綴じ部41の近傍において歪みが生じている。
【0059】
続いて、ブック原稿40のスキャン画像(例えば、モノクロ多値画像)の最適2値化処理を実行し(ステップS12)、副走査方向の黒画素(スキャン画像の画素の中でその画素値が予め定めた濃度値よりも濃い画素)数のヒストグラムを求める(ステップS13)。図11は、図9に示した画像の黒画素ヒストグラムである。図11中の横軸は、副走査方向の黒画素(スキャン画像の画素の中でその画素値が予め定めた濃度値よりも濃い画素)の位置を示し、図11中の縦軸は、その位置毎の黒画素数を示すものである。
【0060】
次に、ステップS14において、歪み補正処理を文字情報を利用して行うか罫線情報を利用して行うかの指定に待機する。
【0061】
操作パネル22等を介して歪み補正処理を文字情報を利用して行う旨の宣言がなされた場合には(ステップS14のN)、ステップS15に進み、文字が横書きであるか縦書きであるかを判別する。文字が横書きであるか縦書きであるかの判別は、ステップS13で求めた横方向(副走査方向)の黒画素数のヒストグラムに基づいて行う。例えば、図9に示すような横書きの画像の場合には、ヒストグラムに山谷の繰り返しパターンが現れ、縦書きの場合はこのパターンはない。この特徴を用いることにより、文字が横書きであるか縦書きであるかを判別する。
【0062】
なお、スキャン画像がカラー多値画像の場合における2値化処理は、例えばRGB成分の何れか一つの成分に着目し(例えばG成分)、G成分の所定の濃度閾値よりも大きいものを黒画素とし、G成分の所定の濃度閾値よりも小さいものを白画素とすれば良い。また、RGBを色変換して輝度成分と色差成分とに分け、輝度成分で閾値処理を行うようにしても良い。
【0063】
文字が横書きであると判別された場合には(ステップS15のY)、黒画素が連続に繋がる文字単位の矩形抽出処理を行うとともに(ステップS16)、文字行の抽出処理を行って最適な基準文字行を選択する(ステップS17)。なお、文字認識処理については周知の技術であるので、その説明は省略する。ここで、二値化されたスキャン画像の文字外接矩形抽出処理および文字行抽出処理の結果の一例を図12に示す。文字外接矩形抽出処理および文字行抽出処理後には、数多くの行が得られるが、その中で一定の長さ以上の行を選び、さらにその中でもっとも湾曲量が大きい行を最適な基準文字行として選択する。なお、一定の長さ以上の行とは、例えば、最も長い行の80%より長い行とする。また、ブック原稿40のページ綴じ部41の境界線より左側1行、右側1行をそれぞれ選択する。さらに、湾曲量は、文字行に含まれる各文字外接矩形の中心座標の主走査方向における位置によって測定し、中心座標の最大値と最小値との差が大きいほど湾曲量が大きいとみなす。
【0064】
続いて、ステップS17で抽出した基準文字行の直線部分を抽出する(ステップS18)。基準文字行の直線部分の抽出は、各矩形中心座標値のHough変換により行う。
【0065】
Hough変換の原理を以下に示す。図13に示すように画像上の点P(x,y)を通過する直線は次の式(1)を満たす。
ρ=x・cosθ+y・sinθ ・・・(1)
ここで、(x,y)は点Pの座標であり、ρは原点0と点Pとの距離である。θは直線POとx軸とがなす角度である。矩形中心座標(x,y)を離散化(メッシュ化)された(ρ,θ)パラメータ平面へと射影する。(x,y)平面の1点は、(ρ,θ)平面では1本の曲線に射影される。平面上の各メッシュについて曲線の通過数をカウントすると、通過数の多いメッシュは対応する直線があることを示す。1つの文字行には1本の直線しかないので曲線が最も多く通過するメッシュを見つければ、直線を抽出することができる。この方法は、ノイズに非常に強く、直線と曲線が混在する場合にも直線部分を抽出することができる。図12の直線を抽出した結果を図14に示す。
【0066】
続いて、基準文字行の曲線部分を求める(ステップS19)。ステップS17で抽出した基準文字行を以下に示す多項式(2)で近似し、最小2乗法により多項式の係数を求める。つまり、ステップS19は、行の曲線部分を多項式で近似するものである。
y=a+a+a+・・・+a ・・・(2)
ここで、(x,y)文字矩形中心の座標であり、(a,a,a,・・・,a)は多項式の係数である。抽出した曲線部分の結果を図15に示す。
【0067】
次に、ステップS18で求めた基準文字行の直線部分とステップS19で求めた基準文字行の曲線部分との間の距離を測定し(ステップS20)、3次元形状復元を行う(ステップS21)。図16は、基準文字行の直線部分と基準文字行の曲線部分との距離を示したものである。
【0068】
スキャンの主走査方向とブック原稿40のページ綴じ部41の境界線が平行な場合、レンズユニット10等のスキャナレンズによるブック原稿40を読み取るとき、結像系は次の特性を持つ。主走査方向は中心投影であり、副走査方向は平射投影である。ここで、これらの特性を利用して、3次元形状復元を行う。中心投影する場合、図17と図18に示すようにブック原稿40の表面はコンタクトガラス2の表面から浮いて結像距離が遠くなり、画像の拡大倍率は小さくなるので、外形エッジの直線はだんだん内側に湾曲していく。図18の縮む量ABを測定すれば、図17に浮いた本の表面の高さdを計算できる。従って、直線の内側への歪み量を測定すれば、3次元形状(ブック原稿40のコンタクトガラス2からの浮き上がりの量)を復元できる。
【0069】
ここで、ブック原稿40を水平にコンタクトガラス2上に置くことを仮定する。そうすると、3次元の形状は2次元になる。スキャナレンズの結像関係を図19に示す。OO´はレンズの光軸であり、0はレンズの中心である。Fはレンズの中心0からスキャナ表面(コンタクトガラス2)までの距離で、これを、スキャナの焦点距離と言う。スキャナ表面上の点Bは結像面でDに結像する。浮いた製本(ブック原稿40)の表面上の点CはEに結像する。それぞれの結像面の中心0との距離はy´とyである(第一走行体5および第二走行体8が副走査方向に移動することによって、中心0も移動するが、その軌跡を結像中心線と呼ぶことにする)。三角形の相似関係により次の関係式(3),(4)が得られる。
d/F=AB/AO´ ・・・(3)
AB/AO´=(y´−y)/y ・・・(4)
また、式(3),(4)により、ブック原稿40の浮き上がりの量dが次式(5)により得られる。
d=F×((y´−y)/y) ・・・(5)
この式(5)により2次元の歪み量から3次元形状が求められることがわかる。ここで、歪み量(y´−y)と距離yは画像から求められるが、本実施の形態では、これを文字行あるいは罫線の直線成分と曲線部分との距離から求めるものである。レンズの焦点距離Fはスキャナ部1によって定まる既知量であり、スキャナ部1の設定値かレンズの校正値を用いる。ここに、高さ推定手段の機能が実行される。
【0070】
続いて、3次元形状に基づいてスキャン画像の歪み補正を行うとともに(ステップS22)、画像の輝度補正を行う(ステップS23)。ブック原稿40のページ綴じ部41に平行な方向では、図20に示すように画像下部分の外形が直線となるようにスキャン画像の縦方向を1列ずつシフトする。そして、スキャン画像の上部の点線から内側へ縮む量により縮小倍率を計算し、変倍処理を行う。垂直方向では、ブック原稿40の表面に沿って、スキャン画像を引き伸ばす。また、縦方向の各画素列のもっとも白い画像を基準にして、画像の輝度補正を行う。詳細については、特開平11-41455号公報に開示されているためその説明は省略する。
【0071】
一方、文字が縦書きであると判別された場合には(ステップS15のN)、ステップS24に進み、矩形抽出と縦方向の行の抽出処理を行う。ステップS24では、図21に示すように行の一番上あるいは一番下の矩形を求め、これを基準文字行とし、縦行の外形を求める。
【0072】
続くステップS18〜S23では、この基準文字行を構成する各矩形の中心座標を用いて、画像の歪み補正処理を行う。
【0073】
また、歪み補正処理を罫線情報を利用して行う旨の宣言がなされた場合には(ステップS14のY)、横方向(副走査方向)に描いた罫線を抽出する(ステップS25)。ステップS25では、ステップS13で求めた横方向(副走査方向)の黒画素数のヒストグラムを用いる。図22に示すように、横方向に描いた罫線が存在する場合には、ヒストグラムに細高いピークが現れるので、それを利用して罫線を抽出し、その中から一定の長さ以上の罫線を選ぶ。一定の長さを指定するとき、例えば、もっとも長い罫線の80%より長い罫線とする。そして、選択した罫線の中で画像の上端もしくは下端に最も近い罫線を基準罫線として選択する。また、ブック原稿40のページ綴じ部41の境界線より左側1罫線、右側1罫線をそれぞれ選択する。
【0074】
続くステップS18〜S23は、基本的に文字情報を利用した場合と同様であるため、説明は省略する。
【0075】
ここで、図23は歪みを補正した画像を示す平面図である。以上の処理によれば、図9に示したようなブック原稿40のページ綴じ部41の近傍において生じていたスキャン画像の歪みが、図23に示すように補正されることになる。
【0076】
ところで、このようにブック原稿40のページ綴じ部41がコンタクトガラス2から浮き上がってしまった場合には、スキャナレンズのピントはコンタクトガラス2の面に合わせてあるので、コンタクトガラス2からブック原稿40が浮き上がってしまったページ綴じ部41の近傍の文字部分のスキャン画像はボケてしまう。すなわち、図19に示したDにおいてはシャープに結像するが、Eにおいてはボケた画像になる。そこで、続くステップS2〜ステップS8においては、ボケた画像(特に文字ボケ)を補正するボケ補正処理を行う。
【0077】
次に、ボケ補正処理について説明する。一般に、ボケ補正される前の原画像をf(x,y)とし、原画像f(x,y)の高周波成分を強調したエッジ強調画像をg(x,y)とした場合、原画像f(x,y)とエッジ強調画像g(x,y)との重み付き和を求めるとアンシャープフィルタ画像s(x,y)が得られ、このアンシャープフィルタ画像s(x,y)は、下記の式(6)、
s(x,y)=f(x,y)+k・g(x,y) ・・・(6)
で表される。ここで、kは重み係数である。しかしながら、このようにして文字のエッジを強調した場合には地肌領域のノイズも一緒に強調されてしまう傾向がある。そこで、本実施の形態のボケ補正処理においては、文字ボケの補正の際に地肌領域のノイズも一緒に強調されてしまうのを防止するために、平滑化効果と高周波成分強調の効果を同時に持っているボケ補正フィルタを用いて文字ボケの補正を行うものである。
【0078】
ここで、ボケ補正フィルタについて詳細に説明する。本実施の形態のボケ補正フィルタは、重み係数kとともにLaplacian of Gaussianフィルタ(以下、LoGフィルタという)を導入したものであって、このLoGフィルタは、下記の式(7)、
【0079】
【数1】

Figure 0004318874
で表される。ただし、σはフィルタの広がり幅を決めるパラメータである。
【0080】
そして、アンシャープフィルタ画像s(x,y)は、下記の式(8)、
【0081】
【数2】
Figure 0004318874
で表される。
【0082】
また、エッジ強調画像g(x,y)は、下記の式(9)、
【0083】
【数3】
Figure 0004318874
で表される。
【0084】
ここで、図24はボケ補正される前の原画像f(x,y)を示し、図25はボケ補正フィルタにより図24の原画像f(x,y)の高周波成分を強調したエッジ強調画像g(x,y)を示し、図26はボケ補正フィルタにより図24の原画像f(x,y)をアンシャープフィルタ処理したアンシャープフィルタ画像s(x,y)を示すものである。
【0085】
このようにボケ補正フィルタには、二つのパラメータσとkがある。パラメータσは、その値が大きいければ大きいほどフィルタの幅が広くなるので平滑化の効果が大きくなり、その値が小さいければ小さいほどフィルタの幅が狭くなるのでエッジ強調の効果が大きくなる。ボケ補正フィルタのパラメータσを0に近づけるとラプラシアンフィルタに近似する。つまり、このパラメータσを調整することで、ノイズの抑制とエッジ強調のシャープさを調整することができる。一方、パラメータkは、その値が大きければ大きいほどエッジ強調の効果が大きくなり、その値が小さいほどボケ復元の効果が小さくなる。そこで、本実施の形態においては、形状補正後のスキャン画像を写真領域、文字矩形領域、地肌領域にそれぞれ分け、各領域毎に異なるボケ補正フィルタのパラメータを設定し、各領域に対して最適なボケ補正を行うようにする。
【0086】
すなわち、図6に示すように、形状補正後のスキャン画像の中に写真領域が存在する場合にはスキャン画像から写真領域を抽出し(ステップS2:領域判別抽出手段)、形状補正後のスキャン画像の中に文字矩形領域が存在する場合にはスキャン画像から文字矩形領域を抽出し(ステップS3:領域判別抽出手段)、形状補正後のスキャン画像の中の写真領域でも文字矩形領域でもない領域は地肌領域として抽出する(ステップS4:領域判別抽出手段)。また、ステップS3においては、抽出した文字矩形のサイズ(各文字矩形の一辺の長さの平均や各文字矩形の対角線の長さの平均等)も求める。なお、スキャン画像からの写真領域の抽出処理、スキャン画像からの文字矩形領域の抽出処理については周知の技術であるので、その説明は省略する。
【0087】
続くステップS5で領域毎に最適なパラメータσをそれぞれ設定し、ステップS6で領域毎に最適なパラメータkをそれぞれ設定する。以下において、領域毎のボケ補正フィルタのパラメータ設定について説明する。
【0088】
写真領域においては、ボケ補正フィルタのパラメータkを小さく設定してエッジ強調し過ぎないようにするとともに、ボケ補正フィルタのパラメータσを大きく設定してノイズを抑えるようにする。
【0089】
文字矩形領域においては、エッジ強調効果を高めるため、ボケ補正フィルタのパラメータkを大きく設定する。一方、ボケ補正フィルタのパラメータσは基本的に小さく設定するが、さらに平均矩形サイズも考慮し、矩形が小さいほどパラメータσをより小さく設定する。
【0090】
地肌領域においては、ボケ補正フィルタのパラメータkを小さく設定し、かつ、ボケ補正フィルタのパラメータσを写真領域よりも大きく設定してノイズを抑える。
【0091】
次いで、ステップS7において、式(5)により求められたブック原稿40の浮き上がりの高さdに応じ、ボケ補正フィルタのパラメータkの重み係数pを設定する。ここに、強度調節手段の機能が実行される。これは、下記の式(10)、
【0092】
【数4】
Figure 0004318874
で表される。これにより、ブック原稿40の浮き上がりの高さdが0の場合にはフィルタ処理を施さないのと同等で、ブック原稿40の浮き上がりの高さdが高くなるにつれて、ボケ補正フィルタの強度を増してボケ補正効果を高めることが可能になる。
【0093】
そして、このようにして各パラメータσ,k,pが設定されたボケ補正フィルタによりスキャン画像の文字ボケ等を補正し(ステップS8)、画像を出力する(ステップS9)。以上のステップS5〜S8により、ボケ画像補正手段の機能が実行される。
【0094】
なお、本実施の形態においては、ボケ補正フィルタにLoGフィルタを導入したが、これに限るものではなく、パラメータによりフィルタの幅が調節できるようなボケ補正フィルタであれば良い。
【0095】
ここに、スキャン画像の各種領域に関して強度調節及び幅調節可能なボケ補正フィルタを用いて適応的にボケ補正処理が施される。これにより、ブック原稿40の表面形状変化による文字ボケの補正処理の際に、例えば地肌領域のノイズが強調されてしまうのを抑制することが可能になるとともに、写真領域のコントラストが不自然になってしまうのを防止することが可能になるので、最適な文字ボケ補正を行うことが可能になる。
【0096】
また、ブック原稿40のコンタクトガラス2からの浮きの高さdが推定され、この浮きの高さdに応じて各種領域に対するボケ補正フィルタの強度が調節される。これにより、ブック原稿40のコンタクトガラス2からの浮きの高さdが高くなるに従ってボケ補正フィルタの強度を増すことが可能になるので、浮き上がりの深い部分と浅い部分とでの文字等のボケ補正にムラが生じることを防止することが可能になる。
【0097】
さらに、ブック原稿40のコンタクトガラス2からの浮きの高さdが0の場合には、画像読取手段のブック原稿40に対するピントは合っていることからスキャン画像がボケることはないので、ボケ補正処理の実施を回避することにより、処理の高速化を図ることが可能になる。
【0098】
なお、本実施の形態においては、ボケ画像補正装置を画像形成装置であるデジタル複写機16に備え、デジタル複写機16のスキャナ部1で読み取ったスキャン画像に対して画像のボケ補正処理を施すようにしたが、これに限るものではない。例えば、原稿画像を読み取る画像読取手段を備えたイメージスキャナを、図5に示したメイン制御部19と同等なシステム構成を備えたパーソナルコンピュータに接続するとともに、このパーソナルコンピュータのHDDに記憶媒体であるCD−ROM37に格納されたプログラムをインストールし、このプログラムに従ってパーソナルコンピュータのCPUを動作させることによってボケ画像補正装置を構成しても、前述したような各種の作用効果と同様の作用効果を得ることができる。また、記憶媒体であるCD−ROM37に格納されたプログラムを、図5に示したメイン制御部19と同等なシステム構成を備えたパーソナルコンピュータのHDDにインストールし、このプログラムに従ってパーソナルコンピュータのCPUを動作させることによってボケ画像補正装置を構成し、予め画像読取手段により読み取られたスキャン画像に対してボケ補正処理を施すようにしても良い。
【0099】
【発明の効果】
請求項1記載の発明のボケ画像補正装置によれば、コンタクトガラス上に載置されたブック原稿を画像読取手段により読み取ったスキャン画像のボケを補正するボケ画像補正装置において、前記スキャン画像から各種領域を判別して抽出する領域判別抽出手段と、前記スキャン画像に基づいて前記ブック原稿の前記コンタクトガラスからの浮きの高さを推定する高さ推定手段と、前記領域判別抽出手段により抽出された前記各種領域に基づきパラメータを設定することでボケ補正フィルタの幅及び強度を調節し、さらに、前記高さ推定手段により推定された前記浮きの高さに基づきパラメータの重み係数を設定することでボケ補正フィルタの強度を調節し、前記スキャン画像の前記各種領域に適したボケ補正処理を施すボケ画像補正手段と、を備え、スキャン画像の各種領域に関して強度調節及び幅調節可能なフィルタを用いて適応的にボケ補正処理を施すことにより、ブック原稿の表面形状変化による文字ボケの補正処理の際に、例えば地肌領域のノイズが強調されてしまうのを抑制することができるとともに、写真領域のコントラストが不自然になってしまうのを防止することができるので、最適な文字ボケ補正を行うことができる。また、前記領域判別抽出手段により抽出された前記各種領域のうち文字矩形領域については、前記ボケ補正フィルタの幅を他の領域に比べて相対的に狭くするとともに、前記ボケ補正フィルタの強度を他の領域に比べて相対的に大きくすることにより、ブック原稿の表面形状変化によりボケてしまった文字矩形領域を確実にエッジ強調することができるので、スキャン画像の文字を読み易くすることができる。さらに、当該文字矩形領域中の文字矩形サイズが小さいほど前記ボケ補正フィルタの幅を狭くすることにより、文字矩形サイズが小さいほどエッジ強調することができるので、さらにスキャン画像の文字を読み易くすることができる。
【0100】
請求項2記載の発明によれば、請求項1記載のボケ画像補正装置において、前記ボケ画像補正手段が、前記文字矩形領域に対して、前ボケ補正フィルタの幅を調節するパラメータの値が他の領域に比べて小さく設定されたフィルタ(請求項2に記載の(1)式で示されるフィルタ)を用いて、前記フィルタの強度を調節するパラメータの値が他の領域に比べて大きく設定された所定の計算式(請求項2に記載の(2)式)により、前記ボケ補正処理を施した画像を出力し、さらに、所定の計算式における前記フィルタの強度を調節するパラメータの重み係数を、前記浮きの高さに応じて設定することにより、ブック原稿のコンタクトガラスからの浮きの高さが高くなるに従ってフィルタの強度を増すことができるので、浮き上がりの深い部分と浅い部分とでの文字等のボケ補正にムラが生じることを防止することができる。
【0108】
請求項3記載の発明のプログラムによれば、コンタクトガラス上に載置されたブック原稿を画像読取手段により読み取ったスキャン画像のボケ補正をコンピュータに実行させるプログラムであって、前記コンピュータに、前記スキャン画像から各種領域を判別して抽出する領域判別抽出機能と、前記スキャン画像に基づいて前記ブック原稿の前記コンタクトガラスからの浮きの高さを推定する高さ推定機能と、前記領域判別抽出機能により抽出された前記各種領域に基づきパラメータを設定することでボケ補正フィルタの幅及び強度を調節し、さらに、前記高さ推定手段により推定された前記浮きの高さに基づきパラメータの重み係数を設定することでボケ補正フィルタの強度を調節し、前記スキャン画像の前記各種領域に適したボケ補正処理を施すボケ画像補正機能と、を実行させ、スキャン画像の各種領域に関して強度調節及び幅調節可能なフィルタを用いて適応的にボケ補正処理を施すことにより、ブック原稿の表面形状変化による文字ボケの補正処理の際に、例えば地肌領域のノイズが強調されてしまうのを抑制することができるとともに、写真領域のコントラストが不自然になってしまうのを防止することができるので、最適な文字ボケ補正を行うことができる。また、前記領域判別抽出機能により抽出された前記各種領域のうち文字矩形領域については、前記ボケ補正フィルタの幅を他の領域に比べて相対的に狭くするとともに、前記ボケ補正フィルタの強度を他の領域に比べて相対的に大きくすることにより、ブック原稿の表面形状変化によりボケてしまった文字矩形領域を確実にエッジ強調することができるので、スキャン画像の文字を読み易くすることができる。さらに、当該文字矩形領域中の文字矩形サイズが小さいほど前記ボケ補正フィルタの幅を狭くすることにより、文字矩形サイズが小さいほどエッジ強調することができるので、さらにスキャン画像の文字を読み易くすることができる。
【0109】
請求項4記載の発明によれば、請求項3記載のプログラムにおいて、前記ボケ画像補正機能が、前記文字矩形領域に対して、前ボケ補正フィルタの幅を調節するパラメータの値が他の領域に比べて小さく設定されたフィルタ(請求項4に記載の(1)式で示されるフィルタ)を用いて、前記フィルタの強度を調節するパラメータの値が他の領域に比べて大きく設定された所定の計算式(請求項4に記載の(2)式)により、前記ボケ補正処理を施した画像を出力し、さらに、所定の計算式における前記フィルタの強度を調節するパラメータの重み係数を、前記浮きの高さに応じて設定することにより、ブック原稿のコンタクトガラスからの浮きの高さが高くなるに従ってフィルタの強度を増すことができるので、浮き上がりの深い部分と浅い部分とでの文字等のボケ補正にムラが生じることを防止することができる。
【図面の簡単な説明】
【図1】本発明の実施の一形態のスキャナ部の構成を示す縦断正面図である。
【図2】スキャナ部を搭載したデジタル複写機の上部部分を示す斜視図である。
【図3】スキャナ部の制御系の電気的な接続を示すブロック図である。
【図4】画像処理部の基本的な内部構成を示すブロック図である。
【図5】メイン制御部の電気的な接続を示すブロック図である。
【図6】スキャン画像のボケ補正処理の流れを概略的に示すフローチャートである。
【図7】スキャナ部のコンタクトガラス上にブック原稿を載置した状態を示す斜視図である。
【図8】形状補正処理の流れを概略的に示すフローチャートである。
【図9】入力した画像の一例を示す平面図である。
【図10】スキャン画像のページ綴じ部の近傍の歪みを示す説明図である。
【図11】図9に示した画像の黒画素ヒストグラムである。
【図12】スキャン画像の文字外接矩形抽出処理および文字行抽出処理の結果の一例を示す説明図である。
【図13】 Hough変換の原理を示す説明図である。
【図14】 Hough変換により図12の直線を抽出した結果を示す説明図である。
【図15】最小2乗法により図12の曲線部分を抽出した結果を示す説明図である。
【図16】基準文字行の直線部分と基準文字行の曲線部分との距離を示す説明図である。
【図17】本の表面の浮いた高さを示す説明図である。
【図18】画像が縮む量を示す説明図である。
【図19】スキャナレンズの結像関係を示す説明図である。
【図20】画像シフトを示す説明図である。
【図21】文字が縦書きである場合の基準文字行を示す説明図である。
【図22】横方向に描いた罫線を示す説明図である。
【図23】形状補正した画像を示す平面図である。
【図24】ボケ補正される前の原画像を示す説明図である。
【図25】ボケ補正フィルタにより図24の原画像の高周波成分を強調したエッジ強調画像を示す説明図である。
【図26】ボケ補正フィルタにより図24の原画像をアンシャープフィルタ処理したアンシャープフィルタ画像を示す説明図である。
【図27】コンタクトガラス上にブック原稿を載置した状態を示す正面図である。
【符号の説明】
1 画像読取装置
2 コンタクトガラス
16 画像形成装置
29 ボケ画像補正装置
40 ブック原稿[0001]
BACKGROUND OF THE INVENTION
  The present invention provides a blurred image correction device.PlacementAnd programs.
[0002]
[Prior art]
Many originals scanned using a flood bed scanner are sheet-like originals, and an openable / closable pressure plate is provided on the contact glass. After placing the original on the contact glass, the pressure plate is closed and the original is scanned. Yes. However, the original is not limited to a sheet, and book originals (books, booklets, etc.) may be handled as originals. In such cases, the book original is placed on the contact glass and the original is scanned. Will do.
[0003]
However, when a book document is used as the document, the page binding portion 101 of the book document 100 is lifted from the contact glass 102 as shown in FIG. As described above, when the page binding portion 101 of the book document 100 is lifted from the contact glass 102, the page binding portion 101 is separated from the focal plane. , Image degradation such as blurred characters occurs. The page binding portion 101 of the deteriorated image is difficult to read, and the recognition rate when performing character recognition processing by OCR is remarkably reduced. In particular, in the case of thick bookbinding, the ratio is high, and when the page binding portion 101 of the book document 100 is pressed so as not to leave the focal plane, the book document 100 itself may be damaged.
[0004]
In order to solve such a problem, a method of correcting image distortion using a method of estimating the three-dimensional shape of an object from image density information has been proposed. As a method for estimating the three-dimensional shape of an object from the density information of such an image,
T. Wada, H. Uchida and T. Matsuyama, “Shape from Shading with Interreflections under a Proximal Light Source: Distortion-Free Copying of an Unfolded Book”, International Journal Computer Vision 24 (2), 125-135 (1997)
The method called Shape from Shading described in is a typical example.
[0005]
Japanese Patent Laid-Open No. 5161002 proposes a method of correcting the distortion by measuring the shape of a book by a triangulation method.
[0006]
Further, Japanese Patent Application Laid-Open No. 11-41455 proposes a method for estimating the three-dimensional shape of the book surface using the shape of the page outline of the scanned read image.
[0007]
[Problems to be solved by the invention]
By the way, since the degree of blur increases as the lift of the book document from the contact glass increases, the same character blur correction process is applied to the entire scanned image when correcting the character blur due to the surface shape change of the book document. However, there is a problem that the noise in the background area is emphasized, the contrast in the photographic area becomes unnatural, or the character blur correction is uneven in the deep and shallow areas.
[0008]
However, according to the method called Shape from Shading described above, geometric distortion correction and luminance correction are performed during the distortion correction processing, but character blur correction is not performed.
[0009]
Further, according to the method described in Japanese Patent Laid-Open No. 5161002, character blur correction is performed by Laplacian processing, but the influence of noise when character blur correction (edge enhancement processing) is performed is considered. Absent. In addition, according to the method described in Japanese Patent Application Laid-Open No. 5-110002, changes in the character blur due to changes in the book surface shape are not taken into account, and the photographic area and the character area are not processed separately. As described above, when the photographic region and the character region are not distinguished from each other and processed, the contrast of the image may become too high when the photographic region is edge-enhanced.
[0010]
Further, even the method described in Japanese Patent Laid-Open No. 11-41455 does not consider the influence of noise when performing character blur correction (edge enhancement processing), and performs processing by distinguishing between a photographic region and a character region. Absent.
[0011]
  It is an object of the present invention to suppress the enhancement of noise in the background area during the character blur correction process due to the surface shape change of the book document, and to make the contrast of the photographic area unnatural. Blur image correction device that can prevent and perform optimal character blur correctionPlacementAnd providing a program.
[0012]
  An object of the present invention is to provide a blurred image correction device capable of preventing the occurrence of unevenness in blur correction of characters or the like in a deeply floating portion and a shallow portion.PlacementAnd providing a program.
[0013]
  An object of the present invention is to provide a blurred image correction device capable of speeding up processing by avoiding execution of blur correction processing when the height of the floating of a book document from the contact glass is zero.PlacementAnd providing a program.
[0014]
[Means for Solving the Problems]
  The blurred image correcting apparatus according to claim 1 is a blurred image correcting apparatus that corrects a blurred image of a scanned image obtained by reading a book document placed on a contact glass by an image reading unit. Region discrimination extraction means for discriminating and extracting;A height estimating means for estimating a height of floating of the book document from the contact glass based on the scanned image;The various areas extracted by the area discrimination extraction meansThe width and strength of the blur correction filter are adjusted by setting the parameters based on the above, and the weight coefficient of the blur correction filter is set by setting the parameter weighting factor based on the height of the float estimated by the height estimation means. Adjust the intensity,Blur image correction means for performing blur correction processing suitable for the various areas of the scanned image,The blurred image correction means isCharacter rectangular area among various areasAgainstSaidBlur correctionWhile making the width of the filter relatively narrow compared to other regions,Blur correctionThe strength of the filter is relatively increased compared to other areas, and among them, the smaller the character rectangle size in the character rectangle area,Blur correctionReduce the width of the filter.
[0015]
  Accordingly, the blur correction process is adaptively performed using a filter capable of adjusting the intensity and the width of various regions of the scanned image. This makes it possible to suppress, for example, noise in the background area from being emphasized during character blur correction processing due to a change in the surface shape of the book document, and the contrast in the photographic area becomes unnatural. Therefore, the optimum character blur correction can be performed.
  In addition, since the character rectangle area that is blurred due to the surface shape change of the book document is surely edge-enhanced, the characters in the scanned image are easier to read. The characters on the scanned image are easy to read.
[0016]
  According to a second aspect of the present invention, in the blurred image correction apparatus according to the first aspect,The blurred image correction means isIn the character rectangular areaOn the other handRecordBlur correctionUsing a filter in which the value of the parameter that adjusts the width of the filter is set smaller than in other regions (the filter represented by the expression (1) of claim 2), the parameter that adjusts the strength of the filter According to a predetermined calculation formula (value (2) according to claim 2) whose value is set to be larger than that of other regions, an image subjected to the blur correction processing is output, and, PlaceA weighting factor of a parameter for adjusting the strength of the filter in a constant calculation formula is set according to the height of the float.
[0017]
Therefore, the height of the floating of the book document from the contact glass is estimated, and the strength of the filter for various regions is adjusted according to the height of the floating. This makes it possible to increase the strength of the filter as the height of the float of the book document from the contact glass increases, resulting in unevenness in blurring correction of characters, etc., in the deep and shallow areas. Can be prevented.
[0032]
  According to a third aspect of the present invention, there is provided a program for causing a computer to perform blur correction of a scan image obtained by reading a book document placed on a contact glass by an image reading unit, and causing the computer to execute a blur correction from the scan image. Area discrimination extraction function that discriminates and extracts various areas;A height estimation function for estimating the height of the book document from the contact glass based on the scanned image;The various areas extracted by the area discrimination extraction functionThe width and strength of the blur correction filter are adjusted by setting the parameters based on the above, and the weight coefficient of the blur correction filter is set by setting the parameter weighting factor based on the height of the float estimated by the height estimation means. Adjust the intensity,A blur image correction function for performing blur correction processing suitable for the various areas of the scanned image;The blurred image correction function isCharacter rectangular area among various areasAgainstRecordBlur correctionWhile making the width of the filter relatively narrow compared to other regions,Blur correctionThe strength of the filter is relatively increased compared to other areas, and among them, the smaller the character rectangle size in the character rectangle area,Blur correctionReduce the width of the filter.
[0033]
  Accordingly, the blur correction process is adaptively performed using a filter capable of adjusting the intensity and the width of various regions of the scanned image. This makes it possible to suppress, for example, noise in the background area from being emphasized during character blur correction processing due to a change in the surface shape of the book document, and the contrast in the photographic area becomes unnatural. Therefore, the optimum character blur correction can be performed.
  In addition, since the character rectangle area that is blurred due to the surface shape change of the book document is surely edge-enhanced, the characters in the scanned image are easier to read. The characters on the scanned image are easy to read.
[0034]
  The invention according to claim 4 is the program according to claim 3,The blurred image correction function isThe character rectangular areaAgainstRecordBlur correctionThe parameter for adjusting the strength of the filter is adjusted by using a filter (a filter represented by the expression (1) according to claim 4) in which the value of the parameter for adjusting the width of the filter is set smaller than that in other regions. An image subjected to the blur correction process is output according to a predetermined calculation formula (Equation (2) according to claim 4) in which a value is set to be larger than that of other regions, and, PlaceA weighting factor of a parameter for adjusting the strength of the filter in a constant calculation formula is set according to the height of the float.
[0035]
Therefore, the height of the floating of the book document from the contact glass is estimated, and the strength of the filter for various regions is adjusted according to the height of the floating. This makes it possible to increase the strength of the filter as the height of the float of the book document from the contact glass increases, resulting in unevenness in blurring correction of characters, etc., in the deep and shallow areas. Can be prevented.
[0046]
DETAILED DESCRIPTION OF THE INVENTION
An embodiment of the present invention will be described with reference to FIGS. The blurred image correction apparatus of the present embodiment is provided in a digital copying machine that is an image forming apparatus, and a scanner unit of the digital copying machine is applied as the image reading apparatus.
[0047]
Here, FIG. 1 is a longitudinal front view showing the configuration of the scanner unit 1. As shown in FIG. 1, the scanner unit 1 includes a contact glass 2 on which a document is placed, a first traveling body 5 including an exposure lamp 3 for exposing a document and a first reflection mirror 4, and a second reflection mirror 6. And a second traveling body 8 composed of the third reflecting mirror 7, a CCD (Charge Coupled Device) 9 as an imaging device for reading an image of the document, a lens unit 10 for forming an image on the CCD 9, and a document placed thereon. A document scale 11 that prevents the contact glass 2 from shifting and coming off, a white reference plate 12 for shading correction installed under the document scale 11, and a frame 14 are provided. The CCD 9 is formed on the sensor board 13.
[0048]
During scanning of a document, the first traveling body 5 and the second traveling body 8 are moved in the sub-scanning direction by a stepping motor 24 (see FIG. 3). That is, the first traveling body 5 and the second traveling body 8 travel under the contact glass 2, the exposure lamp 3 exposes and scans the document, and the reflected light is reflected on the first reflecting mirror 4, the second reflecting mirror 6, and the like. The light is reflected by the third reflecting mirror 7 and imaged on the CCD 9 through the lens unit 10. Here, an image reading means is realized.
[0049]
Such a scanner unit 1 is a printer unit (not shown) that is an image printing apparatus that forms an image on a sheet by, for example, electrophotography, in accordance with image data based on an image of a document read by the scanner unit 1. ). FIG. 2 is a perspective view showing an upper portion of the digital copying machine 16 on which the scanner unit 1 is mounted. As shown in FIG. 2, the scanner unit 1 is provided with a pressure plate 17 that can be opened and closed with respect to the contact glass 2, and an open / close sensor 18 that detects opening and closing of the pressure plate 17. As the printer provided in the digital copying machine 16, various printing methods such as an ink jet method, a sublimation type thermal transfer method, a silver salt photography method, a direct thermal recording method, and a melt type thermal transfer method are applied in addition to the electrophotographic method. be able to. Since the specific configuration is well known, detailed description is omitted.
[0050]
FIG. 3 is a block diagram showing the electrical connection of the control system of the scanner unit 1. As shown in FIG. 3, the control system includes an image processing unit 20 that is a circuit that performs various image processing on image data read by the CCD 9, and a first control unit 19 that controls the entire scanner unit 1. An image read by the CCD 9 and an operation panel 22 for accepting various operations to the digital copying machine 16 and receiving various operations on the digital copying machine 16, which is a circuit for controlling the traveling body 5 and the second traveling body 8. A memory 23 for storing data, predetermined data, and the like is connected. The operation panel 22 is provided with a copy start key for declaring the start of copying. Further, in the traveling body control unit 21, the exposure lamp 3, the stepping motor 24 that drives the first traveling body 5 and the second traveling body 8, and the first traveling body 5 and the second traveling body 8 are in the home position. A scanner home position sensor (HP sensor) 25 for detecting whether or not and an open / close sensor 18 are connected.
[0051]
Here, FIG. 4 is a block diagram showing a basic internal configuration of the image processing unit 20. As shown in FIG. 4, the image processing unit 20 includes an analog video processing unit 26 that performs analog image signal amplification processing and digital conversion processing when a document is read by the CCD 9, a shading correction processing unit 27 that performs shading correction processing, and shading. An image data processing unit 28 for generating a scanned image by performing various types of image data processing such as MTF correction, scaling processing, and γ correction on the digital image signal after correction processing, and a distortion correction function including a blurred image correction function for the scanned image The image distortion correction unit 29 is realized. The digital image signal after the image processing as described above is transmitted to the printer unit via the main control unit 19 and used for image formation.
[0052]
As shown in FIG. 5, the main control unit 19 includes a CPU (Central Processing Unit) 31 that centrally controls each unit. The CPU 31 includes a ROM (Read Only Memory) that stores BIOS and the like. Only memory (RAM) 32 and a RAM (Random Access Memory) 33 that stores various data in a rewritable manner and functions as a work area of the CPU 31 are connected by a bus 34 to constitute a microcomputer. Further, an HDD 35 in which a control program is stored, a CD-ROM drive 36 that reads a CD (Compact Disc) -ROM 37, and an interface (I / F) 38 that controls communication with a printer unit and the like are connected to the bus 34. ing.
[0053]
A CD-ROM 37 shown in FIG. 5 implements the storage medium of the present invention, and stores a predetermined control program. The CPU 31 reads the control program stored in the CD-ROM 37 with the CD-ROM drive 36 and installs it in the HDD 35. As a result, the main control unit 19 is in a state in which various processes as described later can be performed.
[0054]
As a storage medium, not only the CD-ROM 37 but also various types of media such as various optical disks such as DVD, various magnetic disks such as various magneto-optical disks and floppy disks, and semiconductor memories can be used. Alternatively, the program may be downloaded from a network such as the Internet and installed in the HDD 35. In this case, the storage device storing the program in the server on the transmission side is also a storage medium of the present invention. Note that the program may operate on a predetermined OS (Operating System), in which case the OS may execute a part of various processes described later, or a word processor. It may be included as part of a group of program files that constitute predetermined application software such as software or an OS.
[0055]
Next, the contents of various processes executed by the CPU 31 provided in the main control unit 19 based on the control program will be described. Here, of the processes executed by the CPU 31, scanning in the image distortion correction unit 29, which is a blurred image correction device that realizes a blurred image correction function of a scanned image, which is a characteristic function of the scanner unit 1 of the present embodiment. Only image blur correction processing will be described.
[0056]
FIG. 6 is a flowchart schematically showing the flow of a blur correction process for a scanned image. Here, as shown in FIG. 7, the book document 40 is placed on the contact glass 2 so that the page binding portion 41 and the main scanning direction of image reading of the scanner portion 1 are parallel to each other. The case will be described.
[0057]
First, in step S1, the three-dimensional shape is restored, and the distortion of the scanned image is corrected based on the three-dimensional shape. Hereinafter, the shape correction process will be described in detail with reference to FIG.
[0058]
As shown in FIG. 8, first, in step S11, a scanned image of the book document 40 placed on the contact glass 2 output from the image data processing unit 28 is input. Here, FIG. 9 shows an example of the input image. As shown in FIG. 10, the input scanned image of the book document 40 is distorted in the vicinity of the page binding portion 41.
[0059]
Subsequently, an optimal binarization process is performed on the scanned image (for example, a monochrome multi-valued image) of the book document 40 (step S12), and the black pixel in the sub-scanning direction (the pixel value among the pixels of the scanned image is set in advance). A histogram of the number of pixels darker than the determined density value is obtained (step S13). FIG. 11 is a black pixel histogram of the image shown in FIG. The horizontal axis in FIG. 11 indicates the position of a black pixel in the sub-scanning direction (a pixel value whose pixel value is darker than a predetermined density value among the pixels of the scanned image), and the vertical axis in FIG. This indicates the number of black pixels for each position.
[0060]
Next, in step S14, it waits for designation of whether the distortion correction processing is performed using character information or ruled line information.
[0061]
If a declaration that the distortion correction processing is performed using the character information is made via the operation panel 22 or the like (N in step S14), the process proceeds to step S15, and whether the character is horizontal writing or vertical writing. Is determined. Whether the character is written horizontally or vertically is determined based on the histogram of the number of black pixels in the horizontal direction (sub-scanning direction) obtained in step S13. For example, in the case of a horizontally written image as shown in FIG. 9, a repeated pattern of peaks and valleys appears in the histogram, and in the case of vertically written, there is no such pattern. By using this feature, it is determined whether the character is written horizontally or vertically.
[0062]
Note that the binarization process when the scanned image is a color multi-valued image focuses on, for example, any one of the RGB components (for example, the G component), and black pixels that are larger than the predetermined density threshold of the G component are black pixels. And a pixel smaller than a predetermined density threshold of the G component may be a white pixel. Alternatively, RGB may be color-converted to be divided into a luminance component and a color difference component, and threshold processing may be performed with the luminance component.
[0063]
When it is determined that the character is horizontal writing (Y in step S15), the character unit rectangle extraction process in which the black pixels are continuously connected is performed (step S16), and the character line extraction process is performed to obtain the optimum reference. A character line is selected (step S17). Since the character recognition process is a well-known technique, its description is omitted. Here, FIG. 12 shows an example of the result of the character circumscribed rectangle extraction process and the character line extraction process of the binarized scan image. After the character circumscribing rectangle extraction process and the character line extraction process, a large number of lines are obtained. Among them, select a line with a certain length or more, and select the line with the largest curvature among them as the optimal reference character line. Choose as. In addition, let the line more than fixed length be a line longer than 80% of the longest line, for example. Further, one row on the left side and one row on the right side are selected from the boundary line of the page binding portion 41 of the book document 40, respectively. Further, the amount of bending is measured by the position in the main scanning direction of the center coordinates of each character circumscribed rectangle included in the character line, and the amount of bending is considered to be larger as the difference between the maximum value and the minimum value of the center coordinates is larger.
[0064]
Subsequently, the straight line portion of the reference character line extracted in step S17 is extracted (step S18). Extraction of the straight line portion of the reference character line is performed by Hough transform of each rectangular center coordinate value.
[0065]
The principle of Hough transform is shown below. As shown in FIG. 13, the straight line passing through the point P (x, y) on the image satisfies the following expression (1).
ρ = x · cos θ + y · sin θ (1)
Here, (x, y) is the coordinates of the point P, and ρ is the distance between the origin 0 and the point P. θ is an angle formed by the straight line PO and the x-axis. Rectangular center coordinates (xi, Yi) To a discrete (mesh) (ρ, θ) parameter plane. One point on the (x, y) plane is projected onto a single curve on the (ρ, θ) plane. When the number of passes of the curve is counted for each mesh on the plane, a mesh having a large number of passes indicates that there is a corresponding straight line. Since there is only one straight line in one character line, a straight line can be extracted by finding a mesh through which the curve passes most. This method is very resistant to noise, and a straight line portion can be extracted even when a straight line and a curve are mixed. The result of extracting the straight line of FIG. 12 is shown in FIG.
[0066]
Subsequently, the curved portion of the reference character line is obtained (step S19). The reference character line extracted in step S17 is approximated by the following polynomial (2), and the coefficient of the polynomial is obtained by the least square method. That is, step S19 approximates the curve portion of the row with a polynomial.
y = a0+ A1x1+ A2x2+ ... + anxn            ... (2)
Where (x, y) is the coordinates of the center of the character rectangle and (a0, A1, A2, ..., an) Is a polynomial coefficient. The result of the extracted curve portion is shown in FIG.
[0067]
Next, the distance between the straight line portion of the reference character line obtained in step S18 and the curved portion of the reference character line obtained in step S19 is measured (step S20), and three-dimensional shape restoration is performed (step S21). FIG. 16 shows the distance between the straight line portion of the reference character line and the curved portion of the reference character line.
[0068]
When the main scanning direction of scanning and the boundary line of the page binding portion 41 of the book document 40 are parallel, the image forming system has the following characteristics when the book document 40 is read by a scanner lens such as the lens unit 10. The main scanning direction is center projection, and the sub-scanning direction is projection. Here, three-dimensional shape restoration is performed using these characteristics. In the case of central projection, as shown in FIGS. 17 and 18, the surface of the book document 40 floats from the surface of the contact glass 2 and the image formation distance becomes long, and the magnification of the image becomes small. Curves inward. If the shrinkage amount AB in FIG. 18 is measured, the height d of the surface of the book floating in FIG. 17 can be calculated. Accordingly, if the amount of distortion inward of the straight line is measured, the three-dimensional shape (the amount of lifting of the book document 40 from the contact glass 2) can be restored.
[0069]
Here, it is assumed that the book document 40 is placed horizontally on the contact glass 2. Then, the three-dimensional shape becomes two-dimensional. The imaging relationship of the scanner lens is shown in FIG. OO ′ is the optical axis of the lens, and 0 is the center of the lens. F is the distance from the center 0 of the lens to the scanner surface (contact glass 2), which is called the focal length of the scanner. The point B on the scanner surface forms an image on D on the image plane. The point C on the surface of the floating bookbinding (book original 40) forms an image on E. The distance from the center 0 of each imaging plane is y ′ and y (the center 0 also moves as the first traveling body 5 and the second traveling body 8 move in the sub-scanning direction. This will be called the imaging center line). The following relational expressions (3) and (4) are obtained by the triangular similarity.
d / F = AB / AO ′ (3)
AB / AO ′ = (y′−y) / y (4)
Further, the amount d of lifting of the book document 40 is obtained by the following equation (5) from the equations (3) and (4).
d = F × ((y′−y) / y) (5)
It can be seen from this equation (5) that a three-dimensional shape is obtained from a two-dimensional strain amount. Here, the distortion amount (y′−y) and the distance y are obtained from the image. In the present embodiment, this is obtained from the distance between the straight line component of the character line or ruled line and the curved portion. The focal length F of the lens is a known amount determined by the scanner unit 1, and a setting value of the scanner unit 1 or a calibration value of the lens is used. Here, the function of the height estimation means is executed.
[0070]
Subsequently, the distortion of the scanned image is corrected based on the three-dimensional shape (step S22), and the luminance of the image is corrected (step S23). In the direction parallel to the page binding portion 41 of the book document 40, the vertical direction of the scanned image is shifted by one column so that the outer shape of the lower portion of the image becomes a straight line as shown in FIG. Then, the reduction ratio is calculated based on the amount of shrinking inward from the dotted line at the top of the scanned image, and scaling processing is performed. In the vertical direction, the scanned image is stretched along the surface of the book document 40. Also, the luminance correction of the image is performed with reference to the whitest image of each pixel column in the vertical direction. Details are disclosed in Japanese Patent Application Laid-Open No. 11-41455, and a description thereof will be omitted.
[0071]
On the other hand, if it is determined that the character is vertically written (N in step S15), the process proceeds to step S24, where rectangular extraction and vertical line extraction processing are performed. In step S24, the top or bottom rectangle of the line is obtained as shown in FIG. 21, and this is used as a reference character line to obtain the vertical outline.
[0072]
In subsequent steps S18 to S23, image distortion correction processing is performed using the center coordinates of each rectangle constituting the reference character line.
[0073]
When a declaration that the distortion correction processing is performed using ruled line information is made (Y in step S14), ruled lines drawn in the horizontal direction (sub-scanning direction) are extracted (step S25). In step S25, the histogram of the number of black pixels in the horizontal direction (sub-scanning direction) obtained in step S13 is used. As shown in FIG. 22, when there is a ruled line drawn in the horizontal direction, a thin and high peak appears in the histogram. Choose. When a certain length is designated, for example, the ruled line is longer than 80% of the longest ruled line. Then, the ruled line closest to the upper end or the lower end of the image among the selected ruled lines is selected as the reference ruled line. Further, one ruled line on the left side and one ruled line on the right side are selected from the boundary line of the page binding portion 41 of the book document 40, respectively.
[0074]
Subsequent steps S18 to S23 are basically the same as when character information is used, and thus description thereof is omitted.
[0075]
Here, FIG. 23 is a plan view showing an image in which distortion is corrected. According to the above processing, the distortion of the scanned image that has occurred in the vicinity of the page binding portion 41 of the book document 40 as shown in FIG. 9 is corrected as shown in FIG.
[0076]
By the way, when the page binding portion 41 of the book document 40 is lifted from the contact glass 2 in this way, the focus of the scanner lens is aligned with the surface of the contact glass 2, so that the book document 40 is contacted from the contact glass 2. The scanned image of the character portion in the vicinity of the page binding portion 41 that has been lifted is blurred. That is, a sharp image is formed in D shown in FIG. 19, but a blurred image is formed in E. Therefore, in subsequent steps S2 to S8, blur correction processing for correcting a blurred image (particularly, character blur) is performed.
[0077]
Next, the blur correction process will be described. In general, when the original image before blur correction is f (x, y) and the edge-enhanced image in which high-frequency components of the original image f (x, y) are emphasized is g (x, y), the original image f When the weighted sum of (x, y) and the edge-enhanced image g (x, y) is obtained, an unsharp filtered image s (x, y) is obtained, and this unsharp filtered image s (x, y) is The following formula (6),
s (x, y) = f (x, y) + k · g (x, y) (6)
It is represented by Here, k is a weighting factor. However, when the edge of the character is emphasized in this way, the noise in the background area tends to be enhanced together. Therefore, the blur correction process according to the present embodiment has both a smoothing effect and a high-frequency component emphasis effect at the same time in order to prevent noise in the background area from being emphasized together when correcting character blur. The character blur correction is performed using the blur correction filter.
[0078]
Here, the blur correction filter will be described in detail. The blur correction filter of the present embodiment introduces a Laplacian of Gaussian filter (hereinafter referred to as a LoG filter) together with a weighting factor k, and this LoG filter is represented by the following equation (7),
[0079]
[Expression 1]
Figure 0004318874
It is represented by Here, σ is a parameter that determines the spread width of the filter.
[0080]
The unsharp filtered image s (x, y) is expressed by the following equation (8):
[0081]
[Expression 2]
Figure 0004318874
It is represented by
[0082]
Further, the edge-enhanced image g (x, y) is expressed by the following equation (9),
[0083]
[Equation 3]
Figure 0004318874
It is represented by
[0084]
Here, FIG. 24 shows the original image f (x, y) before blur correction, and FIG. 25 shows an edge-enhanced image in which the high-frequency component of the original image f (x, y) in FIG. 24 is emphasized by the blur correction filter. FIG. 26 shows an unsharp filtered image s (x, y) obtained by subjecting the original image f (x, y) of FIG. 24 to unsharp filtering using a blur correction filter.
[0085]
Thus, the blur correction filter has two parameters σ and k. The greater the parameter σ, the greater the smoothing effect because the width of the filter becomes wider. The smaller the value, the narrower the filter width, and the greater the edge enhancement effect. When the parameter σ of the blur correction filter approaches 0, it approximates to a Laplacian filter. That is, by adjusting this parameter σ, noise suppression and edge enhancement sharpness can be adjusted. On the other hand, the larger the value of the parameter k, the greater the effect of edge enhancement, and the smaller the value, the smaller the effect of blur restoration. Therefore, in the present embodiment, the shape-corrected scanned image is divided into a photo area, a character rectangular area, and a background area, and a different blur correction filter parameter is set for each area, so that the optimum for each area is set. Perform blur correction.
[0086]
That is, as shown in FIG. 6, when a photographic region is present in the scanned image after shape correction, the photographic region is extracted from the scanned image (step S2: region discrimination extracting unit), and the scanned image after shape correction is performed. If there is a character rectangular area in the image, a character rectangular area is extracted from the scanned image (step S3: area discrimination extracting means), and an area that is neither a photographic area nor a character rectangular area in the scanned image after shape correction. Extracted as a background area (step S4: area discrimination extraction means). In step S3, the size of the extracted character rectangle (average length of one side of each character rectangle, average length of diagonal lines of each character rectangle, etc.) is also obtained. Note that the processing for extracting a photographic region from a scanned image and the processing for extracting a character rectangular region from a scanned image are well-known techniques, and thus description thereof is omitted.
[0087]
In the subsequent step S5, the optimum parameter σ is set for each region, and in step S6, the optimum parameter k is set for each region. Hereinafter, the parameter setting of the blur correction filter for each region will be described.
[0088]
In the photographic region, the blur correction filter parameter k is set to a small value so that the edge is not overemphasized, and the blur correction filter parameter σ is set to a large value to suppress noise.
[0089]
In the character rectangular area, the blur correction filter parameter k is set large in order to enhance the edge enhancement effect. On the other hand, the parameter σ of the blur correction filter is basically set to be small, but considering the average rectangle size, the parameter σ is set to be smaller as the rectangle is smaller.
[0090]
In the background area, the parameter k of the blur correction filter is set to be small, and the parameter σ of the blur correction filter is set to be larger than that of the photograph area to suppress noise.
[0091]
Next, in step S7, the weighting coefficient p of the parameter k of the blur correction filter is set in accordance with the floating height d of the book document 40 obtained by Expression (5). Here, the function of the intensity adjusting means is executed. This is the following formula (10),
[0092]
[Expression 4]
Figure 0004318874
It is represented by As a result, when the lift height d of the book document 40 is 0, it is equivalent to not performing the filter process. As the lift height d of the book document 40 increases, the blur correction filter increases in strength. It is possible to increase the blur correction effect.
[0093]
Then, the character blur of the scanned image is corrected by the blur correction filter in which the parameters σ, k, and p are set in this way (step S8), and the image is output (step S9). Through the above steps S5 to S8, the function of the blurred image correcting unit is executed.
[0094]
In this embodiment, the LoG filter is introduced as the blur correction filter. However, the present invention is not limited to this, and any blur correction filter that can adjust the filter width by a parameter may be used.
[0095]
Here, the blur correction process is adaptively performed using a blur correction filter capable of adjusting the intensity and width of various regions of the scanned image. This makes it possible to suppress, for example, noise in the background area from being emphasized during character blur correction processing due to a change in the surface shape of the book document 40, and to make the contrast of the photographic area unnatural. Therefore, it is possible to perform optimum character blur correction.
[0096]
Further, the floating height d of the book document 40 from the contact glass 2 is estimated, and the strength of the blur correction filter for various regions is adjusted according to the floating height d. As a result, the strength of the blur correction filter can be increased as the floating height d of the book document 40 from the contact glass 2 increases, so that blur correction of characters or the like in deeply floating portions and shallow portions is possible. It is possible to prevent unevenness from occurring.
[0097]
Further, when the floating height d of the book document 40 from the contact glass 2 is 0, since the image reading means is in focus with respect to the book document 40, the scanned image will not be blurred. By avoiding the execution of the processing, it is possible to increase the processing speed.
[0098]
In the present embodiment, the blur image correction apparatus is provided in the digital copying machine 16 that is an image forming apparatus, and image blur correction processing is performed on the scanned image read by the scanner unit 1 of the digital copying machine 16. However, it is not limited to this. For example, an image scanner provided with image reading means for reading a document image is connected to a personal computer having a system configuration equivalent to the main control unit 19 shown in FIG. 5, and the HDD of this personal computer is a storage medium. Even if the blurred image correction apparatus is configured by installing the program stored in the CD-ROM 37 and operating the CPU of the personal computer in accordance with this program, the same effects as those described above can be obtained. Can do. Further, the program stored in the CD-ROM 37 as a storage medium is installed in the HDD of a personal computer having a system configuration equivalent to that of the main control unit 19 shown in FIG. 5, and the CPU of the personal computer is operated according to this program. By doing so, the blur image correction apparatus may be configured, and the blur correction process may be performed on the scanned image read in advance by the image reading unit.
[0099]
【The invention's effect】
  According to the blur image correcting apparatus of the first aspect of the present invention, in the blur image correcting apparatus that corrects the blur of the scanned image obtained by reading the book document placed on the contact glass by the image reading unit, various types of the blurred image are corrected from the scanned image. An area discriminating and extracting means for discriminating and extracting an area;A height estimating means for estimating a height of floating of the book document from the contact glass based on the scanned image;The various areas extracted by the area discrimination extraction meansThe width and strength of the blur correction filter are adjusted by setting the parameters based on the above, and the weight coefficient of the blur correction filter is set by setting the parameter weighting factor based on the height of the float estimated by the height estimation means. Adjust the intensity,A blur image correction unit that performs a blur correction process suitable for the various areas of the scan image, and adaptively performs the blur correction process on the various areas of the scan image using a filter capable of adjusting the intensity and the width. As a result, it is possible to suppress, for example, noise in the background area from being emphasized during character blur correction processing due to a change in the surface shape of the book document, and to make the contrast in the photographic area unnatural. Therefore, the optimum character blur correction can be performed. Of the various areas extracted by the area discrimination extraction means,Blur correctionWhile making the width of the filter relatively narrow compared to other regions,Blur correctionBy making the filter strength relatively large compared to other areas, it is possible to surely edge-enhance the character rectangle area blurred due to the surface shape change of the book document, making it easy to read the characters in the scanned image can do. Furthermore, the smaller the character rectangle size in the character rectangle area, the moreBlur correctionBy narrowing the width of the filter, the edge emphasis can be enhanced as the character rectangle size is smaller, so that the characters of the scanned image can be more easily read.
[0100]
  According to the invention described in claim 2, in the blurred image correction apparatus according to claim 1,The blurred image correction means isIn the character rectangular areaOn the other handRecordBlur correctionUsing a filter in which the value of the parameter that adjusts the width of the filter is set smaller than in other regions (the filter represented by the expression (1) of claim 2), the parameter that adjusts the strength of the filter According to a predetermined calculation formula (value (2) according to claim 2) whose value is set to be larger than that of other regions, an image subjected to the blur correction processing is output, and, PlaceBy setting a weighting factor of a parameter for adjusting the strength of the filter in a constant calculation formula according to the height of the float, the strength of the filter is increased as the height of the float of the book original from the contact glass increases. Since it can be increased, it is possible to prevent the occurrence of unevenness in the blur correction of characters or the like between the deeply floating portion and the shallow portion.
[0108]
  According to the program of the third aspect of the present invention, there is provided a program for causing a computer to perform blur correction of a scan image obtained by reading a book document placed on a contact glass by an image reading unit, and causing the computer to perform the scan correction. An area discrimination extraction function for discriminating and extracting various areas from an image;A height estimation function for estimating the height of the book document from the contact glass based on the scanned image;The various areas extracted by the area discrimination extraction functionThe width and strength of the blur correction filter are adjusted by setting the parameters based on the above, and the weight coefficient of the blur correction filter is set by setting the parameter weighting factor based on the height of the float estimated by the height estimation means. Adjust the intensity,A blur image correction function for performing blur correction processing suitable for the various areas of the scanned image, and adaptively performing blur correction processing on the various areas of the scanned image using a filter capable of adjusting the intensity and width. As a result, for example, noise in the background area can be prevented from being emphasized during the character blur correction process due to the surface shape change of the book document, and the contrast in the photographic area becomes unnatural. Therefore, the optimum character blur correction can be performed. Of the various areas extracted by the area discrimination extraction function,Blur correctionWhile making the width of the filter relatively narrow compared to other regions,Blur correctionBy making the filter strength relatively large compared to other areas, it is possible to surely edge-enhance the character rectangle area blurred due to the surface shape change of the book document, making it easy to read the characters in the scanned image can do. Furthermore, the smaller the character rectangle size in the character rectangle area, the moreBlur correctionBy narrowing the width of the filter, the edge emphasis can be enhanced as the character rectangle size is smaller, so that the characters of the scanned image can be more easily read.
[0109]
  According to invention of Claim 4, in the program of Claim 3,The blurred image correction function isThe character rectangular areaAgainstRecordBlur correctionThe parameter for adjusting the strength of the filter is adjusted by using a filter (a filter represented by the expression (1) according to claim 4) in which the value of the parameter for adjusting the width of the filter is set smaller than that in other regions. An image subjected to the blur correction process is output according to a predetermined calculation formula (Equation (2) according to claim 4) in which a value is set to be larger than that of other regions, and, PlaceBy setting a weighting factor of a parameter for adjusting the strength of the filter in a constant calculation formula according to the height of the float, the strength of the filter is increased as the height of the float of the book original from the contact glass increases. Since it can be increased, it is possible to prevent the occurrence of unevenness in the blur correction of characters or the like between the deeply floating portion and the shallow portion.
[Brief description of the drawings]
FIG. 1 is a longitudinal front view showing a configuration of a scanner unit according to an embodiment of the present invention.
FIG. 2 is a perspective view showing an upper part of a digital copying machine equipped with a scanner unit.
FIG. 3 is a block diagram showing an electrical connection of a control system of a scanner unit.
FIG. 4 is a block diagram illustrating a basic internal configuration of an image processing unit.
FIG. 5 is a block diagram showing electrical connection of a main control unit.
FIG. 6 is a flowchart schematically illustrating a flow of a blur correction process for a scanned image.
FIG. 7 is a perspective view showing a state in which a book document is placed on a contact glass of a scanner unit.
FIG. 8 is a flowchart schematically showing a flow of shape correction processing.
FIG. 9 is a plan view illustrating an example of an input image.
FIG. 10 is an explanatory diagram illustrating distortion in the vicinity of a page binding portion of a scanned image.
11 is a black pixel histogram of the image shown in FIG. 9;
FIG. 12 is an explanatory diagram illustrating an example of a result of character circumscribed rectangle extraction processing and character line extraction processing of a scanned image.
FIG. 13 is an explanatory diagram showing the principle of Hough transform.
FIG. 14 is an explanatory diagram showing a result of extracting the straight line of FIG. 12 by Hough transform.
FIG. 15 is an explanatory diagram showing a result of extracting the curve portion of FIG. 12 by the method of least squares.
FIG. 16 is an explanatory diagram showing a distance between a straight line portion of a reference character line and a curved portion of the reference character line.
FIG. 17 is an explanatory diagram showing the floating height of the surface of a book.
FIG. 18 is an explanatory diagram showing the amount by which an image shrinks.
FIG. 19 is an explanatory diagram showing an imaging relationship of a scanner lens.
FIG. 20 is an explanatory diagram showing image shift.
FIG. 21 is an explanatory diagram showing a reference character line when a character is vertically written.
FIG. 22 is an explanatory diagram showing ruled lines drawn in the horizontal direction.
FIG. 23 is a plan view showing a shape-corrected image.
FIG. 24 is an explanatory diagram showing an original image before blur correction.
25 is an explanatory diagram showing an edge enhanced image in which a high frequency component of the original image in FIG. 24 is enhanced by a blur correction filter.
FIG. 26 is an explanatory diagram showing an unsharp filtered image obtained by performing unsharp filtering on the original image of FIG. 24 using a blur correction filter.
FIG. 27 is a front view showing a state in which a book document is placed on the contact glass.
[Explanation of symbols]
1 Image reader
2 Contact glass
16 Image forming apparatus
29 Blurred image correction device
40 book manuscript

Claims (4)

コンタクトガラス上に載置されたブック原稿を画像読取手段により読み取ったスキャン画像のボケを補正するボケ画像補正装置において、
前記スキャン画像から各種領域を判別して抽出する領域判別抽出手段と、
前記スキャン画像に基づいて前記ブック原稿の前記コンタクトガラスからの浮きの高さを推定する高さ推定手段と、
前記領域判別抽出手段により抽出された前記各種領域に基づきパラメータを設定することでボケ補正フィルタの幅及び強度を調節し、さらに、前記高さ推定手段により推定された前記浮きの高さに基づきパラメータの重み係数を設定することでボケ補正フィルタの強度を調節し、前記スキャン画像の前記各種領域に適したボケ補正処理を施すボケ画像補正手段と、を備え、
前記ボケ画像補正手段は、
前記各種領域のうち文字矩形領域に対して、
前記ボケ補正フィルタの幅を他の領域に比べて相対的に狭くするとともに、前記ボケ補正フィルタの強度を他の領域に比べて相対的に大きくし、
その中で、当該文字矩形領域中の文字矩形サイズが小さいほど前記ボケ補正フィルタの幅を狭くすることを特徴とするボケ画像補正装置。
In a blurred image correction apparatus that corrects a blur of a scanned image obtained by reading a book document placed on a contact glass by an image reading unit,
Area discrimination extraction means for discriminating and extracting various areas from the scanned image;
A height estimating means for estimating a height of floating of the book document from the contact glass based on the scanned image;
Adjusting the width and strength of the blur correction filter by setting the parameter based on the various areas extracted by the area discriminating extracting means further parameter based on the height of the float, which is estimated by the height estimating section A blur image correction unit that adjusts the strength of the blur correction filter by setting a weighting factor of the blur image and performs blur correction processing suitable for the various regions of the scanned image,
The blurred image correction means includes
For the character rectangular area of the various regions,
The width of the blur correction filter is relatively narrow compared to other regions, and the strength of the blur correction filter is relatively large compared to other regions,
Among them, the blur image correction apparatus is characterized in that the smaller the character rectangle size in the character rectangle area, the narrower the blur correction filter.
前記ボケ画像補正手段は、
前記文字矩形領域に対して、
ボケ補正フィルタの幅を調節するパラメータσの値が他の領域に比べて小さく設定された下記(1)式に示されるフィルタを用いて、前記フィルタの強度を調節するパラメータkの値が他の領域に比べて大きく設定された下記(2)式に示される計算式により、前記ボケ補正処理を施した画像s(x,y)を出力し、
さらに、下記(2)式における前記フィルタの強度を調節するパラメータkの重み係数pを、前記浮きの高さに応じて設定することを特徴とする請求項1記載のボケ画像補正装置。
Figure 0004318874
Figure 0004318874
The blurred image correction means includes
For the character rectangle area,
With a filter value of the parameter σ to adjust the width before Symbol blur correction filter is shown in small set following formula (1) as compared with other regions, the value of the parameter k to adjust the intensity of said filter The image s (x, y) subjected to the blur correction process is output according to the calculation formula shown in the following formula (2) that is set to be larger than that in other regions,
Further, the weighting factor p of the parameter k to adjust the intensity of the filter under SL (2), the blurred image correction apparatus according to claim 1, wherein the set according to the height of the float.
Figure 0004318874
Figure 0004318874
コンタクトガラス上に載置されたブック原稿を画像読取手段により読み取ったスキャン画像のボケ補正をコンピュータに実行させるプログラムであって、前記コンピュータに、
前記スキャン画像から各種領域を判別して抽出する領域判別抽出機能と、
前記スキャン画像に基づいて前記ブック原稿の前記コンタクトガラスからの浮きの高さを推定する高さ推定機能と、
前記領域判別抽出機能により抽出された前記各種領域に基づきパラメータを設定することでボケ補正フィルタの幅及び強度を調節し、さらに、前記高さ推定手段により推定された前記浮きの高さに基づきパラメータの重み係数を設定することでボケ補正フィルタの強度を調節し、前記スキャン画像の前記各種領域に適したボケ補正処理を施すボケ画像補正機能と、を実行させ
前記ボケ画像補正機能は、
前記各種領域のうち文字矩形領域に対して、
ボケ補正フィルタの幅を他の領域に比べて相対的に狭くするとともに、前記ボケ補正フィルタの強度を他の領域に比べて相対的に大きくし、
その中で、当該文字矩形領域中の文字矩形サイズが小さいほど前記ボケ補正フィルタの幅を狭くすることを特徴とするプログラム。
A program for causing a computer to perform blur correction of a scanned image obtained by reading a book document placed on a contact glass by an image reading unit,
An area discrimination extraction function for discriminating and extracting various areas from the scanned image;
A height estimation function for estimating the height of floating of the book document from the contact glass based on the scanned image;
Adjusting the width and strength of the blur correction filter by setting the parameter based on the various regions extracted by the region discrimination extracting function, further parameters based on the height of the float, which is estimated by the height estimating section A blur image correction function that adjusts the strength of the blur correction filter by setting a weighting coefficient of the image and performs a blur correction process suitable for the various regions of the scanned image ,
The blurred image correction function is
For the character rectangular area of the various regions,
With relatively narrow compared to the width of the front Symbol blur correction filter in other regions, relatively larger than the strength of the blur correction filter to another area,
Among them, a program for narrowing the width of the blur correction filter as the character rectangle size in the character rectangle area is smaller.
前記ボケ画像補正機能は、
前記文字矩形領域に対して、
ボケ補正フィルタの幅を調節するパラメータσの値が他の領域に比べて小さく設定された下記(1)式に示されるフィルタを用いて、前記フィルタの強度を調節するパラメータの値が他の領域に比べて大きく設定された下記(2)式に示される計算式により、前記ボケ補正処理を施した画像s(x,y)を出力し、
さらに、下記(2)式における前記フィルタの強度を調節するパラメータkの重み係数pを、前記浮きの高さに応じて設定することを特徴とする請求項3記載のプログラム。
Figure 0004318874
Figure 0004318874
The blurred image correction function is
For the character rectangular area ,
With a filter value of the parameter σ to adjust the width before Symbol blur correction filter is shown in small set following formula (1) as compared with other regions, the value of the parameter for adjusting the intensity of said filter other The image s (x, y) subjected to the blur correction process is output by the calculation formula shown in the following formula (2), which is set larger than the area of
Further, according to claim 3, wherein the program, characterized in that the weighting coefficient p of the parameter k to adjust the intensity of the filter under SL (2), set according to the height of the float.
Figure 0004318874
Figure 0004318874
JP2001262813A 2001-08-31 2001-08-31 Blurred image correction apparatus, image reading apparatus, image forming apparatus, and program Expired - Fee Related JP4318874B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001262813A JP4318874B2 (en) 2001-08-31 2001-08-31 Blurred image correction apparatus, image reading apparatus, image forming apparatus, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001262813A JP4318874B2 (en) 2001-08-31 2001-08-31 Blurred image correction apparatus, image reading apparatus, image forming apparatus, and program

Publications (2)

Publication Number Publication Date
JP2003078765A JP2003078765A (en) 2003-03-14
JP4318874B2 true JP4318874B2 (en) 2009-08-26

Family

ID=19089651

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001262813A Expired - Fee Related JP4318874B2 (en) 2001-08-31 2001-08-31 Blurred image correction apparatus, image reading apparatus, image forming apparatus, and program

Country Status (1)

Country Link
JP (1) JP4318874B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451959A (en) * 2016-05-31 2017-12-08 宇龙计算机通信科技(深圳)有限公司 Image processing method and system

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4411613B2 (en) 2006-03-06 2010-02-10 ブラザー工業株式会社 Image reading device
US10015364B2 (en) * 2015-05-11 2018-07-03 Pictureworks Pte Ltd System and method for previewing digital content
JP6763637B2 (en) * 2016-08-19 2020-09-30 正浩 小林 Image restoration method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451959A (en) * 2016-05-31 2017-12-08 宇龙计算机通信科技(深圳)有限公司 Image processing method and system
CN107451959B (en) * 2016-05-31 2020-10-16 宇龙计算机通信科技(深圳)有限公司 Picture processing method and system

Also Published As

Publication number Publication date
JP2003078765A (en) 2003-03-14

Similar Documents

Publication Publication Date Title
JP4141235B2 (en) Image correction apparatus and program
US7016081B2 (en) Image distortion correction apparatus, distortion correction method therefor, recording media, image scanner and image construction apparatus
JP4271085B2 (en) Image correction apparatus, image reading apparatus, program, and storage medium
JP4162633B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, program, and storage medium
JP4318874B2 (en) Blurred image correction apparatus, image reading apparatus, image forming apparatus, and program
JP4111697B2 (en) Image brightness correction apparatus, image reading apparatus, image forming apparatus, and program
JP3983721B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP4507124B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP4180260B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP4585015B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP4480291B2 (en) Image distortion correction apparatus, storage medium, program, image distortion correction method, image reading apparatus, and image forming apparatus
JP3979639B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP3865215B2 (en) Image distortion correction apparatus, program, storage medium, and image distortion correction method
JP3917421B2 (en) Image brightness correction apparatus, image reading apparatus, image forming apparatus, program, and storage medium
JP3926294B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, image distortion correction method, image distortion correction program, and recording medium
JP2003143407A (en) Picture luminance correcting apparatus, picture read apparatus, picture forming apparatus, program, and memorizing medium
JP3877142B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, program, and storage medium
JP4194076B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, program, and storage medium
JP4198613B2 (en) Image distortion correction apparatus, program, and storage medium
JP4577845B2 (en) Image processing apparatus, image processing method, program, and storage medium storing program
JP3865199B2 (en) Image reading apparatus, image distortion correction method, storage medium, and image forming apparatus
JP2003143410A (en) Blurred picture correcting apparatus, picture read apparatus, picture forming apparatus, program, and memorizing medium
JP4061256B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP4789221B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP4136860B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20041004

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20051021

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070320

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20070222

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080515

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080527

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080728

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080916

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090113

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090313

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090527

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

Free format text: PAYMENT UNTIL: 20120605

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130605

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees