JP4577844B2 - Image processing apparatus, image processing method, program, and storage medium storing program - Google Patents

Image processing apparatus, image processing method, program, and storage medium storing program Download PDF

Info

Publication number
JP4577844B2
JP4577844B2 JP2005362377A JP2005362377A JP4577844B2 JP 4577844 B2 JP4577844 B2 JP 4577844B2 JP 2005362377 A JP2005362377 A JP 2005362377A JP 2005362377 A JP2005362377 A JP 2005362377A JP 4577844 B2 JP4577844 B2 JP 4577844B2
Authority
JP
Japan
Prior art keywords
image
value
brightness
lightness
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005362377A
Other languages
Japanese (ja)
Other versions
JP2007166429A (en
Inventor
啓嗣 小島
禎史 荒木
浩行 浮田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2005362377A priority Critical patent/JP4577844B2/en
Publication of JP2007166429A publication Critical patent/JP2007166429A/en
Application granted granted Critical
Publication of JP4577844B2 publication Critical patent/JP4577844B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、ブック原稿を読み取ったスキャン画像の地肌又は陰影を処理する画像処理装置、画像処理方法、プログラム及び記憶媒体に関する。   The present invention relates to an image processing apparatus, an image processing method, a program, and a storage medium for processing a background or shadow of a scanned image obtained by reading a book document.

フラットベッドスキャナを用いて読み取る原稿の多くはシート状の原稿であり、コンタクトガラス上に開閉自在の圧板を設け、コンタクトガラス上に原稿を載置した後に圧板を閉じて原稿をスキャンするようにしている。しかし、原稿としてはシート状のものに限られず、ブック原稿(本、冊子など)も原稿として扱われることがあり、そのような場合にもコンタクトガラス上にブック原稿を載置し、原稿をスキャンすることになる。   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.

しかしながら、原稿としてブック原稿を用いた場合、ブック原稿の綴じ部がコンタクトガラスから浮き上がってしまう。図50は、ブック原稿のスキャン画像の一例を示す。図50に示すように、綴じ部がコンタクトガラスから浮き上がってしまった場合、綴じ部が焦点面から離れてしまうため、浮き上がった部分のスキャン画像には、画像歪み、影、文字ぼけなどの画像劣化が発生する。劣化した画像の綴じ部は読みにくく、また、OCR(Optical Character Reader)により文字認識処理を行うときの認識率が著しく低下する。特に、厚手製本では綴じ部の劣化が激しく、また、ブック原稿の綴じ部が焦点面から離れないように加圧作業した場合には、ブック原稿自体を破損してしまうこともある。そこで、ページ外形や文字行情報及び罫線情報を用いて綴じ部のゆがみを補正する画像読み取り装置が提案されている。   However, when a book document is used as the document, the binding portion of the book document is lifted from the contact glass. FIG. 50 shows an example of a scanned image of a book document. As shown in FIG. 50, when the binding part is lifted from the contact glass, the binding part is separated from the focal plane, so that the scanned image of the lifted part has image degradation such as image distortion, shadow, and character blurring. Will occur. The binding portion of the deteriorated image is difficult to read, and the recognition rate when performing character recognition processing by OCR (Optical Character Reader) is significantly reduced. In particular, in the case of thick bookbinding, the binding part is severely deteriorated, and when the bookbinding part is pressed so as not to leave the focal plane, the book original itself may be damaged. In view of this, an image reading apparatus that corrects the distortion of the binding portion using the page outline, character line information, and ruled line information has been proposed.

また、綴じ部の明度を補正するため、スキャンされた画像を複数のブロックに分割し、各ブロックに含まれる画素の中で最も明度の高い画素の明度値を当該各ブロックの地肌値として設定し、ブロックごとの地肌値に基づいて地肌補正処理を施す地肌補正装置が提案されている(例えば、特許文献1参照。)。   In addition, in order to correct the brightness of the binding portion, the scanned image is divided into a plurality of blocks, and the brightness value of the pixel having the highest brightness among the pixels included in each block is set as the background value of each block. A background correction apparatus that performs background correction processing based on the background value of each block has been proposed (see, for example, Patent Document 1).

また、スキャンされた画像に対する地肌補正処理に係る複数の処理モードから選択された所望の処理モードに従ってスキャンされた画像における地肌値を指定し、この指定された地肌値に基づきスキャンされた画像に対する地肌補正処理を実行する地肌補正装置が提案されている(例えば、特許文献2参照。)。特許文献2記載の地肌補正装置では、地肌補正処理の基準とすべき地肌値を抽出する画像上の位置が画像読取手段の種類によって異なることから、ユーザは、使用する画像読取手段に最も適した処理モードを選択してスキャン画像に対する地肌補正処理を実行することができる。
特開2003−69824号公報 特開2003−198845号公報
In addition, a background value in the scanned image is specified according to a desired processing mode selected from a plurality of processing modes related to the background correction processing for the scanned image, and the background for the scanned image is specified based on the specified background value. Background correction apparatuses that perform correction processing have been proposed (see, for example, Patent Document 2). In the background correction apparatus described in Patent Document 2, since the position on the image from which the background value to be used as a reference for the background correction processing is extracted differs depending on the type of the image reading means, the user is most suitable for the image reading means to be used. The background correction process for the scanned image can be executed by selecting the processing mode.
JP 2003-69824 A JP 2003-198845 A

しかしながら、従来の地肌補正装置では、綴じ部の両端部分(綴じ部の天及び地付近)の陰影を十分に補正できず、綴じ部の両端部分に陰影が残る結果となる(陰影は、画像データとしては明度と同じものであるが区別するため陰影と称す)。これは、イメージスキャナの光源(蛍光灯)の長さが有限であるため、ブック原稿の両端部分に近いほど照明光の強度が弱くなるためと考えられる。また、左右の書籍表面上には,各々反対側からの反射光(相互反射光)も照明として含まれているため、その影響によっても綴じ部の陰影に影響を及ぼしていると考えられる。   However, the conventional background correction apparatus cannot sufficiently correct the shadows at both ends of the binding portion (the top and the vicinity of the binding portion), and shadows remain at both ends of the binding portion (the shadow is image data). Is the same as lightness, but it is called a shadow to distinguish it). This is presumably because the intensity of the illumination light becomes weaker as it is closer to both ends of the book document because the length of the light source (fluorescent lamp) of the image scanner is finite. Moreover, since the reflected light (mutual reflection light) from the opposite side is also included as illumination on the left and right book surfaces, it is considered that the influence of the binding also affects the shadow of the binding portion.

本発明は上記問題に鑑み、ブック原稿の綴じ部の両端付近において陰影の補正ができる画像処理装置、画像処理方法、プログラム及びプログラムが格納された記憶媒体を提供することを目的とする。   In view of the above problems, an object of the present invention is to provide an image processing apparatus, an image processing method, a program, and a storage medium in which the program is stored, in which shading can be corrected near both ends of a binding portion of a book document.

上記課題に鑑み、本発明は、画像読取手段が、コンタクトガラス上に載置されたブック原稿を読み取るステップと、第一の手段が、前記ブック原稿のスキャン画像の画素値から前記ブック原稿の平坦部を特定し、該平坦部の画素値を基準に、綴じ部両端を結ぶ方向の一次元画像と直交する方向の位置yに対する前記スキャン画像の明度を正規化して正規化明度プロフィールを生成するステップと、地肌補正手段が、前記正規化明度プロフィールを用いて前記スキャン画像の綴じ部付近の地肌を補正するステップと、第2の手段が、一次元画像と平行な方向の位置xに対する明度の分布に対し、明度が一次元画像の明度分布の略中央値となる位置をx0、略中央値と漸近的に一定となる明度との差をa、略中央値を通る位置xに対する明度の傾きをb、明度分布の略中央値をc、として、明度を
と定義した際、前記x0に所定値を与え、一次元画像のあるxにおける明度を前記式に代入することで前記bを推定し、一次元画像の明度分布を求めるステップと、陰影補正手段が、前記明度分布を用いて前記スキャン画像の綴じ部両端付近の陰影を補正するステップと、を有することを特徴とする画像処理方法にて解決する。
In view of the above problems, according to the present invention, the image reading unit reads the book document placed on the contact glass, and the first unit determines whether the book document is flat from the pixel value of the scanned image of the book document. Identifying a portion, and normalizing the lightness of the scanned image with respect to a position y in a direction orthogonal to a one-dimensional image in a direction connecting both ends of the binding portion with reference to the pixel value of the flat portion to generate a normalized lightness profile A background correction unit correcting the background near the binding portion of the scanned image using the normalized brightness profile; and a second unit is a lightness distribution with respect to a position x in a direction parallel to the one-dimensional image. On the other hand, the position where the brightness is approximately the median of the brightness distribution of the one-dimensional image is x0, the difference between the approximately median and the asymptotically constant brightness is a, and the gradient of the brightness with respect to the position x passing through the approximately median. The b, and substantially median brightness distribution c as, the lightness
And defining a brightness distribution of the one-dimensional image by assigning a predetermined value to x0 and substituting the lightness at a certain x of the one-dimensional image into the formula, And a step of correcting shadows in the vicinity of both ends of the binding portion of the scanned image using the lightness distribution .

本発明によれば、スキャン画像の綴じ部両端付近の陰影を補正することで、ブック原稿の綴じ部の両端部分に生じる陰影を補正できる。画素値とはRGB等であるが、例えば、RGBの値により算出される明度のように画素値をどのように処理して得られる値であってもよい。   According to the present invention, it is possible to correct the shadows generated at both ends of the binding portion of the book document by correcting the shadows near the both ends of the binding portion of the scanned image. The pixel value is RGB or the like. For example, the pixel value may be a value obtained by processing the pixel value like the brightness calculated from the RGB value.

本発明の一形態として、前記第2の手段は、一次元画像の画素値にフィルタ演算を施し、前記スキャン画像の両端の座標xl、xrを推定し、座標xlよりも外側又は座標xrよりも外側の位置を前記x0の所定とする、ことを特徴とする。   As one form of the present invention, the second means performs a filter operation on the pixel value of the one-dimensional image, estimates the coordinates xl and xr at both ends of the scan image, and is outside the coordinates xl or more than the coordinates xr. The outside position is set to the predetermined value of x0.

本発明の一形態において、前記陰影補正手段が、画素毎にRGB値から明度、彩度及び色相を求めるステップと、前記ブック原稿の画素毎に有彩色か無彩色かを判定するステップと、有彩色の場合には彩度と明度の両方に前記正規化明度プロフィールによる地肌補正を行い、無彩色の場合には明度にのみ前記正規化明度プロフィールによる地肌補正を行うステップと、画素毎に、明度、彩度及び色相からRGB値を求めるステップと、を有することを特徴とする。 In one aspect of the present invention, the shadow correction means determines the brightness, saturation, and hue from the RGB values for each pixel, determines whether each pixel of the book document is a chromatic color or an achromatic color, In the case of chromatic color, the background correction by the normalized lightness profile is performed for both the saturation and the lightness, and in the case of achromatic color, the background correction by the normalized lightness profile is performed only for the lightness. Obtaining RGB values from saturation and hue .

本発明の一形態において、前記陰影補正手段が、画素毎に明度を求めるステップと、画素値のR値,G値、B値のそれぞれに前記正規化明度プロフィールによる地肌補正を行うステップと、を有することを特徴とする。 In one aspect of the present invention, the shadow correction unit obtains the brightness for each pixel, and performs the background correction by the normalized brightness profile for each of the R value, the G value, and the B value of the pixel value. It is characterized by having.

本発明の一形態において、前記陰影補正手段が、画素値のR値,G値、B値のそれぞれの前記正規化明度プロフィールを求めるステップと、R値,G値、B値のそれぞれに、R値,G値、B値それぞれの前記正規化明度プロフィールによる地肌補正を行うステップと、を有することを特徴とする。 In one form of this invention, the said shading correction | amendment means calculates | requires each said R value, G value, and B value of said normalized brightness profile of R value, G value, and B value, Performing background correction based on the normalized brightness profile of each of the value, G value, and B value .

本発明の一形態において、前記陰影補正手段は、一次元画像と直交する方向の位置yに対応づけて、前記スキャン画像の明度分布を示す明度プロフィールを生成するステップと、前記スキャン画像の綴じ部にて前記明度プロフィールが下向きのピークを示す位置yを中心に所定の領域を特定するステップと、前記明度分布を用いて前記スキャン画像の前記領域のみ、綴じ部両端付近の陰影を補正するステップと、を有することを特徴とする。 In one form of this invention, the said shadow correction means produces | generates the brightness profile which shows the brightness distribution of the said scan image corresponding to the position y of the direction orthogonal to a one-dimensional image, and the binding part of the said scan image And a step of specifying a predetermined region centered on a position y where the lightness profile shows a downward peak, and a step of correcting shadows near both ends of the binding portion of only the region of the scanned image using the lightness distribution. It is characterized by having.

本発明の一形態において、前記陰影補正手段が、前記領域の前記スキャン画像を一次元画像と平行な複数の領域に分割するステップと、前記第2の手段が、分割された前記領域の境界の一次元画像についてのみ一次元画像の前記明度分布を求めるステップと、一次元画像と直交する方向に前記明度分布を補完して、前記明度分布を用いて前記スキャン画像の綴じ部両端付近の陰影を補正するステップと、を有することを特徴とする。 In one aspect of the present invention, the shading correction unit divides the scan image of the region into a plurality of regions parallel to a one-dimensional image, and the second unit includes a boundary between the divided regions. Obtaining the lightness distribution of the one-dimensional image only for the one-dimensional image, complementing the lightness distribution in a direction orthogonal to the one-dimensional image, and using the lightness distribution, shadows near both ends of the binding portion of the scanned image are obtained. And a step of correcting .

本発明の一形態において、前記陰影補正手段が、前記スキャン画像を、一次元画像と直交する方向の複数の領域に分割するステップと、分割された領域毎に、前記明度分布を用いて前記スキャン画像の綴じ部両端付近の陰影を補正するステップと、を有することを特徴とする In one aspect of the present invention, the shadow correction unit divides the scan image into a plurality of regions in a direction orthogonal to the one-dimensional image, and uses the brightness distribution for each of the divided regions. Correcting shadows near both ends of the binding portion of the image .

本発明の一形態において、前記スキャン画像の外縁が内側に入り込んでいる形状に基づき、一次元画像と直交する方向の前記スキャン画像の中央部を特定して、中央部から2つの領域に分割するステップと、前記地肌補正手段が、分割された領域毎に地肌補正を行うステップと、前記陰影補正手段が、分割された領域毎に前記スキャン画像の綴じ部両端付近の陰影を補正するステップと、を有することを特徴とする。 In one embodiment of the present invention, a center portion of the scan image in a direction orthogonal to the one-dimensional image is specified based on a shape in which an outer edge of the scan image enters inside, and is divided into two regions from the center portion. A step of correcting the background for each of the divided areas; and a step of correcting the shadow near both ends of the binding portion of the scan image for each of the divided areas; It is characterized by having.

ブック原稿の綴じ部の両端付近において陰影の補正ができる画像処理装置、画像処理方法、プログラム及びプログラムが格納された記憶媒体を提供できる。   It is possible to provide an image processing apparatus, an image processing method, a program, and a storage medium storing the program that can correct shadows near both ends of the binding portion of the book document.

以下、本発明を実施するための最良の形態について、図面を参照しながら実施例を上げて説明する。本実施の形態の画像処理装置は画像形成装置であるデジタル複写機に適用されており、画像を読取ためデジタル複写機のスキャナ部を備える。すなわち、画像処理装置は、画像形成装置、スキャナ装置、ファクシミリ装置、これらの複合機MFP(Multi Function Printer)に適用できる。   The best mode for carrying out the present invention will be described below with reference to the drawings. The image processing apparatus according to the present embodiment is applied to a digital copying machine that is an image forming apparatus, and includes a scanner unit of the digital copying machine for reading an image. In other words, the image processing apparatus can be applied to an image forming apparatus, a scanner apparatus, a facsimile apparatus, and a multifunction peripheral MFP (Multi Function Printer).

また、デジタル複写機のスキャナ部のように一次元の撮像素子によるスキャン画像(単に画像データという場合がある)だけでなく、デジタルカメラのように2次元の撮像素子による画像データも本実施の形態の画像処理装置は同様に処理できる。スキャナ装置やデジタルカメラで撮影した画像データの場合、パーソナルコンピュータ(以下、単にPCという)に本実施の形態の画像処理を行うプログラムを実行させ、地肌補正や陰影の補正、歪み補正が行われる。   Further, not only a scan image by a one-dimensional image sensor (sometimes referred to as image data in some cases) as in a scanner unit of a digital copying machine, but also image data by a two-dimensional image sensor as in a digital camera. This image processing apparatus can perform the same processing. In the case of image data photographed with a scanner device or a digital camera, a personal computer (hereinafter simply referred to as a PC) executes a program for performing image processing according to the present embodiment, and background correction, shadow correction, and distortion correction are performed.

図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上に形成されている。   FIG. 1 is a longitudinal front view showing a configuration of a scanner unit 1 of a digital copying machine. As shown in FIG. 1, the scanner unit 1 includes a first traveling body 5 including a contact glass 2 on which an original is placed, an exposure lamp (hereinafter referred to as a linear light source) 3 for exposing the original, and a first reflecting mirror 4. A second traveling body 8 comprising a second reflecting mirror 6 and a third reflecting mirror 7, a CCD (Charge Coupled Device) 9 as an image pickup device for reading an image of a document, and a lens unit for forming an image on the CCD 9. 10, a document scale 11 that serves as a reference for placing the document and prevents the contact glass 2 from being displaced or detached, a white reference plate 12 for shading correction installed under the document scale 11, and a frame 14. And. The CCD 9 is formed on the sensor board 13.

原稿の走査時には、第一走行体5および第二走行体8はモータによって副走査方向に移動する。すなわち、第一走行体5および第二走行体8がコンタクトガラス2の下を走行して、線光源3で原稿を露光走査し、その反射光を第一反射ミラー4、第二反射ミラー6および第三反射ミラー7で反射して、レンズユニット10を通してCCD9に結像させる。これにより画像読取手段が実現されている。   When scanning the document, the first traveling body 5 and the second traveling body 8 are moved in the sub-scanning direction by the motor. That is, the first traveling body 5 and the second traveling body 8 travel under the contact glass 2, the original is exposed and scanned by the linear light source 3, 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. Thereby, an image reading means is realized.

スキャナ部1は、このスキャナ部1で読み取られた原稿のスキャン画像に基づく画像データに応じ、例えば電子写真方式で用紙上に画像の形成を行う画像印刷装置であるプリンタ部(不図示)を備えるデジタル複写機16に搭載されている。   The scanner unit 1 includes 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 a scanned image of a document read by the scanner unit 1. It is mounted on the digital copying machine 16.

図2(a)は、スキャナ部1を搭載したデジタル複写機16の上部部分を示す斜視図である。図2(a)に示すように、スキャナ部1には、コンタクトガラス2に対して開閉自在な圧板17と、この圧板17の開閉を検出する開閉センサ18とが設けられている。なお、デジタル複写機16に備えられるプリンタとしては、電子写真方式のほか、インクジェット方式、昇華型熱転写方式、銀塩写真方式、溶融型熱転写方式など、種々の印刷方式を適用することができる。   FIG. 2A 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. 2A, 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. In addition to the electrophotographic system, various printing systems such as an ink jet system, a sublimation type thermal transfer system, a silver salt photographic system, and a melt type thermal transfer system can be applied as a printer provided in the digital copying machine 16.

図2(b)は、デジタルカメラ又はスキャナ装置で撮影した画像データをPCで画像処理する場合のシステム図を示す。ネットワーク100を介してPC101とスキャナ装置102及びPC101とデジタルカメラ103とが接続されている。スキャナ装置102又はデジタルカメラ101で撮影された画像データは、PC101に送信され後述するプログラムにより地肌補正や陰影の補正、歪み補正が行われる。   FIG. 2B is a system diagram in the case where image data captured by a digital camera or a scanner device is subjected to image processing by a PC. A PC 101 and a scanner device 102 and a PC 101 and a digital camera 103 are connected via a network 100. Image data captured by the scanner device 102 or the digital camera 101 is transmitted to the PC 101, and background correction, shadow correction, and distortion correction are performed by a program described later.

図3は、スキャナ部1の制御系の電気的な接続を示すブロック図である。図3に示すように、この制御系は、スキャナ部1の全体を制御するメイン制御部19に、CCD9で読み取った画像データに各種の画像処理を施す回路である画像処理部20と、第一走行体5および第二走行体8を制御する回路である走行体制御部21と、デジタル複写機16への各種操作を受け付け、また、各種メッセージを表示する操作パネル22と、CCD9で読み取った画像データや所定のデータ等を記憶するメモリ23とが接続されている。なお、操作パネル22には、コピー開始を宣言するためのコピースタートキー等が設けられている。   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.

また、走行体制御部21には、線光源3と、第一走行体5および第二走行体8を駆動するステッピングモータ24と、第一走行体5および第二走行体8がホームポジションにあるか否かを検出するスキャナホームポジションセンサ(HPセンサ)25と、開閉センサ18とが接続されている。   Further, in the traveling body control unit 21, the line light source 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.

図4は、画像処理部20の基本的な内部構成を示すブロック図である。図4に示すように、画像処理部20は、原稿をCCD9により読み取ったアナログ画像信号の増幅処理やデジタル変換処理等を行うアナログビデオ処理部26、シェーディング補正処理を行うシェーディング補正処理部27、シェーディング補正処理後のデジタル画像信号に、MTF(Modulation Transfer Function)補正、変倍処理、γ補正等の各種画像データ処理を行いスキャン画像を生成する画像データ処理部28、から構成されている。   FIG. 4 is a block diagram illustrating 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 processing is configured by an image data processing unit 28 that performs various image data processing such as MTF (Modulation Transfer Function) correction, scaling processing, and γ correction to generate a scan image.

また、画像データ処理部28は、地肌補正手段と陰影補正手段を有し、後述する画像処理方法を実現する。地肌補正手段と陰影補正手段については実施の形態を通して詳述するが、地肌補正手段は、ブック原稿のスキャン画像の画素値からブック原稿の平坦部を求め、平坦部の画素値に基づきスキャン画像に地肌補正処理を施す。陰影補正手段は、平坦部の画素値に基づきスキャン画像の綴じ部両端付近の陰影を補正する。   The image data processing unit 28 includes a background correction unit and a shadow correction unit, and realizes an image processing method described later. The background correction unit and the shadow correction unit will be described in detail through the embodiment. The background correction unit obtains a flat portion of the book original from the pixel value of the scan image of the book original, and converts the background image into a scanned image based on the pixel value of the flat portion. Apply background correction processing. The shadow correction unit corrects shadows near both ends of the binding portion of the scan image based on the pixel value of the flat portion.

以上のような画像処理後のデジタル画像信号は、メイン制御部19を介して、印刷する場合にはプリンタ部に、ファクシミリ送信する場合にはファクシミリ部に、OCR処理を行う場合は所定の記憶装置に送信されて、それぞれの処理に供される。   The digital image signal after the image processing as described above is sent via the main control unit 19 to the printer unit when printing, to the facsimile unit when transmitting by facsimile, or to a predetermined storage device when performing OCR processing. To be used for each process.

メイン制御部19は、図5(a)に示すように、各部を集中的に制御する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、LAN(Local Area Network)に接続するためのNIC(Network Interface Card)とが接続されている。   As shown in FIG. 5A, the main control unit 19 includes a CPU (Central Processing Unit) 31 that centrally controls each unit. The CPU 31 is a read-only memory that stores a BIOS and the like. A ROM (Read 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, the bus 34 has an interface (I / F) for communication with an HDD 35 storing programs for image processing and control, a CD-ROM drive 36 for reading a CD (Compact Disc) -ROM 37, and a printer unit. ) 38, a NIC (Network Interface Card) for connecting to a LAN (Local Area Network) is connected.

図5(b)は、PC101のハードウェア構成図を示す。なお、図5(b)において図5(a)と機能的に同一の構成部分には同一の符号を付しその説明は省略する。入出力装置30はキーボードやマウスの操作、ディスクプレーなど表示装置とのインターフェイスである。   FIG. 5B shows a hardware configuration diagram of the PC 101. In FIG. 5B, the same functional components as those in FIG. 5A are denoted by the same reference numerals, and the description thereof is omitted. The input / output device 30 is an interface with a display device such as a keyboard or mouse operation or a disk play.

図5(a)又は(b)に示すCD−ROM37は、特許請求の範囲における記憶媒体に相当するものであり、特許請求の範囲におけるプログラムが記憶されている。すなわち、CD−ROM37には、PC101又はメイン制御部19に、地肌補正ステップと陰影補正ステップを実行させるためのプログラムが記憶されている。   The CD-ROM 37 shown in FIG. 5A or 5B corresponds to a storage medium in the scope of claims, and stores a program in the scope of claims. That is, the CD-ROM 37 stores a program for causing the PC 101 or the main control unit 19 to execute the background correction step and the shadow correction step.

CPU31は、CD−ROM37に記憶されている制御プログラムをCD−ROMドライブ36で読み取り、HDD35にインストールする。後述する各種の画像処理を行うプログラムをCPU31が実行することで、メイン制御部19が画像処理部20を制御すると共に、画像処理部20が後述するような各種の処理を行う。   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. When the CPU 31 executes programs for performing various image processing described later, the main control unit 19 controls the image processing unit 20 and the image processing unit 20 performs various processes as described later.

なお、記憶媒体としては、CD−ROM37のみならず、DVDなどの各種の光ディスク、各種光磁気ディスク、フロッピー(登録商標)ディスクなどの各種磁気ディスク、半導体メモリ等、各種方式のメディアを用いることができる。また、インターネットなどのネットワークからプログラムをダウンロードし、HDD35にインストールするようにしてもよい。この場合に、送信側のサーバでプログラムを記憶している記憶装置も、この発明の記憶媒体である。なお、プログラムは、所定のOS(Operating System)上で動作するものであってもよいし、その場合に後述の各種処理の一部の実行をOSに肩代わりさせるものであってもよいし、ワープロソフトなど所定のアプリケーションソフトやOSなどを構成する一群のプログラムファイルの一部として含まれているものであってもよい。   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 floppy disk (registered trademark), semiconductor memory, and the like are used. it can. 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.

続いて、本実施の形態における陰影補正について説明する。図6に示すようにブック原稿40がそのページ綴じ部(以下、単に綴じ部という)41とスキャナ部1の画像読み取りの主走査方向とが平行になるように位置させてコンタクトガラス2に載置されている。すなわち、ブック原稿40は一部が平坦部としてコンタクトガラス2に接するが綴じ部40がコンタクトガラス2から離れている(図6では距離d)。   Subsequently, the shadow correction in the present embodiment will be described. As shown in FIG. 6, the book document 40 is placed on the contact glass 2 so that its page binding portion (hereinafter simply referred to as binding portion) 41 and the main scanning direction of image reading of the scanner unit 1 are parallel to each other. Has been. That is, part of the book document 40 is in contact with the contact glass 2 as a flat portion, but the binding portion 40 is separated from the contact glass 2 (distance d in FIG. 6).

図6の状態でブック原稿40をスキャンすると、図7に示すように、綴じ部41の付近において歪みが生じる。また、綴じ部の両端部分41A、Bの明度が中央付近に比べ十分でなく低い画像となる。本実施の形態の画像処理装置は、綴じ部の両端部分41A、Bの地肌を精度よく補正するものである。   When the book document 40 is scanned in the state shown in FIG. 6, distortion occurs in the vicinity of the binding portion 41 as shown in FIG. In addition, the brightness of the both end portions 41A and 41B of the binding portion is not sufficient compared to the vicinity of the center, resulting in a low image. The image processing apparatus according to the present embodiment corrects the background of both end portions 41A and B of the binding portion with high accuracy.

スキャナ部1の線光源3は長さが有限であるので、1次元の光源が有限に配置された光学モデルについて検討する。図8は、ブック原稿をスキャンする場合の光源とブック原稿の構成図を示す。図8では、X方向が主走査方向、Y方向が副走査方向、Z方向がブック原稿40の厚み方向を示す。図8では、見開きのブック原稿40うち片面だけを示している。   Since the linear light source 3 of the scanner unit 1 has a finite length, an optical model in which a one-dimensional light source is finitely arranged will be considered. FIG. 8 shows a configuration diagram of a light source and a book document when the book document is scanned. In FIG. 8, the X direction indicates the main scanning direction, the Y direction indicates the sub-scanning direction, and the Z direction indicates the thickness direction of the book document 40. In FIG. 8, only one side of the spread book document 40 is shown.

図8において、点p(xp,yp,zp)はブック原稿40の紙面における所定点の3次元座標を、(nx,ny,nz) は、その点における法線ベクトル、(dy,dz)は、Y−Z 平面における線光源3の位置を示す。線光源3はX軸と平行に配置された有限の光源であり図1の露光ランプである。x1、x2は線光源3のX軸方向の位置を示す。   In FIG. 8, a point p (xp, yp, zp) is a three-dimensional coordinate of a predetermined point on the paper surface of the book document 40, (nx, ny, nz) is a normal vector at that point, and (dy, dz) is The position of the line light source 3 in the YZ plane is shown. The line light source 3 is a finite light source arranged in parallel with the X axis and is the exposure lamp of FIG. x1 and x2 indicate the position of the line light source 3 in the X-axis direction.

図8のように長さが有限な線光源3の照明光強度は、点光源が一列に並んでいるものとしてモデル化することができる。点光源の照明光強度は、光源からの距離の2乗に反比例して減衰する。したがって、点光源の位置をxとして点光源からの照明光強度をx1からx2まで積分すれば、所定点pにおける照明光強度を得られる。ブック原稿40の紙面表面上の所定点p における線光源3からの反射光強度P(xp,yp,zp) は、式(1)のように構成できる。   The illumination light intensity of the linear light source 3 having a finite length as shown in FIG. 8 can be modeled as if the point light sources are arranged in a line. The illumination light intensity of the point light source attenuates in inverse proportion to the square of the distance from the light source. Therefore, if the position of the point light source is x and the illumination light intensity from the point light source is integrated from x1 to x2, the illumination light intensity at the predetermined point p can be obtained. The reflected light intensity P (xp, yp, zp) from the line light source 3 at a predetermined point p 1 on the surface of the book original 40 can be configured as shown in Equation (1).

ここで、a、Δは、CCD内部での光電変換パラメータ、ρは点pにおける反射率、αは点光源の強度パラメータである。 Here, a and Δ are the photoelectric conversion parameters inside the CCD, ρ is the reflectance at the point p, and α is the intensity parameter of the point light source.

ブック原稿40の断面形状はX軸方向に一定(スキュー歪み無し)としていることから、法線ベクトルの x 成分(nx) を 0 とできる。この条件で式(1)の積分を解くと式(2)が得られる。   Since the cross-sectional shape of the book document 40 is constant in the X-axis direction (no skew distortion), the x component (nx) of the normal vector can be set to 0. When the integral of the expression (1) is solved under this condition, the expression (2) is obtained.

ただし、実際のブック原稿40の紙面表面上では相互反射が生じており、この相互反射も、多数の長さ有限の線光源となることを考えると、相互反射光強度も同じようにモデル化できる。したがって、実際のP(xp,yp,zp)は、係数(パラメータ)が異なる同様の式の和、という形式になる。 However, mutual reflection occurs on the surface of the actual book original 40, and the mutual reflection intensity can be similarly modeled in view of the fact that this mutual reflection becomes a number of linear light sources having a finite length. . Therefore, actual P (xp, yp, zp) takes the form of the sum of similar expressions with different coefficients (parameters).

以上から、ブック原稿40の紙面上の主走査方向に沿った、ある1次元画像における明度分布の光学モデルPx(xp)は概して、式(3)のように表せる。   From the above, the optical model Px (xp) of the lightness distribution in a certain one-dimensional image along the main scanning direction on the paper surface of the book document 40 can be generally expressed as Expression (3).

続いて、式(3)をスキャナ部1の光学モデルに応じて近似する。式(3)において、(x1 < x2) とすると、x=x1 付近では、(x−x2)^2 → ∞となり、式(3)の括弧中の第2項は、ほぼ 1 となる。同様に、x=x2 付近では、第1項は、ほぼ 1 と考えてよい。つまり、一次元画像中の明度分布を、X軸方向のx1側とx2側の2つに分けて考えれば、片側の明度分布は、式(4)のように表されることになる。 Subsequently, Equation (3) is approximated according to the optical model of the scanner unit 1. In equation (3), if (x1 <x2), near x = x1, (x−x2) ^ 2 → ∞, and the second term in parentheses in equation (3) is approximately 1. Similarly, in the vicinity of x = x2, the first term may be considered to be approximately 1. That is, if the lightness distribution in the one-dimensional image is divided into two on the x1 side and the x2 side in the X-axis direction, the lightness distribution on one side is expressed as in Expression (4).

図9に示すように、式(4)による照明光強度は基本的にアークタンジェント(tanθの逆関数)に似た分布を示す。この分布の一部が、1次元画像中の(片側)の明度変化を表している。 As shown in FIG. 9, the illumination light intensity according to the equation (4) basically shows a distribution similar to arc tangent (inverse function of tan θ). A part of this distribution represents a change in lightness (one side) in the one-dimensional image.

arctanはθに対し上下に漸近線を有するグラフ形状となるが、図9では上下の漸近線に平行な中心線を設け、パラメータaは式(4)で新たに定義した(式(1)(2)のaと異なる)。式(4)における各係数の内容は、以下のようになる。
a: 中心線から漸近線までの距離
b: 曲線の傾き(b ≧ 0 の場合)を規定する。
Arctan has a graph shape having asymptotic lines up and down with respect to θ. In FIG. 9, a center line parallel to the upper and lower asymptotic lines is provided, and parameter a is newly defined by Expression (4) (Expression (1) ( 2) different from a). The contents of each coefficient in Equation (4) are as follows.
a: Distance from the center line to the asymptotic line b: Defines the slope of the curve (when b ≧ 0).

図9ではbの値に変動する傾きを点線で示している。
(b < 0 の時は、x=x0 を漸近線とした、±∞に発散した概形になる)
c: y(明度) = 0 から中心線までの距離
x0: 中心線と交わる点の x 座標
a>0 かつ x0 が小さい場合は、1次元画像中の図9の左側の明度分布に対応し、a < 0 かつ x0 が大きい場合は図9の右側の明度分布に対応する。
In FIG. 9, the slope that fluctuates to the value b is indicated by a dotted line.
(When b <0, x = x0 is an asymptote, and the outline diverges to ± ∞.)
c: distance from y (brightness) = 0 to the center line x0: x coordinate of a point intersecting the center line a> 0 and x0 is small, corresponding to the brightness distribution on the left side of FIG. 9 in the one-dimensional image, When a <0 and x0 is large, it corresponds to the lightness distribution on the right side of FIG.

実際のスキャン画像にスキュー歪みが生じたり、「ハの字」配置になっている場合は、1次元明度分布は左右で非対称になっているため、図9のように分割して扱う方が有効である。   When skew distortion occurs in the actual scanned image or the “C” shape is placed, the one-dimensional brightness distribution is asymmetrical on the left and right, so it is more effective to handle it as divided as shown in FIG. It is.

実際には、明度がマイナスになることはないので、1次元画像中の明度分布を0〜1 の値に正規化しておくことができる。この場合、式(4)の係数において、a = 1.0(または -1.0), c = 0.0 とすることができる。なお、明度の正規化については後述する明度プロフィールにおいて説明する。   Actually, since the brightness does not become negative, the brightness distribution in the one-dimensional image can be normalized to a value of 0 to 1. In this case, a = 1.0 (or -1.0), c = 0.0 can be set in the coefficient of the equation (4). Note that brightness normalization will be described in the brightness profile described later.

したがって、式(4)の残る係数 b と x0 を推定することができれば、ブック原稿40の端部を含む1次元画像中の正規化明度分布を求めることができ、これによって、端部の陰影補正が可能になる。   Therefore, if the remaining coefficients b and x0 in the equation (4) can be estimated, the normalized brightness distribution in the one-dimensional image including the end portion of the book document 40 can be obtained, thereby correcting the shadow of the end portion. Is possible.

ブック原稿40のスキャン画像は図7に示したように、形状のゆがみと明度分布を生じさせるものであるため、ゆがみ補正を行うことが好適である。したがって、図10に示すように、ブック原稿40の画像処理は式(4)による陰影補正を含む地肌補正処理(S1)、ゆがみ形状補正処理(S2)の処理手順により構成される。なお、本実施の形態では地肌補正と陰影補正とを同時に行う場合もあるが、以下では、特に式(4)を利用した処理を陰影補正という。また、ゆがみ形状補正処理については実施例の後に説明する。   As shown in FIG. 7, the scan image of the book document 40 generates a distortion of the shape and a lightness distribution. Therefore, it is preferable to perform distortion correction. Therefore, as shown in FIG. 10, the image processing of the book document 40 is constituted by processing procedures of background correction processing (S1) including shadow correction by equation (4) and distortion shape correction processing (S2). In the present embodiment, the background correction and the shadow correction may be performed at the same time. However, in the following, the process using Equation (4) is particularly referred to as the shadow correction. Further, the distortion shape correction processing will be described after the embodiment.

係数 b と x0 を推定するには、まず地肌補正処理を行うための明度プロフィールを求めておく。   In order to estimate the coefficients b and x0, first, a brightness profile for performing background correction processing is obtained.

まず、地肌補正処理について説明する。スキャン部1のコンタクトガラス2から離れる(綴じ部付近に近づく)にしたがって、明度および彩度は低下し、一方、色相はほとんど変化しない。そこで、スキャン画像の綴じ部の色補正は、低下した明度・彩度をスキャン画像の平坦部分と同程度になるように強調することで可能になる。   First, the background correction process will be described. As it moves away from the contact glass 2 of the scanning unit 1 (closer to the vicinity of the binding unit), the lightness and saturation decrease, while the hue hardly changes. Therefore, the color correction of the binding portion of the scanned image can be performed by enhancing the lowered brightness and saturation so as to be approximately the same as the flat portion of the scanned image.

入力画像中の各画素の色について、どの程度、明度・彩度を強調すればよいかについては、平坦部分における地肌色を検出し、その明度・彩度と一致するように補正する方法が考えられる。しかし、一般に地肌色は白あるいはクリーム色等の彩度の低い色である場合が多いため、この方法では曲面部分の彩度を十分に強調することができない。   As for how much lightness and saturation should be enhanced for each pixel color in the input image, a method of detecting the background color in a flat part and correcting it to match the lightness and saturation is considered. It is done. However, since the background color is generally a low-saturation color such as white or cream, this method cannot sufficiently enhance the saturation of the curved surface portion.

そこで、本実施の形態では「正規化明度プロフィール」という考えを導入し、それを用いた地肌補正方法を提案する。本実施の形態では正規化明度プロフィールを用いた以下の3つの地肌補正処理を提供する。   Therefore, in the present embodiment, the concept of “normalized brightness profile” is introduced, and a background correction method using the concept is proposed. In the present embodiment, the following three background correction processes using the normalized brightness profile are provided.

〔地肌補正処理1〕
地肌補正処理1では図11のフローチャート図に示すように、以下の1〜7の処理を順次実行する。
1.スキャン画像の明度(Value)、彩度(Saturation)、色相(Hue)を求める。
入力画像の赤、緑、青成分を用いて、各画素における明度(Value)、彩度(Saturation)、色相(Hue)の値を求める。
各画素の座標(x,y)における赤、緑、青成分をそれぞれ、R(x,y),G(x,y),B(x,y)、明度、彩度、色相の値をそれそれV(x,y),S(x,y),H(x,y)とする。V、S、Hは、R・G・Bを用いて次にように表すことができる。
V(x,y) = 0.3*R(x,y) + 0.59*G(x,y) + 0.11*B(x,y)
C1(x,y)= R(x,y) - V(x,y)
C2(x,y) = B(x,y)‐ V(x,y)
H(x,y)= Tan^(-1)(C1(x,y)/C2(x,y))
S(x,y) = √(C1(x,y)^2 +C2(x,y)^2)
2. 有彩色、無彩色の判定
S(x,y) と適当なしきい値St(例えば、閾値St = 15)を用いて、各画素を有彩色または無彩色に分類する。
S(x,y) ≦ St ならば、無彩色
S(x,y) > St ならば、有彩色
3. 明度プロフィールの作成
V(x,y)を用いて、綴じ部に垂直な方向に沿った明度プロフィールV(y)を作成する。具体的には、
・各yにおけるV(x,y)の1次元画像V(x)についてヒストグラムを求め、明るい方からVt個(以上)の画素が存在する明度の範囲(v1,v2とする)を求める。Vtの値は、例えば、Vt = (画像の幅の画素数)×0.1である。
[Background correction processing 1]
In the background correction process 1, the following processes 1 to 7 are sequentially executed as shown in the flowchart of FIG.
1. Obtain the brightness (Value), saturation (Saturation), and hue (Hue) of the scanned image.
Using the red, green, and blue components of the input image, values of lightness (Value), saturation (Saturation), and hue (Hue) at each pixel are obtained.
The red, green, and blue components at the coordinates (x, y) of each pixel are the R (x, y), G (x, y), B (x, y), brightness, saturation, and hue values, respectively. Let it be V (x, y), S (x, y), H (x, y). V, S, and H can be expressed as follows using R, G, and B.
V (x, y) = 0.3 * R (x, y) + 0.59 * G (x, y) + 0.11 * B (x, y)
C1 (x, y) = R (x, y) -V (x, y)
C2 (x, y) = B (x, y) -V (x, y)
H (x, y) = Tan ^ (-1) (C1 (x, y) / C2 (x, y))
S (x, y) = √ (C1 (x, y) ^ 2 + C2 (x, y) ^ 2)
2. Each pixel is classified into a chromatic color or an achromatic color by using a chromatic / achromatic color determination S (x, y) and an appropriate threshold value St (for example, threshold value St = 15).
If S (x, y) ≤ St, achromatic color S (x, y)> St, if chromatic, 3. Create lightness profile V (x, y) along the direction perpendicular to the binding A brightness profile V (y) is created. In particular,
A histogram is obtained for the one-dimensional image V (x) of V (x, y) at each y, and a brightness range (V1, v2) in which Vt (or more) pixels exist from the brighter side is obtained. The value of Vt is, for example, Vt = (number of pixels in the width of the image) × 0.1.

図12は一次元画像明度V(x)のヒストグラムの一例を示す。図12ではX軸が明度、Y軸が画素数である。そして、
・v1からv2の範囲について明度の平均値を求め、それをv(y)とする。これをライン毎に(y毎に)求める。
FIG. 12 shows an example of a histogram of the one-dimensional image brightness V (x). In FIG. 12, the X axis is lightness and the Y axis is the number of pixels. And
-Find the average value of brightness for the range from v1 to v2, and let it be v (y). This is calculated for each line (for each y).

4. 明度プロフィールの平滑化
明度プロフィールv(y)を、雑音除去のため平滑化する。
各yについて、yを中心にしたv(y−n)からv(y+n)の平均値をv(y)の値にする。これを数回繰り返す。例えば、3〜10回繰り返す。
4. Smoothing the brightness profile Smooth the brightness profile v (y) to remove noise.
For each y, the average value of v (y + n) from v (y−n) centered on y is set to the value of v (y). Repeat this several times. For example, repeat 3 to 10 times.

5. 明度プロフィールからブック原稿40のスキャン画像の平坦部分の明度を求める
具体的には、明度プロフィールv(y)から平坦部分の明度を算出する。
図13は明度プロフィールv(y)の画素と明度の関係の一例を示す。図13に示すように明度が小さい部分がスキャン画像の綴じ部である。
まず、
・v(y)の値(明度)についてのヒストグラムを作成する。
図14はv(y)のヒストグラムの一例を示す。図14ではX軸が明度、Y軸が画素数である。そして、
・最も頻度が高い明度が平坦部分の明度に対応すると考えられることから(図13では左右の平坦部)、その明度を中心に、±Vmの範囲について明度の平均値を求め、それを平坦部の明度Vflatとする。例えば、VmはVm =2である。
5. Specifically, the lightness of the flat part of the scanned image of the book document 40 is obtained from the lightness profile. Specifically, the lightness of the flat part is calculated from the lightness profile v (y).
FIG. 13 shows an example of the relationship between the pixels of the lightness profile v (y) and the lightness. As shown in FIG. 13, the portion with low brightness is the binding portion of the scanned image.
First,
Create a histogram for the value (brightness) of v (y).
FIG. 14 shows an example of a histogram of v (y). In FIG. 14, the X axis is lightness and the Y axis is the number of pixels. And
Since it is considered that the lightness with the highest frequency corresponds to the lightness of the flat portion (the left and right flat portions in FIG. 13), the average value of the lightness is obtained for the range of ± Vm around the lightness, and is obtained as the flat portion. The brightness is Vflat. For example, Vm is Vm = 2.

6. 正規化明度プロフィールを求める
正規化明度プロフィールvn(y)を以下の式で算出する。
平坦部分の値を1.0となるようにそのほかの明度を1以下の値で表し(比で表し)明度プロフィール全体に乗じ、0〜1の範囲に正規化する。
vn(y) = v(y) / Vflat
7. 地肌補正
各画素(x,y)について、
・その画素が有彩色の場合は、
S'(x,y) =S(x,y)/ vn(y)
V'(x,y) = V(x,y)/ vn(y)
として彩度と明度を補正し、H(x,y)、S'(x,y),V’(x,y)から、R,G,Bの値を求める。
・その画素が無彩色の場合は、
V’(x,y) = V(x,y)/vn(y)
として明度のみ補正し、H(x,y),S(x,y),V’(x,y)から,R,G,Bの値を求める。
6. Calculate the normalized brightness profile vn (y) for obtaining the normalized brightness profile by the following formula.
The other lightness is expressed by a value of 1 or less (expressed as a ratio) so that the value of the flat portion becomes 1.0, and is multiplied by the entire lightness profile and normalized to a range of 0 to 1.
vn (y) = v (y) / Vflat
7. Background correction For each pixel (x, y)
・ If the pixel is chromatic,
S ′ (x, y) = S (x, y) / vn (y)
V ′ (x, y) = V (x, y) / vn (y)
Then, saturation and lightness are corrected, and values of R, G, and B are obtained from H (x, y), S ′ (x, y), and V ′ (x, y).
・ If the pixel is achromatic,
V ′ (x, y) = V (x, y) / vn (y)
As described above, only the brightness is corrected, and the values of R, G, and B are obtained from H (x, y), S (x, y), and V ′ (x, y).

〔地肌補正処理2〕
地肌補正処理2では図15のフローチャート図に示すように、以下の1〜6の処理を順次実行する。地肌補正処理2では地肌補正処理1とは異なり、有彩色/無彩色に分別せずに、R,G,B値を直接補正する。
[Background correction processing 2]
In the background correction process 2, as shown in the flowchart of FIG. 15, the following processes 1 to 6 are sequentially executed. Unlike the background correction process 1, the background correction process 2 directly corrects the R, G, and B values without separating them into chromatic colors / achromatic colors.

1. 明度(Value)を求める
入力画像の赤、緑、青成分を用いて、各画素における明度(Value)の値を求める。座標(x,y)における赤、緑、青成分をR(x,y),G(x,y),B(x,y)、明度の値をV(x,y)とする。
明度の値Vは、例えば、
V(x,y) = 0.3*R(x,y) + 0.59*G(x,y) + 0.11*B(x,y)
となる。なお、グレースケール画像の場合は、画素値そのものをV(x,y)として扱い処理を行う。
1. Obtaining the lightness (Value) Using the red, green and blue components of the input image, the lightness (Value) value at each pixel is obtained. The red, green, and blue components at the coordinates (x, y) are R (x, y), G (x, y), B (x, y), and the brightness value is V (x, y).
The brightness value V is, for example,
V (x, y) = 0.3 * R (x, y) + 0.59 * G (x, y) + 0.11 * B (x, y)
It becomes. In the case of a gray scale image, the pixel value itself is treated as V (x, y) for processing.

2. 明度プロフィールの作成
V(x,y)を用いて、綴じ部に垂直な方向(y方向)に沿った明度プロフィールv(y)を作成する。具体的には、
・各yにおけるV(x,y)の1次元画像V(x)についてヒストグラムを求め、明るい方からVt個(以上)の画素が存在する明度の範囲(v1,v2とする)を求める(図12参照)。例えばVtは、Vt = (画像の幅の画素数)×0.1 である。
・v1からv2の範囲について明度の平均値を求め、それをv(y)とする。
2. Creation of brightness profile V (x, y) is used to create a brightness profile v (y) along the direction (y direction) perpendicular to the binding portion. In particular,
A histogram is obtained for a one-dimensional image V (x) of V (x, y) at each y, and a brightness range (V1, v2) in which Vt (or more) pixels exist from the brighter side is obtained (see FIG. 12). For example, Vt is Vt = (number of pixels in the width of the image) × 0.1.
-An average value of brightness is obtained for the range from v1 to v2, and this is defined as v (y).

3. 明度プロフィールの平滑化
明度プロフィールv(y)を、雑音除去のため平滑化する。
各yについて、yを中心にしたv(y−n)からv(y+n)の平均値をv(y)の値にする。これを数回繰り返す。例えば、3〜10回繰り返す。
3. Smoothing the brightness profile The brightness profile v (y) is smoothed to remove noise.
For each y, the average value of v (y + n) from v (y−n) around y is set to the value of v (y). Repeat this several times. For example, repeat 3 to 10 times.

4. 明度プロフィールから平坦部分明度を求める
明度プロフィールv(y)から平坦部分明度を算出する(図13参照)。
・v(y)の値(明度)についてのヒストグラムを作成する。
・最も頻度が高い明度が平坦部分の明度に対応することから、その明度を中心に、±Vmの範囲について明度の平均値を求め、それを平坦部の明度Vflatとする(図14参照)。例えば、Vm=2である。
4. The flat partial lightness is calculated from the lightness profile v (y) for obtaining the flat partial lightness from the lightness profile (see FIG. 13).
Create a histogram for the value (brightness) of v (y).
Since the most frequent lightness corresponds to the lightness of the flat part, the lightness average value is obtained for the range of ± Vm centering on the lightness, and this is used as the lightness Vflat of the flat part (see FIG. 14). For example, Vm = 2.

5. 正規化明度プロフィールを求める
正規化明度プロフィールvn(y)を以下の式で算出する。平坦部分の値を1.0とする比を明度プロフィール全体に乗じ、0〜1の範囲に正規化する。
vn(y) = v(y) / Vflat
6. 地肌補正
各画素(x,y)について、R,G,Bの値を直接補正する。
R'(x,y) = R(x,y)/vn(y)
G’(x,y)= G(x,y)/vn(y)
B’(x,y)= B(x,y)/vn(y)
地肌補正処理2では、地肌補正処理1とは異なりV(x,y) のみ求めればよく、有彩色、無彩色の分類処理は必要ないため、処理速度を向上させ、処理に必要なメモリ容量を低減できる。
5. The normalized brightness profile vn (y) for obtaining the normalized brightness profile is calculated by the following formula. Multiply the entire lightness profile by a ratio with a flat portion value of 1.0 and normalize to a range of 0-1.
vn (y) = v (y) / Vflat
6. Background correction The values of R, G, and B are directly corrected for each pixel (x, y).
R ′ (x, y) = R (x, y) / vn (y)
G ′ (x, y) = G (x, y) / vn (y)
B ′ (x, y) = B (x, y) / vn (y)
In the background correction processing 2, unlike the background correction processing 1, only V (x, y) needs to be obtained, and chromatic and achromatic color classification processing is not necessary. Therefore, the processing speed is improved and the memory capacity required for the processing is increased. Can be reduced.

〔地肌補正処理3〕
地肌補正処理3では図16のフローチャート図に示すように、以下の1〜5の処理を順次実行する。地肌補正処理3では地肌補正処理1及び2とは異なり、画素値R,G,B の各画像について、直接正規化(R,G,B)プロフィールを求め、それを用いて、対応するR,G,B画像の補正を行う。
[Background correction processing 3]
In the background correction process 3, the following processes 1 to 5 are sequentially executed as shown in the flowchart of FIG. Unlike the background correction processes 1 and 2, the background correction process 3 directly obtains a normalized (R, G, B) profile for each image of the pixel values R, G, B, and uses it to use the corresponding R, G, G and B images are corrected.

