JP7099832B2 - Distance measuring device and calibration parameter estimation method - Google Patents

Distance measuring device and calibration parameter estimation method Download PDF

Info

Publication number
JP7099832B2
JP7099832B2 JP2018034510A JP2018034510A JP7099832B2 JP 7099832 B2 JP7099832 B2 JP 7099832B2 JP 2018034510 A JP2018034510 A JP 2018034510A JP 2018034510 A JP2018034510 A JP 2018034510A JP 7099832 B2 JP7099832 B2 JP 7099832B2
Authority
JP
Japan
Prior art keywords
image
calibration
calibration parameter
measuring device
distance measuring
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
JP2018034510A
Other languages
Japanese (ja)
Other versions
JP2019148548A (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.)
Toyota School Foundation
Denso Corp
Original Assignee
Toyota School Foundation
Denso Corp
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 Toyota School Foundation, Denso Corp filed Critical Toyota School Foundation
Priority to JP2018034510A priority Critical patent/JP7099832B2/en
Publication of JP2019148548A publication Critical patent/JP2019148548A/en
Application granted granted Critical
Publication of JP7099832B2 publication Critical patent/JP7099832B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement Of Optical Distance (AREA)

Description

本開示は、測距装置および較正パラメータの推定方法に関する。 The present disclosure relates to distance measuring devices and methods for estimating calibration parameters.

近年、車両の自動運転制御において、複数の撮像装置を用いて対象物までの距離を測定する測距装置が用いられている。例えば、特許文献1には、2つの撮像装置によって撮像された2つの画像に基づき、カメラパラメータ(内部パラメータ、外部パラメータ、歪み係数)を較正(キャリブレーション)する技術が開示されている。 In recent years, in the automatic driving control of a vehicle, a distance measuring device that measures a distance to an object by using a plurality of image pickup devices has been used. For example, Patent Document 1 discloses a technique for calibrating camera parameters (internal parameters, external parameters, distortion coefficients) based on two images captured by two imaging devices.

特開2012-75060号公報Japanese Unexamined Patent Publication No. 2012-75060

車両の自動運転制御では、測距された距離は、車両の緊急ブレーキや車間距離の調整等に利用されるため、測定誤差は小さい方が好ましい。そのため、測距装置に備えられた撮像装置を精度良く較正することのできる技術が求められている。このような課題は、自動運転制御用の測距装置に限らず、他の用途に用いられる測距装置にも共通した課題である。 In the automatic driving control of a vehicle, the measured distance is used for emergency braking of the vehicle, adjustment of the inter-vehicle distance, and the like, so it is preferable that the measurement error is small. Therefore, there is a demand for a technique capable of accurately calibrating the image pickup device provided in the distance measuring device. Such a problem is common not only to the distance measuring device for automatic driving control but also to the distance measuring device used for other purposes.

本開示は、上述の課題の少なくとも一部を解決するためになされたものであり、以下の形態として実現することが可能である。 The present disclosure has been made to solve at least a part of the above-mentioned problems, and can be realized as the following forms.

本開示の一形態によれば、測距装置(100)が提供される。この測距装置(100)は、第1撮像装置(10)によって対象物が撮像された第1画像と、第2撮像装置(20)によって前記対象物が撮像された第2画像とを取得する画像取得部(30)と;前記第1画像および第2画像を較正するための較正パラメータを、前記第1画像および前記第2画像に共通する特徴の対応点の位置に基づき推定する較正パラメータ推定部(40)と;推定された前記較正パラメータに基づき前記第1画像および前記第2画像を較正する画像較正部(60)と;較正された前記第1画像および前記第2画像を用いて前記対象物までの距離を算出する距離算出部(70)と;を備える。そして、前記較正パラメータ推定部(40)は、前記較正パラメータおよび前記対応点の位置を更新しながら、前記較正パラメータの更新前後の変化量を表す項と、前記対応点の位置の更新前後の変化量を表す項と、を含む評価関数から算出される評価値を、繰り返し算出して最適化することにより、前記較正パラメータの推定を行い、前記較正パラメータ推定部は、前記較正パラメータとして、少なくとも回転パラメータと並進パラメータとを推定することを特徴とする。 According to one embodiment of the present disclosure, a ranging device (100) is provided. The ranging device (100) acquires a first image in which the object is imaged by the first image pickup device (10) and a second image in which the object is imaged by the second image pickup device (20). With the image acquisition unit (30); Calibration parameter estimation that estimates the calibration parameters for calibrating the first image and the second image based on the positions of the corresponding points of the features common to the first image and the second image. With the image calibrator (60) that calibrates the first and second images based on the estimated calibration parameters; with the calibrated first and second images. A distance calculation unit (70) for calculating the distance to the object and; Then, the calibration parameter estimation unit (40) updates the calibration parameter and the position of the corresponding point, and represents the amount of change before and after the update of the calibration parameter, and the change before and after the position of the corresponding point is updated. The calibration parameter is estimated by repeatedly calculating and optimizing the evaluation value calculated from the evaluation function including the term representing the quantity, and the calibration parameter estimation unit uses at least the calibration parameter as the calibration parameter. It is characterized by estimating rotation parameters and translational parameters .

この形態の制御装置によれば、較正パラメータだけではなく、第1画像および第2画像に共通する対応点の位置を更新しながら評価値を最適化して較正パラメータを推定するので、第1撮像装置および第2撮像装置によって撮像された画像を精度よく較正することができる。そのため、対象物までの距離を正確に測定することができる。 According to the control device of this form, not only the calibration parameters but also the evaluation values are optimized and the calibration parameters are estimated while updating the positions of the corresponding points common to the first image and the second image. And the image captured by the second image pickup device can be calibrated with high accuracy. Therefore, the distance to the object can be measured accurately.

本開示は、測距装置以外の種々の形態で実現することも可能である。例えば、較正パラメータの推定方法や測距方法、それらの方法を実現するためのコンピュータプログラム、コンピュータプログラムを記録した一時的でない有形の記録媒体等の形態で実現できる。 The present disclosure can also be realized in various forms other than the distance measuring device. For example, it can be realized in the form of a calibration parameter estimation method, a distance measuring method, a computer program for realizing those methods, a non-temporary tangible recording medium on which the computer program is recorded, and the like.

測距装置のブロック図。Block diagram of the ranging device. 較正パラメータ推定処理のフローチャート。Flowchart of calibration parameter estimation process. 比較例における回転パラメータ(ピッチ)の推定結果を示すグラフ。The graph which shows the estimation result of the rotation parameter (pitch) in the comparative example. 比較例における回転パラメータ(ロール)の推定結果を示すグラフ。The graph which shows the estimation result of the rotation parameter (roll) in the comparative example. 比較例における回転パラメータ(ヨー)の推定結果を示すグラフ。The graph which shows the estimation result of the rotation parameter (yaw) in the comparative example. 実施形態における回転パラメータ(ピッチ)の推定結果を示すグラフ。The graph which shows the estimation result of the rotation parameter (pitch) in an embodiment. 実施形態における回転パラメータ(ロール)の推定結果を示すグラフ。The graph which shows the estimation result of the rotation parameter (roll) in an embodiment. 実施形態における回転パラメータ(ヨー)の推定結果を示すグラフ。The graph which shows the estimation result of the rotation parameter (yaw) in an embodiment.

A.第1実施形態:
A1.装置構成:
図1に示すように、本開示の第1実施形態における測距装置100は、画像取得部30と、較正パラメータ推定部40と、較正パラメータ記憶部50と、画像較正部60と、距離算出部70とを備える。測距装置100には、第1撮像装置10および第2撮像装置20が接続されている。測距装置100は、車両に搭載され、緊急ブレーキや車間距離の調整といった自動運転制御に用いられる。
A. First Embodiment:
A1. Device configuration:
As shown in FIG. 1, the distance measuring device 100 according to the first embodiment of the present disclosure includes an image acquisition unit 30, a calibration parameter estimation unit 40, a calibration parameter storage unit 50, an image calibration unit 60, and a distance calculation unit. 70 and. A first image pickup device 10 and a second image pickup device 20 are connected to the distance measuring device 100. The distance measuring device 100 is mounted on a vehicle and is used for automatic driving control such as emergency braking and adjustment of inter-vehicle distance.

測距装置100は、CPUやRAM、不揮発性メモリ等を備えるコンピュータによって構成されている。CPUは、不揮発性メモリに記憶された制御プログラムをRAMにロードして実行することによって、画像取得部30、較正パラメータ推定部40、画像較正部60、距離算出部70、として機能する。これらの機能部は、各種の回路によってハードウェア的に実現されてもよい。較正パラメータ記憶部50は、不揮発性メモリ内に確保された記憶領域である。 The distance measuring device 100 is composed of a computer including a CPU, RAM, a non-volatile memory, and the like. The CPU functions as an image acquisition unit 30, a calibration parameter estimation unit 40, an image calibration unit 60, and a distance calculation unit 70 by loading and executing a control program stored in the non-volatile memory in the RAM. These functional parts may be realized in hardware by various circuits. The calibration parameter storage unit 50 is a storage area reserved in the non-volatile memory.

画像取得部30は、対象物200を異なる位置から撮像して得られた第1画像および第2画像を取得する。本実施形態では、画像取得部30は、第1撮像装置10から第1画像を取得し、第2撮像装置20から第2画像を取得する。第1撮像装置10は、第2撮像装置20の左側に配置されており、左側の画像(第1画像)を撮像する。第2撮像装置は、第1撮像装置10の右側に配置されており、右側の画像(第2画像)を撮像する。第1撮像装置10のことを左カメラともいい、第2撮像装置20のことを右カメラともいう。第1撮像装置10と第2撮像装置20とをあわせてステレオカメラともいう。 The image acquisition unit 30 acquires the first image and the second image obtained by imaging the object 200 from different positions. In the present embodiment, the image acquisition unit 30 acquires the first image from the first image pickup device 10 and acquires the second image from the second image pickup device 20. The first image pickup device 10 is arranged on the left side of the second image pickup device 20 and captures an image on the left side (first image). The second image pickup device is arranged on the right side of the first image pickup device 10 and captures an image on the right side (second image). The first image pickup device 10 is also referred to as a left camera, and the second image pickup device 20 is also referred to as a right camera. The first image pickup device 10 and the second image pickup device 20 are collectively referred to as a stereo camera.

較正パラメータ推定部40は、第1画像および第2画像を較正するための較正パラメータを、第1画像および第2画像に共通する特徴の対応点の位置に基づき推定する。較正パラメータとは、第1画像および第2画像の視差に基づき対象物200までの距離を測定可能とするために、これらの画像を補正(較正)するためのパラメータである。本実施形態では、第1撮像装置10および第2撮像装置20の内部パラメータ(焦点距離、画像中心、アスペクト比、スキュー)および歪み係数は既知であるものとし、較正パラメータとして、外部パラメータを推定する。外部パラメータとは、撮像装置の回転パラメータおよび並進パラメータのことをいう。外部パラメータは、回転方向に3自由度、並進方向に3自由度の計6自由度を有するパラメータである。 The calibration parameter estimation unit 40 estimates the calibration parameters for calibrating the first image and the second image based on the positions of the corresponding points of the features common to the first image and the second image. The calibration parameter is a parameter for correcting (calibrating) these images so that the distance to the object 200 can be measured based on the parallax of the first image and the second image. In the present embodiment, it is assumed that the internal parameters (focal length, image center, aspect ratio, skew) and distortion coefficient of the first image pickup apparatus 10 and the second image pickup apparatus 20 are known, and external parameters are estimated as calibration parameters. .. The external parameters refer to the rotation parameters and translation parameters of the image pickup device. The external parameter is a parameter having a total of 6 degrees of freedom, 3 degrees of freedom in the rotation direction and 3 degrees of freedom in the translation direction.

本実施形態では、較正パラメータ推定部40は、較正パラメータおよび対応点の位置を更新しながら、較正パラメータの更新前後の変化量を表す項と、対応点の位置の更新前後の変化量を表す項と、を含む評価関数から算出される評価値を、繰り返し算出して最適化することにより、較正パラメータを推定する。評価関数や最適化の詳細については後で詳しく説明する。推定された較正パラメータは、較正パラメータ記憶部50に記憶される。 In the present embodiment, the calibration parameter estimation unit 40 updates the calibration parameter and the position of the corresponding point, and represents a term indicating the amount of change before and after updating the calibration parameter and a term representing the amount of change before and after updating the position of the corresponding point. The calibration parameters are estimated by repeatedly calculating and optimizing the evaluation values calculated from the evaluation function including. The details of the evaluation function and optimization will be described in detail later. The estimated calibration parameters are stored in the calibration parameter storage unit 50.

画像較正部60は、較正パラメータ記憶部50に記憶された較正パラメータに基づき第1画像および第2画像を較正する。本実施形態において、「第1画像および第2画像を較正する」とは、後述する距離算出部70が、画像中に撮像された対象物200までの距離を算出可能なように、較正パラメータを用いて第1画像および第2画像の少なくとも一方を補正することをいい、第1画像のみを補正することと、第2画像のみを補正することと、第1画像および第2画像の両方を補正することと、のいずれかを含む。 The image calibration unit 60 calibrates the first image and the second image based on the calibration parameters stored in the calibration parameter storage unit 50. In the present embodiment, "calibrating the first image and the second image" means to set a calibration parameter so that the distance calculation unit 70, which will be described later, can calculate the distance to the object 200 captured in the image. Use to correct at least one of the first and second images, to correct only the first image, to correct only the second image, and to correct both the first and second images. Including either to do or.

距離算出部70は、画像較正部60によって較正された第1画像および第2画像を用いて、これらの画像に共通して撮像された対象物200までの距離を算出する。距離の算出は、三角測量法によって行われる。三角測量法は周知の技術であるため、説明は省略する。距離算出部70によって算出された距離は、車両のECU(Electronic Control Unit)に出力され、緊急ブレーキや車間距離の調整といった自動運転制御に用いられる。 The distance calculation unit 70 calculates the distance to the object 200 commonly captured in these images by using the first image and the second image calibrated by the image calibration unit 60. The distance is calculated by the triangulation method. Since the triangulation method is a well-known technique, the description thereof will be omitted. The distance calculated by the distance calculation unit 70 is output to the ECU (Electronic Control Unit) of the vehicle and used for automatic driving control such as emergency braking and adjustment of the inter-vehicle distance.

A2.処理内容:
図2は、測距装置100によって実行される較正パラメータ推定処理のフローチャートである。この処理は、測距装置100の動作中に所定の周期で繰り返し実行される処理である。
A2. Processing content:
FIG. 2 is a flowchart of the calibration parameter estimation process executed by the ranging device 100. This process is a process that is repeatedly executed at a predetermined cycle during the operation of the distance measuring device 100.

較正パラメータ推定処理が開始されると、まず、測距装置100は、現在が、較正パラメータの更新タイミングであるか否かを判断する(ステップS10)。本実施形態において、測距装置100は、10分経過するごとに更新タイミングであると判断する。その他、例えば、測距装置100は、測距装置100が搭載された車両が静止したタイミングや、測距装置100が搭載された車両において距離が用いられる運転制御が実行されていない走行中のタイミングに、較正パラメータの更新タイミングであると判断してもよい。 When the calibration parameter estimation process is started, the ranging device 100 first determines whether or not it is the timing for updating the calibration parameter (step S10). In the present embodiment, the distance measuring device 100 determines that the update timing is reached every 10 minutes. In addition, for example, the distance measuring device 100 is a timing at which the vehicle equipped with the distance measuring device 100 is stationary, or a timing during traveling in which the driving control using the distance is not executed in the vehicle equipped with the distance measuring device 100. In addition, it may be determined that it is the update timing of the calibration parameter.

測距装置100は、現在が、較正パラメータの更新タイミングではないと判断した場合には(ステップS10:No)、当該較正パラメータ推定処理を終了する。一方、現在が、較正パラメータの更新タイミングであると判断した場合には(ステップS10:Yes)、測距装置100は、較正パラメータの初期値を較正パラメータ記憶部50から読み込む(ステップS20)。較正パラメータの初期値とは、当該較正パラメータ推定処理が過去に実行済みであれば、前回の較正パラメータ推定処理において推定された値である。これに対して、当該較正パラメータ推定処理が過去に一度も実行されたことがなければ、当該測距装置100の工場出荷時に較正パラメータ記憶部50に記憶された値である。なお、当該較正パラメータ推定処理が過去に一度も実行されたことがない場合、工場出荷時に記憶された値ではなく、較正パラメータの設計値や、測距装置100が搭載された車両の走行中に当該較正パラメータ推定処理と同様の処理を実行して推定した仮の較正パラメータの値を初期値として用いてもよい。 When the distance measuring device 100 determines that it is not the timing for updating the calibration parameter (step S10: No), the distance measuring device 100 ends the calibration parameter estimation process. On the other hand, when it is determined that it is the timing for updating the calibration parameter (step S10: Yes), the ranging device 100 reads the initial value of the calibration parameter from the calibration parameter storage unit 50 (step S20). The initial value of the calibration parameter is a value estimated in the previous calibration parameter estimation process if the calibration parameter estimation process has been executed in the past. On the other hand, if the calibration parameter estimation process has never been executed in the past, it is a value stored in the calibration parameter storage unit 50 at the time of shipment from the factory of the distance measuring device 100. If the calibration parameter estimation process has never been executed in the past, it is not the value stored at the time of shipment from the factory, but the design value of the calibration parameter or while the vehicle equipped with the distance measuring device 100 is running. The value of the provisional calibration parameter estimated by executing the same process as the calibration parameter estimation process may be used as the initial value.

較正パラメータの初期値を読み込むと、測距装置100の画像取得部30が、第1撮像装置10から第1画像を取得するとともに、第2撮像装置20から第2画像を取得する(ステップS30)。第1画像と第2画像とは、同一のタイミングで第1撮像装置10および第2撮像装置20により撮像された画像である。 When the initial value of the calibration parameter is read, the image acquisition unit 30 of the distance measuring device 100 acquires the first image from the first image pickup device 10 and the second image from the second image pickup device 20 (step S30). .. The first image and the second image are images captured by the first image pickup device 10 and the second image pickup device 20 at the same timing.

これら2つの画像を取得すると、測距装置100の較正パラメータ推定部40が、2つの画像において同じ特徴を有する対応点を特定する(ステップS40)。本実施形態では、較正パラメータとして、6つの自由度を有する外部パラメータの推定を行うため、少なくとも5つの対応点を特定する。較正パラメータ推定部40は、対応点の特定の際に、RANSAC(Random Sampling Consensus)等のロバスト推定によって外れ値を除去してもよい。特徴点の抽出および対応点の特定は、周知の種々のアルゴリズムを用いて行うことが可能であり、手法は特に限定されない。 When these two images are acquired, the calibration parameter estimation unit 40 of the ranging device 100 identifies corresponding points having the same characteristics in the two images (step S40). In this embodiment, at least five corresponding points are specified in order to estimate an external parameter having six degrees of freedom as a calibration parameter. The calibration parameter estimation unit 40 may remove outliers by robust estimation such as RANSAC (Random Sampling Consensus) when specifying the corresponding points. Extraction of feature points and identification of corresponding points can be performed using various well-known algorithms, and the method is not particularly limited.

較正パラメータ推定部40は、2つの画像から対応点を特定すると、較正パラメータおよび対応点の位置を更新しながら以下の式(1)によって表される評価関数(コスト関数ともいう)を用いて評価値EVを算出する(ステップS50)。較正パラメータ推定部40は、本実施形態では勾配法を用いて、この評価値EVが小さくなるように、較正パラメータおよび対応点を次々に更新することによって評価値を最適化して較正パラメータを求める。つまり、本実施形態では、較正パラメータの推定にあたり、較正パラメータだけではなく、対応点の位置も更新しながら、較正パラメータの推定を行う。なお、他の実施形態では、勾配法ではなく、レーベンバーグ・マーカート法等の最適化手法を用いてもよい。 When the calibration parameter estimation unit 40 identifies the corresponding point from the two images, it evaluates using the evaluation function (also referred to as a cost function) represented by the following equation (1) while updating the calibration parameter and the position of the corresponding point. The value EV is calculated (step S50). In the present embodiment, the calibration parameter estimation unit 40 uses the gradient method to optimize the evaluation value and obtain the calibration parameter by updating the calibration parameter and the corresponding point one after another so that the evaluation value EV becomes small. That is, in the present embodiment, when estimating the calibration parameter, the calibration parameter is estimated while updating not only the calibration parameter but also the position of the corresponding point. In other embodiments, an optimization method such as the Levenberg-Marquardt method may be used instead of the gradient method.

EV=|(更新後の対応点の位置)-(特定された対応点の位置)|
+|(更新後の較正パラメータ)-(較正パラメータの初期値)|
+|(第1撮像装置および第2撮像装置の位置の一致度)| ・・・(1)
EV = | (Position of corresponding point after update)-(Position of specified corresponding point) | 2
+ | (Updated calibration parameters)-(Initial values of calibration parameters) | 2
+ | (Degree of coincidence between the positions of the first image pickup device and the second image pickup device) | 2 ... (1)

上記式(1)において、右辺の第1項は、対応点の位置の更新前後の変化量を表し、第2項は、較正パラメータの更新前後の変化量を表す。右辺の第3項は、左右カメラの幾何拘束ともいう。式(1)の詳細、および、これを用いた最適化の手法については後で詳しく説明する。 In the above equation (1), the first term on the right side represents the amount of change before and after the update of the position of the corresponding point, and the second term represents the amount of change before and after the update of the calibration parameter. The third term on the right side is also called the geometric constraint of the left and right cameras. The details of the equation (1) and the optimization method using the equation (1) will be described in detail later.

較正パラメータ推定部40は、評価値EVを算出すると、最適化が完了したか否かを判断する(ステップS60)。較正パラメータ推定部40は、評価値EVの最小値が探索された場合、評価値EVが所定の閾値よりも小さくなった場合、または、上記ステップS50およびステップS60を繰り返し実行している時間が予め定められた時間を経過した場合に、最適化が完了したと判断する。較正パラメータ推定部40は、最適化が完了していないと判断した場合には(ステップS60:No)、処理をステップS50に戻して、評価値EVが小さくなるように、較正パラメータおよび対応点を更新する。 When the calibration parameter estimation unit 40 calculates the evaluation value EV, it determines whether or not the optimization is completed (step S60). The calibration parameter estimation unit 40 determines in advance that the minimum value of the evaluation value EV is searched for, the evaluation value EV becomes smaller than a predetermined threshold value, or the steps S50 and S60 are repeatedly executed. When the specified time has passed, it is judged that the optimization is completed. If the calibration parameter estimation unit 40 determines that the optimization has not been completed (step S60: No), the process is returned to step S50, and the calibration parameters and corresponding points are set so that the evaluation value EV becomes small. Update.

較正パラメータ推定部40は、最適化が完了したと判断した場合には(ステップS60:Yes)、最適化が完了した時点での較正パラメータ、つまり、今回推定された較正パラメータと、ステップS20で読み込んだ初期値(前回推定された較正パラメータ)とを比較して、その差が予め定めた許容範囲内であるか否かを判断する(ステップS70)。 When the calibration parameter estimation unit 40 determines that the optimization is completed (step S60: Yes), the calibration parameter at the time when the optimization is completed, that is, the calibration parameter estimated this time and the calibration parameter are read in step S20. However, it is compared with the initial value (calibration parameter estimated last time), and it is determined whether or not the difference is within a predetermined allowable range (step S70).

較正パラメータ推定部40は、今回と前回の較正パラメータの差が許容範囲外であると判断した場合には(ステップS70:No)、今回推定された較正パラメータを破棄する(ステップS80)。従って、この場合、較正パラメータ記憶部50には、過去に推定された較正パラメータがそのまま保存された状態になる。これに対して、較正パラメータ推定部40は、較正パラメータの変化が許容範囲内であると判断すれば(ステップS70:Yes)、較正パラメータ記憶部50に記憶されている過去の較正パラメータを消去して、最適化が完了した時点における較正パラメータを較正パラメータ記憶部50に保存する(ステップS90)。以上で説明した一連の処理によって較正パラメータ推定処理は終了する。 When the calibration parameter estimation unit 40 determines that the difference between the current calibration parameter and the previous calibration parameter is out of the allowable range (step S70: No), the calibration parameter estimation unit 40 discards the calibration parameter estimated this time (step S80). Therefore, in this case, the calibration parameter storage unit 50 is in a state where the calibration parameters estimated in the past are stored as they are. On the other hand, if the calibration parameter estimation unit 40 determines that the change in the calibration parameter is within the allowable range (step S70: Yes), the calibration parameter estimation unit 40 erases the past calibration parameter stored in the calibration parameter storage unit 50. Then, the calibration parameter at the time when the optimization is completed is stored in the calibration parameter storage unit 50 (step S90). The calibration parameter estimation process is completed by the series of processes described above.

A3.最適化の詳細:
以下では、上述した評価関数を用いた最適化について説明する。第1撮像装置10(左カメラ)のカメラ座標系の位置(u,v)と、実空間上の位置(X,Y,Z)との対応関係は、次の式(2)によって表される。Kは、第1撮像装置10の内部パラメータであり、本実施形態では定数である。また、Iは単位行列である。
A3. Optimization details:
In the following, optimization using the evaluation function described above will be described. The correspondence between the position ( ul, v l ) of the camera coordinate system of the first image pickup device 10 (left camera) and the position (X, Y, Z) in the real space is expressed by the following equation (2). Will be done. K is an internal parameter of the first image pickup apparatus 10, and is a constant in the present embodiment. Further, I is an identity matrix.

Figure 0007099832000001
Figure 0007099832000001

第2撮像装置20(右カメラ)のカメラ座標系の位置(u,u)と、実空間上の位置(X,Y,Z)との対応関係は、次の式(3)によって表される。Kは、第2撮像装置20の内部パラメータであり、本実施形態では定数である。このKは、第1撮像装置10のKと同じ値でもよいし、異なる値でもよい。[R,T]は外部パラメータであり、Rは、回転パラメータ(rx,ry,rz)を表し、Tは並進パラメータ(tx,ty,tz)を表す。なお、rxをピッチ、ryをヨー、rzをロールともいう。 The correspondence between the position ( ur , ur ) of the camera coordinate system of the second image pickup apparatus 20 (right camera) and the position (X, Y, Z) in the real space is expressed by the following equation (3). Will be done. K is an internal parameter of the second image pickup apparatus 20, and is a constant in the present embodiment. This K may be the same value as K of the first image pickup apparatus 10, or may be a different value. [R, T] is an external parameter, R represents a rotation parameter (rx, ry, rz), and T represents a translation parameter (tx, ty, tz). In addition, rx is also referred to as pitch, ry is also referred to as yaw, and rz is also referred to as roll.

Figure 0007099832000002
Figure 0007099832000002

上記式(2)および上記(3)より、次の式(4)が求められ、式(4)は、式(5)のように表すことができる。 From the above equation (2) and the above equation (3), the following equation (4) can be obtained, and the equation (4) can be expressed as the equation (5).

Figure 0007099832000003
Figure 0007099832000003

Figure 0007099832000004
Figure 0007099832000004

そして、式(5)は、次の式(6)(7)として表される。 Then, the equation (5) is expressed as the following equations (6) and (7).

Figure 0007099832000005
Figure 0007099832000005

ここで、左画像(第1画像)の座標と、右画像(第2画像)の座標との対応関係は、次の式(8)によって表される。本実施形態ではKは既知であるため、外部パラメータ[R,t]が決定されれば、距離算出部70は、対象物200の右画像における座標と左画像における座標から、その奥行き方向の位置Zを算出できる。 Here, the correspondence between the coordinates of the left image (first image) and the coordinates of the right image (second image) is expressed by the following equation (8). Since K is known in this embodiment, if the external parameter [R, t] is determined, the distance calculation unit 70 is positioned in the depth direction from the coordinates in the right image and the coordinates in the left image of the object 200. Z can be calculated.

(右画像の座標)=Z*K*[R,t]*(左画像の座標) ・・・(8) (Coordinates of the right image) = Z * K * [R, t] * (Coordinates of the left image) ・ ・ ・ (8)

上記式(1)によって表される評価関数の右辺は、上記式(6)および式(7)により、以下の式(9)のように表すことができる。 The right-hand side of the evaluation function represented by the above equation (1) can be expressed as the following equation (9) by the above equations (6) and (7).

Figure 0007099832000006
Figure 0007099832000006

式(9)の第1項、第2項、第3項は、式(1)の右辺の第1項、第2項、第3項に対応する。つまり、第1項は、対応点の位置の更新前後の変化量を表し、第2項は、較正パラメータの更新前後の変化量を表し、第3項は、第1撮像装置および第2撮像装置の位置の一致度を表す。ただし、式(9)では、式(1)の評価関数における第3項の影響度を任意に設定可能とするため、任意の定数λを導入している。 The first, second, and third terms of the equation (9) correspond to the first, second, and third terms on the right side of the equation (1). That is, the first term represents the amount of change before and after the update of the position of the corresponding point, the second term represents the amount of change before and after the update of the calibration parameter, and the third term represents the first image pickup device and the second image pickup device. Represents the degree of coincidence of the positions of. However, in the equation (9), an arbitrary constant λ is introduced in order to make it possible to arbitrarily set the degree of influence of the third term in the evaluation function of the equation (1).

上記式(9)の第3項の括弧内をx座標とy座標とに分離して考える。x座標については、以下の式(10)によって、コスト関数cost1として表され、y座標については、以下の式(11)によって、コスト関数cost2として表される。 Consider the inside of the parentheses of the third term of the above equation (9) separately for the x-coordinate and the y-coordinate. The x-coordinate is expressed as the cost function cost1 by the following equation (10), and the y-coordinate is expressed as the cost function cost2 by the following equation (11).

cost1 = ty - v2*(tz + Z*v1*sin(rx) + Z*cos(rx)*cos(ry) - Z*u1*cos(rx)*sin(ry)) + Z*(sin(ry)*sin(rz) - cos(ry)*cos(rz)*sin(rx)) + Z*u1*(cos(ry)*sin(rz) + cos(rz)*sin(rx)*sin(ry)) + Z*v1*cos(rx)*cos(rz) ・・・(10) cost1 = ty --v2 * (tz + Z * v1 * sin (rx) + Z * cos (rx) * cos (ry) --Z * u1 * cos (rx) * sin (ry)) + Z * (sin (sin) ry) * sin (rz) --cos (ry) * cos (rz) * sin (rx)) + Z * u1 * (cos (ry) * sin (rz) + cos (rz) * sin (rx) * sin (ry)) + Z * v1 * cos (rx) * cos (rz) ・ ・ ・ (10)

cost2 = Z*(cos(rz)*sin(ry) + cos(ry)*sin(rx)*sin(rz)) - u2*(tz + Z*v1*sin(rx) + Z*cos(rx)*cos(ry) - Z*u1*cos(rx)*sin(ry)) - tx + Z*u1*(cos(ry)*cos(rz) - sin(rx)*sin(ry)*sin(rz)) - Z*v1*cos(rx)*sin(rz) ・・・(11) cost2 = Z * (cos (rz) * sin (ry) + cos (ry) * sin (rx) * sin (rz)) --u2 * (tz + Z * v1 * sin (rx) + Z * cos (rx) ) * cos (ry) --Z * u1 * cos (rx) * sin (ry)) --tx + Z * u1 * (cos (ry) * cos (rz) --sin (rx) * sin (ry) * sin (rz)) --Z * v1 * cos (rx) * sin (rz) ・ ・ ・ (11)

x座標についての回転パラメータの傾き(grx1,gry1,grz1)および並進パラメータの傾き(gtx1,gty1,gtz1)は、以下のように表される。 The slope of the rotation parameter (grx1, gry1, grz1) and the slope of the translation parameter (gtx1, gty1, gtz1) with respect to the x coordinate are expressed as follows.

grx1 = Z*u1*cos(rx)*cos(rz)*sin(ry) - Z*cos(rx)*cos(ry)*cos(rz) - Z*v1*cos(rz)*sin(rx) - v2*(Z*v1*cos(rx) - Z*cos(ry)*sin(rx) + Z*u1*sin(rx)*sin(ry));
gry1 = Z*(cos(ry)*sin(rz) + cos(rz)*sin(rx)*sin(ry)) + v2*(Z*cos(rx)*sin(ry) + Z*u1*cos(rx)*cos(ry)) - Z*u1*(sin(ry)*sin(rz) - cos(ry)*cos(rz)*sin(rx));
grz1 = Z*(cos(rz)*sin(ry) + cos(ry)*sin(rx)*sin(rz)) + Z*u1*(cos(ry)*cos(rz) - sin(rx)*sin(ry)*sin(rz)) - Z*v1*cos(rx)*sin(rz);
gtx1 = 0;
gty1 =1;
gtz1 =-v2;
grx1 = Z * u1 * cos (rx) * cos (rz) * sin (ry) --Z * cos (rx) * cos (ry) * cos (rz) --Z * v1 * cos (rz) * sin (rx) ) --v2 * (Z * v1 * cos (rx) --Z * cos (ry) * sin (rx) + Z * u1 * sin (rx) * sin (ry));
gry1 = Z * (cos (ry) * sin (rz) + cos (rz) * sin (rx) * sin (ry)) + v2 * (Z * cos (rx) * sin (ry) + Z * u1 * cos (rx) * cos (ry)) --Z * u1 * (sin (ry) * sin (rz) --cos (ry) * cos (rz) * sin (rx));
grz1 = Z * (cos (rz) * sin (ry) + cos (ry) * sin (rx) * sin (rz)) + Z * u1 * (cos (ry) * cos (rz) --sin (rx) * sin (ry) * sin (rz))-Z * v1 * cos (rx) * sin (rz);
gtx1 = 0;
gty1 = 1;
gtz1 = -v2;

また、y座標についての回転パラメータの傾き(grx2,gry2,grz2)および並進パラメータの傾き(gtx2,gty2,gtz2)は、以下のように表される。 The slope of the rotation parameter (grx2, gry2, grz2) and the slope of the translation parameter (gtx2, gty2, gtz2) with respect to the y coordinate are expressed as follows.

grx2 = Z*cos(rx)*cos(ry)*sin(rz) - u2*(Z*v1*cos(rx) - Z*cos(ry)*sin(rx) + Z*u1*sin(rx)*sin(ry)) + Z*v1*sin(rx)*sin(rz) - Z*u1*cos(rx)*sin(ry)*sin(rz);
gry2 = Z*(cos(ry)*cos(rz) - sin(rx)*sin(ry)*sin(rz)) + u2*(Z*cos(rx)*sin(ry) + Z*u1*cos(rx)*cos(ry)) - Z*u1*(cos(rz)*sin(ry) + cos(ry)*sin(rx)*sin(rz));
grz2 = - Z*(sin(ry)*sin(rz) - cos(ry)*cos(rz)*sin(rx)) - Z*u1*(cos(ry)*sin(rz) + cos(rz)*sin(rx)*sin(ry)) - Z*v1*cos(rx)*cos(rz);
gtx2 = -1;
gty2 = 0;
gtz2 = -u2;
grx2 = Z * cos (rx) * cos (ry) * sin (rz) --u2 * (Z * v1 * cos (rx) --Z * cos (ry) * sin (rx) + Z * u1 * sin (rx) ) * sin (ry)) + Z * v1 * sin (rx) * sin (rz)-Z * u1 * cos (rx) * sin (ry) * sin (rz);
gry2 = Z * (cos (ry) * cos (rz) --sin (rx) * sin (ry) * sin (rz)) + u2 * (Z * cos (rx) * sin (ry) + Z * u1 * cos (rx) * cos (ry)) --Z * u1 * (cos (rz) * sin (ry) + cos (ry) * sin (rx) * sin (rz));
grz2 = --Z * (sin (ry) * sin (rz) --cos (ry) * cos (rz) * sin (rx)) --Z * u1 * (cos (ry) * sin (rz) + cos (rz) ) * sin (rx) * sin (ry))-Z * v1 * cos (rx) * cos (rz);
gtx2 = -1;
gty2 = 0;
gtz2 = -u2;

x座標についての対応点の傾きは、以下のように表される。 The slope of the corresponding point with respect to the x coordinate is expressed as follows.

g1u1 = Z*(cos(ry)*sin(rz) + cos(rz)*sin(rx)*sin(ry)) + Z*v2*cos(rx)*sin(ry);
g1v1 = Z*cos(rx)*cos(rz) - Z*v2*sin(rx);
g1u2 = 0;
g1v2 = Z*u1*cos(rx)*sin(ry) - Z*v1*sin(rx) - Z*cos(rx)*cos(ry) - tz;
g1u1 = Z * (cos (ry) * sin (rz) + cos (rz) * sin (rx) * sin (ry)) + Z * v2 * cos (rx) * sin (ry);
g1v1 = Z * cos (rx) * cos (rz)-Z * v2 * sin (rx);
g1u2 = 0;
g1v2 = Z * u1 * cos (rx) * sin (ry) --Z * v1 * sin (rx) --Z * cos (rx) * cos (ry) --tz;

また、y座標についての対応点の傾きは、以下のように表される。 Further, the slope of the corresponding point with respect to the y coordinate is expressed as follows.

g2u1 = Z*(cos(ry)*cos(rz) - sin(rx)*sin(ry)*sin(rz)) + Z*u2*cos(rx)*sin(ry);
g2v1 = - Z*u2*sin(rx) - Z*cos(rx)*sin(rz);
g2u2 = Z*u1*cos(rx)*sin(ry) - Z*v1*sin(rx) - Z*cos(rx)*cos(ry) - tz;
g2v2 = 0;
g2u1 = Z * (cos (ry) * cos (rz) --sin (rx) * sin (ry) * sin (rz)) + Z * u2 * cos (rx) * sin (ry);
g2v1 = --Z * u2 * sin (rx) --Z * cos (rx) * sin (rz);
g2u2 = Z * u1 * cos (rx) * sin (ry) --Z * v1 * sin (rx) --Z * cos (rx) * cos (ry) --tz;
g2v2 = 0;

対応点i毎の回転・並進パラメータの傾きは以下のように表される。ただし、lambda1は定数であり、rx0,ry0,rz0,tx0,ty0,tz0は、回転・並進パラメータの初期値(前回値)である。 The slope of the rotation / translation parameter for each corresponding point i is expressed as follows. However, lambda1 is a constant, and rx0, ry0, rz0, tx0, ty0, tz0 are initial values (previous values) of rotation / translation parameters.

grx(i) = (grx1*cost1+grx2*cost2)/Z/Z+lambda1*(rx-rx0);
gry(i) = (gry1*cost1+gry2*cost2)/Z/Z+lambda1*(ry-ry0);
grz(i) = (grz1*cost1+grz2*cost2)/Z/Z+lambda1*(rz-rz0);
gtx(i) = (gtx1*cost1+gtx2*cost2)/abs(Z)+lambda1*(tx-tx0);
gty(i) = (gty1*cost1+gty2*cost2)/abs(Z)+lambda1*(ty-ty0);
gtz(i) = (gtz1*cost1+gtz2*cost2)/abs(Z)+lambda1*(tz-tz0);
grx (i) = (grx1 * cost1 + grx2 * cost2) / Z / Z + lambda1 * (rx-rx0);
gry (i) = (gry1 * cost1 + gry2 * cost2) / Z / Z + lambda1 * (ry-ry0);
grz (i) = (grz1 * cost1 + grz2 * cost2) / Z / Z + lambda1 * (rz-rz0);
gtx (i) = (gtx1 * cost1 + gtx2 * cost2) / abs (Z) + lambda1 * (tx-tx0);
gty (i) = (gty1 * cost1 + gty2 * cost2) / abs (Z) + lambda1 * (ty-ty0);
gtz (i) = (gtz1 * cost1 + gtz2 * cost2) / abs (Z) + lambda1 * (tz-tz0);

また、対応点i毎の位置の傾きは以下のように算出される。ただし、lambda2は定数であり、u10(i),v10(i),u20(i),v20(i)は、対応点iごとの位置の初期値(前回値)である。 Further, the inclination of the position for each corresponding point i is calculated as follows. However, lambda2 is a constant, and u10 (i), v10 (i), u20 (i), v20 (i) are initial values (previous values) of positions for each corresponding point i.

gu1(i) = (g1u1*cost1+g2u1*cost2)/abs(Z)+lambda2*(u1-u10(i));
gv1(i) = (g1v1*cost1+g2v1*cost2)/abs(Z)+lambda2*(v1-v10(i));
gu2(i) = (g1u2*cost1+g2u2*cost2)/abs(Z)+lambda2*(u2-u20(i));
gv2(i) = (g1v2*cost1+g2v2*cost2)/abs(Z)+lambda2*(v2-v20(i));
gu1 (i) = (g1u1 * cost1 + g2u1 * cost2) / abs (Z) + lambda2 * (u1-u10 (i));
gv1 (i) = (g1v1 * cost1 + g2v1 * cost2) / abs (Z) + lambda2 * (v1-v10 (i));
gu2 (i) = (g1u2 * cost1 + g2u2 * cost2) / abs (Z) + lambda2 * (u2-u20 (i));
gv2 (i) = (g1v2 * cost1 + g2v2 * cost2) / abs (Z) + lambda2 * (v2-v20 (i));

こうして対応点毎に求めた傾きの平均値(mean())に定数lr1,lr2を乗じて、回転・並進パラメータと、対応点の位置とを更新する。ただし、fは焦点距離である。 The rotation / translation parameters and the positions of the corresponding points are updated by multiplying the mean value (mean ()) of the slopes obtained for each corresponding point by the constants lr1 and lr2. However, f is the focal length.

rx = rx-lr1*mean(grx);
ry = ry-lr1*mean(gry);
rz = rz-lr1*mean(grz);
tx = tx-lr1*mean(gtx)/10;
ty = ty-lr1*mean(gty)/10;
tz = tz-lr1*mean(gtz)/1000;
pt1(i,1) = pt1(i,1)-lr2./300*f.*gu1(i);
pt1(i,2) = pt1(i,2)-lr2./300*f.*gv1(i);
pt2(i,1) = pt2(i,1)-lr2./300*f.*gu2(i);
pt2(i,2) = pt2(i,2)-lr2./300*f.*gv2(i);
rx = rx-lr1 * mean (grx);
ry = ry-lr1 * mean (gry);
rz = rz-lr1 * mean (grz);
tx = tx-lr1 * mean (gtx) / 10;
ty = ty-lr1 * mean (gty) / 10;
tz = tz-lr1 * mean (gtz) / 1000;
pt1 (i, 1) = pt1 (i, 1)-lr2./300*f.*gu1(i);
pt1 (i, 2) = pt1 (i, 2)-lr2./300*f.*gv1(i);
pt2 (i, 1) = pt2 (i, 1)-lr2./300*f.*gu2(i);
pt2 (i, 2) = pt2 (i, 2)-lr2./300*f.*gv2(i);

なお、画像の左上が原点の座標であるpt1,pt2と、カメラの焦点中心が原点の座標であるu1,v1,u2,v2の関係は以下のとおりである。ただし、cx,cyは焦点中心の座標,fは焦点距離である。 The relationship between pt1 and pt2, where the upper left of the image is the coordinates of the origin, and u1, v1, u2, v2, where the center of focus of the camera is the coordinates of the origin, is as follows. However, cx and cy are the coordinates of the center of focus, and f is the focal length.

u1(i) = (pt1(i,1)-cx)/f;
v1(i) = (pt1(i,2)-cy)/f;
u2(i) = (pt2(i,1)-cx)/f;
v2(i) = (pt2(i,2)-cy)/f;
u1 (i) = (pt1 (i, 1) -cx) / f;
v1 (i) = (pt1 (i, 2) -cy) / f;
u2 (i) = (pt2 (i, 1) -cx) / f;
v2 (i) = (pt2 (i, 2) -cy) / f;

本実施形態では、上記各計算式を用いて、回転・並進パラメータおよび対応点の位置を更新しつつ、上記式(9)を用いて評価値EVを最小化するように最適化していくことで、回転・並進パラメータおよび対応点の位置を真値に近づけるよう推定する。なお、上述した各式における定数(lambda1,lambda2,lr1,lr2)は、各パラメータの更新前後において値を大きく変動させないための定数であり、値は、実験に基づき任意に設定可能である。 In the present embodiment, the rotation / translation parameters and the positions of the corresponding points are updated by using each of the above formulas, and the evaluation value EV is optimized to be minimized by using the above formula (9). , Rotation / translation parameters and the position of the corresponding point are estimated to be close to the true value. The constants (lambda1, lambda2, lr1, lr2) in each of the above-mentioned equations are constants so that the values do not fluctuate significantly before and after updating each parameter, and the values can be arbitrarily set based on experiments.

A4.実施形態の効果:
図3~図5には、上記式(1)の評価関数から第1項を省略して回転パラメータをフレーム毎に推定した結果を比較例として示し、図6~図8には、上記式(1)の評価関数を用いて回転パラメータをフレーム毎に推定した結果を示している。図3,図6には、第1撮像装置10と第2撮像装置20とでピッチが一定値ずれている場合の推定結果を示し、図4,7には、第1撮像装置10と第2撮像装置20とでロールが一定値ずれている場合の推定結果を示している。また、図5,8には、第1撮像装置10と第2撮像装置20とでヨーが一定値ずれている場合の推定結果を示している。
A4. Effect of embodiment:
3 to 5 show the results of estimating the rotation parameter for each frame by omitting the first term from the evaluation function of the above equation (1) as a comparative example, and FIGS. 6 to 8 show the above equation (FIG. 6 to 8). The result of estimating the rotation parameter for each frame using the evaluation function of 1) is shown. 3 and 6 show estimation results when the pitches of the first image pickup device 10 and the second image pickup device 20 deviate from each other by a certain value, and FIGS. 4 and 7 show the first image pickup device 10 and the second image pickup device 20. The estimation result when the roll is deviated by a certain value with the image pickup apparatus 20 is shown. Further, FIGS. 5 and 8 show estimation results when the yaw is deviated by a certain value between the first image pickup device 10 and the second image pickup device 20.

図3~図5と図6~図8とを対比して明らかなように、式(1)の第1項、すなわち、対応点の位置の更新前後の変化量を評価関数に含めて回転パラメータを推定したところ、対応点の位置の更新前後の変化量を含めずに回転パラメータを推定した比較例よりも、推定値の変動が格段に小さくなった。これは、対応点の位置には特徴点の抽出過程や座標上の点とするための端数処理において誤差あるいはノイズが含まれることがあるが、本実施形態では、このような誤差やノイズを含む可能性のある対応点の位置についても真値になるように評価値が最適化されるため、較正パラメータを精度よく推定できるからである。 As is clear by comparing FIGS. 3 to 5 with FIGS. 6 to 8, the rotation parameter includes the first term of the equation (1), that is, the amount of change before and after updating the position of the corresponding point in the evaluation function. As a result of estimation, the fluctuation of the estimated value was much smaller than that of the comparative example in which the rotation parameter was estimated without including the amount of change before and after the update of the position of the corresponding point. This is because the position of the corresponding point may include an error or noise in the process of extracting the feature point or in the rounding process for making the point on the coordinates, but in the present embodiment, such an error or noise is included. This is because the evaluation values are optimized so that the positions of the possible corresponding points are also true values, so that the calibration parameters can be estimated accurately.

以上で説明したように、本実施形態の測距装置100によれば、較正パラメータだけではなく、対応点の位置を更新しながら評価値を最適化して較正パラメータを推定するので、較正パラメータを精度よく求めることができる。そのため、第1撮像装置10および第2撮像装置20によって撮像された画像を精度よく較正することができ、対象物までの距離を正確に測定することができる。また、本実施形態では、第1撮像装置10および第2撮像装置20の位置の一致度をも用いて最適化を行うため、より精度よく較正パラメータを推定することができる。さらに、本実施形態では、推定された較正パラメータが許容範囲外である場合に、その値を破棄するため、より精度よく距離を測定することができる。 As described above, according to the distance measuring device 100 of the present embodiment, not only the calibration parameters but also the evaluation values are optimized while updating the positions of the corresponding points to estimate the calibration parameters, so that the calibration parameters are accurate. You can ask for it well. Therefore, the images captured by the first image pickup device 10 and the second image pickup device 20 can be calibrated with high accuracy, and the distance to the object can be accurately measured. Further, in the present embodiment, since the optimization is performed by using the degree of coincidence of the positions of the first image pickup device 10 and the second image pickup device 20, the calibration parameters can be estimated more accurately. Further, in the present embodiment, when the estimated calibration parameter is out of the allowable range, the value is discarded, so that the distance can be measured more accurately.

B.他の実施形態:
本開示は、上述の実施形態に限られるものではなく、その趣旨を逸脱しない範囲において種々の形態で実現することができる。例えば、以下のような形態が可能である。
B. Other embodiments:
The present disclosure is not limited to the above-described embodiment, and can be realized in various forms without departing from the spirit thereof. For example, the following forms are possible.

(B-1)上記実施形態では、測距装置100は車両に搭載されるものとして説明したが、測距装置100は、車両に限らず、他の移動体や他の測定装置に搭載されてもよい。 (B-1) In the above embodiment, the distance measuring device 100 has been described as being mounted on a vehicle, but the distance measuring device 100 is not limited to the vehicle, but is mounted on other moving objects and other measuring devices. May be good.

(B-2)上記実施形態では、較正パラメータとして外部パラメータの推定を行った。これに対して、較正パラメータ推定部40は、外部パラメータにとともに、内部パラメータや歪み係数を推定してもよく、画像較正部60はそれらのパラメータを用いて画像を較正してもよい。 (B-2) In the above embodiment, an external parameter is estimated as a calibration parameter. On the other hand, the calibration parameter estimation unit 40 may estimate the internal parameters and the distortion coefficient together with the external parameters, and the image calibration unit 60 may calibrate the image using those parameters.

(B-3)上記実施形態において式(1)によって表される評価関数は、第1項~第3項以外にも他の項を含んでもよい。また、第1項~第3項のうち、例えば、第3項を省略してもよい。 (B-3) The evaluation function represented by the equation (1) in the above embodiment may include other terms in addition to the first to third terms. Further, of the first to third terms, for example, the third term may be omitted.

(B-4)上記実施形態では、較正パラメータ推定部40は、図2に示したステップS70~S80において、今回と前回の較正パラメータの差が許容範囲内でなければ、較正パラメータを破棄するものとした。しかし、この処理は省略可能である。また、例えば、較正パラメータ推定部40は、ステップS70~S80の処理を、初回の較正パラメータ推定処理のみスキップしてもよい。こうすることにより、初回の較正パラメータ推定処理では、工場出荷時の初期値から離れた値が推定された場合でも、その値により初期値を強制的に更新することができる。 (B-4) In the above embodiment, the calibration parameter estimation unit 40 discards the calibration parameters in steps S70 to S80 shown in FIG. 2 if the difference between the current calibration parameters and the previous calibration parameters is not within the allowable range. And said. However, this process can be omitted. Further, for example, the calibration parameter estimation unit 40 may skip the processing of steps S70 to S80 only for the initial calibration parameter estimation processing. By doing so, in the initial calibration parameter estimation process, even if a value deviating from the factory default value is estimated, the initial value can be forcibly updated by that value.

10 第1撮像装置、20 第2撮像装置、30 画像取得部、40 較正パラメータ推定部、50 較正パラメータ記憶部、60 画像較正部、70 距離算出部、100 測距装置、200 対象物 10 1st image pickup device, 20 2nd image pickup device, 30 image acquisition section, 40 calibration parameter estimation section, 50 calibration parameter storage section, 60 image calibration section, 70 distance calculation section, 100 distance measuring device, 200 object

Claims (6)

測距装置(100)であって、
第1撮像装置(10)によって対象物が撮像された第1画像と、第2撮像装置(20)によって前記対象物が撮像された第2画像とを取得する画像取得部(30)と、
前記第1画像および前記第2画像を較正するための較正パラメータを、前記第1画像および前記第2画像に共通する特徴の対応点の位置に基づき推定する較正パラメータ推定部(40)と、
推定された前記較正パラメータに基づき前記第1画像および前記第2画像を較正する画像較正部(60)と、
較正された前記第1画像および前記第2画像を用いて前記対象物までの距離を算出する距離算出部(70)と、
を備え、
前記較正パラメータ推定部(40)は、
前記較正パラメータおよび前記対応点の位置を更新しながら、前記較正パラメータの更新前後の変化量を表す項と、前記対応点の位置の更新前後の変化量を表す項と、を含む評価関数から算出される評価値を、繰り返し算出して最適化することにより、前記較正パラメータの推定を行い、
前記較正パラメータ推定部は、前記較正パラメータとして、少なくとも回転パラメータと並進パラメータとを推定する、
測距装置(100)。
It is a distance measuring device (100).
An image acquisition unit (30) that acquires a first image in which an object is captured by the first image pickup device (10) and a second image in which the object is captured by the second image pickup device (20).
A calibration parameter estimation unit (40) that estimates calibration parameters for calibrating the first image and the second image based on the positions of corresponding points of features common to the first image and the second image.
An image calibration unit (60) that calibrates the first image and the second image based on the estimated calibration parameters, and
A distance calculation unit (70) that calculates the distance to the object using the calibrated first image and the second image, and
Equipped with
The calibration parameter estimation unit (40) is
Calculated from an evaluation function including a term representing the amount of change before and after updating the calibration parameter and a term representing the amount of change before and after updating the position of the corresponding point while updating the calibration parameter and the position of the corresponding point. The calibration parameters are estimated by repeatedly calculating and optimizing the evaluation values to be obtained .
The calibration parameter estimation unit estimates at least rotation parameters and translation parameters as the calibration parameters.
Distance measuring device (100).
請求項1に記載の測距装置であって、
前記評価関数は、前記第1撮像装置および前記第2撮像装置の位置の一致度を表す項を含む、測距装置。
The ranging device according to claim 1 .
The evaluation function includes a term indicating a degree of coincidence between the positions of the first image pickup device and the second image pickup device.
請求項1または請求項2に記載の測距装置であって、
前記較正パラメータ推定部は、前記較正パラメータの初期値として、前記測距装置の工場出荷時の値、前記較正パラメータの設計値、または、前記測距装置が搭載された車両の走行中に推定された較正パラメータの値、を用いる、測距装置。
The distance measuring device according to claim 1 or 2 .
The calibration parameter estimation unit estimates, as the initial value of the calibration parameter, the factory-shipped value of the range measuring device, the design value of the calibration parameter, or the running of the vehicle equipped with the range measuring device. A range measuring device that uses the values of the calibration parameters.
請求項1から請求項までのいずれか一項に記載の測距装置であって、
前記較正パラメータ推定部は、前記測距装置が搭載された車両が静止しているとき、または、前記測距装置が搭載された車両において前記距離算出部によって算出された前記距離が用いられる運転制御が実行されていない走行中に、前記較正パラメータの推定を実行する、測距装置。
The distance measuring device according to any one of claims 1 to 3 .
The calibration parameter estimation unit is an operation control in which the distance calculated by the distance calculation unit is used when the vehicle equipped with the distance measuring device is stationary or in the vehicle equipped with the distance measuring device. A distance measuring device that performs estimation of the calibration parameters while driving is not performed.
請求項1から請求項までのいずれか一項に記載の測距装置であって、
前記較正パラメータ推定部は、今回推定された較正パラメータと、前回推定された較正パラメータとの差が、予め定めた許容範囲外の場合に、今回推定された較正パラメータを破棄する、測距装置。
The distance measuring device according to any one of claims 1 to 4 .
The calibration parameter estimation unit is a distance measuring device that discards the calibration parameter estimated this time when the difference between the calibration parameter estimated this time and the calibration parameter estimated last time is out of a predetermined allowable range.
測距装置における較正パラメータの推定方法であって、
(a)第1撮像装置によって対象物が撮像された第1画像と、第2撮像装置によって前記対象物が撮像された第2画像とを取得する工程と、
(b)前記第1画像および前記第2画像を較正するための較正パラメータを、前記第1画像および前記第2画像に共通する特徴の対応点の位置に基づき推定する工程と、を備え、
前記工程(b)では、
前記較正パラメータおよび前記対応点の位置を更新しながら、前記較正パラメータの更新前後の変化量を表す項と、前記対応点の位置の更新前後の変化量を表す項と、を含む評価関数から算出される評価値を、繰り返し算出して最適化することにより、前記較正パラメータの推定を行い、
前記較正パラメータとして、少なくとも回転パラメータと並進パラメータとを推定する、
推定方法。
It is a method of estimating calibration parameters in a distance measuring device.
(A) A step of acquiring a first image in which an object is imaged by a first image pickup device and a second image in which the object is imaged by a second image pickup device.
(B) A step of estimating calibration parameters for calibrating the first image and the second image based on the positions of corresponding points of features common to the first image and the second image.
In the step (b),
Calculated from an evaluation function including a term representing the amount of change before and after updating the calibration parameter and a term representing the amount of change before and after updating the position of the corresponding point while updating the calibration parameter and the position of the corresponding point. The calibration parameters are estimated by repeatedly calculating and optimizing the evaluation values to be obtained .
At least the rotation parameter and the translation parameter are estimated as the calibration parameters.
Estimating method.
JP2018034510A 2018-02-28 2018-02-28 Distance measuring device and calibration parameter estimation method Active JP7099832B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018034510A JP7099832B2 (en) 2018-02-28 2018-02-28 Distance measuring device and calibration parameter estimation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018034510A JP7099832B2 (en) 2018-02-28 2018-02-28 Distance measuring device and calibration parameter estimation method

Publications (2)

Publication Number Publication Date
JP2019148548A JP2019148548A (en) 2019-09-05
JP7099832B2 true JP7099832B2 (en) 2022-07-12

Family

ID=67850558

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018034510A Active JP7099832B2 (en) 2018-02-28 2018-02-28 Distance measuring device and calibration parameter estimation method

Country Status (1)

Country Link
JP (1) JP7099832B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012075060A (en) 2010-09-30 2012-04-12 Hitachi Automotive Systems Ltd Image processing device, and imaging device using the same
JP2016200557A (en) 2015-04-14 2016-12-01 国立大学法人東京工業大学 Calibration device, distance measurement apparatus and calibration method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012075060A (en) 2010-09-30 2012-04-12 Hitachi Automotive Systems Ltd Image processing device, and imaging device using the same
JP2016200557A (en) 2015-04-14 2016-12-01 国立大学法人東京工業大学 Calibration device, distance measurement apparatus and calibration method

Also Published As

Publication number Publication date
JP2019148548A (en) 2019-09-05

Similar Documents

Publication Publication Date Title
CN107633536B (en) Camera calibration method and system based on two-dimensional plane template
CN108141570B (en) Calibration device, calibration method, and calibration program storage medium
JP4814669B2 (en) 3D coordinate acquisition device
JP6415066B2 (en) Information processing apparatus, information processing method, position and orientation estimation apparatus, robot system
CN110672007A (en) Workpiece surface quality detection method and system based on machine vision
JP2012527026A (en) Image processing method for detecting depth information from at least two input images taken using a stereo camera system
JP2012202694A5 (en)
JP2010258628A5 (en)
JP2011172226A (en) Method and system for obtaining point spread function using motion information, and computer program
JP2014074632A (en) Calibration apparatus of in-vehicle stereo camera and calibration method
JP6413595B2 (en) Image processing apparatus, system, image processing method, and program
CN110400340B (en) Depth map processing method and device
CN110400343B (en) Depth map processing method and device
JP2021106025A5 (en)
WO2017094140A1 (en) Object detection device and object detection method
JP7099832B2 (en) Distance measuring device and calibration parameter estimation method
US10914572B2 (en) Displacement measuring apparatus and displacement measuring method
CN115690469A (en) Binocular image matching method, device, equipment and storage medium
US11393116B2 (en) Information processing apparatus, method thereof, and non-transitory computer-readable storage medium
JP6991700B2 (en) Information processing equipment, information processing method, program
JP6867487B2 (en) Imaging device
JP5425500B2 (en) Calibration apparatus and calibration method
JP2020201587A (en) Imaging apparatus, vehicle, and program
CN113587895A (en) Binocular distance measuring method and device
US11830206B2 (en) Stereo camera apparatus and control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20211116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211221

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220217

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: 20220607

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220630

R150 Certificate of patent or registration of utility model

Ref document number: 7099832

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150