JP7083014B2 - Stereo camera - Google Patents
Stereo camera Download PDFInfo
- Publication number
- JP7083014B2 JP7083014B2 JP2020203452A JP2020203452A JP7083014B2 JP 7083014 B2 JP7083014 B2 JP 7083014B2 JP 2020203452 A JP2020203452 A JP 2020203452A JP 2020203452 A JP2020203452 A JP 2020203452A JP 7083014 B2 JP7083014 B2 JP 7083014B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- center
- unit
- reference image
- entrance pupil
- 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
Links
Images
Landscapes
- Studio Devices (AREA)
- Image Analysis (AREA)
- Measurement Of Optical Distance (AREA)
- Stereoscopic And Panoramic Photography (AREA)
Description
本発明は、ステレオカメラに関する。 The present invention relates to a stereo camera.
特許文献1の従来技術は、2つの撮像部の画像の歪を補正する補正情報を記憶しておき、その画像の補正情報を用いて、2つの画像を幾何的に補正して、2つの画像間の視差を算出した後に、距離を算出する。2つの撮像部のうち、認識に用いる画像側の第1の光学素子の透過率が他方の第2の光学素子より高い、第1の光学素子の歪が第2の光学素子に比べて小さい、第1の撮像素子の感度特性が第2の撮像素子に比べて高い、第1の撮像素子のノイズが第2の撮像素子に比べて小さい、の少なくとも1つを満足することにより、認識性能のばらつきを低減する。
The prior art of
特許文献2の従来技術は、特許文献1の従来技術で記憶されている2つの撮像部の画像の補正情報を作成する。ステレオカメラの前にチャートが設置され、そのチャートには複数の特徴点の模様が描かれているチャートを撮影して、その画像上の特徴点位置を検出して、画像の歪を補正する情報を作成する。チャートから異なる距離で画像を撮影し、それらの特徴点位置の違いにより、製造誤差及び設備誤差を推定して、製造誤差及び設備誤差による画像の補正情報のずれを補正して、画像の補正情報の精度を向上させる。
The prior art of
特許文献3の従来技術は、2つの画像の幾何的な補正処理を行い、2つの画像から特徴を抽出して、2つの画像上の同じ特徴を対応させて、これらの特徴及びその対応関係をもとに、カメラパラメータのずれを補正する。
The prior art of
画角が約40°以下と比較的狭いカメラでは、主光線と光軸の交点(入射瞳中心)が主光線の入射角に依存せず、一定の場所に位置する。ステレオカメラでは、このように、主光線の入射角に依存せず、入射瞳中心が移動しないピンホールカメラモデルを前提に、距離を計測する。 In a camera with a relatively narrow angle of view of about 40 ° or less, the intersection of the main ray and the optical axis (center of the entrance pupil) does not depend on the angle of incidence of the main ray and is located at a fixed place. In the stereo camera, the distance is measured on the premise of a pinhole camera model in which the center of the entrance pupil does not move, regardless of the angle of incidence of the main ray.
しかし、広角カメラでは、主光線と光軸の交点(入射瞳中心)が主光線の入射角によって異なる。具体的には、主光線の入射角が大きくなると、入射瞳中心が前に移動する。このため、同じ対象物からの主光線の入射角がピンホールカメラモデルとは異なり、画像の周辺で位置がピンホールカメラモデルからずれる。この画像周辺のずれは、対象物の距離によって異なるため、ある一定の補正量を与えただけでは、補正できず、算出した距離に誤差が生じる。 However, in a wide-angle camera, the intersection of the main ray and the optical axis (center of the entrance pupil) differs depending on the incident angle of the main ray. Specifically, as the angle of incidence of the main ray increases, the center of the entrance pupil moves forward. Therefore, the incident angle of the main ray from the same object is different from that of the pinhole camera model, and the position is deviated from the pinhole camera model around the image. Since the deviation around the image differs depending on the distance of the object, it cannot be corrected only by giving a certain amount of correction, and an error occurs in the calculated distance.
特許文献2の従来技術は、カメラから比較的近い場所に設置されたチャート上の特徴点の模様を用いて、画像の補正情報を作成する。特許文献1の従来技術は、この画像の補正情報を用いるため、カメラから近い位置では画像上のずれが小さく、遠くなると、画像上のずれが大きくなる。遠い対象物の視差は小さいため、そこに視差誤差が発生すると、距離誤差が大きくなる。
The prior art of
特許文献3の従来技術は、主光線の入射角ごとの入射瞳中心の移動を考慮しないため、距離によって異なる画像上のずれを補正できず、距離誤差が発生する。
Since the prior art of
本発明の目的は、主光線の入射角ごとに入射瞳中心が移動することにより発生する距離誤差を低減することができるステレオカメラを提供することにある。 An object of the present invention is to provide a stereo camera capable of reducing a distance error caused by the movement of the center of the entrance pupil for each angle of incidence of the main ray.
上記目的を達成するために、本発明のステレオカメラは、対象物の第1の画像を撮像する第1の撮像部と、前記対象物の第2の画像を撮像する第2の撮像部と、前記第1の画像及び前記第2の画像を幾何的に補正する幾何補正部と、幾何的に補正された前記第1の画像及び前記第2の画像から視差を算出する視差算出部と、を備え、前記第1の撮像部に対する前記対象物上の領域の3次元位置と、主光線の入射角に応じた前記第1の撮像部の入射瞳中心の移動量と、に基づいて、入射瞳中心が移動しない場合の前記第1の画像における前記対象物の領域の第1の位置を算出し、前記第2の撮像部に対する前記対象物上の領域の3次元位置と、主光線の入射角に応じた前記第2の撮像部の入射瞳中心の移動量と、に基づいて、入射瞳中心が移動しないと仮定する場合の前記第2の画像における前記対象物上の領域の第2の位置を算出する。 In order to achieve the above object, the stereo camera of the present invention includes a first imaging unit that captures a first image of an object, a second imaging unit that captures a second image of the object, and a second imaging unit. A geometric correction unit that geometrically corrects the first image and the second image, and a parallax calculation unit that calculates the misparity from the geometrically corrected first image and the second image. The incident pupil is provided based on the three-dimensional position of the region on the object with respect to the first imaging unit and the amount of movement of the incident pupil center of the first imaging unit according to the incident angle of the main light beam. The first position of the region of the object in the first image when the center does not move is calculated, the three-dimensional position of the region on the object with respect to the second image pickup unit, and the incident angle of the main light beam. The second position of the region on the object in the second image when it is assumed that the center of the incident pupil does not move based on the amount of movement of the center of the incident pupil of the second image pickup unit according to the above. Is calculated.
本発明によれば、主光線の入射角ごとに入射瞳中心が移動することにより発生する距離誤差を低減することができる。上記した以外の課題、構成及び効果は、以下の実施形態の説明により明らかにされる。 According to the present invention, it is possible to reduce the distance error caused by the movement of the center of the entrance pupil for each angle of incidence of the main ray. Issues, configurations and effects other than those described above will be clarified by the following description of the embodiments.
図1に本発明の一実施形態によるステレオカメラ1の構成を示す。なお、ステレオカメラ1は、画角が40°以上の広角カメラである。
FIG. 1 shows the configuration of the
本発明の一実施形態によるステレオカメラ1は、撮像系部100a、撮像系部100b、演算部110、画面音声出力部130、制御部140とを備えている。
The
カメラなどの撮像系部100aは、光学素子部101a、撮像素子部102aとを備えている。 The image pickup system unit 100a of a camera or the like includes an optical element unit 101a and an image pickup element unit 102a.
レンズなどの光学素子部101aは、光を屈折させて、撮像素子部102a上に像を結ぶ。 The optical element unit 101a such as a lens refracts light to form an image on the image pickup element unit 102a.
撮像素子などの撮像素子部102aは、光学素子部101aにより屈折した光の像を受光し、その光の強さに応じた画像を生成する。 The image sensor unit 102a such as an image sensor receives an image of light refracted by the optical element unit 101a and generates an image according to the intensity of the light.
カメラなどの撮像系部100bは、光学素子部101b、撮像素子部102bとを備えている。また、撮像系部100aと撮像系部100bの焦点距離の設計値は同じである。撮像系部100aと撮像系部100bの光軸の方向は、おおむね同じである。
The image pickup system unit 100b of a camera or the like includes an optical element unit 101b and an image
レンズなどの光学素子部101bは、光を屈折させて、撮像素子部102b上に像を結ぶ。
The optical element unit 101b such as a lens refracts light to form an image on the image
撮像素子などの撮像素子部102bは、光学素子部101bにより屈折した光の像を受光し、その光の強さに応じた画像を生成する。
The
撮像系部100aが撮像した画像は、視差画像を作成するときに基準となる画像であるため、基準画像と呼ぶ。換言すれば、撮像系部100a(第1の撮像部)は、対象物の基準画像(第1の画像)を撮像する。また、撮像系部100bが撮像した画像は、視差画像を作成するときに、基準画像から抽出した領域と一致する領域を探索される画像であり、参照画像と呼ぶ。換言すれば、撮像系部100b(第2の撮像部)は、対象物の参照画像(第2の画像)を撮像する。 The image captured by the imaging system unit 100a is referred to as a reference image because it is a reference image when creating a parallax image. In other words, the image pickup system unit 100a (first image pickup unit) captures a reference image (first image) of the object. Further, the image captured by the imaging system unit 100b is an image in which a region matching the region extracted from the reference image is searched for when creating a parallax image, and is referred to as a reference image. In other words, the image pickup system unit 100b (second image pickup unit) captures a reference image (second image) of the object.
CPU(central processing unit、中央演算処理装置)及びメモリなどから構成される演算部110は、撮像画像記憶部111、幾何補正画像記憶部112、視差画像記憶部113、幾何補正情報記憶部114、幾何補正変更情報記憶部115、入射瞳中心移動情報記憶部116、同期信号発生部117、基準画像取込部118a、参照画像取込部118b、幾何補正部119、視差算出部120、視差補正部121、認識部122、幾何校正部123を備えている。
The arithmetic unit 110 composed of a CPU (central processing unit, a central arithmetic processing device), a memory, and the like includes an image pickup image storage unit 111, a geometric correction image storage unit 112, a parallax image storage unit 113, a geometric correction
メモリなどの撮像画像記憶部111は、撮像系部100a及び撮像系部100bから出力される画像を格納する。 The image pickup image storage unit 111 such as a memory stores the images output from the image pickup system unit 100a and the image pickup system unit 100b.
メモリなどの幾何補正画像記憶部112は、撮像された基準画像(撮像後の基準画像)及び参照画像(撮像後の参照画像)を幾何的に補正した基準画像(幾何補正後の基準画像)及び参照画像(幾何補正後の参照画像)を格納する。 The geometrically corrected image storage unit 112 such as a memory has a reference image (reference image after geometric correction) and a reference image (reference image after geometric correction) in which the captured reference image (reference image after imaging) and the reference image (reference image after imaging) are geometrically corrected. Stores the reference image (reference image after geometric correction).
メモリなどの視差画像記憶部113は、視差画像を格納する。 The parallax image storage unit 113 such as a memory stores the parallax image.
メモリなどの幾何補正情報記憶部114は、基準画像及び参照画像において、歪がない画像上の各画素に対応する、歪がある撮像後の画像上の2次元座標(幾何補正情報)を格納する。この幾何補正情報は、幾何補正部119で撮像後の基準画像及び参照画像のレンズ歪みや光軸ずれを補正する処理に用いられる。すなわち、幾何補正部119は、幾何補正情報を用いて基準画像(第1の画像)及び参照画像(第2の画像)を幾何的に補正する。
The geometric correction
幾何補正情報は、入射瞳中心が移動する場合としない場合(ピンホールカメラモデル)との間で、ある距離の対象物を投影したときの画像上の位置ずれの値だけ、ピンホールカメラモデルからずれている。 The geometric correction information is obtained from the pinhole camera model only by the value of the positional deviation on the image when an object at a certain distance is projected between the case where the center of the entrance pupil moves and the case where the center of the entrance pupil moves (pinhole camera model). It is out of alignment.
換言すれば、幾何補正情報記憶部114は、主光線と光軸の交点を示す入射瞳中心が入射角に応じて移動する場合の対象物の基準画像(第1の画像)の位置と、入射瞳中心が入射角に応じて移動しないと仮定する場合の対象物の基準画像の位置と、の差だけ誤差を持つ幾何補正情報を記憶する。また,幾何補正情報記憶部114は、主光線と光軸の交点を示す入射瞳中心が入射角に応じて移動する場合の対象物の参照画像(第2の画像)の位置と、入射瞳中心が入射角に応じて移動しないと仮定する場合の対象物の参照画像の位置と、の差だけ誤差を持つ幾何補正情報を記憶する。
In other words, the geometric correction
つまり、図5に示すように、無限遠の対象物を投影したときには、ピンホールカメラモデルの幾何補正情報の値と一致し、距離が短くなり、主光線の入射角が大きくなると、ピンホールカメラモデルを想定した幾何補正情報の値とずれが生じる。 That is, as shown in FIG. 5, when an object at infinity is projected, it matches the value of the geometric correction information of the pinhole camera model, the distance becomes short, and the incident angle of the main ray becomes large, the pinhole camera There is a discrepancy with the value of the geometric correction information assuming the model.
メモリなどの幾何補正変更情報記憶部115は、幾何補正部119が画像の幾何補正処理を実施するときに幾何補正情報から更に水平方向及び垂直方向に移動させるための基準画像及び参照画像の水平移動量及び垂直移動量が格納されている。ここで、基準画像及び参照画像の水平移動量及び垂直移動量の初期値はゼロである。基準画像及び参照画像の水平移動量及び垂直移動量は幾何校正部123で算出され、経年変化、熱変化や衝撃振動などの機械ずれによって発生した垂直方向及び水平方向のずれを補正するためのものである。
The geometric correction change
メモリなどの入射瞳中心移動情報記憶部116は、撮像系部100a及び撮像系部100bにおける入射角ゼロを基準として各入射角までの入射瞳中心の移動量の値を格納している。換言すれば、入射瞳中心移動情報記憶部116は、図13に示すように、それぞれの入射角(θ1、θ2、・・・)とそれに対応する入射瞳中心の移動量(ΔL1、ΔL2、・・・)とをテーブルT1301に記憶する。
The entrance pupil center movement
同期信号発生部117は、同期信号を生成し、発信する。
The synchronization
基準画像取込部118aは、同期信号発生部117の同期信号に合わせて、撮像素子部102aに同期信号及び露光時間の情報を送った後に、撮像素子部102aが生成する画像を取得して、画像を撮像画像記憶部111に格納する。
The reference image acquisition unit 118a acquires the image generated by the image sensor unit 102a after transmitting the synchronization signal and the exposure time information to the image sensor unit 102a in accordance with the synchronization signal of the synchronization
参照画像取込部118bは、同期信号発生部117の同期信号に合わせて、撮像素子部102bに同期信号及び露光時間の情報を送った後に、撮像素子部102bが生成する画像を取得して、画像を撮像画像記憶部111に格納する。
The reference image acquisition unit 118b acquires the image generated by the
幾何補正部119は、幾何補正情報記憶部114から幾何補正情報を読み込み、幾何補正変更情報記憶部115から基準画像及び参照画像の水平移動量及び垂直移動量を読み込む。幾何補正情報である基準画像及び参照画像における歪のない画像上の各画素に対応する、歪のある画像上の2次元座標(幾何補正情報)にそれぞれ基準画像及び参照画像の水平移動量及び垂直移動量を足し合わせる。撮像後の基準画像及び参照画像、足し合わせた幾何補正情報をもとに、幾何補正処理を行い、歪のない画像を算出する。これらの幾何補正後の基準画像及び参照画像を幾何補正画像記憶部112に格納する。
The
視差算出部120は、幾何補正画像記憶部112から幾何補正後の基準画像及び参照画像を読み込み、基準画像上から抽出した所定のサイズの領域(テンプレート画像)に対応する参照画像上の同じ高さにある領域を探索する。テンプレート画像と一致する参照画像上の領域の位置と、基準画像上のテンプレート画像の位置の差すなわち視差を算出する。各領域について視差を算出することにより、視差画像を算出する。
The
換言すれば、視差算出部120は、幾何的に補正された基準画像(第1の画像)及び参照画像(第2の画像)から視差を算出する。
In other words, the
視差補正部121は、視差画像記憶部113から視差画像を、入射瞳中心移動情報記憶部116から撮像系部100a及び撮像系部100bにおける入射角ゼロを基準として各入射角までの入射瞳中心の移動量を読み込む。視差補正部121は、視差画像、撮像系部100a及び撮像系部100bの焦点距離、画素ピッチ及び基線長を用いて、画像上の各領域の距離を算出する。
The
各領域の基準画像及び参照画像上の位置は、入射瞳中心が移動した場合の幾何補正後の位置である。そこで、各領域の基準画像上の位置、視差及び距離、光軸位置、視差画像及び入射角ゼロを基準として各入射角までの入射瞳中心の移動量を用いて、入射瞳中心が移動しない場合の幾何補正後の基準画像及び参照画像上の各領域の位置を算出した後、その差を算出し、それらを各領域の補正後の視差とする。 The positions on the reference image and the reference image of each region are the positions after geometric correction when the center of the entrance pupil moves. Therefore, when the center of the entrance pupil does not move using the amount of movement of the center of the entrance pupil to each angle of incidence with reference to the position on the reference image of each region, the parallax and the distance, the position of the optical axis, the parallax image, and the angle of incidence of zero. After calculating the position of each region on the reference image and the reference image after geometric correction, the difference is calculated and used as the corrected parallax of each region.
換言すれば、視差補正部121は、対象物の主光線の入射角に応じた入射瞳中心の移動量と、視差算出部によって算出される視差(入射瞳中心が入射角に応じて移動する場合の視差)と、に基づいて、入射瞳中心が入射角に応じて移動しないと仮定する場合の視差(ピンホールカメラモデルの視差)を算出し、補正後の視差とする。これにより、入射瞳中心の移動による視差誤差を低減することができる。
In other words, the
視差補正部121は、補正後の視差画像を視差画像記憶手段に格納する。視差算出部120が算出した視差は、入射瞳中心が移動した場合の視差である。視差補正部121は、上記の処理により、入射瞳中心が移動する場合の視差を、ステレオカメラ1の距離測定の前提条件であるピンホールカメラモデル(入射瞳中心が移動しない場合)の視差に補正する。
The
認識部122は、視差画像記憶部113から視差画像を読み込み、視差、撮像系部100aと撮像系部100bの焦点の距離(基線長)、焦点距離及びの1画素のサイズをもとに、撮像系部100a及び撮像系部100bの光軸方向にステレオカメラ1から画像上の対象物までの距離を算出する。各領域について距離を算出することにより、距離画像を算出する。
The recognition unit 122 reads a parallax image from the parallax image storage unit 113, and takes an image based on the parallax, the focal length (base line length) between the image pickup system unit 100a and the image pickup system unit 100b, the focal length, and the size of one pixel. The distance from the
次に、認識部122は、幾何補正画像記憶部112から幾何補正後の基準画像を読み込み、幾何補正後の基準画像及び距離画像を用いて、基準画像に写っている対象物及び基準画像上の対象物の位置を認識し、ステレオカメラ1に対する対象物の3次元の相対位置及び相対速度を算出する。ここで、ステレオカメラ1に対する3次元の相対位置座標系は、撮像系部100aの入射瞳中心を原点として、撮像系部100aに対して右方向にx座標、下方向にy座標、光軸方向にz座標をとる。また、認識部122は、ステレオカメラ1と対象物の相対位置及び相対速度をもとに衝突までに時間を算出して、所定の時間内に衝突するかどうかを判定する。ステレオカメラ1と対象物の相対位置、相対速度、衝突判定結果及び衝突時間を画面音声出力部130及び制御部140に送る。
Next, the recognition unit 122 reads the reference image after the geometry correction from the geometry correction image storage unit 112, and uses the reference image and the distance image after the geometry correction to display the object and the reference image on the reference image. The position of the object is recognized, and the three-dimensional relative position and relative speed of the object with respect to the
幾何校正部123は、幾何補正画像記憶部112から幾何補正後の基準画像及び参照画像を、視差画像記憶部113から視差画像を読み込み、これらの情報をもとに、幾何補正後の基準画像上の光軸(消失点)位置が設計値になるような基準画像の水平移動量及び垂直移動量を算出するとともに、幾何補正後の基準画像上の光軸(消失点)位置で視差がゼロになるような参照画像の水平移動量及び垂直移動量を算出する。それらの結果を幾何補正変更情報記憶部115に格納する。
The
モニタ及びスピーカなどの画面音声出力部130は、基準画像、あるいは、視差画像、距離画像を画面に表示する。また、対象物の位置に枠あるいはマーカを表示する。このとき、認識部122からの衝突判定結果が衝突するという判定である対象物の枠あるいはマーカの色を、衝突しない対象物と異なるものとする。認識部122からの衝突判定結果が衝突するという判定である対象物がある場合、画面音声出力部130は、警告音を出力する。
The screen
CPUなどの制御部140は、ステレオカメラ1と対象物の相対位置、相対速度、衝突時間及び衝突判定結果をもとに制御信号を生成して、ステレオカメラ1の外部に出力する。
A
図1に示す本発明の一実施形態によるステレオカメラ1の動作手順を、図2及び図3を用いて説明する。なお、各ステップの主体は、明記しない限り、原則として同じである。
The operation procedure of the
ステップ201:
同期信号発生部117は、同期信号を生成して、基準画像取込部118a及び参照画像取込部118bに送る。基準画像取込部118aは、同期信号発生部117からの同期信号を受け取った直後に、撮像素子部102aに同期信号及び露光時間の情報を送る。撮像素子部102aは、基準画像取込部118aからの同期信号及び露光時間の情報を受け取った直後に、光学素子部101aにより屈折した光の像を露光時間だけ受光し、その光の強さに応じた画像を生成して、基準画像取込部118aに画像を送る。基準画像取込部118aは、撮像素子部102aから画像を受け取るとともに、画像を撮像画像記憶部111に格納する。
Step 201:
The synchronization
参照画像取込部118bは、同期信号発生部117からの同期信号を受け取った直後に、撮像素子部102bに同期信号及び露光時間の情報を送る。撮像素子部102bは、参照画像取込部118bからの同期信号及び露光時間の情報を受け取った直後に、光学素子部101bにより屈折した光の像を露光時間だけ受光し、その光の強さに応じた画像を生成して、参照画像取込部118bに画像を送る。参照画像取込部118bは、撮像素子部102bから画像を受け取るとともに、画像を撮像画像記憶部111に格納する。
Immediately after receiving the synchronization signal from the synchronization
ステップ202:
幾何補正部119は、撮像画像記憶部111から撮像後の基準画像及び参照画像を読み込む。幾何補正情報記憶部114から基準画像及び参照画像の幾何補正情報を読み込み、幾何補正変更情報記憶部115から基準画像及び参照画像の水平移動量及び垂直移動量を読み込む。
Step 202:
The
数式(1)及び数式(2)を用いて、幾何補正後の基準画像上の各画素に対応する撮像後の画像上の座標(Fx(X2,Y2),Fy(X2,Y2))、基準画像の水平移動量ΔX2及び垂直移動量ΔX2をもとに、幾何補正後の基準画像の画素(X2,Y2)に対応する撮像前の基準画像の位置(X1,Y1)を算出する。 Using the formulas (1) and (2), the coordinates (Fx (X2, Y2), Fy (X2, Y2)) on the image after imaging corresponding to each pixel on the reference image after geometric correction, the reference. Based on the horizontal movement amount ΔX2 and the vertical movement amount ΔX2 of the image, the positions (X1, Y1) of the reference image before imaging corresponding to the pixels (X2, Y2) of the reference image after the geometric correction are calculated.
基準画像の位置(X1,Y1)の周辺4画素の輝度値を2次元線形補間を実施することにより、幾何補正後の基準画像の画素(X2,Y2)の輝度値を算出する。幾何補正後の基準画像の各画素について上記の手順を実施して、幾何補正後の基準画像の輝度値を算出する。また、参照画像についても上記の手順を実施して、参照画像の幾何補正画像の輝度値を算出する。幾何補正後の基準画像及び参照画像を幾何補正画像記憶部112に格納する。 The luminance values of the pixels (X2, Y2) of the reference image after geometric correction are calculated by performing two-dimensional linear interpolation of the luminance values of the four peripheral pixels of the reference image positions (X1, Y1). The above procedure is performed for each pixel of the reference image after the geometry correction, and the brightness value of the reference image after the geometry correction is calculated. Further, the above procedure is also performed for the reference image to calculate the brightness value of the geometrically corrected image of the reference image. The reference image and the reference image after the geometry correction are stored in the geometry correction image storage unit 112.
ステップ203:
視差算出部120は、幾何補正画像記憶部112から基準画像及び参照画像の幾何補正画像を読み込む。図4に示すように、幾何補正後の基準画像401の所定のサイズの領域の画像403(テンプレート画像)を抽出する。幾何補正後の参照画像402でテンプレート画像403と同じ対象物が写っている領域の画像を以下のテンプレートマッチングで探索する。
Step 203:
The
テンプレート画像403と同じ高さにある参照画像402の所定のサイズの領域の画像404(被探索画像)を抽出して、テンプレート画像403の輝度値と被探索画像404の輝度値の差の絶対値の和(SAD,Sum of Absolute Difference)を算出する。テンプレート画像403と同じ高さにある参照画像402上の各被探索画像404についてSADを算出して、SADが最も小さい値の被探索画像405を探索する。
An image 404 (searched image) in a region of a predetermined size of the
被探索画像405のSAD及び被探索画像405から1画素の左右隣の被探索画像のSADを用いて、等角直線フィッティングを行い、テンプレート画像403と最も一致する参照画像上の被探索画像405のサブピクセルを算出する。テンプレート画像403と被探索画像405の位置の差にサブピクセルを加算することにより、幾何補正後の基準画像401上のテンプレート画像403の視差を算出する。
Using the SAD of the searched
次に、以下の2つの判定方法で視差が有効であるか無効であるかを判定する。テンプレート画像403と同じ高さにある参照画像402上の各被探索画像404を用いて、求めたSADの最小値が閾値以上である場合、テンプレート403と被探索画像405が一致していないとして、その領域の視差を無効であると判定し、SADの最小値が閾値未満である場合、有効であると判定する。
Next, it is determined whether the parallax is valid or invalid by the following two determination methods. Using each searched
また、パターンの一致度を表すSADにおいて、隣とのSADの差を算出する。これらの差の値が負から正に変化する箇所を検出して、それらの箇所のSADが最も小さい箇所と、2番目に小さい箇所を検出して、それらのSADの差が閾値未満である場合、テンプレート画像と似たパターンがあり、ミスマッチングの可能性があるとして、その領域の視差は無効であると判定し、そうでない場合、有効であると判定する。ここで、隣のSADの差が負から正に変化する箇所が1箇所しかない場合、その視差は有効であると判定する。2つの判定方法でともに有効と判定された領域を有効とし、どちらか一方の判定方法で無効と判定された場合、その領域を無効とする。 Further, in the SAD representing the degree of coincidence of the patterns, the difference between the SAD and the adjacent SAD is calculated. When the place where the value of these differences changes from negative to positive is detected, the place where the SAD of those places is the smallest and the place where the SAD is the second smallest are detected, and the difference between those SADs is less than the threshold value. , It is determined that the parallax in the area is invalid because there is a pattern similar to the template image and there is a possibility of mismatching, and if not, it is determined to be valid. Here, when there is only one place where the difference between adjacent SADs changes from negative to positive, it is determined that the parallax is valid. The area determined to be valid by both of the two determination methods is valid, and if it is determined to be invalid by either determination method, the area is invalidated.
このような処理を幾何補正後の基準画像上の全ての領域について実施して、基準画像401の全体での視差を算出する。このようにして算出した視差画像を視差画像記憶部113に格納する。
Such processing is performed for all areas on the reference image after geometric correction, and the parallax of the
ステップ204:
視差補正部121は、視差画像記憶部113から視差画像を、入射瞳中心移動情報記憶部116から撮像系部100a及び撮像系部100bにおける入射角ゼロを基準として各入射角までの入射瞳中心の移動量を読み込む。視差補正部121は、視差画像、撮像系部100a及び撮像系部100bの焦点距離、画素ピッチ及び基線長を用いて、画像上の各領域の距離を算出する。各領域の基準画像及び参照画像上の位置は、入射瞳中心が移動した場合の幾何補正後の位置である。
Step 204:
The
そこで、各領域の基準画像上の位置、視差及び距離、光軸位置、視差画像及び入射角ゼロを基準として各入射角までの入射瞳中心の移動量を用いて、入射瞳中心が移動しない場合の幾何補正後の基準画像及び参照画像上の各領域の位置を算出した後、その差を算出し、それらを各領域の補正後の視差とする。補正後の視差画像を視差画像記憶手段に格納する。このステップの動作手順を図3に示す。 Therefore, when the center of the entrance pupil does not move using the amount of movement of the center of the entrance pupil to each angle of incidence with reference to the position on the reference image of each region, the parallax and the distance, the position of the optical axis, the parallax image, and the angle of incidence of zero. After calculating the position of each region on the reference image and the reference image after geometric correction, the difference is calculated and used as the corrected parallax of each region. The corrected parallax image is stored in the parallax image storage means. The operation procedure of this step is shown in FIG.
ステップ205:
認識部122は、視差画像記憶部113から視差画像を、幾何補正画像記憶部112から幾何補正画像を読み込む。
Step 205:
The recognition unit 122 reads the parallax image from the parallax image storage unit 113 and the geometry-corrected image from the geometry-corrected image storage unit 112.
数式(3)を用いて、視差画像上の領域におけるステレオカメラ1との光軸方向の距離Lを算出する。ここで、fは撮像系部100a及び撮像系部100bの焦点距離の設計値、Bは撮像系部100aと撮像系部100bの主点間の距離(基線長)、dは視差、cは撮像素子部102a及び撮像素子部102bの画素ピッチである。
Using the mathematical formula (3), the distance L in the optical axis direction from the
この処理を視差画像の全ての領域について実施して、視差画像全体におけるステレオカメラ1との光軸方向の距離を算出して、距離画像を作成する。
This process is performed for all areas of the parallax image, the distance in the optical axis direction to the
次に、認識部122は、基準画像の処理画像上の消失点の位置の算出、自動車や歩行者などの対象物の判定、ステレオカメラ1に対する対象物の相対位置及び相対速度の算出、対象物とステレオカメラ1との衝突判定を行う。
Next, the recognition unit 122 calculates the position of the vanishing point on the processed image of the reference image, determines an object such as a car or a pedestrian, calculates the relative position and relative speed of the object with respect to the
先ず、認識部122は、基準画像上の消失点の位置の算出を以下の手順で実施する。基準画像上の車線の境界にある両側の白線を検出して、基準画像上の白線の傾きを算出する。両側の白線が直線であるとして、算出した傾きにより、両側の白線が交わる点の基準画像上の位置を算出する。これが消失点の位置である。 First, the recognition unit 122 calculates the position of the vanishing point on the reference image according to the following procedure. The white lines on both sides at the boundary of the lane on the reference image are detected, and the inclination of the white lines on the reference image is calculated. Assuming that the white lines on both sides are straight lines, the position on the reference image of the point where the white lines on both sides intersect is calculated from the calculated inclination. This is the position of the vanishing point.
次に、認識部122は、自動車や歩行者などの対象物の検出を以下の手順で実施する。距離画像において、距離が所定の範囲内にある画素が連結している領域1を求める。所定の範囲の例として、5~10m、7.5~12.5m、10~15mなどと幅5mので2.5mごとに範囲が重複する複数の範囲を設定する。距離が所定の範囲内にある画素が連結している各領域1の基準画像上の縦及び横方向の長さを求める。各領域1の基準画像上の縦方向の長さ、距離と画素ピッチをかけた値を焦点距離で割って、各領域1の3次元の縦方向の長さを算出する。同様に、各領域1の基準画像上の横方向の長さ、距離と画素ピッチをかけた値を焦点距離で割って、各領域1の3次元の横方向の長さを算出する。数式(4)を用いて、各領域1の地面に関する基準画像上の縦方向の位置Vgを近似的に算出する。ここで、Vvは消失点の高さ、Hiはステレオカメラ1の取付高さ、Lrは領域1の平均距離である。また、撮像系部100a及び撮像系部100bの光軸はおおむね水平方向であるという仮定を設定したときの計算式である。
Next, the recognition unit 122 detects an object such as a car or a pedestrian according to the following procedure. In a distance image, a
領域1の3次元の縦及び横方向の長さが自動車の所定の範囲内であり、かつ、領域1の下限の基準画像上の縦方向の位置と、数式(2)で算出した領域1の地面の基準画像上の縦方向の位置の差が閾値以内である場合、領域1の対象物は自動車であると判定する。同様に、領域1の3次元の縦及び横方向の長さが歩行者の所定の範囲内であり、かつ、領域1の下限の基準画像上の縦方向の位置と、数式(2)で算出した領域1の地面の基準画像上の縦方向の位置の差が閾値以内である場合、領域1の対象物は歩行者であると判定する。これらの処理を全ての領域1について実施して、自動車、歩行者であるかを判定する。
The three-dimensional vertical and horizontal lengths of the
次に、ステレオカメラ1に対する対象物の相対位置及び相対速度の算出を以下の手順で実施する。自動車あるいは歩行者と判定された領域1について、数式(5)~数式(7)を用いて、ステレオカメラ1に対する対象物の相対位置(Xo、Yo,Zo)を算出する。ここで、(Uo,Vo)は自動車あるいは歩行者と判定された領域1の中央に関する基準画像上の位置である。
Next, the relative position and relative speed of the object with respect to the
ステップ202~208の処理は、所定の周期で繰り返し実施される。前回と今回の処理のステップ205で検出された領域1の基準画像上の位置の差が閾値以内である場合、同じ対象物であると判定して、今回の処理で算出されたステレオカメラ1に対する対象物の相対位置から、前回の処理のステップ205で算出された相対位置を引いた値を、ステップ202~208の処理周期の時間間隔で割って、ステレオカメラ1に対する対象物の相対速度(Vx,Vy,Vz)を算出する。
The processes of steps 202 to 208 are repeated in a predetermined cycle. If the difference in position on the reference image of the
最後に、対象物とステレオカメラ1との衝突判定を以下の手順で実施する。ステレオカメラ1に対する対象物の相対速度Vzが0以上である場合、自動車あるいは歩行者と判定された領域1の対象物に衝突しないと判定する。ステレオカメラ1に対する対象物の相対速度Vzが負である場合、今回の処理で算出したステレオカメラ1に対する対象物の相対位置Zoを、ステレオカメラ1に対する対象物の相対速度Vzの絶対値で割り、衝突までの時間(衝突時間)を算出する。また、ステレオカメラ1に対する対象物の相対速度Vxに衝突時間をかけた値に対象物の相対位置Xoを足して、衝突時におけるステレオカメラ1に対する対象物の相対位置Xoを算出する。
Finally, the collision determination between the object and the
そこで、ステレオカメラ1に対する対象物の相対速度Vzが負であり、かつ、衝突時間が閾値以内であり、かつ、衝突時におけるステレオカメラ1に対する対象物の相対位置Xoの絶対値が閾値内である場合、自動車あるいは歩行者と判定された領域1の対象物に衝突すると判定する。それ以外の場合、衝突しないと判定する。認識部122は、自動車あるいは歩行者と判定された領域1に関する基準画像上の四隅の位置、ステレオカメラ1に対する対象物の相対位置及び相対速度、衝突判定結果及び衝突時間を画面音声出力部130及び制御部140に送る。
Therefore, the relative velocity Vz of the object with respect to the
ステップ206:
幾何校正部123は、幾何補正画像記憶部112から幾何補正後の基準画像及び参照画像を、視差画像記憶部113から視差画像を読み込む。幾何補正後の基準画像上の道路上の左右の白線を検出して、左右の白線の近似直線を算出する。左右の白線の近似直線の交点の位置を算出して、この交点の位置が消失点であり、基準画像上の光軸の位置と一致するとして、交点の位置と光軸の位置の設計値の差を算出して、基準画像の水平方向及び垂直方向の補正量とする。これらの補正量を基準画像の水平移動量及び垂直移動量とする。
Step 206:
The
幾何校正部123は、左右の白線の画像上の垂直方向の各位置に対応する視差を抽出して、左右の白線の画像上の垂直方向の位置と視差の近似直線を算出する。この近似直線から、基準画像の光軸の垂直方向の位置の設計値に対応する白線の視差を算出する。本来、基準画像の光軸の垂直方向の位置の設計値に対応する白線の視差はゼロであるため、その白線の視差は参照画像の水平方向の補正量に相当し、この補正量を参照画像の水平移動量とする。
The
幾何校正部123は、参照画像についても同様に、幾何補正後の参照画像上の道路上の左右の白線を検出して、左右の白線の近似直線を算出する。左右の白線の近似直線の交点の位置を算出して、この交点の位置が消失点であり、参照画像上の光軸の位置と一致するとして、交点の位置と光軸の位置の設計値の差を算出して、参照画像の水平方向の補正量とする。これらの補正量を参照画像の垂直移動量とする。
Similarly for the reference image, the
以上の処理で算出した基準画像及び参照画像の水平移動量及び垂直移動量を幾何補正変更情報記憶部115に送り、幾何補正変更情報記憶部115は基準画像及び参照画像の水平移動量及び垂直移動量を格納する。
The horizontal movement amount and vertical movement amount of the reference image and the reference image calculated by the above processing are sent to the geometric correction change
ステップ207:
画面音声出力部130は、認識部122から自動車あるいは歩行者と判定された領域1に関する基準画像上の四隅の位置、ステレオカメラ1に対する対象物の相対位置及び相対速度、衝突判定結果及び衝突時間を受け取る。幾何補正画像記憶部112から幾何補正後の基準画像を読み込む。画面に基準画像を表示し、自動車あるいは歩行者と判定された領域1を枠として表示する。また、衝突判定結果が衝突するという判定結果である領域1の枠の色を衝突しないという判定結果の対象物の領域1の枠の色と変えて、画面に表示する。領域1の中に、衝突判定結果が衝突するという判定結果がある場合、警告音を出力する。
Step 207:
The screen
ステップ208:
制御部140は、認識部122から自動車あるいは歩行者と判定された領域1に関する基準画像上の四隅の位置、ステレオカメラ1に対する対象物の相対位置及び相対速度、衝突判定結果及び衝突時間を受け取る。自動車あるいは歩行者と判定された領域1の中に、衝突判定結果が衝突するという判定結果がある場合、衝突を回避する制御信号を生成して、ステレオカメラ1の外部に出力する。
Step 208:
The
本発明の一実施形態によるステレオカメラ1の動作手順のステップ204の入射瞳中心の移動を考慮した視差の補正の動作手順を、図3を用いて説明する。
The operation procedure of parallax correction in consideration of the movement of the center of the entrance pupil in step 204 of the operation procedure of the
ステップ301:
視差補正部121は、視差画像記憶部113から視差画像を、入射瞳中心移動情報記憶部116から撮像系部100a及び撮像系部100bにおける入射角ゼロを基準として各入射角(θ1、θ2、・・・)までの入射瞳中心の移動量(ΔL1、ΔL2、・・・)を読み込む。
Step 301:
The
ステップ302:
視差補正部121は、数式(3)を用いて、視差画像、撮像系部100a及び撮像系部100bに共通の焦点距離f、画素ピッチc及び基線長Bをもとに、基準画像上の各領域の距離Lを算出する。
Step 302:
The
ステップ303:
視差補正部121は、数式(8)~数式(10)を用いて、各領域の基準画像上の位置(U,V)及び距離L、撮像系部100a及び撮像系部100bに共通の焦点距離f、画素ピッチcをもとに、入射瞳が移動する場合の各領域に対応する撮像系部100aの入射瞳中心を原点とした3次元位置(X,Y,Z)を算出する。ここで、(U0,V0)は基準画像上の光軸位置である。
Step 303:
The
ステップ304:
視差補正部121は、数式(11)を用いて、各領域の基準画像上の位置(U,V)、撮像系部100a及び撮像系部100bに共通の焦点距離f、画素ピッチcをもとに、基準画像上の各領域の入射角θを算出する。
Step 304:
The
ステップ305:
視差補正部121は、撮像系部100aにおける入射角ゼロを基準として各入射角(θ1、θ2、・・・)までの入射瞳中心の移動量(ΔL1、ΔL2、・・・)のうち、ステップ304で算出したある領域の入射角θに近い2つの入射角(例えば、θ1、θ2)に対応する入射瞳中心の移動量(例えば、ΔL1、ΔL2)を抽出して、線形補間を行い、ある領域の入射瞳中心の移動量ΔLを算出する。以上の処理を各領域について行う。
Step 305:
The
換言すれば、視差補正部121は、入射瞳中心移動情報記憶部116に記憶されるそれぞれの入射角とそれに対応する入射瞳中心の移動量に基づいて、対象物の主光線の入射角に応じた入射瞳中心の移動量を算出する。これにより、入射瞳中心の移動量を容易に推定することができる。
In other words, the
ステップ306:
視差補正部121は、数式(12)及び数式(13)を用いて、ステップ303で算出した入射瞳中心が移動する場合の各領域の3次元位置(X,Y,Z)、ステップ305で算出した入射瞳中心の移動量ΔLをもとに、入射瞳中心が移動しない場合の各領域の基準画像上の位置(U’,V’)を算出する。
Step 306:
The
換言すれば、視差補正部121は、対象物の撮像系部100a(第1の撮像部)の3次元位置(X,Y,Z)と、対象物の主光線の入射角に応じた撮像系部100aの入射瞳中心の移動量ΔLと、に基づいて、入射瞳中心が移動しない場合の基準画像における対象物の位置(U’,V’)を算出する。
In other words, the
ステップ307:
視差補正部121は、各領域の基準画像上の水平方向の位置Uから視差dを引き、各領域の参照画像上の水平方向の位置Urefを算出する。数式(8)~数式(10)を用いて、各領域の参照画像上の位置(Uref,Vref)及び距離L、撮像系部100a及び撮像系部100bに共通の焦点距離f、画素ピッチcをもとに、入射瞳が移動する場合の各領域に対応する撮像系部100bの入射瞳中心を原点とした3次元位置(Xref,Yref,Zref)を算出する。ここで、各領域の参照画像上の垂直方向の位置は、基準画像と同じである(Vref=V)。
Step 307:
The
ステップ308:
視差補正部121は、数式(11)を用いて、各領域の参照画像上の位置(Uref,Vref)、撮像系部100a及び撮像系部100bに共通の焦点距離f、画素ピッチcをもとに、参照画像上の各領域の入射角θrefを算出する。
Step 308:
Using the mathematical formula (11), the
ステップ309:
視差補正部121は、撮像系部100bにおける入射角ゼロを基準として各入射角までの入射瞳中心の移動量(θ1、θ2、・・・)のうち、ステップ308で算出したある領域の入射角θrefに近い2つの入射角(例えば、θ1、θ2)に対応する入射瞳中心の移動量(例えば、ΔL1、ΔL2)を抽出して、線形補間を行い、ある領域の入射瞳中心の移動量ΔLrefを算出する。以上の処理を各領域について行う。
Step 309:
The
ステップ310:
視差補正部121は、数式(12)及び数式(13)を用いて、ステップ307で算出した入射瞳中心が移動する場合の各領域の3次元位置(Xref,Yref,Zref)、ステップ309で算出した入射瞳中心の移動量ΔLrefをもとに、入射瞳中心が移動しない場合の各領域の参照画像上の位置(U’ref,V’ref)を算出する。
Step 310:
The
換言すれば、視差補正部121は、対象物の撮像系部100b(第2の撮像部)の3次元位置(Xref,Yref,Zref)と、対象物の主光線の入射角に応じた撮像系部100bの入射瞳中心の移動量ΔLrefと、に基づいて、入射瞳中心が移動しないと仮定する場合の参照画像(第2の画像)における対象物の位置(U’ref,V’ref)を算出する。
In other words, the
ステップ311:
ステップ306及びステップ310で算出した入射瞳中心が移動しない場合の各領域の基準画像及び参照画像上の水平方向の位置の差(|U’-U’ref|)を算出して、これらを入射瞳中心が移動しない場合の各領域の視差とする。
Step 311:
The difference (| U'-U'ref |) in the horizontal position on the reference image and the reference image of each region when the center of the entrance pupil calculated in steps 306 and 310 does not move is calculated, and these are incident. The parallax of each region when the center of the pupil does not move.
換言すれば、視差補正部121は、入射瞳中心が移動しない場合の基準画像(第1の画像)における対象物の位置(U’,V’)と入射瞳中心が移動しないと仮定する場合の参照画像(第2の画像)における対象物の位置(U’ref,V’ref)との水平方向の差を補正後の視差とする。
In other words, the
ここで、図11を参照しつつ、本実施形態の課題を詳細に説明する。ステレオカメラの距離測定の前提条件のひとつに、主光線(後述する主光線1105、1108等)の入射角ごとに主光線と光軸1101の交点(入射瞳中心)は移動しないこと(ピンホールカメラモデル)がある。しかし、広角カメラでは、主光線の入射角が大きくなると、入射瞳中心の位置が前に移動する。
Here, the problems of the present embodiment will be described in detail with reference to FIG. One of the prerequisites for distance measurement of a stereo camera is that the intersection (center of the entrance pupil) between the main ray and the
例えば、図11に示すように、対象物1102までの距離が短い場合、対象物1102から入射瞳中心が移動する場合の入射瞳中心の位置1104に入射する主光線1106の入射角と、対象物1102から入射瞳中心が移動しない場合の入射瞳中心の位置1103に入射する主光線1105の入射角が大きく異なるため、入射瞳中心が移動する場合と移動しない場合の画像上1110上の位置1112と位置1111が大きくずれる。
For example, as shown in FIG. 11, when the distance to the
一方、対象物1107までの距離が長い場合、対象物1107から入射瞳中心が移動する場合の入射瞳中心の位置1107に入射する主光線1109の入射角と、対象物1107から入射瞳中心が移動しない場合の入射瞳中心の位置1103に入射する主光線1108の入射角の差が小さいため、入射瞳中心が移動する場合と移動しない場合の画像1113上の位置1114と位置1115のずれは小さい。
On the other hand, when the distance to the
このように、入射瞳中心が移動する広角カメラでは、光学系のモデルがピンホールカメラモデルと異なるため、どの距離でも正確に視差を算出できるように、画像を幾何補正することはできない。 As described above, in the wide-angle camera in which the center of the entrance pupil moves, the model of the optical system is different from the pinhole camera model, so that the image cannot be geometrically corrected so that the parallax can be calculated accurately at any distance.
特許文献2の従来技術は、比較的短い距離に設置されたチャートを撮影して、そのチャート上の模様をもとに、画像の幾何補正情報を作成する。このため、図7に示すように、近い距離では、入射角が大きいと、画像の幾何補正情報がピンホールカメラモデルと大きくずれ、図8に示すように、画像の端領域で、無限遠での画像の幾何補正情報のピンホールカメラモデルとのずれが大きくなる。これにより、図9に示すように、短い距離では、正確な距離を算出できるものの、遠い距離では、距離誤差が大きくなる。
In the prior art of
図1に示す本発明の一実施形態によるステレオカメラ1は、図5に示すように、ピンホールカメラモデルを想定した幾何補正情報とのずれが無限遠でゼロになる幾何補正情報を幾何補正情報記憶部114に記憶して、動作手順(図2)のステップ202で、幾何補正部119が、前述の特徴を持つ幾何補正情報を用いて、基準画像及び参照画像の歪を補正するため、無限遠でピンホールカメラモデルとの基準画像及び参照画像上の位置ずれがなく、視差誤差が低減される。近い距離では、ピンホールカメラモデルとの基準画像及び参照画像上の位置ずれが大きくなるものの、視差が大きいため、図10に示すように、距離誤差は従来技術よりも小さく抑えられる。ここで、無限遠における幾何補正情報とピンホールカメラモデルとのずれを図6に示す。
As shown in FIG. 5, the
図1に示す本発明の一実施形態によるステレオカメラ1の動作手順(図2)のステップ204(図3)において、視差補正部121が、入射瞳中心が移動した場合の視差を、入射瞳中心が移動しない場合(ピンホールカメラモデル)の視差に補正するため、入射瞳中心の移動による視差誤差を低減する。また、ステップ205において、認識部122が、補正された視差画像をもとに、距離を算出するとともに、対象物までの衝突時間を正確に算出できるため、衝突防止機能が正常に動作できる。
In step 204 (FIG. 3) of the operation procedure (FIG. 2) of the
図1に示す本発明の一実施形態によるステレオカメラ1の動作手順(図2)のステップ206において、ステップ204で正確に補正された視差、幾何補正後の基準画像及び参照画像を用いて、幾何校正部123によって算出された基準画像及び参照画像の水平移動量(水平方向の補正量)も正確である。また、ステップ202において、幾何補正部119は、ステップ206で正確に求められた基準画像及び参照画像の水平移動量を用いて、画像を幾何的に補正するため、画像歪が正確に補正され、ステップ203において、ステップ202で正確に幾何補正された基準画像及び参照画像を用いて、視差画像が正確に算出される。
In step 206 of the operation procedure (FIG. 2) of the
以上説明したように、本実施形態によれば、主光線の入射角ごとに入射瞳中心が移動することにより発生する距離誤差を低減することができる。 As described above, according to the present embodiment, it is possible to reduce the distance error caused by the movement of the center of the entrance pupil for each angle of incidence of the main ray.
なお、本発明のステレオカメラ1は、上記で説明したような実施の形態に限定されるものではなく、様々に変形して適用することができる。以下では、本発明のステレオカメラ1の変形例について説明する。
The
(変形例1-1)
図1に示す本発明の一実施形態によるステレオカメラ1において、入射瞳中心移動情報記憶部116は、撮像系部100a及び撮像系部100bの主光線の入射角θごとに入射瞳中心の移動量ΔLを記憶する代わりに、図14に示すように、撮像系部100a及び撮像系部100bの主光線の入射角θと入射瞳中心の移動量ΔLの多項式の係数(an、an-1、・・・、a0)をテーブルT1401に記憶する。
(Modification 1-1)
In the
動作手順(図3)のステップ301において、視差補正部121は、入射瞳中心移動情報記憶部116から主光線の入射角と入射瞳中心の移動量の多項式の係数を読み込み、ステップ304及びステップ308において、視差補正部121は、主光線の入射角と入射瞳中心の移動量の多項式を用いて、各領域の入射角から入射瞳中心の移動量を算出する。換言すれば、視差補正部121は、多項式を用いて、対象物の主光線の入射角に応じた入射瞳中心の移動量を算出する。これにより、入射瞳中心の移動量を容易に推定することができる。
In step 301 of the operation procedure (FIG. 3), the
このようにしても、入射瞳中心が移動する場合の視差から、入射瞳中心が移動しない場合の視差に補正できるため、入射瞳中心が移動することによる視差誤差を低減できる。 Even in this way, the parallax when the center of the entrance pupil moves can be corrected to the parallax when the center of the entrance pupil does not move, so that the parallax error due to the movement of the center of the entrance pupil can be reduced.
(変形例1-2)
図1に示す本発明の一実施形態によるステレオカメラ1において、入射瞳中心移動情報記憶部116は、撮像系部100a及び撮像系部100bの主光線の入射角θごとに入射瞳中心の移動量ΔLを記憶する代わりに、図15に示すように、所定の距離Lごと及び所定の主光線の入射角θごとの入射瞳中心が移動する場合からしない場合への撮像系部100a及び撮像系部100bの幾何補正情報の補正量CxをテーブルT1501に記憶する。
(Modification 1-2)
In the
換言すれば、入射瞳中心移動情報記憶部116は、対象物のそれぞれの距離Lとそれぞれの入射角θとの組合せに対応する幾何補正情報の補正量Cxを記憶する。
In other words, the entrance pupil center movement
図1に示す本発明の一実施形態によるステレオカメラ1の動作手順(図2)のステップ204の入射瞳中心の移動を考慮した視差の補正の動作手順を図3の代わりに、図12を実施しても、入射瞳中心が移動する場合の視差から、入射瞳中心が移動しない場合の視差に補正できるため、入射瞳中心が移動することによる視差誤差を低減できる。 FIG. 12 shows the operation procedure of parallax correction in consideration of the movement of the center of the entrance pupil in step 204 of the operation procedure of the stereo camera 1 (FIG. 2) according to the embodiment of the present invention shown in FIG. Even so, the parallax when the center of the entrance pupil moves can be corrected to the parallax when the center of the entrance pupil does not move, so that the parallax error due to the movement of the center of the entrance pupil can be reduced.
図1に示す本発明の一実施形態によるステレオカメラ1の動作手順(図2)のステップ204の入射瞳中心の移動を考慮した視差の補正の動作手順を図12を用いて説明する。ここで、既に説明したステップ302~ステップ304、ステップ307、ステップ308、ステップ311の記述を省く。 The operation procedure of parallax correction in consideration of the movement of the center of the entrance pupil in step 204 of the operation procedure of the stereo camera 1 (FIG. 2) according to the embodiment of the present invention shown in FIG. 1 will be described with reference to FIG. Here, the description of steps 302 to 304, step 307, step 308, and step 311 already described is omitted.
ステップ1201:
視差補正部121は、視差画像記憶部113から視差画像を、入射瞳中心移動情報記憶部116から所定の距離Lごと及び所定の主光線の入射角θごとの入射瞳中心が移動する場合からしない場合への撮像系部100a及び撮像系部100bの幾何補正情報の補正量を読み込む。
Step 1201:
The
ステップ1202:
視差補正部121は、所定の距離ごと及び所定の主光線の入射角ごとの入射瞳中心が移動する場合からしない場合への撮像系部100aの幾何補正情報の補正量のうち、ステップ302及びステップ304でそれぞれ算出した基準画像上のある領域の距離及び入射角に近い4つの幾何補正情報の補正量を探索し、それらの値を補間することにより、基準画像上のある領域の距離及び入射角における幾何補正情報の補正量を算出する。基準画像上のある領域の位置を光軸方向に補正量だけ変更した位置を算出する。以上の処理を全ての基準画像上の領域について実施する。
Step 1202:
The
換言すれば、視差補正部121は、入射瞳中心移動情報記憶部116に記憶される対象物のそれぞれの距離Lとそれぞれの入射角θとの組合せに対応する幾何補正情報の補正量Cxに基づいて、入射瞳中心が移動しないと仮定する場合の基準画像(第1の画像)における対象物の位置(第1の位置)を算出する。
In other words, the
ステップ1203:
視差補正部121は、所定の距離ごと及び所定の主光線の入射角ごとの入射瞳中心が移動する場合からしない場合への撮像系部100bの幾何補正情報の補正量のうち、ステップ302及びステップ308でそれぞれ算出した画像上のある領域の距離及び入射角に近い4つの幾何補正情報の補正量を探索し、それらの値を補間することにより、参照画像上のある領域の距離及び入射角における幾何補正情報の補正量を算出する。参照画像上のある領域の位置を光軸方向に補正量だけ変更した位置を算出する。以上の処理を全ての参照画像上の領域について実施する。
Step 1203:
The
換言すれば、視差補正部121は、入射瞳中心移動情報記憶部116に記憶される対象物のそれぞれの距離Lとそれぞれの入射角θとの組合せに対応する幾何補正情報の補正量Cxに基づいて、入射瞳中心が移動しないと仮定する場合の参照画像(第2の画像)における対象物の位置(第2の位置)を算出する。
In other words, the
(変形例1-3)
図1に示す本発明の一実施形態によるステレオカメラ1の動作手順(図2)のステップ206において、幾何校正部123は、幾何補正画像記憶部112から幾何補正後の基準画像を、視差画像記憶部113から視差画像を読み込み、幾何校正部123は、左右の白線の画像上の垂直方向の各位置に対応する視差を抽出して、左右の白線の画像上の垂直方向の位置と視差の近似直線を算出する。この近似直線から、基準画像の光軸の垂直方向の位置の設計値に対応する白線の視差を算出する。
(Modification 1-3)
In step 206 of the operation procedure (FIG. 2) of the
本来、基準画像の光軸の垂直方向の位置の設計値に対応する白線の視差はゼロであるため、その白線の視差は参照画像の水平方向の補正量に相当し、この補正量を参照画像の水平移動量として、参照画像の水平移動量を幾何補正変更情報記憶部115に送り、幾何補正変更情報記憶部115は参照画像の水平移動量を格納しても、正確に視差を補正できる。ここで、参照画像の水平移動量の代わりに、補正量の符号を逆にして、基準画像の水平移動量を補正してもよい。
Originally, the deviation of the white line corresponding to the design value of the position in the vertical direction of the optical axis of the reference image is zero, so the deviation of the white line corresponds to the correction amount in the horizontal direction of the reference image, and this correction amount is used as the reference image. As the horizontal movement amount of the reference image, the horizontal movement amount of the reference image is sent to the geometric correction change
なお、上述した実施形態は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施形態の構成の一部を他の実施形態の構成に置き換えることが可能であり、また、ある実施形態の構成に他の実施形態の構成を加えることも可能である。また、各実施形態の構成の一部について、他の構成の追加・削除・置換をすることが可能である。 It should be noted that the above-described embodiment has been described in detail in order to explain the present invention in an easy-to-understand manner, and is not necessarily limited to the one including all the described configurations. Further, it is possible to replace a part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. Further, it is possible to add / delete / replace a part of the configuration of each embodiment with another configuration.
また、上記の各構成、機能等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、または、ICカード、SDカード、DVD等の記録媒体に置くことができる。 Further, each of the above configurations, functions and the like may be realized by hardware by designing a part or all of them by, for example, an integrated circuit. Further, each of the above configurations, functions, and the like may be realized by software by the processor interpreting and executing a program that realizes each function. Information such as programs, tables, and files that realize each function can be placed in a memory, a recording device such as a hard disk or SSD (Solid State Drive), or a recording medium such as an IC card, SD card, or DVD.
なお、本発明の実施形態は、以下の態様であってもよい。 The embodiment of the present invention may have the following aspects.
(1)基準画像と参照画像とを撮影する2つの撮像部と、入射角ごとに主光線と光軸の交点(入射瞳中心)が移動する場合の前記の基準画像及び前記の参照画像上の位置と、移動しない場合の前記の基準画像及び前記の参照画像上の位置の差だけ誤差を持つ前記の基準画像及び前記の参照画像の幾何補正情報(各画素の補正量)をもつ記憶部と、前記の基準画像と前記の参照画像の幾何補正情報を用いて、前記の基準画像と前記の参照画像を幾何的に補正する画像補正部と、視差画像を生成する視差画像生成部と、を備えるステレオカメラ。 (1) On the reference image and the reference image when the intersection of the main ray and the optical axis (center of the incident pupil) moves for each incident angle and the two imaging units that capture the reference image and the reference image. A storage unit having geometric correction information (correction amount of each pixel) of the reference image and the reference image having an error by the difference between the position and the position on the reference image and the reference image when not moving. , An image correction unit that geometrically corrects the reference image and the reference image using the geometric correction information of the reference image and the reference image, and a parallax image generation unit that generates a disparity image. Equipped with a stereo camera.
(2)入射角ごとの入射瞳中心の移動量、前記の視差画像を用いて、入射瞳中心が移動する場合としない場合の画像ずれを算出して、視差画像を補正する視差補正部と、を備える(1)のステレオカメラ。 (2) A parallax correction unit that corrects the parallax image by calculating the amount of movement of the center of the entrance pupil for each angle of incidence and the image shift between the case where the center of the entrance pupil moves and the case where the center of the entrance pupil does not move, using the above-mentioned parallax image. The stereo camera of (1).
(3)前記の基準画像、視差補正部が補正した前記の視差画像を用いて、基準画像あるいは参照画像の水平移動量を補正する幾何校正部と、を備える(2)のステレオカメラ。 (3) The stereo camera of (2) including the reference image and a geometric calibration unit that corrects the amount of horizontal movement of the reference image or the reference image by using the parallax image corrected by the parallax correction unit.
上記(1)~(3)によれば、無限遠でピンホールカメラモデルの画像上の位置が一致する画像補正情報を用いることにより、主光線の入射角ごとに入射瞳中心の移動することによる画像ずれを無限遠で小さくして、小さな視差誤差でも大きな誤差が発生する遠方での距離誤差を低減する。 According to the above (1) to (3), by using the image correction information in which the positions on the image of the pinhole camera model match at infinity, the center of the entrance pupil moves for each incident angle of the main light beam. The image shift is reduced at infinity to reduce the distance error at a distance where a large error occurs even with a small parallax error.
また、主光線の入射角ごとの入射瞳中心の移動量及び視差画像を用いて、距離ごとに視差ずれを算出して、補正することにより、主光線の入射角ごとの入射瞳中心の移動による距離誤差を低減する。 In addition, the amount of movement of the center of the entrance pupil for each angle of incidence of the main ray and the parallax image are used to calculate and correct the parallax deviation for each distance, thereby moving the center of the entrance pupil for each angle of incidence of the main ray. Reduce parallax.
1…ステレオカメラ
100a…撮像系部
100b…撮像系部
101a…光学素子部
101b…光学素子部
102a…撮像素子部
102b…撮像素子部
110…演算部
111…撮像画像記憶部
112…幾何補正画像記憶部
113…視差画像記憶部
114…幾何補正情報記憶部
115…幾何補正変更情報記憶部
116…入射瞳中心移動情報記憶部
1117…同期信号発生部
118a…基準画像取込部
118b…参照画像取込部
119…幾何補正部
120…視差算出部
121…視差補正部
122…認識部
123…幾何校正部
130…画面音声出力部
140…制御部
401…基準画像
402…参照画像
403…基準画像のテンプレート画像
404…参照画像の被探索画像
405…テンプレート画像に最も一致する被探索画像
1101…光軸
1102…対象物
1103…移動しない入射瞳中心
1104…移動する入射瞳中心
1105…入射瞳中心が移動しない場合の対象物から入射瞳中心への主光線
1106…入射瞳中心が移動する場合の対象物から入射瞳中心への主光線
1107…移動する入射瞳中心
1108…入射瞳中心が移動しない場合の対象物から入射瞳中心への主光線
1109…入射瞳中心が移動する場合の対象物から入射瞳中心への主光線
1110…画像
1111…入射瞳中心が移動しない場合の画像上の対象物の位置
1112…入射瞳中心が移動する場合の画像上の対象物の位置
1113…画像
1114…入射瞳中心が移動しない場合の画像上の対象物の位置
1115…入射瞳中心が移動する場合の画像上の対象物の位置
1 ... Stereo camera 100a ... Image pickup system unit 100b ... Image pickup system section 101a ... Optical element section 101b ... Optical element section 102a ... Image
Claims (5)
前記対象物の第2の画像を撮像する第2の撮像部と、
前記第1の画像及び前記第2の画像を幾何的に補正する幾何補正部と、
幾何的に補正された前記第1の画像及び前記第2の画像から視差を算出する視差算出部と、を備え、
前記第1の撮像部に対する前記対象物上の領域の3次元位置と、主光線の入射角に応じた前記第1の撮像部の入射瞳中心の移動量と、に基づいて、入射瞳中心が移動しない場合の前記第1の画像における前記対象物の領域の第1の位置を算出し、
前記第2の撮像部に対する前記対象物上の領域の3次元位置と、主光線の入射角に応じた前記第2の撮像部の入射瞳中心の移動量と、に基づいて、入射瞳中心が移動しないと仮定する場合の前記第2の画像における前記対象物上の領域の第2の位置を算出することを特徴とするステレオカメラ。 A first image pickup unit that captures a first image of an object,
A second image pickup unit that captures a second image of the object, and a second image pickup unit.
A geometric correction unit that geometrically corrects the first image and the second image, and
A parallax calculation unit for calculating parallax from the geometrically corrected first image and the second image is provided.
The center of the entrance pupil is based on the three-dimensional position of the region on the object with respect to the first image pickup unit and the amount of movement of the center of the entrance pupil of the first image pickup unit according to the incident angle of the main ray. The first position of the area of the object in the first image when it does not move is calculated.
The center of the entrance pupil is based on the three-dimensional position of the region on the object with respect to the second image pickup unit and the amount of movement of the center of the entrance pupil of the second image pickup unit according to the incident angle of the main ray. A stereo camera comprising calculating a second position of a region on the object in the second image when it is assumed that it does not move.
前記幾何補正部は、
前記入射瞳中心が入射角に応じて移動する場合の前記対象物の前記第1の画像の位置と、前記入射瞳中心が前記入射角に応じて移動しないと仮定する場合の前記対象物の前記第1の画像の位置と、の差だけ誤差を有し、かつレンズ歪みを幾何的に補正する処理に用いられる前記第1の画像の幾何補正情報と、前記入射瞳中心が入射角に応じて移動する場合の前記対象物の前記第2の画像の位置と、前記入射瞳中心が前記入射角に応じて移動しないと仮定する場合の前記対象物の前記第2の画像の位置と、の差だけ誤差を有し、かつレンズ歪みを幾何的に補正する処理に用いられる前記第2の画像の幾何補正情報と、を用いて前記第1の画像及び前記第2の画像を幾何的に補正する
ことを特徴とするステレオカメラ。 The stereo camera according to claim 1.
The geometric correction unit is
The position of the first image of the object when the center of the incident pupil moves according to the angle of incidence, and the object of the object when it is assumed that the center of the incident pupil does not move according to the angle of incidence. The geometric correction information of the first image, which has an error by the difference from the position of the first image and is used for the process of geometrically correcting the lens distortion, and the incident pupil center according to the incident angle. The difference between the position of the second image of the object when moving and the position of the second image of the object when it is assumed that the center of the incident pupil does not move according to the angle of incidence. The first image and the second image are geometrically corrected by using the geometric correction information of the second image, which has an error only and is used for the process of geometrically correcting the lens distortion . A stereo camera that features that.
記憶部に記憶されるそれぞれの前記入射角とそれに対応する前記入射瞳中心の移動量に基づいて、前記対象物の前記主光線の前記入射角に応じた前記入射瞳中心の移動量を算出する
ことを特徴とするステレオカメラ。 The stereo camera according to claim 1.
Based on each of the incident angles stored in the storage unit and the corresponding movement amount of the entrance pupil center, the movement amount of the entrance pupil center according to the entrance angle of the main ray of the object is calculated. A stereo camera that features that.
前記第1の位置と前記第2の位置との水平方向の差を補正後の視差とする
ことを特徴とするステレオカメラ。 The stereo camera according to claim 1.
A stereo camera characterized in that the difference in the horizontal direction between the first position and the second position is the corrected parallax.
前記入射角から前記入射瞳中心の移動量を導出する多項式を用いて、前記対象物の前記主光線の前記入射角に応じた前記入射瞳中心の移動量を算出する
ことを特徴とするステレオカメラ。 The stereo camera according to claim 1.
A stereo camera characterized by calculating the amount of movement of the center of the entrance pupil according to the angle of incidence of the main ray of the object by using a polynomial that derives the amount of movement of the center of the entrance pupil from the angle of incidence. ..
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020203452A JP7083014B2 (en) | 2020-12-08 | 2020-12-08 | Stereo camera |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020203452A JP7083014B2 (en) | 2020-12-08 | 2020-12-08 | Stereo camera |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017180648A Division JP6838225B2 (en) | 2017-09-20 | 2017-09-20 | Stereo camera |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2021056234A JP2021056234A (en) | 2021-04-08 |
| JP7083014B2 true JP7083014B2 (en) | 2022-06-09 |
Family
ID=75270548
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2020203452A Active JP7083014B2 (en) | 2020-12-08 | 2020-12-08 | Stereo camera |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7083014B2 (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008298589A (en) | 2007-05-31 | 2008-12-11 | Konica Minolta Holdings Inc | Device and method for detecting positions |
| JP2015197421A (en) | 2014-04-03 | 2015-11-09 | キヤノン株式会社 | Projection device and imaging apparatus to be used in three-dimensional shape measurement system |
| JP2017020971A (en) | 2015-07-14 | 2017-01-26 | 株式会社リコー | Pattern image projection device, parallax information creating device, and pattern image creating program |
-
2020
- 2020-12-08 JP JP2020203452A patent/JP7083014B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008298589A (en) | 2007-05-31 | 2008-12-11 | Konica Minolta Holdings Inc | Device and method for detecting positions |
| JP2015197421A (en) | 2014-04-03 | 2015-11-09 | キヤノン株式会社 | Projection device and imaging apparatus to be used in three-dimensional shape measurement system |
| JP2017020971A (en) | 2015-07-14 | 2017-01-26 | 株式会社リコー | Pattern image projection device, parallax information creating device, and pattern image creating program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2021056234A (en) | 2021-04-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6838225B2 (en) | Stereo camera | |
| JP6707022B2 (en) | Stereo camera | |
| JP4095491B2 (en) | Distance measuring device, distance measuring method, and distance measuring program | |
| US8295587B2 (en) | Image processing apparatus, image processing method, image processing program and position detecting apparatus as well as mobile object having the same | |
| EP1087336A2 (en) | Apparatus and method for stereoscopic image processing | |
| JP6602982B2 (en) | In-vehicle camera, in-vehicle camera adjustment method, in-vehicle camera system | |
| JP4958279B2 (en) | Object detection device | |
| JP2006252473A (en) | Obstacle detection device, calibration device, calibration method, and calibration program | |
| JP2014174088A (en) | Inspection tool, stereo camera inspection apparatus, and inspection method | |
| JP2008039491A (en) | Stereo image processing device | |
| US6697146B2 (en) | Range finder for finding range by image realization | |
| JP6186431B2 (en) | Calibration apparatus, calibration system, and imaging apparatus | |
| US12554277B2 (en) | Control method for light sources of vision machine, and vision machine | |
| KR102803378B1 (en) | Method for compensating images and/or image points, camera-based systems and vehicles | |
| JP7083014B2 (en) | Stereo camera | |
| JP7813912B2 (en) | Camera calibration device and camera calibration method | |
| CN116718109B (en) | Target capturing method based on binocular camera | |
| JP7492599B2 (en) | Vehicle-mounted camera device | |
| JP7146608B2 (en) | Image processing device | |
| WO2025057546A1 (en) | On-board image processing device | |
| JP2025095656A (en) | STEREO IMAGE PROCESSING APPARATUS AND STEREO IMAGE CALIBRATION METHOD | |
| KR20240130623A (en) | Distance measurement device, movable apparatus, and control method | |
| WO2022107405A1 (en) | Three-dimensional image processing device | |
| JPH1114376A (en) | Roadway detection device for vehicles | |
| JPH095071A (en) | Distance measurement method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201208 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20211129 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20211207 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211224 |
|
| 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: 20220524 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220530 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7083014 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |