JP3384278B2 - Distance measuring device - Google Patents

Distance measuring device

Info

Publication number
JP3384278B2
JP3384278B2 JP08881197A JP8881197A JP3384278B2 JP 3384278 B2 JP3384278 B2 JP 3384278B2 JP 08881197 A JP08881197 A JP 08881197A JP 8881197 A JP8881197 A JP 8881197A JP 3384278 B2 JP3384278 B2 JP 3384278B2
Authority
JP
Japan
Prior art keywords
distance
size
image
preceding vehicle
block
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.)
Expired - Fee Related
Application number
JP08881197A
Other languages
Japanese (ja)
Other versions
JPH10267618A (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.)
Nissan Motor Co Ltd
Original Assignee
Nissan Motor 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 Nissan Motor Co Ltd filed Critical Nissan Motor Co Ltd
Priority to JP08881197A priority Critical patent/JP3384278B2/en
Publication of JPH10267618A publication Critical patent/JPH10267618A/en
Application granted granted Critical
Publication of JP3384278B2 publication Critical patent/JP3384278B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Measurement Of Optical Distance (AREA)
  • Image Processing (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】この発明は、ステレオカメラ
の軸ずれを判断しながらステレオ画像処理による対象物
までの距離(たとえば車間距離)計測を行うステレオカ
メラを用いた距離計測装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a distance measuring device using a stereo camera for measuring a distance to an object (for example, an inter-vehicle distance) by stereo image processing while determining an axis shift of the stereo camera.

【0002】[0002]

【従来の技術】従来、この種の距離計測装置としては、
たとえば特開平8−16999号公報に開示された車間
距離計測装置がある。 ステレオ画像処理による距離計
測においては、カメラの軸ずれ(2つのカメラの光軸の
ずれ)がその計測精度に大きな影響を与えるので、これ
を正しく把握する必要がある。そこで上記の従来技術で
は、カメラの取付け位置や姿勢が取付け時からずれたこ
とを判断するために、取付け位置認識マークをカメラの
撮像エリア内に入るように取付け、そのマークが撮像さ
れる位置の変化を判断することでカメラの軸ずれを判断
するようにしている。
2. Description of the Related Art Conventionally, as a distance measuring device of this type,
For example, there is an inter-vehicle distance measuring device disclosed in Japanese Patent Laid-Open No. 8-16999. In the distance measurement by the stereo image processing, the misalignment of the axes of the cameras (deviation of the optical axes of the two cameras) has a great influence on the measurement accuracy, so it is necessary to correctly grasp this. Therefore, in the above-mentioned conventional technique, in order to determine that the mounting position or posture of the camera has deviated from the mounting time, the mounting position recognition mark is mounted so as to be within the imaging area of the camera, and The axis shift of the camera is determined by determining the change.

【0003】[0003]

【発明が解決しようとする課題】しかし、上記の車間距
離計測装置では、まず、カメラと認識対象物の間に、軸
ずれを判断するためだけに用いるマークが撮像されるた
め、そのマークと対象物が重なる部分では対象物の検出
ができなくなるという欠点がある。また、毎回の認識処
理毎において、位置、姿勢がずれていないことを確認す
るために、マークの位置に撮像されている部分が確かに
マークであるか否かの判断が必要となり、その分処理時
間が長くかかるという欠点もある。また、このマーク
は、カメラとマークとの位置関係を固定にするためにカ
メラを搭載した車両の一部、たとえばフロントガラスな
どに付ける必要があるが、そのマークが運転手の視界を
遮るという不都合もある。
However, in the above-described inter-vehicle distance measuring device, first, a mark used only for determining the axis deviation is imaged between the camera and the recognition object, so that the mark and the object are recognized. There is a drawback that the object cannot be detected in the overlapping parts. In addition, in each recognition process, it is necessary to judge whether or not the part imaged at the position of the mark is a mark in order to confirm that the position and orientation are not displaced. Another drawback is that it takes a long time. Further, this mark needs to be attached to a part of the vehicle equipped with the camera, for example, the windshield in order to fix the positional relationship between the camera and the mark, but the mark obstructs the driver's view. There is also.

【0004】さらに、ステレオ画像処理による距離計測
におけるカメラの微妙な軸ずれは、大きな軸ずれやカメ
ラの故障とは異なり、画像処理があたかも正常であるか
のように動作するため、発見が非常に困難であるが、計
測において最も正確さが求められる“距離値”は微妙な
軸ずれにも影響されるため、軸ずれは精度よく判断され
る必要がある。しかし、従来装置では、マークまでの距
離がカメラから先行車などの認識対象までの距離に対し
て非常に短いことから、車両から外界を認識するための
カメラではマークに対してのピントが合わず、微妙な軸
ずれを発見することが非常に困難である。したがって、
この手法で精度よく微妙な軸ずれを発見するためには、
カメラのピントをマークの位置から障害物検出位置まで
幅広く調整できる特別な機構が必要となる。
Further, a subtle axis shift of a camera in distance measurement by stereo image processing is different from a large axis shift or a camera failure and operates as if the image processing is normal. Although difficult, the "distance value", which requires the most accuracy in measurement, is also affected by a slight axis deviation, so the axis deviation needs to be accurately determined. However, in the conventional device, the distance to the mark is very short with respect to the distance from the camera to the recognition target such as the preceding vehicle, so the camera for recognizing the outside world from the vehicle cannot focus on the mark. , It is very difficult to find a slight axis deviation. Therefore,
In order to detect subtle misalignment with high accuracy using this method,
A special mechanism that can adjust the focus of the camera widely from the mark position to the obstacle detection position is required.

【0005】この発明はこのような従来の問題点に鑑
み、視界を遮るようなマークを必要とせずに、微妙な軸
ずれも精度よく検出することができるステレオカメラを
用いた距離計測装置を提供することを目的とする。
In view of the above conventional problems, the present invention provides a distance measuring device using a stereo camera capable of accurately detecting a slight axis deviation without requiring a mark that obstructs the field of view. The purpose is to do.

【0006】[0006]

【課題を解決するための手段】このため、請求項1記載
の本発明は、それぞれの光軸を互いに平行とし所定の眼
間距離をもって配置された2台のカメラと、所定時間間
隔毎に2台のカメラが撮像した映像信号をディジタルの
第1および第2の画像として一時的に記憶する画像メモ
リと、第1の画像内で計測対象物を検出する対象物検出
手段と、第1の画像における計測対象物を含むウインド
ウと最も類似したウインドウの位置を第2の画像内に探
索するマッチング位置探索手段と、上記互いに最も類似
したウインドウの位置と2台のカメラの位置関係をもと
に、計測対象物までの距離を求める距離算出手段と、上
記所定時間間隔毎に連続して求めた複数回分の計測対象
物までの距離を記憶する距離記憶手段と、距離記憶手段
に記憶された計測対象物までの距離の時間的変化から計
測対象物との第1の相対速度を求める第1の相対速度算
出手段と、第1および第2の画像上のいずれかにおける
計測対象物の大きさを検出する画像上の大きさ検出手段
と、画像上の計測対象物の大きさと計測対象物までの距
離に基づいて当該計測対象物の実際の大きさを算出する
実際の大きさ算出手段と、上記所定時間間隔毎に連続し
て求めた複数回分の画像上の計測対象物の大きさを記憶
する大きさ記憶手段と、計測対象物の実際の大きさと大
きさ記憶手段に記憶された画像上の計測対象物の大きさ
の時間的変化とをもとに計測対象物との第2の相対速度
を求める第2の相対速度算出手段と、第1の相対速度と
第2の相対速度の比較に基づいて2台のカメラの光軸の
ずれを判断する軸ずれ判断手段とを有するものとした。
Therefore, according to the present invention as set forth in claim 1, two cameras arranged with their respective optical axes parallel to each other and having a predetermined eye-to-eye distance, and two cameras at predetermined time intervals are provided. An image memory that temporarily stores the video signals captured by the two cameras as digital first and second images, an object detection unit that detects a measurement object in the first image, and the first image In the second image, the matching position searching means for searching the position of the window most similar to the window containing the measurement object in the second image, and the position of the most similar window and the positional relationship between the two cameras, Distance calculation means for obtaining the distance to the measurement object, distance storage means for storing the distance to the measurement object for a plurality of times continuously obtained at the predetermined time intervals, and measurement stored in the distance storage means The first relative velocity calculating means for obtaining the first relative velocity with respect to the measurement target from the temporal change of the distance to the elephant, and the size of the measurement target on either of the first and second images are calculated. Size detecting means on the image to be detected, actual size calculating means for calculating the actual size of the measuring object based on the size of the measuring object on the image and the distance to the measuring object, Size storage means for storing the size of the measurement object on the images for a plurality of times obtained continuously at predetermined time intervals, and the actual size of the measurement object and on the images stored in the size storage means For comparing the first relative speed and the second relative speed with a second relative speed calculating means for obtaining a second relative speed with respect to the measurement object based on a temporal change in the size of the measurement object. Based on the axis deviation judging means for judging the deviation of the optical axes of the two cameras based on It was assumed to be.

【0007】請求項3記載の発明は、上記の対象物検出
手段、マッチング位置探索手段および距離算出手段のか
わりに、第1の画像を同一サイズの複数のブロックに区
切り、各ブロック内に撮像されている対象物までの距離
を求め、当該距離のうち最小値の対象物が撮像されてい
るブロックの固まりを計測対象物が撮像されている領域
として、上記最小値を計測対象物までの距離とするとと
もに、画像上の計測対象物の大きさをブロック単位で検
出する計測対象物の大きさ・距離判断手段を備えるもの
とした。
According to a third aspect of the invention, instead of the object detecting means, the matching position searching means and the distance calculating means, the first image is divided into a plurality of blocks of the same size, and each block is imaged. The distance to the target object is obtained, and the minimum value of the distance is the distance to the measurement target object as the area of the measurement target object that is the block of the block where the minimum value object is captured. In addition, the measurement object size / distance determining means for detecting the size of the measurement object on the image in block units is provided.

【0008】上記計測対象物の大きさ・距離判断手段
は、複数の各ブロック内でエッジを検出するブロック毎
エッジ検出部と、第1の画像における上記エッジを含む
ブロックと最も類似したブロックの位置を第2の画像内
に探索するブロック毎マッチング位置検出部と、互いに
最も類似したブロックの位置と2台のカメラの位置関係
をもとに、ブロック毎に検出されたエッジまでの距離を
求めるブロック毎距離算出部と、全てのブロックのうち
距離が最小値のエッジを含みかつ隣接するブロックの固
まりを計測対象物の領域として、最小値を計測対象物ま
での距離とするとともに、上記ブロックの固まりの大き
さを画像上の計測対象物の大きさとする位置・大きさ・
距離判断部とから構成することができる。
The measuring object size / distance determining means includes a block-by-block edge detecting section for detecting an edge in each of a plurality of blocks, and a position of a block most similar to the block including the edge in the first image. A block-by-block matching position detection unit that searches for in the second image, and a block that obtains the distance to the edge detected for each block based on the position of the most similar block and the positional relationship between the two cameras. For each distance calculation unit, the block of the adjacent blocks including the edge of the minimum distance among all the blocks is set as the area of the measurement target, and the minimum value is set as the distance to the measurement target, and the block of the block is set. Position and size of the size of
It can be configured with a distance determination unit.

【0009】また、請求項5記載の発明は、上記計測対
象物の大きさ・距離判断手段と大きさ記憶手段の間に、
さらにブロックの固まりの所定方向において互いに最離
間している2つの列内からそれぞれエッジを検出する両
端エッジ検出手段を設け、大きさ記憶手段には、両端エ
ッジ検出手段で検出されたエッジ間の距離を画像上の計
測対象物の大きさとして記憶するものとした。
According to the invention of claim 5, between the size / distance determining means and the size storing means of the measuring object,
Further, both-end edge detection means for detecting edges from the two columns that are most distant from each other in the predetermined direction of the block mass are provided, and the size storage means has a distance between the edges detected by the both-end edge detection means. Is stored as the size of the measurement target on the image.

【0010】[0010]

【作用】請求項1記載のものでは、2台のカメラがステ
レオカメラを形成して、視差をもった第1および第2の
画像が所定時間間隔毎に画像メモリに記憶される。対象
物検出手段により第1の画像内で計測対象物が検出され
ると、その計測対象物を含むウインドウをテンプレート
としてマッチング位置探索手段が第2の画像内でテンプ
レートと最も類似したウインドウの位置を探す。そし
て、距離算出手段が両ウインドウの位置と2台のカメラ
の位置関係をもとに、計測対象物までの距離を求め、こ
れを距離記憶手段に逐次記憶していく。第1の相対速度
算出手段では、距離記憶手段に記憶された複数回分の距
離の時間的変化から計測対象物との第1の相対速度を算
出する。
According to the first aspect of the present invention, the two cameras form a stereo camera, and the first and second images having parallax are stored in the image memory at predetermined time intervals. When the measuring object is detected by the object detecting means in the first image, the matching position searching means uses the window including the measuring object as a template to find the position of the window most similar to the template in the second image. look for. Then, the distance calculation means obtains the distance to the object to be measured based on the positional relationship between the positions of both windows and the two cameras, and sequentially stores this in the distance storage means. The first relative speed calculation means calculates the first relative speed with respect to the measurement object from the temporal changes in the distance for a plurality of times stored in the distance storage means.

【0011】一方、画像上の大きさ検出手段によりいず
れかの画像における計測対象物の大きさを検出し、この
画像上の計測対象物の大きさと計測対象物までの距離に
基づいて実際の大きさ算出手段が当該計測対象物の実際
の大きさを算出するとともに、画像上の計測対象物の大
きさを大きさ記憶手段に逐次記憶していく。第2の相対
速度算出手段では、計測対象物の実際の大きさと大きさ
記憶手段に記憶された画像上の計測対象物の大きさの時
間的変化から計測対象物との第2の相対速度を算出す
る。そして、軸ずれ判断手段が第1の相対速度と第2の
相対速度を比較して、2台のカメラの光軸のずれを判断
する。
On the other hand, the size detecting means on the image detects the size of the measuring object in any one of the images, and the actual size is detected based on the size of the measuring object on this image and the distance to the measuring object. The size calculation means calculates the actual size of the measurement object, and the size of the measurement object on the image is sequentially stored in the size storage means. The second relative speed calculation means calculates the second relative speed with respect to the measurement object from the actual size of the measurement object and the temporal change in the size of the measurement object on the image stored in the size storage means. calculate. Then, the axis deviation judging means compares the first relative speed and the second relative speed and judges the deviation of the optical axes of the two cameras.

【0012】請求項3記載のものでは、計測対象物の大
きさ・距離判断手段において、第1の画像の各ブロック
内に撮像されている対象物までの距離を求め、当該距離
のうち最小値の対象物を撮像しているブロックの固まり
を抽出して、当該最小値を計測対象物までの距離とす
る。この際併せて、ブロックの数により画像上の計測対
象物の大きさが求められる。
According to a third aspect of the present invention, the size / distance determining means of the object to be measured determines the distance to the object imaged in each block of the first image, and the minimum value of the distance is calculated. The block of blocks that is capturing the target object is extracted, and the minimum value is set as the distance to the measurement target. At the same time, the size of the measurement object on the image is obtained from the number of blocks.

【0013】また、請求項5記載のものでは、両端エッ
ジ検出手段において、計測対象物の大きさ・距離判断手
段で抽出されたブロックの固まりの所定方向において互
いに最離間している2つの列、例えば最上段と最下段の
列からそれぞれエッジを検出する。これにより計測対象
物の例えば上縁と下縁が検出される。このエッジ間の距
離が画像上の計測対象物の大きさとして大きさ記憶手段
に記憶され、第2の相対速度算出手段で計測対象物の実
際の大きさと大きさ記憶手段に記憶されたエッジ間の距
離の時間的変化から計測対象物との第2の相対速度が算
出される。
According to the fifth aspect of the present invention, in the both-end edge detecting means, the two columns which are the most distant from each other in the predetermined direction of the block mass extracted by the size / distance determining means of the object to be measured, For example, the edges are detected from the top row and the bottom row, respectively. Thereby, for example, the upper edge and the lower edge of the measurement object are detected. The distance between the edges is stored in the size storage means as the size of the measurement object on the image, and the actual size of the measurement object by the second relative speed calculation means and the edge distance stored in the size storage means. The second relative speed with respect to the measurement target is calculated from the change over time of the distance.

【0014】[0014]

【発明の実施の形態】以下、この発明の実施の形態を実
施例により説明する。ここでは、実施例に係るステレオ
カメラを用いた距離計測装置を具体的に説明する前に、
ステレオカメラにより得られるステレオ画像を処理して
求めた前方障害物である先行車までの距離をもとに相対
速度(第1の相対速度V1)を求める方法と、先行車の
画像上での大きさの変化から相対速度(第2の相対速度
V2)を求める方法とを説明し、次にこれら2つの異な
る手法で求めた相対速度V1、V2を比較することによ
りステレオカメラの軸ずれを判断する原理を説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to examples. Here, before specifically describing the distance measuring device using the stereo camera according to the embodiment,
A method of obtaining a relative speed (first relative speed V1) based on a distance to a preceding vehicle which is a front obstacle obtained by processing a stereo image obtained by a stereo camera, and a size on the image of the preceding vehicle. The method for obtaining the relative speed (second relative speed V2) from the change in the height will be described, and then the relative speeds V1 and V2 obtained by these two different methods are compared to determine the axis deviation of the stereo camera. The principle will be explained.

【0015】まず、ステレオ画像を処理して求めた先行
車までの車間距離(以下、単に距離という)をもとに第
1の相対速度V1を求める方法を説明する。図1は、ス
テレオ画像を用いて三角測量の原理でステレオカメラか
ら先行車Cまでの距離Zを求める原理を説明する図であ
る。ここでは、ステレオカメラを構成する2台のカメラ
1、2が車両に搭載されている。カメラ1、2は、同一
の焦点距離fを有するレンズL1、L2と、各レンズか
ら撮像面までの距離が焦点距離fとなるように配置され
たCCD1a、2aとをそれぞれ有するCCDカメラで
ある。カメラ1、2は、CCD1a、2aの各撮像面が
同一垂直面内に位置し、各撮像面の垂直基準軸であるY
軸、すなわCCD1aの撮像面のYA 軸とCCD2aの
撮像面のYB 軸が一致し、レンズL1、L2の光軸1
b、2bが互いに平行でかつ眼間距離(光軸1b、2b
間の距離)Dが所定の値となるように、上下に並べて配
置されている。
First, a method of obtaining the first relative speed V1 based on the inter-vehicle distance to the preceding vehicle (hereinafter simply referred to as distance) obtained by processing the stereo image will be described. FIG. 1 is a diagram illustrating a principle of obtaining a distance Z from a stereo camera to a preceding vehicle C by a principle of triangulation using a stereo image. Here, two cameras 1 and 2 forming a stereo camera are mounted on a vehicle. The cameras 1 and 2 are CCD cameras having lenses L1 and L2 having the same focal length f, and CCDs 1a and 2a arranged so that the distance from each lens to the imaging surface is the focal length f. In the cameras 1 and 2, the image pickup surfaces of the CCDs 1a and 2a are located in the same vertical plane, and Y is a vertical reference axis of each image pickup surface.
Axis, that is, the YA axis of the image pickup surface of the CCD 1a and the YB axis of the image pickup surface of the CCD 2a coincide, and the optical axis 1 of the lenses L1 and L2
b and 2b are parallel to each other and the distance between the eyes (optical axis 1b, 2b
They are arranged vertically so that the distance D) becomes a predetermined value.

【0016】焦点距離f及び眼間距離Dが既知であり、
光軸1b、2bが互いに平行な2台のカメラ1、2で車
両前方を撮像して得られる2つの画像からなるステレオ
画像において、2つの画像間のマッチング位置(最も類
似する位置で、図1では各画像内における先行車Cのリ
ヤ側上縁部の位置)のY座標ya、ybを求めることが
できれば、カメラ1、2から先行車Cまでの距離Zは下
記の式(1)より求めることができる。 Z=f×D/(yb−ya) (1) ここで、f,ya,ybの単位はCCD1a、2aの画
素であり、D,Zの単位はmmである。なお、一般に焦
点距離fは単位をmmで表す場合が多いが、式(1)の
焦点距離fは画素を単位として計算する。
The focal length f and the interocular distance D are known,
In a stereo image composed of two images obtained by imaging the front of the vehicle with two cameras 1 and 2 whose optical axes 1b and 2b are parallel to each other, a matching position between the two images (at the most similar position, as shown in FIG. Then, if the Y coordinates ya and yb of the rear side upper edge portion of the preceding vehicle C in each image can be obtained, the distance Z from the cameras 1 and 2 to the preceding vehicle C is obtained from the following equation (1). be able to. Z = f * D / (yb-ya) (1) Here, the unit of f, ya, yb is a pixel of CCD1a, 2a, and the unit of D, Z is mm. In general, the unit of the focal length f is often expressed in mm, but the focal length f of the formula (1) is calculated in units of pixels.

【0017】ここで、画素を単位とする焦点距離fの求
め方を図2に基づいて説明する。図2の(a)は大きさ
のわかっている幅W(m)の物体C´を距離Z(m)だ
け離れたところで2台のカメラ1、2の一方(ここでは
カメラ1)により撮像したときの様子を示し、同図の
(b)はそのとき得られる画像Aを示す。以下の説明で
は、カメラ1により撮像される画像をA、そしてカメラ
2により撮像される画像をBとする。
Here, how to obtain the focal length f in units of pixels will be described with reference to FIG. In FIG. 2A, an object C ′ having a width W (m) of known size is imaged by one of the two cameras 1 and 2 (here, the camera 1) at a distance Z (m). The state at this time is shown, and (b) of the same figure shows the image A obtained at that time. In the following description, the image captured by the camera 1 is A, and the image captured by the camera 2 is B.

【0018】画素を単位とする焦点距離fは、大きさの
わかっている幅W(m)の物体C´を距離Z(m)だけ
離れたところにおいて撮像し、このとき得られる画像A
(または画像B)上での物体C´の幅xw(画素)をエ
ッジ検出などの画像処理により検出することで、下記の
式(2)により求めることができる。 f=xw×Z/W (2) ここで、xwの単位は画素であり、Z,Wの単位はmで
ある。
The focal length f in pixel units is obtained by imaging an object C'having a width W (m) of known size at a distance Z (m), and obtaining an image A at this time.
By detecting the width xw (pixels) of the object C ′ on (or the image B) by image processing such as edge detection, it can be obtained by the following equation (2). f = xw × Z / W (2) Here, the unit of xw is a pixel, and the unit of Z and W is m.

【0019】第1の相対速度V1は、式(1)をもとに
一定時間Δt毎に求めた数回分の距離値(車間距離Zの
値)をもとに求める。図3は第1の相対速度V1の求め
方を説明するグラフで、横軸は時間t(ms)を、縦軸
は車間距離Z(m)をそれぞれ表している。このグラフ
は過去数回(n回)で求めたn点の距離値をΔt毎にプ
ロットしたものである。第1の相対速度V1は、ある時
間n×Δt内で変化した相対距離をRとして、V1=R
/(n×Δt)であるので、このグラフの点列の最小二
乗誤差をとる直線(Z=a×t+bで表す直線)の傾き
aを求めれば、それが第1の相対速度V1となる。この
ように、ステレオ画像を処理して求めた距離の変化(数
回分の距離値)をもとに第1の相対速度V1を求めるこ
とができる。
The first relative speed V1 is obtained based on the distance value (the value of the inter-vehicle distance Z) obtained several times for each constant time Δt based on the equation (1). FIG. 3 is a graph for explaining how to obtain the first relative speed V1, in which the horizontal axis represents time t (ms) and the vertical axis represents the inter-vehicle distance Z (m). This graph plots the distance values of n points obtained in the past several times (n times) for each Δt. The first relative speed V1 is V1 = R, where R is the relative distance changed within a certain time n × Δt.
Since it is / (n × Δt), if the slope a of the straight line (the straight line represented by Z = a × t + b) that takes the least squares error of the point sequence of this graph is obtained, it becomes the first relative speed V1. In this way, the first relative velocity V1 can be obtained based on the change in the distance (several distance values) obtained by processing the stereo image.

【0020】次に、先行車Cの大きさの時間的変化をも
とに第2の相対速度V2を求める方法を説明する。図4
の(a)は、先行車Cを距離Z1(m)だけ離れたとこ
ろで撮像(ここではカメラ1により撮像)したときの様
子を示し、同図の(b)はその得られる画像Aを示す。
同様に、図5の(a〓)は、先行車Cを距離Z1より遠
い距離Z2(m)だけ離れたところで撮像したときの様
子を示し、同図の(B)はそのとき得られる画像Aを示
す。
Next, a method for obtaining the second relative speed V2 based on the temporal change in the size of the preceding vehicle C will be described. Figure 4
(A) shows the state when the preceding vehicle C is imaged at a distance Z1 (m) (here, the image is taken by the camera 1), and (b) in the same figure shows the obtained image A.
Similarly, (a〓) of FIG. 5 shows a state when the preceding vehicle C is imaged at a distance Z2 (m) farther than the distance Z1, and (B) of the same figure shows an image A obtained at that time. Indicates.

【0021】図4及び図5から明らかなように、先行車
Cの画像(2つの画像A、Bの一方)上での大きさは先
行車Cまでの距離Zに応じて変化するので、先行車Cの
屋根(上端)から底(下端)までの高さh(m)、焦点
距離f(画素)、画像A上での先行車Cの屋根のエッジ
から底のエッジまでの長さ(画像A上での先行車Cの高
さ)をyw、距離をZ(m)とすると、下記の式(3)
の関係が成り立つ。 Z=h×f/yw (3)
As is clear from FIGS. 4 and 5, the size of the image of the preceding vehicle C (one of the two images A and B) on the image changes according to the distance Z to the preceding vehicle C. Height h (m) from roof (upper end) to bottom (lower end) of car C, focal length f (pixels), length from edge of roof of car C on image A to edge of bottom (image When the height of the preceding vehicle C on A is yw and the distance is Z (m), the following equation (3) is obtained.
The relationship is established. Z = h × f / yw (3)

【0022】この式からわかるように、仮に先行車Cの
高さhがわかっていれば、1つの画像(2つの画像A、
Bの一方)を利用した画像処理により、先行車Cの上下
のエッジ間の距離(画像上での大きさ)ywを求めるこ
とができる。通常、先行車Cの高さhは未知の値である
が、ここでは、ステレオ画像処理によって距離Zが上記
の式(1)により求められているため、ywを求めるこ
とができれば、式(3)の変形式h=Z×yw/fの計
算により、先行車の高さhを求めることができる。
As can be seen from this equation, if the height h of the preceding vehicle C is known, one image (two images A,
By performing image processing using one of B), the distance (size on the image) yw between the upper and lower edges of the preceding vehicle C can be obtained. Normally, the height h of the preceding vehicle C is an unknown value, but here, since the distance Z is obtained by the above equation (1) by stereo image processing, if yw can be obtained, the equation (3 The height h of the preceding vehicle can be obtained by calculating the modified equation h) = Z × yw / f.

【0023】その高さhを求めることができれば、式
(3)により逐次の距離Zを求めることができる。その
ため、一定時間Δt毎に計測した距離値を図3のグラフ
で示すようにプロットすることで、ステレオ画像処理の
結果をもとに第1の相対速度V1を求めたときと同様
に、先行車Cとの相対速度(第2の相対速度V2)を求
めることが可能となる。ここで、第2の相対速度V2は
同じ先行車Cを追従しているときに計測するものである
ので、高さhは固定である。つまり、画像上で先行車C
を発見した時点で、一度高さhを求めてしまえば、先行
車Cの画像上での大きさ(ここでは高さyw)の時間的
変化だけをもとにその先行車との相対速度V2を求める
ことが可能となる。
If the height h can be obtained, the successive distance Z can be obtained by the equation (3). Therefore, by plotting the distance value measured at each constant time Δt as shown in the graph of FIG. 3, the preceding vehicle is obtained in the same manner as when the first relative speed V1 is obtained based on the result of the stereo image processing. It is possible to obtain the relative speed with respect to C (second relative speed V2). Here, since the second relative speed V2 is measured while following the same preceding vehicle C, the height h is fixed. That is, the preceding vehicle C on the image
Once the height h is found once, the relative speed V2 to the preceding vehicle is calculated based on only the temporal change of the size (here, height yw) of the preceding vehicle C on the image. It becomes possible to ask.

【0024】すなわち、第1の相対速度V1を求めるた
めに用いた図3のグラフの縦軸にあたる距離Zを、画像
上で先行車Cを発見したときに求めた先行車Cの高さh
と一定時間Δt毎に求めた先行車Cの画像上での高さy
wとを式(3)に代入して求めてプロットし、これらの
プロットした点列の最小二乗誤差をとる直線の傾きaを
算出することで第2の相対速度V2を求めることができ
る。このようにして、先行車Cの画面上での大きさの時
間的変化をもとに第2の相対速度V2を求めることがで
きる。
That is, the height h of the preceding vehicle C obtained when the preceding vehicle C is found on the image is the distance Z corresponding to the vertical axis of the graph of FIG. 3 used for obtaining the first relative speed V1.
And the height y on the image of the preceding vehicle C obtained at each constant time Δt
The second relative velocity V2 can be obtained by substituting w and w into the equation (3), plotting them, and calculating the slope a of the straight line taking the least square error of these plotted point sequences. In this way, the second relative speed V2 can be obtained based on the temporal change in the size of the preceding vehicle C on the screen.

【0025】次に、ステレオカメラの軸ずれは、上記異
なる手法で求めた2つの相対速度V1、V2を用いて次
の原理により判断する。軸ずれの確認は、ある一定時間
だけ同じ先行車Cを追従しているときに行う。同じ先行
車Cを追従している場合、相対速度を正しく求めること
ができていれば、上記2つの方法で求めた相対速度V
1,V2は同じはずである。ここで、ステレオカメラを
構成する2台のカメラ1、2の光軸1b、2bが平行で
軸ずれのない状態から、カメラ2の光軸2bが傾いた軸
ずれのある状態に変わったものとする。
Next, the axis shift of the stereo camera is judged by the following principle using the two relative velocities V1 and V2 obtained by the different methods. The axis deviation is confirmed when the same preceding vehicle C is being followed for a certain fixed time. When following the same preceding vehicle C, if the relative speed can be correctly obtained, the relative speed V obtained by the above two methods
1 and V2 should be the same. Here, it is assumed that the state where the optical axes 1b and 2b of the two cameras 1 and 2 forming the stereo camera are parallel and there is no axis deviation is changed from the state where the optical axis 2b of the camera 2 is tilted and there is axis deviation. To do.

【0026】図6の(a)は、軸ずれがない状態で先行
車Cを撮像している状態を示し、図7の(a)はそのと
き得られるステレオ画像(下側にある画像Aと上側にあ
る画像B)を示す。また、図6の(b)は、カメラ2の
光軸2bが傾いた状態で先行車Cを撮像している状態を
示し、図7の(b)はそのとき得られるステレオ画像を
示す説明図である。図6及び図7からわかるように、カ
メラ1、2の一方の軸がずれると先行車Cが撮像される
位置がずれるため、ここでは図7の(b)に示す画像B
上でのマッチング位置の座標yb´が、両光軸1b、2
bが平行なときのマッチング位置の座標yb(図7の
(a)参照)とは異なる位置になる。このため、式
(1)より、(ya−yb)の値をもとに求める距離Z
は誤った値となる。つまり、ステレオカメラの軸がずれ
ると、距離Zが正確でなくなるため、この距離をもとに
求めた第1の相対速度V1も正確な値ではなくなる。
FIG. 6A shows a state in which the preceding vehicle C is being imaged without any axis deviation, and FIG. 7A is a stereo image obtained at that time (a lower image A and a stereo image). The upper image B) is shown. Further, (b) of FIG. 6 shows a state in which the preceding vehicle C is imaged with the optical axis 2b of the camera 2 tilted, and (b) of FIG. 7 is an explanatory diagram showing a stereo image obtained at that time. Is. As can be seen from FIGS. 6 and 7, when one of the axes of the cameras 1 and 2 deviates, the position where the preceding vehicle C is imaged deviates, and therefore the image B shown in FIG.
The coordinate yb 'of the matching position on the upper side is determined by the two optical axes 1b, 2
The position is different from the coordinate yb (see FIG. 7A) of the matching position when b is parallel. Therefore, from the formula (1), the distance Z calculated based on the value of (ya-yb)
Is an incorrect value. In other words, if the axis of the stereo camera deviates, the distance Z becomes inaccurate, and the first relative speed V1 obtained based on this distance also becomes inaccurate.

【0027】次に、距離値がどのように誤算出されるか
を具体的に求めてみる。図8は、カメラ2の光軸2bが
角度θだけ傾いた状態を示す。 光軸2bが角度θだけ
傾くと、その傾きがないときには座標ybのマッチング
位置に撮像されるべきエッジ(先行車Cのリヤ側上縁
部)が、yb´=(yb/cosθ)+f×tanθで
表される座標yb´付近の位置に撮像される。つまり、
その座標yb´のエッジを用いて求めた距離Z´は、上
記式(1)のybにyb´を代入して、下記の式(4)
で表わされる。 Z´=f×D/{((yb/cosθ)+f×tanθ)−ya} (4) このため、ステレオカメラの軸がずれた状態で計測した
第1の相対速度V1は、常に、ybが((yb/cos
θ)+f×tanθ)に近い値に誤認識されて求められ
た誤った距離Z´をもとに算出されることになる。
Next, how the distance value is erroneously calculated will be concretely obtained. FIG. 8 shows a state in which the optical axis 2b of the camera 2 is tilted by an angle θ. When the optical axis 2b is tilted by an angle θ, the edge (the rear side upper edge of the preceding vehicle C) to be imaged at the matching position of the coordinate yb when there is no tilt is yb ′ = (yb / cos θ) + f × tan θ. The image is captured at a position near the coordinate yb ′ represented by. That is,
The distance Z ′ obtained by using the edge of the coordinate yb ′ is obtained by substituting yb ′ into yb in the above equation (1) to obtain the following equation (4).
It is represented by. Z ′ = f × D / {((yb / cos θ) + f × tan θ) −ya} (4) Therefore, the first relative velocity V1 measured with the axis of the stereo camera deviated is always yb ((Yb / cos
It will be calculated based on an erroneous distance Z ′ obtained by erroneously recognizing a value close to θ) + f × tan θ).

【0028】一方、先行車Cの画像上での大きさの時間
的変化をもとに第2の相対速度V2を求める場合を、図
9に基づいて考えてみる。同図の(a)は、光軸1bが
傾いていないカメラ1で先行車Cを撮像している状態、
(b)は光軸が傾いたカメラで先行車Cを撮像している
状態を示す。前述のように、先行車Cの画像上での大き
さの時間的変化を求める場合は、2台のカメラ1、2の
うち、どちらか一方を用いればよい。仮に、図9の
(a)で示すように光軸の傾いていない方のカメラ1を
用いて第2の相対速度V2を求める場合、先行車Cの画
像上での大きさ(ここでは高さ)ywは正しく求められ
る。
On the other hand, the case where the second relative speed V2 is obtained based on the temporal change of the size of the preceding vehicle C on the image will be considered with reference to FIG. (A) of the figure shows a state where the preceding vehicle C is imaged by the camera 1 in which the optical axis 1b is not tilted,
(B) shows a state in which the preceding vehicle C is imaged by a camera whose optical axis is inclined. As described above, when obtaining the temporal change in the size of the preceding vehicle C on the image, either one of the two cameras 1 and 2 may be used. If, as shown in FIG. 9A, the second relative speed V2 is obtained using the camera 1 whose optical axis is not tilted, the size of the preceding vehicle C on the image (height in this case) is obtained. ) Yw is calculated correctly.

【0029】ところが、ステレオカメラの軸ずれによ
り、式(4)で表わされるような誤った距離Z´をもと
に求めた先行車の高さh´を用いて距離Zを式(3)に
より算出することになる。そのため、正確な先行車の高
さをhとすると、距離Zが必ずh´/h倍される。した
がって、図3のグラフと同様にプロットした点列の最小
二乗誤差をとる直線の傾きである第2の相対速度V2
も、正確な相対速度のh´/h倍された値となる。
However, due to the misalignment of the stereo camera, the distance Z is calculated by the formula (3) using the height h'of the preceding vehicle obtained based on the incorrect distance Z'as expressed by the formula (4). It will be calculated. Therefore, if the correct height of the preceding vehicle is h, the distance Z is always multiplied by h '/ h. Therefore, the second relative velocity V2, which is the slope of the straight line that takes the least squares error of the plotted point sequence as in the graph of FIG.
Also becomes a value obtained by multiplying the accurate relative speed by h ′ / h.

【0030】また、図9の(b)で示すように光軸が傾
いた方のカメラを用いて第2の相対速度V2を求める場
合は、先行車Cの画像上での大きさは、本来ywである
ところが、常に1/cosθ倍されてyw/cosθに
なる。そのため、その値yw/cosθと、誤った距離
Z´をもとに求められた先行車Cの大きさh´とをもと
に距離Zが式(3)により算出される。すなわち、距離
Zは、常に正確な値の(h´×cosθ)/h倍された
値として求められる。そのため、第2の相対速度V2も
正確な相対速度の(h´×cosθ)/h倍された値と
して算出される。このように、光軸の傾いていない方の
カメラを用いて相対速度V2を求める場合と光軸が傾い
たカメラを用いて相対速度V2を求める場合のいずれに
よっても相対速度V2を正しく求めることはできなくな
る。
Further, when the second relative speed V2 is obtained by using the camera whose optical axis is inclined as shown in FIG. 9B, the size of the preceding vehicle C on the image is originally Where yw is, it is always multiplied by 1 / cos θ and becomes yw / cos θ. Therefore, the distance Z is calculated by the equation (3) based on the value yw / cos θ and the size h ′ of the preceding vehicle C obtained based on the incorrect distance Z ′. That is, the distance Z is always obtained as a value obtained by multiplying the correct value by (h '× cos θ) / h. Therefore, the second relative speed V2 is also calculated as a value obtained by multiplying the accurate relative speed by (h '× cos θ) / h. As described above, the relative velocity V2 cannot be correctly calculated by both the case where the relative velocity V2 is obtained by using the camera whose optical axis is not inclined and the case where the relative velocity V2 is obtained by using the camera whose optical axis is inclined. become unable.

【0031】ところで、先行車Cの画像上での大きさの
時間的変化をもとに求める第2の相対速度V2は、距離
Zが必ずある一定倍された値をもとに求められる。これ
に対し、ステレオ画像処理で求められる距離Zは、前記
一定倍とは異なる割合で求められる。すなわち、一方の
カメラの軸が角度θ傾いた場合であれば、式(1)の分
母のya、ybのうちのどちらか一方が1/cosθ倍
され、かつその分母にf×tanθが加算されている。
By the way, the second relative speed V2, which is obtained on the basis of the temporal change in the size of the preceding vehicle C on the image, is obtained on the basis of the value obtained by multiplying the distance Z by a certain constant value. On the other hand, the distance Z obtained by the stereo image processing is obtained at a ratio different from the fixed multiple. That is, when the axis of one of the cameras is inclined by the angle θ, either one of ya and yb of the denominator of the equation (1) is multiplied by 1 / cos θ, and f × tan θ is added to the denominator. ing.

【0032】このため、距離Zの時間的変化をもとに求
める第1の相対速度V1は、先行車Cの画像上での大き
さの時間的変化をもとに求める第2の相対速度V2とは
異なる値となる。つまり、ステレオカメラの軸ずれがお
きると、相対速度V1、V2に差異が生じる。本発明
は、この原理を用いることにより、2つの異なる手法で
求めた相対速度V1、V2を比較して、軸ずれの判断を
行う。
Therefore, the first relative speed V1 obtained based on the time change of the distance Z is the second relative speed V2 obtained based on the time change of the size of the preceding vehicle C on the image. Will be a different value from. That is, if the stereo camera is misaligned, the relative velocities V1 and V2 are different. By using this principle, the present invention compares the relative velocities V1 and V2 obtained by two different methods to judge the axis deviation.

【0033】次に、本発明の具体的実施例について説明
する。図10は、車両に搭載され先行車との車間距離を
計測する距離計測装置に適用した第1の実施例の構成を
示すブロック図である。2台のカメラ1、2がステレオ
カメラを構成し、それぞれ、同一の焦点距離fを有する
レンズL1、L2と、各レンズから撮像面までの距離が
焦点距離fとなるように配置されたCCD1a、2aと
を有するCCDカメラからなる。カメラ1、2は、前方
を撮影するのに適した車両上の所定の部位に取り付けら
れている。カメラ1、2は、先の図1に示すように、C
CD1a、2aの各撮像面が同一垂直面内に位置し、各
撮像面の垂直基準軸(YA 軸、YB 軸)が一致し、レン
ズL1、L2の光軸1b、2bが水平かつ互いに平行と
なり、かつ所定の眼間距離Dをもって上下に並べて配置
されている。
Next, specific examples of the present invention will be described. FIG. 10 is a block diagram showing a configuration of a first embodiment applied to a distance measuring device mounted on a vehicle and measuring a distance between the preceding vehicle and the preceding vehicle. The two cameras 1 and 2 form a stereo camera, each of which has a lens L1 and L2 having the same focal length f, and a CCD 1a arranged so that the distance from each lens to the image pickup surface is the focal length f, 2a and CCD camera. The cameras 1 and 2 are attached to predetermined parts on the vehicle that are suitable for photographing the front. As shown in FIG. 1, the cameras 1 and 2 have C
The image pickup surfaces of the CDs 1a and 2a are located in the same vertical plane, the vertical reference axes (YA axis and YB axis) of the image pickup surfaces are aligned, and the optical axes 1b and 2b of the lenses L1 and L2 are horizontal and parallel to each other. , And are arranged vertically with a predetermined inter-eye distance D.

【0034】カメラ1、2は、それぞれが撮像して出力
する映像信号をデジタル画像(図7に示す画像A、B)
として一時的に記憶する画像メモリ3、4に接続されて
いる。そして、画像メモリ3にはその記憶されたデジタ
ル画像(以下、単に画像という)Aから先行車Cを検出
する先行車検出部5が接続されるとともに、さらに画像
メモリ3と4には記憶された画像A、Bに基づき、両画
像A、Bの一方内において先行車Cが検出された画像領
域と最も類似した画像領域が存在する位置(マッチング
位置)をその他方の画像内から探すマッチング位置検出
部6が接続されている。
The cameras 1 and 2 digitally image the video signals output by the cameras 1 and 2 (images A and B shown in FIG. 7).
Is connected to the image memories 3 and 4 for temporarily storing as. Then, the image memory 3 is connected to a preceding vehicle detection unit 5 that detects a preceding vehicle C from the stored digital image (hereinafter, simply referred to as image) A, and is further stored in the image memories 3 and 4. Matching position detection based on the images A and B, searching for the position (matching position) where the image region most similar to the image region in which the preceding vehicle C is detected in one of the images A and B exists from the other image The part 6 is connected.

【0035】マッチング位置検出部6には車間距離算出
部7が接続され、両画像A、B内のマッチング位置と2
台のカメラ1、2の焦点距離f、眼間距離Dなどの位置
関係データをもとに、先行車Cまでの距離を求める。こ
の車間距離算出部7で連続して一定時間Δt毎に求めら
れた過去数回分の距離データは車間距離保管部8に保管
される。そして、車間距離保管部8に接続された第1の
相対速度算出部9において、過去数回分の距離データを
もとに先行車Cと自車との相対速度(第1の相対速度)
V1を求めるようになっている。
An inter-vehicle distance calculating unit 7 is connected to the matching position detecting unit 6 and the matching position in both images A and B is 2
The distance to the preceding vehicle C is obtained based on the positional relationship data such as the focal length f of the cameras 1 and 2 and the inter-eye distance D. The inter-vehicle distance storage unit 8 stores the distance data for the past several times continuously obtained by the inter-vehicle distance calculation unit 7 for each constant time Δt. Then, in the first relative speed calculation unit 9 connected to the inter-vehicle distance storage unit 8, the relative speed between the preceding vehicle C and the host vehicle (first relative speed) based on the distance data for the past several times.
It is designed to calculate V1.

【0036】さらに、画像メモリ3と先行車検出部5に
は画像上の大きさ検出部10が接続され、画像Aと先行
車Cの検出結果とに基づいて、先行車Cの画像上での大
きさを算出する。この画像上の大きさ検出部10で連続
してたとえば一定時間Δt毎に求めた先行車Cの画像上
での大きさは、大きさ保管部12に保管される。また、
車間距離算出部7と画像上の大きさ検出部10とに接続
されて、先行車の実際の大きさ算出部11が設けられ、
車間距離算出部7で求めた距離データと画像上の大きさ
検出部10で検出した先行車Cの画像上での大きさとに
基づいて、先行車Cの実際の大きさを算出する。
Further, an image size detecting section 10 is connected to the image memory 3 and the preceding vehicle detecting section 5, and based on the detection results of the image A and the preceding vehicle C, the image of the preceding vehicle C is detected. Calculate the size. The size on the image of the preceding vehicle C continuously obtained by the size detection unit 10 on the image, for example, every predetermined time Δt is stored in the size storage unit 12. Also,
An actual size calculation unit 11 of the preceding vehicle is provided, which is connected to the inter-vehicle distance calculation unit 7 and the size detection unit 10 on the image.
The actual size of the preceding vehicle C is calculated based on the distance data obtained by the inter-vehicle distance calculating unit 7 and the size of the preceding vehicle C on the image detected by the size detecting unit 10 on the image.

【0037】先行車の実際の大きさ算出部11と大きさ
保管部12とは第2の相対速度算出部13に接続され、
ここで先行車Cの実際の大きさと連続して求めた先行車
Cの画像上での大きさ(の時間的変化)をもとに第2の
相対速度V2が求められる。そして、ステレオカメラを
構成するカメラ1、2の軸ずれを判断する軸ずれ判断部
14が、第1の相対速度算出部9と第2の相対速度算出
部13とに接続されている。
The actual size calculating section 11 and the size storing section 12 of the preceding vehicle are connected to the second relative speed calculating section 13,
Here, the second relative speed V2 is obtained based on the size of the preceding vehicle C on the image which is continuously obtained from the actual size of the preceding vehicle C. An axis deviation determining unit 14 that determines an axis deviation between the cameras 1 and 2 that form the stereo camera is connected to the first relative speed calculating unit 9 and the second relative speed calculating unit 13.

【0038】このような構成を有する距離計測装置は、
2台のカメラ1、2を用いて先行車Cを追従し、カメラ
1、2から出力される画像A、Bからなるステレオ画像
を処理して求めた距離の時間的変化をもとに求めた第1
の相対速度V1と、先行車Cの画像上での大きさの時間
的変化をもとに求めた第2の相対速度V2とを比較する
ことで、ステレオカメラの軸ずれを判断し、軸ずれ分の
補正を行いながら、車間距離計測処理を行う。
The distance measuring device having such a configuration is
The preceding vehicle C is followed by using the two cameras 1 and 2, and the stereo image composed of the images A and B output from the cameras 1 and 2 is processed to obtain the time change of the distance. First
Relative velocity V1 of the preceding vehicle C and the second relative velocity V2 obtained based on the temporal change in the size of the image of the preceding vehicle C are compared to determine the axis deviation of the stereo camera, and the axis deviation of the stereo camera is determined. The vehicle-to-vehicle distance measurement process is performed while correcting the minutes.

【0039】次に、本実施例に係る距離計測装置の処理
動作を、図11、図12のフローチャートにより説明す
る。まず、ステップ100で、初期設定を行って先行車
Cの追従回数NUMを0にする。次のステップ101
で、ステレオ画像、すなわちカメラ1、2からそれぞれ
出力される画像A、Bを画像メモリ3、4にそれぞれ入
力して記憶する。ステップ102では、先行車検出部5
がこの記憶したステレオ画像が1回目のもの、すなわち
追従回数NUMが0であるかどうかをチェックして、N
UM=0のときは、ステップ103において、両画像
A、Bのどちらか一方(本実施例では画像メモリ3に記
憶された画像A)を用いて先行車Cの位置検出処理を行
う。ここでは、画像内において図13に示すように走行
路の2本の白線30、31を検出し、あるしきい値以上
の強度と長さを有して両白線の間に挟まれる横エッジを
画像の下から上へ向けて探索し、この条件を満たす横エ
ッジを先行車の一部であるとみなす。
Next, the processing operation of the distance measuring apparatus according to this embodiment will be described with reference to the flowcharts of FIGS. First, in step 100, initial setting is performed to set the follow-up number NUM of the preceding vehicle C to 0. Next Step 101
Then, the stereo images, that is, the images A and B output from the cameras 1 and 2 are input and stored in the image memories 3 and 4, respectively. In step 102, the preceding vehicle detection unit 5
Checks whether the stored stereo image is the first one, that is, the number of follow-up times NUM is 0,
When UM = 0, in step 103, the position detection process of the preceding vehicle C is performed using either one of the images A and B (the image A stored in the image memory 3 in this embodiment). Here, two white lines 30 and 31 on the road are detected in the image as shown in FIG. 13, and a horizontal edge having a strength and a length equal to or more than a certain threshold value and sandwiched between the white lines is detected. The search is performed from the bottom of the image upwards, and the lateral edge satisfying this condition is regarded as a part of the preceding vehicle.

【0040】先行車検出部5では、こうして先行車を発
見した場合、画像A内におけるその発見位置に所定の大
きさのウインドウ40を設定し、これをテンプレートと
して保存する。ウインドウ40は、図14の(a)に示
すように、始点を(Xa,Ya)として、X軸方向の幅
をxw、Y軸方向の幅をywとする。
When the preceding vehicle is found in this way, the preceding vehicle detection unit 5 sets a window 40 of a predetermined size at the found position in the image A and saves it as a template. As shown in FIG. 14A, the window 40 has the starting point as (Xa, Ya), the width in the X-axis direction as xw, and the width in the Y-axis direction as yw.

【0041】ステップ104で、上記処理の結果先行車
を発見したかどうかをチェックする。先行車を発見した
場合はステップ105に進む。また、上記の条件を満た
す横エッジを見つけることができなかったときは、自車
の走行レーン上には先行車がないものとみなし、ステッ
プ101に戻って同じ処理を繰り返す。
In step 104, it is checked whether a preceding vehicle has been found as a result of the above processing. When the preceding vehicle is found, the process proceeds to step 105. Further, when the lateral edge satisfying the above conditions cannot be found, it is considered that there is no preceding vehicle on the traveling lane of the own vehicle, the process returns to step 101 and the same processing is repeated.

【0042】次にステップ105では、マッチング位置
検出部6において、ウインドウ40のテンプレートを用
いて画像A、B間の互いに対応するマッチング位置y
a,ybを求める。マッチング位置ya,ybは、ウイ
ンドウ40をテンプレートとして、画像Bからテンプレ
ートの画像と最も類似度の高い位置を式(5)を用いた
正規化相関法により求め、始点yaに対応する画像Bに
おけるマッチング位置ybとする。なお、式(5)にお
いて、テンプレートの画像の各画素の輝度値をAij、
画像Bの各画素の輝度値をBijとする。
Next, at step 105, the matching position detector 6 uses the template of the window 40 to match the matching positions y between the images A and B.
Find a, yb. For the matching positions ya and yb, using the window 40 as a template, the position having the highest similarity with the image of the template is obtained from the image B by the normalized correlation method using the equation (5), and the matching in the image B corresponding to the starting point ya is performed. The position is yb. In equation (5), the brightness value of each pixel of the template image is Aij,
The brightness value of each pixel of the image B is Bij.

【数1】 [Equation 1]

【0043】図14は、上記正規化相関法による画像
A、B間のマッチングの考え方を簡単に示す説明図であ
る。ここでは2台のカメラ1、2をそれぞれのY軸が同
一線上にのるように配置してあるので、画像B内におい
て、画像Aのテンプレート(ウインドウ40)と同じX
座標の位置で、探索位置をY軸方向に順次ずらした複数
の位置検出対象画像を求める。そして、図14の(b)
に取り出して示すテンプレートと(c)に示す画像Bか
ら取り出した(d1)から(d3)に示す各位置検出対
象画像との比較から、類似度の最も高い位置検出対象画
像を求めることとなる。図中、(d1)はテンプレート
のY軸位置より上方の位置検出対象画像、(d3)はテ
ンプレートより下方の位置検出対象画像、そして(d
2)はテンプレートと同位置で類似度最大の位置検出対
象画像を示している。
FIG. 14 is an explanatory view briefly showing the concept of matching between the images A and B by the normalized correlation method. Here, since the two cameras 1 and 2 are arranged so that their Y axes are on the same line, in the image B, the same X as the template (window 40) of the image A is displayed.
A plurality of position detection target images are obtained by sequentially shifting the search position in the Y-axis direction at the coordinate position. Then, FIG. 14B
The position detection target image having the highest degree of similarity is obtained by comparing the template shown in (c) with the position detection target images shown in (d1) to (d3) taken from the image B shown in (c). In the figure, (d1) is a position detection target image above the Y-axis position of the template, (d3) is a position detection target image below the template, and (d
2) shows the position detection target image having the maximum similarity at the same position as the template.

【0044】このあと、ステップ106において、車間
距離算出部7で先行車Cまでの距離Zを求める。距離
は、先の図1に示した原理に従い、画像A、B内のマッ
チング位置ya、ybを前述の式(1)に代入して求め
る。このようにして、入力した画像A、Bに基づいてス
テップ106で先行車までの距離が求められると、ステ
ップ107に進んで当該距離データが車間距離保管部8
に記憶、保管される。
After that, in step 106, the distance Z to the preceding vehicle C is obtained by the inter-vehicle distance calculating section 7. The distance is obtained by substituting the matching positions ya and yb in the images A and B into the above equation (1) according to the principle shown in FIG. In this way, when the distance to the preceding vehicle is obtained in step 106 based on the input images A and B, the process proceeds to step 107 and the distance data is stored in the inter-vehicle distance storage unit 8.
Is stored and stored in.

【0045】この間、先行車検出部5による画像A上で
の先行車の位置検出にあたっては、今回の検出対象車が
前回と同じ車であるか否かを判断する必要がある。その
ため、1度先行車を発見した後、すなわちNUMが0で
はないときには、ステップ102から108へ進んで、
前回発見した先行車を検出対象として、その先行車の画
像上の位置を次の入力画像上で探し、割り込み車が来る
までは同一車両を追従するようにする。
During this time, when the position of the preceding vehicle on the image A is detected by the preceding vehicle detection unit 5, it is necessary to judge whether the vehicle to be detected this time is the same vehicle as the previous vehicle. Therefore, after the preceding vehicle is found once, that is, when NUM is not 0, the process proceeds from step 102 to step 108,
The preceding vehicle found previously is detected, and the position on the image of the preceding vehicle is searched for on the next input image, and the same vehicle is followed until the interrupting vehicle arrives.

【0046】次に、この追従方法について説明する。前
述のように、一度先行車を発見したときは、その先行車
位置に切ったウインドウをテンプレートとして保存して
ある。図15の(a)は前回入力した画像Aを示し、
(b)はそれから切り出して保存されたテンプレートを
示している。その次に入力した(c)に示す新たな画像
Aにおける先行車位置検出は、上記保存されたテンプレ
ートと最も類似度の高い位置を探すことにより行われ
る。類似度は、ステップ105で画像A、B間のマッチ
ングに用いた手法と同様に、正規化相関法を用いること
ができる。すなわち、テンプレートの各画素の輝度値を
Tij,新たに入力した画像Aから抜き出した(d1)
〜(d3)に示す複数の位置検出対象画像の各画素の輝
度値をAijとすると、互いの画像の類似度は式(6)
より算出することができる。
Next, the following method will be described. As described above, once the preceding vehicle is found, the window cut at the position of the preceding vehicle is saved as a template. FIG. 15A shows the image A input last time,
(B) shows a template that has been cut out and saved. The preceding vehicle position detection in the new image A shown next in (c) is performed by searching for a position having the highest degree of similarity with the stored template. For the degree of similarity, the normalized correlation method can be used as in the method used for matching between the images A and B in step 105. That is, the brightness value of each pixel of the template is extracted from Tij, the newly input image A (d1).
Let (A3) be the brightness value of each pixel of the plurality of position detection target images shown in (d3) to (d3).
It can be calculated more.

【数2】 [Equation 2]

【0047】新たに入力した画像A上において位置をず
らしながら、前回入力した画像Aから作成したテンプレ
ートに対し、式(6)で表わされる類似度の最も高い画
像が存在する位置を探して、その位置を先行車位置とす
る。 図15中、(d2)の位置検出対象画像がテンプ
レートに対し最も高い類似度を示し、(d1)は(c)
に示す新たな画像Aにおいて(d2)よりも左上にずれ
た位置画像、(d3)は(d2)よりも右下にずれた位
置画像を示している。
While shifting the position on the newly input image A, the position of the image having the highest degree of similarity expressed by the equation (6) is searched for with respect to the template created from the previously input image A, and the position is searched. The position is set as the preceding vehicle position. In FIG. 15, the position detection target image of (d2) shows the highest similarity to the template, and (d1) is (c).
In the new image A shown in (4), the position image is shifted to the upper left from (d2), and (d3) is the position image shifted to the lower right from (d2).

【0048】なお、新たに入力した画像Aにおいて先行
車位置を検出した後は、そのまた次に入力する画像Aで
の先行車位置検出用として検出位置で切ったウインドウ
内の画像を新たなテンプレートとして保存する。これに
より、画像上の先行車位置検出のために用いるテンプレ
ートは、常時更新されていく。このようにテンプレート
を毎回更新することで、先行車が遠ざかったり近づいた
りして大きさが変わる場合にも、正規化相関法によるマ
ッチングで先行車に追従する。
After detecting the position of the preceding vehicle in the newly input image A, the image in the window cut at the detected position for detecting the position of the preceding vehicle in the image A input next is used as a new template. Save as. As a result, the template used for detecting the position of the preceding vehicle on the image is constantly updated. By updating the template each time in this way, the preceding vehicle is followed by the matching by the normalized correlation method even when the size of the preceding vehicle moves away from or approaches the vehicle.

【0049】一方、式(6)から求める類似度の最大値
が所定のしきい値以下になったとき、あるいは先行車位
置が画像の左右の端に来たときには、追従中の先行車と
自車との間に割り込み車が入ったか、先行車を見失った
ものと判断する。ステップ109では、上記追従結果を
チェックし、追従して先行車位置を検出しているときは
ステップ106へ進む。また、割り込み車が入ったり、
先行車を見失ったときは、ステップ110で、追従回数
をNUM=0にリセットしたあと、ステップ101へ戻
り、再び、2本の白線を用いての先行車発見処理によっ
て新たな先行車を発見する処理で画像上の先行車位置を
検出し直す。
On the other hand, when the maximum value of the similarity calculated from the equation (6) becomes less than or equal to a predetermined threshold value, or when the position of the preceding vehicle comes to the left and right edges of the image, the vehicle following the preceding vehicle and the following vehicle are detected. It is determined that an interrupting vehicle has entered between the car and the preceding car. In step 109, the follow-up result is checked, and if the preceding vehicle position is detected following the follow-up, the process proceeds to step 106. Also, there are interruption cars,
When the preceding vehicle is lost, the number of follow-ups is reset to NUM = 0 in step 110, the process returns to step 101, and a new preceding vehicle is found again by the preceding vehicle finding process using the two white lines. The preceding vehicle position on the image is detected again in the processing.

【0050】ステップ107の次のステップ111で
は、画像上の大きさ検出部10において、先行車の画像
上での大きさを検出する。ステレオ画像2枚のうちどち
らか一方を用いて求めればよいから、ここでは図16の
(a)に示すように、画像Aにおける先行車の屋根に対
応する上端エッジ(yt)とその車体下面に対応する下
端エッジ(ys)との間の長さywを求めて先行車の画
像上での大きさとする。
In step 111 following step 107, the image size detector 10 detects the size of the preceding vehicle on the image. Since it can be obtained using either one of the two stereo images, here, as shown in (a) of FIG. 16, the upper edge (yt) corresponding to the roof of the preceding vehicle in the image A and the lower surface of the vehicle body are The length yw from the corresponding lower edge (ys) is obtained and used as the size on the image of the preceding vehicle.

【0051】ここでは、先のステップ103で求められ
た先行車位置において、画像A内に上下のエッジ検出用
のウインドウを切る。そのウインドウは画像上の先行車
全体を含むようにするため、図16の(a)に示すよう
に、先行車検出用のウインドウより大きくし、位置と大
きさを決めた後、数個に縦方向に分割する。
Here, the window for detecting the upper and lower edges is cut in the image A at the position of the preceding vehicle obtained in the previous step 103. In order to include the entire preceding vehicle on the image, the window is made larger than the window for detecting the preceding vehicle as shown in FIG. 16 (a), and after determining the position and size, the window is vertically divided into several windows. Divide into directions.

【0052】この複数の縦長のウインドウにおいて、
(b)に示すように、下から上に向けて、先行車位置検
出と同じ要領で所定のしきい値以上のエッジ強度および
所定のしきい値以上の長さを持つエッジを探して、下端
エッジを検出する。この際のエッジ強度のしきい値は、
先行車発見時に検出したエッジ強度をもとにその値に近
い値として定める。検出したエッジの強度は、ソーベル
オペレータなどを用いてエッジの微分値として求める。
In the plurality of vertically long windows,
As shown in (b), searching from the bottom to the top for an edge having an edge strength equal to or greater than a predetermined threshold value and a length equal to or greater than a predetermined threshold value in the same manner as the detection of the position of the preceding vehicle, and determine Detect edges. At this time, the threshold of the edge strength is
Based on the edge strength detected when the preceding vehicle was found, it is set as a value close to that value. The detected edge strength is obtained as a differential value of the edge using a Sobel operator or the like.

【0053】また、長さのしきい値は、次のような方法
で定める。図17に示すように、先行車Cの幅をW、先
行車の高さをh、先行車の底からカメラの光軸までの高
さをk、カメラから先行車までの距離をZとすると、 xw:W=f:Z yw:h=f:Z yc:k=f:Z の関係が成立する。したがって、先行車の幅xwとy座
標値ycの間には、式(7)の関係が成り立つ。 xw/W=yw/h=yc/k (7)
The length threshold value is determined by the following method. As shown in FIG. 17, assuming that the width of the preceding vehicle C is W, the height of the preceding vehicle is h, the height from the bottom of the preceding vehicle to the optical axis of the camera is k, and the distance from the camera to the preceding vehicle is Z. , Xw: W = f: Z yw: h = f: Z yc: k = f: Z. Therefore, the relationship of Expression (7) is established between the width xw of the preceding vehicle and the y coordinate value yc. xw / W = yw / h = yc / k (7)

【0054】先行車の幅Wは通常1.5〜1.8m程度
であるので、エッジを発見したy座標位置をもとに式
(8)より画像上での先行車のだいたいの横幅xwを求
めることができる。 xw=yc×W/k (8) 発見した横エッジがこのxwの値に近い長さであれば、
先行車の下端エッジであると判断する。
Since the width W of the preceding vehicle is usually about 1.5 to 1.8 m, the approximate width xw of the preceding vehicle on the image is calculated from the equation (8) based on the y coordinate position where the edge is found. You can ask. xw = yc × W / k (8) If the discovered lateral edge has a length close to the value of xw,
Judge that it is the lower edge of the preceding vehicle.

【0055】検出したエッジの長さは次のような方法で
求める。先行車の大きさ検出用として切った図16に示
す縦長のウインドウの1つにおいて、エッジ強度がしき
い値以上である水平エッジを検出し、そのエッジのy座
標位置が隣接するウインドウにおいても同じであれば、
同一のエッジであるとみなす。つまり、ウインドウの幅
がxwinのウインドウにおいてS個連続して同じ位置
にエッジが検出されたら、そのエッジの長さはS×xw
inとする。しきい値との比較判断は、S×xwinの
値と式(8)で求めた値との間で行い、互いに近い値で
あれば条件を満たしていると判断する。これらの条件に
合うエッジを下から上に向けて探し、最初に検出された
エッジを先行車の下端エッジとする。
The length of the detected edge is obtained by the following method. In one of the vertically long windows shown in FIG. 16, which is cut for detecting the size of the preceding vehicle, a horizontal edge whose edge strength is equal to or higher than a threshold value is detected, and the y coordinate position of the edge is the same in adjacent windows. If,
Considered to be the same edge. That is, when S consecutive edges are detected at the same position in a window whose window width is xwin, the length of the edge is S × xw.
in. The comparison with the threshold value is performed between the value of S × xwin and the value obtained by the equation (8), and if the values are close to each other, it is determined that the condition is satisfied. Edges that meet these conditions are searched from bottom to top, and the edge detected first is the lower edge of the preceding vehicle.

【0056】次に、上端エッジの概略の位置は、下端エ
ッジから上方に下端エッジの長さと同様程度の距離にあ
るものと想定されるので、その付近だけに探索範囲を限
定して、下端エッジが発見されたものと同じウインドウ
において、図16の(c)に示すように、上から下に向
けて、下端エッジの探索と同じ方法で探索する。ただ
し、車両の形状により、上端エッジは下端エッジより短
い場合もあるので、エッジの長さのしきい値は、下端エ
ッジが発見されたウインドウの内、両端を除いた数個の
ウインドウだけでも上端エッジとみなすこととする。な
お、図16中、×印はエッジ長さが短いために選択され
なかったエッジを示し、〇印は合計長さがしきい値付近
で先行車と判断されるエッジを示している。
Next, since the approximate position of the upper edge is assumed to be at a distance similar to the length of the lower edge upward from the lower edge, the search range is limited to the vicinity thereof and the lower edge is limited. In the same window as the one in which is found, as shown in (c) of FIG. 16, the search is performed from top to bottom in the same manner as the search for the lower edge. However, depending on the shape of the vehicle, the upper edge may be shorter than the lower edge, so the threshold of the edge length is the upper edge of the window where the lower edge is found, even if only a few windows are excluded. It is considered as an edge. Note that, in FIG. 16, a mark “x” indicates an edge that is not selected because the edge length is short, and a mark “◯” indicates an edge that is determined as a preceding vehicle when the total length is near the threshold value.

【0057】このような方法で、下端エッジ位置ysと
上端エッジ位置ytを検出し、(ys−yt)を画像上
での先行車の大きさywとする。このようにして、画像
上での先行車の大きさywが求められると、ステップ1
12に進んで当該大きさデータが大きさ保管部12に記
憶、保管される。
With such a method, the lower edge position ys and the upper edge position yt are detected, and (ys-yt) is set as the size yw of the preceding vehicle on the image. In this way, when the size yw of the preceding vehicle on the image is obtained, step 1
In step 12, the size data is stored and stored in the size storage unit 12.

【0058】次にステップ113において、先行車の実
際の大きさ算出部11で、追従する先行車の実際の高さ
hを求める。これは、式(3)の変形式h=Z×yw/
fに先のステップ106で求めた距離Zと画像上での先
行車の大きさywを代入することにより求められる。な
お、先行車の実際の高さhは固定値であるから、先行車
追従の開始時の初回データに基づいて1回だけ求めれば
よい。
Next, at step 113, the actual size calculating section 11 of the preceding vehicle obtains the actual height h of the following preceding vehicle. This is a modification of the equation (3) h = Z × yw /
It is obtained by substituting the distance Z obtained in step 106 and the size yw of the preceding vehicle on the image into f. Since the actual height h of the preceding vehicle is a fixed value, it may be calculated only once based on the initial data at the time of starting the following vehicle.

【0059】このあと、ステップ114において、追従
回数(保管データ数)NUMを1だけ加算する。ステッ
プ115では、NUMが所定値に達したかどうかをチェ
ックする。NUMが所定値に達していないときは、ステ
ップ101へ戻る。これにより、一定時間Δt毎に連続
して繰り返し、先行車までの距離が求められるととも
に、先行車の画像上の大きさが求められ、それぞれが逐
次記憶、保管される。
Then, in step 114, the number of follow-ups (the number of stored data) NUM is incremented by 1. In step 115, it is checked whether NUM has reached a predetermined value. If NUM has not reached the predetermined value, the process returns to step 101. As a result, the distance to the preceding vehicle is determined continuously and the size of the preceding vehicle on the image is determined continuously and repeatedly stored and stored for each fixed time Δt.

【0060】NUMが所定値に達すると、ステップ11
5から116へ進み、第1の相対速度算出部9におい
て、距離の変化をもとに先行車と自車間の相対速度V1
を求める。一定時間毎の距離を先の図3のようにグラフ
にプロットし、そのグラフ上の点列の最小二乗誤差直線
の傾きを算出することにより、相対速度V1が求められ
る。
When NUM reaches a predetermined value, step 11
From 5 to 116, the first relative speed calculation unit 9 calculates the relative speed V1 between the preceding vehicle and the host vehicle based on the change in the distance.
Ask for. The relative velocity V1 can be obtained by plotting the distance for each constant time on a graph as shown in FIG. 3 and calculating the slope of the least square error straight line of the point sequence on the graph.

【0061】次いで、ステップ117に進んで、第2の
相対速度算出部13において、画像上の先行車の大きさ
の変化をもととして相対速度V2を求める。ここでは、
同じ先行車に追従している間、処理時間間隔Δt毎に求
めたywを用いて、式(3)により算出した距離Zにつ
いて、先の図3に示すようなグラフの最小二乗誤差直線
の傾きとして相対速度V2を求める。
Next, the routine proceeds to step 117, where the second relative speed calculator 13 obtains the relative speed V2 based on the change in the size of the preceding vehicle on the image. here,
While following the same preceding vehicle, the slope of the least-squares error straight line of the graph as shown in FIG. 3 above for the distance Z calculated by the equation (3) using yw obtained for each processing time interval Δt. The relative speed V2 is calculated as

【0062】以上により、距離の変化をもとにした相対
速度V1と先行車の大きさの変化をもとにした相対速度
V2が求められると、次にステップ118において、軸
ずれ判断部14で軸ずれの有無の判断を行う。ここで
は、各速度V1,V2の差が所定のしきい値より大きい
かどうかをチェックし、その差がしきい値以上となれば
軸ずれが発生しているものとする。軸ずれが発生してい
なければ、ステップ101に戻り、上記のフローを繰り
返し、先行車との距離計測を継続する。一方、軸ずれが
発生している場合には、ステップ119に進んで、距離
計測を停止するなどの対応措置をとる。
As described above, when the relative speed V1 based on the change in the distance and the relative speed V2 based on the change in the size of the preceding vehicle are obtained, next, in step 118, the axis deviation judging unit 14 determines. The presence or absence of axis misalignment is determined. Here, it is checked whether the difference between the velocities V1 and V2 is larger than a predetermined threshold value, and if the difference is equal to or larger than the threshold value, it is assumed that the axis deviation has occurred. If the axis deviation has not occurred, the process returns to step 101, the above flow is repeated, and the distance measurement with the preceding vehicle is continued. On the other hand, if an axis deviation has occurred, the procedure goes to step 119 to take a countermeasure such as stopping the distance measurement.

【0063】本実施例は以上のように構成され、ステレ
オ画像処理による車間距離計測においてステレオ画像処
理で求めた先行車までの距離の時間的変化から相対速度
V1を求めるとともに、画像上の先行車の大きさの時間
的変化から相対速度V2を求め、これら2つの相対速度
を比較することにより、ステレオカメラの軸ずれを判断
するようにしたので、従来のような取付け位置認識マー
クによって対象物の検出が不能になったり、運転者の視
界を妨げるような不都合なく軸ずれを検出することがで
きるとともに、微妙な軸ずれも確実に検出できる。さら
に、本実施例では車間距離計測を行うとともに、相対速
度も算出されるという効果を有している。
This embodiment is configured as described above, and in the inter-vehicle distance measurement by the stereo image processing, the relative speed V1 is obtained from the temporal change of the distance to the preceding vehicle obtained by the stereo image processing, and the preceding vehicle on the image is obtained. Since the relative speed V2 is obtained from the temporal change of the magnitude of the object and the two relative speeds are compared to determine the axis deviation of the stereo camera, the conventional mounting position recognition mark is used to detect the object. The axis misalignment can be detected without any inconvenience that the detection becomes impossible or the driver's field of vision is disturbed, and the subtle axis misalignment can be surely detected. Furthermore, this embodiment has an effect that the inter-vehicle distance is measured and the relative speed is calculated.

【0064】次に、本発明の第2の実施例について説明
する。これは、画像上の先行車位置の検出に際して、画
像全体を所定の大きさのブロック毎に区切り、ブロック
毎に求めた距離をもとに、最も近い距離が求められたブ
ロックの固まりを先行車とするものである。図18は本
実施例の構成を示す図である。図10の第1の実施例に
おける先行車検出部5、マッチング位置検出部6および
車間距離算出部7のかわりに、それぞれブロック毎エッ
ジ検出部15、ブロック毎マッチング位置検出部16お
よびブロック毎距離算出部17が設けられている。そし
て、先行車位置・大きさ・距離判断部20がブロック毎
距離算出部17、先行車の実際の大きさ算出部11およ
び車間距離保管部8に接続されている。さらに、先行車
位置・大きさ・距離判断部20は、画像上の大きさ検出
部10を廃して直接大きさ保管部12’に接続されてい
る。
Next, a second embodiment of the present invention will be described. This is because when detecting the position of the preceding vehicle on the image, the entire image is divided into blocks of a predetermined size, and based on the distance obtained for each block, the block of the blocks for which the closest distance is obtained is determined as the preceding vehicle. It is what FIG. 18 is a diagram showing the configuration of this embodiment. Instead of the preceding vehicle detection unit 5, the matching position detection unit 6 and the inter-vehicle distance calculation unit 7 in the first embodiment of FIG. 10, a block edge detection unit 15, a block matching position detection unit 16 and a block distance calculation, respectively. A section 17 is provided. The preceding vehicle position / size / distance determining unit 20 is connected to the block-by-block distance calculating unit 17, the actual size calculating unit 11 of the preceding vehicle, and the inter-vehicle distance storing unit 8. Further, the preceding vehicle position / size / distance determination unit 20 is directly connected to the size storage unit 12 ′ without the size detection unit 10 on the image.

【0065】まず、上記構成における先行車位置の検出
とブロック数の時間的変化をもととした第1の相対速度
V1の求め方について説明する。まず、ブロック毎エッ
ジ検出部15では、図19に示すように、画像A内の空
の領域を除いた部分をxbk×ybkを単位とする複数
ブロックに区切る。そして、各ブロック内で横エッジを
検出する。
First, a method of obtaining the first relative speed V1 based on the detection of the position of the preceding vehicle and the temporal change of the number of blocks in the above configuration will be described. First, in the block-by-block edge detection unit 15, as shown in FIG. 19, the portion excluding the empty region in the image A is divided into a plurality of blocks in units of xbk × ybk. Then, the horizontal edge is detected in each block.

【0066】ブロック毎マッチング位置検出部16で
は、画像Aにおいて定義した個々のブロックをテンプレ
ートとして、前実施例での距離計測と同じように正規化
相関法により類似度の最も高いブロックの位置を画像B
内で探し、マッチング位置を検出する。ブロック毎のマ
ッチングに際しては、先行車は横エッジを多く持つた
め、ブロック内に先行車が存在する場合に背景の画像よ
り先行車の横エッジが強調されるように水平微分画像を
用いる。ブロック毎距離算出部17ではこのマッチング
結果を用いて、各ブロック毎に距離を求める。
The block-by-block matching position detection unit 16 uses the individual blocks defined in the image A as a template to determine the position of the block with the highest degree of similarity by the normalized correlation method as in the distance measurement in the previous embodiment. B
Search inside to find the matching position. When matching each block, since the preceding vehicle has many lateral edges, a horizontal differential image is used so that the lateral edge of the preceding vehicle is emphasized over the background image when the preceding vehicle exists in the block. The block-by-block distance calculation unit 17 uses this matching result to determine the distance for each block.

【0067】こうして、先行車が撮像されている場合に
は、撮像されているそれぞれのブロックまでの距離が求
められるので、このあと、先行車位置・大きさ・距離判
断部20において、全てのブロックのうち最短距離のも
のでかつ隣接するブロックの固まりを先行車候補とし
て、候補の中からブロックの固まりの長さ条件等を用い
て先行車を検出する。したがって、ここで先行車の画像
上の位置と距離と大きさとが同時に求められることにな
る。この先行車の画像上の位置と距離と大きさは、新し
い画像入力に基づく検出毎に更新して先行車位置・大き
さ・距離判断部20内に記憶される。また、距離データ
は車間距離保管部8に記憶、保管される。
In this way, when the preceding vehicle is being imaged, the distances to the respective blocks being imaged are obtained, and thereafter, in the preceding vehicle position / size / distance determining unit 20, all blocks are imaged. Among the candidates, the preceding vehicle is detected by using the block having the shortest distance and adjacent blocks as the preceding vehicle candidate, and using the block cluster length condition and the like. Therefore, the position, the distance, and the size of the preceding vehicle on the image are simultaneously obtained here. The position, distance, and size of the preceding vehicle on the image are stored in the preceding vehicle position / size / distance determination unit 20 after being updated every time a new image is input. Further, the distance data is stored and stored in the inter-vehicle distance storage unit 8.

【0068】初回の画像入力に基づいて先行車が検出さ
れた次回以降は、前回検出した先行車を検出対象として
追従することになる。この場合、同じ先行車に追従中は
先行車の大きさや距離が急激に変わることはないから、
先行車位置・大きさ・距離判断部20に記憶されている
前回の距離、先行車の画像上の位置およびその大きさの
変化を確認しながら追従する。もし、距離、画像上の位
置および大きさのいずれかにおいて急激に値が変化した
場合には、検出した先行車が入れ替わったものと判断す
る。
From the next time when the preceding vehicle is detected based on the first image input, the preceding vehicle detected last time is followed as the detection target. In this case, the size and distance of the preceding vehicle do not change suddenly while following the same preceding vehicle,
Following the preceding vehicle position / size / distance determination unit 20, the previous distance stored in the image, the position of the preceding vehicle on the image, and the change in the size thereof are checked. If the value suddenly changes at any of the distance, the position on the image, and the size, it is determined that the detected preceding vehicle has been replaced.

【0069】前実施例と同様、同一の先行車に追従して
いる間、先行車までの距離が一定時間Δt毎に所定回数
連続して繰り返し求められ、車間距離保管部に逐次保管
される。そして、第1の相対速度算出部9において、距
離の変化をもとに先行車と自車間の相対速度V1を求め
る。この実施例では、ブロック毎エッジ検出部15、ブ
ロック毎マッチング位置検出部16、ブロック毎距離算
出部17および先行車位置・大きさ・距離判断部20が
一体となって、発明の大きさ・距離判断手段を構成して
いる。
As in the previous embodiment, while following the same preceding vehicle, the distance to the preceding vehicle is repeatedly obtained a predetermined number of times at regular time intervals Δt and sequentially stored in the inter-vehicle distance storage unit. Then, the first relative speed calculation unit 9 obtains the relative speed V1 between the preceding vehicle and the own vehicle based on the change in the distance. In this embodiment, the block edge detection unit 15, the block matching position detection unit 16, the block distance calculation unit 17, and the preceding vehicle position / size / distance determination unit 20 are integrated to form the size / distance of the invention. It constitutes the judgment means.

【0070】次に、先行車の大きさの変化をもとにした
相対速度V2の求めかたについて説明する。図19に示
したように各ブロックの大きさを(xbk×ybk)と
した場合、先行車と判断したブロックの固まりの縦の列
の個数がNであれば、先行車の画像上の縦方向の大きさ
は、 ywb=ybk×N (9) であると判断することができる。したがって先行車の画
像上の縦方向の大きさの変化は縦方向のブロック数Nの
変化として求めることができる。
Next, how to determine the relative speed V2 based on the change in the size of the preceding vehicle will be described. As shown in FIG. 19, when the size of each block is (xbk × ybk), if the number of vertical columns of blocks of blocks determined to be preceding vehicles is N, the vertical direction on the image of the preceding vehicle It can be determined that the magnitude of y is ywb = ybk × N (9). Therefore, the change in size in the vertical direction on the image of the preceding vehicle can be obtained as the change in the number N of blocks in the vertical direction.

【0071】これに基づき、大きさ保管部12’には先
行車追従中、先行車位置・大きさ・距離判断部20から
一定時間Δt毎に先行車と判断したブロックの固まりの
ブロック数が逐次保管される。そして、第2の相対速度
算出部13’では、上記式(9)によるyw(ywb)
と先行車の実際の大きさhとから前述の式(3)により
算出した距離Zについて、先の図3に示すようなグラフ
の最小二乗誤差直線の傾きとして相対速度V2を求め
る。その他の構成は前実施例と同様である。
Based on this, while the preceding vehicle is following the size storage unit 12 ′, the number of blocks of a block of blocks judged to be preceding vehicles by the preceding vehicle position / size / distance determination unit 20 at regular time intervals Δt is sequentially obtained. Be stored. Then, in the second relative speed calculation unit 13 ′, yw (ywb) according to the above equation (9)
With respect to the distance Z calculated by the above equation (3) from the actual size h of the preceding vehicle, the relative speed V2 is obtained as the slope of the least square error straight line of the graph as shown in FIG. Other configurations are similar to those of the previous embodiment.

【0072】ところで、この実施例において、先行車の
画像上の縦方向の大きさは、ブロックの大きさの単位で
あるybkの倍数という離散的な値として求められる。
しかし、これを用いて求められる相対速度V2は、ステ
レオ画像処理結果の距離をもととして求める相対速度V
1より精度が良く、軸ずれの判断用として十分な信頼性
を備える。一般に、ステレオ画像処理では、2枚の画像
間のマッチングを行い易くするため、検出距離に対して
眼間距離Dを短くすることが求められる。とくに車載ス
テレオカメラによる車間距離計測では、カメラをコンパ
クトに構成することが要求されるため、通常、カメラか
ら先行車までの距離がステレオカメラの眼間距離Dに対
して50〜100倍程度になるように設定されているも
のが多い。
By the way, in this embodiment, the size of the preceding vehicle on the image in the vertical direction is obtained as a discrete value which is a multiple of ybk which is a unit of the size of the block.
However, the relative velocity V2 obtained using this is the relative velocity V2 obtained based on the distance of the stereo image processing result.
1 is more accurate than 1 and has sufficient reliability for determining axis deviation. Generally, in stereo image processing, in order to facilitate matching between two images, it is required to shorten the inter-eye distance D with respect to the detection distance. In particular, in the inter-vehicle distance measurement using the vehicle-mounted stereo camera, it is required to make the camera compact, so that the distance from the camera to the preceding vehicle is usually about 50 to 100 times the inter-eye distance D of the stereo camera. Many are set as follows.

【0073】このように、検出距離が眼間距離に対して
長いと、マッチングは行い易くなるが、一方のカメラの
光軸が他方のカメラの光軸に対してずれたときの検出距
離の誤差が大きいという問題がある。例えば、焦点距離
f=1000画素(1/2inch、25万画素のCC
Dにおいて、f=10mmはf=約1000画素に換算
される)、眼間距離D=0.1mにおいて、20m先の
先行車を認識する場合を考えると、画像上の視差(yb
−ya)は5画素(=1000×0.1/20)とな
る。仮に1画素だけマッチング位置がずれる程度に軸が
ずれて視差が4画素になったとすると、本来距離20m
のところが距離25m(=1000×0.1/4)とし
て求められる。
As described above, if the detection distance is longer than the interocular distance, the matching is facilitated, but the error of the detection distance when the optical axis of one camera deviates from the optical axis of the other camera. Is a big problem. For example, focal length f = 1000 pixels (1/2 inch, CC of 250,000 pixels)
In D, f = 10 mm is converted to f = about 1000 pixels), and when a preceding vehicle 20 m ahead is recognized at an inter-eye distance D = 0.1 m, parallax (yb
-Ya) is 5 pixels (= 1000 × 0.1 / 20). If the parallax becomes 4 pixels because the axis is displaced to the extent that the matching position is displaced by 1 pixel, the distance is originally 20 m.
However, the distance is 25 m (= 1000 × 0.1 / 4).

【0074】一方、先行車の画像上での大きさは、仮に
先行車の高さを1mとし、前述と同じようにf=100
0画素のカメラを用いて20m先にある先行車を撮像す
ると、式(3)を変形して高さywb=50画素(=1
×1000/20)に撮像される。つまり、画像上の先
行車の高さの認識に1画素程度の誤差ができたとして
も、仮に、先行車の高さhが求められている場合であれ
ば、先行車の大きさから求めている相対速度はほとんど
影響を受けない。
On the other hand, regarding the size of the preceding vehicle on the image, assuming that the height of the preceding vehicle is 1 m, f = 100 as described above.
When a 0-pixel camera is used to capture an image of a preceding vehicle 20 m away, the equation (3) is transformed to a height ywb = 50 pixels (= 1
× 1000/20). That is, even if there is an error of about one pixel in the recognition of the height of the preceding vehicle on the image, if the height h of the preceding vehicle is required, it is calculated from the size of the preceding vehicle. Relative velocity is almost unaffected.

【0075】また、前述の計算より、ステレオ画像処理
で20m先を認識する場合では、画像上での1画素の誤
差は実計測での5mの誤差に相当することがわかる。し
かし、仮に、f=1000画素のカメラを用いて、高さ
1mの先行車を撮像したときの画像上での先行車の大き
さを求めると、25m先では50画素(=1×1000
/25)、20m先では40画素(=1×1000/2
0)に撮像される。したがって、20m先における5m
の誤差が画像上での10画素の誤差に相当することがわ
かる。以上のように、先行車の大きさの変化から求めた
相対速度V2は、ステレオ画像処理結果をもとに求める
相対速度V1より精度が良い。
From the above calculation, it is understood that when recognizing 20 m ahead by stereo image processing, the error of 1 pixel on the image corresponds to the error of 5 m in the actual measurement. However, if the size of the preceding vehicle on the image when the preceding vehicle having a height of 1 m is imaged is obtained using a camera with f = 1000 pixels, 50 pixels (= 1 × 1000) at 25 m ahead.
/ 25), 40 pixels at 20 m (= 1 x 1000/2)
0) is imaged. Therefore, 5m at 20m
It can be seen that the error of 10 corresponds to the error of 10 pixels on the image. As described above, the relative speed V2 obtained from the change in the size of the preceding vehicle is more accurate than the relative speed V1 obtained based on the stereo image processing result.

【0076】本実施例は以上のように構成され、入力画
像を所定の大きさの複数ブロックに区切り、ブロック毎
に求めた距離値をもとに先行車位置と先行車の画像上で
の大きさを求める構成としたので、前実施例と同じ効果
を有するとともに、先行車の位置検出を行うと同時に先
行車までの距離と大きさが求められるので、その後の処
理が短縮化されるという利点がある。なお、この実施例
では先行車の画像上の大きさとして縦方向のブロック数
を用いたが、図19にMで示すように横方向のブロック
の並びの数を用いてその時間的変化から相対速度V2を
求めるものとしてもよい。
The present embodiment is configured as described above, the input image is divided into a plurality of blocks of a predetermined size, and the position of the preceding vehicle and the size of the preceding vehicle on the image are divided based on the distance value obtained for each block. In addition to having the same effect as the previous embodiment, the distance and size to the preceding vehicle can be obtained at the same time as the position detection of the preceding vehicle is performed, and the subsequent processing can be shortened. There is. In this embodiment, the number of blocks in the vertical direction is used as the size on the image of the preceding vehicle, but the number of blocks in the horizontal direction is used as shown by M in FIG. The speed V2 may be obtained.

【0077】次に、図20は第3の実施例の構成を示
す。これは、図18の第2の実施例における大きさ保管
部12’のかわりに、上下エッジ検出部21とエッジ間
距離保管部22を設け、第2の相対速度算出部13では
エッジ間距離から相対速度V2を求めるようにしたもの
である。先行車位置の検出とブロック数の時間的変化を
もととした第1の相対速度V1の求め方は、第2の実施
例におけると同じである。
Next, FIG. 20 shows the configuration of the third embodiment. This is because, instead of the size storage unit 12 ′ in the second embodiment of FIG. 18, a vertical edge detection unit 21 and an edge distance storage unit 22 are provided, and the second relative speed calculation unit 13 calculates The relative velocity V2 is obtained. The method of obtaining the first relative speed V1 based on the detection of the position of the preceding vehicle and the temporal change of the number of blocks is the same as in the second embodiment.

【0078】一方、第2の相対速度V2は次のような処
理によって求める。まず、上下エッジ検出部21におい
て、先行車位置・大きさ・距離判断部20で先行車とし
て特定したブロックの固まりから、その最下端と最上段
の列を決定する。そして、図21に示すように、最下端
および最上段の列においてそれぞれ所定のしきい値以上
の強度と長さを持つエッジ位置を検出して、最上段と最
下端のエッジ間の距離yweを画素単位で求め、これを
エッジ間距離保管部22に記憶、保管する。エッジ間の
距離yweは、先行車追従中、先行車位置・大きさ・距
離判断部20で一定時間Δt毎に先行車と判断したブロ
ックの固まりを特定するのに対応して、逐次保管され
る。
On the other hand, the second relative speed V2 is obtained by the following processing. First, in the upper and lower edge detection section 21, the bottom end and the uppermost row are determined from the block of blocks identified as the preceding vehicle by the preceding vehicle position / size / distance determination section 20. Then, as shown in FIG. 21, edge positions having strengths and lengths equal to or higher than a predetermined threshold are detected in the lowermost row and the uppermost row, respectively, and the distance ywe between the uppermost and lowermost edges is calculated. It is obtained in pixel units and is stored and stored in the edge distance storage unit 22. The distance ywe between the edges is sequentially stored while the preceding vehicle position / size / distance determination unit 20 specifies a block of blocks determined to be the preceding vehicle at regular time intervals Δt while following the preceding vehicle. .

【0079】そして、第2の相対速度算出部13では、
上記式(9)によるyw(ywe)と先行車の実際の大
きさhとから前述の式(3)により算出した距離Zにつ
いて、先の図6に示すようなグラフの最小二乗誤差直線
の傾きとして相対速度V2を求める。その他の構成は第
1の実施例と同様である。
Then, in the second relative speed calculating section 13,
The slope of the least-squares error straight line of the graph as shown in FIG. 6 with respect to the distance Z calculated from the above equation (3) from yw (ywe) according to the above equation (9) and the actual size h of the preceding vehicle. The relative speed V2 is calculated as The other structure is similar to that of the first embodiment.

【0080】本実施例は以上のように構成され、先行車
の最上段と最下端のエッジ間の距離yweを画素単位で
求め、この時間的変化をもとに相対速度V2を求めるも
のとしたので、前実施例でのブロックの倍数である離散
値を用いた場合に比較して、より一層高精度に相対速度
V2が求められるという利点を有する。
The present embodiment is configured as described above, and the distance ywe between the uppermost edge and the lowermost edge of the preceding vehicle is obtained in pixel units, and the relative speed V2 is obtained based on this temporal change. Therefore, there is an advantage that the relative speed V2 can be obtained with higher accuracy as compared with the case of using the discrete value which is a multiple of the block in the previous embodiment.

【0081】[0081]

【発明の効果】以上のとおり、本発明は、2台のカメラ
を用いたステレオ画像処理による距離計測装置におい
て、画像上で検出した計測対象物についてステレオ画像
処理で求めた当該計測対象物までの距離の時間的変化か
ら第1の相対速度を求めるとともに、いずれかの画像上
の計測対象物の大きさの時間的変化から第2の相対速度
を求め、両者を比較することにより2台のカメラの光軸
のずれを判断するものとしたので、例えば車間距離計測
では運転者の視界を妨げたり対象物と重なってその対象
物の検出を不能にしたりすることのある取付け位置認識
マークを不要としながら軸ずれを検出することができ、
しかも従来困難であった微妙な軸ずれも確実に検出でき
るという効果が得られる。さらに、対象物との距離計測
に加えて、相対速度も併せて求められるという効果もあ
る。
As described above, according to the present invention, in a distance measuring device by stereo image processing using two cameras, a measurement object detected on an image is measured up to the measurement object obtained by stereo image processing. The first relative speed is obtained from the time change of the distance, and the second relative speed is obtained from the time change of the size of the measuring object on one of the images, and the two are compared by comparing the two. Since the deviation of the optical axis of the vehicle is determined, for example, in the inter-vehicle distance measurement, the mounting position recognition mark that may obstruct the driver's field of view or overlap the object and make the object undetectable is unnecessary. Axis deviation can be detected while
In addition, it is possible to obtain the effect that it is possible to reliably detect even a slight axis deviation, which has been difficult in the past. Further, in addition to the distance measurement with the object, the relative speed can also be obtained together.

【0082】また、とくに画像上での計測対象物の検出
に際して、第1の画像を複数のブロックに区切り、各ブ
ロック内に撮像されている対象物までの距離を求め、当
該距離のうち最小値の対象物が撮像されているブロック
の固まりを計測対象物が撮像されている領域とすること
により、その最小値を計測対象物までの距離とするとと
もに、同時にブロックの数により画像上の計測対象物の
大きさが求められるという利点が得られる。
Further, particularly when detecting a measurement object on an image, the first image is divided into a plurality of blocks, the distance to the object imaged in each block is calculated, and the minimum value of the distances is calculated. By setting a block of blocks in which the target object is imaged as an area in which the measurement target is imaged, the minimum value is set as the distance to the measurement target, and at the same time, the measurement target on the image is determined by the number of blocks. The advantage is that the size of the object is required.

【0083】さらに、上記ブロックの固まりにおける互
いに最離間している2つの列からそれぞれエッジを検出
して、このエッジ間のあらためて画像上の計測対象物の
大きさとして用いることにより、第2の相対速度がより
高精度に算出されるので、軸ずれを精度良く検出でき
る。
Further, by detecting the edges from the two most distant columns in the block block and using them as the size of the measuring object on the image, the second relative distance is detected. Since the speed is calculated with higher accuracy, the axis deviation can be detected with high accuracy.

【図面の簡単な説明】[Brief description of drawings]

【図1】ステレオ画像処理による距離算出手法を説明す
るための説明図である。
FIG. 1 is an explanatory diagram for describing a distance calculation method by stereo image processing.

【図2】画素と焦点距離の関係を示す説明図である。FIG. 2 is an explanatory diagram showing a relationship between a pixel and a focal length.

【図3】距離の変化から相対速度を求める原理を説明す
る図である。
FIG. 3 is a diagram illustrating a principle of obtaining a relative speed from a change in distance.

【図4】画像上の大きさと距離の関係の説明図である。FIG. 4 is an explanatory diagram of a relationship between a size on an image and a distance.

【図5】画像上の大きさと距離の関係の説明図である。FIG. 5 is an explanatory diagram of a relationship between a size on an image and a distance.

【図6】軸がずれたときの距離計測の様子の説明図であ
る。
FIG. 6 is an explanatory diagram showing how distance is measured when the axes are deviated.

【図7】軸ずれの有無による画像の変化を示す図であ
る。
FIG. 7 is a diagram showing a change in an image depending on the presence or absence of axis deviation.

【図8】光軸が傾いたときの結像位置の変化を示す説明
図である。
FIG. 8 is an explanatory diagram showing changes in the image forming position when the optical axis is tilted.

【図9】光軸が傾いたときの先行車の大きさの変化を示
す説明図である。
FIG. 9 is an explanatory diagram showing a change in size of a preceding vehicle when an optical axis is tilted.

【図10】第1の実施例の構成を示すブロック図であ
る。
FIG. 10 is a block diagram showing a configuration of a first exemplary embodiment.

【図11】実施例における処理の流れを示すフローチャ
ートである。
FIG. 11 is a flowchart showing the flow of processing in the embodiment.

【図12】実施例における処理の流れを示すフローチャ
ートである。
FIG. 12 is a flowchart showing the flow of processing in the embodiment.

【図13】画像上での先行車位置の検出法を説明図であ
る。
FIG. 13 is an explanatory diagram of a method of detecting the position of a preceding vehicle on an image.

【図14】正規化相関法によるステレオ画像間でのマッ
チング位置の検出方法を示す説明図である。
FIG. 14 is an explanatory diagram showing a method of detecting matching positions between stereo images by a normalized correlation method.

【図15】追従時の正規化相関法による位置検出方法を
示す説明図である。
FIG. 15 is an explanatory diagram showing a position detection method by a normalized correlation method during tracking.

【図16】先行車の画像上での上端位置と下端位置の検
出要領を示す説明図である。
FIG. 16 is an explanatory diagram showing how to detect the upper end position and the lower end position on the image of the preceding vehicle.

【図17】画像上での先行車の縦横方向の大きさとそれ
が撮像されるy軸方向の位置の関係を示す説明図であ
る。
FIG. 17 is an explanatory diagram showing the relationship between the size of the preceding vehicle in the vertical and horizontal directions on the image and the position in the y-axis direction at which it is imaged.

【図18】第2の実施例を示すブロック図である。FIG. 18 is a block diagram showing a second embodiment.

【図19】画像上に区切るブロックを示す図である。FIG. 19 is a diagram showing blocks divided on an image.

【図20】第3の実施例を示すブロック図である。FIG. 20 is a block diagram showing a third embodiment.

【図21】第3の実施例における先行車の画像上での上
端位置と下端位置の検出要領を示す説明図である。
FIG. 21 is an explanatory diagram showing a procedure for detecting an upper end position and a lower end position on an image of a preceding vehicle in the third embodiment.

【符号の説明】[Explanation of symbols]

1、2 カメラ 1a、2a CCD 1b、2b 光軸 3、4 画像メモリ 5 先行車検出部(対象物検出手段) 6 マッチング位置検出部(マッチング位置探索
手段) 7 車間距離算出部(距離算出手段) 8 車間距離保管部(距離記憶手段) 9 第1の相対速度算出部(第1の相対速度算出
手段) 10 画像上の大きさ検出部(画像上の大きさ検出
手段) 11 先行車の実際の大きさ算出部(実際の大きさ
算出手段) 12、12’ 大きさ保管部(大きさ記憶手段) 13、13’ 第2の相対速度算出部(第2の相対
速度算出手段) 14 軸ずれ判断部(軸ずれ判断手段) 15 ブロック毎エッジ検出部 16 ブロック毎マッチング位置検出部 17 ブロック毎距離算出部 20 先行車位置・大きさ・距離判断部(計測対象
物の大きさ・距離判断手段) 21 上下エッジ検出部(両端エッジ検出手段) 22 エッジ間距離保管部(大きさ記憶手段) L1、L2 レンズ C 先行車 f 焦点距離 D 眼間距離
1, 2 Cameras 1a, 2a CCD 1b, 2b Optical axis 3, 4 Image memory 5 Preceding vehicle detection unit (object detection unit) 6 Matching position detection unit (matching position search unit) 7 Inter-vehicle distance calculation unit (distance calculation unit) 8 inter-vehicle distance storage unit (distance storage unit) 9 first relative speed calculation unit (first relative speed calculation unit) 10 image size detection unit (image size detection unit) 11 actual vehicle ahead Size calculating unit (actual size calculating unit) 12, 12 'Size storage unit (size storing unit) 13, 13' Second relative speed calculating unit (second relative speed calculating unit) 14 Axis deviation judgment Part (axis deviation determination means) 15 Block edge detection part 16 Block matching position detection part 17 Block distance calculation part 20 Preceding vehicle position / size / distance judgment part (size of object to be measured / distance judgment means) 21 Up Edge detector (both end edge detection means) 22 edge-to-edge distance storage unit (size storage means) L1, L2 lens C preceding vehicle f the focal length D interocular distance

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G01B 11/00 - 11/30 G01C 3/06 G06T 1/00 G08G 1/16 ─────────────────────────────────────────────────── ─── Continuation of front page (58) Fields surveyed (Int.Cl. 7 , DB name) G01B 11/00-11/30 G01C 3/06 G06T 1/00 G08G 1/16

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 それぞれの光軸を互いに平行とし所定の
眼間距離をもって配置された2台のカメラと、所定時間
間隔毎に該2台のカメラが撮像した映像信号をディジタ
ルの第1および第2の画像として一時的に記憶する画像
メモリと、前記第1の画像内で計測対象物を検出する対
象物検出手段と、第1の画像における前記計測対象物を
含むウインドウと最も類似したウインドウの位置を第2
の画像内に探索するマッチング位置探索手段と、前記互
いに最も類似したウインドウの位置と2台のカメラの位
置関係をもとに、計測対象物までの距離を求める距離算
出手段と、前記所定時間間隔毎に連続して求めた複数回
分の前記計測対象物までの距離を記憶する距離記憶手段
と、該距離記憶手段に記憶された計測対象物までの距離
の時間的変化から計測対象物との第1の相対速度を求め
る第1の相対速度算出手段と、前記第1および第2の画
像上のいずれかにおける計測対象物の大きさを検出する
画像上の大きさ検出手段と、前記画像上の計測対象物の
大きさと該計測対象物までの距離に基づいて当該計測対
象物の実際の大きさを算出する実際の大きさ算出手段
と、前記所定時間間隔毎に連続して求めた複数回分の画
像上の計測対象物の大きさを記憶する大きさ記憶手段
と、前記計測対象物の実際の大きさと大きさ記憶手段に
記憶された画像上の計測対象物の大きさの時間的変化と
をもとに計測対象物との第2の相対速度を求める第2の
相対速度算出手段と、前記第1の相対速度と第2の相対
速度の比較に基づいて前記2台のカメラの光軸のずれを
判断する軸ずれ判断手段とを有することを特徴とする距
離計測装置。
1. A pair of cameras, which have optical axes parallel to each other and are arranged with a predetermined inter-eye distance, and digital first and first video signals captured by the two cameras at predetermined time intervals. An image memory that temporarily stores the second image, an object detection unit that detects a measurement object in the first image, and a window most similar to the window including the measurement object in the first image. Second position
Matching position searching means for searching in the image, distance calculating means for calculating the distance to the measurement object based on the position of the most similar window and the positional relationship between the two cameras, and the predetermined time interval. Distance storage means for storing the distances to the measurement object for a plurality of times continuously obtained for each time, and a first distance from the measurement object based on a temporal change in the distance to the measurement object stored in the distance storage means. A first relative speed calculating means for obtaining a relative speed of 1; an image size detecting means for detecting the size of the measuring object in any of the first and second images; Actual size calculating means for calculating the actual size of the measurement target based on the size of the measurement target and the distance to the measurement target, and for a plurality of times obtained continuously at the predetermined time intervals. Object to be measured on the image A size storage means for storing a size, an actual size of the measurement target and a measurement target based on a temporal change in the size of the measurement target on the image stored in the size storage means. Second relative speed calculating means for obtaining the second relative speed of the first and second relative speeds, and axis deviation judgment for judging the deviation of the optical axes of the two cameras based on the comparison of the first relative speed and the second relative speed. And a distance measuring device.
【請求項2】 前記画像上の大きさ検出手段は、計測対
象物の大きさを画素単位で検出するものであることを特
徴とする請求項1記載の距離計測装置。
2. The distance measuring device according to claim 1, wherein the size detecting means on the image detects the size of the measuring object in pixel units.
【請求項3】 それぞれの光軸を互いに平行とし所定の
眼間距離をもって配置された2台のカメラと、所定時間
間隔毎に該2台のカメラが撮像した映像信号をディジタ
ルの第1および第2の画像として一時的に記憶する画像
メモリと、前記第1の画像を同一サイズの複数のブロッ
クに区切り、各ブロック内に撮像されている対象物まで
の距離を求め、当該距離のうち最小値の対象物が撮像さ
れているブロックの固まりを計測対象物が撮像されてい
る領域として、前記最小値を計測対象物までの距離とす
るとともに、画像上の計測対象物の大きさをブロック単
位で検出する計測対象物の大きさ・距離判断手段と、前
記所定時間間隔毎に連続して求めた複数回分の前記計測
対象物までの距離を記憶する距離記憶手段と、該距離記
憶手段に記憶された計測対象物までの距離の時間的変化
から計測対象物との第1の相対速度を求める第1の相対
速度算出手段と、前記画像上の計測対象物の大きさと該
計測対象物までの距離に基づいて当該計測対象物の実際
の大きさを算出する実際の大きさ算出手段と、前記所定
時間間隔毎に連続して求めた複数回分の画像上の計測対
象物の大きさを記憶する大きさ記憶手段と、前記計測対
象物の実際の大きさと大きさ記憶手段に記憶された画像
上の計測対象物の大きさの時間的変化とをもとに計測対
象物との第2の相対速度を求める第2の相対速度算出手
段と、前記第1の相対速度と第2の相対速度の比較に基
づいて前記2台のカメラの光軸のずれを判断する軸ずれ
判断手段とを有することを特徴とする距離計測装置。
3. Two cameras arranged with their respective optical axes parallel to each other and with a predetermined eye-to-eye distance, and digital first and first digital video signals captured by the two cameras at predetermined time intervals. The image memory for temporarily storing the second image and the first image are divided into a plurality of blocks of the same size, the distance to the object imaged in each block is calculated, and the minimum value of the distance is calculated. As a region in which the measurement target is imaged is a block of blocks where the target is imaged, the minimum value is set as the distance to the measurement target, and the size of the measurement target on the image is measured in block units The size / distance determining means of the measuring object to be detected, the distance storing means for storing the distance to the measuring object for a plurality of times continuously obtained at the predetermined time intervals, and the distance storing means. Was First relative velocity calculating means for obtaining a first relative velocity with respect to the measurement target from the temporal change of the distance to the measurement target, and the size of the measurement target on the image and the distance to the measurement target. An actual size calculating unit that calculates the actual size of the measurement target based on the size, and a size that stores the size of the measurement target on the images for a plurality of times continuously obtained at the predetermined time intervals. The second relative speed with respect to the measurement target is stored based on the storage unit and the actual size of the measurement target and the temporal change in the size of the measurement target on the image stored in the size storage unit. It has a second relative speed calculating means for obtaining and an axis deviation judging means for judging the deviation of the optical axes of the two cameras based on the comparison of the first relative speed and the second relative speed. Distance measuring device.
【請求項4】 前記計測対象物の大きさ・距離判断手段
は、前記複数の各ブロック内でエッジを検出するブロッ
ク毎エッジ検出部と、第1の画像における前記エッジを
含むブロックと最も類似したブロックの位置を第2の画
像内に探索するブロック毎マッチング位置検出部と、前
記互いに最も類似したブロックの位置と2台のカメラの
位置関係をもとに、ブロック毎に検出されたエッジまで
の距離を求めるブロック毎距離算出部と、全てのブロッ
クのうち距離が最小値のエッジを含みかつ隣接するブロ
ックの固まりを計測対象物の領域として、最小値を計測
対象物までの距離とするとともに、前記ブロックの固ま
りの大きさを画像上の計測対象物の大きさとする位置・
大きさ・距離判断部とからなることを特徴とする請求項
3記載の距離計測装置。
4. The size / distance determining means of the measurement object is most similar to a block-by-block edge detecting section for detecting an edge in each of the plurality of blocks, and a block including the edge in the first image. Based on the block-by-block matching position detection unit that searches for the block position in the second image, and the edge detected for each block based on the positional relationship between the most similar block position and the two cameras. A block-by-block distance calculation unit that obtains a distance, and a distance between all the blocks includes an edge having a minimum value and a block of adjacent blocks is a region of the measurement target, and the minimum value is a distance to the measurement target, and Position where the size of the block mass is the size of the measurement target on the image
The distance measuring device according to claim 3, comprising a size / distance determining unit.
【請求項5】 前記計測対象物の大きさ・距離判断手段
と大きさ記憶手段の間に、前記ブロックの固まりの所定
方向において互いに最離間している2つの列内からそれ
ぞれエッジを検出する両端エッジ検出手段が設けられ、
前記大きさ記憶手段には、両端エッジ検出手段で検出さ
れたエッジ間の距離が画像上の計測対象物の大きさとし
て記憶されることを特徴とする請求項3または4記載の
距離計測装置。
5. Both ends for detecting an edge from each of the two columns that are most distant from each other in the predetermined direction of the block mass between the size / distance determining means of the measurement object and the size storing means. Edge detection means is provided,
5. The distance measuring device according to claim 3, wherein the size storage means stores the distance between the edges detected by the both-end edge detection means as the size of the measurement object on the image.
JP08881197A 1997-03-24 1997-03-24 Distance measuring device Expired - Fee Related JP3384278B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP08881197A JP3384278B2 (en) 1997-03-24 1997-03-24 Distance measuring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP08881197A JP3384278B2 (en) 1997-03-24 1997-03-24 Distance measuring device

Publications (2)

Publication Number Publication Date
JPH10267618A JPH10267618A (en) 1998-10-09
JP3384278B2 true JP3384278B2 (en) 2003-03-10

Family

ID=13953289

Family Applications (1)

Application Number Title Priority Date Filing Date
JP08881197A Expired - Fee Related JP3384278B2 (en) 1997-03-24 1997-03-24 Distance measuring device

Country Status (1)

Country Link
JP (1) JP3384278B2 (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4100823B2 (en) * 1999-05-27 2008-06-11 本田技研工業株式会社 Object judgment device
JP2001116512A (en) * 1999-10-20 2001-04-27 Matsushita Electric Ind Co Ltd Method and instrument for measuring distance between vehicles
JP3671825B2 (en) 2000-09-22 2005-07-13 日産自動車株式会社 Inter-vehicle distance estimation device
JP4857839B2 (en) * 2006-03-22 2012-01-18 日産自動車株式会社 Object detection device
JP2008286863A (en) * 2007-05-15 2008-11-27 Pioneer Electronic Corp Photographing direction determination device and program
JP5234894B2 (en) * 2007-06-28 2013-07-10 富士重工業株式会社 Stereo image processing device
JP4856612B2 (en) * 2007-10-29 2012-01-18 富士重工業株式会社 Object detection device
JP5356728B2 (en) * 2008-05-26 2013-12-04 株式会社トプコン Edge extraction device, surveying instrument, and program
JP5293131B2 (en) * 2008-12-09 2013-09-18 株式会社リコー Compound eye distance measuring device for vehicle and compound eye distance measuring method
JP6201379B2 (en) * 2013-04-02 2017-09-27 富士通株式会社 Position calculation system, position calculation program, and position calculation method
JP6248533B2 (en) * 2013-10-22 2017-12-20 富士通株式会社 Image processing apparatus, image processing method, and image processing program
JP6932015B2 (en) * 2017-03-24 2021-09-08 日立Astemo株式会社 Stereo image processing device
JP6920159B2 (en) * 2017-09-29 2021-08-18 株式会社デンソー Vehicle peripheral monitoring device and peripheral monitoring method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0692976B2 (en) * 1985-03-22 1994-11-16 住友電気工業株式会社 Speed measurement method
JPH04236700A (en) * 1991-01-19 1992-08-25 Mazda Motor Corp Confirmation device for automobile
JPH05265547A (en) * 1992-03-23 1993-10-15 Fuji Heavy Ind Ltd On-vehicle outside monitoring device
JP3146809B2 (en) * 1993-10-22 2001-03-19 日産自動車株式会社 Vehicle environment recognition device
JP3452075B2 (en) * 1993-10-27 2003-09-29 富士重工業株式会社 Vehicle distance detection device
JP3287117B2 (en) * 1994-07-05 2002-05-27 株式会社日立製作所 Environment recognition device for vehicles using imaging device
JPH10222665A (en) * 1997-01-31 1998-08-21 Fujitsu Ten Ltd Picture recognizing device

Also Published As

Publication number Publication date
JPH10267618A (en) 1998-10-09

Similar Documents

Publication Publication Date Title
US7376247B2 (en) Target detection system using radar and image processing
JP3384278B2 (en) Distance measuring device
JP2000059764A (en) Vehicle position detecting device
JP2002197469A (en) Device for detecting traffic lane
JPH09142236A (en) Periphery monitoring method and device for vehicle, and trouble deciding method and device for periphery monitoring device
JPH10341458A (en) Method for correcting on-vehicle stereo camera and onvehicle stereo camera applied with the method
JP4407920B2 (en) Obstacle recognition method and obstacle recognition device
US10235579B2 (en) Vanishing point correction apparatus and method
US11468691B2 (en) Traveling lane recognition apparatus and traveling lane recognition method
EP3467775A1 (en) Estimating program, estimating method, and estimating system for camera parameter
JPH08156723A (en) Vehicle obstruction detecting device
JP2003077099A (en) Preceding vehicle recognition system
JPH07119606B2 (en) Tracking inter-vehicle distance detector
JPH07296291A (en) Traveling lane detector for vehicle
JPH07244717A (en) Travel environment recognition device for vehicle
JP7191671B2 (en) CALIBRATION DEVICE, CALIBRATION METHOD
JP3287166B2 (en) Distance measuring device
JP4106163B2 (en) Obstacle detection apparatus and method
JP2000259997A (en) Height of preceding vehicle and inter-vehicle distance measuring device
JP2635232B2 (en) Inter-vehicle distance detection device
JP3081788B2 (en) Local positioning device
JP3517999B2 (en) Vehicle recognition device
JPH09126759A (en) Range finding method by on-vehicle camera and range finder using the camera
JPH03238566A (en) Vanishing point detection device
JP3345287B2 (en) Travel zone detection device for vehicles

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20021126

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071227

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081227

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees