JP2008298589A - Device and method for detecting positions - Google Patents

Device and method for detecting positions Download PDF

Info

Publication number
JP2008298589A
JP2008298589A JP2007145122A JP2007145122A JP2008298589A JP 2008298589 A JP2008298589 A JP 2008298589A JP 2007145122 A JP2007145122 A JP 2007145122A JP 2007145122 A JP2007145122 A JP 2007145122A JP 2008298589 A JP2008298589 A JP 2008298589A
Authority
JP
Japan
Prior art keywords
optical system
imaging
intersection
image
position detection
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
JP2007145122A
Other languages
Japanese (ja)
Inventor
Hitoshi Koyanagi
仁 小柳
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.)
Konica Minolta Inc
Original Assignee
Konica Minolta Inc
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 Konica Minolta Inc filed Critical Konica Minolta Inc
Priority to JP2007145122A priority Critical patent/JP2008298589A/en
Publication of JP2008298589A publication Critical patent/JP2008298589A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a device and method for accurately detecting positions of objects at various distances at close to long range without being affected by the change in distortion aberration due to distance by using a single model. <P>SOLUTION: The position detecting device is equipped with an optical system 22 and an image processing section 3 for detecting the position of an object P shot by image-pickup means 2a and 2b by applying an intersection displacement model in which the intersection of a light flux coming into the optical system 22 and the optical axis of the optical system 22 moves along the extension of the optical axis according to measured values pertaining to the image focus location of the object P obtained by a plurality of imaging means 2a and 2b to pick up the image of the object P on the imaging surface 25 or position-related information pertaining to the object P with respect to the optical system 22. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、位置検出装置及び位置検出方法に関する。   The present invention relates to a position detection device and a position detection method.

従来、複数の撮像装置を用いて対象物の撮像を行い、対象物の3次元座標(位置)を得る位置検出装置、位置検出方法が知られている。   2. Description of the Related Art Conventionally, a position detection device and a position detection method are known in which an object is imaged using a plurality of imaging devices to obtain a three-dimensional coordinate (position) of the object.

しかし、レンズにより構成される光学系を用いた撮像装置で対象物を撮像した画像には色収差、歪曲収差等、様々な種類の収差が含まれている。このうち、特に撮像装置を用いて対象物の位置を検出する場合のように、撮像装置を計測用途に使用する場合等において最も問題となるのは、歪曲収差(distortion)であり、歪曲収差を含んだままでは対象物の位置を正確に検出することはできない。   However, various types of aberrations such as chromatic aberration and distortion are included in an image obtained by imaging an object with an imaging apparatus using an optical system including lenses. Among these, distortion is the most serious problem when the imaging device is used for measurement, such as when detecting the position of an object using an imaging device. If it is included, the position of the object cannot be detected accurately.

従来、この歪曲収差を補正するための手法としては、歪曲収差を関数として表し、入力した画像に対して関数式に基づいて補正をかける手法が知られており、補正の精度を向上させるためには、この関数の近似精度を向上させることが必要である。   Conventionally, as a technique for correcting this distortion, a technique is known in which distortion is expressed as a function, and an input image is corrected based on a functional expression, in order to improve correction accuracy. It is necessary to improve the approximation accuracy of this function.

この点、例えば、関数の精度が目標性能に達するまで多項式の項を増加させる手法を採用するものが提案されている(例えば、特許文献1参照)。また、特殊な関数を利用することにより関数による近似を最適化し補正の精度を向上させる手法も提案されている(例えば、特許文献2参照)。   In this regard, for example, a method is proposed that employs a method of increasing the polynomial term until the accuracy of the function reaches the target performance (see, for example, Patent Document 1). In addition, a method for optimizing approximation by a function by using a special function and improving the accuracy of correction has been proposed (see, for example, Patent Document 2).

しかし、歪曲収差は、対象物から結像面までの距離に応じて変化することが知られている。このため、ある距離では高精度の補正ができたとしても、対象物から結像面までの距離が変わることによって補正の精度が落ちる場合がある。
そこで、これに対応するため、対象物から結像面までの距離に応じて歪曲収差の補正曲線を複数作成し、得られた歪曲収差の補正曲線に基づいて計測値を補正する手法も提案されている(例えば、特許文献3参照)。
However, it is known that the distortion aberration changes according to the distance from the object to the imaging plane. For this reason, even if high-accuracy correction can be performed at a certain distance, the correction accuracy may decrease due to a change in the distance from the object to the imaging plane.
In order to cope with this, a method has been proposed in which a plurality of distortion correction curves are created according to the distance from the object to the imaging plane, and the measurement values are corrected based on the obtained distortion aberration correction curves. (For example, refer to Patent Document 3).

このように、従来は、歪曲収差を補正する手法として、撮像画像に生じる歪曲収差を精度よく明らかにする技術と、対象物の距離に応じて歪曲収差の対応関係を変化させる技術とが知られており、この2つにより、補正の精度を向上させ、対象物の位置検出の高精度化を目指している。   As described above, conventionally, as a technique for correcting distortion, a technique for accurately clarifying distortion occurring in a captured image and a technique for changing the correspondence of distortion according to the distance of an object are known. With these two, the accuracy of correction is improved, and the accuracy of position detection of the object is aimed at.

そして、歪曲収差補正に用いられる関数において、対象物の距離を計算する際のモデルとしては、従来、特許文献4、特許文献5等に開示されているように、対象物からの光束が必ずある一点を通過するといういわゆるピンホールモデルが適用されていた。
特開平6−217142号公報 特開2001−133223号公報 特開2001−133225号公報 特開2005−91173号公報 特開2003−304561号公報
As a model for calculating the distance of an object in a function used for distortion correction, there is always a light beam from the object as disclosed in Patent Document 4, Patent Document 5, and the like. A so-called pinhole model of passing through one point was applied.
JP-A-6-217142 JP 2001-133223 A JP 2001-133225 A JP 2005-91173 A JP 2003-304561 A

しかしながら、特許文献3等に記載の技術では、距離毎に異なる歪曲収差に対して、歪曲収差の補正曲線を複数持つことで対応する手法をとっており、補正を行う処理装置において大きなメモリ容量が必要となる他、内部の制御が複雑化するとの問題がある。
また、補正曲線が作成されていない部分に関しては、この部分を補間して処理する等の工夫が必要であり、制御が複雑化するとともに、補正の精度としても劣る原因となっている。
However, in the technique described in Patent Document 3 and the like, a technique is adopted in which a plurality of distortion aberration correction curves are provided for distortion aberrations that differ for each distance, and a processing apparatus that performs correction has a large memory capacity. Besides being necessary, there is a problem that internal control becomes complicated.
Further, for the portion where the correction curve is not created, it is necessary to devise such as processing by interpolating this portion, which complicates the control and causes a poor correction accuracy.

また、特許文献3等に記載の技術では、例えば台の上に対象物を固定して撮像する場合であって、台から撮像装置までの距離が予め判明している場合には、予め距離に応じた歪曲収差の補正曲線を正確に作成することができるので、この補正曲線に基づいて補正することにより高精度の補正を行うことができる。台が上下に移動して台から撮像装置までの距離を変更可能な場合でも、各位置ごとの距離が判明していれば、同様に各位置に対応する補正曲線を予め作成しておくことができる。
しかし、一般的な撮像の場合には、対象物から撮像装置までの距離が分からない場合や、1つの画面の中に距離の異なる対象物が複数混在している場合が多く、このような場合には、特許文献3等に記載の技術では対応することができないとの問題もある。
Further, in the technique described in Patent Document 3 or the like, for example, when an object is fixed and imaged on a table, and the distance from the table to the imaging device is known in advance, the distance is set in advance. Since a corresponding correction curve for distortion can be created accurately, high-accuracy correction can be performed by correcting based on this correction curve. Even when the table moves up and down and the distance from the table to the imaging device can be changed, if the distance for each position is known, a correction curve corresponding to each position can be similarly created in advance. it can.
However, in the case of general imaging, there are many cases where the distance from the object to the imaging device is not known, or there are many objects with different distances mixed in one screen. However, there is a problem that the technique described in Patent Document 3 cannot be used.

そこで、本発明は以上のような課題を解決するためになされたものであり、1つのモデルで距離による歪曲収差の変化に容易に対応可能であり、近距離から遠距離まで、様々な距離にある対象物の位置を高精度に検出することのできる位置検出装置及び位置検出方法を提供することを目的とするものである。   Therefore, the present invention has been made to solve the above-described problems, and it is possible to easily cope with a change in distortion due to distance with a single model, and at various distances from a short distance to a long distance. It is an object of the present invention to provide a position detection device and a position detection method that can detect the position of a certain object with high accuracy.

前記課題を解決するために、請求項1に記載の発明は、位置検出装置において、
光学系を備え対象物を撮像する複数の撮像手段により得られた対象物の結像面上の結像位置に関する実測値又は前記光学系に対する対象物の位置に関する位置関連情報に基づいて前記光学系に入射する光束と前記光学系の光軸との交点が前記光軸の延在方向に前後する交点変位モデルを適用して、前記撮像手段によって撮像された前記対象物の位置を検出する位置検出手段を備えていることを特徴としている。
In order to solve the above problem, the invention according to claim 1 is a position detection device,
The optical system based on actual measurement values on the imaging position of an object on the imaging plane obtained by a plurality of imaging means provided with an optical system and imaging the object or position related information on the position of the object with respect to the optical system Position detection for detecting the position of the object imaged by the imaging means by applying an intersection displacement model in which the intersection of the light beam incident on the optical system and the optical axis of the optical system is back and forth in the extending direction of the optical axis It is characterized by having means.

請求項2に記載の発明は、請求項1に記載の位置検出装置において、
前記位置検出手段は、カメラ座標を正規化して正規化座標を得る正規化変換処理を行う正規化手段と、前記正規化手段により正規化された後に前記複数の撮像手段のずれ補正処理を行うずれ補正手段と、を有し、
前記ずれ補正手段における前記ずれ補正処理において前記交点変位モデルを適用することを特徴とする。
The invention according to claim 2 is the position detection apparatus according to claim 1,
The position detecting unit includes a normalizing unit that performs normalization conversion processing to obtain normalized coordinates by normalizing camera coordinates, and a shift that performs shift correction processing of the plurality of imaging units after being normalized by the normalizing unit. Correction means,
The intersection displacement model is applied in the deviation correction processing in the deviation correction means.

請求項3に記載の発明は、請求項1又は請求項2に記載の位置検出装置において、
前記交点変位モデルにおける係数を算出する係数算出手段をさらに備えていることを特徴とする。
The invention according to claim 3 is the position detection device according to claim 1 or 2,
Coefficient calculating means for calculating a coefficient in the intersection displacement model is further provided.

請求項4に記載の発明は、位置検出方法において、
光学系を備え対象物を撮像する複数の撮像手段により得られた対象物の結像面上の結像位置に関する実測値又は前記光学系に対する対象物の位置に関する位置関連情報に基づいて前記光学系に入射する光束と前記光学系の光軸との交点が前記光軸の延在方向に前後する交点変位モデルを適用して、前記撮像手段により撮像された前記対象物の位置を検出する位置検出工程を有することを特徴としている。
According to a fourth aspect of the present invention, in the position detection method,
The optical system based on actual measurement values on the imaging position of an object on the imaging plane obtained by a plurality of imaging means provided with an optical system and imaging the object or position related information on the position of the object with respect to the optical system Position detection for detecting the position of the object imaged by the imaging means by applying an intersection displacement model in which the intersection of the light beam incident on the optical system and the optical axis of the optical system is back and forth in the extending direction of the optical axis It has the process.

請求項5に記載の発明は、請求項4に記載の位置検出方法において、
前記位置検出工程は、カメラ座標を正規化して正規化座標を得る正規化変換処理を行う正規化工程と、前記正規化工程により正規化された後に前記複数の撮像手段のずれ補正処理を行うずれ補正工程と、を含み、前記ずれ補正工程において前記交点変位モデルを適用することを特徴とする。
The invention according to claim 5 is the position detection method according to claim 4,
The position detection step includes a normalization step of normalizing a camera coordinate to obtain a normalized coordinate, and a shift for performing a shift correction process of the plurality of imaging units after being normalized by the normalization step A correction step, wherein the intersection displacement model is applied in the deviation correction step.

請求項6に記載の発明は、請求項4又は請求項5に記載の位置検出方法において、
前記交点変位モデルにおける係数を算出する係数算出工程をさらに有することを特徴とする。
The invention according to claim 6 is the position detection method according to claim 4 or 5,
The method further includes a coefficient calculation step of calculating a coefficient in the intersection displacement model.

請求項1及び請求項4に記載の発明によれば、対象物の位置を検出する際に、光学系に入射する光束と光学系の光軸との交点が光軸の延在方向に前後する交点変位モデルを適用するので、対象物から撮像装置までの距離が分からない場合や、1つの画面の中に距離の異なる対象物が複数混在している場合でも1つのモデルで対応でき、対象物の位置検出を容易かつ高精度に行うことができるとの効果を奏する。   According to the first and fourth aspects of the invention, when detecting the position of the object, the intersection of the light beam incident on the optical system and the optical axis of the optical system moves back and forth in the extending direction of the optical axis. Since the intersection displacement model is applied, even if the distance from the object to the imaging device is not known, or when multiple objects with different distances are mixed in one screen, it can be handled with one model. The position detection can be easily and highly accurately performed.

請求項2及び請求項5に記載の発明によれば、対象物の位置を検出する工程を正規化処理を行う工程と、ずれ補正処理を行う工程とに分けて、ずれ補正処理を行う工程において交点変位モデルを適用するので、必要最小限の演算処理負担とすることができるとの効果を奏する。   According to the second and fifth aspects of the invention, in the step of performing the deviation correction process, the step of detecting the position of the object is divided into the step of performing the normalization process and the step of performing the deviation correction process. Since the intersection displacement model is applied, there is an effect that a necessary minimum processing load can be achieved.

請求項3及び請求項6に記載の発明によれば、交点変位モデルにおける係数を算出し、これを適用して対象物の位置を検出するので、対象物から撮像装置までの距離が分からない場合や、1つの画面の中に距離の異なる対象物が複数混在している場合でも対象物の位置検出を容易かつ高精度に行うことができるとの効果を奏する。   According to the third and sixth aspects of the present invention, since the coefficient in the intersection displacement model is calculated and applied to detect the position of the object, the distance from the object to the imaging device is not known. In addition, even when a plurality of objects having different distances are mixed in one screen, there is an effect that the position of the object can be detected easily and with high accuracy.

以下、図面を参照しながら本発明を実施するための最良の形態について説明する。ただし、本発明の範囲は以下の実施形態及び図示例に限定されるものではない。   The best mode for carrying out the present invention will be described below with reference to the drawings. However, the scope of the present invention is not limited to the following embodiments and illustrated examples.

[第1の実施形態]
図1から図9を参照しつつ、位置検出装置の第1の実施形態について説明する。
図1に示すように、本実施形態における位置検出装置1は、対象物(被写体)Pを撮像する2つの撮像装置2a,2bと、これらの撮像装置2a,2bによって取得された画像について画像処理を行い、当該画像の歪曲収差を補正するとともに対象物(被写体)の3次元上の位置を算出する画像処理部3を備えている。
[First Embodiment]
A first embodiment of the position detection device will be described with reference to FIGS. 1 to 9.
As illustrated in FIG. 1, the position detection device 1 according to the present embodiment performs image processing on two imaging devices 2 a and 2 b that capture an object (subject) P and images acquired by these imaging devices 2 a and 2 b. And an image processing unit 3 that corrects distortion aberration of the image and calculates a three-dimensional position of the object (subject).

各撮像装置2a,2bは、撮像素子(光電変換素子)21a,21bとこの撮像素子21a,21bの結像面25(図2及び図3参照)に被写体光像を結像させる光学系22a,22bとを備えている。撮像素子21a,21bは、例えばCCD(Charge Coupled Device)、CMOS(Complementary Metal-Oxide Semiconductor)等のイメージセンサであり、撮像素子21a,21bは、光学系22a,22bを透過した入射光を電気信号に光電変換して取り込むとともに、被写体光像を画像信号として画像処理部3に出力する。なお、光学系22a,22bは1つのレンズで構成されるものであってもよいし、複数のレンズで構成されるものでもよい。   Each of the imaging devices 2a and 2b includes an imaging system (photoelectric conversion elements) 21a and 21b and an optical system 22a that forms a subject light image on an imaging surface 25 (see FIGS. 2 and 3) of the imaging elements 21a and 21b. 22b. The image sensors 21a and 21b are image sensors such as a CCD (Charge Coupled Device) and a CMOS (Complementary Metal-Oxide Semiconductor), for example. And photoelectrically convert the subject light image to the image processing unit 3 as an image signal. The optical systems 22a and 22b may be configured with one lens or may be configured with a plurality of lenses.

画像処理部3は、CPU(Central Processing Unit)等の処理装置、及び、システムプログラム、後述するキャリブレーション処理を行うためのキャリブレーションプログラム、対象物の位置を検出する位置検出処理を行う位置検出プログラム等、各種の制御プログラム等を格納するROM(Read Only Memory)、各種データを一時記憶するRAM(Random Access Memory)(いずれも図示せず)等の記憶部等を備えて構成されるコンピュータであり、画像の歪曲収差を補正するキャリブレーション処理及び対象物の位置を検出する位置検出処理を行うものである。   The image processing unit 3 includes a processing device such as a CPU (Central Processing Unit), a system program, a calibration program for performing calibration processing to be described later, and a position detection program for performing position detection processing for detecting the position of an object. Is a computer configured with a storage unit such as a ROM (Read Only Memory) for storing various control programs, a RAM (Random Access Memory) for temporarily storing various data (all not shown), etc. A calibration process for correcting distortion of an image and a position detection process for detecting the position of an object are performed.

ここで、歪曲収差について、図2及び図3を参照しつつ説明する。なお、図2及び図3においては、画像が結像する撮像素子21の結像面25の図2及び図3における縦軸をx軸、横軸をy軸としている。また、図2においては、対象物Pからの光束が必ずある一点(図2の場合には光学系中心)を通過するという従来のピンホールモデルの場合を示している。
図2及び図3は、歪曲収差が生じていない場合の結像位置の座標(理想座標)を(x,y)とし、歪曲収差が生じている場合の現実の結像位置の座標(実座標)を(x,y)とし、光学系22の光軸が結像面25と交わる点を中心(x,y)としたときに、この中心(x,y)から座標(x,y)までの距離(理想の像高)を「rideal」とし、中心(x,y)から座標(x,y)までの距離(現実の像高)を「rreal」として表している。対象物Pを撮影した場合に得られる画像の歪曲収差は、理想の像高(rideal)と現実の像高(rreal)との比として表現することができ、下記式(1)により算出することができる。
歪曲収差=(rideal−rreal)/rideal×100(%) … (1)
Here, the distortion will be described with reference to FIGS. 2 and 3, the vertical axis in FIGS. 2 and 3 of the imaging surface 25 of the imaging element 21 on which an image is formed is the x axis and the horizontal axis is the y axis. FIG. 2 shows the case of a conventional pinhole model in which the light beam from the object P always passes through a certain point (in the case of FIG. 2, the center of the optical system).
2 and 3, the coordinates (ideal coordinates) of the imaging position when distortion is not generated are (x 1 , y 1 ), and the coordinates of the actual imaging position when distortion is occurring ( When the real coordinates are (x 2 , y 2 ) and the point where the optical axis of the optical system 22 intersects the image plane 25 is the center (x 0 , y 0 ), this center (x 0 , y 0 ) The distance from the center (x 0 , y 1 ) to the coordinates (x 1 , y 1 ) is “r ideal ”, and the distance from the center (x 0 , y 0 ) to the coordinates (x 2 , y 2 ) (actual image height) ) As “r real ”. The distortion aberration of an image obtained when the object P is photographed can be expressed as a ratio between an ideal image height (r ideal ) and an actual image height (r real ), and is calculated by the following equation (1). can do.
Distortion aberration = (r ideal −r real ) / r ideal × 100 (%) (1)

そして、図2に示すピンホールモデルによった場合には、この場合の理想座標(x,y)は、下記のように表すことができる。なお、下記において、Xは対象物PのX軸方向の距離、Yは対象物PのY軸方向の距離、Zは対象物Pから光学系中心までの距離である。
=f(X/Z),y=f(Y/Z)
また、対象物Pから光学系22に入射する光の角度をθとすると、中心(x,y)から理想座標(x,y)までの距離(理想の像高)(rideal)は、下記式(2)のように表すことができる。
r=√(x+y)=ftanθ … (2)
In the case of using the pinhole model shown in FIG. 2, the ideal coordinates (x 1 , y 1 ) in this case can be expressed as follows. In the following, X is the distance in the X-axis direction of the object P, Y is the distance in the Y-axis direction of the object P, and Z is the distance from the object P to the center of the optical system.
x 1 = f (X / Z), y 1 = f (Y / Z)
Further, when the angle of light incident on the optical system 22 from the object P is θ, the distance (ideal image height) from the center (x 0 , y 0 ) to the ideal coordinates (x 1 , y 1 ) (r ideal ) Can be expressed as in the following formula (2).
r = √ (x 2 + y 2 ) = ftanθ (2)

また、対象物Pから光軸までの距離Rは、下記式(3)のように表すことができる。
R=√(X+Y) … (3)
Further, the distance R from the object P to the optical axis can be expressed as the following formula (3).
R = √ (X 2 + Y 2 ) (3)

このため、理想座標(x,y)は、下記のように表すことができる。
=r(X/R),y=r(Y/R)
For this reason, ideal coordinates (x 1 , y 1 ) can be expressed as follows.
x 1 = r (X / R), y 1 = r (Y / R)

これに対して、本実施形態では、ピンホールモデルではなく、図3に示すように、光学系22を通して得られた対象物Pの結像面25上の結像位置に関する実測値又は光学系22に対する対象物Pの位置に関する位置関連情報に基づいて光学系22に入射する光束と光学系22の光軸との交点が光軸の延在方向に前後する交点変位モデルを適用する。すなわち、図3に示すように、光学系22に入射する光束は、光学系22の中心からkだけ光軸の延在方向にずれた位置で光学系22の光軸と交わる。
なお、ここで対象物Pの結像面25上の結像位置に関する実測値とは、光学系22を通して得られた対象物Pの現実の結像位置の座標(実座標:x,y)又は光学系22の光軸が結像面25と交わる点(中心:x,y)から座標(x,y)までの距離(現実の像高:rreal)であり、光学系22に対する対象物Pの位置に関する位置関連情報とは、対象物PのX,Y座標、対象物Pから光学系中心までの距離Z、光学系中心から結像面25までの距離f、対象物Pからの光束が光学系22の光軸と交わる角度θ等である。
実際の光学系22においては、光学系22に入射する全ての光束を光学系22の中心を通過するように構成することが困難であり、歪曲収差の補正においても、光学系22に入射する光束と光学系22の光軸との交点が前後する交点変位モデルを適用することが現実に即している。
In contrast, in the present embodiment, instead of the pinhole model, as shown in FIG. 3, as shown in FIG. 3, measured values relating to the imaging position on the imaging surface 25 of the object P obtained through the optical system 22 or the optical system 22. Based on the position-related information regarding the position of the object P with respect to, an intersection displacement model is applied in which the intersection of the light beam incident on the optical system 22 and the optical axis of the optical system 22 is back and forth in the extending direction of the optical axis. That is, as shown in FIG. 3, the light beam incident on the optical system 22 intersects the optical axis of the optical system 22 at a position shifted from the center of the optical system 22 by k 1 in the extending direction of the optical axis.
Here, the actual measurement value relating to the imaging position of the object P on the imaging surface 25 is the coordinates of the actual imaging position of the object P obtained through the optical system 22 (actual coordinates: x 2 , y 2). ) Or a distance from the point (center: x 0 , y 0 ) where the optical axis of the optical system 22 intersects the imaging plane 25 to the coordinates (x 2 , y 2 ) (real image height: r real ) The position-related information regarding the position of the object P with respect to the system 22 includes the X and Y coordinates of the object P, the distance Z from the object P to the optical system center, the distance f from the optical system center to the imaging plane 25, the object The angle θ or the like at which the light beam from the object P intersects the optical axis of the optical system 22.
In the actual optical system 22, it is difficult to configure all the light beams incident on the optical system 22 so as to pass through the center of the optical system 22, and the light beams incident on the optical system 22 also in correcting distortion. It is practical to apply an intersection displacement model in which the intersection of the optical system 22 and the optical axis of the optical system 22 is back and forth.

このような交点変位モデルによった場合には、この場合の理想座標(x,y)は、下記のように表すことができる。
=((f+f(r))/(Z−f(r)))X,y=((f+f(r))/(Z−f(r)))Y
ここで、f(r)は所定の係数をもつ関数である。なお、本実施形態では、交点変位モデルにおける関数f(r)として、後述のように、像高r(結像位置x,y)に応じて線形に変化するだけの関数(「kr」)を適用する場合を例として説明する。なお、kは係数である。
When such an intersection displacement model is used, the ideal coordinates (x 1 , y 1 ) in this case can be expressed as follows.
x 1 = ((f + f (r)) / (Z−f (r))) X, y 1 = ((f + f (r)) / (Z−f (r))) Y
Here, f (r) is a function having a predetermined coefficient. In the present embodiment, the function f (r) in the intersection displacement model is a function (“k 1 r”) that changes linearly according to the image height r (imaging position x, y) as described later. ) Will be described as an example. In addition, k 1 is a coefficient.

本実施形態において、画像処理部3は、この交点変位モデルを用いて理想値(理想座標、理想の像高)を取得するとともに、当該理想値に対応する仮定値(対象物Pの結像面25上の結像位置に関する歪曲収差を含んだ値)を取得するようになっている。
そして、画像処理部3は、実測値と仮定値とから交点変位モデルにおける係数k、後述する歪曲収差モデルにおける係数(例えばα、β、γ)等を算出、特定するキャリブレーション処理を行い、その結果をRAM等の記憶部に記憶する。また、前記キャリブレーションの結果から、実施値を理想値に近づくように変換する補正処理を行う。
In the present embodiment, the image processing unit 3 acquires an ideal value (ideal coordinates, ideal image height) using the intersection displacement model, and assumes an assumed value (imaging plane of the object P) corresponding to the ideal value. 25), a value including distortion aberration with respect to the imaging position on 25).
Then, the image processing unit 3 performs a calibration process for calculating and specifying a coefficient k 1 in the intersection displacement model, a coefficient (for example, α, β, γ) and the like in a later-described distortion aberration model from the actually measured value and the assumed value, The result is stored in a storage unit such as a RAM. Further, a correction process is performed for converting the actual value so as to approach the ideal value from the result of the calibration.

具体的には、画像処理部3は、実測値(実座標、現実の像高)と仮定値とを比較して、実測値と仮定値とが所定の誤差範囲内にあるか否かを判定する。また、ROM等の記憶部には、この所定の誤差範囲内か否かを判定する際の閾値が予め記憶されている。
そして、画像処理部3は、実測値と仮定値とが所定の誤差範囲内にあると判定した場合には、理想値を導く際に仮決めした交点変位モデルにおける係数k及び仮定値を導くために仮決めした歪曲収差モデルにおける係数を適正な係数と特定し、記憶部に記憶させるキャリブレーション処理を行う。なお、このように画像処理部3は、キャリブレーションの過程において、交点変位モデルにおける係数kを算出、特定するものであり、画像処理部3は、係数算出手段として機能する。
そして、画像処理部3は、キャリブレーションの結果から、実測値を仮定値に対応する理想値に近似するように、画像に対して補正を行うようになっている。
Specifically, the image processing unit 3 compares the actual measurement value (actual coordinates, actual image height) and the assumed value to determine whether the actual measurement value and the assumed value are within a predetermined error range. To do. In addition, a threshold value for determining whether or not it is within the predetermined error range is stored in advance in a storage unit such as a ROM.
When the image processing unit 3 determines that the actual measurement value and the assumed value are within the predetermined error range, the image processing unit 3 derives the coefficient k 1 and the assumed value in the intersection displacement model provisionally determined when the ideal value is derived. Therefore, a calibration process is performed in which the coefficient in the temporarily determined distortion aberration model is identified as an appropriate coefficient and stored in the storage unit. The image processing unit 3 in this way, in the course of calibration, calculates the coefficient k 1 at the intersection displacement model, which identifies the image processing section 3 functions as a coefficient calculating means.
Then, the image processing unit 3 corrects the image so as to approximate the actual measurement value to the ideal value corresponding to the assumed value based on the calibration result.

さらに、画像処理部3は、上記交点変位モデルを適用して、撮像手段2a,2bによって撮像された対象物Pの位置(3次元座標 図4におけるM(X,Y,Z))を検出する位置検出手段として機能する。   Furthermore, the image processing unit 3 applies the intersection displacement model to detect the position of the object P imaged by the imaging means 2a and 2b (M (X, Y, Z) in FIG. 4). Functions as position detection means.

本実施形態において位置検出装置は、前述のように2つの撮像手段2a,2bを備えるステレオカメラであり、仮に2つの撮像手段2a,2bにずれがなく完全に平行であり、同一のものである場合には、図5に示す撮像手段2a,2bの焦点位置から対象物Pまでの距離Dは、下記の式(4)で表すことができる。なお、式(4)において、Bは撮像手段2a,2b間の距離(光学系22a,22bの光軸間の距離)であり、fは焦点距離であり、Cは視差を表す。
D=Bf/C … (4)
In the present embodiment, the position detection device is a stereo camera including the two image pickup units 2a and 2b as described above. The two image pickup units 2a and 2b are not parallel and are completely parallel and the same. In this case, the distance D from the focal positions of the imaging units 2a and 2b shown in FIG. 5 to the object P can be expressed by the following equation (4). In equation (4), B is the distance between the imaging means 2a and 2b (the distance between the optical axes of the optical systems 22a and 22b), f is the focal length, and C is the parallax.
D = Bf / C (4)

しかし、現実には2つの撮像手段2a,2bが完全に平行であり、同一のものであることはほとんどなく、多少平行からずれてしまっているとか、撮像手段2aと撮像手段2bとで大きさ等が多少異なっている等の誤差がある。このため、対象物の位置を正確に検出するためには、撮像手段2aと撮像手段2bとの回転方向、横方向のずれを修正するずれ補正処理を行う必要がある。本実施形態では、画像処理部3は、これら撮像手段2a,2bのずれ補正処理を行うずれ補正手段として機能する。   However, in reality, the two image pickup means 2a and 2b are completely parallel and rarely the same, and are slightly deviated from parallel, or the image pickup means 2a and the image pickup means 2b are different in size. There are errors such as slightly different. For this reason, in order to accurately detect the position of the object, it is necessary to perform a shift correction process for correcting a shift in the rotational direction and the horizontal direction between the imaging unit 2a and the imaging unit 2b. In the present embodiment, the image processing unit 3 functions as a shift correction unit that performs a shift correction process of the imaging units 2a and 2b.

また、実際の撮像装置2a,2bの結像面上における平面座標(カメラ座標)は、画素の横軸と縦軸の単位長が異なっていたり、縦軸と横軸のなす角度が直角になっていない場合がある。このため、予め、このカメラ座標を正規化して正規化座標を得る正規化変換処理を行う必要がある。本実施形態では、画像処理部3は、後述する変換行列によりカメラ座標を正規化座標に変換する正規化変換処理を行う正規化手段として機能する。
なお、本実施形態では、前記ずれ補正処理はこの正規化変換処理の後に行われるようになっており、このずれ補正処理において交点変換モデルが適用されるようになっている。
Further, in the plane coordinates (camera coordinates) on the imaging plane of the actual imaging devices 2a and 2b, the unit lengths of the horizontal axis and the vertical axis of the pixels are different, or the angle formed by the vertical axis and the horizontal axis is a right angle. There may not be. For this reason, it is necessary to perform a normalization conversion process in which the camera coordinates are normalized to obtain normalized coordinates in advance. In the present embodiment, the image processing unit 3 functions as a normalization unit that performs normalization conversion processing for converting camera coordinates into normalized coordinates using a conversion matrix described later.
In this embodiment, the deviation correction process is performed after the normalization conversion process, and the intersection transformation model is applied in the deviation correction process.

本実施形態において、対象物の3次元座標(対象物の3次元上の位置、図4におけるM(X,Y,Z))を検出する位置検出は、具体的には下記のような手法で行われる。   In the present embodiment, the position detection for detecting the three-dimensional coordinates of the object (the three-dimensional position of the object, M (X, Y, Z) in FIG. 4) is specifically performed by the following method. Done.

図4において、M(X,Y,Z)は、対象物Pの3次元座標であり、例えば、光学系中心を原点と見た場合の対象物Pの3次元位置をXYZ座標で表したものである。これに対して、m(x,y)は、撮像装置2a,2bの結像面25上に結像した対象物Pの被写体像の結像位置を2次元の座標で表したものである。なお、ここでは、実際の結像面25上での結像位置であるカメラ座標を後述する変換行列により変換し正規化した正規化座標をm(x,y)としている。
なお、以下の各式において、行列は斜字体の大文字で表記している(例えば、式(5)及び式(6)等におけるP)。
In FIG. 4, M (X, Y, Z) is the three-dimensional coordinates of the object P. For example, the three-dimensional position of the object P when the center of the optical system is viewed as the origin is represented by XYZ coordinates. It is. On the other hand, m (x, y) represents the imaging position of the subject image of the object P imaged on the imaging surface 25 of the imaging devices 2a and 2b by two-dimensional coordinates. Here, the normalized coordinates obtained by transforming and normalizing the camera coordinates, which are the imaging positions on the actual imaging plane 25, using a transformation matrix described later are m (x, y).
In the following equations, the matrix is written in italicized capital letters (for example, P in equation (5), equation (6), etc.).

また、本実施形態では、2つの撮像装置2a,2bが存するが、撮像装置2a,2bのうち、撮像装置2aを基準とし、撮像装置2aから見た撮像装置2bの座標を考えることにより、撮像装置2aの座標系,撮像装置2bの座標系という2つの座標系を1つに統合して処理を行う。
下記の各式においては、基準となる撮像装置2aについては、カンマを付さず、もう一方の撮像装置2bに関する各値についてはカンマを付する(例えばs(カンマ)、A(カンマ)、P(カンマ)、D(カンマ)等)ことにより、2つの撮像装置2a,2bの区別を図っている。なお、本実施形態では、以下撮像装置2aを基準とする場合を例として説明するが、複数の撮像装置2a,2bのうち、いずれを基準とするかは特に限定されない。
In the present embodiment, there are two imaging devices 2a and 2b. Of the imaging devices 2a and 2b, the imaging device 2a is used as a reference and imaging is performed by considering the coordinates of the imaging device 2b viewed from the imaging device 2a. Two coordinate systems, the coordinate system of the device 2a and the coordinate system of the imaging device 2b, are integrated into one to perform processing.
In each of the following formulas, the reference imaging device 2a is not given a comma, and each value relating to the other imaging device 2b is given a comma (for example, s (comma), A (comma), P n (comma), D (comma), etc.) to distinguish the two imaging devices 2a and 2b. In the present embodiment, the case where the imaging device 2a is used as a reference will be described below as an example, but which of the plurality of imaging devices 2a and 2b is used as a reference is not particularly limited.

この対象物Pの3次元座標M(X,Y,Z)と、被写体像の2次元座標m(x,y)との間の関係は、変換行列を介して対応付けることができ、下記式(5)及び式(6)のように表すことができる。なお、式(6)において、s(カンマ)、m(カンマ)、M(カンマ)は、これが撮像装置2bについての値であることを表す。また、式(5)及び式(6)において、s及びs(カンマ)は定数であり、Pは変換行列を表す(以下の各式において同じ)。また、式(5)及び式(6)において、ティルダを付したMは、対象物Pの3次元座標を同次座標で示したものであり、ティルダを付したmは、被写体像の結像位置を同次座標で示したものである(以下の各式において同じ)。

Figure 2008298589
The relationship between the three-dimensional coordinates M (X, Y, Z) of the object P and the two-dimensional coordinates m (x, y) of the subject image can be associated via a transformation matrix, 5) and equation (6). In Expression (6), s (comma), m (comma), and M (comma) indicate that this is a value for the imaging device 2b. Moreover, in Formula (5) and Formula (6), s and s (comma) are constants, and P represents a transformation matrix (the same applies to the following formulas). In Expressions (5) and (6), M with a tilde indicates the three-dimensional coordinates of the object P in homogeneous coordinates, and m with a tilde indicates the image of the subject image. The position is shown in homogeneous coordinates (same in the following equations).
Figure 2008298589

この変換行列Pを行列A、行列P、行列Dに分解すると、下記式(7)のように表すことができる。
ここで、行列Aは撮像手段2a,2bの内部の変数のみによって構成された内部行列であり、実際の結像面25上での結像位置であるカメラ座標を正規化した正規化座標m(x,y)に変換する正規化変換処理を行うための変換行列である。
また、行列Pは、対象物Pの3次元座標M(X,Y,Z)と上記正規化後の被写体像の2次元座標m(x、y)との変換を行う変換行列(射影行列)であり、行列Dは、回転と移動(併進)を表す行列である。

Figure 2008298589
When this transformation matrix P is decomposed into a matrix A, a matrix P n , and a matrix D, it can be expressed as the following equation (7).
Here, the matrix A is an internal matrix constituted only by variables inside the imaging means 2a and 2b, and normalized coordinates m () obtained by normalizing the camera coordinates that are the imaging positions on the actual imaging plane 25. It is a transformation matrix for performing a normalization transformation process for transformation into x, y).
The matrix P n is a transformation matrix (projection matrix) that performs transformation between the three-dimensional coordinates M (X, Y, Z) of the object P and the two-dimensional coordinates m (x, y) of the normalized subject image. The matrix D is a matrix that represents rotation and movement (translation).
Figure 2008298589

正規化座標は、焦点距離が1、画素サイズが1、画素座標が直角となるような正規化カメラにより得られる2次元座標である。正規化カメラにおける対象物Pの3次元座標M(X,Y,Z)と被写体像の2次元座標m(x、y)との関係を表す射影行列Pは、式(8)で表すことができる。これは先の式(7)の両辺に変換行列Aの逆行列を掛けたものであり、式(8)を変形すると式(9)となる。

Figure 2008298589
Normalized coordinates are two-dimensional coordinates obtained by a normalized camera having a focal length of 1, a pixel size of 1, and a pixel coordinate of a right angle. A projection matrix P n representing the relationship between the three-dimensional coordinates M (X, Y, Z) of the object P and the two-dimensional coordinates m (x, y) of the subject image in the normalized camera is expressed by Expression (8). Can do. This is obtained by multiplying both sides of the previous equation (7) by the inverse matrix of the conversion matrix A. When the equation (8) is modified, the equation (9) is obtained.
Figure 2008298589

さらに、この式(9)により、前記式(5)及び式(6)を変形すると、式(10)及び式(11)のようになる。

Figure 2008298589
Further, when the formula (5) and the formula (6) are modified by the formula (9), the formulas (10) and (11) are obtained.
Figure 2008298589

ここで、従来のピンホールモデルの場合には、射影行列Pは、式(12)で表すことができる。

Figure 2008298589
Here, in the case of the conventional pinhole model, the projection matrix P n can be expressed by Expression (12).
Figure 2008298589

しかし、本実施形態においては、前述のように、係数krを持つ交点変位モデルを適用するため、射影行列Pは、係数krを含んで式(13)及び式(14)のように表すことができる。ここで、rは、図4に示す座標中心(x,y)からm(x,y)までの距離である。なお、式(14)は撮像装置2bについてのものであるため、射影行列P及び係数krにカンマを付して撮像装置2aに関する式(13)と区別している。

Figure 2008298589
However, in the present embodiment, as described above, since the intersection displacement model having the coefficient k 1 r is applied, the projection matrix P n includes the coefficient k 1 r and the expressions (13) and (14) Can be expressed as: Here, r is the distance from the coordinate center (x 0 , y 0 ) shown in FIG. 4 to m (x, y). Since Expression (14) is for the imaging apparatus 2b, a comma is added to the projection matrix P n and the coefficient k 1 r to distinguish it from Expression (13) regarding the imaging apparatus 2a.
Figure 2008298589

本実施形態においては、前述のように、撮像装置2aを基準とするので、基準となる撮像装置2aについては回転及び移動をさせない。このため、撮像装置2aについての回転と移動を表す行列Dは式(15)となる。

Figure 2008298589
In the present embodiment, as described above, since the image pickup apparatus 2a is used as a reference, the reference image pickup apparatus 2a is not rotated and moved. For this reason, the matrix D representing the rotation and movement of the imaging device 2a is expressed by Equation (15).
Figure 2008298589

他方、撮像装置2bの回転と移動を表す行列D(カンマ)は式(16)となる。なお、式(16)中、斜字体rは回転の各成分を表し、斜字体tは併進の各成分を表している。

Figure 2008298589
On the other hand, a matrix D (comma) representing the rotation and movement of the imaging device 2b is expressed by Expression (16). In equation (16), italic font r represents each component of rotation, and italic font t represents each component of translation.
Figure 2008298589

これらの式を用いて、先述の式(5)及び式(6)を変換すると、行列B及びベクトルbを含む式(17)を導くことができる。なお、行列B及びベクトルbは、後述する式(18)及び式(19)に示すように、被写体像の2次元座標m(x、y)と関連付けられたものである。式(17)により、m(x,y)とM(X,Y,Z)とを一意に対応付けることができる。

Figure 2008298589
Using these formulas, the formula (17) including the matrix B and the vector b can be derived by transforming the above formulas (5) and (6). Note that the matrix B and the vector b are associated with the two-dimensional coordinates m (x, y) of the subject image, as shown in equations (18) and (19) described later. Expression (17) allows m (x, y) and M (X, Y, Z) to be uniquely associated.
Figure 2008298589

ここで、式(17)における行列Bは、下記式(18)で表すことができ、ベクトルbは、下記式(19)で表すことができる。
ここで、式(19)における「k」は、前記式(13)及び式(14)と同様、前記交点変位モデルにおける関数f(r)としての係数である。この係数は、画像処理部3によるキャリブレーション処理を通じて決定される。

Figure 2008298589
Here, the matrix B in the equation (17) can be expressed by the following equation (18), and the vector b can be expressed by the following equation (19).
Here, “k 1 ” in the equation (19) is a coefficient as the function f (r) in the intersection displacement model as in the equations (13) and (14). This coefficient is determined through calibration processing by the image processing unit 3.
Figure 2008298589

ここで、斜字体pxxは、行列PDの各要素であり、斜字体pxx(カンマ)は、行列PD(カンマ)の各要素である。対象物Pの3次元座標M(X,Y,Z)は、下記式(20)で表すことができ、式(20)中の行列B及びベクトルbについて、式(18)及び式(19)を用いて展開することにより、対象物Pの3次元座標M(X,Y,Z)を求めることができる。

Figure 2008298589
Here, the italic type pxx is each element of the matrix P n D, and the italic type pxx (comma) is each element of the matrix P n D (comma). The three-dimensional coordinates M (X, Y, Z) of the object P can be expressed by the following equation (20). For the matrix B and the vector b in the equation (20), the equations (18) and (19) The three-dimensional coordinates M (X, Y, Z) of the object P can be obtained by developing using.
Figure 2008298589

なお、式(20)において、行列Bは、(BB)−1で表されるいわゆる擬似逆行列であり、Bの逆行列が求まらない場合でも、ある1つの行列を求めることができ、近似的な解を求めることができる。 In Equation (20), the matrix B + is a so-called pseudo inverse matrix represented by (B T B) −1 B T , and even when the inverse matrix of B cannot be obtained, An approximate solution can be obtained.

以下、図6から図8を参照しつつ、本実施形態における位置検出方法について説明する。   Hereinafter, the position detection method in the present embodiment will be described with reference to FIGS.

図6に示すように、本実施形態では、まず、画像処理部3によってキャリブレーション処理が行われる(ステップS1)。本実施形態では、このキャリブレーション処理の過程において、画像処理部3により係数「k」が算出、決定される。 As shown in FIG. 6, in the present embodiment, first, calibration processing is performed by the image processing unit 3 (step S1). In the present embodiment, the coefficient “k 1 ” is calculated and determined by the image processing unit 3 in the course of the calibration process.

ここで、図7及び図8を参照しつつ、本実施形態におけるキャリブレーション処理について説明する。   Here, the calibration process in the present embodiment will be described with reference to FIGS.

まず、画像処理部3は、キャリブレーション用の対象物の3次元座標(X,Y,Z)を複数点取得する(ステップS11)。次に、画像処理部3は、前記交点変位モデルを適用して、当該対象物の各3次元座標から各座標に対応する理想値(理想座標:x,y)を算出する。具体的には、前記x=((f+f(r))/(Z−f(r)))X,y=((f+f(r))/(Z−f(r)))Yにおいて、係数kとし、x=((f+kr)/(Z−kr))X,y=((f+kr)/(Z−kr))Yを求める(ステップS12)。なお、係数kはこの段階では決定しないので、係数kとして適当な値を入れて理想座標(理想値)を仮決めする。 First, the image processing unit 3 acquires a plurality of three-dimensional coordinates (X, Y, Z) of the calibration object (step S11). Next, the image processing unit 3 applies the intersection displacement model to calculate ideal values (ideal coordinates: x 1 , y 1 ) corresponding to the coordinates from the three-dimensional coordinates of the target object. Specifically, in the above x 1 = ((f + f (r)) / (Zf (r))) X, y 1 = ((f + f (r)) / (Zf (r))) Y , the coefficient k 1, x 1 = (( f + k 1 r) / (Z-k 1 r)) X, y 1 = ((f + k 1 r) / (Z-k 1 r)) determining the Y (step S12 ). Since the coefficient k 1 is not determined at this stage, an ideal value (ideal value) is provisionally determined by entering an appropriate value as the coefficient k 1 .

次に、画像処理部3は、歪曲収差モデルを適用して、ステップS12で仮決めされた各理想値に対応する仮定値(対象物の結像面25上の結像位置に関する歪曲収差を含んだ仮定的な座標)を求める(ステップS13)。具体的には、理想座標に対して、例えばαr+βr+γrといった中心からの距離に応じて変化するような何らかの係数をもつ関数を適用する。なお、係数α、β、γはこの段階では決定しないので、係数α、β、γとして適当な値を入れてこれに対応する仮定値を求める(仮決めする)。 Next, the image processing unit 3 applies a distortion aberration model and includes hypothetical values corresponding to the ideal values provisionally determined in step S12 (including distortion aberration related to the imaging position of the object on the imaging surface 25). (Assumed coordinates) are obtained (step S13). Specifically, a function having a certain coefficient that changes in accordance with the distance from the center, such as αr 2 + βr 4 + γr 6 , is applied to the ideal coordinates. Since the coefficients α, β, and γ are not determined at this stage, appropriate values are input as the coefficients α, β, and γ, and corresponding hypothetical values are obtained (temporarily determined).

そして、各仮定値が求められると、画像処理部3は、この仮定値と実測値(実座標:x,y)とを比較して(ステップS14)、全ての点について実測値と仮定値とが所定の誤差範囲内にあるか否かを判定する(ステップS15)。具体的には、画像処理部3は、実測値と仮定値との差分を算出し、算出された差分が記憶部に記憶されている閾値を超えているか否かを判断し、閾値を超えている場合には実測値と仮定値とが所定の誤差範囲内にないと判定する。なお、実測値(実座標:x,y)は、撮像素子21の結像面25上に実際に結像している画像のx,y座標から得ることができる。 When each hypothetical value is obtained, the image processing unit 3 compares this hypothetical value with the actual measurement values (actual coordinates: x 2 , y 2 ) (step S14), and assumes that all the points are the actual measurement values. It is determined whether or not the value is within a predetermined error range (step S15). Specifically, the image processing unit 3 calculates a difference between the actual measurement value and the assumed value, determines whether the calculated difference exceeds a threshold value stored in the storage unit, and exceeds the threshold value. If it is determined that the measured value and the assumed value are not within the predetermined error range. The actually measured values (actual coordinates: x 2 , y 2 ) can be obtained from the x and y coordinates of the image that is actually imaged on the imaging surface 25 of the image sensor 21.

そして、実測値と仮定値とが所定の誤差範囲内にないと判定した場合(ステップS15;NO)には、画像処理部3は、交点変位モデルにおける係数k、歪曲収差モデルにおける係数α、β、γを変更し(ステップS16)、係数の変更された各モデルで再度ステップ12からステップ15の処理を行い、実測値と仮定値とが所定の誤差範囲内となるまで同様に繰り返す。
なお、このような繰り返し演算においては、係数kも係数α、β、γもある程度同列に扱うことができるので、係数α、β、γと係数kという4つの係数を最適になるように適宜変更しながら演算を繰り返して最適な係数を探索するということが可能である。このような演算を行う手法としては、例えば、DLT(Direct Liner Transform Method)等を用いることができる。本実施形態において、演算を繰り返して最適な係数を探索する処理を係数算出処理とし、そのための工程を係数算出工程とする。
When it is determined that the actual measurement value and the assumed value are not within the predetermined error range (step S15; NO), the image processing unit 3 uses the coefficient k 1 in the intersection displacement model, the coefficient α in the distortion aberration model, β and γ are changed (step S16), and the processing from step 12 to step 15 is performed again for each model whose coefficient has been changed, and the same is repeated until the actually measured value and the assumed value fall within a predetermined error range.
In such an iterative operation, the coefficient k 1 and the coefficients α, β, and γ can be handled in the same row to some extent, so that the four coefficients α, β, γ, and the coefficient k 1 are optimized. It is possible to search for the optimum coefficient by repeating the calculation while appropriately changing. As a method for performing such calculation, for example, DLT (Direct Liner Transform Method) or the like can be used. In the present embodiment, a process for searching for an optimum coefficient by repeating the calculation is referred to as a coefficient calculation process, and a process for this is referred to as a coefficient calculation process.

他方、実測値と仮定値とが所定の誤差範囲内にあると判定した場合(ステップS15;YES)には、画像処理部3は、上記繰り返し演算により探索された最適な関数の係数を補正結果として記憶部に格納する(ステップS17)。なお、補正結果として記憶部に格納するのは関数の係数に限定されない。例えば、関数の係数の他に、実測値(実座標:x,y)と、仮定値又は仮定値に対応する理想値(理想座標:x,y)と、の対応関係を補正結果として記憶部に格納してもよい。 On the other hand, when it is determined that the actually measured value and the assumed value are within the predetermined error range (step S15; YES), the image processing unit 3 corrects the coefficient of the optimum function searched by the above repetitive calculation. Is stored in the storage unit (step S17). Note that storing the correction result in the storage unit is not limited to the coefficient of the function. For example, in addition to the coefficient of the function, the correspondence between the actually measured value (actual coordinates: x 2 , y 2 ) and the ideal value (ideal coordinates: x 1 , y 1 ) corresponding to the assumed value is corrected. As a result, it may be stored in the storage unit.

画像の補正を行う場合には、図8に示すように、撮像装置2によって対象物Pを撮像し、撮像素子21上に投影される対象物Pの実測値(実座標:x,y)を取得する(ステップS21)。そして、画像処理部3は、上記図7のステップS11からステップS16によって得られ、記憶部に記憶されている補正結果を読み出して適用する。これにより、当該実測値(実座標:x,y)に対応する理想値(理想座標:x,y)が算出される。画像処理部3は、算出結果に基づいて対象物Pの各実測値(実座標:x,y)が、これに対応する理想値(理想座標:x,y)に近似するように、画像に対して補正を行い(ステップS22)、一連のキャリブレーション処理を終了する。 When correcting the image, as shown in FIG. 8, the object P is imaged by the imaging device 2 and measured values (actual coordinates: x 2 , y 2) of the object P projected onto the image sensor 21. ) Is acquired (step S21). Then, the image processing unit 3 reads out and applies the correction result obtained in steps S11 to S16 in FIG. 7 and stored in the storage unit. Thereby, ideal values (ideal coordinates: x 1 , y 1 ) corresponding to the actual measurement values (real coordinates: x 2 , y 2 ) are calculated. Based on the calculation result, the image processing unit 3 causes each measured value (actual coordinates: x 2 , y 2 ) of the object P to approximate an ideal value (ideal coordinates: x 1 , y 1 ) corresponding thereto. Then, the image is corrected (step S22), and the series of calibration processing is completed.

なお、従来のピンホールモデルを適用したキャリブレーション処理の場合には、例えば図9に示すように、キャリブレーション用の対象物の3次元座標(X,Y,Z)を複数点取得すると(ステップS31)、対象物Pからの光束が常に光学系22の一点を通過することを前提とするピンホールモデルを適用して、対象物の3次元座標から各座標に対応する理想値(理想座標:x,y)を求める(ステップS32)。なお、理想値(理想座標:x,y)は前記x=f(X/Z),y=f(Y/Z)で表される。
次に、歪曲収差モデルを適用して、ステップS32で求められた各理想値に対応する各仮定値(対象物Pの結像面25上の結像位置に関する歪曲収差を含んだ仮定的な座標)を求める(ステップS33)。仮定値をもとめる具体的手法は本実施形態のものと同様である。
そして、仮定値が求められると、この仮定値と実測値(実座標:x,y)とを比較して(ステップS34)、全ての点について実測値と仮定値とが所定の誤差範囲内にあるか否かを判定する(ステップS35)。判定の結果、実測値と仮定値とが所定の誤差範囲内にない場合(ステップS35;NO)には、歪曲収差モデルにおける係数α、β、γを変更し(ステップS36)、係数の変更された歪曲収差モデルで再度ステップ33からステップ35の処理を行い、実測値と仮定値とが所定の誤差範囲内となるまで同様に繰り返す。
In the case of calibration processing using a conventional pinhole model, for example, as shown in FIG. 9, when a plurality of three-dimensional coordinates (X, Y, Z) of a calibration object are acquired (step S31), applying a pinhole model on the premise that the light beam from the object P always passes through one point of the optical system 22, and ideal values (ideal coordinates: corresponding to each coordinate) from the three-dimensional coordinates of the object. x 1 , y 1 ) is obtained (step S32). The ideal values (ideal coordinates: x 1 , y 1 ) are expressed by the above x 1 = f (X / Z) and y 1 = f (Y / Z).
Next, by applying a distortion aberration model, each hypothetical value corresponding to each ideal value obtained in step S32 (a hypothetical coordinate including distortion aberration relating to the imaging position of the object P on the imaging surface 25). ) Is obtained (step S33). A specific method for obtaining the assumed value is the same as that in the present embodiment.
When the assumed value is obtained, the assumed value is compared with the actually measured value (actual coordinates: x 2 , y 2 ) (step S34), and the actually measured value and the assumed value for all points are within a predetermined error range. It is determined whether it is within (step S35). As a result of the determination, when the actually measured value and the assumed value are not within the predetermined error range (step S35; NO), the coefficients α, β, γ in the distortion aberration model are changed (step S36), and the coefficients are changed. The processing from step 33 to step 35 is performed again with the distortion aberration model, and the same is repeated until the actually measured value and the assumed value fall within a predetermined error range.

他方、実測値と仮定値とが所定の誤差範囲内にあると判定した場合(ステップS35;YES)には、画像処理部3は、上記繰り返し演算により探索された最適な関数の係数を補正結果として記憶部に格納する(ステップS37)。なお、補正結果として記憶部に格納するのは関数の係数に限定されない。例えば、実測値(実座標:x,y)と、仮定値又は仮定値に対応する理想値(理想座標:x,y)と、の対応関係を補正結果として記憶部に格納してもよい。 On the other hand, when it is determined that the actually measured value and the assumed value are within the predetermined error range (step S35; YES), the image processing unit 3 corrects the coefficient of the optimum function searched by the above repetitive calculation. Is stored in the storage unit (step S37). Note that storing the correction result in the storage unit is not limited to the coefficient of the function. For example, the correspondence between the actually measured value (real coordinates: x 2 , y 2 ) and the ideal value (ideal coordinates: x 1 , y 1 ) corresponding to the assumed value or the assumed value is stored in the storage unit as a correction result. May be.

なお、画像の補正を行う場合の処理は、前記図8において説明したものと同様であるので、説明を省略する。   Note that the processing for correcting an image is the same as that described with reference to FIG.

このように、従来のピンホールモデルを適用したキャリブレーション処理の場合には、対象物からの光束が常に光学系22の一点を通過することを前提としているので、対象物の位置等に関わらず理想値は確定されており、歪曲収差モデルにおける係数α、β、γのみを変更してキャリブレーション処理が行われる。
これに対して、本実施形態では、理想値も対象物Pの結像面25上の結像位置又は光学系22に対する対象物の位置に関する位置関連情報に基づいて変化することを前提としており、理想値を算出する交点変位モデルにおける係数kと、仮定値を算出する歪曲収差モデルにおける係数α、β、γとをそれぞれ変更しながらキャリブレーション処理が行われる。
As described above, in the case of the calibration process using the conventional pinhole model, it is assumed that the light beam from the object always passes through one point of the optical system 22, and therefore, regardless of the position of the object or the like. The ideal value is fixed, and only the coefficients α, β, and γ in the distortion aberration model are changed and the calibration process is performed.
On the other hand, in the present embodiment, it is assumed that the ideal value also changes based on the image-related position on the imaging surface 25 of the object P or the position-related information regarding the position of the object with respect to the optical system 22. the coefficient k 1 at the intersection displacement model for calculating the ideal value, coefficients in the distortion model to calculate the assumed value alpha, beta, the calibration process while changing each and γ is performed.

次に、図6に戻り、画像処理部3は、前記式(7)等における内部行列(変換行列)Aを適用することにより、撮像装置2a,2bのカメラ座標を正規化して正規化座標を得る正規化変換処理を行う(ステップS2:正規化工程)。その後、画像処理部3は、式(7)等における射影行列P、回転と移動(併進)を表す行列Dを適用することにより、撮像手段2a,2bのずれ補正処理を行う(ステップS3:ずれ補正工程)。このずれ補正処理において、画像処理部3は、交点変位モデルを適用し、前記キャリブレーション処理において算出された係数kを射影行列Pに組み込んで演算を行う。 Next, returning to FIG. 6, the image processing unit 3 normalizes the camera coordinates of the imaging devices 2 a and 2 b by applying the internal matrix (transformation matrix) A in the equation (7) and the like, thereby obtaining the normalized coordinates. The obtained normalization conversion process is performed (step S2: normalization step). Thereafter, the image processing unit 3 applies the projection matrix P n in Equation (7) and the like, and the matrix D representing rotation and movement (translation), thereby performing a shift correction process of the imaging units 2a and 2b (Step S3: Deviation correction step). In this deviation correcting process, the image processing unit 3 applies the intersection displacement model, performing a calculation incorporating the coefficients k 1 calculated in the calibration process the projection matrix P n.

そして、このように正規化変換処理、ずれ補正処理を行った上で、画像処理部3は、位置検出対象である対象物Pの位置(3次元座標 M(X,Y,Z))を検出する(ステップS4)。本実施形態において、位置検出工程は、ステップS2(正規化工程)及びステップS3(ずれ補正工程)を含むものである。   Then, after performing the normalization conversion process and the deviation correction process in this way, the image processing unit 3 detects the position (three-dimensional coordinates M (X, Y, Z)) of the object P that is the position detection target. (Step S4). In the present embodiment, the position detection process includes step S2 (normalization process) and step S3 (deviation correction process).

以上のように、本実施形態によれば、対象物Pの位置を検出する際に、光学系22に入射する光束と光学系22の光軸との交点が光軸の延在方向に前後する交点変位モデルを適用するので、対象物Pから撮像装置2a,2bまでの距離が分からない場合や、1つの画面の中に距離の異なる対象物Pが複数混在している場合でも1つのモデルで対応でき、対象物Pの位置検出を容易かつ高精度に行うことができる。   As described above, according to the present embodiment, when detecting the position of the object P, the intersection of the light beam incident on the optical system 22 and the optical axis of the optical system 22 moves back and forth in the extending direction of the optical axis. Since the intersection displacement model is applied, even when the distance from the object P to the imaging devices 2a and 2b is not known or when a plurality of objects P having different distances are mixed in one screen, one model is used. The position of the object P can be detected easily and with high accuracy.

また、光学系22を通して得られた対象物Pの結像面25上の結像位置に関する実測値又は光学系22に対する対象物Pの位置に関する位置関連情報に基づいて光学系22に入射する光束と光学系22の光軸との交点が光軸の延在方向に前後する交点変位モデルを適用して理想値(理想座標:x,y)を算出する。このため、対象物Pの位置に応じて光学系22に入射する光束と光学系22の光軸との交点が変化しても、これに対応して正確な理想値(理想座標:x,y)を求めることができる。
そして、このようにして算出された理想値に対応する仮定値(歪曲収差を含んだ値)を算出し、これと実測値とを比較するので、対象物Pから光学系22までの距離が分からない場合や、1つの画面の中に距離の異なる対象物Pが複数混在している場合等でも、距離毎に異なる歪曲収差の補正曲線を用意することなく歪曲収差の変化に容易に対応することができ、対象物Pの距離に関わらず高精度の歪曲収差補正を行うことができる。
Further, a light beam incident on the optical system 22 based on an actual measurement value regarding the imaging position of the object P on the imaging surface 25 obtained through the optical system 22 or position-related information regarding the position of the object P with respect to the optical system 22. An ideal value (ideal coordinates: x 1 , y 1 ) is calculated by applying an intersection displacement model in which the intersection with the optical axis of the optical system 22 is back and forth in the extending direction of the optical axis. For this reason, even if the intersection of the light beam incident on the optical system 22 and the optical axis of the optical system 22 changes according to the position of the object P, the correct ideal value (ideal coordinates: x 1 , y 1 ) can be determined.
Then, an assumed value (a value including distortion) corresponding to the ideal value calculated in this way is calculated, and this is compared with an actual measurement value, so that the distance from the object P to the optical system 22 is known. Even when there is no object P or when there are a plurality of objects P having different distances on one screen, it is possible to easily cope with changes in distortion without preparing a correction curve for different distortion aberrations for each distance. Therefore, it is possible to correct distortion aberration with high accuracy regardless of the distance of the object P.

なお、本実施形態では、理想値(理想座標:x,y)を算出したら、まず歪曲収差モデルの関数を適用して仮定値を取得する場合を例として説明したが、処理の手順はここに例示したものに限定されない。例えば、実測値(実座標:x,y)を複数とり、これに対応する歪曲収差を算出することによって、図10に示すような対象物Pの像高に対応する歪曲収差を表すグラフ(例えば図10における実線)を作成し、これをαr+βr+γr等、中心からの距離に応じて変化するような関数で置き換える(例えば図10における点線)。そして、このα、β、γという係数を繰り返し演算等で求めることによって、実際の歪曲収差に最も適合する係数を選択する手法を用いてもよい。 In the present embodiment, the ideal values (ideal coordinates: x 1 , y 1 ) are calculated, and the assumption value is first obtained by applying the function of the distortion aberration model. However, the processing procedure is as follows. It is not limited to what was illustrated here. For example, a graph representing the distortion aberration corresponding to the image height of the object P as shown in FIG. 10 by taking a plurality of actually measured values (actual coordinates: x 2 , y 2 ) and calculating the distortion aberration corresponding thereto. (For example, a solid line in FIG. 10) is created, and this is replaced with a function such as αr 2 + βr 4 + γr 6 that changes according to the distance from the center (for example, a dotted line in FIG. 10). A method may be used in which coefficients such as α, β, and γ are repeatedly calculated to select a coefficient that best matches the actual distortion aberration.

また、上記図10では、理想値よりも画像の中心(x,y)寄りにずれていく歪曲収差が現れる場合(歪曲収差の値がマイナスの値になる例)であって、その歪曲収差が画像の中心(x,y)から外側(像高が大きくなる方向)に行くに従って次第に大きくなっていく例(外側に行くに従って値が大きくなっていく例)を示しているが、歪曲収差の現れ方は光学系の構成等によって異なり、ここに例示したような変化となるとは限らない。
光学系によっては、画像の中心から外側に行くに従って歪曲収差が次第に大きくなるが、あるところまでいくと歪曲収差が小さくなっていくような変化を示す場合や、画像の中心から外側に行くに従って歪曲収差が次第に小さくなるような変化を示す場合もあり得る。また、画像の中心(x,y)から外側に行くに従って理想値よりも画像の中心(x,y)から離れる方向にずれていく歪曲収差が現れる場合(歪曲収差の値がプラスの値になる例)もあり得る。いずれの場合でも、本実施形態において説明した交点変位モデルを適用することができ、適切なキャリブレーション処理及び位置検出処理を行うことが可能である。
Further, in FIG. 10 above, there is a case where a distortion aberration that shifts closer to the center (x 0 , y 0 ) of the image than the ideal value appears (an example in which the distortion aberration value is a negative value). An example is shown in which the aberration gradually increases from the center (x 0 , y 0 ) of the image to the outside (the direction in which the image height increases) (an example in which the value increases as it goes to the outside). The appearance of distortion varies depending on the configuration of the optical system and the like, and does not always change as illustrated here.
Depending on the optical system, the distortion gradually increases from the center of the image to the outside, but when the distortion reaches a certain point, the distortion becomes small, or the distortion increases from the center of the image to the outside. There may be a case where the change gradually decreases. In addition, when distortion aberration that shifts away from the center (x 0 , y 0 ) from the ideal value as it goes outward from the center (x 0 , y 0 ) of the image appears (the value of distortion aberration is positive) There is also an example in which the value of In any case, the intersection displacement model described in this embodiment can be applied, and appropriate calibration processing and position detection processing can be performed.

また、本実施形態においては、交点変位モデルにおける関数f(r)として、像高r(結像位置x,y)に応じて線形に変化するだけのもの(「kr」)を用いた例を示したが、交点変位モデルにおける関数はこれに限定されない。 Further, in the present embodiment, the function f (r) in the intersection displacement model is a function that changes only linearly according to the image height r (imaging position x, y) (“k 1 r”). Although an example is shown, the function in the intersection displacement model is not limited to this.

例えば、交点変位モデルにおける関数f(r)として、下記のような関数を用いるものでもよい。
x=((f+(kr+k+…))/(Z−(kr+k+…)))X,y=((f+(kr+k+…))/(Z−(kr+k+…)))Y
このような関数を用いた場合には、例えばrが大きくなるのに応じて途中までは次第に値が大きくなるが、あるところから値が小さくなっていく場合や、値が大きくなる場合も少しずつ大きくなるのではなく、rの二乗に比例するように急激に大きくなる場合等、様々なモデルにも対応できる。
For example, the following function may be used as the function f (r) in the intersection displacement model.
x = ((f + (k 1 r + k 1 r 2 +...)) / (Z− (k 1 r + k 1 r 2 +...))) X, y = ((f + (k 1 r + k 1 r 2 +...)) / (Z− (k 1 r + k 1 r 2 +...))) Y
When such a function is used, for example, as r increases, the value gradually increases partway through, but when the value decreases from a certain point or when the value increases, little by little. It is possible to deal with various models such as a case where it does not increase but increases rapidly in proportion to the square of r.

また、例えば、下記のような関数を用いるものでもよい。
x=((f+kθ)/(Z−kθ))X,y=((f+kθ)/(Z−kθ))Y
これは、像高rといったx,y座標ではなく、対象物Pから光学系22に入射する角度θで式を表現したものである。x,y座標と角度θとは相互に対応関係があるため、θが確定すればx,y座標も確定させることができる。
対象物Pから光学系22に入射する光束の角度に対して、一般に理想値(理想の結像位置)は、図11(a)に示すように、ftanθで表すことができる。しかし、例えば、光学系22として180度程度の広角レンズを用いて撮影を行う場合には、図11(b)に示すように、対象物Pからの光束がほぼ180度近い角度で光学系22に入射してくることにより、結像位置はかなり遠いところになってしまうため、結像位置がfθで表されるのが一般的である。このような場合には、結像位置で示したのではモデルとしての現実性が乏しいため、結像位置ではなく角度θで示すことが有効である。角度θで示すと、入射側の角度が180度なら、出射側の角度も180度となるため容易に表すことができる。このため、特に広角レンズを用いた場合等には、角度θに応じて線形に変化していくという、上記の関数モデルが好適に適合する。
For example, the following functions may be used.
x = ((f + k 1 θ) / (Z−k 1 θ)) X, y = ((f + k 1 θ) / (Z−k 1 θ)) Y
This expresses the equation not by the x and y coordinates such as the image height r but by the angle θ incident on the optical system 22 from the object P. Since the x and y coordinates and the angle θ have a corresponding relationship with each other, the x and y coordinates can be determined once θ is determined.
In general, an ideal value (ideal imaging position) with respect to the angle of the light beam incident on the optical system 22 from the object P can be expressed by f tan θ as shown in FIG. However, for example, when photographing is performed using a wide-angle lens of about 180 degrees as the optical system 22, the optical system 22 is at an angle that the light flux from the object P is almost 180 degrees as shown in FIG. Since the image forming position is considerably distant by being incident on, the image forming position is generally represented by fθ. In such a case, since it is not realistic as a model if it is shown at the imaging position, it is effective to show it at the angle θ instead of the imaging position. In terms of the angle θ, if the angle on the incident side is 180 degrees, the angle on the exit side is also 180 degrees, which can be expressed easily. For this reason, especially when a wide-angle lens is used, the above-mentioned function model that changes linearly according to the angle θ is suitably adapted.

さらに、例えば、下記のように対象物Pの位置が分かっているものについては、その位置に応じて変化する関数モデルを用いることも可能である。
x=((f+k(R/Z))/(Z−k(R/Z)))X,y=((f+k(R/Z))/(Z−k(R/Z)))Y
なお、交点変位モデルに適用される関数モデルはここに示したものに限定されるものではなく、適宜変形可能である。
Furthermore, for example, for the case where the position of the object P is known as described below, a function model that changes in accordance with the position can be used.
x = ((f + k 1 (R / Z)) / (Z−k 1 (R / Z))) X, y = ((f + k 1 (R / Z)) / (Z−k 1 (R / Z)) )) Y
The function model applied to the intersection displacement model is not limited to the one shown here, and can be modified as appropriate.

また、本実施形態では、位置検出方法における正規化変換処理、ずれ補正処理及び係数算出処理をすべて画像処理部3で行う場合を例として説明したが、このように1つの機能部ですべての処理を行う場合に限定されず、複数の機能部でそれぞれの処理を行うようにしてもよい。また、位置検出処理の際に適用される係数は、位置検出装置内で算出される場合に限定されず、例えば、外部装置で算出された係数を用いて、位置検出装置の画像処理部が位置検出処理を行ってもよい。   In the present embodiment, the case where the normalization conversion process, the shift correction process, and the coefficient calculation process in the position detection method are all performed by the image processing unit 3 has been described as an example. It is not limited to the case where it performs, You may make it perform each process in a some function part. In addition, the coefficient applied in the position detection process is not limited to the case where the coefficient is calculated in the position detection device. For example, the image processing unit of the position detection device uses the coefficient calculated in the external device. Detection processing may be performed.

また、本実施形態において、キャリブレーション処理を行う際のキャリブレーション用の対象物の画像を撮像装置2a,2bにより取得する場合を例として説明したが、キャリブレーションを行う対象である画像データを外部から入力可能としてもよい。また、位置検出装置を撮像装置とは別体で構成されていてもよい。この場合には、位置検出装置は、外部から取得した画像データに基づいて対象物の位置を検出する位置検出処理を行う。   Further, in the present embodiment, the case where the image of the object for calibration at the time of performing the calibration process is acquired by the imaging devices 2a and 2b has been described as an example. However, the image data to be calibrated is externally acquired. It is good also as input possible from. In addition, the position detection device may be configured separately from the imaging device. In this case, the position detection device performs position detection processing for detecting the position of the object based on image data acquired from the outside.

その他、本発明が上記実施形態に限らず適宜変更可能であるのは勿論である。   In addition, it is needless to say that the present invention is not limited to the above embodiment and can be modified as appropriate.

[第2の実施形態]
次に、図12及び図13を参照しつつ、本発明に係る位置検出装置及び位置検出方法の第2の実施形態について説明する。なお、第2の実施形態における位置検出装置は第1の実施形態と同様の画像処理部(図示せず)を備えており、位置検出方法は、この画像処理部によって実行されるものであり、係数kを取得するキャリブレーション処理の手順のみが第1の実施形態と異なるものであるため、以下においては、特に第1の実施形態と異なる点について説明する。なお、装置構成は第1の実施形態と同様であるため、その説明を省略する。
[Second Embodiment]
Next, a second embodiment of the position detection device and the position detection method according to the present invention will be described with reference to FIGS. The position detection device in the second embodiment includes an image processing unit (not shown) similar to that in the first embodiment, and the position detection method is executed by the image processing unit. Since only the procedure of the calibration process for acquiring the coefficient k 1 is different from that of the first embodiment, the following description will particularly focus on differences from the first embodiment. The apparatus configuration is the same as that of the first embodiment, and a description thereof will be omitted.

本実施形態における位置検出方法では、第1の実施形態と同様に、まず、キャリブレーション処理を行って係数kを算出する。図9を参照しつつ、本実施形態におけるキャリブレーション処理について説明する。 In the position detection method in this embodiment, as in the first embodiment, firstly, it calculates a coefficient k 1 by performing the calibration process. The calibration process in the present embodiment will be described with reference to FIG.

図9に示すように、対象物の距離に応じた歪曲収差(実測値)を予め対象物の距離毎に取得(測定)する(ステップS41)。
図9は、取得された距離ごとの歪曲収差(実測値)をプロットし、グラフに表したものである。そして、その中からある任意の距離(例えば、対象物Pの距離が0.3mである場合)を代表距離として選択する(ステップS42)。そして、この代表距離における歪曲収差(実測値)について、第1の実施形態で示したのと同様の手法により歪曲収差モデル(例えば、αr+βr+γr)の係数(例えば前記関数の場合には、係数α、β、γ)を決定する(ステップS43)。
As shown in FIG. 9, distortion (measured value) corresponding to the distance of the object is acquired (measured) in advance for each distance of the object (step S41).
FIG. 9 is a graph plotting distortion aberrations (actual measurement values) for each acquired distance. Then, an arbitrary distance (for example, when the distance of the object P is 0.3 m) is selected as the representative distance (step S42). For the distortion aberration (actually measured value) at this representative distance, a coefficient (for example, αr 2 + βr 4 + γr 6 ) of a distortion aberration model (for example, αr 2 + βr 4 + γr 6 ) is obtained by the same method as that shown in the first embodiment. Determines the coefficients α, β, γ) (step S43).

次に、代表距離の歪曲収差に対して、第1の実施形態と同様の交点変位モデルを適用して、光学系22に入射する光束と光学系22の光軸との交点が光軸の延在方向に前後することを考慮に入れた場合に距離ごとの歪曲収差(仮定値)がどのようになるかを算出する(ステップS44)。なお、対象物Pの距離の差分を計算することによって、代表距離(例えば、対象物Pの距離が0.3m)の場合の歪曲収差(仮定値)から、対象物Pの距離が0.5mの場合の歪曲収差(仮定値)、0.7mの場合の歪曲収差(仮定値)、0.9mの場合の歪曲収差(仮定値)…をそれぞれ算出することが可能である。
この段階では、交点変位モデルの係数(例えば、第1の実施形態の場合の係数k)は決定できないので、適当な値を係数kと仮決めして演算を行う。
Next, an intersection displacement model similar to that of the first embodiment is applied to the distortion at the representative distance, and the intersection of the light beam incident on the optical system 22 and the optical axis of the optical system 22 is the extension of the optical axis. It is calculated what the distortion aberration (assumed value) for each distance becomes when the back-and-forth movement is taken into consideration (step S44). Note that by calculating the difference in the distance of the object P, the distance of the object P is 0.5 m from the distortion (assumed value) in the case of the representative distance (for example, the distance of the object P is 0.3 m). It is possible to calculate the distortion aberration (assumed value) in the case of 0.7, the distortion aberration (assumed value) in the case of 0.7 m, the distortion aberration (assumed value) in the case of 0.9 m, respectively.
At this stage, since the coefficient of the intersection displacement model (for example, the coefficient k 1 in the first embodiment) cannot be determined, an appropriate value is temporarily determined as the coefficient k 1 and the calculation is performed.

そして、ステップS41において取得した距離ごとの歪曲収差(実測値)と、交点変位モデルを適用して求めた距離ごとの歪曲収差(仮定値)とを比較し(ステップS45)、実測値と仮定値とが所定の誤差範囲内にあるか否かを判定する(ステップS46)。具体的には、実測値と仮定値との差分を算出し、算出された差分が記憶部に記憶されている閾値を超えているか否かを判断し、閾値を超えている場合には実測値と仮定値とが所定の誤差範囲内にないと判定される。   Then, the distortion aberration (measured value) for each distance acquired in step S41 is compared with the distortion aberration (assumed value) for each distance obtained by applying the intersection displacement model (step S45), and the measured value and the assumed value are compared. Are within a predetermined error range (step S46). Specifically, the difference between the actually measured value and the assumed value is calculated, and it is determined whether or not the calculated difference exceeds the threshold value stored in the storage unit. And the assumed value are not within the predetermined error range.

そして、実測値と仮定値とが所定の誤差範囲内にないと判定した場合(ステップS46;NO)には、交点変位モデルにおける係数kを変更し(ステップS47)、係数の変更されたモデルで再度ステップ43からステップ46の処理を行い、実測値と仮定値とが所定の誤差範囲内となるまで同様に繰り返す。本実施形態において、演算を繰り返して最適な係数を探索する処理を係数算出処理とし、そのための工程を係数算出工程とする。 The case where the measured value and the assumed value is determined not within the predetermined error range; (step S46 NO), change the coefficient k 1 at the intersection displacement model (step S47), coefficients of the modified model Then, the processing from step 43 to step 46 is performed again, and the same is repeated until the actually measured value and the assumed value are within the predetermined error range. In the present embodiment, a process for searching for an optimum coefficient by repeating the calculation is referred to as a coefficient calculation process, and a process for the process is referred to as a coefficient calculation process.

他方、実測値と仮定値とが所定の誤差範囲内にあると判定した場合(ステップS46;YES)には、画像処理部は、上記繰り返し演算により探索された最適な関数の係数を補正結果として記憶部に格納する(ステップS48)。なお、補正結果として記憶部に格納するのは関数の係数に限定されない。例えば、実測値(実測上の歪曲収差)と、仮定値(計算上の歪曲収差)との対応関係を補正結果として記憶部に格納してもよい。   On the other hand, when it is determined that the actually measured value and the assumed value are within the predetermined error range (step S46; YES), the image processing unit uses the coefficient of the optimum function searched by the above repetitive calculation as the correction result. Store in the storage unit (step S48). Note that storing the correction result in the storage unit is not limited to the coefficient of the function. For example, the correspondence between the actually measured value (measured distortion aberration) and the assumed value (calculated distortion aberration) may be stored in the storage unit as a correction result.

なお、画像の補正を行う場合の処理は、第1の実施形態の図8において説明したものと同様であるので、説明を省略する。   Note that the processing for correcting an image is the same as that described in FIG. 8 of the first embodiment, and thus the description thereof is omitted.

そして、画像処理部は、キャリブレーション処理において算出された係数kを用いて、対象物の位置を検出する位置検出処理を行う。具体的は、第1の実施形態と同様に、まず、撮像装置のカメラ座標を正規化して正規化座標を得る正規化変換処理を行う(正規化工程)。その後、画像処理部は、係数kを含んだ交点変位モデルを適用して撮像手段のずれ補正処理を行い(ずれ補正工程)、対象物の位置を検出する。 Then, the image processing unit, using the coefficient k 1 calculated in the calibration process, performs the position detecting process for detecting the position of the object. Specifically, as in the first embodiment, first, normalization conversion processing is performed to obtain normalized coordinates by normalizing the camera coordinates of the imaging apparatus (normalization step). Thereafter, the image processing unit performs error correcting process of the image pickup means by applying an intersection displacement model including the coefficients k 1 (deviation correcting step), to detect the position of the object.

以上のように、本実施形態によれば、交点変位モデルを適用することにより距離ごとの仮定値を取得するので、対象物から撮像装置までの距離が分からない場合や、1つの画面の中に距離の異なる対象物が複数混在している場合でも容易に高精度の歪曲収差補正を行うことができる。
また、キャリブレーション処理の過程で得られた交点変位モデルの係数kを用いて撮像手段間のずれ補正処理を行い、対象物の位置を検出するので、従来のピンホールモデルを適用する場合と比べて、より柔軟で精度の高い位置検出を行うことができる。
As described above, according to the present embodiment, the assumed value for each distance is acquired by applying the intersection displacement model, so that the distance from the object to the imaging device is not known or in one screen Even when a plurality of objects having different distances are mixed, highly accurate distortion correction can be easily performed.
Also performs deviation correction processing between the image pickup means using the coefficient k 1 of the intersection displacement model obtained in the course of the calibration process, and detects the position of the object, when applying the conventional pinhole model and Compared to this, it is possible to perform position detection that is more flexible and accurate.

なお、本発明が上記実施の形態に限らず適宜変更可能であるのは第1の実施形態と同様である。   It is to be noted that the present invention is not limited to the above-described embodiment, but can be changed as appropriate as in the first embodiment.

本実施形態で用いられる位置検出装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the position detection apparatus used by this embodiment. 従来のピンホールモデルにおける理想値と実測値を説明する図である。It is a figure explaining the ideal value and measured value in the conventional pinhole model. 交点変位モデルにおける理想値と実測値を説明する図である。It is a figure explaining the ideal value and measured value in an intersection displacement model. 対象物の3次元上の位置と結像面上の位置との関係を説明する図である。It is a figure explaining the relationship between the three-dimensional position of a target object, and the position on an image plane. 2つの撮像装置がある場合の焦点位置から対象物までの距離を説明する図である。It is a figure explaining the distance from a focus position in case there exist two imaging devices to a target object. 第1の実施形態における位置検出処理を示すフローチャートである。It is a flowchart which shows the position detection process in 1st Embodiment. 図1に示すキャリブレーション処理を示すフローチャートである。It is a flowchart which shows the calibration process shown in FIG. 画像を補正する際の処理を示すフローチャートである。It is a flowchart which shows the process at the time of correct | amending an image. 従来のピンホールモデルでのキャリブレーション処理を示すフローチャートである。It is a flowchart which shows the calibration process in the conventional pinhole model. 歪曲収差の関数への置き換えを説明するグラフである。It is a graph explaining substitution to the function of distortion aberration. 図11(a)は、一般の撮影レンズの場合の光束の入射角度と理想値との関係を説明する図である。図11(b)は、広角レンズの場合の光束の入射角度と理想値との関係を説明する図である。FIG. 11A is a diagram for explaining the relationship between the incident angle of a light beam and an ideal value in the case of a general photographing lens. FIG. 11B is a diagram for explaining the relationship between the incident angle of the light beam and the ideal value in the case of the wide-angle lens. 第2の実施形態におけるキャリブレーション処理を示すフローチャートである。It is a flowchart which shows the calibration process in 2nd Embodiment. 歪曲収差の関数への置き換えを説明するグラフである。It is a graph explaining substitution to the function of distortion aberration.

符号の説明Explanation of symbols

1 位置検出装置
2a,2b 撮像装置
21a,21b 撮像素子
22a,22b 光学系
3 画像処理部
25 結像面
P 対象物
DESCRIPTION OF SYMBOLS 1 Position detection apparatus 2a, 2b Image pick-up device 21a, 21b Image pick-up element 22a, 22b Optical system 3 Image processing part 25 Imaging surface P Object

Claims (6)

光学系を備え対象物を撮像する複数の撮像手段により得られた対象物の結像面上の結像位置に関する実測値又は前記光学系に対する対象物の位置に関する位置関連情報に基づいて前記光学系に入射する光束と前記光学系の光軸との交点が前記光軸の延在方向に前後する交点変位モデルを適用して、前記撮像手段によって撮像された前記対象物の位置を検出する位置検出手段を備えていることを特徴とする位置検出装置。   The optical system based on actual measurement values on the imaging position of an object on the imaging plane obtained by a plurality of imaging means provided with an optical system and imaging the object or position related information on the position of the object with respect to the optical system Position detection for detecting the position of the object imaged by the imaging means by applying an intersection displacement model in which the intersection of the light beam incident on the optical system and the optical axis of the optical system is back and forth in the extending direction of the optical axis A position detecting device comprising means. 前記位置検出手段は、カメラ座標を正規化して正規化座標を得る正規化変換処理を行う正規化手段と、前記正規化手段により正規化された後に前記複数の撮像手段のずれ補正処理を行うずれ補正手段と、を有し、
前記ずれ補正手段における前記ずれ補正処理において前記交点変位モデルを適用することを特徴とする請求項1に記載の位置検出装置。
The position detecting unit includes a normalizing unit that performs normalization conversion processing to obtain normalized coordinates by normalizing camera coordinates, and a shift that performs shift correction processing of the plurality of imaging units after being normalized by the normalizing unit. Correction means,
The position detection apparatus according to claim 1, wherein the intersection displacement model is applied in the shift correction processing in the shift correction unit.
前記交点変位モデルにおける係数を算出する係数算出手段をさらに備えていることを特徴とする請求項1又は請求項2に記載の位置検出装置。   The position detection device according to claim 1, further comprising coefficient calculation means for calculating a coefficient in the intersection displacement model. 光学系を備え対象物を撮像する複数の撮像手段により得られた対象物の結像面上の結像位置に関する実測値又は前記光学系に対する対象物の位置に関する位置関連情報に基づいて前記光学系に入射する光束と前記光学系の光軸との交点が前記光軸の延在方向に前後する交点変位モデルを適用して、前記撮像手段により撮像された前記対象物の位置を検出する位置検出工程を有することを特徴とする位置検出方法。   The optical system based on actual measurement values on the imaging position of an object on the imaging plane obtained by a plurality of imaging means provided with an optical system and imaging the object or position related information on the position of the object with respect to the optical system Position detection for detecting the position of the object imaged by the imaging means by applying an intersection displacement model in which the intersection of the light beam incident on the optical system and the optical axis of the optical system is back and forth in the extending direction of the optical axis A position detection method comprising a step. 前記位置検出工程は、カメラ座標を正規化して正規化座標を得る正規化変換処理を行う正規化工程と、前記正規化工程により正規化された後に前記複数の撮像手段のずれ補正処理を行うずれ補正工程と、を含み、前記ずれ補正工程において前記交点変位モデルを適用することを特徴とする請求項4に記載の位置検出方法。   The position detection step includes a normalization step of normalizing a camera coordinate to obtain a normalized coordinate, and a shift for performing a shift correction process of the plurality of imaging units after being normalized by the normalization step The position detection method according to claim 4, further comprising: a correction step, wherein the intersection displacement model is applied in the shift correction step. 前記交点変位モデルにおける係数を算出する係数算出工程をさらに有することを特徴とする請求項4又は請求項5に記載の位置検出方法。   The position detection method according to claim 4, further comprising a coefficient calculation step of calculating a coefficient in the intersection displacement model.
JP2007145122A 2007-05-31 2007-05-31 Device and method for detecting positions Pending JP2008298589A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007145122A JP2008298589A (en) 2007-05-31 2007-05-31 Device and method for detecting positions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007145122A JP2008298589A (en) 2007-05-31 2007-05-31 Device and method for detecting positions

Publications (1)

Publication Number Publication Date
JP2008298589A true JP2008298589A (en) 2008-12-11

Family

ID=40172239

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007145122A Pending JP2008298589A (en) 2007-05-31 2007-05-31 Device and method for detecting positions

Country Status (1)

Country Link
JP (1) JP2008298589A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011058876A1 (en) * 2009-11-13 2011-05-19 富士フイルム株式会社 Distance measuring device, distance measuring method, distance measuring program, distance measuring system, and image capturing device
CN103165492A (en) * 2013-04-03 2013-06-19 北京信息科技大学 Optical microscopic image detection method for TSV (through silicon vias) of wafer
US9658056B2 (en) 2014-04-03 2017-05-23 Canon Kabushiki Kaisha Projection apparatus for measurement system based on exit pupil positions
JP2018017568A (en) * 2016-07-27 2018-02-01 キヤノン株式会社 Distance measurement device, imaging device and distance measurement method
CN111131801A (en) * 2018-11-01 2020-05-08 华勤通讯技术有限公司 Projector correction system and method and projector
JP2021056234A (en) * 2020-12-08 2021-04-08 日立Astemo株式会社 Stereo camera

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011058876A1 (en) * 2009-11-13 2011-05-19 富士フイルム株式会社 Distance measuring device, distance measuring method, distance measuring program, distance measuring system, and image capturing device
CN102597693A (en) * 2009-11-13 2012-07-18 富士胶片株式会社 Distance measuring device, distance measuring method, distance measuring program, distance measuring system, and image capturing device
JP5214811B2 (en) * 2009-11-13 2013-06-19 富士フイルム株式会社 Ranging device, ranging method, ranging program, ranging system and imaging device
US8654195B2 (en) 2009-11-13 2014-02-18 Fujifilm Corporation Distance measuring apparatus, distance measuring method, distance measuring program, distance measuring system, and image pickup apparatus
CN102597693B (en) * 2009-11-13 2015-04-01 富士胶片株式会社 Distance measuring device, distance measuring method, distance measuring program, distance measuring system, and image capturing device
CN103165492A (en) * 2013-04-03 2013-06-19 北京信息科技大学 Optical microscopic image detection method for TSV (through silicon vias) of wafer
CN103165492B (en) * 2013-04-03 2015-11-18 北京信息科技大学 The optical microscopic image detection method of a kind of TSV of wafer
US9658056B2 (en) 2014-04-03 2017-05-23 Canon Kabushiki Kaisha Projection apparatus for measurement system based on exit pupil positions
JP2018017568A (en) * 2016-07-27 2018-02-01 キヤノン株式会社 Distance measurement device, imaging device and distance measurement method
CN111131801A (en) * 2018-11-01 2020-05-08 华勤通讯技术有限公司 Projector correction system and method and projector
JP2021056234A (en) * 2020-12-08 2021-04-08 日立Astemo株式会社 Stereo camera
JP7083014B2 (en) 2020-12-08 2022-06-09 日立Astemo株式会社 Stereo camera

Similar Documents

Publication Publication Date Title
US10958892B2 (en) System and methods for calibration of an array camera
JP5075757B2 (en) Image processing apparatus, image processing program, image processing method, and electronic apparatus
JP6663040B2 (en) Depth information acquisition method and apparatus, and image acquisition device
JP5997645B2 (en) Image processing apparatus and method, and imaging apparatus
JP5074322B2 (en) Image processing apparatus, image processing method, image processing program, and imaging apparatus
US7965325B2 (en) Distortion-corrected image generation unit and distortion-corrected image generation method
WO2018029950A1 (en) Calibration device, calibration method, optical device, imaging device and projection device
US20130124159A1 (en) Methods and Apparatus for Retargeting and Prioritized Interpolation of Lens Profiles
JP2012026841A (en) Stereo distance measuring equipment and stereo distance measuring method
JP6429444B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP4055998B2 (en) Distance detection device, distance detection method, and distance detection program
US20180033121A1 (en) Image processing apparatus, image processing method, and storage medium
WO2014171304A1 (en) Imaging device, imaging device drive method, and imaging device control program
JP2008298589A (en) Device and method for detecting positions
JP2012050013A (en) Imaging apparatus, image processing device, image processing method, and image processing program
JP2012147281A (en) Image processing apparatus
US20190297267A1 (en) Control apparatus, image capturing apparatus, control method, and storage medium
JP6628678B2 (en) Distance measuring device, imaging device, and distance measuring method
JP5446285B2 (en) Image processing apparatus and image processing method
US10339665B2 (en) Positional shift amount calculation apparatus and imaging apparatus
JP6755737B2 (en) Distance measuring device, imaging device, and distance measuring method
JP6680335B2 (en) Stereo camera, vehicle, calculation method and program
JP2008286548A (en) Calibration method
JP2010041416A (en) Image processing unit, image processing method, image processing program, and imaging apparatus
JP2018200268A (en) Image recognition device