JP2002077578A - Apparatus and method for correcting distortion as well as distortion correction program recording computer readable recording medium - Google Patents

Apparatus and method for correcting distortion as well as distortion correction program recording computer readable recording medium

Info

Publication number
JP2002077578A
JP2002077578A JP2000260376A JP2000260376A JP2002077578A JP 2002077578 A JP2002077578 A JP 2002077578A JP 2000260376 A JP2000260376 A JP 2000260376A JP 2000260376 A JP2000260376 A JP 2000260376A JP 2002077578 A JP2002077578 A JP 2002077578A
Authority
JP
Japan
Prior art keywords
information
document
distortion correction
imaging unit
image
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.)
Pending
Application number
JP2000260376A
Other languages
Japanese (ja)
Inventor
Daisaku Horie
大作 保理江
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.)
Minolta Co Ltd
Original Assignee
Minolta 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 Minolta Co Ltd filed Critical Minolta Co Ltd
Priority to JP2000260376A priority Critical patent/JP2002077578A/en
Publication of JP2002077578A publication Critical patent/JP2002077578A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an apparatus for correcting distortion capable of more accurately correcting the distortion of a photographed image generated due to that a height of the surface to be photographed is not uniform without depending upon photographing conditions. SOLUTION: A method for correcting the distortion comprises the steps of conducting a predetermined preprocessing input image data such as an original in a two-page spread or the like (S301), and executing a process of forming an edge image (S303). The method further comprises the steps of detecting the upper end and the lower end of the original from the formed edge image (S305). The method also includes a step of detecting a relative position of an imaging unit and the original from information of the upper and lower ends of the detected original (S307). The method also includes a step of selecting the original end at a position further than the imaging unit of the upper and lower ends of the original (S308). The method also includes a step of calculating height information at each point on the original by using the selected original end information, a known distance from the imaging unit to the original and the relative position of the imaging unit (S309). The method also includes a step of finally correcting a geometrical deformation using the height information for input image data (S311).

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は歪み補正装置および
その方法ならびに歪み補正プログラムを記録したコンピ
ュータ読み取り可能な記録媒体に関し、特に、本などの
見開き原稿を撮影した画像に対して、あたかも原稿が平
面であるかのような画像を得ることのできる歪み補正装
置およびその方法ならびに歪み補正プログラムを記録し
たコンピュータ読み取り可能な記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a distortion correction apparatus and method, and a computer-readable recording medium on which a distortion correction program is recorded. TECHNICAL FIELD The present invention relates to a distortion correction device and method capable of obtaining an image as if it were a computer, and a computer-readable recording medium that stores a distortion correction program.

【0002】[0002]

【従来の技術】製本された本等の見開き原稿を上方から
撮影すると、原稿台から原稿表面(撮影対象面)までの
高さが均一でないために、歪んだ画像が得られる。図2
2に、見開き本を上方から撮影した場合に得られる歪ん
だ画像の一例を示す。
2. Description of the Related Art When a double-page spread document such as a bound book is photographed from above, a distorted image is obtained because the height from the platen to the surface of the document (surface to be photographed) is not uniform. FIG.
FIG. 2 shows an example of a distorted image obtained when a facing book is photographed from above.

【0003】本図を参照して、撮影された見開き本2の
画像は、丸で囲んだ領域aのように、文字列に歪みが生
じ、位置毎に異なる回転を含む。さらに、丸で囲んだ領
域bのように、画像の位置毎に文字のサイズが異なり、
また、文字変形が生じる。したがって、このような歪ん
だ画像からは文字認識を行なうことが困難であった。な
お、このような画像の歪みの問題は、文字領域に限られ
ず、写真領域や罫線で囲まれた領域等についても同様に
生じる。
Referring to FIG. 1, a photographed image of spread book 2 has a character string that is distorted and includes a different rotation for each position, as indicated by a circled area a. Furthermore, as in a region b surrounded by a circle, the size of the character is different for each position of the image,
In addition, character deformation occurs. Therefore, it has been difficult to perform character recognition from such a distorted image. It should be noted that such a problem of image distortion is not limited to a character region, but also occurs in a photograph region, a region surrounded by ruled lines, and the like.

【0004】以下、図23および図24を用いて、画像
の歪みが生じる様子を、原稿画像の垂直方向と水平方向
とに分けて簡単に説明する。
The manner in which an image is distorted will be briefly described below with reference to FIGS. 23 and 24 separately for a vertical direction and a horizontal direction of an original image.

【0005】まず、垂直方向に生じる歪みについて説明
する。図23は、原稿画像の水平方向の位置によって、
画像のサイズが変化する様子を示した図である。本図を
参照して、ここでは、見開き本2を真横から見た図を模
式的に示している。撮像部は、見開き本2のほぼ中央付
近(点P0)上方の点P1に位置している。見開き本2
の撮影面上の点Aや点Bは、原稿台からの高さがそれぞ
れ異なる。このため、撮像部のある点P1からの垂直距
離もそれぞれ異なる。
First, a description will be given of the distortion generated in the vertical direction. FIG. 23 shows the relationship between the position of a document image in the horizontal direction.
FIG. 7 is a diagram illustrating a state in which the size of an image changes. Referring to this drawing, here, a diagram of the facing book 2 viewed from the side is schematically shown. The imaging unit is located at a point P1 substantially above the center of the facing book 2 (point P0) and above. Facing book 2
The points A and B on the photographing surface have different heights from the platen. For this reason, the vertical distance from a certain point P1 of the imaging unit is also different.

【0006】撮像部からの垂直距離が異なると、それに
応じて画像のサイズが変化する。具体的には、垂直距離
が短いほど画像のサイズは大きくなり、垂直距離が長い
ほど画像のサイズは小さくなる。したがって、下側の図
に示すように、原稿の水平方向の位置に応じて、すなわ
ち、原稿台からの高さに応じて、画像サイズが変化し、
解像度の変化が生じる。
[0006] When the vertical distance from the image pickup unit is different, the size of the image changes accordingly. Specifically, the smaller the vertical distance, the larger the size of the image, and the longer the vertical distance, the smaller the size of the image. Therefore, as shown in the lower diagram, the image size changes according to the horizontal position of the document, that is, according to the height from the platen,
A change in resolution occurs.

【0007】次に、水平方向に生じる歪みについて説明
する。図24は、原稿画像の水平方向に画像の伸び縮み
が生じる様子を示した図である。撮影条件は図23と同
様であり、ここでも、見開き本2を真横から見た図を模
式的に示している。見開き本2の撮影面は、曲面となっ
ている。このため、見開き本2上の等間隔点の位置にあ
る画像は、下側の図に示すように、平面上の間隔の異な
る位置へと変換される。したがって、得られる撮影画像
は水平方向に伸び縮みが生じる。
Next, the distortion occurring in the horizontal direction will be described. FIG. 24 is a diagram illustrating a state in which the image expands and contracts in the horizontal direction of the document image. The photographing conditions are the same as those in FIG. 23, and also here, a diagram in which the facing book 2 is viewed from the side is schematically shown. The shooting surface of the facing book 2 is a curved surface. For this reason, the image at the position of the equally-spaced point on the facing book 2 is converted to a position with a different space on the plane as shown in the lower diagram. Therefore, the obtained captured image expands and contracts in the horizontal direction.

【0008】その結果、図25に示すように、本来の平
面画像(a)が、水平方向および垂直方向それぞれに歪
んだ画像(b)として撮影されることになる。
As a result, as shown in FIG. 25, the original plane image (a) is photographed as an image (b) distorted in both the horizontal and vertical directions.

【0009】従来から、このような画像の歪み(以下、
「ブック歪み」という)を補正するために様々な方法が
提案されている。たとえば、特開平5−292314お
よび特開平6−97658では、それぞれ、照射したス
ポット光およびスリット光を用いて原稿の面形状を検出
することにより、ブック歪みを補正する技術が開示され
ている。また、特開平9−102854には、原稿横に
設置されたミラーを用いて原稿の真横からの高さ変化を
検出し、ブック歪みを補正する技術が開示されている。
さらに、特開2000−20682には、原稿端の歪曲
状態を基に原稿の高さ方向の変化を算出し、これを利用
して補正を行なう技術が開示されている。
Conventionally, such image distortion (hereinafter, referred to as “distortion”)
Various methods have been proposed to correct "book distortion". For example, JP-A-5-292314 and JP-A-6-97658 disclose techniques for correcting book distortion by detecting the surface shape of an original using the irradiated spot light and slit light, respectively. Japanese Patent Application Laid-Open No. Hei 9-102854 discloses a technique of detecting a change in height from the side of a document by using a mirror placed beside the document and correcting book distortion.
Further, Japanese Patent Application Laid-Open No. 2000-20682 discloses a technique in which a change in the height direction of a document is calculated based on a distorted state of a document edge, and correction is performed using the calculated change.

【0010】[0010]

【発明が解決しようとする課題】しかしながら、前述し
たような補正方法では、以下に示すような問題が生じて
いた。
However, the above-described correction method has the following problems.

【0011】すなわち、特開平5−29231に示され
る技術では、原稿の面形状の検出、即ち、高さの検出精
度を上げるために、極めて多数の位置について測定する
必要があった。また、正確な測定のためにスポット光の
光量を十分に確保しなければならない。このため、装置
が大型化すると共に、処理時間が長くなるという問題が
あった。さらに、最終的な文書画像を得るために、画像
からスポット光の影響を消去する補正処理も必要であっ
た。同様に、特開平6−97658に示される技術で
も、スリット光の光量や消去のための補正処理の必要性
に関して問題があった。
That is, in the technique disclosed in Japanese Patent Application Laid-Open No. 5-29231, it is necessary to measure a very large number of positions in order to detect the surface shape of the document, that is, to increase the height detection accuracy. In addition, a sufficient amount of spot light must be secured for accurate measurement. For this reason, there has been a problem that the apparatus becomes large and the processing time becomes long. Further, in order to obtain a final document image, a correction process for eliminating the influence of spot light from the image is also required. Similarly, the technique disclosed in Japanese Patent Application Laid-Open No. 6-97658 also has a problem regarding the amount of slit light and the necessity of a correction process for erasing.

【0012】また、特開平9−102854に示される
技術では、設置されたミラーを用いて高さ変化の検出を
行なうため、撮影器や被写体の位置が限定されるという
問題があった。
Further, in the technique disclosed in Japanese Patent Application Laid-Open No. Hei 9-102854, since a change in height is detected by using an installed mirror, there is a problem that the positions of a photographing device and a subject are limited.

【0013】さらに、特開2000−20682に示さ
れる技術では、原稿と撮像器の位置が固定である密着型
スキャナを想定しているため、手持ち撮像器等、被写体
原稿と撮像器との相対位置が不定である場合への適用は
困難であった。
Further, in the technique disclosed in Japanese Patent Application Laid-Open No. 2000-20682, it is assumed that a contact type scanner in which the position of the original and the image pickup device is fixed is used. It was difficult to apply to the case where is uncertain.

【0014】即ち、相対位置が不定であると、高さ変化
が激しい原稿をほぼ真上から見た場合の原稿端形状と、
高さ変化が緩やかな原稿を角度をつけて見た場合の原稿
端形状との区別をつけることができない。このため、原
稿の高さ方向の変化が特定できず、正確な補正を行うこ
とができないといった問題があった。
That is, if the relative position is not fixed, the shape of the document edge when the document whose height changes drastically is viewed from almost right above,
The document cannot be distinguished from the document edge shape when a document having a gentle change in height is viewed at an angle. For this reason, there has been a problem that the change in the height direction of the document cannot be specified, and accurate correction cannot be performed.

【0015】本発明はかかる実状に鑑み考え出されたも
のであり、その目的は、撮影対象面の高さが一様でない
ために生じる撮影画像の歪みを、撮影条件によらず、よ
り高精度に補正することのできる歪み補正装置およびそ
の方法ならびに歪み補正プログラムを記録したコンピュ
ータ読み取り可能な記録媒体を提供すことである。
The present invention has been conceived in view of the above circumstances, and an object of the present invention is to reduce distortion of a photographed image caused by uneven height of a photographing target surface with higher accuracy regardless of photographing conditions. It is an object of the present invention to provide a computer-readable recording medium having a distortion correction device and method capable of correcting the distortion, and a distortion correction program recorded thereon.

【0016】[0016]

【課題を解決するための手段】上記目的を達成するた
め、本発明のある局面に従うと、歪み補正装置は、撮像
部により撮影された対象物の画像データを取得する画像
データ取得手段と、取得された画像データから所望のラ
イン状領域を検出する検出手段と、検出された所望のラ
イン状領域、および、撮像部と対象物との相対位置に関
する情報に基づいて、対象物の撮影面の高さ分布情報を
算出する算出手段と、算出された高さ分布情報に基づい
て、取得された画像データを幾何変換する変換手段とを
備え、検出手段により検出される所望のライン状領域
は、撮像部からより遠い位置にあるライン状領域である
ことを特徴とする。
In order to achieve the above object, according to one aspect of the present invention, a distortion correction apparatus comprises: an image data acquisition unit for acquiring image data of an object photographed by an imaging unit; Detecting means for detecting a desired linear area from the obtained image data, and the height of the photographing surface of the object based on the detected desired linear area and information on the relative position between the imaging unit and the object. Calculating means for calculating the distribution information, and converting means for geometrically converting the acquired image data based on the calculated height distribution information. A desired linear area detected by the detecting means is imaged. It is a line-shaped area located farther from the part.

【0017】この発明に従うと、撮像部からより遠い位
置にあるライン状領域、および、撮像部と対象物との相
対位置に関する情報に基づいて、対象物の撮影面の高さ
分布情報が算出される。
According to the present invention, the height distribution information of the photographing surface of the object is calculated based on the information on the linear region located farther from the image pickup unit and the relative position between the image pickup unit and the object. You.

【0018】このため、原稿台からの高さが一様でない
見開き原稿を、撮像部と原稿との相対位置関係が一定
(既知)の据え置き型の撮像器で撮影する場合のみなら
ず、撮像器の撮影位置が変化する手持ち型の撮像器で撮
影する場合であっても、撮像部と対象物との相対位置に
関する情報を用いることにより、高さ分布情報を正確に
算出することができる。
Therefore, not only is a case where a double-page spread document whose height from the platen is not uniform is photographed by a stationary image pickup device having a fixed (known) relative positional relationship between the image pickup section and the document, but also by an image pickup device Even when the image is taken by a hand-held imaging device in which the imaging position changes, the height distribution information can be accurately calculated by using the information on the relative position between the imaging unit and the object.

【0019】しかも、高さ分布の算出に用いられるライ
ン状領域は、撮像部からより遠い位置にあるライン状領
域である。つまり、たとえば原稿の上端と下端とがライ
ン状領域として検出可能な場合、より歪曲の大きい方の
原稿端が算出に用いられることになる。このため、原稿
端の形状から原稿の高さ分布情報をより高い精度で算出
することが可能となる。
Further, the linear region used for calculating the height distribution is a linear region located farther from the image pickup unit. That is, for example, when the upper end and the lower end of a document can be detected as a line-shaped region, the document end having the larger distortion is used for the calculation. Therefore, it is possible to calculate the height distribution information of the document from the shape of the document edge with higher accuracy.

【0020】そして、算出された高さ分布情報に基づい
て、画像データが幾何変換される。高い精度でもって算
出された高さ情報を基に幾何変換が行なわれるため、撮
影された画像の歪みに対しても高精度の補正がなされる
ことになる。
The image data is geometrically transformed based on the calculated height distribution information. Since the geometric transformation is performed based on the height information calculated with high accuracy, high-precision correction is performed even for the distortion of the captured image.

【0021】したがって、撮影対象面の高さが一様でな
いために生じる撮影画像の歪みを、撮影条件によらず、
より高精度に補正することのできる歪み補正装置を提供
することが可能となる。
Therefore, the distortion of the photographed image caused by the uneven height of the photographing target surface can be changed regardless of the photographing conditions.
It is possible to provide a distortion correction device capable of correcting with higher accuracy.

【0022】好ましくは、所望のライン状領域は、対象
物の端部、または、罫線、文字列等の対象物の撮影面上
に記載された連続線を含む。
Preferably, the desired line-shaped area includes an end of the object or a continuous line such as a ruled line, a character string, or the like described on the photographing surface of the object.

【0023】これによると、検出手段により、取得され
た画像データから、対象物の端部、または、罫線、文字
列等の対象物の撮影面上に記載された連続線が検出され
る。見開き原稿の原稿端など、対象物の端部が検出され
る場合は、撮像部からより遠くに位置するライン状領域
を得ることができる。また、罫線等が検出される場合
は、対象物の端部が撮影画像に含まれていないときであ
ってもその代替として適切にラインデータを得ることが
できる。
According to this, the detecting means detects a continuous line described on the photographing surface of the object, such as an edge of the object or a ruled line or a character string, from the acquired image data. When the edge of the target object such as the edge of a two-page spread document is detected, a linear region located farther from the imaging unit can be obtained. When a ruled line or the like is detected, line data can be appropriately obtained as an alternative even when the edge of the object is not included in the captured image.

【0024】また、好ましくは、歪み補正装置は、撮像
部と対象物との相対位置に関する情報を取得する位置情
報取得手段をさらに備え、相対位置に関する情報は、撮
像部と対象物の垂直距離に関する情報および水平距離に
関する情報を含む。
[0024] Preferably, the distortion correction apparatus further includes position information acquiring means for acquiring information on a relative position between the imaging section and the object, and the information on the relative position relates to a vertical distance between the imaging section and the object. Contains information and horizontal distance information.

【0025】これによると、撮像器の撮影位置が変化す
るような手持ち型の撮像器で撮影する場合であっても、
位置情報取得手段により撮像部と対象物の垂直距離およ
び水平距離に関する情報が取得される。したがって、撮
像部と対象物との位置関係が明確になり、対象物の撮影
面の高さ分布情報を容易かつ正確に算出することが可能
となる。
According to this, even when photographing is performed with a hand-held image pickup device in which the photographing position of the image pickup device changes,
Information on the vertical distance and the horizontal distance between the imaging unit and the object is acquired by the position information acquiring unit. Therefore, the positional relationship between the imaging unit and the object becomes clear, and it is possible to easily and accurately calculate the height distribution information of the imaging surface of the object.

【0026】ここで、垂直距離に関する情報とは、撮像
部から撮影対象物に下ろした垂線の足の長さ(概距離情
報)を意味し、水平距離に関する情報とは、たとえば、
撮影対象物に対する、撮像部から撮影対象物に下ろした
垂線の足の位置情報を意味する。
Here, the information related to the vertical distance means the length of the foot of the perpendicular line dropped from the imaging unit to the object to be photographed (rough distance information).
This means the position information of the perpendicular foot lowered from the imaging unit to the imaging target with respect to the imaging target.

【0027】好ましくは、検出手段は、取得された画像
データから2つのライン状領域を抽出する抽出手段と、
抽出された2つのライン状領域のうち撮像部からより遠
い位置にあるライン状領域を選択する選択手段とを含
み、選択されたライン状領域を所望のライン状領域とす
ることを特徴とする。
Preferably, the detecting means includes an extracting means for extracting two linear regions from the acquired image data;
Selecting means for selecting a linear area at a position farther from the image pickup unit among the two extracted linear areas, wherein the selected linear area is set as a desired linear area.

【0028】これによると、取得された画像データから
2つのライン状領域が抽出され、そのうちの撮像部から
より遠い位置にあるライン状領域が選択される。そし
て、選択されたライン状領域が、対象物の高さ分布情報
の算出に用いられる。手持ち型の撮像器のように、2つ
のライン状領域が抽出され、これを基に撮像部と対象物
の水平距離に関する情報が取得される場合には、この抽
出された2つのライン状領域のうちより撮像部から遠い
位置にあるライン状領域を用いることで、容易に、高精
度の高さ分布情報の算出を行なうことができる。
According to this, two linear areas are extracted from the acquired image data, and a linear area farther from the image pickup unit is selected. Then, the selected linear area is used for calculating the height distribution information of the target object. As in the case of a hand-held image pickup device, two linear regions are extracted, and when information on the horizontal distance between the imaging unit and the object is obtained based on the extracted two linear regions, the two linear regions are extracted. By using the linear region located farther from the imaging unit, highly accurate calculation of height distribution information can be easily performed.

【0029】さらに好ましくは、選択手段は、抽出され
た2つのライン状領域それぞれの傾きを検出する傾き検
出手段を含み、検出された傾きを基に、撮像部からより
遠い位置にあるライン状領域を選択することを特徴とす
る。
[0029] More preferably, the selection means includes inclination detection means for detecting the inclination of each of the two extracted linear areas, and based on the detected inclination, the linear area located farther from the imaging unit. Is selected.

【0030】これによると、抽出された2つのライン状
領域それぞれの傾きが検出され、その傾きを基に、撮像
部からより遠い位置にあるライン状領域が選択される。
したがって、ライン状領域の傾きを比較することによ
り、容易に所望のライン状領域を選択することができ
る。
According to this, the inclination of each of the two extracted linear regions is detected, and based on the inclination, a line region located farther from the image pickup unit is selected.
Therefore, a desired linear area can be easily selected by comparing the inclination of the linear area.

【0031】本発明の別の曲面に従うと、歪み補正方法
は、撮像部により撮影された対象物の画像データを取得
する画像データ取得ステップと、取得された画像データ
から所望のライン状領域を検出する検出ステップと、検
出された所望のライン状領域、および、撮像部と対象物
との相対位置に関する情報に基づいて、対象物の撮影面
の高さ分布情報を算出する算出ステップと、算出された
高さ分布情報に基づいて、取得された画像データを幾何
変換する変換ステップとを備え、検出ステップにより検
出される所望のライン状領域は、撮像部からより遠い位
置にあるライン状領域であることを特徴とする。
According to another curved surface of the present invention, the distortion correction method includes an image data acquiring step of acquiring image data of an object photographed by an imaging section, and detecting a desired line-shaped area from the acquired image data. And a calculating step of calculating height distribution information of the imaging surface of the object based on the detected desired linear area and information on the relative position between the imaging unit and the object. A transformation step of geometrically transforming the acquired image data based on the height distribution information obtained, and the desired linear area detected by the detection step is a linear area located farther from the imaging unit. It is characterized by the following.

【0032】この発明に従うと、撮像部からより遠い位
置にあるライン状領域、および、撮像部と対象物との相
対位置に関する情報に基づいて、対象物の撮影面の高さ
分布情報が算出される。
According to the present invention, the height distribution information of the photographing surface of the object is calculated based on the linear region located farther from the image pickup unit and the information on the relative position between the image pickup unit and the object. You.

【0033】このため、原稿台からの高さが一様でない
見開き原稿を、撮像部と原稿との相対位置関係が一定
(既知)の据え置き型の撮像器で撮影する場合のみなら
ず、撮像器の撮影位置が変化する手持ち型の撮像器で撮
影する場合であっても、撮像部と対象物との相対位置に
関する情報を用いることにより、高さ分布情報を正確に
算出することができる。
Therefore, not only is a case where a double-page spread document whose height from the platen is not uniform is photographed by a stationary type image pickup device in which the relative positional relationship between the image pickup section and the document is constant (known), but also by the image pickup device Even when the image is taken by a hand-held imaging device in which the imaging position changes, the height distribution information can be accurately calculated by using the information on the relative position between the imaging unit and the object.

【0034】しかも、高さ分布の算出に用いられるライ
ン状領域は、撮像部からより遠い位置にあるライン状領
域である。このため、原稿端の形状から原稿の高さ分布
情報をより高い精度で算出することが可能となる。
Moreover, the linear region used for calculating the height distribution is a linear region located farther from the image pickup unit. Therefore, it is possible to calculate the height distribution information of the document from the shape of the document edge with higher accuracy.