1. プロフィールの作成
R,G,Bの各画素値について、各1次元画像における画素値の最大値(ヒストグラムを求め、値の大きい方から、p%の画素値の平均値)を求め、それをr(y),g(y),b(y)とする。グレースケール画像の場合は、画素値そのものをg(y)として扱い同様の処理を行う。
1. Profile creation For each pixel value of R, G, B, find the maximum pixel value in each one-dimensional image (determine the histogram, and calculate the average value of the p% pixel values from the larger one). Are r (y), g (y), and b (y). In the case of a grayscale image, the pixel value itself is treated as g (y) and the same processing is performed.

2. プロフィールの平滑化
プロフィールr(y),g(y),b(y)を、雑音除去のため平滑化する。各yについて、yを中心にしたr(y−n)からr(y+n), g(y−n)からg(y+n),b(y−n)からb(y+n)の平均値をr(y),g(y),b(y)の値にする。これを数回繰り返す。例えば、3〜10回繰り返す
3. プロフィールから平坦部分明度を求める
プロフィールr(y),g(y),b(y)から平坦部分を算出する。
・r(y),g(y),b(y)についてのヒストグラムを作成する。
・最も頻度が高い値が平坦部分に対応することから、その値を中心に、±mの範囲について平均値を求め、それを平坦部の基準値をrflat,gflat,bflatとする。例えば、m = 2である。
2. Smoothing of profiles The profiles r (y), g (y), b (y) are smoothed to remove noise. For each y, the average value of r (y−n) to r (y + n), g (y−n) to g (y + n), and b (y−n) to b (y + n) around y is expressed as r (y The values are y), g (y), and b (y). Repeat this several times. For example, repeat 3 to 10 times. 3. Calculate the flat portion from the profiles r (y), g (y), and b (y) for obtaining the flat portion lightness from the profile.
Create a histogram for r (y), g (y), b (y).
Since the most frequent value corresponds to the flat part, the average value is obtained for the range of ± m around that value, and the reference values of the flat part are defined as rflat, gflat, bflat. For example, m = 2.

4. 正規化プロフィールを求める
正規化明度プロフィールpr(y),pg(y),pb(y)を以下の式で算出する。平坦部分の値を1.0とする比をプロフィール全体に乗じ、0〜1の範囲に正規化する。
pr(y) = r(y) / rflat
pg(y) = g(y) / gflat
pb(y) = b(y) / bflat
5. 地肌補正
各画素(x,y)について、R,G,Bの値を直接補正する。
R’(x,y) = R(x,y) / pr(y)
G’(x,y) = G(x,y) / pg(y)
B’(x,y) = B(x,y) / pb(y)
地肌補正処理3では、地肌補正処理1及び2と異なりV(x,y),S(x,y),H(x,y)を求める必要がなく、有彩色、無彩色の分類処理も必要ないため、処理速度を向上させ、処理に必要なメモリ容量を低減できる。
4. Calculate normalized brightness profiles pr (y), pg (y), and pb (y) to obtain a normalized profile by the following formula. The entire profile is multiplied by a ratio with a flat portion value of 1.0 and normalized to a range of 0-1.
pr (y) = r (y) / rflat
pg (y) = g (y) / gflat
pb (y) = b (y) / bflat
5. Background correction The values of R, G, and B are directly corrected for each pixel (x, y).
R ′ (x, y) = R (x, y) / pr (y)
G ′ (x, y) = G (x, y) / pg (y)
B ′ (x, y) = B (x, y) / pb (y)
In the background correction process 3, unlike the background correction processes 1 and 2, it is not necessary to obtain V (x, y), S (x, y), and H (x, y), and a chromatic color / achromatic color classification process is also required. Therefore, the processing speed can be improved and the memory capacity required for processing can be reduced.

次に、ブック原稿40のスキャン画像について、陰影補正を行う処理について説明する。上述したように、式(4)の係数 b,x0を求めることができれば、一次元画像中における正規化明度分布を推定することができる。正規化明度分布が得られれば、地肌補正と同様に、その分布の逆数を入力画像の明度(または画素値)に乗じることで陰影の補正が可能となる。   Next, a process for performing shadow correction on the scanned image of the book document 40 will be described. As described above, if the coefficients b and x0 of Expression (4) can be obtained, the normalized lightness distribution in the one-dimensional image can be estimated. If a normalized lightness distribution is obtained, the shadow can be corrected by multiplying the lightness (or pixel value) of the input image by the inverse of the distribution in the same manner as the background correction.

係数 b,x0 については、各一次元画像ごとに(つまり、y座標に対して)異なる値となるため、実際の画像での正規化明度分布を用いて求めることが適している。求める明度分布は地肌色のものである。例えば、一次元画像においてブック原稿の端の部分は一般的に余白部分であり地肌色であることが多いことから、この部分の正規化明度を用いることが可能である。   Since the coefficients b and x0 have different values for each one-dimensional image (that is, with respect to the y coordinate), it is suitable to obtain using the normalized brightness distribution in the actual image. The desired brightness distribution is the background color. For example, since the end portion of a book document in a one-dimensional image is generally a blank portion and often has a background color, the normalized brightness of this portion can be used.

しかしながら、データが一つのみでは、2つの変数b,x0 双方の値を求めることは困難である。そこで、x0 については、ブック原稿の端よりも少し外側の位置になることは明らかであることから、あらかじめ適当な値を設定しておけば良い。そして、ブック原稿の端の部分の正規化明度から b の値を決定することで、一次元画像中における正規化明度分布を推定する。   However, if there is only one data, it is difficult to determine the values of both the two variables b and x0. Thus, it is clear that x0 is slightly outside the edge of the book document, and therefore an appropriate value may be set in advance. Then, the normalized brightness distribution in the one-dimensional image is estimated by determining the value of b from the normalized brightness of the edge portion of the book document.

本実施例における陰影補正の処理手順を図17のフローチャート図に示す。1次元画像における基本的な陰影補正手順は、次のようになる。   FIG. 17 is a flowchart showing a shading correction processing procedure in this embodiment. The basic shadow correction procedure for a one-dimensional image is as follows.

まず、 入力されたブック原稿のスキャン画像について、地肌補正処理1〜3のいずれかの方法で、正規化明度プロフィール t(y) を求めておく(S11)。   First, a normalized brightness profile t (y) is obtained for the input scanned image of the book document by any one of the background correction processes 1 to 3 (S11).

ついで、 ある y 座標における1次元画像 (R(x,y),G(x,y),B(x,y)) について、1次元明度分布 V(x) を求める(S12)。   Next, a one-dimensional brightness distribution V (x) is obtained for a one-dimensional image (R (x, y), G (x, y), B (x, y)) at a certain y coordinate (S12).

ついで、一次元明度分布V(x)を求めた1次元画像について、ブック原稿両端の x 座標 xl, xr を推定する(13)。具体的には、図18に示す1次元差分フィルターを用いて畳み込み演算を行い、その絶対値が大きい二カ所を xl, xr とする。そして、xlと xr の中央の x 座標を xc とする。   Next, the x-coordinates xl and xr at both ends of the book document are estimated for the one-dimensional image for which the one-dimensional brightness distribution V (x) is obtained (13). Specifically, a convolution operation is performed using the one-dimensional difference filter shown in FIG. 18, and two locations having large absolute values are defined as xl and xr. The x coordinate at the center of xl and xr is assumed to be xc.

ついで、t(y) を用いて V(x) を正規化し、v(x) とする(S14)。   Then, t (y) is used to normalize V (x) to v (x) (S14).

ついで、1次元画像の左側 (xl 〜 xc) における正規化明度分布を推定する(S15)。具体的には、xl から xc へ向かって探索し、v(x) > thres(例えば0.8) となる x 座標 xpとその時の v(x) の値 pix を求める。係数 x0は、X0 = xl−(xr−xl)×Δとする。Δは例えば0.1である。そして、xp, pix, x0を式(4)に入力すれば、b の値を算出できる。なお、式(4)においてxpが「x」、pixは明度である。   Next, a normalized lightness distribution on the left side (xl to xc) of the one-dimensional image is estimated (S15). Specifically, the search is performed from xl to xc, and the x coordinate xp satisfying v (x)> thres (for example, 0.8) and the value pix of v (x) at that time are obtained. The coefficient x0 is X0 = xl− (xr−xl) × Δ. Δ is, for example, 0.1. Then, if xp, pix, x0 are input to the equation (4), the value of b can be calculated. In Expression (4), xp is “x”, and pix is lightness.

bの値が算出されれば、x0, bの値を式(4)に設定することで、xl 〜 xc の明度分布 p(x) が求められる。   When the value of b is calculated, the lightness distribution p (x) of xl to xc is obtained by setting the values of x0 and b in the equation (4).

同様に、xr 〜 xc についての明度分布p(x)を算出する(S16)。   Similarly, the lightness distribution p (x) for xr to xc is calculated (S16).

ついで、p(x) を用いて陰影を補正する。すなわち、前述した地肌補正に加え、両端部の照明不足による陰影を補正する。例えば、
R’(x,y)=R(x,y)/(rn(y)* p(x))
G’(x,y)=G(x,y)/(gn(y)* p(x))
B’(x,y)=B(x,y)/(bn(y)* p(x))
となる。
Next, the shadow is corrected using p (x). That is, in addition to the background correction described above, the shadow due to insufficient illumination at both ends is corrected. For example,
R ′ (x, y) = R (x, y) / (rn (y) * p (x))
G ′ (x, y) = G (x, y) / (gn (y) * p (x))
B ′ (x, y) = B (x, y) / (bn (y) * p (x))
It becomes.

以上のように本実施例によれば、ブック原稿40をスキャンした場合、平坦部分の明度に基づき地肌補正すると共に、両端部の照明不足による陰影を補正することができる。   As described above, according to the present embodiment, when the book document 40 is scanned, it is possible to correct the background based on the brightness of the flat portion and to correct the shadow due to insufficient illumination at both ends.

実施例1では副走査方向の全域に渡り地肌補正及び陰影補正したが、本実施例では、地肌補正及び陰影補正を行う範囲を限定して画像処理を高速化する場合について説明する。
補正範囲の限定は、ブック原稿の曲がり始めの位置を検出することで可能となる。
In the first embodiment, the background correction and the shadow correction are performed over the entire area in the sub-scanning direction. However, in this embodiment, a case where the image processing speed is increased by limiting the range in which the background correction and the shadow correction are performed will be described.
The correction range can be limited by detecting the position at which the book document starts to be bent.

ブック原稿の曲がり始めの位置は、正規化明度プロフィールを用いてブック原稿の曲面部分の範囲を検出し、その部分のみ補正を行うようにする。なお、後述する処理で検出するページ外形を用いて曲面部分の範囲を検出してもよい。   The position at which the book document begins to be bent is detected by detecting the range of the curved surface portion of the book document using the normalized lightness profile, and only that portion is corrected. Note that the range of the curved surface portion may be detected using a page outer shape detected by processing to be described later.

ブック原稿の曲面部分については、ブック原稿のスキャン画像中の見開きページの双方で、平坦部から曲面部へ変化している「曲がり始め」の位置を検出することで、その間が曲面部とすることができる。図19は曲がり始めの位置の検出手順を示すフローチャート図である。   For the curved part of the book manuscript, both sides of the spread page in the scanned image of the book manuscript should detect the position of the “start of bending” that changes from the flat part to the curved part, so that the curved part is between them. Can do. FIG. 19 is a flowchart showing a procedure for detecting a position at the beginning of bending.

1.まず、y 軸方向の明度プロフィールおよび平坦部の明度を求める。図20は、y方向のある位置における明度プロフィールの一例を示す。明度が凹部を示す中央付近が綴じ部である。   1. First, the brightness profile in the y-axis direction and the brightness of the flat portion are obtained. FIG. 20 shows an example of a brightness profile at a certain position in the y direction. The vicinity of the center where the lightness indicates a concave portion is a binding portion.

2.ついで、図20の「平坦部明度 - 明度プロフィール」の分布についての重心位置を求める。重心位置は、例えば、凹部を3角形に近似した場合の重心位置である。   2. Next, the barycentric position of the distribution of “flat portion lightness-lightness profile” in FIG. 20 is obtained. The gravity center position is, for example, the gravity center position when the concave portion is approximated to a triangle.

3.ついで、重心位置の y 座標から、左右に明度プロフィールの値を探索し、「平坦部明度 ‐ δ(例えば、δ=10)」 の明度となる2つのy 座標(図ではy1,y2)を求める。この y 座標を曲がり始めの位置とする。   3. Next, from the y coordinate of the center of gravity position, the value of the brightness profile is searched to the left and right, and two y coordinates (y1 and y2 in the figure) having the brightness of “flat portion brightness−δ (for example, δ = 10)” are obtained. . Let this y coordinate be the starting position of the turn.

2つのy座標の間でのみ、実施例1の地肌補正及び陰影補正を行えば、画像処理を高速化できる。   If the background correction and shadow correction of the first embodiment are performed only between two y coordinates, the image processing can be speeded up.

ところで、2つのy座標間のすべての主走査方向において(2つのy座標間の曲面部全てについて)、地肌補正及び陰影補正を行うことも効率的ではない。そこで、図21に示すように、2つのy座標間の曲面部を適当な個数の領域に分割し、その境界線上の1次元画像についてのみ、正規化明度分布を求める。そして、その間の1次元画像については、線形補間によって、対応する正規化明度分布を求めるようにする。この方法によって、更に高速な補正処理が可能になる。   Incidentally, it is not efficient to perform background correction and shadow correction in all main scanning directions between two y coordinates (for all curved surface portions between two y coordinates). Therefore, as shown in FIG. 21, the curved surface portion between two y coordinates is divided into an appropriate number of regions, and a normalized brightness distribution is obtained only for a one-dimensional image on the boundary line. And about the one-dimensional image in the meantime, the corresponding normalized brightness distribution is calculated | required by linear interpolation. By this method, it is possible to perform correction processing at higher speed.

また、これまで綴じ部の両端付近の陰影補正と同時に色補正したが、綴じ部両端付近の陰影補正については、地肌補正を行なった後に適用することも可能である。この場合でも補正の手順に変更はない。図22は、地肌補正を行なった後に綴じ部両端付近の陰影を補正する補正手順のフローチャート図である。   In addition, the color correction is performed at the same time as the shadow correction near both ends of the binding portion so far, but the shadow correction near both ends of the binding portion can be applied after the background correction is performed. Even in this case, the correction procedure is not changed. FIG. 22 is a flowchart of a correction procedure for correcting shadows near both ends of the binding portion after the background correction is performed.

まず、ブック原稿40の外形を検出する等の処理によって、綴じ部両端点の座標を求める(S21)。ブック原稿40の外形の検出については後述する。   First, the coordinates of both end points of the binding portion are obtained by processing such as detecting the outer shape of the book document 40 (S21). The detection of the outer shape of the book document 40 will be described later.

ついで、スキャン画像から明度画像を求め、明度プロフィールを算出する(S22)。図20と同様に曲がり始めの位置を検出する。   Next, a brightness image is obtained from the scanned image, and a brightness profile is calculated (S22). Similar to FIG. 20, the position at the beginning of bending is detected.

ついで、図21に示すように、曲がり始めの位置に挟まれた曲面部を、y 軸方向に M 個に分割する(S23)。そして、その境界線上におけるブック原稿両端点の位置を、スキャン画像から求める。   Next, as shown in FIG. 21, the curved surface portion sandwiched between the starting positions of the bending is divided into M pieces in the y-axis direction (S23). Then, the positions of both end points of the book document on the boundary line are obtained from the scanned image.

ついで、赤,緑,青の各単色画像について、以下の補正処理を行う(S24)。
・綴じ部両端点の座標から、入力画像を上下に2分割する
・上下それぞれの画像について、水平方向に N 個に分割し、地肌補正を行う
・補正した上下の画像を結合する
ついで、ステップS23 における境界線上の1次元画像の明度分布を求め、曲面部についてのみ、綴じ部両端における陰影補正を行う(S25)。
Next, the following correction processing is performed for each single color image of red, green, and blue (S24).
-The input image is divided into two parts vertically from the coordinates of the end points of the binding part.-Each of the upper and lower images is divided into N parts in the horizontal direction and the background correction is performed.-The corrected upper and lower images are combined. The brightness distribution of the one-dimensional image on the boundary line is obtained, and shading correction at both ends of the binding portion is performed only for the curved surface portion (S25).

本実施例では、スキャン画像を綴じ部と垂直な方向に複数の領域に分割して地肌補正処理及び陰影補正を行う画像処理について説明する。   In this embodiment, image processing for performing background correction processing and shadow correction by dividing a scanned image into a plurality of regions in a direction perpendicular to the binding portion will be described.

まず、図23に示すように、スキャン画像をブック原稿40の綴じ部41に垂直に分割し、X軸方向に複数の領域Lに分割する(すなわち、Y軸方向を長さ方向とする線で分割する)。そして、この各領域Lに対して、地肌補正処理1ないし3のいずれかを行い、また、両端部の陰影補正を行う。なお、図23の例では、X軸方向の分割は5分割している。   First, as shown in FIG. 23, the scanned image is vertically divided into the binding portion 41 of the book document 40 and divided into a plurality of regions L in the X-axis direction (that is, with a line having the Y-axis direction as the length direction). To divide). Then, any one of the background correction processes 1 to 3 is performed on each area L, and the shading correction at both ends is performed. In the example of FIG. 23, the X-axis direction is divided into five.

本実施例は、スキャン画像がスキューしている、又は、ブック原稿が「ハの字」配置にある場合に好適となる。このようなスキャン画像では、X軸方向において画像の地肌色のプロフィールが変化しているため、スキャン画像全体を同一のプロフィールを用いて補正するのではなく、X軸方向に画像を分割し、それぞれの領域Lにてプロフィールを求め、補正を行う方法が有効である。   This embodiment is suitable when the scanned image is skewed or the book document is in the “C” arrangement. In such a scanned image, since the background color profile of the image changes in the X-axis direction, the entire scanned image is not corrected using the same profile, but the image is divided in the X-axis direction, A method of obtaining a profile in the region L and correcting the profile is effective.

本実施例によれば、綴じ部と平行な方向に画素値のプロフィールが変化している場合でも、変化しているそれぞれの領域からプロフィールを求めて、精度よく地肌色を補正できる。   According to this embodiment, even when the profile of the pixel value changes in the direction parallel to the binding portion, the background color can be accurately corrected by obtaining the profile from each of the changing areas.

本実施例では、スキャン画像を綴じ部と平行な方向に複数の領域に分割して地肌補正処理及び陰影補正を行う画像処理について説明する。   In the present embodiment, image processing for performing background correction processing and shadow correction by dividing a scanned image into a plurality of regions in a direction parallel to the binding portion will be described.

まず、図24に示すように、スキャン画像をブック原稿40の綴じ部41の長さ方向と平行な方向に複数の領域Lに分割する(すなわち、X軸方向の長さ方向とする線で分割する)。この各領域Lに対して、地肌補正処理1〜3いずれかを行い、また、両端部の陰影補正を行う。図24の例では、綴じ部41の線の上下で領域を2分割している。   First, as shown in FIG. 24, the scanned image is divided into a plurality of regions L in a direction parallel to the length direction of the binding portion 41 of the book document 40 (that is, divided by a line having a length direction in the X-axis direction). To do). Any one of the background correction processes 1 to 3 is performed on each region L, and shading correction at both ends is performed. In the example of FIG. 24, the region is divided into two parts above and below the line of the binding portion 41.

この処理では、見開きの両ページがそれぞれ異なる地肌色のブック原稿40に対するもので、左右又は上下の両ページで地肌色が異なるために、画像のY軸(垂直)方向において地肌色のプロフィールが変化しているため、同一のプロフィールを用いて補正するので
はなく、Y軸方向に対して画像を分割し、それぞれの領域Lにおいてプロフィールを求め
、補正を行うものである。具体的には、次の1.2.の処理による。
In this processing, both spread pages are for the book document 40 having a different background color, and since the background color is different between the left and right or upper and lower pages, the background color profile changes in the Y-axis (vertical) direction of the image. Therefore, the correction is not performed using the same profile, but the image is divided in the Y-axis direction, the profile is obtained in each region L, and correction is performed. Specifically, the following 1.2. By processing.

1.入力スキャン画像において、綴じ部41の両端の位置を検出する(綴じ部41の直線を求める)。この位置の検出については、ブック原稿40のページ外形に基づき検出してもよいし(外形が一番内側に入り込んでいる箇所を検出する)、画像中央部の濃度に基づき検出してもよいし(一番濃い箇所)、又は、明度の変化を利用して検出してもよい。なお、ページ外形の検出処理については後述する。   1. In the input scan image, the positions of both ends of the binding portion 41 are detected (a straight line of the binding portion 41 is obtained). The detection of this position may be detected based on the page outline of the book document 40 (a part where the outline enters the innermost side is detected) or may be detected based on the density at the center of the image. (The darkest part) or a change in brightness may be used for detection. The page outline detection process will be described later.

2.1で求められた直線によって入力画像を上下に分割し、地肌補正及び陰影補正を行う。   The input image is divided vertically by the straight line obtained in 2.1, and background correction and shadow correction are performed.

本実施例によれば、見開きの両ページがそれぞれ異なる地肌色の場合でも、それぞれのページから明度プロフィールを求めて、精度よく地肌色を補正できる。   According to the present embodiment, even when both spread pages have different background colors, the brightness profile can be obtained from each page and the background color can be accurately corrected.

本実施例は、実施例3及び4を組み合わせるものであり、図25に示すように、ブック原稿40の綴じ部41の長さ方向(X軸方向)、綴じ部41の長さ方向と垂直な方向(Y軸方向)に、それぞれ複数の領域Lに複数に分割し、この各領域Lに対して地肌補正処理1〜3のいずれかを行い、また、両端部の陰影補正を行う。なお、図25の例では、X軸方向の分割は5分割し、Y軸方向の分割は綴じ部41の線の上下で2分割している。   This embodiment is a combination of the third and fourth embodiments. As shown in FIG. 25, the length direction (X-axis direction) of the binding portion 41 of the book document 40 and the length direction of the binding portion 41 are perpendicular to each other. Each of the regions L is divided into a plurality of regions L in the direction (Y-axis direction), and any one of background correction processes 1 to 3 is performed on each region L, and shadow correction is performed on both ends. In the example of FIG. 25, the division in the X-axis direction is divided into five, and the division in the Y-axis direction is divided into two above and below the line of the binding portion 41.

本実施例の処理は、スキューしている、あるいは、「ハの字」配置にあるブック原稿40であり、かつ、左右又は上下のページがそれぞれ異なる地肌色のブック原稿40に対するものある。ブック原稿40が、スキューおよび「ハの字」配置、上下のページで地肌色が異なるという理由から、画像のX,Y軸方向において、地肌色のプロフィールが変化しているため、同一のプロフィールを用いて補正するのではなく、X,Y軸の両方向に対して画像を分割し、それぞれの部分画像にてプロフィールを求め、補正を行う方法が有効である。   The processing of the present embodiment is for a book document 40 that is skewed or in a “C” configuration and that has a background color that differs in the left and right or upper and lower pages. Since the background color of the book manuscript 40 is different in the X and Y axis directions of the image because the background color differs between the skew and the “C” shape and the upper and lower pages, the same profile is used. It is effective to divide an image in both directions of the X and Y axes, obtain a profile in each partial image, and perform correction instead of using the correction.

以上のように、本実施の形態の画像処理装置は、ブック原稿40の綴じ部を地肌補正すると共に、綴じ部の両端付近の陰影を補正できる。   As described above, the image processing apparatus according to the present embodiment can correct the background of the binding portion of the book document 40 and can also correct shadows near both ends of the binding portion.

〔ゆがみ形状補正〕
続いて、図10のステップS2におけるゆがみ形状補正について説明する。
[Distortion correction]
Subsequently, the distortion shape correction in step S2 of FIG. 10 will be described.

図26は、ステップS2のゆがみ形状補正処理の概要を説明するフローチャート図である。ステップS2の処理は、スキャン画像中のブック原稿40についてページ外形/罫線/文字行の抽出処理を行い(ステップS201)、ブック原稿40のスキャン画像の画像歪み補正処理を行なう(ステップS301)。   FIG. 26 is a flowchart for explaining an outline of the distortion shape correction process in step S2. In step S2, page outline / ruled line / character line extraction processing is performed for the book document 40 in the scanned image (step S201), and image distortion correction processing for the scanned image of the book document 40 is performed (step S301).

まず、ステップS201においては、ページ外形/罫線/文字行の抽出処理を実行する。ここで、図27は、ページ外形/罫線/文字行の抽出処理の流れを概略的に示すフローチ
ャートである。
First, in step S201, page outline / ruled line / character line extraction processing is executed. FIG. 27 is a flowchart schematically showing the flow of page outline / ruled line / character line extraction processing.

・スキャン画像からのページ外形の抽出(S211)
まず、ステップS211におけるスキャン画像からのページ外形の抽出処理について説明する。図28は、スキャン画像の上端にページ外形が存在するスキャン画像の一例を示す。また、図29は図28に示したスキャン画像の綴じ部境界線左側の黒画素ヒストグラムである。
Extraction of page outline from scanned image (S211)
First, the process of extracting the page outline from the scanned image in step S211 will be described. FIG. 28 shows an example of a scanned image in which a page outline exists at the upper end of the scanned image. FIG. 29 is a black pixel histogram on the left side of the binding boundary line of the scan image shown in FIG.

図29に示すヒストグラムのX軸はスキャン画像の主走査方向(図28の上下方向)を示すものであり、スキャン画像の上端はヒストグラムの左端に対応付けられている。なお、ページ外形が下端に存在するスキャン画像の場合には、スキャン画像の下端がヒストグラムの右端に対応付けられることになる。したがって、図28に示すようにスキャン画像の上端にページ外形が存在する場合、スキャン画像の上部に黒い帯が現れることから、図29に示すヒストグラムの左端には高い縦棒が現れることになる。本実施の形態では、このような特性を利用して、スキャン画像にページ外形が存在するか否かの判断を行う。   The X axis of the histogram shown in FIG. 29 indicates the main scanning direction (vertical direction in FIG. 28) 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. 28, 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.

より具体的には、図29に示すように、綴じ部境界線からスキャン画像の左端(図29の左端)までの距離AO、ヒストグラム縦棒の高さBOとし、その比率を下記に示す式(5)により算出し、算出された比率kが、予め定められた閾値よりも大きい場合に、スキャン画像にページ外形が存在すると判断する。   More specifically, as shown in FIG. 29, the distance AO from the binding boundary line to the left end of the scan image (left end in FIG. 29) and the height BO of the histogram vertical bar, and the ratios are expressed by the following formula ( When the calculated ratio k is larger than a predetermined threshold, it is determined that a page outline exists in the scanned image.

なお、スキャン画像の上下にページ外形が存在する場合には、ヒストグラムの左右両端に高い縦棒が現れることになるので、このような場合には、ヒストグラムの左右両端の高い縦棒に基づいてスキャン画像にページ外形が存在するか否かの判断がそれぞれ実行される。 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.

以上の処理により、スキャン画像にページ外形が存在すると判断された場合には、左右ページの上下辺のいずれにページ外形が存在しているのかという情報とともにページ外形を抽出し、RAM33に一時的に記憶する。   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.

なお、このスキャン画像にページ外形が存在するか否かの判断処理は、スキャン画像の綴じ部境界線を境にした左右ページ毎に実行される。   Note that the process of determining whether or not a page outline exists in the scanned image is executed for each of the left and right pages with the binding line boundary line of the scanned image as a boundary.

・スキャン画像からの罫線の抽出(S212)
続くステップS212においては、スキャン画像からの罫線の抽出処理を実行する。
Extraction of ruled lines from scanned image (S212)
In a succeeding step S212, ruled line extraction processing from the scanned image is executed.

「罫線候補の検出」
図30は罫線が存在するスキャン画像の一例を示す説明図である。本実施の形態では、罫線の矩形抽出を導入し、図28に示すようなスキャン画像に存在する罫線を1つの矩形として抽出する。なお、詳細については後述するが、ただ単に矩形抽出を行うだけでは罫線が単独で抽出できない場合もあるために、ランの登録に制限を設けた矩形抽出を行う。
"Detection of ruled line candidates"
FIG. 30 is an explanatory diagram showing an example of a scanned image having ruled lines. In this embodiment, ruled line rectangle extraction is introduced, and ruled lines existing in a scan image as shown in FIG. 28 are extracted as one rectangle. Although details will be described later, there are cases where a ruled line cannot be extracted by simply performing rectangle extraction, and therefore rectangle extraction with restrictions on run registration is performed.

図30は、2値化した画像に矩形抽出を施した結果を示す。図30に示すように、黒画素が連結している箇所が1つの矩形として抽出される。図30のような罫線が存在していれば、副走査方向に細長い矩形として抽出されることから、細長い矩形の有無や抽出した矩形の形状(長さ・縦横比)や位置を基に罫線の有無の判定を行う。   FIG. 30 shows the result of performing rectangular extraction on the binarized image. As shown in FIG. 30, a portion where black pixels are connected is extracted as one rectangle. If a ruled line as shown in FIG. 30 exists, it is extracted as an elongated rectangle in the sub-scanning direction. Therefore, the ruled line is determined based on the presence or absence of the elongated rectangle and the shape (length / aspect ratio) and position of the extracted rectangle. The presence / absence is determined.

ただし、ただ単に矩形抽出を行うだけでは、罫線が単独で抽出できない場合もある。図31に示すように、罫線がノイズと接触している場合、ノイズを含む矩形が抽出されてしまう。また、図32のような表が含まれるスキャン画像の場合は、副走査方向の罫線は主走査方向の罫線と交差するため、表全体が1つの矩形として抽出され罫線が単独で抽出できない。   However, there are cases where a ruled line cannot be extracted by simply performing rectangle extraction. As shown in FIG. 31, when the ruled line is in contact with noise, a rectangle including noise is extracted. In the case of a scanned image including a table as shown in FIG. 32, the ruled line in the sub-scanning direction intersects with the ruled line in the main scanning direction, so that the entire table is extracted as one rectangle and the ruled line cannot be extracted alone.

[ランの登録に制限を設けた矩形抽出]
そこで、罫線を単独で抽出するために、ランの登録に制限を設けた矩形抽出を行う。図31に示すような罫線とノイズが接触している画像に対して、主走査方向(垂直方向)に一定値未満のランのみを登録し矩形を抽出すると、図33に示すように罫線を構成する黒画素は登録対象のランとなるが、ノイズを構成する黒画素はランとして登録されない。罫線を構成する黒画素を対象として矩形抽出を行うため、罫線を単独で抽出することができる。
[Rectangle extraction with restrictions on run registration]
Therefore, in order to extract the ruled lines alone, rectangle extraction with restrictions on run registration is performed. For an image in which noise is in contact with a ruled line as shown in FIG. 31, if only a run with a predetermined value in the main scanning direction (vertical direction) is registered and a rectangle is extracted, a ruled line is formed as shown in FIG. The black pixel to be registered is a run to be registered, but the black pixel constituting the noise is not registered as a run. Since the rectangle extraction is performed on black pixels constituting the ruled line, the ruled line can be extracted independently.

なお、罫線を矩形抽出するにあたって、副走査方向(水平方向)に長いランのみを対象に矩形抽出を行う方法もあるが、この方法だと綴じ部付近の歪み部分は矩形内に含まれない。ところが、本実施の形態の方式を用いることにより、罫線の綴じ部付近の歪み部分も矩形内に含めることが可能となり、より正確な罫線の位置や長さを検出することが出来る。   In addition, when extracting a ruled line in a rectangle, there is a method of extracting a rectangle only for a run that is long in the sub-scanning direction (horizontal direction), but in this method, a distorted portion near the binding portion is not included in the rectangle. However, by using the method of the present embodiment, a distorted portion near the ruled line binding portion can be included in the rectangle, and a more accurate ruled line position and length can be detected.

「矩形統合」
表など、副走査方向(水平方向)の罫線と主走査方向(垂直方向)の罫線とが交差している画像に矩形抽出を行うと、主走査方向の罫線はランとして登録されないため、副走査方向に矩形が細切れに抽出されてしまう。すると、図34に示すように、副走査方向に長い罫線があるにもかかわらず、その罫線は1つの矩形として抽出されず、複数の細切れの矩形となって抽出される。
"Rectangle integration"
If rectangle extraction is performed on an image such as a table where a ruled line in the sub-scanning direction (horizontal direction) and a ruled line in the main scanning direction (vertical direction) intersect, the ruled line in the main scanning direction is not registered as a run. Rectangles are extracted in the direction. Then, as shown in FIG. 34, although there is a long ruled line in the sub-scanning direction, the ruled line is not extracted as one rectangle but is extracted as a plurality of finely divided rectangles.

そこで、矩形統合を行う。副走査方向における距離が一定値以下の矩形同士を統合する。図35は、矩形統合を施した例である。矩形統合は、図35に示すように、細切れになっていた矩形を1つの矩形に統合し、罫線の矩形を抽出するものである。この矩形統合は、かすれた罫線や点線の罫線に対して行っても、罫線全体が1つの矩形として抽出されるため有効な方法である。   Therefore, rectangle integration is performed. The rectangles whose distances in the sub-scanning direction are equal to or less than a certain value are integrated. FIG. 35 shows an example in which rectangle integration is performed. In the rectangle integration, as shown in FIG. 35, the rectangles that have been cut into pieces are integrated into one rectangle, and a ruled line rectangle is extracted. This integration of rectangles is an effective method because the entire ruled line is extracted as one rectangle even if it is applied to a blurred ruled line or a dotted ruled line.

「最適罫線の選択」
次いで、一定値未満のランのみを登録した矩形抽出を行い、副走査方向に細長い矩形の有無にて罫線の有無を判定する。このような罫線の有無の判定は、画像の左上・左下・右上・右下の4箇所それぞれにおいて行う。例えば、図36に示す画像の場合、左上にのみ罫線が存在しないということになる。ある箇所にて複数罫線が存在する場合は、補正に利用する罫線を以下の優先順位で決定する。
"Selecting the best ruled line"
Next, rectangle extraction in which only runs less than a certain value are registered is performed, and the presence or absence of ruled lines is determined based on the presence or absence of a long and narrow rectangle in the sub-scanning direction. Such a ruled line presence / absence determination is performed at each of the four locations of the upper left, lower left, upper right, and lower right of the image. For example, in the case of the image shown in FIG. 36, no ruled line exists only in the upper left. If there are a plurality of ruled lines at a certain location, the ruled lines used for correction are determined in the following priority order.

1.綴じ部付近まで食い込んでいる罫線
例えば、図36に示す画像の右下の場合、綴じ部付近まで食い込んでいる罫線が補正に利用される。
1. For example, in the case of the lower right side of the image shown in FIG. 36, a ruled line that penetrates to the vicinity of the binding portion is used for correction.

2.長さが長い方の罫線
例えば、図36に示す画像の右上の場合、双方の罫線は綴じ部付近まで食い込んでいるため、長さが長い方の罫線が補正に利用される。
2. For example, in the case of the upper right side of the image shown in FIG. 36, the ruled line with the longer length is used for correction since both the ruled lines are biting into the vicinity of the binding portion.

3.位置が外側の罫線
例えば、図36に示す画像の左下の場合、双方の罫線は綴じ部付近まで食い込んでいて、なおかつ、長さがほぼ同じため、画像の外側に位置する罫線が補正に利用される。
3. For example, in the case of the lower left side of the image shown in FIG. 36, both ruled lines cut into the vicinity of the binding portion, and the lengths are almost the same, so the ruled line located outside the image is used for correction. The

「最適罫線の座標値検出」
以上のようにして最適罫線を選択した後、各罫線の座標値を検出する。罫線の位置座標は、抽出された矩形の座標から得ることができる。なお、特殊な例として、副走査方向に細長い矩形の位置が画像の上端や下端に接している場合は、その矩形がノイズである可能性を考慮して、罫線とはみなさないものとする。また、左右のページそれぞれで細長い矩形が抽出された場合(例えば、左上と右上、左下と右下)、画像によっては、綴じ部をまたがる形で左右ページの矩形が統合されることがある。すると、水平方向画像全体に細長い矩形が抽出されることから、抽出された矩形にそのような特徴が見られた場合は、綴じ部位置を境にその矩形を分割する。
"Coordinate value detection of optimal ruled line"
After selecting the optimum ruled line as described above, the coordinate value of each ruled line is detected. The position coordinates of the ruled line can be obtained from the extracted rectangular coordinates. As a special example, when the position of a rectangle elongated in the sub-scanning direction is in contact with the upper end or the lower end of the image, the rectangle is not regarded as a ruled line in consideration of the possibility that the rectangle is noise. In addition, when elongated rectangles are extracted from the left and right pages (for example, upper left and upper right, lower left and lower right), depending on the image, the rectangles of the left and right pages may be integrated across the binding portion. Then, since a long and narrow rectangle is extracted from the entire horizontal image, when such a feature is found in the extracted rectangle, the rectangle is divided at the binding position.

以上の処理により、スキャン画像に罫線が存在すると判断された場合には、左右各ページのいずれの位置に罫線が存在しているのかという情報とともに罫線を抽出し、RAM33に一時的に記憶する。   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.

・スキャン画像からの文字行の抽出(S213)
続くステップS213においては、スキャン画像からの文字行の抽出処理を実行する。本実施の形態においては、まず、スキャン画像中の文字行が縦書き文字行なのか、横書き文字行なのかの判別を行う。
Extraction of character lines from the scanned image (S213)
In the subsequent step S213, a character line extraction process from the scanned image is executed. 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.

「文字行の判別」
スキャン画像中の文字行が縦書き文字行なのか、横書き文字行なのかの判別手法について説明する。ここで、図37は図50に示したスキャン画像の副走査方向の黒白反転数ヒストグラムである。図37の横軸は、副走査方向(左右方向)の黒画素(スキャン画像を黒白反転させた画素の中でその濃度値が予め定めた濃度値よりも濃い画素)の主走査方向上での位置を示し、図37中の縦軸はその位置毎の黒画素数を示すものである。
"Determination of character lines"
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. 37 is a black-and-white inversion number histogram in the sub-scanning direction of the scan image shown in FIG. The horizontal axis in FIG. 37 represents the black pixel in the sub-scanning direction (left-right 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 main scanning direction. The position indicates the position, and the vertical axis in FIG. 37 indicates the number of black pixels for each position.

また、図38は図50に示した画像の主走査方向の黒白反転数ヒストグラムである。図38の横軸は、主走査方向(上下方向)の黒画素(スキャン画像を黒白反転させた画素の中でその濃度値が予め定めた濃度値よりも濃い画素)の副走査方向上での位置を示し、図38の縦軸は、その位置毎の黒画素数を示すものである。画像中の文字が横書きの図50に示したようなスキャン画像の場合、図37に示すような副走査方向のヒストグラムは激しく変化するが、図38に示すような主走査方向のヒストグラムの変化は少ない。また、特に図示しないが、スキャン画像中の文字行が縦書き文字行である場合には、主走査方向のヒストグラムは激しく変化するが、副走査方向のヒストグラムの変化は少ない。   FIG. 38 is a black-and-white inversion number histogram of the image shown in FIG. 50 in the main scanning direction. The horizontal axis of FIG. 38 shows the black pixel in the main scanning direction (vertical direction) (the pixel whose density value is darker than the predetermined density value among the pixels obtained by reversing the scan image in black and white) in the sub-scanning direction. The position is shown, and the vertical axis in FIG. 38 shows the number of black pixels for each position. When the characters in the image are horizontal scans as shown in FIG. 50, the sub-scanning histogram as shown in FIG. 37 changes drastically, but the main-scanning histogram 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.

上述したような判別手法は、具体的には下記に示す各式により実現される。まず、下記に示す式(6)により、主走査方向yの位置でのヒストグラム値Pnt(y)の平均値meanが算出される。ここで、heightは画像の高さである。 Specifically, the discrimination method as described above is realized by the following equations. First, an average value mean H of the histogram values Pnt (y) at the position in the main scanning direction y is calculated by the following equation (6). Here, height is the height of the image.

主走査方向yの位置でのヒストグラム値Pnt(y)の平均値meanが算出される。ここで、heightは画像の高さである。 An average value mean H of the histogram values Pnt (y) at the position in the main scanning direction y is calculated. Here, height is the height of the image.

そして、下記に示す式(7)により、副走査方向のヒストグラムの主走査方向に関する分散σが得られる。 Then, the variance σ H in the main scanning direction of the histogram in the sub-scanning direction is obtained by the following expression (7).

同様に、下記に示す式(8)により、副走査方向xの位置でのヒストグラム値Pnt(x)の平均値meanが算出される。ここで、widthは画像の幅である。 Similarly, the average value mean V of the histogram values Pnt (x) at the position in the sub-scanning direction x is calculated by the following equation (8). Here, width is the width of the image.

そして、下記に示す式(9)により、主走査方向のヒストグラムの副走査方向に関する分散σが得られる。 Then, the variance σ v regarding the sub-scanning direction of the histogram in the main scanning direction is obtained by the following equation (9).

上述したようにスキャン画像中の文字行が横書き文字行である場合には、副走査方向のヒストグラムの主走査方向に関する分散σが、主走査方向のヒストグラムの副走査方向に関する分散σより大きい。逆に、スキャン画像中の文字行が縦書き文字行である場合には、主走査方向のヒストグラムの副走査方向に関する分散σが、副走査方向のヒストグラムの主走査方向に関する分散σより大きい。つまり、分散σと分散σとの比較により、スキャン画像中の文字行が縦書き文字行なのか、横書き文字行なのかの判別が可能になっている。 As described above, when the character line in the scanned image is a horizontally written character line, the variance σ H in the main scanning direction of the histogram in the sub-scanning direction is larger than the variance σ v in the sub-scanning direction of the histogram in the main scanning direction. . Conversely, if the character line in the scanned image is a vertical text line, variance sigma v in the sub-scanning direction of the main scanning direction of the histogram is larger than variance sigma H in the main scanning direction in the sub-scanning direction histogram . That is, by comparing the variance σ H and the variance σ v , 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.

なお、スキャン画像中の文字行が縦書き文字行なのか、横書き文字行なのかの判別に、黒白反転数ヒストグラムを用いたのは、文字行と写真部分との混同を避けるためである。一般に、黒画素ヒストグラムの値が同程度の場合、文字領域のほうが写真領域よりも黒白反転数ヒストグラムの値が大きくなるからである。   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.

「横書き文字行の座標検出」
以上のようにして文字行を判別した後、まず、各横書き文字行の座標を検出する。横書き文字行の座標の検出にあたっては、文字単位の外接矩形抽出処理を行うとともに、横書き文字行の抽出処理を行う。なお、文字認識処理については周知の技術であるので、その説明は省略する。ここで、スキャン画像の文字外接矩形抽出処理および文字行抽出処理の結果の一例を図39に示す。そして、各文字の外接矩形の中心点の座標をその文字の座標とみなし、横書き文字行の座標を検出する。
"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. 39 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.

「最適横書き文字行の選択」
次に、抽出した横書き文字行の中から歪み補正に最適な横書き文字行を選択する。複数の横書き文字行が検出される場合、どの横書き文字行を用いて歪み補正するかを選択する必要がある。最適な横書き文字行の選択基準の一例としては、前述した最適な罫線の選択基準と基本的に同様であって、図40に示すように横書き文字行の長さBCが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内(図40の網掛け領域)に横書き文字行の一部Cがかかっていることを条件とし、その中で上下何れかのページ外形に最も近い横書き文字行を選択するようにする。ここで、Bは文字行の一番左の矩形の中心であり、Cは一番右の矩形の中心である。なお、最適な横書き文字行の選択は、左右ページから各1本ずつのページ外形に最も近い横書き文字行を選択するものであっても良いし、左右ページをさらに上下部分に分け、その各4ブロックにおいて1本ずつのページ外形に最も近い横書き文字行を選択するものであっても良い。
"Selecting optimal horizontal text"
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 optimal ruled line selection criterion described above, and the horizontal writing character line length BC is set to a predetermined threshold as shown in FIG. On the condition that a part C of a horizontal writing line is covered within a long and constant width area (shaded area in FIG. 40) on either side of the binding boundary line, either upper or lower page Select the horizontal text line closest to the outline. Here, B is the center of the leftmost rectangle of the character line, and C is the center of the rightmost rectangle. The optimum horizontal writing character line may be selected by selecting the horizontal writing character line closest to the page outline from each of the left and right pages, or the left and right pages are further divided into upper and lower parts. A horizontally written character line that is closest to the page outline one by one in the block may be selected.

なお、上記2条件(横書き文字行の長さが予め定められた閾値より長く、かつ、綴じ部境界線を挟んだ左右の一定幅領域内に横書き文字行の一部がかかっている)については、その両方ではなく何れか一方のみを満足するものであっても良い。また、選択基準として上例では「ページ外形に最も近い」を用いているが、これに限るものではなく、「横書き文字行の湾曲が最も大きい」を用いても良い。ここで、「横書き文字行の湾曲」は横書き文字行の両端の文字外接矩形の中心座標の主走査方向の座標値の差で表すものとする。   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). , But not both of them, 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.

「最適横書き文字行の座標値の決定」
最適な横書き文字行が選択された場合には、横書き文字行の(主走査方向の)座標値を決定する。横書き文字行の(主走査方向の)座標値は、横書き文字行内の各文字外接矩形の中心点を連結し、直線部分と曲線部分とを近似して抽出することにより横書き文字行の(主走査方向の)座標値を決定することになる。より詳細には、図40に示すDは綴じ部境界線であり、BDの間は多項式近似曲線で(主走査方向の)座標値を推定し、一番左端のAとBとの間は近似直線の値で(主走査方向の)座標値を推定する。
"Determining 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. 40 is a binding boundary line, a coordinate value (in the main scanning direction) is estimated with a polynomial approximation curve between BDs, and an approximation between A and B at the leftmost end A coordinate value (in the main scanning direction) is estimated with a straight line value.

「不適切な横書き文字行の排除」
最後に不適切な横書き文字行を排除する。これは、前述したように多項式近似により座標値を推定する際に、多項式近似による推定曲線の形状が不適切である場合には補正の際にかえって歪みが増大する恐れがあるので、このような横書き文字行を排除するものである。不適切な近似曲線形状の例としては、前述した罫線の場合と同様であって、特に図示しないが、曲線がブック原稿の外側へ向かうような場合や、中心線を超えて大きく内側へ食い込むような場合である。
"Eliminating 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 that of the ruled line described above, and although not particularly illustrated, the curve may go outwards from the book document, or it may bite inwardly beyond the center line. This is the case.

なお、推定曲線の形状が不適切であるとして横書き文字行を排除した場合には、再び最適な横書き文字行を選択し、上記の処理を繰り返すことになる。   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.

以上の処理により、スキャン画像に横書き文字行が存在すると判断された場合には、左右各ページのいずれの位置に横書き文字行が存在しているのかという情報とともに横書き文字行を抽出し、RAM33に一時的に記憶する。   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.

「縦書き文字行に基づく横書き文字行の抽出」
次に、各縦書き文字行から横書き文字行を抽出する。
図41は、各縦書き文字行からの横書き文字行の抽出処理の流れを概略的に示すフローチャートである。図41に示すように、まず、縦書き文字行の行切り出し矩形を抽出する(S221)。なお、縦書き文字行の行切り出し矩形の抽出処理は、OCR等で一般に用いられている周知の技術をそのまま利用することができるので、その説明は省略する。図42は、抽出した行切り出し矩形を例示的に示す説明図である。
"Extracting horizontal text lines based on vertical text lines"
Next, a horizontal writing character line is extracted from each vertical writing character line.
FIG. 41 is a flowchart schematically showing the flow of processing for extracting horizontally written character lines from each vertically written character line. As shown in FIG. 41, first, a line cut-out rectangle of a vertically written character line is extracted (S221). 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. 42 is an explanatory diagram exemplarily illustrating the extracted row cutout rectangle.

次いで、縦書き文字行の先頭(もしくは末尾)のy座標が最大(もしくは最小)の縦書き文字行を抽出し、さらに、そこから予め定めた距離範囲内に先頭(もしくは末尾)が存在する縦書き文字行を抽出する(S222)。より具体的には、図42に示した例においては、図43に示すように、縦書き文字行の先頭文字のy座標が最大の縦書き文字行はAで示した縦書き文字行である。そして、その先頭位置から予め定めた距離範囲h内に存在する行先頭文字は、図43中、黒丸“●”で示した文字である。すなわち、黒丸“●”で示す文字を含む縦書き文字行のみを抽出し、それ以外の縦書き文字行B,Cは除外する。なお、hはスキャン画像の解像度によって定められる定数である。   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 writing character line is extracted (S222). More specifically, in the example shown in FIG. 42, as shown in FIG. 43, the vertical writing character line having the maximum 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.

次に、抽出した縦書き文字行の先頭(もしくは末尾)のy座標に関してヒストグラムを構成する(S223)。図44では、ページの左端に近い縦書き文字行Dを基準行とし、その先頭のy座標(yD)を基準座標としている。以後、yDに対して一定幅d(例えば抽出した縦書き文字行の平均幅の1/2)の範囲内に先頭が存在する縦書き文字行の数を、yDに関するヒストグラムの値とする。図44では、yDを示す直線を上下に挟む点線の範囲内に先頭が存在する縦書き文字行がその対象となる。したがって、ページの左端に近い縦書き文字行Dの右隣の縦書き文字行Eは、その範囲外である。このように、既存の基準座標の対象範囲に先頭が含まれない縦書き文字行が出現した場合は、その縦書き文字行を新たな基準行とし、その先頭座標を新たな基準座標(ここでは、yE)とする。また、縦書き文字行Eの右隣の縦書き文字行Fの行先頭座標はyDの対象範囲に含まれるので、新たな基準座標を設けることなく、yDに関するヒストグラムの値を1だけカウントアップする。   Next, a histogram is constructed for the y-coordinate at the beginning (or end) of the extracted vertical writing character line (S223). In FIG. 44, a vertically written character line D close to the left end of the page is set as a reference line, and the first y coordinate (yD) is set as a reference coordinate. Hereinafter, the number of vertically written character lines having a head within a range of a constant width d (for example, ½ of the average width of the extracted vertically written character lines) with respect to yD is set as a histogram value related to yD. In FIG. 44, a vertically written character line whose head exists within the range of a dotted line sandwiching a straight line indicating yD vertically 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, YE). Also, since the line start coordinate of the vertical writing character line F adjacent to the right of the vertical writing character line E is included in the target range of yD, the value of the histogram relating to yD is counted up by 1 without providing a new reference coordinate. .

以下、同様の処理を綴じ部境界線に向かって続けて行く。その結果、図44に示す例では、yDの対象範囲に含まれる縦書き文字行は斜線を施した矩形で囲まれた7つで、yEの対象範囲に含まれる縦書き文字行は網掛けを施した矩形で囲まれた4つとなる(これら以外の矩形で囲まれた縦書き文字行に関しても、基準行、基準座標と対象範囲がそれぞれ定められるが、図44では省略している)。なお、yDの対象範囲には本来無関係であるべき縦書き文字行Gも含まれているが、次のステップS224にてこれは除外される。   Thereafter, the same processing is continued toward the binding portion boundary line. As a result, in the example shown in FIG. 44, the vertical writing character lines included in the target range of yD are surrounded by a hatched rectangle, and the vertical writing character lines included in the target range of yE are shaded. (The reference line, the reference coordinates, and the target range are also determined for vertically written character lines surrounded by other rectangles, but are omitted in FIG. 44). In addition, although the vertical writing character line G which should be irrelevant is included in the target range of yD, this is excluded in the next step S224.

続いて、ステップS223にて構成したヒストグラムの中で、最大の値に対応する基準行の対象範囲に含まれる縦書き文字行の中で、最もページの左端(もしくは右端)にある縦書き文字行(基準行)を開始行として、綴じ部境界線へ向かって、先頭(もしくは末尾)のy座標が近接した縦書き文字行を抽出する(ステップS224)。図44では、基準座標yDの対象範囲に含まれる文字行が7つと最大であったので、その中の左端の縦書き文字行Dを開始行とし、開始行(縦書き文字行D)から綴じ部境界線へ向かって先頭のy座標が近接した縦書き文字行を抽出していく。   Subsequently, among the vertically written character lines included in the target range of the reference line corresponding to the maximum value in the histogram configured in step S223, the vertically written character line at the left end (or right end) of the page. 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 S224). In FIG. 44, the maximum number of character lines included in the target range of the reference coordinate yD is seven, so the leftmost vertical writing character line D is the start line, and binding is started from the starting line (vertical writing character line D). A vertically written character line with the leading y coordinate close to the partial boundary line is extracted.

ところで、開始行(縦書き文字行D)から綴じ部境界線へ向かって先頭のy座標が近接した縦書き文字行を抽出する際には、画像の歪みを生じていない部分と歪みを生じている部分とで処理内容を切り替える。   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.

まず、画像の歪みを生じていない部分における処理について図45を参照しつつ説明する。画像の歪みを生じていない部分では、着目行Hを基準として、次の2条件を満足する縦書き文字行を抽出する。
1.y座標の正方向(図45中、上方へ向かう方向)に関して、着目行Hの先頭位置から一定範囲内b1(例えば平均文字行幅の1/2)に抽出する縦書き文字行の先頭が存在すること
2.y座標の負方向(図45中、下方へ向かう方向)に関して、着目行Hの先頭位置から見てx座標の正方向(綴じ部境界線へ向かう方向)に対して予め定めた一定角度(ここでは、角度を直線の傾き(b2/a1)で表している)の範囲内に抽出する縦書き文字行の先頭が存在すること
すなわち、着目行Hの次の縦書き文字行Iの先頭は上記の範囲外なので除外することになるが、さらに次の縦書き文字行Jの先頭は範囲内に存在するので抽出することになる。以下、縦書き文字行Jを新たな着目行として同様の処理を続ける。
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. 45), 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. 1. What to do With respect to the negative direction of the y coordinate (the downward direction in FIG. 45), 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 of the straight line (b2 / a1). That is, the head of the vertical writing character line I next to the target row H is the above Since it is out of the range, it will be excluded, but the beginning of the next vertically written character line J will be extracted because it exists within the range. Hereinafter, the same processing is continued with the vertically written character line J as a new target line.

次に、画像の歪みを生じている部分における処理について図46を参照しつつ説明する。画像の歪みを生じている部分では、着目行Lを基準として、次の2条件を満足する縦書き文字行を抽出する。
1.y座標の負方向(図46中、下方へ向かう方向)に関して、着目行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を新たな着目行として同様の処理を続ける。
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. 46), 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 < 1. The head of the vertically written character line to be extracted exists within the range of (b3 / a2). 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.

さて、ここで問題となるのは、歪みを生じていない部分と歪みを生じている部分をいかに識別するかであるが、これは次のように行っている。すなわち、着目行と次の抽出行の先頭のy座標をそれぞれyC,yNとすると、“yN−yC”が一定値(例えば、平均文字行幅の1/4)以上となれば、それ以降を歪みを生じている部分とする。   The problem here is how to identify the non-distorted portion and the distorted portion as follows. That is, if yC at the beginning of the target line and the next extracted line are yC and yN, respectively, if “yN−yC” is a certain value (for example, ¼ of the average character line width) or more, It is assumed that the part is distorted.

以上の方法により図44から抽出した縦書き文字行を、図47において斜線を施した矩形で囲んで示す。   The vertically written character line extracted from FIG. 44 by the above method is shown by being surrounded by a hatched rectangle in FIG.

最後に、抽出した縦書き文字行の先頭(もしくは末尾)の位置座標に関する近似曲線多項式を算出する(ステップS225)。抽出した各縦書き文字行の行切り出し矩形の先頭を連結して外形を形成する場合には、図48に示すように、連結する各縦書き文字行の行切り出し矩形の上辺中心点に基づき、抽出した縦書き文字行の先頭の位置座標に関する近似曲線多項式を算出する。また、抽出した各縦書き文字行の行切り出し矩形の末尾を連結して外形を形成する場合には、図48に示すように、連結する各縦書き文字行の行切り出し矩形の下辺中心点に基づき、抽出した縦書き文字行の末尾の位置座標に関する近似曲線多項式を算出する。   Finally, an approximate curve polynomial relating to the position coordinates of the beginning (or end) of the extracted vertical writing character line is calculated (step S225). In the case of forming the outer shape by connecting the heads of the extracted line-cut rectangles of each vertical writing character line, as shown in FIG. 48, based on the center point of the upper side of the line-cutting rectangle of each vertical writing character line to be connected, An approximate curve polynomial is calculated regarding the position coordinates of the beginning of the extracted vertical character line. Also, in the case of forming the outer shape by connecting the end of the line cut rectangle of each extracted vertical character line, as shown in FIG. Based on this, an approximate curve polynomial is calculated regarding the position coordinate at the end of the extracted vertical writing line.

なお、最後に不適切な縦書き文字行の外形を排除する。これは、前述したように多項式近似により座標値を推定する際に、多項式近似による推定曲線の形状が不適切である場合には補正の際にかえって歪みが増大する恐れがあるので、このような縦書き文字行の外形を排除するものである。不適切な近似曲線形状の例としては、前述した罫線や横書き文字行の場合と同様であって、特に図示しないが、曲線がブック原稿の外側へ向かうような場合や、中心線を超えて大きく内側へ食い込むような場合である。   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. An example of an inappropriate approximate curve shape is the same as in the case of the ruled lines and horizontal text lines described above, and although not particularly illustrated, the curve is directed to the outside of the book document, or larger than the center line. This is the case when it bites inward.

なお、推定曲線の形状が不適切であるとして縦書き文字行の外形を排除した場合には、歪み補正用の縦書き文字行の外形は無いということになる。   If the outline of the vertically written character line is excluded because the shape of the estimated curve is inappropriate, this means that there is no outline of the vertically written character line for distortion correction.

以上の処理により、スキャン画像に縦書き文字行の外形が存在すると判断された場合には、左右各ページのいずれの位置に縦書き文字行の外形が存在しているのかという情報とともに縦書き文字行の外形を抽出し、RAM33に一時的に記憶する。   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.

なお、以下においては、横書き文字行及び縦書き文字行の外形を文字行として扱うものとする。   In the following, it is assumed that the outer shape of a horizontal character line and a vertical character line is treated as a character line.

以上、ステップS211〜S213の処理により、図26のページ外形/罫線/文字行の抽出処理(ステップS201)が終了する。   As described above, the page outline / ruled line / character line extraction process (step S201) in FIG. 26 is completed by the processes in steps S211 to S213.

続くステップS202においては、画像歪み補正処理を実行する。図49は歪み補正補処理の概略を示すフローチャート図である。   In a succeeding step S202, an image distortion correction process is executed. FIG. 49 is a flowchart showing an outline of the distortion correction supplement processing.

歪み補正補処理は、概略的には、歪み補正(伸長)に際しての基準となる線(基準線)としてスキャン画像の上辺(もしくは下辺)の近傍に位置するページ外形/罫線/文字行の何れかを選択する処理(ステップS301:基準線選択処理)、基準線に対応するものであって補正率(伸長率)の算出用の参照線としてスキャン画像の上辺(もしくは下辺)の近傍に位置するページ外形/罫線/文字行の何れかを選択する処理(ステップS302:参照線選択処理)、基準線が罫線や文字行の場合に、基準線より下部の画像情報の欠落を最小限にするための仮想的なページ外形を算出する処理(ステップS303:仮想ページ外形算出処理)、仮想的なページ外形に基づいてスキャン画像に伸長処理を施して主走査方向の歪みを補正する処理(ステップS304:主走査方向歪み補正処理)、補正画像の文字外接矩形に基づいてスキャン画像に伸長処理を施して副走査方向の歪みを補正する処理(ステップS305:副走査方向歪み補正処理)により構成されている。このステップS202の処理については公知であるため、詳細な説明は省略する(その詳細については、特開2003−69807号公報等を参照)。   In general, the distortion correction supplement processing is any one of page outline / ruled line / character line positioned near the upper side (or lower side) of the scanned image as a reference line (reference line) for distortion correction (expansion). (Step S301: reference line selection process), a page corresponding to the reference line and positioned in the vicinity of the upper side (or lower side) of the scanned image as a reference line for calculating the correction rate (expansion rate) Processing for selecting any one of outline / ruled line / character line (step S302: reference line selecting process), and when the reference line is a ruled line or character line, to minimize the loss of image information below the reference line A process for calculating a virtual page outline (step S303: virtual page outline calculation process), a process for performing a decompression process on the scanned image based on the virtual page outline to correct distortion in the main scanning direction ( (Step S304: main scanning direction distortion correction process), and a process of performing decompression processing on the scanned image based on the character circumscribed rectangle of the corrected image to correct distortion in the sub scanning direction (step S305: sub scanning direction distortion correction process). Has been. Since the process in step S202 is known, detailed description thereof is omitted (for details, see Japanese Patent Laid-Open No. 2003-69807).

以上のように、本実施の形態の画像処理装置によれば、有限な線光源の照明強度をモデル化することで、ブック原稿のスキャン画像において、綴じ部の両端付近の陰影を補正することができる。また、明度プロフィールを作成することで、平坦部の明度を用いて綴じ部の地肌を補正することができる。さらに、スキャン画像の綴じ部の歪みを補正することができる。   As described above, according to the image processing apparatus of the present embodiment, it is possible to correct shadows near both ends of the binding portion in a scanned image of a book document by modeling the illumination intensity of a finite line light source. it can. Moreover, the background of a binding part can be correct | amended using the brightness of a flat part by producing a brightness profile. Furthermore, it is possible to correct the distortion of the binding portion of the scanned image.

デジタル複写機のスキャナ部の構成を示す縦断正面図である。FIG. 2 is a longitudinal front view showing a configuration of a scanner unit of a digital copying machine. スキャナ部を搭載したデジタル複写機の上部部分を示す斜視図である。It is a perspective view which shows the upper part of the digital copying machine carrying a scanner part. スキャナ部の制御系の電気的な接続を示すブロック図である。It is a block diagram which shows the electrical connection of the control system of a scanner part. 画像処理部の基本的な内部構成を示すブロック図である。It is a block diagram which shows the basic internal structure of an image process part. メイン制御部のハードウェア構成図である。It is a hardware block diagram of a main control part. コンタクトガラスに載置されたブック原稿を示す図である。It is a figure which shows the book original document mounted on the contact glass. ページ綴じ部付近に歪みが生じたスキャン画像を示す。A scan image in which distortion occurs in the vicinity of the page binding portion is shown. ブック原稿をスキャンする場合の光源とブック原稿の構成図である。It is a block diagram of a light source and a book document when scanning a book document. 照明光強度の分布の一例を示す図である。It is a figure which shows an example of distribution of illumination light intensity. ブック原稿の画像処理の手順を示すフローチャート図である。FIG. 6 is a flowchart showing a procedure for image processing of a book document. 地肌補正処理1の手順を示すフローチャート図である。It is a flowchart figure which shows the procedure of the background correction process. 一次元画像明度V(x)のヒストグラムの一例である。It is an example of the histogram of one-dimensional image brightness V (x). 一次元画像の画素と明度の関係の一例を示す図である。It is a figure which shows an example of the relationship between the pixel of a one-dimensional image, and a brightness. 明度v(y)のヒストグラムの一例である。It is an example of a histogram of brightness v (y). 地肌補正処理2の手順を示すフローチャート図である。It is a flowchart figure which shows the procedure of the background correction process. 地肌補正処理3の手順を示すフローチャート図である。It is a flowchart figure which shows the procedure of the background correction process. 陰影補正の処理手順を示すフローチャート図である。It is a flowchart figure which shows the process sequence of shadow correction. 1次元差分フィルターの一例である。It is an example of a one-dimensional difference filter. 曲がり始めの位置の検出手順を示すフローチャート図である。It is a flowchart figure which shows the detection procedure of the position of the start of bending. 平坦部及び綴じ部の 明度プロフィールの一例である。It is an example of the brightness profile of a flat part and a binding part. 曲面部を適当な個数の領域に分割したスキャン画像を示す図である。It is a figure which shows the scan image which divided | segmented the curved surface part into the appropriate number of area | regions. 地肌補正を行なった後に綴じ部両端付近の陰影を補正する補正手順のフローチャート図である。It is a flowchart figure of the correction | amendment procedure which correct | amends the shadow of the binding part vicinity after performing background correction | amendment. 綴じ部に垂直に複数の領域Lに分割したスキャン画像を示す図である。It is a figure which shows the scan image divided | segmented into the some area | region L perpendicular | vertical to the binding part. 綴じ部の長さ方向と平行に複数の領域Lに分割したスキャン画像を示す図である。It is a figure which shows the scan image divided | segmented into the several area | region L in parallel with the length direction of the binding part. 綴じ部に垂直と平行に分割したスキャン画像を示す図である。It is a figure which shows the scan image divided | segmented perpendicularly | parallel to the binding part. ゆがみ形状補正処理の概要を説明するフローチャート図である。It is a flowchart figure explaining the outline | summary of a distortion shape correction process. ページ外形/罫線/文字行の抽出処理の流れを概略的に示すフローチャートである。It is a flowchart which shows roughly the flow of the extraction process of a page external shape / ruled line / character line. 上端にページ外形が存在するスキャン画像の一例を示す説明図である。It is explanatory drawing which shows an example of the scanning image which has a page external shape in an upper end. 図50に示したスキャン画像の綴じ部境界線左側の黒画素ヒストグラムである。FIG. 51 is a black pixel histogram on the left side of the binding boundary line of the scan image shown in FIG. 50. FIG. 2値化した画像に矩形抽出を施した結果を示す説明図である。It is explanatory drawing which shows the result of having performed rectangular extraction to the binarized image. 罫線がノイズと接触している場合を示す説明図である。It is explanatory drawing which shows the case where a ruled line is contacting with noise. 表が含まれる画像を示す説明図である。It is explanatory drawing which shows the image containing a table | surface. 一定値未満のランのみを登録し矩形を抽出した結果を示す説明図である。It is explanatory drawing which shows the result of having registered only the run below a fixed value and extracting the rectangle. 副走査方向に矩形が細切れに抽出されてしまう場合を示す説明図である。It is explanatory drawing which shows the case where a rectangle will be extracted to a thin piece in the subscanning direction. 矩形統合を施した例を示す説明図である。It is explanatory drawing which shows the example which performed rectangle integration. 矩形抽出を行った結果を示す説明図である。It is explanatory drawing which shows the result of having performed rectangle extraction. 図50に示した画像の副走査方向の黒白反転数ヒストグラムである。It is a black-and-white inversion number histogram of the image shown in FIG. 50 in the sub-scanning direction. 図50に示した画像の主走査方向の黒白反転数ヒストグラムである。It is a black-and-white inversion number histogram of the image shown in FIG. 50 in the main scanning direction. スキャン画像の文字外接矩形抽出処理および文字行抽出処理の結果の一例を示す説明図である。It is explanatory drawing which shows an example of the result of the character circumscribed rectangle extraction process of a scan image, and a character line extraction process. 最適な横書き文字行の選択を示す説明図である。It is explanatory drawing which shows selection of the optimal horizontal writing character line. 各縦書き文字行からの横書き文字行の抽出処理の流れを概略的に示すフローチャートである。It is a flowchart which shows roughly the flow of the extraction process of the horizontal writing character line from each vertical writing character line. 抽出した行切り出し矩形を例示的に示す説明図である。It is explanatory drawing which shows the extracted line cut-out rectangle as an example. 予め定めた距離範囲内に先頭が存在する縦書き文字行を例示的に示す説明図である。It is explanatory drawing which shows illustratively the vertical writing character line in which the head exists within the predetermined distance range. 抽出した縦書き文字行の先頭のy座標に関してヒストグラムを構成する状態を示す説明図である。It is explanatory drawing which shows the state which comprises a histogram regarding the y coordinate of the head of the extracted vertical writing character line. 画像の歪みを生じていない部分における処理を示す説明図である。It is explanatory drawing which shows the process in the part which has not produced distortion of an image. 画像の歪みを生じている部分における処理を示す説明図である。It is explanatory drawing which shows the process in the part which has produced the distortion of an image. 抽出した縦書き文字行を示す説明図である。It is explanatory drawing which shows the extracted vertical writing character line. 縦書き文字行の行切り出し矩形を示す説明図である。It is explanatory drawing which shows the line cut-out rectangle of a vertical writing character line. 画像歪み補正処理の流れを概略的に示すフローチャートである。It is a flowchart which shows the flow of an image distortion correction process roughly. ブック原稿のスキャン画像の一例である。It is an example of a scanned image of a book document.

符号の説明Explanation of symbols

1 スキャナ部
2 コンタクトガラス
3 線光源(露光ランプ)
19 メイン制御部
20 画像処理部
40 ブック原稿
41 綴じ部
41A,B 綴じ部両端付近
1 Scanner unit 2 Contact glass 3 Line light source (exposure lamp)
19 Main control unit 20 Image processing unit 40 Book document 41 Binding unit 41A, B Near both ends of binding unit

Claims (20)

コンタクトガラス上に載置されたブック原稿を読み取る画像読取手段と、
前記ブック原稿のスキャン画像の画素値から前記ブック原稿の平坦部を特定し、該平坦部の画素値を基準に、綴じ部両端を結ぶ方向の一次元画像と直交する方向の位置yに対する前記スキャン画像の明度を正規化して正規化明度プロフィールを生成する第一の手段と、
前記正規化明度プロフィールを用いて前記スキャン画像の綴じ部付近の地肌を補正する地肌補正手段と、
一次元画像と平行な方向の位置xに対する明度の分布に対し、明度が一次元画像の明度分布の略中央値となる位置をx0、略中央値と漸近的に一定となる明度との差をa、略中央値を通る位置xに対する明度の傾きをb、明度分布の略中央値をc、として、明度を
と定義した際、前記x0に所定値を与え、一次元画像のあるxにおける明度を前記式に代入することで前記bを推定し、一次元画像の明度分布を求める第2の手段と、
前記明度分布を用いて前記スキャン画像の綴じ部両端付近の陰影を補正する陰影補正手段と、
を有することを特徴とする画像処理装置。
Image reading means for reading a book document placed on the contact glass;
The scan for a position y in a direction orthogonal to a one-dimensional image in a direction connecting both ends of the binding portion is specified based on a pixel value of a scan image of the book document and a pixel value of the book document is used as a reference. A first means of normalizing the brightness of the image to generate a normalized brightness profile;
A background correction means for correcting the background near the binding portion of the scanned image using the normalized brightness profile;
For the lightness distribution for the position x in the direction parallel to the one-dimensional image, the position where the lightness is approximately the median value of the lightness distribution of the one-dimensional image is x0, and the difference between the approximately median value and the lightness that is asymptotically constant a, the gradient of brightness with respect to a position x passing through the approximate median value is b, and the approximate median value of the brightness distribution is c, the brightness is
A second value for giving a predetermined value to x0, estimating b by substituting the lightness at x in the one-dimensional image into the equation, and obtaining the lightness distribution of the one-dimensional image;
Shadow correction means for correcting shadows near both ends of the binding portion of the scanned image using the brightness distribution ;
An image processing apparatus comprising:
前記第2の手段は、一次元画像の画素値にフィルタ演算を施し、前記スキャン画像の両端の座標xl、xrを推定し、座標xlよりも外側又は座標xrよりも外側の位置を前記x0の所定値とする
ことを特徴とする請求項1記載の画像処理装置。
The second means performs a filter operation on the pixel value of the one-dimensional image, estimates the coordinates xl and xr at both ends of the scanned image, and sets a position outside the coordinate xl or outside the coordinate xr to the value of x0. A predetermined value ,
The image processing apparatus according to claim 1.
前記地肌補正手段は、画素毎にRGB値から明度、彩度及び色相を求め、
前記ブック原稿の画素毎に有彩色か無彩色かを判定し、
有彩色の場合には彩度と明度の両方に前記正規化明度プロフィールによる地肌補正を行い、
無彩色の場合には明度にのみ前記正規化明度プロフィールによる地肌補正を行い、
画素毎に、明度、彩度及び色相からRGB値を求める
ことを特徴とする請求項1又は2記載の画像処理装置。
The background correction means obtains brightness, saturation and hue from RGB values for each pixel,
Determine whether each pixel of the book manuscript is chromatic or achromatic,
In the case of a chromatic color, perform background correction by the normalized brightness profile for both saturation and brightness,
In the case of an achromatic color, the background correction by the normalized brightness profile is performed only for the brightness,
For each pixel, an RGB value is obtained from lightness, saturation, and hue .
The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus.
前記地肌補正手段は、画素毎に明度を求め、
画素値のR値、G値、B値のそれぞれに前記正規化明度プロフィールによる地肌補正を行う
ことを特徴とする請求項1又は2記載の画像処理装置。
The background correction means obtains brightness for each pixel,
A background correction based on the normalized brightness profile is performed on each of the R value, the G value, and the B value of the pixel value .
The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus.
前記地肌補正手段は、
画素値のR値、G値、B値のそれぞれの前記正規化明度プロフィールを求め、
R値、G値、B値のそれぞれに、R値、G値、B値それぞれの前記正規化明度プロフィールによる地肌補正を行う、
ことを特徴とする請求項1又は2記載の画像処理装置。
The background correction means
Obtaining the normalized brightness profile of each of the R value, G value, and B value of the pixel value;
For each of the R value, the G value, and the B value, background correction based on the normalized brightness profile of each of the R value, the G value, and the B value is performed.
The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus.
前記陰影補正手段は、
一次元画像と直交する方向の位置yに対応づけて、前記スキャン画像の明度分布を示す明度プロフィールを生成し、
前記スキャン画像の綴じ部にて前記明度プロフィールが下向きのピークを示す位置yを中心に所定の領域を特定し、
前記明度分布を用いて前記スキャン画像の前記領域のみ、綴じ部両端付近の陰影を補正する、
ことを特徴とする請求項1記載の画像処理装置。
The shadow correction means includes
In correspondence with the position y in the direction orthogonal to the one-dimensional image, a lightness profile indicating the lightness distribution of the scanned image is generated,
A predetermined area is identified around a position y where the brightness profile shows a downward peak in the binding portion of the scanned image,
Using the brightness distribution, only the region of the scanned image is corrected for shadows near both ends of the binding portion,
2. The image processing apparatus according to claim 1, wherein:
前記陰影補正手段は、
前記領域の前記スキャン画像を一次元画像と平行な複数の領域に分割し、
前記第2の手段は、分割後の前記領域の境界の一次元画像についてのみ一次元画像の前記明度分布を求め、
一次元画像と直交する方向に前記明度分布を補完して、前記明度分布を用いて前記スキャン画像の綴じ部両端付近の陰影を補正する、
ことを特徴とする請求項6記載の画像処理装置。
The shadow correction means includes
Dividing the scanned image of the region into a plurality of regions parallel to the one-dimensional image;
The second means obtains the brightness distribution of the one-dimensional image only for the one-dimensional image of the boundary of the region after the division,
Complementing the lightness distribution in a direction orthogonal to the one-dimensional image, and correcting shadows near both ends of the binding portion of the scanned image using the lightness distribution,
The image processing apparatus according to claim 6.
前記陰影補正手段は、
前記スキャン画像を、一次元画像と直交する方向の複数の領域に分割し、
分割された領域毎に、前記明度分布を用いて前記スキャン画像の綴じ部両端付近の陰影を補正する
ことを特徴とする請求項1記載の画像処理装置。
The shadow correction means includes
Dividing the scanned image into a plurality of regions in a direction orthogonal to the one-dimensional image;
For each divided region, the shadow distribution near both ends of the binding portion of the scanned image is corrected using the brightness distribution .
The image processing apparatus according to claim 1.
前記スキャン画像の外縁が内側に入り込んでいる形状に基づき、一次元画像と直交する方向の前記スキャン画像の中央部を特定して、中央部から2つの領域に分割し、
前記地肌補正手段は、分割された領域毎に地肌補正を行い、
前記陰影補正手段は、分割された領域毎に前記スキャン画像の綴じ部両端付近の陰影を補正する
ことを特徴とする請求項1記載の画像処理装置。
Based on the shape in which the outer edge of the scanned image has entered inside, identify the central portion of the scanned image in the direction orthogonal to the one-dimensional image, and divide into two regions from the central portion,
The background correction means performs background correction for each divided area,
The shadow correction means corrects shadows near both ends of the binding portion of the scan image for each divided area .
The image processing apparatus according to claim 1.
画像読取手段が、コンタクトガラス上に載置されたブック原稿を読み取るステップと、
第一の手段が、前記ブック原稿のスキャン画像の画素値から前記ブック原稿の平坦部を特定し、該平坦部の画素値を基準に、綴じ部両端を結ぶ方向の一次元画像と直交する方向の位置yに対する前記スキャン画像の明度を正規化して正規化明度プロフィールを生成するステップと、
地肌補正手段が、前記正規化明度プロフィールを用いて前記スキャン画像の綴じ部付近の地肌を補正するステップと、
第2の手段が、一次元画像と平行な方向の位置xに対する明度の分布に対し、明度が一次元画像の明度分布の略中央値となる位置をx0、略中央値と漸近的に一定となる明度との差をa、略中央値を通る位置xに対する明度の傾きをb、明度分布の略中央値をc、として、明度を
と定義した際、前記x0に所定値を与え、一次元画像のあるxにおける明度を前記式に代入することで前記bを推定し、一次元画像の明度分布を求めるステップと、
陰影補正手段が、前記明度分布を用いて前記スキャン画像の綴じ部両端付近の陰影を補正するステップと、
を有することを特徴とする画像処理方法。
An image reading means for reading a book document placed on the contact glass;
A first means identifies a flat portion of the book document from pixel values of a scanned image of the book document, and a direction orthogonal to a one-dimensional image in a direction connecting both ends of the binding portion with reference to the pixel value of the flat portion Normalizing the brightness of the scanned image with respect to a position y to generate a normalized brightness profile;
A background correction unit correcting the background near the binding portion of the scanned image using the normalized brightness profile;
The second means sets the position where the lightness is approximately the median value of the lightness distribution of the one-dimensional image to x0, asymptotically constant with the approximate median, with respect to the lightness distribution with respect to the position x in the direction parallel to the one-dimensional image. The brightness is defined as a, where b is the slope of the brightness with respect to the position x passing through the approximate median, and c is the approximate median of the brightness distribution.
A predetermined value is given to x0, and b is estimated by substituting the lightness at a certain x of the one-dimensional image into the equation to obtain the lightness distribution of the one-dimensional image;
A shadow correcting means for correcting shadows near both ends of the binding portion of the scanned image using the brightness distribution ;
An image processing method comprising:
前記第2の手段は、一次元画像の画素値にフィルタ演算を施し、前記スキャン画像の両端の座標xl、xrを推定し、座標xlよりも外側又は座標xrよりも外側の位置を前記x0の所定値とする
ことを特徴とする請求項10記載の画像処理方法。
The second means performs a filter operation on the pixel value of the one-dimensional image, estimates the coordinates xl and xr at both ends of the scanned image, and sets a position outside the coordinate xl or outside the coordinate xr to the value of x0. A predetermined value ,
The image processing method according to claim 10.
前記陰影補正手段が、画素毎にRGB値から明度、彩度及び色相を求めるステップと、
前記ブック原稿の画素毎に有彩色か無彩色かを判定するステップと、
有彩色の場合には彩度と明度の両方に前記正規化明度プロフィールによる地肌補正を行い、無彩色の場合には明度にのみ前記正規化明度プロフィールによる地肌補正を行うステップと、
画素毎に、明度、彩度及び色相からRGB値を求めるステップと、
を有することを特徴とする請求項10又は11記載の画像処理方法。
The shading correction means for obtaining brightness, saturation and hue from RGB values for each pixel;
Determining whether each pixel of the book document is a chromatic color or an achromatic color;
Performing background correction with the normalized brightness profile for both saturation and brightness in the case of chromatic color, and performing background correction with the normalized brightness profile only for brightness in the case of achromatic color; and
Obtaining RGB values from lightness, saturation and hue for each pixel;
The image processing method according to claim 10 or 11, further comprising:
前記陰影補正手段が、画素毎に明度を求めるステップと、
画素値のR値,G値、B値のそれぞれに前記正規化明度プロフィールによる地肌補正を行うステップと、
を有することを特徴とする請求項10又は11記載の画像処理方法。
The shading correction means obtains brightness for each pixel;
Performing background correction using the normalized brightness profile for each of the R value, G value, and B value of the pixel value;
The image processing method according to claim 10 or 11, further comprising:
前記陰影補正手段が、
画素値のR値,G値、B値のそれぞれの前記正規化明度プロフィールを求めるステップと、
R値,G値、B値のそれぞれに、R値,G値、B値それぞれの前記正規化明度プロフィールによる地肌補正を行うステップと
を有することを特徴とする請求項10又は11記載の画像処理方法。
The shadow correction means is
Obtaining the normalized brightness profile of each of the R value, G value, and B value of the pixel value;
Performing background correction on each of the R value, the G value, and the B value by the normalized brightness profile of each of the R value, the G value, and the B value ;
The image processing method according to claim 10 or 11, further comprising:
前記陰影補正手段は、
一次元画像と直交する方向の位置yに対応づけて、前記スキャン画像の明度分布を示す明度プロフィールを生成するステップと、
前記スキャン画像の綴じ部にて前記明度プロフィールが下向きのピークを示す位置yを中心に所定の領域を特定するステップと、
前記明度分布を用いて前記スキャン画像の前記領域のみ、綴じ部両端付近の陰影を補正するステップと
を有することを特徴とする請求項10記載の画像処理方法。
The shadow correction means includes
Generating a brightness profile indicating the brightness distribution of the scanned image in association with a position y in a direction orthogonal to the one-dimensional image;
Identifying a predetermined region around a position y where the lightness profile shows a downward peak in the binding portion of the scanned image;
Correcting only the region of the scanned image using the lightness distribution, and shadows near both ends of the binding portion ;
The image processing method according to claim 10, further comprising:
前記陰影補正手段が、前記領域の前記スキャン画像を一次元画像と平行な複数の領域に分割するステップと、
前記第2の手段が、分割された前記領域の境界の一次元画像についてのみ一次元画像の前記明度分布を求めるステップと、
一次元画像と直交する方向に前記明度分布を補完して、前記明度分布を用いて前記スキャン画像の綴じ部両端付近の陰影を補正するステップと
を有することを特徴とする請求項15記載の画像処理方法。
The shadow correcting means dividing the scanned image of the region into a plurality of regions parallel to a one-dimensional image;
The second means determines the brightness distribution of the one-dimensional image only for the one-dimensional image of the boundary of the divided region;
Complementing the brightness distribution in a direction orthogonal to the one-dimensional image, and correcting shadows near both ends of the binding portion of the scanned image using the brightness distribution ;
16. The image processing method according to claim 15, further comprising:
前記陰影補正手段が、前記スキャン画像を、一次元画像と直交する方向の複数の領域に分割するステップと、
分割された領域毎に、前記明度分布を用いて前記スキャン画像の綴じ部両端付近の陰影を補正するステップと、
を有することを特徴とする請求項10記載の画像処理方法
The shadow correcting means divides the scanned image into a plurality of regions in a direction orthogonal to the one-dimensional image;
For each divided region, correcting shadows near both ends of the binding portion of the scanned image using the brightness distribution;
The image processing method according to claim 10, wherein the having.
前記スキャン画像の外縁が内側に入り込んでいる形状に基づき、一次元画像と直交する方向の前記スキャン画像の中央部を特定して、中央部から2つの領域に分割するステップと、
前記地肌補正手段が、分割された領域毎に地肌補正を行うステップと、
前記陰影補正手段が、分割された領域毎に前記スキャン画像の綴じ部両端付近の陰影を補正するステップと、
を有することを特徴とする請求項10記載の画像処理方法。
Identifying a central portion of the scan image in a direction orthogonal to the one-dimensional image based on a shape in which an outer edge of the scan image is embedded inside, and dividing the region into two regions from the central portion;
The background correction means performing background correction for each divided area;
The shading correction means for correcting shading near both ends of the binding portion of the scanned image for each divided region;
The image processing method according to claim 10, wherein the having.
コンピュータに、請求項10ないし18いずれか記載の画像処理方法を実行させるためのプログラム。 A program for causing a computer to execute the image processing method according to any one of claims 10 to 18. 請求項19記載のプログラムを格納したコンピュータ読み取り可能な記憶媒体。 A computer-readable storage medium storing the program according to claim 19.
JP2005362377A 2005-12-15 2005-12-15 Image processing apparatus, image processing method, program, and storage medium storing program Expired - Fee Related JP4577844B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005362377A JP4577844B2 (en) 2005-12-15 2005-12-15 Image processing apparatus, image processing method, program, and storage medium storing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005362377A JP4577844B2 (en) 2005-12-15 2005-12-15 Image processing apparatus, image processing method, program, and storage medium storing program

Publications (2)

Publication Number Publication Date
JP2007166429A JP2007166429A (en) 2007-06-28
JP4577844B2 true JP4577844B2 (en) 2010-11-10

Family

ID=38248787

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005362377A Expired - Fee Related JP4577844B2 (en) 2005-12-15 2005-12-15 Image processing apparatus, image processing method, program, and storage medium storing program

Country Status (1)

Country Link
JP (1) JP4577844B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5001115B2 (en) * 2007-10-30 2012-08-15 京セラドキュメントソリューションズ株式会社 Image forming apparatus
JP7380270B2 (en) 2020-01-31 2023-11-15 富士フイルムビジネスイノベーション株式会社 Image processing device and image processing program

Also Published As

Publication number Publication date
JP2007166429A (en) 2007-06-28

Similar Documents

Publication Publication Date Title
US7016081B2 (en) Image distortion correction apparatus, distortion correction method therefor, recording media, image scanner and image construction apparatus
US20050280849A1 (en) Correcting background color of a scanned image
US7149349B2 (en) Scanning and detecting a number of images
JP4646130B2 (en) Image processing apparatus, image processing method, program, and storage medium storing program
JP4162633B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, program, and storage medium
JP4577844B2 (en) Image processing apparatus, image processing method, program, and storage medium storing program
JP4111697B2 (en) Image brightness correction apparatus, image reading apparatus, image forming apparatus, and program
JP3983721B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP2009303164A (en) Image reading apparatus and method of controlling the same
JP4577845B2 (en) Image processing apparatus, image processing method, program, and storage medium storing program
JP2000261653A (en) Image processing unit
JP4507124B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP4318874B2 (en) Blurred image correction apparatus, image reading apparatus, image forming apparatus, and program
JP3979639B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP4073877B2 (en) Image processing method, image processing apparatus, image forming apparatus, and computer program
JP2003143407A (en) Picture luminance correcting apparatus, picture read apparatus, picture forming apparatus, program, and memorizing medium
JP4093970B2 (en) Image distortion correction apparatus, program, and storage medium
JP4480291B2 (en) Image distortion correction apparatus, storage medium, program, image distortion correction method, image reading apparatus, and image forming apparatus
JP4198613B2 (en) Image distortion correction apparatus, program, and storage medium
JP2003069807A (en) Image distortion correction device, image reader, image forming device and program
JP4257708B2 (en) Shadow area determination method, image processing method, shadow area determination apparatus, image processing apparatus, image forming apparatus, image reading apparatus, computer program, and recording medium
JP2003204428A (en) Image correcting device, image reader, image forming apparatus program, and recording medium
JP4061256B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, and program
JP2004328705A (en) Picture distortion correction device, image reader, image forming device, picture distortion correction method, picture distortion correction program, and recording medium
JP3877142B2 (en) Image distortion correction apparatus, image reading apparatus, image forming apparatus, program, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081211

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100323

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100413

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20100423

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20100423

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100611

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100820

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

Free format text: PAYMENT UNTIL: 20130903

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4577844

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees