JP2014006179A - Stereo camera calibrating apparatus and method, and distance measuring apparatus - Google Patents
Stereo camera calibrating apparatus and method, and distance measuring apparatus Download PDFInfo
- Publication number
- JP2014006179A JP2014006179A JP2012142837A JP2012142837A JP2014006179A JP 2014006179 A JP2014006179 A JP 2014006179A JP 2012142837 A JP2012142837 A JP 2012142837A JP 2012142837 A JP2012142837 A JP 2012142837A JP 2014006179 A JP2014006179 A JP 2014006179A
- Authority
- JP
- Japan
- Prior art keywords
- parallax
- value
- correction
- values
- stereo camera
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
- Measurement Of Optical Distance (AREA)
Abstract
Description
本発明は、ステレオカメラの視差検出誤差を補正するためのステレオカメラキャリブレーション装置及び方法、並びにステレオカメラを用いた距離測定装置に関する。 The present invention relates to a stereo camera calibration apparatus and method for correcting a parallax detection error of a stereo camera, and a distance measuring apparatus using the stereo camera.
近年、2つ1組のカメラからなるステレオカメラを自動車などの移動体に搭載して、該ステレオカメラにて移動体前方等を撮影し、該撮影したステレオ画像から対象物までの距離を測定し、その測定結果に応じて衝突防止のために運転者に警告を行ったり、車間距離維持のためにブレーキ、ステアリングなどの制御を行う運転支援システムが実用化されている。 In recent years, a stereo camera consisting of a set of two cameras is mounted on a moving body such as an automobile, the front of the moving body is photographed by the stereo camera, and the distance from the captured stereo image to the object is measured. In response to the measurement results, a driving support system that warns the driver to prevent a collision and controls brakes, steering, etc. to maintain the inter-vehicle distance has been put into practical use.
このような運転支援システムでは、2つのカメラからなるステレオカメラで同一対象物を撮影して得られたステレオ画像の一方を基準画像、他方を参照画像として、ブロックマッチングによる対応点探索を行って対応点の位置ずれ量(視差)を検出し、三角測量の原理により対象物までの距離を計算している。 In such a driving support system, corresponding points are searched by block matching using one stereo image obtained by photographing the same object with a stereo camera including two cameras as a reference image and the other as a reference image. The amount of point displacement (parallax) is detected, and the distance to the object is calculated based on the principle of triangulation.
図10は、ステレオカメラを利用した距離測定の原理説明図である。ステレオカメラは2つのカメラ11,12を光軸に平行に配置して構成される。ここで、対象物までの距離Zは、カメラ11,12の光軸間の距離(基線長)B、焦点距離f、視差dから、
FIG. 10 is a diagram for explaining the principle of distance measurement using a stereo camera. The stereo camera is configured by arranging two
ステレオカメラを利用した距離測定では、距離Zの精度は視差dに依存する。このため、ステレオカメラで撮影して得られたステレオ画像の2つの画像間には、距離に応じて生じる本来の視差以外の位置ずれに依存しないことが理想であるが、現実にはレンズの光学的歪み等による位置ずれが存在する。レンズの光学的な歪み等による位置ずれにより、正しく視差が検出されないと、測距精度が低下し、運転支援システムの信頼性や安全性が損なわれてしまう。 In distance measurement using a stereo camera, the accuracy of the distance Z depends on the parallax d. For this reason, it is ideal not to depend on a positional shift other than the original parallax that occurs according to the distance between two stereo images obtained by photographing with a stereo camera. There is misalignment due to mechanical distortion. If the parallax is not correctly detected due to a positional shift caused by optical distortion of the lens, the ranging accuracy is lowered, and the reliability and safety of the driving support system are impaired.
そこで、例えば特許文献1では、比較画像の所定領域毎の微小実画角と設計上の理想画角の比を測定して事前に画角修正比テーブルとして保持しておき、ステレオカメラで撮像した基準画像及び比較画像から対応点マッチングにより検出した視差データについて、画角修正比テーブルを用いて補正することで、レンズの歪みや組み付け誤差による影響を軽減し、距離測定精度を向上させることを提案している。
Therefore, in
図11は、基準画像用カメラと比較画像用カメラの光学系(レンズ)と被写体の位置関係を示した図である。図11のように、比較画像用光学系に対して同じ方向で異なる距離にある被写体a,bは、該比較画像用光学系を通して撮像素子(センサ)上でXa’,Xb’に結像されるとき、Xa’=Xb’である。しかし、基準画像用光学系では、被写体a,bは異なった方角から入射するため、それぞれ図中のXa,Xbのように、センサ上で異なった位置に結像される。このように、基準画像用カメラへの結像位置は、比較画像用カメラの結像位置のみからは決定されない。 FIG. 11 is a diagram showing the positional relationship between the optical system (lens) of the reference image camera and the comparative image camera and the subject. As shown in FIG. 11, subjects a and b at different distances in the same direction with respect to the comparative image optical system are imaged on Xa ′ and Xb ′ on the image sensor (sensor) through the comparative image optical system. Xa ′ = Xb ′. However, in the reference image optical system, since the subjects a and b are incident from different directions, the images are formed at different positions on the sensor as indicated by Xa and Xb in the drawing. Thus, the image formation position on the reference image camera is not determined only from the image formation position of the comparative image camera.
特許文献1の従来技術では、画角修正比テーブルを用いて比較画像の結像位置Xa’,Xb’を補正している。この場合、被写体a,bとも同じずれ補正量が得られる。しかし、視差は基準画像用カメラ及び比較画像用カメラの結像位置の差(例えば、被写体aであればXa’−Xa)により求められることから、基準画像のXaやXbのずれもXa’,Xb’と同様に視差値に影響を与える。
In the prior art of
特許文献1に記載の従来技術の場合、画角修正比テーブルの作成時に使用したデータ計測用スクリーンの距離と一致しない被写体は、視差が基準画像用光学系の歪み等の影響を受けてしまう。
In the case of the prior art described in
本発明の課題は、ステレオカメラを構成する2つのカメラの視差検出誤差の補正精度を高め、距離測定精度を向上させることにある。 It is an object of the present invention to increase the accuracy of correcting parallax detection errors of two cameras constituting a stereo camera and improve the distance measurement accuracy.
本発明は、2つ1組のカメラからなるステレオカメラの視差検出誤差を補正するための補正値を生成するステレオカメラキャリブレーション装置において、複数の設計視差値に対応する複数の実視差値毎に、該実視差値と水平座標値に対応する当該実視差値の補正値を生成することを特徴とする。 The present invention provides a stereo camera calibration device that generates a correction value for correcting a parallax detection error of a stereo camera including a set of two cameras, for each of a plurality of actual parallax values corresponding to a plurality of design parallax values. The correction value of the actual parallax value corresponding to the actual parallax value and the horizontal coordinate value is generated.
一実施形態に係るステレオカメラキャリブレーション装置では、複数の設計視差値に対応づけて、ステレオカメラと補正用被写体との距離を複数設定する手段と、前記設定された各距離で、前記ステレオカメラにより前記補正用被写体を撮影して取得されたステレオ画像から、各水平座標値毎の実視差値を検出する手段と、前記検出された実視差値をもとに、複数の設計視差値毎に、該設計視差値と水平座標値に対応する実視差値を示す実視差測定値テーブルを生成する手段と、前記実視差値測定値テーブルから、複数の設計視差値に対応する複数の実視差値毎に、該実視差値と水平座標値に対応する当該実視差値の補正値を示す視差補正テーブルを生成する手段とを有する。 In the stereo camera calibration device according to an embodiment, a unit that sets a plurality of distances between the stereo camera and a correction subject in association with a plurality of design parallax values, and the stereo camera at each set distance. From a stereo image acquired by photographing the correction subject, a means for detecting an actual parallax value for each horizontal coordinate value, and a plurality of design parallax values based on the detected actual parallax value, Means for generating an actual parallax measurement value table indicating actual parallax values corresponding to the design parallax values and horizontal coordinate values; and a plurality of real parallax values corresponding to a plurality of design parallax values from the actual parallax value measurement value table. And a means for generating a parallax correction table indicating correction values of the real parallax values corresponding to the real parallax values and the horizontal coordinate values.
本発明によれば、被写体とステレオカメラの距離及び水平座標値毎に実視差値を検出して補正量を算出するので、ステレオカメラの視差検出誤差の補正精度を高め、距離測定精度を向上させることができる。 According to the present invention, since the actual parallax value is detected for each distance and horizontal coordinate value between the subject and the stereo camera and the correction amount is calculated, the correction accuracy of the parallax detection error of the stereo camera is improved and the distance measurement accuracy is improved. be able to.
以下、図面を参照して本発明の実施の形態について説明する。なお、実施理形態では、取り得る視差値の範囲は0〜64とするが、勿論、これに限らない。 Embodiments of the present invention will be described below with reference to the drawings. In the embodiment, the range of possible parallax values is 0 to 64, but of course not limited to this.
<キャリブレーション>
図1は、本実施形態に係るキャリブレーション装置の全体機能ブロック図である。本キャリブレーション装置は、補正用被写体としてのキャリブレーション用チャート100、左カメラ11と右カメラ12からなるステレオカメラ10、ステレオカメラ10で撮影されたステレオ画像の視差を検出する視差検出部20、設計上の視差値(設計視差値)と実測された視差値(実視差値)の対応を示す実視差測定値テーブル42を生成する実視差測定値テーブル生成部30、生成された実現差測定値テーブル42を一時的に記憶するメモリ(1)40、実視差測定値テーブル42から、ステレオカメラカメラ10が実際に被写体を撮影して得られた視差値を補正するための視差補正テーブル62を生成する視差補正テーブル生成部50、生成された視差補正テーブル62を最終的に記憶するメモリ(2)60、全体の動作を制御する制御部90、及び、ステレオカメラ10とキャリブレーション用チャート100との距離を制御する距離制御機構95などで構成される。
<Calibration>
FIG. 1 is an overall functional block diagram of the calibration apparatus according to the present embodiment. The calibration apparatus includes a
ここで、図1中のステレオカメラ10、距離制御機構95及びキャリブレーション用チャート100を除く各部は、一般にコンピュータ装置で構成される。すなわち、視差検出部20、実視差測定値テーブル生成部30、視差補正テーブル生成部50及び制御部90は、CPUとプログラム等に基づいて各処理機能が実現される。メモリ(1)40はRAM等の揮発性メモリであり、これには実視差測定値テーブル42のほかに、CPUでの処理途中のデータ等も格納される。また、メモリ(2)60は、EPROM,EPPROM等の不揮発性メモリであり、これには視差補正テーブル62のほかに、CPUで実行されるプログラム、該CPUでの処理に必要なパラメータ等も格納される。
Here, each part except the stereo camera 10, the distance control mechanism 95, and the
図2は、キャリブレーション時、ステレオカメラ10とキャリブレーション用チャート100との距離を設定する様子を説明する図である。図2に示すように、本実施形態では、キャリブレーション時、設計上の視差値をdとして、dを64,63,・・・,i,・・・と変化させて、ステレオカメラ10とキャリブレーション用チャート100の距離ZをBf/64,Bf/63,・・・,Bf/i,・・・と順次切り替えて設定し、各距離毎に、ステレオカメラ10で撮影されたキャリブレーション用チャート100の画像の水平座標値(水平画素位置)毎の視差を実測する。そして、水平座標値毎、設計上の視差値(設計視差値)と実測された視差値(実視差値)の対応を示す実視差測定値テーブル42を生成し、この実視差測定値テーブル42をもとに、ステレオカメラ10が実際に被写体を撮影して得られた視差値を補正するための視差補正テーブル62を生成する。
FIG. 2 is a diagram for explaining how the distance between the stereo camera 10 and the
図3は実視差測定値テーブル42の構成例を示した図である。図3に示すように、実視差測定値テーブル42は、設計値の視差(設計視差値)dと撮像画像のx座標(水平座標値x)の二次元テーブルである。キャリブリレーションで実測された視差値(実視差値)は、二次元配列m(x,d)で表わす。ここで、m(1,64),m(2,64),・・・は、設計視差値d=64として、ステレオカメラ10とキャリブレーション用チャート100の距離Z=Bf/64とした時に、水平座標値xが1,2,・・・の位置での実視差値を示している。同様に、m(1,i),m(2,i),・・・は、設計視差値d=iとして、ステレオカメラ10とキャリブレーション用チャート100の距離Z=Bf/iとした時に、座標値xが1,2,・・・の位置での実視差値を示している。
FIG. 3 is a diagram showing a configuration example of the actual parallax measurement value table 42. As shown in FIG. 3, the actual parallax measurement value table 42 is a two-dimensional table of design value parallax (design parallax value) d and x-coordinate (horizontal coordinate value x) of the captured image. The parallax value (actual parallax value) actually measured by the calibration is represented by a two-dimensional array m (x, d). Here, m (1,64), m (2,64),... Is a design parallax value d = 64, and the distance Z between the stereo camera 10 and the
図4は視差補正テーブル62の構成例を示した図である。図4に示すように、視差補正テーブル62は、実視差値d’と撮像画像のx座標(水平座標値x)の二次元テーブルである。ステレオカメラ10で実際に被写体を撮影して得られた視差値(実視差値)を補正する際に必要とする補正値(視差補正量)は二次元配列Δd(x,d’)で表わす。ここで、Δd(1,64),Δd(2,64),・・・は、実視差値d’=64で、水平座標値xが1,2,・・・での各位置における設計上の視差値との差を示している。同様に、Δd(1,i),Δd(2,i),・・・は、実視差値d’=iで、水平座標値xが1,2,・・・での各位置における設計上の視差値との差を示している。したがって、水平座標値に応じ、実視差値からΔdだけ引けば、距離に応じて生じる本来の視差が得られる。 FIG. 4 is a diagram illustrating a configuration example of the parallax correction table 62. As shown in FIG. 4, the parallax correction table 62 is a two-dimensional table of the actual parallax value d ′ and the x coordinate (horizontal coordinate value x) of the captured image. A correction value (parallax correction amount) required when correcting the parallax value (actual parallax value) actually obtained by photographing the subject with the stereo camera 10 is represented by a two-dimensional array Δd (x, d ′). Here, Δd (1, 64), Δd (2, 64),... Are designed in each position at the actual parallax value d '= 64 and the horizontal coordinate value x is 1, 2,. The difference from the parallax value is shown. Similarly, Δd (1, i), Δd (2, i),... Is a design at each position where the actual parallax value d '= i and the horizontal coordinate value x is 1, 2,. The difference from the parallax value is shown. Therefore, by subtracting Δd from the actual parallax value according to the horizontal coordinate value, the original parallax that occurs according to the distance can be obtained.
図1に戻り、本キャリブレーション装置の動作を詳しく説明する。動作は、図3の実視差測定値テーブル42の生成処理と図4の視差補正テーブル62の生成処理に大別される。 Returning to FIG. 1, the operation of the calibration apparatus will be described in detail. The operation is roughly divided into a generation process of the actual parallax measurement value table 42 in FIG. 3 and a generation process of the parallax correction table 62 in FIG.
初めに、実視差測定値テーブル42の生成処理について詳述する。図5は、実視差測定値テーブル生成の処理フローチャートである。 First, generation processing of the actual parallax measurement value table 42 will be described in detail. FIG. 5 is a process flowchart of the actual parallax measurement value table generation.
制御部90は、まず、設計上の視差値(設定視差値)dを取り得る最大値dmax(ここでは、dmax=64)に設定し(ステップ101)、ステレオカメラ10とキャリブレーション用チャート100の距離Zを計算する(ステップ102)。先に述べたように、距離Zは、Z=Bf/dとして計算される。Bはステレオカメラ10を構成するカメラ11,12の基線長、fは焦点距離である。
First, the
制御部90は、設計上の視差値(設計視差値)dを実視差測定値テーブル生成部30に送り、また、計算した距離値Zを距離制御機構95に送る。
The
距離制御機構95は、制御部90からの距離値Zに基づき、ステレオカメラ10までの距離がZになるようにキャリブレーション用チャート100を移動する(ステップ103)。これは、例えば、次のようにして実施する。キャリブレーション用チャート100にレーザ距離計を取り付けて、該レーザ距離計でキャリブレーション用チャート100とステレオカメラ10の距離を測定する。距離制御機構95が、レーザ距離計から測距値を受け取り、該測距値が制御部90から送られた距離値Zと一致するように、キャリブレーション用チャート100を駆動する。なお、キャリブレーション用チャート100を移動する台車などにエンコーダを取り付けて、該エンコーダでキャリブレーション用チャート100とステレオカメラ10の距離を測定することでもよい。
The distance control mechanism 95 moves the
ステレオカメラ10とキャリブレーション用チャート100の距離Zが設定されると、制御部90はステレオカメラ10に撮影開始を指示する。ステレオカメラ10の左カメラ11と右カメラ12は、両者の光軸が平行に所定の間隔(基線長)を置いて配置されている。これら左カメラ11と右カメラ12は、互いに同期して動作して、それぞれ異なる視点から補正用被写体のキャリブレーション用チャート100を撮影し、その光学像をアナログ電気信号に変換し、更にデジタル信号に変換して画像データを出力する(ステップ104)。画像データは、例えば8ビット/画素からなる。
When the distance Z between the stereo camera 10 and the
視差検出部20は、左カメラ11と右カメラ12からそれぞれ出力される画像データ(ステレオ画像データ)を入力し、以下のようにして、画像の水平座標値毎(水平画素毎)の視差(実視差値)を検出する。なお、ここでは左カメラ11の画像データを基準画像、右カメラ12の画像データを比較画像とするが、この逆でもよい。
The
視差検出部20は、まず、基準画像(左カメラ11の画像データ)の水平座標値xを最小位置xminに設定する(ステップ105)。そして、視差検出部20は、基準画像の水平座標値x(ここではx=xmin)に対応する比較画像(右カメラ12の画像データ)上の対応点(対応点水平座標値)x’を探索し(ステップ106)、対応点が見つかったならば、両者の差(x−x’)、すなわち、視差(実視差値)d’を算出する(ステップ107)。対応点探索には、周知のブロックマッチング手法を利用する。
The
視差検出部20は、水平座標値x、及び、算出された視差(実視差値)d’を実視差測定値テーブル生成部30に送る。実視差測定値テーブル生成部30には、制御部90から設計視差値d(ここでは、d=64)が送られている。実視差測定値テーブル生成部30は、メモリ(1)40の実視差測定値テーブル42内のカラムがd(ここでは64)で、ローがx(ここでは、x=xmin)の記憶領域に実視差値d’を書き込む(ステップ108)。すなわち、m(x,d)=d’とする。なお、メモリ(1)40内の実視差測定値テーブル42は、最初は空である。
The
次に、視差検出部20は、基準画像(左カメラ11の画像データ)の水平座標値xを(x+1)とする(ステップ109)。そして、該水平座標値xが最大値xmaxを超えるか判定し(ステップ110)、超えなければ、ステップ106に戻る。
Next, the
以下、水平座標値xが最大値xmaxになるまで、ステップ106〜109の処理を繰り返すことで、メモリ(1)40の実視差測定値テーブル42内に、設計視差値d(ここでは、d=64)に対応する水平座標値xmin,・・・,xmax毎の実視差値d’が書き込まれる。
Thereafter, by repeating the processing of
水平座標値xが最大値xmaxを超えたならば、制御部90は、設計視差値dを(d−1)とする(ステップ111)。すなわち、d=63とする。そして、該設計視差値dが最小値dmin未満になるか判定し(ステップ112)、最小値dmin以上の場合には、ステップ102に戻る。
If the horizontal coordinate value x exceeds the maximum value xmax, the
以下、設計視差値dが最小値dminになるまで、ステップ102〜111の処理を繰り返すことで、メモリ(1)40の実視差測定値テーブル42内の、設計視差値dが64,63,・・・,i・・・毎に、水平座標値xがxmin,・・・,xmax毎の実視差値d’(d’=m(x,d))が書き込まれる。すなわち、図3に示す実視差測定値テーブル42が生成される。
Hereinafter, the design parallax value d in the actual parallax measurement value table 42 of the memory (1) 40 is changed to 64, 63,... By repeating the processing of
次に、視差補正テーブル62の生成処理について詳述する。視差補正テーブル62は、実視差測定値テーブル52から補間処理により生成する。 Next, the generation process of the parallax correction table 62 will be described in detail. The parallax correction table 62 is generated from the actual parallax measurement value table 52 by interpolation processing.
図6は、設計視差dと実視差d’の座標系を想定し、キャリブレーションによって得られた実視差測定値テーブル52について、ある水平座標値xにおける実視差値d’(d’=m(x,d))をプロットした様子を示している。図6により、ある水平座標値xにおける実視差値iに対する補正値(視差補正量)Δd(x,i)は、 FIG. 6 assumes the coordinate system of the design parallax d and the real parallax d ′, and the real parallax value d ′ (d ′ = m () at a certain horizontal coordinate value x for the real parallax measurement value table 52 obtained by calibration. It shows how x, d)) are plotted. According to FIG. 6, the correction value (parallax correction amount) Δd (x, i) for the actual parallax value i at a certain horizontal coordinate value x is
図7は、視差補正テーブル生成の処理フローチャートである。これは、制御部90の制御下でもって、視差補正テーブル生成部50で実施される。
FIG. 7 is a processing flowchart for generating a parallax correction table. This is performed by the parallax correction
視差補正テーブル生成部50は、まず、水平座標値xを最小水平座標値xminに設定し(ステップ201)、実視差値d’を取り得る最小実視差値d’minに設定する(ステップ202)。そして、iを0に初期設定する(ステップ203)。
The parallax correction
視差補正テーブル生成部50は、メモリ(1)40内の実視差測定値テーブル42について、
m(x,i)<d’ かつ d’≦m(x,i+1)
の条件を満足する実視差値m(x,i)とm(x,x+1)の組があるか調べる(ステップ204)。なければ、iをi+1として(ステップ205)、ステップ204に戻る。
The parallax correction
m (x, i) <d ′ and d ′ ≦ m (x, i + 1)
Whether there is a set of real parallax values m (x, i) and m (x, x + 1) satisfying the condition (step 204). If not, i is set to i + 1 (step 205), and the process returns to step 204.
視差補正テーブル生成部50は、上記条件を満足する実視差値m(x,i)とm(x,i+1)の組が見つかれば、先の(2)式により、補正値Δd(x,i)を計算する(ステップ206)。そして、視差補正テーブル生成部50は、メモリ(2)60の視差補正テーブル62内のカラムがd’(ここでは、d’=d’min)で、ローがx(ここでは、x=xmin)の記憶領域に、算出された補正値Δd(x,i)を書き込む。なお、メモリ(2)60内の視差補正テーブル62は、最初は空である。
If the combination of the actual parallax values m (x, i) and m (x, i + 1) satisfying the above conditions is found, the parallax correction
次に、視差補正テーブル生成部50は、実視差値d’を(d’+1)とする(ステップ207)。そして、該実視差値d’が取り得る最大実視差値d’max(ここでは、d’max=64)を超えるか判定し(ステップ208)、超えなければ、ステップ203に戻る。
Next, the parallax correction
以下、視差補正テーブル生成部50が、実視差値d’が最大視差値d’maxになるまで、ステップ203〜207の処理を繰り返すことで、メモリ(2)60の視差補正テーブル62内に、水平座標値x(ここでは、x=xmin)に対応する実視差値d’がd’min,・・・,i,・・・,d’max(64)ごとの補正値(視差補正量)Δdが書き込まれる。
Hereinafter, the parallax correction
実視差値d’が最大視差値d’max(ここでは、d’max=64)を超えたならば、視差補正テーブル生成部50は、水平座標値xを(x+1)とする(ステップ209)。そして、該水平座標値xが最大水平座標値xmaxを超えるか判定し(ステップ210)、超えなければ、ステップ202に戻る。
If the actual parallax value d ′ exceeds the maximum parallax value d′ max (here, d′ max = 64), the parallax correction
以下、視差補正テーブル生成部50が、水平座標値xが最大水平座標値xmaxになるまで、ステップ202〜209の処理を繰り返すことで、メモリ(2)60の視差補正テーブル62内に、水平座標位置xがxmin,・・・,xmaxに対応して、実視差値d’がd’min,・・・,i,・・・,63,64毎の補正値(視差補正量)Δd(x,i)が書き込まれる。すなわち、図4に示す視差補正テーブル62が完成する。
Hereinafter, the parallax correction
なお、ここでは、不揮発性メモリであるメモリ(2)60内に直接、視差補正テーブル62を生成するとしたが、揮発性メモリであるメモリ(1)40あるいはその他の作業用メモリを利用して視差補正テーブルを生成し、該生成した視差補正テーブルをメモリ(2)60に転送して、最終的にメモリ(2)60内に視差補正テーブル62を保持することでもよい。 Here, the parallax correction table 62 is generated directly in the memory (2) 60, which is a non-volatile memory. However, the parallax using the memory (1) 40, which is a volatile memory, or other work memory is used. It is also possible to generate a correction table, transfer the generated parallax correction table to the memory (2) 60, and finally hold the parallax correction table 62 in the memory (2) 60.
<距離測定>
図8は、本実施形態に係るステレオカメラを用いた距離測定装置の機能ブロック図である。本距離測定装置は、左カメラ11と右カメラ12からなるステレオカメラ10、ステレオカメラ10で撮影された被写体のステレオ画像の視差を検出する視差検出部20、先のキャリブレーションで生成された視差補正テーブル62を保持するメモリ(2)60、該メモリ(2)60に保持された視差補正テーブル62を用いて視差を補正する視差補正部70、補正された視差を用いて被写体までの距離を算出する距離計算部80などで構成される。なお、図1で示した全体の動作を制御する制御部90も備えるが、図8では省略してある。
<Distance measurement>
FIG. 8 is a functional block diagram of the distance measuring apparatus using the stereo camera according to the present embodiment. The distance measuring apparatus includes a stereo camera 10 including a
実際には、図8の距離測定装置は、図1のキャリブレーション装置と一体的に構成され、距離制御機構95を除いて自動車などの移動体に搭載して使用される。すなわち、図8でステレオカメラ10以外は、その実態はコンピュータ装置であり、視差検出部20、視差補正部70、距離計算部80は、先の実視差測定値テーブル生成部30や視差補正テーブル生成部50などと共に、CPUとプログラム等に基づいて各処理機能が実現される。制御部90は、キャリブレーション時は視差検出部20、実視差測定値テーブル生成部30、視差補正テーブル生成部50の各処理モジュールを動作させるが、実際の被写体(前方車両等)との距離測定時は視差検出部20、視差補正部70及び距離計算部80の各処理モジュールを動作させる。
Actually, the distance measuring apparatus of FIG. 8 is configured integrally with the calibration apparatus of FIG. 1 and is used by being mounted on a moving body such as an automobile except for the distance control mechanism 95. That is, in FIG. 8, other than the stereo camera 10 is actually a computer device, and the
図9は、本実施形態に係る距離測定装置の処理フローチャートである。
ステレオカメラ10の左カメラ11と右カメラ12は、互いに同期して動作して、被写体(前方車両等)を撮影する(ステップ301)。そして、左カメラ11と右カメラ12は、それぞれ被写体の光学像をアナログ電気信号に変換し、更にデジタル信号に変換して画像データとして出力する。画像データは、例えば8ビット/画素からなる。
FIG. 9 is a process flowchart of the distance measuring apparatus according to the present embodiment.
The
視差検出部20は、ステレオカメラ10の左カメラ11と右カメラ12からそれぞれ出力される画像データを入力し、被写体までの距離に応じて生じる視差を検出する。視差検出の手法は、先の被写体がキャリブレーション用チャート100の場合と基本的に同様である。すなわち、視差検出部20は、例えば左カメラ11の画像データを基準画像、左カメラ11の画像データを比較画像として、基準画像の水平位置(水平座標値)xに対する比較画像上の対応点x’を探索し(ステップ302)、見つかった対応点の差(x’−x)を算出して視差(視差値)d’とする(ステップ303)。対応点探索には、周知のブロックマッチング手法を利用する。
The
視差検出部20は、水平座標値x、及び、算出された視差値d’を視差補正部70に送る。
The
視差補正部70は、視差検出部20から送られた水平座標値xと視差値d’をもとに、メモリ(2)60の視差補正テーブル62(図6)から補正値Δdを取得し、視差値d’を補正して、距離に応じて生じる本来の理想的な視差dを求める(ステップ304)。すなわち、d=d’−Δdを計算する。
The
ここで、実際の被写体を撮影して得られたステレオ画像から求まる視差値d’は、必ずしも整数64,63,・・・になるとは限らない。むしろ、整数でない場合が普通である。この場合には、線形補完等を行って補正値Δdを求めればよい。すなわち、視差補正テーブル62(図4)から、i<d’かつd’<i+1の一組の補正値Δd(x,i)とΔd(x,i+1)を取得し、これら補正値を線形補完演算して補正値Δdを求める。
Here, the parallax value d ′ obtained from a stereo image obtained by photographing an actual subject is not necessarily an
視差補正部70は、補正後の視差値dを距離計算部80に送る。距離計算部80は、視差補正部70から送られた視差値dを用いて、被写体までの距離Zを計算する(ステップ305)。距離Zは、Z=Bf/dとして計算される。
The
本距離測定装置で求まった距離Zは、図示しない車両走行制御ユニットに送られ、該距離に基づいてハンドルやブレーキの制御、あるいは運転者への警告等が行われる。 The distance Z obtained by the distance measuring device is sent to a vehicle travel control unit (not shown), and control of the steering wheel and brake, warning to the driver, and the like are performed based on the distance.
<発展例>
実施形態では、視差補正テーブルを水平座標値x、実視差値d’の2次元テーブルとしたが、視差オフセットは垂直位置によっても変化する場合がある。例えば、樽型歪みを持ったレンズであれば、歪みは、水平座標値xと垂直座標値yによって変化する。そこで、視差補正テーブルを水平座標値x、垂直座標値y、実視差値d’の3次元テーブルとする。そのためには、実視差測定値テーブルの生成時、取り得るdmin≦d<dmaxに対応する各距離Zについて、xmin≦x<xmax毎,ymin≦y<ymax毎のm(x,y,d)を計算すればよい。視差補正テーブルを3次元テーブルとすることで、y方向(垂直位置)の視差オフセットについても視差を補正でき、測距精度が向上する。
<Development examples>
In the embodiment, the parallax correction table is a two-dimensional table of the horizontal coordinate value x and the actual parallax value d ′. However, the parallax offset may change depending on the vertical position. For example, in the case of a lens having barrel distortion, the distortion changes depending on the horizontal coordinate value x and the vertical coordinate value y. Therefore, the parallax correction table is a three-dimensional table of horizontal coordinate values x, vertical coordinate values y, and actual parallax values d ′. For this purpose, at the time of generating the actual parallax measurement value table, for each distance Z corresponding to possible dmin ≦ d <dmax, m (x, y, d) for each xmin ≦ x <xmax and ymin ≦ y <ymax. Should be calculated. By making the parallax correction table a three-dimensional table, parallax can be corrected for parallax offsets in the y direction (vertical position), and ranging accuracy is improved.
10 ステレオカメラ
20 視差検出部
30 実視差測定値テーブル生成部
40 メモリ(1)
42 実視差測定値テーブル
50 視差補正テーブル生成部
60 メモリ(2)
62 視差補正テーブル
70 視差補正部
80 距離計算部
90 制御部
95 距離制御機構
100 キャリブレーション用チャート(補正用被写体)
DESCRIPTION OF SYMBOLS 10
42 actual parallax measurement value table 50 parallax correction table generation unit 60 memory (2)
62 parallax correction table 70
Claims (7)
複数の設計視差値に対応する複数の実視差値毎に、該実視差値と水平座標値に対応する当該実視差値の補正値を生成することを特徴とするステレオカメラキャリブレーション装置。 A stereo camera calibration device for generating a correction value for correcting a parallax detection error of a stereo camera composed of a pair of cameras,
A stereo camera calibration device that generates, for each of a plurality of real parallax values corresponding to a plurality of design parallax values, a correction value of the real parallax value corresponding to the real parallax value and a horizontal coordinate value.
前記設定された各距離で、前記ステレオカメラにより前記補正用被写体を撮影して取得されたステレオ画像から、各水平座標値毎の実視差値を検出する手段と、
前記検出された実視差値をもとに、複数の設計視差値毎に、該設計視差値と水平座標値に対応する実視差値を示す実視差測定値テーブルを生成する手段と、
前記実視差値測定値テーブルから、複数の設計視差値に対応する複数の実視差値毎に、該実視差値と水平座標値に対応する当該実視差値の補正値を示す視差補正テーブルを生成する手段と、
を有することを特徴とする請求項1記載のステレオカメラキャリブレーション装置。 Means for setting a plurality of distances between the stereo camera and the correction subject in association with a plurality of design parallax values;
Means for detecting an actual parallax value for each horizontal coordinate value from a stereo image acquired by photographing the correction subject by the stereo camera at each set distance;
Means for generating an actual parallax measurement value table indicating an actual parallax value corresponding to the designed parallax value and a horizontal coordinate value for each of the plurality of designed parallax values based on the detected actual parallax value;
A parallax correction table indicating correction values of the actual parallax values corresponding to the real parallax values and the horizontal coordinate values is generated for each of the plurality of real parallax values corresponding to the plurality of design parallax values from the actual parallax value measurement value table. Means to
The stereo camera calibration apparatus according to claim 1, further comprising:
前記実視差測定値テーブルを生成する手段は、設計視差値と垂直座標値かつ垂直座標値に対応する実視差値を示す実視差測定値テーブルを生成し、
前記視差補正テーブルを生成する手段は、実視差値と水平座標値かつ水平座標値に対応する補正値を示す視差補正テーブルを生成することを特徴とする請求項2もしくは3に記載のステレオカメラキャリブレーション装置。 The means for detecting the actual parallax value detects the actual parallax value for each horizontal coordinate value and each vertical coordinate value for each distance,
The means for generating the actual parallax measurement value table generates an actual parallax measurement value table indicating the actual parallax value corresponding to the design parallax value and the vertical coordinate value and the vertical coordinate value,
The stereo camera calibration according to claim 2 or 3, wherein the means for generating the parallax correction table generates a parallax correction table indicating an actual parallax value, a horizontal coordinate value, and a correction value corresponding to the horizontal coordinate value. Equipment.
複数の設計視差値に対応づけて、ステレオカメラと補正用被写体との距離を複数設定し、
前記設定された各距離で、前記ステレオカメラにより前記補正用被写体を撮影して取得されたステレオ画像から、各距離毎に、各水平座標値毎の実視差値を検出し、
前記検出された実視差値をもとに、複数の設計視差値毎に、該設計値視差値と水平座標値に対応する実視差値を示す実視差測定値テーブルを生成し、
前記実視差値測定値テーブルから、複数の設計視差値に対応する複数の実視差値毎に、該実視差値と水平座標値に対応する当該実視差値の補正値を示す視差補正テーブルを生成する、
ことを特徴とするステレオカメラキャリブレーション方法。 A stereo camera calibration method for generating a parallax correction table for correcting parallax detection errors of a stereo camera composed of a pair of cameras,
In association with multiple design parallax values, set multiple distances between the stereo camera and the correction subject,
From the stereo image acquired by photographing the correction subject with the stereo camera at each set distance, an actual parallax value for each horizontal coordinate value is detected for each distance,
Based on the detected actual parallax value, for each of a plurality of design parallax values, generate a real parallax measurement value table indicating the actual parallax value corresponding to the design value parallax value and the horizontal coordinate value,
A parallax correction table indicating correction values of the actual parallax values corresponding to the real parallax values and the horizontal coordinate values is generated for each of the plurality of real parallax values corresponding to the plurality of design parallax values from the actual parallax value measurement value table. To
Stereo camera calibration method characterized by the above.
複数の設計視差値に対応する複数の実視差値毎に、該実視差値と水平座標値に対応する当該実視差値の補正値を示す視差補正テーブルを保持する手段と、
前記ステレオカメラにより被写体を撮影して取得されたステレオ画像から、水平座標値毎の視差値を検出する手段と、
前記検出された視差値について、前記視差補正テーブルから該視差値に対応する補正値を取得して、該視差値を補正する手段と、
前記補正された視差値を用いて、ステレオカメラと被写体との距離を計算する手段と、
を有することを特徴とする距離測定装置。 A stereo camera consisting of a pair of cameras,
Means for holding a parallax correction table indicating a correction value of the actual parallax value corresponding to the real parallax value and the horizontal coordinate value for each of the plurality of real parallax values corresponding to the plurality of design parallax values;
Means for detecting a parallax value for each horizontal coordinate value from a stereo image acquired by photographing a subject with the stereo camera;
Means for acquiring a correction value corresponding to the parallax value from the parallax correction table and correcting the parallax value for the detected parallax value;
Means for calculating a distance between the stereo camera and the subject using the corrected parallax value;
A distance measuring device comprising:
前記視差値を検出する手段は、前記ステレオ画像から、水平座標値と垂直座標値毎の視差値を検出する、
ことを特徴とする請求項6記載の距離測定装置。 The parallax correction table indicates, for each of a plurality of real parallax values corresponding to a plurality of design parallax values, a correction value corresponding to the real parallax value, a horizontal coordinate value, and a vertical coordinate value,
The means for detecting the parallax value detects a parallax value for each horizontal coordinate value and vertical coordinate value from the stereo image.
The distance measuring device according to claim 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012142837A JP6044868B2 (en) | 2012-06-26 | 2012-06-26 | Stereo camera calibration apparatus and method, and distance measurement apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012142837A JP6044868B2 (en) | 2012-06-26 | 2012-06-26 | Stereo camera calibration apparatus and method, and distance measurement apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014006179A true JP2014006179A (en) | 2014-01-16 |
JP6044868B2 JP6044868B2 (en) | 2016-12-14 |
Family
ID=50104026
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012142837A Active JP6044868B2 (en) | 2012-06-26 | 2012-06-26 | Stereo camera calibration apparatus and method, and distance measurement apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6044868B2 (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015115669A1 (en) * | 2014-01-28 | 2015-08-06 | Ricoh Company, Limited | Calibration method and measurement tool |
JP2017153071A (en) * | 2016-02-22 | 2017-08-31 | 株式会社リコー | Method and computer program for calibrating depth and parallax mapping of plenoptic imaging system |
JP2018017568A (en) * | 2016-07-27 | 2018-02-01 | キヤノン株式会社 | Distance measurement device, imaging device and distance measurement method |
JP2018074479A (en) * | 2016-11-01 | 2018-05-10 | 株式会社リコー | Imaging apparatus and mobile object system |
KR20180128300A (en) * | 2017-05-23 | 2018-12-03 | (주) 루리텍 | Distance measuring error calibration apparatus for variable type distance measuring camera |
WO2019049708A1 (en) * | 2017-09-11 | 2019-03-14 | Kyb株式会社 | Distance calculating device and method for setting distance calculation parameter |
JP2019074535A (en) * | 2014-01-28 | 2019-05-16 | 株式会社リコー | Calibration method, calibration device and program |
US10592536B2 (en) | 2017-05-30 | 2020-03-17 | Hand Held Products, Inc. | Systems and methods for determining a location of a user when using an imaging device in an indoor facility |
US20200099918A1 (en) * | 2018-09-20 | 2020-03-26 | Shoppertrak Rct Corporation | Techniques for calibrating a stereoscopic camera in a device |
JP2020187037A (en) * | 2019-05-15 | 2020-11-19 | 株式会社アルティア | Target positioning method and target positioning rule |
TWI712310B (en) * | 2019-11-15 | 2020-12-01 | 大陸商南京深視光點科技有限公司 | Detection method and detection system for calibration quality of stereo camera |
CN112857249A (en) * | 2019-11-28 | 2021-05-28 | 株洲中车时代电气股份有限公司 | Calibration method and device for contact net detection equipment |
CN114623763A (en) * | 2022-03-04 | 2022-06-14 | 中国民用航空飞行学院 | Flexible stereoscopic vision measuring device for target space coordinates |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112703389A (en) | 2018-09-19 | 2021-04-23 | 京瓷株式会社 | Observation method and observation device |
EP3855159B1 (en) | 2018-09-19 | 2023-08-23 | Kyocera Corporation | Observation method and observation device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08280006A (en) * | 1995-04-06 | 1996-10-22 | Yazaki Corp | Vehicle periphery monitoring device |
JP2001091245A (en) * | 1999-09-22 | 2001-04-06 | Fuji Heavy Ind Ltd | Stereo-image processing device |
JP2003303337A (en) * | 2002-04-12 | 2003-10-24 | Fuji Heavy Ind Ltd | System and method of image correction |
-
2012
- 2012-06-26 JP JP2012142837A patent/JP6044868B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08280006A (en) * | 1995-04-06 | 1996-10-22 | Yazaki Corp | Vehicle periphery monitoring device |
JP2001091245A (en) * | 1999-09-22 | 2001-04-06 | Fuji Heavy Ind Ltd | Stereo-image processing device |
JP2003303337A (en) * | 2002-04-12 | 2003-10-24 | Fuji Heavy Ind Ltd | System and method of image correction |
Cited By (27)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015115669A1 (en) * | 2014-01-28 | 2015-08-06 | Ricoh Company, Limited | Calibration method and measurement tool |
US10277887B2 (en) | 2014-01-28 | 2019-04-30 | Ricoh Company, Limited | Calibration method and measurement tool |
CN108921906A (en) * | 2014-01-28 | 2018-11-30 | 株式会社理光 | calibration method and measuring tool |
KR101893180B1 (en) | 2014-01-28 | 2018-08-29 | 가부시키가이샤 리코 | Calibration method and measuring tool |
JP2020030221A (en) * | 2014-01-28 | 2020-02-27 | 株式会社リコー | Calibration method, calibration device, measuring instrument, and program |
JP2019074535A (en) * | 2014-01-28 | 2019-05-16 | 株式会社リコー | Calibration method, calibration device and program |
JP2016006406A (en) * | 2014-01-28 | 2016-01-14 | 株式会社リコー | Calibration method, calibration device, measuring instrument and program |
CN105934648B (en) * | 2014-01-28 | 2018-08-10 | 株式会社理光 | Calibration method and survey tool |
US10972716B2 (en) | 2014-01-28 | 2021-04-06 | Ricoh Company, Limited | Calibration method and measurement tool |
KR20160103076A (en) * | 2014-01-28 | 2016-08-31 | 가부시키가이샤 리코 | Calibration method and measuring tool |
CN105934648A (en) * | 2014-01-28 | 2016-09-07 | 株式会社理光 | Calibration method and measurement tool |
CN108921906B (en) * | 2014-01-28 | 2022-09-02 | 株式会社理光 | Calibration method and measuring tool |
JP2017153071A (en) * | 2016-02-22 | 2017-08-31 | 株式会社リコー | Method and computer program for calibrating depth and parallax mapping of plenoptic imaging system |
JP2018017568A (en) * | 2016-07-27 | 2018-02-01 | キヤノン株式会社 | Distance measurement device, imaging device and distance measurement method |
JP2018074479A (en) * | 2016-11-01 | 2018-05-10 | 株式会社リコー | Imaging apparatus and mobile object system |
KR101974875B1 (en) | 2017-05-23 | 2019-05-03 | (주) 루리텍 | Distance measuring error calibration apparatus for variable type distance measuring camera |
KR20180128300A (en) * | 2017-05-23 | 2018-12-03 | (주) 루리텍 | Distance measuring error calibration apparatus for variable type distance measuring camera |
US10592536B2 (en) | 2017-05-30 | 2020-03-17 | Hand Held Products, Inc. | Systems and methods for determining a location of a user when using an imaging device in an indoor facility |
JP2019049468A (en) * | 2017-09-11 | 2019-03-28 | Kyb株式会社 | Distance calculation device and method for setting distance calculation parameter |
WO2019049708A1 (en) * | 2017-09-11 | 2019-03-14 | Kyb株式会社 | Distance calculating device and method for setting distance calculation parameter |
US20200099918A1 (en) * | 2018-09-20 | 2020-03-26 | Shoppertrak Rct Corporation | Techniques for calibrating a stereoscopic camera in a device |
US11689707B2 (en) * | 2018-09-20 | 2023-06-27 | Shoppertrak Rct Llc | Techniques for calibrating a stereoscopic camera in a device |
JP2020187037A (en) * | 2019-05-15 | 2020-11-19 | 株式会社アルティア | Target positioning method and target positioning rule |
TWI712310B (en) * | 2019-11-15 | 2020-12-01 | 大陸商南京深視光點科技有限公司 | Detection method and detection system for calibration quality of stereo camera |
CN112857249A (en) * | 2019-11-28 | 2021-05-28 | 株洲中车时代电气股份有限公司 | Calibration method and device for contact net detection equipment |
CN114623763A (en) * | 2022-03-04 | 2022-06-14 | 中国民用航空飞行学院 | Flexible stereoscopic vision measuring device for target space coordinates |
CN114623763B (en) * | 2022-03-04 | 2023-03-21 | 中国民用航空飞行学院 | Flexible stereoscopic vision measuring device for target space coordinates |
Also Published As
Publication number | Publication date |
---|---|
JP6044868B2 (en) | 2016-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6044868B2 (en) | Stereo camera calibration apparatus and method, and distance measurement apparatus | |
KR101787304B1 (en) | Calibration method, calibration device, and computer program product | |
JP6167525B2 (en) | Distance measuring device and vehicle | |
JP2012198075A (en) | Stereoscopic camera device and image adjusting method | |
JP2008034966A (en) | Image display apparatus | |
JP6970577B2 (en) | Peripheral monitoring device and peripheral monitoring method | |
JP6209648B1 (en) | Stereo camera installation parameter calibration method | |
JP6035774B2 (en) | Image processing apparatus, image processing method, and vehicle | |
JP2015135317A (en) | Image processing apparatus, system, image processing method, and program | |
WO2014069169A1 (en) | Image processing device | |
JP2008292278A (en) | Optical deviation detection method of distance detection device, and distance detection device | |
US11295478B2 (en) | Stereo camera calibration method and image processing device for stereo camera | |
KR101592405B1 (en) | Method for obtaining three-dimensional image, apparatus and computer-readable recording medium using the same | |
JP2008045983A (en) | Adjustment device for stereo camera | |
CN108260360B (en) | Scene depth calculation method and device and terminal | |
JP6543935B2 (en) | PARALLEL VALUE DERIVING DEVICE, DEVICE CONTROL SYSTEM, MOBILE OBJECT, ROBOT, PARALLEL VALUE DERIVING METHOD, AND PROGRAM | |
JP5162412B2 (en) | Tunnel wall surface photographing device | |
KR20200118073A (en) | System and method for dynamic three-dimensional calibration | |
JP6040782B2 (en) | Image processing apparatus and program | |
JP6202356B2 (en) | Image processing apparatus and method, and imaging apparatus | |
EP4235574A1 (en) | Measuring device, moving device, measuring method, and storage medium | |
JP6241083B2 (en) | Imaging apparatus and parallax detection method | |
WO2022118513A1 (en) | Position/orientation calculation device, position/orientation calculation method, and surveying device | |
JP5580062B2 (en) | Obstacle detection alarm device | |
JPWO2017042995A1 (en) | In-vehicle stereo camera device and correction method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150521 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160401 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160531 |
|
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: 20161021 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20161103 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6044868 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |