JP2005168054A - Image pickup device, and apparatus for utilizing imaged data thereof - Google Patents

Image pickup device, and apparatus for utilizing imaged data thereof Download PDF

Info

Publication number
JP2005168054A
JP2005168054A JP2005027852A JP2005027852A JP2005168054A JP 2005168054 A JP2005168054 A JP 2005168054A JP 2005027852 A JP2005027852 A JP 2005027852A JP 2005027852 A JP2005027852 A JP 2005027852A JP 2005168054 A JP2005168054 A JP 2005168054A
Authority
JP
Japan
Prior art keywords
image
value
distortion
parameters
stored
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
JP2005027852A
Other languages
Japanese (ja)
Inventor
Koichi Ejiri
公一 江尻
Shin Aoki
伸 青木
Kaikoku Seki
海克 関
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 JP2005027852A priority Critical patent/JP2005168054A/en
Publication of JP2005168054A publication Critical patent/JP2005168054A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To realize a versatile method for correcting the distortion of a photographed image. <P>SOLUTION: Points pi' and pi" and points pj' and pj" are observation points on an image plane where the same point is photographed in different camera azimuths from the same spot. Positions pio' and pio" and positions pjo' and pjo" individually represent true positions where the distortion of the observation points is corrected. A symbol C indicates the optical center of a lens system. The second and fourth order distorted aberration coefficients A, B of a distorted aberration function f(Φ)=1-AΦ<SP>2</SP>+BΦ<SP>4</SP>are estimated to minimize an error evaluation value E=ä∠pjo'Cpio'-∠pjo"Cpio"}<SP>2</SP>. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、画像を撮影し、その画像データを記憶媒体に記憶するデジタルカメラ等の撮像装置、及び、記憶媒体の画像データを読み取り処理する装置に関する。The present invention relates to an imaging apparatus such as a digital camera that captures an image and stores the image data in a storage medium, and an apparatus that reads and processes the image data in the storage medium.

デジタルカメラ、ビデオカメラ等の撮像装置によって撮影された画像は、着脱可能なメモリカード等の記憶媒体に画像データとして記憶され、後日、この記憶媒体に記憶された画像データが所望の装置で読み取られ、補正処理等が施されて出力される。An image taken by an imaging device such as a digital camera or a video camera is stored as image data in a storage medium such as a removable memory card, and the image data stored in the storage medium is read by a desired device at a later date. , Correction processing and the like are performed and output.

デジタルカメラ、ビデオカメラ等の撮像装置によって撮影された画像には、いわゆるレンズ系の歪曲収差によって、像が本来あるべき位置からずれた位置に結像することによる幾何学的な歪みが含まれている。これまで、レンズの設計技術によって歪曲収差を回避する努力がなされてきた。しかし、デジタルカメラ、ビデオカメラ等のレンズ系は、ズーム機能や自動焦点機能等の装備が一般的になるなど高機能化が進むにつれて、レンズ設計技術だけでは歪曲収差の回避が困難になっている。   An image taken by an imaging device such as a digital camera or a video camera includes geometric distortion caused by forming an image at a position deviated from a position where the image should originally be due to distortion of a so-called lens system. Yes. Until now, efforts have been made to avoid distortion by lens design techniques. However, with lens systems such as digital cameras and video cameras, it is difficult to avoid distortion with lens design technology alone, as advanced functions such as zoom and autofocus functions become common. .

その一方で、デジタル画像の高精細化に伴って、画像計測、画像合成、画像編集等の新たなニーズが登場し、今後も増加の一途であるため、画像の高精細化、高品質化に対する要求がますます高まると予想される。しかし、現在のデジタルカメラ等は、そのような目的を達成するための条件を十分に満たしているとは言い難い。   On the other hand, with the increase in the definition of digital images, new needs such as image measurement, image composition, image editing, etc. have appeared and will continue to increase. The demand is expected to increase. However, it is difficult to say that current digital cameras and the like sufficiently satisfy the conditions for achieving such an object.

本発明の主要な目的は、撮影した1枚1枚の画像の明るさ、色合い等の高精度な補正を、撮影に利用したデジタルカメラ等とは別の機器で容易に行うことができるようにしたデジタルカメラ等の撮像装置を提供することにある。 The main object of the present invention is to make it possible to easily perform high-precision correction of the brightness and hue of each photographed image with a device other than the digital camera used for photographing. Another object is to provide an imaging apparatus such as a digital camera.

本発明は、画像を撮影し、画像データを記憶媒体に記憶する撮像装置において、撮影した画像データ毎に、画像データと、当該画像データの撮影時に使用された画質調整に関するパラメータとを一つのデータとして記憶媒体に記憶することを特徴とする。パラメータは具体的には、撮影時に読み取られるγ変換テーブル値、画像信号増幅器のゲイン値、画像信号の色別平均値、ダイナミックレンジ、レンズ中心と撮像面間距離などである。According to the present invention, in an imaging device that captures an image and stores the image data in a storage medium, for each captured image data, image data and a parameter relating to image quality adjustment used at the time of capturing the image data are stored as one data. It memorize | stores in a storage medium. Specifically, the parameters are a γ conversion table value read at the time of photographing, a gain value of the image signal amplifier, an average value for each color of the image signal, a dynamic range, a distance between the lens center and the imaging surface, and the like.

さらに、本発明の撮像装置においては、画像ピッチやレンズ焦点距離などの撮像装置固有のパラメータも加えて一つのデータとして記憶媒体に記憶することを特徴とする。Furthermore, the image pickup apparatus of the present invention is characterized in that the parameters unique to the image pickup apparatus such as the image pitch and the lens focal length are added and stored as one data in the storage medium.

また、本発明の撮像装置においては、記憶媒体に記憶する画像データの最初の1ライン分に前記パラメータを格納することを特徴とする。In the imaging apparatus of the present invention, the parameter is stored in the first line of image data stored in a storage medium.

本発明は、また、記憶媒体に記憶された画像データを読み取り処理する装置において、上記の撮像装置にて画像データとパラメータとが一つのデータとして記憶された記憶媒体の該データを読み取り、画像データとパラメータとを分離し、そのパラメータを用いて画像データの補正処理を行うことを特徴とする。The present invention also provides an apparatus for reading and processing image data stored in a storage medium. The image data is read from the storage medium in which the image data and the parameters are stored as one data by the imaging device. And the parameter are separated, and the correction processing of the image data is performed using the parameter.

本発明によれば、デジタルカメラ等の撮像装置によって撮影された画像データのみならず、当該画像データの撮影時に使用された画質調整に関するパラメータ、さらには該撮像装置固有のパラメータが画像データと一体に記憶媒体に記憶されるため、該記憶媒体のデータを所望の装置で読み取ることで、画像データの補正処理を容易に行うことが可能になる。According to the present invention, not only image data captured by an imaging apparatus such as a digital camera, but also parameters relating to image quality adjustment used at the time of capturing the image data, and parameters specific to the imaging apparatus are integrated with the image data. Since the data is stored in the storage medium, the correction processing of the image data can be easily performed by reading the data in the storage medium with a desired device.

以下、本発明の実施の形態を明らかにするため、図面を用いて本発明を具体的に説明する。   Hereinafter, in order to clarify embodiments of the present invention, the present invention will be specifically described with reference to the drawings.

まず、画像の歪み補正に関して説明する。図1は、ある対象物をカメラで撮影した時の光軸と入射光のなす角度Φi,Φjと、その像の光軸に対する角度Φi’,Φj’、同じ対象物をカメラアングルをずらして撮影した時の像と光軸とのなす角度Φi”,Φj”(図中の破線)の関係を示している。Rはレンズ系の光学中心から画像面までの距離である。このときに、次に示す(1)式から(5)式の関係が成り立つ。ただし、Φは真の値、Φio’,Φjo’,Φio”,Φjo”は観測値Φi’,Φj’,Φi”,Φj”から算出した真値の予測値である。   First, image distortion correction will be described. FIG. 1 shows an angle Φi, Φj formed by an optical axis and incident light when a certain object is photographed with a camera, and angles Φi ′, Φj ′ with respect to the optical axis of the image, and the same object is photographed by shifting the camera angle. The relationship between the angles Φi ″ and Φj ″ (broken lines in the figure) formed by the image and the optical axis is shown. R is the distance from the optical center of the lens system to the image plane. At this time, the following expressions (1) to (5) are satisfied. However, Φ is a true value, and Φio ′, Φjo ′, Φio ″, Φjo ″ are predicted values of true values calculated from the observed values Φi ′, Φj ′, Φi ″, Φj ″.

Figure 2005168054
Figure 2005168054

Figure 2005168054
Figure 2005168054

Figure 2005168054
Figure 2005168054

Figure 2005168054
Figure 2005168054

Figure 2005168054
Figure 2005168054

上記(3)式が歪曲収差関数である。ここでは、同じ対象物を同一地点から異なった撮影条件で撮影した2枚(又はそれ以上)の画像の情報から、その歪み補正のためのパラメータとして、(3)式の2次、4次の歪曲収差係数A,Bを推定することによって、歪曲収差による画像の歪みの補正を達成する。上記(5)式中のRはレンズ系の光学中心から画像面までの距離であるが、このRの値は、後述の「一次元の場合」には予め仮定して歪曲収差係数A,Bを決定する(Rの値はある程度予測できる場合が多いから)。しかし、後述の「二次元の場合」には、歪曲収差係数A,Bを求める処理において、Rの値も画像の情報に基づいて決定される。ただし、「一次元の場合」においても同様にR値を推定してもよいことは当然である。 The above equation (3) is a distortion aberration function. Here, from the information of two (or more) images obtained by photographing the same object from the same point under different photographing conditions, the second and fourth order equations (3) are used as parameters for correcting the distortion. By estimating the distortion aberration coefficients A and B, correction of image distortion due to distortion is achieved . In the above equation (5), R is the distance from the optical center of the lens system to the image plane. The value of R is assumed in advance in the “one-dimensional case” described later, and distortion aberration coefficients A and B (The value of R is often predictable to some extent). However, in the “two-dimensional case” described later, the value of R is also determined based on image information in the process of obtaining the distortion aberration coefficients A and B. However, it is natural that the R value may be similarly estimated in the “one-dimensional case”.

次に、歪み補正用パラメータを決定する処理の具体例を説明する。この処理においては、一地点から同じ対象物(パターン)を異なった条件で撮影した2枚の画像より、対応した点(観測点)を2組以上抽出する。例えば、カメラを左右に振ったり回したりしながら同じ対象物を前後して撮影した2枚の画像より、共通の(同一の)パターンを抽出し、そのパターン上の特定点を観測点として用いる。このような画像として、デジタルカメラやビデオカメラで人物等を撮影したビデオフィルムの相前後した2コマの画像を例に挙げることができよう。そして、観測点が光軸を通る直線上に整列する形になるケースを「一次元の場合」と呼び、そうではなく、観測点が二次元画像平面上に分布する形になる場合(図2参照)を「二次元の場合」と呼ぶことにする。   Next, a specific example of processing for determining distortion correction parameters will be described. In this process, two or more sets of corresponding points (observation points) are extracted from two images obtained by photographing the same object (pattern) from one point under different conditions. For example, a common (identical) pattern is extracted from two images taken before and after the same object while shaking the camera left and right, and a specific point on the pattern is used as an observation point. As such an image, a two-frame image of a video film obtained by photographing a person or the like with a digital camera or a video camera can be cited as an example. The case where the observation points are aligned on a straight line passing through the optical axis is referred to as a “one-dimensional case”; otherwise, the observation points are distributed on a two-dimensional image plane (FIG. 2). Will be referred to as the “two-dimensional case”.

[一次元の場合の例]
まず、一次元の場合における歪み補正用パラメータ決定処理の一例を説明する。図3は、その概略を示すフローチャートである。
[One-dimensional example]
First, an example of distortion correction parameter determination processing in the one-dimensional case will be described. FIG. 3 is a flowchart showing the outline.

最初のステップS1において、A=Ao、B=0に初期設定する。また、Rも予め決まった値を与える。   In the first step S1, A = Ao and B = 0 are initialized. R also gives a predetermined value.

次のステップS2において、2枚の画像より、それらに共通する評価用パターンを抽出する。そして、観測点として、一方の画像における評価用パターン上の特定点と、それに対応した他方の画像の評価用パターン上の特定点とのペアを2組検出する。ここでは一次元の場合を想定しているので、これら観測点は光軸を通る直線上に整列する。一方のペアの観測点Pi’,Pi”のそれぞれの座標系における座標値(Xi’,Yi’),(Xi”,Yi”)、他方のペアの観測点Pj’,Pj”のそれぞれの座標系における座標値(Xj’,Yj’),(Xj”,Yj”)を前記(5)式に従って角度変数Φで表現する。すなわち   In the next step S2, an evaluation pattern common to the two images is extracted from the two images. Then, two pairs of specific points on the evaluation pattern in one image and corresponding specific points on the evaluation pattern of the other image are detected as observation points. Since a one-dimensional case is assumed here, these observation points are aligned on a straight line passing through the optical axis. The coordinate values (Xi ', Yi'), (Xi ", Yi") in the respective coordinate systems of one pair of observation points Pi ', Pi ", and the respective coordinates of the other pair of observation points Pj', Pj" The coordinate values (Xj ′, Yj ′) and (Xj ″, Yj ″) in the system are expressed by the angle variable Φ according to the above equation (5). Ie

Figure 2005168054
Figure 2005168054

ステップS3において、前ステップで得られたΦi’,Φi”とΦj’,Φj”を(7)式のΦ’に代入し解Φを求める。その解をΦio’,Φjo’,Φio”,Φjo”とする。   In step S3, Φi ′, Φi ″ and Φj ′, Φj ″ obtained in the previous step are substituted into Φ ′ in the equation (7) to obtain a solution Φ. Let the solution be Φio ′, Φjo ′, Φio ″, Φjo ″.

Figure 2005168054
Figure 2005168054

この(7)式は、前記(1)式に前記(3)式を代入して得られた方程式であり、ここではB=0であるから、この方程式は3次の既約形方程式
AΦ3−Φ+Φ’=0
となる。これを解くためには、3次方程式の解法(カルダノの公式)により、
p=−1/(3A),q=Φ’/(2A)
と置き、続いて次のように変数変換をする。
This equation (7) is an equation obtained by substituting the above equation (3) into the above equation (1). Here, B = 0, so this equation is a cubic irreducible equation AΦ 3 -Φ + Φ '= 0
It becomes. In order to solve this, the cubic equation (Cardano formula)
p = −1 / (3A), q = Φ ′ / (2A)
Followed by variable conversion as follows.

Figure 2005168054
Figure 2005168054

しかして、解は次のように表わされるが、ここでは実数解のみを考えるのでΦ1のみを利用すればよい。 Thus, the solution is expressed as follows, but since only real solutions are considered here, only Φ1 has to be used.

Figure 2005168054
Figure 2005168054

なお、観測点が光軸を通る直線上に並んでいる一次元の場合、解Φ1 を前記誤差評価式(4)に代入すれば次の誤差評価式が得られる。   In the case of one-dimensional observation points arranged on a straight line passing through the optical axis, the following error evaluation formula can be obtained by substituting the solution Φ1 into the error evaluation formula (4).

Figure 2005168054
Figure 2005168054

前記(7)式のΦ’,Φ”(測定値)に対応する解をΘ’,Θ”と置くときΘ’,Θ”はパラメータAと測定値(X’,Y’),(X”,Y”)によって定義されるから、EはAの関数として表すこともでき、したがって(7)式から∂E/∂Aを求めることができる。同様に、∂E/∂Bも求めることができる。   When the solution corresponding to Φ ′, Φ ″ (measured value) in the equation (7) is set as Θ ′, Θ ″, Θ ′, Θ ″ is the parameter A and the measured values (X ′, Y ′), (X ″ , Y ″), E can also be expressed as a function of A, and therefore ∂E / ∂A can be obtained from equation (7). Similarly, ∂E / ∂B can also be obtained. it can.

さて、ステップS4において、前記(10)式により誤差評価値Eを算出し、そして、誤差評価値Eの収束判定をする。誤差評価値Eが収束していないと判断したときは、次のステップS5において、ΔE=(∂E/∂A)ΔAの関係式からAの増分ΔAを求め(前記(10)式又は後記(12)式参照、ただし、ΔE=E)、Aの現在値にΔAの値を加えた値をAの値とし、ステップS3に戻る。ステップS4で収束したと判断されるまでステップS3からステップS5の処理ループが繰り返えされる。   In step S4, the error evaluation value E is calculated by the equation (10), and the convergence of the error evaluation value E is determined. When it is determined that the error evaluation value E has not converged, in the next step S5, an increment ΔA of A is obtained from the relational expression of ΔE = (∂E / ∂A) ΔA (the above equation (10) or the following ( 12) Refer to equation, where ΔE = E), the value obtained by adding the value of ΔA to the current value of A is set as the value of A, and the process returns to step S3. The processing loop from step S3 to step S5 is repeated until it is determined in step S4 that it has converged.

ステップS4で収束したと判断されたときは、Aの値が決まったので、今度はBを決めるためにステップS6に進み、Bを初期値Boに設定する。次のステップS7において、2枚の画像よりBの決定のための別の共通パターンがあるか調べる。別の共通パターンが見つからなければ処理は終わる(Bは初期値Boに決まる)。   If it is determined in step S4 that the value has converged, since the value of A has been determined, the process proceeds to step S6 to determine B, and B is set to the initial value Bo. In the next step S7, it is checked whether there is another common pattern for determining B from the two images. If another common pattern is not found, the process ends (B is determined by the initial value Bo).

別の共通パターンが見つかったならば、次のステップS8において、ステップS2と同様に、その共通パターンを評価用パターンとして、それぞれの評価用パターン上の対応した観測点のペアを2組検出し、各観測点の座標を角度変数Φで表す。   If another common pattern is found, in the next step S8, as in step S2, the common pattern is used as an evaluation pattern, and two pairs of corresponding observation points on each evaluation pattern are detected. The coordinates of each observation point are represented by an angle variable Φ.

次のステップS9において、前ステップで求められたΦi’,Φi”,Φj’,Φj”を前記(7)式に代入し、解Φを求める。その解をΦ’io,Φ’jo,Φio”,Φjo”とする。そして、次のステップS10において、前記(10)式により誤差評価値Eを算出し、その収束判定を行う。誤差評価値Eが収束していないと判断されたならば、次のステップS11において、ΔE=(∂E/∂B)ΔBの関係式からBの増分ΔBを求める(前記(10)式又は後記(11)式若しくは(12)式参照、ただし、ΔE=E)。そして、Bの現在値に前ステップで求めたΔBの値を加えた値をBの値とし、ステップS9に戻る。ステップS10で誤差評価値Eが収束したと判断されるまで、ステップS9からステップS11までの処理ループが繰り返される。   In the next step S9, Φi ′, Φi ″, Φj ′, Φj ″ obtained in the previous step are substituted into the equation (7) to obtain a solution Φ. Let the solutions be Φ′io, Φ′jo, Φio ″, Φjo ″. In the next step S10, the error evaluation value E is calculated by the above equation (10), and the convergence is determined. If it is determined that the error evaluation value E has not converged, in the next step S11, an increment ΔB of B is obtained from the relational expression of ΔE = (∂E / ∂B) ΔB (the above equation (10) or a later description). Refer to equation (11) or equation (12), where ΔE = E). Then, a value obtained by adding the value of ΔB obtained in the previous step to the current value of B is set as the value of B, and the process returns to step S9. The processing loop from step S9 to step S11 is repeated until it is determined in step S10 that the error evaluation value E has converged.

ステップS10でEが収束したと判断されたならば、A,B共に値が決まったということであり処理は終了する。以上のようにして、A,Bが決まる。Rも予め分かっているから、必要な歪み補正用パラメータは決定した。   If it is determined in step S10 that E has converged, both A and B have been determined, and the process ends. As described above, A and B are determined. Since R is also known in advance, the necessary distortion correction parameters were determined.

[二次元の場合の例]
次に、二次元の場合における歪み補正用パラメータ決定処理の一例を説明する。図4は、その概略を示すフローチャートである。
[Example in the case of two dimensions]
Next, an example of distortion correction parameter determination processing in the two-dimensional case will be described. FIG. 4 is a flowchart showing the outline.

最初のステップS21において、A=Ao、R=Ro、B=0の初期設定が行われ、また、ΔRとして適当に小さな値が設定される。   In the first step S21, initial setting of A = Ao, R = Ro, and B = 0 is performed, and an appropriately small value is set as ΔR.

次のステップS22において、2枚の画像より、それらに共通するパターンを評価用パターンとして抽出する。そして、観測点として、一方の画像における評価用パターン上の特定点と、それに対応した他方の画像の評価用パターン上の特定点とのペアを2組検出する。一方のペアの観測点Pi’,Pi”それぞれの座標系における座標値(Xi’,Yi’),(Xi”,Yi”)、他方のペアの観測点Pj’,Pj”のそれぞれの座標系における座標値(Xj’,Yj’),(Xj”,Yj”)を前記(6)式により角度変数Φで表現する。   In the next step S22, a pattern common to the two images is extracted as an evaluation pattern. Then, two pairs of specific points on the evaluation pattern in one image and corresponding specific points on the evaluation pattern of the other image are detected as observation points. Coordinate values (Xi ', Yi'), (Xi ", Yi") in the coordinate system of one pair of observation points Pi ', Pi ", and the coordinate systems of the other pair of observation points Pj', Pj" The coordinate values (Xj ′, Yj ′), (Xj ″, Yj ″) at are expressed by the angle variable Φ by the above equation (6).

なお、ここでは、前述の一次元の場合と異なり、評価用パターンもしくは観測点の相対的な位置関係は任意である。このような観測点と歪み補正の様子を図2に模式的に例示する。図2において、pi’とpi”(又はpj’とpj”)は同一地点より異なったカメラ方位で同一点を撮影した画像平面上の観測点であり、これがステップS22において検出された一組の観測点のペアであり、pio’とpio”(又はpjo’とpjo”)は、観測点の歪みが補正された真の位置を表している。なお、図2において、pi’とpio’は本来同一方位であるが、わざとずらして表されている。Cはレンズ系の光学中心を示す。   Here, unlike the above-described one-dimensional case, the relative positional relationship between the evaluation pattern or the observation points is arbitrary. Such an observation point and distortion correction are schematically illustrated in FIG. In FIG. 2, pi 'and pi "(or pj' and pj") are observation points on the image plane obtained by photographing the same point with different camera orientations from the same point, and this is a set of detection points detected in step S22. A pair of observation points, pio 'and pio "(or pjo' and pjo") represent the true position where the distortion of the observation point is corrected. In FIG. 2, pi 'and pi' are originally in the same direction, but are intentionally shifted. C represents the optical center of the lens system.

さて、物体間の角度は、カメラ方位の変化には依存しないから(光軸回りの回転があっても)、視点が移動しない限り常に
∠pjo’Cpio’=∠pjo”Cpio”
の関係が常に成り立つ(制約条件1)。すなわち、次式が成り立つ。
Now, since the angle between objects does not depend on the change in camera orientation (even if there is a rotation around the optical axis), 視点 pjo'Cpio '= ∠pjo "Cpio"
The above relationship always holds (constraint condition 1). That is, the following equation holds.

Figure 2005168054
Figure 2005168054

この(11)式は角度で誤差を評価する式であるが、これを(x,y)座標値で表現すれば次の誤差評価式が得られる。   The expression (11) is an expression for evaluating an error by an angle. If this is expressed by an (x, y) coordinate value, the following error evaluation expression can be obtained.

Figure 2005168054
Figure 2005168054

処理の説明に戻る。ステップS23において前ステップで得られたΦi’,Φi”,Φj’,Φj”を(7)式のΦ’に代入し解Φを求める。その解をΦio’,Φjo’,Φio”,Φjo”とする。次のステップS24において、前記(11)式により誤差評価値Eを算出し、誤差評価値Eの収束判定をする。収束したと判断されたときにはステップS26へ進む。そうでなければステップS25へ進み、ΔE=(∂E/∂A)ΔAの関係式からΔAを求める(前記(10)式、(11)式又は(12)式参照、ただし、ΔE=E)。そして、Aの現在値にΔAの値を加算した値をAの値としてステップS23に戻る。誤差評価値Eが収束したと判断されるまで、ステップS23からステップS25までの処理ループが繰り返される。   Return to the description of the process. In step S23, Φi ′, Φi ″, Φj ′, Φj ″ obtained in the previous step is substituted into Φ ′ in the equation (7) to obtain a solution Φ. Let the solutions be Φio ′, Φjo ′, Φio ″, Φjo ″. In the next step S24, the error evaluation value E is calculated by the equation (11), and the convergence of the error evaluation value E is determined. When it is determined that it has converged, the process proceeds to step S26. Otherwise, the process proceeds to step S25, and ΔA is obtained from the relational expression of ΔE = (∂E / ∂A) ΔA (refer to the equation (10), (11) or (12), where ΔE = E). . Then, the value obtained by adding the value of ΔA to the current value of A is set as the value of A, and the process returns to step S23. Until it is determined that the error evaluation value E has converged, the processing loop from step S23 to step S25 is repeated.

ステップS24において、Eが収束したと判断されたときには、ステップS26に進む。ステップS26において、2枚の画像に共通する別のパターンが見つかるか調べる。見つからなければ、処理は終了する。見つかったならば、その共通パターンを新しい評価パターンとして用い、ステップS27以降の処理により改めてAの値(これをA’と置く)を求める。   If it is determined in step S24 that E has converged, the process proceeds to step S26. In step S26, it is checked whether another pattern common to the two images is found. If not found, the process ends. If found, the common pattern is used as a new evaluation pattern, and the value of A (represented as A ') is obtained again by the processing from step S27.

まず、ステップS27においてA’に初期値A’oを設定する。次のステップS28において、ステップS22と同様に、2枚の画像の新しい評価用パターン上の対応した観測点のペアを2組検出し、その観測点の座標値を角度変数Φに変換する。   First, in step S27, an initial value A'o is set to A '. In the next step S28, as in step S22, two pairs of corresponding observation points on the new evaluation pattern of the two images are detected, and the coordinate value of the observation point is converted into the angle variable Φ.

次のステップS29において、前ステップで得られたΦi’,Φi”,Φj’,Φj”を(7)式のΦ’に代入し解Φを求める。その解をΦio’,Φjo’,Φio”,Φjo”とする。次のステップS30において、前記(11)式(もしくは(12)式)により誤差評価値Eを算出し、そして、誤差評価値Eの収束判定をする。収束したと判断されたときにはステップS32へ進むが、そうでなければステップS31へ進み、ΔE=(∂E/∂A’)ΔA’の関係からΔA’を求め、この値をA’の現在値に加えた値をA’の値としてステップS29に戻る。   In the next step S29, the solution Φ is obtained by substituting Φi ′, Φi ″, Φj ′, Φj ″ obtained in the previous step into Φ ′ in the equation (7). Let the solutions be Φio ′, Φjo ′, Φio ″, Φjo ″. In the next step S30, the error evaluation value E is calculated by the equation (11) (or the equation (12)), and the convergence of the error evaluation value E is determined. If it is determined that the process has converged, the process proceeds to step S32. If not, the process proceeds to step S31, and ΔA ′ is obtained from the relationship ΔE = (∂E / ∂A ′) ΔA ′, and this value is obtained as the current value of A ′. The value added to is set as the value of A ′ and the process returns to step S29.

ステップS29からステップS31までの処理ループにより誤差評価値Eが収束すると、同ループを抜けてステップS32に進み、|A−A’|の収束判定を行う。収束していないと判断された場合には、ステップ33においてRの現在値にΔRの値を加えた値をRの新しい値とし、また、Aに初期値Aoを設定してから、ステップS22以下の処理を再び実行する。すなわち、Rを変更して、Aの値を改めて求めることになる。2回目以降のステップS22において用いる評価用パターンと観測点は1回目のステップ22で用いたものと同じでよく、必要な処理は、新しいR値を用いて1回目と同じ観測点の座標値を角度変数で表現し直す処理だけである。この後にステップS28に進んだ時にも同様であって、1回目のステップ28で検出したもとの同じ観測点の座標値を新しいR値を用いて角度変数で表現し直すだけでよい。   When the error evaluation value E is converged by the processing loop from step S29 to step S31, the process exits from the loop and proceeds to step S32 to determine convergence of | A−A ′ |. If it is determined that the value has not converged, a value obtained by adding the value of ΔR to the current value of R in step 33 is set as a new value of R, and an initial value Ao is set in A, and then step S22 and subsequent steps. The above process is executed again. That is, R is changed and the value of A is obtained again. The evaluation pattern and the observation point used in the second and subsequent steps S22 may be the same as those used in the first step 22, and the necessary processing uses the new R value to obtain the same observation point coordinate values as in the first time. It is only the processing to re-express with the angle variable. This is the same when the process proceeds to step S28 after that, and it is only necessary to re-express the coordinate value of the same observation point detected in the first step 28 as an angle variable using the new R value.

さて、ステップS32において収束したと判断された場合、現在のA又はA’の値がAの値として決まり、またRの値も決定されたということであり、次にBの値を決めるためにステップS34に進む。   Now, if it is determined in step S32 that convergence has occurred, the current value of A or A ′ is determined as the value of A, and the value of R is also determined. Next, in order to determine the value of B Proceed to step S34.

ステップS34において、Bに初期値Boが設定される。次のステップS35において、ステップS22又はステップS28で最後に得られたΦi’,Φi”,Φj’,Φj”を(7)式のΦ’に代入して解Φを求める。次のステップS36において前記(11)式(若しくは(12)式)により誤差評価値Eを算出し、そして誤差評価値Eの収束判定をする。収束したと判断されたときには、歪み補正用パラメータA,B,Rの値が全て決まったので処理は終了する。収束していないと判断されたときには、ステップS37へ進み、ΔE=(∂E/∂B)ΔBの関係式からΔBを求め、Bの現在値にΔBの値を加算した値をBの値としてステップS35に戻る。ステップS35からステップと37までの処理ループがステップS36で誤差評価値Eが収束したと判断されるまで繰り返される。   In step S34, an initial value Bo is set to B. In the next step S35, the solution Φ is obtained by substituting Φi ′, Φi ″, Φj ′, Φj ″ obtained last in step S22 or step S28 into Φ ′ in the equation (7). In the next step S36, the error evaluation value E is calculated by the equation (11) (or equation (12)), and the convergence of the error evaluation value E is determined. If it is determined that the values have converged, the values of the distortion correction parameters A, B, and R are all determined, and the process ends. If it is determined that the value has not converged, the process proceeds to step S37, where ΔB is obtained from the relational expression ΔE = (∂E / ∂B) ΔB, and a value obtained by adding the value of ΔB to the current value of B is used as the value of B. The process returns to step S35. The processing loop from step S35 to step 37 is repeated until it is determined in step S36 that the error evaluation value E has converged.

なお、通常、レンズ系の歪みはそれほど大きくないので、光軸回りのカメラの回転がないという条件(制約条件2)の下では、図5に示すように、カメラを振って撮影した2枚の画像上の対応パターンを相互を連結すると、これがカメラアングル変化に伴う画像の移動ベクトルを表す。これは、ほぼ平行な移動ベクトル群である。この平行移動ベクトルをSとして、pjo’pjo”//pio’pio”//Sの関係、すなわち、次の関係式が成り立つ。Sは前もって計測することができる。   In general, since the distortion of the lens system is not so large, under the condition that the camera does not rotate around the optical axis (constraint condition 2), as shown in FIG. When the corresponding patterns on the image are connected to each other, this represents a movement vector of the image according to the camera angle change. This is a group of substantially parallel movement vectors. With this translation vector as S, the relationship pjo'pjo "// pio'pio" // S, that is, the following relational expression holds. S can be measured in advance.

Figure 2005168054
Figure 2005168054

Figure 2005168054
Figure 2005168054

この制約条件2を適用可能な場合には、(13)式,(14)式を利用して、計算精度を向上させることができることは言うまでもない。また、いくつかの制約条件の中から適用する制約条件を適宜選択することによって、計算速度や計算速度を制御することも可能である。 Needless to say, when the constraint condition 2 is applicable, the calculation accuracy can be improved by using the equations (13) and (14). It is also possible to control the calculation speed and the calculation speed by appropriately selecting a constraint condition to be applied from among several constraint conditions.

歪み補正用パラメータを1回で決定する必要はなく、複数回のサイクルで決定してもよい。例えば、共通パターンの中からコントラストの強い順番に小領域を抽出し(例えば、人物の顔面画像の場合、目の明部、次に鼻の明部、等々)、抽出したそれぞれの小領域上の観測点を用いて複数サイクルで歪み補正用パラメータを決定するようにしてもよい。この場合に、2次の歪曲収差を先に補正し、その後に4次の歪曲収差を補正するようにしてもよい。   It is not necessary to determine the distortion correction parameter at one time, and it may be determined at a plurality of cycles. For example, small areas are extracted from the common pattern in the order of strong contrast (for example, in the case of a human face image, the bright part of the eyes, then the bright part of the nose, etc.) You may make it determine the parameter for distortion correction in multiple cycles using an observation point. In this case, the second-order distortion may be corrected first, and then the fourth-order distortion may be corrected.

また、歪み補正に必要なパラメータを全て決定した後に、2枚の画像の中心部から順に誤差評価を行って画像中心部分での誤差評価の感度を高め、しかる後に、決定されたパラメータを修正しながら画像の周辺部へ向かって誤差を計測評価するようにしてもよい。   After determining all the parameters necessary for distortion correction, error evaluation is performed in order from the center of the two images to increase the sensitivity of error evaluation at the center of the image, and then the determined parameters are corrected. However, the error may be measured and evaluated toward the periphery of the image.

以上に説明した処理を実施するためのシステム構成の一例を図6に示す。図6において、歪み補正の対象となる画像データは画像ファイル51に保存されており、必要な2枚の(又はそれ以上の枚数の)画像のデータが2枚以上の画像バッファ52に読み出される。画像バッファ52上の画像に共通する評価用パターンをパターン抽出部53で抽出する。演算制御部54は、抽出された評価用パターン上の観測点を検出し、前述のような処理を実行することによって歪曲収差補正用のパラメータを決定する。この処理のためのプログラムの記憶及び処理に関連したデータの記憶のためにメモリ55が利用される。   An example of a system configuration for performing the processing described above is shown in FIG. In FIG. 6, image data to be subjected to distortion correction is stored in an image file 51, and necessary two (or more) image data are read out to two or more image buffers 52. The pattern extraction unit 53 extracts an evaluation pattern common to images on the image buffer 52. The arithmetic control unit 54 detects the observation point on the extracted evaluation pattern, and determines the distortion correction parameter by executing the processing as described above. The memory 55 is used to store a program for this processing and data related to the processing.

このようにしてパラメータA,B,Rの値が決まったならば、画像の歪曲収差補正を行うことができる。例えば、パラメータ推定の対象となった画像上の各画素の座標を(6)式により角度変数に変換し、その角度を(7)式のΦ’に代入して真の角度Φを求め、これを(5)式により補正画像上の座標に変換し、この座標に補正前の画像の画素値を与えるという処理を繰り返すことによって、歪曲収差による歪みが高精度に補正された画像を得ることができる。   If the values of the parameters A, B, and R are determined in this way, the distortion of the image can be corrected. For example, the coordinates of each pixel on the image subjected to parameter estimation are converted into an angle variable by equation (6), and the angle is substituted into Φ ′ in equation (7) to obtain the true angle Φ. Can be converted into coordinates on the corrected image by equation (5), and the process of giving the pixel value of the image before correction to the coordinates can be repeated to obtain an image in which distortion due to distortion is corrected with high accuracy. it can.

次に、本発明によるデジタルカメラ(撮像装置)について説明する。図7に、本発明によるデジタルカメラの一例を示す。ここに示すデジタルカメラはカメラ本体100と光学ユニット101からなり、カメラ本体100は外部メモリとして着脱可能なメモリカードからなる画像メモリ(記憶媒体)102を有する。光学ユニット101は、一般的なデジタルカメラのレンズ胴鏡ユニットと同様のレンズ系、ズーム駆動機構、ピント調整機構、絞り機構などからなる。 Next, a digital camera (imaging device) according to the present invention will be described. FIG. 7 shows an example of a digital camera according to the present invention. The digital camera shown here includes a camera body 100 and an optical unit 101, and the camera body 100 includes an image memory (storage medium) 102 including a removable memory card as an external memory. The optical unit 101 includes a lens system, a zoom drive mechanism, a focus adjustment mechanism, a diaphragm mechanism, and the like similar to a lens barrel unit of a general digital camera.

カメラ本体100には、光学ユニット101により被写体の像が結像される撮像素子であるCCD103、このCCD103からの画像信号の読み出し、その画像信号の増幅、γ変換、アナログ−デジタル変換などのための画像信号回路系104、光学ユニット101内のズーム駆動機構、ピント調整機構、絞り機構等に対する駆動回路系105、カメラの各部の制御及びデータ処理のためのCPU、RAM、ROM等からなる内蔵コンピュータ106、各種パラメータ等の記憶のためのデータメモリ107、カメラの機能の操作のための操作キーボード108、内蔵コンピュータ106と操作キーボード108及び外部のコンピュータ等との情報授受のためのインターフェイス部109、さらに図示されていないが電池より上記各部に動作電力を供給する電源回路などからなる。データメモリ107と画像メモリ102は、カメラに接続された外部のコンピュータ等よりインターフェイス部109及び内蔵コンピュータ106を介しアクセス可能である。   The camera main body 100 is provided with a CCD 103 which is an image pickup element on which an image of a subject is formed by the optical unit 101, reading of an image signal from the CCD 103, amplification of the image signal, γ conversion, analog-digital conversion, etc. Image signal circuit system 104, drive circuit system 105 for zoom drive mechanism, focus adjustment mechanism, aperture mechanism, etc. in optical unit 101, built-in computer 106 comprising CPU, RAM, ROM, etc. for control and data processing of each part of the camera , A data memory 107 for storing various parameters, an operation keyboard 108 for operating camera functions, an interface unit 109 for exchanging information between the built-in computer 106 and the operation keyboard 108 and an external computer, and the like. Although not done, the above parts operate from the battery Consisting of a power supply circuit for supplying the power. The data memory 107 and the image memory 102 can be accessed via an interface unit 109 and a built-in computer 106 from an external computer connected to the camera.

このデジタルカメラの保有するパラメータを、その設定方法とともに図8に例示する。ここで、レンズ中心と撮像面間距離R、F値、γ変換テーブル値と画像信号アンプ(画像信号増幅器)のゲイン、画像信号の色別平均値およびダイナミックレンジが画質調整に関するパラメータであり、撮影時に読み取られるものである。操作キーボード108は、撮影時にカメラの機能を操作するために利用されるほか、これらのパラメータの記憶場所の指定にも利用される。図8に示したパラメータ以外にも、ズーム駆動、ピント調整駆動、絞り駆動その他の撮影条件に関連した各種パラメータもあるが、これは本発明の特徴とは直接関係がないので説明を割愛する。 The parameters possessed by this digital camera are illustrated in FIG. 8 together with the setting method. Here, the distance R, F value between the lens center and the imaging surface, the γ conversion table value, the gain of the image signal amplifier (image signal amplifier), the average value for each color of the image signal and the dynamic range are parameters relating to image quality adjustment. Sometimes it is read. The operation keyboard 108 is used not only for operating camera functions during shooting, but also for specifying the storage location of these parameters. In addition to the parameters shown in FIG. 8, there are various parameters related to shooting conditions such as zoom driving, focus adjustment driving, aperture driving, and the like, which are not directly related to the features of the present invention, and therefore will not be described.

図8に示すパラメータの中で、AとBは前述のように2次と4次の歪曲収差係数であり、Rはレンズ系の光学中心と画像面つまりCCD103の撮像面の距離、PxとPyはCCD103の水平方向と垂直方向の画素ピッチである。撮像画像の座標系の原点をレンズ系の光軸とCCDの撮像面との交点としたとき、撮像画像上の画素の座標(x',y')は画素ピッチPx,Pyを用いれば
(x’,y’)=(k’*Px,l’*Py)
と表すことができる。この画素の歪曲収差補正後の座標を(x,y)とおくと、
(k’*Px)/(l’*Py)=x’/y’=x/y
が成り立つ。(k’,l’)は撮像画像上の画素(x’,y’)のデジタル座標であり、前述のパラメータA,Bの推定処理及び歪み補正処理の説明中においては、実際には、このようなデジタル座標が利用されるが、このことについては説明簡略化のため触れなかった。したがって、A,B,Px,Py,Rが既知であれば、前述のように撮影した画像の歪曲収差の補正が可能である。
Among the parameters shown in FIG. 8, A and B are second-order and fourth-order distortion coefficients as described above, R is the distance between the optical center of the lens system and the image plane, that is, the imaging plane of the CCD 103, and Px and Py. Is the pixel pitch of the CCD 103 in the horizontal and vertical directions. When the origin of the coordinate system of the captured image is the intersection of the optical axis of the lens system and the imaging surface of the CCD, the pixel coordinates (x ′, y ′) on the captured image can be obtained by using the pixel pitches Px and Py (x ', Y') = (k '* Px, l' * Py)
It can be expressed as. When the coordinates after distortion correction of this pixel are set as (x, y),
(K ′ * Px) / (l ′ * Py) = x ′ / y ′ = x / y
Holds. (K ′, l ′) is a digital coordinate of the pixel (x ′, y ′) on the captured image. In the description of the estimation processing and distortion correction processing of the parameters A and B described above, this is actually Such digital coordinates are used, but this was not mentioned for the sake of simplicity. Therefore, if A, B, Px, Py, and R are known, it is possible to correct distortion of the captured image as described above.

Px,Pyは、CCD103に固有のパラメータであり通常は不変であるので、カメラ製造時に設定されカメラ本体内のデータメモリ107に記憶されるが、後述のように、1枚1枚の画像データの一部として画像メモリ102にも記憶させることができる。A,Bも本来は不変であるが、カメラ製造時のばらつきにより製造時には正確には分からないため、カメラの使用初期に、あるいは随時に、外部のコンピュータあるいはカメラの内蔵コンピュータ106によって求めてデータメモリ107に記憶されるが、これも後述のように画像データの一部として画像メモリ102にも記憶させることができる。Rは1枚1枚の画像の撮影時に駆動回路系105により検出して画像メモリ102に画像データの一部として記憶されるが、1枚1枚の画像と対応させて、データメモリ107に記憶させることもできる。   Px and Py are parameters inherent to the CCD 103 and are normally unchanged. Therefore, Px and Py are set when the camera is manufactured and stored in the data memory 107 in the camera body. It can also be stored in the image memory 102 as a part. Although A and B are essentially unchanged, they cannot be accurately determined at the time of manufacture due to variations at the time of camera manufacture. Therefore, the data memory is obtained by an external computer or the camera's built-in computer 106 at the beginning of use of the camera or at any time. 107, which can also be stored in the image memory 102 as part of the image data as will be described later. R is detected by the drive circuit system 105 at the time of photographing each image and is stored in the image memory 102 as a part of the image data, but is stored in the data memory 107 in correspondence with each image. It can also be made.

画像を撮影する時、CCD103のダイナミックレンジはそれほど大きくないため、人間の視感度にあわせた範囲の画像信号を取り込むことを要求される。一般に利用される1色あたり8ビットの割り当てに際しては、入力される画像信号の総平均がモノクロであるように色バランスをとり、さらに、画像信号の最大値、最小値が予定された8ビットの範囲におさまるように、つまり、輝度分布の中央値などがレンジの中心になるように、ゲインを調整してビットを割り当てる。これを受け持つのがγテーブルと画像信号増幅器のゲイン値であり、これらは撮影条件に応じて適応的に変えられる。   When taking an image, the dynamic range of the CCD 103 is not so large, so it is required to capture an image signal in a range that matches the human visual sensitivity. In the general allocation of 8 bits per color, the color balance is set so that the total average of the input image signals is monochrome, and the maximum value and the minimum value of the image signals are scheduled to be 8 bits. Bits are allocated by adjusting the gain so that it falls within the range, that is, the median value of the luminance distribution is at the center of the range. The γ table and the gain value of the image signal amplifier are responsible for this, and these can be adaptively changed according to the photographing conditions.

図9は、γ変換テーブル(γ1,γ2)、画像信号増幅器のゲイン値、これに関連した入力信号Iと出力信号Oの関係図であり、3つの異なる値の出力信号O1,O2,O3が与えられたとき、γテーブル(γ1とγ2)及びそのダイナミックレンジ(D1m_D1MとD2m_D2M)の違いによって、復元される入力信号(I11,I12,I13と、I21,I22,I23)が変わることを表している。入力信号Iは一般に
I=[画像信号]×[ゲイン値]
で表される。
FIG. 9 is a relationship diagram between the γ conversion table (γ1, γ2), the gain value of the image signal amplifier, and the input signal I and the output signal O related to this, and the output signals O1, O2, and O3 having three different values are shown. Given that, given the difference between the γ table (γ1 and γ2) and its dynamic range (D1m_D1M and D2m_D2M), the restored input signals (I11, I12, I13 and I21, I22, I23) change. Yes. Input signal I is generally I = [image signal] × [gain value]
It is represented by

色バランスについては、画像1枚ごとに、「全部の色信号の総和はモノクロである」との仮定のもとに各色信号を計算するので、カメラを向ける被写体の色分布が偏っていれば、その画像の色がずれてしまう。これが特に問題となるのが、カメラ方位を変えながら撮影した複数の画像を繋ぎ合わせるような場合である。カメラ方位ごとに、風景によって画像が青みかがっていたり、赤みがかっていたりするため、通常、その色成分の合計値が変わる。ダイナミックレンジについても同様である。入力光量や入力光の分布形状は画像ごとに変化する。したがって、複数の画像を合成するような場合には、それら複数の画像間で色バランスをとりなおしたり、画像信号の再割り振りが必要となるが、その処理は、オリジナルの画像データを復元してから行うことが望まれる。   Regarding color balance, each color signal is calculated on the assumption that “the sum of all color signals is monochrome” for each image, so if the color distribution of the subject facing the camera is biased, The color of the image shifts. This is particularly problematic when a plurality of images taken while changing the camera direction are connected. For each camera orientation, the image is bluish or reddish depending on the landscape, so the total value of the color components usually changes. The same applies to the dynamic range. The input light amount and the distribution shape of the input light change for each image. Therefore, when combining multiple images, it is necessary to rebalance the colors among these multiple images or to reallocate the image signal, but the process is performed after restoring the original image data. It is desirable to do so.

このオリジナル画像データの復元処理のために、ダイナミックレンジに関して、各画像毎に、使用したγ変換テーブルと画像信号増幅器のゲイン値を保存しておき、あとで読み出すことができることが望まれる。また、色合わせに関しては、色別の画像信号平均値、ダイナミックレンジを規定するゲイン値を画像毎に保存しておき後で読み出すことができれば、より正確な信号復元が可能となる。γ変換テーブルの種類は限られているので、そのデータは通常は内部のデータメモリ107に記憶されるが、後述のように画像データの一部として画像メモリ102にも記憶させることができる。画像信号増幅器のゲイン値、画像信号の色別平均値及びダイナミックレンジは、通常、撮影のたびに変化するため、1枚1枚の画像データの一部として画像メモリ102に記憶されるが、1枚1枚の画像と対応させてデータメモリ107に記憶させることも可能である。   In order to restore the original image data, it is desirable that the used γ conversion table and the gain value of the image signal amplifier are stored for each image and can be read out later for the dynamic range. As for color matching, if the image signal average value for each color and the gain value defining the dynamic range can be stored for each image and read later, more accurate signal restoration can be performed. Since the types of γ conversion tables are limited, the data is normally stored in the internal data memory 107, but can also be stored in the image memory 102 as part of the image data as will be described later. Since the gain value of the image signal amplifier, the average value for each color of the image signal, and the dynamic range usually change at every photographing, they are stored in the image memory 102 as a part of each piece of image data. It is also possible to store in the data memory 107 in association with one image.

次に、カメラを最初に使用する時、あるいは随時に、画像の歪曲収差係数A,Bを求めて設定する方法を説明する。図10は、その手順を示すフローチャートである。   Next, a method for obtaining and setting the distortion aberration coefficients A and B of the image when the camera is used for the first time or at any time will be described. FIG. 10 is a flowchart showing the procedure.

まず、ある地点から、ある被写体が画角の中心にくるカメラアングルで1枚目の画像を撮影する(ステップS50)。同じ地点から同じ対象物を、カメラアングルを少し振って、例えば対象物が中心から左又は右に5度ほどずれた位置にくるようにして、2枚目の画像を撮影する(ステップS51)。撮影された2枚の画像のデータは画像メモリ102に保存され、また、撮影時のレンズ中心と撮像面との距離Rの値はデータメモリ107に保存される。   First, a first image is taken from a certain point at a camera angle at which a certain subject is at the center of the angle of view (step S50). A second image is shot from the same point with the same object slightly shaken by a camera angle so that, for example, the object is located at a position shifted by 5 degrees to the left or right from the center (step S51). Data of two captured images is stored in the image memory 102, and a value of the distance R between the lens center and the imaging surface at the time of shooting is stored in the data memory 107.

次に歪曲収差係数A,Bの推定を行うわけであるが、これはカメラの内蔵コンピュータ106を利用して行うことも、外部のコンピュータを利用して行うことも可能であり、操作キーボード108の操作によって、いずれかを選択できる。前者の場合は、内蔵コンピュータ106は、2枚の画像のデータとRの値を用い、図3のフローチャートに示す手順に従ってA,Bを推定し(ステップS53)、その結果をデータメモリに保存する(ステップS54)。なお、図4のフローチャートに示す手順を利用することも可能であるが、Rの値が既知であるから、1枚目と2枚目の画像撮影時のRの値が大きく変動しないことを前提にした場合、図3の手順を利用するほうが効率的である。このように内蔵コンピュータ106でA,B推定処理を実行するためには、そのプログラムを内蔵コンピュータ106のROM又はRAMに格納しておかなければならないので、カメラ側のメモリ容量に余裕がないような場合には外部コンピュータの利用を選択できる。   Next, the distortion aberration coefficients A and B are estimated. This can be performed using the camera's built-in computer 106 or an external computer. Either can be selected by the operation. In the former case, the built-in computer 106 estimates A and B according to the procedure shown in the flowchart of FIG. 3 using the data of the two images and the R value (step S53), and stores the result in the data memory. (Step S54). Although it is possible to use the procedure shown in the flowchart of FIG. 4, since the value of R is known, it is assumed that the value of R at the time of shooting the first and second images does not vary greatly. In this case, it is more efficient to use the procedure of FIG. As described above, in order to execute the A and B estimation processing by the built-in computer 106, the program must be stored in the ROM or RAM of the built-in computer 106, so that there is no room in the memory capacity on the camera side. In some cases, you can choose to use an external computer.

外部コンピュータを利用する場合には、その外部コンピュータをカメラに接続した状態で、操作キーボード108よりデータ転送を指示し、内蔵コンピュータ106の制御によりインターフェイス部109を介して2枚の画像のデータとRの値を外部コンピュータへ転送する(ステップS55)。外部コンピュータにおいて、図3(又は図4)のフローチャートに示す推定処理の手順を実行するための専用プログラムにより、カメラから受け取った画像データ及びR値を用いA,Bを推定し(ステップS56)、推定結果をカメラに転送する(ステップS57)。カメラの内蔵コンピュータ106は、転送されてきたA,Bの推定値をインターフェイス部109を介して取り込み、データメモリ107に格納する(ステップS58)。なお、推定されたA,Bの値を、操作キーボード108の操作によって入力し、これをデータメモリ107に格納させることも可能である。   When an external computer is used, data transfer is instructed from the operation keyboard 108 with the external computer connected to the camera, and the two image data and R are transmitted via the interface unit 109 under the control of the built-in computer 106. Is transferred to the external computer (step S55). In the external computer, A and B are estimated using the image data and R value received from the camera by a dedicated program for executing the estimation processing procedure shown in the flowchart of FIG. 3 (or FIG. 4) (step S56). The estimation result is transferred to the camera (step S57). The built-in computer 106 of the camera takes in the transferred estimated values A and B via the interface unit 109 and stores them in the data memory 107 (step S58). It is also possible to input the estimated values A and B by operating the operation keyboard 108 and store them in the data memory 107.

さて、通常の撮影時においては、画像のデータは画像メモリ102に格納されるが、図8に例示したパラメータの記憶場所は、撮影者が操作キーボード108の操作により選択できる。このパラメータの記憶場所を選択できるようにしたのは、撮影された画像の補正処理に利用されるソフトウエアの環境に柔軟に対応できるようにするためである。   Now, during normal shooting, image data is stored in the image memory 102, but the parameter storage location illustrated in FIG. 8 can be selected by the photographer by operating the operation keyboard 108. The reason for selecting the storage location of this parameter is to make it possible to flexibly cope with the software environment used for the correction processing of the captured image.

外部のコンピュータをカメラに接続して、同コンピュータ上で画像補正処理プログラムを使って画像の補正処理を実行する場合には、予め取り決めておくならば、パラメータをデータメモリ107に記憶させても画像メモリ102に記憶させてもよい。例えば、画素ピッチPx,Py、レンズ焦点距離f、歪曲収差係数A,Bをデータメモリ107に記憶させ、レンズ中心と撮像面間距離R、F値、γ変換テーブル値及び画像信号増幅器のゲイン値、画像信号の色別平均値(合計値でもよい)及びダイナミックレンジを1枚1枚の画像データの一部として画像メモリ102に記憶させ、外部コンピュータ上の画像補正処理プログラムで画像データとパラメータをそれぞれの記憶場所から取り込ませることができる。内蔵コンピュータ106によって歪曲収差の補正等を行う場合も記憶場所については同様である。   When an external computer is connected to the camera and image correction processing is executed using the image correction processing program on the computer, the image can be stored even if the parameter is stored in the data memory 107 if determined beforehand. It may be stored in the memory 102. For example, pixel pitches Px, Py, lens focal length f, distortion aberration coefficients A, B are stored in the data memory 107, distance R between lens center and imaging surface, F value, γ conversion table value, and gain value of image signal amplifier. The image signal average value (may be a total value) and the dynamic range of the image signal are stored in the image memory 102 as a part of each piece of image data, and the image data and parameters are stored in an image correction processing program on an external computer. It can be taken from each memory location. The same applies to the storage location when the built-in computer 106 corrects distortion aberration and the like.

しかし、このようなパラメータの記憶場所の取り決めがない場合や、カメラに接続しない外部コンピュータで画像補正処理を行いたい場合などには、図8に示したパラメータの少なくとも画像補正に必要なパラメータを画像データの一部として画像メモリ102に記憶させると都合がよい。例えば、全てのパラメータを画像データの一部として、画像メモリ102としてのメモリカードに記憶させるならば、そのメモリカードをカメラから引き抜き、カメラに接続されていない外部のコンピュータのメモリカード挿入部に挿入してデータを読み取らせ、そのデータを画像データとパラメータに分離したうえで画像の補正処理を実行させることができる。あるいは、カメラに接続した外部コンピュータへ画像メモリ102のデータを転送し、外部コンピュータにおいて画像データとパラメータとを分離させ画像補正処理を行わせることができる。   However, when there is no arrangement for the storage location of such parameters, or when it is desired to perform image correction processing with an external computer not connected to the camera, at least the parameters necessary for image correction shown in FIG. It is convenient to store it in the image memory 102 as part of the data. For example, if all parameters are stored as a part of image data in a memory card as the image memory 102, the memory card is pulled out from the camera and inserted into a memory card insertion part of an external computer not connected to the camera. Thus, the data can be read, and the data can be separated into image data and parameters, and image correction processing can be executed. Alternatively, data in the image memory 102 can be transferred to an external computer connected to the camera, and image correction processing can be performed by separating the image data and parameters in the external computer.

いずれにしても、撮影した1枚1枚の画像の歪み、明るさ、色合いの補正のために必要なパラメータを外部のコンピュータに容易に取り込むことができるため、複数の画像の合成等の際に画像の歪み、明るさ、色合いの高精度な補正が可能になる。   In any case, parameters necessary for correcting distortion, brightness, and hue of each photographed image can be easily taken into an external computer, so that a plurality of images can be combined. Image distortion, brightness, and hue can be corrected with high accuracy.

なお、画像データの標準フォーマットとしてSISRIF、EXIF、TIFF/EPなどの規格があるが、そのいずれも、本発明の目的とするパラメータを格納する場所がない。しかし、画像データは冗長度が大きいため、画像データの一部をパラメータで置き換えても、実用上は悪影響はほとんどない。通常、画像データは8ビット又は16ビットの数値で表現されるから、例えば、画像の最初の1ライン分を利用してパラメータを格納することができる。以上、本発明によるデジタルカメラの例について述べたが、本発明はビデオカメラ、スキャナ等の他の撮像装置にも適用できるものである。   Note that there are standards such as SISRFIF, EXIF, and TIFF / EP as standard formats of image data, but none of them has a place for storing parameters targeted by the present invention. However, since image data has a high degree of redundancy, even if a part of the image data is replaced with a parameter, there is almost no adverse effect in practical use. Usually, image data is expressed by numerical values of 8 bits or 16 bits, and therefore, for example, parameters can be stored using the first one line of the image. The example of the digital camera according to the present invention has been described above, but the present invention can also be applied to other imaging devices such as a video camera and a scanner.

歪曲収差補正の基礎関係式を説明するための図である。It is a figure for demonstrating the basic relational expression of distortion aberration correction. 異なったカメラ方位で撮影された同一パターンの画像平面上の位置と、その歪み補正後の位置を示す図である。It is a figure which shows the position on the image plane of the same pattern image | photographed with different camera directions, and the position after the distortion correction | amendment. 歪み補正用パラメータ決定処理の一例を示すフローチャートである。It is a flowchart which shows an example of the parameter determination process for distortion correction. 歪み補正用パラメータ決定処理の別の例を示すフローチャートである。It is a flowchart which shows another example of the parameter determination process for distortion correction. カメラの光軸回りの回転がない場合の画像の移動ベクトルを説明する図である。It is a figure explaining the movement vector of an image when there is no rotation around the optical axis of a camera. 歪み補正用パラメータ決定処理を実行するためのシステム構成の一例を示すブロック図である。It is a block diagram which shows an example of the system configuration | structure for performing the parameter determination process for distortion correction. 本発明によるデジタルカメラの一例の概略構成図である。It is a schematic block diagram of an example of the digital camera by this invention. 本発明によるデジタルカメラの保有するパラメータの例を示す図である。It is a figure which shows the example of the parameter which the digital camera by this invention has. γ変換テーブル、画像信号増幅器のゲイン値、それに関連した入力信号及び出力信号の関係を示す図である。It is a figure which shows the relationship between the gamma conversion table, the gain value of an image signal amplifier, the input signal relevant to it, and an output signal. 歪曲収差係数を求めて設定する手順を説明するためのフローチャートである。It is a flowchart for demonstrating the procedure which calculates | requires and sets a distortion aberration coefficient.

符号の説明Explanation of symbols

51 画像ファイル
52 画像バッファ
53 パターン抽出部
54 演算制御部
55 メモリ
100 カメラ本体
101 光学ユニット
102 画像メモリ(外部メモリ)
103 CCD(撮像素子)
104 画像信号回路系
105 駆動回路系
106 内蔵コンピュータ
107 データメモリ(内部メモリ)
108 操作キーボード
109 インターフェイス部
51 Image File 52 Image Buffer 53 Pattern Extraction Unit 54 Operation Control Unit 55 Memory 100 Camera Body 101 Optical Unit 102 Image Memory (External Memory)
103 CCD (imaging device)
104 Image signal circuit system 105 Drive circuit system 106 Built-in computer 107 Data memory (internal memory)
108 Operation keyboard 109 Interface section

Claims (9)

デジタルカメラ等の撮像装置によって一地点から撮影された共通パターンを含む複数枚の画像より、複数組の対応した観測点を検出し、それら観測点の、撮像装置の撮像系の光軸に対する角度を計算し、求められた角度の情報に基づいて当該画像に対する歪み補正のためのパラメータを推定することを特徴とする画像歪み補正用パラメータ決定方法。   A plurality of sets of corresponding observation points are detected from a plurality of images including a common pattern photographed from one point by an imaging device such as a digital camera, and the angle of these observation points with respect to the optical axis of the imaging system of the imaging device is determined. A parameter determination method for image distortion correction, characterized in that a parameter for distortion correction for the image is estimated based on the calculated angle information. 請求項1記載の画像歪み補正用パラメータ決定方法において、撮像系のレンズの光学中心と画像面との距離を仮定して、レンズの歪曲収差係数を推定することを特徴とする画像歪み補正用パラメータ決定方法。   2. The image distortion correction parameter determination method according to claim 1, wherein a distortion aberration coefficient of the lens is estimated by assuming a distance between an optical center of the lens of the imaging system and the image plane. Decision method. 請求項1記載の画像歪み補正用パラメータ決定方法において、撮像系のレンズの歪曲収差係数、並びにレンズの光学中心と画像面との距離を推定することを特徴とする画像歪み補正用パラメータ決定方法。   2. The image distortion correction parameter determination method according to claim 1, wherein the distortion aberration coefficient of the lens of the imaging system and the distance between the optical center of the lens and the image plane are estimated. 画像を撮影するデジタルカメラ等の撮像装置において、撮影した画像の歪み補正のためのパラメータが、外部よりアクセス可能なメモリに保存されることを特徴とする撮像装置。   An image pickup apparatus such as a digital camera for taking an image, wherein parameters for correcting distortion of the taken image are stored in a memory accessible from outside. 画像を撮影するデジタルカメラ等の撮像装置において、撮影した画像の歪み補正のためのパラメータが画像のデータの一部として、外部よりアクセス可能なメモリに保存されることを特徴とする撮像装置。   An image pickup apparatus such as a digital camera for taking an image, wherein parameters for correcting distortion of the taken image are stored in a memory accessible from outside as part of image data. 画像を撮影するデジタルカメラ等の撮像装置において、撮影した画像の歪み、明るさ及び色合いの補正のためのパラメータが、外部よりアクセス可能なメモリに保存されることを特徴とする撮像装置。   An image pickup apparatus such as a digital camera for taking an image, wherein parameters for correcting distortion, brightness, and hue of the taken image are stored in a memory accessible from outside. 請求項6記載の撮像装置において、少なくとも一部のパラメータは画像のデータの一部として、外部よりアクセス可能なメモリに保存されることを特徴とする撮像装置。   7. The imaging apparatus according to claim 6, wherein at least some of the parameters are stored in a memory accessible from outside as part of image data. 画像を撮影するデジタルカメラ等の撮影装置において、複数のメモリを有し、撮影した画像の歪み、明るさ及び色合いの補正のためのパラメータの保存場所を該複数のメモリより任意に選択可能であることを特徴とする撮像装置。   A photographing apparatus such as a digital camera for photographing an image has a plurality of memories, and a storage location of parameters for correcting distortion, brightness, and hue of the photographed image can be arbitrarily selected from the plurality of memories. An imaging apparatus characterized by that. 撮影した2枚の画像から請求項1記載の方法により画像歪み補正用パラメータを推定して外部よりアクセス可能なメモリに格納する手段を有することを特徴とする請求項4、5、6、7又は8記載の撮像装置。   The image distortion correction parameters are estimated from the two photographed images by the method according to claim 1 and stored in a memory accessible from outside. 8. The imaging device according to 8.
JP2005027852A 1996-02-27 2005-02-03 Image pickup device, and apparatus for utilizing imaged data thereof Pending JP2005168054A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005027852A JP2005168054A (en) 1996-02-27 2005-02-03 Image pickup device, and apparatus for utilizing imaged data thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP3951496 1996-02-27
JP2005027852A JP2005168054A (en) 1996-02-27 2005-02-03 Image pickup device, and apparatus for utilizing imaged data thereof

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP27329496A Division JP3950188B2 (en) 1996-02-27 1996-10-16 Image distortion correction parameter determination method and imaging apparatus

Publications (1)

Publication Number Publication Date
JP2005168054A true JP2005168054A (en) 2005-06-23

Family

ID=34740796

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005027852A Pending JP2005168054A (en) 1996-02-27 2005-02-03 Image pickup device, and apparatus for utilizing imaged data thereof

Country Status (1)

Country Link
JP (1) JP2005168054A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008182684A (en) * 2006-12-27 2008-08-07 Nikon Corp Distortion correcting method, distortion correcting device, distortion correcting program, and digital camera
US8248508B2 (en) 2006-12-27 2012-08-21 Nikon Corporation Distortion correcting method, distortion correcting device, program recording medium and electronic camera
KR20210035355A (en) * 2019-09-16 2021-04-01 주식회사 퓨런티어 Apparatus for aligning optical axis of camera module
WO2023008441A1 (en) * 2021-07-26 2023-02-02 京セラ株式会社 Information processing device, information processing method, imaging device, and information processing system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008182684A (en) * 2006-12-27 2008-08-07 Nikon Corp Distortion correcting method, distortion correcting device, distortion correcting program, and digital camera
US8248508B2 (en) 2006-12-27 2012-08-21 Nikon Corporation Distortion correcting method, distortion correcting device, program recording medium and electronic camera
KR20210035355A (en) * 2019-09-16 2021-04-01 주식회사 퓨런티어 Apparatus for aligning optical axis of camera module
KR102240308B1 (en) * 2019-09-16 2021-04-14 주식회사 퓨런티어 Apparatus for aligning optical axis of camera module
US11644634B2 (en) 2019-09-16 2023-05-09 Furonteer Inc Optical axis alignment apparatus of camera module
WO2023008441A1 (en) * 2021-07-26 2023-02-02 京セラ株式会社 Information processing device, information processing method, imaging device, and information processing system

Similar Documents

Publication Publication Date Title
JP3950188B2 (en) Image distortion correction parameter determination method and imaging apparatus
JP5398156B2 (en) WHITE BALANCE CONTROL DEVICE, ITS CONTROL METHOD, AND IMAGING DEVICE
US7190845B2 (en) Image correction according to transmission characteristics of image sensing optical system
CN101309367B (en) Imaging apparatus
US7151560B2 (en) Method and apparatus for producing calibration data for a digital camera
US7215364B2 (en) Digital imaging system using overlapping images to formulate a seamless composite image and implemented using either a digital imaging sensor array
KR101313686B1 (en) Image processing apparatus and method of controlling the same
CN106161926B (en) The control method of photographic device and photographic device
US8036481B2 (en) Image processing apparatus and image restoration method and program
JPH08116490A (en) Image processing unit
JPH09181913A (en) Camera system
JP2005509961A (en) Method for deriving calibration and image processing
JP5735846B2 (en) Image processing apparatus and method
KR20070109875A (en) Imaging apparatus and method, and program
CN107274352A (en) A kind of image processing method and the real-time sampling system applied to lens distortion and photography distortion correction
JP2002190979A (en) Electronic camera, and recording medium of image processing program
US5872643A (en) Film image reproducing apparatus using a domestic light condition or an undomestic light condition for generation of a designated area
JP2005168054A (en) Image pickup device, and apparatus for utilizing imaged data thereof
US20050219404A1 (en) Apparatus for compensating for color shading on a picture picked up by a solid-state image sensor over a broad dynamic range
JP2002344978A (en) Image processing unit
JP6790038B2 (en) Image processing device, imaging device, control method and program of image processing device
JP5173664B2 (en) Image processing apparatus and image processing method
JP6541835B2 (en) IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, PROGRAM, AND STORAGE MEDIUM
CN116055907A (en) Image processing apparatus, image capturing apparatus, image processing method, and storage medium
JPH11101640A (en) Camera and calibration method of camera

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051227

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060227

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060621