【0035】そして、算出された高さ分布情報に基づい
て、画像データが幾何変換される。高い精度でもって算
出された高さ情報を基に幾何変換が行なわれるため、撮
影された画像の歪みに対しても高精度の補正がなされる
ことになる。
Then, based on the calculated height distribution information, the image data is geometrically transformed. Since the geometric transformation is performed based on the height information calculated with high accuracy, high-precision correction is performed even for the distortion of the captured image.

【0036】したがって、撮影対象面の高さが一様でな
いために生じる撮影画像の歪みを、撮影条件によらず、
より高精度に補正することのできる歪み補正方法を提供
することが可能となる。
Therefore, the distortion of the photographed image caused by the uneven height of the photographing target surface can be reduced regardless of the photographing conditions.
It is possible to provide a distortion correction method capable of correcting with higher accuracy.

【0037】好ましくは、所望のライン状領域は、対象
物の端部、または、罫線、文字列等の対象物の撮影面上
に記載された連続線を含む。
Preferably, the desired line area includes an end of the object or a continuous line such as a ruled line, a character string, etc., which is described on the photographing surface of the object.

【0038】これによると、検出ステップにおいて、取
得された画像データから、対象物の端部、または、罫
線、文字列等の対象物の撮影面上に記載された連続線が
検出される。見開き原稿の原稿端など、対象物の端部が
検出される場合は、撮像部からより遠くに位置するライ
ン状領域を得ることができる。また、罫線等が検出され
る場合は、対象物の端部が撮影画像に含まれていないと
きであってもその代替として適切にラインデータを得る
ことができる。
According to this, in the detecting step, a continuous line described on the photographing surface of the object, such as an edge of the object or a ruled line or a character string, is detected from the acquired image data. When the edge of the target object such as the edge of a two-page spread document is detected, a linear region located farther from the imaging unit can be obtained. When a ruled line or the like is detected, line data can be appropriately obtained as an alternative even when the edge of the object is not included in the captured image.

【0039】好ましくは、歪み補正方法は、撮像部と対
象物との相対位置に関する情報を取得する位置情報取得
ステップをさらに備え、相対位置に関する情報は、撮像
部と対象物の垂直距離に関する情報および水平距離に関
する情報を含む。
Preferably, the distortion correction method further includes a position information obtaining step of obtaining information on a relative position between the imaging unit and the object, wherein the information on the relative position includes information on a vertical distance between the imaging unit and the object. Contains information about horizontal distance.

【0040】これによると、撮像器の撮影位置が変化す
るような手持ち型の撮像器で撮影する場合であっても、
位置情報取得ステップにおいて撮像部と対象物の垂直距
離および水平距離に関する情報が取得される。したがっ
て、撮像部と対象物との位置関係が明確になり、対象物
の撮影面の高さ分布情報を容易かつ正確に算出すること
が可能となる。
According to this, even when shooting with a hand-held imaging device in which the imaging position of the imaging device changes,
In the position information acquisition step, information on the vertical distance and the horizontal distance between the imaging unit and the object is acquired. Therefore, the positional relationship between the imaging unit and the object becomes clear, and it is possible to easily and accurately calculate the height distribution information of the imaging surface of the object.

【0041】好ましくは、検出ステップは、取得された
画像データから2つのライン状領域を抽出する抽出ステ
ップと、抽出された2つのライン状領域のうち撮像部か
らより遠い位置にあるライン状領域を選択する選択ステ
ップとを含み、選択されたライン状領域を所望のライン
状領域とすることを特徴とする。
Preferably, the detecting step includes an extracting step of extracting two linear areas from the acquired image data, and a linear area located farther from the imaging unit among the extracted two linear areas. And selecting the selected linear area as a desired linear area.

【0042】これによると、取得された画像データから
2つのライン状領域が抽出され、そのうちの撮像部から
より遠い位置にあるライン状領域が選択される。そし
て、選択されたライン状領域が、対象物の高さ分布情報
の算出に用いられる。手持ち型の撮像器のように、2つ
のライン状領域が抽出され、これを基に撮像部と対象物
の水平距離に関する情報が取得される場合には、この抽
出された2つのライン状領域のうちより撮像部から遠い
位置にあるライン状領域を用いることで、容易に、高精
度の高さ分布情報の算出を行なうことができる。
According to this, two linear regions are extracted from the acquired image data, and a linear region at a position farther from the imaging unit is selected. Then, the selected linear area is used for calculating the height distribution information of the target object. As in the case of a hand-held image pickup device, two linear regions are extracted, and when information on the horizontal distance between the imaging unit and the object is obtained based on the extracted two linear regions, the two linear regions are extracted. By using the linear region located farther from the imaging unit, highly accurate calculation of height distribution information can be easily performed.

【0043】さらに好ましくは、選択ステップは、抽出
された2つのライン状領域それぞれの傾きを検出する傾
き検出ステップを含み、検出された傾きを基に、撮像部
からより遠い位置にあるライン状領域を選択することを
特徴とする。
More preferably, the selecting step includes a tilt detecting step of detecting a tilt of each of the two extracted linear regions, and based on the detected tilt, a linear region located farther from the imaging unit. Is selected.

【0044】これによると、抽出された2つのライン状
領域それぞれの傾きが検出され、その傾きを基に、撮像
部からより遠い位置にあるライン状領域が選択される。
したがって、ライン状領域の傾きを比較することによ
り、容易に所望のライン状領域を選択することができ
る。
According to this, the inclination of each of the two extracted linear areas is detected, and a linear area farther from the imaging unit is selected based on the inclination.
Therefore, a desired linear area can be easily selected by comparing the inclination of the linear area.

【0045】本発明のさらに別の曲面に従うと、コンピ
ュータ読み取り可能な記録媒体は、上記いずれかに記載
の歪み補正方法をコンピュータに実行させるための歪み
補正プログラムを記録する。
According to still another aspect of the present invention, a computer-readable recording medium records a distortion correction program for causing a computer to execute any of the distortion correction methods described above.

【0046】この発明に従うと、撮影対象面の高さが一
様でないために生じる撮影画像の歪みを、撮影条件によ
らず、より高精度に補正することのできる歪み補正方法
をコンピュータに実行させるための歪み補正プログラム
を記録したコンピュータ読み取り可能な記録媒体を提供
することが可能となる。
According to the present invention, the computer is caused to execute a distortion correction method capable of correcting the distortion of a photographed image caused by the uneven height of the photographing target surface, regardless of the photographing conditions, with higher accuracy. It is possible to provide a computer-readable recording medium on which a distortion correction program for recording is recorded.

【0047】[0047]

【発明の実施の形態】次に、本発明の実施の形態を、図
面に基づいて詳細に説明する。
Next, embodiments of the present invention will be described in detail with reference to the drawings.

【0048】図1は、本発明の実施の形態における歪み
補正装置を備えた手持ち型の撮像器1が、見開き原稿2
を撮影する様子を示した図である。歪み補正装置は、本
図に示すような手持ち型の撮像器1の内部に設けられて
いる。そして、撮像器1により、本などの見開き原稿2
が上方から撮影されると、その撮影された画像の歪み補
正処理を行なう。
FIG. 1 shows a hand-held image pickup device 1 provided with a distortion correction device according to an embodiment of the present invention,
FIG. 3 is a diagram showing a state in which a photograph is taken. The distortion correction device is provided inside a hand-held image pickup device 1 as shown in FIG. Then, a double-page spread document 2 such as a book is captured by the image pickup device 1.
Is photographed from above, distortion correction processing of the photographed image is performed.

【0049】図2は、本発明の実施の形態における歪み
補正装置200全体の概略構成を示した図である。本図
を参照して、歪み補正装置200は、撮像器1により撮
影された原稿の画像データを入力する入力部201と、
CPU209で行なわれる歪み補正処理プログラムを保
存し、また、入力された画像データ、処理データ等を格
納するメモリ203と、撮像器1から撮影対象である原
稿面までの距離を測定する距離センサ205と、CPU
209により歪み補正がなされた後の画像データを出力
する出力部207と、これらを制御等し、歪み補正処理
を行なうCPU209とを含む。
FIG. 2 is a diagram showing a schematic configuration of the entire distortion correction apparatus 200 according to the embodiment of the present invention. With reference to this figure, distortion correction device 200 includes an input unit 201 for inputting image data of a document photographed by image pickup device 1,
A memory 203 that stores a distortion correction processing program executed by the CPU 209 and stores input image data, processing data, and the like; a distance sensor 205 that measures a distance from the image pickup device 1 to a document surface to be photographed; , CPU
An output unit 207 that outputs image data after distortion correction has been performed by the CPU 209, and a CPU 209 that controls these and performs distortion correction processing.

【0050】撮像器1により撮影された画像データは、
デジタルデータとして、入力部201から歪み補正装置
200内に入力される。入力された画像データは、メモ
リ203内の所定領域に一旦格納される。格納された画
像データは、適宜CPU209により読み出され、各種
画像処理が施される。この際、必要に応じて距離センサ
205により測定された原稿面までの概距離データも使
用される。画像処理が施された後の最終の画像データ
は、出力部207から歪み補正装置200の外部に出力
される。
The image data taken by the image pickup device 1 is
Digital data is input from the input unit 201 into the distortion correction device 200. The input image data is temporarily stored in a predetermined area in the memory 203. The stored image data is appropriately read out by the CPU 209 and subjected to various image processing. At this time, the approximate distance data to the document surface measured by the distance sensor 205 is used as necessary. The final image data after the image processing is performed is output from the output unit 207 to the outside of the distortion correction device 200.

【0051】以下、歪み補正装置200の行なう処理に
ついて詳細に説明する。図3は、歪み補正装置200に
おけるブック歪み補正処理の全体の流れを示したフロー
チャートである。歪み補正装置200は、まず、ステッ
プS301の処理を行なう前に、距離センサ205によ
り手持ち型の撮像器1から撮影対象である原稿面までの
概距離についての情報を得る。この際、距離センサ20
5は、コントラスト法、三角測量、および位相差方式等
のいずれを用いて距離を算出してもよい。なお、原稿サ
イズが既知であるならば画像内の原稿サイズを基に、概
距離情報を算出してもよい。
Hereinafter, the processing performed by the distortion correction apparatus 200 will be described in detail. FIG. 3 is a flowchart showing the overall flow of the book distortion correction process in the distortion correction device 200. First, before performing the processing of step S301, the distortion correction apparatus 200 obtains information about the approximate distance from the handheld image pickup device 1 to the document surface to be photographed by the distance sensor 205. At this time, the distance sensor 20
5 may calculate the distance using any of the contrast method, triangulation, and the phase difference method. If the document size is known, the approximate distance information may be calculated based on the document size in the image.

【0052】この後、ブック歪みを補正するための処理
を行なうが、ここでは説明の簡略化のため、原稿は左右
に見開きの状態であることが既知であるものとする。原
稿の見開き方向が左右であるか上下であるか、あるいは
原稿が回転しているか否かについては、原稿端、または
原稿の角の位置関係を基に検出ができる。そして、原稿
が左右の見開き状態になるように画像あるいは座標軸を
回転して考えれば同様に補正が行なえるため、ここでは
詳細の説明を省略し、左右に見開き状態であるとする。
Thereafter, a process for correcting the book distortion is performed. Here, for simplification of description, it is assumed that the document is known to be in the left-right spread state. Whether the spread direction of the document is left or right, up or down, or whether the document is rotating can be detected based on the positional relationship between the document edge or the corner of the document. If the image or the coordinate axis is rotated so that the original is in the left-right spread state, the same correction can be performed. Therefore, the detailed description is omitted here, and the left-right spread state is assumed.

【0053】原稿面までの概距離情報が求められると、
ステップS301において、撮像器1により撮影された
見開き原稿の画像データに対して前処理が行なわれる。
すなわち、入力画像データに縮小処理、鮮鋭化処理、平
滑化処理、および白画素拡大処理等が施される。
When the approximate distance information to the document surface is obtained,
In step S301, preprocessing is performed on image data of a two-page spread document captured by the image pickup device 1.
That is, the input image data is subjected to reduction processing, sharpening processing, smoothing processing, white pixel enlargement processing, and the like.

【0054】図4は、図22で示した見開き原稿の撮影
画像を、縮小処理した後に、鮮鋭化処理、白画素拡大処
理、平滑化処理を順に行なった場合の画像を示す図であ
る。このような前処理を行なうことで、後に行なうエッ
ジ画像の作成を確実に行なうことが可能となる。
FIG. 4 is a view showing an image obtained by reducing, processing, sharpening processing, white pixel enlarging processing, and smoothing processing of a two-page spread document shown in FIG. By performing such preprocessing, it is possible to reliably create an edge image to be performed later.

【0055】前処理が終了すると、ステップS303に
おいて、エッジ画像の作成処理が行なわれる。エッジ画
像の作成には、例えば二次微分処理が使用される。図5
に、図4の前処理が施された画像を基に、二次微分の絶
対値を算出して、二次微分画像を作成した図を示す。こ
のようなエッジ画像を作成することにより、後に行なう
原稿端検出を確実に行なうことが可能となる。
When the pre-processing is completed, in step S303, a process of creating an edge image is performed. For the generation of the edge image, for example, a second derivative process is used. FIG.
FIG. 4 shows a diagram in which the absolute value of the second derivative is calculated based on the image subjected to the preprocessing in FIG. 4 to create a second derivative image. By creating such an edge image, it is possible to reliably detect a document edge to be performed later.

【0056】エッジ画像の作成が終了すると、次にステ
ップS305において、原稿端の検出処理が行なわれ
る。本ステップでは、後に行なう撮像器1の相対位置検
出処理に必要なため、上端および下端の両方の原稿端の
検出が行なわれる。なお、検出方法の詳細については、
後述する。
When the creation of the edge image is completed, in step S305, a document edge detection process is performed. In this step, both the upper end and the lower end of the document are detected because they are necessary for the relative position detection processing of the image pickup device 1 to be performed later. For details of the detection method,
It will be described later.

【0057】原稿端が検出されると、ステップS307
において、検出された原稿の上下端情報から、撮像器1
と原稿との相対位置についての検出処理が行なわれる。
ここで、相対位置とは、原稿の置かれている平面に撮像
器1から垂線を下ろした場合、その垂線の足が、撮影さ
れた原稿画像上のどこに位置するかを示す位置情報のこ
とである。この相対位置と、原稿と撮像器1間の距離情
報とが分からなければ、検出された原稿端の形状から、
正確な高さ情報を取得することができなくなる。
When the end of the document is detected, step S307 is performed.
At the upper and lower edge information of the detected document,
A detection process is performed on the relative position between the document and the document.
Here, the relative position is position information indicating where the foot of the perpendicular line is located on the photographed document image when the perpendicular line is dropped from the image pickup device 1 on the plane on which the document is placed. is there. If the relative position and the distance information between the document and the image pickup device 1 are not known, the shape of the detected document edge is
Accurate height information cannot be obtained.

【0058】図8から図10は、高さの異なる原稿につ
いて、原稿端を検出した場合、同じような原稿端の形状
が得られる場合を示す図である。いずれも、点P1に撮
像器1が存在し、原稿の上端を検出する場合を考える。
なお、点P0は、撮像器1から下ろした垂線の足であ
る。また、いずれも、(a)は、撮像器1と原稿との撮
影位置関係を示した斜視図であり、(b)は、原稿を上
からみた平面図である。
FIGS. 8 to 10 are diagrams showing a case where the same document edge shape is obtained when the document edges are detected for documents having different heights. In any case, consider the case where the image pickup device 1 exists at the point P1 and the upper end of the document is detected.
In addition, the point P0 is a leg of a perpendicular line lowered from the imaging device 1. 3A is a perspective view showing a photographing positional relationship between the image pickup device 1 and the document, and FIG. 3B is a plan view of the document viewed from above.

【0059】例えば、図8で示すように、撮像器1か
ら、薄い見開き原稿をかなり鋭角で見た場合に得られる
原稿端形状lと、図9で示すように、分厚い原稿をほぼ
真上から見た場合に得られる原稿端形状l’と、図10
に示すように、薄い原稿をほぼ真上から見た場合であっ
て、原稿サイズが大きい場合に得られる原稿端形状l”
とは、いずれも形状が似ている。したがって、これらの
場合は、相対位置情報(点P0についての位置情報)が
分からなければ、上端から高さ変化を正確に検出するこ
とができなくなる。
For example, as shown in FIG. 8, a document edge shape 1 obtained when a thin double-page spread document is viewed from the image pickup device 1 at a considerably acute angle, and a thick document as shown in FIG. FIG. 10 shows a document end shape l ′ obtained when viewed.
As shown in FIG. 7, when a thin document is viewed from almost right above and the document size is large, the document end shape l ″ is obtained.
Are similar in shape. Therefore, in these cases, if the relative position information (position information about the point P0) is not known, a change in height from the upper end cannot be accurately detected.

【0060】撮像器1の相対位置の検出が終了すると、
次は、ステップS308において、原稿の高さ情報の算
出に用いる原稿端の選択処理が行なわれる。すなわち、
ステップS305で抽出された原稿の上端および下端の
うち、次の高さ情報の算出処理に用いるべき、撮像器1
からより遠い位置にある方の原稿端が選択される。
When the detection of the relative position of the image pickup device 1 is completed,
Next, in step S308, a document edge selection process for calculating document height information is performed. That is,
Among the upper and lower ends of the document extracted in step S305, the image pickup device 1 to be used for calculating the next height information
Of the original located farther from the original is selected.

【0061】原稿端が選択されると、ステップS309
において、その選択された原稿端の形状を基に高さ情報
の算出処理が行なわれる。すなわち、撮像器1から原稿
までの概距離、撮像器1の相対位置、および原稿端情報
を用いて、原稿上の各点における高さ情報が算出され
る。
When the end of the original is selected, step S309 is performed.
, A process of calculating height information is performed based on the shape of the selected document edge. That is, the height information at each point on the document is calculated using the approximate distance from the image pickup device 1 to the document, the relative position of the image pickup device 1, and the document edge information.

【0062】なお、左右方向に見開きが存在する原稿画
像では、縦方向には高さの変化が少ないものと想定す
る。このため、ここでは原稿端の上端のみを用いて左右
方向の高さ情報を算出する。
It is assumed that a document image having a spread in the left-right direction has a small change in height in the vertical direction. Therefore, here, the height information in the left-right direction is calculated using only the upper end of the document edge.

【0063】高さ情報が算出されると、最後に、ステッ
プS311において、原稿画像データに対して高さ情報
を用いた幾何学変形補正処理が行なわれる。すなわち、
撮影された原稿画像に対して、水平方向(x軸方向)に
ついて、曲面を平面に伸ばすような画像の幾何学変換が
行なわれる。また、垂直方向(y軸方向)については、
画像のサイズが異なり伸び縮みが生じている画像の倍率
変更が行なわれる。
After the height information is calculated, finally, in step S311, a geometric deformation correction process using the height information is performed on the document image data. That is,
A geometric transformation of the image is performed on the photographed document image in such a manner that a curved surface is extended in a horizontal direction (x-axis direction). In the vertical direction (y-axis direction),
The magnification of an image having a different image size and undergoing expansion / contraction is changed.

【0064】幾何学変形補正処理が完了すると、ブック
歪みに対する補正処理が終了する。以上説明した処理を
行なうことにより、見開き原稿を上方から撮影した際に
生じる画像の歪みが補正され、あたかも平面原稿である
かのように画像を再現することができる。
When the geometric deformation correction processing is completed, the correction processing for book distortion ends. By performing the above-described processing, distortion of an image generated when a double-page spread document is photographed from above is corrected, and the image can be reproduced as if it were a flat document.

【0065】続いて、図3のブック歪み補正処理におけ
る原稿端検出処理(S305)、撮像器の相対位置検出
処理(S307)、高さ情報算出処理(S309)、お
よび幾何学変形補正処理(S311)の各処理の詳細に
ついて説明する。
Subsequently, the document edge detection processing (S305), the relative position detection processing of the image pickup device (S307), the height information calculation processing (S309), and the geometric deformation correction processing (S311) in the book distortion correction processing of FIG. ) Will be described in detail.

【0066】まず、図6を用いて原稿端の検出処理(S
305)を説明する。本図を参照して、長方形枠は入力
画像全体の外延を示しており、曲線Lは検出された原稿
端を示している。また、点線Lv0、Lv1、およびL
v2は、入力画像全体を水平方向に4等分した際のライ
ンである。
First, the document edge detection process (S
305) will be described. With reference to this figure, a rectangular frame indicates an extension of the entire input image, and a curve L indicates a detected document edge. Further, dotted lines Lv0, Lv1, and L
v2 is a line when the entire input image is divided into four equal parts in the horizontal direction.

【0067】通常、原稿画像は入力画像の中央付近には
必ず存在すると考えられる。このため、点線Lv1から
点線Lv2の間にまたがって存在する最も上に位置する
連続エッジを原稿の上端として認識する。
Normally, it is considered that the original image always exists near the center of the input image. For this reason, the uppermost continuous edge existing between the dotted line Lv1 and the dotted line Lv2 is recognized as the upper end of the document.

【0068】したがって、まず点線Lv1上で、最も上
に存在するエッジ画素を検出する。具体的には、二次微
分画像の点線Lv1上の位置にある画素を、上から順に
一定のしきい値Th1よりも大きいか否かを調ることに
より行なう。しきい値Th1より大きい画素が検出され
ると、その時点で、その画素を最も上に存在するエッジ
画素として認識する。
Therefore, the edge pixel existing at the top on the dotted line Lv1 is detected first. Specifically, this is performed by adjusting whether or not a pixel at a position on the dotted line Lv1 of the secondary differential image is larger than a certain threshold value Th1 in order from the top. When a pixel larger than the threshold value Th1 is detected, the pixel is recognized at that time as the uppermost edge pixel.

【0069】Lv1上のエッジ画素が検出されると、次
は、右側のエッジ画素の検出を順に行なう。図7は、右
側のエッジ画素の検出を説明するために、図6のA付近
の画素を拡大して示した図である。本図を参照して、検
出されたエッジ画素を注目画素Pとすると、その注目画
素位置の右側5画素(01〜05)の中から、次のエッ
ジ画素を検出する。
When an edge pixel on Lv1 is detected, the right edge pixel is sequentially detected. FIG. 7 is an enlarged view of a pixel near A in FIG. 6 for explaining detection of a right edge pixel. Referring to this figure, assuming that the detected edge pixel is a target pixel P, the next edge pixel is detected from five pixels (01 to 05) on the right side of the target pixel position.

【0070】まず、右側5画素のうち、最も二次微分画
像の画素値が大きい画素を選択する。次に、この画素の
画素値をしきい値Th2(<Th1)と比較して大きい
か否かを判断する。結果、大きければこの画素をエッジ
画素と認識する。そして、エッジ画素と認識された画素
を注目画素として、同様に右側の5画素についてのエッ
ジ画素の抽出を行なう。このようにして、順にエッジの
追跡を行なう。
First, a pixel having the largest pixel value of the second derivative image is selected from the five right pixels. Next, the pixel value of this pixel is compared with a threshold value Th2 (<Th1) to determine whether or not it is larger. As a result, if larger, this pixel is recognized as an edge pixel. Then, the pixels recognized as the edge pixels are set as the target pixels, and edge pixels are similarly extracted for the five right pixels. In this way, edge tracking is performed sequentially.

【0071】点線Lv2に到達するまでに、しきい値T
h2よりも大きいい画素が存在せず、エッジが途切れて
しまった場合には、そのラインはエッジではないとはん
だんし、新たにエッジの抽出を行なう。すなわち、ま
ず、点線Lv1上のエッジ画素として、先に抽出された
画素より下側の画素を選択して、同様に右側にエッジを
追跡する。この処理を適宜繰り返すことにより、点線L
v1と点線Lv2との間にまたがる最も上部に位置する
連続エッジを原稿上端として抽出する。
By the time the dotted line Lv2 is reached, the threshold T
If a pixel larger than h2 does not exist and the edge is interrupted, the line is not an edge, and a new edge is extracted. That is, first, a pixel below the previously extracted pixel is selected as an edge pixel on the dotted line Lv1, and the edge is similarly traced to the right. By repeating this process as appropriate, the dotted line L
The uppermost continuous edge extending between v1 and the dotted line Lv2 is extracted as the document upper end.

【0072】連続エッジが抽出されると、次は、点線L
v1から左側および点線L2から右側に、同様のエッジ
追跡を行なう。そして、最終的に二次微分画像におい
て、原稿の上端を検出する。
When a continuous edge is extracted, next, a dotted line L
Similar edge tracking is performed on the left side from v1 and on the right side from the dotted line L2. Then, finally, the upper end of the document is detected in the second derivative image.

【0073】同様にして、原稿の下端の検出も行なう。
すなわち、図6における処理を上下対象にして行なうこ
とで、原稿の下端を検出することができる。なお、左端
や右端を検出する必要がある場合にも、同様にして行な
う。
Similarly, the lower end of the document is detected.
That is, by performing the processing in FIG. 6 on the upper and lower sides, the lower end of the document can be detected. Note that the same operation is performed when it is necessary to detect the left end or the right end.

【0074】検出された上部の原稿端は、縮小画像に対
して検出されたものであるため、元画像のサイズに対応
させる必要がある。したがって、線形補間やキュービッ
クコンボリューション等の既存の補間方法によって原稿
端画像情報を復元しておく。
Since the detected upper edge of the original is detected for the reduced image, it is necessary to correspond to the size of the original image. Therefore, original edge image information is restored by an existing interpolation method such as linear interpolation or cubic convolution.

【0075】次に、撮像器1と原稿との相対位置の検出
処理(S307)について説明する。図11は、原稿端
情報から相対位置を算出する具体例を説明するための図
である。本図を参照して、ここでは、水平方向にx軸
を、垂直方向にy軸をとっている。そして、原稿端の局
所的な傾きを基に、相対位置を算出する。
Next, the process of detecting the relative position between the image pickup device 1 and the document (S307) will be described. FIG. 11 is a diagram for describing a specific example of calculating a relative position from document edge information. Referring to this figure, here, the x axis is taken in the horizontal direction and the y axis is taken in the vertical direction. Then, the relative position is calculated based on the local inclination of the document edge.

【0076】まず、撮影された見開き原稿2の上端の点
(X、Ya)における傾き角θと、同じx座標値の原稿
下端の点(X、Yb)における傾き角φとを求める。そ
の結果、θとφが同符合、かつ|θ|>|φ|の場合
は、撮像器1のy方向の位置(相対位置座標)Ycは、
Yc=Yb+k×(Yb−Ya)×|φ|により求め
る。そして、θとφが同符合、かつ|θ|≦|φ|の場
合は、Yc=Ya−k×(Yb−Ya)×|θ|によ
り、また、θとφが異符号の場合は、Yc={(Ya+
Yb)/2}+{(Yb−Ya)/2}×(|φ|−|
θ|)/(|θ|+|φ|)により、それぞれ求める。
First, the inclination angle θ at the upper end point (X, Ya) of the taken two-page spread original 2 and the inclination angle φ at the lower end point (X, Yb) of the same x coordinate value are determined. As a result, when θ and φ are the same and | θ |> | φ |, the position (relative position coordinate) Yc of the image pickup device 1 in the y direction is
Yc = Yb + k × (Yb−Ya) × | φ | If θ and φ have the same sign and | θ | ≦ | φ |, then Yc = Ya−k × (Yb−Ya) × | θ |, and if θ and φ have different signs, Yc = {(Ya +
Yb) / 2} + {(Yb−Ya) / 2} × (| φ | − |
θ |) / (| θ | + | φ |).

【0077】ここで、係数kは、撮像器1と原稿との概
距離、標準的な被写体のサイズ(または撮影画角)等に
応じて、その都度一義的に設定される値である。本図に
おいては、文字列Sで示されるY座標位置が撮像器1の
相対位置となる。なお、傾き角は反時計回りを正とする
ため、本図においては、θは正であるがφは負となる。
Here, the coefficient k is a value that is uniquely set each time in accordance with the approximate distance between the image pickup device 1 and the document, the standard size of the subject (or the angle of view), and the like. In the figure, the Y coordinate position indicated by the character string S is the relative position of the imaging device 1. Note that, since the tilt angle is positive in the counterclockwise direction, in this figure, θ is positive but φ is negative.

【0078】また、原稿端の局所的な傾き角を用いて相
対位置を算出する代わりに、原稿内の文字列、矩形、罫
線等の傾きを用いて同様に算出してもよい。原稿端が上
下端とも画像内に撮像されているとは限らないからであ
る。傾き角の抽出には、画像の縮小、黒画素の拡大、平
滑化等によって黒画素を拡大した後に測定を行なうな
ど、周知の方法により行なう。
Instead of calculating the relative position using the local inclination angle of the document edge, the calculation may be similarly performed using the inclination of a character string, rectangle, ruled line, or the like in the document. This is because both the upper and lower edges of the document are not necessarily captured in the image. The extraction of the inclination angle is performed by a known method such as measurement after the black pixel is enlarged by reducing the image, enlarging the black pixel, or smoothing.

【0079】なお、原稿端や文字列等を用いて傾きを抽
出する場合、傾きが検出されず、傾き角が0となる局所
領域が検出されたとすると、その位置を相対位置として
決定してもよい。たとえば、図11においては、傾き角
が0となる文字列Sを含む領域が、相対位置として決定
されることになる。また、相対位置の精度を上げるため
に図12の点線で囲んだ領域のように複数の領域に対し
て求めた傾き角を基に、撮像器1の相対位置を算出して
もよい。
In the case where the inclination is extracted using the document edge, the character string, or the like, if the inclination is not detected and a local region where the inclination angle is 0 is detected, the position may be determined as a relative position. Good. For example, in FIG. 11, a region including a character string S having a tilt angle of 0 is determined as a relative position. Further, the relative position of the image pickup device 1 may be calculated based on the inclination angles obtained for a plurality of regions such as a region surrounded by a dotted line in FIG. 12 in order to improve the accuracy of the relative position.

【0080】なお、図11で示した傾き角θおよびφの
情報は、これらを基に、高さ変化情報の算出に用いる原
稿端の選択処理(S308)においても使用される。つ
まり、検出された傾き角同士を比較することにより、い
ずれの原稿端が撮像器1から遠い位置にあるかを判断す
ることができる。図11の例では、θ>φであるため、
原稿の上端の方が撮像器から遠くに位置すると判断され
る。したがって、高さ情報の算出に使用される原稿端と
して、上端が選択されることになる。
The information on the inclination angles θ and φ shown in FIG. 11 is also used in the process of selecting the edge of the document used for calculating the height change information (S308). That is, by comparing the detected inclination angles, it is possible to determine which document end is far from the image pickup device 1. In the example of FIG. 11, since θ> φ,
It is determined that the upper end of the document is located farther from the imaging device. Therefore, the upper end is selected as the document end used for calculating the height information.

【0081】続いて、図13および図14を用いて、高
さ情報の算出処理について説明する。図13は、撮影さ
れた原稿端Lと撮像器1との位置関係を示した斜視図で
ある。また、図14は、図13を矢印方向から見た場合
の位置関係を説明するための図である。
Next, the process of calculating the height information will be described with reference to FIG. 13 and FIG. FIG. 13 is a perspective view showing the positional relationship between the imaged document end L and the image pickup device 1. FIG. 14 is a diagram for explaining the positional relationship when FIG. 13 is viewed from the direction of the arrow.

【0082】図13および図14を参照して、点P1は
撮像器1の位置、点P0は原稿が置かれている平面にP
1から下ろした垂線の足、点A’は原稿端上で最も高さ
が高い位置、点B’は任意の原稿端上の位置を、それぞ
れ示している。また、曲線Lは撮影された原稿端形状を
示している。
Referring to FIGS. 13 and 14, point P1 is the position of image pickup device 1, and point P0 is the point P on the plane on which the original is placed.
Point A ', the foot of the perpendicular line lowered from 1, the highest position on the document edge, and point B', the position on any document edge. A curve L indicates the shape of the edge of the captured document.

【0083】このため、たとえば、点A’の高さ情報
は、三角形の相似関係を用いて、A’A=P1P0・A
2A/A2P0として算出することができる。同様に、
点B’の高さ情報も、B’B=P1P0・B2B/B2
P0として算出することができる。
For this reason, for example, the height information of the point A ′ is obtained by using the similarity relation of a triangle, A′A = P1P0 · A
It can be calculated as 2A / A2P0. Similarly,
The height information of the point B ′ is also B′B = P1P0 · B2B / B2
It can be calculated as P0.

【0084】ここで、P1P0は、撮像器1から原稿ま
での概距離である。また、P0Pは、撮像器1の原稿に
対する相対位置として求められるため、A2P0やB2
P0は、P0Pと各座標値とから求められる。
Here, P1P0 is the approximate distance from the image pickup device 1 to the document. Further, since P0P is obtained as a relative position of the image pickup device 1 with respect to the document, A2P0 and B2P
P0 is obtained from P0P and each coordinate value.

【0085】最後に、高さ情報を用いた幾何学変形補正
処理(ステップS311)について説明する。図15
は、水平方向に幾何学変形される様子を概念的に示した
図である。図15(a)は変形前の原稿表面の形状を表
わしており、図15(b)は変形後の原稿表面形状を表
わしている。本図を参照して、幾何学変形は、変形後の
平面を等分するようにM0、M1、M2・・・と順に区
切り、その各格子点(M0〜M9)が変換前の曲面上で
はどの位置にあるのかを求めることにより行なう。
Finally, the geometric deformation correction processing using the height information (step S311) will be described. FIG.
FIG. 3 is a diagram conceptually showing a state of being geometrically deformed in the horizontal direction. FIG. 15A shows the shape of the original surface before deformation, and FIG. 15B shows the shape of the original surface after deformation. Referring to this drawing, the geometric deformation is divided into M0, M1, M2,... In order to equally divide the plane after the deformation, and each of the grid points (M0 to M9) on the curved surface before the transformation is performed. This is done by finding the position.

【0086】このような幾何学変形により画像が変換さ
れる様子を、図16を用いてより詳細に説明する。図1
6を参照して、変換後の格子点M1にくるべき変換前の
画像のデータは、原稿端上において、M0M1=N0N
1となるような位置N1のデータである。このN1点
は、N0N1付近の傾きを基に求められる(ただし、M
0=N0)。なお、N0N1付近の傾きは、高さ情報か
らM1付近の位置の曲面上の傾きを算出し、それを用い
ればよい。
The manner in which an image is converted by such geometric deformation will be described in more detail with reference to FIG. FIG.
Referring to FIG. 6, the data of the image before conversion to be placed at the grid point M1 after conversion is M0M1 = N0N on the document edge.
This is the data at the position N1 that becomes 1. This N1 point is obtained based on the slope near N0N1 (where M
0 = N0). In addition, as the inclination near N0N1, the inclination on the curved surface at the position near M1 may be calculated from the height information and used.

【0087】N1点が求められると次に、M1M2=N
1N2となるような位置N2を同様にして求める。そし
て、N2点のデータは、平面上の格子点M2に変換され
る。同様にして、M2M3=N2N3となるような位置
N3が求められ、N3点のデータがM3点に変換され
る。この処理を繰り返すことで、水平方向への幾何学変
換が行なわれる。
When the N1 point is obtained, then, M1M2 = N
The position N2 that becomes 1N2 is similarly obtained. Then, the data at the point N2 is converted into the lattice point M2 on the plane. Similarly, a position N3 that satisfies M2M3 = N2N3 is obtained, and the data at N3 points is converted to M3 points. By repeating this process, geometric transformation in the horizontal direction is performed.

【0088】図17は、高さ情報に基づく幾何学変形補
正によりブック歪みが補正される様子を概念的に示した
図である。本図を参照して、前述した水平方向への幾何
学変換により、図17(a)に示すような歪んだ画像
が、図17(b)に示すように水平方向に伸ばされて、
解像度が一様となる画像に変換される。
FIG. 17 is a diagram conceptually showing how book distortion is corrected by geometric deformation correction based on height information. With reference to this figure, the distorted image shown in FIG. 17A is expanded in the horizontal direction as shown in FIG. 17B by the above-described geometric transformation in the horizontal direction.
The image is converted into an image having a uniform resolution.

【0089】そして、この図17(b)に示す水平方向
に補正された画像に、垂直方向への倍率変換処理が行な
われ、最終的に、図17(c)に示すように、垂直方向
のサイズの変化も補正された平面画像が得られることに
なる。
Then, the image corrected in the horizontal direction shown in FIG. 17B is subjected to a magnification conversion process in the vertical direction, and finally, as shown in FIG. A planar image in which the change in size is also corrected can be obtained.

【0090】垂直方向への倍率変換処理は、原稿端形状
より算出された高さ情報と、撮像器1の撮影距離(概距
離)とを用いて行なわれる。すなわち、図23において
説明したように、垂直方向の画像サイズが水平位置に因
って異なるのは、原稿から撮像器までの高さの変化に起
因する。このため、高さ情報と概距離とから原稿の各点
から撮像器までの高さを求めることができ、これを用い
て垂直方向の倍率変換を行なうことができる。たとえ
ば、原稿上の最も高い位置、あるいは最も低い位置など
を基準として垂直方向のライン毎に幾何学変換を行な
う。
The magnification conversion process in the vertical direction is performed using the height information calculated from the document edge shape and the shooting distance (approximate distance) of the image pickup device 1. That is, as described with reference to FIG. 23, the difference in image size in the vertical direction depending on the horizontal position is due to a change in height from the document to the image pickup device. Therefore, the height from each point of the document to the image pickup device can be obtained from the height information and the approximate distance, and the magnification can be converted in the vertical direction using this. For example, geometric transformation is performed for each vertical line based on the highest position or the lowest position on the document.

【0091】なお、図17においては、水平方向の幾何
学変換を行なった後に垂直方向の倍率変換を行なってい
るが、処理順序は逆であってもよい。また、高速化を図
るために、座標計算のみ予め行なっておき、水平方向と
垂直方向の両変換処理を一括して行なってもよい。
In FIG. 17, magnification conversion in the vertical direction is performed after geometric conversion in the horizontal direction, but the processing order may be reversed. In order to increase the speed, only the coordinate calculation may be performed in advance, and both the horizontal and vertical conversion processes may be performed collectively.

【0092】以上の説明では、本実施の形態における歪
み補正装置200が、手持ち型の撮像器1に用いられる
場合を考えてきた。しかし、歪み補正装置200は、据
え置き型の撮像器に用いることもできる。図18は、歪
み補正装置200が設けられた据え置き型の撮像器18
が、見開き原稿2を撮影する様子を示した図である。
In the above description, a case has been considered in which the distortion correction apparatus 200 according to the present embodiment is used for the hand-held image pickup device 1. However, the distortion correction device 200 can also be used for a stationary image pickup device. FIG. 18 shows a stationary image pickup device 18 provided with a distortion correction device 200.
Is a view showing a state in which a double-page spread document 2 is photographed.

【0093】本図に示すように、据え置き型の撮像器1
8では、撮像部が支柱に固定されている。したがって、
手持ち型の撮像器1と異なり、原稿2と撮像器18との
位置関係は既知となっている。
As shown in this figure, a stationary image pickup device 1
In 8, the imaging unit is fixed to the column. Therefore,
Unlike the handheld image pickup device 1, the positional relationship between the document 2 and the image pickup device 18 is known.

【0094】このため、歪み補正装置200が据え置き
型の撮像器18に用いられた場合、歪み補正処理の流れ
は、手持ち型の撮像器1における補正処理の流れ(図3
のフローチャート)と少し異なる。即ち、図3のステッ
プS305における原稿端の検出処理では、原稿の上端
と下端の両方を検出するのではなく、予め分かっている
より遠い方の原稿端のみの検出を行なう。
For this reason, when the distortion correction device 200 is used for the stationary image pickup device 18, the flow of the distortion correction process is the same as the flow of the correction process in the hand-held image pickup device 1 (FIG. 3).
Is slightly different from the above. That is, in the document edge detection process in step S305 in FIG. 3, not only the upper edge and the lower edge of the document are detected, but only the edge of the document farther than is known in advance.

【0095】また、原稿2と撮像器18との位置関係が
既知であるため、ステップS307の相対位置検出処理
は行なわれない。さらに、ステップS308の原稿端選
択処理も不要となる。そして、ステップS309の高さ
情報算出処理では、ステップS305で検出した遠い方
の原稿端を用いて、高さ情報の算出が行なわれる。
Since the positional relationship between the document 2 and the image pickup device 18 is known, the relative position detecting process in step S307 is not performed. Further, the document edge selecting process in step S308 is not required. In the height information calculation processing in step S309, the height information is calculated using the far end of the document detected in step S305.

【0096】図19は、据え置き型の撮像器18により
撮影された原稿2の画像を示す図である。撮影された原
稿2の画像は、原稿の上端lの方が下端l’よりも撮像
器から遠い位置にあるため大きく歪曲している。据え置
き型の撮像器18においては、この原稿の上端lが高さ
情報を算出するために用いられる。
FIG. 19 is a diagram showing an image of the original 2 photographed by the stationary image pickup device 18. As shown in FIG. The photographed image of the original 2 is greatly distorted because the upper end l of the original is located farther from the image pickup device than the lower end l ′. In the stationary image pickup device 18, the upper end l of this document is used to calculate height information.

【0097】このように、歪み補正装置200を据え置
き型の撮像器18に用いた場合も、遠い方の原稿端を用
いることで、より高精度に高さ情報を算出することがで
きる。特に、据え置き型の撮像器18は、撮像器18と
原稿2との位置関係が既知であるため、直ちに、遠い方
の原稿端の検出を行なうことができる。そして、両者の
相対位置情報を取得する必要がないため、処理ステップ
を減らすことができる。このため、容易かつ高精度に原
稿の歪み補正処理を行なうことが可能となる。
As described above, even when the distortion correction apparatus 200 is used for the stationary image pickup device 18, height information can be calculated with higher accuracy by using the farther document edge. In particular, since the stationary image pickup device 18 has a known positional relationship between the image pickup device 18 and the document 2, it is possible to immediately detect the far end of the document. Since there is no need to acquire relative position information between the two, the number of processing steps can be reduced. For this reason, it is possible to easily and accurately perform the original distortion correction processing.

【0098】ここまでの説明では、撮影された見開き原
稿に、スキューやあおりのない場合を考えていた。以
下、図20および図21を用いて、原稿全体にスキュー
やあおりがある場合の処理について説明する。
In the above description, the case where the photographed double-page spread original has no skew or tilt is considered. Hereinafter, a process in a case where there is a skew or a tilt in the entire original will be described with reference to FIGS.

【0099】図20(a)に示されるように、見開き原
稿にスキューやあおりがある場合は、図3の原稿端検出
処理(S305)の検出結果に基づいて、A〜Dの各端
点を求めるそして、これらの端点を基に、図20(b)
に示されるように、予めこれらを補正する。そして、図
3のステップS307、S309、およびS311の各
処理を行なう。
As shown in FIG. 20A, when there is a skew or a tilt in a two-page spread document, each end point of A to D is obtained based on the detection result of the document end detection process (S305) in FIG. Then, based on these end points, FIG.
These are corrected in advance as shown in FIG. Then, each processing of steps S307, S309, and S311 of FIG. 3 is performed.

【0100】なお、見開き原稿と撮像器1の空間的な位
置関係が既知であれば、その位置関係の情報を用いてス
キューやあおりを補正してもよい。この場合、最初から
あおり等の補正された画像データを用いて、図3のブッ
ク歪み補正(ステップS301〜S311)を行なう。
If the spatial positional relationship between the two-page spread document and the image pickup device 1 is known, the skew and the tilt may be corrected using the positional relationship information. In this case, the book distortion correction (steps S301 to S311) in FIG. 3 is performed from the beginning using the image data corrected for tilt and the like.

【0101】図21は、たるみやあおりのために原稿の
上端と下端において高さ変化が異なる場合に、撮影され
た原稿画像から高さ情報を算出する方法を説明するため
の図である。ここでは、直線AM、直線ST、および直
線DNは、x軸に平行な(水平な)直線である。また、
直線QRは、原稿上の垂直な直線に該当し、撮影された
原稿画像上では、あおりのためにy軸と平行ではない直
線である。
FIG. 21 is a diagram for explaining a method of calculating height information from a photographed document image when the height change is different between the upper end and the lower end of the document due to slack or tilt. Here, the straight line AM, the straight line ST, and the straight line DN are straight lines (horizontal) parallel to the x-axis. Also,
The straight line QR corresponds to a vertical straight line on the document, and is a straight line that is not parallel to the y-axis on the photographed document image due to tilt.

【0102】本図を参照して、まず、直線AM上(y=
ya上)の任意の点の高さ情報は、前述した方法により
原稿上端の形状から算出される。また、直線DN上(y
=yd上)の任意の点の高さ情報も、同様に、原稿下端
の形状から算出される。よって、直線AM上の点Qの高
さ情報をHq、直線DN上の点Rの高さ情報Hrは、そ
れぞれのx座標の値xqおよびxrが分かれば、算出す
ることができる。
Referring to this figure, first, on a straight line AM (y =
The height information of an arbitrary point on ya) is calculated from the shape of the upper end of the document by the above-described method. Also, on the straight line DN (y
Similarly, the height information of the arbitrary point (= yd above) is calculated from the shape of the lower end of the document. Therefore, the height information Hr of the point Q on the straight line AM and the height information Hr of the point R on the straight line DN can be calculated if the values xq and xr of the respective x coordinates are known.

【0103】ここで、xq={(xm−xa)(xp−
xs)/(xt−xs)}+xa xr={(xn−xd)(xp−xs)/(xt−x
s)}+xd である。なお、xi(i=a,d,m,n,p,t)
は、i点におけるx座標の値である。したがって、x
q、xrを用いることで、直線ST上の任意の点Pの高
さ情報Hpは、次式により算出することができる。
Here, xq = {(xm−xa) (xp−
xs) / (xt−xs)} + xa xr = {(xn−xd) (xp−xs) / (xt−x
s)} + xd. Note that xi (i = a, d, m, n, p, t)
Is the value of the x coordinate at point i. Therefore, x
By using q and xr, the height information Hp of an arbitrary point P on the straight line ST can be calculated by the following equation.

【0104】Hp={(yd−yp)Hq+(yp−y
a)Hr}/(yd−ya) このようにして、原稿上の任意の点の高さ情報が、原稿
上端および原稿下端からの距離、原稿上端および下端の
高さ情報を用いて算出される。
Hp = {(yd-yp) Hq + (yp-y
a) Hr} / (yd-ya) In this manner, the height information of an arbitrary point on the document is calculated using the distance from the top and bottom edges of the document and the height information of the top and bottom edges of the document. .

【0105】そして、高さ情報に基づく幾何学変形処理
は、水平方向については、任意の点Pを通る水平線(直
線ST)上の高さ分布を基に座標位置変換を行い、垂直
方向については任意の点Pにおける高さ情報(あるい
は、OR上の全ての点の高さ情報の平均値)を基に座標
位置変換を行なう。
In the geometric deformation processing based on the height information, coordinate position conversion is performed in the horizontal direction based on a height distribution on a horizontal line (straight line ST) passing an arbitrary point P, and in the vertical direction, Coordinate position conversion is performed based on height information at an arbitrary point P (or an average value of height information of all points on the OR).

【0106】このように、2つの高さ情報を用いてブッ
ク歪み補正を行なうことで、さらに高精度な歪み補正を
行なうことができる。
As described above, by performing book distortion correction using two pieces of height information, more accurate distortion correction can be performed.

【0107】以上説明したように、本実施の形態におけ
る歪み補正装置200によると、まず、高さの異なる見
開き原稿を上方から撮影した際の画像データから原稿端
が検出される。このとき検出される原稿端は、撮像器か
らより遠い位置の原稿端である。次に、検出された原稿
端、撮像器と原稿との概距離(垂直距離)、および相対
距離(水平距離)を用いることで、原稿の高さ情報が算
出される。そして、この算出された高さ情報を用いて元
画像に幾何変換が施される。
As described above, according to the distortion correction apparatus 200 of the present embodiment, first, the edges of the original are detected from the image data obtained when the double-page spread originals having different heights are photographed from above. The document edge detected at this time is the document edge located farther from the image pickup device. Next, the height information of the document is calculated by using the detected document edge, the approximate distance (vertical distance) between the image pickup device and the document, and the relative distance (horizontal distance). Then, geometric transformation is performed on the original image using the calculated height information.

【0108】これにより、原稿表面が歪曲している見開
き原稿の画像があたかも平面原稿であるかのような画像
へと変換されることになる。特に、高さ情報の算出に用
いられる原稿端は、撮像器からより遠い位置にある原稿
端であるため、より高精度の高さ情報を得ることが可能
となる。よって、高さ情報を基に行なわれる幾何変換の
精度も向上する。その結果、補正後の画像は、文書の識
別が容易となり、また、文書画像処理も容易に行なうこ
とができる。
As a result, an image of a two-page spread original having a distorted original surface is converted into an image as if it were a flat original. In particular, since the document edge used for calculating the height information is the document edge located farther from the image pickup device, it is possible to obtain more accurate height information. Therefore, the accuracy of the geometric transformation performed based on the height information is also improved. As a result, in the corrected image, the document can be easily identified, and the document image processing can be easily performed.

【0109】しかも、撮影された画像情報から検出され
た原稿端形状(エッジ形状)を基に、相対距離、高さ情
報等を得ることができるため、照明装置や複雑なセンサ
装置等を不要とし、簡易かつ装置の小型化を図ることが
できる。
Furthermore, since relative distance and height information can be obtained based on the document edge shape (edge shape) detected from the photographed image information, an illumination device and a complicated sensor device are not required. In addition, the size of the apparatus can be simplified and reduced.

【0110】なお、今回示した歪み補正処理は、上述し
た一連の処理動作を機能させるための歪み補正プログラ
ムをコンピュータに実行させることによって実現するこ
とができる。歪み補正プログラムは、予めコンピュータ
内のハードディスクにインストールされたものであって
もよいし、CD−ROM、磁気テープのような取り外し
可能な記録媒体に記録されたものであってもよい。いず
れにせよ、歪み補正プログラムはコンピュータ読み取り
可能な記録媒体に記録されている。
[0110] The distortion correction processing described here can be realized by causing a computer to execute a distortion correction program for causing the above-described series of processing operations to function. The distortion correction program may be installed in a hard disk in a computer in advance, or may be recorded on a removable recording medium such as a CD-ROM or a magnetic tape. In any case, the distortion correction program is recorded on a computer-readable recording medium.

【0111】なお、コンピュータ読み取り可能な記録媒
体としては、磁気テープやカセットテープなどのテープ
系、磁気ディスク(フレキシブルディスク、ハードディ
スク装置等)や光ディスク(CD−ROM/MO/MD
/DVD等)などのディスク系、ICカード(メモリカ
ードを含む)や光カードなどのカード系、あるいはマス
クROM、EPROM、EEPROM、フラッシュRO
Mなどの半導体メモリ等の、固定的にプログラムを担持
する媒体が考えられる。
The computer-readable recording medium includes a tape system such as a magnetic tape and a cassette tape, a magnetic disk (flexible disk, hard disk device, etc.) and an optical disk (CD-ROM / MO / MD).
/ DVD etc., IC card (including memory card) and optical card etc., mask ROM, EPROM, EEPROM, flash RO
A medium that fixedly holds the program, such as a semiconductor memory such as M, may be used.

【0112】また、ネットワークからプログラムがダウ
ンロードされるように、流動的にプログラムを担持する
媒体であってもよい。
Further, the medium may carry the program in a fluid manner so that the program is downloaded from the network.

【0113】なお、記録媒体に格納される内容として
は、プログラムに限定されず、データであってもよい。
The content stored in the recording medium is not limited to a program but may be data.

【0114】なお、今回の実施の形態においては、図6
等で説得明したように、原稿端を検出することで原稿端
形状(エッジ形状)を求めている。しかし、原稿端に限
らず、原稿上の文字列、罫線等の本来ライン状の領域等
をエッジとして検出してもよい。原稿の高さや方向の変
化によって、原稿端と同様にこれらのライン状の領域も
曲がって撮影されるため、これらのライン状の領域等の
形状を基に高さ情報を算出することもできる。なお、こ
れらの形状の検出は、前述の相対位置を算出する際の文
字列、矩形、罫線等の傾き検出方法と同様の検出方法を
用いればよい。
In this embodiment, FIG.
As described above, the document edge shape (edge shape) is obtained by detecting the document edge. However, not limited to the edge of the original, an original line-shaped area such as a character string or a ruled line on the original may be detected as an edge. These linear regions are also bent and photographed in the same manner as the document edge due to a change in the height and direction of the document. Therefore, height information can be calculated based on the shape of these linear regions and the like. Note that these shapes can be detected by using the same detection method as the above-described inclination detection method for character strings, rectangles, ruled lines, and the like when calculating the relative position.

【0115】また、図3の原稿端検出処理(S305)
においては、図6および図7で示す方法により原稿端が
検出される場合を説明した。しかし、このような検出方
法に限定されるものはなく、エッジ追跡の際に比較すべ
き画素数を増減させたり、また、他の方法により検出し
てもよい。
Also, the document edge detection processing of FIG. 3 (S305)
Has been described with reference to FIGS. 6 and 7 where the edge of the original is detected. However, there is no limitation to such a detection method, and the number of pixels to be compared at the time of edge tracking may be increased or decreased, or may be detected by another method.

【0116】今回開示された実施の形態はすべての点で
例示であって、制限的なものではないと考えるべきであ
る。本発明の範囲は、上記した説明ではなく特許請求の
範囲によって示され、特許請求の範囲と均等の意味及び
範囲内ですべての変更が含まれることが意図される。
The embodiment disclosed this time is an example in all respects, and should not be considered as limiting. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明の実施の形態における歪み補正装置を
備えた手持ち型の撮像器1が、見開き原稿2を撮影する
様子を示した図である。
FIG. 1 is a diagram illustrating a state in which a hand-held image pickup device 1 including a distortion correction device according to an embodiment of the present invention captures a two-page spread document 2;

【図2】 本発明の実施の形態における歪み補正装置2
00全体の概略構成を示した図である。
FIG. 2 shows a distortion correction device 2 according to an embodiment of the present invention.
FIG. 1 is a diagram showing a schematic configuration of the whole 00.

【図3】 歪み補正装置200におけるブック歪み補正
処理の全体の流れを示したフローチャートである。
FIG. 3 is a flowchart showing an overall flow of a book distortion correction process in the distortion correction device 200.

【図4】 図22で示した見開き原稿の撮影画像を、縮
小処理した後に、鮮鋭化処理、白画素拡大処理、平滑化
処理を順に行なった場合の画像を示す図である。
FIG. 4 is a diagram showing an image obtained when a sharpening process, a white pixel enlarging process, and a smoothing process are sequentially performed after reducing a photographed image of a two-page spread document illustrated in FIG. 22;

【図5】 図4の前処理が施された画像を基に、二次微
分の絶対値を算出して、二次微分画像を作成した図であ
る。
FIG. 5 is a diagram in which the absolute value of the second derivative is calculated based on the image subjected to the preprocessing in FIG. 4 to create a second derivative image.

【図6】 原稿端の検出処理(S305)を説明するた
めの図である。
FIG. 6 is a diagram for explaining a document edge detection process (S305).

【図7】 右側のエッジ画素の検出を説明するために、
図6のA付近の画素を拡大して示した図である。
FIG. 7 illustrates the detection of a right edge pixel.
FIG. 7 is an enlarged view of a pixel near A in FIG. 6.

【図8】 撮像器1から、薄い見開き原稿をかなり鋭角
で見た場合に得られる原稿端形状lを説明するための図
である。
FIG. 8 is a diagram for explaining a document edge shape 1 obtained when a thin double-page spread document is viewed from the image pickup device 1 at a considerably acute angle.

【図9】 分厚い原稿をほぼ真上から見た場合に得られ
る原稿端形状l’を説明するための図である。
FIG. 9 is a diagram for explaining a document end shape l ′ obtained when a thick document is viewed from almost right above.

【図10】 薄い原稿をほぼ真上から見た場合であっ
て、原稿サイズが大きい場合に得られる原稿端形状l”
を説明するための図である。
FIG. 10 shows a document edge shape l ″ obtained when a thin document is viewed from almost right above and the document size is large.
FIG.

【図11】 原稿端情報から相対位置を算出する具体例
を説明するための図である。
FIG. 11 is a diagram for describing a specific example of calculating a relative position from document edge information.

【図12】 撮像器1の相対位置を複数の傾き角を基に
算出する場合を示した図である。
FIG. 12 is a diagram showing a case where a relative position of the image pickup device 1 is calculated based on a plurality of inclination angles.

【図13】 撮影された原稿端Lと撮像器1との位置関
係を示した斜視図である。
FIG. 13 is a perspective view showing a positional relationship between a photographed document end L and an image pickup device 1.

【図14】 図13を矢印方向から見た場合の位置関係
を説明するための図である。
FIG. 14 is a diagram for explaining a positional relationship when FIG. 13 is viewed from the direction of the arrow.

【図15】 水平方向に幾何学変形される様子を概念的
に示した図である。
FIG. 15 is a diagram conceptually showing a state of being geometrically deformed in the horizontal direction.

【図16】 幾何学変形により画像が変換される様子を
より詳細に説明するための図である。
FIG. 16 is a diagram for explaining in more detail how an image is converted by geometric deformation.

【図17】 高さ情報に基づく幾何学変形補正によりブ
ック歪みが補正される様子を概念的に示した図である。
FIG. 17 is a diagram conceptually showing how book distortion is corrected by geometric deformation correction based on height information.

【図18】 歪み補正装置200が設けられた据え置き
型の撮像器18が、見開き原稿2を撮影する様子を示し
た図である。
FIG. 18 is a diagram illustrating a state in which the stationary image pickup device 18 provided with the distortion correction device 200 captures a two-page spread original 2;

【図19】 据え置き型の撮像器18により撮影された
原稿2の画像を示す図である。
FIG. 19 is a diagram showing an image of the document 2 photographed by the stationary image pickup device 18.

【図20】 原稿全体にスキューやあおりがある場合の
処理について説明するための図である。
FIG. 20 is a diagram for describing processing when there is a skew or a tilt in the entire document.

【図21】 たるみやあおりのために原稿の上端と下端
において高さ変化が異なる場合に、撮影された原稿画像
から高さ情報を算出する方法を説明するための図であ
る。
FIG. 21 is a diagram for explaining a method of calculating height information from a captured document image when a change in height is different between the upper end and the lower end of the document due to slack or tilt.

【図22】 見開き本を上方から撮影した場合に得られ
る歪んだ画像の一例を示す図である。
FIG. 22 is a diagram illustrating an example of a distorted image obtained when a facing book is photographed from above.

【図23】 原稿画像の水平方向の位置によって、画像
のサイズが変化する様子を示した図である。
FIG. 23 is a diagram illustrating a state in which the size of an image changes depending on the position of the document image in the horizontal direction.

【図24】 原稿画像の水平方向に画像の伸び縮みが生
じる様子を示した図である。
FIG. 24 is a diagram illustrating a state in which the image expands and contracts in the horizontal direction of the document image.

【図25】 平面画像が、水平方向および垂直方向それ
ぞれに歪んだ画像として撮影される様子を示した図であ
る。
FIG. 25 is a diagram illustrating a state in which a planar image is captured as an image distorted in each of a horizontal direction and a vertical direction.

【符号の説明】[Explanation of symbols]

1 撮像器(手持ち型)、18 据え置き型の撮像器、
200 歪み補正装置、201 入力部、203 メモ
リ、205 距離センサ、207 出力部、209 C
PU。
1 imager (hand-held type), 18 stationary imager,
200 distortion correction device, 201 input unit, 203 memory, 205 distance sensor, 207 output unit, 209 C
PU.

フロントページの続き Fターム(参考) 5B057 AA11 BA02 BA19 CA08 CA12 CA16 CB08 CB12 CB16 CC01 CD12 DB02 DB09 DC16 DC30 5C022 AA13 AB24 AB26 AC31 AC69 5C023 AA02 AA03 AA04 AA10 BA02 CA02 DA04 DA08 EA03 EA06 EA12 5C076 AA23 BA01 BA06 BA08 Continued on the front page F-term (reference)

Claims (11)

【特許請求の範囲】[Claims] 【請求項1】 撮像部により撮影された対象物の画像デ
ータを取得する画像データ取得手段と、 前記取得された画像データから所望のライン状領域を検
出する検出手段と、 前記検出された所望のライン状領域、および、前記撮像
部と前記対象物との相対位置に関する情報に基づいて、
前記対象物の撮影面の高さ分布情報を算出する算出手段
と、 前記算出された高さ分布情報に基づいて、前記取得され
た画像データを幾何変換する変換手段とを備え、 前記検出手段により検出される所望のライン状領域は、
前記撮像部からより遠い位置にあるライン状領域である
ことを特徴とする、歪み補正装置。
An image data acquisition unit that acquires image data of an object photographed by an imaging unit; a detection unit that detects a desired linear region from the acquired image data; Line-shaped area, and, based on information about the relative position between the imaging unit and the object,
Calculating means for calculating height distribution information of the imaging surface of the object; andconversion means for geometrically transforming the acquired image data based on the calculated height distribution information. The desired linear area to be detected is
A distortion correction device, wherein the distortion correction device is a linear region located farther from the imaging unit.
【請求項2】 前記所望のライン状領域は、前記対象物
の端部、または、罫線、文字列等の前記対象物の撮影面
上に記載された連続線を含む、請求項1に記載の歪み補
正装置。
2. The object according to claim 1, wherein the desired line-shaped area includes an end of the object or a continuous line such as a ruled line or a character string described on an imaging surface of the object. Distortion correction device.
【請求項3】 前記撮像部と前記対象物との相対位置に
関する情報を取得する位置情報取得手段をさらに備え、 前記相対位置に関する情報は、前記撮像部と前記対象物
の垂直距離に関する情報および水平距離に関する情報を
含む、請求項1または2に記載の歪み補正装置。
3. The apparatus according to claim 1, further comprising a position information acquisition unit configured to acquire information on a relative position between the imaging unit and the object, wherein the information on the relative position includes information on a vertical distance between the imaging unit and the object and horizontal information. The distortion correction device according to claim 1, wherein the distortion correction device includes information on a distance.
【請求項4】 前記検出手段は、 前記取得された画像データから2つのライン状領域を抽
出する抽出手段と、 前記抽出された2つのライン状領域のうち前記撮像部か
らより遠い位置にあるライン状領域を選択する選択手段
とを含み、 前記選択されたライン状領域を前記所望のライン状領域
とすることを特徴とする、請求項1から3のいずれかに
記載の歪み補正装置。
4. The detection unit includes: an extraction unit configured to extract two linear regions from the acquired image data; and a line located at a position farther from the imaging unit among the extracted two linear regions. 4. The distortion correction device according to claim 1, further comprising: selecting means for selecting a linear region, wherein the selected linear region is set as the desired linear region. 5.
【請求項5】 前記選択手段は、 前記抽出された2つのライン状領域それぞれの傾きを検
出する傾き検出手段を含み、 前記検出された傾きを基に、前記撮像部からより遠い位
置にあるライン状領域を選択することを特徴とする、請
求項4に記載の歪み補正装置。
5. The method according to claim 1, wherein the selecting unit includes a tilt detecting unit configured to detect a tilt of each of the two extracted line-shaped regions. A line located at a position farther from the imaging unit based on the detected tilt. The distortion correction apparatus according to claim 4, wherein a shape region is selected.
【請求項6】 撮像部により撮影された対象物の画像デ
ータを取得する画像データ取得ステップと、 前記取得された画像データから所望のライン状領域を検
出する検出ステップと、 前記検出された所望のライン状領域、および、前記撮像
部と前記対象物との相対位置に関する情報に基づいて、
前記対象物の撮影面の高さ分布情報を算出する算出ステ
ップと、 前記算出された高さ分布情報に基づいて、前記取得され
た画像データを幾何変換する変換ステップとを備え、 前記検出ステップにより検出される所望のライン状領域
は、前記撮像部からより遠い位置にあるライン状領域で
あることを特徴とする、歪み補正方法。
6. An image data acquiring step of acquiring image data of an object photographed by an imaging unit; a detecting step of detecting a desired linear region from the acquired image data; Line-shaped area, and, based on information about the relative position between the imaging unit and the object,
A calculating step of calculating height distribution information of the imaging surface of the object; anda converting step of geometrically converting the obtained image data based on the calculated height distribution information, The distortion correction method, wherein the detected desired linear region is a linear region located farther from the imaging unit.
【請求項7】 前記所望のライン状領域は、前記対象物
の端部、または、罫線、文字列等の前記対象物の撮影面
上に記載された連続線を含む、請求項6に記載の歪み補
正方法。
7. The object according to claim 6, wherein the desired line-shaped area includes an end portion of the object or a continuous line such as a ruled line or a character string described on a photographing surface of the object. Distortion correction method.
【請求項8】 前記撮像部と前記対象物との相対位置に
関する情報を取得する位置情報取得ステップをさらに備
え、 前記相対位置に関する情報は、前記撮像部と前記対象物
の垂直距離に関する情報および水平距離に関する情報を
含む、請求項6または7に記載の歪み補正方法。
8. A position information obtaining step of obtaining information on a relative position between the imaging unit and the object, wherein the information on the relative position is information on a vertical distance between the imaging unit and the object and horizontal information. The distortion correction method according to claim 6, further comprising information on a distance.
【請求項9】 前記検出ステップは、 前記取得された画像データから2つのライン状領域を抽
出する抽出ステップと、 前記抽出された2つのライン状領域のうち前記撮像部か
らより遠い位置にあるライン状領域を選択する選択ステ
ップとを含み、 前記選択されたライン状領域を前記所望のライン状領域
とすることを特徴とする、請求項6から8のいずれかに
記載の歪み補正方法。
9. The detecting step includes: extracting two linear regions from the acquired image data; and a line located at a position farther from the imaging unit among the extracted two linear regions. 9. The distortion correction method according to claim 6, further comprising: selecting a linear region, wherein the selected linear region is set as the desired linear region.
【請求項10】 前記選択ステップは、 前記抽出された2つのライン状領域それぞれの傾きを検
出する傾き検出ステップを含み、 前記検出された傾きを基に、前記撮像部からより遠い位
置にあるライン状領域を選択することを特徴とする、請
求項9に記載の歪み補正方法。
10. The selection step includes a tilt detection step of detecting a tilt of each of the two extracted linear regions. A line located farther from the imaging unit based on the detected tilt. The distortion correction method according to claim 9, wherein a shape region is selected.
【請求項11】 請求項6〜10のいずれかに記載の歪
み補正方法をコンピュータに実行させるための歪み補正
プログラムを記録したコンピュータ読み取り可能な記録
媒体。
11. A computer-readable recording medium storing a distortion correction program for causing a computer to execute the distortion correction method according to claim 6.
JP2000260376A 2000-08-30 2000-08-30 Apparatus and method for correcting distortion as well as distortion correction program recording computer readable recording medium Pending JP2002077578A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000260376A JP2002077578A (en) 2000-08-30 2000-08-30 Apparatus and method for correcting distortion as well as distortion correction program recording computer readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000260376A JP2002077578A (en) 2000-08-30 2000-08-30 Apparatus and method for correcting distortion as well as distortion correction program recording computer readable recording medium

Publications (1)

Publication Number Publication Date
JP2002077578A true JP2002077578A (en) 2002-03-15

Family

ID=18748397

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000260376A Pending JP2002077578A (en) 2000-08-30 2000-08-30 Apparatus and method for correcting distortion as well as distortion correction program recording computer readable recording medium

Country Status (1)

Country Link
JP (1) JP2002077578A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2093994A1 (en) 2008-02-19 2009-08-26 Canon Kabushiki Kaisha Electronic document producing device, electronic document producing method and storage medium
JP2013093704A (en) * 2011-10-25 2013-05-16 Ricoh Co Ltd Imaging apparatus and imaging method
KR101282247B1 (en) 2007-12-03 2013-07-10 삼성전자주식회사 Scanning apparatus and imgae correction method having the same
JP2016103859A (en) * 2012-12-21 2016-06-02 カシオ計算機株式会社 Image processing apparatus
CN105678684A (en) * 2014-11-18 2016-06-15 中兴通讯股份有限公司 Image capture method and device
JP2016177430A (en) * 2015-03-19 2016-10-06 カシオ計算機株式会社 Image correction device, image correction method, and program

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101282247B1 (en) 2007-12-03 2013-07-10 삼성전자주식회사 Scanning apparatus and imgae correction method having the same
EP2093994A1 (en) 2008-02-19 2009-08-26 Canon Kabushiki Kaisha Electronic document producing device, electronic document producing method and storage medium
US8532386B2 (en) 2008-02-19 2013-09-10 Canon Kabushiki Kaisha Electronic document producing device, electronic document producing method and storage medium
JP2013093704A (en) * 2011-10-25 2013-05-16 Ricoh Co Ltd Imaging apparatus and imaging method
JP2016103859A (en) * 2012-12-21 2016-06-02 カシオ計算機株式会社 Image processing apparatus
CN105678684A (en) * 2014-11-18 2016-06-15 中兴通讯股份有限公司 Image capture method and device
JP2018504662A (en) * 2014-11-18 2018-02-15 ゼットティーイー コーポレイション Image capture method, apparatus, and storage medium
US10419742B2 (en) 2014-11-18 2019-09-17 Xi'an Zhongxing New Software Co. Ltd. Method and device for capturing image and storage medium
JP2016177430A (en) * 2015-03-19 2016-10-06 カシオ計算機株式会社 Image correction device, image correction method, and program

Similar Documents

Publication Publication Date Title
US10289924B2 (en) System and method for scanned document correction
JP3631333B2 (en) Image processing device
US8457403B2 (en) Method of detecting and correcting digital images of books in the book spine area
US8170368B2 (en) Correcting device and method for perspective transformed document images
JP4955096B2 (en) DETECTING DEVICE, DETECTING METHOD, DETECTING PROGRAM, AND RECORDING MEDIUM
KR101399709B1 (en) Model-based dewarping method and apparatus
US8554012B2 (en) Image processing apparatus and image processing method for correcting distortion in photographed image
US7079265B2 (en) Distortion correction device for correcting imaged object to produce plane image without distortion
JP2003304390A (en) Image compensating device, program, memory medium, image compensating method, image reader, and image forming device
JP2000020682A (en) Image correction device
JPH0795387A (en) Method and device for correcting distortion
CN109948135B (en) Method and equipment for normalizing image based on form characteristics
WO2012172817A1 (en) Image stabilization apparatus, image stabilization method, and document
US7272267B1 (en) Image processing method and apparatus for normalizing faces for a layout image
WO2019187967A1 (en) Image processing device and image processing method
JP2012050013A (en) Imaging apparatus, image processing device, image processing method, and image processing program
EP2536123B1 (en) Image processing method and image processing apparatus
JP4013060B2 (en) Image correction method and image correction apparatus
JP2002077578A (en) Apparatus and method for correcting distortion as well as distortion correction program recording computer readable recording medium
JP2004362053A (en) Two-dimensional code reading device
JPH05161002A (en) Original reader
CN113920525A (en) Text correction method, device, equipment and storage medium
JP2009025992A (en) Two-dimensional code
JP5563390B2 (en) Image processing apparatus, control method therefor, and program
US10373324B2 (en) Measurement apparatus that scans original, method of controlling the same, and storage medium

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20050615