JP2005051383A - Image distortion corrector, image reader, image forming apparatus, and program - Google Patents

Image distortion corrector, image reader, image forming apparatus, and program Download PDF

Info

Publication number
JP2005051383A
JP2005051383A JP2003204286A JP2003204286A JP2005051383A JP 2005051383 A JP2005051383 A JP 2005051383A JP 2003204286 A JP2003204286 A JP 2003204286A JP 2003204286 A JP2003204286 A JP 2003204286A JP 2005051383 A JP2005051383 A JP 2005051383A
Authority
JP
Japan
Prior art keywords
image
scanning direction
character
distortion correction
line
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.)
Granted
Application number
JP2003204286A
Other languages
Japanese (ja)
Other versions
JP3983721B2 (en
Inventor
Sadafumi Araki
禎史 荒木
Yasuko Nagai
靖子 長井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2003204286A priority Critical patent/JP3983721B2/en
Publication of JP2005051383A publication Critical patent/JP2005051383A/en
Application granted granted Critical
Publication of JP3983721B2 publication Critical patent/JP3983721B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image distortion corrector, an image reader, an image forming apparatus and a program which improve the correction accuracy of a distortion correction process. <P>SOLUTION: The image distortion corrector determines the binding position of scan images with taking account of the existence (S24, 25) of a page outline detected by a means for detecting the page outline near the binding portion of the scan image, characterless regions (S23) detected by a means for detecting characterless regions in regions including neither character nor figure including the binding portion of the scan image, a typical position (S27, 34) with minimum luminance detected by a means for detecting the typical position with minimum luminance, and the position (S30) of a straight line extracted by a means for extracting the line, based on a set of interested points where luminance value differences between interested pixels on the scan image and pixels with a predetermined distance in the feeding direction from the interested pixels are over a predetermined threshold and below a predetermined separate threshold. Thus, the position of the binding portion of the scan image is determined (S31). <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、画像歪み補正装置、画像読取装置、画像形成装置及びプログラムに関する。
【0002】
【従来の技術】
フラットベッドスキャナを用いて読み取る原稿の多くはシート状の原稿であり、コンタクトガラス上に開閉自在の圧板を設け、コンタクトガラス上に原稿を載置した後に圧板を閉じて原稿をスキャンするようにしている。しかし、原稿としてはシート状のものに限られず、ブック原稿(本、冊子など)も原稿として扱われることがあり、そのような場合にもコンタクトガラス上にブック原稿を載置し、原稿をスキャンすることになる。
【0003】
ところが、原稿としてブック原稿を用いた場合には、図71に示すように、ブック原稿100のページ綴じ部101がコンタクトガラス102から浮き上がってしまう。このようにブック原稿100のページ綴じ部101がコンタクトガラス102から浮き上がってしまった場合には、ページ綴じ部101が焦点面から離れてしまうため、浮き上がった部分のスキャン画像には、画像歪み、影、文字ぼけなどの画像劣化が発生する。劣化した画像のページ綴じ部101は読みにくく、OCRにより文字認識処理を行うときの認識率が著しく低下する。特に、厚手製本ではその割合が高く、また、ブック原稿100のページ綴じ部101を焦点面から離れないように加圧作業した場合には、ブック原稿100自体を破損してしまうこともある。
【0004】
このような問題を解決すべく、画像の濃度情報から物体の3次元形状を推定する方法を用いて、画像の歪みを補正する方法が提案されている。このような画像の濃度情報から物体の3次元形状を推定する方法としては、非特許文献1に記載されているShape from Shadingと呼ばれる方法が代表的な例である。
【0005】
また、特許文献1には、三角測量方式により書籍の形状を測定し、歪みを補正する方法が提案されている。
【0006】
さらに、特許文献2には、読み取りスキャン画像のページ外形の形状を用いて書籍表面の3次元形状を推定する方法が提案されている。
【0007】
しかしながら、前述したShape from Shadingと呼ばれる方法によれば、計算量が多く、歪み補正処理の計算時間が長いので、実用化は困難である。
【0008】
また、特許文献1に記載されている方法によれば、三角測量方式により書籍の形状を測定するための特別な形状計測装置が必要になるため、適当ではない。
【0009】
さらに、特許文献2に記載されている方法によれば、少ない計算量で歪み補正ができるが、ページ外形が画像中に完全に収まりきれずに途中で切れているような場合には有効な補正ができない。
【0010】
そこで、本出願人は、ページ外形が途中で切れているような読み取りスキャン画像であっても、その歪みを少ない計算量で有効に補正することができる画像歪み補正装置を特願2002−247643にて提案している。特願2002−247643によれば、ページ外形だけではなく文字行情報および罫線情報を用いて画像の歪みを補正し、しかも、スキャナ(画像読取手段)の固有パラメータ(レンズの焦点面距離、スキャン光軸の位置(アドレス))を利用していないので、任意のスキャナの出力画像を補正できる。
【0011】
【非特許文献1】
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)
【特許文献1】
特開平5−161002号公報
【特許文献2】
特開平11−41455号公報
【0012】
【発明が解決しようとする課題】
ところで、歪み補正処理においては、綴じ部位置を中心としてスキュー補正の画像回転処理を行った後に、綴じ部位置を境とした左右のページに分割して処理を行っている。このような綴じ部位置の検出に際しては、綴じ部付近のページ外形の頂点座標や、最小画素値が存在する位置が有効である。
【0013】
ところが、ブック原稿(本、冊子など)の置き方によってはスキャン画像に綴じ部付近のページ外形が写り込むとは限らず、また、ブック原稿(本、冊子など)の紙質や綴じ部の強度によっては綴じ部付近の画素値が必ずしも最小画素値になるとは限らない。以上のような不具合により綴じ部位置を誤認識してしまった場合には、歪み補正処理の補正精度に悪影響を及ぼす可能性がある。
【0014】
本発明の目的は、歪み補正処理の補正精度の向上を図ることができる画像歪み補正装置、画像読取装置、画像形成装置及びプログラムを提供することである。
【0015】
【課題を解決するための手段】
請求項1記載の発明の画像歪み補正装置は、スキャン面の上もしくは下に接触したブック原稿を画像読取手段により読み取ったスキャン画像の歪みを当該スキャン画像におけるブック原稿のページ綴じ部の位置を用いて補正する画像歪み補正装置において、前記スキャン画像の綴じ部付近のページ外形を検出するページ外形検出手段と、文字や図の非存在領域であって前記スキャン画像の綴じ部を含む文字無し領域を検出する文字無し領域検出手段と、最小輝度の代表位置を検出する最小輝度検出手段と、前記スキャン画像上の着目画素と当該着目画素から副走査方向に予め定めた距離だけ離れた画素との輝度値の差が予め定めた閾値以上であり、かつ、予め定めた別の閾値以下となるような着目点の集合を基に直線を抽出する直線抽出手段と、を備え、前記ページ外形検出手段により検出されたページ外形の有無、前記文字無し領域検出手段により検出された文字無し領域、前記最小輝度検出手段により検出された最小輝度の代表位置、前記直線抽出手段により抽出された直線の位置を勘案し、前記スキャン画像の綴じ部位置を決定する。
【0016】
請求項2記載の発明は、請求項1記載の画像歪み補正装置において、前記ページ外形検出手段により前記スキャン画像の主走査方向上辺及び下辺の綴じ部付近に前記ページ外形が検出された場合は、上下の各ページ外形の頂点を結んだ線分を綴じ部位置とみなす。
【0017】
請求項3記載の発明は、請求項1記載の画像歪み補正装置において、前記ページ外形検出手段により前記スキャン画像の主走査方向上辺または下辺のいずれか一方の綴じ部付近にのみ前記ページ外形が検出された場合は、前記最小輝度検出手段にて検出された最小輝度位置もしくは前記直線抽出手段により抽出された直線の位置を綴じ部位置とみなす。
【0018】
請求項4記載の発明は、請求項3記載の画像歪み補正装置において、前記ページ外形検出手段により前記スキャン画像の主走査方向上辺または下辺のいずれか一方の綴じ部付近にのみ前記ページ外形が検出された場合であって、当該ページ外形の頂点と、前記文字無し領域検出手段により検出された文字無し領域内において前記最小輝度検出手段にて検出された最小輝度の代表位置との差が予め定めた閾値より小さい場合は、前記最小輝度位置を綴じ部位置とみなす。
【0019】
請求項5記載の発明は、請求項3記載の画像歪み補正装置において、前記ページ外形検出手段により前記スキャン画像の主走査方向上辺または下辺のいずれか一方の綴じ部付近にのみ前記ページ外形が検出された場合であって、当該ページ外形の頂点と、前記文字無し領域検出手段により検出された文字無し領域内において前記最小輝度検出手段にて検出された最小輝度の代表位置との差が予め定めた閾値より大きい場合は、前記直線抽出手段により抽出された複数の直線候補の中から、当該ページ外形の頂点と最も近い直線の位置を綴じ部位置とみなす。
【0020】
請求項6記載の発明は、請求項1記載の画像歪み補正装置において、前記ページ外形検出手段により前記スキャン画像の主走査方向上辺及び下辺のいずれの綴じ部付近にもページ外形が検出されなかった場合は、前記最小輝度検出手段にて検出された最小輝度の代表位置もしくは前記直線抽出手段により抽出された直線の位置を綴じ部位置とみなす。
【0021】
請求項7記載の発明は、請求項6記載の画像歪み補正装置において、前記ページ外形検出手段により前記スキャン画像の主走査方向上辺及び下辺のいずれの綴じ部付近にもページ外形が検出されなかった場合であって、かつ、前記文字無し領域検出手段により適切な文字無し領域が検出された場合に、前記文字無し領域検出手段により検出された文字無し領域の中点と、文字無し領域内において前記最小輝度検出手段にて検出された最小輝度の代表位置との差が予め定めた閾値より小さい場合は、前記最小輝度位置を綴じ部位置とみなす。
【0022】
請求項8記載の発明は、請求項6記載の画像歪み補正装置において、前記ページ外形検出手段により前記スキャン画像の主走査方向上辺及び下辺のいずれの綴じ部付近にもページ外形が検出されなかった場合であって、かつ、前記文字無し領域検出手段により適切な文字無し領域が検出された場合に、前記文字無し領域検出手段により検出された文字無し領域の中点と、文字無し領域内において前記最小輝度検出手段にて検出された最小輝度の代表位置との差が予め定めた閾値より大きい場合は、前記直線抽出手段により抽出された直線の位置を綴じ部位置とみなす。
【0023】
請求項9記載の発明は、請求項1記載の画像歪み補正装置において、前記ページ外形検出手段により前記スキャン画像の主走査方向上辺及び下辺のいずれの綴じ部付近にもページ外形が検出されなかった場合であって、前記文字無し領域検出手段により適切でない文字無し領域が検出された場合は、前記直線抽出手段により抽出された直線の位置を綴じ部位置とみなす。
【0024】
請求項10記載の発明は、請求項1ないし9のいずれか一記載の画像歪み補正装置において、前記ページ外形検出手段は、前記スキャン画像の主走査方向上辺から下方へ向かって黒画素もしくは予め定めた濃度閾値以上の画素がほぼ逆三角形状に分布している場合は前記スキャン画像の主走査方向上辺にページ外形が存在するとみなし、前記スキャン画像の主走査方向下辺から上方へ向かって黒画素もしくは予め定めた濃度閾値以上の画素がほぼ三角形状に分布している場合は前記スキャン画像の主走査方向下辺にページ外形が存在するとみなす。
【0025】
請求項11記載の発明は、請求項1ないし9のいずれか一記載の画像歪み補正装置において、前記文字無し領域検出手段は、主走査方向での白黒画素の反転数、もしくは、予め定めた閾値以上と以下の画素が交代する回数、に関するヒストグラムの分布を利用して、前記文字無し領域を検出する。
【0026】
請求項12記載の発明は、請求項11記載の画像歪み補正装置において、ヒストグラムの値が予め定めた閾値以下である副走査方向の連続領域の中で最大の領域を中心とし、他の閾値以下の連続領域が副走査方向でほぼ対称に存在する場合は、前記最大領域を文字や図が存在しない可能性が高い文字無し領域(適切な文字無し領域)とみなし、他の閾値以下の連続領域が副走査方向で対称に存在しない場合は、これら閾値以下の連続領域の全ての左端から右端までを文字や図が存在しない可能性が低い文字無し領域(適切でない文字無し領域)とみなす。
【0027】
請求項13記載の発明は、請求項12記載の画像歪み補正装置において、ヒストグラムの値が予め定めた閾値以上である副走査方向の連続領域の長さが予め定められた一定値以下の場合は、当該連続領域をヒストグラムの値が予め定めた閾値以下の領域とみなす。
【0028】
請求項14記載の発明は、請求項1ないし9のいずれか一記載の画像歪み補正装置において、前記最小輝度検出手段は、前記スキャン画像の主走査方向の各ライン上での最大輝度値の中で副走査方向において最小値を与える位置を、最小輝度の代表位置とみなす。
【0029】
請求項15記載の発明は、請求項14記載の画像歪み補正装置において、最小輝度の代表位置を通る主走査方向直線と、スキャン画像を副走査方向に貫く中心線もしくは前記画像読取手段の光軸の軌跡との交点を起点とし、スキャン画像の上方と下方の各方向に向かって、各主走査方向位置における最小輝度位置を探索していく。
【0030】
請求項16記載の発明は、請求項1ないし9のいずれか一記載の画像歪み補正装置において、前記直線抽出手段は、前記スキャン画像上の着目画素と当該着目画素から副走査方向に予め定めた距離だけ離れた画素の輝度値の差が予め定めた閾値以上であり、かつ、予め定めた別の閾値以下となるような着目点の集合を基に直線を抽出する。
【0031】
請求項17記載の発明は、請求項1ないし16のいずれか一記載の画像歪み補正装置において、決定した綴じ部位置と画像読み取りの主走査方向との成す角度を前記スキャン画像のスキュー角度として検出する。
【0032】
請求項18記載の発明の画像読取装置は、原稿画像を読み取る画像読取手段と、この画像読取手段により読み取られたスキャン画像の補正を行う請求項1ないし17の何れか一記載の画像歪み補正装置と、を備える。
【0033】
請求項19記載の発明の画像形成装置は、原稿画像を読み取る画像読取手段と、この画像読取手段により読み取られたスキャン画像の補正を行う請求項1ないし17の何れか一記載の画像歪み補正装置と、この画像歪み補正装置から出力される画像データに基づいた画像を用紙上に印刷する画像印刷装置と、を備える。
【0034】
請求項20記載の発明のプログラムは、スキャン面の上もしくは下に接触したブック原稿を画像読取手段により読み取ったスキャン画像の歪み補正を当該スキャン画像におけるブック原稿のページ綴じ部の位置を用いてコンピュータに実行させるプログラムであって、前記コンピュータに、前記スキャン画像の綴じ部付近のページ外形を検出するページ外形検出機能と、文字や図の非存在領域であって前記スキャン画像の綴じ部を含む文字無し領域を検出する文字無し領域検出機能と、最小輝度の代表位置を検出する最小輝度検出機能と、前記スキャン画像上の着目画素と当該着目画素から副走査方向に予め定めた距離だけ離れた画素との輝度値の差が予め定めた閾値以上であり、かつ、予め定めた別の閾値以下となるような着目点の集合を基に直線を抽出する直線抽出機能と、を実行させ、前記ページ外形検出機能により検出されたページ外形の有無、前記文字無し領域検出機能により検出された文字無し領域、前記最小輝度検出機能により検出された最小輝度の代表位置、前記直線抽出機能により抽出された直線の位置を勘案し、前記スキャン画像の綴じ部位置を決定する。
【0035】
【発明の実施の形態】
本発明の実施の一形態を図1ないし図69に基づいて説明する。本実施の形態の画像歪み補正装置は画像形成装置であるデジタル複写機に備えられており、画像読取装置としてはデジタル複写機のスキャナ部が適用されている。
【0036】
ここで、図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上に形成されている。
【0037】
原稿の走査時には、第一走行体5および第二走行体8はステッピングモータ24(図3参照)によって副走査方向に移動する。すなわち、第一走行体5および第二走行体8がコンタクトガラス2の下を走行して、露光ランプ3で原稿を露光走査し、その反射光を第一反射ミラー4、第二反射ミラー6および第三反射ミラー7で反射して、レンズユニット10を通してCCD9に結像させる。ここに、画像読取手段が実現されている。
【0038】
このようなスキャナ部1は、このスキャナ部1で読み取られた原稿の画像に基づく画像データに応じ、例えば電子写真方式で用紙上に画像の形成を行う画像印刷装置であるプリンタ部(図示せず)を備えるデジタル複写機16に搭載されている。図2は、スキャナ部1を搭載したデジタル複写機16の上部部分を示す斜視図である。図2に示すように、スキャナ部1には、コンタクトガラス2に対して開閉自在な圧板17と、この圧板17の開閉を検出する開閉センサ18とが設けられている。なお、デジタル複写機16に備えられるプリンタとしては、電子写真方式のほか、インクジェット方式、昇華型熱転写方式、銀塩写真方式、直接感熱記録方式、溶融型熱転写方式など、種々の印刷方式を適用することができる。その具体的な構成については周知であるため、詳細な説明は省略する。
【0039】
図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とが接続されている。
【0040】
ここで、図4は画像処理部20の基本的な内部構成を示すブロック図である。図4に示すように、画像処理部20は、原稿をCCD9により読み取ったアナログ画像信号の増幅処理やデジタル変換処理等を行うアナログビデオ処理部26、シェーディング補正処理を行うシェーディング補正処理部27、シェーディング補正処理後のデジタル画像信号に、MTF補正、変倍処理、γ補正等の各種画像データ処理を行いスキャン画像を生成する画像データ処理部28から構成されている。以上のような画像処理後のデジタル画像信号は、メイン制御部19を介してプリンタ部に送信されて、画像形成に供される。
【0041】
メイン制御部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とが接続されている。
【0042】
図5に示すCD−ROM37は、この発明の記憶媒体を実施するものであり、所定の制御プログラムが記憶されている。CPU31は、CD−ROM37に記憶されている制御プログラムをCD−ROMドライブ36で読み取り、HDD35にインストールする。これにより、メイン制御部19は、後述するような各種の処理を行うことが可能な状態となる。
【0043】
なお、記憶媒体としては、CD−ROM37のみならず、DVDなどの各種の光ディスク、各種光磁気ディスク、フレキシブルディスクなどの各種磁気ディスク、半導体メモリ等、各種方式のメディアを用いることができる。また、インターネットなどのネットワークからプログラムをダウンロードし、HDD35にインストールするようにしてもよい。この場合に、送信側のサーバでプログラムを記憶している記憶装置も、この発明の記憶媒体である。なお、プログラムは、所定のOS(Operating System)上で動作するものであってもよいし、その場合に後述の各種処理の一部の実行をOSに肩代わりさせるものであってもよいし、ワープロソフトなど所定のアプリケーションソフトやOSなどを構成する一群のプログラムファイルの一部として含まれているものであってもよい。
【0044】
次に、メイン制御部19に設けられたCPU31が制御プログラムに基づいて実行する各種処理の内容について説明する。ここでは、CPU31が実行する処理のうち、本実施の形態のスキャナ部1が備える特長的な機能であるスキャン画像の歪み補正機能を実現するスキャン画像の歪み補正処理についてのみ説明する。すなわち、メイン制御部19は画像歪み補正装置として機能するものである。
【0045】
図6は、スキャン画像の歪み補正処理の流れを概略的に示すフローチャートである。なお、ここでは、図7に示すように、ブック原稿40がそのページ綴じ部41とスキャナ部1の画像読み取りの主走査方向とが平行になるように位置させてコンタクトガラス2に載置されている場合について説明する。
【0046】
まず、ステップS1において、画像データ処理部28から出力されたコンタクトガラス2に載置されているブック原稿40のスキャン画像を入力する。ここで、図8は入力した画像の一例を示したものである。そして、図9に示すように、入力されたブック原稿40のスキャン画像には、ページ綴じ部41のスキャン画像41´の近傍において歪みが生じている。
【0047】
[綴じ部位置の検出]
続くステップS2においては、スキャン画像の綴じ部位置を検出する綴じ部位置検出処理を行う。図10は、綴じ部位置検出処理の流れを概略的に示すフローチャートである。図10に示すように、まず、ブック原稿40のスキャン画像の最適2値化処理を実行した後(ステップS21)、綴じ部付近におけるページ外形有無の判定を行う(ステップS22)。
【0048】
ここで、ステップS22におけるスキャン画像の綴じ部付近のページ外形の有無の判定について説明する。
【0049】
まず、スキャン画像の上辺の綴じ部付近にページ外形が存在するか否かを判定する手法を説明する。図11に示すように、スキャン画像の上辺から、主走査方向の距離が予め定められた一定画素数で分割される短冊領域を作成する。上辺の短冊領域(図11の短冊領域▲1▼)の左端と右端から綴じ部位置に向かって、主走査方向に上記の予め定められた一定値画素分黒画素がはじめて連続する副走査方向の位置を、左右ページ内でそれぞれ決定し、その位置を基準点(図11のLU1,RU1)とする。左右両ページで上記の副走査方向の位置が決定した場合は、探索中の短冊領域内の上記左右ページの基準点で囲まれた範囲内(図11のLU1〜RU1)に存在する黒画素の比率を求める。存在する黒画素の比率が予め定められた閾値以上であれば、次の短冊領域内(図11の短冊領域▲2▼)にて左右ページで決定した基準点をそれぞれ探索開始点とし、同様の処理を行う。以上のように、短冊領域と探索開始点を更新していき、一連の処理が予め定められた一定値以上の回数行われた場合(例えば、スキャン画像の主走査方向上辺から下方へ向かって黒画素がほぼ逆三角形状に分布している場合)は、綴じ部付近の上辺にページ外形が存在すると判定する。
【0050】
左右両ページで、主走査方向に予め定められた一定値画素分黒画素がはじめて連続する副走査方向の位置が決定しない場合や、主走査方向に予め定められた一定値画素分黒画素がはじめて連続する副走査方向の位置は決定したが範囲内の黒画素の比率が予め定められた閾値未満である場合や、上記一連の処理の回数が予め定められた一定値未満であれば、綴じ部付近にページ外形が存在しないと判定する。
【0051】
なお、スキャン画像の下辺の綴じ部付近にページ外形が存在するか否かの判定も、上記の処理と同様の手法により実現できる。すなわち、スキャン画像の主走査方向下辺から上方へ向かって黒画素がほぼ三角形状に分布している場合はスキャン画像の主走査方向下辺にページ外形が存在すると判定する。
【0052】
また、スキャン画像がカラー多値画像の場合には、例えばRGB成分の何れか一つの成分に着目し(例えばG成分)、G成分の所定の濃度閾値よりも大きいものを黒画素とし、G成分の所定の濃度閾値よりも小さいものを白画素とすれば良い。また、RGBを色変換して輝度成分と色差成分とに分け、輝度成分で閾値処理を行うようにしても良い。
【0053】
続くステップS23においては、文字無し領域の検出処理を実行する。ここに、文字無し領域検出手段の機能が実行される。このように文字無し領域を検出するのは、綴じ部位置探索範囲を絞るためである。仮に綴じ部位置が正確に検出できなかったとしても、綴じ部付近の文字無し領域内での誤認識であれば歪み補正処理にはさほど支障はきたさないからである。文字無し領域は、綴じ部を含む領域ではあるが、全く文字のない範囲を示すとは限らないため、綴じ部を含み、かつ、全く文字のない可能性が高い範囲を「適切な文字無し領域」と定義する。文字無し領域を検出した際には、検出した文字無し領域が適切な文字無し領域であるか否かの判定も行う。
【0054】
文字無し領域の検出は、主走査方向に1ラインずつ、白黒の反転数(注目画素と真下(右隣)との画素が白黒で反転している回数)、または、予め定められた閾値以上と以下の画素が交代する回数、を数えてヒストグラムを生成する。ここで、図12は生成されたヒストグラムの一例を示すものである。
【0055】
続いて、このようにして生成されたヒストグラムを副走査方向に解析する。ヒストグラムの副走査方向の解析は、図13に示すように、ヒストグラムの値が予め定められた閾値以下となる座標が連続している箇所(図13内の▲1▼〜▲5▼)があれば、その箇所の終始点の座標とその距離をリスト化する。リスト化の過程において、注目リストの終点座標と次のデータの始点座標との位置の差が予め定められた一定値以内であれば、それらを統合し1つのリストデータとして扱う(図13の▲4▼)。すなわち、ヒストグラムの値が予め定めた閾値以上である副走査方向の連続領域の長さが予め定められた一定値以下の場合は、当該連続領域をヒストグラムの値が予め定めた閾値以下の領域とみなす。次に、全リスト中のそれぞれのリストが有する終始点の座標の中から、文字無し領域の始点座標・終点座標を選択する。横書き画像の行間は副走査方向に垂直であるが、縦書き画像の行間は副走査方向と平行であるため、両者はヒストグラムの傾向が異なる。横書き画像(図13に示すスキャン画像の左ページ)で副走査方向のヒストグラムの値が予め定められた閾値以下の連続領域は、綴じ部付近のみである場合が多いが、縦書き画像(図13に示すスキャン画像の右ページ)では、副走査方向のヒストグラムの値が予め定められた閾値以下の連続領域は、一般に複数存在する。そこで、リスト数によって、文字無し領域を推定する。以下、リスト数に応じた文字無し領域の判定について場合を分けて説明する。
【0056】
図14に示すように、リスト数が単数の場合には、副走査方向文字無し領域探索範囲内にて着目したリストの始点座標から終点座標までを文字無し領域とし、適切な文字無し領域と判定する。
【0057】
図15に示すように、リスト数が複数の場合には、副走査方向文字無し領域探索範囲内の全リスト中で最大の距離を持つリストに着目し、着目リストから前後同距離にあるリスト同士を比べる。全てのリストの組がそれぞれ有している終始座標間の長さの差が一定値以内であれば、副走査方向に平行な行間であるとみなす。左右のページで行間が均一に位置している場合は、最大の距離を持ち、かつ、全リスト中の中央付近に位置するリストの始点座標から終点座標までを文字無し領域とし、適切な文字無し領域と判定する。
【0058】
一方、図16に示すように、リスト数が複数あり、かつ、最大の距離を持つリストを中心として、前後のリストの終始座標間距離が対称の並びになっていない場合には、どのリストに綴じ部が含まれているかを断定する材料を欠くため、綴じ部を含まない文字無し領域を検出する恐れがある。このような場合は、副走査方向文字無し領域探索範囲内の先頭リストの開始座標から、最終リストの終点座標までを文字無し領域とする。この場合、検出した文字無し領域内には明らかに文字や図が存在するため、適切な文字無し領域でないと判定する。
【0059】
また、図17に示すように、リスト数が0の場合には、副走査方向全体を文字無し領域とする。この場合も、検出した文字無し領域内には明らかに文字や図が存在するため、適切な文字無し領域でないと判定する。
【0060】
以上のようにして文字無し領域を検出すると、ステップS22におけるスキャン画像の綴じ部付近のページ外形の有無の判定に応じた処理を実行する。
【0061】
スキャン画像の綴じ部付近にページ外形が存在すると判定し(ステップS24のY)、さらにページ外形が上下辺のどちらか一方にのみ存在する場合には(ステップS25のN)、ステップS26に進み、ページ外形の頂点を検出するページ外形頂点検出処理を実行する。ページ外形頂点検出処理は、ページ外形の主走査方向の座標値が最も内部に食い込んでいる座標をページ外形頂点とするものである。より具体的には、図18に示すように、上辺のページ外形の頂点についてはその主走査方向(図18中、y方向)の座標値が最小の点をページ外形頂点とし、下辺のページ外形の頂点についてはその主走査方向の座標値が最大の点をページ外形頂点とする。なお、ページ外形の検出処理については、各種の処理方法を用いることが可能である。例えば、特許文献2に記載されているような手法を用いることが可能である。ここに、ページ外形検出手段の機能が実行される。
【0062】
次に、ステップS27に進み、最小輝度の代表位置を検出する。ここで、最小輝度の代表位置検出について説明する。ここでは、主走査方向の各ライン上での最大輝度値の中で、副走査方向において最小値を与える位置を最小輝度の代表位置とみなす。より具体的には、最小輝度の代表位置を通る主走査方向直線と、スキャン画像を副走査方向に貫く中心線もしくはスキャナ部1のスキャナレンズの光軸の軌跡との交点を起点とし、スキャン画像の上方と下方の各方向に向かって、各主走査方向位置における最小輝度位置を探索していく。図19は主走査方向の各ライン上での最大輝度値の中で、副走査方向において最小値を与える位置のヒストグラムであり、この場合、図19中のPの位置が最小輝度の代表位置となる。ここに、最小輝度検出手段の機能が実行される。
【0063】
このようにして最小輝度の代表位置が検出されると、ステップS28に進み、ページ外形頂点と最小輝度の代表位置とを比較する。
【0064】
ページ外形頂点と文字無し領域内の最小輝度の代表位置との差が予め定められた一定値以内の場合は、綴じ部付近の画素値が最小となるような輝度の分布である画像とみなすことができるので、最小輝度の代表位置を決定し(ステップS29のY)、後述するステップS31に進む。
【0065】
一方、ページ外形頂点と文字無し領域内の最小輝度の代表位置との差が予め定められた一定値未満の場合は、綴じ部付近の画素値が最小とならない輝度の分布である画像とみなすことができるので、最小輝度の代表位置を決定せずに(ステップS29のN)、ステップS30に進み、文字無し領域内にて直線抽出を行う。ここに、直線抽出手段の機能が実行される。
【0066】
ここで、ステップS30における直線抽出処理について詳述する。綴じ部付近では、ある着目画素と副走査方向に一定距離離れた画素との間には、輝度の差が生じている。上記の輝度の差が、予め定められた閾値以上であり、かつ、予め定められた別の閾値以下となるような点の集合(図20参照)を基にハフ変換を行うと、直線と直線の角度が抽出される。ステップS30においては、このようにして抽出された直線を、綴じ部位置と決定する。例えば、図21に示すように、x−y平面上の点P(x,y)を通過する直線は下記の式
ρ=xcosθ+ysinθ
を満たす。ρは点Pと原点Oの距離である。θはPOとx軸のなす角度である。また、図22に示すように、x−y平面上の点Pは、ρ−θ平面では1本の曲線に射影される。すなわち、x−y平面にて同一直線上に存在する点に対応する曲線は、ρ−θ平面では全て点(ρ,θ)を通過する。x−y平面での点が正確に同一直線上に存在せずに多少の誤差を含んでいても、ρ−θ平面上での対応する曲線は点(ρ,θ)の近傍を通過する。よって、ρ−θ平面を予め定められた一定値の長さのメッシュ領域に区切り、各メッシュを通過する曲線の数をカウントすれば、通過曲線数の多いメッシュ領域に対応してx−y平面上の直線が存在するといえる。以上の処理を輝度の差が、予め定められた閾値以上であり、かつ、予め定められた別の閾値以下となるような点の集合に対して行う。すると、ρは綴じ部直線に対する垂線、θが綴じ部直線の角度が求められる。また、通過曲線数の多いメッシュを上位から予め定められた数だけ抽出し、綴じ部直線情報の候補を複数保持しておく。直線抽出の優先順位は、上記通過曲線数の順位に準ずるものとする。
【0067】
次いで、このようにして抽出された複数の直線候補の中から、当該ページ外形の頂点と最も近い直線を綴じ部位置に決定する(ステップS31)。具体的には、図23に示すように、最小輝度の代表位置と画像を副走査方向に貫く中心線もしくはスキャナの光軸の軌跡との交点を基点とし、画像の上方と下方の各方向に向かって各主走査方向における最小輝度位置を決定し、その軌跡を綴じ部位置と決定する。綴じ部位置の線分と、画像の高さの中心またはスキャナレンズの光軸の主走査方向の位置を通る副走査方向に平行な直線がなす角度(図23に示すθ)を綴じ部位置のスキュー角度とする。
【0068】
図24に上ページにのみページ外形が存在する場合を示す。図24に示すように、綴じ部位置の線分と、画像の高さの中心またはスキャナレンズの光軸の主走査方向の位置を通る副走査方向に平行な直線との交点の副走査方向における位置を、綴じ部代表位置とする。また、綴じ部位置の線分と、画像の高さの中心またはスキャナレンズの光軸の主走査方向の位置を通る副走査方向に平行な直線がなす角度(図24に示すθ)を綴じ部位置のスキュー角度とする。なお、下ページにのみページ外形が存在する場合も、同様の処理を行う。
【0069】
また、最小輝度の代表位置を決定した場合も(ステップS29のY)、ステップS31に進み、最小輝度の代表位置と画像を副走査方向に貫く中心線もしくはスキャナの光軸の軌跡との交点を基点とし、画像の上方と下方の各方向に向かって各主走査方向における最小輝度位置を決定し、その軌跡を綴じ部位置と決定する。
【0070】
一方、スキャン画像の綴じ部付近にページ外形が存在すると判定し(ステップS24のY)、さらにページ外形が上下辺のどちらにも存在する場合には(ステップS25のY)、両ページ外形頂点座標を検出し(ステップS32)、上下の各ページ外形の頂点を結んだ線分を綴じ部位置とする(ステップS31)。このようにするのは、上下辺のどちらにもページ外形が存在する場合は、最も有効な手がかりである両ページ外形頂点を利用するからである。ここで、図25は上下ページの両側にページ外形が存在する例である。図25に示すように、綴じ部位置の線分と、画像の高さの中心またはスキャナレンズの光軸の主走査方向の位置を通る副走査方向に平行な直線との交点の副走査方向における位置を、綴じ部代表位置とする。また、綴じ部位置の線分と、画像の高さの中心またはスキャナレンズの光軸の主走査方向の位置を通る副走査方向に平行な直線がなす角度(図25に示すθ)を綴じ部位置のスキュー角度とする。
【0071】
また、スキャン画像の綴じ部付近にページ外形が存在しないと判定した場合には(ステップS24のN)、ステップS33に進み、適切な文字無し領域が検出できたか否かを判定する。
【0072】
適切な文字無し領域が検出された場合には(ステップS33のY)、文字無し領域内の最小輝度の代表位置を検出し(ステップS34)、最小輝度代表位置と文字無し領域内の規定範囲を比較し(ステップS35)、ステップS29に進む。
【0073】
ページ外形頂点と文字無し領域内の最小輝度の代表位置との差が予め定められた一定値以内の場合は、綴じ部付近の画素値が最小となるような輝度の分布である画像とみなすことができるので、最小輝度の代表位置を決定し(ステップS29のY)、ステップS31に進み、綴じ部位置を決定する。
【0074】
一方、ページ外形頂点と文字無し領域内の最小輝度の代表位置との差が予め定められた一定値未満の場合は、綴じ部付近の画素値が最小とならない輝度の分布である画像とみなすことができるので、最小輝度の代表位置を決定せずに(ステップS29のN)、文字無し領域内にて直線抽出を行った後(ステップS30)、綴じ部位置を決定する(ステップS31)。
【0075】
一方、適切な文字無し領域が検出されない場合には(ステップS33のN)、最小輝度の代表位置が文字や図である可能性を考慮し、文字無し領域内にて直線抽出を行った後(ステップS30)、綴じ部位置を決定する(ステップS31)。
【0076】
ここで、図26はスキャン画像の綴じ部付近にページ外形が存在しない例である。図26に示すように、綴じ部位置の線分と、画像の高さの中心またはスキャナレンズの光軸の主走査方向の位置を通る副走査方向に平行な直線との交点の副走査方向における位置を、綴じ部代表位置とする。また、綴じ部位置の線分と、画像の高さの中心またはスキャナレンズの光軸の主走査方向の位置を通る副走査方向に平行な直線がなす角度(図26に示すθ)を綴じ部位置のスキュー角度とする。
【0077】
以上により、ステップS2における綴じ部位置検出処理が終了する。
【0078】
このような本実施の形態の綴じ部位置検出処理によれば、書籍の紙質や置き方に依存せずに綴じ部位置を検出することができるので、歪み補正処理の補正精度の向上を図ることができる。
【0079】
なお、図24、25、26に示すように、綴じ部位置のスキュー角度が検出された場合には、例えば、スキャナレンズの光軸の軌跡と綴じ部位置との交点を中心としてスキュー角度だけスキャン画像全体を回転させ、スキャン画像のスキューを補正するようにすれば良い。
【0080】
次いで、ブック原稿40のスキャン画像(例えば、モノクロ多値画像)の最適2値化処理を実行し(ステップS3)、副走査方向の黒画素(スキャン画像の画素の中でその濃度値が予め定めた濃度値よりも濃い画素)数のヒストグラムを求める(ステップS4)。図27は、図8に示した画像の綴じ部境界線左側の黒画素ヒストグラムである。図27中の横軸は、主走査方向の黒画素(スキャン画像の画素の中でその濃度値が予め定めた濃度値よりも濃い画素)の位置を示し、図27中の縦軸は、その位置毎の黒画素数を示すものである。
【0081】
なお、スキャン画像がカラー多値画像の場合における2値化処理は、例えばRGB成分の何れか一つの成分に着目し(例えばG成分)、G成分の所定の濃度閾値よりも大きいものを黒画素とし、G成分の所定の濃度閾値よりも小さいものを白画素とすれば良い。また、RGBを色変換して輝度成分と色差成分とに分け、輝度成分で閾値処理を行うようにしても良い。
【0082】
続くステップS5においては、ページ外形/罫線/文字行の抽出処理を実行する。ここで、図28は、ページ外形/罫線/文字行の抽出処理の流れを概略的に示すフローチャートである。
【0083】
[スキャン画像からのページ外形の抽出]
まず、ステップS41におけるスキャン画像からのページ外形の抽出処理について説明する。ここで、図29は上端にページ外形が存在するスキャン画像の一例を示す説明図、図30は図29に示したスキャン画像の綴じ部境界線左側の黒画素ヒストグラムである。図30に示すヒストグラムのx軸はスキャン画像の主走査方向(図29の上下方向)を示すものであり、スキャン画像の上端はヒストグラムの左端に対応付けられている。なお、ページ外形が下端に存在するスキャン画像の場合には、スキャン画像の下端がヒストグラムの右端に対応付けられることになる。したがって、図29に示すようにスキャン画像の上端にページ外形が存在する場合、スキャン画像の上部に黒い帯が現れることから、図30に示すヒストグラムの左端には高い縦棒が現れることになる。本実施の形態では、このような特性を利用して、スキャン画像にページ外形が存在するか否かの判断を行う。
【0084】
より具体的には、図30に示すように、綴じ部境界線からスキャン画像の左端(図29の左端)までの距離AO、ヒストグラム縦棒の高さBOとし、その比率を下記に示す式(1)により算出し、
【0085】
【数1】

Figure 2005051383
【0086】
算出された比率kが、予め定められた閾値よりも大きい場合に、スキャン画像にページ外形が存在すると判断する。
【0087】
なお、スキャン画像の上下にページ外形が存在する場合には、ヒストグラムの左右両端に高い縦棒が現れることになるので、このような場合には、ヒストグラムの左右両端の高い縦棒に基づいてスキャン画像にページ外形が存在するか否かの判断がそれぞれ実行される。
【0088】
以上の処理により、スキャン画像にページ外形が存在すると判断された場合には、左右ページの上下辺のいずれにページ外形が存在しているのかという情報とともにページ外形を抽出し、RAM33に一時的に記憶する。
【0089】
なお、このスキャン画像にページ外形が存在するか否かの判断処理は、スキャン画像の綴じ部境界線を境にした左右ページ毎に実行される。
【0090】
[スキャン画像からの罫線の抽出]
続くステップS42においては、スキャン画像からの罫線の抽出処理を実行する。ステップS42におけるスキャン画像からの罫線の抽出処理について説明する。
【0091】
[罫線候補の検出]
ここで、図31は長い罫線が存在するスキャン画像の一例を示す説明図、図32は図31に示したスキャン画像の綴じ部境界線左側の黒画素ヒストグラムである。図32に示すヒストグラムのx軸はスキャン画像の主走査方向(図31の上下方向)を示すものであり、スキャン画像の上端はヒストグラムの左端に対応付けられている。図31に示すようにスキャン画像に罫線が存在する場合には、図32に示すヒストグラムに幅の狭いピークが現れることになる。本実施の形態では、このような特性を利用して、スキャン画像に罫線が存在するか否かの判断を行う。
【0092】
より具体的には、まず、図32に示すヒストグラムに現れた幅の狭いピークの高さHを求めるとともに、求められた各ピークの中央位置(高さが半分の位置)における幅Wを求める。そして、ピークの高さHが予め定められた閾値thHよりも高く、かつ、ピークの中央位置の幅Wが予め定められた閾値thWより小さなピークが存在する場合、そのピークを罫線の候補とする。
【0093】
続いて、罫線の候補とされたピークについて、罫線の連続性を利用して、更に罫線か否かの判断をする。図33に示すように、候補罫線上の適当な位置(例えば、ページの中心線の位置)を開始点とし、この開始点から候補罫線を左右方向へ探索し、切断点(罫線がかすれて途切れている部分)の数を累積する。切断点の数が予め定められた閾値より少なければ、この候補を罫線と判断する。このように罫線連続性に基づいて罫線か否かの判断をすることにより、罫線として誤って検出された小さな文字で構成された横書き文字行や点線等を排除することが可能になる。
【0094】
[罫線の座標検出]
以上のようにして罫線を判別した後、各罫線の座標を検出する。罫線座標の検出は、図34に示すように、罫線の主走査方向(図34のy軸方向)の座標値を罫線部の黒画素ランの中点座標とした場合、図34に示す罫線の左端のx1における主走査方向座標値はy1となる。
【0095】
[最適罫線の選択]
次に、候補罫線の中から歪み補正に最適な罫線を選択する。図35に示すように複数の罫線が検出される場合、どの罫線を用いて歪み補正するかを選択する必要がある。最適な罫線の選択基準の一例としては、罫線の長さが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内(図35の網掛け領域)に罫線の一部がかかっていることを条件とし、その中で上下いずれかのページ外形に最も近い罫線を選択するようにする。図35においては、左右ページから各1本ずつの罫線を選択する場合を示している。ここでは、罫線▲1▼と罫線▲2▼とが選択されている。
【0096】
また、最適な罫線の選択基準の別の例としては、罫線の長さが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内(図36の網掛け領域)に罫線の一部がかかっていることを条件とし、各ページの上部では上端のページ外形に、各ページの下部では下端のページ外形に、それぞれ最も近い罫線を選択するようにする。図36においては、左右ページをさらに上下部分に分け、その各4ブロックにおいて1本ずつの罫線を選択する場合を示している。ここでは、左上のブロックでは罫線▲1▼、右下のブロックでは罫線▲2▼、左下のブロックでは罫線▲3▼が選択されている。なお、図36中の右上のブロックには上記2条件(罫線の長さが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内に罫線の一部がかかっている)を満足する罫線が存在しないので、選択された罫線はない。
【0097】
なお、上記2条件(罫線の長さが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内に罫線の一部がかかっている)については、その両方ではなくいずれか一方のみを満足するものであっても良い。また、選択基準として上例では「ページ外形に最も近い」を用いているが、これに限るものではなく、「罫線の湾曲が最も大きい」を用いても良い。ここで、「罫線の湾曲」は罫線の左右両端点の主走査方向の座標値の差で表すものとする。
【0098】
[最適罫線の座標値の決定]
最適な罫線が選択された場合には、罫線の(主走査方向の)座標値を決定する。罫線の(主走査方向の)座標値は、選択された罫線を左右ページのそれぞれ両端に達するまで近似して延長することにより決定される。図37において、罫線が存在しているBC部については、前述した罫線座標検出処理により既に座標値は決まっていることから、それ以外の延長部分について罫線の(主走査方向の)座標値を決定することになる。より詳細には、図37に示すAB部は直線近似で(主走査方向の)座標値を推定し、CD部は多項式近似曲線で(主走査方向の)座標値を推定する。
【0099】
[不適切な罫線の排除]
最後に不適切な罫線を排除する。これは、前述したように多項式近似により座標値を推定する際に、多項式近似による推定曲線の形状が不適切である場合には補正の際にかえって歪みが増大する恐れがあるので、このような罫線を排除するものである。不適切な近似曲線形状の例としては、図38に示すように、曲線が書籍の外側へ向かうような曲線▲1▼や、中心線を超えて大きく内側へ食い込むような曲線▲2▼である。
【0100】
なお、推定曲線の形状が不適切であるとして罫線を排除した場合には、再び最適な罫線を選択し、上記の処理を繰り返すことになる。
【0101】
以上の処理により、スキャン画像に罫線が存在すると判断された場合には、左右各ページのいずれの位置に罫線が存在しているのかという情報とともに罫線を抽出し、RAM33に一時的に記憶する。
【0102】
[スキャン画像からの文字行の抽出]
続くステップS43においては、スキャン画像からの文字行の抽出処理を実行する。ステップS43におけるスキャン画像からの文字行の抽出処理について説明する。本実施の形態においては、まず、スキャン画像中の文字行が縦書き文字行なのか、横書き文字行なのかの判別を行う。
【0103】
[文字行の判別]
スキャン画像中の文字行が縦書き文字行なのか、横書き文字行なのかの判別手法について説明する。ここで、図39は図8に示した画像の副走査方向の黒白反転数ヒストグラムである。図39中の横軸は、副走査方向(左右方向)の黒画素(スキャン画像を黒白反転させた画素の中でその濃度値が予め定めた濃度値よりも濃い画素)の主走査方向上での位置を示し、図39中の縦軸は、その位置毎の黒画素数を示すものである。また、図40は図8に示した画像の主走査方向の黒白反転数ヒストグラムである。図40中の横軸は、主走査方向(上下方向)の黒画素(スキャン画像を黒白反転させた画素の中でその濃度値が予め定めた濃度値よりも濃い画素)の副走査方向上での位置を示し、図40中の縦軸は、その位置毎の黒画素数を示すものである。画像中の文字が横書きの図8に示したようなスキャン画像の場合、図39に示すような副走査方向のヒストグラムは激しく変化するが、図40に示すような主走査方向のヒストグラムの変化は少ない。また、特に図示しないが、スキャン画像中の文字行が縦書き文字行である場合には、主走査方向のヒストグラムは激しく変化するが、副走査方向のヒストグラムの変化は少ない。
【0104】
上述したような判別手法は、具体的には下記に示す各式により実現される。まず、下記に示す式(2)により、
【0105】
【数2】
Figure 2005051383
【0106】
主走査方向yの位置でのヒストグラム値Pnt(y)の平均値meanが算出される。ここで、heightは画像の高さである。
そして、下記に示す式(3)により、
【0107】
【数3】
Figure 2005051383
【0108】
副走査方向のヒストグラムの主走査方向に関する分散σが得られる。
同様に、下記に示す式(4)により、
【0109】
【数4】
Figure 2005051383
【0110】
副走査方向xの位置でのヒストグラム値Pnt(x)の平均値meanが算出される。ここで、widthは画像の幅である。
そして、下記に示す式(5)により、
【0111】
【数5】
Figure 2005051383
【0112】
主走査方向のヒストグラムの副走査方向に関する分散σが得られる。
【0113】
上述したようにスキャン画像中の文字行が横書き文字行である場合には、副走査方向のヒストグラムの主走査方向に関する分散σが、主走査方向のヒストグラムの副走査方向に関する分散σより大きい。逆に、スキャン画像中の文字行が縦書き文字行である場合には、主走査方向のヒストグラムの副走査方向に関する分散σが、副走査方向のヒストグラムの主走査方向に関する分散σより大きい。つまり、分散σと分散σとの比較により、スキャン画像中の文字行が縦書き文字行なのか、横書き文字行なのかの判別が可能になっている。
【0114】
なお、スキャン画像中の文字行が縦書き文字行なのか、横書き文字行なのかの判別に、黒白反転数ヒストグラムを用いたのは、文字行と写真部分との混同を避けるためである。一般に、黒画素ヒストグラムの値が同程度の場合、文字領域のほうが写真領域よりも黒白反転数ヒストグラムの値が大きくなるからである。
【0115】
[横書き文字行の座標検出]
以上のようにして文字行を判別した後、まず、各横書き文字行の座標を検出する。横書き文字行の座標の検出にあたっては、文字単位の外接矩形抽出処理を行うとともに、横書き文字行の抽出処理を行う。なお、文字認識処理については周知の技術であるので、その説明は省略する。ここで、スキャン画像の文字外接矩形抽出処理および文字行抽出処理の結果の一例を図41に示す。そして、各文字の外接矩形の中心点の座標をその文字の座標とみなし、横書き文字行の座標を検出する。
【0116】
[最適横書き文字行の選択]
次に、抽出した横書き文字行の中から歪み補正に最適な横書き文字行を選択する。複数の横書き文字行が検出される場合、どの横書き文字行を用いて歪み補正するかを選択する必要がある。最適な横書き文字行の選択基準の一例としては、前述した最適な罫線の選択基準と基本的に同様であって、図42に示すように横書き文字行の長さBCが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内(図42の網掛け領域)に横書き文字行の一部Cがかかっていることを条件とし、その中で上下いずれかのページ外形に最も近い横書き文字行を選択するようにする。ここで、Bは文字行の一番左の矩形の中心であり、Cは一番右の矩形の中心である。なお、最適な横書き文字行の選択は、左右ページから各1本ずつのページ外形に最も近い横書き文字行を選択するものであっても良いし、左右ページをさらに上下部分に分け、その各4ブロックにおいて1本ずつのページ外形に最も近い横書き文字行を選択するものであっても良い。
【0117】
なお、上記2条件(横書き文字行の長さが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内に横書き文字行の一部がかかっている)については、その両方ではなくいずれか一方のみを満足するものであっても良い。また、選択基準として上例では「ページ外形に最も近い」を用いているが、これに限るものではなく、「横書き文字行の湾曲が最も大きい」を用いても良い。ここで、「横書き文字行の湾曲」は横書き文字行の両端の文字外接矩形の中心座標の主走査方向の座標値の差で表すものとする。
【0118】
[最適横書き文字行の座標値の決定]
最適な横書き文字行が選択された場合には、横書き文字行の(主走査方向の)座標値を決定する。横書き文字行の(主走査方向の)座標値は、横書き文字行内の各文字外接矩形の中心点を連結し、直線部分と曲線部分とを近似して抽出することにより横書き文字行の(主走査方向の)座標値を決定することになる。より詳細には、図42に示すDは綴じ部境界線であり、BDの間は多項式近似曲線で(主走査方向の)座標値を推定し、一番左端のAとBとの間は近似直線の値で(主走査方向の)座標値を推定する。
【0119】
[不適切な横書き文字行の排除]
最後に不適切な横書き文字行を排除する。これは、前述したように多項式近似により座標値を推定する際に、多項式近似による推定曲線の形状が不適切である場合には補正の際にかえって歪みが増大する恐れがあるので、このような横書き文字行を排除するものである。不適切な近似曲線形状の例としては、前述した罫線の場合と同様であって、特に図示しないが、曲線が書籍の外側へ向かうような場合や、中心線を超えて大きく内側へ食い込むような場合である。
【0120】
なお、推定曲線の形状が不適切であるとして横書き文字行を排除した場合には、再び最適な横書き文字行を選択し、上記の処理を繰り返すことになる。
【0121】
以上の処理により、スキャン画像に横書き文字行が存在すると判断された場合には、左右各ページのいずれの位置に横書き文字行が存在しているのかという情報とともに横書き文字行を抽出し、RAM33に一時的に記憶する。
【0122】
[縦書き文字行に基づく横書き文字行の抽出]
次に、各縦書き文字行から横書き文字行を抽出する。
【0123】
図43は、各縦書き文字行からの横書き文字行の抽出処理の流れを概略的に示すフローチャートである。図43に示すように、まず、縦書き文字行の行切り出し矩形を抽出する(ステップS201)。なお、縦書き文字行の行切り出し矩形の抽出処理は、OCR等で一般に用いられている周知の技術をそのまま利用することができるので、その説明は省略する。図44は、抽出した行切り出し矩形を例示的に示す説明図である。
【0124】
次いで、縦書き文字行の先頭(もしくは末尾)のy座標が最大(もしくは最小)の縦書き文字行を抽出し、さらに、そこから予め定めた距離範囲内に先頭(もしくは末尾)が存在する縦書き文字行を抽出する(ステップS202)。より具体的には、図44に示した例においては、図45に示すように、縦書き文字行の先頭文字のy座標が最大の縦書き文字行はAで示した縦書き文字行である。そして、その先頭位置から予め定めた距離範囲h内に存在する行先頭文字は、図45中、黒丸“●”で示した文字である。すなわち、黒丸“●”で示す文字を含む縦書き文字行のみを抽出し、それ以外の縦書き文字行B,Cは除外する。なお、hはスキャン画像の解像度によって定められる定数である。
【0125】
次に、抽出した縦書き文字行の先頭(もしくは末尾)のy座標に関してヒストグラムを構成する(ステップS203)。図46では、ページの左端に近い縦書き文字行Dを基準行とし、その先頭のy座標(y)を基準座標としている。以後、yに対して一定幅d(例えば抽出した縦書き文字行の平均幅の1/2)の範囲内に先頭が存在する縦書き文字行の数を、yに関するヒストグラムの値とする。図46では、yを示す直線を上下に挟む点線の範囲内に先頭が存在する縦書き文字行がその対象となる。したがって、ページの左端に近い縦書き文字行Dの右隣の縦書き文字行Eは、その範囲外である。このように、既存の基準座標の対象範囲に先頭が含まれない縦書き文字行が出現した場合は、その縦書き文字行を新たな基準行とし、その先頭座標を新たな基準座標(ここでは、y)とする。また、縦書き文字行Eの右隣の縦書き文字行Fの行先頭座標はyの対象範囲に含まれるので、新たな基準座標を設けることなく、yに関するヒストグラムの値を1だけカウントアップする。
【0126】
以下、同様の処理を綴じ部境界線に向かって続けて行く。その結果、図46に示す例では、yの対象範囲に含まれる縦書き文字行は斜線を施した矩形で囲まれた7つで、yの対象範囲に含まれる縦書き文字行は網掛けを施した矩形で囲まれた4つとなる(これら以外の矩形で囲まれた縦書き文字行に関しても、基準行、基準座標と対象範囲がそれぞれ定められるが、図46では省略している)。なお、yの対象範囲には本来無関係であるべき縦書き文字行Gも含まれているが、次のステップS204にてこれは除外される。
【0127】
続いて、ステップS203にて構成したヒストグラムの中で、最大の値に対応する基準行の対象範囲に含まれる縦書き文字行の中で、最もページの左端(もしくは右端)にある縦書き文字行(基準行)を開始行として、綴じ部境界線へ向かって、先頭(もしくは末尾)のy座標が近接した縦書き文字行を抽出する(ステップS204)。図46では、基準座標yの対象範囲に含まれる文字行が7つと最大であったので、その中の左端の縦書き文字行Dを開始行とし、開始行(縦書き文字行D)から綴じ部境界線へ向かって先頭のy座標が近接した縦書き文字行を抽出していく。
【0128】
ところで、開始行(縦書き文字行D)から綴じ部境界線へ向かって先頭のy座標が近接した縦書き文字行を抽出する際には、画像の歪みを生じていない部分と歪みを生じている部分とで処理内容を切り替える。
【0129】
まず、画像の歪みを生じていない部分における処理について図47を参照しつつ説明する。画像の歪みを生じていない部分では、着目行Hを基準として、次の2条件を満足する縦書き文字行を抽出する。
1.y座標の正方向(図47中、上方へ向かう方向)に関して、着目行Hの先頭位置から一定範囲内b1(例えば平均文字行幅の1/2)に抽出する縦書き文字行の先頭が存在すること
2.y座標の負方向(図47中、下方へ向かう方向)に関して、着目行Hの先頭位置から見てx座標の正方向(綴じ部境界線へ向かう方向)に対して予め定めた一定角度(ここでは、角度を直線の傾き(b2/a1)で表している)の範囲内に抽出する縦書き文字行の先頭が存在すること
すなわち、着目行Hの次の縦書き文字行Iの先頭は上記の範囲外なので除外することになるが、さらに次の縦書き文字行Jの先頭は範囲内に存在するので抽出することになる。以下、縦書き文字行Jを新たな着目行として同様の処理を続ける。
【0130】
次に、画像の歪みを生じている部分における処理について図48を参照しつつ説明する。画像の歪みを生じている部分では、着目行Lを基準として、次の2条件を満足する縦書き文字行を抽出する。
1.y座標の負方向(図48中、下方へ向かう方向)に関して、着目行Lの先頭位置から見てx座標の正方向(綴じ部境界線へ向かう方向)に対して予め定めた一定角度(ここでは、角度を直線の傾き(b3/a2)で表しているが、歪みを生じている部分では基本的にページの内側へ文字行の先頭が食い込んでいくのを考慮して、b2/a1<b3/a2とする)の範囲内に抽出する縦書き文字行の先頭が存在すること
2.着目行Lの先頭位置と抽出する縦書き文字行の先頭位置を結ぶ直線の傾き(b4/a2)が、着目行Lの先頭位置と直前の抽出行Kの先頭位置を結ぶ直線の傾き(b5/a3)から一定値αを引いた値よりも大きい。すなわち、“b4/a2>b5/a3−α”を満足すること(基本的には、“b4/a2>b5/a3”で良いが、誤差を考慮して一定値αを導入する。一定値αは予め定めた値である)
すなわち、着目行Lの次の縦書き文字行Mの先頭はこの条件外なので除外することになるが、さらに次の縦書き文字行Nの先頭は条件を満足するので抽出することになる。以下、縦書き文字行Nを新たな着目行として同様の処理を続ける。
【0131】
さて、ここで問題となるのは、歪みを生じていない部分と歪みを生じている部分をいかに識別するかであるが、これは次のように行っている。すなわち、着目行と次の抽出行の先頭のy座標をそれぞれy,yとすると、“y−y”が一定値(例えば、平均文字行幅の1/4)以上となれば、それ以降を歪みを生じている部分とする。
【0132】
以上の方法により図46から抽出した縦書き文字行を、図49において斜線を施した矩形で囲んで示す。
【0133】
最後に、抽出した縦書き文字行の先頭(もしくは末尾)の位置座標に関する近似曲線多項式を算出する(ステップS205)。抽出した各縦書き文字行の行切り出し矩形の先頭を連結して外形を形成する場合には、図50に示すように、連結する各縦書き文字行の行切り出し矩形の上辺中心点に基づき、抽出した縦書き文字行の先頭の位置座標に関する近似曲線多項式を算出する。また、抽出した各縦書き文字行の行切り出し矩形の末尾を連結して外形を形成する場合には、図50に示すように、連結する各縦書き文字行の行切り出し矩形の下辺中心点に基づき、抽出した縦書き文字行の末尾の位置座標に関する近似曲線多項式を算出する。
【0134】
なお、最後に不適切な縦書き文字行の外形を排除する。これは、前述したように多項式近似により座標値を推定する際に、多項式近似による推定曲線の形状が不適切である場合には補正の際にかえって歪みが増大する恐れがあるので、このような縦書き文字行の外形を排除するものである。不適切な近似曲線形状の例としては、前述した罫線や横書き文字行の場合と同様であって、特に図示しないが、曲線が書籍の外側へ向かうような場合や、中心線を超えて大きく内側へ食い込むような場合である。
【0135】
[不適切な縦書き文字行の外形の排除]
最後に不適切な縦書き文字行の外形を排除する。これは、前述したように多項式近似により座標値を推定する際に、多項式近似による推定曲線の形状が不適切である場合には補正の際にかえって歪みが増大する恐れがあるので、このような縦書き文字行の外形を排除するものである。不適切な近似曲線形状の例としては、前述した罫線や横書き文字行の場合と同様であって、特に図示しないが、曲線が書籍の外側へ向かうような場合や、中心線を超えて大きく内側へ食い込むような場合である。
【0136】
なお、推定曲線の形状が不適切であるとして縦書き文字行の外形を排除した場合には、歪み補正用の縦書き文字行の外形は無いということになる。
【0137】
以上の処理により、スキャン画像に縦書き文字行の外形が存在すると判断された場合には、左右各ページのいずれの位置に縦書き文字行の外形が存在しているのかという情報とともに縦書き文字行の外形を抽出し、RAM33に一時的に記憶する。
【0138】
なお、以下においては、横書き文字行及び縦書き文字行の外形を文字列として扱うものとする。
【0139】
以上、ステップS41〜S43の処理により、ページ外形/罫線/文字行の抽出処理(ステップS5)が終了する。
【0140】
[画像歪み補正処理]
続くステップS6(図6参照)においては、画像歪み補正処理を実行する。画像歪み補正処理は、図51に示すように、概略的には、歪み補正(伸張)に際しての基準となる線(参照線1)としてスキャン画像の上辺(もしくは下辺)の近傍に位置するページ外形/罫線/文字行のいずれかを選択する処理(ステップS51:参照線1選択処理)、参照線1に対応するものであって補正率(伸張率)の算出用の参照線2としてスキャン画像の上辺(もしくは下辺)の近傍に位置するページ外形/罫線/文字行のいずれかを選択する処理(ステップS52:参照線2選択処理)、参照線1と参照線2に基づいてスキャン画像に伸張処理を施して主走査方向の歪みを補正する処理と、参照線1もしくは参照線2から算出されたページ面のスキャン面からの距離、もしくは、補正画像の文字外接矩形、に基づいてスキャン画像に伸張処理を施して副走査方向の歪みを補正する処理(ステップS53:主走査方向歪み補正処理と副走査方向歪み補正処理)により構成されている。
【0141】
ここで、参照線1選択処理(ステップS51)及び参照線2選択処理(ステップS52)においては、参照線1または参照線2として、スキャン画像の上辺(もしくは下辺)の近傍に位置するページ外形/罫線/文字行のいずれかを、左右各ページについて選択することになるが、本実施の形態におけるページ外形、罫線、文字行の選択の優先順位は、
ページ外形>罫線>文字行
とされている。このような選択優先順位にしたのは、文字行はページ外形や罫線に比べて抽出精度が低く、また、画像の外側にあるページ外形を利用する方が精度の高い歪み補正率を得ることができるためである。
【0142】
次に、主走査方向歪み補正処理と副走査方向歪み補正処理(ステップS53)について説明する。これはスキャナパラメータが既知の場合と未知の場合で処理が異なる。即ち、スキャナの機種が既知の場合は当該スキャナのスキャナレンズの光軸の主走査方向の位置(図52のAk)と、スキャナレンズの中心とスキャン面間の距離(図52の焦点面距離)をスキャナパラメータとして、予め記憶しておく。
【0143】
まず、スキャナパラメータが既知の場合を説明する。この場合、基本的に、主走査方向の1ラインを補正したら、次にそのラインに関して副走査方向の補正を行う、ということを主走査方向の全ライン、もしくは、参照線1または参照線2が曲線である部分の主走査方向ライン、について行う。
【0144】
主走査方向の補正は次のようにする。図53に、補正前の参照線1、参照線2をそれぞれ実線で、補正後をそれぞれ点線で表している。補正後の点線は、補正前の参照線1、参照線2の直線部分(平坦部)をそのまま延長したものである。ここで、副走査方向の位置xにおいて、参照線1上の点PがP´に、参照線2上の点QがQ´に、それぞれ補正される。さて、位置xにおける主走査方向上の任意の点YがY´に補正されるとして、次の関係式
YP/YQ=Y´P´/Y´Q´
が成り立つ。よって、各点の主走査方向の位置を、点PならP(y)というように表すと、
Figure 2005051383
となるので、これを変形して、
Figure 2005051383
となる。
【0145】
上式を利用して、補正後にY´(y)の位置に来るべき点の補正前の位置Y(y)を求めることができる。つまり、補正前のY(y)の画素値を補正後のY´(y)に移せばよいわけである。ただし、Y(y)の算出値は一般に小数となるので、その前後の整数位置に対応する画素値の線形補間結果を用いる。即ち、図54において、Y(y)の前後の整数をそれぞれN,N+1、これに対応する画素値をD(N),D(N+1)とすると、Y(y)における画素値D(Y(y))は図に示したような線形関係を満足するように算出する。
【0146】
以上は、全ての参照線1と参照線2がページ外形/罫線/文字行のいずれかである場合であるが、適切なページ外形や罫線、文字行が抽出されなかった場合は次のようにする。図55は、右ページ上方にページ外形/罫線/文字行が存在しない場合の例である。この場合は、レンズ光軸の軌跡(図55のL)を参照線2とみなして、上記と同様の処理を行う。ただしこの場合は図53におけるQとQ´は一致する。なお、ページ下方にページ外形/罫線/文字行が存在しない場合は、Lを参照線1とみなして同様に行う(PとP´が一致)。ページの上方/下方ともにページ外形/罫線/文字行が存在しない場合は、手がかり無しとして、そのページの補正は行わない。
【0147】
以上の処理をスキャン画像の左右ページ毎に独立して実行する。また、ある見開き左右ページにおける参照線1および参照線2についての情報を保持しておき、他の見開き左右ページの補正にこれを利用してもよい。例えば、連続する見開きページをスキャンする際、見開き左右ページを1セットと考えて、参照線1、参照線2の抽出は5セットに1回のみ行うものとし、あるセットで参照線1、参照線2を抽出したら、その後に続く4セットではこれらの情報をそのまま流用するということを行っても良い。これにより、参照線1、参照線2を抽出するための時間が節約できるので、全体の処理速度が向上する。
【0148】
副走査方向の補正は次のようにする。即ち、ページ面のスキャン面からの距離の変化量を利用して、書籍原稿の断面曲線が直線となるように展開して画像を伸長する。具体的には、図56に示すように、ブック原稿ページ面の形状を読み取ってライン毎の微少な三角形とし、ページの読み取り1ラインにおける画像長さLnを次の式
Ln=√{1+(Tn−Tn−1)2}
により算出し、画像長さLnの累積をページの伸長長さとする。その結果、近似した三角形の斜辺は湾曲したページの形状とほぼ等しくなるので(折れ線近似)、その累積をページの画像長さとすることにより、正確なページ長さを得る。特に、1ライン毎の最小ピッチによる形状近似により、その長さの補正精度は高い。
【0149】
隣接する主走査方向のライン上の注目画素の画素間隔を基準“1”として演算することにより、読み取りライン間隔が変化、すなわち、平面状としたときの原稿に対してサンプリング画素間隔が逐次替わっていくのに対し、画像伸長処理を適応する。また、幾何学的に主走査方向の画像投影倍長さとページ面のスキャン面からの距離は比例関係にあり、図52に示すように、参照線1もしくは参照線2の主走査方向のアドレスA3と、参照線1もしくは参照線2の直線部分(平坦部)のアドレスKaよりページ面のスキャン面からの距離Tを以下の式
T=焦点面距離*(A3−Ak)/{(Ak−Ka)−(A3−Ak)}
により、求めることができる。このようにして算出される隣接する主走査ラインの深さの差により、1画素毎の微少ピッチの直線で近似してページの補正位置を算出することができる。なお、参照線1/参照線2の求め方や、適切な参照線1/参照線2が存在しない場合の対応は主走査方向の補正の場合と基本的に同様である。
【0150】
このようにして算出されたページ面のスキャン面からの距離Tは、図56に示すように、1ライン毎の復元すべき副走査方向の画像長さLnの算出に用いられることになる。すなわち、前述した次の式
Ln=√{1+(Tn−Tn−1)2}
により、1ライン毎の補正すべき副走査方向の画像長さLnが算出される。したがって、画像長さLnの累積が副走査方向のページ長さになる。
【0151】
通常、ページ面のスキャン面からの距離が高くなるに連れてその高さの変化量が増す。そこで、本実施の形態においては、その位置のページ面のスキャン面からの距離に応じて画像伸長に制限をかける。例えば、隣合う境界アドレスの差をその位置の(高さ[mm]/5)[画素]に制限して境界の誤検出による副走査方向補正のエラーを抑制する。
【0152】
副走査方向の補正では画像長さLnは位置によって異なり、図57に示すように元画像と補正画像の対応する点の位置は一般に異なる。Nに存在した点がN´に、N+1の点がN+1´にそれぞれ補正される場合、求めるべきは整数X´の位置(これも一般にはN+1´と一致するとは限らない)の画素値である。N´とX´間の距離をa、X´とN+1´間の距離をbとそれぞれおくと、元画像におけるX´の対応点Xは、
(X−N)/(N+1−X)=a/b
の関係にある。
【0153】
上式によりXの位置が分かったら、補正前のXの画素値を補正後のX´に移せばよいわけである。ただし、Xの算出値は一般に小数となるので、その前後の整数位置に対応する画素値の線形補間結果を用いる。即ち、図58において、Xの前後のN,N+1に対応する画素値をD(N),D(N+1)とすると、Xにおける画素値D(X)は図に示したような線形関係を満足するように算出する。以上の処理を、副走査方向の全ての位置、もしくは、参照線1または参照線2が曲線である部分の副走査方向の位置に対して行う。
【0154】
以上の処理をスキャン画像の左右ページ毎に独立して実行する。また、ある見開き左右ページにおける書籍原稿のスキャン面からの距離と、参照線1または参照線2についての情報を保持しておき、他の見開き左右ページの補正にこれを利用してもよい。例えば、連続する見開きページをスキャンする際、見開き左右ページを1セットと考えて、書籍原稿のスキャン面からの距離の算出や参照線1、参照線2の抽出は5セットに1回のみ行うものとし、あるセットで距離の算出や参照線1、参照線2の抽出を行ったら、その後に続く4セットではこれらの情報をそのまま流用するということを行っても良い。これにより、書籍原稿のスキャン面からの距離の算出や参照線1、参照線2を抽出するための時間が節約できるので、全体の処理速度が向上する。
【0155】
ここまでが、スキャナパラメータが既知の場合の、主走査方向歪み補正処理と副走査方向歪み補正処理(ステップS53)の説明である。
【0156】
次に、スキャナパラメータが未知の場合を説明する。主走査方向の補正はスキャナパラメータが既知の場合と基本的に同様であるが、適切なページ外形や罫線、文字行が抽出されなかった場合の処理が若干異なる。図55において、スキャナパラメータが既知の場合はレンズ光軸の軌跡(図55のL)を参照線2とみなしたが、未知の場合(図59参照)は副走査方向に平行な中心線(図59のC)を参照線2とみなす。この場合も図53におけるQとQ´は一致する。ページ下方にページ外形/罫線/文字行が存在しない場合は、Cを参照線1とみなして同様に行う(PとP´が一致)。ページの上方/下方ともにページ外形/罫線/文字行が存在しない場合は、手がかり無しとして、そのページの補正は行わない。
【0157】
次に、副走査方向歪み補正処理について説明する。ここで、図60は副走査方向歪み補正処理の流れを概略的に示すフローチャートである。図60に示すように、ステップS101においては、主走査方向歪み補正されたスキャン画像に基づいて文字の外接矩形A(図61参照)を抽出する。ここで、文字認識処理については周知の技術であるので、その説明は省略する。このように文字の外接矩形Aを抽出するのは、この文字の外接矩形Aの形状の変化を基に、副走査方向の歪みを補正するためである。ここでは、図61に示すように、文字外接矩形Aの横辺の長さw、縦辺の長さh、および、文字の中心Bを定義する。ここで、文字の中心Bは、外接矩形Aの対角線の交点である。
【0158】
続いて、図62に示すように、スキャン画像をブック原稿40のページ綴じ部41に平行な方向の複数の短冊状の領域Cに分割した後(ステップS102)、各短冊領域Cについて、そこに含まれる文字外接矩形Aに関する特徴量を求める(ステップS103)。ここで、ある短冊領域Cに含まれる文字外接矩形Aとは、その中心が当該短冊領域Cに含まれるような外接矩形Aのことである。例えば、図62の短冊領域C1に含まれる外接矩形Aは、図中の網掛けを施した矩形である。
【0159】
さて、上記の文字外接矩形Aに関する特徴量は、
(文字の横辺の長さ)/(文字の縦辺の長さ)=w/h
を基に求められる。すなわち、各短冊領域Cについて、そこに含まれる全ての文字外接矩形Aのw/hの値の平均値をその短冊領域Cの特徴量とするのである。
【0160】
しかしながら、単に、w/hの平均値を算出すると不適切な場合がある。文字の中には、句読点や数式中の記号のようにそのサイズが元々小さく、w/hの値が不安定なものがある。また、矩形抽出の際に隣接する文字同士がくっついて抽出されてしまい、wが極端に大きい文字外接矩形Aが生じる場合もある。特徴量を求める場合は、このような特殊な文字や極端にwが大きいものを予め排除しておく必要がある。そこで、続くステップS104においては、予め閾値を定めておいて、hの値がその閾値より小さな文字外接矩形Aを予め排除するとともに、w/hの比率に関する閾値を予め定めておき、w/hの値が其の閾値よりも大きい文字外接矩形Aも予め排除する。例えば、図63中に示した網掛けを施した文字外接矩形Aが予め排除されることになる。
【0161】
続くステップS105においては、前述したように極端な文字外接矩形Aを排除した後に、各短冊領域C内の文字外接矩形Aのw/hの平均値を求める。図64に各短冊領域C内の外接矩形Aのw/hの平均値の一例を示す。なお、図64中の短冊領域C2は、ページ綴じ部を含む短冊領域である。
【0162】
続いて、ページ綴じ部を含む短冊領域C2に文字外接矩形Aが存在するか否かを判断する(ステップS106)。これは、図63に示すように、一般にはページ綴じ部付近には文字外接矩形Aが存在しない場合が多いからである。ページ綴じ部を含む短冊領域C2に文字外接矩形Aが存在する場合は(ステップS106のY)、その文字外接矩形Aを利用して特徴量は算出されているのでそのままステップS108に進む。
【0163】
一方、ページ綴じ部を含む短冊領域C2に文字外接矩形Aが存在しない場合は(ステップS106のN)、ステップS107に進み、ページ綴じ部を含む短冊領域C2の特徴量を求める。なお、ページ綴じ部を含む短冊領域C2の識別は、例えば、スキャン画像(例えば、モノクロ多値画像)の地肌濃度変化を各短冊領域Cごとに求め、短冊領域C内の最も濃度の薄い濃度値を求めることにより実現される。図65は地肌濃度変化を求めた一例を示したものであり、地肌濃度が最も濃い短冊領域が、ページ綴じ部を含む短冊領域C2であるとみなされる。
【0164】
なお、スキャン画像がカラー多値画像の場合におけるページ綴じ部を含む短冊領域C2の識別は、例えばRGB成分の何れか一つの成分(例えばG成分)に着目し、そのG成分の地肌濃度を使用して識別するようにすれば良い。また、RGBを色変換して輝度成分と色差成分とに分け、輝度成分を使用してページ綴じ部を含む短冊領域C2を識別するようにしても良い。
【0165】
ページ綴じ部を含む短冊領域C2の特徴量は、次のようにして定められる。ここでは、統計的特徴量の算出対象となり得る文字外接矩形Aが存在し、かつ、ページ綴じ部を含む短冊領域C2の最近傍である短冊領域Cの特徴量に対して予め定めた定数値を乗じることにより算出された値が、ページ綴じ部を含む短冊領域C2における特徴量とみなされるものである。つまり、図64に示した例では、ページ綴じ部を含む短冊領域C2の左右何れの短冊領域C3,C4にも文字外接矩形Aが存在するので、どちらか適当な方の特徴量を選択し(ここでは右側の○印の方)、それに予め定めた定数値(ここでは0.5)を乗じて、これをページ綴じ部を含む短冊領域C2の特徴量としている。
【0166】
続くステップS108においては、各短冊領域Cの特徴量に対する適切なフィルタリング処理、例えば、短冊領域Cの位置の変化方向(即ち副走査方向)に関する移動平均を求める処理を施すなどして、短冊領域Cの位置の変化に対する(副走査方向の)特徴量の変化がなだらかになるようにする。ただし、ここでもページ綴じ部付近は特別な処理が必要となる。なぜなら、副走査方向に関して長さが全て等しいウィンドウを用いてフィルタリングを行うと、ページ綴じ部付近の特徴量の変化の鋭さが失われてしまうからである。
【0167】
ここで、長さが全て5であるウィンドウを用いて図64に示した各短冊領域Cの特徴量に対してフィルタリング処理を施した結果を図66に示す。図66に示すように、長さが全て5であるウィンドウを用いてフィルタリング処理を施した場合には、ページ綴じ部付近の特徴量(w/h)の変化がなだらかになり過ぎてしまう。このような場合には、ページ綴じ部付近での適切な画像補正が不可能になってしまう。
【0168】
そこで、本実施の形態においては、フィルタリング処理の際には、フィルタのウィンドウがページ綴じ部を含む短冊領域C2の両側の短冊領域C3,C4に跨がらないように、ページ綴じ部付近でウィンドウ長を調整する。ここで、図67はページ綴じ部付近でウィンドウ長を調整してフィルタリング処理を施した結果を示すグラフである。図67に示すように、ページ綴じ部付近でウィンドウ長を調整した場合には、ページ綴じ部付近の特徴量(w/h)の変化を適切に表現できるので、良好な画像補正が実現できる。
【0169】
続くステップS109においては、各短冊領域Cの推定歪み量を算出する。各短冊領域Cの推定歪み量の算出手法は、以下に示す通りである。
【0170】
まず、短冊領域の歪み量を算出するための基準となる短冊領域(基準短冊領域)を定める。ここでは、歪みが最も小さいと考えられる短冊領域C、例えば、特徴量(w/h)が最大である短冊領域Cを基準短冊領域とする。この処理は左右ページで共通に行っても良いが、左右独立に基準短冊領域を定めても構わない。図67においては、左右独立に基準短冊領域を定めた例を示しており、○印を施した短冊領域Cが基準短冊領域であり、左側の基準特徴量を“Lw0/Lh0”、右側の基準特徴量を“Rw0/Rh0”、でそれぞれ示している。
【0171】
次に、基準短冊領域の特徴量w0/h0をスキャン画像全体の基準特徴量とし、
(各短冊領域の特徴量)/(基準特徴量)=(w/h)/(w0/h0)
の値を、各短冊領域の推定歪み量として算出する。
【0172】
なお、ページ綴じ部から外れたページ外側付近の短冊領域Cを基準短冊領域とすると、ページ綴じ部付近とはフォントや活字のサイズの違いが大きくて、適切な推定歪み量が算出できない場合も考えられる。そのような画像を対象とする場合は、基準短冊領域の探索範囲を予めページ綴じ部付近に限定しておくのが有効である。これを実現するためには、参照線1または参照線2が曲線である部分の副走査方向の位置に対してのみ行うようにすれば良い。
【0173】
最後に、スキャン画像に対して、短冊領域Cの短辺方向(副走査方向)の拡大処理を行い、ページ綴じ部付近の歪みを補正する(ステップS110)。その場合の拡大率(副走査方向の歪み補正率(伸張率))は、ステップS109において算出した推定歪み量の逆数、すなわち、
(基準特徴量)/(各短冊領域の特徴量)=(w0/h0)/(w/h)
とする。ここで、上記の基準短冊領域を左右共通に定めた場合には、この拡大率も左右共通の基準特徴量によって算出し、独立に定めた場合には、左右それぞれの基準特徴量で独立に算出するようにする。図68は、図67に示した特徴量に基づいて算出した補正拡大率を示したものである。
【0174】
なお、ここでも、ページ綴じ部付近から離れた短冊領域Cはもともと画像の歪みが無い領域である可能性が高いので、拡大処理の対象としない方が良い場合がある。拡大処理を行ったために、かえって不自然な歪みが生じてしまう可能性があるからである。これを防ぐために、参照線1または参照線2が曲線である部分の副走査方向の位置に対してのみ拡大すれば良い。即ち、参照線1または参照線2が直線の部分では、推定歪み量を“1”とする。
【0175】
また、短冊領域C内において共通の補正拡大率を適用した場合、隣接する短冊領域Cの境界部での補正拡大率が不連続となるため、補正画像が不自然となる。そこで、隣接する短冊領域Cの境界部での補正拡大率が連続的に変化するように、補正拡大率を予め補正しておく。これは、例えば図68に示す短冊領域Cの中央部分の補正拡大率を推定歪み量の逆数を示す点としてプロットし、これらの点を線分で結んで直線補完することで、他の部分の補正拡大率とすることで実現できる。以上の処理により、スキャン画像の副走査方向の補正拡大率が確定する。
【0176】
以上の処理をスキャン画像の左右ページ毎に独立して実行する。また、ある見開き左右ページにおける補正拡大率についての情報を保持しておき、他の見開き左右ページの補正にこれを利用してもよい。例えば、連続する見開きページをスキャンする際、見開き左右ページを1セットと考えて、補正拡大率の算出は5セットに1回のみ行うものとし、あるセットで補正拡大率を算出したら、その後に続く4セットではその情報をそのまま流用するということを行っても良い。これにより、補正拡大率を算出するための時間が節約できるので、全体の処理速度が向上する。
【0177】
以上、ステップS101〜S110の処理により副走査方向歪み補正処理が終了し、図6に示すスキャン画像の歪み補正処理が終了する。ここで、図69は歪みを補正した画像を示す平面図である。以上の処理によれば、図8に示したようなページ綴じ部の近傍において生じていたスキャン画像の歪みが、図69に示すように補正されることになる。
【0178】
以上のように、スキャナパラメータが未知の場合は、まず主走査方向の補正が全ライン分終了した後に、文字外接矩形を用いて副走査方向の補正を行うのが基本である。
【0179】
なお、本実施の形態においては、画像読取装置としてデジタル複写機のスキャナ部1を適用したが、これに限るものではなく、例えば自動ページ捲り機能を搭載したスキャナ等に適用するようにしても良い。
【0180】
また、本実施の形態においては、ブック原稿40のページ綴じ部41とスキャナ部1の画像読み取りの主走査方向とが平行になるように位置させてブック原稿40をコンタクトガラス2上に下向きに載置した場合について説明したが、これに限るものではない。例えば、図70に示すように、上向きのブック原稿40をコンタクトガラス2の下方からコンタクトガラス2に対して押し付けるように接触させるものであっても良い。
【0181】
さらに、本実施の形態においては、画像歪み補正装置を画像形成装置であるデジタル複写機16に備え、デジタル複写機16のスキャナ部1で読み取ったスキャン画像に対して画像の歪み補正処理を施すようにしたが、これに限るものではない。例えば、原稿画像を読み取る画像読取手段を備えたイメージスキャナをパーソナルコンピュータに接続するとともに、このパーソナルコンピュータのHDDに記憶媒体であるCD−ROM37に格納されたプログラムをインストールすることによって画像歪み補正装置を構成しても、前述したような各種の作用効果と同様の作用効果を得ることができる。また、記憶媒体であるCD−ROM37に格納されたプログラムをパーソナルコンピュータのHDDにインストールすることによって画像歪み補正装置を構成し、予め画像読取手段により読み取られたスキャン画像に対して歪み補正処理を施すようにしても良い。
【0182】
【発明の効果】
本発明によれば、書籍の紙質や置き方に依存せずに綴じ部位置を検出することができるので、歪み補正処理の補正精度の向上を図ることができる。
【図面の簡単な説明】
【図1】本発明の実施の一形態のスキャナ部の構成を示す縦断正面図である。
【図2】スキャナ部を搭載したデジタル複写機の上部部分を示す斜視図である。
【図3】スキャナ部の制御系の電気的な接続を示すブロック図である。
【図4】画像処理部の基本的な内部構成を示すブロック図である。
【図5】メイン制御部の電気的な接続を示すブロック図である。
【図6】スキャン画像の歪み補正処理の流れを概略的に示すフローチャートである。
【図7】スキャナ部のコンタクトガラス上にブック原稿を載置した状態を示す斜視図である。
【図8】入力した画像の一例を示す平面図である。
【図9】スキャン画像のページ綴じ部の近傍の歪みを示す説明図である。
【図10】綴じ部位置検出処理の流れを概略的に示すフローチャートである。
【図11】スキャン画像の上辺の綴じ部付近にページ外形が存在するか否かを判定する手法を説明する説明図である。
【図12】生成されたヒストグラムの一例を示す説明図である。
【図13】生成されたヒストグラムの解析手法を説明する説明図である。
【図14】リスト数が単数の場合の文字無し領域の判定手法を説明する説明図である。
【図15】リスト数が複数の場合の文字無し領域の判定手法を説明する説明図である。
【図16】リスト数が複数あり、かつ、最大の距離を持つリストを中心として、前後のリストの終始座標間距離が対称の並びになっていない場合の文字無し領域の判定手法を説明する説明図である。
【図17】リスト数が0の場合の文字無し領域の判定手法を説明する説明図である。
【図18】ページ外形の頂点の検出手法を説明する説明図である。
【図19】主走査方向の各ライン上での最大輝度値の中で、副走査方向において最小値を与える位置のヒストグラムである。
【図20】輝度の差が、予め定められた閾値以上であり、かつ、予め定められた別の閾値以下となるような点の集合を示す説明図である。
【図21】x−y平面上の点P(x,y)を通過する直線を示す説明図である。
【図22】距離ρと角度θとの関係を示す説明図である。
【図23】綴じ部位置の決定手法を説明するための説明図である。
【図24】上ページにのみページ外形が存在する場合の綴じ部位置の決定手法を示す説明図である。
【図25】ページ外形が上下辺のどちらにも存在する場合の綴じ部位置の決定手法を示す説明図である。
【図26】スキャン画像の綴じ部付近にページ外形が存在しない場合の綴じ部位置の決定手法を示す説明図である。
【図27】図8に示した画像の黒画素ヒストグラムである。
【図28】ページ外形/罫線/文字行の抽出処理の流れを概略的に示すフローチャートである。
【図29】上端にページ外形が存在するスキャン画像の一例を示す説明図である。
【図30】図29に示したスキャン画像の綴じ部境界線左側の黒画素ヒストグラムである。
【図31】長い罫線が存在するスキャン画像の一例を示す説明図である。
【図32】図31に示したスキャン画像の綴じ部境界線左側の黒画素ヒストグラムである。
【図33】罫線の連続性の判別を示す説明図である。
【図34】罫線の座標検出を示す説明図である。
【図35】左右ページから各1本ずつの罫線を選択する場合を示す説明図である。
【図36】左右ページをさらに上下部分に分け、その各4ブロックにおいて1本ずつの罫線を選択する場合を示す説明図である。
【図37】罫線の座標抽出を示す説明図である。
【図38】排除される不適切な罫線の例を示す説明図である。
【図39】図8に示した画像の副走査方向の黒白反転数ヒストグラムである。
【図40】図8に示した画像の主走査方向の黒白反転数ヒストグラムである。
【図41】スキャン画像の文字外接矩形抽出処理および文字行抽出処理の結果の一例を示す説明図である。
【図42】最適な横書き文字行の選択を示す説明図である。
【図43】各縦書き文字行からの横書き文字行の抽出処理の流れを概略的に示すフローチャートである。
【図44】抽出した行切り出し矩形を例示的に示す説明図である。
【図45】予め定めた距離範囲内に先頭が存在する縦書き文字行を例示的に示す説明図である。
【図46】抽出した縦書き文字行の先頭のy座標に関してヒストグラムを構成する状態を示す説明図である。
【図47】画像の歪みを生じていない部分における処理を示す説明図である。
【図48】画像の歪みを生じている部分における処理を示す説明図である。
【図49】抽出した縦書き文字行を示す説明図である。
【図50】縦書き文字行の行切り出し矩形を示す説明図である。
【図51】画像歪み補正処理の流れを概略的に示すフローチャートである。
【図52】スキャナのスキャナレンズの光軸の主走査方向の位置と、スキャナレンズの中心とスキャン面間の距離を示す説明図である。
【図53】主走査方向歪み補正処理を示す説明図である。
【図54】画素値の線形補間処理による求め方を示す説明図である。
【図55】右ページ上方にページ外形/罫線/文字行が存在しない場合の主走査方向歪み補正処理を示す説明図である。
【図56】画像長さの算出を示す説明図である。
【図57】元画像と補正画像の対応を示す説明図である。
【図58】画素値の線形補間処理による求め方を示す説明図である。
【図59】スキャナパラメータが未知であって適切なページ外形や罫線、文字行が抽出されなかった場合の主走査方向歪み補正処理を示す説明図である。
【図60】副走査方向歪み補正処理の流れを概略的に示すフローチャートである。
【図61】抽出された文字外接矩形を示す説明図である。
【図62】二値化画像をブック原稿のページ綴じ部に平行な方向の複数の短冊状の領域に分割した状態を示す説明図である。
【図63】予め排除される文字外接矩形を示す説明図である。
【図64】各短冊領域内の外接矩形の特徴量の平均値の一例を示すグラフである。
【図65】各短冊領域内の地肌濃度変化の一例を示すグラフである。
【図66】図64に示した各短冊領域の特徴量に対して長さが全て5であるウィンドウを用いてフィルタリング処理を施した結果を示すグラフである。
【図67】図64に示した各短冊領域の特徴量に対してページ綴じ部付近でウィンドウ長を調整してフィルタリング処理を施した結果を示すグラフである。
【図68】図67に示した特徴量に基づいて算出した補正拡大率を示すグラフである。
【図69】歪みを補正した画像を示す平面図である。
【図70】コンタクトガラスにブック原稿を接触させた状態を示す正面図である。
【図71】コンタクトガラス上にブック原稿を載置した状態を示す正面図である。
【符号の説明】
1 画像読取装置
16 画像形成装置
19 画像歪み補正装置
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. A typical method for estimating the three-dimensional shape of an object from such image density information is a method called Shape from Shading described in Non-Patent Document 1.
[0005]
Patent Document 1 proposes a method of correcting the distortion by measuring the shape of a book by a triangulation method.
[0006]
Further, Patent Document 2 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 Patent Document 1, a special shape measuring device for measuring the shape of a book by the triangulation method is required, and therefore, it is not appropriate.
[0009]
Furthermore, according to the method described in Patent Document 2, distortion correction can be performed with a small amount of calculation, but effective correction when the page outline is not completely contained in the image and is cut off in the middle. I can't.
[0010]
In view of this, the present applicant has disclosed in Japanese Patent Application No. 2002-247463 an image distortion correction apparatus capable of effectively correcting the distortion with a small amount of calculation even for a scanned read image whose page outline is cut off halfway. I have proposed. According to Japanese Patent Application No. 2002-247743, image distortion is corrected using not only the page outline but also the character line information and ruled line information, and the intrinsic parameters of the scanner (image reading means) (lens focal plane distance, scanning light) Since the axis position (address) is not used, the output image of any scanner can be corrected.
[0011]
[Non-Patent Document 1]
T.A. Wada, H.M. Uchida and T. Matsuyama, “Shape from Shading with Interreflations under a Proximity Light Source: Distortion-Free Copied of an Unfolded Bump”, 24
[Patent Document 1]
Japanese Patent Laid-Open No. 5-161002
[Patent Document 2]
JP 11-41455 A
[0012]
[Problems to be solved by the invention]
By the way, in the distortion correction processing, after performing skew correction image rotation processing centering on the binding portion position, the processing is divided into left and right pages with the binding portion position as a boundary. When detecting such a binding portion position, the vertex coordinates of the page outline near the binding portion and the position where the minimum pixel value exists are effective.
[0013]
However, depending on how the book document (book, booklet, etc.) is placed, the page outline near the binding part may not be reflected in the scanned image, and it depends on the paper quality of the book document (book, booklet, etc.) and the strength of the binding part. The pixel value in the vicinity of the binding portion is not necessarily the minimum pixel value. If the binding position is misrecognized due to the above problems, the correction accuracy of the distortion correction process may be adversely affected.
[0014]
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 processing.
[0015]
[Means for Solving the Problems]
The image distortion correction apparatus according to the first aspect uses the position of the page binding portion of the book document in the scanned image as the distortion of the scanned image obtained by reading the book document in contact with the upper or lower surface of the scan by the image reading unit. In the image distortion correction apparatus that corrects the image, a page outline detection unit that detects a page outline in the vicinity of the binding portion of the scan image, and a non-character area that includes the binding portion of the scan image and is a nonexistent area of characters and drawings. Luminance between a character-free area detecting unit to detect, a minimum luminance detecting unit to detect a representative position of the minimum luminance, and a pixel of interest on the scanned image and a pixel separated from the pixel of interest by a predetermined distance in the sub-scanning direction Straight line extraction means for extracting a straight line based on a set of points of interest such that the difference in values is equal to or greater than a predetermined threshold and equal to or less than another predetermined threshold The presence or absence of a page outline detected by the page outline detection means, the character-free area detected by the no-character area detection means, the representative position of the minimum brightness detected by the minimum brightness detection means, and the straight line extraction In consideration of the position of the straight line extracted by the means, the binding position of the scanned image is determined.
[0016]
The invention according to claim 2 is the image distortion correction device according to claim 1, wherein when the page outline is detected in the vicinity of the binding portion on the upper side and the lower side in the main scanning direction of the scanned image by the page outline detection unit. A line segment connecting the top and bottom of the upper and lower page outlines is regarded as the binding position.
[0017]
According to a third aspect of the present invention, in the image distortion correction apparatus according to the first aspect, the page outline detection unit detects the page outline only in the vicinity of the binding portion of either the upper side or the lower side of the scanned image in the main scanning direction. If it is, the minimum brightness position detected by the minimum brightness detection means or the position of the straight line extracted by the straight line extraction means is regarded as the binding position.
[0018]
According to a fourth aspect of the present invention, in the image distortion correction device according to the third aspect, the page outline is detected only in the vicinity of either one of the upper side or the lower side of the scanned image in the main scanning direction by the page outline detecting unit. The difference between the apex of the page outline and the representative position of the minimum brightness detected by the minimum brightness detection means in the no-character area detected by the no-character area detection means is determined in advance. If it is smaller than the threshold value, the minimum luminance position is regarded as the binding position.
[0019]
According to a fifth aspect of the present invention, in the image distortion correction apparatus according to the third aspect, the page outline is detected only in the vicinity of either one of the upper side or the lower side of the scanned image in the main scanning direction by the page outline detection unit. The difference between the apex of the page outline and the representative position of the minimum brightness detected by the minimum brightness detection means in the no-character area detected by the no-character area detection means is determined in advance. If the value is larger than the threshold, the position of the straight line closest to the vertex of the page outline is regarded as the binding position from among the plurality of straight line candidates extracted by the straight line extraction means.
[0020]
According to a sixth aspect of the present invention, in the image distortion correction apparatus according to the first aspect, the page outline is not detected by the page outline detecting means in the vicinity of the binding portion on either the upper side or the lower side of the scanned image in the main scanning direction. In this case, the representative position of the minimum brightness detected by the minimum brightness detection means or the position of the straight line extracted by the straight line extraction means is regarded as the binding position.
[0021]
According to a seventh aspect of the present invention, in the image distortion correction device according to the sixth aspect, no page outline is detected by the page outline detecting means in the vicinity of the binding portion on either the upper side or the lower side of the scanned image in the main scanning direction. And when an appropriate character-free region is detected by the character-free region detection means, the midpoint of the character-free region detected by the character-free region detection means When the difference from the representative position of the minimum luminance detected by the minimum luminance detecting means is smaller than a predetermined threshold value, the minimum luminance position is regarded as the binding portion position.
[0022]
According to an eighth aspect of the present invention, in the image distortion correction apparatus according to the sixth aspect, the page outline is not detected by the page outline detecting means in the vicinity of the binding portion on either the upper side or the lower side of the scanned image in the main scanning direction. And when an appropriate character-free region is detected by the character-free region detection means, the midpoint of the character-free region detected by the character-free region detection means When the difference from the representative position of the minimum luminance detected by the minimum luminance detecting means is larger than a predetermined threshold value, the position of the straight line extracted by the straight line extracting means is regarded as the binding portion position.
[0023]
According to a ninth aspect of the present invention, in the image distortion correction apparatus according to the first aspect, the page outline is not detected by the page outline detecting means in the vicinity of the binding portion on either the upper side or the lower side of the scanned image in the main scanning direction. In this case, when an inappropriate character-free region is detected by the character-free region detection unit, the position of the straight line extracted by the straight line extraction unit is regarded as the binding portion position.
[0024]
According to a tenth aspect of the present invention, in the image distortion correction device according to any one of the first to ninth aspects, the page outline detecting means is a black pixel or a predetermined value from the upper side in the main scanning direction of the scanned image downward. If the pixels exceeding the density threshold are distributed in an approximately inverted triangle shape, it is considered that a page outline exists on the upper side in the main scanning direction of the scanned image, and black pixels or When pixels having a predetermined density threshold or more are distributed in a substantially triangular shape, it is considered that a page outline exists on the lower side in the main scanning direction of the scanned image.
[0025]
According to an eleventh aspect of the present invention, in the image distortion correction apparatus according to any one of the first to ninth aspects, the character-free area detecting means includes a reversal number of black and white pixels in the main scanning direction or a predetermined threshold value. The character-free region is detected using a histogram distribution regarding the number of times the above and the following pixels change.
[0026]
According to a twelfth aspect of the present invention, in the image distortion correction apparatus according to the eleventh aspect, the largest region among the continuous regions in the sub-scanning direction in which the value of the histogram is equal to or less than a predetermined threshold is the center and less than the other threshold. If the continuous area is substantially symmetrical in the sub-scanning direction, the maximum area is regarded as a non-character area (appropriate non-character area) where there is a high possibility that no character or figure exists, and the continuous area is equal to or less than another threshold value. Are not symmetrically present in the sub-scanning direction, all the left and right edges of the continuous areas below the threshold value are regarded as character-free areas (non-appropriate character-free areas) that are unlikely to contain characters or figures.
[0027]
According to a thirteenth aspect of the present invention, in the image distortion correction apparatus according to the twelfth aspect, when the length of the continuous region in the sub-scanning direction in which the value of the histogram is equal to or greater than a predetermined threshold value is equal to or smaller than a predetermined value. The continuous area is regarded as an area where the value of the histogram is not more than a predetermined threshold value.
[0028]
According to a fourteenth aspect of the present invention, in the image distortion correction apparatus according to any one of the first to ninth aspects, the minimum luminance detecting means is a medium having a maximum luminance value on each line in the main scanning direction of the scanned image. The position that gives the minimum value in the sub-scanning direction is regarded as the representative position of the minimum luminance.
[0029]
According to a fifteenth aspect of the present invention, in the image distortion correction apparatus according to the fourteenth aspect, a straight line in the main scanning direction passing through the representative position of the minimum luminance and a center line penetrating the scanned image in the sub scanning direction or the optical axis of the image reading means. The minimum luminance position at each position in the main scanning direction is searched for in the upper and lower directions of the scanned image starting from the intersection with the trajectory.
[0030]
According to a sixteenth aspect of the present invention, in the image distortion correction apparatus according to any one of the first to ninth aspects, the straight line extraction unit is predetermined in the sub-scanning direction from the target pixel on the scan image and the target pixel. A straight line is extracted based on a set of points of interest such that a difference in luminance values of pixels separated by a distance is equal to or larger than a predetermined threshold and equal to or smaller than another predetermined threshold.
[0031]
According to a seventeenth aspect of the present invention, in the image distortion correction apparatus according to any one of the first to sixteenth aspects, an angle formed by the determined binding portion position and a main scanning direction of image reading is detected as a skew angle of the scanned image. To do.
[0032]
An image reading device according to claim 18 is an image reading device for reading a document image, and an image distortion correcting device according to any one of claims 1 to 17 for correcting a scan image read by the image reading device. And comprising.
[0033]
The image forming apparatus according to claim 19 is an image reading unit for reading a document image, and an image distortion correcting device according to any one of claims 1 to 17 for correcting a scanned image read by the image reading unit. And an image printing apparatus that prints an image based on the image data output from the image distortion correction apparatus on a sheet.
[0034]
According to a twenty-second aspect of the present invention, there is provided a computer program for correcting distortion of a scanned image obtained by reading a book document in contact with the top or bottom of a scan surface by an image reading unit, using a position of a page binding portion of the book document in the scanned image. A page outline detection function for detecting a page outline in the vicinity of the binding portion of the scan image and a character including a binding portion of the scan image in a non-existing region of characters and drawings. Character-free area detecting function for detecting a non-existing area, minimum brightness detecting function for detecting a representative position of the minimum brightness, a pixel of interest on the scan image, and a pixel separated from the target pixel by a predetermined distance in the sub-scanning direction A set of points of interest such that the difference in brightness value is greater than or equal to a predetermined threshold and less than or equal to another predetermined threshold A straight line extraction function for extracting a straight line, and the presence or absence of a page outline detected by the page outline detection function, a character-free area detected by the no-character area detection function, and the minimum luminance detection function. The binding position of the scan image is determined in consideration of the representative position of the minimum luminance and the position of the straight line extracted by the straight line extraction function.
[0035]
DETAILED DESCRIPTION OF THE INVENTION
An 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.
[0036]
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. A second traveling body 8 including a third reflecting mirror 7, a CCD (Charge Coupled Device) 9 as an image pickup device for reading an image of the document, a lens unit 10 for forming an image on the CCD 9, and a document. 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.
[0037]
During scanning of a document, the first traveling body 5 and the second traveling body 8 are moved in the sub-scanning direction by a stepping motor 24 (see FIG. 3). That is, the first traveling body 5 and the second traveling body 8 travel under the contact glass 2, the exposure lamp 3 exposes and scans the document, and the reflected light is reflected on the first reflecting mirror 4, the second reflecting mirror 6, and the like. The light is reflected by the third reflecting mirror 7 and imaged on the CCD 9 through the lens unit 10. Here, an image reading means is realized.
[0038]
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.
[0039]
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.
[0040]
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. The digital image signal after the correction process includes an image data processing unit 28 that performs various image data processes such as MTF correction, scaling process, and γ correction to generate a scan image. 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.
[0041]
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 a BIOS and the like. An only memory (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.
[0042]
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.
[0043]
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), and in that case, the OS may take over execution of some of the various processes described below, 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.
[0044]
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, only the scan image distortion correction processing that realizes the scan image distortion correction function, which is a characteristic function of the scanner unit 1 of the present embodiment, among the processes executed by the CPU 31 will be described. That is, the main control unit 19 functions as an image distortion correction device.
[0045]
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.
[0046]
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 scan image 41 ′ of the page binding portion 41.
[0047]
[Detection of binding position]
In the subsequent step S2, a binding portion position detection process for detecting the binding portion position of the scanned image is performed. FIG. 10 is a flowchart schematically showing the flow of the binding portion position detection process. As shown in FIG. 10, first, after performing the optimum binarization processing of the scanned image of the book document 40 (step S21), the presence / absence of the page outline in the vicinity of the binding portion is determined (step S22).
[0048]
Here, the determination of the presence or absence of a page outline near the binding portion of the scanned image in step S22 will be described.
[0049]
First, a method for determining whether or not a page outline exists near the binding portion on the upper side of the scanned image will be described. As shown in FIG. 11, a strip region is created in which the distance in the main scanning direction is divided by a predetermined number of pixels from the upper side of the scanned image. From the left end and the right end of the strip region on the upper side (strip region (1) in FIG. 11) toward the binding portion position, the black pixels corresponding to the predetermined fixed value pixels in the main scanning direction are the first to continue in the sub scanning direction. The positions are determined in the left and right pages, respectively, and the positions are set as reference points (LU1, RU1 in FIG. 11). When the positions in the sub-scanning direction are determined on both the left and right pages, the black pixels existing within the range (LU1 to RU1 in FIG. 11) surrounded by the reference points of the left and right pages in the strip area being searched. Find the ratio. If the ratio of existing black pixels is equal to or greater than a predetermined threshold value, the reference points determined on the left and right pages in the next strip area (strip area (2) in FIG. 11) are used as search start points, respectively. Process. As described above, the strip area and the search start point are updated, and when a series of processes is performed a predetermined number of times or more (for example, black from the upper side in the main scanning direction of the scanned image to the lower side). If the pixels are distributed in an approximately inverted triangle shape), it is determined that a page outline exists on the upper side near the binding portion.
[0050]
On both the left and right pages, if the position in the sub-scanning direction is not determined for the first time that the black pixels for a predetermined value in the main scanning direction are continuous, or the black pixels for the predetermined value in the main scanning direction are not determined for the first time. If the position in the continuous sub-scanning direction is determined but the ratio of black pixels in the range is less than a predetermined threshold value, or if the number of times of the series of processing is less than a predetermined value, the binding portion It is determined that no page outline exists in the vicinity.
[0051]
Note that whether or not a page outline exists in the vicinity of the binding portion on the lower side of the scanned image can also be realized by a method similar to the above processing. That is, when black pixels are distributed in a substantially triangular shape from the lower side of the scanned image in the main scanning direction, it is determined that a page outline exists on the lower side of the scanned image in the main scanning direction.
[0052]
When the scanned image is a color multi-valued image, for example, paying attention to any one of the RGB components (for example, the G component), a pixel that is larger than a predetermined density threshold of the G component is set as a black pixel, and the G component A pixel smaller than the predetermined density threshold value 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.
[0053]
In a succeeding step S23, a detection process for a no-character area is executed. Here, the function of the no-character area detection means is executed. The reason for detecting the no-character area in this way is to narrow down the binding portion position search range. This is because even if the binding portion position cannot be accurately detected, the distortion correction processing will not be hindered as long as it is erroneously recognized within the character-free region near the binding portion. The area without characters is an area including a binding portion, but does not necessarily indicate a range having no characters. Therefore, a range including a binding portion and having a high possibility of having no characters is referred to as an “appropriate character-free region”. Is defined. When an area without characters is detected, it is also determined whether the detected area without characters is an appropriate area without characters.
[0054]
The detection of the no-character area is performed by setting the number of black and white inversion (the number of times the pixel of interest and the pixel immediately below (right adjacent) are inverted in black and white) one line at a time in the main scanning direction, or a predetermined threshold value or more. A histogram is generated by counting the number of times the following pixels are changed. Here, FIG. 12 shows an example of the generated histogram.
[0055]
Subsequently, the histogram generated in this way is analyzed in the sub-scanning direction. In the analysis of the histogram in the sub-scanning direction, as shown in FIG. 13, there are places where the coordinates where the histogram value is equal to or less than a predetermined threshold are continuous ((1) to (5) in FIG. 13). For example, list the coordinates of the start point and the distance. In the process of listing, if the difference between the end point coordinates of the attention list and the start point coordinates of the next data is within a predetermined value, they are integrated and handled as one list data (▲ in FIG. 13). 4 ▼). That is, when the length of a continuous region in the sub-scanning direction in which the value of the histogram is equal to or greater than a predetermined threshold value is equal to or smaller than a predetermined value, the continuous region is defined as a region whose histogram value is equal to or smaller than a predetermined threshold value. I reckon. Next, the start point coordinates and end point coordinates of the characterless area are selected from the coordinates of the end points of each list in the entire list. The line spacing of the horizontal writing image is perpendicular to the sub-scanning direction, but the line spacing of the vertical writing image is parallel to the sub-scanning direction. In a horizontally written image (left page of the scanned image shown in FIG. 13), a continuous region where the value of the histogram in the sub-scanning direction is not more than a predetermined threshold is often only near the binding portion, but the vertically written image (FIG. 13). In the right page of the scanned image shown in FIG. 2, there are generally a plurality of continuous regions in which the value of the histogram in the sub-scanning direction is equal to or less than a predetermined threshold. Therefore, the non-character area is estimated based on the number of lists. Hereinafter, the determination of the no-character area according to the number of lists will be described separately.
[0056]
As shown in FIG. 14, when the number of lists is singular, it is determined as an appropriate character-free region from the start point coordinate to the end point coordinate of the focused list in the sub-scanning direction character-less region search range. To do.
[0057]
As shown in FIG. 15, when there are a plurality of lists, pay attention to the list having the maximum distance among all the lists in the sub-scanning direction character-less area search range, Compare. If the difference between the lengths of the coordinates at the beginning of each list set is within a certain value, it is considered that the line is parallel to the sub-scanning direction. If the left and right pages are evenly spaced, the maximum distance is provided, and there is no character from the start point coordinate to the end point coordinate of the list located near the center of the entire list, and there is no appropriate character. It is determined as an area.
[0058]
On the other hand, as shown in FIG. 16, when there are a plurality of lists and the distance between the end coordinates of the preceding and following lists is not symmetrical with respect to the list having the maximum distance, which list is bound. Since there is a lack of material for determining whether or not a portion is included, there is a possibility of detecting a character-free region that does not include a binding portion. In such a case, the characterless region is defined from the start coordinate of the first list to the end point coordinate of the final list in the subscanning direction characterless region search range. In this case, since there are clearly characters and figures in the detected character-free region, it is determined that the region is not an appropriate character-free region.
[0059]
Also, as shown in FIG. 17, when the number of lists is 0, the entire sub-scanning direction is set as a no-character area. Also in this case, since there are clearly characters and figures in the detected character-free region, it is determined that the region is not an appropriate character-free region.
[0060]
When the non-character area is detected as described above, processing corresponding to the determination of the presence or absence of the page outline near the binding portion of the scanned image in step S22 is executed.
[0061]
It is determined that a page outline exists near the binding portion of the scanned image (Y in step S24), and if the page outline exists only on either the upper or lower side (N in step S25), the process proceeds to step S26. Page outline vertex detection processing for detecting the vertex of the page outline is executed. In the page outer shape vertex detection process, the coordinate where the coordinate value in the main scanning direction of the page outer shape is the most inside is set as the page outer shape vertex. More specifically, as shown in FIG. 18, for the apex of the page outline on the upper side, the point having the smallest coordinate value in the main scanning direction (y direction in FIG. 18) is the page outline vertex, and the page outline on the lower side. For the vertex of, the point having the maximum coordinate value in the main scanning direction is set as the page outline vertex. Note that various processing methods can be used for the page outline detection process. For example, a technique as described in Patent Document 2 can be used. Here, the function of the page outline detecting means is executed.
[0062]
Next, the process proceeds to step S27, and a representative position with the minimum luminance is detected. Here, the detection of the representative position with the minimum luminance will be described. Here, among the maximum luminance values on each line in the main scanning direction, the position that gives the minimum value in the sub-scanning direction is regarded as the representative position of the minimum luminance. More specifically, the scan image starts from the intersection of the main scanning direction straight line passing through the representative position of the minimum luminance and the center line passing through the scan image in the sub-scanning direction or the locus of the optical axis of the scanner lens of the scanner unit 1. The minimum luminance position at each position in the main scanning direction is searched for in the upper and lower directions. FIG. 19 is a histogram of positions that give the minimum value in the sub-scanning direction among the maximum luminance values on each line in the main scanning direction. In this case, the position P in FIG. 19 is the representative position of the minimum luminance. Become. Here, the function of the minimum luminance detecting means is executed.
[0063]
When the representative position of the minimum luminance is detected in this way, the process proceeds to step S28, and the page outline vertex is compared with the representative position of the minimum luminance.
[0064]
If the difference between the page outline vertex and the representative position of the minimum luminance in the no-character area is within a predetermined value, the image is considered to have a luminance distribution that minimizes the pixel value near the binding area. Therefore, the representative position of the minimum luminance is determined (Y in step S29), and the process proceeds to step S31 described later.
[0065]
On the other hand, if the difference between the apex of the page outline and the representative position of the minimum brightness in the non-character area is less than a predetermined value, it is regarded as an image having a brightness distribution in which the pixel values near the binding portion are not minimized. Therefore, without determining the representative position of the minimum luminance (N in Step S29), the process proceeds to Step S30, and a straight line is extracted in the no-character area. Here, the function of the straight line extraction means is executed.
[0066]
Here, the straight line extraction process in step S30 will be described in detail. In the vicinity of the binding portion, there is a difference in luminance between a certain pixel of interest and a pixel that is separated by a certain distance in the sub-scanning direction. When the Hough transform is performed based on a set of points (see FIG. 20) such that the luminance difference is equal to or greater than a predetermined threshold and equal to or less than another predetermined threshold, a straight line and a straight line Are extracted. In step S30, the straight line thus extracted is determined as the binding portion position. For example, as shown in FIG. 21, a straight line passing through a point P (x, y) on the xy plane is expressed by the following equation:
ρ = x cos θ + ysin θ
Meet. ρ is the distance between the point P and the origin O. θ is an angle formed by PO and the x axis. Also, as shown in FIG. 22, the point P on the xy plane is projected onto a single curve on the ρ-θ plane. That is, the curves corresponding to the points existing on the same straight line in the xy plane all pass through the point (ρ, θ) in the ρ-θ plane. Even if the points on the xy plane are not exactly on the same straight line and contain some errors, the corresponding curve on the ρ-θ plane passes near the point (ρ, θ). Therefore, if the ρ-θ plane is divided into mesh regions having a predetermined constant length and the number of curves passing through each mesh is counted, the xy plane corresponds to the mesh region having a large number of passing curves. It can be said that the upper straight line exists. The above processing is performed on a set of points where the luminance difference is equal to or greater than a predetermined threshold and equal to or less than another predetermined threshold. Then, ρ is a perpendicular to the binding part straight line, and θ is an angle of the binding part straight line. Further, a predetermined number of meshes having a large number of passing curves are extracted from the upper level, and a plurality of binding part straight line information candidates are held. The priority of straight line extraction is in accordance with the order of the number of passing curves.
[0067]
Next, the straight line closest to the vertex of the page outline is determined as the binding position from among the plurality of straight line candidates extracted in this way (step S31). Specifically, as shown in FIG. 23, the intersection point between the representative position of the minimum luminance and the center line penetrating the image in the sub-scanning direction or the locus of the optical axis of the scanner is used as a base point in each direction above and below the image. Then, the minimum luminance position in each main scanning direction is determined, and the locus is determined as the binding position. The angle (θ shown in FIG. 23) formed by a straight line parallel to the sub-scanning direction passing through the line segment of the binding position and the center of the image height or the optical axis of the scanner lens in the main scanning direction is set as the binding position. The skew angle.
[0068]
FIG. 24 shows a case where a page outline exists only on the upper page. As shown in FIG. 24, in the sub-scanning direction, the intersection of the line segment of the binding portion and the straight line parallel to the sub-scanning direction passing through the center of the image height or the optical axis of the scanner lens in the main scanning direction. Let the position be the binding portion representative position. In addition, the binding unit defines the angle (θ shown in FIG. 24) formed by a straight line parallel to the sub-scanning direction passing through the line segment of the binding unit position and the center of the image height or the optical axis of the scanner lens in the main scanning direction. The skew angle of the position. The same processing is performed when the page outline exists only on the lower page.
[0069]
When the representative position of the minimum luminance is determined (Y in step S29), the process proceeds to step S31, and the intersection of the representative position of the minimum luminance and the center line penetrating the image in the sub-scanning direction or the locus of the optical axis of the scanner is determined. The minimum luminance position in each main scanning direction is determined in each of the upper and lower directions of the image as a base point, and the locus is determined as the binding portion position.
[0070]
On the other hand, if it is determined that the page outline exists near the binding portion of the scanned image (Y in step S24), and if the page outline exists on both the upper and lower sides (Y in step S25), both page outline vertex coordinates Is detected (step S32), and the line segment connecting the vertices of the upper and lower page outlines is set as the binding position (step S31). This is because when the page outline exists on both the upper and lower sides, both page outline vertices, which are the most effective clues, are used. Here, FIG. 25 is an example in which page outlines exist on both sides of the upper and lower pages. As shown in FIG. 25, in the sub-scanning direction, the intersection of the line segment of the binding portion and the straight line parallel to the sub-scanning direction passing through the center of the image height or the optical axis of the scanner lens in the main scanning direction. Let the position be the binding portion representative position. In addition, the binding unit forms an angle (θ shown in FIG. 25) between a line segment of the binding unit position and a straight line parallel to the sub-scanning direction passing through the center of the image height or the optical axis of the scanner lens in the main scanning direction. The skew angle of the position.
[0071]
If it is determined that the page outline does not exist in the vicinity of the binding portion of the scanned image (N in step S24), the process proceeds to step S33, and it is determined whether an appropriate character-free area has been detected.
[0072]
If an appropriate character-free area is detected (Y in step S33), the representative position of the minimum luminance in the character-free area is detected (step S34), and the minimum luminance representative position and the specified range in the no-character area are determined. Compare (step S35) and proceed to step S29.
[0073]
If the difference between the page outline vertex and the representative position of the minimum luminance in the no-character area is within a predetermined value, the image is considered to have a luminance distribution that minimizes the pixel value near the binding area. Therefore, the representative position of the minimum luminance is determined (Y in step S29), and the process proceeds to step S31 to determine the binding portion position.
[0074]
On the other hand, if the difference between the apex of the page outline and the representative position of the minimum brightness in the non-character area is less than a predetermined value, it is regarded as an image having a brightness distribution in which the pixel values near the binding portion are not minimized. Therefore, without determining the representative position of the minimum luminance (N in step S29), after performing straight line extraction within the character-free region (step S30), the binding portion position is determined (step S31).
[0075]
On the other hand, when an appropriate character-free region is not detected (N in step S33), after performing a straight line extraction in the character-free region in consideration of the possibility that the representative position of the minimum luminance is a character or a figure ( Step S30), the binding portion position is determined (Step S31).
[0076]
Here, FIG. 26 is an example in which no page outline exists near the binding portion of the scanned image. As shown in FIG. 26, the intersection in the sub-scanning direction of the line segment of the binding portion and the straight line parallel to the sub-scanning direction passing through the center of the image height or the optical axis of the scanner lens in the main scanning direction. Let the position be the binding portion representative position. In addition, the binding unit defines the angle (θ shown in FIG. 26) formed by a straight line parallel to the sub-scanning direction that passes through the line segment of the binding unit position and the center of the image height or the optical axis of the scanner lens in the main scanning direction. The skew angle of the position.
[0077]
Thus, the binding portion position detection process in step S2 ends.
[0078]
According to the binding portion position detection process of the present embodiment as described above, the binding portion position can be detected without depending on the paper quality or placement of the book, so that the correction accuracy of the distortion correction processing can be improved. Can do.
[0079]
As shown in FIGS. 24, 25, and 26, when the skew angle of the binding portion position is detected, for example, scanning is performed by the skew angle around the intersection point of the optical axis trajectory of the scanner lens and the binding portion position. The entire image may be rotated to correct the skew of the scanned image.
[0080]
Next, optimal binarization processing of a scanned image (for example, a monochrome multi-valued image) of the book document 40 is executed (step S3), and black pixels in the sub-scanning direction (the density value among the pixels of the scanned image is predetermined). A histogram of the number of pixels darker than the density value is obtained (step S4). FIG. 27 is a black pixel histogram on the left side of the binding boundary line of the image shown in FIG. The horizontal axis in FIG. 27 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 scan image), and the vertical axis in FIG. This indicates the number of black pixels for each position.
[0081]
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.
[0082]
In the subsequent step S5, page outline / ruled line / character line extraction processing is executed. FIG. 28 is a flowchart schematically showing the flow of page outline / ruled line / character line extraction processing.
[0083]
[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. 29 is an explanatory diagram showing an example of a scan image having a page outline at the upper end, and FIG. 30 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. 30 indicates the main scanning direction (vertical direction in FIG. 29) 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. Therefore, when a page outline exists at the upper end of the scanned image as shown in FIG. 29, a black band appears at the upper part of the scanned image, so that 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.
[0084]
More specifically, as shown in FIG. 30, a distance AO from the binding portion boundary line to the left end of the scan image (left end of FIG. 29) and the height BO of the histogram vertical bar, and the ratios are expressed by the following formulas ( 1)
[0085]
[Expression 1]
Figure 2005051383
[0086]
When the calculated ratio k is larger than a predetermined threshold, it is determined that a page outline exists in the scanned image.
[0087]
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.
[0088]
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.
[0089]
Note that the process of determining whether or not a page outline exists in the scanned image is executed for each left and right page with the bound line of the scan image as a boundary.
[0090]
[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.
[0091]
[Detection of ruled line candidates]
Here, FIG. 31 is an explanatory diagram showing an example of a scan image having a long ruled line, and FIG. 32 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. 32 indicates the main scanning direction (vertical direction in FIG. 31) 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. 31, 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.
[0092]
More specifically, first, the height H of a narrow peak appearing in the histogram shown in FIG. 32 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 a predetermined threshold thW, the peak is set as a ruled line candidate. .
[0093]
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. 33, an appropriate position on the candidate ruled line (for example, the position of the center line of the page) is set as a starting 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. In this way, 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.
[0094]
[Rectangle detection]
After discriminating ruled lines as described above, the coordinates of each ruled line are detected. As shown in FIG. 34, 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. 34) is the midpoint coordinate of the black pixel run of the ruled line portion. The main scanning direction coordinate value at the left end x1 is y1.
[0095]
[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. 35, 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. 35) sandwiching the binding boundary line. A ruled line that is closest to the upper or lower page outline is selected on the condition that a part is applied. FIG. 35 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.
[0096]
Another example of the optimum ruled line selection criterion is that the length of the ruled line is longer than a predetermined threshold and is within a fixed width region on the left and right sides of the binding portion boundary line (the shaded region in FIG. 36). ) 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. 36 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. Note that the upper right block in FIG. 36 has 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 across the binding boundary line. There is no ruled line selected because there is no ruled line that satisfies
[0097]
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.
[0098]
[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. 37, 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 extension parts. Will do. More specifically, the AB portion shown in FIG. 37 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.
[0099]
[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. 38, there is a curve (1) where the curve goes to the outside of the book, or a curve (2) where the curve goes far beyond the center line. .
[0100]
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.
[0101]
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.
[0102]
[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.
[0103]
[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. 39 is a black-and-white inversion number histogram in the sub-scanning direction of the image shown in FIG. The horizontal axis in FIG. 39 indicates 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 the pixels obtained by inverting the scan image in black and white). The vertical axis in FIG. 39 indicates the number of black pixels for each position. FIG. 40 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. 40 represents the black pixel in the main scanning direction (vertical direction) (the pixel in which the 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. 40 indicates the number of black pixels for each position. When the characters in the image are horizontal scan images as shown in FIG. 8, the sub-scanning histogram as shown in FIG. 39 changes drastically, but the main-scanning histogram changes 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.
[0104]
Specifically, the discrimination method as described above is realized by the following equations. First, according to the following equation (2):
[0105]
[Expression 2]
Figure 2005051383
[0106]
Average 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,
[0107]
[Equation 3]
Figure 2005051383
[0108]
Variance σ in the main scanning direction of the histogram in the sub-scanning direction H Is obtained.
Similarly, according to equation (4) below:
[0109]
[Expression 4]
Figure 2005051383
[0110]
Average value mean of histogram values Pnt (x) at positions 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,
[0111]
[Equation 5]
Figure 2005051383
[0112]
Variance σ in the sub-scanning direction of the histogram in the main scanning direction v Is obtained.
[0113]
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.
[0114]
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.
[0115]
[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. 41 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.
[0116]
[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-described optimum ruled line selection criterion, and the horizontal writing character line length BC is larger than a predetermined threshold as shown in FIG. One of the upper and lower pages of a horizontal character line that is long and within a certain width region (shaded region in FIG. 42) on the left and right sides of the binding part boundary line. 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.
[0117]
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.
[0118]
[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. 42 is a binding boundary line, a coordinate value (in the main scanning direction) is estimated by 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.
[0119]
[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.
[0120]
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.
[0121]
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.
[0122]
[Extract horizontal text lines based on vertical text lines]
Next, a horizontal writing character line is extracted from each vertical writing character line.
[0123]
FIG. 43 is a flowchart schematically showing a flow of horizontal character line extraction processing from each vertical character line. As shown in FIG. 43, first, a line cut-out rectangle of a vertically written character line is extracted (step S201). In addition, since the extraction process of the line cut-out rectangle of a vertically written character line can use the well-known technique generally used by OCR etc., the description is abbreviate | omitted. FIG. 44 is an explanatory diagram illustrating the extracted row cutout rectangle.
[0124]
Next, a vertical writing character line having the maximum (or minimum) y coordinate at the beginning (or the end) of the vertical writing character line is extracted, and further, the vertical (with the leading (or tail)) existing within a predetermined distance range therefrom. A written character line is extracted (step S202). More specifically, in the example shown in FIG. 44, as shown in FIG. 45, the vertical writing character line with the largest y coordinate of the first character of the vertical writing character row is the vertical writing character line indicated by A. . A line head character existing within a predetermined distance range h from the head position is a character indicated by a black circle “●” in FIG. That is, only the vertically written character lines including the character indicated by the black circle “●” are extracted, and the other vertically written character lines B and C are excluded. Note that h is a constant determined by the resolution of the scanned image.
[0125]
Next, a histogram is constructed for the y-coordinate at the beginning (or the end) of the extracted vertical writing line (step S203). In FIG. 46, a vertical writing character line D near the left end of the page is set as a reference line, and the y coordinate (y D ) As reference coordinates. After that, y D The number of vertically written character lines whose head exists within a range of a constant width d (for example, 1/2 of the average width of the extracted vertically written character lines) D The histogram value for. In FIG. 46, y D The vertical writing character line having the head within the range of the dotted line sandwiching the straight line indicating the top and bottom is the target. Therefore, the vertical writing character line E on the right side of the vertical writing character line D near the left end of the page is out of the range. In this way, when a vertically written character line that does not include the beginning of the target range of the existing reference coordinates appears, the vertically written character line is set as a new reference line, and the beginning coordinate is set as a new reference coordinate (here, , Y E ). Also, the line start coordinate of the vertical writing character line F adjacent to the right of the vertical writing character line E is y D Without being provided with new reference coordinates. D Count up the value of the histogram by 1.
[0126]
Thereafter, the same processing is continued toward the binding portion boundary line. As a result, in the example shown in FIG. D Vertically written character lines included in the target range are seven surrounded by a hatched rectangle, y E The vertical text lines included in the target range are four surrounded by a shaded rectangle (the vertical text lines surrounded by other rectangles also have reference lines, reference coordinates, and target ranges, respectively. It is defined but is omitted in FIG. 46). Y D The target range includes a vertically written character line G that should be irrelevant, but is excluded in the next step S204.
[0127]
Subsequently, among the vertical writing character lines included in the target range of the reference line corresponding to the maximum value in the histogram configured in step S203, the vertical writing character line at the left end (or right end) of the page most. Using (reference line) as a start line, a vertically written character line having a leading (or trailing) y coordinate close to the binding boundary line is extracted (step S204). In FIG. 46, the reference coordinate y D The maximum number of character lines included in the target range is seven, so the leftmost vertical writing character line D is the starting line, and the heading from the starting line (vertical writing character line D) toward the binding boundary Vertically written character lines whose y coordinates are close to each other are extracted.
[0128]
By the way, when extracting a vertically written character line whose leading y coordinate is close to the bounding line from the start line (vertically written character line D), a distortion occurs in the portion where the image is not distorted. The processing content is switched with the part that is present.
[0129]
First, processing in a portion where image distortion has not occurred will be described with reference to FIG. In a portion where the image is not distorted, a vertically written character line that satisfies the following two conditions is extracted with reference to the target line H.
1. With respect to the positive direction of the y coordinate (the upward direction in FIG. 47), there is a head of a vertically written character line that is extracted within a certain range b1 (for example, 1/2 of the average character line width) from the head position of the target line H. To do
2. With respect to the negative direction of the y coordinate (the downward direction in FIG. 47), a predetermined angle (here) with respect to the positive direction of the x coordinate (the direction toward the binding boundary) viewed from the head position of the target row H Then, the head of the vertical writing character line to be extracted exists within the range of the angle (represented by the slope of the straight line (b2 / a1))
That is, the beginning of the next vertically written character line I of the line H of interest is excluded because it is outside the above range, but further, the beginning of the next vertically written character line J is within the range and thus is extracted. . Hereinafter, the same processing is continued with the vertically written character line J as a new target line.
[0130]
Next, processing in a portion where image distortion has occurred will be described with reference to FIG. In a portion where the image is distorted, a vertically written character line that satisfies the following two conditions is extracted with the target line L as a reference.
1. With respect to the negative direction of the y-coordinate (the downward direction in FIG. 48), a predetermined angle (here) with respect to the positive direction of the x-coordinate (the direction toward the binding boundary) viewed from the head position of the row of interest L The angle is represented by the slope of the straight line (b3 / a2). However, in consideration of the fact that the beginning of the character line intrudes into the inside of the page at the part where the distortion occurs, b2 / a1 < b3 / a2), the beginning of the vertical writing character line to be extracted exists.
2. The slope (b4 / a2) of the straight line connecting the head position of the target line L and the head position of the vertical writing character line to be extracted is the slope of the straight line connecting the head position of the target line L and the head position of the previous extracted line K (b5). / A3) larger than a value obtained by subtracting a constant value α. That is, “b4 / a2> b5 / a3-α” is satisfied (basically “b4 / a2> b5 / a3” may be satisfied, but a constant value α is introduced in consideration of an error. α is a predetermined value)
That is, the beginning of the next vertically written character line M of the line of interest L is excluded because it is outside this condition, but the beginning of the next vertically written character line N is extracted because it satisfies the condition. Hereinafter, the same processing is continued with the vertically written character line N as a new target line.
[0131]
The problem here is how to identify the non-distorted portion and the distorted portion as follows. That is, the y-coordinate at the beginning of the target row and the next extracted row is C , Y N Then, “y N -Y C If “” is equal to or greater than a certain value (for example, ¼ of the average character line width), the subsequent portion is regarded as a distorted portion.
[0132]
The vertically written character line extracted from FIG. 46 by the above method is shown by being surrounded by a hatched rectangle in FIG.
[0133]
Finally, an approximate curve polynomial relating to the position coordinates of the beginning (or the end) of the extracted vertically written character line is calculated (step S205). In the case of forming the outer shape by connecting the heads of the line cut rectangles of the extracted vertical character lines, as shown in FIG. 50, based on the center point of the upper side of the line cut rectangles of the vertical character lines to be connected, An approximate curve polynomial is calculated regarding the position coordinates of the beginning of the extracted vertical character line. Further, in the case of forming the outline by connecting the end of the line cut rectangle of each extracted vertical character line, as shown in FIG. 50, the lower side center point of the line cut rectangle of each vertical character line to be connected is formed. Based on this, an approximate curve polynomial is calculated regarding the position coordinate at the end of the extracted vertical writing line.
[0134]
Finally, an inappropriate vertical character line outline is eliminated. 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.
[0135]
[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.
[0136]
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.
[0137]
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.
[0138]
In the following description, the outer shape of a horizontal character line and a vertical character line is treated as a character string.
[0139]
As described above, the page outline / ruled line / character line extraction process (step S5) is completed by the processes of steps S41 to S43.
[0140]
[Image distortion correction processing]
In a subsequent step S6 (see FIG. 6), an image distortion correction process is executed. As shown in FIG. 51, the image distortion correction processing is roughly performed as a page outline positioned near the upper side (or lower side) of the scanned image as a reference line (reference line 1) for distortion correction (expansion). / Rule line / character line selection process (step S51: reference line 1 selection process), which corresponds to the reference line 1 and is used as a reference line 2 for calculating a correction rate (expansion rate) of the scanned image Processing for selecting one of page outline / ruled line / character line located near the upper side (or lower side) (step S52: reference line 2 selection processing), and processing for expanding the scanned image based on the reference line 1 and the reference line 2 The image is corrected based on the processing for correcting distortion in the main scanning direction and the distance from the scan plane of the page plane calculated from the reference line 1 or the reference line 2 or the character circumscribed rectangle of the corrected image. It is subjected to decompression processing for correcting the distortion in the sub-scanning direction processing: is constituted by (step S53 main scanning direction distortion correction process and the sub-scanning direction distortion correction processing).
[0141]
Here, in the reference line 1 selection process (step S51) and the reference line 2 selection process (step S52), the page outline / position located near the upper side (or the lower side) of the scanned image as the reference line 1 or the reference line 2. One of the ruled line / character line is selected for each of the left and right pages. The priority order of selection of the page outline, ruled line, and character line in this 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.
[0142]
Next, the main scanning direction distortion correction process and the sub scanning direction distortion correction process (step S53) will be described. This process differs depending on whether the scanner parameter is known or unknown. That is, when the scanner model is known, the position of the optical axis of the scanner lens of the scanner in the main scanning direction (Ak in FIG. 52) and the distance between the center of the scanner lens and the scanning plane (focal plane distance in FIG. 52) Are previously stored as scanner parameters.
[0143]
First, the case where the scanner parameters are known will be described. In this case, basically, if one line in the main scanning direction is corrected, then correction in the sub-scanning direction is performed with respect to that line next to all the lines in the main scanning direction, or the reference line 1 or the reference line 2. The process is performed for the main scanning direction line of the curved portion.
[0144]
Correction in the main scanning direction is performed as follows. In FIG. 53, the reference line 1 and the reference line 2 before correction are represented by solid lines, and the corrected line is represented by dotted lines. The corrected dotted line is obtained by extending the straight portions (flat portions) of the reference line 1 and the reference line 2 before correction as they are. Here, at the position x in the sub-scanning direction, the point P on the reference line 1 is corrected to P ′, and the point Q on the reference line 2 is corrected to Q ′. Now, assuming that an arbitrary point Y in the main scanning direction at the position x is corrected to Y ′, the following relational expression
YP / YQ = Y′P ′ / Y′Q ′
Holds. Therefore, if the position of each point in the main scanning direction is expressed as P (y) for the point P,
Figure 2005051383
So, transform this,
Figure 2005051383
It becomes.
[0145]
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. 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. 54, 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 shown in the figure.
[0146]
The above is a case where all of the reference line 1 and the reference line 2 are any one of the page outline / ruled line / character line. If an appropriate page outline, ruled line, and character line are not extracted, the following is performed. To do. FIG. 55 shows an example in which no page outline / ruled line / character line exists above the right page. In this case, the locus of the lens optical axis (L in FIG. 55) is regarded as the reference line 2 and the same processing as described above is performed. In this case, however, Q and Q ′ in FIG. 53 coincide. If there is no page outline / ruled line / character line below the page, L is regarded as the reference line 1 (P and P ′ match). If there is no page outline / ruled line / character line at the top / bottom of the page, there is no clue and the page is not corrected.
[0147]
The above processing is executed independently for each of the left and right pages of the scanned image. Moreover, the information about the reference line 1 and the reference line 2 in a certain spread left and right page may be held, and this may be used to correct other spread left and right pages. For example, when scanning a continuous spread page, the spread left and right pages are considered as one set, and the extraction of the reference line 1 and the reference line 2 is performed only once in 5 sets. If 2 is extracted, the information may be used as it is in the subsequent 4 sets. Thereby, time for extracting the reference line 1 and the reference line 2 can be saved, so that the overall processing speed is improved.
[0148]
Correction in the sub-scanning direction is performed as follows. That is, using the amount of change in the distance of the page surface from the scan surface, the image is expanded by expanding the book original so that the cross-sectional curve is a straight line. Specifically, as shown in FIG. 56, the shape of the book manuscript page surface is read to form a minute triangle for each line, and the image length Ln in one line of page reading is expressed by the following equation.
Ln = √ {1+ (Tn−Tn−1) 2}
And the cumulative image length Ln is taken as the page expansion length. As a result, the hypotenuse of the approximate triangle becomes almost equal to the shape of the curved page (approximate polygonal line), and the accurate page length is obtained by setting the accumulation as the image length of the page. In particular, the accuracy of correction of the length is high due to the shape approximation with the minimum pitch for each line.
[0149]
By calculating the pixel interval of the target pixel on the adjacent line in the main scanning direction as the reference “1”, the reading line interval changes, that is, the sampling pixel interval is sequentially changed with respect to the original when it is flat. On the other hand, image expansion processing is applied. Further, geometrically, the image projection double length in the main scanning direction and the distance from the scan surface of the page surface are proportional to each other. As shown in FIG. And the distance T from the scan surface of the page surface from the address Ka of the straight line portion (flat portion) of the reference line 1 or the reference line 2 is expressed by the following equation:
T = focal plane distance * (A3-Ak) / {(Ak-Ka)-(A3-Ak)}
Can be obtained. The correction position of the page can be calculated by approximating a straight line with a minute pitch for each pixel based on the difference in the depth of the adjacent main scanning lines calculated in this way. Note that the method of obtaining the reference line 1 / reference line 2 and the correspondence when there is no appropriate reference line 1 / reference line 2 are basically the same as in the case of correction in the main scanning direction.
[0150]
The distance T of the page plane calculated in this way from the scan plane is used to calculate the image length Ln in the sub-scanning direction to be restored for each line as shown in FIG. That is, the following formula
Ln = √ {1+ (Tn−Tn−1) 2}
Thus, the image length Ln in the sub-scanning direction to be corrected for each line is calculated. Therefore, the accumulation of the image length Ln becomes the page length in the sub-scanning direction.
[0151]
Normally, the amount of change in the height increases as the distance from the scan surface of the page surface increases. Therefore, in the present embodiment, image expansion is limited according to the distance of the page surface at that position from the scan surface. For example, the difference between adjacent boundary addresses is limited to (height [mm] / 5) [pixel] at that position, and errors in correction in the sub-scanning direction due to erroneous detection of the boundary are suppressed.
[0152]
In correction in the sub-scanning direction, the image length Ln differs depending on the position, and the positions of corresponding points in the original image and the corrected image are generally different as shown in FIG. When the point existing in N is corrected to N ′ and the point N + 1 is corrected to N + 1 ′, the pixel value to be obtained is the pixel value at the position of the integer X ′ (which generally does not necessarily match N + 1 ′). . If the distance between N ′ and X ′ is a and the distance between X ′ and N + 1 ′ is b, respectively, the corresponding point X of X ′ in the original image is
(X−N) / (N + 1−X) = a / b
Are in a relationship.
[0153]
If the position of X is known from the above equation, the X pixel value before correction may be moved to X ′ after correction. However, since the calculated value of X 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. 58, assuming that the pixel values corresponding to N and N + 1 before and after X are D (N) and D (N + 1), the pixel value D (X) in X satisfies the linear relationship shown in the figure. Calculate as follows. The above processing is performed for all positions in the sub-scanning direction, or for positions in the sub-scanning direction where the reference line 1 or the reference line 2 is a curve.
[0154]
The above processing is executed independently for each of the left and right pages of the scanned image. In addition, the distance from the scanning surface of the book document in a certain spread left and right page and the information about the reference line 1 or the reference line 2 may be held and used for correcting other spread left and right pages. For example, when scanning a continuous spread page, the spread left and right pages are considered as one set, and the calculation of the distance from the scan surface of the book document and the extraction of the reference line 1 and the reference line 2 are performed only once in 5 sets. If the calculation of the distance and the extraction of the reference line 1 and the reference line 2 are performed in a certain set, the information may be used as it is in the subsequent four sets. This saves time for calculating the distance from the scan surface of the book document and extracting the reference line 1 and the reference line 2, thereby improving the overall processing speed.
[0155]
This is the description of the main scanning direction distortion correction processing and the sub scanning direction distortion correction processing (step S53) in the case where the scanner parameters are known.
[0156]
Next, a case where the scanner parameter is unknown will be described. The correction in the main scanning direction is basically the same as when the scanner parameters are known, but the processing when an appropriate page outline, ruled line, and character line are not extracted is slightly different. In FIG. 55, when the scanner parameter is known, the locus of the lens optical axis (L in FIG. 55) is regarded as the reference line 2, but when unknown (see FIG. 59), the center line parallel to the sub-scanning direction (see FIG. 59). 59 C) is regarded as reference line 2. Also in this case, Q and Q ′ in FIG. 53 coincide. If there is no page outline / ruled line / character line below the page, C is regarded as the reference line 1 and the same is done (P and P ′ match). If there is no page outline / ruled line / character line at the top / bottom of the page, there is no clue and the page is not corrected.
[0157]
Next, sub-scanning direction distortion correction processing will be described. FIG. 60 is a flowchart schematically showing the flow of the sub-scanning direction distortion correction process. As shown in FIG. 60, in step S101, a circumscribed rectangle A (see FIG. 61) of a character is extracted based on the scanned image corrected for distortion in the main scanning direction. 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. 61, the horizontal side length w, the vertical side length h, and the 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.
[0158]
Subsequently, as shown in FIG. 62, 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 in FIG. 62 is a shaded rectangle in the drawing.
[0159]
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.
[0160]
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 character circumscribed rectangle A shown in FIG. 63 with shading is excluded in advance.
[0161]
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. 64 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. 64 is a strip region including a page binding portion.
[0162]
Subsequently, it is determined whether or not the character circumscribing rectangle A exists in the strip area C2 including the page binding portion (step S106). This is because, as shown in FIG. 63, generally, there are many cases where the character circumscribing rectangle A does not exist near the page binding portion. If the character circumscribing rectangle A exists in the strip area C2 including the page binding portion (Y in step S106), the feature amount is calculated using the character circumscribing rectangle A, and the process directly proceeds to step S108.
[0163]
On the other hand, when the character circumscribing rectangle A does not exist in the strip region C2 including the page binding portion (N in step S106), the process proceeds to step S107, and the feature amount of the strip region C2 including the page binding portion is obtained. The strip region C2 including the page binding portion is identified by, for example, obtaining a background density change of a scanned image (for example, a monochrome multi-valued image) for each strip region C, and having the lightest density value in the strip region C. This is realized by obtaining FIG. 65 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.
[0164]
Note that when the scanned image is a color multi-valued image, the strip region C2 including the page binding portion is identified by focusing on one of the RGB components (for example, the G component) and using the background density of the G component. To identify them. Alternatively, RGB may be color-converted to be divided into a luminance component and a color difference component, and the strip region C2 including the page binding portion may be identified using the luminance component.
[0165]
The feature amount of the strip region C2 including the page binding portion is determined as follows. Here, there is a character circumscribing rectangle A that can be a statistical feature quantity calculation target, and a predetermined constant value is set for the feature quantity of the strip area C that is the nearest to the strip area C2 including the page binding portion. A value calculated by multiplication is regarded as a feature amount in the strip region C2 including the page binding portion. That is, in the example shown in FIG. 64, the character circumscribing rectangle A exists in any of the strip regions C3 and C4 on the left and right sides of the strip region C2 including the page binding portion. Here, the circle on the right side) is multiplied by a predetermined constant value (0.5 in this case), and this is used as the feature amount of the strip region C2 including the page binding portion.
[0166]
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. Here, however, special processing is required in the vicinity of the page binding portion. 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 near the page binding portion is lost.
[0167]
Here, FIG. 66 shows the result of performing the filtering process on the feature amount of each strip region C shown in FIG. 64 using a window whose length is all five. As shown in FIG. 66, when the filtering process is performed using a window whose length is all 5, the change in the feature amount (w / h) near the page binding portion becomes too gentle. In such a case, appropriate image correction near the page binding portion becomes impossible.
[0168]
Therefore, in the present embodiment, during the filtering process, the window length is set near the page binding portion so that the filter window does not straddle the strip regions C3 and C4 on both sides of the strip region C2 including the page binding portion. Adjust. Here, FIG. 67 is a graph showing the result of performing the filtering process by adjusting the window length in the vicinity of the page binding portion. As shown in FIG. 67, when the window length is adjusted in the vicinity of the page binding portion, the change in the feature amount (w / h) in the vicinity of the page binding portion can be appropriately expressed, so that good image correction can be realized.
[0169]
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.
[0170]
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. 67 shows an example in which the reference strip area is defined independently on the left and right sides. The strip area C marked with a circle is the reference strip area, the left reference feature value is “Lw0 / Lh0”, and the right reference standard area is shown. The feature amounts are indicated by “Rw0 / Rh0”, respectively.
[0171]
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.
[0172]
If the strip area C near the outside of the page outside the page binding portion is used as the reference strip region, there may be a case where a font or type size difference is large from the vicinity of the page binding portion, and an appropriate estimated distortion amount cannot be calculated. It is done. 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 in advance. In order to realize this, the reference line 1 or the reference line 2 may be performed only for the position in the sub-scanning direction where the reference line 1 is a curve.
[0173]
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 near the page binding portion (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. 68 shows the corrected enlargement ratio calculated based on the feature amount shown in FIG.
[0174]
In this case as well, since the strip area C far from the vicinity of the page binding portion is likely to be an area without distortion of the image, there is a case where it is better not to make it an object of enlargement processing. This is because an unnatural distortion may occur due to the enlargement process. In order to prevent this, it is only necessary to enlarge only the position in the sub-scanning direction of the portion where the reference line 1 or the reference line 2 is a curve. That is, when the reference line 1 or the reference line 2 is a straight line, the estimated distortion amount is “1”.
[0175]
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. 68 is plotted as a point indicating the reciprocal of the estimated distortion amount, and these points are connected by a line segment to complement 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.
[0176]
The above processing is executed independently for each of the left and right pages of the scanned image. Further, information about the correction magnification ratio in a certain spread left and right page may be held and used for correcting other spread left and right pages. For example, when scanning a continuous spread page, it is assumed that the spread left and right pages are one set, and the correction enlargement ratio is calculated only once in five sets. In four sets, the information may be used as it is. This saves time for calculating the corrected enlargement ratio, thereby improving the overall processing speed.
[0177]
As described above, the sub-scanning direction distortion correction process is completed by the processes in steps S101 to S110, and the scan image distortion correction process shown in FIG. Here, FIG. 69 is a plan view showing an image with distortion corrected. According to the above processing, the distortion of the scan image that has occurred in the vicinity of the page binding portion as shown in FIG. 8 is corrected as shown in FIG.
[0178]
As described above, when the scanner parameters are unknown, the correction in the sub-scanning direction is basically performed using the character circumscribed rectangle after the correction in the main scanning direction is completed for all lines.
[0179]
In the present embodiment, the scanner unit 1 of the digital copying machine is applied as the image reading apparatus. However, the present invention is not limited to this. For example, the scanner unit 1 may be applied to a scanner equipped with an automatic page turning function. .
[0180]
In the present embodiment, the book document 40 is placed on the contact glass 2 so that the page binding portion 41 of the book document 40 and the main scanning direction of image reading of the scanner unit 1 are parallel to each other. However, the present invention is not limited to this. For example, as shown in FIG. 70, an upward book document 40 may be brought into contact with the contact glass 2 from below the contact glass 2.
[0181]
Furthermore, in the present embodiment, the image distortion correction apparatus is provided in the digital copying machine 16 that 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 provided with an image reading means for reading a document image is connected to a personal computer, and a program stored in a CD-ROM 37 as 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.
[0182]
【The invention's effect】
According to the present invention, since the binding portion position can be detected without depending on the paper quality or placement of the book, the correction accuracy of the distortion correction process can be improved.
[Brief description of the drawings]
FIG. 1 is a longitudinal front view showing a configuration of a scanner unit according to an embodiment of the present invention.
FIG. 2 is a perspective view showing an upper part of a digital copying machine equipped with a scanner unit.
FIG. 3 is a block diagram showing an electrical connection of a control system of a scanner unit.
FIG. 4 is a block diagram illustrating a basic internal configuration of an image processing unit.
FIG. 5 is a block diagram showing electrical connection of a main control unit.
FIG. 6 is a flowchart schematically illustrating a flow of 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.
FIG. 10 is a flowchart schematically showing a flow of a binding portion position detection process.
FIG. 11 is an explanatory diagram illustrating a method for determining whether or not a page outline exists in the vicinity of the binding portion on the upper side of a scanned image.
FIG. 12 is an explanatory diagram showing an example of a generated histogram.
FIG. 13 is an explanatory diagram illustrating a method for analyzing a generated histogram.
FIG. 14 is an explanatory diagram illustrating a method for determining a no-character area when the number of lists is singular.
FIG. 15 is an explanatory diagram illustrating a method for determining a character-free area when there are a plurality of lists.
FIG. 16 is an explanatory diagram for explaining a method for determining a character-less area when there are a plurality of lists and the distance between the start coordinates of the preceding and following lists is not symmetrical about the list having the maximum distance. It is.
FIG. 17 is an explanatory diagram illustrating a method for determining a no-character area when the number of lists is zero.
FIG. 18 is an explanatory diagram for explaining a technique for detecting a vertex of a page outline;
FIG. 19 is a histogram of positions that give the minimum value in the sub-scanning direction among the maximum luminance values on each line in the main scanning direction.
FIG. 20 is an explanatory diagram showing a set of points whose luminance difference is equal to or greater than a predetermined threshold and equal to or less than another predetermined threshold.
FIG. 21 is an explanatory diagram showing a straight line passing through a point P (x, y) on the xy plane.
FIG. 22 is an explanatory diagram showing the relationship between the distance ρ and the angle θ.
FIG. 23 is an explanatory diagram for explaining a method for determining a binding position.
FIG. 24 is an explanatory diagram showing a method for determining the binding position when the page outline exists only on the upper page.
FIG. 25 is an explanatory diagram showing a method for determining the binding position when the page outline exists on both the upper and lower sides;
FIG. 26 is an explanatory diagram illustrating a method for determining a binding portion position when a page outline does not exist in the vicinity of a binding portion of a scanned image.
27 is a black pixel histogram of the image shown in FIG.
FIG. 28 is a flowchart schematically showing a flow of page outline / ruled line / character line extraction processing;
FIG. 29 is an explanatory diagram illustrating an example of a scanned image having a page outline at the upper end.
30 is a black pixel histogram on the left side of the binding boundary line of the scan image shown in FIG. 29;
FIG. 31 is an explanatory diagram illustrating an example of a scanned image in which a long ruled line exists.
FIG. 32 is a black pixel histogram on the left side of the binding boundary line of the scan image shown in FIG. 31;
FIG. 33 is an explanatory diagram showing determination of continuity of ruled lines.
FIG. 34 is an explanatory diagram showing coordinate detection of ruled lines.
FIG. 35 is an explanatory diagram showing a case where one ruled line is selected from each of the left and right pages.
FIG. 36 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 in each of the four blocks.
FIG. 37 is an explanatory diagram showing ruled line coordinate extraction;
FIG. 38 is an explanatory diagram showing an example of inappropriate ruled lines to be excluded;
39 is a black-and-white inversion number histogram in the sub-scanning direction of the image shown in FIG.
40 is a black-and-white inversion number histogram of the image shown in FIG. 8 in the main scanning direction.
FIG. 41 is an explanatory diagram illustrating an example of results of character circumscribed rectangle extraction processing and character line extraction processing of a scanned image.
FIG. 42 is an explanatory diagram showing selection of an optimal horizontal writing character line.
FIG. 43 is a flowchart schematically showing a flow of horizontal character line extraction processing from each vertical character line.
FIG. 44 is an explanatory diagram exemplarily showing an extracted row cutout rectangle.
FIG. 45 is an explanatory diagram exemplarily illustrating a vertically written character line having a head within a predetermined distance range.
FIG. 46 is an explanatory diagram showing a state in which a histogram is formed with respect to the leading y coordinate of the extracted vertical writing character line.
FIG. 47 is an explanatory diagram showing processing in a portion where image distortion has not occurred.
FIG. 48 is an explanatory diagram showing processing in a portion where image distortion occurs.
FIG. 49 is an explanatory diagram of extracted vertical writing character lines.
FIG. 50 is an explanatory diagram showing a line cut-out rectangle of a vertically written character line.
FIG. 51 is a flowchart schematically showing a flow of image distortion correction processing.
FIG. 52 is an explanatory diagram showing the position of the optical axis of the scanner lens of the scanner in the main scanning direction and the distance between the center of the scanner lens and the scanning surface.
FIG. 53 is an explanatory diagram showing main-scanning direction distortion correction processing;
FIG. 54 is an explanatory diagram showing how to obtain pixel values by linear interpolation processing;
FIG. 55 is an explanatory diagram showing main-scanning direction distortion correction processing when there is no page outline / ruled line / character line above the right page.
FIG. 56 is an explanatory diagram showing calculation of an image length.
FIG. 57 is an explanatory diagram showing a correspondence between an original image and a corrected image.
FIG. 58 is an explanatory diagram showing how to obtain a pixel value by linear interpolation processing;
FIG. 59 is an explanatory diagram showing main-scanning direction distortion correction processing when scanner parameters are unknown and appropriate page outlines, ruled lines, and character lines are not extracted.
FIG. 60 is a flowchart schematically showing a flow of sub-scanning direction distortion correction processing.
FIG. 61 is an explanatory diagram of extracted character circumscribed rectangles.
FIG. 62 is an explanatory diagram showing a state in which a 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. 63 is an explanatory diagram showing character circumscribed rectangles excluded in advance.
FIG. 64 is a graph illustrating an example of an average value of feature amounts of a circumscribed rectangle in each strip area.
FIG. 65 is a graph showing an example of background density change in each strip region.
66 is a graph showing a result of performing filtering processing using a window whose length is all 5 for the feature amount of each strip area shown in FIG. 64;
67 is a graph showing 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 shown in FIG. 64;
68 is a graph showing a corrected enlargement ratio calculated based on the feature amount shown in FIG. 67. FIG.
FIG. 69 is a plan view showing an image with distortion corrected;
FIG. 70 is a front view showing a state in which a book document is brought into contact with contact glass.
FIG. 71 is a front view showing a state in which a book document is placed on contact glass.
[Explanation of symbols]
1 Image reader
16 Image forming apparatus
19 Image distortion correction device
40 book manuscript
41 Page binding

Claims (20)

スキャン面の上もしくは下に接触したブック原稿を画像読取手段により読み取ったスキャン画像の歪みを当該スキャン画像におけるブック原稿のページ綴じ部の位置を用いて補正する画像歪み補正装置において、
前記スキャン画像の綴じ部付近のページ外形を検出するページ外形検出手段と、
文字や図の非存在領域であって前記スキャン画像の綴じ部を含む文字無し領域を検出する文字無し領域検出手段と、
最小輝度の代表位置を検出する最小輝度検出手段と、
前記スキャン画像上の着目画素と当該着目画素から副走査方向に予め定めた距離だけ離れた画素との輝度値の差が予め定めた閾値以上であり、かつ、予め定めた別の閾値以下となるような着目点の集合を基に直線を抽出する直線抽出手段と、
を備え、
前記ページ外形検出手段により検出されたページ外形の有無、前記文字無し領域検出手段により検出された文字無し領域、前記最小輝度検出手段により検出された最小輝度の代表位置、前記直線抽出手段により抽出された直線の位置を勘案し、前記スキャン画像の綴じ部位置を決定する、
ことを特徴とする画像歪み補正装置。
In an image distortion correction apparatus that corrects distortion of a scanned image obtained by reading a book document in contact with the top or bottom of a scan surface by an image reading unit using the position of a page binding portion of the book document in the scanned image.
Page outline detecting means for detecting a page outline near the binding portion of the scanned image;
A non-character area detection means for detecting a non-existence area of a character or a figure and including a non-character area including a binding portion of the scanned image;
Minimum luminance detecting means for detecting a representative position of the minimum luminance;
The difference in luminance value between the pixel of interest on the scanned image and a pixel separated from the pixel of interest by a predetermined distance in the sub-scanning direction is equal to or larger than a predetermined threshold and equal to or smaller than another predetermined threshold. Straight line extraction means for extracting a straight line based on a set of such points of interest;
With
Presence / absence of page outline detected by the page outline detection means, no character area detected by the no-character area detection means, representative position of the minimum brightness detected by the minimum brightness detection means, extracted by the straight line extraction means In consideration of the position of the straight line, the binding position of the scanned image is determined.
An image distortion correction apparatus characterized by that.
前記ページ外形検出手段により前記スキャン画像の主走査方向上辺及び下辺の綴じ部付近に前記ページ外形が検出された場合は、上下の各ページ外形の頂点を結んだ線分を綴じ部位置とみなす、
ことを特徴とする請求項1記載の画像歪み補正装置。
When the page outline is detected in the vicinity of the binding portion on the upper side and the lower side in the main scanning direction of the scanned image by the page outline detection means, the line segment connecting the vertices of the upper and lower page outlines is regarded as the binding portion position.
The image distortion correction apparatus according to claim 1.
前記ページ外形検出手段により前記スキャン画像の主走査方向上辺または下辺のいずれか一方の綴じ部付近にのみ前記ページ外形が検出された場合は、前記最小輝度検出手段にて検出された最小輝度位置もしくは前記直線抽出手段により抽出された直線の位置を綴じ部位置とみなす、
ことを特徴とする請求項1記載の画像歪み補正装置。
When the page outline is detected only near the binding portion of either the upper side or the lower side in the main scanning direction of the scanned image by the page outline detection unit, the minimum luminance position detected by the minimum luminance detection unit or Considering the position of the straight line extracted by the straight line extraction means as the binding position,
The image distortion correction apparatus according to claim 1.
前記ページ外形検出手段により前記スキャン画像の主走査方向上辺または下辺のいずれか一方の綴じ部付近にのみ前記ページ外形が検出された場合であって、当該ページ外形の頂点と、前記文字無し領域検出手段により検出された文字無し領域内において前記最小輝度検出手段にて検出された最小輝度の代表位置との差が予め定めた閾値より小さい場合は、前記最小輝度位置を綴じ部位置とみなす、
ことを特徴とする請求項3記載の画像歪み補正装置。
The page outline detection means detects the page outline only in the vicinity of either one of the upper or lower binding direction of the scanned image in the main scanning direction, and detects the apex of the page outline and the no-character area. If the difference from the representative position of the minimum brightness detected by the minimum brightness detection means in the no-character area detected by the means is smaller than a predetermined threshold, the minimum brightness position is regarded as the binding position.
The image distortion correction apparatus according to claim 3.
前記ページ外形検出手段により前記スキャン画像の主走査方向上辺または下辺のいずれか一方の綴じ部付近にのみ前記ページ外形が検出された場合であって、当該ページ外形の頂点と、前記文字無し領域検出手段により検出された文字無し領域内において前記最小輝度検出手段にて検出された最小輝度の代表位置との差が予め定めた閾値より大きい場合は、前記直線抽出手段により抽出された複数の直線候補の中から、当該ページ外形の頂点と最も近い直線の位置を綴じ部位置とみなす、
ことを特徴とする請求項3記載の画像歪み補正装置。
The page outline detection means detects the page outline only in the vicinity of either one of the upper or lower binding direction of the scanned image in the main scanning direction, and detects the apex of the page outline and the no-character area. A plurality of line candidates extracted by the line extraction means when the difference from the representative position of the minimum brightness detected by the minimum brightness detection means in a no-character area detected by the means is greater than a predetermined threshold value The position of the straight line closest to the apex of the page outline is considered as the binding part position.
The image distortion correction apparatus according to claim 3.
前記ページ外形検出手段により前記スキャン画像の主走査方向上辺及び下辺のいずれの綴じ部付近にもページ外形が検出されなかった場合は、前記最小輝度検出手段にて検出された最小輝度の代表位置もしくは前記直線抽出手段により抽出された直線の位置を綴じ部位置とみなす、
ことを特徴とする請求項1記載の画像歪み補正装置。
If the page outline is not detected by the page outline detection unit in the vicinity of the binding portion of either the upper side or the lower side in the main scanning direction of the scanned image, the representative position of the minimum luminance detected by the minimum luminance detection unit or Considering the position of the straight line extracted by the straight line extraction means as the binding position,
The image distortion correction apparatus according to claim 1.
前記ページ外形検出手段により前記スキャン画像の主走査方向上辺及び下辺のいずれの綴じ部付近にもページ外形が検出されなかった場合であって、かつ、前記文字無し領域検出手段により適切な文字無し領域が検出された場合に、前記文字無し領域検出手段により検出された文字無し領域の中点と、文字無し領域内において前記最小輝度検出手段にて検出された最小輝度の代表位置との差が予め定めた閾値より小さい場合は、前記最小輝度位置を綴じ部位置とみなす、
ことを特徴とする請求項6記載の画像歪み補正装置。
When the page outline is not detected by the page outline detection unit in the vicinity of the binding portion of either the upper side or the lower side in the main scanning direction of the scanned image, and an appropriate character-free region is detected by the character-free region detection unit Is detected in advance, the difference between the midpoint of the characterless region detected by the characterless region detecting unit and the representative position of the minimum luminance detected by the minimum luminance detecting unit in the characterless region is determined in advance. When the threshold value is smaller than the predetermined threshold, the minimum luminance position is regarded as the binding position.
The image distortion correction apparatus according to claim 6.
前記ページ外形検出手段により前記スキャン画像の主走査方向上辺及び下辺のいずれの綴じ部付近にもページ外形が検出されなかった場合であって、かつ、前記文字無し領域検出手段により適切な文字無し領域が検出された場合に、前記文字無し領域検出手段により検出された文字無し領域の中点と、文字無し領域内において前記最小輝度検出手段にて検出された最小輝度の代表位置との差が予め定めた閾値より大きい場合は、前記直線抽出手段により抽出された直線の位置を綴じ部位置とみなす、
ことを特徴とする請求項6記載の画像歪み補正装置。
If the page outline is not detected by the page outline detection unit in the vicinity of the binding portion of either the upper side or the lower side in the main scanning direction of the scanned image, and an appropriate character-free region is detected by the character-free region detection unit Is detected in advance, the difference between the midpoint of the characterless area detected by the characterless area detecting means and the representative position of the minimum brightness detected by the minimum brightness detecting means in the characterless area If it is larger than the set threshold, the position of the straight line extracted by the straight line extraction means is regarded as the binding portion position.
The image distortion correction apparatus according to claim 6.
前記ページ外形検出手段により前記スキャン画像の主走査方向上辺及び下辺のいずれの綴じ部付近にもページ外形が検出されなかった場合であって、前記文字無し領域検出手段により適切でない文字無し領域が検出された場合は、前記直線抽出手段により抽出された直線の位置を綴じ部位置とみなす、ことを特徴とする請求項1記載の画像歪み補正装置。When the page outline is not detected by the page outline detection unit in the vicinity of the binding portion of either the upper side or the lower side of the scanned image in the main scanning direction, the inappropriate area without the character is detected by the no-character area detection unit. 2. The image distortion correction apparatus according to claim 1, wherein, when it is determined, the position of the straight line extracted by the straight line extraction unit is regarded as a binding portion position. 前記ページ外形検出手段は、前記スキャン画像の主走査方向上辺から下方へ向かって黒画素もしくは予め定めた濃度閾値以上の画素がほぼ逆三角形状に分布している場合は前記スキャン画像の主走査方向上辺にページ外形が存在するとみなし、前記スキャン画像の主走査方向下辺から上方へ向かって黒画素もしくは予め定めた濃度閾値以上の画素がほぼ三角形状に分布している場合は前記スキャン画像の主走査方向下辺にページ外形が存在するとみなす、
ことを特徴とする請求項1ないし9のいずれか一記載の画像歪み補正装置。
The page outline detection means determines that the black image or the pixels having a predetermined density threshold value or more are distributed in a substantially inverted triangular shape from the upper side to the lower side in the main scanning direction of the scanned image. When it is assumed that a page outline exists on the upper side and black pixels or pixels having a predetermined density threshold value or more are distributed in a substantially triangular shape from the lower side in the main scanning direction of the scanned image to the upper side, the main scanning of the scanned image The page outline is considered to exist at the bottom of the direction,
The image distortion correction apparatus according to claim 1, wherein the image distortion correction apparatus is an image distortion correction apparatus.
前記文字無し領域検出手段は、主走査方向での白黒画素の反転数、もしくは、予め定めた閾値以上と以下の画素が交代する回数、に関するヒストグラムの分布を利用して、前記文字無し領域を検出する、
ことを特徴とする請求項1ないし9のいずれか一記載の画像歪み補正装置。
The no-character area detection means detects the no-character area by using a histogram distribution related to the number of inversions of black and white pixels in the main scanning direction or the number of times the predetermined pixel is changed to a value greater than or equal to a predetermined threshold. To
The image distortion correction apparatus according to claim 1, wherein the image distortion correction apparatus is an image distortion correction apparatus.
ヒストグラムの値が予め定めた閾値以下である副走査方向の連続領域の中で最大の領域を中心とし、他の閾値以下の連続領域が副走査方向でほぼ対称に存在する場合は、前記最大領域を文字や図が存在しない可能性が高い文字無し領域(適切な文字無し領域)とみなし、他の閾値以下の連続領域が副走査方向で対称に存在しない場合は、これら閾値以下の連続領域の全ての左端から右端までを文字や図が存在しない可能性が低い文字無し領域(適切でない文字無し領域)とみなす、
ことを特徴とする請求項11記載の画像歪み補正装置。
When the continuous area in the sub-scanning direction where the value of the histogram is less than or equal to a predetermined threshold is centered and the continuous areas below the other threshold are substantially symmetrical in the sub-scanning direction, the maximum area Is considered to be a non-character area (appropriate non-character area), and if there are no other continuous areas below the threshold symmetrically in the sub-scanning direction, All left-to-right edges are considered as no-character areas (character-free areas) that are unlikely to have characters or figures.
The image distortion correction apparatus according to claim 11.
ヒストグラムの値が予め定めた閾値以上である副走査方向の連続領域の長さが予め定められた一定値以下の場合は、当該連続領域をヒストグラムの値が予め定めた閾値以下の領域とみなす、
ことを特徴とする請求項12記載の画像歪み補正装置。
When the length of the continuous area in the sub-scanning direction in which the value of the histogram is equal to or greater than a predetermined threshold is equal to or less than a predetermined value, the continuous area is regarded as an area where the value of the histogram is equal to or less than a predetermined threshold.
The image distortion correction apparatus according to claim 12.
前記最小輝度検出手段は、前記スキャン画像の主走査方向の各ライン上での最大輝度値の中で副走査方向において最小値を与える位置を、最小輝度の代表位置とみなす、
ことを特徴とする請求項1ないし9のいずれか一記載の画像歪み補正装置。
The minimum luminance detecting means regards a position that gives a minimum value in the sub-scanning direction among the maximum luminance values on each line in the main scanning direction of the scanned image as a representative position of the minimum luminance.
The image distortion correction apparatus according to claim 1, wherein the image distortion correction apparatus is an image distortion correction apparatus.
最小輝度の代表位置を通る主走査方向直線と、スキャン画像を副走査方向に貫く中心線もしくは前記画像読取手段の光軸の軌跡との交点を起点とし、スキャン画像の上方と下方の各方向に向かって、各主走査方向位置における最小輝度位置を探索していく、
ことを特徴とする請求項14記載の画像歪み補正装置。
Starting from the intersection of the straight line in the main scanning direction passing through the representative position of the minimum brightness and the center line passing through the scanned image in the sub-scanning direction or the locus of the optical axis of the image reading means, the scanning image is in the upper and lower directions. Towards the search for the minimum luminance position in each main scanning direction position,
The image distortion correction apparatus according to claim 14.
前記直線抽出手段は、前記スキャン画像上の着目画素と当該着目画素から副走査方向に予め定めた距離だけ離れた画素の輝度値の差が予め定めた閾値以上であり、かつ、予め定めた別の閾値以下となるような着目点の集合を基に直線を抽出する、
ことを特徴とする請求項1ないし9のいずれか一記載の画像歪み補正装置。
The straight line extraction unit is configured such that a difference in luminance value between a target pixel on the scan image and a pixel separated from the target pixel by a predetermined distance in the sub-scanning direction is equal to or more than a predetermined threshold and A straight line is extracted based on a set of points of interest that are below the threshold of
The image distortion correction apparatus according to claim 1, wherein the image distortion correction apparatus is an image distortion correction apparatus.
決定した綴じ部位置と画像読み取りの主走査方向との成す角度を前記スキャン画像のスキュー角度として検出する、
ことを特徴とする請求項1ないし16のいずれか一記載の画像歪み補正装置。
Detecting an angle formed by the determined binding position and the main scanning direction of image reading as a skew angle of the scanned image;
The image distortion correction apparatus according to claim 1, wherein the image distortion correction apparatus is an image distortion correction apparatus.
原稿画像を読み取る画像読取手段と、
この画像読取手段により読み取られたスキャン画像の補正を行う請求項1ないし17の何れか一記載の画像歪み補正装置と、
を備えることを特徴とする画像読取装置。
Image reading means for reading a document image;
The image distortion correction apparatus according to any one of claims 1 to 17, which corrects a scanned image read by the image reading unit;
An image reading apparatus comprising:
原稿画像を読み取る画像読取手段と、
この画像読取手段により読み取られたスキャン画像の補正を行う請求項1ないし17の何れか一記載の画像歪み補正装置と、
この画像歪み補正装置から出力される画像データに基づいた画像を用紙上に印刷する画像印刷装置と、
を備えることを特徴とする画像形成装置。
Image reading means for reading a document image;
The image distortion correction apparatus according to any one of claims 1 to 17, 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;
An image forming apparatus comprising:
スキャン面の上もしくは下に接触したブック原稿を画像読取手段により読み取ったスキャン画像の歪み補正を当該スキャン画像におけるブック原稿のページ綴じ部の位置を用いてコンピュータに実行させるプログラムであって、前記コンピュータに、
前記スキャン画像の綴じ部付近のページ外形を検出するページ外形検出機能と、
文字や図の非存在領域であって前記スキャン画像の綴じ部を含む文字無し領域を検出する文字無し領域検出機能と、
最小輝度の代表位置を検出する最小輝度検出機能と、
前記スキャン画像上の着目画素と当該着目画素から副走査方向に予め定めた距離だけ離れた画素との輝度値の差が予め定めた閾値以上であり、かつ、予め定めた別の閾値以下となるような着目点の集合を基に直線を抽出する直線抽出機能と、
を実行させ、
前記ページ外形検出機能により検出されたページ外形の有無、前記文字無し領域検出機能により検出された文字無し領域、前記最小輝度検出機能により検出された最小輝度の代表位置、前記直線抽出機能により抽出された直線の位置を勘案し、前記スキャン画像の綴じ部位置を決定する、
ことを特徴とするプログラム。
A program for causing a computer to execute distortion correction of a scanned image obtained by reading a book document in contact with the top or bottom of a scan surface by an image reading unit using the position of a page binding portion of the book document in the scanned image, In addition,
A page outline detection function for detecting a page outline near the binding portion of the scanned image;
A character-free region detection function for detecting a character-free region that is a non-existing region of a character or a figure and includes a binding portion of the scanned image;
Minimum brightness detection function to detect the representative position of the minimum brightness,
The difference in luminance value between the pixel of interest on the scanned image and a pixel separated from the pixel of interest by a predetermined distance in the sub-scanning direction is equal to or larger than a predetermined threshold and equal to or smaller than another predetermined threshold. A straight line extraction function that extracts a straight line based on a set of such points of interest;
And execute
Existence of page outline detected by the page outline detection function, character-free area detected by the no-character area detection function, representative position of the minimum brightness detected by the minimum brightness detection function, extracted by the straight line extraction function Taking into account the position of the straight line, the binding position of the scanned image is determined.
A program characterized by that.
JP2003204286A 2003-07-31 2003-07-31 Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program Expired - Fee Related JP3983721B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003204286A JP3983721B2 (en) 2003-07-31 2003-07-31 Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003204286A JP3983721B2 (en) 2003-07-31 2003-07-31 Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program

Publications (2)

Publication Number Publication Date
JP2005051383A true JP2005051383A (en) 2005-02-24
JP3983721B2 JP3983721B2 (en) 2007-09-26

Family

ID=34263334

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003204286A Expired - Fee Related JP3983721B2 (en) 2003-07-31 2003-07-31 Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program

Country Status (1)

Country Link
JP (1) JP3983721B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006293522A (en) * 2005-04-07 2006-10-26 Fuji Photo Film Co Ltd Straight line detection device, straight line detection method, and program for the same
JP2007213325A (en) * 2006-02-09 2007-08-23 Ricoh Co Ltd Image processor, image processing method and image processing program
JP2008167352A (en) * 2007-01-04 2008-07-17 Oki Data Corp Image processing apparatus
US9019577B2 (en) 2012-12-25 2015-04-28 Kyocera Document Solutions Inc. Image processing device and image reading apparatus
JP2018169212A (en) * 2017-03-29 2018-11-01 株式会社デンソー Member welding position detector and method for detecting member welding position
CN111739014A (en) * 2020-06-30 2020-10-02 北京酷豹科技有限公司 Image quality detection method based on image processing and related device
US11328425B2 (en) 2019-01-25 2022-05-10 Fujifilm Business Innovation Corp. Image processing apparatus and non-transitory computer readable medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006293522A (en) * 2005-04-07 2006-10-26 Fuji Photo Film Co Ltd Straight line detection device, straight line detection method, and program for the same
JP2007213325A (en) * 2006-02-09 2007-08-23 Ricoh Co Ltd Image processor, image processing method and image processing program
JP4695520B2 (en) * 2006-02-09 2011-06-08 株式会社リコー Image processing apparatus, image processing method, and image processing program
JP2008167352A (en) * 2007-01-04 2008-07-17 Oki Data Corp Image processing apparatus
US9019577B2 (en) 2012-12-25 2015-04-28 Kyocera Document Solutions Inc. Image processing device and image reading apparatus
JP2018169212A (en) * 2017-03-29 2018-11-01 株式会社デンソー Member welding position detector and method for detecting member welding position
US11328425B2 (en) 2019-01-25 2022-05-10 Fujifilm Business Innovation Corp. Image processing apparatus and non-transitory computer readable medium
CN111739014A (en) * 2020-06-30 2020-10-02 北京酷豹科技有限公司 Image quality detection method based on image processing and related device
CN111739014B (en) * 2020-06-30 2023-03-07 北京酷豹科技有限公司 Image quality detection method based on image processing and related device

Also Published As

Publication number Publication date
JP3983721B2 (en) 2007-09-26

Similar Documents

Publication Publication Date Title
US7430065B2 (en) Method and system for correcting distortions in image data scanned from bound originals
US20020084978A1 (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
JP4111697B2 (en) Image brightness 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
JP4180260B2 (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
JP3979639B2 (en) Image distortion 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
JP4093970B2 (en) Image distortion correction apparatus, program, and storage medium
JP4194076B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, program, and storage medium
JP3865215B2 (en) Image distortion correction apparatus, program, storage medium, and image distortion correction method
JP4061256B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP4136860B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP4198613B2 (en) Image distortion correction apparatus, program, and storage medium
JP3986059B2 (en) Image correction apparatus, program, storage medium, and detection method of boundary point between straight line portion and curved portion of page outline
JP4789221B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP4480291B2 (en) Image distortion correction apparatus, storage medium, program, image distortion correction method, image reading apparatus, and image forming apparatus
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
JP3877142B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, program, and storage medium
JP4577845B2 (en) Image processing apparatus, image processing method, program, and storage medium storing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051118

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20051021

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20060905

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070514

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070704

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

Free format text: PAYMENT UNTIL: 20100713

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110713

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120713

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120713

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130713

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees