JP2007033087A - Calibration device and method - Google Patents
Calibration device and method Download PDFInfo
- Publication number
- JP2007033087A JP2007033087A JP2005213337A JP2005213337A JP2007033087A JP 2007033087 A JP2007033087 A JP 2007033087A JP 2005213337 A JP2005213337 A JP 2005213337A JP 2005213337 A JP2005213337 A JP 2005213337A JP 2007033087 A JP2007033087 A JP 2007033087A
- Authority
- JP
- Japan
- Prior art keywords
- known object
- imaging
- calibration
- evaluation
- camera
- 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
Links
Images
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
- Measurement Of Optical Distance (AREA)
Abstract
Description
本発明は、例えば、距離画像計測(奥行計測)を実現するためにステレオカメラに必要なパラメータを校正するキャリブレーション装置及び方法に関するものである。 The present invention relates to a calibration apparatus and method for calibrating parameters necessary for a stereo camera, for example, to realize distance image measurement (depth measurement).
従来、異なる位置から撮像される画像の視差を利用して立体感のある画像を作り出す技術が知られている。このような画像の視差を利用するステレオビジョンシステムでは、複数のカメラが備えられており、ステレオカメラに必要なカメラ間の位置・姿勢などのパラメータがあらかじめ校正されている。カメラの位置・姿勢などが時間の経過とともに変化してしまう場合が多く、位置・姿勢等が変化する度にパラメータ校正が必要となっている。しかし、技術に精通していない人が、新たにパラメータを生成することは困難であった。 2. Description of the Related Art Conventionally, a technique for creating a stereoscopic image using parallax of images captured from different positions is known. In such a stereo vision system using image parallax, a plurality of cameras are provided, and parameters such as positions and postures between the cameras necessary for the stereo camera are calibrated in advance. In many cases, the position / orientation of the camera changes over time, and parameter calibration is required every time the position / orientation changes. However, it is difficult for a person who is not familiar with the technology to generate a new parameter.
そこで、本件出願人は、既知パターンが描かれた平面を各カメラで空間的な位置拘束のない3以上の視点で撮像した画像を用いて新たにパラメータを算出するキャリブレーション方法を提案している(例えば、特許文献1参照。)。 Therefore, the applicant of the present application has proposed a calibration method for newly calculating parameters using images obtained by capturing a plane on which a known pattern is drawn from each of three or more viewpoints with no spatial position constraint. (For example, refer to Patent Document 1).
上記特許文献1に記載された技術は、平面上の既知パターンを異なる方向から撮像することによりキャリブレーションを行うものであるが、どの方向から撮像すれば正確なキャリブレーションが行われるかを直感的に把握することが非常に困難なため、正確なパラメータを得ることができない虞があった。 The technique described in Patent Document 1 performs calibration by imaging a known pattern on a plane from different directions, but it is intuitive to determine from which direction accurate calibration is performed. Since it is very difficult to grasp, accurate parameters may not be obtained.
本発明は、上記問題点を解消するためになされたものであり、正確なパラメータを容易に得ることができるキャリブレーション装置及び方法を提供することを目的とする。 The present invention has been made to solve the above problems, and an object of the present invention is to provide a calibration apparatus and method capable of easily obtaining accurate parameters.
上述した課題を解決するために、本発明に係るキャリブレーション装置は、既知物体をそれぞれ異なる視点から撮像する撮像手段と、上記撮像手段により撮像された画像を記憶する記憶手段と、上記記憶手段に記憶された画像から推定される上記既知物体の3次元空間内の位置を評価する評価手段と、上記評価手段における評価の高い位置に配置された上記既知物体に基づいて上記撮像手段の特性を示すパラメータを校正する校正手段とを備えることを特徴としている。 In order to solve the above-described problem, a calibration apparatus according to the present invention includes an imaging unit that captures images of known objects from different viewpoints, a storage unit that stores an image captured by the imaging unit, and a storage unit that stores the image captured by the imaging unit. The evaluation means for evaluating the position in the three-dimensional space of the known object estimated from the stored image, and the characteristics of the imaging means based on the known object placed at a high evaluation position in the evaluation means And calibrating means for calibrating the parameters.
また、本発明に係るキャリブレーション方法は、既知物体を撮像手段によりそれぞれ異なる視点から撮像する撮像工程と、上記撮像工程により撮像された画像を記憶手段に記憶する記憶工程と、上記記憶手段に記憶された画像から推定される上記既知物体の3次元空間内の位置を評価する評価工程と、上記評価工程における評価の高い位置に配置された上記既知物体に基づいて上記撮像手段の特性を示すパラメータを校正する校正工程とを有することを特徴としている。 The calibration method according to the present invention includes an imaging step of imaging a known object from different viewpoints by an imaging unit, a storage step of storing an image captured by the imaging step in a storage unit, and a storage in the storage unit An evaluation step for evaluating the position in the three-dimensional space of the known object estimated from the obtained image, and a parameter indicating the characteristics of the imaging means based on the known object arranged at a high evaluation position in the evaluation step And a calibration process for calibrating.
本発明によれば、既知物体をそれぞれ異なる視点から撮像し、既知物体の3次元空間内の位置を推定し、撮像手段の特性を評価することにより、取得すべき既知物体の3次元空間内の位置を知ることができるため、正確なパラメータを容易に得ることができる。 According to the present invention, each known object is imaged from different viewpoints, the position of the known object in the three-dimensional space is estimated, and the characteristics of the imaging means are evaluated. Since the position can be known, accurate parameters can be easily obtained.
以下、本発明の具体的な実施の形態について、図面を参照しながら詳細に説明する。 Hereinafter, specific embodiments of the present invention will be described in detail with reference to the drawings.
先ず、ステレオビジョンシステムにおけるパラメータについて、図1及び図2を参照して説明する。なお、ここでは簡単のため、2つの視点、すなわち2つのカメラのみを用いてステレオ法を行うこととする。ステレオ法は、所定の位置関係を持つ複数の視点(投影中心)から撮像した画像を用いて、撮像画像中の各点と投影中心との距離を、いわゆる「三角測量」の原理により求めることである。 First, parameters in the stereo vision system will be described with reference to FIGS. Here, for simplicity, the stereo method is performed using only two viewpoints, that is, two cameras. The stereo method uses an image captured from a plurality of viewpoints (projection centers) having a predetermined positional relationship, and obtains the distance between each point in the captured image and the projection center based on a so-called “triangulation” principle. is there.
図1は、撮像平面に対する基準カメラBと検出カメラDの配置を模式的に示すものであり、また、図2は、略正方形のパターンを基準カメラBと検出カメラDの各々によって撮像した場合の基準画像と検出画像を模式的に示すものである。2つのカメラのうち一方は基準カメラBとして使用され、正面と正対した位置から対象物を撮像して、基準画像を出力する。また、他方のカメラは検出カメラDとして使用され、斜め方向から対象物を撮像して、検出画像を出力する。 FIG. 1 schematically shows the arrangement of the reference camera B and the detection camera D with respect to the imaging plane, and FIG. 2 shows a case where a substantially square pattern is captured by each of the reference camera B and the detection camera D. A reference image and a detected image are schematically shown. One of the two cameras is used as a reference camera B, which captures an object from a position facing the front and outputs a reference image. The other camera is used as a detection camera D, images a target object from an oblique direction, and outputs a detection image.
図1に示すように、基準カメラBの撮像画像では、撮像対象となる平面上の点Mと基準カメラBの投影中心Cbとを結ぶ直線と基準カメラの投影スクリーンSbとの交点mに点Mが観察される。点Mと基準カメラBの投影中心Cbとを結ぶ直線は、基準カメラBの視線である。また、検出カメラDの撮像画像では、点Mと検出カメラの投影中心Cdとを結ぶ直線と検出カメラDの投影スクリーンSdとの交点m’に点Mが観察される。点Mと検出カメラDの投影中心Cdとを結ぶ直線は、検出カメラDの視線である。ここで、基準カメラBの視線は、検出カメラDの投影スクリーン上では直線として観察される。なお、この直線を、以下「エピポーラ・ライン」と呼ぶ。 As shown in FIG. 1, in the captured image of the reference camera B, the point M is at the intersection m between the straight line connecting the point M on the plane to be imaged and the projection center Cb of the reference camera B and the projection screen Sb of the reference camera. Is observed. The straight line connecting the point M and the projection center Cb of the reference camera B is the line of sight of the reference camera B. In the captured image of the detection camera D, the point M is observed at the intersection m ′ between the straight line connecting the point M and the projection center Cd of the detection camera and the projection screen Sd of the detection camera D. A straight line connecting the point M and the projection center Cd of the detection camera D is the line of sight of the detection camera D. Here, the line of sight of the reference camera B is observed as a straight line on the projection screen of the detection camera D. This straight line is hereinafter referred to as an “epipolar line”.
また、図1及び図2に示す例では、略正方形のパターンに正対する基準カメラBで撮像した撮像画像は正方形となるのに対し、このパターンを斜視する検出カメラDで撮像した画像は、視点からの距離が長い辺が縮小される結果として、台形状として現れる。これは、同じ大きさの物体であっても、カメラの投影中心Cに近づくにつれて大きな像として投影され、逆に、投影中心Cから遠ざかるにつれ小さく投影されるという、中心投影の基本的性質によるものである。 In the example shown in FIGS. 1 and 2, the captured image captured by the reference camera B facing the substantially square pattern is a square, whereas the image captured by the detection camera D that squints this pattern is the viewpoint. As a result of the reduction of the side with the longer distance from, it appears as a trapezoid. This is due to the basic property of central projection, in which even an object of the same size is projected as a large image as it approaches the projection center C of the camera, and conversely, it is projected smaller as it moves away from the projection center C. It is.
上述したように、撮像対象が平面である場合、検出カメラDの撮像画像は、基準カメラBの撮像画像を射影変換した画像である。すなわち、基準カメラBの撮像画像中の点m(xb,yb)と、これに対応する検出カメラDの撮像画像中の点m’(xd,yd)の間には、(1)式が成立する。但し、同式中のFは3行3列の弱校正行列(Fundamental Matrix)、m、m'は同次ベクトルを示す。 As described above, when the imaging target is a plane, the captured image of the detection camera D is an image obtained by projective conversion of the captured image of the reference camera B. That is, the equation (1) is established between the point m (xb, yb) in the captured image of the reference camera B and the corresponding point m ′ (xd, yd) in the captured image of the detection camera D. To do. In the above equation, F is a 3-by-3 weak calibration matrix (Fundamental Matrix), and m and m ′ are homogeneous vectors.
弱校正行列Fは、カメラの内部パラメータ及び外部パラメータ、平面の方程式を暗黙的に含んだ行列であり、また、スケール因子に自由度が残るので、8自由度を有する。なお、金谷健一著の「画像理解」(森北出版,1990)には、基準画像と参照画像間において、射影変換により互いの対応点を求めることができるということが記載されている。 The weak calibration matrix F is a matrix that implicitly includes the internal and external parameters of the camera and the plane equation, and has 8 degrees of freedom because the degree of freedom remains in the scale factor. In addition, Kenichi Kanaya's “Image Understanding” (Morikita Publishing, 1990) describes that corresponding points can be obtained by projective transformation between a base image and a reference image.
基準カメラBの視線は、検出カメラDの投影スクリーン上ではエピポーラ・ラインと呼ばれる直線として現れる(前述及び図1を参照のこと)。基準カメラBの視線上に存在する点Mは、点Mの奥行き、すなわち基準カメラBとの距離の大小に拘らず、基準カメラBの投影スクリーン上では同じ観察点m上に現れる。これに対し、検出カメラDの投影スクリーン上における点Mの観察点m’は、エピポーラ・ライン上で基準カメラBと観察点Mとの距離の大小に応じた位置に現れる。 The line of sight of the reference camera B appears as a straight line called an epipolar line on the projection screen of the detection camera D (see above and FIG. 1). The point M existing on the line of sight of the reference camera B appears on the same observation point m on the projection screen of the reference camera B regardless of the depth of the point M, that is, the distance from the reference camera B. On the other hand, the observation point m ′ of the point M on the projection screen of the detection camera D appears at a position corresponding to the distance between the reference camera B and the observation point M on the epipolar line.
図3は、エピポーラ・ラインと、検出カメラDの投影スクリーン上における観察点m’の様子を図解するものである。この図に示すように、点Mの位置がM1,M2,M3へと変化するに従って、参照画像中の観察点はm'1,m'2,m'3へとシフトする。つまり、エピポーラ・ライン上の位置が観察点Mの奥行きに相当する。 FIG. 3 illustrates the epipolar line and the state of the observation point m ′ on the projection screen of the detection camera D. As shown in this figure, as the position of the point M changes to M1, M2, and M3, the observation point in the reference image shifts to m′1, m′2, and m′3. That is, the position on the epipolar line corresponds to the depth of the observation point M.
以上の幾何光学的性質を利用して、基準カメラBの観察点mに対応する観察点m’をエピポーラ・ライン上で探索することにより、基準カメラBから点Pまでの距離を同定することができる。 The distance from the reference camera B to the point P can be identified by searching the observation point m ′ corresponding to the observation point m of the reference camera B on the epipolar line using the above geometric optical properties. it can.
このように複数画像から物体の3次元空間位置を推定するためには、カメラが持つ撮像光学系が理論と完全に一致する特性を持ち、画像に歪みがないものである必要がある。そのため、実際に得られる画像に対して所定の補正を施さなければならない。例えば、カメラのレンズは一般に歪みパラメータを有し、観察点は理論上の点から変位した位置に結像されるため、カメラ特有のパラメータを算出し、射影変換に際してこのパラメータに従った画像データの補正を行わなければ、正面画像から正確な射影画像を得ることができない。 Thus, in order to estimate the three-dimensional spatial position of an object from a plurality of images, it is necessary that the imaging optical system of the camera has a characteristic that completely matches the theory and that the image has no distortion. Therefore, a predetermined correction must be performed on the actually obtained image. For example, a camera lens generally has a distortion parameter, and an observation point is imaged at a position displaced from a theoretical point. Therefore, a camera-specific parameter is calculated, and image data according to this parameter is calculated in projective transformation. Without correction, an accurate projected image cannot be obtained from the front image.
また、カメラが持つパラメータは、レンズの歪みパラメータの他、カメラの焦点、カメラレンズ等のカメラ特性を表す内部パラメータ、カメラの3次元空間位置を示す外部パラメータに区分される。これらのパラメータを算出することを、一般に、「キャリブレーション」と呼ぶ。 In addition to the lens distortion parameters, the parameters of the camera are classified into internal parameters representing camera characteristics such as camera focus and camera lens, and external parameters representing the three-dimensional spatial position of the camera. The calculation of these parameters is generally called “calibration”.
続いて、本実施の形態におけるキャリブレーション装置について、図4を参照して説明する。キャリブレーション装置10は、ユーザ11により移動される既知物体12を互いに異なる視点から撮像する複数のカメラ131〜13nと、複数のカメラ131〜13nにより撮像された画像を記憶する記憶部14と、記憶部14に記憶された画像から推定した既知物体12の3次元空間内の位置を評価する評価部15と、評価部15の評価結果に応じてユーザ11に対し既知物体12の移動の指示を出力する出力部16と、移動された既知物体12に応じて各カメラ131〜13nの特性を示すパラメータを算出する算出部17とを備えている。
Next, the calibration apparatus in the present embodiment will be described with reference to FIG. The
カメラ131〜13nは、それぞれ異なる位置・姿勢で設置されており、既知物体12を撮像する。各カメラ13は、図5に示すように、光学中心を原点としてX軸、Y軸、Z軸のように設定し評価を行う。また、本実施の形態では、図6に示すような既知物体12を用いてキャリブレーションを行うこととする。また、キャリブレーション装置10は、前回キャリブレーションしたパラメータを持っているものとし、カメラ13の位置・姿勢が経時により少し変化したものとする。
The
記憶部14は、カメラ131〜13nにより撮像された画像のデータを記憶する。また、評価部15により推定された既知物体12の位置情報を記憶する。
The storage unit 14 stores data of images captured by the
評価部15は、記憶部14に記憶された画像データから3次元空間内の既知物体12の位置を推定する。カメラ13の光学中心に全ての光線は、図7に示すように集束し、画面内の既知物体12の像の面積と、光軸方向から見た3次元空間内の既知物体の大きさとは比例することから、カメラ13からの奥行き方向(Z軸方向)の距離は、画面内の既知物体12の像の面積から推定することができる。つまり、既知物体12を遠くの位置Aに置いた場合と、位置Aより近い位置Bに配置した場合とでは、位置Aに配置したときの既知物体12の像の方が位置Bに配置したときの既知物体12の像より小さくなる。
The
また、図8に示すように、既知物体12が位置すると推定した奥行きのX軸Y軸方向に平行な面aを配置し、光学中心から既知物体像を通る直線を引くことにより、その直線と像平面との交点を3次元空間における既知物体12のXY平面上の位置と推定することができる。
Further, as shown in FIG. 8, a plane a parallel to the X-axis and Y-axis direction of the depth at which the
また、評価部15は、推定した既知物体12のXY平面の位置及びZ軸方向の位置を評価する。キャリブレーションは、複数回撮像した3次元空間内の既知物体12の3次元空間内での位置のばらつきによって精度が変化するため、3次元空間内の既知物体12のばらつきを、像平面に対して平行の成分と、像平面に対して奥行き方向の成分とに分けて算出する。つまり、カメラ13間のキャリブレーションの精度を保つためには、既知物体12を配置した位置が各カメラ131〜13nから見てある程度のばらつきを持たなければならない。ある程度のばらつきを持つことにより、誤差の少ないパラメータを得ることができ、精度の高いキャリブレーションを行うことができる。
Further, the
カメラ13の像平面に対して平行の成分に関しての評価値EXYは(2)式により、
The evaluation value E XY regarding the component parallel to the image plane of the
但し、CorrXYは、データのX軸、Y軸の各成分同士の相関値、VXはデータのX軸方向成分の分散、VYはデータのY軸方向成分の分散を示す。 Where Corr XY is the correlation value between the X-axis and Y-axis components of the data, V X is the variance of the X-axis direction component of the data, and V Y is the variance of the Y-axis direction component of the data.
また、像平面に対して奥行き方向の成分に関しての評価値EZは(3)式により表される。 The evaluation value E Z with respect to the depth direction of the component with respect to the image plane is expressed by equation (3).
但し、VZはデータのZ軸(奥行き)方向成分の分散を示す。 However, V Z denotes the variance of the Z-axis data (depth) direction component.
このようにXY軸方向の分散に基づく評価値とZ軸方向の分散に基づく評価値とを分けして計算することにより、キャリブレーション精度を向上させることができる。そして、カメラ毎に算出された評価値EXY、EVが所定の閾値以上であれば、キャリブレーションの精度を保つことができる。この精度の範囲は、ユーザによって任意に設定可能である。但し、評価値は、設定された精度、その精度が要求される3次元空間の範囲及びカメラ内部パラメータに依存し、精度が高い場合やその精度が要求される3次元空間の範囲が大きい場合は、評価値の閾値は高くなる。 Thus, by dividing the evaluation value based on the variance in the XY axis direction and the evaluation value based on the variance in the Z axis direction, the calibration accuracy can be improved. The calculated evaluation value E XY for each camera, E V is equal to or greater than a predetermined threshold value, it is possible to maintain the accuracy of the calibration. This accuracy range can be arbitrarily set by the user. However, the evaluation value depends on the set accuracy, the range of the three-dimensional space where the accuracy is required, and the camera internal parameters, and when the accuracy is high or the range of the three-dimensional space where the accuracy is required is large. The threshold value of the evaluation value becomes high.
また、後述するが、評価部15は、算出された評価値と前回キャリブレーションしたパラメータに基づいて3次元空間内に配置すべき既知物体12の位置を求める。
As will be described later, the
出力部16は、評価部15により求められた既知物体12を配置すべき3次元空間内の位置をユーザ11に指示する。例えば、図9に示すように既知物体12の輪郭を画面に表示し、ユーザ11に既知物体12をその輪郭位置に移動するようにガイドする。この輪郭の位置及び大きさは、評価部15により求められた既知物体12を配置すべき3次元空間内の位置に基づいて算出することができる。
The output unit 16 instructs the
算出部17は、所定位置に移動された既知物体12に基づいてカメラが持つパラメータを算出し、前回のパラメータを校正する。この算出されたパラメータは、記憶部14に記憶されるとともにステレオビジョンシステムにおける、例えば、視差画像生成部(図示せず)などに出力される。
The
このような構成により、ユーザ11は出力部16からの指示に応じて既知物体12を移動させるだけで、ステレオビジョンシステムにおけるカメラ13のキャリブレーションを行うことができる。
With this configuration, the
続いて、キャリブレーション装置10の動作について詳細に説明する。なお、ここでは、記憶部14に前回のパラメータが記憶され、カメラの位置・姿勢が時間経過とともに少しずつ変化しているものとする。すなわち、外部パラメータが若干変わったものとし、カメラ13の焦点、カメラレンズ特性等の内部パラメータは変わっていない。また、基準となる左カメラと右カメラの2つのカメラを備えるステレオビジョンシステムであることとし、カメラの3次元座標系のXY平面は、像平面と平行であることとする。
Next, the operation of the
図10は、キャリブレーション装置10の動作の例を示すフローチャートである。まず、ステップS11において、ステレオビジョンの精度や精度を保つ範囲の初期設定が入力される。すなわち、ステレオビジョンにおいて距離画像を生成するときのエピポーラ拘束に関する精度やその精度を保つ範囲の奥行きが図示しない入力装置により入力される。ここで、精度は、カメラ画像の解像度、画角、カメラ間の距離等に依存するもので、例えば、エピポーラ線と対応点との誤差が数画素以内と設定されるものである。また、精度を保つ範囲は、左右のカメラの撮影範囲が重畳する3次元空間である。
FIG. 10 is a flowchart illustrating an example of the operation of the
ステップS12において、評価部15は、記憶部14から前回ステレオ画像を生成した際のパラメータを読み出す。
In step S <b> 12, the
評価部15は、記憶部14から読み出したパラメータから、ある平面(奥行き)での、左右の画像が共通して写る箇所を求める。すなわち、基準カメラである左カメラの撮像範囲と検出カメラである右カメラの撮像範囲が重畳する範囲を算出する。
The
左カメラの射影変換行列Pleft及び右カメラの射影変換行列Prightは、それぞれ(4)式及び(5)式により求められ、左カメラの像平面の画素位置(mIleft,mJleft)に対応する右カメラの画素位置(mIright,mJright)の関係は、(6)〜(8)式となる。 The left camera projection transformation matrix P left and the right camera projection transformation matrix P right are respectively obtained by the equations (4) and (5) and correspond to the pixel positions (m Ileft , m Jleft ) of the left camera image plane. The relationship between the pixel positions (m Iright , m Jright ) of the right camera is expressed by equations (6) to (8).
ここで、行列Aleft及び行列Arightは、それぞれ左カメラ及び右カメラの内部パラメータである。また、行列[R|t]は外部パラメータであり、R及びtはそれぞれ画像の回転及び並進行列を表す。また、Z3Dは左カメラを基準とした3次元空間内の奥行きを示し、αはスケール因子である。 Here, the matrix A left and the matrix A right are internal parameters of the left camera and the right camera, respectively. The matrix [R | t] is an external parameter, and R and t represent the rotation and parallel progression of the image, respectively. Z 3D indicates the depth in the three-dimensional space with respect to the left camera, and α is a scale factor.
次に、ステップS13において、ステップS11にて入力された精度とその精度を保つ範囲に基づいて、上記(4)〜(8)式により算出した左右カメラの重畳範囲内に既知物体12を配置する位置を算出する。ここで、図11に示すようにステップS11にて設定された精度を保つ範囲の奥行きが、Z0とZ1であることとする(Z0<Z1)。なお、Z0、Z1は、左右カメラの撮影範囲が重畳した範囲内にあって、左右カメラの撮影範囲が重畳する範囲は、Z0、Z1が大きいほど、つまり、カメラに対して奥に行けば行くほど広くなる。また、精度が十分保てない場合は、精度を保つ範囲の奥行きをさらに設定すればよい。
Next, in step S13, based on the accuracy input in step S11 and the range that maintains the accuracy, the known
奥行Z0及び奥行Z1における各平面では、同じ回数、既知物体12を撮像することから、取得する既知物体12の位置の奥行きの平均は(Z0+Z1)/2となる。そのため、評価値はZ0とZ1の間隔で決まる。本例では、Z0を固定して、評価値EZを満たす奥行Z1を(9)式により求める。
Since the known
ここで、ThZは、前回ステレオ画像を生成した際のパラメータによる画素データのばらつき誤差に基づく値である。 Here, Th Z is a value based on the variation error of the pixel data by the parameter when the stereo image was generated last time.
上記(9)式より、評価値を満たす奥行Z1のXY平面毎に既知物体12を配置する位置を求める。すなわち、上記(2)式に基づいて、X軸・Y軸各軸のばらつきが大きく、さらに画素データのX軸とY軸との相関値が小さくなる位置を求め、図12のように評価値EXYが大きくなるように既知物体12の配置位置を求める。さらに、図13に示すように、左右カメラの撮影領域が重畳する領域内で面積が最大の長方形の4頂点に配置することが好ましい。この場合、奥行きに対する既知物体12の大きさを配慮して長方形を配置する。
From the above equation (9), the position at which the known
奥行Z0での既知物体12の情報が得られた後、奥行Z1での既知物体12の配置する位置を求める。ここで、評価値が十分大きい場合は、長方形の大きさが評価値の閾値を満たすようにすればよい。これにより、奥行Z0と同様に既知物体12の配置位置を求めるよりも、長方形が大きくなることがないため、既知物体12を遠くに配置する手間を省くことができる。
After the information of the known
まず、奥行Z0で求めた既知物体12の配置すべき位置のX軸、Y軸方向の分散を求める。次に、計算を簡単にするために、ユーザに配置を指示する奥行Z0での4つの既知物体12の位置の平均(面積最大の長方形の中心)Acを、奥行Z1でガイドする既知物体12の位置の平均と一致するように求める。すなわち、図14に示すように、既知物体12の平均位置Acでの既知物体12のX軸・Y軸方向の分散から奥行Z1における既知物体12の配置位置を求める。そして、Acを中心とし、左右カメラの撮像領域の重畳箇所の範囲内で面積が最大で、各辺がX軸・Y軸に平行となる長方形を求め、長方形の1頂点をAb’とする。AcからAb’に引いたベクトルを単位ベクトルとすると、(10)式となる。
First, X axis position to be placed in a known
長方形は、Acを中心にX軸・Y軸方向に対して対称であるので、Acからみた各頂点のばらつきは同じである。したがって、4頂点のX軸・Y軸方向の分散を考えたとき、ある1頂点と長方形の中心との距離から偏差平方和を求め、それを4倍することで、長方形の各点に既知物体12を配置したときのX軸・Y軸方向の偏差平方和が求まる。つまり、奥行Z1で、長方形に既知物体12を配置したときの評価値は、以下の式となる。
Since the rectangle is symmetrical with respect to the X-axis and Y-axis directions with respect to Ac, the variation of each vertex as seen from Ac is the same. Therefore, when considering the dispersion of the four vertices in the X-axis and Y-axis directions, a deviation sum of squares is obtained from the distance between a certain vertex and the center of the rectangle, and is multiplied by four to obtain a known object at each point of the rectangle The sum of square deviations in the X-axis and Y-axis directions when 12 is arranged is obtained. That is, the evaluation value when the known
ただし、SXX、SYYは、奥行Z0で得られた既知物体12の位置のX軸・Y軸方向のばらつきを示す。なお、既知物体12を配置すべき箇所は長方形の4頂点であるから、相関値は0であることとした。
Here, S XX and S YY indicate variations in the X-axis and Y-axis directions of the position of the known
上記(11)〜(13)式に、評価値の閾値を入力しαを求めると、奥行Z1で必要な既知物体12の範囲が求まる。ただし、αが1以上の場合は、左右カメラの撮影領域の重畳箇所がないため、αの値によって左右カメラの撮影範囲が重畳する範囲内まで奥行Z1広げればよい。なお、このとき、ばらつきが大きくなることから、奥行き方向の評価値は下がることはない。
Above (11) to (13), when obtaining the α type the threshold of evaluation value, obtained in a range of known
ステップS14では、ステップS13にて求めた位置に既知物体12を配置するようにユーザに対しガイドする。例えば、左右カメラの下にディスプレイを置き、図15に示すように左カメラで撮影した映像に、左カメラから見た配置すべき既知物体12の位置を表示する。画面内の位置によって、カメラの像平面のX軸・Y軸方向の位置を指示し、枠の大きさから奥行き(Z軸方向の位置)を指示する。
In step S14, the user is guided to arrange the known
ステップS15では、ガイドした位置に既知物体12が配置されたか否かを判断する。ガイドした位置に既知物体12が配置されるまで、評価部15は、ステップ14のガイドを行う。
In step S15, it is determined whether or not the known
ステップS15において、ガイドした位置に既知物体12が配置された場合、ステップS16に進み、キャリブレーションを開始する。すなわち、所定位置に配置された既知物体12に基づいてパラメータを算出し、前回のパラメータを校正する。キャリブレーションは、例えば、"Three-dimensional Computer Vision (A Geometric Overview)", Oliver Faugeras, The MIT Press (1993)に基づいて行うことができる。
In step S15, when the known
このように、既知物体12の3次元空間内の位置を推定してカメラ13の特性を評価し、その評価結果に応じて既知物体12を配置する位置を算出することにより、ユーザはその位置に既知物体12を配置すれば、正確なパラメータを容易に得ることができる。
Thus, by estimating the position of the known
なお、ステップS14において、ディスプレイを用いたガイドを行うこととしたが、図16に示すように音声によりガイドを行ってもよい。例えば、音声の音域の高低により奥行き方向をガイドし、音声の強弱によりX軸・Y軸方向の位置をガイドするようにしてもよい。つまり、既知物体12が配置すべき奥行き方向の位置Z0よりも遠い場合には低音の音声を出力し、位置Z0よりも近い場合には高音の音声を出力する。また、既知物体12が配置すべきX軸・Y軸方向の位置から遠い場合には音声の出力を小さくし、配置すべきX軸・Y軸方向の位置から近い場合には音声の出力を大きくする。そして、ユーザは、出力された音声の高低と強弱に基づいて既知物体12を配置すべき位置に移動する。
In step S14, guidance using a display is performed. However, guidance may be performed by voice as shown in FIG. For example, the depth direction may be guided by the height of the sound range, and the position in the X axis / Y axis direction may be guided by the strength of the sound. That is, when the known
また、図17に示すように、既知物体12を配置した際の画像内の各位置の評価値を求め、その評価値の高低を表示するようにしてもよい。これにより、ユーザは画像内のどの位置で既知物体12を表示させれば、評価値が上がるかを知ることができる。
Moreover, as shown in FIG. 17, the evaluation value of each position in the image when the known
また、本発明によれば、カメラ13の外部パラメータだけでなく、内部パラメータのキャリブレーションを行うこともできる。例えば、図18に示すような、既知平面18を用いることにより、キャリブレーション装置1は、平面を検出し、既知平面18の4隅の位置関係を求め、既知平面18の3次元空間内での姿勢を推定し、姿勢のばらつきに基づいてカメラ13の特性を評価することができる。この推定した姿勢のばらつきが大きい場合には、キャリブレーションの精度を保つことができる。
Further, according to the present invention, not only external parameters of the
内部パラメータの具体的なガイド方法について図19を参照して説明する。キャリブレーション装置10は、図18に示すような既知平面18を図19に示すように3次元空間に配置した際の、既知平面18と画像内の既知平面像19とのHomographyを求める。これは、「コンピュータビジョン-視覚の幾何学-」(佐藤淳著)に基づいて行うことができる。これによれば、既知平面18と画像内にある既知平面像19とのHomographyHは、式(14)のように展開することができる。
A specific method for guiding internal parameters will be described with reference to FIG. The
但し、式(14)における世界座標系のX軸・Y軸は既知平面18に平行であり、Z軸は既知平面18に垂直であるとする。また、m~は画像内の既知平面像19の画素の位置、M~(Z軸方向の値は常に0のため省略する。そのため3行の同次ベクトルとなっている)は、3次元空間上の既知平面18の位置を示し、Aはカメラ内部パラメータ、r1、r2は式(15)に示す既知平面(世界座標系)18とカメラ13の姿勢を表す回転行列の行ベクトルを示し、tは、カメラ13と既知平面(世界座標系)19との位置関係を示す。式(14)に示すように、前回のキャリブレーションに基づき、Homographyを計算することにより、カメラ13と既知平面18との位置・姿勢の関係を求めることができる。
However, it is assumed that the X-axis and Y-axis of the world coordinate system in Expression (14) are parallel to the known
内部パラメータを求めるためには、姿勢が異なる既知平面を3面以上必要である。逆に、同じ姿勢の既知物体18の撮像データを取得すると、内部パラメータのキャリブレーションは上手くいかない。そのため、精度よいキャリブレーションを行うために、式(14)を用いて既知平面18の姿勢を求め、できるだけ姿勢が変わるようにガイドする。この既知平面18を傾ける程度は、前回のキャリブレーション時に与えたデータから算出する。
In order to obtain the internal parameters, three or more known planes having different postures are required. On the other hand, if the imaging data of the known
キャリブレーション装置10がユーザに対しガイドする場合、例えば、図20のように傾いた既知平面18を画面に出力する。画面内の既知平面18の傾きは式(14)に、姿勢を表すr1、r2と位置tを入力することにより求める。このように傾いた既知平面18を画面に出力し、ユーザが同じ形になるよう既知平面18を傾けることにより、内部パラメータを精度よくキャリブレーションすることができる。
When the
また、上記実施の形態では、キャリブレーションを行う際、既知物体12を配置する位置をユーザに対しガイドすることとしたが、これに限られるものではなく、自由に既知物体12を移動させてキャリブレーションを行うようにしてもよい。
Further, in the above embodiment, when performing calibration, the position where the known
次に、この自由に既知物体12を移動させてキャリブレーションを行う方法について図21に示すフローチャートを参照して説明する。
Next, a method of performing calibration by freely moving the known
ステップS21では、ステップS11と同様に、ステレオビジョンを想定した精度と、奥行き等の精度を保つ範囲との初期設定が入力される。すなわち、ステレオビジョンにおいて距離画像を生成するときのエピポーラ拘束に関する精度と、その精度を保つ範囲とが図示しない入力装置により入力される。 In step S21, as in step S11, an initial setting of an accuracy that assumes stereo vision and a range that maintains accuracy such as depth is input. That is, the accuracy related to epipolar constraint when generating a distance image in stereo vision and the range in which the accuracy is maintained are input by an input device (not shown).
ステップS22において、評価部15は、記憶部14から前回ステレオ画像を生成した際のパラメータを読み出し、評価部15は、記憶部14から読み出したパラメータから、ある平面(奥行き)での、左右の画像が共通して写る箇所を求める。すなわち、基準カメラである左カメラの撮像範囲と検出カメラである右カメラの撮像範囲が重畳する範囲を、上記式(4)〜(8)により算出する。
In step S <b> 22, the
ステップS23では、図示しない入力装置により、既知物体12の位置情報の総数Nが設定される。この位置情報は3次元空間内において推定された既知物体12の位置である。また、総数Nは経験的に設定される任意の数である。
In step S23, the total number N of position information of the known
評価部は、記憶部14から既知物体12の位置情報を取得し(ステップS24)、取得数がステップS23にて設定した総数Nになるまで既知物体12の位置情報を取得する(ステップS25)N個の位置情報を取得すると、評価部15は、ステップS23にて設定したN個の位置情報と、新しく取得したN+1個目の位置情報との各組み合わせについて評価値を比較する。N+1CN=N+1通りのすべて組み合わせにおいて、上記式(2)及び式(3)に基づいて評価値EXY及びEZを算出する。そして、最も評価値が高い組み合わせを新しいN個の位置情報とし、その組み合わせから外れた1個の位置情報は消去し、取捨選択する(ステップS26)。
The evaluation unit acquires the position information of the known
ステップS27では、ステップS26において新しく作成された組み合わせの評価値が、閾値よりも高いか否かを判別する。この閾値は、ステップS23にて設定したN個の位置情報による評価値に基づいて設定される。 In step S27, it is determined whether or not the evaluation value of the combination newly created in step S26 is higher than a threshold value. This threshold is set based on the evaluation value based on the N pieces of position information set in step S23.
ステップS27において、取捨選択により算出された評価値が閾値よりも小さい場合、ステップS24に戻り既知物体12の位置情報を再び取得し、評価値が閾値以上の場合、ステップS28に進みキャリブレーションを開始する。すなわち、新しい組み合わせの位置情報に基づいてパラメータを算出し、前回のパラメータを校正する。
If the evaluation value calculated by selection in step S27 is smaller than the threshold value, the process returns to step S24 to acquire the position information of the known
このように、既知物体の位置情報に基づいてカメラの特性を評価することにより、容易に取得すべきパラメータを得ることができる。 As described above, by evaluating the characteristics of the camera based on the position information of the known object, it is possible to obtain parameters that should be easily acquired.
10 キャリブレーション装置、11 ユーザ、12 既知物体、13 カメラ、14 記憶部、15 評価部、16 出力部、17 算出部、18 既知平面、19 既知平面像
DESCRIPTION OF
Claims (10)
上記撮像手段により撮像された画像を記憶する記憶手段と、
上記記憶手段に記憶された画像から推定される上記既知物体の3次元空間内の位置を評価する評価手段と、
上記評価手段における評価の高い位置に配置された上記既知物体に基づいて上記撮像手段の特性を示すパラメータを校正する校正手段と
を備えることを特徴とするキャリブレーション装置。 Imaging means for imaging known objects from different viewpoints;
Storage means for storing an image captured by the imaging means;
Evaluation means for evaluating the position in the three-dimensional space of the known object estimated from the image stored in the storage means;
A calibration apparatus comprising: calibration means for calibrating a parameter indicating characteristics of the imaging means based on the known object placed at a highly evaluated position in the evaluation means.
上記校正手段は、上記指示手段の指示により配置された上記既知物体に基づいて上記パラメータを校正することを特徴とする請求項1記載のキャリブレーション装置。 Instructing means for instructing to place the known object at a highly evaluated position in the evaluating means,
The calibration apparatus according to claim 1, wherein the calibration unit calibrates the parameter based on the known object arranged according to an instruction from the instruction unit.
上記評価手段は、上記記憶手段に記憶された画像から上記平面を検出し、3次元空間内での平面の姿勢を推定することにより上記撮像手段の特性を評価することを特徴とする請求項1記載のキャリブレーション装置。 The known object has a plane;
The evaluation means detects the plane from an image stored in the storage means, and evaluates the characteristics of the imaging means by estimating the orientation of the plane in a three-dimensional space. The calibration device described.
上記撮像工程により撮像された画像を記憶手段に記憶する記憶工程と、
上記記憶手段に記憶された画像から推定される上記既知物体の3次元空間内の位置を評価する評価工程と、
上記評価工程における評価の高い位置に配置された上記既知物体に基づいて上記撮像手段の特性を示すパラメータを校正する校正工程と
を有することを特徴とするキャリブレーション方法。 An imaging step of imaging a known object from different viewpoints by an imaging means;
A storage step of storing an image captured by the imaging step in a storage unit;
An evaluation step for evaluating the position in the three-dimensional space of the known object estimated from the image stored in the storage means;
A calibration step of calibrating a parameter indicating characteristics of the imaging means based on the known object placed at a highly evaluated position in the evaluation step.
上記校正工程では、上記指示工程の指示により配置された上記既知物体に基づいて上記パラメータを校正することを特徴とする請求項7記載のキャリブレーション方法。 An instruction step for instructing to place the known object at a highly evaluated position in the evaluation step;
8. The calibration method according to claim 7, wherein, in the calibration step, the parameter is calibrated based on the known object arranged according to an instruction in the instruction step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005213337A JP2007033087A (en) | 2005-07-22 | 2005-07-22 | Calibration device and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005213337A JP2007033087A (en) | 2005-07-22 | 2005-07-22 | Calibration device and method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007033087A true JP2007033087A (en) | 2007-02-08 |
Family
ID=37792549
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005213337A Pending JP2007033087A (en) | 2005-07-22 | 2005-07-22 | Calibration device and method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007033087A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010271950A (en) * | 2009-05-21 | 2010-12-02 | Canon Inc | Information processing apparatus and method of calibration process |
KR20130051501A (en) * | 2010-09-09 | 2013-05-20 | 퀄컴 인코포레이티드 | Online reference generation and tracking for multi-user augmented reality |
WO2015182068A1 (en) * | 2014-05-28 | 2015-12-03 | パナソニックIpマネジメント株式会社 | Information presentation device, stereo camera system, and information presentation method |
JP2016061654A (en) * | 2014-09-17 | 2016-04-25 | 株式会社東芝 | Device, method, and program for supporting movement |
CN110084854A (en) * | 2009-12-24 | 2019-08-02 | 康耐视公司 | The system and method measured when operation for camera calibrated error |
CN112106110A (en) * | 2018-04-27 | 2020-12-18 | 上海趋视信息科技有限公司 | System and method for calibrating camera |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004110479A (en) * | 2002-09-19 | 2004-04-08 | Topcon Corp | Picture calibration method, picture calibration processor, and picture calibration processing terminal |
-
2005
- 2005-07-22 JP JP2005213337A patent/JP2007033087A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004110479A (en) * | 2002-09-19 | 2004-04-08 | Topcon Corp | Picture calibration method, picture calibration processor, and picture calibration processing terminal |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010271950A (en) * | 2009-05-21 | 2010-12-02 | Canon Inc | Information processing apparatus and method of calibration process |
CN110084854A (en) * | 2009-12-24 | 2019-08-02 | 康耐视公司 | The system and method measured when operation for camera calibrated error |
CN110084854B (en) * | 2009-12-24 | 2024-05-07 | 康耐视公司 | System and method for runtime determination of camera calibration errors |
KR20130051501A (en) * | 2010-09-09 | 2013-05-20 | 퀄컴 인코포레이티드 | Online reference generation and tracking for multi-user augmented reality |
US9013550B2 (en) | 2010-09-09 | 2015-04-21 | Qualcomm Incorporated | Online reference generation and tracking for multi-user augmented reality |
KR101689923B1 (en) * | 2010-09-09 | 2016-12-26 | 퀄컴 인코포레이티드 | Online reference generation and tracking for multi-user augmented reality |
US9558557B2 (en) | 2010-09-09 | 2017-01-31 | Qualcomm Incorporated | Online reference generation and tracking for multi-user augmented reality |
WO2015182068A1 (en) * | 2014-05-28 | 2015-12-03 | パナソニックIpマネジメント株式会社 | Information presentation device, stereo camera system, and information presentation method |
US10083513B2 (en) | 2014-05-28 | 2018-09-25 | Panasonic Intellectual Property Management Co., Ltd. | Information presentation device, stereo camera system, and information presentation method |
US10809053B2 (en) | 2014-09-17 | 2020-10-20 | Kabushiki Kaisha Toshiba | Movement assisting device, movement assisting method, and computer program product |
JP2016061654A (en) * | 2014-09-17 | 2016-04-25 | 株式会社東芝 | Device, method, and program for supporting movement |
CN112106110A (en) * | 2018-04-27 | 2020-12-18 | 上海趋视信息科技有限公司 | System and method for calibrating camera |
CN112106110B (en) * | 2018-04-27 | 2023-02-10 | 上海趋视信息科技有限公司 | System and method for calibrating camera |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5961945B2 (en) | Image processing apparatus, projector and projector system having the image processing apparatus, image processing method, program thereof, and recording medium recording the program | |
JP2874710B2 (en) | 3D position measuring device | |
CN110809786B (en) | Calibration device, calibration chart, chart pattern generation device, and calibration method | |
US20110249117A1 (en) | Imaging device, distance measuring method, and non-transitory computer-readable recording medium storing a program | |
JP5715735B2 (en) | Three-dimensional measurement method, apparatus and system, and image processing apparatus | |
US20090153669A1 (en) | Method and system for calibrating camera with rectification homography of imaged parallelogram | |
JP2009139246A (en) | Device, method and program for processing image, position detecting device and moving body equipped with this | |
WO2013005265A1 (en) | Three-dimensional coordinate measuring device and three-dimensional coordinate measuring method | |
KR20160116075A (en) | Image processing apparatus having a function for automatically correcting image acquired from the camera and method therefor | |
JP2011182236A (en) | Camera calibration apparatus | |
JP2007278845A (en) | Image processing apparatus and its processing method | |
JP2009017480A (en) | Camera calibration device and program thereof | |
US20210364900A1 (en) | Projection Method of Projection System for Use to Correct Image Distortion on Uneven Surface | |
JP2006329842A (en) | Method and device for aligning three-dimensional shape data | |
JP6969121B2 (en) | Imaging system, image processing device and image processing program | |
JP2007033087A (en) | Calibration device and method | |
JP6990694B2 (en) | Projector, data creation method for mapping, program and projection mapping system | |
JP5487946B2 (en) | Camera image correction method, camera apparatus, and coordinate transformation parameter determination apparatus | |
WO2015159835A1 (en) | Image processing device, image processing method, and program | |
WO2019087253A1 (en) | Stereo camera calibration method | |
JP4680558B2 (en) | Imaging and 3D shape restoration method, and imaging and 3D shape restoration system | |
JP2000205821A (en) | Instrument and method for three-dimensional shape measurement | |
JP5901379B2 (en) | Imaging apparatus calibration method and image composition apparatus | |
JP5925109B2 (en) | Image processing apparatus, control method thereof, and control program | |
JP2011146762A (en) | Solid model generator |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080714 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20101201 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20101207 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20110405 |