JP6187609B2 - Arithmetic device, stereo camera device, device control system and program - Google Patents

Arithmetic device, stereo camera device, device control system and program Download PDF

Info

Publication number
JP6187609B2
JP6187609B2 JP2016004969A JP2016004969A JP6187609B2 JP 6187609 B2 JP6187609 B2 JP 6187609B2 JP 2016004969 A JP2016004969 A JP 2016004969A JP 2016004969 A JP2016004969 A JP 2016004969A JP 6187609 B2 JP6187609 B2 JP 6187609B2
Authority
JP
Japan
Prior art keywords
time
parallax
stereo camera
calculated
corresponding points
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
JP2016004969A
Other languages
Japanese (ja)
Other versions
JP2016105100A (en
Inventor
優子 梅澤
優子 梅澤
青木 伸
青木  伸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Publication of JP2016105100A publication Critical patent/JP2016105100A/en
Application granted granted Critical
Publication of JP6187609B2 publication Critical patent/JP6187609B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Measurement Of Optical Distance (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Description

本発明は、演算装置、ステレオカメラ装置、機器制御システムおよびプログラムに関する。   The present invention relates to an arithmetic device, a stereo camera device, a device control system, and a program.

物体に対してカメラなどの複数の撮像装置を異なる位置に配置し、撮像された画像から物体までの距離を測定する測距方式として、いわゆるステレオカメラ装置が知られている。平行ステレオカメラ装置は、基線長として参照される一定の間隔をもって固定された2台のカメラを備え、カメラの光軸が平行となるように配置されている。ステレオカメラ装置は、第1のカメラで取得した物体画像と、第2のカメラで取得した物体画像の視差を光学系に固有のパラメータを利用して距離に変換することによって物体までの距離を決定するものである。   A so-called stereo camera device is known as a distance measuring method in which a plurality of imaging devices such as cameras are arranged at different positions with respect to an object and the distance from the captured image to the object is measured. The parallel stereo camera device includes two cameras fixed at a constant interval referred to as a baseline length, and is arranged so that the optical axes of the cameras are parallel. The stereo camera device determines the distance to the object by converting the parallax between the object image acquired by the first camera and the object image acquired by the second camera into a distance using parameters specific to the optical system. To do.

図7には、従来のステレオカメラ装置の光学系を示す。図7に示すように、ステレオカメラ装置が備える2台のカメラ1、1は、所定の基線長Bをもって配置されている。これらのカメラは、CCDやCMOSなどからなるイメージセンサ(撮像素子)及び撮影視野内の被写体の像をイメージセンサの撮像面上に結像させる撮影レンズ(撮影光学系)をそれぞれ有する。 FIG. 7 shows an optical system of a conventional stereo camera device. As shown in FIG. 7, the two cameras 1 R and 1 L included in the stereo camera device are arranged with a predetermined baseline length B. Each of these cameras has an image sensor (imaging device) composed of a CCD, a CMOS, and the like, and a photographic lens (imaging optical system) that forms an image of a subject in the field of view on the imaging surface of the image sensor.

平行配置した2台のカメラによる距離計測を、さらに図7を使用して説明する。ステレオカメラ装置700は、焦点距離f、光学中心O、撮像面Sを有するカメラ1が、図7の紙面上下方向を光軸方向として配置され、かつ、同じ焦点距離fを持つカメラ1は、カメラ1の紙面右手側に距離:Bだけ離れて平行に配置されているものとする。ここで、カメラ1の光学中心ORから光軸方向に距離:dだけ離れた位置にある被写体Xの像は、カメラ1の撮像面S上における直線X−Oとの交点であるPに像を結ぶ。 The distance measurement by two cameras arranged in parallel will be further described with reference to FIG. The stereo camera device 700, the focal length f, the optical center O R, the camera 1 R having the imaging surface S R, is arranged up-down direction in FIG. 7 as the optical axis direction, and the camera 1 having the same focal length f L is the distance to the plane on the right hand side of the camera 1 R: is assumed that only are arranged in parallel spaced B. Here, the camera 1 R optical center O R or RaHikarijiku direction at a distance of: an image of a subject X on the d apart position, the intersection of the straight line X-O R on the imaging surface S R of the camera 1 R It forms an image P R is.

一方、カメラ1では、同じ被写体Xの像は、撮像面S上の位置Pに像を結ぶ。ここで、カメラ:1の光学中心:Oを通り、直線:X−Oと平行な破線と、撮像面Sとの交点をP′とし、点P′とPの距離をpとする。P′は、カメラ:1上の像Pと同じ位置座標であり、距離pは、同じ被写体の像の、2つのカメラの撮像面上での位置ずれ量を表し、これを視差と定義すると、三角形:X−O−Oと、三角形:O−P′−Pは相似なので、基線長Bと焦点距離fが既知ならば、視差pの値から光学中心から被写体Xまでの距離dを、d=B×f/pとして求めることができる。 On the other hand, in the camera 1 L, an image of the same subject X is forms an image at a position P L on the imaging surface S L. Here, the camera: 1 L of the optical center: through the O L, the linear: the distance X-O and R and parallel broken lines, the intersection of the imaging surface S L 'and the point P R' P R and P L Is p. P R 'is a camera: 1 is the same coordinates as the image P R on R, the distance p is, the image of the same subject, represents the positional deviation amount on the imaging surface of two cameras, which parallax defining, triangle: X-O R -O L and, triangles: O L -P since R '-P L is a similar, if the base length B and the focal length f is known, the subject from the optical center from the value of the parallax p The distance d to X can be determined as d = B × f / p.

ステレオカメラ装置は、多くの場合車両などの移動体に設置され、距離計測などのために利用される。このため、ステレオカメラ装置は、持続的な振動や温度変化などに曝される。平行ステレオカメラ装置が含む2台のカメラの光軸は、平行であることが、図7で説明したように測距計算の前提となっているので、光軸の平行度ずれ(一方のカメラの光軸に対する他方のカメラの光軸が平行ではなくなる方向への回転)、光学中心に対する撮像センサの横方向の位置ずれは、本来取得されるべき物体の像位置を視差方向に対して変位させてしまう。この様な光学系のアライメントのズレは、距離測定の重大な誤差を生じさせてしまうことになり、従来から視差オフセットと呼ばれる誤差として知られている。図7で説明したように、視差オフセットは、直接視差に反映されてしまうので、距離精度の劣化の大きな要因となる。   In many cases, the stereo camera device is installed in a moving body such as a vehicle and used for distance measurement. For this reason, the stereo camera device is exposed to continuous vibrations and temperature changes. Since the optical axes of the two cameras included in the parallel stereo camera device are assumed to be parallel as described in FIG. 7, it is assumed that the optical axes of the two cameras are parallel. The rotation of the other camera in the direction in which the optical axis of the other camera is not parallel to the optical axis) and the lateral displacement of the imaging sensor with respect to the optical center cause the image position of the object to be acquired to be displaced with respect to the parallax direction. End up. Such misalignment of the optical system causes a serious error in distance measurement, and is conventionally known as an error called parallax offset. As described with reference to FIG. 7, the parallax offset is directly reflected in the parallax, which is a major factor in the deterioration of the distance accuracy.

距離精度の劣化を防ぐためには、製造時でのパラメータの正確な調整が必要であるが、車両の運転にともなう振動、車体の歪みや温度変化などの経時変化により、配置の微小変化は避けられない。この理由から、ステレオカメラ装置の距離精度を保つため、ステレオカメラ装置の販売後に、距離が予めわかっている画像、すなわちテストチャートを利用して装置を校正する方法が考えられるが、校正期間中には、ステレオカメラ装置が利用できないことになるなど、利用者の利便性を大きく損なってしまう。   In order to prevent the deterioration of distance accuracy, it is necessary to accurately adjust the parameters at the time of manufacturing, but minute changes in the layout can be avoided due to changes with time such as vibrations, distortion of the vehicle body and temperature changes due to vehicle operation. Absent. For this reason, in order to maintain the distance accuracy of the stereo camera device, a method of calibrating the device by using an image whose distance is known in advance after the sale of the stereo camera device, that is, a test chart can be considered. This greatly impairs the convenience of the user, for example, the stereo camera device cannot be used.

上述した不都合を改善するため、テストチャートを必要とせずに、走行中の周りの風景の特徴が既知な対象物(例えば距離の既知な白線や信号機や電柱)を利用して、校正する方法が既に提案されている。例えば、特開平10−341458号公報(特許文献1)では、ステレオカメラ装置の設置方向のずれを検出するために、静止物体の形状を記憶しておき、記憶と照合して静止物体を認識し、速度センサなどから測定できる移動距離と認識静止物体との距離関係から視差オフセットを求める技術が開示されている。また、特許第3436074号明細書(特許文献2)では、複数の校正用撮影地点の同一の静止物体の画像および校正用撮影地点間の距離とを元に校正を行う車載ステレオカメラが記載されている。さらに、特開2009−176090号公報(特許文献3)では、撮影された画像から対象物を検出して周囲環境を認識する環境認識装置が記載されている。さらに特願2009−288233号明細書(特許文献4)では、カメラで撮影された画像の傾きを補正する技術が記載されている。   In order to improve the inconvenience described above, there is a method of calibrating by using an object (for example, a white line with a known distance, a traffic light, or a power pole) with known features of the surrounding scenery without requiring a test chart. It has already been proposed. For example, in Japanese Patent Laid-Open No. 10-341458 (Patent Document 1), in order to detect a shift in the installation direction of a stereo camera device, the shape of a stationary object is stored, and the stationary object is recognized by collating with the storage. A technique for obtaining a parallax offset from a distance relationship between a moving distance that can be measured by a speed sensor or the like and a recognized stationary object is disclosed. Japanese Patent No. 3436074 (Patent Document 2) describes an in-vehicle stereo camera that performs calibration based on images of the same stationary object at a plurality of calibration shooting points and the distance between the calibration shooting points. Yes. Furthermore, Japanese Unexamined Patent Application Publication No. 2009-176090 (Patent Document 3) describes an environment recognition device that detects an object from a captured image and recognizes the surrounding environment. Furthermore, Japanese Patent Application No. 2009-288233 (Patent Document 4) describes a technique for correcting the inclination of an image photographed by a camera.

しかしながら、上述した従来の技術では、高速道路などの予め距離の既知な白線を利用したり、信号機や電柱といった限られた物体しか静止対象物として認識できないので、視差オフセットを校正できる場所・タイミングが限られる。また、走行中の周りの風景は常に変化し、レンズの歪みにより画像中のどこに対象物があるかによって見え方も変化してしまうため、正確に静止物を認識する事が困難であるとともに、予め形状を記憶しておいた静止物のみにしか利用できないという問題があった。   However, in the conventional technology described above, a white line with a known distance such as an expressway is used, or only a limited object such as a traffic light or a power pole can be recognized as a stationary object. Limited. In addition, the scenery around the vehicle constantly changes, and the appearance changes depending on where the object is in the image due to distortion of the lens, so it is difficult to accurately recognize a stationary object, There is a problem that it can be used only for stationary objects whose shapes are stored in advance.

本発明は、上記従来技術の問題点に鑑みてなされたものであり、場所や時間によらず精度の良い校正が可能なステレオカメラ装置の演算装置、ステレオカメラ装置、機器制御システムおよびプログラムを提供することを目的とする。   The present invention has been made in view of the above-described problems of the prior art, and provides a computing device, a stereo camera device, a device control system, and a program for a stereo camera device that can be accurately calibrated regardless of location and time. The purpose is to do.

すなわち、本発明によれば、移動体に設置され、測距演算を行うステレオカメラ装置に適用される演算装置であって、
前記ステレオカメラ装置が備える2台のカメラにより取得された2つの画像間の対応点を探索し、前記対応点に関する視差を計算する画像処理手段と、
特定の対応点に関し第1の時刻において計算された第1の視差と、前記特定の対応点に関し前記第1の時刻と異なる第2の時刻において計算された第2の視差と、前記第1の時刻と前記第2の時刻の間の前記移動体の相対速度を反映した情報とから、前記画像処理手段で計算される視差を修正する視差オフセット値を計算するオフセット値計算手段と、
複数の対応点の各々に関し計算された複数の前記視差オフセット値を統計処理することにより前記測距演算に利用する校正パラメータを決定する統計処理手段と、を備える演算装置が提供される。
That is, according to the present invention, an arithmetic device that is installed in a moving body and applied to a stereo camera device that performs a distance measurement calculation,
Image processing means for searching for corresponding points between two images acquired by two cameras included in the stereo camera device and calculating parallax related to the corresponding points;
A first disparity calculated at a first time for a specific corresponding point, a second disparity calculated at a second time different from the first time for the specific corresponding point, and the first disparity Offset value calculating means for calculating a parallax offset value for correcting the parallax calculated by the image processing means from information reflecting the relative speed of the moving object between the time and the second time;
There is provided an arithmetic device comprising statistical processing means for determining a calibration parameter used for the ranging calculation by statistically processing the plurality of parallax offset values calculated for each of a plurality of corresponding points.

本発明によれば、場所や時間によらず精度の良い校正が可能なステレオカメラ装置の演算装置、ステレオカメラ装置、機器制御システムおよびプログラムを提供することができる。   According to the present invention, it is possible to provide a computing device, a stereo camera device, a device control system, and a program for a stereo camera device that can be accurately calibrated regardless of location and time.

本実施形態のステレオカメラ装置100の構成を示す概略図。Schematic which shows the structure of the stereo camera apparatus 100 of this embodiment. 本実施形態のステレオカメラ装置100の詳細な機能ブロック200を示す図。The figure which shows the detailed functional block 200 of the stereo camera apparatus 100 of this embodiment. 本実施形態の対象点kについて、視差pk0の関係を説明する図。For the target point k 0 of the present embodiment, graph illustrating the relationship between parallax p k0. 時刻t後、適切な時間間隔で取得された左右画像の実施形態を示す図。After the time t 0, illustrates an embodiment of the acquired left and right images at appropriate time intervals. 本実施形態の校正方法の詳細なフローチャート。3 is a detailed flowchart of the calibration method of the present embodiment. 本実施形態の校正方法により生成された頻度マトリックスを、視差オフセット値qkの最小値から最大値までの範囲で横軸に視差オフセットの値、縦軸に頻度Aとして示した図。The frequency matrix generated by the calibration method of the embodiment, shown the value of the parallax offset horizontal axis in the range from the minimum value to the maximum value of the disparity offset value q k, the vertical axis as the frequency A FIG. ステレオカメラ装置を使用した距離測定の光学的関係を示した図。The figure which showed the optical relationship of the distance measurement using a stereo camera apparatus.

以下、本発明を実施形態をもって説明するが、本発明は後述する実施形態によって限定されるものではない。図1は、本実施形態のステレオカメラ装置100の構成を示す概略図である。ステレオカメラ装置100は、2台のカメラ102、104を含んで構成されている。カメラ102、104は、デジタル出力のカメラとされていて、撮影した画像を、演算部120に渡し、演算部120が左右のカメラからの画像を利用した測距計算を実行することにより、カメラ102、104の光学中心から物体108までの距離Zを取得する。取得された距離は、演算部120に接続された外部装置(図示せず)に対して送付され、外部装置による距離Zの値を利用可能とさせている。また、演算部120を含むステレオカメラ装置100は、ユーザインタフェースや外部装置との間のI/O制御を可能とする制御部(図示せず)からの制御により、距離計測、オフセット値測定およびパラメータ校正を実行する。   Hereinafter, although this invention is demonstrated with embodiment, this invention is not limited by embodiment mentioned later. FIG. 1 is a schematic diagram illustrating a configuration of a stereo camera device 100 of the present embodiment. The stereo camera device 100 includes two cameras 102 and 104. The cameras 102 and 104 are digital output cameras. The captured images are transferred to the calculation unit 120, and the calculation unit 120 executes distance calculation using the images from the left and right cameras. , 104 to obtain the distance Z from the optical center to the object 108. The acquired distance is sent to an external device (not shown) connected to the calculation unit 120, and the value of the distance Z by the external device can be used. In addition, the stereo camera device 100 including the arithmetic unit 120 can measure distance, offset value, and parameters by control from a control unit (not shown) that enables I / O control between the user interface and an external device. Perform calibration.

カメラ102、104は、レンズ102a、104aの中心から計って基線長Bだけ離間して設置され、それぞれの光軸110、112が平行となるように配置されている。カメラ102、104は、物体108のそれぞれ右(R)画像および左(L)画像を取得するためにレンズ102a、104aおよび光電変換素子102b、104bを備えていて、シャッタ(図示せず)およびレンズ102aを通過して光電変換素子上に結像した光イメージを光電変換し、デジタルデータとして記録する。記録された画像は、左右画像それぞれ演算部120に渡されて以後の測距計算および校正処理のために利用される。   The cameras 102 and 104 are installed apart from each other by a base line length B as measured from the centers of the lenses 102a and 104a, and are arranged so that the optical axes 110 and 112 are parallel to each other. The cameras 102 and 104 include lenses 102a and 104a and photoelectric conversion elements 102b and 104b, respectively, for acquiring a right (R) image and a left (L) image of the object 108, and a shutter (not shown) and a lens. An optical image formed on the photoelectric conversion element through 102a is photoelectrically converted and recorded as digital data. The recorded image is transferred to the calculation unit 120 for each of the left and right images and used for subsequent distance measurement calculation and calibration processing.

カメラ102、104は、基線長Bだけ離間して配置され、それらの光軸110、112が平行となるように配置されている。そして各カメラ102、104は、焦点距離fを有するレンズ102a、104aを備えている。この配置の光学中心から物体108までの距離Zは、左右のカメラ102、104によって取得する物体108の左右両画像中の物体108の視差pを使用して、下記式(1)で与えられる。なお、視差pとは、カメラ102、104が取得した物体108の画像中の位置の差として定義される。   The cameras 102 and 104 are arranged apart from each other by a base line length B, and are arranged so that their optical axes 110 and 112 are parallel to each other. Each of the cameras 102 and 104 includes lenses 102a and 104a having a focal length f. The distance Z from the optical center of this arrangement to the object 108 is given by the following equation (1) using the parallax p of the object 108 in both the left and right images of the object 108 acquired by the left and right cameras 102 and 104. The parallax p is defined as a difference in position in the image of the object 108 acquired by the cameras 102 and 104.

光軸110、112は、正確な測距を行うためには、正確に平行とすることが必要とされる。しかしながら、製造時や設置時の設定状態によって正確な平行を確保することは困難である。このため、多くの場合、実際のステレオカメラ装置100は、主として平行度に関連したパラメータを利用して正確な測距演算ができるように、校正パラメータqを含む下記式(2)を利用して測距演算を行なっている。   The optical axes 110 and 112 are required to be accurately parallel in order to perform accurate distance measurement. However, it is difficult to ensure accurate parallelism according to the setting state at the time of manufacture and installation. For this reason, in many cases, the actual stereo camera device 100 uses the following equation (2) including the calibration parameter q so that accurate ranging calculation can be performed mainly using parameters related to parallelism. Ranging calculation is performed.

上記式(2)中に出現するパラメータqは、視差オフセットとして参照される校正パラメータである。本実施形態では、校正パラメータqを、以下の手法で計算する事を特徴とする。異なる時刻の画像上で対応する点を求め、対応点kについて時刻異なる、すなわち、対応点kまでの自分の車の走行距離から、対応点kについて取得された視差オフセット値qkを画像全体に渡って求め、視差オフセット値qを統計処理し、画像から与えられる視差オフセット値qの最適値として校正パラメータqを決定するものである。ステレオカメラ装置100が設置された後、時間が経過すると、ステレオカメラ装置が搭載された車両の振動などの理由で、カメラ102、104の経時的な回転などにより平行度が変化する。図1では、カメラ104は、経時的に微少に回転し、位置106で示すように、その光軸の平行度が劣化した場合についても例示的に示されている。 The parameter q appearing in the above equation (2) is a calibration parameter referred to as a parallax offset. The present embodiment is characterized in that the calibration parameter q is calculated by the following method. Corresponding points on images at different times are obtained, and the corresponding points k are different in time. That is, the parallax offset value qk obtained for the corresponding point k is calculated over the entire image from the travel distance of the vehicle to the corresponding point k. Te determined, in which statistical processing parallax offset value q k, determining a calibration parameter q as the optimal value of the parallax offset value q k supplied from the image. When time elapses after the stereo camera device 100 is installed, the parallelism changes due to, for example, the rotation of the cameras 102 and 104 over time due to the vibration of the vehicle on which the stereo camera device is mounted. In FIG. 1, the camera 104 slightly rotates over time, and the case where the parallelism of the optical axis deteriorates as shown by a position 106 is also exemplarily shown.

この様な経時的な変化は、カメラ102においても発生することが想定されるので、従来のステレオカメラ装置100では、定期的に予め距離の設定されたテストチャートを読み込んで視差オフセット値を取得し、取得された視差オフセット値で以前の校正パラメータqを置換し、NVRAMといった不揮発性メモリに格納し、以後の測距演算に利用する。また、ステレオカメラ装置100が光軸を修正することが可能なモータステージを備えている場合、モータ駆動のための制御データとして利用することができる。   Since it is assumed that such a change with time also occurs in the camera 102, the conventional stereo camera device 100 periodically reads a test chart in which a distance is set in advance to obtain a parallax offset value. The previous calibration parameter q is replaced with the obtained parallax offset value, stored in a non-volatile memory such as NVRAM, and used for subsequent ranging calculation. Further, when the stereo camera device 100 includes a motor stage capable of correcting the optical axis, it can be used as control data for driving the motor.

図2は、本実施形態のステレオカメラ装置100の詳細な機能ブロック200を示す。ステレオカメラ装置100は、カメラ102、104と、演算部120とを含んでいる。演算部120は、カメラ102、104に対して画像取得を指令すると共に、カメラ102、104が取得した画像を利用する測距演算およびパラメータ校正を行うための演算を実行する。   FIG. 2 shows a detailed functional block 200 of the stereo camera device 100 of the present embodiment. The stereo camera device 100 includes cameras 102 and 104 and a calculation unit 120. The arithmetic unit 120 instructs the cameras 102 and 104 to acquire an image, and also performs a distance measurement calculation and a parameter calibration using the images acquired by the cameras 102 and 104.

演算部120は、ワンチップマイコン、ASIC、車載組込コンピュータ、またはパーソナルコンピュータなどとして実装することができ、外部装置230と相互通信を行って演算部120が取得した画像を利用した距離計算の結果を外部装置230に送付し、外部装置230による距離Zを用いた各種の制御を可能とさせている。なお、外部装置230は、中央処理装置(CPU)、RAM、ROM、USBメモリなどその他のメモリ装置との間のメモリアクセスを可能とする演算部120は別体として構成されるか、または一体として構成される情報処理装置として実装することができる。   The calculation unit 120 can be implemented as a one-chip microcomputer, ASIC, in-vehicle built-in computer, personal computer, or the like, and results of distance calculation using images acquired by the calculation unit 120 through mutual communication with the external device 230 Is sent to the external device 230, and various controls using the distance Z by the external device 230 are made possible. Note that the external device 230 is configured such that the arithmetic unit 120 that enables memory access to other memory devices such as a central processing unit (CPU), RAM, ROM, and USB memory is configured separately or as an integral unit. It can be implemented as an information processing apparatus configured.

図2に示す演算部120は、その距離計算を実行する場合、左右のカメラ102、104が取得した画像を画像処理部202により画像解析し、左右のカメラ102、104が取得した画像に共通する対応点を決定する。そして、画像処理部202は、決定された物体の左右の同一の画素を対応点とし、対応点に関し、画像中での位置座標の差として視差pを計算する。なお、本実施形態においては、画像処理部202は、画像全体に渡って視差を計算させることが必要とされるので、撮像画像の対応点探索および視差計算の精度を向上させるため、公知の歪み補正処理などを適用することができる。 When the calculation unit 120 shown in FIG. 2 performs the distance calculation, the image processing unit 202 performs image analysis on the images acquired by the left and right cameras 102 and 104, and is common to the images acquired by the left and right cameras 102 and 104. Determine corresponding points. Then, the image processing unit 202, the same pixel in the right and left of the determined object and a corresponding point, relates the corresponding points, calculating the parallax p k as the difference between the position coordinates of in the image. In the present embodiment, since the image processing unit 202 is required to calculate parallax over the entire image, in order to improve the accuracy of the corresponding point search and parallax calculation of the captured image, a known distortion Correction processing or the like can be applied.

計算された視差pは、オフセット値計算部206に送られ、距離計算部208に送られる。オフセット値計算部206は、演算部120においてパラメータ校正処理を開始するタイミングの到来、またはパラメータ校正処理を開始するための外部からの割り込み信号を受領してパラメータ校正処理を開始する。それ以外の期間は、視差pのみを使用して距離測定を行う。パラメータ校正処理は、演算部120が、速度センサ204と、カメラ102、104が画像取得を行う時刻とを同期させることにより実行される。 The calculated parallax pk is sent to the offset value calculation unit 206 and sent to the distance calculation unit 208. The offset value calculation unit 206 starts the parameter calibration processing upon receipt of the timing for starting the parameter calibration processing in the calculation unit 120 or an external interrupt signal for starting the parameter calibration processing. Other periods performs distance measurement using only parallax p k. The parameter calibration process is executed by the calculation unit 120 synchronizing the speed sensor 204 and the time when the cameras 102 and 104 acquire images.

距離計算部208は、オフセット値計算部206が距離計算を実行している場合には、オフセット値計算部206が受け取った視差pをそのまま受け取り、上記式(1)にしたがって、その時点で有効な校正パラメータqを利用して距離Zを計算する。計算された距離Zは、インタフェース210を介して演算部120から外部装置230へと送付される。外部装置230は、距離Zを使用して、さらにアラーム、制動装置、エンジン制御など、他の車載装置の制御を行っている。 Distance calculation unit 208, if the offset value calculating unit 206 is performing the distance calculation receives directly the parallax p k offset value calculating unit 206 receives, according to the above formula (1), valid at that time The distance Z is calculated using the correct calibration parameter q. The calculated distance Z is sent from the computing unit 120 to the external device 230 via the interface 210. The external device 230 uses the distance Z to further control other in-vehicle devices such as an alarm, a braking device, and engine control.

演算部120は、さらに統計処理部240を含んでいる。統計処理部240は、図2に示したオフセット値計算部206および速度センサ204と共に本実施形態のパラメータ校正手段を提供する。速度センサ204は、ステレオカメラ装置100が搭載されている車両などの移動速度を検出する機能手段であり、車両の場合には、車速センサや、緯度経度座標の差と時刻t、tの時間差から速度を計算可能なGPS(Global Positioning System)装置の出力とすることもできる。さらに、他の実施形態では、速度センサ204は、ステレオカメラ装置100の演算部120の組込み装置として実装することもできる。 The calculation unit 120 further includes a statistical processing unit 240. The statistical processing unit 240 provides the parameter calibration means of this embodiment together with the offset value calculation unit 206 and the speed sensor 204 shown in FIG. The speed sensor 204 is a functional unit that detects the moving speed of a vehicle or the like on which the stereo camera device 100 is mounted. In the case of a vehicle, the speed sensor 204 and the difference between the latitude and longitude coordinates and the times t 0 and t 1 are used. It can also be an output of a GPS (Global Positioning System) device capable of calculating the speed from the time difference. Further, in another embodiment, the speed sensor 204 can be implemented as an embedded device of the arithmetic unit 120 of the stereo camera device 100.

本実施形態におけるパラメータ校正処理について、より具体的に説明する。本実施形態のパラメータ校正処理では、まず、演算部120が基準となる時刻tのカメラ102、104に対して画像取得を指令し、同時に速度センサ204に対して速度情報送付を要求する。 The parameter calibration process in this embodiment will be described more specifically. In the parameter calibration process of the present embodiment, first, the calculation unit 120 instructs the cameras 102 and 104 at time t 0 as a reference to acquire an image, and simultaneously requests the speed sensor 204 to send speed information.

その後、設定された時間である時刻tで、演算部120は、カメラ102、104に対して画像取得を指令する。この結果、ステレオカメラ装置100は、時刻tおよび時刻tの2つのカメラからの画像、つまり4枚の画像を取得する。時刻tの2つのカメラの画像は画像処理部で対応点探索がされ、視差画像が計算される。また、同様に時刻tの2つのカメラの画像も画像処理部で対応点探索がされ、視差画像が計算される。これらの視差画像はオフセット値計算部に入力される。また、時刻tとtの視差画像の対応点を求めるため、視差画像だけではなく、視差画像を求める際に使用した撮影画像もオフセット値計算部に入力される。 Thereafter, at time t 1 which is the set time, the calculation unit 120 instructs the cameras 102 and 104 to acquire an image. As a result, the stereo camera device 100 acquires images from the two cameras at time t 0 and time t 1 , that is, four images. The images of the two cameras at time t 0 are searched for corresponding points by the image processing unit, and a parallax image is calculated. Similarly, the images of the two cameras at time t 1 are searched for corresponding points by the image processing unit, and a parallax image is calculated. These parallax images are input to the offset value calculation unit. In addition, in order to obtain the corresponding points of the parallax images at times t 0 and t 1 , not only the parallax image but also the captured image used when obtaining the parallax image is input to the offset value calculation unit.

一方、演算部120は、速度センサ204から取得した速度情報をオフセット値計算部206に設定し、カメラ102、104が取得した2つのカメラからの画像の2セットの共通する対応点についての視差値p、pをセットする。pは、時刻tにおける対応点kの視差であり、pは、時刻tにおける同一の対応点kの視差である。なお、以下の説明は、説明の明確化のため、対応点kにフィックスしたものとして説明する。 On the other hand, the calculation unit 120 sets the speed information acquired from the speed sensor 204 in the offset value calculation unit 206, and the disparity values for two sets of corresponding corresponding points of the images from the two cameras acquired by the cameras 102 and 104. p 0 and p 1 are set. p 0 is the parallax of the corresponding point k at time t 0 , and p 1 is the parallax of the same corresponding point k at time t 1 . The following description will be made assuming that the corresponding point k is fixed for clarity of explanation.

上述したようにして得られた視差p、pを使用し、オフセット値計算部206は、pおよびpを使用すると、時刻tとtとの間におけるそれぞれの距離Z、Zと時刻t、tそれぞれの視差値p、pとの関係は、下記式(3)で与えられる。 Using the parallaxes p 0 and p 1 obtained as described above, and the offset value calculation unit 206 uses p 0 and p 1 , the distances Z 0 and t 1 between the times t 0 and t 1 , The relationship between Z 1 and the parallax values p 0 and p 1 at times t 0 and t 1 is given by the following equation (3).

およびZの走行距離Dは、対応点が静止物であれば、ステレオカメラ装置100が搭載されている車両の移動距離であり、対応点が車両などの移動物であれば、相対速度を反映した距離となる。移動物の場合、ステレオカメラ装置100に対する相対速度が異なるので、Zの値は、Zを中心として大小方向に分布することになる。 The travel distance D of Z 0 and Z 1 is the travel distance of the vehicle on which the stereo camera device 100 is mounted if the corresponding point is a stationary object, and the relative speed if the corresponding point is a moving object such as a vehicle. It is the distance reflecting. In the case of a moving object, since the relative speed with respect to the stereo camera device 100 is different, the value of Z 1 is distributed in the size direction with Z 0 as the center.

上記式(3)を使用すれば、走行距離Dは、D=Z−Zで与えられ、既知のB、fおよび測定変数の視差p、p、および対応点kについての視差オフセット値qを使用して下記式(4)で与えられる。 Using the equation (3), the travel distance D, D = Z 0 is given by -Z 1, known B, parallax p 0 of f and measurement variables, p 1, and parallax offset for the corresponding point k using the value q k is given by the following equation (4).

上記式(4)は、変形により、視差オフセット値qを含む2次方程式に変換できる。そして、視差オフセット値qは、上記式(4)のqについての2次方程式の解(q≧0)として下記式(5)で与えられる。 The above equation (4) can be converted into a quadratic equation including the parallax offset value q k by modification. Then, the parallax offset value q k is given by the following formula (5) as a solution of a quadratic equation for q k in the formula (4) (q k ≧ 0).

この視差オフセット値qは、移動体相互の相対速度を反映し、必ずしも同一にはならないことは上述した通りである。本実施形態では、対応点k(k=1〜N)毎に上述した関係式が与えられるので、対応点k毎に校正パラメータの候補値として画像全体について視差オフセット値qを計算する。オフセット値計算部206は、上記式(5)の処理を実行している。 As described above, the parallax offset value q k reflects the relative speed between the moving bodies and is not necessarily the same. In the present embodiment, since the relational expression described above for each corresponding point k (k = 1 to N) is given, for the entire image to calculate a parallax offset value q k for each corresponding point k as a candidate value of the calibration parameter. The offset value calculation unit 206 executes the process of the above formula (5).

以下、本実施形態で使用される校正処理部について説明する。オフセット値計算部206の処理が終了すると、計算されたqの値は、統計処理部240に送られる。統計処理部240は、計算されたqの値を総当たり的にあらかじめ設定されたチャンクに帰属されるか否かを検査し、処理中のqが、例えばチャンクQ(mは、正の整数である。)帰属される場合、チャンクQのカウント値をインクリメントし、チャンクQに分類される視差オフセット値の個数をカウントし、視差オフセット値の頻度Aを生成する。 Hereinafter, the calibration processing unit used in the present embodiment will be described. When the processing of the offset value calculation unit 206 ends, the calculated value of q k is sent to the statistical processing unit 240. The statistical processing unit 240 checks whether or not the calculated value of q k is attributed to a preset brute force chunk, and the q k being processed is, for example, the chunk Q m (m is a positive value). of an integer.) If attributed, increments the count value of the chunk Q m, counts the number of parallax offset values classified into chunks Q m, and generates a frequency a m of parallax offset value.

そして、統計処理部240は、全対応点の処理を終了した時点のカウント値を、視差オフセット値の出現する頻度Aを使用し、頻度マトリックスFを下記式(6)として生成する。なお、Qは、視差オフセット値のチャンクを与え、当該チャンクQは、校正パラメータqを与えるためのインデックス値Iで参照され、I=最小値+Δ×Mで規定される値である。なお、チャンクQについては、校正処理によって対応可能な視差オフセットの最大値を予め設定しておき、最大値までの区間にチャンク数mを均等に割り当てて頻度積算を行うことができる。この実施形態では、画像全体について視差オフセットが取得できていない場合でも頻度分布のピークと、残りのサンプル点の個数との比較で、最適値を効率的に決定することが可能となり、ステレオカメラ装置100が校正処理のため距離測定ができない期間を最小化させることができる。なお、他の実施形態では、全画素について視差オフセットが計算できた後に頻度計算を実行することもできる。 The statistical processing unit 240, the count value of the time of completion of the processing of all corresponding points, using the frequency A m to the appearance of the parallax offset value, to generate a frequency matrix F as the following equation (6). Q m gives a chunk of a parallax offset value. The chunk Q m is referred to by an index value I m for giving a calibration parameter q, and is a value defined by I m = minimum value + Δ × M. . Note that the chunk Q m, may be set the maximum value of the adaptable parallax offset in advance by calibration processing, it is possible to perform cumulative frequency evenly allocated chunks number m in the interval up to a maximum. In this embodiment, even when the parallax offset cannot be obtained for the entire image, it is possible to efficiently determine the optimum value by comparing the peak of the frequency distribution and the number of remaining sample points. It is possible to minimize the period during which distance measurement is not possible because 100 is a calibration process. In other embodiments, the frequency calculation can be performed after the parallax offset has been calculated for all pixels.

上記頻度マトリックスFは、校正パラメータqを提供するための統計データを提供し、統計処理部240は、統計データを処理して最適値を得るためにこれまで知られたいかなる統計処理を使用することができる。この際の統計処理としては、例えば最頻値、中央値、平均値、重み付け平均値などを使用することができ、最頻値を利用する場合、視差オフセット値qは、fmaxを与えるインデックス値Imaxとして決定することができる。この他にも、視差オフセット値qを、正規分布を仮定した回帰分析、多項式分布を使用した回帰分析、2項分布、χ2乗分布、ポアッソン分布、β分布など、分布関数を利用した回帰分析により取得するなど、いかなる統計モデルであっても利用することができる。 The frequency matrix F provides statistical data for providing the calibration parameter q, and the statistical processing unit 240 uses any statistical processing known so far to process the statistical data and obtain an optimum value. Can do. As statistical processing at this time, for example, a mode value, a median value, an average value, a weighted average value, and the like can be used. When the mode value is used, the parallax offset value q k is an index that gives f max. It can be determined as the value I max . In addition to this, the parallax offset value q k, regression analysis assuming a normal distribution, a regression analysis using polynomial distribution, binomial distribution, chi-square square distribution, Poisson distribution, beta distribution etc., regression analysis using a distribution function Any statistical model can be used.

統計処理において、分散を計算し、分散の値が予め設定された視差オフセット値qの振れ幅に対して一定以上の割合を有する場合には、それまでの結果を廃棄し、再度時間をおいて処理を再実行することで、不適当な値が校正パラメータqとして採用されてしまうことを防止することもできる。大きな衝撃によってカメラ間の位置関係が大きく変わるときには視差オフセット値の初期値からの変化は大きくなり、経年変化などでは視差オフセット値qkの変化は小さくなるはずである。よって視差オフセット値qの振れ幅の設定値はどのような変化を検知したいかによって決まる。 In statistical processing, when the variance is calculated and the variance value has a certain ratio or more with respect to the preset deviation width of the parallax offset value q k , the results up to that point are discarded and the time is again spent. By re-executing the process, it is possible to prevent an inappropriate value from being adopted as the calibration parameter q. When the positional relationship between the cameras changes greatly due to a large impact, the change of the parallax offset value from the initial value becomes large, and the change of the parallax offset value qk should be small due to secular change or the like. Therefore the set value of the amplitude of the parallax offset value q k is determined depending on whether you want to detect what changes.

また、他の実施形態では、正規分布を仮定して統計解析を行う場合、現在有効な校正パラメータqを取得したときの標準偏差σpastを記憶させておき、今回取得した値の検査を行って、値の採否を決定することもできる。 In another embodiment, when statistical analysis is performed assuming a normal distribution, the standard deviation σ past when the currently effective calibration parameter q is acquired is stored, and the value acquired this time is inspected. It is also possible to decide whether to accept the value.

校正パラメータqは、下記式(7)を使用してカメラ102、104の光軸のズレ角に変換することができる。   The calibration parameter q can be converted into a deviation angle of the optical axes of the cameras 102 and 104 using the following equation (7).

校正パラメータqから得た角度θは、ステレオカメラ装置100がカメラ駆動システムを有している場合には、モータステージを駆動させる量として、モータに送付される。また、ステレオカメラ装置100がカメラ駆動システムを有していない場合には、距離計算部208に送られ、以後の距離Zの計算に使用する校正パラメータとして、NVRAM234などに格納される。距離計算部208の取得した距離Zは、インタフェース210を介して演算部120から外部装置230に送付され、距離を使用した各種制御のために利用される。   When the stereo camera device 100 has a camera drive system, the angle θ obtained from the calibration parameter q is sent to the motor as an amount for driving the motor stage. When the stereo camera device 100 does not have a camera drive system, the stereo camera device 100 is sent to the distance calculation unit 208 and stored in the NVRAM 234 or the like as a calibration parameter used for the subsequent calculation of the distance Z. The distance Z acquired by the distance calculation unit 208 is sent from the calculation unit 120 to the external device 230 via the interface 210, and is used for various controls using the distance.

本実施形態では、カメラ102、104で撮影された画像の対応点は画素単位で探索することもできるし、処理速度の観点から、左右の画像をメッシュ分解し、メッシュの輝度、色相、色分布などを計算し、メッシュ単位で対応点を探索することもできる。   In the present embodiment, the corresponding points of the images taken by the cameras 102 and 104 can be searched for in pixel units, and from the viewpoint of processing speed, the left and right images are mesh-decomposed, and the luminance, hue, and color distribution of the meshes. Etc., and corresponding points can be searched for in mesh units.

図3は、本実施形態が利用する対応点kについて、視差pk0との関係を説明する図である。ステレオカメラ装置100は、左右のカメラ102、104で取得した左右画像それぞれに対してメッシュを割り当てた後、左右画像の対応点(メッシュ)を探索する。左右画像の対応点の探索は、メッシュ毎に計算された輝度、色相、色分布などを利用して行うことができる。基線長Bにも依存するが、左右画像はそれほど大きくずれないので、本実施形態の探索は、例えば左画像で決定した対応点に対して、周囲の数メッシュ程度の近傍探索で終了することができる。 FIG. 3 is a diagram for explaining the relationship between the corresponding point k 0 used by the present embodiment and the parallax p k0 . The stereo camera apparatus 100 searches for corresponding points (mesh) of the left and right images after assigning a mesh to each of the left and right images acquired by the left and right cameras 102 and 104. The search for corresponding points in the left and right images can be performed using the luminance, hue, color distribution, and the like calculated for each mesh. Although it depends on the baseline length B, the left and right images do not deviate so much. Therefore, the search of this embodiment can be completed with a neighborhood search of about several meshes around the corresponding points determined in the left image, for example. it can.

図3(a)は、説明のために左右画像における対応点の状態を示している。左右画像を重畳すると、左画像の特徴点と右画像の特徴点とは、ほぼ数メッシュの範囲内に存在する。そして、ステレオカメラ装置100のカメラ102、104の基線が水平とされている場合、カメラの設置されている側から見て視線のズレの方向に探索すれば効率的に対応点を発見することができる。図3(a)では、左右画像の視差を略リアルスケールで示しているので、明確に示されていない。図3の円300の内を拡大して示したのが図3(b)である。図3(b)に示すように、対応点kr0、kl0は、水平方向に近接して存在し、対応点kr0、kl0の画像中の位置ずれが、視差pk0を与える。なお、時刻tでの対応点については、kr1およびkl1で示す。そして、対応点kの時刻tでの視差をpktとすると、pkt=krt−kltで与えられる。実施形態においては、画像全体に渡って視差を計算することから、撮像画像の対応点探索および視差計算の精度を向上させるために、公知の歪み補正処理などがされている事が望ましい。 FIG. 3A shows the state of corresponding points in the left and right images for explanation. When the left and right images are superimposed, the feature points of the left image and the feature points of the right image exist in a range of approximately several meshes. If the base lines of the cameras 102 and 104 of the stereo camera device 100 are horizontal, searching for the direction of the line of sight when viewed from the side where the camera is installed can efficiently find corresponding points. it can. In FIG. 3A, the parallax of the left and right images is shown in a substantially real scale, and is not clearly shown. FIG. 3B shows an enlarged view of the circle 300 in FIG. As shown in FIG. 3B, the corresponding points k r0 and k 10 are close to each other in the horizontal direction, and the positional shift in the image of the corresponding points k r0 and k 10 gives the parallax p k0 . Note that corresponding points at time t 1 are denoted by k r1 and k l1 . When the parallax of the corresponding point k at time t is p kt , p kt = k rt −k lt is given. In the embodiment, since the parallax is calculated over the entire image, it is desirable that a known distortion correction process or the like is performed in order to improve the accuracy of the corresponding point search of the captured image and the parallax calculation.

図4は、時刻t後、適切な時間間隔で取得された左右画像の実施形態を示す。時間の経過に対応して、相対速度の相違に対応した物体の位置変化が生じている。ただし、図4に示す実施形態では、時間経過が僅かなので、左右画像410、420は、図3の画像と略同一の画像となっている。時刻tと時刻tとの差は、時刻tと時刻tとで画像エッジ付近で対応点が存在しなくなる、すなわち探索失敗が発生しない程度の差とすることが好ましく、あまり長いと精度が低下するし、また短すぎると充分な視差の差が得られないので、速度センサ204などのログデータを参照して、速度の大小に応じて、視差の差が得られ、かつ対応点探索の失敗が発生しない程度の差となるように適宜設定することが望ましい。 FIG. 4 shows an embodiment of left and right images acquired at appropriate time intervals after time t 0 . Corresponding to the passage of time, the position change of the object corresponding to the difference in relative speed occurs. However, in the embodiment shown in FIG. 4, since the passage of time is slight, the left and right images 410 and 420 are substantially the same as the image of FIG. 3. The difference between the times t 0 and time t 1, the corresponding point is not present in the vicinity of the image edges between time t 0 and time t 1, i.e. it is preferred that the difference between the degree to which the search failure does not occur, if too long If the accuracy is low and the difference is too short, a sufficient difference in parallax cannot be obtained. Therefore, referring to log data such as the speed sensor 204, a difference in parallax can be obtained according to the magnitude of the speed, and corresponding points can be obtained. It is desirable to appropriately set the difference so as not to cause a search failure.

本実施形態では、同一時刻に取得した右画像および左画像を左右画像中の同一の物体を識別できる限り、物体を構成する特定の画素の画像中の位置をそのまま使用することもできるし、他の実施形態では、画像をメッシュ分割した後、当該メッシュ内に含まれる画素をメッシュ内で平均化し、メッシュの位置座標を使用することもできる。以下、メッシュ自体またはメッシュが含む画素または画素領域を総合して本実施形態で計算の基準となる対応点として参照する。   In the present embodiment, as long as the same object in the left and right images can be identified from the right image and the left image acquired at the same time, the position in the image of a specific pixel constituting the object can be used as it is. In the embodiment, after the image is divided into meshes, the pixels included in the mesh are averaged in the mesh, and the position coordinates of the mesh can be used. Hereinafter, the mesh itself or the pixels or pixel regions included in the mesh are collectively referred to as corresponding points serving as a calculation reference in the present embodiment.

本実施形態でメッシュ分割する際のサイズは特に限定はないが、メッシュ分割を細かくしすぎると、左右画像中における処理対象である対応点の探索に時間がかかり、大きくしすぎると、校正精度を低下させる。このため、画像のサイズにもよるが、本実施形態においてメッシュ分割を適用する場合、縦横100メッシュ、画像全体で10,000メッシュ程度に分割することができる。   The size of the mesh division in this embodiment is not particularly limited, but if the mesh division is too fine, it will take time to search for corresponding points to be processed in the left and right images, and if it is too large, the calibration accuracy will be reduced. Reduce. For this reason, although it depends on the size of the image, when mesh division is applied in the present embodiment, the image can be divided into 100 mesh in length and width and about 10,000 mesh in the entire image.

図5は、本実施形態のオフセット値計算部の処理の詳細なフローチャートである。図5の処理は、ステップS500から開始し、ステップS501で、画像処理部から時刻tの撮像画像と視差画像を取得する。ステップS502では、時刻tの撮像画像と視差画像を取得する。ステップS503では、速度センサからの情報から時刻tから時刻t間の自分の車の走行距離Dを計算し、ステップS504では、時刻tと時刻tの撮像画像から異なる時刻の画像の対応点探索を行う。 FIG. 5 is a detailed flowchart of the processing of the offset value calculation unit of this embodiment. Process of Figure 5 starts at step S500, at step S501, acquires a captured image and the parallax image at time t 0 from the image processing unit. At step S502, it acquires a captured image and the parallax image at time t 1. At step S503, the time t 0 from the information from the speed sensor the travel distance D of their vehicles between time t 1 is calculated, in step S504, the time t 0 and time t 1 of the different times of the image from the captured image Search for corresponding points.

探索は、時間を隔てた時刻tと時刻tの撮像画像としてカメラ102とカメラ104の画像があるが、102または104の片方のカメラの画像間で対応点探索を行ってもよいし、両方のカメラの画像から対応点探索を行ってもよい。対応点探索には、SAD(sum of absolute difference)やPOC(位相限定相関)などの周知の技術を利用する事ができる。時刻間画像における対応点を対応点k(k=1〜N)と記述する。 As for the search, there are images of the camera 102 and the camera 104 as captured images at time t 0 and time t 1 separated by time, but a corresponding point search may be performed between images of one of the cameras 102 or 104, Corresponding point search may be performed from the images of both cameras. A known technique such as SAD (sum of absolute difference) or POC (phase-only correlation) can be used for the corresponding point search. Corresponding points in the time-to-time image are described as corresponding points k (k = 1 to N).

ステップS505とS506では、ステップS504で探索した時刻間画像の対応点kにおける視差値を求める。ステップS505では時刻tの視差画像から対応点kにおける視差値pk0を取得し、S506では時刻tの視差画像から対応点kにおける視差値pk1を取得する。 In steps S505 and S506, the parallax value at the corresponding point k of the inter-time image searched in step S504 is obtained. Step S505 obtains the disparity value p k0 at corresponding points k from the parallax image at time t 0 in, obtains a parallax value p k1 at corresponding points k from S506 at time t 1 of the parallax images.

ステップS507ではステップS505とS506で求めた対応点kの時刻tでの視差値pk0と時刻tでの視差値pk1と自分の車の走行距離Dから、上記式(5)より、視差オフセット値qを算出する。ここで、対応点kは画像全体に渡って複数あるので視差値pk0と視差値pk1は複数あるが、時刻tとt間の自分の車の走行距離の値は一つの同じ値Dである。ステップS508では、ステップS507で計算された視差オフセット値qが統計処理部に出力される。 In step S507, from the above equation (5), the parallax value p k0 of the corresponding point k obtained in steps S505 and S506 at time t 0 , the parallax value p k1 at time t 1 , and the travel distance D of the own vehicle, A parallax offset value q k is calculated. Here, since there are a plurality of corresponding points k over the entire image, there are a plurality of parallax values p k0 and a plurality of parallax values p k1 , but the value of the travel distance of one's own vehicle between times t 0 and t 1 is one and the same value. D. At step S508, the parallax offset value q k calculated in step S507 is output to the statistical processing unit.

ステップS509では、画像全体に渡って複数ある対応点kの視差オフセット値qの計算が全て終了したか否かを判断する。計算が終了していない場合にはS505に戻し、全対応点の計算が終了するまで処理を反復する。一方、ステップS509で全対応点の計算が終了したときには、そこでオフセット値計算部の処理は終了となる。この終了時には時刻tとtに対応する画面全体の視差オフセット値が統計処理部に出力されている状態となっている。 At step S509, the calculation of the parallax offset value q k of a plurality of corresponding points k over the entire image to determine whether or not all the processes are terminated. If the calculation is not completed, the process returns to S505, and the process is repeated until the calculation of all corresponding points is completed. On the other hand, when the calculation of all corresponding points is completed in step S509, the processing of the offset value calculation unit ends there. At this end, the parallax offset value of the entire screen corresponding to times t 0 and t 1 is being output to the statistical processing unit.

図6は、本実施形態の校正方法により生成された頻度マトリックスを、視差オフセット値qの最小値から最大値までの範囲で横軸に視差オフセットの値、縦軸に頻度Aとして示した図である。図6の実施形態では、視差オフセット値qは、対応点毎の相対速度に対応して、分布する。ステレオカメラ装置100は、対応点毎について得られる視差オフセット値qの値を、出現頻度のヒストグラムとして統計処理する。この際、視差オフセット値qは、その値毎に特定のチャンクQに累積カウントされて行き、全対応点の計算が終了した時点で、インデックス値Iを有し、幅がΔのヒストグラムを与える。図6に示した分布を統計解析することによって、最適値を、校正パラメータqとして取得する。なお、校正パラメータqは、インデックス値Iの値をそのまま使用して決定することもできるし、重み付け平均などを利用する場合は、Iではない正の実数を利用することもできる。 6, a frequency matrix generated by the calibration method of the embodiment, shown the value of the parallax offset horizontal axis in the range from the minimum value to the maximum value of the disparity offset value q k, the vertical axis as the frequency A FIG. It is. In the embodiment of FIG. 6, the parallax offset value q k is distributed corresponding to the relative speed for each corresponding point. The stereo camera device 100 statistically processes the value of the parallax offset value q k obtained for each corresponding point as a histogram of appearance frequencies. At this time, the parallax offset value q k is cumulatively counted in a specific chunk Q m for each value, and when calculation of all corresponding points is completed, the index parallax offset value q k has an index value I m and has a width Δ. give. The optimal value is acquired as the calibration parameter q by statistically analyzing the distribution shown in FIG. Incidentally, the calibration parameter q can can either be determined directly using the value of the index value I m, when using a weighted average, etc., can be used a positive real number not I m.

なお、本実施形態の他の実施形態では、頻度ヒストグラムとすることなく散布図のままN個の視差オフセット値qを一括して統計解析することにより、最適値解析を行うことができることは、言うまでもないことであり、演算部120の能力やメモリ容量などに応じて適宜最適な統計解析手法を利用することができる。 In another embodiment of the present embodiment, the optimal value analysis can be performed by statistically analyzing the N parallax offset values q k in a lump without using the frequency histogram. Needless to say, an optimal statistical analysis method can be used as appropriate in accordance with the capability of the arithmetic unit 120, the memory capacity, and the like.

以上のように、本発明によれば、対象物の動静や形状を問わず、対象物との相対距離を精度良く取得せず、時間、場所を問わず、またステレオカメラ装置の機能を最大限に利用可能とする高精度の演算装置、ステレオカメラ装置、機器制御システムおよびプログラムを提供することができる。   As described above, according to the present invention, regardless of the movement or shape of an object, the relative distance from the object cannot be obtained accurately, regardless of time and place, and the functions of the stereo camera device can be maximized. It is possible to provide a high-precision arithmetic device, stereo camera device, device control system, and program that can be used for the above.

本実施形態の上記機能は、C、C++、Java(登録商標)などのプログラミング言語やアセンブラ言語などで記述された装置実行可能なプログラムにより実現でき、プログラムは、ハードディスク装置、CD−ROM、MO、フレキシブルディスク、EEPROM、EPROMなどの装置可読な記録媒体に格納して頒布することができ、また他装置が可能な形式でネットワークを介して伝送することができる。   The above functions of the present embodiment can be realized by a device executable program described in a programming language such as C, C ++, Java (registered trademark), an assembler language, and the like. The programs include a hard disk device, a CD-ROM, an MO, It can be stored and distributed in a device-readable recording medium such as a flexible disk, EEPROM, or EPROM, and can be transmitted through a network in a format that other devices can.

これまで本実施形態につき説明してきたが、本発明は、上述した実施形態に限定されるものではなく、他の実施形態、追加、変更、削除など、当業者が想到することができる範囲内で変更することができ、いずれの態様においても本発明の作用・効果を奏する限り、本発明の範囲に含まれるものである。   Although the present embodiment has been described so far, the present invention is not limited to the above-described embodiment, and other embodiments, additions, changes, deletions, and the like can be conceived by those skilled in the art. It can be changed, and any aspect is within the scope of the present invention as long as the effects and effects of the present invention are exhibited.

100 ステレオカメラ装置
102 カメラ
102a レンズ
102b 光電変換素子
104 カメラ
106 位置
108 物体
110 光軸
120 演算部
200 機能ブロック
202 画像処理部
204 速度センサ
206 オフセット値計算部
208 距離計算部
210 インタフェース
230 外部装置
234 NVRAM
240 統計処理部
DESCRIPTION OF SYMBOLS 100 Stereo camera apparatus 102 Camera 102a Lens 102b Photoelectric conversion element 104 Camera 106 Position 108 Object 110 Optical axis 120 Calculation part 200 Functional block 202 Image processing part 204 Speed sensor 206 Offset value calculation part 208 Distance calculation part 210 Interface 230 External apparatus 234 NVRAM
240 Statistical processing section

特開平10−341458号公報Japanese Patent Laid-Open No. 10-341458 特許第3436074号明細書Japanese Patent No. 3436074 特開2009−176090号公報JP 2009-176090 A 特願2009−288233号明細書Japanese Patent Application No. 2009-288233

Claims (13)

移動体に設置され、測距演算を行うステレオカメラ装置に適用される演算装置であって、
前記ステレオカメラ装置が備える2台のカメラにより取得された2つの画像間の対応点を探索し、前記対応点に関する視差を計算する画像処理手段と、
特定の対応点に関し第1の時刻において計算された第1の視差と、前記特定の対応点に関し前記第1の時刻と異なる第2の時刻において計算された第2の視差と、前記第1の時刻と前記第2の時刻の間の前記移動体の速度情報とから、前記画像処理手段で計算される視差を修正する視差オフセット値を計算するオフセット値計算手段と、
複数の対応点の各々に関し計算された複数の前記視差オフセット値を統計処理することにより前記測距演算に利用する校正パラメータを決定する統計処理手段と、
を備える、演算装置。
An arithmetic device that is installed in a moving body and applied to a stereo camera device that performs distance calculation,
Image processing means for searching for corresponding points between two images acquired by two cameras included in the stereo camera device and calculating parallax related to the corresponding points;
A first disparity calculated at a first time for a specific corresponding point, a second disparity calculated at a second time different from the first time for the specific corresponding point, and the first disparity Offset value calculating means for calculating a parallax offset value for correcting the parallax calculated by the image processing means, from time information and speed information of the moving object between the second time and the second time;
Statistical processing means for determining a calibration parameter to be used for the ranging calculation by statistically processing the plurality of parallax offset values calculated for each of a plurality of corresponding points;
An arithmetic device comprising:
前記移動体の速度情報は、速度センサによって取得される情報であることを特徴とする、請求項1に記載の演算装置。 The computing device according to claim 1, wherein the speed information of the moving body is information acquired by a speed sensor . 移動体に設置され、測距演算を行うステレオカメラ装置に適用される演算装置であって、
前記ステレオカメラ装置が備える2台のカメラにより取得された2つの画像間の対応点を探索し、前記対応点に関する視差を計算する画像処理手段と、
特定の対応点に関し第1の時刻において計算された第1の視差と、前記特定の対応点に関し前記第1の時刻と異なる第2の時刻において計算された第2の視差と、前記第1の時刻と前記第2の時刻の間の前記移動体の移動距離とから、前記画像処理手段で計算される視差を修正する視差オフセット値を計算するオフセット値計算手段と、
複数の対応点の各々に関し計算された複数の前記視差オフセット値を統計処理することにより前記測距演算に利用する校正パラメータを決定する統計処理手段と、
を備える、演算装置。
An arithmetic device that is installed in a moving body and applied to a stereo camera device that performs distance calculation,
Image processing means for searching for corresponding points between two images acquired by two cameras included in the stereo camera device and calculating parallax related to the corresponding points;
A first disparity calculated at a first time for a specific corresponding point, a second disparity calculated at a second time different from the first time for the specific corresponding point, and the first disparity An offset value calculating means for calculating a parallax offset value for correcting the parallax calculated by the image processing means from a time and a moving distance of the moving body between the second time and
Statistical processing means for determining a calibration parameter to be used for the ranging calculation by statistically processing the plurality of parallax offset values calculated for each of a plurality of corresponding points;
An arithmetic device comprising:
前記移動体の移動距離は、速度センサによって取得される情報から計算されることを特徴とする、請求項3に記載の演算装置。 The computing device according to claim 3, wherein the moving distance of the moving body is calculated from information acquired by a speed sensor . 前記移動体は、車両であり、
前記速度センサは、車速センサであることを特徴とする、請求項2または4に記載の演算装置。
The moving body is a vehicle,
The computing device according to claim 2, wherein the speed sensor is a vehicle speed sensor .
前記速度センサは、GPSを用いたものであることを特徴とする、請求項2または4に記載の演算装置。 5. The arithmetic device according to claim 2, wherein the speed sensor uses a GPS . 前記速度センサは、当該演算装置の組込み装置として実装されていることを特徴とする、請求項2または4に記載の演算装置。 The arithmetic device according to claim 2, wherein the speed sensor is mounted as an embedded device of the arithmetic device. 前記統計処理は、最頻値、中央値、平均値、重み付け平均値のいずれかを用いた処理であることを特徴とする請求項1から7のいずれか1項に記載の演算装置。 The arithmetic device according to claim 1, wherein the statistical processing is processing using any one of a mode value, a median value, an average value, and a weighted average value . 前記統計処理は、正規分布を仮定した回帰分析、多項式分布を使用した回帰分析、2項分布、χ2乗分布、ポアッソン分布、β分布など、分布関数を利用した回帰分析のいずれかによることを特徴とする請求項1から7のいずれか1項に記載の演算装置。 The statistical processing is based on any one of regression analysis using a distribution function such as regression analysis assuming a normal distribution, regression analysis using a polynomial distribution, binomial distribution, χ square distribution, Poisson distribution, β distribution, etc. The arithmetic unit according to any one of claims 1 to 7 . 請求項1から9のいずれか1項に記載の演算装置と、2台のカメラと、を備えることを特徴とする、ステレオカメラ装置。 A stereo camera device comprising: the arithmetic device according to claim 1; and two cameras. 請求項10に記載のステレオカメラ装置と、前記ステレオカメラ装置における測距演算により得られた距離情報を用いて前記移動体に搭載された機器を制御する制御装置と、を備えることを特徴とする機器制御システム。 The stereo camera device according to claim 10, and a control device that controls equipment mounted on the moving body using distance information obtained by distance measurement in the stereo camera device. Equipment control system. 情報処理装置を、移動体に設置され、測距演算を行うステレオカメラ装置に適用される演算装置として機能させるための装置実行可能なプログラムであって、前記プログラムは、前記情報処理装置を、An apparatus-executable program for causing an information processing apparatus to function as an arithmetic apparatus applied to a stereo camera apparatus that is installed in a moving body and performs a distance measurement calculation, the program comprising:
前記ステレオカメラ装置が備える2台のカメラにより取得された2つの画像間の対応点を探索し、前記対応点に関する視差を計算する画像処理手段、Image processing means for searching for corresponding points between two images acquired by two cameras included in the stereo camera device and calculating parallax related to the corresponding points;
特定の対応点に関し第1の時刻において計算された第1の視差と、前記特定の対応点に関し前記第1の時刻と異なる第2の時刻において計算された第2の視差と、前記第1の時刻と前記第2の時刻の間の前記移動体の速度情報とから、前記画像処理手段で計算される視差を修正する視差オフセット値を計算するオフセット値計算手段、A first disparity calculated at a first time for a specific corresponding point, a second disparity calculated at a second time different from the first time for the specific corresponding point, and the first disparity An offset value calculating means for calculating a parallax offset value for correcting the parallax calculated by the image processing means from the time information and the velocity information of the moving body between the second time and the second time;
複数の対応点の各々に関し計算された複数の前記視差オフセット値を統計処理することにより前記測距演算に利用する校正パラメータを決定する統計処理手段Statistical processing means for determining a calibration parameter to be used for the ranging calculation by statistically processing the plurality of parallax offset values calculated for each of a plurality of corresponding points
として機能させることを特徴とする、プログラム。A program characterized by functioning as
情報処理装置を、移動体に設置され、測距演算を行うステレオカメラ装置に適用される演算装置として機能させるための装置実行可能なプログラムであって、前記プログラムは、前記情報処理装置を、An apparatus-executable program for causing an information processing apparatus to function as an arithmetic apparatus applied to a stereo camera apparatus that is installed in a moving body and performs a distance measurement calculation, the program comprising:
前記ステレオカメラ装置が備える2台のカメラにより取得された2つの画像間の対応点を探索し、前記対応点に関する視差を計算する画像処理手段、Image processing means for searching for corresponding points between two images acquired by two cameras included in the stereo camera device and calculating parallax related to the corresponding points;
特定の対応点に関し第1の時刻において計算された第1の視差と、前記特定の対応点に関し前記第1の時刻と異なる第2の時刻において計算された第2の視差と、前記第1の時刻と前記第2の時刻の間の前記移動体の移動距離とから、前記画像処理手段で計算される視差を修正する視差オフセット値を計算するオフセット値計算手段、A first disparity calculated at a first time for a specific corresponding point, a second disparity calculated at a second time different from the first time for the specific corresponding point, and the first disparity An offset value calculating means for calculating a parallax offset value for correcting the parallax calculated by the image processing means from a time and a moving distance of the moving body between the second time and
複数の対応点の各々に関し計算された複数の前記視差オフセット値を統計処理することにより前記測距演算に利用する校正パラメータを決定する統計処理手段Statistical processing means for determining a calibration parameter to be used for the ranging calculation by statistically processing the plurality of parallax offset values calculated for each of a plurality of corresponding points
として機能させることを特徴とする、プログラム。A program characterized by functioning as
JP2016004969A 2010-09-14 2016-01-14 Arithmetic device, stereo camera device, device control system and program Active JP6187609B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010205015 2010-09-14
JP2010205015 2010-09-14

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2011121378A Division JP5870510B2 (en) 2010-09-14 2011-05-31 Stereo camera device, calibration method and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2017150422A Division JP2017201334A (en) 2010-09-14 2017-08-03 Image processing apparatus, imaging device, moving body, and program

Publications (2)

Publication Number Publication Date
JP2016105100A JP2016105100A (en) 2016-06-09
JP6187609B2 true JP6187609B2 (en) 2017-08-30

Family

ID=56102134

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2016004969A Active JP6187609B2 (en) 2010-09-14 2016-01-14 Arithmetic device, stereo camera device, device control system and program
JP2017150422A Pending JP2017201334A (en) 2010-09-14 2017-08-03 Image processing apparatus, imaging device, moving body, and program

Family Applications After (1)

Application Number Title Priority Date Filing Date
JP2017150422A Pending JP2017201334A (en) 2010-09-14 2017-08-03 Image processing apparatus, imaging device, moving body, and program

Country Status (1)

Country Link
JP (2) JP6187609B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019181890A1 (en) 2018-03-19 2019-09-26 Ricoh Company, Ltd. Information processing apparatus, image capture apparatus, image processing system, and method of processing information

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3436074B2 (en) * 1997-06-10 2003-08-11 トヨタ自動車株式会社 Car stereo camera
JP4102019B2 (en) * 2000-12-12 2008-06-18 新日本製鐵株式会社 Analysis apparatus, method, and computer-readable storage medium in manufacturing process
JP2003329439A (en) * 2002-05-15 2003-11-19 Honda Motor Co Ltd Distance detecting device
US7225548B2 (en) * 2004-05-17 2007-06-05 Sr2 Group, Llc System and method for aligning multiple sighting devices
WO2008155961A1 (en) * 2007-06-21 2008-12-24 Konica Minolta Holdings, Inc. Distance measuring device
JP5234894B2 (en) * 2007-06-28 2013-07-10 富士重工業株式会社 Stereo image processing device
JP5280768B2 (en) * 2008-08-18 2013-09-04 本田技研工業株式会社 Vehicle periphery monitoring device
JP2010199751A (en) * 2009-02-23 2010-09-09 Sony Corp Communication system, communication apparatus, and packet length control method

Also Published As

Publication number Publication date
JP2017201334A (en) 2017-11-09
JP2016105100A (en) 2016-06-09

Similar Documents

Publication Publication Date Title
JP5870510B2 (en) Stereo camera device, calibration method and program
EP2571257B1 (en) Projector device and operation detecting method
US8144974B2 (en) Image processing apparatus, method, and program
KR102166691B1 (en) Device for estimating three-dimensional shape of object and method thereof
JP5293131B2 (en) Compound eye distance measuring device for vehicle and compound eye distance measuring method
JP2012058188A (en) Calibration device, distance measurement system, calibration method, and calibration program
WO2012063376A1 (en) Device for processing stereo images, method for processing stereo images, and program
JP2011209269A (en) Image pickup apparatus and range obtaining system
JP5549283B2 (en) Distance acquisition device
KR20200118073A (en) System and method for dynamic three-dimensional calibration
JP6187609B2 (en) Arithmetic device, stereo camera device, device control system and program
CN112602117A (en) Image processing apparatus and three-dimensional measurement system
JP7180177B2 (en) STEREO CAMERA SYSTEM, MOVING OBJECT AND METHOD OF FORMING STEREO CAMERA DEVICE
JP5776212B2 (en) Image processing apparatus, method, program, and recording medium
US8179431B2 (en) Compound eye photographing apparatus, control method therefor, and program
JP2016066995A (en) Image deviation amount calculation device, imaging device and image deviation amount calculation method
JP6985872B2 (en) Vehicle peripheral monitoring device and peripheral monitoring method
JPH11223516A (en) Three dimensional image pickup device
JP2011227073A (en) Three-dimensional position measuring device
JP5854679B2 (en) Phase difference detector
JP2020190438A (en) Measuring device and measuring system
JP2009237652A (en) Image processing apparatus and method, and program
JP2023135500A (en) Image processing apparatus, imaging apparatus, control method, program, and storage medium
JP5932361B2 (en) Distance information detection apparatus, distance information detection method, and camera
JP2024047868A (en) Position and orientation estimation device and method for line sensor camera

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20161128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161206

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170130

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170717

R151 Written notification of patent or utility model registration

Ref document number: 6187609

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151