JP6791341B2 - Calibration method, calibration equipment, and program - Google Patents

Calibration method, calibration equipment, and program Download PDF

Info

Publication number
JP6791341B2
JP6791341B2 JP2019211643A JP2019211643A JP6791341B2 JP 6791341 B2 JP6791341 B2 JP 6791341B2 JP 2019211643 A JP2019211643 A JP 2019211643A JP 2019211643 A JP2019211643 A JP 2019211643A JP 6791341 B2 JP6791341 B2 JP 6791341B2
Authority
JP
Japan
Prior art keywords
camera
distance
stereo camera
captured image
subject
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.)
Active
Application number
JP2019211643A
Other languages
Japanese (ja)
Other versions
JP2020030221A (en
JP2020030221A5 (en
Inventor
青木 伸
青木  伸
菊池 直樹
直樹 菊池
景洋 長尾
景洋 長尾
潤 岸和田
潤 岸和田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Publication of JP2020030221A publication Critical patent/JP2020030221A/en
Publication of JP2020030221A5 publication Critical patent/JP2020030221A5/en
Application granted granted Critical
Publication of JP6791341B2 publication Critical patent/JP6791341B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Measurement Of Optical Distance (AREA)
  • Studio Devices (AREA)

Description

本発明は校正方法、校正装置、計測用具及びプログラムに関する。 The present invention relates to calibration methods, calibration devices, measuring tools and programs.

被写体までの距離を計測できるステレオカメラが利用されている。例えば自動車に搭載されたステレオカメラ(以下「車載ステレオカメラ」という。)により、車両前方の被写体までの距離を計測して、自動車を制御する技術が実用化されている。例えば車載ステレオカメラが計測した距離は、自動車の衝突防止や車間距離の制御等の目的で、運転者への警告、ブレーキ及びステアリング等の制御に利用されている。 A stereo camera that can measure the distance to the subject is used. For example, a technology for controlling an automobile by measuring the distance to a subject in front of the vehicle with a stereo camera mounted on the automobile (hereinafter referred to as "in-vehicle stereo camera") has been put into practical use. For example, the distance measured by the in-vehicle stereo camera is used for warning the driver, controlling the brake, steering, etc. for the purpose of preventing a vehicle collision and controlling the inter-vehicle distance.

一般に、車載ステレオカメラは自動車のフロントガラス内側に設置することが多い。これは、車載ステレオカメラを車外に設置すると、防水及び防塵などの点でより高い耐久性が必要になるためである。車内に設置されたステレオカメラは、車外の風景をフロントガラス越しに撮影する。一般に、フロントガラスは複雑な曲面形状を有し、またカメラ内のレンズのような光学部品と比べ、形状に歪みを持つ。そのためフロントガラスは、フロントガラス越しに撮影された撮影画像に歪みを生じさせる。また車両にステレオカメラを設置する際の設置位置及び方位によっても、撮影画像の歪みの特性が変化する。撮影画像に含まれるこれらの歪みを校正するためには、ステレオカメラを車両の所定の位置に設置した後、その状態でフロントガラス越しに撮影した撮影画像を利用して、撮影画像の歪みを校正(補正)するための校正パラメータを算出する必要がある。 In general, an in-vehicle stereo camera is often installed inside the windshield of an automobile. This is because when the in-vehicle stereo camera is installed outside the vehicle, higher durability is required in terms of waterproofing and dustproofing. The stereo camera installed inside the car captures the scenery outside the car through the windshield. In general, windshields have a complex curved shape and are distorted in shape as compared to optical components such as lenses in cameras. Therefore, the windshield causes distortion in the captured image taken through the windshield. In addition, the distortion characteristics of the captured image change depending on the installation position and orientation when the stereo camera is installed in the vehicle. In order to calibrate these distortions contained in the captured image, after installing the stereo camera in a predetermined position of the vehicle, the distortion of the captured image is calibrated by using the captured image taken through the windshield in that state. It is necessary to calculate the calibration parameters for (correction).

一般に、撮影画像の歪みを校正するための校正パラメータを算出する方法として、距離を計測するための特定のマークなどが記されているチャートを利用する方法が知られている。この方法では、当該マーク及びステレオカメラの相対位置から理論的に算出される撮影画像上のマーク(被写体)の位置と、当該マークを実際にステレオカメラで撮影した撮影画像上のマークの位置との差分に基づいて撮影画像の歪みを校正するための校正パラメータを算出する。つまり当該差分を解消するための変換を決定する校正パラメータを算出する。 Generally, as a method of calculating calibration parameters for calibrating the distortion of a captured image, a method of using a chart on which a specific mark or the like for measuring a distance is written is known. In this method, the position of the mark (subject) on the captured image theoretically calculated from the relative position of the mark and the stereo camera and the position of the mark on the captured image actually captured by the stereo camera. Calculate the calibration parameters for calibrating the distortion of the captured image based on the difference. That is, the calibration parameters that determine the conversion to eliminate the difference are calculated.

特許文献1には、ステレオカメラを構成する一対のカメラから出力された一対の画像データのそれぞれを、一方の画像データと他方の画像データとの座標のずれに基づく校正パラメータを用いて変換することにより、ステレオカメラの光学的な歪み及び位置的なずれを画像処理によって調整する装置が開示されている。 In Patent Document 1, each of a pair of image data output from a pair of cameras constituting a stereo camera is converted using calibration parameters based on the deviation of the coordinates between one image data and the other image data. Discloses a device that adjusts the optical distortion and positional deviation of a stereo camera by image processing.

しかしながらステレオカメラとチャートとの相対位置に誤差があると、理論的に算出される撮影画像上の被写体の座標に誤差が生じるため、撮影画像の歪みを校正するための校正パラメータにも誤差が生じてしまう。特に車両などの物体に搭載されたステレオカメラとチャートとの相対位置は、誤差が生じやすいという問題があった。 However, if there is an error in the relative position between the stereo camera and the chart, an error will occur in the coordinates of the subject on the captured image, which is theoretically calculated, and therefore an error will also occur in the calibration parameters for calibrating the distortion of the captured image. It ends up. In particular, there is a problem that an error is likely to occur in the relative position between the stereo camera mounted on an object such as a vehicle and the chart.

本発明は、上記に鑑みてなされたものであって、ステレオカメラを校正する高精度な校正パラメータを算出することができる校正方法、校正装置、計測用具及びプログラムを提供することを目的とする。 The present invention has been made in view of the above, and an object of the present invention is to provide a calibration method, a calibration device, a measuring tool, and a program capable of calculating highly accurate calibration parameters for calibrating a stereo camera.

上述した課題を解決し、目的を達成するために、本発明は、ステレオカメラを校正する校正方法であって、前記ステレオカメラの撮影範囲に位置する被写体を含む撮像画像を撮像するステップと、前記被写体から前記被写体と前記ステレオカメラとの間にある中間計測点までの距離と前記中間計測点から前記ステレオカメラまでの距離とを用いて、前記被写体から前記ステレオカメラまでの距離を取得するステップと、前記距離と前記撮像画像とに基づいて、前記ステレオカメラを校正する校正パラメータを決定するステップと、を含む。 In order to solve the above-mentioned problems and achieve the object, the present invention is a calibration method for calibrating a stereo camera, the step of capturing an image including a subject located in the shooting range of the stereo camera, and the above. A step of acquiring the distance from the subject to the stereo camera by using the distance from the subject to the intermediate measurement point between the subject and the stereo camera and the distance from the intermediate measurement point to the stereo camera. , A step of determining calibration parameters for calibrating the stereo camera based on the distance and the captured image .

本発明によれば、ステレオカメラを校正する高精度な校正パラメータを算出することができるという効果を奏する。 According to the present invention, there is an effect that highly accurate calibration parameters for calibrating a stereo camera can be calculated.

図1は第1実施形態の計測用具と、ステレオカメラと、校正装置との関係の例を示す図である。FIG. 1 is a diagram showing an example of the relationship between the measuring tool of the first embodiment, the stereo camera, and the calibration device. 図2は第1実施形態のステレオカメラの構成の例を示す図である。FIG. 2 is a diagram showing an example of the configuration of the stereo camera of the first embodiment. 図3はステレオカメラを使用した距離の計測原理を説明するための図である。FIG. 3 is a diagram for explaining the principle of distance measurement using a stereo camera. 図4は第1実施形態の計測用具の例を示す図である。FIG. 4 is a diagram showing an example of the measuring tool of the first embodiment. 図5は第1実施形態の距離計測装置の例を示す図である。FIG. 5 is a diagram showing an example of the distance measuring device of the first embodiment. 図6は第1実施形態の校正装置の構成の例を示す図である。FIG. 6 is a diagram showing an example of the configuration of the calibration device of the first embodiment. 図7は第1実施形態の被写体座標系の例を示す図である。FIG. 7 is a diagram showing an example of the subject coordinate system of the first embodiment. 図8は第1実施形態の第1カメラの位置を示す3次元座標を決定する方法の例を示す図である。FIG. 8 is a diagram showing an example of a method of determining three-dimensional coordinates indicating the position of the first camera of the first embodiment. 図9は第1実施形態の第1カメラのカメラ座標系の例を示す図である。FIG. 9 is a diagram showing an example of the camera coordinate system of the first camera of the first embodiment. 図10は第1実施形態における校正方法の全体概略フローチャートである。FIG. 10 is an overall schematic flowchart of the calibration method according to the first embodiment. 図11は第1実施形態の校正装置における校正方法の例を示すフローチャートである。FIG. 11 is a flowchart showing an example of a calibration method in the calibration device of the first embodiment. 図12は第1実施形態の校正方法の全体フローの例を示すフローチャートである。FIG. 12 is a flowchart showing an example of the overall flow of the calibration method of the first embodiment. 図13は第1実施形態の変形例の距離計測装置が、中間計測点を使用して第1カメラ(第2カメラ)との距離を計測する場合の例を説明するための図である。FIG. 13 is a diagram for explaining an example in which the distance measuring device of the modified example of the first embodiment measures the distance from the first camera (second camera) using the intermediate measurement point. 図14は第2実施形態の計測用具と、ステレオカメラと、校正装置との関係の例を示す図である。FIG. 14 is a diagram showing an example of the relationship between the measuring tool of the second embodiment, the stereo camera, and the calibration device. 図15Aは第2実施形態の角度計測板の断面を示す断面図である。FIG. 15A is a cross-sectional view showing a cross section of the angle measuring plate of the second embodiment. 図15Bは第2実施形態の角度計測板の正面を示す正面図である。FIG. 15B is a front view showing the front surface of the angle measuring plate of the second embodiment. 図16は第2実施形態の第1部材の正面図である。FIG. 16 is a front view of the first member of the second embodiment. 図17は第1カメラの光学中心の位置から第2部材に開けられた穴106、穴107及び穴108を見た場合を説明するための図である。FIG. 17 is a diagram for explaining a case where the holes 106, 107, and 108 formed in the second member are viewed from the position of the optical center of the first camera. 図18Aは第1カメラの光学中心の位置から穴106を見た場合の穴106の形を示す図である。FIG. 18A is a diagram showing the shape of the hole 106 when the hole 106 is viewed from the position of the optical center of the first camera. 図18Bは第1カメラの光学中心の位置から穴107を見た場合の穴107の形を示す図である。FIG. 18B is a diagram showing the shape of the hole 107 when the hole 107 is viewed from the position of the optical center of the first camera. 図18Cは第1カメラの光学中心の位置から穴108を見た場合の穴108の形を示す図である。FIG. 18C is a diagram showing the shape of the hole 108 when the hole 108 is viewed from the position of the optical center of the first camera. 図19Aは光学ボケを含まない場合の角度計測板の像を示す図である。FIG. 19A is a diagram showing an image of an angle measuring plate when optical blur is not included. 図19Bは光学ボケを含む場合の角度計測板の像を示す図である。FIG. 19B is a diagram showing an image of an angle measuring plate when optical blur is included. 図20は図19Bの輝度の山の裾野の半径の大きさを説明するための図である。FIG. 20 is a diagram for explaining the magnitude of the radius of the foot of the mountain having the brightness of FIG. 19B. 図21は撮像面の輝度ピークの位置と、角度計測板の傾きとの関係を説明するための図である。FIG. 21 is a diagram for explaining the relationship between the position of the luminance peak on the imaging surface and the inclination of the angle measuring plate. 図22は計測用具の位置を示す平面の方程式を決定する方法を説明するための図である。FIG. 22 is a diagram for explaining a method of determining an equation of a plane indicating the position of the measuring tool. 図23は第2実施形態の校正装置の構成の例を示す図である。FIG. 23 is a diagram showing an example of the configuration of the calibration device of the second embodiment. 図24は第2実施形態における校正方法の全体概略フローチャートである。FIG. 24 is an overall schematic flowchart of the calibration method according to the second embodiment. 図25は第2実施形態の校正装置における校正方法の例を示すフローチャートである。FIG. 25 is a flowchart showing an example of a calibration method in the calibration device of the second embodiment. 図26は第3実施形態の角度計測板の断面を示す断面図である。FIG. 26 is a cross-sectional view showing a cross section of the angle measuring plate of the third embodiment. 図27は光の屈折の角度について説明するための図である。FIG. 27 is a diagram for explaining the angle of refraction of light. 図28は第3実施形態の角度計測板から放射される光について説明するための図である。FIG. 28 is a diagram for explaining the light emitted from the angle measuring plate of the third embodiment. 図29は計測用具の傾きと、輝度ピークの位置のずれとの関係を説明するための図である。FIG. 29 is a diagram for explaining the relationship between the inclination of the measuring tool and the deviation of the position of the luminance peak. 図30はモアレ周期と輝度ピークの移動範囲との関係について説明するための図である。FIG. 30 is a diagram for explaining the relationship between the moire period and the moving range of the luminance peak. 図31は隣接する穴の輝度ピークの位置について説明するための図である。FIG. 31 is a diagram for explaining the positions of the luminance peaks of the adjacent holes. 図32は第1乃至第3実施形態のステレオカメラ及び校正装置のハードウェア構成の例を示す図である。FIG. 32 is a diagram showing an example of the hardware configuration of the stereo camera and the calibration device of the first to third embodiments.

以下に添付図面を参照して、校正方法、校正装置、計測用具及びプログラムの実施形態を詳細に説明する。 The calibration method, the calibration device, the measuring tool, and the embodiment of the program will be described in detail with reference to the accompanying drawings.

(第1実施形態)
図1は第1実施形態の計測用具20と、ステレオカメラ10と、校正装置30との関係の例を示す図である。図1は自動車のフロントガラスの内側に取り付けられたステレオカメラ10(車載ステレオカメラ)により撮影された撮影画像を校正する場合の例である。計測用具20はステレオカメラ10の撮影範囲に入るように設置する。例えば計測用具20はステレオカメラ10からおよそ2mの距離に、ほぼ正対するように設置する。計測用具20はステレオカメラ10を校正する校正パラメータを決定するための計測データを取得するために用いられる。計測データは、校正装置30としてのコンピュータに入力され、当該コンピュータにより校正パラメータが決定される。まず校正対象のステレオカメラ10について説明する。
(First Embodiment)
FIG. 1 is a diagram showing an example of the relationship between the measuring tool 20 of the first embodiment, the stereo camera 10, and the calibration device 30. FIG. 1 is an example of calibrating a photographed image taken by a stereo camera 10 (vehicle-mounted stereo camera) mounted inside the windshield of an automobile. The measuring tool 20 is installed so as to be within the shooting range of the stereo camera 10. For example, the measuring tool 20 is installed at a distance of about 2 m from the stereo camera 10 so as to be substantially facing each other. The measuring tool 20 is used to acquire measurement data for determining calibration parameters for calibrating the stereo camera 10. The measurement data is input to a computer as the calibration device 30, and the calibration parameters are determined by the computer. First, the stereo camera 10 to be calibrated will be described.

図2は第1実施形態のステレオカメラ10の構成の例を示す図である。本実施形態のステレオカメラ10は、第1カメラ1、第2カメラ2、記憶部3、外部I/F4、補正部5、及び算出部6を備える。第1カメラ1は被写体を撮影して第1撮影画像を取得する。第2カメラ2は被写体を撮影して第2撮影画像を取得する。第1カメラ1及び第2カメラ2は光軸が平行になるように並列に配置されている。第1カメラ1及び第2カメラ2の撮影タイミングは同期されており、同じ被写体を同時に撮影する。 FIG. 2 is a diagram showing an example of the configuration of the stereo camera 10 of the first embodiment. The stereo camera 10 of the present embodiment includes a first camera 1, a second camera 2, a storage unit 3, an external I / F 4, a correction unit 5, and a calculation unit 6. The first camera 1 captures a subject and acquires a first captured image. The second camera 2 captures a subject and acquires a second captured image. The first camera 1 and the second camera 2 are arranged in parallel so that the optical axes are parallel. The shooting timings of the first camera 1 and the second camera 2 are synchronized, and the same subject is shot at the same time.

記憶部3は第1撮影画像、第2撮影画像、及び校正パラメータを記憶する。校正パラメータは、第1撮影画像及び第2撮影画像の歪みを補正するときに使用されるパラメータである。校正パラメータは本実施形態の校正方法により決定される。外部I/F4は、記憶部3のデータの入出力を行うためのインターフェースである。ステレオカメラ10で使用される校正パラメータは、本実施形態の校正方法により決定され、外部I/F4を使用して記憶部3に記憶される。 The storage unit 3 stores the first captured image, the second captured image, and the calibration parameters. The calibration parameter is a parameter used when correcting the distortion of the first captured image and the second captured image. The calibration parameters are determined by the calibration method of this embodiment. The external I / F4 is an interface for inputting / outputting data of the storage unit 3. The calibration parameters used in the stereo camera 10 are determined by the calibration method of the present embodiment and are stored in the storage unit 3 using the external I / F4.

補正部5は、記憶部3から第1撮影画像、第2撮影画像及び校正パラメータを読み出す。補正部5は校正パラメータに応じた画像補正式により第1撮影画像及び第2撮影画像を補正する。画像補正式は第1撮影画像(第2撮影画像)の座標を変換することにより第1撮影画像(第2撮影画像)を補正する式である。例えば第1撮影画像(第2撮影画像)の座標をアフィン変換により補正する場合には、当該画像補正式は行列により表現できるので、校正パラメータは行列の成分である。また第1撮影画像(第2撮影画像)の座標を非線形な変換により補正する場合には、校正パラメータは当該変換を表す多項式などの係数である。なお補正部5は、第1撮影画像及び第2撮影画像のいずれか一方を補正するようにしてもよい。すなわち画像補正式は、いずれか一方の撮影画像を基準にして、もう一方の撮影画像を補正するための画像補正式でもよい。補正部5は、補正後の第1撮影画像及び補正後の第2撮影画像を算出部6に入力する。 The correction unit 5 reads out the first captured image, the second captured image, and the calibration parameters from the storage unit 3. The correction unit 5 corrects the first captured image and the second captured image by an image correction formula according to the calibration parameter. The image correction formula is a formula for correcting the first captured image (second captured image) by converting the coordinates of the first captured image (second captured image). For example, when the coordinates of the first captured image (second captured image) are corrected by the affine transformation, the image correction formula can be expressed by a matrix, so that the calibration parameter is a component of the matrix. When the coordinates of the first captured image (second captured image) are corrected by a non-linear transformation, the calibration parameter is a coefficient such as a polynomial representing the transformation. The correction unit 5 may correct either the first captured image or the second captured image. That is, the image correction formula may be an image correction formula for correcting the other shot image based on one of the shot images. The correction unit 5 inputs the corrected first captured image and the corrected second captured image to the calculation unit 6.

算出部6は補正後の第1撮影画像及び補正後の第2撮影画像から、被写体毎の視差を算出する。ここで、視差と、視差を用いた距離計測原理について説明する。 The calculation unit 6 calculates the parallax for each subject from the corrected first captured image and the corrected second captured image. Here, parallax and the principle of distance measurement using parallax will be described.

図3はステレオカメラ10を使用した距離の計測原理を説明するための図である。図3の例では、第1カメラ1(焦点距離f、光学中心O、撮像面S)がZ軸を光軸方向として配置されている。また第2カメラ2(焦点距離f、光学中心O、撮像面S)がZ軸を光軸方向として配置されている。第1カメラ1及び第2カメラ2はX軸に対して平行に、距離B(基線長)だけ離れた位置に配置される。以下、図3の座標系を「カメラ座標系」という。また第1カメラ1の光学中心を基準とした座標系を「第1カメラ座標系」という。また第2カメラ2の光学中心を基準とした座標系を「第2カメラ座標系」という。 FIG. 3 is a diagram for explaining the principle of measuring the distance using the stereo camera 10. In the example of FIG. 3, the first camera 1 (focal length f, optical center O 0 , imaging surface S 0 ) is arranged with the Z axis as the optical axis direction. Further, the second camera 2 (focal length f, optical center O 1 , imaging surface S 1 ) is arranged with the Z axis as the optical axis direction. The first camera 1 and the second camera 2 are arranged at positions parallel to the X-axis and separated by a distance B (baseline length). Hereinafter, the coordinate system of FIG. 3 is referred to as a “camera coordinate system”. Further, the coordinate system based on the optical center of the first camera 1 is referred to as the "first camera coordinate system". The coordinate system based on the optical center of the second camera 2 is called the "second camera coordinate system".

第1カメラ1の光学中心Oから光軸方向に距離dだけ離れた位置にある被写体Aは、直線A−Oと撮像面Sの交点であるPに像を結ぶ。一方、第2カメラ2では、同じ被写体Aが、撮像面S上の位置Pに像を結ぶ。 The subject A located at a position separated from the optical center O 0 of the first camera 1 by a distance d in the optical axis direction forms an image at P 0 , which is the intersection of the straight line A O 0 and the imaging surface S 0 . On the other hand, the second camera 2, the same subject A is forms an image at a position P 1 on the imaging surface S 1.

ここで第2カメラ2の光学中心Oを通り、直線A−Oと平行な直線と、撮像面Sとの交点をP’とする。またP’とPの距離をDとする。距離Dは同じ被写体の像を2台のカメラで撮影した画像上での位置のずれ量(視差)を表す。三角形A−O−Oと三角形O−P’−Pとは相似である。そのため、下記式(1)が成り立つ。 Here, the intersection of a straight line passing through the optical center O 1 of the second camera 2 and parallel to the straight line AO 0 and the imaging surface S 1 is defined as P 0 '. Also the distance P 1 and D and P 0 '. The distance D represents the amount of positional deviation (parallax) on the images of the same subject taken by two cameras. The triangle A-O 0 -O 1 and a triangle O 1 -P 0 '-P 1 are similar. Therefore, the following equation (1) holds.

すなわち基線長B、焦点距離f及び視差Dから、被写体Aまでの距離dを求めることができる。なお第1カメラ1及び第2カメラ2が正確に配置されている場合、第1カメラ座標系で算出された距離d(第1カメラ1の光学中心Oと被写体Aとの光軸方向の距離)と、第2カメラ座標系で算出された距離d(第2カメラ2の光学中心Oと被写体Aとの光軸方向の距離)と、は一致する。 That is, the distance d to the subject A can be obtained from the baseline length B, the focal length f, and the parallax D. When the first camera 1 and the second camera 2 are accurately arranged, the distance d calculated in the first camera coordinate system (the distance between the optical center O 0 of the first camera 1 and the subject A in the optical axis direction). ) And the distance d (distance in the optical axis direction between the optical center O 1 of the second camera 2 and the subject A) calculated in the second camera coordinate system.

以上が、ステレオカメラ10による距離計測原理である。被写体Aまでの距離dを正確に求めるには、第1カメラ1及び第2カメラ2が正確に配置されていなければならない。しかしながら第1カメラ1(第2カメラ2)は、X軸、Y軸又はZ軸周りに回転する方向に位置がずれる可能性がある。これにより、第1撮影画像(第2撮影画像)の座標は、およそ上下左右にずれを生じる。更にフロントガラスを介して被写体を撮影する車載ステレオカメラの場合、フロントガラスの影響による第1撮影画像(第2撮影画像)の歪みも生じる。ステレオカメラ10は、2台のカメラの組み付け公差による第1撮影画像(第2撮影画像)のずれ、及びフロントガラスによる第1撮影画像(第2撮影画像)の歪みに起因する視差の誤差を正す校正パラメータを使用して信号処理により第1撮影画像(第2撮影画像)を補正する。 The above is the principle of distance measurement by the stereo camera 10. In order to accurately obtain the distance d to the subject A, the first camera 1 and the second camera 2 must be accurately arranged. However, the first camera 1 (second camera 2) may be displaced in the direction of rotation about the X-axis, Y-axis, or Z-axis. As a result, the coordinates of the first captured image (second captured image) are shifted substantially vertically and horizontally. Further, in the case of an in-vehicle stereo camera that shoots a subject through the windshield, distortion of the first shot image (second shot image) also occurs due to the influence of the windshield. The stereo camera 10 corrects the misalignment error caused by the deviation of the first captured image (second captured image) due to the assembly tolerance of the two cameras and the distortion of the first captured image (second captured image) due to the windshield. The first captured image (second captured image) is corrected by signal processing using the calibration parameters.

図2に戻り、算出部6は、視差を算出するときに基準にした撮影画像(第1撮影画像又は第2撮影画像)の画素の濃度値により画素毎の視差を表した視差画像を生成する。また算出部6は、視差画像及び式(1)を利用して被写体までの距離を算出する。 Returning to FIG. 2, the calculation unit 6 generates a parallax image representing the parallax for each pixel based on the density value of the pixels of the captured image (first captured image or second captured image) used as a reference when calculating the parallax. .. Further, the calculation unit 6 calculates the distance to the subject by using the parallax image and the equation (1).

次に計測用具20について説明する。図4は第1実施形態の計測用具20の例を示す図である。本実施形態の計測用具20は四角形の板状の構造を有する。なお計測用具20の形状及び材質は任意でよい。すなわち計測用具20は校正に用いられるデータを取得するための面を有する任意の部材でよい。計測用具20の表面は5つのマーク21を有する。当該マーク21は視差を算出するための計測用のチャートとして利用される。なおマーク21の形、個数及び位置は、本実施形態の態様に限られず任意でよい。また計測用具20の表面は、第1撮影画像上の点に対応する第2撮影画像上の対応点を検出し易くするための濃淡模様を有する。また四角形の板上の計測用具20の4隅に、それぞれ距離計測装置22a、距離計測装置22b、距離計測装置22c及び距離計測装置22dを備える。以下、距離計測装置22a、距離計測装置22b、距離計測装置22c及び距離計測装置22dを区別しない場合は単に距離計測装置22という。 Next, the measuring tool 20 will be described. FIG. 4 is a diagram showing an example of the measuring tool 20 of the first embodiment. The measuring tool 20 of the present embodiment has a quadrangular plate-like structure. The shape and material of the measuring tool 20 may be arbitrary. That is, the measuring tool 20 may be any member having a surface for acquiring data used for calibration. The surface of the measuring tool 20 has five marks 21. The mark 21 is used as a measurement chart for calculating parallax. The shape, number, and position of the marks 21 are not limited to the aspects of the present embodiment and may be arbitrary. Further, the surface of the measuring tool 20 has a shading pattern for facilitating detection of the corresponding points on the second captured image corresponding to the points on the first captured image. Further, a distance measuring device 22a, a distance measuring device 22b, a distance measuring device 22c, and a distance measuring device 22d are provided at four corners of the measuring tool 20 on the quadrangular plate, respectively. Hereinafter, when the distance measuring device 22a, the distance measuring device 22b, the distance measuring device 22c, and the distance measuring device 22d are not distinguished, they are simply referred to as the distance measuring device 22.

図5は第1実施形態の距離計測装置22の例を示す図である。距離計測装置22は、予め設定された計測点23を中心に上下左右に回転可能な2軸回転保持機構を有する。本実施形態の距離計測装置22はレーザー光24のTOF(Time Of Flight)を利用して距離を計測する。なお距離計測装置22の距離計測方式は任意でよい。例えば距離計測装置22は超音波を利用して距離を計測してもよい。 FIG. 5 is a diagram showing an example of the distance measuring device 22 of the first embodiment. The distance measuring device 22 has a biaxial rotation holding mechanism that can rotate up, down, left, and right around a preset measurement point 23. The distance measuring device 22 of the present embodiment measures the distance by using the TOF (Time Of Flight) of the laser beam 24. The distance measuring method of the distance measuring device 22 may be arbitrary. For example, the distance measuring device 22 may measure the distance using ultrasonic waves.

距離計測装置22は第1カメラ1の光学中心O(図3参照)までの距離を示す距離情報(以下「第1距離情報」という。)と、第2カメラ2の光学中心O(図3参照)までの距離を示す距離情報(以下「第2距離情報」という。)と、を取得する。なお図4において、計測用具20の4隅に距離計測装置22を備える理由は、図5の計測点23同士を互いにできるだけ離すためである。これにより値ができるだけ異なる複数の第1距離情報(第2距離情報)を取得することができ、後述の校正装置30が、第1カメラ1(第2カメラ2)と計測用具20との間の距離(第1カメラ1の光軸方向の距離、又は第2カメラ2の光軸方向の距離)を算出するときの精度を上げることができる。なお距離計測装置22の個数及び位置は、本実施形態の態様に限られず任意でよい。 Distance measurement device 22 optical center O 0 of the first camera 1 (see FIG. 3) the distance indicating the distance to the information (hereinafter referred to as "first distance information.") And, the second camera 2 the optical center O 1 (FIG. The distance information (hereinafter referred to as "second distance information") indicating the distance to (see 3) is acquired. The reason why the distance measuring devices 22 are provided at the four corners of the measuring tool 20 in FIG. 4 is that the measuring points 23 in FIG. 5 are separated from each other as much as possible. As a result, a plurality of first distance information (second distance information) having different values as much as possible can be acquired, and the calibration device 30 described later is placed between the first camera 1 (second camera 2) and the measuring tool 20. It is possible to improve the accuracy when calculating the distance (distance in the optical axis direction of the first camera 1 or distance in the optical axis direction of the second camera 2). The number and position of the distance measuring devices 22 are not limited to the embodiment of the present embodiment and may be arbitrary.

図6は第1実施形態の校正装置30の構成の例を示す図である。本実施形態の校正装置30は、受付部31、第1カメラ位置算出部32、第1カメラ方位算出部33、第2カメラ位置算出部34、第2カメラ方位算出部35、距離算出部36、理想視差算出部37、視差算出部38及び決定部39を備える。校正装置30は情報処理装置(コンピュータ)である。 FIG. 6 is a diagram showing an example of the configuration of the calibration device 30 of the first embodiment. The calibration device 30 of the present embodiment includes a reception unit 31, a first camera position calculation unit 32, a first camera orientation calculation unit 33, a second camera position calculation unit 34, a second camera orientation calculation unit 35, and a distance calculation unit 36. It includes an ideal parallax calculation unit 37, a parallax calculation unit 38, and a determination unit 39. The calibration device 30 is an information processing device (computer).

受付部31は複数(本実施形態では4つ)の第1距離情報と、複数(本実施形態では4つ)の第2距離情報と、計測用具20を被写体として含む第1撮影画像と、計測用具20を被写体として含む第2撮影画像と、被写体座標系における複数(本実施形態では5つ)のマーク21の3次元座標情報と、被写体座標系における距離計測装置22(計測点23)の3次元座標情報と、を受け付ける。受付部31は、例えば校正装置30のユーザーの操作に応じて、複数の第1距離情報と、第1撮影画像と、第2撮影画像と、複数のマーク21の3次元座標情報と、距離計測装置22の3次元座標情報と、を示す入力を受け付ける。ここで被写体座標系について説明する。 The reception unit 31 measures a plurality of (four in the present embodiment) first distance information, a plurality of (four in the present embodiment) second distance information, a first captured image including the measuring tool 20 as a subject, and measurement. The second captured image including the tool 20 as a subject, the three-dimensional coordinate information of a plurality of (five in this embodiment) marks 21 in the subject coordinate system, and the distance measuring device 22 (measurement point 23) 3 in the subject coordinate system. Accepts dimensional coordinate information. The reception unit 31 measures, for example, a plurality of first distance information, a first photographed image, a second photographed image, three-dimensional coordinate information of a plurality of marks 21, and a distance measurement according to the operation of the user of the calibration device 30. It accepts the input indicating the three-dimensional coordinate information of the device 22. Here, the subject coordinate system will be described.

図7は第1実施形態の被写体座標系の例を示す図である。図7の例は、計測用具20の左下の端に3次元座標の原点をとった場合の例である。被写体座標系の距離計測装置22a(計測点23a)、距離計測装置22b(計測点23b)、距離計測装置22c(計測点23c)、及び距離計測装置22d(計測点23d)の位置を示す4つの3次元座標は正確に求めることができる。すなわち被写体座標系における当該4つの3次元座標は既知である。また、同様に、被写体座標系における複数(本実施形態では5つ)のマーク21の3次元座標情報も既知である。 FIG. 7 is a diagram showing an example of the subject coordinate system of the first embodiment. The example of FIG. 7 is an example in which the origin of the three-dimensional coordinates is taken at the lower left end of the measuring tool 20. Four distance measuring devices 22a (measurement point 23a), distance measuring device 22b (measurement point 23b), distance measuring device 22c (measurement point 23c), and distance measuring device 22d (measurement point 23d) indicating the positions of the subject coordinate system. The three-dimensional coordinates can be obtained accurately. That is, the four three-dimensional coordinates in the subject coordinate system are known. Similarly, the three-dimensional coordinate information of a plurality of (five in this embodiment) marks 21 in the subject coordinate system is also known.

図6に戻り、受付部31は被写体座標系における複数(本実施形態では5つ)のマーク21の3次元座標情報を距離算出部36に入力する。受付部31は第1撮影画像と第2撮影画像とを視差算出部38に入力する。 Returning to FIG. 6, the reception unit 31 inputs the three-dimensional coordinate information of a plurality of (five in this embodiment) marks 21 in the subject coordinate system to the distance calculation unit 36. The reception unit 31 inputs the first captured image and the second captured image to the parallax calculation unit 38.

また受付部31は第1距離情報と、被写体座標系における距離計測装置22(計測点23)の3次元座標情報と、を第1カメラ位置算出部32に入力する。また受付部31は第2距離情報と、被写体座標系における距離計測装置22(計測点23)の3次元座標情報と、を第2カメラ位置算出部34に入力する。 Further, the reception unit 31 inputs the first distance information and the three-dimensional coordinate information of the distance measuring device 22 (measurement point 23) in the subject coordinate system to the first camera position calculation unit 32. Further, the reception unit 31 inputs the second distance information and the three-dimensional coordinate information of the distance measuring device 22 (measurement point 23) in the subject coordinate system to the second camera position calculation unit 34.

また受付部31は第1撮影画像と、被写体座標系における距離計測装置22(計測点23)の3次元座標情報とを第1カメラ方位算出部33に入力する。また受付部31は第2撮影画像と、被写体座標系における距離計測装置22(計測点23)の3次元座標情報とを第2カメラ方位算出部35に入力する。 Further, the reception unit 31 inputs the first captured image and the three-dimensional coordinate information of the distance measuring device 22 (measurement point 23) in the subject coordinate system to the first camera orientation calculation unit 33. Further, the reception unit 31 inputs the second captured image and the three-dimensional coordinate information of the distance measuring device 22 (measurement point 23) in the subject coordinate system to the second camera orientation calculation unit 35.

第1カメラ位置算出部32は複数(本実施形態では4つ)の第1距離情報と、被写体座標系における距離計測装置22(計測点23)の3次元座標情報とから、第1カメラ1の光学中心Oの位置を示す3次元座標(以下「第1カメラ座標」という。)を、被写体座標系を使用して算出する。 The first camera position calculation unit 32 uses a plurality of (four in this embodiment) first distance information and three-dimensional coordinate information of the distance measuring device 22 (measurement point 23) in the subject coordinate system to obtain the first camera 1. the three-dimensional coordinates indicating the position of the optical center O 0 (hereinafter referred to as "first camera coordinate".), it is calculated by using the object coordinate system.

図8は第1実施形態の第1カメラ1の位置を示す3次元座標を決定する方法の例を示す図である。d0は距離計測装置22aが取得した第1距離情報を示す。すなわち計測点23aから第1カメラ1までの距離を示す。d1は距離計測装置22bが取得した第1距離情報を示す。すなわち計測点23bから第1カメラ1までの距離を示す。d2は距離計測装置22cが取得した第1距離情報を示す。すなわち計測点23cから第1カメラ1までの距離を示す。 FIG. 8 is a diagram showing an example of a method of determining three-dimensional coordinates indicating the position of the first camera 1 of the first embodiment. d0 indicates the first distance information acquired by the distance measuring device 22a. That is, the distance from the measurement point 23a to the first camera 1 is shown. d1 indicates the first distance information acquired by the distance measuring device 22b. That is, the distance from the measurement point 23b to the first camera 1 is shown. d2 indicates the first distance information acquired by the distance measuring device 22c. That is, the distance from the measurement point 23c to the first camera 1 is shown.

第1カメラ1の位置を示す3次元座標は、被写体座標系を使用して理論的には次のようにして算出することができる。まず計測点23aを中心とし、半径d0の球面を表す点集合25aを求める。次に計測点23bを中心とし、半径d1の球面を表す点集合25bを求める。次に計測点23cを中心とし、半径d2の球面を表す点集合25cを求める。次に点集合25aと点集合25bの両方に含まれる点集合を求める。この点集合は図8のd0&d1である。d0&d1は半径d0の球面を表す点集合と、半径d1の球面を表す点集合と、の交点により表される点集合(円弧)である。次に点集合25bと点集合25cの両方に含まれる点集合を求める。この点集合は図8のd1&d2である。d1&d2は半径d1の球面を表す点集合と、半径d2の球面を表す点集合と、の交点により表される点集合(円弧)である。最後に図8のd0&d1により表される円弧と、d1&d2により表される円弧との交点Cを求めることにより、第1カメラ座標を算出することができる。すなわち理論的には第1距離情報が3つあれば第1カメラ座標を算出することができる。 The three-dimensional coordinates indicating the position of the first camera 1 can theoretically be calculated as follows using the subject coordinate system. First, a point set 25a representing a spherical surface having a radius d0 is obtained with the measurement point 23a as the center. Next, a point set 25b representing a spherical surface having a radius d1 centered on the measurement point 23b is obtained. Next, a point set 25c representing a spherical surface having a radius d2 is obtained with the measurement point 23c as the center. Next, the point set included in both the point set 25a and the point set 25b is obtained. This point set is d0 & d1 in FIG. d0 & d1 is a point set (arc) represented by the intersection of a point set representing a spherical surface having a radius d0 and a point set representing a spherical surface having a radius d1. Next, the point set included in both the point set 25b and the point set 25c is obtained. This set of points is d1 & d2 in FIG. d1 & d2 is a point set (arc) represented by the intersection of a point set representing a sphere having a radius d1 and a point set representing a sphere having a radius d2. Finally, the first camera coordinates can be calculated by finding the intersection C of the arc represented by d0 & d1 in FIG. 8 and the arc represented by d1 & d2. That is, theoretically, the first camera coordinates can be calculated if there are three first distance information.

しかしながら距離計測装置22の計測誤差を考慮すると、より多くの計測点23(本実施形態では4つ)を使用して第1カメラ座標を算出することが望ましい。そのため第1カメラ位置算出部32は、例えば次式(2)による最小二乗近似を行って交点Cを算出することにより第1カメラ座標を算出する。 However, considering the measurement error of the distance measuring device 22, it is desirable to calculate the coordinates of the first camera using more measurement points 23 (four in the present embodiment). Therefore, the first camera position calculation unit 32 calculates the first camera coordinates by, for example, performing the least squares approximation according to the following equation (2) to calculate the intersection C.

ここで、nは計測点23の個数である。piはi番目の計測点23の3次元座標である。diは距離計測装置22により計測されたi番目の計測点23から第1カメラ1までの距離である。 Here, n is the number of measurement points 23. pi is the three-dimensional coordinate of the i-th measurement point 23. di is the distance from the i-th measurement point 23 measured by the distance measuring device 22 to the first camera 1.

図6に戻り、第1カメラ位置算出部32は被写体座標系を使用して算出した第1カメラ座標を第1カメラ方位算出部33に入力する。また第1カメラ位置算出部32は被写体座標系を使用して算出した第1カメラ座標を距離算出部36に入力する。 Returning to FIG. 6, the first camera position calculation unit 32 inputs the first camera coordinates calculated using the subject coordinate system to the first camera orientation calculation unit 33. Further, the first camera position calculation unit 32 inputs the first camera coordinates calculated using the subject coordinate system to the distance calculation unit 36.

第1カメラ方位算出部33は第1撮影画像と、被写体座標系における距離計測装置22(計測点23)の3次元座標情報とを受付部31から受け付ける。また第1カメラ方位算出部33は被写体座標系を使用して算出した第1カメラ座標を第1カメラ位置算出部32から受け付ける。 The first camera orientation calculation unit 33 receives the first captured image and the three-dimensional coordinate information of the distance measuring device 22 (measurement point 23) in the subject coordinate system from the reception unit 31. Further, the first camera orientation calculation unit 33 receives the first camera coordinates calculated using the subject coordinate system from the first camera position calculation unit 32.

第1カメラ方位算出部33はカメラ座標系を使用して、計測点23(23a,23b,23c,23d)の3次元座標と、第1撮影画像上の計測点23(23a,23b,23c,23d)の像の2次元座標と、第1カメラ1の焦点距離と、から第1カメラ1の向き(光軸方向)を算出する。具体的には、まず第1カメラ方位算出部33は、被写体座標系を使用して算出された計測点23の3次元座標を、第1カメラ1の光学中心Oを原点としたカメラ座標系に変換する。すなわち、このカメラ座標系はピンホールカメラモデルにおけるピンホールの位置を原点とした座標である。なお、この時点のカメラ座標系は、まだ第1カメラの向きのずれに起因するカメラ座標系の向きになっていない。次に第1カメラ方位算出部33は当該カメラ座標系を、第1カメラの向きのずれに起因するカメラ座標系の向きに合わせるための3軸回転角r=(α1,β1,γ1)を算出する。 The first camera orientation calculation unit 33 uses the camera coordinate system to obtain the three-dimensional coordinates of the measurement points 23 (23a, 23b, 23c, 23d) and the measurement points 23 (23a, 23b, 23c, 23d) on the first captured image. The orientation (optical axis direction) of the first camera 1 is calculated from the two-dimensional coordinates of the image of 23d) and the focal length of the first camera 1. Specifically, first the first camera orientation calculation unit 33, the camera coordinate system three-dimensional coordinates of the measuring point 23, which is calculated using the subject coordinate system, in which a first optical center O 0 of the camera 1 as the origin Convert to. That is, this camera coordinate system is the coordinates with the position of the pinhole in the pinhole camera model as the origin. The camera coordinate system at this point is not yet in the orientation of the camera coordinate system due to the deviation of the orientation of the first camera. Next, the first camera orientation calculation unit 33 calculates the three-axis rotation angle r = (α1, β1, γ1) for adjusting the camera coordinate system to the orientation of the camera coordinate system due to the deviation of the orientation of the first camera. To do.

図9は第1実施形態の第1カメラ1のカメラ座標系の例を示す図である。計測点23(被写体)の3次元座標を(x,y,z)とし、撮像面40上の2次元座標を(u,v)とし、第1カメラ1の焦点距離をfとする。このとき計測点23の撮像面40上の像41の位置は次式(3)により表すことができる。 FIG. 9 is a diagram showing an example of the camera coordinate system of the first camera 1 of the first embodiment. The three-dimensional coordinates of the measurement point 23 (subject) are (x, y, z), the two-dimensional coordinates on the imaging surface 40 are (u, v), and the focal length of the first camera 1 is f. At this time, the position of the image 41 on the imaging surface 40 of the measurement point 23 can be expressed by the following equation (3).

一般に、カメラの光学中心の位置、当該カメラの焦点距離f、計測点23の3次元座標p=(x,y,z)、及びカメラ方向(3軸回転角r=(α1,β1,γ1))から、式(3)を利用して撮像面40上の2次元座標(u,v)を算出することができる。なおα1はX軸に対する回転角、β1はY軸に対する回転角、γ1はZ軸に対する回転角を示す。 Generally, the position of the optical center of the camera, the focal length f of the camera, the three-dimensional coordinates p = (x, y, z) of the measurement point 23, and the camera direction (three-axis rotation angle r = (α1, β1, γ1)). ), The two-dimensional coordinates (u, v) on the imaging surface 40 can be calculated using the equation (3). Α1 indicates the rotation angle with respect to the X axis, β1 indicates the rotation angle with respect to the Y axis, and γ1 indicates the rotation angle with respect to the Z axis.

逆に、カメラの光学中心の位置、当該カメラの焦点距離f、計測点23の3次元座標p=(x,y,z)、及び撮像面40上の2次元座標(u,v)から、式(3)を利用してカメラ方向(3軸回転角r=(α1,β1,γ1))を特定することができる。 On the contrary, from the position of the optical center of the camera, the focal length f of the camera, the three-dimensional coordinates p = (x, y, z) of the measurement point 23, and the two-dimensional coordinates (u, v) on the imaging surface 40, The camera direction (three-axis rotation angle r = (α1, β1, γ1)) can be specified by using the equation (3).

式(3)の関係を利用して、3軸回転角r=(α1、β1、γ1)、及び計測点23の3次元座標p=(x,y,z)から、撮像面40上の2次元座標(u,v)を算出する関数をFとする((u,v)=F(r、p))。 Using the relationship of equation (3), from the three-axis rotation angle r = (α1, β1, γ1) and the three-dimensional coordinates p = (x, y, z) of the measurement point 23, 2 on the imaging surface 40 Let F be the function that calculates the dimensional coordinates (u, v) ((u, v) = F (r, p)).

第1カメラ方位算出部33は次式(4)による最小二乗近似を行うことにより3軸回転角r=(α1、β1、γ1)を算出する。 The first camera orientation calculation unit 33 calculates the three-axis rotation angle r = (α1, β1, γ1) by performing the least squares approximation according to the following equation (4).

ここで、nは計測点23の個数である。piはi番目の計測点23の3次元座標である。(ui,vi)はi番目の計測点23に対応する撮像面40上の2次元座標である。 Here, n is the number of measurement points 23. pi is the three-dimensional coordinate of the i-th measurement point 23. (Ui, vi) are two-dimensional coordinates on the imaging surface 40 corresponding to the i-th measurement point 23.

なおカメラ方向(3軸回転角r)は3変数なので、束縛条件としては撮像面40上の2点の2次元座標があれば式(3)からカメラ方向を決定することができる。第1カメラ方位算出部33が、式(4)によって3軸回転角r=(α1,β1,γ1)を算出する理由は、第1撮影画像がフロントガラス越しに撮影されているためである。すなわち第1撮影画像はフロントガラスに起因する歪みを含んでいるため、多数の計測点23を用いて、式(4)により最小二乗近似して3軸回転角r=(α1,β1,γ1)を算出することが望ましい。 Since the camera direction (three-axis rotation angle r) is three variables, the camera direction can be determined from the equation (3) if there are two-dimensional coordinates of two points on the imaging surface 40 as a binding condition. The reason why the first camera orientation calculation unit 33 calculates the three-axis rotation angle r = (α1, β1, γ1) by the equation (4) is that the first captured image is captured through the front glass. That is, since the first captured image contains distortion due to the windshield, the triaxial rotation angle r = (α1, β1, γ1) is approximated to the least squares by the equation (4) using a large number of measurement points 23. It is desirable to calculate.

なお(u,v)により歪みが異なる場合、例えば画面中央に比べ画像周辺部の歪みが大きいことが予め想定されていれば、それに応じて、計測点23が第1撮影画像の中央部に映るように計測点の位置を配置してもよい。また式(4)において、計測点23に応じて加重をかけたりしてもよい。 If the distortion differs depending on (u, v), for example, if it is assumed in advance that the distortion in the peripheral portion of the image is larger than that in the center of the screen, the measurement point 23 is reflected in the central portion of the first captured image accordingly. The position of the measurement point may be arranged as follows. Further, in the equation (4), a weight may be applied according to the measurement point 23.

また計測点23として距離計測装置22の計測点23を利用したが、被写体座標系において既知の座標であれば任意の計測点23を利用してもよい。例えば計測用具20上の計測に適した任意の計測点23や、計測用具20上にない計測に適した任意の計測点23を利用してもよい。 Further, although the measurement point 23 of the distance measuring device 22 is used as the measurement point 23, any measurement point 23 may be used as long as the coordinates are known in the subject coordinate system. For example, an arbitrary measurement point 23 suitable for measurement on the measuring tool 20 or an arbitrary measurement point 23 suitable for measurement not on the measuring tool 20 may be used.

図6に戻り、第1カメラ方位算出部33は、上述の式(4)により算出した第1カメラ1の向き(3軸回転角r=(α1,β1,γ1))を距離算出部36に入力する。 Returning to FIG. 6, the first camera orientation calculation unit 33 transfers the direction (3-axis rotation angle r = (α1, β1, γ1)) of the first camera 1 calculated by the above equation (4) to the distance calculation unit 36. input.

第2カメラ位置算出部34は複数(本実施形態では4つ)の第2距離情報から、第2カメラ2の光学中心Oの位置を示す3次元座標(以下「第2カメラ座標」という。)を、被写体座標系を使用して算出する。第2カメラ座標の算出方法は第1カメラ座標の算出方法と同じであるため詳細な説明を省略する。第2カメラ位置算出部34は被写体座標系を使用して算出した第2カメラ座標を第2カメラ方位算出部35に入力する。また第2カメラ位置算出部34は被写体座標系を使用して算出した第2カメラ座標を視差算出部38に入力する。 The second camera position calculating unit 34 from the second distance information of a plurality (four in this embodiment), that three-dimensional coordinates indicating the position of the optical center O 1 of the second camera 2 (hereinafter "second camera coordinates". ) Is calculated using the subject coordinate system. Since the method of calculating the second camera coordinates is the same as the method of calculating the first camera coordinates, detailed description thereof will be omitted. The second camera position calculation unit 34 inputs the second camera coordinates calculated using the subject coordinate system to the second camera orientation calculation unit 35. Further, the second camera position calculation unit 34 inputs the second camera coordinates calculated using the subject coordinate system to the parallax calculation unit 38.

第2カメラ方位算出部35は第2撮影画像と、被写体座標系における距離計測装置22(計測点23)の3次元座標情報とを受付部31から受け付ける。また第2カメラ方位算出部35は被写体座標系を使用して算出した第2カメラ座標を第2カメラ位置算出部34から受け付ける。 The second camera orientation calculation unit 35 receives the second captured image and the three-dimensional coordinate information of the distance measuring device 22 (measurement point 23) in the subject coordinate system from the reception unit 31. Further, the second camera orientation calculation unit 35 receives the second camera coordinates calculated using the subject coordinate system from the second camera position calculation unit 34.

第2カメラ方位算出部35はカメラ座標系を使用して、計測点23(23a,23b,23c,23d)の3次元座標と、第2撮影画像上の計測点23(23a,23b,23c,23d)の像の2次元座標と、第2カメラ2の焦点距離と、から第2カメラ2の向き(光軸方向)を算出する。第2カメラ2の向きの算出方法は第1カメラ1の向きの算出方法と同じであるため詳細な説明を省略する。第2カメラ方位算出部35は第2カメラ2の向き(3軸回転角r=(α2,β2,γ2))を距離算出部36に入力する。 The second camera orientation calculation unit 35 uses the camera coordinate system to obtain the three-dimensional coordinates of the measurement points 23 (23a, 23b, 23c, 23d) and the measurement points 23 (23a, 23b, 23c, 23d) on the second captured image. The orientation (optical axis direction) of the second camera 2 is calculated from the two-dimensional coordinates of the image of 23d) and the focal length of the second camera 2. Since the method of calculating the orientation of the second camera 2 is the same as the method of calculating the orientation of the first camera 1, detailed description thereof will be omitted. The second camera orientation calculation unit 35 inputs the direction of the second camera 2 (three-axis rotation angle r = (α2, β2, γ2)) to the distance calculation unit 36.

距離算出部36は、被写体座標系における複数のマーク21の3次元座標情報を受付部31から受け付ける。また距離算出部36は、被写体座標系を使用して算出した第1カメラ座標を第1カメラ位置算出部32から受け付ける。また距離算出部36は、第1カメラ1の向き(3軸回転角r=(α1,β1,γ1))を第1カメラ方位算出部33から受け付ける。また距離算出部36は、被写体座標系を使用して算出した第2カメラ座標を第2カメラ位置算出部34から受け付ける。また距離算出部36は、第2カメラ2の向き(3軸回転角r=(α2,β2,γ2))を第2カメラ方位算出部35から受け付ける。 The distance calculation unit 36 receives the three-dimensional coordinate information of the plurality of marks 21 in the subject coordinate system from the reception unit 31. Further, the distance calculation unit 36 receives the first camera coordinates calculated using the subject coordinate system from the first camera position calculation unit 32. Further, the distance calculation unit 36 receives the direction of the first camera 1 (three-axis rotation angle r = (α1, β1, γ1)) from the first camera orientation calculation unit 33. Further, the distance calculation unit 36 receives the second camera coordinates calculated using the subject coordinate system from the second camera position calculation unit 34. Further, the distance calculation unit 36 receives the direction of the second camera 2 (three-axis rotation angle r = (α2, β2, γ2)) from the second camera orientation calculation unit 35.

距離算出部36は複数のマーク21のそれぞれについて、第1カメラ座標と第1カメラ1の向きとに基づく第1カメラ座標系を使用して、第1カメラ1の光学中心Oと複数のマーク21との第1カメラ1の光軸方向の距離dを算出する。 Distance calculating unit 36 for each of a plurality of marks 21, using the first camera coordinate system based on the first camera coordinates and the first camera 1 orientation, the optical center O 0 of the first camera 1 and the plurality of marks The distance d in the optical axis direction of the first camera 1 from 21 is calculated.

具体的には、まず距離算出部36は第1カメラ座標を原点とするカメラ座標系を、第1カメラ1の向き(3軸回転角r=(α1,β1,γ1))だけ回転させることにより第1カメラ座標系に変換する。すなわち第1カメラ座標系は第1カメラ座標を原点とし、第1カメラ1の光軸方向をZ軸とし、原点を含むZ軸と垂直な平面の水平方向の原点を通る直線をX軸とし、原点を含むZ軸と垂直な平面の垂直方向の原点を通る直線をY軸とした座標系である。次に距離算出部36は第1カメラ座標系及び式(1)を使用して、第1カメラ1の光学中心Oと複数のマーク21との第1カメラ1の光軸方向の距離dを算出する(図3参照)。以上により、被写体(複数のマーク21)と、ステレオカメラ10(第1カメラ1の光学中心O)との相対位置が明確になる。距離算出部36は複数のマーク21の各々とステレオカメラ10との当該距離dを示す距離情報を理想視差算出部37に入力する。 Specifically, first, the distance calculation unit 36 rotates the camera coordinate system with the first camera coordinates as the origin by the direction of the first camera 1 (three-axis rotation angle r = (α1, β1, γ1)). Convert to the first camera coordinate system. That is, the first camera coordinate system has the first camera coordinates as the origin, the optical axis direction of the first camera 1 as the Z axis, and the straight line passing through the horizontal origin of the plane perpendicular to the Z axis including the origin as the X axis. It is a coordinate system with a straight line passing through the origin in the vertical direction of a plane perpendicular to the Z axis including the origin as the Y axis. Next, the distance calculation unit 36 uses the first camera coordinate system and the equation (1) to determine the distance d in the optical axis direction of the first camera 1 between the optical center O 0 of the first camera 1 and the plurality of marks 21. Calculate (see FIG. 3). As described above, the relative position between the subject (plurality of marks 21) and the stereo camera 10 (optical center O 0 of the first camera 1) becomes clear. The distance calculation unit 36 inputs distance information indicating the distance d between each of the plurality of marks 21 and the stereo camera 10 into the ideal parallax calculation unit 37.

なお距離算出部36は第2カメラ座標と第2カメラ2の向きに基づく第2カメラ座標系を使用して、第2カメラ2の光学中心Oと複数のマーク21との第2カメラ2の光軸方向の距離dを算出してもよい。 Note the distance calculation unit 36 by using the second camera coordinate system based on the second camera coordinate and the second camera 2 orientation, the second optical center O 1 and a plurality of marks 21 of the camera 2 of the second camera 2 The distance d in the optical axis direction may be calculated.

理想視差算出部37は上述の距離情報を距離算出部36から受け付ける。理想視差算出部37は上述の距離情報に基づいて第1撮影画像に含まれる複数のマーク21と、第2撮影画像に含まれる複数のマーク21との理想の視差を示す理想視差を、複数のマーク21毎に式(1)を使用して算出する。理想視差算出部37は理想視差を決定部39に入力する。 The ideal parallax calculation unit 37 receives the above-mentioned distance information from the distance calculation unit 36. The ideal parallax calculation unit 37 obtains a plurality of ideal parallax showing the ideal parallax between the plurality of marks 21 included in the first captured image and the plurality of marks 21 included in the second captured image based on the above-mentioned distance information. Calculate using the formula (1) for each mark 21. The ideal parallax calculation unit 37 inputs the ideal parallax to the determination unit 39.

視差算出部38は第1撮影画像と第2撮影画像とを受付部31から受け付ける。視差算出部38は第1撮影画像に含まれる複数のマーク21と、第2撮影画像に含まれる複数のマーク21との視差を、複数のマーク21毎に算出する。視差算出部38は視差を決定部39に入力する。 The parallax calculation unit 38 receives the first captured image and the second captured image from the reception unit 31. The parallax calculation unit 38 calculates the parallax between the plurality of marks 21 included in the first captured image and the plurality of marks 21 included in the second captured image for each of the plurality of marks 21. The parallax calculation unit 38 inputs the parallax to the determination unit 39.

決定部39は理想視差を理想視差算出部37から受け付け、視差を視差算出部38から受け付ける。また決定部39は第1撮影画像と第2撮影画像とを受付部31から受け付ける。決定部39は第1撮影画像及び第2撮影画像を補正する校正パラメータを、視差と理想視差とに基づいて決定する。例えば決定部39は視差と理想視差との差分が0になるように補正するための校正パラメータを決定する。 The determination unit 39 receives the ideal parallax from the ideal parallax calculation unit 37, and receives the parallax from the parallax calculation unit 38. Further, the determination unit 39 receives the first photographed image and the second photographed image from the reception unit 31. The determination unit 39 determines the calibration parameters for correcting the first captured image and the second captured image based on the parallax and the ideal parallax. For example, the determination unit 39 determines a calibration parameter for correction so that the difference between the parallax and the ideal parallax becomes zero.

なお決定部39は垂直方向(Y軸方向)に視差が生じている場合、被写体(複数のマーク)との距離によらずに、当該縦方向の視差を0にする補正をするための校正パラメータを決定する。この理由は、視差は水平方向(X軸方向)のみに生じることを前提としているためである。 When the parallax is generated in the vertical direction (Y-axis direction), the determination unit 39 is a calibration parameter for correcting the parallax in the vertical direction to 0 regardless of the distance to the subject (plurality of marks). To determine. The reason for this is that it is assumed that parallax occurs only in the horizontal direction (X-axis direction).

図10は第1実施形態における校正方法の全体概略フローチャートである。ステレオカメラ10が、撮影画像を取得する(ステップS101)。具体的には、第1カメラ1が、第1撮影画像を取得し、第2カメラ2が、第2撮影画像を取得する。 FIG. 10 is an overall schematic flowchart of the calibration method according to the first embodiment. The stereo camera 10 acquires a captured image (step S101). Specifically, the first camera 1 acquires the first captured image, and the second camera 2 acquires the second captured image.

次に、校正装置30が、ステレオカメラ10と被写体との相対位置を計測する(ステップS102)。具体的には、校正装置30が、ステレオカメラ10の第1カメラ1の光学中心Oと、計測用具20上の複数のマーク21との相対位置を、後述のステップS6〜ステップS10により計測する。 Next, the calibration device 30 measures the relative position between the stereo camera 10 and the subject (step S102). Specifically, the calibration device 30, a first optical center O 0 of the camera 1 of the stereo camera 10, the relative positions of the plurality of marks 21 on the sizing device 20 measures a step S6~ step S10 described later ..

次に、校正装置30が、相対位置に基づく校正パラメータを決定する(ステップS103)。具体的には、校正装置30が、第1撮影画像に含まれる複数のマーク21と、第2撮影画像に含まれる複数のマーク21との視差が、ステップS102で計測された相対位置に基づく理想の視差を示す理想視差と一致するように、第1撮影画像及び第2撮影画像の少なくとも一方を補正する校正パラメータを決定する。 Next, the calibration device 30 determines the calibration parameters based on the relative position (step S103). Specifically, the calibration device 30 ideally bases the parallax between the plurality of marks 21 included in the first captured image and the plurality of marks 21 included in the second captured image based on the relative positions measured in step S102. The calibration parameter for correcting at least one of the first captured image and the second captured image is determined so as to match the ideal parallax indicating the parallax of.

次にフローチャートを参照して本実施形態の校正装置30における校正方法の詳細について説明する。図11は第1実施形態の校正装置30における校正方法の例を示すフローチャートである。 Next, the details of the calibration method in the calibration device 30 of the present embodiment will be described with reference to the flowchart. FIG. 11 is a flowchart showing an example of a calibration method in the calibration device 30 of the first embodiment.

受付部31は計測用具20上の座標情報を受け付ける(ステップS1)。当該座標情報は被写体座標系における複数(本実施形態では5つ)のマーク21の3次元座標情報と、被写体座標系における複数(本実施形態では4つ)の距離計測装置22(計測点23)の3次元座標情報である。また受付部31は複数(本実施形態では4つ)の第1距離情報を受け付ける(ステップS2)。また受付部31は複数(本実施形態では4つ)の第2距離情報を受け付ける(ステップS3)。また受付部31は計測用具20を被写体として含む第1撮影画像を受け付ける(ステップS4)。また受付部31は計測用具20を被写体として含む第2撮影画像を受け付ける(ステップS5)。 The reception unit 31 receives the coordinate information on the measuring tool 20 (step S1). The coordinate information includes three-dimensional coordinate information of a plurality of marks 21 (five in the present embodiment) in the subject coordinate system and a plurality of distance measuring devices 22 (measurement points 23 in the present embodiment) in the subject coordinate system. It is the three-dimensional coordinate information of. Further, the reception unit 31 receives a plurality of (four in this embodiment) first distance information (step S2). Further, the reception unit 31 receives a plurality of (four in this embodiment) second distance information (step S3). Further, the reception unit 31 receives the first captured image including the measuring tool 20 as a subject (step S4). Further, the reception unit 31 receives a second captured image including the measuring tool 20 as a subject (step S5).

次に、第1カメラ位置算出部32は、複数の第1距離情報と、被写体座標系における距離計測装置22(計測点23)の3次元座標情報とから、第1カメラ1の光学中心Oの位置を示す第1カメラ座標を、被写体座標系を使用して算出する(ステップS6)。 Next, the first camera position calculation unit 32 uses the plurality of first distance information and the three-dimensional coordinate information of the distance measuring device 22 (measurement point 23) in the subject coordinate system to obtain the optical center O 0 of the first camera 1. The first camera coordinates indicating the position of are calculated using the subject coordinate system (step S6).

次に、第2カメラ位置算出部34は、複数の第2距離情報と、被写体座標系における距離計測装置22(計測点23)の3次元座標情報とから、第2カメラ2の光学中心Oの位置を示す第2カメラ座標を、被写体座標系を使用して算出する(ステップS7)。 Next, the second camera position calculation unit 34 uses the plurality of second distance information and the three-dimensional coordinate information of the distance measuring device 22 (measurement point 23) in the subject coordinate system to obtain the optical center O 1 of the second camera 2. The second camera coordinates indicating the position of are calculated using the subject coordinate system (step S7).

次に、第1カメラ方位算出部33はカメラ座標系を使用して、計測点23(23a,23b,23c,23d)の3次元座標と、第1撮影画像上の計測点23の像の2次元座標と、第1カメラ1の焦点距離と、から第1カメラ1の向き(光軸方向)を算出する(ステップS8)。 Next, the first camera orientation calculation unit 33 uses the camera coordinate system to obtain two of the three-dimensional coordinates of the measurement points 23 (23a, 23b, 23c, 23d) and the image of the measurement points 23 on the first captured image. The orientation (optical axis direction) of the first camera 1 is calculated from the dimensional coordinates and the focal distance of the first camera 1 (step S8).

次に、第2カメラ方位算出部35はカメラ座標系を使用して、計測点23(23a,23b,23c,23d)の3次元座標と、第2撮影画像上の計測点23の像の2次元座標と、第2カメラ2の焦点距離と、から第2カメラ2の向き(光軸方向)を算出する(ステップS9)。 Next, the second camera orientation calculation unit 35 uses the camera coordinate system to obtain two of the three-dimensional coordinates of the measurement points 23 (23a, 23b, 23c, 23d) and the image of the measurement points 23 on the second captured image. The orientation (optical axis direction) of the second camera 2 is calculated from the dimensional coordinates and the focal distance of the second camera 2 (step S9).

次に、距離算出部36は複数のマーク21のそれぞれについて、第1カメラ座標と第1カメラ1の向きとに基づく第1カメラ座標系を使用して、第1カメラ1の光学中心Oと複数のマーク21との第1カメラ1の光軸方向の距離dを算出する(ステップS10)。ステップS6〜ステップS10により、被写体(複数のマーク21)と、ステレオカメラ10(第1カメラ1の光学中心O)との相対位置が明確になる。 Then, the distance calculating unit 36 for each of a plurality of marks 21, using the first camera coordinate system based on the first camera coordinates and the first camera 1 orientation, the first optical center O 0 of the camera 1 The distance d in the optical axis direction of the first camera 1 with the plurality of marks 21 is calculated (step S10). From step S6 to step S10, the relative position between the subject (plurality of marks 21) and the stereo camera 10 (optical center O 0 of the first camera 1) becomes clear.

次に、理想視差算出部37はステップS10で算出した第1カメラ1の光軸方向の距離dに基づいて、第1撮影画像に含まれる複数のマーク21と、第2撮影画像に含まれる複数のマーク21との理想の視差を示す理想視差を、複数のマーク21毎に式(1)を使用して算出する(ステップS11)。 Next, the ideal parallax calculation unit 37 includes a plurality of marks 21 included in the first captured image and a plurality of marks 21 included in the second captured image based on the distance d in the optical axis direction of the first camera 1 calculated in step S10. The ideal parallax indicating the ideal parallax with the mark 21 of is calculated for each of the plurality of marks 21 using the equation (1) (step S11).

次に、視差算出部38は第1撮影画像に含まれる複数のマーク21と、第2撮影画像に含まれる複数のマーク21との視差を、複数のマーク21毎に算出する(ステップS12)。 Next, the parallax calculation unit 38 calculates the parallax between the plurality of marks 21 included in the first captured image and the plurality of marks 21 included in the second captured image for each of the plurality of marks 21 (step S12).

次に、決定部39は第1撮影画像と第2撮影画像とを、視差と理想視差との差分が0になるように補正するための校正パラメータを決定する(ステップS13)。 Next, the determination unit 39 determines the calibration parameters for correcting the first captured image and the second captured image so that the difference between the parallax and the ideal parallax becomes 0 (step S13).

なお上述のステップS10において、距離算出部36は第2カメラ座標と第2カメラ2の向きに基づく第2カメラ座標系を使用して、第2カメラ2の光学中心Oと複数のマーク21との第2カメラ2の光軸方向の距離dを算出してもよい。 Note in step S10 described above, the distance calculation unit 36 uses the second camera coordinate system based on the second camera coordinate and the second camera 2 orientation, the second camera 2 the optical center O 1 and a plurality of marks 21 The distance d in the optical axis direction of the second camera 2 may be calculated.

次に、上述の計測用具20、及び上述の校正装置30を使用した本実施形態の校正方法の全体フローについて説明する。図12は第1実施形態の校正方法の全体フローの例を示すフローチャートである。 Next, the overall flow of the calibration method of the present embodiment using the above-mentioned measuring tool 20 and the above-mentioned calibration device 30 will be described. FIG. 12 is a flowchart showing an example of the overall flow of the calibration method of the first embodiment.

まず、計測用具20を、ステレオカメラ10を搭載した車両の前方に、ほぼ正対するように設置する(ステップS21)。次に、計測用具20が、ステレオカメラ10の光学中心Oと、計測用具20上の複数の計測点23との距離を計測する(ステップS22)。具体的には、計測用具20四隅の距離計測装置22を適宜回転し、車両のフロントガラス越しにステレオカメラ10の光学中心Oまでの距離を計測する。次に、ステレオカメラ10が、計測用具20の位置をそのままにして、フロントガラス越しに計測用具20を撮影する(ステップS23)。 First, the measuring tool 20 is installed in front of the vehicle equipped with the stereo camera 10 so as to be substantially facing each other (step S21). Next, the measuring tool 20 is, the optical center O 0 of the stereo camera 10, measuring the distance between the plurality of measurement points 23 on the sizing device 20 (step S22). Specifically, by rotating the sizing device 20 the four corners of the distance measuring device 22 as appropriate, measures the distance to the optical center O 0 of the stereo camera 10 to windshield of the vehicle. Next, the stereo camera 10 takes a picture of the measuring tool 20 through the windshield while keeping the position of the measuring tool 20 as it is (step S23).

次に、ステップS22で計測された計測データを校正装置30に入力する(ステップS24)。このとき、計測用具20上の複数のマーク21を示す被写体座標系の座標、及び計測用具20上の複数の計測点23を示す被写体座標系の座標も同時に入力する。次に、ステップS23で撮影した撮影画像を校正装置30に入力する(ステップS25)。 Next, the measurement data measured in step S22 is input to the calibration device 30 (step S24). At this time, the coordinates of the subject coordinate system indicating the plurality of marks 21 on the measuring tool 20 and the coordinates of the subject coordinate system indicating the plurality of measuring points 23 on the measuring tool 20 are also input at the same time. Next, the captured image captured in step S23 is input to the calibration device 30 (step S25).

次に、校正装置30が、計測用具20と、ステレオカメラ10の光学中心Oと、の相対位置を算出する(ステップS26)。具体的には、校正装置30が、ステレオカメラ10の位置、及び方向を算出する(図11のステップS6〜ステップS9)。そして、校正装置30が、計測用具20(複数のマーク21)と、ステレオカメラ10の光学中心Oと、の第1カメラ1の光軸方向の距離dを算出する(図11のステップS10)。 Next, the calibration device 30 calculates a sizing device 20, the optical center O 0 of the stereo camera 10, the relative position (step S26). Specifically, the calibration device 30 calculates the position and direction of the stereo camera 10 (steps S6 to S9 in FIG. 11). Then, the calibration device 30 calculates the distance d in the optical axis direction of the first camera 1 between the measuring tool 20 (plural marks 21) and the optical center O 0 of the stereo camera 10 (step S10 in FIG. 11). ..

次に、校正装置30が、ステップS26で算出された相対位置に基づいて理想視差を算出する(ステップS27)。具体的には、校正装置30は図11のステップS11の方法で理想視差を算出する。次に、校正装置30が、ステップS25で入力された撮影画像に基づいて視差を算出する(ステップS28)。具体的には、校正装置30は図11のステップS12の方法で視差を算出する。次に、校正装置30が、相対位置と、撮影画像と、に基づいてステレオカメラ10を校正する校正パラメータを決定する(ステップS29)。具体的には、校正装置30が、相対位置から算出された理想視差と、撮影画像から算出された視差と、に基づいてステレオカメラ10で撮影された撮影画像を校正する校正パラメータを決定する(図11のステップS13)。 Next, the calibration device 30 calculates the ideal parallax based on the relative position calculated in step S26 (step S27). Specifically, the calibration device 30 calculates the ideal parallax by the method of step S11 in FIG. Next, the calibration device 30 calculates the parallax based on the captured image input in step S25 (step S28). Specifically, the calibration device 30 calculates the parallax by the method of step S12 in FIG. Next, the calibration device 30 determines the calibration parameters for calibrating the stereo camera 10 based on the relative position and the captured image (step S29). Specifically, the calibration device 30 determines a calibration parameter for calibrating the captured image captured by the stereo camera 10 based on the ideal parallax calculated from the relative position and the parallax calculated from the captured image (). Step S13 in FIG. 11).

以上説明したように、第1実施形態の校正方法では、ステレオカメラ10の撮影範囲に入るように設置された計測用具20と、ステレオカメラ10との相対位置を計測し、当該相対位置と、ステレオカメラ10により撮影された、計測用具20を被写体として含む撮影画像と、に基づいてステレオカメラ10を校正する校正パラメータを決定する。これにより設置位置精度の確保が難しい車両搭載状態のステレオカメラ10に対しても高精度な校正パラメータを算出することができる。 As described above, in the calibration method of the first embodiment, the relative position between the measuring tool 20 installed so as to be within the shooting range of the stereo camera 10 and the stereo camera 10 is measured, and the relative position and the stereo A calibration parameter for calibrating the stereo camera 10 is determined based on a captured image including the measuring tool 20 as a subject taken by the camera 10. As a result, it is possible to calculate highly accurate calibration parameters even for the stereo camera 10 mounted on a vehicle in which it is difficult to secure the installation position accuracy.

なお第1実施形態では、自動車に搭載されたステレオカメラ10を校正する場合について説明した。しかしながら自動車などの車両(移動体)に限られない任意の物体に搭載されたステレオカメラ10に、第1実施形態の校正方法を適用してもよい。また、物体に搭載されていないステレオカメラ10に対しても、より高精度な校正を実施したければ、本実施形態の方法が適用できる。 In the first embodiment, the case of calibrating the stereo camera 10 mounted on the automobile has been described. However, the calibration method of the first embodiment may be applied to the stereo camera 10 mounted on an arbitrary object not limited to a vehicle (moving body) such as an automobile. Further, the method of the present embodiment can be applied to the stereo camera 10 which is not mounted on the object if it is desired to perform the calibration with higher accuracy.

(第1実施形態の変形例)
次に第1実施形態の校正方法の変形例について説明する。第1実施形態の変形例の校正方法は、距離計測装置22が第1カメラ1(第2カメラ2)の光学中心までの距離を計測せずに、第1カメラ1(第2カメラ2)の光学中心との間にある中間計測点までの距離を計測する。これは、一般にカメラの光学中心が、レンズ内部に位置するため、直接計測することが困難であるためである。
(Modified example of the first embodiment)
Next, a modified example of the calibration method of the first embodiment will be described. In the calibration method of the modified example of the first embodiment, the distance measuring device 22 does not measure the distance to the optical center of the first camera 1 (second camera 2), but instead of the first camera 1 (second camera 2). Measure the distance to the intermediate measurement point between the optical center. This is because the optical center of the camera is generally located inside the lens, and it is difficult to measure directly.

図13は第1実施形態の変形例の距離計測装置22が、中間計測点を使用して第1カメラ1(第2カメラ2)との距離を計測する場合の例を説明するための図である。図13の例は、中間計測点61を計測装置20と垂直な方向にとり、第1カメラ1(第2カメラ2)の位置62の近傍にとる場合の例である。例えば中間計測点61はフロントガラス上にとる。 FIG. 13 is a diagram for explaining an example in which the distance measuring device 22 of the modified example of the first embodiment measures the distance from the first camera 1 (second camera 2) by using the intermediate measurement point. is there. The example of FIG. 13 is an example in which the intermediate measurement point 61 is taken in the direction perpendicular to the measuring device 20 and is taken in the vicinity of the position 62 of the first camera 1 (second camera 2). For example, the intermediate measurement point 61 is located on the windshield.

距離計測装置22は、第1カメラ1の光学中心近傍に設けられた中間計測点と、計測用具20上の計測点23との距離を示す距離情報(以下「第1中間距離情報」という。)を計測する。また距離計測装置22は、第2カメラ2の光学中心近傍に設けられた中間計測点と、計測用具20上の計測点23との距離を示す距離情報(以下「第2中間距離情報」という。)を計測する。 The distance measuring device 22 is distance information indicating the distance between the intermediate measuring point provided near the optical center of the first camera 1 and the measuring point 23 on the measuring tool 20 (hereinafter referred to as “first intermediate distance information”). To measure. Further, the distance measuring device 22 is referred to as distance information (hereinafter referred to as "second intermediate distance information") indicating the distance between the intermediate measuring point provided near the optical center of the second camera 2 and the measuring point 23 on the measuring tool 20. ) Is measured.

受付部31は、第1中間距離情報及び第2中間距離情報を受け付ける。また受付部31は、中間計測点61から第1カメラ1(第2カメラ2)の光学中心までの距離は、計測した値や設計値などから別途取得された距離情報として受け付ける。 The reception unit 31 receives the first intermediate distance information and the second intermediate distance information. Further, the reception unit 31 receives the distance from the intermediate measurement point 61 to the optical center of the first camera 1 (second camera 2) as distance information separately acquired from the measured value, the design value, and the like.

第1カメラ位置算出部32(第2カメラ位置算出部34)は、まず式(2)により中間計測点61の位置を示す座標を決定する。次に第1カメラ位置算出部32(第2カメラ位置算出部34)は、中間計測点61の位置を示す座標と、中間計測点61から第1カメラ1(第2カメラ2)の光学中心までの距離を示す距離情報と、により第1カメラ1(第2カメラ2)の光学中心の座標を算出する。 The first camera position calculation unit 32 (second camera position calculation unit 34) first determines the coordinates indicating the position of the intermediate measurement point 61 by the equation (2). Next, the first camera position calculation unit 32 (second camera position calculation unit 34) has coordinates indicating the position of the intermediate measurement point 61 and from the intermediate measurement point 61 to the optical center of the first camera 1 (second camera 2). The coordinates of the optical center of the first camera 1 (second camera 2) are calculated by the distance information indicating the distance of.

なお中間計測点61から第1カメラ1(第2カメラ2)の光学中心までの距離は、計測用具20の被写体座標系を使用せずに、カメラ座標系により独立に計測してもよい。またカメラ光軸63の方向と、計測用具20と垂直な直線との方向の差分が小さいときは、計測用具20と垂直な直線上にある位置65を、第1カメラ1(第2カメラ2)の光学中心の位置とみなしてもよい。これは実際の第1カメラ1(第2カメラ2)の位置との誤差64は無視できる程小さくなるためである。 The distance from the intermediate measurement point 61 to the optical center of the first camera 1 (second camera 2) may be measured independently by the camera coordinate system without using the subject coordinate system of the measuring tool 20. When the difference between the direction of the camera optical axis 63 and the direction of the measuring tool 20 and the straight line perpendicular to the measuring tool 20 is small, the position 65 on the straight line perpendicular to the measuring tool 20 is set to the first camera 1 (second camera 2). It may be regarded as the position of the optical center of. This is because the error 64 from the actual position of the first camera 1 (second camera 2) becomes negligibly small.

また中間計測点61と計測用具20の計測点23との間の距離は、距離計測装置22を使用せずに巻尺などにより計測してもよい。 Further, the distance between the intermediate measuring point 61 and the measuring point 23 of the measuring tool 20 may be measured by a tape measure or the like without using the distance measuring device 22.

(第2実施形態)
次に第2実施形態について説明する。第2実施形態では、ステレオカメラ10の校正に使用される計測用具が第1実施形態と異なる。第2実施形態のステレオカメラ10の校正では、第1カメラ1又は第2カメラ2のいずれか一方を使用する。第2実施形態の説明では第1カメラ1を使用して説明するが、第2カメラ2を使用してもよい。
(Second Embodiment)
Next, the second embodiment will be described. In the second embodiment, the measuring tool used for calibrating the stereo camera 10 is different from the first embodiment. In the calibration of the stereo camera 10 of the second embodiment, either the first camera 1 or the second camera 2 is used. In the description of the second embodiment, the first camera 1 will be used, but the second camera 2 may be used.

図14は第2実施形態の計測用具120と、ステレオカメラ10と、校正装置30との関係の例を示す図である。第2実施形態では、計測用具20ではなく計測用具120が使用される。ステレオカメラ10及び校正装置30の説明は、図1の説明と同じなので省略する。計測用具120は、第1実施形態の計測用具20と同様に、ステレオカメラ10との相対位置を計測するために使用されるが、第1実施形態の計測用具20とは形態が異なる。第2実施形態の計測用具120は、角度計測板101及び第1部材102を備える。角度計測板101は水平方向に傾いた計測用具120のずれを示す角度、及び垂直方向に傾いた計測用具120のずれを示す角度の計測に使用される。第1部材102はステレオカメラ10を校正するためのチャートとして使用される。 FIG. 14 is a diagram showing an example of the relationship between the measuring tool 120 of the second embodiment, the stereo camera 10, and the calibration device 30. In the second embodiment, the measuring tool 120 is used instead of the measuring tool 20. The description of the stereo camera 10 and the calibration device 30 is the same as the description of FIG. 1, and will be omitted. The measuring tool 120 is used for measuring the relative position with respect to the stereo camera 10 like the measuring tool 20 of the first embodiment, but the form is different from the measuring tool 20 of the first embodiment. The measuring tool 120 of the second embodiment includes an angle measuring plate 101 and a first member 102. The angle measuring plate 101 is used for measuring an angle indicating a deviation of the measuring tool 120 tilted in the horizontal direction and an angle indicating a deviation of the measuring tool 120 tilted in the vertical direction. The first member 102 is used as a chart for calibrating the stereo camera 10.

図15A乃至図16を参照して計測用具120の構成について詳細に説明する。図15Aは第2実施形態の角度計測板101の断面を示す断面図である。図15Bは第2実施形態の角度計測板101の正面を示す正面図である。図16は第2実施形態の第1部材102の正面図である。 The configuration of the measuring tool 120 will be described in detail with reference to FIGS. 15A to 16. FIG. 15A is a cross-sectional view showing a cross section of the angle measuring plate 101 of the second embodiment. FIG. 15B is a front view showing the front surface of the angle measuring plate 101 of the second embodiment. FIG. 16 is a front view of the first member 102 of the second embodiment.

角度計測板101は光源103及び第2部材104を備える。光源103は一様な輝度分布を持つ平面状の拡散光源である。すなわち光源103は第1部材102の面上の位置に依らずに一様な強度の光(面上の位置に依る光の強度の差が所定の範囲内の光)を放射する。 The angle measuring plate 101 includes a light source 103 and a second member 104. The light source 103 is a planar diffusion light source having a uniform luminance distribution. That is, the light source 103 emits light of uniform intensity regardless of the position on the surface of the first member 102 (light in which the difference in light intensity depending on the position on the surface is within a predetermined range).

第2部材104は光源103を被覆するように設置されており、複数の穴105から光源103の光を放射する。それぞれの穴105は第1部材102の面に垂直な方向に所定の間隔で開けられている。図15Bの例では、直径bの円形の穴105が、ピッチaで縦横に整列するように開けられている。なお穴105の数、形及び配列の仕方は図15Bの形態に限られず任意でよい。また第2部材104の材質は任意でよい。第2部材104の材質は、例えば金属である。 The second member 104 is installed so as to cover the light source 103, and emits the light of the light source 103 from the plurality of holes 105. Each hole 105 is formed at a predetermined interval in a direction perpendicular to the surface of the first member 102. In the example of FIG. 15B, circular holes 105 having a diameter b are formed so as to be aligned vertically and horizontally at a pitch a. The number, shape, and arrangement of the holes 105 are not limited to the form shown in FIG. 15B and may be arbitrary. The material of the second member 104 may be arbitrary. The material of the second member 104 is, for example, metal.

角度計測板101(第2部材104)は第1部材102の面の中央に配置されている。また第1部材102は角度計測板101(第2部材104)の上部にマーク111を有する。マーク111は第1部材102(計測用具120)と校正対象のステレオカメラ10(第1カメラ1)との間の距離を算出するための基準点として使用される。また第1部材102の表面は、第1実施形態の計測用具20の表面と同様に、第1撮影画像上の点に対応する第2撮影画像上の対応点を検出し易くするための濃淡模様を有する。 The angle measuring plate 101 (second member 104) is arranged at the center of the surface of the first member 102. Further, the first member 102 has a mark 111 on the upper portion of the angle measuring plate 101 (second member 104). The mark 111 is used as a reference point for calculating the distance between the first member 102 (measuring tool 120) and the stereo camera 10 (first camera 1) to be calibrated. Further, the surface of the first member 102 has a shading pattern for facilitating detection of the corresponding points on the second captured image corresponding to the points on the first captured image, similarly to the surface of the measuring tool 20 of the first embodiment. Has.

図17は第1カメラ1の光学中心Oの位置から第2部材104に開けられた穴106、穴107及び穴108を見た場合を説明するための図である。穴106の位置では、光学中心Oの位置からの視線と、第2部材104の面との角度が直交するため、第2部材104の背後にある光源103の光が図18Aの形に見える。穴107の位置では、光学中心Oの位置からの視線が第2部材104の穴107に斜めに進入するため、第2部材104の背後にある光源103の光が図18Bの形に見える。穴108の位置では、光学中心Oの位置からの視線が第2部材104の穴108に進入しないため、第2部材104の背後にある光源103の光が見えなくなる(図18C)。 Figure 17 is a diagram for explaining a case viewed first camera 1 of the optical center O hole 106 bored in the second member 104 from the position of 0, the hole 107 and the hole 108. The position of the hole 106, the line of sight from the position of the optical center O 0, since the angle between the surface of the second member 104 is perpendicular, the light source 103 behind the second member 104 is visible in the form of FIG. 18A .. The positions of the holes 107, since the line of sight from the position of the optical center O 0 enters obliquely into the hole 107 of the second member 104, the light source 103 behind the second member 104 is visible in the form of Figure 18B. The positions of the holes 108, since the line of sight from the position of the optical center O 0 does not enter into the hole 108 of the second member 104, the light source 103 behind the second member 104 can not be seen (FIG. 18C).

すなわち穴のピッチaに比べ十分高い解像度の第1カメラ1で角度計測板101(第2部材104)を撮影すれば、第1カメラ1の光学中心Oからの視線と第2部材104の面とが直交している箇所の付近の穴の像の面積は大きく写る。そして第1カメラ1の光学中心Oからの視線と第2部材104の面とが直交している箇所から離れるに従って穴の像の面積が欠けてゆき、十分大きく離れた位置では穴の像が写らなくなる。 That when photographing the angle measurement plate 101 by the first camera 1 of sufficiently high resolution (second member 104) than the pitch a of the hole, a sight line and a surface of the second member 104 from the optical center O 0 of the first camera 1 The area of the image of the hole near the point where is orthogonal to is large. Then Yuki missing area of the image of the hole as the distance from the place where the line of sight and the surface of the second member 104 from the first optical center O 0 of the camera 1 are orthogonal, the image of the hole in sufficiently large distant position It disappears.

ここで第2部材104の穴105のピッチaについて説明する。図15Bの穴105のピッチaは、ステレオカメラ10(第1カメラ1)の解像限界よりも狭く設定する。例えば(半)視野角20度、撮影距離(校正距離)2m、640x480画素センサという条件の場合、下記式(5)より、ピッチaがおよそ2mm以下であれば、画素ピッチよりも小さくなる。 Here, the pitch a of the holes 105 of the second member 104 will be described. The pitch a of the hole 105 in FIG. 15B is set narrower than the resolution limit of the stereo camera 10 (first camera 1). For example, in the case of a (half) viewing angle of 20 degrees, a shooting distance (calibration distance) of 2 m, and a 640x480 pixel sensor, the pitch a is smaller than the pixel pitch if the pitch a is about 2 mm or less according to the following equation (5).

ピッチaが画素ピッチよりも小さい場合、ステレオカメラ10(第1カメラ1)により角度計測板101(第2部材104)を撮影すると、撮影画像は図19Aのようになる。しかしながら現実には画素開口特性、結像光学系のボケ、カラーカメラの場合の光学LPF(Low Pass Filter)等の光学ボケの影響により、ピッチaがおよそ2mm以下であっても解像限界を超えることになる。すると、撮影画像上では、個々の穴は判別できず、図19Aの画像をぼかした形の図19Bのような大きな一つの輝度の山(輝度分布)となる。図19Bの輝度の山の頂点は、例えば図17の穴106付近に対応する。また図19Bの輝度の山の裾野は、例えば図17の穴108付近に対応する。 When the pitch a is smaller than the pixel pitch, when the angle measuring plate 101 (second member 104) is photographed by the stereo camera 10 (first camera 1), the photographed image becomes as shown in FIG. 19A. However, in reality, the resolution limit is exceeded even if the pitch a is about 2 mm or less due to the influence of pixel aperture characteristics, blurring of the imaging optical system, optical blurring such as optical LPF (Low Pass Filter) in the case of a color camera. It will be. Then, the individual holes cannot be discriminated on the captured image, and a large peak (luminance distribution) of one large brightness as shown in FIG. 19B in which the image of FIG. 19A is blurred is formed. The apex of the luminance peak in FIG. 19B corresponds to, for example, the vicinity of the hole 106 in FIG. Further, the foot of the mountain of brightness in FIG. 19B corresponds to, for example, the vicinity of the hole 108 in FIG.

図20は図19Bの輝度の山の裾野の半径cの大きさを説明するための図である。第2部材104の厚さを40mm、穴108の直径を1mmとする。またステレオカメラ10(第1カメラ1)の(半)視野角を20度、画素センサを640x480ピクセルとする。このとき輝度の山の裾野の半径cは下記式(6)よりおよそ22ピクセルになる。 FIG. 20 is a diagram for explaining the size of the radius c of the foot of the mountain having the brightness of FIG. 19B. The thickness of the second member 104 is 40 mm, and the diameter of the hole 108 is 1 mm. Further, the (half) viewing angle of the stereo camera 10 (first camera 1) is 20 degrees, and the pixel sensor is 640 x 480 pixels. At this time, the radius c of the base of the mountain of brightness is about 22 pixels from the following equation (6).

このように、図15Bの個々の穴105の像ではなく、それをならした連続的な大きな輝度の山を考えることで、ステレオカメラ10(第1カメラ1)の光学中心Oが穴105のちょうど真上ではない位置が、角度計測板101の面と垂直な方向に対応する場合でも、輝度ピークの位置が角度計測板101の面と垂直な方向を表していると捉えることができる。これによりステレオカメラ10(第1カメラ1)の光学中心Oの位置に依らずに、角度計測板101を撮影した撮影画像の輝度の山(輝度分布)の輝度ピークの位置が、角度計測板101の面と垂直な方向を表していると捉えることができる。 Thus, rather than the image of the individual holes 105 in FIG. 15B, by considering a pile of continuous large luminance normalizing it, the optical center O 0 of the stereo camera 10 (first camera 1) of the holes 105 Even when the position not just above corresponds to the direction perpendicular to the surface of the angle measuring plate 101, it can be considered that the position of the luminance peak represents the direction perpendicular to the surface of the angle measuring plate 101. Thus irrespective of the position of the optical center O 0 of the stereo camera 10 (first camera 1), the position of the luminance peak of the luminance peaks of the photographed image obtained by photographing the angle measuring plate 101 (luminance distribution), the angle measurement plate It can be regarded as representing the direction perpendicular to the plane of 101.

なお輝度の山全体を、例えばガウス関数(exp(−r))のような関数で近似し、多数の画素値の平均的な分布を推定することにより、個々の画素値に含まれるランダムノイズの影響を低減し、輝度ピークの位置を正確に推定することができる。 Random noise included in each pixel value by approximating the entire luminance peak with a function such as the Gaussian function (exp (-r 2 )) and estimating the average distribution of a large number of pixel values. It is possible to reduce the influence of the above and accurately estimate the position of the brightness peak.

図21は撮像面40の輝度ピークの位置と、角度計測板101の傾きとの関係を説明するための図である。撮像面40の座標を撮像面40の中央を原点とし、画素単位で表す。このとき撮像面40(撮影画像)上の輝度ピークの位置の座標(i,j)が、ステレオカメラ10(第1カメラ1)の光学中心Oから角度計測板101へ下ろした垂線の足の位置を示す。したがって角度計測板101と、ステレオカメラ10(第1カメラ1)とが正対しているならば、つまり計測用具120の面に対する法線と、ステレオカメラ10(第1カメラ1)の光軸が平行ならば、輝度ピークの位置は撮影画像の中央(原点)になるはずである。すなわち輝度ピークの位置(i,j)が撮影画像の中央(原点)からずれていれば、その輝度ピークの位置を示す撮影画像(撮像面40)の座標(i,j)から、正対方向から傾いている計測用具120の水平方向のずれを示す角度、及び垂直方向のずれを示す角度がわかる。つまりステレオカメラ10(第1カメラ1)の焦点距離(画素単位)をfとすると、(i,j,f)により角度計測板101の法線の方向を決定することができる。言い換えると、正対方向から傾いて設置されている角度計測板101に正対するステレオカメラ10(第1カメラ1)の向きがわかる。 FIG. 21 is a diagram for explaining the relationship between the position of the luminance peak of the imaging surface 40 and the inclination of the angle measuring plate 101. The coordinates of the imaging surface 40 are expressed in pixel units with the center of the imaging surface 40 as the origin. In this case the coordinates (i p, j p) positions of the luminance peaks on the imaging plane 40 (captured image), a vertical line drawn from the optical center O 0 to the angle measurement plate 101 of the stereo camera 10 (first camera 1) Indicates the position of the foot. Therefore, if the angle measuring plate 101 and the stereo camera 10 (first camera 1) face each other, that is, the normal to the surface of the measuring tool 120 and the optical axis of the stereo camera 10 (first camera 1) are parallel. If so, the position of the brightness peak should be at the center (origin) of the captured image. That position of the luminance peak (i p, j p) if the long offset from the center (origin) of the photographed image, the coordinates (i p, j p) of the captured image (imaging plane 40) indicating the position of the luminance peak from , The angle indicating the horizontal deviation of the measuring tool 120 tilted from the facing direction and the angle indicating the vertical deviation can be found. That is, when the focal length of the stereo camera 10 (first camera 1) (pixel units) is is f, it is possible to determine the direction of the normal of the angle measuring plate 101 by (i p, j p, f ). In other words, the orientation of the stereo camera 10 (first camera 1) facing the angle measuring plate 101 installed at an angle from the facing direction can be known.

次に角度計測板101(計測用具120)の位置を示す平面の方程式を決定する方法を具体的に説明する。図22は計測用具120の位置を示す平面の方程式を決定する方法を説明するための図である。ステレオカメラ10(第1カメラ1)の光学中心Oを原点とした座標系で計測用具120を表す平面の方程式を下記式(7)で表す。 Next, a method of determining the equation of a plane indicating the position of the angle measuring plate 101 (measuring tool 120) will be specifically described. FIG. 22 is a diagram for explaining a method of determining an equation of a plane indicating the position of the measuring tool 120. The plane equation representing the sizing device 120 in the coordinate system with the origin of the optical center O 0 of the stereo camera 10 (first camera 1) represented by the following formula (7).

角度計測板101の法線の方向は図21で説明したように(i,j,f)と表すことができる。したがって、この平面の法線ベクトルは(i,j,f)により決定できるので、(a,b,c)=(i,j,f)である。次に平面の方程式の変数dを決定するために、計測用具120(第1部材102)のマーク111をレーザー距離計などで計測し、この距離をdとする。また撮影画像上のマーク111の位置を示す座標を(i,j)とする。ステレオカメラ10(第1カメラ1)の焦点距離(画素単位)をfとすると、ベクトル(i,j,f)方向の距離dの点(x,y,z)がマーク111の位置を示す座標となる。すなわちマーク111の位置を示す平面上の座標(x,y,z)は下記式(8)により算出することができる。 Normal direction of angle measurement plate 101 can be expressed as as described (i p, j p, f ) in FIG. 21. Accordingly, since the normal vector of this plane can be determined by (i p, j p, f ), which is (a, b, c) = (i p, j p, f). Next, in order to determine the variable d of the equation of a plane, the mark 111 of the measuring tool 120 (first member 102) is measured with a laser range finder or the like, and this distance is defined as d c . Further, the coordinates indicating the position of the mark 111 on the captured image are defined as ( ic , j c ). If the focal length of the stereo camera 10 (first camera 1) (pixel units) is is f, the vector (i c, j c, f ) the direction of the distance d point c (x c, y c, z c) mark It is a coordinate indicating the position of 111. That is, the coordinates (x c , y c , z c ) on the plane indicating the position of the mark 111 can be calculated by the following equation (8).

したがって下記式(9)から下記式(10)により平面の方程式の変数dを決定することができる。以上により計測用具120を表す平面の方程式(a,b,c,d)を決定することができる。 Therefore, the variable d of the equation of a plane can be determined from the following equation (9) to the following equation (10). From the above, the equation of a plane (a, b, c, d) representing the measuring tool 120 can be determined.

なお角度計測板101の撮影画像からは、角度計測板101の水平方向に傾いたずれを示す角度、及び垂直方向に傾いたずれを示す角度を算出することができるが、角度計測板101までの距離はわからない。そのため上述の説明では、マーク111の撮影画像上の位置、及び、マーク111までの距離情報dを使用した。これ以外の方法として、図22のd等を実測するという方法も可能である。またステレオカメラ10(第1カメラ1)の校正の許容精度に対して計測用具120の位置精度が高ければ(かつ角度精度が悪ければ)、マーク111とステレオカメラ10との間の距離を実際に計測せずに、距離情報として固定値を使用してもよい。 From the captured image of the angle measuring plate 101, it is possible to calculate the angle indicating the deviation of the angle measuring plate 101 in the horizontal direction and the angle indicating the deviation of the angle measuring plate 101 in the vertical direction. I don't know the distance. Therefore, in the above description, the position of the mark 111 on the captured image and the distance information d c to the mark 111 are used. As another method, a method of actually measuring the d 1 or the like in FIG. 22 are also possible. Further, if the position accuracy of the measuring tool 120 is high (and the angle accuracy is poor) with respect to the allowable accuracy of calibration of the stereo camera 10 (first camera 1), the distance between the mark 111 and the stereo camera 10 is actually set. A fixed value may be used as the distance information without measurement.

次に上述の方法を使用してステレオカメラ10(第1カメラ1)を校正する第2実施形態の校正装置30の構成について説明する。図23は第2実施形態の校正装置の構成の例を示す図である。第2実施形態の校正装置30は、受付部131、計測部136、理想視差算出部137、視差算出部138及び決定部139を備える。 Next, the configuration of the calibration device 30 of the second embodiment for calibrating the stereo camera 10 (first camera 1) by using the above method will be described. FIG. 23 is a diagram showing an example of the configuration of the calibration device of the second embodiment. The calibration device 30 of the second embodiment includes a reception unit 131, a measurement unit 136, an ideal parallax calculation unit 137, a parallax calculation unit 138, and a determination unit 139.

受付部131はステレオカメラ10により撮影された計測用具120を被写体として含む撮影画像(第1カメラ1により撮影された第1撮影画像及び第2カメラ2により撮影された第2撮影画像)を受け付ける。また受付部131は上述の距離情報d(図22参照)を受け付ける。受付部131は第1撮影画像及び距離情報dを計測部136に入力する。また受付部131は撮影画像(第1撮影画像及び第2撮影画像)を視差算出部138に入力する。 The reception unit 131 receives captured images (first captured image captured by the first camera 1 and second captured image captured by the second camera 2) including the measuring tool 120 captured by the stereo camera 10 as a subject. The reception unit 131 receives the above-mentioned distance information d c (see FIG. 22). Reception unit 131 inputs the first captured image and distance information d c in the measurement unit 136. Further, the reception unit 131 inputs the captured images (first captured image and second captured image) to the parallax calculation unit 138.

計測部136は受付部131から第1撮影画像及び距離情報dを受け付ける。計測部136は計測用具120(角度計測板101)の面と垂直な方向(法線ベクトル)を、第1撮影画像の最大輝度の位置に基づいて図21で説明した方法で決定する。これにより計測部136はステレオカメラ10(第1カメラ1)の正対位置からの計測用具120の向きのずれ(水平方向に傾いたずれを示す角度及び垂直方向に傾いたずれを示す角度)を計測する。また第1カメラ座標系(第1カメラ1の光学中心Oを原点とした座標系)で計測用具120の位置を表す平面の方程式を、法線ベクトル及び距離情報dに基づいて図22で説明した方法で決定する。計測部136は当該平面の方程式を示す情報を理想視差算出部137に入力する。 Measurement unit 136 receives the first captured image and distance information d c from the reception unit 131. The measuring unit 136 determines the direction (normal vector) perpendicular to the surface of the measuring tool 120 (angle measuring plate 101) by the method described with reference to FIG. 21 based on the position of the maximum brightness of the first captured image. As a result, the measuring unit 136 determines the deviation of the direction of the measuring tool 120 from the facing position of the stereo camera 10 (first camera 1) (an angle indicating a deviation inclined in the horizontal direction and an angle indicating a deviation inclined in the vertical direction). measure. The equations of the plane representing the position of the sizing device 120 in the first camera coordinate system (the coordinate system with the origin of the first optical center O 0 of the camera 1), in Figure 22 based on the normal vector and the distance information d c Determine by the method described. The measurement unit 136 inputs information indicating the equation of the plane to the ideal parallax calculation unit 137.

理想視差算出部137は計測部136から計測用具120の位置を表す平面の方程式を受け付ける。理想視差算出部137は当該方程式により表される平面を撮影した場合の視差を示す理想視差を図3で説明した方法により算出する。理想視差算出部137は理想視差を決定部139に入力する。 The ideal parallax calculation unit 137 receives from the measurement unit 136 a plane equation representing the position of the measurement tool 120. The ideal parallax calculation unit 137 calculates the ideal parallax, which indicates the parallax when the plane represented by the equation is photographed, by the method described with reference to FIG. The ideal parallax calculation unit 137 inputs the ideal parallax to the determination unit 139.

視差算出部138は受付部131から撮影画像(第1撮影画像及び第2撮影画像)を受け付ける。視差算出部138は計測用具120(第1部材102)の濃淡模様等を使用して、第1撮影画像の点に対応する第2撮影画像の対応点を検出することにより視差を算出する。視差算出部138は視差を決定部139に入力する。 The parallax calculation unit 138 receives the captured images (first captured image and second captured image) from the reception unit 131. The parallax calculation unit 138 calculates the parallax by detecting the corresponding points of the second captured image corresponding to the points of the first captured image by using the shading pattern of the measuring tool 120 (first member 102). The parallax calculation unit 138 inputs the parallax to the determination unit 139.

決定部139は理想視差を理想視差算出部137から受け付け、視差を視差算出部138から受け付ける。また決定部139は第1撮影画像と第2撮影画像とを受付部131から受け付ける。決定部139は第1撮影画像及び第2撮影画像を補正する校正パラメータを、視差と理想視差とに基づいて決定する。決定部139は、例えば視差と理想視差との差分が0になるように、第1撮影画像及び第2撮影画像のうち少なくとも一方を補正するための校正パラメータを決定する。 The determination unit 139 receives the ideal parallax from the ideal parallax calculation unit 137 and the parallax from the parallax calculation unit 138. Further, the determination unit 139 receives the first photographed image and the second photographed image from the reception unit 131. The determination unit 139 determines the calibration parameters for correcting the first captured image and the second captured image based on the parallax and the ideal parallax. The determination unit 139 determines the calibration parameters for correcting at least one of the first captured image and the second captured image so that the difference between the parallax and the ideal parallax becomes 0, for example.

図24は第2実施形態における校正方法の全体概略フローチャートである。ステレオカメラ10が、撮影画像を取得する(ステップS201)。具体的には、第1カメラ1が、第1撮影画像を取得し、第2カメラ2が、第2撮影画像を取得する。 FIG. 24 is an overall schematic flowchart of the calibration method according to the second embodiment. The stereo camera 10 acquires a captured image (step S201). Specifically, the first camera 1 acquires the first captured image, and the second camera 2 acquires the second captured image.

次に、校正装置30が、ステレオカメラ10と被写体との相対位置を計測する(ステップS202)。具体的には、校正装置30が、ステレオカメラ10の第1カメラ1の光学中心Oと、計測用具120との相対位置を、後述のステップS32〜ステップS34により計測する。 Next, the calibration device 30 measures the relative position between the stereo camera 10 and the subject (step S202). Specifically, the calibration device 30, a first optical center O 0 of the camera 1 of the stereo camera 10, the relative positions of the sizing device 120 is measured in step S32~ step S34 described later.

次に、校正装置30が、相対位置に基づく校正パラメータを決定する(ステップS203)。具体的には、校正装置30が、計測用具120(第1部材102)の濃淡模様等を利用して、第1撮影画像の点に対応する第2撮影画像の対応点を検出することにより算出される視差が、ステップS202で計測された相対位置に基づく理想の視差を示す理想視差と一致するように、第1撮影画像及び第2撮影画像の少なくとも一方を補正する校正パラメータを決定する。 Next, the calibration device 30 determines the calibration parameters based on the relative position (step S203). Specifically, the calibration device 30 calculates by detecting the corresponding points of the second captured image corresponding to the points of the first captured image by using the shading pattern of the measuring tool 120 (first member 102). The calibration parameter for correcting at least one of the first captured image and the second captured image is determined so that the parallax to be measured matches the ideal parallax indicating the ideal parallax based on the relative position measured in step S202.

次にフローチャートを参照して第2実施形態の校正装置30における校正方法の詳細について説明する。図25は第2実施形態の校正装置30における校正方法の例を示すフローチャートである。 Next, the details of the calibration method in the calibration device 30 of the second embodiment will be described with reference to the flowchart. FIG. 25 is a flowchart showing an example of a calibration method in the calibration device 30 of the second embodiment.

受付部131は計測用具120を被写体として含む撮影画像(第1撮影画像及び第2撮影画像)を受け付ける(ステップS31)。また受付部131は距離情報dを受け付ける(ステップS32)。 The reception unit 131 receives the captured images (first captured image and second captured image) including the measuring tool 120 as a subject (step S31). The reception unit 131 receives the distance information d c (step S32).

次に、計測部136はステレオカメラ10の正対位置からの計測用具120の向きのずれを計測する(ステップS33)。具体的には、計測部136は計測用具120(角度計測板101)の面と垂直な方向(法線ベクトル)を、第1撮影画像の最大輝度の位置に基づいて図21で説明した方法で決定することにより、計測用具120の向きのずれを計測する。 Next, the measuring unit 136 measures the deviation of the orientation of the measuring tool 120 from the facing position of the stereo camera 10 (step S33). Specifically, the measuring unit 136 sets the direction (normal vector) perpendicular to the surface of the measuring tool 120 (angle measuring plate 101) by the method described with reference to FIG. 21 based on the position of the maximum brightness of the first captured image. By deciding, the deviation of the orientation of the measuring tool 120 is measured.

次に、計測部136は第1カメラ座標系(第1カメラ1の光学中心Oを原点とした座標系)で計測用具120の位置を表す平面の方程式を、法線ベクトル及び距離情報dに基づいて図22で説明した方法で決定する(ステップS34)。 Next, the measuring unit 136 sets the equation of a plane representing the position of the measuring tool 120 in the first camera coordinate system (coordinate system with the optical center O 0 of the first camera 1 as the origin), the normal vector and the distance information d c. Is determined by the method described with reference to FIG. 22 (step S34).

次に、理想視差算出部137はステップS34で決定した方程式により表される平面を撮影した場合の視差を示す理想視差を図3で説明した方法により算出する(ステップS35)。次に、視差算出部138は計測用具120(第1部材102)の濃淡模様等を利用して、第1撮影画像の点に対応する第2撮影画像の対応点を検出することにより視差を算出する(ステップS36)。 Next, the ideal parallax calculation unit 137 calculates the ideal parallax showing the parallax when the plane represented by the equation determined in step S34 is photographed by the method described in FIG. 3 (step S35). Next, the parallax calculation unit 138 calculates the parallax by detecting the corresponding points of the second captured image corresponding to the points of the first captured image by using the shading pattern of the measuring tool 120 (first member 102). (Step S36).

次に、決定部139は第1撮影画像及び第2撮影画像のうち少なくとも一方を、視差と理想視差との差分が0になるように補正するための校正パラメータを決定する(ステップS37)。 Next, the determination unit 139 determines a calibration parameter for correcting at least one of the first captured image and the second captured image so that the difference between the parallax and the ideal parallax becomes 0 (step S37).

上述の計測用具120、及び上述の校正装置30を使用した第2実施形態の校正方法の全体フローは、第1実施形態の図12の説明と同様のため説明を省略する。 Since the overall flow of the calibration method of the second embodiment using the above-mentioned measuring tool 120 and the above-mentioned calibration device 30 is the same as the description of FIG. 12 of the first embodiment, the description thereof will be omitted.

以上説明したように、第2実施形態の校正方法では、ステレオカメラ10の正対位置からの計測用具120の向きのずれを、第1撮影画像の最大輝度の位置に基づいて計測する。また第1撮影画像及び第2撮影画像から算出された視差と、計測用具120の向きのずれが考慮された理想視差と、に基づいてステレオカメラ10を校正する校正パラメータを決定する。これにより設置位置精度の確保が難しい車両搭載状態のステレオカメラ10に対しても高精度な校正パラメータを容易に算出することができる。また、本実施形態によれば車両搭載等されていないステレオカメラ10に対しても、より高精度な校正を簡便な態様で実現することができる。なお、本実施形態において角度計測板の穴は丸穴としているが、この限りではない。例えば、角穴等も利用し得る。 As described above, in the calibration method of the second embodiment, the deviation of the orientation of the measuring tool 120 from the facing position of the stereo camera 10 is measured based on the position of the maximum brightness of the first captured image. Further, the calibration parameters for calibrating the stereo camera 10 are determined based on the parallax calculated from the first captured image and the second captured image and the ideal parallax in consideration of the deviation of the orientation of the measuring tool 120. As a result, highly accurate calibration parameters can be easily calculated even for the stereo camera 10 mounted on the vehicle, for which it is difficult to secure the installation position accuracy. Further, according to the present embodiment, even for a stereo camera 10 that is not mounted on a vehicle, more accurate calibration can be realized in a simple manner. In the present embodiment, the hole of the angle measuring plate is a round hole, but this is not the case. For example, a square hole or the like can also be used.

(第3実施形態)
次に第3実施形態について説明する。第3実施形態では、第2実施形態の計測用具120(角度計測板101)の構成を変えた計測用具220(角度計測板101)を使用する場合について説明する。第3実施形態の説明では、第2実施形態と異なる箇所について説明する。
(Third Embodiment)
Next, the third embodiment will be described. In the third embodiment, a case where the measuring tool 220 (angle measuring plate 101) having a different configuration of the measuring tool 120 (angle measuring plate 101) of the second embodiment is used will be described. In the description of the third embodiment, the parts different from the second embodiment will be described.

図26は第3実施形態の角度計測板201の断面を示す断面図である。角度計測板201の正面図は図15Bと同じなので省略する。角度計測板201は、光源103、遮光板202、透明ガラス203及び遮光板204を備える。光源103については第2実施形態と同じなので説明を省略する。遮光板202、透明ガラス203及び遮光板204は、第2実施形態の第2部材104に相当する。 FIG. 26 is a cross-sectional view showing a cross section of the angle measuring plate 201 of the third embodiment. Since the front view of the angle measuring plate 201 is the same as that of FIG. 15B, it is omitted. The angle measuring plate 201 includes a light source 103, a light-shielding plate 202, transparent glass 203, and a light-shielding plate 204. Since the light source 103 is the same as that of the second embodiment, the description thereof will be omitted. The light-shielding plate 202, the transparent glass 203, and the light-shielding plate 204 correspond to the second member 104 of the second embodiment.

第3実施形態の角度計測板201は、両面に不透明な遮光領域(遮光板202及び遮光板204)を配置した透明なガラス板を使用する。透明ガラス203は遮光板202及び遮光板204の位置を固定するために配置されている。遮光板202及び遮光板204との間をガラスで充填することにより、機械的なずれに強く、温度や経時的な変形等による計測誤差を低減することができる。なお透明ガラス203は透明な任意の物体でもよい。 The angle measuring plate 201 of the third embodiment uses a transparent glass plate in which opaque light-shielding regions (light-shielding plate 202 and light-shielding plate 204) are arranged on both sides. The transparent glass 203 is arranged to fix the positions of the light-shielding plate 202 and the light-shielding plate 204. By filling the space between the light-shielding plate 202 and the light-shielding plate 204 with glass, it is resistant to mechanical deviation, and measurement errors due to temperature, deformation over time, etc. can be reduced. The transparent glass 203 may be any transparent object.

第3実施形態の角度計測板201は表裏両面の遮光面の穴によって、角度計測板201にほぼ直交する方向に入射する光が、向かい合う穴(例えば穴208及び穴209)を通り透過するという点では第1実施形態の角度計測板101と同様である。しかしながら光が透明ガラス203と空気との境界面で屈折するため、撮影画像の輝度分布が第2実施形態とは異なる。 The angle measuring plate 201 of the third embodiment has holes on the light-shielding surfaces on both the front and back surfaces so that light incident on the angle measuring plate 201 in a direction substantially orthogonal to the angle measuring plate 201 passes through the facing holes (for example, holes 208 and 209). Then, it is the same as the angle measuring plate 101 of the first embodiment. However, since the light is refracted at the interface between the transparent glass 203 and the air, the brightness distribution of the captured image is different from that of the second embodiment.

図27は光の屈折の角度について説明するための図である。周知(スネル則)の通り、ガラス−空気境界面の屈折により、透過した光が出射する方向が変化する。比屈折率Rとすると、図27の角度θとθとの関係は下記式(11)となる。 FIG. 27 is a diagram for explaining the angle of refraction of light. As is well known (Snell's law), the direction in which transmitted light is emitted changes due to the refraction of the glass-air interface. Assuming the specific refractive index R, the relationship between the angles θ 1 and θ 2 in FIG. 27 is given by the following equation (11).

したがって遮光板202、透明ガラス203及び遮光板204の合計の厚さが、実施形態2の第2部材104と同じ板厚と穴径ならば、ガラスの屈折によって、より遠くの穴も見えるようになる(図28参照)。そのため撮影画像の輝度分布の山の裾野の大きさは第2実施形態と比べ大きくなる。しかしながら輝度ピークの位置が、ステレオカメラ10(第1カメラ1)の光学中心Oの位置に依らず遮光板204の法線方向に対応するという性質は同じである。 Therefore, if the total thickness of the light-shielding plate 202, the transparent glass 203, and the light-shielding plate 204 is the same as the second member 104 of the second embodiment and the hole diameter, the holes farther away can be seen by the refraction of the glass. (See FIG. 28). Therefore, the size of the mountain base of the brightness distribution of the captured image is larger than that of the second embodiment. However luminance peak position, nature corresponds to the normal direction of the light shielding plate 204 regardless of the position of the optical center O 0 of the stereo camera 10 (first camera 1) is the same.

また第1実施形態の第2部材104と異なり、第3実施形態の角度計測板201は、正面方向以外に、図28の点線で示す方向の、正対していない穴を通る光も透過する。例えば穴207では、穴208と向かい合う穴209の光も屈折の影響で穴207を透過する。 Further, unlike the second member 104 of the first embodiment, the angle measuring plate 201 of the third embodiment transmits light passing through a hole not facing the hole in the direction shown by the dotted line in FIG. 28 in addition to the front direction. For example, in the hole 207, the light of the hole 209 facing the hole 208 also passes through the hole 207 due to the influence of refraction.

したがって角度計測板201を撮影した画像には、第2実施形態の場合と異なり、明暗が周期的に繰り返すモアレ模様が観察される。そのため撮影範囲内に複数の輝度ピークが存在する可能性がある。しかしながら予めステレオカメラ10(第1カメラ1)と計測用具220との設置角度の精度が分かっていれば、設置ずれの範囲に応じた輝度ピークの位置の移動範囲に対応するモアレの周期を考慮することで、正対している穴の輝度ピークの位置を、隣接する穴に対応する輝度ピークと取り違えることを避けることができる。 Therefore, unlike the case of the second embodiment, a moire pattern in which light and darkness repeats periodically is observed in the image taken by the angle measuring plate 201. Therefore, there is a possibility that a plurality of luminance peaks exist in the shooting range. However, if the accuracy of the installation angle between the stereo camera 10 (first camera 1) and the measuring tool 220 is known in advance, the moire cycle corresponding to the movement range of the position of the luminance peak according to the range of the installation deviation is considered. Therefore, it is possible to avoid confusing the position of the brightness peak of the facing hole with the brightness peak corresponding to the adjacent hole.

図29は計測用具220の傾きと、輝度ピークの位置のずれとの関係を説明するための図である。図29のように、計測用具220の設置角度が正対方向から±X度以下の角度ずれを持つ場合、輝度ピークの位置も正対位置(画面中央)からX度以下の範囲に存在する。つまり図30のように、予測される輝度ピークの位置ずれの2倍以上離れた位置に隣接する穴の輝度ピークが来るように穴の間隔を調整すればよい。隣接する穴の輝度ピークの位置は、図31の角度φで決まり(正確にはftan(φ))、角度φは、遮光面の穴ピッチ(p)、ガラス板厚(d)及びガラス屈折率(n)と下記式(12)の関係を持つ。 FIG. 29 is a diagram for explaining the relationship between the inclination of the measuring tool 220 and the deviation of the position of the luminance peak. As shown in FIG. 29, when the installation angle of the measuring tool 220 has an angle deviation of ± X degrees or less from the facing direction, the position of the luminance peak also exists in the range of X degrees or less from the facing position (center of the screen). That is, as shown in FIG. 30, the hole spacing may be adjusted so that the luminance peaks of adjacent holes come to positions that are at least twice the predicted luminance peak misalignment. The position of the brightness peak of the adjacent hole is determined by the angle φ in FIG. 31 (to be exact, ftan (φ)), and the angle φ is the hole pitch (p) of the light-shielding surface, the glass plate thickness (d), and the glass refractive index. It has the relationship between (n) and the following equation (12).

式(12)より、下記式(13)を満たすようにガラス板厚(d)及び穴ピッチ(p)を決めればよいことがわかる。 From the formula (12), it can be seen that the glass plate thickness (d) and the hole pitch (p) may be determined so as to satisfy the following formula (13).

上述の説明では、設置角度の精度のみを考慮して隣接輝度ピークの位置を予測した。しかしながら実際には計測用具220の設置角度以外にも、ステレオカメラ10の設置角度、計測用具220の並進ずれ、及びステレオカメラ10の並進ずれ等、想定されうる全ての設置ずれを考慮して、正対位置を示す輝度ピークの存在範囲を予測する必要がある。そして予測された輝度ピーク位置の範囲内に隣の穴の輝度ピークが入らないように、ガラス板厚(d)及び穴ピッチ(p)を決定すれば、ステレオカメラ10と正対している穴に対応する予測範囲内の輝度ピークの位置を一意に決定することができる。 In the above description, the position of the adjacent brightness peak is predicted only considering the accuracy of the installation angle. However, in reality, in addition to the installation angle of the measuring tool 220, all possible installation deviations such as the installation angle of the stereo camera 10, the translational deviation of the measuring tool 220, and the translational deviation of the stereo camera 10 are taken into consideration. It is necessary to predict the existence range of the luminance peak indicating the opposite position. Then, if the glass plate thickness (d) and the hole pitch (p) are determined so that the brightness peak of the adjacent hole does not fall within the range of the predicted brightness peak position, the hole facing the stereo camera 10 can be obtained. The position of the luminance peak within the corresponding prediction range can be uniquely determined.

遮光板202(204)の作成する際には、平板上に遮光領域を形成する方法として、印刷やフォトエッチング等の技術が利用できる。これらの技術では、一般に、ドリルで厚板に穴を開ける等の方法で作成された第2実施形態の第2部材104に比べて、小径の穴や狭ピッチを実現することが容易である。輝度の山の大きさは、穴の径と板厚の比率(と屈折率)で決まる。例えば板厚(遮光板202、透明ガラス203及び遮光板204の厚さの合計)を6mm、穴半径を0.05mmとしても、第2実施形態の場合とほぼ同様の輝度分布が得られる。 When producing the light-shielding plate 202 (204), techniques such as printing and photo-etching can be used as a method of forming a light-shielding region on the flat plate. In these techniques, it is generally easier to realize a hole with a small diameter and a narrow pitch as compared with the second member 104 of the second embodiment created by a method such as drilling a hole in a thick plate. The size of the peak of brightness is determined by the ratio (and refractive index) of the hole diameter to the plate thickness. For example, even if the plate thickness (total thickness of the light-shielding plate 202, the transparent glass 203, and the light-shielding plate 204) is 6 mm and the hole radius is 0.05 mm, a brightness distribution substantially similar to that in the second embodiment can be obtained.

以上説明したように、第3実施形態の計測用具220では、角度計測板201を、第2実施形態の角度計測板101よりも、より軽量小型の薄い板にしても、第2実施形態の角度計測板101と同等の校正精度が実現できる。 As described above, in the measuring tool 220 of the third embodiment, even if the angle measuring plate 201 is a thinner plate that is lighter and smaller than the angle measuring plate 101 of the second embodiment, the angle of the second embodiment is used. Calibration accuracy equivalent to that of the measuring plate 101 can be realized.

なお単に光を遮るだけならば、透明ガラス203を配置せずに、ガラス両面の遮光領域と同じ位置に遮光板202及び遮光板204を配置してもよい。 If the light is simply blocked, the light-shielding plate 202 and the light-shielding plate 204 may be arranged at the same positions as the light-shielding regions on both sides of the glass without arranging the transparent glass 203.

最後に第1乃至第3実施形態の校正装置30のハードウェア構成の例について説明する。図32は第1乃至第3実施形態のステレオカメラ10及び校正装置30のハードウェア構成の例を示す図である。 Finally, an example of the hardware configuration of the calibration device 30 of the first to third embodiments will be described. FIG. 32 is a diagram showing an example of the hardware configuration of the stereo camera 10 and the calibration device 30 of the first to third embodiments.

第1乃至第3実施形態の校正装置30は、制御装置51、主記憶装置52、補助記憶装置53、表示装置54、入力装置55及び通信装置56を備える。制御装置51、主記憶装置52、補助記憶装置53、表示装置54、入力装置55及び通信装置56は、バス57を介して互いに接続されている。 The calibration device 30 of the first to third embodiments includes a control device 51, a main storage device 52, an auxiliary storage device 53, a display device 54, an input device 55, and a communication device 56. The control device 51, the main storage device 52, the auxiliary storage device 53, the display device 54, the input device 55, and the communication device 56 are connected to each other via the bus 57.

第1乃至第3実施形態のステレオカメラ10は、撮影装置151、撮影装置152、通信装置153、制御装置154、主記憶装置155、補助記憶装置156、表示装置157及び入力装置158を備える。撮影装置151、撮影装置152、通信装置153、制御装置154、主記憶装置155、補助記憶装置156、表示装置157及び入力装置158は、バス159を介して互いに接続されている。 The stereo camera 10 of the first to third embodiments includes a photographing device 151, a photographing device 152, a communication device 153, a control device 154, a main storage device 155, an auxiliary storage device 156, a display device 157, and an input device 158. The photographing device 151, the photographing device 152, the communication device 153, the control device 154, the main storage device 155, the auxiliary storage device 156, the display device 157, and the input device 158 are connected to each other via the bus 159.

制御装置51(制御装置154)はCPUである。制御装置51(制御装置154)は補助記憶装置53(補助記憶装置156)から主記憶装置52(主記憶装置155)に読み出されたプログラムを実行する。主記憶装置52(主記憶装置155)はROMやRAM等のメモリである。補助記憶装置53(補助記憶装置156)はHDD(Hard Disk Drive)やメモリカード等である。表示装置54(表示装置157)は校正装置30(ステレオカメラ10)の状態などを表示する。入力装置55(入力装置158)はユーザーからの入力を受け付ける。校正装置30の通信装置56と、ステレオカメラ10の通信装置153は、有線又は無線のネットワークを介して通信する。 The control device 51 (control device 154) is a CPU. The control device 51 (control device 154) executes a program read from the auxiliary storage device 53 (auxiliary storage device 156) to the main storage device 52 (main storage device 155). The main storage device 52 (main storage device 155) is a memory such as a ROM or a RAM. The auxiliary storage device 53 (auxiliary storage device 156) is an HDD (Hard Disk Drive), a memory card, or the like. The display device 54 (display device 157) displays the state of the calibration device 30 (stereo camera 10) and the like. The input device 55 (input device 158) accepts input from the user. The communication device 56 of the calibration device 30 and the communication device 153 of the stereo camera 10 communicate with each other via a wired or wireless network.

撮影装置151は第1カメラ1(図2参照)に対応する。撮影装置152は第2カメラ2(図2参照)に対応する。 The photographing device 151 corresponds to the first camera 1 (see FIG. 2). The photographing device 152 corresponds to the second camera 2 (see FIG. 2).

第1乃至第3実施形態のステレオカメラ10及び校正装置30で実行されるプログラムは、インストール可能な形式又は実行可能な形式のファイルでCD−ROM、メモリカード、CD−R、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記憶媒体に記憶されてコンピュータ・プログラム・プロダクトとして提供される。 The program executed by the stereo camera 10 and the calibration device 30 of the first to third embodiments is a file in an installable format or an executable format, and is a CD-ROM, a memory card, a CD-R, or a DVD (Digital Versaille Disk). ) Etc. are stored in a computer-readable storage medium and provided as a computer program product.

また、第1乃至第3実施形態のステレオカメラ10及び校正装置30で実行されるプログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また第1乃至第3実施形態のステレオカメラ10及び校正装置30で実行するプログラムをダウンロードさせずにインターネット等のネットワーク経由で提供するように構成してもよい。 Further, the program executed by the stereo camera 10 and the calibration device 30 of the first to third embodiments is stored on a computer connected to a network such as the Internet, and is provided by being downloaded via the network. You may. Further, the program executed by the stereo camera 10 and the calibration device 30 of the first to third embodiments may be provided via a network such as the Internet without being downloaded.

また、第1乃至第3実施形態のステレオカメラ10及び校正装置30のプログラムを、ROM等に予め組み込んで提供するように構成してもよい。 Further, the programs of the stereo camera 10 and the calibration device 30 of the first to third embodiments may be configured to be provided by incorporating them into a ROM or the like in advance.

第1実施形態の校正装置30で実行されるプログラムは、上述した各機能ブロック(受付部31、第1カメラ位置算出部32、第1カメラ方位算出部33、第2カメラ位置算出部34、第2カメラ方位算出部35、理想視差算出部37、視差算出部38及び決定部39)を含むモジュール構成となっている。また第2乃至第3実施形態の校正装置30で実行されるプログラムは、上述した各機能ブロック(受付部131、計測部136、理想視差算出部137、視差算出部138及び決定部139)を含むモジュール構成となっている。 The program executed by the calibration device 30 of the first embodiment includes the above-mentioned functional blocks (reception unit 31, first camera position calculation unit 32, first camera orientation calculation unit 33, second camera position calculation unit 34, first. The module configuration includes two camera orientation calculation units 35, an ideal parallax calculation unit 37, a parallax calculation unit 38, and a determination unit 39). The program executed by the calibration device 30 of the second to third embodiments includes the above-mentioned functional blocks (reception unit 131, measurement unit 136, ideal parallax calculation unit 137, parallax calculation unit 138, and determination unit 139). It has a modular structure.

また第1乃至第3実施形態のステレオカメラ10で実行されるプログラムは、上述した各機能ブロック(補正部5及び算出部6)を含むモジュール構成となっている。 Further, the program executed by the stereo camera 10 of the first to third embodiments has a modular configuration including each functional block (correction unit 5 and calculation unit 6) described above.

上述の各機能ブロックは、実際のハードウェアとしては、制御装置51(制御装置154)が上記記憶媒体からプログラムを読み出して実行することにより、上記各機能ブロックが主記憶装置52(主記憶装置155)上にロードされる。すなわち上記各機能ブロックは、主記憶装置52(主記憶装置155)上に生成される。 In the actual hardware, each of the above-mentioned functional blocks is executed by the control device 51 (control device 154) reading a program from the above-mentioned storage medium, so that each of the above-mentioned functional blocks becomes the main storage device 52 (main storage device 155). ) Loaded on. That is, each of the above functional blocks is generated on the main storage device 52 (main storage device 155).

なお、上述した各機能ブロックの一部又は全部を、ソフトウェアにより実現せずに、IC(Integrated Circuit)等のハードウェアにより実現してもよい。 It should be noted that a part or all of the above-mentioned functional blocks may be realized by hardware such as an IC (Integrated Circuit) without being realized by software.

1 第1カメラ
2 第2カメラ
3 記憶部
4 外部I/F
5 補正部
6 算出部
10 ステレオカメラ
20 計測用具
21 マーク
22 距離計測装置
23 計測点
24 レーザー光
30 校正装置
31 受付部
32 第1カメラ位置算出部
33 第1カメラ方位算出部
34 第2カメラ位置算出部
35 第2カメラ方位算出部
36 距離算出部
37 理想視差算出部
38 視差算出部
39 決定部
51 制御装置
52 主記憶装置
53 補助記憶装置
54 表示装置
55 入力装置
56 通信装置
57 バス
101 角度計測板
102 第1部材(チャート)
103 光源
104 第2部材(遮光板)
120 計測用具
131 受付部
136 計測部
137 理想視差算出部
138 視差算出部
139 決定部
201 角度計測板
202 遮光板
203 透明ガラス
204 遮光板
220 計測用具
1 1st camera 2 2nd camera 3 Storage unit 4 External I / F
5 Correction unit 6 Calculation unit 10 Stereo camera 20 Measuring tool 21 Mark 22 Distance measuring device 23 Measuring point 24 Laser light 30 Calibration device 31 Reception unit 32 1st camera position calculation unit 33 1st camera orientation calculation unit 34 2nd camera position calculation Unit 35 Second camera orientation calculation unit 36 Distance calculation unit 37 Ideal parallax calculation unit 38 Parallax calculation unit 39 Decision unit 51 Control device 52 Main storage device 53 Auxiliary storage device 54 Display device 55 Input device 56 Communication device 57 Bus 101 Angle measurement board 102 First member (chart)
103 Light source 104 Second member (shading plate)
120 Measuring tool 131 Reception unit 136 Measuring unit 137 Ideal parallax calculation unit 138 Parallax calculation unit 139 Determining unit 201 Angle measuring plate 202 Shading plate 203 Transparent glass 204 Shading plate 220 Measuring tool

特許第4109077号公報Japanese Patent No. 41009077

Claims (9)

ステレオカメラを校正する校正方法であって、
前記ステレオカメラの撮影範囲に位置する被写体を含む撮像画像を撮像するステップと、
前記被写体から前記被写体と前記ステレオカメラとの間にある中間計測点までの距離と前記中間計測点から前記ステレオカメラまでの距離とを用いて、前記被写体から前記ステレオカメラまでの距離を取得するステップと、
前記距離と前記撮像画像とに基づいて、前記ステレオカメラを校正する校正パラメータを決定するステップと、
を含む校正方法。
A calibration method for calibrating a stereo camera
A step of capturing an captured image including a subject located in the shooting range of the stereo camera, and
A step of acquiring the distance from the subject to the stereo camera by using the distance from the subject to the intermediate measurement point between the subject and the stereo camera and the distance from the intermediate measurement point to the stereo camera. When,
A step of determining calibration parameters for calibrating the stereo camera based on the distance and the captured image .
Calibration method including.
前記被写体から前記中間計測点までの距離の計測は、レーザー光を用いて行う、請求項1に記載の校正方法。 The calibration method according to claim 1, wherein the measurement of the distance from the subject to the intermediate measurement point is performed using a laser beam. 前記被写体から前記中間計測点までの距離の計測は、巻尺を用いて行う、請求項1に記載の校正方法。 The calibration method according to claim 1, wherein the measurement of the distance from the subject to the intermediate measurement point is performed using a tape measure. 前記中間計測点から、前記ステレオカメラまでの距離を計測するステップをさらに備える、 A step of measuring the distance from the intermediate measurement point to the stereo camera is further provided.
請求項1乃至3の何れか1項に記載の校正方法。 The calibration method according to any one of claims 1 to 3.
前記中間計測点から前記ステレオカメラまでの距離は、予め取得される、請求項1乃至3の何れか1項に記載の校正方法。 The calibration method according to any one of claims 1 to 3, wherein the distance from the intermediate measurement point to the stereo camera is acquired in advance. 前記ステレオカメラは移動体の内部に搭載され、 The stereo camera is mounted inside the moving body and
前記被写体は前記移動体の外部に位置する、 The subject is located outside the moving body,
請求項1乃至5の何れか1項に記載の校正方法。 The calibration method according to any one of claims 1 to 5.
前記ステレオカメラは車両のフロントガラスの内側に搭載され、 The stereo camera is mounted inside the windshield of the vehicle.
前記中間計測点はフロントガラス上であること、 The intermediate measurement point is on the windshield
を特徴とする請求項6に記載の校正方法。 6. The calibration method according to claim 6.
ステレオカメラを校正する校正装置であって、 A calibration device that calibrates a stereo camera
前記ステレオカメラの撮像範囲に位置する被写体を含む撮像画像を撮像する撮像部と、 An imaging unit that captures an captured image including a subject located in the imaging range of the stereo camera, and an imaging unit.
前記被写体から前記被写体と前記ステレオカメラとの間にある中間計測点までの距離と前記中間計測点から前記ステレオカメラまでの距離とを用いて、前記被写体から前記ステレオカメラまでの距離を取得する取得部と、 Acquisition to acquire the distance from the subject to the stereo camera by using the distance from the subject to the intermediate measurement point between the subject and the stereo camera and the distance from the intermediate measurement point to the stereo camera. Department and
前記距離と前記撮像画像とに基づいて、前記ステレオカメラを校正する校正パラメータを決定する決定部と、 A determination unit that determines calibration parameters for calibrating the stereo camera based on the distance and the captured image.
を含む校正装置。Calibration equipment including.
ステレオカメラを校正するプロセッサに、 For processors that calibrate stereo cameras
前記ステレオカメラの撮像範囲に位置する被写体を含む撮像画像を撮像するステップと、 A step of capturing an captured image including a subject located in the imaging range of the stereo camera, and
前記被写体から前記被写体と前記ステレオカメラとの間にある中間計測点までの距離と前記中間計測点から前記ステレオカメラまでの距離とを用いて、前記被写体から前記ステレオカメラまでの距離を取得するステップと、 A step of acquiring the distance from the subject to the stereo camera by using the distance from the subject to the intermediate measurement point between the subject and the stereo camera and the distance from the intermediate measurement point to the stereo camera. When,
前記距離と前記撮像画像とに基づいて、前記ステレオカメラを校正する校正パラメータを決定するステップと、 A step of determining calibration parameters for calibrating the stereo camera based on the distance and the captured image.
を実施させるプログラム。Program to carry out.
JP2019211643A 2014-01-28 2019-11-22 Calibration method, calibration equipment, and program Active JP6791341B2 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2014013520 2014-01-28
JP2014013520 2014-01-28
JP2014112737 2014-05-30
JP2014112737 2014-05-30

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2018229198A Division JP6620869B2 (en) 2014-01-28 2018-12-06 Calibration method, calibration apparatus, and program

Publications (3)

Publication Number Publication Date
JP2020030221A JP2020030221A (en) 2020-02-27
JP2020030221A5 JP2020030221A5 (en) 2020-08-20
JP6791341B2 true JP6791341B2 (en) 2020-11-25

Family

ID=66544031

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2018229198A Active JP6620869B2 (en) 2014-01-28 2018-12-06 Calibration method, calibration apparatus, and program
JP2019211643A Active JP6791341B2 (en) 2014-01-28 2019-11-22 Calibration method, calibration equipment, and program

Family Applications Before (1)

Application Number Title Priority Date Filing Date
JP2018229198A Active JP6620869B2 (en) 2014-01-28 2018-12-06 Calibration method, calibration apparatus, and program

Country Status (1)

Country Link
JP (2) JP6620869B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7308095B2 (en) * 2019-08-07 2023-07-13 日立Astemo株式会社 Stereo camera correction method and stereo camera correction device
JP7386098B2 (en) * 2020-02-27 2023-11-24 株式会社日立製作所 Distance sensor calibration system and distance sensor calibration method
CN113720262B (en) * 2021-08-31 2023-06-09 钟庆生 Calibration method of three-dimensional measurement software
CN114095657B (en) * 2021-11-22 2024-02-27 成都天翼空间科技有限公司 Automatic calibration method and system based on newly added camera
CN116777999A (en) * 2023-06-28 2023-09-19 深圳市度申科技有限公司 Multi-adaptability high-level flat field correction method for area array camera

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3436074B2 (en) * 1997-06-10 2003-08-11 トヨタ自動車株式会社 Car stereo camera
JP3666348B2 (en) * 2000-03-27 2005-06-29 豊田工機株式会社 Distance recognition device
SG138491A1 (en) * 2006-06-21 2008-01-28 Generic Power Pte Ltd Method and apparatus for 3-dimensional vision and inspection of ball and like protrusions of electronic components
JP5471356B2 (en) * 2009-11-24 2014-04-16 オムロン株式会社 Calibration method for three-dimensional measurement and three-dimensional visual sensor
JP2012167944A (en) * 2011-02-10 2012-09-06 Ricoh Co Ltd Stereo camera calibration method and device
JP2012198075A (en) * 2011-03-18 2012-10-18 Ricoh Co Ltd Stereoscopic camera device and image adjusting method
JP6044868B2 (en) * 2012-06-26 2016-12-14 株式会社リコー Stereo camera calibration apparatus and method, and distance measurement apparatus
CN103438798B (en) * 2013-08-27 2016-01-20 北京航空航天大学 Initiative binocular vision system overall calibration

Also Published As

Publication number Publication date
JP2020030221A (en) 2020-02-27
JP2019074535A (en) 2019-05-16
JP6620869B2 (en) 2019-12-18

Similar Documents

Publication Publication Date Title
JP6447055B2 (en) Calibration method, calibration device, measuring tool and program
JP6791341B2 (en) Calibration method, calibration equipment, and program
JP6427900B2 (en) Calibration method, calibration system, program, and moving object
JP6327370B2 (en) Measuring tool, calibration method, calibration apparatus, and program
EP2902967B1 (en) Stereo camera calibration method, disparity calculating device, and stereo camera
US20140174149A1 (en) Calibration method for trigonometric-based ranging systems in multiple media
CN113824942B (en) Trapezoidal correction method, apparatus, projector, and computer-readable storage medium
JP2016186421A (en) Image processing method
JP6582683B2 (en) Angle calculation system, angle calculation device, program, and angle calculation method
JP5487946B2 (en) Camera image correction method, camera apparatus, and coordinate transformation parameter determination apparatus
JP2019132855A (en) Stereo camera calibration method, parallax calculation device, and stereo camera
JP2018009927A (en) Image processing device, image processing method and program
JP6680335B2 (en) Stereo camera, vehicle, calculation method and program
JP6996582B2 (en) Calibration method, calibration equipment and program
JP2006330772A (en) Distortion correction method for photographic image
CN108038888B (en) Space calibration method and device of hybrid camera system
KR20220035185A (en) Image processing apparatus, image processing method, program and storage medium
CN114359404A (en) Calibration method of automatic driving vehicle-mounted scene projection camera
JP2020190438A (en) Measuring device and measuring system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191218

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200623

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200916

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20201006

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201019

R151 Written notification of patent or utility model registration

Ref document number: 6791341

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151