JP4946898B2 - Distance measuring device and distance measuring method - Google Patents

Distance measuring device and distance measuring method Download PDF

Info

Publication number
JP4946898B2
JP4946898B2 JP2008021214A JP2008021214A JP4946898B2 JP 4946898 B2 JP4946898 B2 JP 4946898B2 JP 2008021214 A JP2008021214 A JP 2008021214A JP 2008021214 A JP2008021214 A JP 2008021214A JP 4946898 B2 JP4946898 B2 JP 4946898B2
Authority
JP
Japan
Prior art keywords
search
object region
area
distance
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2008021214A
Other languages
Japanese (ja)
Other versions
JP2009180663A (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.)
Konica Minolta Inc
Original Assignee
Konica Minolta Inc
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 Konica Minolta Inc filed Critical Konica Minolta Inc
Priority to JP2008021214A priority Critical patent/JP4946898B2/en
Publication of JP2009180663A publication Critical patent/JP2009180663A/en
Application granted granted Critical
Publication of JP4946898B2 publication Critical patent/JP4946898B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)
  • Measurement Of Optical Distance (AREA)

Description

本発明は、複数の撮影手段を用いて撮影された画像を用いて物体までの距離を計測する技術に関するものである。   The present invention relates to a technique for measuring a distance to an object using images photographed using a plurality of photographing means.

近年、自動車の走行時における安全対策の1つとして、プリクラッシュセーフティとう技術が採用されている。この技術は、先行車両までの距離を測定して、自車両が先行車両に対して安全な車間距離を保っているか否かを判断し、安全な車間距離を保っていない場合は、ドライバーに先行車両が近づいている旨の警告を発して、事故防止を図っている。このプリクラッシュセーフティにおける課題の1つとして、自車両と先行車両との実際の距離の変化が小さいにも関わらず大きいと測定して、誤警告を多発してしまうことである。   In recent years, a pre-crash safety technique has been adopted as one of safety measures when a car is running. This technology measures the distance to the preceding vehicle to determine whether the host vehicle maintains a safe inter-vehicle distance with respect to the preceding vehicle. A warning that the vehicle is approaching is issued to prevent accidents. One of the problems in this pre-crash safety is that the actual distance between the host vehicle and the preceding vehicle is measured in spite of being small but is often large, and false alarms are frequently generated.

そのため、このプリクラッシュセーフティに適用される距離計測装置に望まれることは先行車両までの実際の距離に変化がないときには、測定した先行車両までの距離についてもできるだけ変化が生じないこと、すなわち、測定した先行車両までの距離のばらつきをできるだけ小さくすることである。   Therefore, what is desired for the distance measuring device applied to this pre-crash safety is that when there is no change in the actual distance to the preceding vehicle, the measured distance to the preceding vehicle will not change as much as possible. The variation of the distance to the preceding vehicle is made as small as possible.

ところで、先行車両までの距離を測定する手法として、ステレオカメラを利用した手法が知られている。この手法は、異なる視点から撮影した2枚の画像の各座標点を相互に対応付け、三角測量の原理によって距離を算出する手法である。   By the way, as a method for measuring the distance to the preceding vehicle, a method using a stereo camera is known. In this method, coordinate points of two images taken from different viewpoints are associated with each other, and a distance is calculated based on the principle of triangulation.

ここで、2枚の画像の各座標を相互に対応付ける手法として、近年、ロバスト、かつ、高精度な対応付けが可能な位相限定相関法が注目を集めている(非特許文献1)。この手法は画像の振幅成分を取り除いて位相成分のみで相関演算を行うため、輝度変動やノイズに影響されにくいという特徴を有している。しかしながら、この手法は演算負荷が高く、処理時間がかかるといった課題を有している。   Here, as a method for associating the coordinates of two images with each other, a phase-only correlation method capable of making a robust and highly accurate association has recently attracted attention (Non-Patent Document 1). This technique has a feature that it is not easily affected by luminance fluctuations and noise because the correlation calculation is performed using only the phase component by removing the amplitude component of the image. However, this method has a problem that the calculation load is high and processing time is required.

そこで、特許文献1には、車両輪郭を検出して、その車両輪郭に対してのみ対応点探索を行って視差を算出し、算出した視差をヒストグラム化して、度数が閾値を超える視差のうち最大の視差を車両の代表視差として、車両までの距離を算出する手法が開示されている。
K.Takita, T.Aoki, Y.Sasaki, T.Higuchi, and K.Kobayashi, "High-Accuracy Subpixel Image Registration Based on Phase-Only Correlation", IEICE Transactions. Fundamentals, E86-A, no8, pp.1925-1934, Aug.2003. 特開平7−334800号公報
Therefore, in Patent Document 1, a vehicle contour is detected, a corresponding point search is performed only on the vehicle contour to calculate a parallax, the calculated parallax is histogrammed, and the maximum parallax whose frequency exceeds a threshold value. A method for calculating the distance to the vehicle using the above parallax as the representative parallax of the vehicle is disclosed.
K.Takita, T.Aoki, Y.Sasaki, T.Higuchi, and K.Kobayashi, "High-Accuracy Subpixel Image Registration Based on Phase-Only Correlation", IEICE Transactions. Fundamentals, E86-A, no8, pp. 1925 -1934, Aug. 2003. JP 7-334800 A

しかしながら、特許文献1の手法では、車両の大小が全く考慮されておらず、車両が小さくなると視差の算出対象となる車両輪郭線上の画素数も減少するため、車両が大きい場合に比べて代表視差の精度が低下し、車両の大きさに応じて代表視差の精度にばらつきが生じ、車両までの距離を安定して算出することができなという問題を有している。   However, in the method of Patent Document 1, the size of the vehicle is not taken into account at all, and when the vehicle becomes smaller, the number of pixels on the vehicle contour that is the object of the parallax calculation also decreases. And the accuracy of the representative parallax varies depending on the size of the vehicle, and the distance to the vehicle cannot be calculated stably.

本発明の目的は、距離の測定対象となる対象物の大きさに関わらず、対象物までの距離を安定して算出することができる距離計測装置及び距離計測方法を提供することである。   An object of the present invention is to provide a distance measuring device and a distance measuring method capable of stably calculating a distance to an object regardless of the size of the object to be measured for distance.

本発明による距離計測装置は、複数の撮影手段を用いて撮影された画像を用いて測定対象となる対象物までの距離を計測する距離計測装置であって、前記撮影手段により同一タイミングで撮影された複数の入力画像のうち、いずれか1枚の入力画像を基準画像、他の入力画像を参照画像とし、前記基準画像から前記対象物が撮影された物体領域を抽出する抽出手段と、前記抽出手段により抽出された物体領域の面積を算出する面積算出手段と、前記抽出手段により抽出された物体領域内に注目点を順次設定し、各注目点の対応点を各参照画像から探索する探索手段と、前記注目点と前記対応点との複数の視差を基に、前記対象物までの距離を算出する距離算出手段とを備え、前記探索手段は、前記面積算出手段により算出された物体領域の面積に応じて、距離の計測精度を定めるためのパラメータである視差分解能が変更されるように探索処理を変更することを特徴とする。   A distance measuring device according to the present invention is a distance measuring device that measures a distance to an object to be measured using images photographed using a plurality of photographing means, and is photographed at the same timing by the photographing means. Extraction means for extracting one of the plurality of input images as a standard image and the other input image as a reference image, and extracting an object region in which the object is photographed from the standard image; Area calculating means for calculating the area of the object region extracted by the means, and search means for sequentially setting the attention points in the object region extracted by the extraction means and searching for corresponding points of each attention point from each reference image And a distance calculation unit that calculates a distance to the object based on a plurality of parallaxes between the attention point and the corresponding point, and the search unit calculates the object area calculated by the area calculation unit. surface Depending on the parallax resolution is a parameter for determining the measurement accuracy of the distance and changes the search process to be changed.

また、本発明による距離計測方法は、複数の撮影手段を用いて撮影された画像を用いて測定対象となる対象物までの距離を計測する距離計測装置であって、前記撮影手段により同一タイミングで撮影された複数の入力画像のうち、いずれか1枚の入力画像を基準画像、他の入力画像を参照画像とし、前記基準画像から前記対象物が撮影された物体領域を抽出する抽出ステップと、前記抽出ステップにより抽出された物体領域の面積を算出する面積算出ステップと、前記抽出ステップにより抽出された物体領域内に注目点を順次設定し、各注目点の対応点を各参照画像から探索する探索ステップと、前記注目点と前記対応点との複数の視差を基に、前記対象物までの距離を算出する距離算出ステップとを備え、前記探索ステップは、前記面積算出手段により算出された物体領域の面積に応じて、距離の計測精度を定めるためのパラメータである視差分解能が変更されるように探索処理を変更することを特徴とする。   The distance measuring method according to the present invention is a distance measuring device that measures a distance to an object to be measured using images photographed using a plurality of photographing means at the same timing by the photographing means. An extraction step of extracting any one of the plurality of input images taken as a standard image and another input image as a reference image and extracting an object region from which the target object was shot from the standard image; An area calculation step for calculating the area of the object region extracted by the extraction step, and attention points are sequentially set in the object region extracted by the extraction step, and a corresponding point of each attention point is searched from each reference image. A search step; and a distance calculation step for calculating a distance to the object based on a plurality of parallaxes between the attention point and the corresponding point, wherein the search step includes the surface integration Depending on the area of the calculated object region by means disparity resolution is a parameter for determining the measurement accuracy of the distance and changes the search process to be changed.

これらの構成によれば、前記撮影手段により同一タイミングで撮影された複数の入力画像のうち、いずれか1枚の入力画像が基準画像、他の入力画像が参照画像とされ、基準画像から対象物をとらえた物体領域が抽出され、抽出された物体領域内に注目点が順次設定され、各注目点の対応点が各参照画像から探索され、注目点と対応点との視差を基に、対象物までの距離が算出される。ここで、物体領域の面積に応じて対応点を探索する際の探索精度を定めるためのパラメータである視差分解能が変更されるように探索処理が変更される。したがって、物体領域の面積が小さくなるにつれて視差分解能を高くする探索処理を採用することで、物体領域の面積が小さくなることによる処理点数の減少に伴う計測精度の低下を補うことができ、物体領域の面積の大小による計測精度のばらつきを低減し、対象物までの距離を安定して算出することができる。   According to these configurations, out of a plurality of input images captured at the same timing by the imaging unit, any one input image is set as a reference image, and the other input images are set as reference images. An object region that captures the object is extracted, attention points are sequentially set in the extracted object region, corresponding points of each attention point are searched from each reference image, and based on the parallax between the attention point and the corresponding point, The distance to the object is calculated. Here, the search process is changed so that the parallax resolution, which is a parameter for determining the search accuracy when searching for the corresponding points, is changed according to the area of the object region. Therefore, by adopting a search process that increases the parallax resolution as the area of the object area decreases, it is possible to compensate for a decrease in measurement accuracy due to a decrease in the number of processing points due to a decrease in the area of the object area. The variation in measurement accuracy due to the size of the area of the object can be reduced, and the distance to the object can be calculated stably.

また、前記探索手段は、前記面積算出手段により算出された物体領域の面積が小さくなるにつれて、前記視差分解能が高くなるように探索処理を変更することが好ましい。   Further, it is preferable that the search unit changes the search process so that the parallax resolution increases as the area of the object region calculated by the area calculation unit decreases.

この構成によれば、物体領域の面積が小さくなるにつれて、視差分解能が高くなるように探索処理が変更されるため、物体領域の面積の大小による計測精度のばらつきを低減し、対象物までの距離を安定して算出することができる。   According to this configuration, as the area of the object region becomes smaller, the search process is changed so that the parallax resolution becomes higher. Therefore, variation in measurement accuracy due to the size of the area of the object region is reduced, and the distance to the target object is reduced. Can be calculated stably.

また、前記探索手段は、前記基準画像に前記注目点を中心として基準ウインドウを設定すると共に、前記参照画像に参照ウインドウを設定し、前記参照ウインドウを前記参照画像でずらしながら、両ウインドウ内の画像の類似度を算出する類似度算出処理を繰り返し実行することで対応点を探索するものであり、前記面積算出手段により算出された物体領域の面積が小さくにつれて、前記基準ウインドウ及び参照ウインドウのサイズを大きくすることが好ましい。   Further, the search means sets a reference window centered on the attention point in the reference image, sets a reference window in the reference image, and shifts the reference window with the reference image, and images in both windows The similarity calculation process for calculating the similarity is repeatedly performed to search for corresponding points. As the area of the object region calculated by the area calculation unit decreases, the sizes of the reference window and the reference window are reduced. It is preferable to enlarge it.

この構成によれば、物体領域の面積が小さくにつれて、基準ウインドウ及び参照ウインドウのサイズが大きくされるため、物体領域の面積が小さくなることに伴う処理点数の減少による計測精度の低下を補うことができ、対象物までの距離を安定して算出することができる。   According to this configuration, the size of the standard window and the reference window is increased as the area of the object region is reduced, so that it is possible to compensate for a decrease in measurement accuracy due to a decrease in the number of processing points due to a decrease in the area of the object region. And the distance to the object can be calculated stably.

また、前記探索手段は、前記面積算出手段により算出された物体領域の面積が所定の値より小さい場合、前記視差分解能を前記参照画像のピクセルレベルよりも分解能の高いサブピクセルレベルに設定し、前記物体領域の面積が所定の値より大きい場合、前記視差分解能を前記ピクセルレベルに設定することが好ましい。   Further, when the area of the object region calculated by the area calculation unit is smaller than a predetermined value, the search unit sets the parallax resolution to a sub-pixel level having a higher resolution than the pixel level of the reference image, When the area of the object region is larger than a predetermined value, the parallax resolution is preferably set to the pixel level.

この構成によれば、物体領域の面積が所定の値より小さい場合、視差分解能が前記参照画像のサブピクセルレベルに設定され、物体領域の面積が所定の値より大きい場合、視差分解能が参照画像のピクセルレベルに設定されるため、物体領域の面積が小さくなることに伴う処理点数の減少による計測精度の低下を補うことができ、対象物までの距離を安定して算出することができる。   According to this configuration, when the area of the object region is smaller than the predetermined value, the parallax resolution is set to the sub-pixel level of the reference image, and when the area of the object region is larger than the predetermined value, the parallax resolution is Since the pixel level is set, a decrease in measurement accuracy due to a decrease in the number of processing points accompanying a decrease in the area of the object region can be compensated, and a distance to the object can be stably calculated.

また、前記探索処理は、視差分解能の異なる複数種類の探索処理を含み、前記探索手段は、前記物体領域の面積が小さくなるにつれて視差分解能の高い探索処理を選択することが好ましい。   The search process preferably includes a plurality of types of search processes with different parallax resolutions, and the search means selects a search process with a high parallax resolution as the area of the object region decreases.

この構成によれば、物体領域の面積が小さくなるにつれて視差分解能の高い探索処理が選択されるため、物体領域の面積が小さくなることに伴う処理点数の減少による計測精度の低下を補うことができ、対象物までの距離を安定して算出することができる。   According to this configuration, a search process with high parallax resolution is selected as the area of the object region decreases, so that it is possible to compensate for a decrease in measurement accuracy due to a decrease in the number of processing points accompanying a decrease in the area of the object region. The distance to the object can be calculated stably.

また、前記探索処理は、前記基準画像に前記注目点を中心として基準ウインドウを設定すると共に、前記参照画像に参照ウインドウを設定し、前記参照ウインドウを前記参照画像でずらしながら、両ウインドウ内の画像の類似度を算出する類似度算出処理を繰り返し実行することで対応点を探索するものであり、前記基準ウインドウ及び前記参照ウインドウ内の画像を周波数分解して得られる位相成分に基づいて両ウインドウ内の画像の類似度を求める類似度算出処理を採用する第1の探索処理と、前記第1の探索処理よりも視差分解能の低い第2の探索処理とを含むことが好ましい。   In the search process, a reference window is set around the target point in the reference image, a reference window is set in the reference image, and the images in both windows are shifted while the reference window is shifted with the reference image. The corresponding point is searched by repeatedly executing the similarity calculation process for calculating the similarity between the two windows based on the phase components obtained by frequency decomposition of the images in the reference window and the reference window. It is preferable to include a first search process that employs a similarity calculation process for obtaining the similarity of the images and a second search process that has a lower parallax resolution than the first search process.

この構成によれば、基準ウインドウ及び参照ウインドウ内の画像を周波数分解して得られる位相成分に基づいて両ウインドウ内の画像の類似度を求めて対応点を探索する第1の探索処理と、第1の探索処理よりも視差分解能の低い第2の探索処理とが探索処理に含まれ、物体領域の面積が小さい場合は、視差分解能が高い第1の探索処理が選択され、物体領域の面積が大きい場合は、視差分解能の低い第2の探索処理が選択されるため、2種類の探索処理を切り替えるだけで、対象物までの距離を安定して算出することができる。   According to this configuration, the first search process for searching for corresponding points by obtaining the similarity between the images in both windows based on the phase components obtained by frequency decomposition of the images in the reference window and the reference window, If the search process includes a second search process having a lower parallax resolution than that of the first search process, and the area of the object region is small, the first search process having a higher parallax resolution is selected, and the area of the object region is If it is large, the second search process with a low parallax resolution is selected, so that the distance to the object can be calculated stably only by switching between the two types of search processes.

また、前記第1の探索処理における類似度算出処理は、高速フーリエ変換、離散フーリエ変換、離散コサイン変換、離散サイン変換、ウエーブレット変換、及びアダマール変換のいずれかを用いて周波数分解することが好ましい。   The similarity calculation process in the first search process is preferably frequency-resolved using any of fast Fourier transform, discrete Fourier transform, discrete cosine transform, discrete sine transform, wavelet transform, and Hadamard transform. .

この構成によれば、高速フーリエ変換、離散フーリエ変換、離散コサイン変換、離散サイン変換、ウエーブレット変換、及びアダマール変換のいずれかが用いられて周波数分解されるため、周波数分解を精度良く行うことができる。   According to this configuration, since frequency decomposition is performed using any of fast Fourier transform, discrete Fourier transform, discrete cosine transform, discrete sine transform, wavelet transform, and Hadamard transform, it is possible to perform frequency decomposition with high accuracy. it can.

また、前記第1の探索処理における類似度算出処理は、位相限定相関法であることが好ましい。   The similarity calculation process in the first search process is preferably a phase only correlation method.

この構成によれば、位相限定相関法を用いて類似度が算出されるため、ロバスト、かつ、高精度に対応点を探索することができる。   According to this configuration, since the degree of similarity is calculated using the phase-only correlation method, it is possible to search for corresponding points with robustness and high accuracy.

また、前記第2の探索処理における類似度算出処理は、SADであることが好ましい。   The similarity calculation process in the second search process is preferably SAD.

この構成によれば、類似度算出処理は、SAD(Sum of Absolute Difference)を用いて類似度が算出されているため、高速に対応点を探索することができる。   According to this configuration, in the similarity calculation process, since the similarity is calculated using SAD (Sum of Absolute Difference), it is possible to search for corresponding points at high speed.

また、前記探索手段は、前記物体領域に設定した各注目点の対応点の探索が終了した後、次フレームに対する処理を開始するまでの期間、前記物体領域以外の非物体領域内に注目点を順次設定し、各注目点の対応点を各参照画像から探索し、前記距離算出手段は、前記非物体領域に設定した注目点と当該注目点の対応点とから当該注目点の距離を算出することが好ましい。   In addition, the search means sets a target point in a non-object region other than the object region for a period from the end of the search for the corresponding point of each target point set in the object region to the start of processing for the next frame. The corresponding points of each attention point are sequentially set and searched from each reference image, and the distance calculation means calculates the distance of the attention point from the attention point set in the non-object region and the corresponding point of the attention point. It is preferable.

この構成によれば、各フレームでの演算時間の空き時間を利用して非物体領域の距離を算出することが可能となり、例えば、ガードレールや路肩等の周辺環境を把握する上で有用な情報を得ることができ、対象物以外の障害物であって、危険を及ぼすような障害物の接近をユーザに報知することが可能となる。   According to this configuration, it becomes possible to calculate the distance of the non-object region by using the free time of the calculation time in each frame, for example, information useful for grasping the surrounding environment such as a guardrail and a road shoulder. Thus, it is possible to notify the user of the approach of an obstacle other than the target object that is dangerous.

また、前記探索手段は、前記非物体領域の下側から上側に向けて順次注目点を設定することが好ましい。この構成によれば、自己に近接する障害物が存在する可能性の高い非物体領域の下側の注目点から優先して距離が算出されるため、危険度の高い障害物の接近をユーザにより確実に報知することが可能となる。   Moreover, it is preferable that the search means sequentially sets a point of interest from the lower side to the upper side of the non-object region. According to this configuration, since the distance is calculated with priority from the attention point below the non-object region where there is a high possibility that an obstacle close to the user is present, the approach of the obstacle with a high degree of danger is performed by the user. It becomes possible to notify reliably.

また、前記対象物は、自動車、自動二輪車、自転車、及び人のうち、すくなくともいずれか1つを含むことが好ましい。この構成によれば、自動車、自動二輪車、自転車、人の距離を算出することができる。特に、自動二輪車及び自転車に乗っている人の距離や、自動車及び自転車に乗っていない人の距離を算出することで両者を切り分けることができ、人の動向を把握することができる。   The object preferably includes at least one of an automobile, a motorcycle, a bicycle, and a person. According to this configuration, the distance between a car, a motorcycle, a bicycle, and a person can be calculated. In particular, by calculating the distance of a person riding a motorcycle and a bicycle and the distance of a person not riding a car and a bicycle, the distance between the two can be separated, and the movement of the person can be grasped.

本発明によれば、距離の測定対象となる対象物の大きさに関わらず、対象物までの距離を安定して算出することができる。   According to the present invention, it is possible to stably calculate the distance to the object regardless of the size of the object to be measured for distance.

(実施の形態1)
以下、本発明の実施の形態1による距離計測装置について図面を参照しつつ説明する。図1は、本発明の実施の形態1による距離計測装置1のブロック図を示している。距離計測装置1は、自動車等の車両の車体に搭載され、複数の撮影手段を用いて撮影された画像を用いて測定対象となる対象物までの距離を計測するものであり、複数台のカメラ、例えば本実施の形態では2台のカメラ11,12(撮影手段の一例)、演算処理装置13、及び表示装置14を備えている。
(Embodiment 1)
Hereinafter, a distance measuring apparatus according to Embodiment 1 of the present invention will be described with reference to the drawings. FIG. 1 shows a block diagram of a distance measuring apparatus 1 according to Embodiment 1 of the present invention. The distance measuring device 1 is mounted on the body of a vehicle such as an automobile, and measures the distance to an object to be measured using images photographed using a plurality of photographing means. For example, in the present embodiment, two cameras 11 and 12 (an example of a photographing unit), an arithmetic processing device 13 and a display device 14 are provided.

カメラ11,12は、車体の進行方向に直交し、かつ水平方向に平行な方向である左右方向に所定の間隔を設けて、進行方向を中心に対称となるように同一高さ位置に配設され、所定のフレームレートで自車体の前方を撮影する。ここで、カメラ11,12は、同一時刻においてフレームが撮影されるように撮影タイミングの同期が図られており、距離の測定対象となる対象物であり、自車体の前方を走行する前方車体を撮影する。ここで、前方車体としては、自動車、自動二輪車、及び自転車が含まれる。   The cameras 11 and 12 are arranged at the same height so as to be symmetrical with respect to the traveling direction with a predetermined interval in the left and right direction that is orthogonal to the traveling direction of the vehicle body and parallel to the horizontal direction. Then, the front of the vehicle body is photographed at a predetermined frame rate. Here, the cameras 11 and 12 are synchronized in photographing timing so that frames are photographed at the same time, and are objects to be measured for distance. Take a picture. Here, the front vehicle body includes an automobile, a motorcycle, and a bicycle.

演算処理装置13は、カメラ11,12で撮影された2枚の画像に後述する画像処理を施し、前方車体までの距離を算出する。表示装置14は、液晶表示ディスプレイ、有機ELディスプレイといった表示装置から構成され、演算処理装置13により算出された前方車体までの距離等の情報を表示する。ここで、表示装置14は、自車体がカーナビゲーションシステムを備えている場合は、当該カーナビゲーションシステムの表示装置により構成してもよいし、カーナビゲーションシステムとは別の表示装置により構成してもよい。   The arithmetic processing device 13 performs image processing, which will be described later, on the two images taken by the cameras 11 and 12, and calculates the distance to the front vehicle body. The display device 14 includes a display device such as a liquid crystal display or an organic EL display, and displays information such as the distance to the front vehicle body calculated by the arithmetic processing device 13. Here, when the vehicle body is provided with a car navigation system, the display device 14 may be configured by a display device of the car navigation system or may be configured by a display device different from the car navigation system. Good.

図2は、距離計測装置1の詳細な構成を示すブロック図である。図2に示すように距離計測装置1は、基準カメラ110、参照カメラ120、抽出部20(抽出手段の一例)、面積算出部30(面積算出手段の一例)、処理変更部40(探索手段の一例)、対応点探索部50(探索手段の一例)、距離算出部60(距離算出手段の一例)、及び表示部70を備えている。   FIG. 2 is a block diagram showing a detailed configuration of the distance measuring apparatus 1. As shown in FIG. 2, the distance measuring apparatus 1 includes a reference camera 110, a reference camera 120, an extraction unit 20 (an example of an extraction unit), an area calculation unit 30 (an example of an area calculation unit), and a processing change unit 40 (of a search unit). An example), a corresponding point search unit 50 (an example of a search unit), a distance calculation unit 60 (an example of a distance calculation unit), and a display unit 70.

基準カメラ110は、図1に示すカメラ11及びカメラ12のいずれか一方のカメラである例えばカメラ11から構成され、自車体の前方を例えば1秒あたり30枚といった所定のフレームレートで撮影することで前方車体を含む入力画像を取得する。参照カメラ120は、図1に示すカメラ11及びカメラ12のいずれか一方のカメラである例えばカメラ12から構成され、基準カメラ110と同一、かつ同期したフレームレートで自車体の前方を撮影し、前方車体を含む入力画像を取得する。ここで、入力画像としては、例えば0(黒)〜255(白)の256階調値を有する複数の画素がマトリックス状に配列されたたデジタルの画像データを採用することができる。   The reference camera 110 is composed of, for example, the camera 11 which is one of the camera 11 and the camera 12 shown in FIG. 1, and images the front of the vehicle body at a predetermined frame rate of, for example, 30 frames per second. An input image including the front vehicle body is acquired. The reference camera 120 includes, for example, the camera 12 which is one of the camera 11 and the camera 12 illustrated in FIG. 1, and photographs the front of the vehicle body at the same frame rate as that of the reference camera 110 and is synchronized with the reference camera 110. An input image including the vehicle body is acquired. Here, as the input image, for example, digital image data in which a plurality of pixels having 256 gradation values from 0 (black) to 255 (white) are arranged in a matrix can be employed.

抽出部20は、基準カメラ110から所定のフレームレートで順次入力される入力画像を基準画像、参照カメラ120から所定のフレームレートで順次入力される入力画像を参照画像とし、各基準画像から前方車体が撮影されている領域である物体領域を抽出する。ここで、抽出部20は、例えば、特開平7−334800に記載された画像中のエッジ分布及び左右対称性を利用して前方車体を抽出する手法を採用してもよいし、SVM(Support Vector Machine)、adaBoost等を用いて車体、非車体データを学習し、パターン認識を用いて前方車体を抽出する手法を採用してもよいし、前方車体の背面画像をテンプレートとして、テンプレートマッチングにより前方車体を抽出する手法を採用してもよい。また、抽出部20は、前方車体を示す領域を複数抽出した場合は、これらの領域のうち、自車体に近いことが予測される前方車体を示す1又は複数の領域を物体領域として抽出してもよい。なお、自車体に近いことが予測される前方車体を示す領域としては例えば面積が一定の大きさ以上の領域を採用すればよい。   The extraction unit 20 uses an input image sequentially input from the reference camera 110 at a predetermined frame rate as a reference image, and an input image sequentially input from the reference camera 120 at a predetermined frame rate as a reference image. An object region that is a region where is photographed is extracted. Here, for example, the extraction unit 20 may adopt a method of extracting a front vehicle body using an edge distribution and left-right symmetry in an image described in JP-A-7-334800, or an SVM (Support Vector). Machine), adaBoost, etc. may be used to learn vehicle body / non-vehicle body data, and a method of extracting the front vehicle body using pattern recognition may be employed. A technique for extracting In addition, when the extraction unit 20 extracts a plurality of regions indicating the front vehicle body, the extraction unit 20 extracts one or a plurality of regions indicating the front vehicle body that is predicted to be close to the own vehicle body as an object region. Also good. Note that, for example, a region having an area of a certain size or more may be employed as the region indicating the front vehicle body that is predicted to be close to the vehicle body.

面積算出部30は、抽出部20により抽出された物体領域の面積を算出する。ここで、面積算出部30は、例えば、物体領域の画素数をカウントし、カウントした画素数を物体領域の面積として採用してもよいし、1画素あたりの面積にカウントした画素数を乗じた値を物体領域の面積として採用してもよい。   The area calculation unit 30 calculates the area of the object region extracted by the extraction unit 20. Here, for example, the area calculation unit 30 may count the number of pixels in the object region, and may employ the counted number of pixels as the area of the object region, or multiply the area per pixel by the counted number of pixels. The value may be adopted as the area of the object region.

処理変更部40は、面積算出部30により算出された物体領域の面積に応じて距離の計測精度を定めるためのパラメータである視差分解能が変更されるように探索処理を変更する。具体的には、処理変更部40は、物体領域の面積が小さくなるにつれて、視差分解能が高くなるように探索処理を変更する。距離の計測精度(α)は、下記の式(A)によって定められる。   The process changing unit 40 changes the search process so that the parallax resolution, which is a parameter for determining the distance measurement accuracy, is changed according to the area of the object region calculated by the area calculating unit 30. Specifically, the process changing unit 40 changes the search process so that the parallax resolution increases as the area of the object region decreases. The distance measurement accuracy (α) is determined by the following equation (A).

α=β/γ (A)
但し、βは処理点数を示し、γは視差分解能を示す。ここで、処理点数は、物体領域内に設定される距離の計測対象となる注目点の個数を示す。また、視差分解能は、カメラ11,12により撮影された入力画像の分解能に相当する値を有し、視差分解能が高くなるにつれて値が減少し、視差分解能が低くなるにつれて値が増大する。
α = β / γ 2 (A)
Here, β indicates the number of processing points, and γ indicates the parallax resolution. Here, the number of processing points indicates the number of points of interest that are to be measured for the distance set in the object region. Further, the parallax resolution has a value corresponding to the resolution of the input images taken by the cameras 11 and 12, and the value decreases as the parallax resolution increases and increases as the parallax resolution decreases.

物体領域の面積が小さいと、物体領域の画素数が少なくなるため、多くの注目点を設定することができなくなり、物体領域が表す前方車体までの距離の計測精度が低くなる。一方、物体領域の面積が大きいと、物体領域の画素数が多くなるため、多くの注目点を設定することが可能となり、物体領域が表す前方車体までの距離の計測精度が高くなる。そのため、面積が小さくなるにつれて処理点数(β)が小さくなり距離の計測精度が低くなってしまう。   If the area of the object region is small, the number of pixels in the object region is small, so that many attention points cannot be set, and the measurement accuracy of the distance to the front vehicle body represented by the object region is low. On the other hand, if the area of the object region is large, the number of pixels in the object region increases, so that many points of interest can be set, and the measurement accuracy of the distance to the front vehicle body represented by the object region increases. Therefore, as the area decreases, the number of processing points (β) decreases and the distance measurement accuracy decreases.

そこで、距離計測装置1では、物体領域の面積が小さくなることによる処理点数(β)の減少を補うために、後述する類似度算出処理で使用するウインドウ(基準ウインドウ及び参照ウインドウ)のウインドウサイズを大きくして視差分解能(γ)の値を小さくし、距離の計測精度を高めている。なお、注目点は対応点探索部50により物体領域内に順次設定される点であって、距離の計測対象となる点である。   Therefore, in the distance measuring apparatus 1, in order to compensate for the decrease in the number of processing points (β) due to the reduction in the area of the object region, the window size of the windows (reference window and reference window) used in the similarity calculation process described later is set. The value is increased to reduce the parallax resolution (γ), thereby increasing the distance measurement accuracy. Note that the point of interest is a point that is sequentially set in the object region by the corresponding point search unit 50 and is a point to be measured for distance.

図3は、抽出部20により物体領域が抽出された2枚の画像を示し、(a)は物体領域D1の面積が大きい場合を示し、(b)は物体領域D1の面積が小さい場合を示している。図4は、ウインドウWが設定された画像を示し、図4(a)は図3(a)に対してウインドウWを設定した場合の画像を示し、図4(b)は図3(b)に対してウインドウWを設定した場合の画像を示している。なお、図3及び図4においては、説明の便宜上、物体領域を四角形で示しているが実際には、より複雑な形状を有している。   FIG. 3 shows two images from which the object region has been extracted by the extraction unit 20, (a) shows a case where the area of the object region D1 is large, and (b) shows a case where the area of the object region D1 is small. ing. 4 shows an image in which the window W is set, FIG. 4 (a) shows an image when the window W is set with respect to FIG. 3 (a), and FIG. 4 (b) shows FIG. 3 (b). An image when the window W is set for is shown. In FIG. 3 and FIG. 4, for convenience of explanation, the object region is shown as a rectangle, but actually has a more complicated shape.

図3(b)に示す物体領域D1は図3(a)に示す物体領域D1に比べて面積が小さく、多くの注目点を設定することができないため、処理点数が少なくなり、図3(a)の場合に比べて計測精度が低下する。したがって、視差分解能を一定にすると、図3(a)、(b)において距離の計測精度に差が生じ、計測精度が安定しない。   The object area D1 shown in FIG. 3B has a smaller area than the object area D1 shown in FIG. 3A, and a large number of attention points cannot be set. Measurement accuracy is lower than in the case of). Therefore, if the parallax resolution is fixed, a difference occurs in the distance measurement accuracy in FIGS. 3A and 3B, and the measurement accuracy is not stable.

そこで、処理変更部40は、図4(a)に示すように、物体領域D1の面積が大きい場合は、ウインドウサイズを小さくし、図4(b)に示すように、物体領域D1の面積が小さい場合は、ウインドウサイズを大きくすることで、処理点数の減少による計測精度の低下が補われるように視差分解能を高めて視差分解能の値を小さくし、計測精度の安定化を図っている。   Therefore, the process changing unit 40 reduces the window size when the area of the object region D1 is large as shown in FIG. 4A, and the area of the object region D1 is reduced as shown in FIG. In the case of being small, by increasing the window size, the parallax resolution is increased and the parallax resolution value is decreased to compensate for the decrease in the measurement accuracy due to the decrease in the number of processing points, thereby stabilizing the measurement accuracy.

ここで、類似度算出処理は、後述するように基準画像及び参照画像の両方にウインドウWを設定し、両ウインドウW内の画像の相関を求めることで類似度を算出する処理である。そのため、ウインドウWのサイズが大きくなると、より多くの情報を用いて類似度を算出することが可能となり、類似度の算出精度が増す結果、対応点の探索精度も増し、入力画像の分解能を高くした場合と同様、計測精度を高めることができる。したがって、ウインドウサイズWを大きくすると、視差分解能が高くなって視差分解能の値が小さくなり、式(A)のαが増大し、計測精度が高まるのである。   Here, the similarity calculation process is a process of calculating the similarity by setting a window W for both the standard image and the reference image and obtaining the correlation between the images in both windows W, as will be described later. Therefore, as the size of the window W increases, it becomes possible to calculate the degree of similarity using more information, and as a result of increasing the degree of similarity calculation, the corresponding point search accuracy is increased and the resolution of the input image is increased. As with the case, the measurement accuracy can be increased. Therefore, when the window size W is increased, the parallax resolution is increased and the value of the parallax resolution is decreased, α in Expression (A) is increased, and the measurement accuracy is increased.

ここで、図4(a)に示す大きな物体領域D1の処理点数(β)を100、図4(b)に示す小さな物体領域D1の処理点数(β)を25、図4(a)に示す小ウインドウの視差分解能(γ)を0.3、図4(b)に示す大ウインドウの視差分解能(γ)を0.15と見積もり、計測精度(α)の閾値を1000として、以下の3つのケースを考察する。   Here, the processing point (β) of the large object region D1 shown in FIG. 4A is 100, the processing point (β) of the small object region D1 shown in FIG. 4B is 25, and FIG. Assume that the parallax resolution (γ) of the small window is 0.3, the parallax resolution (γ) of the large window shown in FIG. 4B is 0.15, and the threshold value of the measurement accuracy (α) is 1000. Consider the case.

ケース1:図4(a)に示す大きな物体領域D1に、小ウインドウを適用する。このときα=100/(0.3×0.3)=3333.3が得られ、αが閾値(1000)よりも大きくなり、閾値以上の計測精度を得ることができる。   Case 1: A small window is applied to the large object region D1 shown in FIG. At this time, α = 100 / (0.3 × 0.3) = 3333.3 is obtained, α is larger than the threshold value (1000), and measurement accuracy equal to or higher than the threshold value can be obtained.

ケース2:図4(b)に示す小さな物体領域D1に小ウインドウを適用する。このとき、α=25/(0.3×0.3)=277.7が得られ、αが閾値(1000)よりも小さくなり、閾値以上の計測精度を得ることができない。   Case 2: A small window is applied to the small object region D1 shown in FIG. At this time, α = 25 / (0.3 × 0.3) = 277.7 is obtained, α is smaller than the threshold value (1000), and measurement accuracy equal to or higher than the threshold value cannot be obtained.

ケース3:図4(b)に示す小さな物体領域D1に大ウインドウを適用する。このとき、α=25/(0.15×0.15)=1111.1が得られ、αが閾値(1000)よりも大きくなり、閾値以上の計測精度を得ることができる。   Case 3: A large window is applied to the small object region D1 shown in FIG. At this time, α = 25 / (0.15 × 0.15) = 1111.1 is obtained, α is larger than the threshold (1000), and measurement accuracy equal to or higher than the threshold can be obtained.

上記3つのケースから分かるように、物体領域D1が小さい場合、大ウインドウを適用することで、物体領域D1が大きい場合と同様に、計測精度を閾値以上にすることができ、物体領域D1の大小によらず、計測精度を安定させることができる。   As can be seen from the above three cases, when the object region D1 is small, by applying a large window, as in the case where the object region D1 is large, the measurement accuracy can be made equal to or greater than the threshold, and the size of the object region D1 Regardless, the measurement accuracy can be stabilized.

図2に戻り、対応点探索部50は、抽出部20により抽出された物体領域内に注目点を順次設定し、処理変更部40により採用された探索処理を用いて、各注目点の対応点を、注目点を設定した基準画像と同一時刻に取得された参照画像から探索する。   Returning to FIG. 2, the corresponding point search unit 50 sequentially sets the attention points in the object region extracted by the extraction unit 20, and uses the search processing adopted by the processing change unit 40 to correspond to each corresponding point. Are searched from the reference image acquired at the same time as the base image in which the attention point is set.

具体的には、対応点探索部50は、下位の階層から上位の階層に向かうにつれて解像度が高くなるように、解像度の異なる複数の基準画像及び参照画像を階層的に生成し、下位の階層での対応点の探索結果に基づいて、当該階層の探索範囲よりも小さな探索範囲を1つ上の階層の参照画像に設定し、当該探索範囲内で対応点を探索する探索処理を上位の階層に向けて階層的に実行することで対応点を探索する。   Specifically, the corresponding point search unit 50 hierarchically generates a plurality of standard images and reference images having different resolutions so that the resolution becomes higher from the lower hierarchy toward the upper hierarchy. Based on the corresponding point search result, a search range smaller than the search range of the hierarchy is set as a reference image one level higher, and search processing for searching for a corresponding point within the search range is performed in the upper hierarchy. The corresponding points are searched by executing in a hierarchical manner.

ここで、探索処理としては、基準画像に注目点を中心として基準ウインドウを設定し、参照画像に基準ウインドウと同一サイズの参照ウインドウを設定し、参照画像に設定された探索範囲内において参照ウインドウをずらしながら、基準ウインドウ内の画像と参照ウインドウ内の画像との類似度を求める類似度算出処理を繰り返し実行することで対応点を探索する処理を採用することができる。   Here, as the search process, a reference window is set around the target point in the reference image, a reference window having the same size as the reference window is set as the reference image, and the reference window is set within the search range set in the reference image. While shifting, it is possible to employ a process of searching for corresponding points by repeatedly executing a similarity calculation process for obtaining a similarity between the image in the reference window and the image in the reference window.

類似度算出処理としては、基準ウインドウ内の画像と参照ウインドウ内の画像とを周波数分解することで得られる位相成分に基づいて類似度を算出する処理を採用してもよいし、周波数分解することなく類似度を算出する処理を採用してもよい。   As the similarity calculation process, a process of calculating similarity based on a phase component obtained by frequency-decomposing the image in the standard window and the image in the reference window may be adopted, or frequency decomposition may be performed. Alternatively, a process for calculating the similarity may be employed.

ここで、周波数分解としては、高速フーリエ変換、離散フーリエ変換、離散コサイン変換、離散サイン変換、ウエーブレット変換、及びアダマール変換といった手法を採用することができ、処理の高速化の観点からは高速フーリエ変換を採用することが好ましい。   Here, as frequency decomposition, methods such as fast Fourier transform, discrete Fourier transform, discrete cosine transform, discrete sine transform, wavelet transform, and Hadamard transform can be adopted. From the viewpoint of speeding up the processing, fast Fourier transform It is preferable to employ conversion.

位相成分に基づいて類似度を算出する処理としては、位相限定相関法(POC:Phase Only Correlation)やDCT符号限定相関法を採用することができるが、POCの方がよりロバストであるため、本実施の形態ではPOCを採用する。また、位相成分を用いることなく類似度を算出する手法としては、SAD(Sum of Absolute Difference)、SSD(濃度差の二乗和)、又はNCC(正規化相互相関)等を採用することができるが、処理の高速化、高精度化の観点から本実施の形態ではSADを採用する。   As processing for calculating the similarity based on the phase component, a phase only correlation (POC) method or a DCT code only correlation method can be adopted. However, since the POC is more robust, this In the embodiment, POC is adopted. Further, as a method for calculating the similarity without using the phase component, SAD (Sum of Absolute Difference), SSD (Sum of the squares of the density difference), NCC (Normalized Cross Correlation), or the like can be adopted. In the present embodiment, SAD is employed from the viewpoint of speeding up processing and increasing accuracy.

DCT符号限定法としては、例えば、”画像信号処理と画像パターン認識の融合−DCT符号限定相関とその応用、貴家仁志、首都大学東京、システムデザイン学部、動的画像処理実利用化ワークショップ2007’2007.7.3.8−9”に記載された手法を採用することができる。   Examples of the DCT code limiting method include, for example, “Fusion of image signal processing and image pattern recognition—DCT code limited correlation and its application, Hitoshi Kiya, Tokyo Metropolitan University, Faculty of System Design, Dynamic Image Processing Realization Workshop 2007 ′. The method described in 2007.7.7.3.8-9 ″ can be adopted.

POCは、SADに比べてカメラ11,12の撮影条件の差や、ノイズなどの影響が受けにくく、ロバストであるが、周波数分解を行っているため処理コストがかかってしまう。そのため、ロバスト性を重視する場合はPOCを採用することが好ましく、処理の高速化を図る場合はSADを採用することが好ましい。   The POC is less susceptible to differences in imaging conditions of the cameras 11 and 12 and noise than the SAD and is robust. However, the POC is costly because of the frequency decomposition. Therefore, it is preferable to adopt POC when importance is attached to robustness, and it is preferable to adopt SAD when speeding up the processing.

また、抽出部20が複数の物体領域を抽出した場合は、重要度の高い前方車体を示す物体領域についてはPOCを採用し、重要度の低い前方車体を示す物体領域についてはSADを採用してもよい。なお、重要度の高い前方車体としては、危険を回避するうえで重要となる前方車体を採用すればよく、例えば、物体領域の面積が大きな前方車体ほど重要度が高くなるようにしてもよい。   Further, when the extraction unit 20 extracts a plurality of object regions, POC is adopted for the object region indicating the front vehicle body with high importance, and SAD is adopted for the object region indicating the front vehicle body with low importance. Also good. Note that the front vehicle body that is important in avoiding danger may be adopted as the front vehicle body having higher importance. For example, the front vehicle body having a larger object area may have higher importance.

次に、POCの詳細について説明する。図5は、POCの処理の流れを示したフローチャートである。なお、図5において、周波数分解として、フーリエ変換を採用した場合を例示している。まず、ステップS1,S2において、基準ウインドウ内の画像にフーリエ変換が施され、参照ウインドウ内の画像にフーリエ変換が施される。ここで、基準ウインドウ内の画像が式(1)で表され、参照ウインドウ内の画像が式(2)で表されるとすると、基準ウインドウ内の画像は、式(3)によりフーリエ変換され、参照ウインドウ内の画像は、式(4)によりフーリエ変換される。   Next, details of the POC will be described. FIG. 5 is a flowchart showing the flow of POC processing. In addition, in FIG. 5, the case where a Fourier transform is employ | adopted as frequency decomposition is illustrated. First, in steps S1 and S2, Fourier transformation is performed on the image in the standard window, and Fourier transformation is performed on the image in the reference window. Here, assuming that the image in the standard window is represented by equation (1) and the image in the reference window is represented by equation (2), the image in the standard window is Fourier transformed by equation (3), The image in the reference window is Fourier-transformed by equation (4).

但し、n1,n2は、垂直、水平方向の座標を示し、N1,N2は、基準ウインドウ及び参照ウインドウの垂直、水平方向のサイズを示し、M1は基準ウインドウ及び参照ウインドウの中心点から、垂直方向における端までの距離を示し、M2は基準ウインドウ及び参照ウインドウの中心点から、水平方向における端までの距離を示す。   Here, n1 and n2 indicate vertical and horizontal coordinates, N1 and N2 indicate vertical and horizontal sizes of the reference window and reference window, and M1 indicates the vertical direction from the center point of the reference window and reference window. The distance from the center point of the reference window and the reference window to the edge in the horizontal direction is indicated by M2.

次に、ステップS3,S4において、ステップS1,S2でフーリエ変換された両画像が式(5)を用いて規格化される。次に、ステップS5において、ステップS3,S4で規格化された両画像が合成される。ここで、規格化された両画像は、式(6)に示すように、F´(k1,k2)と、G´(k1,k2)の複素共役とが乗じられることで合成される。次に、ステップS6において、ステップS5で合成された画像が式(7)を用いて逆フーリエ変換され、POC値(r(k1,k2))が算出される。   Next, in steps S3 and S4, both images Fourier-transformed in steps S1 and S2 are normalized using equation (5). Next, in step S5, both images normalized in steps S3 and S4 are synthesized. Here, both normalized images are synthesized by multiplying F ′ (k1, k2) and the complex conjugate of G ′ (k1, k2) as shown in Expression (6). Next, in step S6, the image synthesized in step S5 is subjected to inverse Fourier transform using equation (7) to calculate a POC value (r (k1, k2)).

図6は、POC値を示したグラフである。このグラフにおいて、x軸及びy軸は、基準ウインドウ及び参照ウインドウ内の各座標を表し、z軸はPOC値を示している。図6に示すようにPOC値は、急峻な相関ピークを有し、画像マッチングにおけるロバスト性と推定精度とが高いことが知られている。そして、この相関ピークの高さは基準ウインドウ及び参照ウインドウの相関が高いほど大きくなる。したがって、基準ウインドウ及び参照ウインドウの類似度として、例えば相関ピークの高さを採用することで、両ウインドウ内の画像がどれだけ近似しているかを示すことが可能となる。また、相関ピークの位置が基準ウインドウと参照ウインドウとのズレ量を示すことになる。   FIG. 6 is a graph showing the POC value. In this graph, the x-axis and the y-axis represent coordinates in the standard window and the reference window, and the z-axis represents the POC value. As shown in FIG. 6, the POC value has a steep correlation peak, and is known to have high robustness and estimation accuracy in image matching. The height of the correlation peak increases as the correlation between the standard window and the reference window increases. Therefore, by using, for example, the height of the correlation peak as the similarity between the standard window and the reference window, it is possible to indicate how close the images in both windows are. In addition, the position of the correlation peak indicates the amount of deviation between the standard window and the reference window.

そして、参照ウインドウをずらしながら対応点が探索されることになる。この場合、相関ピークの位置は、両ウインドウ間のズレ量を示しているため、参照ウインドウを1画素ずつずらす必要はなく、例えば、ウインドウサイズの半分の大きさをずらし量として設定すればよい。   Then, corresponding points are searched for while shifting the reference window. In this case, since the position of the correlation peak indicates the amount of deviation between the two windows, it is not necessary to shift the reference window one pixel at a time. For example, half the window size may be set as the amount of shift.

そして、最終的に対応点の位置は参照ウインドウの位置と、POC値の相関ピークの位置とから求められる。参照ウインドウの位置はピクセルレベルの値になるが、相関ピークの位置はウインドウ間のズレ量を示し、必ずしもピクセルレベルの位置に存在するとは限らない。そこで、相関ピークの位置をサブピクセルレベルで補間推定することによりサブピクセルレベルでズレ量を求めることが可能となる。ここで、相関ピークの位置の補間推定方法としては、放物線などの関数を、フィッティングする手法を採用することができる。そして、参照ウインドウの位置にサブピクセルレベルで補間推定された相関ピークの位置を足し合わせることによりサブピクセルレベルで対応点を求めることが可能となる。   Finally, the position of the corresponding point is obtained from the position of the reference window and the position of the correlation peak of the POC value. Although the position of the reference window is a pixel level value, the position of the correlation peak indicates the amount of deviation between the windows and does not necessarily exist at the pixel level position. Therefore, the amount of deviation can be obtained at the sub-pixel level by interpolating and estimating the position of the correlation peak at the sub-pixel level. Here, as the interpolation estimation method of the position of the correlation peak, a method of fitting a function such as a parabola can be employed. Then, by adding the position of the correlation peak interpolated and estimated at the subpixel level to the position of the reference window, the corresponding point can be obtained at the subpixel level.

次に、SADの詳細について説明する。図7はSADを説明する模式図である。図7に示すように、基準画像に設定された物体領域D1内に注目点CPが設定され、注目点CPを中心として基準ウインドウW1が設定される。ここで、注目点CPは、物体領域D1内をラスタ走査するようにして順次設定される。次に、参照画像に設定された探索範囲内の所定の画素が参照ウインドウW2の中心点O1として設定され、この中心点O1を中心として参照ウインドウW2が設定される。ここで、中心点O1は、注目点CPと垂直方向の高さが同一であり、かつ、水平方向と平行な参照画像の直線上に設定される。次に、基準ウインドウW1内の画像Img1と参照ウインドウW2内の画像Img2との相関値CORが式(8)、(9)を用いて算出される。 Next, details of SAD will be described. FIG. 7 is a schematic diagram for explaining SAD. As shown in FIG. 7, the attention point CP is set in the object region D1 set in the reference image, and the reference window W1 is set around the attention point CP. Here, the attention point CP is sequentially set so as to perform raster scanning in the object region D1. Next, a predetermined pixel within the search range set in the reference image is set as the center point O1 of the reference window W2, and the reference window W2 is set around the center point O1. Here, the center point O1 has the same height in the vertical direction as the point of interest CP, and is set on a straight line of the reference image parallel to the horizontal direction. Next, a correlation value COR p between the image Img1 in the standard window W1 and the image Img2 in the reference window W2 is calculated using equations (8) and (9).

但し、Wは基準ウインドウW1、参照ウインドウW2のウインドウサイズを示し、iは垂直方向の座標を示し、jは水平方向の座標を示し、pは0≦p≦max_dispを満たす変数であり、max_dispは最終探索点を示す。   Where W is the window size of the standard window W1 and the reference window W2, i is the vertical coordinate, j is the horizontal coordinate, p is a variable that satisfies 0 ≦ p ≦ max_disp, and max_disp is Indicates the final search point.

そして、相関値CORが求まると、pが1増加されて参照ウインドウW2が水平方向にずらされ、次の相関値CORが求められる。なお、SADにおいては、参照ウインドウW2は、pがコントロールされてずらされているため、垂直方向の位置が注目点と同一であって、水平方向と平行な直線上に中心点O1が位置するようにずらされる。 When the correlation value COR p is obtained, p is increased by 1, the reference window W2 is shifted in the horizontal direction, and the next correlation value COR p is obtained. In SAD, since the reference window W2 is shifted by controlling p, the vertical position is the same as the point of interest, and the center point O1 is positioned on a straight line parallel to the horizontal direction. To be displaced.

そして、相関値CORを参照ウインドウW2内の画像の中心点O1の類似度として採用し、参照画像において類似度が最も高くなる位置を探索し、探索した位置を基準画像に設定された注目点CPの対応点として特定する。図7のグラフに示すように、相関値CORは、画像Img1と画像Img2との相関が高く、類似しているほど高くなる。 Then, the correlation value COR p is adopted as the similarity of the center point O1 of the image in the reference window W2, the position where the similarity is the highest in the reference image is searched, and the point of interest set in the reference image as the searched position It is specified as a corresponding point of CP. As shown in the graph of FIG. 7, the correlation value COR p has a higher correlation between the image Img1 and the image Img2, and the higher the similarity, the higher the correlation value COR p .

ここで、参照ウインドウは、画素単位で離散的にずらされるため、類似度はピクセルレベルの分解能で算出されることになるが、POCと同様にして、サブピクセルレベルで類似度を算出してもよい。   Here, since the reference window is discretely shifted in units of pixels, the similarity is calculated with pixel level resolution. However, similar to POC, the similarity may be calculated at the sub-pixel level. Good.

図2に戻り、距離算出部60は、注目点と対応点とを基に、ステレオ法による測距方法を用いて物体領域D1によって示される前方車体までの距離及び3次元位置を求める。図8は、ステレオ法による測距方法を説明する模式図である。   Returning to FIG. 2, the distance calculation unit 60 obtains the distance to the front vehicle body and the three-dimensional position indicated by the object region D <b> 1 using a stereo distance measurement method based on the attention point and the corresponding point. FIG. 8 is a schematic diagram for explaining a distance measuring method by the stereo method.

図8において、fは、カメラ11,12の焦点距離を示し、カメラ11,12の撮影面(CCD)の画素数及び1画素の大きさ(μ)は等しいものとする。また、カメラ11,12は、所定の基線長Lだけ左右方向に離間され、かつ、光軸が平行となるように配置されている。この場合、撮影面上の視差(ずれ画素数)をd(=d1+d2)とすると、前方車体までの距離(Z)は、Z=(L×f)/(μ×d)により求めることができる。3次元位置としては、自車体を基準として3次元の座標空間を設定した場合の前方車体の位置である相対位置を採用してもよいし、自車体がGPSを備えているのであれば、GPSにより得られた自車体の絶対位置から前方車体の絶対位置を算出し、この絶対位置を採用してもよい。   In FIG. 8, f indicates the focal length of the cameras 11 and 12, and the number of pixels on the imaging surface (CCD) of the cameras 11 and 12 and the size (μ) of one pixel are the same. Further, the cameras 11 and 12 are arranged so as to be separated from each other in the left-right direction by a predetermined base line length L and to have parallel optical axes. In this case, if the parallax (the number of displaced pixels) on the imaging surface is d (= d1 + d2), the distance (Z) to the front vehicle body can be obtained by Z = (L × f) / (μ × d). . As the three-dimensional position, a relative position that is the position of the front vehicle body when a three-dimensional coordinate space is set with respect to the own vehicle body may be adopted, or if the vehicle body is equipped with GPS, GPS The absolute position of the front vehicle body may be calculated from the absolute position of the vehicle body obtained by the above, and this absolute position may be adopted.

ここで、距離算出部60は、例えば、物体領域内に設定した注目点と各注目点の対応点との各ペアの視差から代表視差を求め、その代表視差の距離を物体領域が表す前方車体までの距離として算出してもよいし、注目点と対応点との各ペアの距離を求め、求めた距離から代表距離を求めてもよい。代表視差又は代表距離を求める手法としては、特開平7−334800号公報に記載されたヒストグラムを用いた手法を採用してもよいし、各ペアの距離又は視差の平均値、中央値、或いは各ペアの距離又は視差から最大値及び最小値を除いた残りの値の平均値を代表距離又は代表視差として算出する手法を採用してもよい。   Here, for example, the distance calculation unit 60 obtains the representative parallax from the parallax of each pair of the target point set in the object region and the corresponding point of each target point, and the front vehicle body that represents the distance of the representative parallax is represented by the object region Or the distance of each pair of the target point and the corresponding point may be obtained, and the representative distance may be obtained from the obtained distance. As a method for obtaining the representative parallax or the representative distance, a method using a histogram described in Japanese Patent Laid-Open No. 7-334800 may be employed, and the distance or parallax average value, median value, A method of calculating an average value of remaining values obtained by removing the maximum value and the minimum value from the pair distance or parallax as the representative distance or the representative parallax may be adopted.

図2に戻り、表示部70は、図1に示す表示装置14から構成され、距離算出部60により算出された前方車体までの距離及び3次元位置等を表示する。ここで、表示部70は、距離算出部60により複数の前方車体の距離が算出された場合は、各々の距離をドライバーに通知してもよい。   Returning to FIG. 2, the display unit 70 includes the display device 14 illustrated in FIG. 1, and displays the distance to the front vehicle body calculated by the distance calculation unit 60, the three-dimensional position, and the like. Here, when the distance calculation unit 60 calculates the distances of the plurality of front vehicle bodies, the display unit 70 may notify each distance to the driver.

次に、距離計測装置1の動作について説明する。図9は距離計測装置1の動作を示すフローチャートである。以下のフローチャートでは、説明の便宜上、基準画像及び参照画像に含まれる物体領域D1は1個とする。   Next, the operation of the distance measuring device 1 will be described. FIG. 9 is a flowchart showing the operation of the distance measuring apparatus 1. In the following flowchart, for convenience of explanation, the number of object regions D1 included in the base image and the reference image is one.

まず、ステップS11において、抽出部20は、基準カメラ110から入力された入力画像を基準画像として取得し、参照カメラ120から入力された入力画像を参照画像として取得する。   First, in step S <b> 11, the extraction unit 20 acquires an input image input from the reference camera 110 as a reference image, and acquires an input image input from the reference camera 120 as a reference image.

ステップS12において、抽出部20は、図3に示すようにステップS11で取得した基準画像から物体領域D1を抽出する。ステップS13において、面積算出部30は、ステップS12で抽出された物体領域D1の面積を算出する。   In step S12, the extraction unit 20 extracts the object region D1 from the reference image acquired in step S11 as shown in FIG. In step S13, the area calculation unit 30 calculates the area of the object region D1 extracted in step S12.

ステップS14において、処理変更部40は、図4に示すように物体領域D1の面積が小さくなるにつれて基準ウインドウ及び参照ウインドウのウインドウサイズが大きくなるようにウインドウサイズを設定する。ここで、処理変更部40は、物体領域の面積を段階的に分けた場合の各段階における好ましいウインドウサイズを予め定めておき、処理対象となる物体領域の面積が属する段階に対応するウインドウサイズを設定すればよい。   In step S14, the process changing unit 40 sets the window size so that the window sizes of the standard window and the reference window increase as the area of the object region D1 decreases as shown in FIG. Here, the process changing unit 40 predetermines a preferable window size in each stage when the area of the object area is divided in stages, and sets a window size corresponding to the stage to which the area of the object area to be processed belongs. You only have to set it.

ステップS15において、対応点探索部50は、探索処理を実行する。図10は探索処理を示すフローチャートである。まず、ステップS41において、対応点探索部50は、基準画像及び参照画像を階層毎に予め定められた解像度で低解像度化する処理を実行し、解像度の異なる複数の基準画像及び参照画像を階層的に生成する。ここで、階層数及び各階層における解像度は予め定められており、下位の階層から上位の階層に向かうにつれて解像度が高くなり、解像度変換が行われていない基準画像及び参照画像が最上位の階層とされる。   In step S15, the corresponding point search unit 50 performs a search process. FIG. 10 is a flowchart showing search processing. First, in step S41, the corresponding point search unit 50 executes a process of reducing the resolution of the standard image and the reference image at a resolution determined in advance for each layer, and hierarchically selects a plurality of standard images and reference images having different resolutions. To generate. Here, the number of layers and the resolution in each layer are determined in advance, and the resolution increases from the lower layer to the upper layer, and the base image and the reference image that have not undergone resolution conversion are the highest layer. Is done.

ステップS42において、対応点探索部50は、最上位の階層の基準画像に注目点を設定する。   In step S42, the corresponding point search unit 50 sets a point of interest in the reference image of the highest hierarchy.

ステップS43において、対応点探索部50は、最下位の階層の参照画像に探索範囲を設定する。図12は、基準画像及び参照画像に設定される基準ウインドウと参照ウインドウとを示した図である。図12に示すように、探索範囲DRは、ステップS41で基準画像に設定された注目点CPと垂直方向の高さが同じであって、水平方向と平行な参照画像の直線上の全域に設定されている。   In step S43, the corresponding point search unit 50 sets a search range for the reference image of the lowest hierarchy. FIG. 12 is a diagram showing a standard window and a reference window set for the standard image and the reference image. As shown in FIG. 12, the search range DR is set to the entire area on the straight line of the reference image parallel to the horizontal direction and having the same height in the vertical direction as the target point CP set in the standard image in step S41. Has been.

ステップS44において、対応点探索部50は、類似度算出処理を実行する。図11は類似度算出処理を示すフローチャートである。まず、ステップS61において、対応点探索部50は、ステップS43で探索範囲DRを設定した参照画像と同一階層の基準画像に基準ウインドウW1を設定する。ここで、ステップS42で最上位の階層の基準画像に設定された注目点に対して位置が対応する処理対象となる階層の基準画像上の点が、当該階層の基準画像の注目点CPとして設定される。そして、図12に示すように、注目点CPに中心が位置するように基準ウインドウW1が設定される。   In step S44, the corresponding point search unit 50 executes similarity calculation processing. FIG. 11 is a flowchart showing similarity calculation processing. First, in step S61, the corresponding point search unit 50 sets the reference window W1 to the reference image in the same hierarchy as the reference image for which the search range DR is set in step S43. Here, the point on the reference image of the hierarchy whose processing target corresponds to the position of the attention point set in the reference image of the highest hierarchy in step S42 is set as the attention point CP of the reference image of the hierarchy. Is done. Then, as shown in FIG. 12, the reference window W1 is set so that the center is located at the attention point CP.

ステップS62において、処理対象となる階層の参照画像に参照ウインドウW2が設定される。ここで、図12に示す探索範囲DRの例えば左端の位置が中心点O1の初期位置となるように参照ウインドウW2が設定される。   In step S62, the reference window W2 is set to the reference image of the hierarchy to be processed. Here, the reference window W2 is set so that, for example, the left end position of the search range DR shown in FIG. 12 is the initial position of the center point O1.

ステップS63において、対応点探索部50は、上述したPOC又はSADを用いて基準ウインドウW1内の画像と参照ウインドウW2内の画像との類似度を算出する。   In step S63, the corresponding point search unit 50 calculates the similarity between the image in the standard window W1 and the image in the reference window W2 using the above-described POC or SAD.

ステップS64において、対応点探索部50は、参照ウインドウW2の中心点O1が探索範囲DRの最終位置に到達していない場合(ステップS64でNO)、参照ウインドウW2をずらし(ステップS65)、処理をステップS63に戻し、参照ウインドウW2の中心点が探索範囲DRの最終位置に到達した場合(ステップS64でYES)、類似度算出処理を終了し、処理を図10に示すステップS45に進める。ここで、最終位置としては例えば探索範囲DRの右端を採用することができる。また、図12に示すように、参照ウインドウW2は、中心点O1が探索範囲DRの左端の点から右端の点に向けて順次設定され、探索範囲DRに沿って左側から右側に向けてずらされていく。そして、対応点探索部50は、参照ウインドウW2をずらす毎に類似度を算出し、算出した類似度を中心点O1における類似度とする。これにより、探索範囲DR上での類似度の分布が求まることになる。   In step S64, when the center point O1 of the reference window W2 has not reached the final position of the search range DR (NO in step S64), the corresponding point search unit 50 shifts the reference window W2 (step S65) and performs processing. Returning to step S63, if the center point of the reference window W2 has reached the final position of the search range DR (YES in step S64), the similarity calculation process is terminated, and the process proceeds to step S45 shown in FIG. Here, as the final position, for example, the right end of the search range DR can be employed. Also, as shown in FIG. 12, in the reference window W2, the center point O1 is sequentially set from the left end point to the right end point of the search range DR, and is shifted from the left side to the right side along the search range DR. To go. Then, the corresponding point search unit 50 calculates the similarity every time the reference window W2 is shifted, and sets the calculated similarity as the similarity at the center point O1. As a result, a distribution of similarity on the search range DR is obtained.

図10に戻り、ステップS45において、対応点探索部50は、類似度算出処理によって求められた探索範囲DR上の類似度のうち、最大の類似度を有する点を処理対象となる階層の参照画像における対応点として求める。   Returning to FIG. 10, in step S <b> 45, the corresponding point search unit 50 refers to the reference image of the hierarchy whose processing target is the point having the maximum similarity among the similarities on the search range DR obtained by the similarity calculation processing. It is obtained as a corresponding point.

ステップS46において、対応点探索部50は、最上位の階層を処理対象として設定していない場合(ステップS46でNO)、1つ上の階層を処理対象として設定し、当該階層の参照画像に探索範囲DRを設定し(ステップS48)、処理をステップS44に戻し、最上位の階層を処理対象として既に設定している場合(ステップS46でYES)、処理をステップS47に進める。   In step S46, when the corresponding point search unit 50 does not set the highest hierarchy as the processing target (NO in step S46), the corresponding hierarchy search unit 50 sets the upper hierarchy as the processing target and searches for a reference image in the hierarchy. The range DR is set (step S48), the process returns to step S44, and if the highest hierarchy has already been set as the process target (YES in step S46), the process proceeds to step S47.

図13は、探索範囲DRを説明する図であり、(a)はある階層における基準画像と参照画像とを示し、(b)は(a)に示す階層よりも1つ上の階層における基準画像と参照画像とを示している。対応点探索部50は、図13(a)に示す参照画像において求めた対応点TPを含み、図13(a)に示す探索範囲DRよりも狭い領域を1つ上の階層の参照画像の探索範囲DRとして設定する(図13(b))。すなわち、対応点探索部50は、いずれの階層においても探索範囲DRを、注目点CPと垂直方向の高さが同一であり、かつ水平方向と平行な直線上に設定するが、下位の階層から上位の階層に向かうにつれて範囲を狭くしている。ここで、基準画像及び参照画像は階層が上位になるにつれて解像度が高くなっている。したがって、低解像度の参照画像で広範囲に探索範囲DRを設定して対応点TPのおよその位置を探索しておき、その探索結果を用いて高解像度での参照画像の探索範囲DRを狭い範囲に絞り込むことが可能となり、高速かつ高精度に対応点を探索することができる。なお、各階層において設定される探索範囲DRは、下の階層で求められた対応点TPを中心として、階層毎に予め定められた一定の幅を持たせた範囲とすればよい。   FIG. 13 is a diagram for explaining the search range DR, where (a) shows a standard image and a reference image in a certain hierarchy, and (b) is a standard image in a hierarchy one level higher than the hierarchy shown in (a). And a reference image. The corresponding point search unit 50 includes a corresponding point TP obtained in the reference image shown in FIG. 13A, and searches for a reference image that is one level higher than the search range DR shown in FIG. The range DR is set (FIG. 13B). That is, the corresponding point search unit 50 sets the search range DR on any straight line that has the same vertical height as the point of interest CP and is parallel to the horizontal direction. The range is narrowed toward the higher levels. Here, the resolution of the standard image and the reference image becomes higher as the hierarchy becomes higher. Therefore, the search range DR is set in a wide range with the low-resolution reference image to search the approximate position of the corresponding point TP, and the search result DR of the high-resolution reference image is narrowed using the search result. This makes it possible to narrow down and search for corresponding points at high speed and with high accuracy. Note that the search range DR set in each layer may be a range having a certain width predetermined for each layer, with the corresponding point TP obtained in the lower layer as the center.

図10に戻り、ステップS47において、注目点が最終位置に到達していない場合(ステップS47でNO)、対応点探索部50は、基準画像に次の注目点を設定するために処理をステップS42に戻し、注目点が最終位置に設定されている場合(ステップS47でYES)、探索処理を終了して処理を図9に示すステップS16に進める。   Returning to FIG. 10, if the target point has not reached the final position in step S47 (NO in step S47), the corresponding point search unit 50 performs the process to set the next target point in the reference image in step S42. If the target point is set at the final position (YES in step S47), the search process is terminated and the process proceeds to step S16 shown in FIG.

図9に戻り、ステップS16において、距離算出部60は、物体領域D1に示す前方車体までの距離を求め、ステップS17において、表示部70は、距離算出部60により算出された距離を表示する。ステップS18において、例えばユーザにより処理を終了するための操作指令が入力される等して、処理が終了される場合(ステップS18でYES)、処理が終了され、処理が終了されない場合(ステップS18でNO)、抽出部20は、基準カメラ110により取得された次フレームの入力画像を基準画像として取得すると共に、参照カメラ120により取得された次フレームの入力画像を参照画像として取得し(ステップS19)、処理をステップS12に戻す。   Returning to FIG. 9, in step S <b> 16, the distance calculation unit 60 obtains the distance to the front vehicle body shown in the object region D <b> 1, and in step S <b> 17, the display unit 70 displays the distance calculated by the distance calculation unit 60. In step S18, for example, when an operation command for ending the process is input by the user, the process is terminated (YES in step S18), the process is terminated, and the process is not terminated (in step S18). NO), the extraction unit 20 acquires the input image of the next frame acquired by the standard camera 110 as a standard image, and acquires the input image of the next frame acquired by the reference camera 120 as a reference image (step S19). The process returns to step S12.

このように距離計測装置1によれば、カメラ11,12により同一タイミングで撮影された入力画像が基準画像及び参照画像として取得され、基準画像から前方車体をとらえた物体領域D1が抽出され、抽出された物体領域内に注目点が順次設定され、各注目点の対応点が各参照画像から探索され、注目点と対応点との視差を基に、対象物までの距離が算出される。ここで、物体領域の面積が小さくなるにつれて基準ウインドウ及び参照ウインドウのウインドウサイズが大きくされるため、視差分解能が高まり、処理点数の減少による計測精度の低下を補うことができ、物体領域の面積の大小によらず距離の計測精度を一定に保ち、距離の計測精度の安定化を図ることができる。   As described above, according to the distance measuring device 1, the input images captured by the cameras 11 and 12 at the same timing are acquired as the standard image and the reference image, and the object region D1 that captures the front vehicle body is extracted from the standard image and extracted. Attention points are sequentially set in the object region, the corresponding points of each attention point are searched from each reference image, and the distance to the object is calculated based on the parallax between the attention point and the corresponding point. Here, the window size of the standard window and the reference window is increased as the area of the object region is reduced, so that the parallax resolution is increased, and the reduction in measurement accuracy due to the reduction in the number of processing points can be compensated. Regardless of the size, the distance measurement accuracy can be kept constant, and the distance measurement accuracy can be stabilized.

(実施の形態2)
次に、本発明の実施の形態2による距離計測装置1aについて説明する。なお、本実施の形態において、全体構成及び詳細な構成は実施の形態1と同一であるため、図1及び図2を用いる。また、本実施の形態において実施の形態1と同一のものは説明を省き相違点のみ説明する。
(Embodiment 2)
Next, a distance measuring device 1a according to Embodiment 2 of the present invention will be described. In the present embodiment, since the overall configuration and detailed configuration are the same as those in Embodiment 1, FIGS. 1 and 2 are used. In the present embodiment, the same elements as those in the first embodiment are not described, and only differences are described.

図2に示す処理変更部40は、物体領域の面積が所定の値より小さい場合、視差分解能を参照画像のピクセルレベルよりも分解能の高いサブピクセルレベルに設定し、物体領域の面積が所定の値より大きい場合、視差分解能をピクセルレベルに設定して探索処理を変更する。なお、所定の値としては、サブピクセルレベルにおける分解能の値から計測精度のばらつきに大差が出ないような値であって、実験的に得られた値を採用することができる。   When the area of the object region is smaller than a predetermined value, the process changing unit 40 shown in FIG. 2 sets the parallax resolution to a sub-pixel level having a higher resolution than the pixel level of the reference image, and the area of the object region is a predetermined value. If larger, the search process is changed by setting the parallax resolution to the pixel level. The predetermined value may be a value that does not cause a large difference in measurement accuracy variation from the resolution value at the sub-pixel level, and may be an experimentally obtained value.

ここで、参照画像のサブピクセルレベルで対応点を探索すると、上記式(A)に示す視差分解能(γ)が高くなってγの値が小さくなるため、計測精度(α)を増大させることができる。したがって、面積が所定の値より小さい場合、参照画像のサブピクセルレベルで対応点を探索することで、処理点数の減少による計測精度(α)の低下が補われ、物体領域D1の面積の大小にかかわらず、計測精度を安定させることができる。   Here, when the corresponding point is searched for at the sub-pixel level of the reference image, the parallax resolution (γ) shown in the above formula (A) increases and the value of γ decreases, so that the measurement accuracy (α) can be increased. it can. Therefore, when the area is smaller than the predetermined value, searching for corresponding points at the sub-pixel level of the reference image compensates for a decrease in measurement accuracy (α) due to a decrease in the number of processing points, and increases or decreases the area of the object region D1. Regardless, the measurement accuracy can be stabilized.

ここで、図3(a)に示す大きな物体領域D1の処理点数(β)を100、図3(b)に示す小さな物体領域D1の処理点数(β)を25、ピクセルレベルの視差分解能(γ)を1、サブピクセルレベルの視差分解能(γ)を0.3と見積もり、計測精度(α)の閾値を90として、以下の3つのケースを考察する。   Here, the processing point (β) of the large object region D1 shown in FIG. 3A is 100, the processing point (β) of the small object region D1 shown in FIG. 3B is 25, and the parallax resolution (γ ) Is 1, the sub-pixel level parallax resolution (γ) is estimated as 0.3, and the threshold of measurement accuracy (α) is 90, and the following three cases are considered.

ケース1:図3(a)に示す大きな物体領域D1に対し、ピクセルレベルで対応点を探索する。このときα=100/(1.0×1.0)=100が得られ、αが閾値(90)よりも大きくなり、閾値以上の計測精度を得ることができる。   Case 1: A corresponding point is searched for at a pixel level in the large object region D1 shown in FIG. At this time, α = 100 / (1.0 × 1.0) = 100 is obtained, α is larger than the threshold value (90), and measurement accuracy equal to or higher than the threshold value can be obtained.

ケース2:図3(b)に示す小さな物体領域D1に対し、ピクセルレベルで対応点を探索する。このとき、α=25/(1.0×1.0)=25が得られ、αが閾値(90)よりも小さくなり、閾値以上の計測精度を得ることができない。   Case 2: A corresponding point is searched for at a pixel level with respect to the small object region D1 shown in FIG. At this time, α = 25 / (1.0 × 1.0) = 25 is obtained, α is smaller than the threshold value (90), and measurement accuracy equal to or higher than the threshold value cannot be obtained.

ケース3:図3(b)に示す小さな物体領域D1に対し、サブピクセルレベルで対応点を探索する。このとき、α=25/(0.3×0.3)=277.7が得られ、αが閾値(90)よりも大きくなり、閾値以上の計測精度を得ることができる。   Case 3: A corresponding point is searched at the sub-pixel level for the small object region D1 shown in FIG. At this time, α = 25 / (0.3 × 0.3) = 277.7 is obtained, α is larger than the threshold value (90), and measurement accuracy equal to or higher than the threshold value can be obtained.

上記3つのケースから分かるように、物体領域D1が小さい場合、サブピクセルレベルで対応点を探索することで、物体領域D1が大きい場合と同様に、計測精度を閾値以上にすることができ、物体領域D1の大小によらず、計測精度を安定させることができる。   As can be seen from the above three cases, when the object region D1 is small, searching for corresponding points at the sub-pixel level can make the measurement accuracy equal to or higher than the threshold, as in the case where the object region D1 is large. Measurement accuracy can be stabilized regardless of the size of the region D1.

次に、距離計測装置1aの動作について説明する。図14は、距離計測装置1aの動作を示すフローチャートである。ステップS81〜S83、ステップS85〜S89の処理は、図9に示すステップS11〜S13、ステップS15〜S19の処理と同一であるため説明を省く。   Next, the operation of the distance measuring device 1a will be described. FIG. 14 is a flowchart showing the operation of the distance measuring device 1a. The processes in steps S81 to S83 and steps S85 to S89 are the same as the processes in steps S11 to S13 and steps S15 to S19 shown in FIG.

ステップS84において、処理変更部40は、物体領域の面積が所定の値より小さい場合、視差分解能を参照画像のピクセルレベルよりも分解能の高いサブピクセルレベルに設定し、物体領域の面積が所定の値より大きい場合、視差分解能をピクセルレベルに設定して探索処理を変更する。ここで、処理変更部40は、サブピクセルレベルで対応点を探索する場合、物体領域の面積が小さくなるにつれて視差分解能を高くしてもよい。これにより、物体領域の面積の大小による計測精度のばらつきをより少なくすることができる。この場合、処理変更部40は、物体領域の面積を段階的に分けた場合の各段階における好ましい視差分解能を予め定めておき、処理対象となる物体領域の面積が属する段階に対応する視差分解能を設定すればよい。   In step S84, when the area of the object region is smaller than a predetermined value, the process changing unit 40 sets the parallax resolution to a sub-pixel level having a higher resolution than the pixel level of the reference image, and the area of the object region is a predetermined value. If larger, the search process is changed by setting the parallax resolution to the pixel level. Here, when searching for corresponding points at the sub-pixel level, the process changing unit 40 may increase the parallax resolution as the area of the object region decreases. Thereby, variation in measurement accuracy due to the size of the area of the object region can be further reduced. In this case, the process changing unit 40 predetermines a preferable parallax resolution at each stage when the area of the object region is divided in stages, and sets the parallax resolution corresponding to the stage to which the area of the object area to be processed belongs. You only have to set it.

なお、距離計測装置1aでは、図11に示すステップS63の処理が、ステップS84で設定された視差分解能に従って、類似度を算出する処理となる。   In the distance measuring device 1a, the process of step S63 shown in FIG. 11 is a process of calculating the similarity according to the parallax resolution set in step S84.

このように、距離計測装置1aによれば、物体領域の面積が所定の値より小さい場合、視差分解能を参照画像のピクセルレベルよりも高いサブピクセルレベルに設定し、物体領域の面積が所定の値より大きい場合、視差分解能をピクセルレベルに設定して探索処理が変更されているため、処理点数の減少による計測精度の低下を補うことができ、物体領域の面積の大小によらず距離の計測精度を一定に保ち、距離の計測精度の安定化を図ることができる。   Thus, according to the distance measuring device 1a, when the area of the object region is smaller than the predetermined value, the parallax resolution is set to a sub-pixel level higher than the pixel level of the reference image, and the area of the object region is a predetermined value. If it is larger, the search processing is changed by setting the parallax resolution to the pixel level, so it can compensate for the decrease in measurement accuracy due to the decrease in the number of processing points, and the distance measurement accuracy regardless of the size of the object area Can be kept constant, and the distance measurement accuracy can be stabilized.

(実施の形態3)
次に、本発明の実施の形態3による距離計測装置1bについて説明する。なお、本実施の形態において、全体構成及び詳細な構成は実施の形態1と同一であるため、図1及び図2を用いる。また、本実施の形態において実施の形態1、2と同一のものは説明を省き相違点のみ説明する。
(Embodiment 3)
Next, a distance measuring device 1b according to Embodiment 3 of the present invention will be described. In the present embodiment, since the overall configuration and detailed configuration are the same as those in Embodiment 1, FIGS. 1 and 2 are used. In the present embodiment, the same elements as those in the first and second embodiments are omitted, and only differences are described.

図2に示す処理変更部40は、物体領域の面積が小さくなるにつれて、視差分解能の異なる複数種類の探索処理の中から、より視差分解能の高い探索処理を選択する。ここで、探索処理としては、視差分解能の高い第1の探索処理と、第1の探索処理よりも視差分解能の低い第2の探索処理とが含まれる。   The process changing unit 40 illustrated in FIG. 2 selects a search process with a higher parallax resolution from a plurality of types of search processes with different parallax resolutions as the area of the object region decreases. Here, the search process includes a first search process with a high parallax resolution and a second search process with a lower parallax resolution than the first search process.

第1及び第2の探索処理は、共に、基準画像に注目点を中心として基準ウインドウを設定すると共に、参照画像に参照ウインドウを設定し、参照ウインドウを参照画像でずらしながら、両ウインドウ内の画像の類似度を算出する類似度算出処理を繰り返し実行することで対応点を探索するものであるが、第1の探索処理は、基準ウインドウ及び参照ウインドウ内の画像を周波数分解して得られる位相成分に基づいて両ウインドウ内の画像の類似度を求める類似度算出処理を採用するものであり、第2の探索処理は、周波数分解することなく類似度を求める類似度算出処理を採用するものである。   In both the first and second search processes, a reference window is set around the target point in the reference image, a reference window is set in the reference image, and the images in both windows are shifted while the reference window is shifted from the reference image. The corresponding point is searched by repeatedly executing the similarity calculation process for calculating the similarity of the first component. The first search process is a phase component obtained by frequency-resolving the images in the reference window and the reference window. The similarity calculation process for obtaining the similarity of the images in both windows based on the above is employed, and the second search process employs a similarity calculation process for obtaining the similarity without performing frequency decomposition. .

ここで、第1の探索処理における類似度算出処理は、高速フーリエ変換、離散フーリエ変換、離散コサイン変換、離散サイン変換、ウエーブレット変換、及びアダマール変換のいずれかを用いて周波数分解するが、本実施の形態では、処理の高速化の観点から高速フーリエ変換が採用される。   Here, the similarity calculation processing in the first search processing is frequency-resolved using any of fast Fourier transform, discrete Fourier transform, discrete cosine transform, discrete sine transform, wavelet transform, and Hadamard transform. In the embodiment, fast Fourier transform is adopted from the viewpoint of speeding up the processing.

また、第1の探索処理における類似度算出処理としては、POCやDCT符号限定相関法を採用することができるが、POCの方がよりロバストであるため、本実施の形態ではPOCを採用する。   In addition, as the similarity calculation process in the first search process, a POC or DCT code limited correlation method can be adopted. However, since the POC is more robust, this embodiment employs the POC.

また、第2の探索処理における類似度算出処理としては、SAD(Sum of Absolute Difference)、SSD(濃度差の二乗和)、又はNCC(正規化相互相関)等を採用することができるが、処理の高速化、高精度化の観点から本実施の形態ではSADを採用する。   In addition, as the similarity calculation process in the second search process, SAD (Sum of Absolute Difference), SSD (Sum of squares of density difference), NCC (Normalized Cross Correlation), or the like can be adopted. In this embodiment, SAD is adopted from the viewpoint of speeding up and accuracy.

そして、処理変更部40は、物体領域の面積が所定の値より小さい場合、視差分解能の高い第1の探索処理を選択し、物体領域の面積が所定の値より大きい場合、視差分解能の低い第2の探索処理を選択する。POCは、SADよりも対応点を高精度に探索することができるため、参照画像の分解能を高くした場合と同様、計測精度を高めることができる。したがって、POCを採用すると、視差分解能が高くなって視差分解能の値が小さくなり、上記式(A)のαが増大し、計測精度が高まるのである。   Then, the process changing unit 40 selects the first search process with high parallax resolution when the area of the object region is smaller than a predetermined value, and selects the first search process with low parallax resolution when the area of the object region is larger than the predetermined value. 2 search processing is selected. Since the POC can search for corresponding points more accurately than the SAD, the measurement accuracy can be increased as in the case where the resolution of the reference image is increased. Therefore, when the POC is employed, the parallax resolution is increased and the value of the parallax resolution is decreased, α in the above formula (A) is increased, and the measurement accuracy is increased.

なお、上記所定の値としては、POC及びSADによって見積もられる視差分解能の値から計測精度のばらつきに大差が出ないような値であって、実験的に得られた値を採用することができる。   As the predetermined value, an experimentally obtained value that does not cause a large difference in variation in measurement accuracy from the parallax resolution value estimated by POC and SAD can be used.

ここで、図3(a)に示す大きな物体領域D1の処理点数(β)を100、図3(b)に示す小さな物体領域D1の処理点数(β)を25、SADにおける視差分解能(γ)を0.6、POCにおける視差分解能(γ)を0.3と見積もり、計測精度(α)の閾値を270として、以下の3つのケースを考察する。   Here, the processing point (β) of the large object region D1 shown in FIG. 3A is 100, the processing point (β) of the small object region D1 shown in FIG. 3B is 25, and the parallax resolution (γ) in SAD. Is estimated as 0.6, the parallax resolution (γ) in POC is estimated as 0.3, and the threshold of measurement accuracy (α) is 270, and the following three cases are considered.

ケース1:図3(a)に示す大きな物体領域D1に対し、SADで対応点を探索する。このときα=100/(0.6×0.6)=277.7が得られ、αが閾値(270)よりも大きくなり、閾値以上の計測精度を得ることができる。   Case 1: A corresponding point is searched by SAD for the large object region D1 shown in FIG. At this time, α = 100 / (0.6 × 0.6) = 277.7 is obtained, α is larger than the threshold value (270), and measurement accuracy equal to or higher than the threshold value can be obtained.

ケース2:図3(b)に示す小さな物体領域D1に対し、SADで対応点を探索する。このとき、α=25/(0.6×0.6)=69.4が得られ、αが閾値(270)よりも小さくなり、閾値以上の計測精度を得ることができない。   Case 2: A corresponding point is searched by SAD for the small object region D1 shown in FIG. At this time, α = 25 / (0.6 × 0.6) = 69.4 is obtained, α is smaller than the threshold value (270), and measurement accuracy higher than the threshold value cannot be obtained.

ケース3:図3(b)に示す小さな物体領域D1に対し、POCで対応点を探索する。このとき、α=25/(0.3×0.3)=277.7が得られ、αが閾値(270)よりも大きくなり、閾値以上の計測精度を得ることができる。   Case 3: A corresponding point is searched by POC for the small object region D1 shown in FIG. At this time, α = 25 / (0.3 × 0.3) = 277.7 is obtained, α is larger than the threshold value (270), and measurement accuracy equal to or higher than the threshold value can be obtained.

上記3つのケースから分かるように、物体領域D1が小さい場合、POCで対応点を探索することで、物体領域D1が大きい場合と同様に、計測精度を閾値以上にすることができ、物体領域D1の大小によらず、計測精度を安定させることができる。   As can be seen from the above three cases, when the object area D1 is small, searching for corresponding points by POC enables the measurement accuracy to be equal to or greater than the threshold, as in the case where the object area D1 is large. Regardless of the size, the measurement accuracy can be stabilized.

次に、距離計測装置1bの動作について説明する。図15は、距離計測装置1bの動作を示すフローチャートである。ステップS101〜S103、ステップS105〜S109の処理は、図9に示すステップS11〜S13、ステップS15〜S19の処理と同一であるため説明を省く。   Next, the operation of the distance measuring device 1b will be described. FIG. 15 is a flowchart showing the operation of the distance measuring device 1b. The processing in steps S101 to S103 and steps S105 to S109 is the same as the processing in steps S11 to S13 and steps S15 to S19 shown in FIG.

ステップS104において、処理変更部40は、物体領域の面積が所定の値より小さい場合、第1の探索処理を選択し、物体領域の面積が所定の値より大きい場合、第2の探索処理を選択する。なお、距離計測装置1bでは、図11に示すステップS63の処理は、ステップS104でPOCが選択された場合は、POCを用いて類似度を算出し、ステップS104でSADが選択された場合は、SADを用いて類似度を算出する処理となる。   In step S104, the process changing unit 40 selects the first search process when the area of the object region is smaller than the predetermined value, and selects the second search process when the area of the object region is larger than the predetermined value. To do. In the distance measuring device 1b, in the process of step S63 shown in FIG. 11, when POC is selected in step S104, the similarity is calculated using the POC, and when SAD is selected in step S104, This is a process for calculating the similarity using SAD.

このように、距離計測装置1bによれば、物体領域の面積が所定の値より小さい場合、POCが選択され、物体領域の面積が所定の値より大きい場合、SADが選択されるため、処理点数の減少による計測精度の低下を補うことができ、物体領域の面積の大小によらず距離の計測精度を一定に保ち、距離の計測精度の安定化を図ることができる。   As described above, according to the distance measuring device 1b, when the area of the object region is smaller than the predetermined value, POC is selected, and when the area of the object region is larger than the predetermined value, SAD is selected. It is possible to compensate for the decrease in measurement accuracy due to the decrease in the distance, and to keep the distance measurement accuracy constant regardless of the size of the area of the object region, and to stabilize the distance measurement accuracy.

(実施の形態4)
次に、本発明の実施の形態4による距離計測装置1cについて説明する。なお、本実施の形態において、全体構成及び詳細な構成は実施の形態1と同一であるため、図1及び図2を用いる。また、本実施の形態において実施の形態1〜3と同一のものは説明を省き相違点のみ説明する。
(Embodiment 4)
Next, a distance measuring device 1c according to Embodiment 4 of the present invention will be described. In the present embodiment, since the overall configuration and detailed configuration are the same as those in Embodiment 1, FIGS. 1 and 2 are used. In the present embodiment, the same elements as those in the first to third embodiments are not described, and only differences are described.

図2に示す抽出部20は、基準画像から物体領域の候補となる候補領域を抽出し、抽出した候補領域の中から物体領域を抽出する。ここで、抽出部20は、実施の形態1が物体領域を抽出する手法と同様の手法を用いて候補領域を抽出し、抽出した候補領域のうち重要度が高い1又は複数の候補領域を物体領域として抽出すればよい。ここで、重要度としては、例えば、面積の大きな候補領域ほど高く、基準画像の下側に位置する候補領域ほど高くなるような値を採用してもよい。そして、抽出部20は、重要度の値が所定の値よりも大きな候補領域を物体領域として抽出してもよいし、重要度の高い順に予め定められた個数の候補領域を物体領域として抽出してもよい。ここで、下側に位置し、かつ、面積が大きな候補領域ほど重要度を高く設定するのは、そのような候補領域が示す対象物ほど、自車体に近づいている可能性が高いからである。   The extraction unit 20 illustrated in FIG. 2 extracts candidate areas that are candidate object areas from the reference image, and extracts object areas from the extracted candidate areas. Here, the extraction unit 20 extracts candidate regions using the same method as the method for extracting the object region according to the first embodiment, and selects one or more candidate regions having high importance from the extracted candidate regions. What is necessary is just to extract as an area | region. Here, as the importance, for example, a value that is higher for a candidate area with a larger area and higher for a candidate area located below the reference image may be employed. Then, the extraction unit 20 may extract candidate areas having importance values greater than a predetermined value as object areas, or extract a predetermined number of candidate areas in descending order of importance as object areas. May be. Here, the reason why the importance level is set higher for a candidate area located on the lower side and having a larger area is that the object indicated by such a candidate area is more likely to be closer to the vehicle body. .

対応点探索部50は、物体領域に設定した各注目点の対応点の探索が終了した後、次フレームに対する処理を開始するまで期間、抽出部20により抽出された物体領域以外の基準画像上の領域である非物体領域内に注目点を順次設定し、各注目点の対応点各参照画像から探索するといった第3の探索処理を実行する。   The correspondence point search unit 50 performs a period on the reference image other than the object region extracted by the extraction unit 20 until the processing for the next frame is started after the search for the corresponding point of each target point set in the object region is completed. A third search process is executed in which attention points are sequentially set in a non-object region, which is a region, and corresponding points of each attention point are searched from each reference image.

すなわち、第3の探索処理は、現フレームにおいて、物体領域に設定した各注目点の対応点の探索が終了した後、次フレームの入力画像が取得されるまでの間の空き時間を利用して、非物体領域において順次注目点を設定して対応点を探索していき、次フレームの入力画像が取得されると、非物体領域における対応点の探索処理を打ち切る処理である。   In other words, the third search process uses the free time until the input image of the next frame is acquired after the search for the corresponding point of each target point set in the object area in the current frame. In this process, attention points are sequentially set in the non-object region to search for corresponding points, and when the input image of the next frame is acquired, the corresponding point search process in the non-object region is terminated.

ここで、第3の探索処理は、上述したSAD又はPOC等を用いて対応点を探索すればよい。対応点探索部50は、第3の探索処理を実行するにあたり、非物体領域の下からの1番目のラインの例えば左端の画素から右端の画素に向けて順次注目点を設定し、当該ラインの処理が全て終了すると、その1つ上のラインに対して同様に注目点を順次設定しいくというように、非物体領域の下側から上側に向けて順次注目点を設定すればよい。このとき、対応点探索部50は、非物体領域の全画素を注目点として設定してもよいし、非物体領域を水平及び垂直方向に一定の間引き幅で間引いた画素を注目点として設定してもよい。更に、対応点探索部50は、面積算出部30に非物体領域の面積を算出させ、非物体領域の面積が大きいほど、間引き幅が大きくなるように注目点を設定してもよい。   Here, the third search process may be performed by searching for corresponding points using the above-described SAD or POC. In executing the third search process, the corresponding point search unit 50 sequentially sets a point of interest from, for example, the leftmost pixel to the rightmost pixel of the first line from the bottom of the non-object region. When all the processes are completed, the attention points may be set sequentially from the lower side to the upper side of the non-object region so that the attention points are sequentially set for the line immediately above. At this time, the corresponding point search unit 50 may set all the pixels in the non-object region as a point of interest, or set a pixel obtained by thinning the non-object region in the horizontal and vertical directions with a certain thinning width as the point of interest. May be. Further, the corresponding point search unit 50 may cause the area calculation unit 30 to calculate the area of the non-object region, and may set the attention point so that the thinning width increases as the area of the non-object region increases.

距離算出部60は、実施の形態1と同様にして物体領域が示す前方車体の距離を算出することに加えて、非物体領域における注目点と対応点とから、上述したステレオ法による測距方法を用いて各注目点の距離を求める。ここで、距離算出部60は、非物体領域に設定した注目点において、自車体に近接していることが想定される予め定められた距離よりも距離の短い注目点が存在する場合、表示部70に障害物が接近していることを示す情報を表示させ、ユーザに危険を報知するようにしてもよい。   The distance calculation unit 60 calculates the distance of the front vehicle body indicated by the object area in the same manner as in the first embodiment, and also uses the stereo method described above from the attention point and the corresponding point in the non-object area. Is used to find the distance between each point of interest. Here, the distance calculation unit 60 displays the display unit when the target point set in the non-object region includes a target point with a shorter distance than a predetermined distance assumed to be close to the vehicle body. Information indicating that an obstacle is approaching may be displayed on 70 to notify the user of the danger.

次に、距離計測装置1cの動作について説明する。図16は、距離計測装置1cの動作を示すフローチャートである。ステップS121は、図9に示すステップS11と同一であるため説明を省略する。ステップS122において、抽出部20は、基準画像から候補領域を抽出し、各候補領域の重要度を求め、重要度が所定の値より大きな候補領域を物体領域として抽出する。ここで、抽出部20は、各候補領域の例えば重心を求め、重心が基準画像の下側に位置する候補領域ほど高い重要度を付与し、付与した重要度に各候補領域の面積を乗じた値を各候補領域の重要度として設定してもよい。なお、以下の説明では、説明の便宜上、1つの物体領域が抽出されたものとする。   Next, the operation of the distance measuring device 1c will be described. FIG. 16 is a flowchart showing the operation of the distance measuring device 1c. Step S121 is the same as step S11 shown in FIG. In step S122, the extraction unit 20 extracts candidate areas from the reference image, obtains importance levels of the candidate areas, and extracts candidate areas having importance levels greater than a predetermined value as object areas. Here, the extraction unit 20 obtains, for example, the center of gravity of each candidate region, assigns a higher importance to a candidate region whose center of gravity is located below the reference image, and multiplies the assigned importance by the area of each candidate region. A value may be set as the importance of each candidate area. In the following description, it is assumed that one object region is extracted for convenience of description.

ステップS123〜S125の処理は、図9に示すステップS13〜S15の処理と同一であるため説明を省略する。   Since the process of step S123-S125 is the same as the process of step S13-S15 shown in FIG. 9, description is abbreviate | omitted.

ステップS126において、対応点探索部50は、第3の探索処理を実行する。図17は、第3の探索処理の詳細を示すフローチャートである。まず、ステップS131において、対応点探索部50は、次フレームが取得されるまでに第3の探索処理を実行するための空き時間があるか否かを判定し、空き時間がある場合は(ステップS131でYES)、基準画像から非物体領域を特定する(ステップS132)。一方、ステップS131において、空き時間がないと判定した場合(ステップS131でNO)、第3の探索処理を終了して処理を図16に示すステップS127に戻す。   In step S126, the corresponding point search unit 50 executes a third search process. FIG. 17 is a flowchart showing details of the third search process. First, in step S131, the corresponding point search unit 50 determines whether there is a free time for executing the third search process until the next frame is acquired. In step S131, a non-object area is specified from the reference image (step S132). On the other hand, if it is determined in step S131 that there is no free time (NO in step S131), the third search process is terminated and the process returns to step S127 shown in FIG.

次に、対応点探索部50は、非物体領域に1つの注目点を設定し(ステップS133)、設定した注目点に対する対応点を探索し(ステップS134)、処理をステップS131に戻す。ここで、対応点探索部50は、非物体領域の各画素を注目点として設定する設定パターン1又は非物体領域を間引いた画素を注目点として設定する設定パターン2に従って、順次注目点を設定する。   Next, the corresponding point search unit 50 sets one attention point in the non-object region (step S133), searches for a corresponding point for the set attention point (step S134), and returns the process to step S131. Here, the corresponding point search unit 50 sequentially sets the attention points according to the setting pattern 1 for setting each pixel of the non-object region as the attention point or the setting pattern 2 for setting the pixels obtained by thinning out the non-object region as the attention point. .

図18は、設定パターン1を用いて非物体領域に設定される注目点を経時的に示した図であり、(a)〜(c)に向かうにつれて時間が経過している。なお、図18において三角印の点は物体領域D1に設定された注目点を示し、白丸は注目点として設定されていない非物体領域D2内の画素を示し、黒丸は注目点として設定済みの非物体領域の画素を示している。また、非物体領域D2は基準画像において物体領域D1を取り除いた領域からなる。   FIG. 18 is a diagram showing the points of interest set in the non-object region over time using the setting pattern 1, and the time elapses toward (a) to (c). In FIG. 18, a triangular mark indicates a target point set in the object region D1, a white circle indicates a pixel in the non-object region D2 that is not set as the target point, and a black circle indicates a non-set point that has been set as the target point. The pixel of the object area is shown. Further, the non-object region D2 is a region obtained by removing the object region D1 from the reference image.

図18(a)に示すように非物体領域D2の下から1番目のラインの左端の画素から右端の画素に向けて順次注目点が設定されて対応点が順次探索され、右端の画素に対する探索処理が終了すると、図18(b)に示すように下から2番目のラインの左端の画素から右端の画素に向けて順次注目点が設定されて対応点が順次探索され、図18(c)に示すように下から7番目のラインの左端の画素が注目点として設定されて探索処理が終了すると、空き時間がなくなったため探索処理が打ち切られている。   As shown in FIG. 18A, attention points are sequentially set from the leftmost pixel to the rightmost pixel of the first line from the bottom of the non-object region D2, and corresponding points are sequentially searched, and a search for the rightmost pixel is performed. When the processing is completed, as shown in FIG. 18B, attention points are sequentially set from the leftmost pixel to the rightmost pixel of the second line from the bottom, and corresponding points are sequentially searched, and FIG. As shown in FIG. 5, when the pixel at the left end of the seventh line from the bottom is set as a point of interest and the search process is completed, the search process is terminated because there is no free time.

図19は、設定パターン2を用いて非物体領域に設定される注目点を経時的に示した図であり、(a)〜(b)に向かうにつれて時間が経過している。   FIG. 19 is a diagram showing the points of interest set in the non-object region using the setting pattern 2 over time, and the time elapses toward (a) to (b).

設定パターン2では、水平及び垂直方向に間引き幅が1画素飛ばしで設定されているため、図19(a)に示すように下から1番目のラインにおいて、左端の画素から右端の画素に向けて1画素飛ばしの間引き幅で注目点が順次設定されていることが分かる。そして、下から1番目のラインに対する探索処理が終了すると、次に2つ上のラインにおいて1画素飛ばしで順次注目点が設定されるというようにして、順次注目点が設定される。   In setting pattern 2, since the thinning width is set by skipping one pixel in the horizontal and vertical directions, as shown in FIG. 19A, from the leftmost pixel to the rightmost pixel in the first line from the bottom. It can be seen that the points of interest are sequentially set with the skipping width of one pixel skip. Then, when the search process for the first line from the bottom is completed, the attention points are sequentially set in such a manner that the attention points are sequentially set by skipping one pixel in the next two lines.

また、設定パターン2では、上から1番目のラインにおける探索処理が終了した時点、すなわち、1サイクル目の探索処理が終了した時点で、空き時間が残っている場合、間引いたことにより注目点として設定されなかった画素が順次注目点として設定され、2サイクル目の探索処理が開始される。   Also, in the setting pattern 2, when the search process in the first line from the top is completed, that is, when the first cycle search process is completed, if there is a free time remaining, the thinning is performed as a point of interest. Pixels that have not been set are sequentially set as attention points, and search processing in the second cycle is started.

すなわち、図19(b)に示すように1サイクル目の探索処理が終了すると、再度、下側のラインから上側のラインに向けて注目点として設定されなかった画素が順次注目点として設定され、2サイクル目の探索処理が実行される。ここで、2サイクル目の探索処理においては、1サイクル目で注目点が設定されたラインと同じラインにおいて注目点として設定さなかった画素を1画素飛ばしで順次注目点として設定してもよいし、1サイクル目で注目点が設定されたラインと異なるラインにおいて1画素飛ばしで順次注目点を設定してもよい。なお、第3の探索処理において間引き幅は、1画素飛ばしに限定されず、2画素飛ばし以上としてもよい。   That is, as shown in FIG. 19B, when the search process in the first cycle is completed, pixels that are not set as attention points from the lower line toward the upper line are sequentially set as attention points. The search process of the second cycle is executed. Here, in the search process in the second cycle, pixels that are not set as the attention point in the same line as the line in which the attention point was set in the first cycle may be sequentially set as the attention point by skipping one pixel. The attention point may be sequentially set by skipping one pixel in a line different from the line where the attention point is set in the first cycle. Note that in the third search process, the thinning width is not limited to skipping one pixel, and may be greater than or equal to skipping two pixels.

図16に戻り、ステップS127において、距離算出部60は、物体領域に加えて非物体領域の各注目点における距離を求め、求めた距離が所定の値より短い場合は、障害物が接近していることを示す情報を表示部70に表示させる(ステップS128)。ステップS129〜S130の処理は図9に示すステップS18〜S19と同一であるため、説明を省略する。   Returning to FIG. 16, in step S <b> 127, the distance calculation unit 60 calculates the distance at each point of interest in the non-object region in addition to the object region, and when the calculated distance is shorter than a predetermined value, the obstacle approaches. Is displayed on the display unit 70 (step S128). The processing in steps S129 to S130 is the same as steps S18 to S19 shown in FIG.

このように、距離計測装置1cによれば、各フレームでの演算時間の空き時間を利用して非物体領域の距離を算出することが可能となり、例えば、ガードレールや路肩等の周辺環境を把握する上で有用な情報を得ることができ、対象物以外の障害物であって、危険を及ぼすような障害物の接近をユーザに報知することが可能となる。   As described above, according to the distance measuring device 1c, it is possible to calculate the distance of the non-object region by using the free time of the calculation time in each frame, and for example, grasp the surrounding environment such as a guardrail and a road shoulder. The above useful information can be obtained, and it is possible to notify the user of the approach of an obstacle other than the target object that is dangerous.

なお、上記実施の形態4では、非物体領域内に注目点を設定したが、これに代えて、候補領域以外の非候補領域内に注目点を設定してもよい。   In the fourth embodiment, the point of interest is set in the non-object region. Instead, the point of interest may be set in a non-candidate region other than the candidate region.

また、上記実施の形態1〜4では、物体領域の数を1個としたが、本発明はこれに限定されず、2個以上としてもよい。この場合、物体領域毎に実施の形態1では図9〜図11の処理を、実施の形態2では図14の処理を、実施の形態3では図15の処理を、実施の形態4では、図16〜図17の処理を実行すればよい。そして、表示部70は、物体領域D1毎の距離を表示すればよい。   In the first to fourth embodiments, the number of object regions is one, but the present invention is not limited to this and may be two or more. In this case, the processing of FIGS. 9 to 11 in the first embodiment, the processing of FIG. 14 in the second embodiment, the processing of FIG. 15 in the third embodiment, and the processing in FIG. What is necessary is just to perform the process of FIGS. And the display part 70 should just display the distance for every object area | region D1.

また、上記実施の形態1〜4では、対象物として前方車体を採用したが、これに限定されず、人を対象物としてもよいし、人以外の犬や猫等の動物を対象物としてもよい。この場合、抽出部20は、例えば距離の測定対象となる対象物毎のテンプレートを予め用意しておき、テンプレートマッチングにより種々の対象物を抽出すればよい。   Moreover, in the said Embodiment 1-4, although the front vehicle body was employ | adopted as a target object, it is not limited to this, A person may be made into a target object, and animals, such as dogs and cats other than a person, may be made into a target object. Good. In this case, for example, the extraction unit 20 may prepare a template for each target object that is a distance measurement target, and extract various target objects by template matching.

また、上記実施の形態1〜4では、カメラ11,12の高さが同一にされていることを考慮して、探索範囲を注目点と垂直方向の高さが同一、かつ水平方向と平行な直線上に設定したがこれに限定されず、当該直線を中心として垂直方向に一定の幅を持たせた四角形状の領域を探索範囲として設定してもよい。   In the first to fourth embodiments, considering that the heights of the cameras 11 and 12 are the same, the search range has the same vertical height as the point of interest and is parallel to the horizontal direction. Although it is set on a straight line, the present invention is not limited to this, and a quadrangular region having a certain width in the vertical direction around the straight line may be set as the search range.

また、上記実施の形態1〜4では、カメラの個数を2台としたがこれに限定されず3個以上としてもよい。この場合、いずれか1台のカメラにより撮影された画像を基準画像とし、他のカメラにより撮影された参照画像として、抽出部20〜距離算出部60に上述した処理を実行させ、前方車体までの距離を求めればよい。   In the first to fourth embodiments, the number of cameras is two. However, the number of cameras is not limited to this and may be three or more. In this case, the image captured by any one of the cameras is used as a standard image, and the reference image captured by the other camera is used as the reference image to cause the extraction unit 20 to the distance calculation unit 60 to perform the above-described processing, Find the distance.

更に、上記実施の形態3に示す探索処理の種類として、上記第1及び第2の探索処理に限定されず、3種類以上の探索処理を採用してもよい。例えば、POCによりピクセルレベルで対応点を探索する探索処理(POC−ピクセルレベル)、POCによりサブピクセルレベルで対応点を探索する探索処理(POC−サブピクセル)、SADによりピクセルレベルで対応点を探索する探索処理(SAD−ピクセルレベル)といった3種類の探索処理を採用してもよい。この場合、SAD−ピクセルレベル、POC−ピクセルレベル、POC−サブピクセルレベルの順で視差分解能が低くなるため、物体領域を面積に応じて大、中、小の3段階に分け、面積が大の物体領域には、SAD−ピクセルレベルを採用し、面積が中の物体領域には、POC−ピクセルレベルを採用し、面積が小の物体領域にはPOC−サブピクセルレベルを採用すればよい。また、この場合、SAD−サブピクセルレベルを加えてもよい。更に、サブピクセルレベルの分解能が各々異なるSAD−サブピクセルレベル、POC−サブピクセルレベルを探索処理として採用してもよい。こうすることで、物体領域の面積の大小による計測精度のばらつきをより抑制することができ、計測精度をより安定させることができる。   Furthermore, the types of search processing shown in the third embodiment are not limited to the first and second search processing, and three or more types of search processing may be employed. For example, search processing for searching corresponding points at the pixel level by POC (POC-pixel level), search processing for searching corresponding points at the sub-pixel level by POC (POC-subpixel), and searching for corresponding points at the pixel level by SAD You may employ | adopt three types of search processes, such as the search process (SAD-pixel level). In this case, since the parallax resolution decreases in the order of SAD-pixel level, POC-pixel level, and POC-subpixel level, the object region is divided into three stages of large, medium, and small according to the area, and the area is large. The SAD-pixel level may be adopted for the object region, the POC-pixel level may be adopted for the object region having a medium area, and the POC-subpixel level may be adopted for the object region having a small area. In this case, a SAD-subpixel level may be added. Furthermore, the SAD-subpixel level and the POC-subpixel level having different subpixel level resolutions may be employed as the search processing. By so doing, variations in measurement accuracy due to the size of the area of the object region can be further suppressed, and the measurement accuracy can be further stabilized.

本発明の実施の形態による距離計測装置のブロック図を示している。1 shows a block diagram of a distance measuring device according to an embodiment of the present invention. FIG. 図1に示す距離計測装置の詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure of the distance measuring device shown in FIG. 図2に示す抽出部により物体領域が抽出された2枚の画像を示している。3 shows two images from which an object region has been extracted by the extraction unit shown in FIG. ウインドウが設定された画像を示している。The window shows the set image. POCの処理の流れを示したフローチャートである。It is the flowchart which showed the flow of the process of POC. POC値を示したグラフである。It is the graph which showed the POC value. SADを説明する模式図である。It is a schematic diagram explaining SAD. ステレオ法による測距方法を説明する模式図である。It is a schematic diagram explaining the ranging method by a stereo method. 実施の形態1による距離計測装置の動作を示すフローチャートである。3 is a flowchart showing the operation of the distance measuring apparatus according to the first embodiment. 探索処理を示すフローチャートである。It is a flowchart which shows a search process. 類似度算出処理を示すフローチャートである。It is a flowchart which shows a similarity calculation process. 基準画像及び参照画像に設定される基準ウインドウと参照ウインドウとを示した図である。It is the figure which showed the reference | standard window and reference window which are set to a reference | standard image and a reference image. 探索範囲を説明する図である。It is a figure explaining a search range. 実施の形態2による距離計測装置の動作を示すフローチャートである。6 is a flowchart showing an operation of the distance measuring apparatus according to the second embodiment. 実施の形態3による距離計測装置の動作を示すフローチャートである。10 is a flowchart showing the operation of the distance measuring apparatus according to the third embodiment. 実施の形態4による距離計測装置の動作を示すフローチャートである。10 is a flowchart showing the operation of the distance measuring apparatus according to the fourth embodiment. 図16に示す第3の探索処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the 3rd search process shown in FIG. 設定パターン1を用いて非物体領域に設定される注目点を経時的に示した図である。It is the figure which showed the attention point set to a non-object area | region using the setting pattern 1 with time. 設定パターン2を用いて非物体領域に設定される注目点を経時的に示した図である。It is the figure which showed the attention point set to a non-object area | region using the setting pattern 2 with time.

符号の説明Explanation of symbols

1 1a 1b 1c 距離計測装置
13 演算処理装置
14 表示装置
20 抽出部
30 面積算出部
40 処理変更部
50 対応点探索部
60 距離算出部
70 表示部
110 基準カメラ
120 参照カメラ
CP 注目点
D1 物体領域
DR 探索範囲
O1 中心点
TP 対応点
W1 基準ウインドウ
W2 参照ウインドウ
1 1a 1b 1c Distance measurement device 13 Arithmetic processing device 14 Display device 20 Extraction unit 30 Area calculation unit 40 Processing change unit 50 Corresponding point search unit 60 Distance calculation unit 70 Display unit 110 Reference camera 120 Reference camera CP Attention point D1 Object region DR Search range O1 Center point TP Corresponding point W1 Base window W2 Reference window

Claims (9)

複数の撮影手段を用いて撮影された画像を用いて測定対象となる対象物までの距離を計測する距離計測装置であって、
前記撮影手段により同一タイミングで撮影された複数の入力画像のうち、いずれか1枚の入力画像を基準画像、他の入力画像を参照画像とし、前記基準画像から前記対象物が撮影された物体領域を抽出する抽出手段と、
前記抽出手段により抽出された物体領域の面積を算出する面積算出手段と、
前記抽出手段により抽出された物体領域内に注目点を順次設定し、各注目点の対応点を各参照画像から探索する探索手段と、
前記注目点と前記対応点との複数の視差を基に、前記対象物までの距離を算出する距離算出手段とを備え、
前記探索手段は、前記面積算出手段により算出された物体領域の面積が小さくなるにつれて、距離の計測精度を定めるためのパラメータである視差分解能が高くなるように探索処理を変更し、
前記探索手段は、前記基準画像に前記注目点を中心として基準ウインドウを設定すると共に、前記参照画像に参照ウインドウを設定し、前記参照ウインドウを前記参照画像でずらしながら、両ウインドウ内の画像の類似度を算出する類似度算出処理を繰り返し実行することで対応点を探索するものであり、前記面積算出手段により算出された物体領域の面積が小さくなるにつれて、前記基準ウインドウ及び参照ウインドウのサイズを大きくすることを特徴とする距離計測装置。
A distance measuring device that measures a distance to an object to be measured using images photographed using a plurality of photographing means,
An object region in which any one of the plurality of input images photographed at the same timing by the photographing unit is used as a standard image and another input image is used as a reference image, and the target object is photographed from the standard image Extracting means for extracting
Area calculating means for calculating the area of the object region extracted by the extracting means;
Search means for sequentially setting the attention points in the object region extracted by the extraction means, and searching for the corresponding points of each attention point from each reference image;
A distance calculating means for calculating a distance to the object based on a plurality of parallaxes between the attention point and the corresponding point;
The search means, wherein as the area of the area calculation object area calculated by means decreases, the disparity resolution is a parameter for determining the distance measurement accuracy of changes the search process to be higher,
The search means sets a reference window centered on the point of interest in the reference image, sets a reference window in the reference image, and shifts the reference window with the reference image, and resembles the images in both windows. The similarity calculation process for calculating the degree is repeatedly executed to search for corresponding points. As the area of the object region calculated by the area calculation unit decreases, the sizes of the reference window and the reference window are increased. A distance measuring device characterized by:
複数の撮影手段を用いて撮影された画像を用いて測定対象となる対象物までの距離を計測する距離計測装置であって、
前記撮影手段により同一タイミングで撮影された複数の入力画像のうち、いずれか1枚の入力画像を基準画像、他の入力画像を参照画像とし、前記基準画像から前記対象物が撮影された物体領域を抽出する抽出手段と、
前記抽出手段により抽出された物体領域の面積を算出する面積算出手段と、
前記抽出手段により抽出された物体領域内に注目点を順次設定し、各注目点の対応点を各参照画像から探索する探索手段と、
前記注目点と前記対応点との複数の視差を基に、前記対象物までの距離を算出する距離算出手段とを備え、
前記探索手段は、前記面積算出手段により算出された物体領域の面積が小さくなるにつれて、距離の計測精度を定めるためのパラメータである視差分解能が高くなるように探索処理を変更し、
前記探索処理は、視差分解能の異なる複数種類の探索処理を含み、
前記探索手段は、前記物体領域の面積が小さくなるにつれて視差分解能の高い探索処理を選択し、
前記探索処理は、前記基準画像に前記注目点を中心として基準ウインドウを設定すると共に、前記参照画像に参照ウインドウを設定し、前記参照ウインドウを前記参照画像でずらしながら、両ウインドウ内の画像の類似度を算出する類似度算出処理を繰り返し実行することで対応点を探索するものであり、前記基準ウインドウ及び前記参照ウインドウ内の画像を周波数分解して得られる位相成分に基づいて両ウインドウ内の画像の類似度を求める類似度算出処理を採用する第1の探索処理と、前記第1の探索処理よりも視差分解能の低い第2の探索処理とを含み、
前記第2の探索処理における類似度算出処理は、SADであることを特徴とする距離計測装置。
A distance measuring device that measures a distance to an object to be measured using images photographed using a plurality of photographing means,
An object region in which any one of the plurality of input images photographed at the same timing by the photographing unit is used as a standard image and another input image is used as a reference image, and the target object is photographed from the standard image Extracting means for extracting
Area calculating means for calculating the area of the object region extracted by the extracting means;
Search means for sequentially setting the attention points in the object region extracted by the extraction means, and searching for the corresponding points of each attention point from each reference image;
A distance calculating means for calculating a distance to the object based on a plurality of parallaxes between the attention point and the corresponding point;
The search means, wherein as the area of the area calculation object area calculated by means decreases, the disparity resolution is a parameter for determining the distance measurement accuracy of changes the search process to be higher,
The search process includes a plurality of types of search processes with different parallax resolutions,
The search means selects a search process with a high parallax resolution as the area of the object region decreases,
In the search process, a reference window is set around the target point in the reference image, a reference window is set in the reference image, and the reference window is shifted with the reference image, and the images in both windows are similar. The corresponding points are searched by repeatedly executing the similarity calculation process for calculating the degree, and the images in both windows are obtained based on the phase components obtained by frequency decomposition of the images in the reference window and the reference window. A first search process that employs a similarity calculation process for determining the similarity of the second search process, and a second search process that has a lower parallax resolution than the first search process,
The distance measurement apparatus according to claim 2, wherein the similarity calculation process in the second search process is SAD .
前記第1の探索処理における類似度算出処理は、高速フーリエ変換、離散フーリエ変換、離散コサイン変換、離散サイン変換、ウエーブレット変換、及びアダマール変換のいずれかを用いて周波数分解することを特徴とする請求項記載の距離計測装置。 The similarity calculation process in the first search process is characterized in that frequency decomposition is performed using any of fast Fourier transform, discrete Fourier transform, discrete cosine transform, discrete sine transform, wavelet transform, and Hadamard transform. The distance measuring device according to claim 2 . 前記第1の探索処理における類似度算出処理は、位相限定相関法であることを特徴とする請求項記載の距離計測装置。 4. The distance measuring apparatus according to claim 3, wherein the similarity calculation process in the first search process is a phase only correlation method. 前記探索手段は、前記物体領域に設定した各注目点の対応点の探索が終了した後、次フレームに対する処理を開始するまでの期間、前記物体領域以外の非物体領域内に注目点を順次設定し、各注目点の対応点を各参照画像から探索し、
前記距離算出手段は、前記非物体領域に設定した注目点と当該注目点の対応点とから当該注目点の距離を算出することを特徴とする請求項1〜のいずれかに記載の距離計測装置。
The search means sequentially sets attention points in a non-object region other than the object region for a period from the end of the search for the corresponding point of each attention point set in the object region to the start of processing for the next frame. And search corresponding points of each attention point from each reference image,
Said distance calculating means, distance measurement according to any one of claims 1 to 4, characterized in that to calculate the distance of the point of interest from the the corresponding point of the target point and the target point set in the non-object region apparatus.
前記探索手段は、前記非物体領域の下側から上側に向けて順次注目点を設定することを特徴とする請求項記載の距離計測装置。 The distance measuring apparatus according to claim 5 , wherein the searching unit sequentially sets a point of interest from the lower side to the upper side of the non-object region. 複数の撮影手段を用いて撮影された画像を用いて測定対象となる対象物までの距離を計測する距離計測装置であって、
前記撮影手段により同一タイミングで撮影された複数の入力画像のうち、いずれか1枚の入力画像を基準画像、他の入力画像を参照画像とし、前記基準画像から前記対象物が撮影された物体領域を抽出する抽出手段と、
前記抽出手段により抽出された物体領域の面積を算出する面積算出手段と、
前記抽出手段により抽出された物体領域内に注目点を順次設定し、各注目点の対応点を各参照画像から探索する探索手段と、
前記注目点と前記対応点との複数の視差を基に、前記対象物までの距離を算出する距離算出手段とを備え、
前記探索手段は、前記面積算出手段により算出された物体領域の面積が小さくなるにつれて、距離の計測精度を定めるためのパラメータである視差分解能が高くなるように探索処理を変更し、
前記探索手段は、前記面積算出手段により算出された物体領域の面積が所定の値より小さい場合、前記視差分解能を前記参照画像のピクセルレベルよりも分解能の高いサブピクセルレベルに設定し、前記物体領域の面積が所定の値より大きい場合、前記視差分解能を前記ピクセルレベルに設定し、
前記探索手段は、前記物体領域に設定した各注目点の対応点の探索が終了した後、次フレームに対する処理を開始するまでの期間、前記物体領域以外の非物体領域内に注目点を順次設定し、各注目点の対応点を各参照画像から探索し、
前記距離算出手段は、前記非物体領域に設定した注目点と当該注目点の対応点とから当該注目点の距離を算出し、
前記探索手段は、前記非物体領域の下側から上側に向けて順次注目点を設定することを特徴とする距離計測装置。
A distance measuring device that measures a distance to an object to be measured using images photographed using a plurality of photographing means,
An object region in which any one of the plurality of input images photographed at the same timing by the photographing unit is used as a standard image and another input image is used as a reference image, and the target object is photographed from the standard image Extracting means for extracting
Area calculating means for calculating the area of the object region extracted by the extracting means;
Search means for sequentially setting the attention points in the object region extracted by the extraction means, and searching for the corresponding points of each attention point from each reference image;
A distance calculating means for calculating a distance to the object based on a plurality of parallaxes between the attention point and the corresponding point;
The search means, wherein as the area of the area calculation object area calculated by means decreases, the disparity resolution is a parameter for determining the distance measurement accuracy of changes the search process to be higher,
When the area of the object region calculated by the area calculation unit is smaller than a predetermined value, the search unit sets the parallax resolution to a sub-pixel level having a resolution higher than the pixel level of the reference image, and the object region If the area is larger than a predetermined value, the parallax resolution is set to the pixel level,
The search means sequentially sets attention points in a non-object region other than the object region for a period from the end of the search for the corresponding point of each attention point set in the object region to the start of processing for the next frame. And search corresponding points of each attention point from each reference image,
The distance calculation means calculates the distance of the target point from the target point set in the non-object region and the corresponding point of the target point,
The search means, the distance measuring apparatus characterized that you set the sequential target point from the lower side toward the upper side of the non-object region.
前記対象物は、自動車、自動二輪車、自転車、及び人のうち、すくなくともいずれか1つを含むことを特徴とする請求項1〜のいずれかに記載の距離計測装置。 The object is an automobile, motorcycles, bicycles, and among the human, the distance measuring apparatus according to any one of claims 1 to 7, characterized in that it comprises at least any one. 複数の撮影手段を用いて撮影された画像を用いて測定対象となる対象物までの距離を計測する距離計測方法であって、
前記撮影手段により同一タイミングで撮影された複数の入力画像のうち、いずれか1枚の入力画像を基準画像、他の入力画像を参照画像とし、前記基準画像から前記対象物が撮影された物体領域を抽出する抽出ステップと、
前記抽出ステップにより抽出された物体領域の面積を算出する面積算出ステップと、
前記抽出ステップにより抽出された物体領域内に注目点を順次設定し、各注目点の対応点を各参照画像から探索する探索ステップと、
前記注目点と前記対応点との複数の視差を基に、前記対象物までの距離を算出する距離算出ステップとを備え、
前記探索ステップは、前記面積算出手段により算出された物体領域の面積が小さくなるにつれて、距離の計測精度を定めるためのパラメータである視差分解能が高くなるように探索処理を変更し、
前記探索ステップは、前記基準画像に前記注目点を中心として基準ウインドウを設定すると共に、前記参照画像に参照ウインドウを設定し、前記参照ウインドウを前記参照画像でずらしながら、両ウインドウ内の画像の類似度を算出する類似度算出処理を繰り返し実行することで対応点を探索するものであり、前記面積算出ステップにより算出された物体領域の面積が小さくなるにつれて、前記基準ウインドウ及び参照ウインドウのサイズを大きくすることを特徴とする距離計測方法。
A distance measurement method for measuring a distance to an object to be measured using images photographed using a plurality of photographing means,
An object region in which any one of the plurality of input images photographed at the same timing by the photographing unit is used as a standard image and another input image is used as a reference image, and the target object is photographed from the standard image An extraction step to extract
An area calculating step for calculating an area of the object region extracted by the extracting step;
A search step for sequentially setting a point of interest in the object region extracted by the extraction step, and searching for a corresponding point of each point of interest from each reference image;
A distance calculating step of calculating a distance to the object based on a plurality of parallaxes between the attention point and the corresponding point;
The search step, the as the area of the area calculation object area calculated by means decreases, the disparity resolution is a parameter for determining the distance measurement accuracy of changes the search process to be higher,
The searching step sets a reference window centered on the point of interest in the reference image, sets a reference window in the reference image, and shifts the reference window with the reference image, and resembles the images in both windows. The corresponding point is searched by repeatedly executing the similarity calculation process for calculating the degree, and the size of the reference window and the reference window is increased as the area of the object region calculated by the area calculation step decreases. A distance measurement method characterized by:
JP2008021214A 2008-01-31 2008-01-31 Distance measuring device and distance measuring method Active JP4946898B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008021214A JP4946898B2 (en) 2008-01-31 2008-01-31 Distance measuring device and distance measuring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008021214A JP4946898B2 (en) 2008-01-31 2008-01-31 Distance measuring device and distance measuring method

Publications (2)

Publication Number Publication Date
JP2009180663A JP2009180663A (en) 2009-08-13
JP4946898B2 true JP4946898B2 (en) 2012-06-06

Family

ID=41034748

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008021214A Active JP4946898B2 (en) 2008-01-31 2008-01-31 Distance measuring device and distance measuring method

Country Status (1)

Country Link
JP (1) JP4946898B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6349774B2 (en) * 2014-02-24 2018-07-04 株式会社リコー Image processing apparatus, image processing system, and image processing method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07334800A (en) * 1994-06-06 1995-12-22 Matsushita Electric Ind Co Ltd Vehicle recognition device
JP3373331B2 (en) * 1995-06-09 2003-02-04 三菱電機株式会社 Inter-vehicle distance detection device
JP2001004367A (en) * 1999-06-22 2001-01-12 Fuji Electric Co Ltd Distance measurement computing device
JP2006010392A (en) * 2004-06-23 2006-01-12 Suzuki Motor Corp Through hole measuring system, method, and through hole measuring program
JP2006318061A (en) * 2005-05-10 2006-11-24 Olympus Corp Apparatus, method, and program for image processing

Also Published As

Publication number Publication date
JP2009180663A (en) 2009-08-13

Similar Documents

Publication Publication Date Title
JP4553072B1 (en) Image integration apparatus and image integration method
JP5109691B2 (en) Analysis device
EP2546602B1 (en) Stereo camera apparatus
JP5267596B2 (en) Moving body detection device
JP5999127B2 (en) Image processing device
JP6171593B2 (en) Object tracking method and system from parallax map
JP5267330B2 (en) Image processing apparatus and method
JP5471310B2 (en) Operation analysis system
JP4946896B2 (en) Distance measuring device and distance measuring method
JP6837262B2 (en) Travelable area detection device and travel support system
US10043106B2 (en) Corresponding point searching method and distance detection device
JP2016004446A (en) Motion estimation device
US20140147049A1 (en) Corresponding point searching apparatus
JP4985542B2 (en) Corresponding point search device
JP2012252501A (en) Traveling path recognition device and traveling path recognition program
WO2010113253A1 (en) Three-dimensional information display device and three-dimensional information display method
JP4946898B2 (en) Distance measuring device and distance measuring method
JP2015210538A (en) Light source detector, headlight control system, and light source detection method
JP4946897B2 (en) Distance measuring device
JP4872943B2 (en) Analysis device
JP6668740B2 (en) Road surface estimation device
JP5256508B2 (en) 3D information calculation apparatus and 3D information calculation method
JP5682266B2 (en) Movement amount estimation apparatus and movement amount estimation method
JP2009187138A (en) Corresponding point retrieving device
JP4075879B2 (en) Vehicle collision warning device and vehicle collision warning method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100611

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111101

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111221

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120207

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120220

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

Free format text: PAYMENT UNTIL: 20150316

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4946898

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350