JP3979639B2 - Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program - Google Patents

Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program Download PDF

Info

Publication number
JP3979639B2
JP3979639B2 JP2002247643A JP2002247643A JP3979639B2 JP 3979639 B2 JP3979639 B2 JP 3979639B2 JP 2002247643 A JP2002247643 A JP 2002247643A JP 2002247643 A JP2002247643 A JP 2002247643A JP 3979639 B2 JP3979639 B2 JP 3979639B2
Authority
JP
Japan
Prior art keywords
image
scanning direction
distortion correction
line
main scanning
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
JP2002247643A
Other languages
Japanese (ja)
Other versions
JP2004088499A (en
JP2004088499A5 (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
Priority to US10/227,743 priority Critical patent/US7430065B2/en
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2002247643A priority patent/JP3979639B2/en
Publication of JP2004088499A publication Critical patent/JP2004088499A/en
Publication of JP2004088499A5 publication Critical patent/JP2004088499A5/ja
Application granted granted Critical
Publication of JP3979639B2 publication Critical patent/JP3979639B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、画像歪み補正装置、画像読取装置、画像形成装置及びプログラムに関する。
【0002】
【従来の技術】
フラットベッドスキャナを用いて読み取る原稿の多くはシート状の原稿であり、コンタクトガラス上に開閉自在の圧板を設け、コンタクトガラス上に原稿を載置した後に圧板を閉じて原稿をスキャンするようにしている。しかし、原稿としてはシート状のものに限られず、ブック原稿(本、冊子など)も原稿として扱われることがあり、そのような場合にもコンタクトガラス上にブック原稿を載置し、原稿をスキャンすることになる。
【0003】
ところが、原稿としてブック原稿を用いた場合には、図50に示すように、ブック原稿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】
しかしながら、前述したShape from Shadingと呼ばれる方法によれば、計算量が多く、歪み補正処理の計算時間が長いので、実用化は困難である。
【0008】
また、特開平5-161002号公報に記載されている方法によれば、三角測量方式により書籍の形状を測定するための特別な形状計測装置が必要になるため、適当ではない。
【0009】
さらに、特開平11-41455号公報に記載されている方法によれば、少ない計算量で歪み補正ができるが、ページ外形が画像中に完全に収まりきれずに途中で切れているような場合には有効な補正ができない。
【0010】
そこで、近年においては、ページ外形が途中で切れているような読み取りスキャン画像であっても、その歪みを少ない計算量で有効に補正することができる画像歪み補正装置が提案されている。
【0011】
【発明が解決しようとする課題】
しかしながら、上述したようなページ外形が途中で切れているような読み取りスキャン画像であっても、その歪みを少ない計算量で有効に補正することができる画像歪み補正装置によれば、ページ外形ではなく、文字行情報および罫線情報を用いて画像の歪みを補正するようにしているが、まだ、完全とはいえず、解決されねばならない課題が存在する。
【0012】
第一に、ブック原稿のページ綴じ部と画像読み取りの主走査方向とが平行な場合には、画像の歪みの補正をスキャナ(画像読取手段)の固有パラメータ(レンズの焦点面距離、スキャン光軸の位置(アドレス))を利用して行っているので、特定のスキャナの出力画像しか補正できないという問題がある。
【0013】
第二に、罫線がかすれ等によって途中で切断されている場合には、不適切な罫線情報が抽出されてしまい、補正精度が低下するという問題がある。また、文字行と写真部分とが誤認識されることにより、不適切な文字行情報が抽出されてしまい、補正精度が低下するという問題もある。
【0014】
本発明の目的は、ブック原稿のページ綴じ部と画像読み取りの主走査方向とが平行な場合に、スキャナ(画像読取手段)の固有パラメータに依存しない歪み補正率を用いてスキャン画像に対する歪み補正を行うことができる画像歪み補正装置、画像読取装置、画像形成装置及びプログラムを提供することである。
【0015】
本発明の目的は、スキャン画像の歪み補正の補正精度を向上させることができる画像歪み補正装置、画像読取装置、画像形成装置及びプログラムを提供することである。
【0016】
【課題を解決するための手段】
請求項1記載の発明の画像歪み補正装置は、画像読み取りの主走査方向に対してページ綴じ部を平行にしてコンタクトガラス上に載置されたブック原稿を画像読取手段により読み取ったスキャン画像の歪みを補正する画像歪み補正装置において、前記スキャン画像のページ外形、罫線、文字行または前記スキャン画像を副走査方向に貫く画像中心線の形状を基に主走査方向の歪み補正率を算出する主走査方向歪み補正率算出手段と、この歪み補正率算出手段により算出された前記歪み補正率を用いて前記スキャン画像を主走査方向に伸張して前記スキャン画像の歪みを補正する主走査方向歪み補正手段と、この主走査方向歪み補正手段により補正された補正画像から文字外接矩形を抽出し、抽出された前記文字外接矩形の形状を基に副走査方向の歪み補正率を算出する副走査方向歪み補正率算出手段と、この副走査方向歪み補正率算出手段により算出された前記歪み補正率を用いて前記補正画像を副走査方向に伸張して前記補正画像の歪みを補正する副走査方向歪み補正手段と、を備える。
【0017】
したがって、主走査方向のスキャン画像の歪みの補正に用いられる歪み補正率が、ページ外形、罫線、文字行またはスキャン画像を副走査方向に貫く画像中心線の形状というスキャン画像中の情報のみから求められる。これにより、ブック原稿のページ綴じ部と画像読み取りの主走査方向とが平行な場合に、画像読取手段であるスキャナの固有パラメータ(レンズの焦点面距離、スキャン光軸の位置(アドレス))に依存しない歪み補正率を用いてスキャン画像に対する歪み補正を行うことが可能になるので、スキャナの固有パラメータに依存することのない汎用的な装置の提供が可能になる。
【0018】
請求項2記載の発明は、請求項1記載の画像歪み補正装置において、前記主走査方向歪み補正率算出手段は、前記スキャン画像の主走査方向における上辺または下辺の近傍に位置するページ外形、罫線または文字行である基準線と、前記基準線側の辺とは反対側の辺の近傍に位置するページ外形、罫線、文字行または前記スキャン画像を副走査方向に貫く画像中心線の形状である参照線とに基づいて算出される仮想的なページ外形である仮想ページ外形に基づいて主走査方向の歪み補正率を算出する。
【0019】
したがって、主走査方向の歪み補正率をスキャナ(画像読取手段)の固有パラメータに依存することなく確実に算出することが可能になる。
【0020】
請求項3記載の発明は、請求項2記載の画像歪み補正装置において、前記主走査方向歪み補正率算出手段により算出される主走査方向の歪み補正率は、前記仮想ページ外形の副走査方向の任意の位置xにて、
(前記仮想ページ外形上の所定位置における前記仮想ページ外形と前記参照線との間隔)/(副走査方向の任意の位置xにおける前記仮想ページ外形と前記参照線との間隔)
である。
【0021】
したがって、簡易な計算により主走査方向の歪み補正率の算出が可能になる。
【0022】
請求項4記載の発明は、請求項3記載の画像歪み補正装置において、前記仮想ページ外形上の所定位置は、前記仮想ページ外形の直線部分と曲線部分との境界点である。
【0023】
したがって、スキャン画像に対する歪み補正の際の画像の欠落を最小限に抑えることが可能になる。
【0024】
請求項5記載の発明は、請求項3記載の画像歪み補正装置において、前記仮想ページ外形上の所定位置は、前記仮想ページ外形の直線部分に位置する。
【0025】
したがって、スキャン画像に対する歪み補正の際の画像の欠落を最小限に抑えることが可能になる。
【0026】
請求項6記載の発明は、請求項2ないし5のいずれか一記載の画像歪み補正装置において、前記主走査方向歪み補正手段は、前記ページ外形、前記罫線、前記文字行または前記仮想ページ外形を直線形状にするように主走査方向に画素シフトした前記スキャン画像を、主走査方向の歪み補正率を用いて主走査方向に伸張する。
【0027】
したがって、主走査方向のスキャン画像の歪みが、確実に補正される。
【0028】
請求項7記載の発明は、請求項6記載の画像歪み補正装置において、前記主走査方向歪み補正手段は、前記ページ外形、前記罫線、前記文字行または前記仮想ページ外形の副走査方向の全ての位置で主走査方向の歪み補正率を用いた伸張処理を施す。
【0029】
したがって、主走査方向のスキャン画像の歪みが、確実に補正される。
【0030】
請求項8記載の発明は、請求項6記載の画像歪み補正装置において、前記主走査方向歪み補正手段は、前記ページ外形、前記罫線、前記文字行または前記仮想ページ外形の曲線部分に対応する副走査方向の位置でのみ主走査方向の歪み補正率を用いた伸張処理を施す。
【0031】
したがって、主走査方向の歪みが発生するページ外形、罫線、文字行または仮想ページ外形の曲線部分に対応する副走査方向の位置でのみ画像歪みが補正される。これにより、処理の高速化を図ることが可能になる。
【0032】
請求項9記載の発明は、請求項6記載の画像歪み補正装置において、前記主走査方向歪み補正手段は、前記ページ外形、前記罫線、前記文字行または前記仮想ページ外形の直線部分と曲線部分との境界点と、前記スキャン画像のページ綴じ部との間に対応する副走査方向の位置でのみ主走査方向の歪み補正率を用いた伸張処理を施す。
【0033】
したがって、主走査方向の歪みが発生するページ外形、罫線、文字行または仮想ページ外形の境界点とページ綴じ部との間に対応する副走査方向の位置でのみ画像歪みが補正される。これにより、処理の高速化を図ることが可能になる。
【0034】
請求項10記載の発明は、請求項1ないし9のいずれか一記載の画像歪み補正装置において、前記主走査方向歪み補正率算出手段と前記主走査方向歪み補正手段と前記副走査方向歪み補正率算出手段と前記副走査方向歪み補正手段とは、前記スキャン画像の左右ページ毎に独立して実行される。
【0035】
したがって、左右ページ毎に独立して処理されることにより、スキャン画像の歪み補正の補正精度を向上させることが可能になる。
【0090】
請求項11記載の発明の画像読取装置は、原稿画像を読み取る画像読取手段と、この画像読取手段により読み取られたスキャン画像の補正を行う請求項1ないし10の何れか一記載の画像歪み補正装置と、を備える。
【0091】
したがって、請求項1ないし10の何れか一記載の発明と同様の作用を奏する画像読取装置が得られる。
【0094】
請求項12記載の発明の画像形成装置は、原稿画像を読み取る画像読取手段と、この画像読取手段により読み取られたスキャン画像の補正を行う請求項1ないし10の何れか一記載の画像歪み補正装置と、この画像歪み補正装置から出力される画像データに基づいた画像を用紙上に印刷する画像印刷装置と、を備える。
【0095】
したがって、請求項1ないし10の何れか一記載の発明と同様の作用を奏する画像形成装置が得られる。
【0098】
請求項13記載の発明のプログラムは、画像読み取りの主走査方向に対してページ綴じ部を平行にしてコンタクトガラス上に載置されたブック原稿を画像読取手段により読み取ったスキャン画像の画像歪み補正をコンピュータに実行させるプログラムであって、前記コンピュータに、前記スキャン画像のページ外形、罫線、文字行または前記スキャン画像を副走査方向に貫く画像中心線の形状を基に主走査方向の歪み補正率を算出する主走査方向歪み補正率算出機能と、この歪み補正率算出機能により算出された前記歪み補正率を用いて前記スキャン画像を主走査方向に伸張して前記スキャン画像の歪みを補正する主走査方向歪み補正機能と、この主走査方向歪み補正機能により補正された補正画像から文字外接矩形を抽出し、抽出された前記文字外接矩形の形状を基に副走査方向の歪み補正率を算出する副走査方向歪み補正率算出機能と、この副走査方向歪み補正率算出機能により算出された前記歪み補正率を用いて前記補正画像を副走査方向に伸張して前記補正画像の歪みを補正する副走査方向歪み補正機能と、を実行させる。
【0099】
したがって、主走査方向のスキャン画像の歪みの補正に用いられる歪み補正率が、ページ外形、罫線、文字行またはスキャン画像を副走査方向に貫く画像中心線の形状というスキャン画像中の情報のみから求められる。これにより、ブック原稿のページ綴じ部と画像読み取りの主走査方向とが平行な場合に、画像読取手段であるスキャナの固有パラメータ(レンズの焦点面距離、スキャン光軸の位置(アドレス))に依存しない歪み補正率を用いてスキャン画像に対する歪み補正を行うことが可能になるので、スキャナの固有パラメータに依存することのない汎用的なプログラムの提供が可能になる。
【0124】
【発明の実施の形態】
本発明の第一の実施の形態を図1ないし図47に基づいて説明する。本実施の形態の画像歪み補正装置は画像形成装置であるデジタル複写機に備えられており、画像読取装置としてはデジタル複写機のスキャナ部が適用されている。
【0125】
ここで、図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上に形成されている。
【0126】
原稿の走査時には、第一走行体5および第二走行体8はステッピングモータ24(図3参照)によって副走査方向に移動する。すなわち、第一走行体5および第二走行体8がコンタクトガラス2の下を走行して、露光ランプ3で原稿を露光走査し、その反射光を第一反射ミラー4、第二反射ミラー6および第三反射ミラー7で反射して、レンズユニット10を通してCCD9に結像させる。ここに、画像読取手段が実現されている。
【0127】
このようなスキャナ部1は、このスキャナ部1で読み取られた原稿の画像に基づく画像データに応じ、例えば電子写真方式で用紙上に画像の形成を行う画像印刷装置であるプリンタ部(図示せず)を備えるデジタル複写機16に搭載されている。図2は、スキャナ部1を搭載したデジタル複写機16の上部部分を示す斜視図である。図2に示すように、スキャナ部1には、コンタクトガラス2に対して開閉自在な圧板17と、この圧板17の開閉を検出する開閉センサ18とが設けられている。なお、デジタル複写機16に備えられるプリンタとしては、電子写真方式のほか、インクジェット方式、昇華型熱転写方式、銀塩写真方式、直接感熱記録方式、溶融型熱転写方式など、種々の印刷方式を適用することができる。その具体的な構成については周知であるため、詳細な説明は省略する。
【0128】
図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とが接続されている。
【0129】
ここで、図4は画像処理部20の基本的な内部構成を示すブロック図である。図4に示すように、画像処理部20は、原稿をCCD9により読み取ったアナログ画像信号の増幅処理やデジタル変換処理等を行うアナログビデオ処理部26、シェーディング補正処理を行うシェーディング補正処理部27、シェーディング補正処理後のデジタル画像信号に、MTF補正、変倍処理、γ補正等の各種画像データ処理を行いスキャン画像を生成する画像データ処理部28、本実施の形態の特長的な機能であるスキャン画像の歪み補正機能を実現する画像歪み補正部29から構成されている。以上のような画像処理後のデジタル画像信号は、メイン制御部19を介してプリンタ部に送信されて、画像形成に供される。
【0130】
メイン制御部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とが接続されている。
【0131】
図5に示すCD−ROM37は、この発明の記憶媒体を実施するものであり、所定の制御プログラムが記憶されている。CPU31は、CD−ROM37に記憶されている制御プログラムをCD−ROMドライブ36で読み取り、HDD35にインストールする。これにより、メイン制御部19は、後述するような各種の処理を行うことが可能な状態となる。
【0132】
なお、記憶媒体としては、CD−ROM37のみならず、DVDなどの各種の光ディスク、各種光磁気ディスク、フレキシブルディスクなどの各種磁気ディスク、半導体メモリ等、各種方式のメディアを用いることができる。また、インターネットなどのネットワークからプログラムをダウンロードし、HDD35にインストールするようにしてもよい。この場合に、送信側のサーバでプログラムを記憶している記憶装置も、この発明の記憶媒体である。なお、プログラムは、所定のOS(Operating System)上で動作するものであってもよいし、その場合に後述の各種処理の一部の実行をOSに肩代わりさせるものであってもよいし、ワープロソフトなど所定のアプリケーションソフトやOSなどを構成する一群のプログラムファイルの一部として含まれているものであってもよい。
【0133】
次に、メイン制御部19に設けられたCPU31が制御プログラムに基づいて実行する各種処理の内容について説明する。ここでは、CPU31が実行する処理のうち、本実施の形態のスキャナ部1が備える特長的な機能であるスキャン画像の歪み補正機能を実現する画像歪み補正装置である画像歪み補正部29におけるスキャン画像の歪み補正処理についてのみ説明する。
【0134】
図6は、スキャン画像の歪み補正処理の流れを概略的に示すフローチャートである。なお、ここでは、図7に示すように、ブック原稿40がそのページ綴じ部41とスキャナ部1の画像読み取りの主走査方向とが平行になるように位置させてコンタクトガラス2に載置されている場合について説明する。
【0135】
まず、ステップS1において、画像データ処理部28から出力されたコンタクトガラス2に載置されているブック原稿40のスキャン画像を入力する。ここで、図8は入力した画像の一例を示したものである。そして、図9に示すように、入力されたブック原稿40のスキャン画像には、ページ綴じ部41の近傍において歪みが生じている。
【0136】
次いで、ブック原稿40のスキャン画像(例えば、モノクロ多値画像)の最適2値化処理を実行し(ステップS2)、副走査方向の黒画素(スキャン画像の画素の中でその濃度値が予め定めた濃度値よりも濃い画素)数のヒストグラムを求める(ステップS3)。図10は、図8に示した画像の綴じ部境界線左側の黒画素ヒストグラムである。図10中の横軸は、主走査方向の黒画素(スキャン画像の画素の中でその濃度値が予め定めた濃度値よりも濃い画素)の位置を示し、図10中の縦軸は、その位置毎の黒画素数を示すものである。なお、綴じ部境界線としては、スキャン画像中の画素の中でその濃度値が元も濃い画素が位置する副走査方向の位置が選択される。
【0137】
なお、スキャン画像がカラー多値画像の場合における2値化処理は、例えばRGB成分の何れか一つの成分に着目し(例えばG成分)、G成分の所定の濃度閾値よりも大きいものを黒画素とし、G成分の所定の濃度閾値よりも小さいものを白画素とすれば良い。また、RGBを色変換して輝度成分と色差成分とに分け、輝度成分で閾値処理を行うようにしても良い。
【0138】
続くステップS4においては、ページ外形/罫線/文字行の抽出処理を実行する。ここで、図11は、ページ外形/罫線/文字行の抽出処理の流れを概略的に示すフローチャートである。
【0139】
[スキャン画像からのページ外形の抽出]
まず、ステップS41におけるスキャン画像からのページ外形の抽出処理について説明する。ここで、図12は上端にページ外形が存在するスキャン画像の一例を示す説明図、図13は図12に示したスキャン画像の綴じ部境界線左側の黒画素ヒストグラムである。図13に示すヒストグラムのx軸はスキャン画像の主走査方向(図12の上下方向)を示すものであり、スキャン画像の上端はヒストグラムの左端に対応付けられている。なお、ページ外形が下端に存在するスキャン画像の場合には、スキャン画像の下端がヒストグラムの右端に対応付けられることになる。したがって、図12に示すようにスキャン画像の上端にページ外形が存在する場合、スキャン画像の上部に黒い帯が現れることから、図13に示すヒストグラムの左端には高い縦棒が現れることになる。本実施の形態では、このような特性を利用して、スキャン画像にページ外形が存在するか否かの判断を行う。
【0140】
より具体的には、図13に示すように、綴じ部境界線からスキャン画像の左端(図12の左端)までの距離AO、ヒストグラム縦棒の高さBOとし、その比率を下記に示す式(1)により算出し、
【数1】

Figure 0003979639
算出された比率kが、予め定められた閾値よりも大きい場合に、スキャン画像にページ外形が存在すると判断する。
【0141】
なお、スキャン画像の上下にページ外形が存在する場合には、ヒストグラムの左右両端に高い縦棒が現れることになるので、このような場合には、ヒストグラムの左右両端の高い縦棒に基づいてスキャン画像にページ外形が存在するか否かの判断がそれぞれ実行される。
【0142】
ここに、ページ外形判別手段の機能が実行される。
【0143】
以上の処理により、スキャン画像にページ外形が存在すると判断された場合には、左右ページの上下辺のいずれにページ外形が存在しているのかという情報とともにページ外形を抽出し、RAM33に一時的に記憶する。
【0144】
なお、このスキャン画像にページ外形が存在するか否かの判断処理は、スキャン画像の綴じ部境界線を境にした左右ページ毎に実行される。
【0145】
[スキャン画像からの罫線の抽出]
続くステップS42においては、スキャン画像からの罫線の抽出処理を実行する。ステップS42におけるスキャン画像からの罫線の抽出処理について説明する。
【0146】
[罫線候補の検出]
ここで、図14は長い罫線が存在するスキャン画像の一例を示す説明図、図15は図14に示したスキャン画像の綴じ部境界線左側の黒画素ヒストグラムである。図15に示すヒストグラムのx軸はスキャン画像の主走査方向(図14の上下方向)を示すものであり、スキャン画像の上端はヒストグラムの左端に対応付けられている。図14に示すようにスキャン画像に罫線が存在する場合には、図15に示すヒストグラムに幅の狭いピークが現れることになる。本実施の形態では、このような特性を利用して、スキャン画像に罫線が存在するか否かの判断を行う。
【0147】
より具体的には、まず、図15に示すヒストグラムに現れた幅の狭いピークの高さHを求めるとともに、求められた各ピークの中央位置(高さが半分の位置)における幅Wを求める。そして、ピークの高さHが予め定められた閾値thHよりも高く、かつ、ピークの中央位置の幅Wが予め定められた閾値thWより小さなピークが存在する場合、そのピークを罫線の候補とする。
【0148】
ここに、罫線候補抽出手段の機能が実行される。
【0149】
続いて、罫線の候補とされたピークについて、罫線の連続性を利用して、更に罫線か否かの判断をする。図16に示すように、候補罫線上の適当な位置(例えば、ページの中心線の位置)を開始点とし、この開始点から候補罫線を左右方向へ探索し、切断点(罫線がかすれて途切れている部分)の数を累積する。切断点の数が予め定められた閾値より少なければ、この候補を罫線と判断する。このように罫線連続性に基づいて罫線か否かの判断をすることにより、罫線として誤って検出された小さな文字で構成された横書き文字行や点線等を排除することが可能になる。
【0150】
ここに、罫線判別手段の機能が実行される。
【0151】
[罫線の座標検出]
以上のようにして罫線を判別した後、各罫線の座標を検出する。罫線座標の検出は、図17に示すように、罫線の主走査方向(図17のy軸方向)の座標値を罫線部の黒画素ランの中点座標とした場合、図17に示す罫線の左端のx1における主走査方向座標値はy1となる。
【0152】
[最適罫線の選択]
次に、候補罫線の中から歪み補正に最適な罫線を選択する。図18に示すように複数の罫線が検出される場合、どの罫線を用いて歪み補正するかを選択する必要がある。最適な罫線の選択基準の一例としては、罫線の長さが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内(図18の網掛け領域)に罫線の一部がかかっていることを条件とし、その中で上下いずれかのページ外形に最も近い罫線を選択するようにする。図18においては、左右ページから各1本ずつの罫線を選択する場合を示している。ここでは、罫線▲1▼と罫線▲2▼とが選択されている。
【0153】
また、最適な罫線の選択基準の別の例としては、罫線の長さが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内(図19の網掛け領域)に罫線の一部がかかっていることを条件とし、各ページの上部では上端のページ外形に、各ページの下部では下端のページ外形に、それぞれ最も近い罫線を選択するようにする。図19においては、左右ページをさらに上下部分に分け、その各4ブロックにおいて1本ずつの罫線を選択する場合を示している。ここでは、左上のブロックでは罫線▲1▼、右下のブロックでは罫線▲2▼、左下のブロックでは罫線▲3▼が選択されている。なお、図19中の右上のブロックには上記2条件(罫線の長さが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内に罫線の一部がかかっている)を満足する罫線が存在しないので、選択された罫線はない。
【0154】
なお、上記2条件(罫線の長さが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内に罫線の一部がかかっている)については、その両方ではなくいずれか一方のみを満足するものであっても良い。また、選択基準として上例では「ページ外形に最も近い」を用いているが、これに限るものではなく、「罫線の湾曲が最も大きい」を用いても良い。ここで、「罫線の湾曲」は罫線の左右両端点の主走査方向の座標値の差で表すものとする。
【0155】
[最適罫線の座標値の決定]
最適な罫線が選択された場合には、罫線の(主走査方向の)座標値を決定する。罫線の(主走査方向の)座標値は、選択された罫線を左右ページのそれぞれ両端に達するまで近似して延長することにより決定される。図20において、罫線が存在しているBC部については、前述した罫線座標検出処理により既に座標値は決まっていることから、それ以外の延長部分について罫線の(主走査方向の)座標値を決定することになる。より詳細には、図20に示すAB部は直線近似で(主走査方向の)座標値を推定し、CD部は多項式近似曲線で(主走査方向の)座標値を推定する。
【0156】
[不適切な罫線の排除]
最後に不適切な罫線を排除する。これは、前述したように多項式近似により座標値を推定する際に、多項式近似による推定曲線の形状が不適切である場合には補正の際にかえって歪みが増大する恐れがあるので、このような罫線を排除するものである。不適切な近似曲線形状の例としては、図21に示すように、曲線が書籍の外側へ向かうような曲線▲1▼や、中心線を超えて大きく内側へ食い込むような曲線▲2▼である。
【0157】
なお、推定曲線の形状が不適切であるとして罫線を排除した場合には、再び最適な罫線を選択し、上記の処理を繰り返すことになる。
【0158】
以上の処理により、スキャン画像に罫線が存在すると判断された場合には、左右各ページのいずれの位置に罫線が存在しているのかという情報とともに罫線を抽出し、RAM33に一時的に記憶する。
【0159】
[スキャン画像からの文字行の抽出]
続くステップS43においては、スキャン画像からの文字行の抽出処理を実行する。ステップS43におけるスキャン画像からの文字行の抽出処理について説明する。本実施の形態においては、まず、スキャン画像中の文字行が縦書き文字行なのか、横書き文字行なのかの判別を行う。
【0160】
[文字行の判別]
スキャン画像中の文字行が縦書き文字行なのか、横書き文字行なのかの判別手法について説明する。ここで、図22は図8に示した画像の副走査方向の黒白反転数ヒストグラムである。図22中の横軸は、副走査方向(左右方向)の黒画素(スキャン画像を黒白反転させた画素の中でその濃度値が予め定めた濃度値よりも濃い画素)の主走査方向上での位置を示し、図22中の縦軸は、その位置毎の黒画素数を示すものである。また、図23は図8に示した画像の主走査方向の黒白反転数ヒストグラムである。図23中の横軸は、主走査方向(上下方向)の黒画素(スキャン画像を黒白反転させた画素の中でその濃度値が予め定めた濃度値よりも濃い画素)の副走査方向上での位置を示し、図23中の縦軸は、その位置毎の黒画素数を示すものである。画像中の文字が横書きの図8に示したようなスキャン画像の場合、図22に示すような副走査方向のヒストグラムは激しく変化するが、図23に示すような主走査方向のヒストグラムの変化は少ない。また、特に図示しないが、スキャン画像中の文字行が縦書き文字行である場合には、主走査方向のヒストグラムは激しく変化するが、副走査方向のヒストグラムの変化は少ない。
【0161】
上述したような判別手法は、具体的には下記に示す各式により実現される。まず、下記に示す式(2)により、
【数2】
Figure 0003979639
主走査方向yの位置でのヒストグラム値Pnt(y)の平均値meanが算出される。ここで、heightは画像の高さである。
そして、下記に示す式(3)により、
【数3】
Figure 0003979639
副走査方向のヒストグラムの主走査方向に関する分散σが得られる。
同様に、下記に示す式(4)により、
【数4】
Figure 0003979639
副走査方向xの位置でのヒストグラム値Pnt(x)の平均値meanが算出される。ここで、widthは画像の幅である。
そして、下記に示す式(5)により、
【数5】
Figure 0003979639
主走査方向のヒストグラムの副走査方向に関する分散σが得られる。
【0162】
上述したようにスキャン画像中の文字行が横書き文字行である場合には、副走査方向のヒストグラムの主走査方向に関する分散σが、主走査方向のヒストグラムの副走査方向に関する分散σより大きい。逆に、スキャン画像中の文字行が縦書き文字行である場合には、主走査方向のヒストグラムの副走査方向に関する分散σが、副走査方向のヒストグラムの主走査方向に関する分散σより大きい。つまり、分散σと分散σとの比較により、スキャン画像中の文字行が縦書き文字行なのか、横書き文字行なのかの判別が可能になっている。
【0163】
なお、スキャン画像中の文字行が縦書き文字行なのか、横書き文字行なのかの判別に、黒白反転数ヒストグラムを用いたのは、文字行と写真部分との混同を避けるためである。一般に、黒画素ヒストグラムの値が同程度の場合、文字領域のほうが写真領域よりも黒白反転数ヒストグラムの値が大きくなるからである。
【0164】
ここに、文書判別手段の機能が実行される。
【0165】
[横書き文字行の座標検出]
以上のようにして文字行を判別した後、まず、各横書き文字行の座標を検出する。横書き文字行の座標の検出にあたっては、文字単位の外接矩形抽出処理を行うとともに、横書き文字行の抽出処理を行う。なお、文字認識処理については周知の技術であるので、その説明は省略する。ここで、スキャン画像の文字外接矩形抽出処理および文字行抽出処理の結果の一例を図24に示す。そして、各文字の外接矩形の中心点の座標をその文字の座標とみなし、横書き文字行の座標を検出する。
【0166】
[最適横書き文字行の選択]
次に、抽出した横書き文字行の中から歪み補正に最適な横書き文字行を選択する。複数の横書き文字行が検出される場合、どの横書き文字行を用いて歪み補正するかを選択する必要がある。最適な横書き文字行の選択基準の一例としては、前述した最適な罫線の選択基準と基本的に同様であって、図25に示すように横書き文字行の長さBCが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内(図25の網掛け領域)に横書き文字行の一部Cがかかっていることを条件とし、その中で上下いずれかのページ外形に最も近い横書き文字行を選択するようにする。ここで、Bは文字行の一番左の矩形の中心であり、Cは一番右の矩形の中心である。なお、最適な横書き文字行の選択は、左右ページから各1本ずつのページ外形に最も近い横書き文字行を選択するものであっても良いし、左右ページをさらに上下部分に分け、その各4ブロックにおいて1本ずつのページ外形に最も近い横書き文字行を選択するものであっても良い。
【0167】
なお、上記2条件(横書き文字行の長さが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内に横書き文字行の一部がかかっている)については、その両方ではなくいずれか一方のみを満足するものであっても良い。また、選択基準として上例では「ページ外形に最も近い」を用いているが、これに限るものではなく、「横書き文字行の湾曲が最も大きい」を用いても良い。ここで、「横書き文字行の湾曲」は横書き文字行の両端の文字外接矩形の中心座標の主走査方向の座標値の差で表すものとする。
【0168】
[最適横書き文字行の座標値の決定]
最適な横書き文字行が選択された場合には、横書き文字行の(主走査方向の)座標値を決定する。横書き文字行の(主走査方向の)座標値は、横書き文字行内の各文字外接矩形の中心点を連結し、直線部分と曲線部分とを近似して抽出することにより横書き文字行の(主走査方向の)座標値を決定することになる。より詳細には、図25に示すDは綴じ部境界線であり、BDの間は多項式近似曲線で(主走査方向の)座標値を推定し、一番左端のAとBとの間は近似直線の値で(主走査方向の)座標値を推定する。
【0169】
[不適切な横書き文字行の排除]
最後に不適切な横書き文字行を排除する。これは、前述したように多項式近似により座標値を推定する際に、多項式近似による推定曲線の形状が不適切である場合には補正の際にかえって歪みが増大する恐れがあるので、このような横書き文字行を排除するものである。不適切な近似曲線形状の例としては、前述した罫線の場合と同様であって、特に図示しないが、曲線が書籍の外側へ向かうような場合や、中心線を超えて大きく内側へ食い込むような場合である。
【0170】
なお、推定曲線の形状が不適切であるとして横書き文字行を排除した場合には、再び最適な横書き文字行を選択し、上記の処理を繰り返すことになる。
【0171】
以上の処理により、スキャン画像に横書き文字行が存在すると判断された場合には、左右各ページのいずれの位置に横書き文字行が存在しているのかという情報とともに横書き文字行を抽出し、RAM33に一時的に記憶する。
【0172】
[縦書き文字行の各文字の座標検出]
続いて、各縦書き文字行の座標を検出する。縦書き文字行の座標の検出にあたっては、文字単位の外接矩形抽出処理を行う。なお、文字認識処理については周知の技術であるので、その説明は省略する。そして、各文字の外接矩形の中心点の座標をその文字の座標とみなす。
【0173】
[横書き文字行の抽出]
次に、各縦書き文字行から横書き文字行を抽出する。横書き文字行の抽出は、各縦書き文字行の一番上の文字を連結した外形、または、各縦書き文字行の一番下の文字を連結した外形を横書き文字行とみなすものである。より詳細には、左右ページから各1本ずつの文字行を選択する場合は、各縦書き文字行の一番上もしくは一番下の各一文字を連結した外形を一つの行とみなして抽出する。また、左右ページをさらに上下部分に分け、その4ブロックにおいて1本ずつの文字行を選択する場合は、左上部、右上部においては各縦書き文字行の一番上の各一文字を連結した外形を一つの行とみなし、左下部、右下部においては各縦書き文字行の一番下の各一文字を連結した外形を一つの行とみなして抽出する。
【0174】
その際、図26に示すように抽出された外形の長さBCが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内(図26の網掛け領域)に抽出された外形の一部Cがかかっていることを条件とし、外形を抽出する。なお、上記2条件(抽出された外形の長さが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内に抽出された外形の一部がかかっている)については、その両方ではなくいずれか一方のみを満足するものであっても良い。したがって、上記条件を満足しない場合は、歪み補正用の縦書き文字行の外形は無いということになる。
【0175】
[抽出された外形の座標値の決定]
縦書き文字行に応じて外形が抽出された場合には、なお、縦書き文字行の外形の(主走査方向の)座標値を決定する。縦書き文字行の外形の座標値は、図27に示すように、各縦書き文字行の一番上の各一文字を連結した外形である場合には、連結する各文字の外接矩形の上辺中心点を連結し、直線部分と曲線部分とを近似して抽出することにより縦書き文字行の外形の(主走査方向の)座標値を決定することになる。また、図27に示すように、各縦書き文字行の一番下の各一文字を連結した外形である場合には、連結する各文字の外接矩形の下辺中心点を連結し、直線部分と曲線部分とを近似して抽出することにより縦書き文字行の外形の(主走査方向の)座標値を決定することになる。より詳細には、図26に示すDは綴じ部境界線であり、BDの間は多項式近似曲線で(主走査方向の)座標値を推定し、一番左端のAとBとの間は近似直線の値で(主走査方向の)座標値を推定する。
【0176】
[不適切な縦書き文字行の外形の排除]
最後に不適切な縦書き文字行の外形を排除する。これは、前述したように多項式近似により座標値を推定する際に、多項式近似による推定曲線の形状が不適切である場合には補正の際にかえって歪みが増大する恐れがあるので、このような縦書き文字行の外形を排除するものである。不適切な近似曲線形状の例としては、前述した罫線や横書き文字行の場合と同様であって、特に図示しないが、曲線が書籍の外側へ向かうような場合や、中心線を超えて大きく内側へ食い込むような場合である。
【0177】
なお、推定曲線の形状が不適切であるとして縦書き文字行の外形を排除した場合には、歪み補正用の縦書き文字行の外形は無いということになる。
【0178】
以上の処理により、スキャン画像に縦書き文字行の外形が存在すると判断された場合には、左右各ページのいずれの位置に縦書き文字行の外形が存在しているのかという情報とともに縦書き文字行の外形を抽出し、RAM33に一時的に記憶する。
【0179】
なお、以下においては、横書き文字行及び縦書き文字行の外形を文字列として扱うものとする。
【0180】
以上、ステップS41〜S43の処理により、ページ外形/罫線/文字行の抽出処理(ステップS4)が終了する。
【0181】
続くステップS5(図6参照)においては、画像歪み補正処理を実行する。画像歪み補正処理は、図28に示すように、概略的には、歪み補正(伸張)に際しての基準となる線(基準線)としてスキャン画像の上辺(もしくは下辺)の近傍に位置するページ外形/罫線/文字行のいずれかを選択する処理(ステップS51:基準線選択処理)、基準線に対応するものであって補正率(伸張率)の算出用の参照線としてスキャン画像の上辺(もしくは下辺)の近傍に位置するページ外形/罫線/文字行のいずれかを選択する処理(ステップS52:参照線選択処理)、基準線が罫線や文字行の場合に、基準線より下部の画像情報の欠落を最小限にするための仮想的なページ外形を算出する処理(ステップS53:仮想ページ外形算出処理)、仮想的なページ外形に基づいてスキャン画像に伸張処理を施して主走査方向の歪みを補正する処理(ステップS54:主走査方向歪み補正処理)、補正画像の文字外接矩形に基づいてスキャン画像に伸張処理を施して副走査方向の歪みを補正する処理(ステップS55:副走査方向歪み補正処理)により構成されている。
【0182】
ここで、基準線選択処理(ステップS51)及び参照線選択処理(ステップS52)においては、基準線または参照線として、スキャン画像の上辺(もしくは下辺)の近傍に位置するページ外形/罫線/文字行のいずれかを選択することになるが、本実施の形態におけるページ外形、罫線、文字行の選択の優先順位は、
ページ外形>罫線>文字行
とされている。このような選択優先順位にしたのは、文字行はページ外形や罫線に比べて抽出精度が低く、また、画像の外側にあるページ外形を利用する方が精度の高い歪み補正率を得ることができるためである。ただし、本実施の形態においては、ページ外形は一般に左右ページにまたがるが、罫線や文字行は両ページにあるとは限らないので、スキャン画像の上辺または下辺からの基準線選択の優先順位は、下記に示すようになる。
【0183】
1.「ページ外形」(ページ外形は、常に左右両ページに存在する)
2.左右両ページともに「罫線」
3.一方のページが「罫線」、他方のページが「文字行」
4.左右両ページともに「文字行」
5.一方のページのみに「罫線」、他方のページには「手がかりなし」
6.一方のページのみに「文字行」、他方のページには「手がかりなし」
ここで、「手がかりなし」とは、ページ外形、罫線、文字行のいずれも抽出できなかった場合を言う。
【0184】
次に、仮想ページ外形算出処理(ステップS53)及び主走査方向歪み補正処理(ステップS54)の例について、上記優先順位に基づいて順に説明する。
【0185】
1.スキャン画像の上辺及び下辺のいずれにも「ページ外形」が存在する場合ここでは、スキャン画像の上辺及び下辺のいずれにも「ページ外形」が存在する場合について説明する。図29に示すように、スキャン画像の上辺及び下辺のいずれにも「ページ外形」が存在する場合は、いずれを基準線、参照線にしても構わない。なお、本実施の形態においては、基準線として選択した「ページ外形」、「罫線」、「文字行」は、下辺に位置させるものとする。この場合においては、基準線と仮想ページ外形とは一致していることから、仮想ページ外形算出処理(ステップS53)においては特に処理を実行しなくても良い。
【0186】
次いで、主走査方向歪み補正処理(ステップS54)について説明する。ここで、x0は「ページ外形」の直線部分と曲線部分との境界点である。主走査方向歪み補正処理としては、まず、この境界点x0における基準線と参照線間の距離h0(図30参照)に基づいて歪み補正率を算出する。歪み補正率は、主走査方向に画像を伸張して補正する際に、基準線と参照線との間の距離を副走査方向の全ての位置において等しくさせるためのものである。すなわち、位置xにおける基準線と参照線間の距離をh(図30参照)とした場合には、位置xにおける歪み補正率は、
h0/h
として表すことができる。即ち、歪み補正率とは、主走査方向に画像を伸張して補正する際に、基準線と参照線との間の距離を副走査方向の全ての位置xにおいて等しくなるように、各xに関して算出した値である。
【0187】
ここに、主走査方向歪み補正率算出手段の機能が実行される。
【0188】
次に、実際に補正をする際は、まず、図30に示すように仮想ページ外形(ここでは基準線)が直線(最下辺)になるように、主走査方向に各画素をシフトする。その後、副走査方向の全ての位置xにおいて、画像を主走査方向の上辺側にh0/hで伸張すれば、図30の上辺の「ページ外形」EがREとなるように画像が補正される。
【0189】
ここに、主走査方向歪み補正手段の機能が実行される。ここに、ページ外形画像歪み補正手段の機能が実行される。
【0190】
2.スキャン画像の上辺及び下辺のいずれか一方に「ページ外形」が存在し、他方の辺には「罫線」と「文字行」とが存在する場合
ここでは、スキャン画像の上辺及び下辺のいずれか一方に「ページ外形」が存在し、他方の辺ではページ外形が途中で切れているが「罫線」と「文字行」とが存在する場合について説明する。図31に示すように、スキャン画像の上辺及び下辺のいずれか一方に「ページ外形」が存在し、他方の辺には「罫線」と「文字行」とが存在する場合は、「ページ外形」を基準線として下辺に位置させ、「文字行」と「罫線」とを参照線とする(図31に示す例では、左ページが「文字行」、右ページが「罫線」である)。この場合においても、基準線と仮想ページ外形とは一致していることから、仮想ページ外形算出処理(ステップS53)においては特に処理を実行しなくても良い。
【0191】
次いで、主走査方向歪み補正処理(ステップS54)について説明する。ここで、x0は「ページ外形」の直線部分と曲線部分との境界点である。主走査方向歪み補正処理としては、まず、この境界点x0における基準線と参照線間の距離h0(図32参照)に基づいて歪み補正率を算出する。位置xにおける基準線と参照線間の距離をh(図32参照)とした場合には、位置xにおける歪み補正率は、
h0/h
として表すことができる。
【0192】
ここに、主走査方向歪み補正率算出手段の機能が実行される。
【0193】
次に、実際に補正をする際は、まず、図32に示すように仮想ページ外形(ここでは基準線)が直線(最下辺)になるように、主走査方向に各画素をシフトする。その後、副走査方向の全ての位置xにおいて、画像を主走査方向の上辺側にh0/hで伸張すれば、図32の右ページでは、上辺の「罫線」LUがRLUとなるように画像が補正される。左ページ上辺の「文字行」についても同様に行う。
【0194】
ここに、主走査方向歪み補正手段の機能が実行される。ここに、ページ外形画像歪み補正手段の機能が実行される。
【0195】
3.スキャン画像の左右両ページの上辺及び下辺のいずれか一方に「罫線」が存在し、他方の辺には「罫線」と「文字行」とが存在する場合
ここでは、スキャン画像の左右両ページの上辺及び下辺のいずれか一方に「罫線」が存在し、他方の辺には「罫線」と「文字行」とが存在する場合について説明する。スキャン画像の左右両ページの上辺及び下辺のいずれか一方に「罫線」が存在し、他方の辺には「罫線」と「文字行」とが存在する場合は、図33に示すように、左右両ページに「罫線」が存在する側を下辺に位置させ、その2本の「罫線」を基準線とし、他方の辺に位置する「文字行」と「罫線」とを参照線とする(図33に示す例では、左ページが「文字行」、右ページが「罫線」である)。ところで、このように、基準線が「ページ外形」ではない場合は、基準線をそのまま仮想ページ外形と見なしてはならない。なぜなら、両者を一致させた場合、後の主走査方向歪み補正処理において仮想ページ外形(基準線)を最下辺に画素シフトする際、基準線より下方の画像情報が全て欠落してしまうからである。
【0196】
そこで、基準線が「ページ外形」でない場合は、図33において点線で示すような仮想ページ外形VEを求める仮想ページ外形算出処理(ステップS53)を実行する。ここで、x0は下辺の「罫線」LDの直線部分と曲線部分との境界点である。仮想ページ外形算出処理は、境界点x0における「罫線」LDからスキャン画像の最下辺までの距離a0と、境界点x0における「罫線」LDから上辺の「罫線」LUまでの距離b0とに基づいて仮想ページ外形VEを算出するものである。すなわち、「罫線」LD上の位置xから上辺の「罫線」LUまでの距離bが解かれば、
a/b=a0/b0
であることから、「罫線」LD上の位置xから仮想ページ外形VEまでの距離aが算出することができる。したがって、「罫線」LD上の位置から仮想ページ外形VEまでの距離を副走査方向の全ての位置xにおいて算出することにより、仮想ページ外形VEを求めることができる。このような処理は、左右ページについてそれぞれ独立に行われる。
【0197】
次いで、主走査方向歪み補正処理(ステップS54)について説明する。主走査方向歪み補正処理としては、まず、前述した境界点x0における「罫線」LDからスキャン画像の最下辺までの距離a0と、境界点x0における「罫線」LDから上辺の「罫線」LUまでの距離b0とを加算した距離h0(h0=a0+b0)に基づいて歪み補正率を算出する。位置xにおける上辺の「罫線」LUからスキャン画像の最下辺までの距離をh(h=a+b)とした場合には、位置xにおける歪み補正率は、
h0/h
として表すことができる。
【0198】
ここに、主走査方向歪み補正率算出手段の機能が実行される。
【0199】
次に、実際に補正をする際は、まず、図34に示すように仮想ページ外形VEが直線(最下辺)になるように、主走査方向に各画素をシフトする。その後、副走査方向の全ての位置xにおいて、画像を主走査方向の上辺側にh0/hで伸張すれば、図34の右ページでは、上辺の「罫線」LUがRLU(厳密には、xの位置は「罫線」LUの直線部と曲線部との境界には一致しないが、ここでは「罫線」LDの境界をそのまま用いる)となるように画像が補正される。左ページ上辺の「文字行」についても同様に行う。
【0200】
ここに、主走査方向歪み補正手段の機能が実行される。ここに、罫線/文字行画像歪み補正手段の機能が実行される。
【0201】
このように、仮想ページ外形VEを利用することで、シフトによる画像の欠落を最小限に抑えることができる。
【0202】
4.スキャン画像の左右両ページの上辺及び下辺のいずれか一方に「罫線」と「文字行」とが存在し、他方の辺の一方のページのみに「罫線」が存在する場合ここでは、スキャン画像の左右両ページの上辺及び下辺のいずれか一方に「罫線」と「文字行」とが存在し、他方の辺の一方のページのみに「罫線」が存在する場合について説明する。スキャン画像の左右両ページの上辺及び下辺のいずれか一方に「罫線」と「文字行」とが存在し、他方の辺の一方のページのみに「罫線」が存在する場合(他方のページは「手がかりなし」)は、図35に示すように、「罫線」と「文字行」とが存在する側を下辺に位置させ、それらの「罫線」と「文字行」とを基準線とし、他方の辺に位置する「罫線」とスキャン画像を副走査方向に貫く中心線Cとを参照線とする(図35に示す例では、左ページが「罫線」、右ページが「手がかりなし」である)。なお、中心線Cは、スキャン画像の主走査方向の中心を副走査方向に横切る線であり、ブック原稿40の中心線ではない。
【0203】
このように基準線が「ページ外形」でない場合は、前述したように、図35において点線で示すような仮想ページ外形VEを求める仮想ページ外形算出処理(ステップS53)を実行する。ここで、x0は下辺の「罫線」LDの直線部分と曲線部分との境界点である。仮想ページ外形算出処理は、境界点x0における「罫線」LDからスキャン画像の最下辺までの距離a0と、境界点x0における「罫線」LDから中心線Cまでの距離b0とに基づいて仮想ページ外形VEを算出するものである。すなわち、「罫線」LD上の位置xから中心線Cまでの距離bが解かれば、
a/b=a0/b0
であることから、「罫線」LD上の位置xから仮想ページ外形VEまでの距離aが算出することができる。したがって、「罫線」LD上の位置から仮想ページ外形VEまでの距離を副走査方向の全ての位置xにおいて算出することにより、仮想ページ外形VEを求めることができる。このような処理は、左右ページについてそれぞれ独立に行われる。なお、右ページのように上辺に「罫線」が存在する場合については、中心線Cに代えて、前述したように上辺の「罫線」を用いる。
【0204】
次いで、主走査方向歪み補正処理(ステップS54)について説明する。主走査方向歪み補正処理としては、まず、前述した境界点x0における「罫線」LDからスキャン画像の最下辺までの距離a0と、境界点x0における「罫線」LDから中心線Cまでの距離b0とを加算した距離h0(h0=a0+b0)に基づいて歪み補正率を算出する。位置xにおける中心線Cからスキャン画像の最下辺までの距離をh(h=a+b)とした場合には、位置xにおける歪み補正率は、
h0/h
として表すことができる。
【0205】
ここに、主走査方向歪み補正率算出手段の機能が実行される。
【0206】
次に、実際に補正をする際は、まず、図36に示すように仮想ページ外形VEが直線(最下辺)になるように、主走査方向に各画素をシフトする。その後、副走査方向の全ての位置xにおいて、画像を主走査方向の上辺側にh0/hで伸張して補正する。左ページ上辺の「罫線」についても同様に行う。なお、右ページについては、補正によってシフトにより一旦歪んだ中心線Cが元の直線RCに戻るが、Cがスキャナ部1の光軸と一致する場合以外は、画像全体の補正は不完全となる。
【0207】
ここに、主走査方向歪み補正手段の機能が実行される。ここに、罫線/文字行画像歪み補正手段の機能が実行される。
【0208】
5.スキャン画像の左右いずれかのページの上辺及び下辺のいずれか一方に「罫線」が存在し、他方の辺の他方のページのみに「文字行」が存在する場合
ここでは、スキャン画像の左右いずれかのページの上辺及び下辺のいずれか一方に「罫線」が存在し、他方の辺の他方のページのみに「文字行」が存在する場合について説明する。スキャン画像の左右いずれかのページの上辺及び下辺のいずれか一方に「罫線」が存在し(他方のページは「手がかりなし」)、他方の辺の他方のページのみに「文字行」が存在する場合(一方のページは「手がかりなし」)は、図37に示すように、「罫線」が存在する側を下辺に位置させ、その「罫線」を基準線とし、「罫線」が存在しない方のページ(「文字行」が存在する方のページ)については、文字行Lを中心線Cを挟んで線対称の位置に移動させた曲線SLを基準線とする。参照線については、「罫線」が存在するページは中心線Cを、「文字行」が存在するページはその「文字行」を、それぞれ参照線とする。
【0209】
なお、歪み補正率の算出や画素シフト、補正(伸張)処理についてはこれまでの例と同様であるため、それらの説明は省略する。
【0210】
ここに、罫線/文字行画像歪み補正手段の機能が実行される。
【0211】
最後に、副走査方向歪み補正処理(ステップS55)について説明する。ここで、図38は副走査方向歪み補正処理の流れを概略的に示すフローチャートである。図38に示すように、ステップS101においては、主走査方向歪み補正されたスキャン画像に基づいて文字の外接矩形A(図39参照)を抽出する。ここで、文字認識処理については周知の技術であるので、その説明は省略する。このように文字の外接矩形Aを抽出するのは、この文字の外接矩形Aの形状の変化を基に、副走査方向の歪みを補正するためである。ここでは、図39に示すように、文字外接矩形Aの横辺の長さw、縦辺の長さh、および、文字の中心Bを定義する。ここで、文字の中心Bは、外接矩形Aの対角線の交点である。
【0212】
続いて、図40に示すように、スキャン画像をブック原稿40のページ綴じ部41に平行な方向の複数の短冊状の領域Cに分割した後(ステップS102)、各短冊領域Cについて、そこに含まれる文字外接矩形Aに関する特徴量を求める(ステップS103)。ここで、ある短冊領域Cに含まれる文字外接矩形Aとは、その中心が当該短冊領域Cに含まれるような外接矩形Aのことである。例えば、図40の短冊領域C1に含まれる外接矩形Aは、図中の網掛けを施した矩形である。
【0213】
さて、上記の文字外接矩形Aに関する特徴量は、
(文字の横辺の長さ)/(文字の縦辺の長さ)=w/h
を基に求められる。すなわち、各短冊領域Cについて、そこに含まれる全ての文字外接矩形Aのw/hの値の平均値をその短冊領域Cの特徴量とするのである。
【0214】
しかしながら、単に、w/hの平均値を算出すると不適切な場合がある。文字の中には、句読点や数式中の記号のようにそのサイズが元々小さく、w/hの値が不安定なものがある。また、矩形抽出の際に隣接する文字同士がくっついて抽出されてしまい、wが極端に大きい文字外接矩形Aが生じる場合もある。特徴量を求める場合は、このような特殊な文字や極端にwが大きいものを予め排除しておく必要がある。そこで、続くステップS104においては、予め閾値を定めておいて、hの値がその閾値より小さな文字外接矩形Aを予め排除するとともに、w/hの比率に関する閾値を予め定めておき、w/hの値が其の閾値よりも大きい文字外接矩形Aも予め排除する。例えば、図41中に示した網掛けを施した文字外接矩形Aが予め排除されることになる。
【0215】
続くステップS105においては、前述したように極端な文字外接矩形Aを排除した後に、各短冊領域C内の文字外接矩形Aのw/hの平均値を求める。図42に各短冊領域C内の外接矩形Aのw/hの平均値の一例を示す。なお、図42中の短冊領域C2は、ブック原稿40のページ綴じ部41を含む短冊領域である。
【0216】
続いて、ブック原稿40のページ綴じ部41を含む短冊領域C2に文字外接矩形Aが存在するか否かを判断する(ステップS106)。これは、図41に示すように、一般にはブック原稿40のページ綴じ部41付近には文字外接矩形Aが存在しない場合が多いからである。ブック原稿40のページ綴じ部41を含む短冊領域C2に文字外接矩形Aが存在する場合は(ステップS106のY)、その文字外接矩形Aを利用して特徴量は算出されているのでそのままステップS108に進む。
【0217】
一方、ブック原稿40のページ綴じ部41を含む短冊領域C2に文字外接矩形Aが存在しない場合は(ステップS106のN)、ステップS107に進み、ブック原稿40のページ綴じ部41を含む短冊領域C2の特徴量を求める。なお、ブック原稿40のページ綴じ部41を含む短冊領域C2の識別は、例えば、スキャン画像(例えば、モノクロ多値画像)の地肌濃度変化を各短冊領域Cごとに求め、短冊領域C内の最も濃度の薄い濃度値を求めることにより実現される。図43は地肌濃度変化を求めた一例を示したものであり、地肌濃度が最も濃い短冊領域が、ブック原稿40のページ綴じ部41を含む短冊領域C2であるとみなされる。
【0218】
なお、スキャン画像がカラー多値画像の場合におけるブック原稿40のページ綴じ部41を含む短冊領域C2の識別は、例えばRGB成分の何れか一つの成分(例えばG成分)に着目し、そのG成分の地肌濃度を使用して識別するようにすれば良い。また、RGBを色変換して輝度成分と色差成分とに分け、輝度成分を使用してブック原稿40のページ綴じ部41を含む短冊領域C2を識別するようにしても良い。
【0219】
ブック原稿40のページ綴じ部41を含む短冊領域C2の特徴量は、次のようにして定められる。ここでは、統計的特徴量の算出対象となり得る文字外接矩形Aが存在し、かつ、ページ綴じ部41を含む短冊領域C2の最近傍である短冊領域Cの特徴量に対して予め定めた定数値を乗じることにより算出された値が、ブック原稿40のページ綴じ部41を含む短冊領域C2における特徴量とみなされるものである。つまり、図42に示した例では、ブック原稿40のページ綴じ部41を含む短冊領域C2の左右何れの短冊領域C3,C4にも文字外接矩形Aが存在するので、どちらか適当な方の特徴量を選択し(ここでは右側の○印の方)、それに予め定めた定数値(ここでは0.5)を乗じて、これをブック原稿40のページ綴じ部41を含む短冊領域C2の特徴量としている。
【0220】
続くステップS108においては、各短冊領域Cの特徴量に対する適切なフィルタリング処理、例えば、短冊領域Cの位置の変化方向(即ち副走査方向)に関する移動平均を求める処理を施すなどして、短冊領域Cの位置の変化に対する(副走査方向の)特徴量の変化がなだらかになるようにする。ただし、ここでもブック原稿40のページ綴じ部41付近は特別な処理が必要となる。なぜなら、副走査方向に関して長さが全て等しいウィンドウを用いてフィルタリングを行うと、ブック原稿40のページ綴じ部41付近の特徴量の変化の鋭さが失われてしまうからである。
【0221】
ここで、長さが全て5であるウィンドウを用いて図42に示した各短冊領域Cの特徴量に対してフィルタリング処理を施した結果を図44に示す。図44に示すように、長さが全て5であるウィンドウを用いてフィルタリング処理を施した場合には、ブック原稿40のページ綴じ部41付近の特徴量(w/h)の変化がなだらかになり過ぎてしまう。このような場合には、ブック原稿40のページ綴じ部41付近での適切な画像補正が不可能になってしまう。
【0222】
そこで、本実施の形態においては、フィルタリング処理の際には、フィルタのウィンドウがブック原稿40のページ綴じ部41を含む短冊領域C2の両側の短冊領域C3,C4に跨がらないように、ページ綴じ部41付近でウィンドウ長を調整する。ここで、図45はページ綴じ部41付近でウィンドウ長を調整してフィルタリング処理を施した結果を示すグラフである。図45に示すように、ページ綴じ部41付近でウィンドウ長を調整した場合には、ページ綴じ部41付近の特徴量(w/h)の変化を適切に表現できるので、良好な画像補正が実現できる。
【0223】
続くステップS109においては、各短冊領域Cの推定歪み量を算出する。各短冊領域Cの推定歪み量の算出手法は、以下に示す通りである。
【0224】
まず、短冊領域の歪み量を算出するための基準となる短冊領域(基準短冊領域)を定める。ここでは、歪みが最も小さいと考えられる短冊領域C、例えば、特徴量(w/h)が最大である短冊領域Cを基準短冊領域とする。この処理は左右ページで共通に行っても良いが、左右独立に基準短冊領域を定めても構わない。図45においては、左右独立に基準短冊領域を定めた例を示しており、○印を施した短冊領域Cが基準短冊領域であり、左側の基準特徴量を“Lw0/Lh0”、右側の基準特徴量を“Rw0/Rh0”、でそれぞれ示している。
【0225】
次に、基準短冊領域の特徴量w0/h0をスキャン画像全体の基準特徴量とし、
(各短冊領域の特徴量)/(基準特徴量)=(w/h)/(w0/h0)
の値を、各短冊領域の推定歪み量として算出する。
【0226】
なお、ブック原稿40のページ綴じ部41から外れたページ外側付近の短冊領域Cを基準短冊領域とすると、ブック原稿40のページ綴じ部41付近とはフォントや活字のサイズの違いが大きくて、適切な推定歪み量が算出できない場合も考えられる。そのような画像を対象とする場合は、基準短冊領域の探索範囲を予めブック原稿40のページ綴じ部41付近に限定しておくのが有効である。これを実現するためには、地肌濃度が予め定めた濃度よりも濃い短冊領域Cのみから基準短冊領域を求めるようにすれば良い。
【0227】
最後に、スキャン画像に対して、短冊領域Cの短辺方向(副走査方向)の拡大処理を行い、ブック原稿40のページ綴じ部41付近の歪みを補正する(ステップS110)。その場合の拡大率(副走査方向の歪み補正率(伸張率))は、ステップS109において算出した推定歪み量の逆数、すなわち、
(基準特徴量)/(各短冊領域の特徴量)=(w0/h0)/(w/h)
とする。ここで、上記の基準短冊領域を左右共通に定めた場合には、この拡大率も左右共通の基準特徴量によって算出し、独立に定めた場合には、左右それぞれの基準特徴量で独立に算出するようにする。図46は、図45に示した特徴量に基づいて算出した補正拡大率を示したものである。
【0228】
ここに、副走査方向歪み補正率算出手段の機能および副走査方向歪み補正手段の機能が実行される。
【0229】
なお、ここでも、ブック原稿40のページ綴じ部41付近から離れた短冊領域Cはもともと画像の歪みが無い領域である可能性が高いので、拡大処理の対象としない方が良い場合がある。拡大処理を行ったために、かえって不自然な歪みが生じてしまう可能性があるからである。これを防ぐために、地肌濃度が予め定めた濃度よりも薄い短冊領域Cについては、推定歪み量を“1”とする。
【0230】
また、短冊領域C内において共通の補正拡大率を適用した場合、隣接する短冊領域Cの境界部での補正拡大率が不連続となるため、補正画像が不自然となる。そこで、隣接する短冊領域Cの境界部での補正拡大率が連続的に変化するように、補正拡大率を予め補正しておく。これは、例えば図46に示す短冊領域Cの中央部分の補正拡大率を推定歪み量の逆数を示す点としてプロットし、これらの点を線分で結んで直線補完することで、他の部分の補正拡大率とすることで実現できる。以上の処理により、スキャン画像の副走査方向の補正拡大率が確定する。
【0231】
なお、画像の拡大処理は、例えばコピーの変倍機能として良く使われる3次関数のコンボリューション法等を用いて実行される。
【0232】
以上、ステップS101〜S110の処理により副走査方向歪み補正処理(ステップS55)が終了し、図6に示すスキャン画像の歪み補正処理が終了する。ここで、図47は歪みを補正した画像を示す平面図である。以上の処理によれば、図8に示したようなブック原稿40のページ綴じ部41の近傍において生じていたスキャン画像の歪みが、図47に示すように補正されることになる。
【0233】
ここに、主走査方向のスキャン画像の歪みの補正に用いられる歪み補正率(伸張率)が、ページ外形、罫線、文字行またはスキャン画像を副走査方向に貫く画像中心線の形状というスキャン画像中の情報のみから求められる。これにより、ブック原稿40のページ綴じ部41とスキャナ部1の主走査方向とが平行な場合に、スキャナ部1の固有パラメータ(レンズの焦点面距離、スキャン光軸の位置(アドレス))に依存しない歪み補正率(伸張率)を用いてスキャン画像に対する歪み補正を行うことが可能になるので、スキャナ部1の固有パラメータに依存することのない汎用的な装置の提供が可能になる。
【0234】
ここに、スキャン画像の歪み補正の際には、まず、スキャン画像にページ外形が存在するか否かが判別され、ページ外形が存在する場合は、罫線や文字行に優先してページ外形を用いてスキャン画像の歪みが補正される。これにより、ページ外形は、文字行や罫線に比べて安定して抽出でき、かつ、スキャン画像の上端や下端により近い部分に位置しており歪みの程度が大きいので歪み形状(歪み率)の推定の安定性も増すことから、スキャン画像の歪み補正の補正精度を向上させることが可能になる。
【0235】
また、スキャン画像から罫線候補が抽出され、切断点の数が予め定めた閾値より少ない罫線候補のみが罫線と判別される。これにより、点線や細い文字行等を誤って罫線として抽出することを防止することが可能になるので、罫線の形状に基づくスキャン画像の歪み補正の補正精度を向上させることが可能になる。
【0236】
さらに、黒画素ヒストグラムではなく黒白反転数ヒストグラムに基づいて原稿が横書き文書か縦書き文書かが判別されるので、一般に黒画素ヒストグラムの値が同程度の場合には文字領域のほうが写真領域よりも黒白反転数ヒストグラムの値が大きくなることから、文字領域と写真領域の混同が回避される。これにより、写真部分を文字行として誤認識することが防止されるので、文字行の形状に基づくスキャン画像の歪み補正の補正精度を向上させることが可能になる。
【0237】
次に、本発明の第二の実施の形態を図48及び図49に基づいて説明する。なお、前述した第一の実施の形態と同じ部分は同じ符号で示し説明も省略する。本実施の形態は、第一の実施の形態とは、主走査方向歪み補正処理が異なるものである。
【0238】
ここで、図48は本実施の形態の主走査方向歪み補正処理を説明するための説明図である。図48においては、補正前の基準線、参照線をそれぞれ実線で、補正後の基準線、参照線をそれぞれ点線で表している。補正後の点線は、補正前の基準線、参照線の直線部分(平坦部)をそのまま延長したものである。図48においては、基準線及び参照線として罫線を例にあげて説明しているが、ページ外形、文字行または仮想ページ外形であっても良い。
【0239】
ここで、副走査方向の位置xにおいて、基準線上の点PがP'に、参照線上の点QがQ'に、それぞれ補正される。さて、位置xにおける主走査方向上の任意の点YがY'に補正されるとすると、次の関係式が成り立つ。
YP/YQ=Y'P'/Y'Q'
よって、各点の主走査方向の位置を、点PならP(x)というように表すと、
(Y(y)−P(y))/(Y(y)−Q(y))
=(Y'(y)−P'(y))/(Y'(y)−Q'(y))
となるので、これを変形して、
Y(y)=((P(y)−Q(y))/(P'(y)−Q'(y)))Y'(y)
+(P'(y)Q(y)−P(y)Q'(y))/(P'(y)−Q'(y))
となる。
【0240】
上式を利用して、補正後にY'(y)の位置に来るべき点の補正前の位置Y(y)を求めることができる。つまり、補正前のY(y)の画素値を補正後のY'(y)に移せば良いわけである。
【0241】
ただし、Y(y)の算出値は一般に小数となるので、その前後の整数位置に対応する画素値の線形補間結果を用いる。即ち、図49において、Y(y)の前後の整数をそれぞれN,N+1、これに対応する画素値をD(N),D(N+1)とすると、Y(y)における画素値D(Y(y))は図49に示したような線形関係を満足するように算出する。なお、ここで、(P(y)−Q(y))/(P'(y)−Q'(y))が歪み補正率の逆数に相当する。
【0242】
なお、各実施の形態においては、画像歪み補正装置を画像形成装置であるデジタル複写機16に備え、デジタル複写機16のスキャナ部1で読み取ったスキャン画像に対して画像の歪み補正処理を施すようにしたが、これに限るものではない。例えば、原稿画像を読み取る画像読取手段を備えたイメージスキャナをパーソナルコンピュータに接続するとともに、このパーソナルコンピュータのHDDに記憶媒体であるCD−ROM37に格納されたプログラムをインストールすることによって画像歪み補正装置を構成しても、前述したような各種の作用効果と同様の作用効果を得ることができる。また、記憶媒体であるCD−ROM37に格納されたプログラムをパーソナルコンピュータのHDDにインストールすることによって画像歪み補正装置を構成し、予め画像読取手段により読み取られたスキャン画像に対して歪み補正処理を施すようにしても良い。
【0243】
【発明の効果】
請求項1記載の発明の画像歪み補正装置によれば、画像読み取りの主走査方向に対してページ綴じ部を平行にしてコンタクトガラス上に載置されたブック原稿を画像読取手段により読み取ったスキャン画像の歪みを補正する画像歪み補正装置において、前記スキャン画像のページ外形、罫線、文字行または前記スキャン画像を副走査方向に貫く画像中心線の形状を基に主走査方向の歪み補正率を算出する主走査方向歪み補正率算出手段と、この歪み補正率算出手段により算出された前記歪み補正率を用いて前記スキャン画像を主走査方向に伸張して前記スキャン画像の歪みを補正する主走査方向歪み補正手段と、この主走査方向歪み補正手段により補正された補正画像から文字外接矩形を抽出し、抽出された前記文字外接矩形の形状を基に副走査方向の歪み補正率を算出する副走査方向歪み補正率算出手段と、この副走査方向歪み補正率算出手段により算出された前記歪み補正率を用いて前記補正画像を副走査方向に伸張して前記補正画像の歪みを補正する副走査方向歪み補正手段と、を備え、主走査方向のスキャン画像の歪みの補正に用いられる歪み補正率を、ページ外形、罫線、文字行またはスキャン画像を副走査方向に貫く画像中心線の形状というスキャン画像中の情報のみから求めることにより、ブック原稿のページ綴じ部と画像読み取りの主走査方向とが平行な場合に、画像読取手段であるスキャナの固有パラメータ(レンズの焦点面距離、スキャン光軸の位置(アドレス))に依存しない歪み補正率を用いてスキャン画像に対する歪み補正を行うことができるので、スキャナの固有パラメータに依存することのない汎用的な装置を提供することができる。
【0244】
請求項2記載の発明によれば、請求項1記載の画像歪み補正装置において、前記主走査方向歪み補正率算出手段は、前記スキャン画像の主走査方向における上辺または下辺の近傍に位置するページ外形、罫線または文字行である基準線と、前記基準線側の辺とは反対側の辺の近傍に位置するページ外形、罫線、文字行または前記スキャン画像を副走査方向に貫く画像中心線の形状である参照線とに基づいて算出される仮想的なページ外形である仮想ページ外形に基づいて主走査方向の歪み補正率を算出することにより、主走査方向の歪み補正率をスキャナ(画像読取手段)の固有パラメータに依存することなく確実に算出することができる。
【0245】
請求項3記載の発明によれば、請求項2記載の画像歪み補正装置において、前記主走査方向歪み補正率算出手段により算出される主走査方向の歪み補正率は、前記仮想ページ外形の副走査方向の任意の位置xにて、
(前記仮想ページ外形上の所定位置における前記仮想ページ外形と前記参照線との間隔)/(副走査方向の任意の位置xにおける前記仮想ページ外形と前記参照線との間隔)
であることにより、簡易な計算により主走査方向の歪み補正率を算出することができる。
【0246】
請求項4記載の発明によれば、請求項3記載の画像歪み補正装置において、前記仮想ページ外形上の所定位置は、前記仮想ページ外形の直線部分と曲線部分との境界点であることにより、スキャン画像に対する歪み補正の際の画像の欠落を最小限に抑えることができる。
【0247】
請求項5記載の発明によれば、請求項3記載の画像歪み補正装置において、前記仮想ページ外形上の所定位置は、前記仮想ページ外形の直線部分に位置することにより、スキャン画像に対する歪み補正の際の画像の欠落を最小限に抑えることができる。
【0248】
請求項6記載の発明によれば、請求項2ないし5のいずれか一記載の画像歪み補正装置において、前記主走査方向歪み補正手段は、前記ページ外形、前記罫線、前記文字行または前記仮想ページ外形を直線形状にするように主走査方向に画素シフトした前記スキャン画像を、主走査方向の歪み補正率を用いて主走査方向に伸張することにより、主走査方向のスキャン画像の歪みを確実に補正することができる。
【0249】
請求項7記載の発明によれば、請求項6記載の画像歪み補正装置において、前記主走査方向歪み補正手段は、前記ページ外形、前記罫線、前記文字行または前記仮想ページ外形の副走査方向の全ての位置で主走査方向の歪み補正率を用いた伸張処理を施すことにより、主走査方向のスキャン画像の歪みを確実に補正することができる。
【0250】
請求項8記載の発明によれば、請求項6記載の画像歪み補正装置において、前記主走査方向歪み補正手段は、前記ページ外形、前記罫線、前記文字行または前記仮想ページ外形の曲線部分に対応する副走査方向の位置でのみ主走査方向の歪み補正率を用いた伸張処理を施すことにより、主走査方向の歪みが発生するページ外形、罫線、文字行または仮想ページ外形の曲線部分に対応する副走査方向の位置でのみ画像歪みを補正するので、処理の高速化を図ることができる。
【0251】
請求項9記載の発明によれば、請求項6記載の画像歪み補正装置において、前記主走査方向歪み補正手段は、前記ページ外形、前記罫線、前記文字行または前記仮想ページ外形の直線部分と曲線部分との境界点と、前記スキャン画像のページ綴じ部との間に対応する副走査方向の位置でのみ主走査方向の歪み補正率を用いた伸張処理を施すことにより、主走査方向の歪みが発生するページ外形、罫線、文字行または仮想ページ外形の境界点とページ綴じ部との間に対応する副走査方向の位置でのみ画像歪みを補正するので、処理の高速化を図ることができる。
【0252】
請求項10記載の発明によれば、請求項1ないし9のいずれか一記載の画像歪み補正装置において、前記主走査方向歪み補正率算出手段と前記主走査方向歪み補正手段と前記副走査方向歪み補正率算出手段と前記副走査方向歪み補正手段とは、前記スキャン画像の左右ページ毎に独立して実行されることにより、スキャン画像の歪み補正の補正精度を向上させることができる。
【0280】
請求項11記載の発明の画像読取装置によれば、原稿画像を読み取る画像読取手段と、この画像読取手段により読み取られたスキャン画像の補正を行う請求項1ないし10の何れか一記載の画像歪み補正装置と、を備えることにより、請求項1ないし10の何れか一記載の発明と同様の作用効果を奏する画像読取装置を得ることができる。
【0282】
請求項12記載の発明の画像形成装置によれば、原稿画像を読み取る画像読取手段と、この画像読取手段により読み取られたスキャン画像の補正を行う請求項1ないし10の何れか一記載の画像歪み補正装置と、この画像歪み補正装置から出力される画像データに基づいた画像を用紙上に印刷する画像印刷装置と、を備えることにより、請求項1ないし10の何れか一記載の発明と同様の作用効果を奏する画像形成装置を得ることができる。
【0284】
請求項13記載の発明のプログラムによれば、画像読み取りの主走査方向に対してページ綴じ部を平行にしてコンタクトガラス上に載置されたブック原稿を画像読取手段により読み取ったスキャン画像の画像歪み補正をコンピュータに実行させるプログラムであって、前記コンピュータに、前記スキャン画像のページ外形、罫線、文字行または前記スキャン画像を副走査方向に貫く画像中心線の形状を基に主走査方向の歪み補正率を算出する主走査方向歪み補正率算出機能と、この歪み補正率算出機能により算出された前記歪み補正率を用いて前記スキャン画像を主走査方向に伸張して前記スキャン画像の歪みを補正する主走査方向歪み補正機能と、この主走査方向歪み補正機能により補正された補正画像から文字外接矩形を抽出し、抽出された前記文字外接矩形の形状を基に副走査方向の歪み補正率を算出する副走査方向歪み補正率算出機能と、この副走査方向歪み補正率算出機能により算出された前記歪み補正率を用いて前記補正画像を副走査方向に伸張して前記補正画像の歪みを補正する副走査方向歪み補正機能と、を実行させ、主走査方向のスキャン画像の歪みの補正に用いられる歪み補正率を、ページ外形、罫線、文字行またはスキャン画像を副走査方向に貫く画像中心線の形状というスキャン画像中の情報のみから求めることにより、ブック原稿のページ綴じ部と画像読み取りの主走査方向とが平行な場合に、画像読取手段であるスキャナの固有パラメータ(レンズの焦点面距離、スキャン光軸の位置(アドレス))に依存しない歪み補正率を用いてスキャン画像に対する歪み補正を行うことができるので、スキャナの固有パラメータに依存することのない汎用的なプログラムを提供することができる。
【図面の簡単な説明】
【図1】本発明の第一の実施の形態のスキャナ部の構成を示す縦断正面図である。
【図2】スキャナ部を搭載したデジタル複写機の上部部分を示す斜視図である。
【図3】スキャナ部の制御系の電気的な接続を示すブロック図である。
【図4】画像処理部の基本的な内部構成を示すブロック図である。
【図5】メイン制御部の電気的な接続を示すブロック図である。
【図6】スキャン画像の歪み補正処理の流れを概略的に示すフローチャートである。
【図7】スキャナ部のコンタクトガラス上にブック原稿を載置した状態を示す斜視図である。
【図8】入力した画像の一例を示す平面図である。
【図9】スキャン画像のページ綴じ部の近傍の歪みを示す説明図である。
【図10】図8に示した画像の黒画素ヒストグラムである。
【図11】ページ外形/罫線/文字行の抽出処理の流れを概略的に示すフローチャートである。
【図12】上端にページ外形が存在するスキャン画像の一例を示す説明図である。
【図13】図12に示したスキャン画像の綴じ部境界線左側の黒画素ヒストグラムである。
【図14】長い罫線が存在するスキャン画像の一例を示す説明図である。
【図15】図14に示したスキャン画像の綴じ部境界線左側の黒画素ヒストグラムである。
【図16】罫線の連続性の判別を示す説明図である。
【図17】罫線の座標検出を示す説明図である。
【図18】左右ページから各1本ずつの罫線を選択する場合を示す説明図である。
【図19】左右ページをさらに上下部分に分け、その各4ブロックにおいて1本ずつの罫線を選択する場合を示す説明図である。
【図20】罫線の座標抽出を示す説明図である。
【図21】排除される不適切な罫線の例を示す説明図である。
【図22】図8に示した画像の副走査方向の黒白反転数ヒストグラムである。
【図23】図8に示した画像の主走査方向の黒白反転数ヒストグラムである。
【図24】スキャン画像の文字外接矩形抽出処理および文字行抽出処理の結果の一例を示す説明図である。
【図25】最適な横書き文字行の選択を示す説明図である。
【図26】最適な縦書き文字行の外形の選択を示す説明図である。
【図27】抽出された文字外接矩形を示す説明図である。
【図28】画像歪み補正処理の流れを概略的に示すフローチャートである。
【図29】スキャン画像の上辺及び下辺のいずれにも「ページ外形」が存在する場合を示す説明図である。
【図30】図29を画素シフトした状態を示す説明図である。
【図31】スキャン画像の上辺及び下辺のいずれか一方に「ページ外形」が存在し、他方の辺には「罫線」と「文字行」とが存在する場合を示す説明図である。
【図32】図31を画素シフトした状態を示す説明図である。
【図33】スキャン画像の左右両ページの上辺及び下辺のいずれか一方に「罫線」が存在し、他方の辺には「罫線」と「文字行」とが存在する場合を示す説明図である。
【図34】図33を画素シフトした状態を示す説明図である。
【図35】スキャン画像の左右両ページの上辺及び下辺のいずれか一方に「罫線」と「文字行」とが存在し、他方の辺の一方のページのみに「罫線」が存在する場合を示す説明図である。
【図36】図35を画素シフトした状態を示す説明図である。
【図37】スキャン画像の左右いずれかのページの上辺及び下辺のいずれか一方に「罫線」が存在し、他方の辺の他方のページのみに「文字行」が存在する場合を示す説明図である。
【図38】副走査方向歪み補正処理の流れを概略的に示すフローチャートである。
【図39】抽出された文字外接矩形を示す説明図である。
【図40】二値化画像をブック原稿のページ綴じ部に平行な方向の複数の短冊状の領域に分割した状態を示す説明図である。
【図41】予め排除される文字外接矩形を示す説明図である。
【図42】各短冊領域内の外接矩形の特徴量の平均値の一例を示すグラフである。
【図43】各短冊領域内の地肌濃度変化の一例を示すグラフである。
【図44】図42に示した各短冊領域の特徴量に対して長さが全て5であるウィンドウを用いてフィルタリング処理を施した結果を示すグラフである。
【図45】図42に示した各短冊領域の特徴量に対してページ綴じ部付近でウィンドウ長を調整してフィルタリング処理を施した結果を示すグラフである。
【図46】図45に示した特徴量に基づいて算出した補正拡大率を示すグラフである。
【図47】歪みを補正した画像を示す平面図である。
【図48】本発明の第二の実施の形態の主走査方向歪み補正処理を説明するための説明図である。
【図49】画素値の線形補完結果の一例を示す説明図である。
【図50】コンタクトガラス上にブック原稿を載置した状態を示す正面図である。
【符号の説明】
1 画像読取装置
2 コンタクトガラス
16 画像形成装置
29 画像歪み補正装置
40 ブック原稿
41 ページ綴じ部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image distortion correction apparatus, an image reading apparatus, an image forming apparatus, and a program.
[0002]
[Prior art]
Many originals read using a flatbed 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]
However, according to the method called “Shape from Shading” described above, the amount of calculation is large, and the calculation time of the distortion correction processing is long.
[0008]
Further, according to the method described in Japanese Patent Application Laid-Open No. 5-110002, a special shape measuring device for measuring the shape of a book by a triangulation method is required, which is not appropriate.
[0009]
Furthermore, according to the method described in Japanese Patent Application Laid-Open No. 11-41455, distortion correction can be performed with a small amount of calculation, but the page outline is not completely contained in the image and is cut off in the middle. Cannot make effective corrections.
[0010]
Therefore, in recent years, there has been proposed an image distortion correction apparatus capable of effectively correcting the distortion with a small calculation amount even if the scanned image has a page outline cut off in the middle.
[0011]
[Problems to be solved by the invention]
However, according to the image distortion correction apparatus that can effectively correct the distortion with a small amount of calculation even in a scanned scan image in which the page outline as described above is cut off in the middle, the page outline is not Although image distortion is corrected using character line information and ruled line information, there is still a problem that is not complete and must be solved.
[0012]
First, when the page binding portion of the book document and the main scanning direction of image reading are parallel, correction of image distortion is performed by using the intrinsic parameters of the scanner (image reading means) (focal plane distance of the lens, scanning optical axis). (Position (address)) is used, there is a problem that only the output image of a specific scanner can be corrected.
[0013]
Second, when the ruled line is cut halfway due to fading or the like, there is a problem that inappropriate ruled line information is extracted and the correction accuracy is lowered. In addition, there is a problem that improper character line information is extracted due to misrecognition of a character line and a photograph part, resulting in a decrease in correction accuracy.
[0014]
An object of the present invention is to perform distortion correction on a scanned image using a distortion correction factor that does not depend on a specific parameter of a scanner (image reading means) when the page binding portion of a book document and the main scanning direction of image reading are parallel. An image distortion correction apparatus, an image reading apparatus, an image forming apparatus, and a program that can be performed are provided.
[0015]
An object of the present invention is to provide an image distortion correction apparatus, an image reading apparatus, an image forming apparatus, and a program capable of improving the correction accuracy of distortion correction of a scanned image.
[0016]
[Means for Solving the Problems]
The image distortion correction apparatus according to the first aspect of the present invention is a distortion of a scanned image obtained by reading a book document placed on a contact glass with the page binding portion parallel to the main scanning direction of image reading by an image reading unit. In the image distortion correction apparatus for correcting the image, the main scanning for calculating the distortion correction rate in the main scanning direction based on the page outline of the scanned image, ruled lines, character lines, or the shape of the image center line passing through the scanned image in the sub-scanning direction Direction distortion correction rate calculation means, and main scanning direction distortion correction means for correcting the distortion of the scan image by expanding the scan image in the main scanning direction using the distortion correction rate calculated by the distortion correction rate calculation means And a character circumscribing rectangle is extracted from the corrected image corrected by the main scanning direction distortion correcting means, and the sub-scanning method is based on the extracted character circumscribing rectangle shape. Sub-scanning direction distortion correction rate calculating means for calculating the distortion correction rate of the image, and using the distortion correction rate calculated by the sub-scanning direction distortion correction rate calculating means, the correction image is expanded in the sub-scanning direction to perform the correction. Sub-scanning direction distortion correction means for correcting image distortion.
[0017]
Therefore, the distortion correction rate used for correcting the distortion of the scanned image in the main scanning direction is obtained only from information in the scanned image, such as the page outline, ruled lines, character lines, or the shape of the image center line passing through the scanned image in the sub-scanning direction. It is done. As a result, when the page binding portion of the book document is parallel to the main scanning direction of image reading, it depends on the intrinsic parameters (lens focal plane distance, scanning optical axis position (address)) of the scanner as the image reading means. Since it is possible to perform distortion correction on a scanned image using a distortion correction rate that does not occur, it is possible to provide a general-purpose apparatus that does not depend on the intrinsic parameters of the scanner.
[0018]
According to a second aspect of the present invention, in the image distortion correction apparatus according to the first aspect, the main scanning direction distortion correction rate calculating means includes a page outline and a ruled line located near the upper side or the lower side in the main scanning direction of the scanned image. Alternatively, a reference line that is a character line and a shape of a page outline, ruled line, character line, or image center line that penetrates the scanned image in the sub-scanning direction located near the side opposite to the side on the reference line side. A distortion correction factor in the main scanning direction is calculated based on a virtual page outline that is a virtual page outline calculated based on the reference line.
[0019]
Therefore, the distortion correction rate in the main scanning direction can be reliably calculated without depending on the intrinsic parameters of the scanner (image reading means).
[0020]
According to a third aspect of the present invention, in the image distortion correction apparatus according to the second aspect, the distortion correction rate in the main scanning direction calculated by the main scanning direction distortion correction rate calculating means is the sub-scanning direction of the virtual page outline. At an arbitrary position x,
(Spacing between the virtual page contour and the reference line at a predetermined position on the virtual page contour) / (Spacing between the virtual page contour and the reference line at an arbitrary position x in the sub-scanning direction)
It is.
[0021]
Therefore, the distortion correction rate in the main scanning direction can be calculated by simple calculation.
[0022]
According to a fourth aspect of the present invention, in the image distortion correction apparatus according to the third aspect, the predetermined position on the virtual page outline is a boundary point between a straight line portion and a curved portion of the virtual page outline.
[0023]
Therefore, it is possible to minimize image loss during distortion correction on a scanned image.
[0024]
According to a fifth aspect of the present invention, in the image distortion correction apparatus according to the third aspect, the predetermined position on the virtual page outline is located at a straight line portion of the virtual page outline.
[0025]
Therefore, it is possible to minimize image loss during distortion correction on a scanned image.
[0026]
According to a sixth aspect of the present invention, in the image distortion correction apparatus according to any one of the second to fifth aspects, the main scanning direction distortion correction unit is configured to detect the page outline, the ruled line, the character line, or the virtual page outline. The scanned image shifted in pixels in the main scanning direction so as to have a linear shape is expanded in the main scanning direction using a distortion correction rate in the main scanning direction.
[0027]
Therefore, the distortion of the scanned image in the main scanning direction is reliably corrected.
[0028]
According to a seventh aspect of the present invention, in the image distortion correction apparatus according to the sixth aspect, the main scanning direction distortion correction means is configured to apply all of the page outline, the ruled line, the character line, or the virtual page outline in the sub-scanning direction. An expansion process using the distortion correction rate in the main scanning direction is performed at the position.
[0029]
Therefore, the distortion of the scanned image in the main scanning direction is reliably corrected.
[0030]
According to an eighth aspect of the present invention, in the image distortion correction apparatus according to the sixth aspect, the main scanning direction distortion correction means is a sub-corresponding to the curved portion of the page outline, the ruled line, the character line, or the virtual page outline. Extension processing using the distortion correction factor in the main scanning direction is performed only at the position in the scanning direction.
[0031]
Therefore, the image distortion is corrected only at the position in the sub-scanning direction corresponding to the curved portion of the page outline, ruled line, character line, or virtual page outline where the distortion in the main scanning direction occurs. This makes it possible to increase the processing speed.
[0032]
According to a ninth aspect of the present invention, in the image distortion correction apparatus according to the sixth aspect, the main scanning direction distortion correction means includes a straight line portion and a curved portion of the page outline, the ruled line, the character line, or the virtual page outline. The decompression process using the distortion correction factor in the main scanning direction is performed only at the position in the sub-scanning direction corresponding to the boundary point between and the page binding portion of the scanned image.
[0033]
Accordingly, the image distortion is corrected only at the position in the sub-scanning direction corresponding to the boundary between the page outline, ruled line, character line, or virtual page outline where the distortion in the main scanning direction occurs and the page binding portion. This makes it possible to increase the processing speed.
[0034]
According to a tenth aspect of the present invention, in the image distortion correction apparatus according to any one of the first to ninth aspects, the main scanning direction distortion correction rate calculating means, the main scanning direction distortion correcting means, and the sub-scanning direction distortion correction rate. The calculating means and the sub-scanning direction distortion correcting means are executed independently for each of the left and right pages of the scanned image.
[0035]
Therefore, the correction accuracy of the distortion correction of the scanned image can be improved by processing each left and right page independently.
[0090]
Claim 11 The image reading device according to the invention includes an image reading unit that reads an original image, and an image distortion correction device according to any one of claims 1 to 10 that corrects a scanned image read by the image reading unit. Prepare.
[0091]
Therefore, an image reading apparatus having the same operation as that of any one of claims 1 to 10 can be obtained.
[0094]
Claim 12 The image forming apparatus according to the invention described above includes an image reading unit that reads a document image, an image distortion correction device according to any one of claims 1 to 10 that corrects a scanned image read by the image reading unit, An image printing apparatus that prints an image on paper based on image data output from the image distortion correction apparatus.
[0095]
Therefore, an image forming apparatus having the same operation as that of any one of claims 1 to 10 can be obtained.
[0098]
Claim 13 The program of the described invention executes, on a computer, image distortion correction of a scanned image obtained by reading a book document placed on a contact glass with the page binding portion parallel to the main scanning direction of image reading by an image reading unit. A program for calculating a distortion correction rate in the main scanning direction based on a shape of a page outline of the scanned image, ruled lines, character lines, or an image center line penetrating the scanned image in the sub-scanning direction. A scanning direction distortion correction rate calculation function, and a main scanning direction distortion correction that uses the distortion correction rate calculated by the distortion correction rate calculation function to extend the scan image in the main scanning direction to correct the distortion of the scan image. Function and a character circumscribed rectangle extracted from the corrected image corrected by the main scanning direction distortion correcting function, and the extracted character circumscribed rectangle A sub-scanning direction distortion correction rate calculation function that calculates a distortion correction rate in the sub-scanning direction based on the shape of the shape, and the correction image using the distortion correction rate calculated by the sub-scanning direction distortion correction rate calculation function And a sub-scanning direction distortion correction function for correcting the distortion of the corrected image by extending in the sub-scanning direction.
[0099]
Therefore, the distortion correction rate used for correcting the distortion of the scanned image in the main scanning direction is obtained only from information in the scanned image, such as the page outline, ruled lines, character lines, or the shape of the image center line passing through the scanned image in the sub-scanning direction. It is done. As a result, when the page binding portion of the book document is parallel to the main scanning direction of image reading, it depends on the intrinsic parameters (lens focal plane distance, scanning optical axis position (address)) of the scanner as the image reading means. Since it is possible to perform distortion correction on a scanned image using a non-distortion correction rate, it is possible to provide a general-purpose program that does not depend on the intrinsic parameters of the scanner.
[0124]
DETAILED DESCRIPTION OF THE INVENTION
A first embodiment of the present invention will be described with reference to FIGS. The image distortion correction apparatus according to the present embodiment is provided in a digital copying machine as an image forming apparatus, and a scanner unit of the digital copying machine is applied as the image reading apparatus.
[0125]
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.
[0126]
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 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.
[0127]
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.
[0128]
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.
[0129]
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 that performs various image data processing such as MTF correction, scaling processing, and γ correction on the digital image signal after correction processing to generate a scan image, and a scan image that is a characteristic function of the present embodiment The image distortion correction unit 29 that realizes the above-described distortion correction function. 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.
[0130]
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.
[0131]
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.
[0132]
As the 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 flexible disks, and semiconductor memory 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.
[0133]
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, among the processes executed by the CPU 31, the scanned image in the image distortion correction unit 29, which is an image distortion correction device that realizes the distortion correction function of the scanned image, which is a characteristic function of the scanner unit 1 of the present embodiment. Only the distortion correction processing will be described.
[0134]
FIG. 6 is a flowchart schematically showing the flow of a distortion 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.
[0135]
First, in step S1, the scan image of the book document 40 placed on the contact glass 2 output from the image data processing unit 28 is input. Here, FIG. 8 shows an example of the input image. As shown in FIG. 9, the input scan image of the book document 40 is distorted in the vicinity of the page binding portion 41.
[0136]
Next, optimal binarization processing of a scanned image (for example, a monochrome multi-valued image) of the book document 40 is executed (step S2), and black pixels in the sub-scanning direction (the density value among the pixels of the scanned image is predetermined). A histogram with the number of pixels darker than the density value is obtained (step S3). FIG. 10 is a black pixel histogram on the left side of the binding portion boundary line of the image shown in FIG. The horizontal axis in FIG. 10 indicates the position of the black pixel in the main scanning direction (the pixel whose density value is darker than the 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. As the binding boundary line, a position in the sub-scanning direction where a pixel whose density value is originally dark among pixels in the scan image is selected.
[0137]
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.
[0138]
In the subsequent step S4, page outline / ruled line / character line extraction processing is executed. FIG. 11 is a flowchart schematically showing the flow of page outline / ruled line / character line extraction processing.
[0139]
[Extract page outline from scanned image]
First, the process of extracting the page outline from the scanned image in step S41 will be described. Here, FIG. 12 is an explanatory diagram showing an example of a scan image having a page outline at the upper end, and FIG. 13 is a black pixel histogram on the left side of the binding boundary line of the scan image shown in FIG. The x-axis of the histogram shown in FIG. 13 indicates the main scanning direction (vertical direction in FIG. 12) of the scan image, and the upper end of the scan image is associated with the left end of the histogram. Note that in the case of a scanned image having a page outline at the lower end, the lower end of the scanned image is associated with the right end of the histogram. Accordingly, when a page outline exists at the upper end of the scanned image as shown in FIG. 12, a black band appears at the upper portion of the scanned image, and thus a high vertical bar appears at the left end of the histogram shown in FIG. In this embodiment, it is determined whether or not a page outline exists in the scanned image using such characteristics.
[0140]
More specifically, as shown in FIG. 13, the distance AO from the binding boundary line to the left end of the scan image (left end in FIG. 12), the height BO of the histogram vertical bar, and the ratio is expressed by the following formula ( 1)
[Expression 1]
Figure 0003979639
When the calculated ratio k is larger than a predetermined threshold, it is determined that a page outline exists in the scanned image.
[0141]
In addition, when page outlines exist above and below the scanned image, high vertical bars appear at the left and right ends of the histogram. In such a case, scanning is performed based on the high vertical bars at the left and right ends of the histogram. A determination is made as to whether or not a page outline exists in the image.
[0142]
Here, the function of the page outline discrimination means is executed.
[0143]
If it is determined by the above processing that the page outline exists in the scanned image, the page outline is extracted together with information on which of the upper and lower sides of the left and right pages the page outline exists, and temporarily stored in the RAM 33. Remember.
[0144]
Note that the process of determining whether or not a page outline exists in the scanned image is executed for each of the left and right pages with the binding line boundary line of the scanned image as a boundary.
[0145]
[Extract ruled lines from scanned images]
In the subsequent step S42, a ruled line extraction process from the scanned image is executed. The ruled line extraction process from the scanned image in step S42 will be described.
[0146]
[Detection of ruled line candidates]
Here, FIG. 14 is an explanatory diagram showing an example of a scan image having a long ruled line, and FIG. 15 is a black pixel histogram on the left side of the binding boundary line of the scan image shown in FIG. The x-axis of the histogram shown in FIG. 15 indicates the main scanning direction (vertical direction in FIG. 14) of the scan image, and the upper end of the scan image is associated with the left end of the histogram. As shown in FIG. 14, when a ruled line exists in the scanned image, a narrow peak appears in the histogram shown in FIG. In the present embodiment, using such characteristics, it is determined whether or not a ruled line exists in the scanned image.
[0147]
More specifically, first, the height H of a narrow peak appearing in the histogram shown in FIG. 15 is obtained, and the width W at the center position (position where the height is half) of each obtained peak is obtained. If there is a peak whose peak height H is higher than a predetermined threshold thH and whose width W at the center position of the peak is smaller than the predetermined threshold thW, the peak is set as a ruled line candidate. .
[0148]
Here, the function of ruled line candidate extraction means is executed.
[0149]
Subsequently, it is further determined whether or not the peak is a ruled line candidate by using the continuity of the ruled line. As shown in FIG. 16, an appropriate position on the candidate ruled line (for example, the position of the center line of the page) is used as a start point, and the candidate ruled line is searched from the start point to the left and right, and the cut point (the ruled line is blurred and interrupted). Are accumulated). If the number of cut points is less than a predetermined threshold, this candidate is determined to be a ruled line. Thus, by determining whether or not a ruled line is based on the ruled line continuity, it becomes possible to eliminate horizontally written character lines, dotted lines, and the like composed of small characters erroneously detected as ruled lines.
[0150]
Here, the function of the ruled line discriminating means is executed.
[0151]
[Rectangle detection]
After discriminating ruled lines as described above, the coordinates of each ruled line are detected. As shown in FIG. 17, the ruled line coordinates are detected when the coordinate value in the main scanning direction of the ruled line (the y-axis direction in FIG. 17) is the midpoint coordinate of the black pixel run of the ruled line part. The main scanning direction coordinate value at the left end x1 is y1.
[0152]
[Select optimal ruled line]
Next, a ruled line optimal for distortion correction is selected from the candidate ruled lines. When a plurality of ruled lines are detected as shown in FIG. 18, it is necessary to select which ruled line is used to correct the distortion. As an example of an optimal ruled line selection criterion, the length of the ruled line is longer than a predetermined threshold value, and the ruled line is placed in the left and right constant width regions (shaded regions in FIG. 18) sandwiching the binding boundary line. The ruled line closest to the upper or lower page outline is selected on the condition that a part is applied. FIG. 18 shows a case where one ruled line is selected from each of the left and right pages. Here, ruled line (1) and ruled line (2) are selected.
[0153]
Further, another example of the criterion for selecting the optimal ruled line is that the length of the ruled line is longer than a predetermined threshold value and is within a constant width area on the left and right sides of the binding part boundary line (the shaded area in FIG. 19). ) Is part of the ruled line, and the closest ruled line is selected for the top page outline at the top of each page and the bottom page outline at the bottom of each page. FIG. 19 shows a case where the left and right pages are further divided into upper and lower parts, and one ruled line is selected for each of the four blocks. Here, the ruled line (1) is selected in the upper left block, the ruled line (2) is selected in the lower right block, and the ruled line (3) is selected in the lower left block. In the upper right block in FIG. 19, the above two conditions (the length of the ruled line is longer than a predetermined threshold value, and a part of the ruled line is applied to the left and right constant width regions sandwiching the binding boundary line. There is no ruled line selected because there is no ruled line that satisfies
[0154]
Note that both of the above two conditions (the length of the ruled line is longer than a predetermined threshold and a part of the ruled line is placed in the left and right constant width regions sandwiching the binding boundary line) Alternatively, only one of them may be satisfied. In the above example, “closest to the page outline” is used as the selection criterion. However, the selection criterion is not limited to this, and “the ruled line has the largest curve” may be used. Here, the “bend of the ruled line” is expressed by a difference in coordinate values in the main scanning direction between the left and right end points of the ruled line.
[0155]
[Determine the coordinate value of the optimal ruled line]
When the optimal ruled line is selected, the coordinate value (in the main scanning direction) of the ruled line is determined. The coordinate value (in the main scanning direction) of the ruled line is determined by approximating and extending the selected ruled line until reaching both ends of the left and right pages. In FIG. 20, for the BC portion where the ruled line exists, the coordinate value has already been determined by the ruled line coordinate detection process described above, so the coordinate value of the ruled line (in the main scanning direction) is determined for the other extended parts. Will do. More specifically, the AB portion shown in FIG. 20 estimates the coordinate value (in the main scanning direction) by linear approximation, and the CD portion estimates the coordinate value (in the main scanning direction) by a polynomial approximation curve.
[0156]
[Reject inappropriate lines]
Finally, remove inappropriate ruled lines. This is because, when the coordinate value is estimated by polynomial approximation as described above, if the shape of the estimated curve by polynomial approximation is inappropriate, the distortion may increase at the time of correction. It eliminates ruled lines. As an example of an inappropriate approximate curve shape, as shown in FIG. 21, there are a curve (1) in which the curve goes to the outside of the book, and a curve (2) in which the curve bites inwardly beyond the center line. .
[0157]
When ruled lines are excluded because the shape of the estimated curve is inappropriate, the optimal ruled line is selected again and the above process is repeated.
[0158]
If it is determined by the above processing that a ruled line exists in the scanned image, the ruled line is extracted together with information on which position of the ruled line exists on each of the left and right pages, and temporarily stored in the RAM 33.
[0159]
[Extract text lines from scanned images]
In a succeeding step S43, a character line extraction process from the scanned image is executed. The character line extraction process from the scanned image in step S43 will be described. In the present embodiment, first, it is determined whether the character line in the scanned image is a vertically written character line or a horizontally written character line.
[0160]
[Determination of character line]
A method for determining whether a character line in a scanned image is a vertically written character line or a horizontally written character line will be described. Here, FIG. 22 is a black-and-white inversion number histogram in the sub-scanning direction of the image shown in FIG. The horizontal axis in FIG. 22 is in the main scanning direction of black pixels in the sub-scanning direction (left-right direction) (pixels whose density value is darker than a predetermined density value among pixels obtained by inverting the scan image in black and white). The vertical axis in FIG. 22 indicates the number of black pixels for each position. FIG. 23 is a black-and-white inversion number histogram of the image shown in FIG. 8 in the main scanning direction. The horizontal axis in FIG. 23 represents the black pixel in the main scanning direction (vertical direction) (the pixel whose density value is darker than the predetermined density value among the pixels obtained by inverting the scan image in black and white) in the sub-scanning direction. The vertical axis in FIG. 23 indicates the number of black pixels for each position. When the characters in the image are horizontal scans as shown in FIG. 8, the histogram in the sub-scan direction as shown in FIG. 22 changes drastically, but the change in the histogram in the main scan direction as shown in FIG. Few. Although not particularly illustrated, when the character line in the scanned image is a vertically written character line, the histogram in the main scanning direction changes drastically, but the change in the histogram in the sub-scanning direction is small.
[0161]
Specifically, the discrimination method as described above is realized by the following equations. First, according to the following equation (2):
[Expression 2]
Figure 0003979639
Mean value mean of histogram values Pnt (y) at the position in the main scanning direction y H Is calculated. Here, height is the height of the image.
And according to the equation (3) shown below,
[Equation 3]
Figure 0003979639
Variance σ in the main scanning direction of the histogram in the sub-scanning direction H Is obtained.
Similarly, according to equation (4) below:
[Expression 4]
Figure 0003979639
Mean value mean of histogram values Pnt (x) at the position in the sub-scanning direction x V Is calculated. Here, width is the width of the image.
And according to the equation (5) shown below,
[Equation 5]
Figure 0003979639
Variance σ in the sub-scanning direction of the histogram in the main scanning direction v Is obtained.
[0162]
As described above, when the character line in the scanned image is a horizontally written character line, the variance σ in the main scanning direction of the histogram in the sub-scanning direction H Is the variance σ in the sub-scanning direction of the histogram in the main scanning direction v Greater than. Conversely, when the character line in the scanned image is a vertically written character line, the variance σ relating to the sub-scanning direction of the histogram in the main scanning direction v Is the variance σ in the main scanning direction of the histogram in the sub-scanning direction H Greater than. That is, variance σ H And variance σ v As a result, it is possible to determine whether the character line in the scanned image is a vertically written character line or a horizontally written character line.
[0163]
The reason why the black and white inversion number histogram is used to determine whether the character line in the scanned image is a vertically written character line or a horizontally written character line is to avoid confusion between the character line and the photograph portion. This is because, in general, when the values of the black pixel histogram are approximately the same, the value of the black / white inversion number histogram is larger in the character region than in the photo region.
[0164]
Here, the function of the document discrimination means is executed.
[0165]
[Coordinate detection of horizontal text lines]
After determining the character line as described above, first, the coordinates of each horizontal character line are detected. In detecting the coordinates of a horizontally written character line, a circumscribed rectangle extraction process for each character is performed, and a horizontally written character line extraction process is performed. Since the character recognition process is a well-known technique, its description is omitted. Here, FIG. 24 shows an example of the result of the character circumscribed rectangle extraction process and the character line extraction process of the scanned image. Then, the coordinates of the center point of the circumscribed rectangle of each character are regarded as the coordinates of the character, and the coordinates of the horizontal character line are detected.
[0166]
[Select optimum horizontal text line]
Next, a horizontal character line optimal for distortion correction is selected from the extracted horizontal character lines. When a plurality of horizontally written character lines are detected, it is necessary to select which horizontally written character line is used for distortion correction. An example of the optimum horizontal writing character line selection criterion is basically the same as the above-mentioned optimum ruled line selection criterion, and the horizontal writing character line length BC is larger than a predetermined threshold as shown in FIG. On the condition that a part C of a horizontal writing line is covered within a long and constant width area (shaded area in FIG. 25) on either side of the binding boundary line, either upper or lower page Select the horizontal text line closest to the outline. Here, B is the center of the leftmost rectangle of the character line, and C is the center of the rightmost rectangle. The optimum horizontal writing character line may be selected by selecting the horizontal writing character line closest to the page outline from each of the left and right pages, or the left and right pages are further divided into upper and lower parts. A horizontally written character line that is closest to the page outline one by one in the block may be selected.
[0167]
Regarding the above two conditions (the length of the horizontal writing character line is longer than a predetermined threshold, and a part of the horizontal writing character line is applied within the left and right constant width regions across the binding portion boundary line). , Not both of them, but only one of them may be satisfied. In the above example, “closest to the page outline” is used as the selection criterion. However, the selection criterion is not limited to this, and “horizontal writing character line has the largest curve” may be used. Here, “curve of horizontally written character line” is expressed by the difference in the coordinate values in the main scanning direction of the center coordinates of the character circumscribed rectangle at both ends of the horizontally written character line.
[0168]
[Determine the coordinate value of the optimal horizontal text line]
When the optimum horizontal writing character line is selected, the coordinate value (in the main scanning direction) of the horizontal writing character line is determined. The coordinate value (in the main scanning direction) of the horizontal writing line is obtained by connecting the center points of the circumscribed rectangles in the horizontal writing line and approximating the straight line part and the curved part and extracting them (main scanning). The coordinate value of the direction will be determined. More specifically, D shown in FIG. 25 is a binding boundary line, a coordinate value (in the main scanning direction) is estimated with a polynomial approximation curve between BDs, and an approximation between A and B at the leftmost end A coordinate value (in the main scanning direction) is estimated with a straight line value.
[0169]
[Reject inappropriate horizontal text]
Finally, remove inappropriate horizontal text lines. This is because, when the coordinate value is estimated by polynomial approximation as described above, if the shape of the estimated curve by polynomial approximation is inappropriate, the distortion may increase at the time of correction. This eliminates horizontal text lines. An example of an inappropriate approximate curve shape is the same as in the case of the ruled line described above, and although not particularly illustrated, the curve is directed outwardly from the book, or is greatly inwardly penetrated beyond the center line. Is the case.
[0170]
If the horizontal writing character line is excluded because the shape of the estimated curve is inappropriate, the optimal horizontal writing character line is selected again, and the above processing is repeated.
[0171]
If it is determined by the above processing that there is a horizontally written character line in the scanned image, the horizontally written character line is extracted together with information indicating in which position the horizontally written character line exists on each of the left and right pages, and stored in the RAM 33. Memorize temporarily.
[0172]
[Detection of coordinates of each character in vertical writing]
Subsequently, the coordinates of each vertically written character line are detected. When detecting the coordinates of a vertically written character line, a circumscribed rectangle extraction process is performed for each character. Since the character recognition process is a well-known technique, its description is omitted. Then, the coordinates of the center point of the circumscribed rectangle of each character are regarded as the coordinates of the character.
[0173]
[Extract horizontal text line]
Next, a horizontal writing character line is extracted from each vertical writing character line. In the horizontal character line extraction, an outer shape obtained by concatenating the uppermost characters of each vertical character line or an outer shape obtained by concatenating the lowermost characters of each vertical character line is regarded as a horizontal character line. More specifically, when one character line is selected from each of the left and right pages, the outline obtained by concatenating each character at the top or bottom of each vertical character line is regarded as one line and extracted. . In addition, when the left and right pages are further divided into upper and lower parts, and one character line is selected for each of the four blocks, the top left and upper right parts are connected to each character at the top of each vertically written character line. Are extracted as a single line in the lower left part and the lower right part.
[0174]
At this time, as shown in FIG. 26, the length BC of the extracted outer shape is longer than a predetermined threshold value, and within the left and right constant width regions (shaded regions in FIG. 26) sandwiching the binding boundary line. The contour is extracted on condition that a part C of the extracted contour is applied. Note that the above two conditions (the length of the extracted outer shape is longer than a predetermined threshold and a part of the extracted outer shape is applied to the left and right constant width regions sandwiching the binding portion boundary line) May satisfy only one of them instead of both. Therefore, if the above condition is not satisfied, there is no outline of the vertically written character line for distortion correction.
[0175]
[Determine the coordinate value of the extracted outline]
When the outer shape is extracted according to the vertical writing character line, the coordinate value (in the main scanning direction) of the outer shape of the vertical writing character line is determined. As shown in FIG. 27, the coordinate value of the outer shape of the vertically written character line is the center of the upper side of the circumscribed rectangle of each character to be connected when the uppermost character of each vertically written character line is connected. Coordinate values (in the main scanning direction) of the outline of a vertically written character line are determined by connecting points and approximating and extracting a straight line portion and a curved line portion. In addition, as shown in FIG. 27, in the case of the outer shape in which each character at the bottom of each vertically written character line is connected, the lower side center point of the circumscribed rectangle of each character to be connected is connected, and the straight line portion and the curve are connected. By approximating and extracting the part, the coordinate value (in the main scanning direction) of the outline of the vertically written character line is determined. More specifically, D shown in FIG. 26 is a binding portion boundary line, a coordinate value (in the main scanning direction) is estimated with a polynomial approximation curve between BDs, and an approximation between A and B at the left end is approximated. A coordinate value (in the main scanning direction) is estimated with a straight line value.
[0176]
[Eliminating inappropriate vertical text lines]
Lastly, eliminate inappropriate vertical text lines. This is because, when the coordinate value is estimated by polynomial approximation as described above, if the shape of the estimated curve by polynomial approximation is inappropriate, the distortion may increase at the time of correction. This eliminates the outline of vertical character lines. Examples of inappropriate approximate curve shapes are the same as in the case of the ruled lines and horizontal text lines described above, and although not particularly shown, when the curve goes to the outside of the book or greatly beyond the center line It is a case where it digs into.
[0177]
If the outline of the vertically written character line is excluded because the shape of the estimated curve is inappropriate, it means that there is no outline of the vertically written character line for distortion correction.
[0178]
If it is determined by the above processing that the outline of the vertical text line exists in the scanned image, the vertical text will be displayed along with information on where the vertical text line outline exists on the left and right pages. The outline of the row is extracted and temporarily stored in the RAM 33.
[0179]
In the following description, the outer shape of a horizontal character line and a vertical character line is treated as a character string.
[0180]
As described above, the page outline / ruled line / character line extraction process (step S4) is completed by the processes of steps S41 to S43.
[0181]
In a subsequent step S5 (see FIG. 6), an image distortion correction process is executed. As shown in FIG. 28, the image distortion correction processing is roughly performed as a page outline / position positioned near the upper side (or lower side) of the scanned image as a reference line (reference line) for distortion correction (expansion). Processing for selecting one of ruled lines / character lines (step S51: reference line selection processing), which corresponds to the reference line and serves as a reference line for calculating a correction rate (expansion rate), the upper side (or the lower side) of the scan image ) (Page S52: reference line selection process) for selecting one of the page outline, ruled line, and character line located in the vicinity of (), and if the reference line is a ruled line or character line, the image information below the reference line is missing Processing for calculating a virtual page outline for minimizing image quality (step S53: virtual page outline calculation process), and performing a decompression process on the scanned image based on the virtual page outline, Correction processing (step S54: main scanning direction distortion correction processing), processing for expanding the scanned image based on the character circumscribed rectangle of the corrected image and correcting distortion in the sub scanning direction (step S55: sub scanning direction) Distortion correction processing).
[0182]
Here, in the reference line selection process (step S51) and the reference line selection process (step S52), the page outline / ruled line / character line positioned near the upper side (or lower side) of the scanned image as the reference line or reference line. However, the priority of selection of the page outline, ruled line, and character line in the present embodiment is as follows:
Page outline> Ruled lines> Text line
It is said that. This selection priority is used because character lines have lower extraction accuracy than page outlines and ruled lines, and more accurate distortion correction rates can be obtained by using page outlines outside the image. This is because it can. However, in this embodiment, the page outline generally spans the left and right pages, but ruled lines and character lines are not necessarily on both pages, so the priority order of the reference line selection from the upper or lower side of the scanned image is As shown below.
[0183]
1. "Page outline" (Page outline always exists on both left and right pages)
2. "Rules" on both left and right pages
3. One page is "ruled line", the other page is "text line"
4). "Character line" on both left and right pages
5). "Rules" on one page only, "No clues" on the other page
6). "Character line" on one page only, "No clue" on the other page
Here, “no clue” means a case where none of the page outline, ruled line, and character line could be extracted.
[0184]
Next, examples of the virtual page outer shape calculation process (step S53) and the main scanning direction distortion correction process (step S54) will be described in order based on the priority order.
[0185]
1. When “Page Outline” Exists on Both Upper and Lower Sides of Scanned Image Here, a case where “page outline” exists on both the upper and lower sides of the scanned image will be described. As shown in FIG. 29, when “page outline” exists on both the upper side and the lower side of the scanned image, any of them may be used as a reference line or a reference line. In the present embodiment, it is assumed that “page outline”, “ruled line”, and “character line” selected as the reference line are positioned on the lower side. In this case, since the reference line and the virtual page outline coincide with each other, the virtual page outline calculation process (step S53) does not have to be particularly performed.
[0186]
Next, the main scanning direction distortion correction process (step S54) will be described. Here, x0 is a boundary point between the straight line portion and the curved portion of the “page outline”. In the main scanning direction distortion correction process, first, a distortion correction factor is calculated based on the distance h0 (see FIG. 30) between the reference line and the reference line at the boundary point x0. The distortion correction rate is for equalizing the distance between the reference line and the reference line at all positions in the sub-scanning direction when the image is expanded and corrected in the main scanning direction. That is, when the distance between the reference line and the reference line at the position x is h (see FIG. 30), the distortion correction rate at the position x is
h0 / h
Can be expressed as In other words, the distortion correction rate is related to each x so that the distance between the reference line and the reference line becomes equal at all positions x in the sub-scanning direction when the image is expanded and corrected in the main scanning direction. It is a calculated value.
[0187]
Here, the function of the main scanning direction distortion correction rate calculation means is executed.
[0188]
Next, when the correction is actually performed, first, each pixel is shifted in the main scanning direction so that the virtual page outline (here, the reference line) becomes a straight line (the lowermost side) as shown in FIG. Thereafter, at all positions x in the sub-scanning direction, if the image is expanded by h0 / h toward the upper side in the main scanning direction, the image is corrected so that the “page outline” E on the upper side in FIG. .
[0189]
Here, the function of the main scanning direction distortion correction means is executed. Here, the function of the page outline image distortion correcting means is executed.
[0190]
2. When there is a “page outline” on one of the top and bottom sides of the scanned image, and a “ruled line” and “character line” on the other side
Here, a description will be given of a case where the “page outline” exists on either the upper side or the lower side of the scanned image, and the page outline is cut off on the other side, but “ruled lines” and “character lines” exist. To do. As shown in FIG. 31, when “page outline” exists on one of the upper side and the lower side of the scanned image and “ruled line” and “character line” exist on the other side, “page outline” Is set as a reference line and “character line” and “ruled line” are used as reference lines (in the example shown in FIG. 31, the left page is “character line” and the right page is “ruled line”). Even in this case, since the reference line and the virtual page outline coincide with each other, the virtual page outline calculation process (step S53) does not have to be performed.
[0191]
Next, the main scanning direction distortion correction process (step S54) will be described. Here, x0 is a boundary point between the straight line portion and the curved portion of the “page outline”. In the main scanning direction distortion correction process, first, a distortion correction factor is calculated based on the distance h0 (see FIG. 32) between the reference line and the reference line at the boundary point x0. When the distance between the reference line and the reference line at the position x is h (see FIG. 32), the distortion correction rate at the position x is
h0 / h
Can be expressed as
[0192]
Here, the function of the main scanning direction distortion correction rate calculation means is executed.
[0193]
Next, when the correction is actually performed, first, each pixel is shifted in the main scanning direction so that the virtual page outline (here, the reference line) becomes a straight line (lowermost side) as shown in FIG. Thereafter, at all positions x in the sub-scanning direction, if the image is stretched by h0 / h toward the upper side in the main scanning direction, the image on the right page of FIG. 32 is displayed so that the “ruled line” LU on the upper side becomes RLU. It is corrected. The same applies to the “character line” on the upper side of the left page.
[0194]
Here, the function of the main scanning direction distortion correction means is executed. Here, the function of the page outline image distortion correcting means is executed.
[0195]
3. When there is a “ruled line” on one of the upper and lower sides of both the left and right pages of the scanned image, and a “ruled line” and “character line” on the other side
Here, a case will be described in which “ruled lines” exist on one of the upper and lower sides of both the left and right pages of the scanned image, and “ruled lines” and “character lines” exist on the other side. When a “ruled line” exists on either the upper side or the lower side of both the left and right pages of the scanned image and a “ruled line” and a “character line” exist on the other side, as shown in FIG. The side where the “ruled line” exists on both pages is positioned on the lower side, the two “ruled lines” are used as reference lines, and the “character line” and “ruled line” positioned on the other side are used as reference lines (see FIG. In the example shown in FIG. 33, the left page is “character line” and the right page is “ruled line”). By the way, when the reference line is not “page outline” as described above, the reference line should not be regarded as a virtual page outline as it is. This is because, if they are matched, when the virtual page outline (reference line) is pixel-shifted to the lowermost side in the subsequent main scanning direction distortion correction processing, all image information below the reference line is lost. .
[0196]
Therefore, if the reference line is not “page outline”, a virtual page outline calculation process (step S53) for obtaining a virtual page outline VE as indicated by a dotted line in FIG. 33 is executed. Here, x0 is a boundary point between the straight line portion and the curved portion of the “ruled line” LD on the lower side. The virtual page outline calculation processing is based on the distance a0 from the “ruled line” LD at the boundary point x0 to the lowermost side of the scanned image, and the distance b0 from the “ruled line” LD to the upper “ruled line” LU at the boundary point x0. The virtual page outline VE is calculated. That is, if the distance b from the position x on the “ruled line” LD to the “ruled line” LU on the upper side is solved,
a / b = a0 / b0
Therefore, the distance a from the position x on the “ruled line” LD to the virtual page outline VE can be calculated. Therefore, the virtual page outline VE can be obtained by calculating the distance from the position on the “ruled line” LD to the virtual page outline VE at all the positions x in the sub-scanning direction. Such processing is performed independently for the left and right pages.
[0197]
Next, the main scanning direction distortion correction process (step S54) will be described. In the main scanning direction distortion correction processing, first, the distance a0 from the “ruled line” LD at the boundary point x0 to the lowermost side of the scanned image, and the “ruled line” LD at the boundary point x0 to the “ruled line” LU on the upper side. A distortion correction factor is calculated based on a distance h0 (h0 = a0 + b0) obtained by adding the distance b0. When the distance from the “ruled line” LU on the upper side at the position x to the lowest side of the scanned image is h (h = a + b), the distortion correction rate at the position x is
h0 / h
Can be expressed as
[0198]
Here, the function of the main scanning direction distortion correction rate calculation means is executed.
[0199]
Next, when the correction is actually performed, first, each pixel is shifted in the main scanning direction so that the virtual page outline VE becomes a straight line (the lowermost side) as shown in FIG. After that, if the image is expanded at h0 / h to the upper side in the main scanning direction at all positions x in the sub-scanning direction, the “ruled line” LU on the upper side becomes RLU (strictly speaking, xLU on the right page in FIG. 34). Is not coincident with the boundary between the straight portion and the curved portion of the “ruled line” LU, but here, the image is corrected so that the boundary of the “ruled line” LD is used as it is. The same applies to the “character line” on the upper side of the left page.
[0200]
Here, the function of the main scanning direction distortion correction means is executed. Here, the function of the ruled line / character line image distortion correcting means is executed.
[0201]
In this way, by using the virtual page outline VE, it is possible to minimize image loss due to shift.
[0202]
4). When there are “ruled lines” and “character lines” on either the upper or lower side of both the left and right pages of the scanned image, and “ruled lines” only on one page of the other side A case will be described in which “ruled lines” and “character lines” exist on either the upper side or the lower side of both the left and right pages, and “ruled lines” exist only on one page of the other side. When “ruled lines” and “character lines” are present on either the upper side or the lower side of both the left and right pages of the scanned image, and “ruled lines” are present only on one page of the other side (the other page is “ 35), as shown in FIG. 35, the side where the “ruled line” and the “character line” are located is positioned on the lower side, the “ruled line” and the “character line” are used as the reference line, and the other A “ruled line” located on the side and a center line C passing through the scanned image in the sub-scanning direction are used as reference lines (in the example shown in FIG. 35, the left page is “ruled line” and the right page is “no clue”). . The center line C is a line that crosses the center of the scanned image in the main scanning direction in the sub-scanning direction, and is not the center line of the book document 40.
[0203]
When the reference line is not “page outline” as described above, the virtual page outline calculation process (step S53) for obtaining the virtual page outline VE as shown by the dotted line in FIG. 35 is executed as described above. Here, x0 is a boundary point between the straight line portion and the curved portion of the “ruled line” LD on the lower side. The virtual page outline calculation processing is based on the distance a0 from the “ruled line” LD at the boundary point x0 to the lowermost side of the scanned image and the distance b0 from the “ruled line” LD to the center line C at the boundary point x0. VE is calculated. That is, if the distance b from the position x on the “ruled line” LD to the center line C is solved,
a / b = a0 / b0
Therefore, the distance a from the position x on the “ruled line” LD to the virtual page outline VE can be calculated. Therefore, the virtual page outline VE can be obtained by calculating the distance from the position on the “ruled line” LD to the virtual page outline VE at all the positions x in the sub-scanning direction. Such processing is performed independently for the left and right pages. When a “ruled line” exists on the upper side as in the right page, instead of the center line C, the “ruled line” on the upper side is used as described above.
[0204]
Next, the main scanning direction distortion correction process (step S54) will be described. In the main scanning direction distortion correction processing, first, the distance a0 from the “ruled line” LD at the boundary point x0 to the lowermost side of the scanned image, and the distance b0 from the “ruled line” LD to the center line C at the boundary point x0. The distortion correction rate is calculated based on the distance h0 (h0 = a0 + b0) obtained by adding. When the distance from the center line C at the position x to the lowest side of the scanned image is h (h = a + b), the distortion correction rate at the position x is
h0 / h
Can be expressed as
[0205]
Here, the function of the main scanning direction distortion correction rate calculation means is executed.
[0206]
Next, when the correction is actually performed, first, each pixel is shifted in the main scanning direction so that the virtual page outline VE becomes a straight line (lowermost side) as shown in FIG. Thereafter, at all the positions x in the sub-scanning direction, the image is corrected by being expanded by h0 / h toward the upper side in the main scanning direction. The same applies to the “ruled line” on the upper side of the left page. As for the right page, the center line C once distorted by the shift by the correction returns to the original straight line RC, but the correction of the entire image is incomplete except when C matches the optical axis of the scanner unit 1. .
[0207]
Here, the function of the main scanning direction distortion correction means is executed. Here, the function of the ruled line / character line image distortion correcting means is executed.
[0208]
5). When there is a "ruled line" on either the upper or lower side of the scanned image on either the left or right side of the page, and a "character line" exists only on the other page of the other side
Here, a case will be described in which a “ruled line” exists on either the upper side or the lower side of the left or right page of the scanned image, and a “character line” exists only on the other page of the other side. There is a “ruled line” on one of the upper and lower sides of the left or right page of the scanned image (the other page is “no clue”), and there is a “character line” only on the other page on the other side. In the case (one page is “no clue”), as shown in FIG. 37, the side where the “ruled line” exists is positioned on the lower side, the “ruled line” is set as the reference line, and the “ruled line” does not exist For a page (the page on which “a character line” exists), a curve SL obtained by moving the character line L to a line-symmetrical position with the center line C in between is used as a reference line. As for the reference line, the center line C is used as the reference line for the page where the “ruled line” exists, and the “character line” as the reference line for the page where the “character line” exists.
[0209]
Note that the calculation of the distortion correction rate, pixel shift, and correction (expansion) processing are the same as those in the previous examples, and thus description thereof is omitted.
[0210]
Here, the function of the ruled line / character line image distortion correcting means is executed.
[0211]
Finally, sub-scanning direction distortion correction processing (step S55) will be described. FIG. 38 is a flowchart schematically showing the flow of the sub-scanning direction distortion correction process. As shown in FIG. 38, in step S101, a circumscribed rectangle A (see FIG. 39) of the character is extracted based on the scanned image in which distortion in the main scanning direction is corrected. Here, since the character recognition process is a well-known technique, the description thereof is omitted. The reason why the circumscribed rectangle A of the character is extracted in this way is to correct the distortion in the sub-scanning direction based on the change in the shape of the circumscribed rectangle A of the character. Here, as shown in FIG. 39, a horizontal side length w, a vertical side length h, and a character center B of the character circumscribing rectangle A are defined. Here, the center B of the character is the intersection of the diagonal lines of the circumscribed rectangle A.
[0212]
Subsequently, as shown in FIG. 40, after the scanned image is divided into a plurality of strip-shaped regions C in a direction parallel to the page binding portion 41 of the book document 40 (step S102), each strip region C is included therein. A feature amount relating to the included character circumscribing rectangle A is obtained (step S103). Here, the circumscribed rectangle A included in a strip area C is a circumscribed rectangle A whose center is included in the strip area C. For example, the circumscribed rectangle A included in the strip region C1 of FIG. 40 is a shaded rectangle in the drawing.
[0213]
Now, the feature amount related to the character circumscribed rectangle A is as follows.
(Length of horizontal side of character) / (Length of vertical side of character) = w / h
Required based on That is, for each strip region C, the average value of w / h values of all the character circumscribed rectangles A included therein is used as the feature amount of the strip region C.
[0214]
However, simply calculating the average value of w / h may be inappropriate. Some characters, such as punctuation marks and symbols in mathematical formulas, are originally small in size and have unstable w / h values. In addition, adjacent characters may be extracted when the rectangle is extracted, resulting in a character circumscribing rectangle A having an extremely large w. When obtaining the feature amount, it is necessary to exclude such special characters or extremely large w in advance. Therefore, in the subsequent step S104, a threshold value is determined in advance, and the character circumscribed rectangle A whose h value is smaller than the threshold value is excluded in advance, and a threshold value regarding the ratio of w / h is determined in advance. Character circumscribing rectangle A whose value is larger than the threshold is also excluded in advance. For example, the circumscribed rectangle A that is shaded as shown in FIG. 41 is excluded in advance.
[0215]
In the subsequent step S105, after eliminating the extreme character circumscribing rectangle A as described above, the average value of w / h of the character circumscribing rectangle A in each strip region C is obtained. FIG. 42 shows an example of the average value of w / h of the circumscribed rectangle A in each strip area C. Note that a strip region C2 in FIG. 42 is a strip region including the page binding portion 41 of the book document 40.
[0216]
Subsequently, it is determined whether or not the character circumscribed rectangle A exists in the strip area C2 including the page binding portion 41 of the book document 40 (step S106). This is because, as shown in FIG. 41, generally, there are many cases where the character circumscribing rectangle A does not exist near the page binding portion 41 of the book document 40. If the character circumscribing rectangle A exists in the strip area C2 including the page binding portion 41 of the book document 40 (Y in step S106), the feature amount is calculated using the character circumscribing rectangle A, so that the step S108 is performed as it is. Proceed to
[0217]
On the other hand, if the character circumscribing rectangle A does not exist in the strip area C2 including the page binding portion 41 of the book document 40 (N in step S106), the process proceeds to step S107, and the strip area C2 including the page binding portion 41 of the book document 40 is displayed. Find the feature quantity. The strip region C2 including the page binding portion 41 of the book document 40 is identified by, for example, obtaining a background density change of a scanned image (for example, a monochrome multi-value image) for each strip region C, and obtaining the most in the strip region C. This is realized by obtaining a low density value. FIG. 43 shows an example of obtaining the background density change, and the strip area with the highest background density is regarded as the strip area C2 including the page binding portion 41 of the book document 40.
[0218]
When the scanned image is a color multivalued image, the identification of the strip region C2 including the page binding portion 41 of the book document 40 is focused on, for example, one of the RGB components (for example, the G component), and the G component The background density may be used for identification. Alternatively, RGB may be color-converted into a luminance component and a color difference component, and the strip region C2 including the page binding portion 41 of the book document 40 may be identified using the luminance component.
[0219]
The feature amount of the strip area C2 including the page binding portion 41 of the book document 40 is determined as follows. Here, there is a character circumscribing rectangle A that can be a statistical feature quantity calculation target, and a constant value determined in advance for the feature quantity of the strip area C that is the closest to the strip area C2 including the page binding portion 41. The value calculated by multiplying by is regarded as the feature amount in the strip region C2 including the page binding portion 41 of the book document 40. That is, in the example shown in FIG. 42, the character circumscribing rectangle A exists in any of the left and right strip regions C3 and C4 of the strip region C2 including the page binding portion 41 of the book document 40. The amount is selected (here, the circle on the right side), and is multiplied by a predetermined constant value (here, 0.5), and this is multiplied by the feature amount of the strip region C2 including the page binding portion 41 of the book document 40. It is said.
[0220]
In the subsequent step S108, an appropriate filtering process for the feature amount of each strip area C, for example, a process for obtaining a moving average in the direction of change of the position of the strip area C (ie, the sub-scanning direction) is performed. The change in the feature amount (in the sub-scanning direction) with respect to the change in the position is made gentle. However, also here, special processing is required near the page binding portion 41 of the book document 40. This is because if the filtering is performed using windows whose lengths are all equal in the sub-scanning direction, the sharpness of the feature amount change in the vicinity of the page binding portion 41 of the book document 40 is lost.
[0221]
Here, FIG. 44 shows the result of performing the filtering process on the feature amount of each strip region C shown in FIG. 42 using a window whose length is all five. As shown in FIG. 44, when the filtering process is performed using a window whose length is all 5, the change in the characteristic amount (w / h) in the vicinity of the page binding portion 41 of the book document 40 becomes gentle. It will pass. In such a case, appropriate image correction near the page binding portion 41 of the book document 40 becomes impossible.
[0222]
Therefore, in the present embodiment, in the filtering process, the page binding is performed so that the filter window does not extend over the strip areas C3 and C4 on both sides of the strip area C2 including the page binding portion 41 of the book document 40. The window length is adjusted near the portion 41. Here, FIG. 45 is a graph showing the result of performing the filtering process by adjusting the window length in the vicinity of the page binding portion 41. As shown in FIG. 45, when the window length is adjusted in the vicinity of the page binding portion 41, a change in the feature amount (w / h) in the vicinity of the page binding portion 41 can be appropriately expressed, so that a good image correction is realized. it can.
[0223]
In subsequent step S109, an estimated distortion amount of each strip region C is calculated. The calculation method of the estimated distortion amount of each strip region C is as follows.
[0224]
First, a strip area (reference strip area) is defined as a reference for calculating the distortion amount of the strip area. Here, the strip region C that is considered to have the smallest distortion, for example, the strip region C having the maximum feature (w / h) is set as the reference strip region. This process may be performed in common on the left and right pages, but the reference strip area may be determined independently on the left and right. FIG. 45 shows an example in which the reference strip area is determined independently on the left and right sides. The strip area C marked with a circle is the reference strip area, the reference feature value on the left is “Lw0 / Lh0”, and the reference reference on the right The feature amounts are indicated by “Rw0 / Rh0”, respectively.
[0225]
Next, the feature amount w0 / h0 of the reference strip region is set as the reference feature amount of the entire scanned image,
(Feature amount of each strip area) / (reference feature amount) = (w / h) / (w0 / h0)
Is calculated as an estimated amount of distortion in each strip region.
[0226]
If the strip area C near the outside of the page outside the page binding portion 41 of the book document 40 is used as the reference strip area, the font and type size difference between the book binding 40 and the vicinity of the page binding portion 41 is large. It is also conceivable that a large estimated distortion amount cannot be calculated. When such an image is targeted, it is effective to limit the search range of the reference strip region to the vicinity of the page binding portion 41 of the book document 40 in advance. In order to realize this, the reference strip region may be obtained only from the strip region C whose background density is higher than a predetermined density.
[0227]
Finally, enlargement processing in the short side direction (sub-scanning direction) of the strip region C is performed on the scanned image to correct distortion in the vicinity of the page binding portion 41 of the book document 40 (step S110). In this case, the enlargement ratio (distortion correction ratio (expansion ratio) in the sub-scanning direction) is the reciprocal of the estimated distortion amount calculated in step S109, that is,
(Reference feature value) / (Feature value of each strip area) = (w0 / h0) / (w / h)
And Here, if the above-mentioned standard strip area is defined to be common to the left and right, this enlargement ratio is also calculated based on the standard feature quantity common to the left and right. To do. FIG. 46 shows the corrected enlargement ratio calculated based on the feature amount shown in FIG.
[0228]
Here, the function of the sub-scanning direction distortion correction rate calculation means and the function of the sub-scanning direction distortion correction means are executed.
[0229]
In this case as well, the strip area C away from the vicinity of the page binding portion 41 of the book document 40 is likely to be an area where there is no image distortion from the beginning, so there are cases where it is better not to make it an enlargement target. This is because an unnatural distortion may occur due to the enlargement process. In order to prevent this, the estimated distortion amount is set to “1” for the strip region C whose background density is thinner than a predetermined density.
[0230]
Further, when a common correction magnification ratio is applied in the strip area C, the correction magnification ratio becomes discontinuous at the boundary between adjacent strip areas C, and the correction image becomes unnatural. Therefore, the correction magnification rate is corrected in advance so that the correction magnification rate at the boundary between adjacent strip regions C changes continuously. For example, the correction magnification rate of the central portion of the strip region C shown in FIG. 46 is plotted as a point indicating the reciprocal of the estimated distortion amount, and these points are connected by line segments to complete a straight line. This can be realized by setting the correction magnification. Through the above processing, the correction magnification rate in the sub-scanning direction of the scanned image is determined.
[0231]
Note that the image enlargement process is executed using, for example, a cubic function convolution method often used as a copy scaling function.
[0232]
As described above, the sub-scanning direction distortion correction processing (step S55) is completed by the processing in steps S101 to S110, and the distortion correction processing for the scanned image shown in FIG. Here, FIG. 47 is a plan view showing an image with distortion 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. 8 is corrected as shown in FIG.
[0233]
Here, the distortion correction rate (expansion rate) used for correcting the distortion of the scanned image in the main scanning direction is the shape of the image center line that penetrates the page outline, ruled line, character line, or scanned image in the sub-scanning direction. Required only from the information. Thus, when the page binding portion 41 of the book document 40 and the main scanning direction of the scanner unit 1 are parallel, it depends on the intrinsic parameters of the scanner unit 1 (the focal plane distance of the lens, the position (address) of the scanning optical axis). Since it is possible to perform distortion correction on a scanned image using a distortion correction rate (expansion rate) that is not performed, it is possible to provide a general-purpose device that does not depend on the intrinsic parameters of the scanner unit 1.
[0234]
Here, when correcting distortion of a scanned image, first, it is determined whether or not a page outline exists in the scanned image. If a page outline exists, the page outline is used in preference to ruled lines and character lines. This corrects the distortion of the scanned image. As a result, the page outline can be extracted more stably than character lines and ruled lines, and is located closer to the upper and lower edges of the scanned image and has a large degree of distortion, so the distortion shape (distortion rate) is estimated. Therefore, it is possible to improve the correction accuracy of distortion correction of the scanned image.
[0235]
Further, ruled line candidates are extracted from the scanned image, and only ruled line candidates whose number of cut points is less than a predetermined threshold are determined as ruled lines. Accordingly, it is possible to prevent a dotted line, a thin character line, and the like from being erroneously extracted as a ruled line, so that it is possible to improve the correction accuracy of the distortion correction of the scanned image based on the shape of the ruled line.
[0236]
Furthermore, since it is determined whether the original is a horizontally written document or a vertically written document based on the black / white inversion number histogram instead of the black pixel histogram, generally, when the black pixel histogram has the same value, the character area is more than the photographic area. Since the value of the black-and-white reversal number histogram becomes large, confusion between the character area and the photograph area is avoided. As a result, it is possible to prevent erroneous recognition of a photographic part as a character line, so that it is possible to improve the correction accuracy of distortion correction of a scanned image based on the shape of the character line.
[0237]
Next, a second embodiment of the present invention will be described with reference to FIGS. In addition, the same part as 1st Embodiment mentioned above is shown with the same code | symbol, and description is also abbreviate | omitted. This embodiment is different from the first embodiment in main-scanning direction distortion correction processing.
[0238]
Here, FIG. 48 is an explanatory diagram for explaining the main-scanning direction distortion correction processing of the present embodiment. In FIG. 48, the base line and the reference line before correction are each represented by a solid line, and the base line and the reference line after correction are each represented by a dotted line. The corrected dotted line is obtained by extending the straight line portion (flat portion) of the base line and reference line before correction as they are. In FIG. 48, a ruled line is used as an example of the base line and the reference line, but a page outline, a character line, or a virtual page outline may be used.
[0239]
Here, at the position x in the sub-scanning direction, the point P on the reference line is corrected to P ′, and the point Q on the reference line is corrected to Q ′. If an arbitrary point Y in the main scanning direction at the position x is corrected to Y ′, the following relational expression is established.
YP / YQ = Y'P '/ Y'Q'
Therefore, if the position of each point in the main scanning direction is expressed as P (x) if it is a point P,
(Y (y) -P (y)) / (Y (y) -Q (y))
= (Y '(y) -P' (y)) / (Y '(y) -Q' (y))
So, transform this,
Y (y) = ((P (y) −Q (y)) / (P ′ (y) −Q ′ (y))) Y ′ (y)
+ (P ′ (y) Q (y) −P (y) Q ′ (y)) / (P ′ (y) −Q ′ (y))
It becomes.
[0240]
Using the above equation, the position Y (y) before correction of the point that should come to the position of Y ′ (y) after correction can be obtained. That is, the pixel value of Y (y) before correction may be moved to Y ′ (y) after correction.
[0241]
However, since the calculated value of Y (y) is generally a decimal, a linear interpolation result of pixel values corresponding to integer positions before and after that is used. That is, in FIG. 49, assuming that the integers before and after Y (y) are N and N + 1 and the corresponding pixel values are D (N) and D (N + 1), respectively, the pixel value D (Y (Y ( y)) is calculated so as to satisfy the linear relationship as shown in FIG. Here, (P (y) −Q (y)) / (P ′ (y) −Q ′ (y)) corresponds to the reciprocal of the distortion correction rate.
[0242]
In each embodiment, the image distortion correction apparatus is provided in the digital copying machine 16 which is an image forming apparatus, and image distortion 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 having an image reading unit for reading a document image is connected to a personal computer, and a program stored in a CD-ROM 37 which is a storage medium is installed in the HDD of the personal computer, whereby an image distortion correction apparatus is installed. Even if it comprises, the effect similar to the various effect mentioned above can be acquired. Further, an image distortion correction apparatus is configured by installing a program stored in a CD-ROM 37 as a storage medium in the HDD of a personal computer, and distortion correction processing is performed on a scanned image read in advance by an image reading means. You may do it.
[0243]
【The invention's effect】
According to the image distortion correcting apparatus of the first aspect, a scanned image obtained by reading the book document placed on the contact glass with the page binding portion parallel to the main scanning direction of image reading is read by the image reading means. In the image distortion correction apparatus for correcting the distortion of the image, the distortion correction rate in the main scanning direction is calculated based on the page outline of the scanned image, ruled lines, character lines, or the shape of the image center line penetrating the scanned image in the sub-scanning direction. Main scanning direction distortion correction rate calculating means and main scanning direction distortion for correcting the distortion of the scanned image by extending the scan image in the main scanning direction using the distortion correction rate calculated by the distortion correction rate calculating means A character circumscribing rectangle is extracted from the correction unit and the corrected image corrected by the main scanning direction distortion correcting unit, and a subordinate is extracted based on the extracted shape of the character circumscribing rectangle. A sub-scanning direction distortion correction rate calculating means for calculating a distortion correction rate in the scanning direction, and the correction image is extended in the sub-scanning direction using the distortion correction rate calculated by the sub-scanning direction distortion correction rate calculating means. A sub-scanning direction distortion correcting unit that corrects the distortion of the corrected image, and sub-scans the page outline, ruled line, character line, or scan image with a distortion correction rate used for correcting the distortion of the scanned image in the main scanning direction. By obtaining only the information in the scanned image, that is, the shape of the image center line penetrating in the direction, when the page binding portion of the book document and the main scanning direction of image reading are parallel, the intrinsic parameter ( Distortion correction for scan images can be performed using a distortion correction factor that does not depend on the focal plane distance of the lens and the position (address) of the scanning optical axis. It is possible to provide a generic device that does not depend on the specific parameters of the turbocharger Na.
[0244]
According to a second aspect of the present invention, in the image distortion correction apparatus according to the first aspect, the main scanning direction distortion correction rate calculating means is a page outline positioned near the upper side or the lower side in the main scanning direction of the scanned image. A reference line that is a ruled line or a character line, and a shape of a page outline, ruled line, character line, or image center line that penetrates the scanned image in the sub-scanning direction, located near the side opposite to the reference line side By calculating the distortion correction rate in the main scanning direction based on the virtual page outline which is a virtual page outline calculated based on the reference line, the distortion correction rate in the main scanning direction is calculated by a scanner (image reading means). ) Can be reliably calculated without depending on the intrinsic parameters.
[0245]
According to a third aspect of the present invention, in the image distortion correction apparatus according to the second aspect, the distortion correction rate in the main scanning direction calculated by the main scanning direction distortion correction rate calculating means is the sub-scan of the virtual page outline. At any position x in the direction,
(Spacing between the virtual page contour and the reference line at a predetermined position on the virtual page contour) / (Spacing between the virtual page contour and the reference line at an arbitrary position x in the sub-scanning direction)
Thus, the distortion correction rate in the main scanning direction can be calculated by simple calculation.
[0246]
According to a fourth aspect of the present invention, in the image distortion correction apparatus according to the third aspect, the predetermined position on the virtual page outline is a boundary point between the straight line portion and the curved portion of the virtual page outline. It is possible to minimize image loss during distortion correction for a scanned image.
[0247]
According to a fifth aspect of the present invention, in the image distortion correction apparatus according to the third aspect, the predetermined position on the virtual page outer shape is located in a straight line portion of the virtual page outer shape, thereby correcting distortion for the scanned image. Missing images can be minimized.
[0248]
According to a sixth aspect of the present invention, in the image distortion correction apparatus according to any one of the second to fifth aspects, the main scanning direction distortion correction means includes the page outline, the ruled line, the character line, or the virtual page. The scan image, which has been pixel-shifted in the main scanning direction so as to have a linear shape in the main scanning direction, is stretched in the main scanning direction using the distortion correction factor in the main scanning direction, thereby ensuring distortion of the scan image in the main scanning direction. It can be corrected.
[0249]
According to a seventh aspect of the present invention, in the image distortion correction apparatus according to the sixth aspect, the main scanning direction distortion correction means is configured to detect the page outline, the ruled line, the character line, or the virtual page outline in the sub-scanning direction. By performing expansion processing using the distortion correction rate in the main scanning direction at all positions, it is possible to reliably correct the distortion of the scanned image in the main scanning direction.
[0250]
According to an eighth aspect of the present invention, in the image distortion correction apparatus according to the sixth aspect, the main scanning direction distortion correction means corresponds to a curved portion of the page outline, the ruled line, the character line, or the virtual page outline. By applying a decompression process using the distortion correction factor in the main scanning direction only at the position in the sub-scanning direction, it corresponds to the curved portion of the page outline, ruled line, character line, or virtual page outline that generates distortion in the main scanning direction. Since the image distortion is corrected only at the position in the sub-scanning direction, the processing speed can be increased.
[0251]
According to a ninth aspect of the present invention, in the image distortion correction apparatus according to the sixth aspect, the main scanning direction distortion correction means includes a straight line portion and a curve of the page outline, the ruled line, the character line, or the virtual page outline. The distortion in the main scanning direction is reduced by performing the extension process using the distortion correction factor in the main scanning direction only at the position in the sub-scanning direction corresponding to the boundary point between the portion and the page binding portion of the scanned image. Since the image distortion is corrected only at the position in the sub-scanning direction corresponding to the boundary between the generated page outline, ruled line, character line or virtual page outline and the page binding portion, the processing speed can be increased.
[0252]
According to a tenth aspect of the present invention, in the image distortion correction apparatus according to any one of the first to ninth aspects, the main scanning direction distortion correction rate calculating means, the main scanning direction distortion correcting means, and the sub scanning direction distortion. The correction rate calculation means and the sub-scanning direction distortion correction means are executed independently for each of the left and right pages of the scan image, thereby improving the correction accuracy of the distortion correction of the scan image.
[0280]
Claim 11 The image reading device according to any one of claims 1 to 10, wherein an image reading unit that reads a document image and a scan image read by the image reading unit are corrected. , It is possible to obtain an image reading apparatus having the same operational effects as the invention according to any one of claims 1 to 10.
[0282]
Claim 12 The image forming apparatus according to any one of claims 1 to 10, wherein an image reading unit that reads a document image and a scan image read by the image reading unit are corrected. An image printing apparatus that prints an image based on the image data output from the image distortion correction apparatus on a sheet, thereby providing the same effects as the invention according to any one of claims 1 to 10. An image forming apparatus can be obtained.
[0284]
Claim 13 According to the program of the described invention, the image distortion correction of the scanned image obtained by reading the book document placed on the contact glass with the page binding portion parallel to the main scanning direction of image reading by the image reading unit is performed by the computer. The computer executes a computer program to calculate a distortion correction rate in the main scanning direction based on a page outline of the scanned image, ruled lines, character lines, or a shape of an image center line penetrating the scanned image in the sub-scanning direction. A main scanning direction distortion correction rate calculating function, and a main scanning direction in which the scan image is expanded in the main scanning direction using the distortion correction rate calculated by the distortion correction rate calculating function to correct distortion of the scan image A character circumscribed rectangle is extracted from the corrected image corrected by the distortion correcting function and the main scanning direction distortion correcting function, and the extracted sentence A sub-scanning direction distortion correction rate calculation function for calculating a sub-scanning direction distortion correction rate based on the circumscribed rectangle shape, and the correction image using the distortion correction rate calculated by the sub-scanning direction distortion correction rate calculation function. And a sub-scanning direction distortion correction function for correcting the distortion of the corrected image by extending in the sub-scanning direction, and calculating a distortion correction rate used for correcting the distortion of the scanned image in the main scanning direction as a page outline and a ruled line. In the case where the page binding portion of the book document and the main scanning direction of image reading are parallel by obtaining only from the information in the scanned image such as the shape of the image center line that penetrates the character line or the scanned image in the sub-scanning direction, Distortion compensation for the scanned image using a distortion correction factor that does not depend on the intrinsic parameters (lens focal plane distance, scan optical axis position (address)) of the scanner as the reading means. It is possible to perform, it is possible to provide a general-purpose program not dependent on specific parameters of the scanner.
[Brief description of the drawings]
FIG. 1 is a longitudinal front view showing a configuration of a scanner unit according to a first 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 distortion correction processing of 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 plan view showing an example of an input image.
FIG. 9 is an explanatory diagram illustrating distortion in the vicinity of a page binding portion of a scanned image.
10 is a black pixel histogram of the image shown in FIG.
FIG. 11 is a flowchart schematically showing a flow of page outline / ruled line / character line extraction processing;
FIG. 12 is an explanatory diagram showing an example of a scanned image having a page outline at the upper end.
13 is a black pixel histogram on the left side of the binding portion boundary line of the scan image shown in FIG. 12;
FIG. 14 is an explanatory diagram illustrating an example of a scanned image in which a long ruled line exists.
15 is a black pixel histogram on the left side of the binding boundary line of the scan image shown in FIG.
FIG. 16 is an explanatory diagram showing determination of continuity of ruled lines.
FIG. 17 is an explanatory diagram showing coordinate detection of ruled lines.
FIG. 18 is an explanatory diagram showing a case where one ruled line is selected from each of the left and right pages.
FIG. 19 is an explanatory diagram showing a case where the left and right pages are further divided into upper and lower parts, and one ruled line is selected for each of the four blocks.
FIG. 20 is an explanatory diagram showing ruled line coordinate extraction;
FIG. 21 is an explanatory diagram illustrating an example of inappropriate ruled lines to be excluded;
22 is a black-and-white inversion number histogram in the sub-scanning direction of the image shown in FIG.
23 is a black-and-white inversion number histogram of the image shown in FIG. 8 in the main scanning direction.
FIG. 24 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. 25 is an explanatory diagram showing selection of an optimal horizontal writing character line.
FIG. 26 is an explanatory diagram showing selection of the optimum vertical writing character line outline;
FIG. 27 is an explanatory diagram showing an extracted character circumscribed rectangle.
FIG. 28 is a flowchart schematically showing a flow of image distortion correction processing.
FIG. 29 is an explanatory diagram showing a case where a “page outline” exists on both the upper side and the lower side of a scanned image.
FIG. 30 is an explanatory diagram showing a state where FIG. 29 is pixel-shifted.
FIG. 31 is an explanatory diagram showing a case where a “page outline” exists on one of the upper side and the lower side of a scanned image, and “ruled lines” and “character lines” exist on the other side.
FIG. 32 is an explanatory diagram showing a state where FIG. 31 is pixel-shifted.
FIG. 33 is an explanatory diagram showing a case where a “ruled line” exists on either the upper side or the lower side of both the left and right pages of a scanned image, and a “ruled line” and a “character line” exist on the other side. .
FIG. 34 is an explanatory diagram showing a state where FIG. 33 is pixel-shifted.
FIG. 35 shows a case where “ruled lines” and “character lines” exist on either the upper side or the lower side of both the left and right pages of a scanned image, and “ruled lines” exist only on one page on the other side. It is explanatory drawing.
FIG. 36 is an explanatory diagram showing a state where FIG. 35 is pixel-shifted.
FIG. 37 is an explanatory diagram showing a case where a “ruled line” is present on either the upper side or the lower side of a left or right page of a scanned image and a “character line” is present only on the other page of the other side. is there.
FIG. 38 is a flowchart schematically showing a flow of sub-scanning direction distortion correction processing.
FIG. 39 is an explanatory diagram of extracted character circumscribed rectangles.
FIG. 40 is an explanatory diagram showing a state in which the binarized image is divided into a plurality of strip-shaped regions in a direction parallel to the page binding portion of the book document.
FIG. 41 is an explanatory diagram showing character circumscribed rectangles excluded in advance.
FIG. 42 is a graph showing an example of an average value of feature amounts of a circumscribed rectangle in each strip area.
FIG. 43 is a graph showing an example of background density change in each strip region.
44 is a graph showing the result of performing filtering using the window whose length is all 5 for the feature amount of each strip area shown in FIG. 42;
45 is a graph illustrating a result of performing filtering processing by adjusting the window length in the vicinity of the page binding portion with respect to the feature amount of each strip area illustrated in FIG. 42;
46 is a graph showing a corrected enlargement ratio calculated based on the feature amount shown in FIG. 45. FIG.
FIG. 47 is a plan view showing an image whose distortion has been corrected.
FIG. 48 is an explanatory diagram for explaining main-scanning direction distortion correction processing according to the second embodiment of the present invention;
FIG. 49 is an explanatory diagram illustrating an example of a result of linear interpolation of pixel values.
FIG. 50 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 Image distortion correction device
40 book manuscript
41 Page binding

Claims (13)

画像読み取りの主走査方向に対してページ綴じ部を平行にしてコンタクトガラス上に載置されたブック原稿を画像読取手段により読み取ったスキャン画像の歪みを補正する画像歪み補正装置において、
前記スキャン画像のページ外形、罫線、文字行または前記スキャン画像を副走査方向に貫く画像中心線の形状を基に主走査方向の歪み補正率を算出する主走査方向歪み補正率算出手段と、
この歪み補正率算出手段により算出された前記歪み補正率を用いて前記スキャン画像を主走査方向に伸張して前記スキャン画像の歪みを補正する主走査方向歪み補正手段と、
この主走査方向歪み補正手段により補正された補正画像から文字外接矩形を抽出し、抽出された前記文字外接矩形の形状を基に副走査方向の歪み補正率を算出する副走査方向歪み補正率算出手段と、
この副走査方向歪み補正率算出手段により算出された前記歪み補正率を用いて前記補正画像を副走査方向に伸張して前記補正画像の歪みを補正する副走査方向歪み補正手段と、
を備えることを特徴とする画像歪み補正装置。
In an image distortion correction apparatus that corrects distortion of a scanned image obtained by reading a book document placed on a contact glass with the page binding portion parallel to the main scanning direction of image reading by an image reading unit,
A main scanning direction distortion correction rate calculating means for calculating a distortion correction rate in the main scanning direction based on the shape of a page outer shape, ruled lines, character lines of the scanned image or an image center line penetrating the scanned image in the sub-scanning direction;
Main-scanning direction distortion correcting means for expanding the scan image in the main scanning direction using the distortion correction ratio calculated by the distortion correction rate calculating means to correct distortion of the scan image;
Sub-scanning direction distortion correction rate calculation that extracts a character circumscribing rectangle from the corrected image corrected by the main scanning direction distortion correcting unit and calculates a distortion correction rate in the sub-scanning direction based on the extracted shape of the character circumscribing rectangle Means,
A sub-scanning direction distortion correction unit that extends the correction image in the sub-scanning direction using the distortion correction rate calculated by the sub-scanning direction distortion correction rate calculation unit, and corrects the distortion of the correction image;
An image distortion correction apparatus comprising:
前記主走査方向歪み補正率算出手段は、前記スキャン画像の主走査方向における上辺または下辺の近傍に位置するページ外形、罫線または文字行である基準線と、前記基準線側の辺とは反対側の辺の近傍に位置するページ外形、罫線、文字行または前記スキャン画像を副走査方向に貫く画像中心線の形状である参照線とに基づいて算出される仮想的なページ外形である仮想ページ外形に基づいて主走査方向の歪み補正率を算出することを特徴とする請求項1記載の画像歪み補正装置。  The main-scanning-direction distortion correction rate calculating means includes a reference line that is a page outline, a ruled line, or a character line located in the vicinity of the upper side or the lower side in the main-scanning direction of the scan image, and a side opposite to the side on the reference line side A virtual page outline that is a virtual page outline calculated based on a page outline, ruled line, character line, or reference line that is the shape of the image center line that penetrates the scanned image in the sub-scanning direction. The image distortion correction apparatus according to claim 1, wherein a distortion correction rate in the main scanning direction is calculated based on 前記主走査方向歪み補正率算出手段により算出される主走査方向の歪み補正率は、前記仮想ページ外形の副走査方向の任意の位置xにて、
(前記仮想ページ外形上の所定位置における前記仮想ページ外形と前記参照線との間隔)/(副走査方向の任意の位置xにおける前記仮想ページ外形と前記参照線との間隔)
であることを特徴とする請求項2記載の画像歪み補正装置。
The distortion correction rate in the main scanning direction calculated by the main scanning direction distortion correction rate calculating means is an arbitrary position x in the sub-scanning direction of the virtual page outline.
(Spacing between the virtual page contour and the reference line at a predetermined position on the virtual page contour) / (Spacing between the virtual page contour and the reference line at an arbitrary position x in the sub-scanning direction)
The image distortion correction apparatus according to claim 2, wherein:
前記仮想ページ外形上の所定位置は、前記仮想ページ外形の直線部分と曲線部分との境界点であることを特徴とする請求項3記載の画像歪み補正装置。  4. The image distortion correction apparatus according to claim 3, wherein the predetermined position on the virtual page outline is a boundary point between a straight line portion and a curved line portion of the virtual page outline. 前記仮想ページ外形上の所定位置は、前記仮想ページ外形の直線部分に位置することを特徴とする請求項3記載の画像歪み補正装置。  The image distortion correction apparatus according to claim 3, wherein the predetermined position on the virtual page outline is located in a straight line portion of the virtual page outline. 前記主走査方向歪み補正手段は、前記ページ外形、前記罫線、前記文字行または前記仮想ページ外形を直線形状にするように主走査方向に画素シフトした前記スキャン画像を、主走査方向の歪み補正率を用いて主走査方向に伸張することを特徴とする請求項2ないし5のいずれか一記載の画像歪み補正装置。  The main scanning direction distortion correction unit is configured to convert the scan image obtained by pixel shifting in the main scanning direction so that the page outline, the ruled line, the character line, or the virtual page outline has a linear shape, and a distortion correction rate in the main scanning direction. The image distortion correction apparatus according to claim 2, wherein the image distortion correction apparatus is extended in the main scanning direction using the. 前記主走査方向歪み補正手段は、前記ページ外形、前記罫線、前記文字行または前記仮想ページ外形の副走査方向の全ての位置で主走査方向の歪み補正率を用いた伸張処理を施すことを特徴とする請求項6記載の画像歪み補正装置。  The main scanning direction distortion correction means performs a decompression process using a distortion correction factor in the main scanning direction at all positions in the sub-scanning direction of the page outline, the ruled line, the character line, or the virtual page outline. The image distortion correction apparatus according to claim 6. 前記主走査方向歪み補正手段は、前記ページ外形、前記罫線、前記文字行または前記仮想ページ外形の曲線部分に対応する副走査方向の位置でのみ主走査方向の歪み補正率を用いた伸張処理を施すことを特徴とする請求項6記載の画像歪み補正装置。  The main scanning direction distortion correction means performs a decompression process using a distortion correction factor in the main scanning direction only at a position in the sub-scanning direction corresponding to the curved portion of the page outline, the ruled line, the character line, or the virtual page outline. The image distortion correction apparatus according to claim 6, wherein the image distortion correction apparatus is applied. 前記主走査方向歪み補正手段は、前記ページ外形、前記罫線、前記文字行または前記仮想ページ外形の直線部分と曲線部分との境界点と、前記スキャン画像のページ綴じ部との間に対応する副走査方向の位置でのみ主走査方向の歪み補正率を用いた伸張処理を施すことを特徴とする請求項6記載の画像歪み補正装置。  The main scanning direction distortion correcting unit is configured to correspond to a subpoint corresponding to a boundary point between a straight line portion and a curved portion of the page outline, the ruled line, the character line, or the virtual page outline, and a page binding portion of the scan image. 7. The image distortion correction apparatus according to claim 6, wherein an extension process using a distortion correction factor in the main scanning direction is performed only at a position in the scanning direction. 前記主走査方向歪み補正率算出手段と前記主走査方向歪み補正手段と前記副走査方向歪み補正率算出手段と前記副走査方向歪み補正手段とは、前記スキャン画像の左右ページ毎に独立して実行されることを特徴とする請求項1ないし9のいずれか一記載の画像歪み補正装置。  The main scanning direction distortion correction rate calculating unit, the main scanning direction distortion correcting unit, the sub scanning direction distortion correction rate calculating unit, and the sub scanning direction distortion correcting unit are executed independently for each of the left and right pages of the scanned image. The image distortion correction apparatus according to claim 1, wherein the image distortion correction apparatus is used. 原稿画像を読み取る画像読取手段と、
この画像読取手段により読み取られたスキャン画像の補正を行う請求項1ないし10の何れか一記載の画像歪み補正装置と、
を備えることを特徴とする画像読取装置。
Image reading means for reading a document image;
The image distortion correction device according to any one of claims 1 to 10, which corrects a scanned image read by the image reading unit ;
An image reading apparatus comprising:
原稿画像を読み取る画像読取手段と、
この画像読取手段により読み取られたスキャン画像の補正を行う請求項1ないし10の何れか一記載の画像歪み補正装置と、
この画像歪み補正装置から出力される画像データに基づいた画像を用紙上に印刷する画像印刷装置と、
を備えることを特徴とする画形成装置。
Image reading means for reading a document image;
The image distortion correction apparatus according to any one of claims 1 to 10, which corrects a scanned image read by the image reading unit;
An image printing apparatus that prints an image on paper based on image data output from the image distortion correction apparatus;
Images forming device you wherein Rukoto equipped with.
画像読み取りの主走査方向に対してページ綴じ部を平行にしてコンタクトガラス上に載置されたブック原稿を画像読取手段により読み取ったスキャン画像の画像歪み補正をコンピュータに実行させるプログラムであって、前記コンピュータに、
前記スキャン画像のページ外形、罫線、文字行または前記スキャン画像を副走査方向に貫く画像中心線の形状を基に主走査方向の歪み補正率を算出する主走査方向歪み補正率算出機能と、
この歪み補正率算出機能により算出された前記歪み補正率を用いて前記スキャン画像を主走査方向に伸張して前記スキャン画像の歪みを補正する主走査方向歪み補正機能と、
この主走査方向歪み補正機能により補正された補正画像から文字外接矩形を抽出し、抽出された前記文字外接矩形の形状を基に副走査方向の歪み補正率を算出する副走査方向歪み補正率算出機能と、
この副走査方向歪み補正率算出機能により算出された前記歪み補正率を用いて前記補正画像を副走査方向に伸張して前記補正画像の歪みを補正する副走査方向歪み補正機能と、
を実行させることを特徴とするプログラム
A program for causing a computer to perform image distortion correction of a scanned image obtained by reading a book document placed on a contact glass with an image reading unit with a page binding portion parallel to a main scanning direction of image reading, On the computer,
A main scanning direction distortion correction rate calculation function for calculating a distortion correction rate in the main scanning direction based on the shape of the page outline, ruled line, character line of the scanned image or the image center line penetrating the scanned image in the sub-scanning direction;
A main scanning direction distortion correction function that extends the scan image in the main scanning direction using the distortion correction ratio calculated by the distortion correction rate calculation function to correct distortion of the scan image;
Sub-scanning direction distortion correction rate calculation that extracts a character circumscribing rectangle from the corrected image corrected by the main scanning direction distortion correction function and calculates a distortion correction rate in the sub-scanning direction based on the extracted shape of the character circumscribing rectangle Function and
A sub-scanning direction distortion correction function that expands the corrected image in the sub-scanning direction using the distortion correction rate calculated by the sub-scanning direction distortion correction rate calculation function, and corrects the distortion of the corrected image;
Program characterized Rukoto allowed to run.
JP2002247643A 2001-08-27 2002-08-27 Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program Expired - Fee Related JP3979639B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US10/227,743 US7430065B2 (en) 2001-08-27 2002-08-26 Method and system for correcting distortions in image data scanned from bound originals
JP2002247643A JP3979639B2 (en) 2001-08-27 2002-08-27 Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2001256969 2001-08-27
JP2001256971 2001-08-27
JP2002194281 2002-07-03
JP2002247643A JP3979639B2 (en) 2001-08-27 2002-08-27 Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2007148293A Division JP4507124B2 (en) 2001-08-27 2007-06-04 Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program

Publications (3)

Publication Number Publication Date
JP2004088499A JP2004088499A (en) 2004-03-18
JP2004088499A5 JP2004088499A5 (en) 2005-10-06
JP3979639B2 true JP3979639B2 (en) 2007-09-19

Family

ID=32074545

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002247643A Expired - Fee Related JP3979639B2 (en) 2001-08-27 2002-08-27 Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program

Country Status (1)

Country Link
JP (1) JP3979639B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8270044B2 (en) * 2006-10-26 2012-09-18 Samsung Electronics Co., Ltd. Scanning apparatus having image correction function
JP5408526B2 (en) * 2008-11-20 2014-02-05 株式会社リコー Image processing apparatus, image processing method, and program
JP5757931B2 (en) * 2012-12-25 2015-08-05 京セラドキュメントソリューションズ株式会社 Image processing apparatus and image reading apparatus

Also Published As

Publication number Publication date
JP2004088499A (en) 2004-03-18

Similar Documents

Publication Publication Date Title
US7430065B2 (en) Method and system for correcting distortions in image data scanned from bound originals
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
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
JP4585015B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP3979639B2 (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
JP4111697B2 (en) Image brightness correction apparatus, image reading apparatus, image forming apparatus, and program
JP3926294B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, image distortion correction method, image distortion correction program, and recording medium
JP4194076B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, program, and storage medium
JP4136860B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
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
JP4006242B2 (en) Image correction apparatus, program, storage medium, and image correction method
JP4093970B2 (en) Image distortion correction apparatus, program, and storage medium
JP4198613B2 (en) Image distortion correction apparatus, program, and storage medium
JP4480291B2 (en) Image distortion correction apparatus, storage medium, program, image distortion correction method, image reading apparatus, and image forming apparatus
JP3877142B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, program, and storage medium
JP3917421B2 (en) Image brightness correction apparatus, image reading apparatus, image forming apparatus, program, and storage medium
JP4145256B2 (en) Image distortion correction apparatus, program, and storage medium
JP2003143407A (en) Picture luminance correcting apparatus, picture read apparatus, picture forming apparatus, program, and memorizing medium
JP4577845B2 (en) Image processing apparatus, image processing method, program, and storage medium storing program
JP2003143410A (en) Blurred picture correcting apparatus, picture read apparatus, picture forming apparatus, program, and memorizing medium

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20041007

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050524

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050524

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20050524

RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20060922

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070328

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070412

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070604

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070625

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110706

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120706

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120706

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130706

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees