JP4749986B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP4749986B2
JP4749986B2 JP2006273260A JP2006273260A JP4749986B2 JP 4749986 B2 JP4749986 B2 JP 4749986B2 JP 2006273260 A JP2006273260 A JP 2006273260A JP 2006273260 A JP2006273260 A JP 2006273260A JP 4749986 B2 JP4749986 B2 JP 4749986B2
Authority
JP
Japan
Prior art keywords
value
pixel
captured image
pixels
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006273260A
Other languages
Japanese (ja)
Other versions
JP2008090742A (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.)
Honda Motor Co Ltd
Original Assignee
Honda Motor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honda Motor Co Ltd filed Critical Honda Motor Co Ltd
Priority to JP2006273260A priority Critical patent/JP4749986B2/en
Publication of JP2008090742A publication Critical patent/JP2008090742A/en
Application granted granted Critical
Publication of JP4749986B2 publication Critical patent/JP4749986B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、2つの撮像装置によりそれぞれ撮像された2つの撮像画像の両者に存在する同一物の視差を求めるために、各撮像画像に前処理を施す画像処理装置に関する。   The present invention relates to an image processing apparatus that performs preprocessing on each captured image in order to obtain parallax of the same object existing in both of the two captured images respectively captured by the two image capturing apparatuses.

従来、例えば車両の前部などに並設した2つの撮像装置により車両の前方側の映像を撮像し、それらの撮像画像を基に、車両の前方側に存在する人などの物体を監視するシステムが知られている(例えば特許文献1、2を参照)。このようなシステムでは、2つの撮像画像を基に、それらの撮像画像内に存在する同一の物体の視差(2つの撮像装置の並列方向における視差)を検出する。そして、その検出した視差から、車両に対する物体の相対距離を算出する。   2. Description of the Related Art Conventionally, for example, a system for capturing an image of the front side of a vehicle with two imaging devices arranged in parallel at the front of the vehicle and monitoring an object such as a person existing on the front side of the vehicle based on the captured images Is known (see, for example, Patent Documents 1 and 2). In such a system, based on two captured images, the parallax (parallax in the parallel direction of two imaging devices) of the same object existing in the captured images is detected. Then, the relative distance of the object with respect to the vehicle is calculated from the detected parallax.

この場合、視差を検出するために、いずれか一方の撮像画像内の物体上の点(以下、ここでは注目点という)に対応する他方の撮像画像中の点を探索する必要がある。この探索手法としては、特許文献1に見られるように、差分法や正規化相関法が一般に用いられる。これらの手法は、前記一方の撮像画像内の注目点を含む局所領域と、他方の撮像画像の探索領域内の局所領域とにおける画素値(輝度値など)の分布の一致度合いを、いわゆるSAD、NCCなどの相関関数の値により判断し、一方の撮像画像内の注目点を含む局所領域に対して、最も一致度合いの高い他方の撮像画像の局所領域内の点を、一方の撮像画像内の注目点に対応する他方の撮像画像内の点として探索する手法である。なお、特許文献2のものでは、SADが使用されている。   In this case, in order to detect parallax, it is necessary to search for a point in the other captured image corresponding to a point on an object in one of the captured images (hereinafter referred to as a point of interest). As this search method, as seen in Patent Document 1, a difference method or a normalized correlation method is generally used. In these methods, the degree of coincidence of distribution of pixel values (such as luminance values) in a local region including a target point in the one captured image and a local region in the search region of the other captured image is determined by so-called SAD, Judgment is made based on the value of a correlation function such as NCC, and a point in the local region of the other captured image having the highest degree of matching is determined in the one captured image with respect to the local region including the target point in one captured image. This is a method of searching as a point in the other captured image corresponding to the point of interest. In addition, in the thing of patent document 2, SAD is used.

また、前記特許文献2には、2つの撮像装置の特性の違いによる両撮像画像間の画素値のばらつきを補償するために、各撮像装置の出力のA/D変換値を、各撮像装置に対応して備えたルックアップテーブルにより補正する技術が知られている。
特開2000−329852号公報 特開平5−114099号公報
Further, in Patent Document 2, in order to compensate for variations in pixel values between both captured images due to differences in characteristics between two imaging devices, the A / D conversion values of the outputs of each imaging device are assigned to each imaging device. A technique for correcting with a corresponding lookup table is known.
JP 2000-329852 A Japanese Patent Laid-Open No. 5-114099

ところで、各撮像装置の撮像画像には、種々様々なノイズが含まれる。また、個々の撮像装置の特性のばらつきなどに起因して、2つの撮像装置により同一の物体を撮像しても、各撮像画像における物体の画像の各画素の輝度値などの画素値が、両撮像画像間でばらつきを生じる。そして、このような、各撮像画像に含まれるノイズや、両撮像画像間での画素値のばらつきは、視差検出の誤差要因となる。従って、視差の検出精度を高めるためには、各撮像画像に含まれるノイズや両撮像画像間での画素値のばらつきなどの誤差要因の影響を適切に補償することが望まれる。   Incidentally, a variety of noises are included in the captured image of each imaging apparatus. In addition, even if the same object is imaged by two imaging devices due to variations in characteristics of individual imaging devices, the pixel values such as the luminance values of the pixels of the object image in each captured image are both Variation occurs between captured images. Such noise included in each captured image and variations in pixel values between the both captured images become an error factor in parallax detection. Therefore, in order to increase the detection accuracy of parallax, it is desirable to appropriately compensate for the influence of error factors such as noise included in each captured image and variations in pixel values between both captured images.

しかるに、前記特許文献1に見られる技術では、各撮像装置の撮像画像をそのまま使用して、視差を検出するようにしているので、上記誤差要因の影響が補償されていない。このため、視差を精度よく検出することが困難となる場合が多い。   However, in the technique shown in Patent Document 1, since the parallax is detected using the captured image of each imaging device as it is, the influence of the error factor is not compensated. For this reason, it is often difficult to accurately detect the parallax.

また、前記特許文献2に見られる技術では、各撮像装置毎のルックアップテーブルを使用することで、撮像装置間の画素値のばらつきを補償するようにしているものの、各撮像画像に含まれるノイズの影響が補償されていない。このため、前記特許文献2に見られる技術では、視差の検出精度をさらに高めることが困難である。さらに、特許文献2に見られるようなルックアップテーブルは、個々の撮像装置毎に必要となるため、汎用性に欠けると共に、コスト的にも不利である。   Further, in the technique disclosed in Patent Document 2, a lookup table for each imaging device is used to compensate for variations in pixel values between the imaging devices, but noise included in each captured image. The effects of are not compensated. For this reason, it is difficult to further increase the detection accuracy of the parallax with the technique found in Patent Document 2. Further, the look-up table as found in Patent Document 2 is necessary for each image pickup device, so that it lacks versatility and is disadvantageous in terms of cost.

本発明はかかる背景に鑑みてなされたものであり、2つの撮像装置から得られた撮像画像に適切な前処理を施すことによって、各撮像画像に含まれるノイズの影響や2つの撮像画像間の画素値のばらつきの影響を適切に補償し、その前処理後の各画像データを基に、視差を精度良く検出することを可能とすると共に汎用性の高い画像処理装置を提供することを目的とする。   The present invention has been made in view of such a background, and by performing appropriate preprocessing on the captured images obtained from the two imaging devices, the influence of noise included in each captured image and the relationship between the two captured images are obtained. It is an object to provide a versatile image processing apparatus that can appropriately compensate for the influence of variations in pixel values and detect parallax with high accuracy based on each pre-processed image data. To do.

まず、本願発明の基本的な考え方を説明する。詳細な説明は後述するが、本願発明者の知見によれば、所定の方向(例えば左右方向、上下方向)で並設した第1の撮像装置と第2の撮像装置とにより同一の物体を撮像した場合、第1の撮像装置から得られる第1の撮像画像の各画素の画素値と、その画素と同じ物体を捉えていると第2の撮像画像(第2の撮像装置から得られる撮像画像)の画素の画素値との差の確率的分布(以下、第1確率的分布ということがある)は、一般に、ある値の中心値(平均値)を有する正規分布で近似される。また、各撮像画像においては、その各画素の画素値と、該画素から比較的小さい値の画素数dの間隔を存する画素の画素値との差の確率的分布(以下、第2確率的分布ということがある)は、0の中心値(平均値)を有すると共に前記画素数d(間隔)に応じた標準偏差または分散を有する正規分布で近似される。   First, the basic concept of the present invention will be described. Although detailed description will be described later, according to the knowledge of the present inventor, the same object is imaged by the first imaging device and the second imaging device arranged in parallel in a predetermined direction (for example, the left-right direction and the up-down direction). In this case, if the pixel value of each pixel of the first captured image obtained from the first imaging device and the same object as the pixel are captured, the second captured image (captured image obtained from the second imaging device) ) Is generally approximated by a normal distribution having a central value (average value) of a certain value. In each captured image, the stochastic distribution of the difference between the pixel value of each pixel and the pixel value of a pixel having a relatively small number of pixels d from the pixel (hereinafter, the second stochastic distribution). May be approximated by a normal distribution having a center value (average value) of 0 and a standard deviation or variance according to the number of pixels d (interval).

上記のように、第1確率的分布および第2確率的分布が正規分布で近似される場合、各撮像画像の所定の領域(少なくとも視差を検出しようとする領域)内の各画素に対して、次のような前処理を施すことによって、各撮像画像に含まれるノイズの影響や両撮像画像間の画素値のばらつきの影響を適切に補償し、それらの影響が少ない(S/N比が高い)前処理後画像データを得ることができる。   As described above, when the first stochastic distribution and the second stochastic distribution are approximated by a normal distribution, for each pixel in a predetermined region (at least a region where parallax is to be detected) of each captured image, By performing the following pre-processing, the influence of noise included in each captured image and the influence of variations in pixel values between both captured images are appropriately compensated, and the influence is small (the S / N ratio is high). ) Image data after preprocessing can be obtained.

その前処理は、各撮像画像の所定の領域内の各画素に対して、前記所定の方向における正の向きに、ある値の画素数dの間隔を存する画素の画素値I(p+d)と、該所定の方向における負の向きに該画素数dの間隔を存する画素の画素値I(p-d)との差分の値、または該差分の値をスケール調整してなる値を当該画素の画素値とする前処理が好適である。さらに、その前処理は、各撮像画像において、その各画素の画素値と、該画素に対して前記所定の方向で前記画素数dの間隔を存する画素の画素値との差の確率的分布を、上記の正規分布(その中心値(平均値)が0で、且つ、当該画素数d(間隔)に応じた標準偏差または分散を有する正規分布)で近似し得るようなdの値のうちの、最も大きいdの値を用いることが好適である。   In the preprocessing, for each pixel in a predetermined area of each captured image, a pixel value I (p + d) of a pixel having an interval of a certain number of pixels d in the positive direction in the predetermined direction. And a pixel value I (pd) of a pixel having an interval of the number of pixels d in the negative direction in the predetermined direction, or a value obtained by scaling the difference value is a pixel value of the pixel. A pre-processing for setting values is preferable. Further, the pre-processing is performed in each captured image by calculating a stochastic distribution of a difference between a pixel value of each pixel and a pixel value of a pixel having an interval of the number of pixels d in the predetermined direction with respect to the pixel. Among the values of d that can be approximated by the above normal distribution (a normal distribution whose center value (average value) is 0 and has a standard deviation or variance according to the number of pixels d (interval)) It is preferable to use the largest value of d.

そこで、本願の第1発明の画像処理装置は、前記の目的を達成するために、所定の方向で互いに並設された第1の撮像装置と第2の撮像装置とによりそれぞれ撮像された第1の撮像画像および第2の撮像画像の両者に存在する同一物の視差を求めるために、各撮像画像に前処理を施す画像処理装置であって、
前記第1の撮像画像および第2の撮像画像のうちのいずれか一方の撮像画像に対して、当該一方の撮像画像内の複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で画素数dの間隔を存する画素の画素値I(p+d)との差の値の確率的分布を、0の平均値を有すると共に前記画素数dの値に応じた標準偏差を有する正規分布で近似することが可能となる前記画素数dの最大値dmaxを、前記一方の撮像画像において前記所定の方向に間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求める予備処理手段と、
前記各撮像画像の所定の領域内の各画素に対して、前記所定の方向における正の向きに前記最大値dmaxの画素数の間隔を存する画素の画素値I(p+dmax)と、該所定の方向における負の向きに前記最大値dmaxの画素数の間隔を存する画素の画素値I(p-dmax)との差分を求め、その求めた差分の値、または該差分の値をスケール調整してなる値を前記各撮像画像の所定の領域内の各画素の画素値として有する画像を、前記同一物の視差を求めるために用いる前処理後画像データとして得る前処理実行手段とを備えたことを特徴とする(第1発明)。
Therefore, in order to achieve the above object, the image processing apparatus according to the first invention of the present application is first imaged by each of the first imaging device and the second imaging device arranged in parallel in a predetermined direction. In order to obtain the parallax of the same object existing in both the captured image and the second captured image, an image processing device that performs preprocessing on each captured image,
For any one of the first captured image and the second captured image, each pixel value I (p) of the plurality of pixels in the one captured image and each pixel On the other hand, the stochastic distribution of the difference value from the pixel value I (p + d) of the pixel having an interval of the pixel number d in the predetermined direction has an average value of 0 and corresponds to the value of the pixel number d. The maximum value dmax of the number of pixels d that can be approximated by a normal distribution having a standard deviation is used as sampling data of pixel values of a plurality of sets of pixels spaced in the predetermined direction in the one captured image. Preliminary processing means to be determined based on;
For each pixel in a predetermined area of each captured image, a pixel value I (p + dmax) of a pixel having an interval of the number of pixels of the maximum value dmax in a positive direction in the predetermined direction, and the predetermined value A difference from the pixel value I (p-dmax) of a pixel having an interval of the number of pixels of the maximum value dmax in the negative direction is obtained, and the obtained difference value or the difference value is scaled. Preprocessing execution means for obtaining, as preprocessed image data used for obtaining the parallax of the same object, an image having a value obtained as a pixel value of each pixel in a predetermined area of each captured image. (First invention).

かかる第1発明によれば、前記予備処理手段で求めた前記画素数dの最大値dmaxが、前記前処理実行手段による前処理に使用される。すなわち、各撮像画像の所定の領域内の各画素に対して、前記所定の方向(両撮像装置の並列方向)における正の向きに前記最大値dmaxの画素数の間隔を存する画素の画素値I(p+dmax)と、該所定の方向における負の向きに前記最大値dmaxの画素数の間隔を存する画素の画素値I(p-dmax)との差分の値、または該差分の値をスケール調整してなる値を当該画素の画素値とする前処理後画像データが各撮像装置から作成される。このような前処理によって、各撮像画像に含まれるノイズの影響や両撮像画像間の画素値のばらつきの影響を適切に補償し、それらの影響が少ない(S/N比が高い)前処理後画像データを得ることができる。ひいては、その前処理後画像データを用いて視差を検出することにより、その検出精度を高めることができる。また、この場合、個々の撮像装置の特性を事前に用意しておく必要が無いので、第1発明の画像処理装置の汎用性を高めることができる。   According to the first aspect of the invention, the maximum value dmax of the pixel number d obtained by the preliminary processing unit is used for the preprocessing by the preprocessing execution unit. That is, for each pixel in a predetermined region of each captured image, the pixel value I of a pixel having an interval of the number of pixels of the maximum value dmax in the positive direction in the predetermined direction (the parallel direction of both imaging devices). The difference value between (p + dmax) and the pixel value I (p-dmax) of a pixel having an interval of the number of pixels of the maximum value dmax in the negative direction in the predetermined direction, or the difference value is scaled Pre-processed image data having the adjusted value as the pixel value of the pixel is created from each imaging device. By such pre-processing, the influence of noise included in each captured image and the influence of variations in pixel values between both captured images are appropriately compensated, and after such pre-processing that the influence is small (high S / N ratio) Image data can be obtained. As a result, the detection accuracy can be improved by detecting the parallax using the preprocessed image data. In this case, since it is not necessary to prepare the characteristics of the individual imaging devices in advance, the versatility of the image processing device of the first invention can be improved.

なお、第1発明における前記「画素値」は、一般的には輝度値でよいが、撮像画像がカラー画像である場合には、画素値として色相、彩度などを使用してもよい。また、前記「スケール調整」は、前記差分の値に所定のゲインを乗じる処理、あるいは、該差分の値に所定のオフセット値を加える処理、あるいは、それらの処理の合成処理を意味する。これらのことは、後述の第2〜第6発明においても同様である。   Note that the “pixel value” in the first invention may generally be a luminance value, but when the captured image is a color image, hue, saturation, or the like may be used as the pixel value. The “scale adjustment” means a process of multiplying the difference value by a predetermined gain, a process of adding a predetermined offset value to the difference value, or a synthesis process of these processes. The same applies to the second to sixth inventions described later.

ここで、前記したように、第2確率的分布が正規分布で近似される場合、各撮像画像において、複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で画素数dの間隔を存する画素の画素値I(p+d)との差の分散をω2(d2)とし、前記一方の撮像画像の複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で1画素分の間隔を存する画素の画素値I(p+1)との差の分散をω2(12)としたとき、分散ω2(d2)は、分散ω2(12)に画素数dの値を乗じてなる値にほぼ等しくなる。従って、前記第2確率的分布が正規分布で近似され得るような前記画素数dの最大値dmaxは、換言すれば、上記分散ω2(d2)と、分散ω2(12)に画素数dの値を乗じてなる値との差の絶対値が0もしくはこれに近い値になるようなdの最大値dmaxであると考えることもできる。 Here, as described above, when the second stochastic distribution is approximated by a normal distribution, in each captured image, the pixel value I (p) of each of a plurality of pixels and the predetermined value for each pixel The variance of the difference from the pixel value I (p + d) of the pixels having an interval of the number of pixels d in the direction is ω 2 (d 2 ), and the pixel values I (p (p)) of the plurality of pixels of the one captured image ) and, when the pixel value I of a pixel that exists the interval of one pixel in the predetermined direction for each pixel (p + 1) dispersion of the difference between the omega 2 (1 2), distributed omega 2 (d 2 ) is approximately equal to a value obtained by multiplying the variance ω 2 (1 2 ) by the value of the number of pixels d. Accordingly, the maximum value dmax of the number of pixels d such that the second stochastic distribution can be approximated by a normal distribution is, in other words, the pixels in the variance ω 2 (d 2 ) and the variance ω 2 (1 2 ). It can be considered that the maximum value dmax of d is such that the absolute value of the difference from the value obtained by multiplying the value of the number d is 0 or a value close thereto.

そこで、本願の第2発明の画像処理装置は、所定の方向で互いに並設された第1の撮像装置と第2の撮像装置とによりそれぞれ撮像された第1の撮像画像および第2の撮像画像の両者に存在する同一物の視差を求めるために、各撮像画像に前処理を施す画像処理装置であって、
前記第1の撮像画像および第2の撮像画像のうちのいずれか一方の撮像画像に対して、当該一方の撮像画像内の複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で画素数dの間隔を存する画素の画素値I(p+d)との差の分散をω2(d2)とし、前記一方の撮像画像の複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で1画素分の間隔を存する画素の画素値I(p+1)との差の分散をω2(12)としたとき、前記分散ω2(d2)と、前記分散ω2(12)に前記画素数dを乗じてなる値との差の絶対値が所定値よりも小さくなるような前記画素数dの最大値dmaxを、前記一方の撮像画像において前記所定の方向に間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求める予備処理手段と、
前記各撮像画像の所定の領域内の各画素に対して、前記所定の方向における正の向きに前記最大値dmaxの画素数の間隔を存する画素の画素値I(p+dmax)と、該所定の方向における負の向きに前記最大値dmaxの画素数の間隔を存する画素の画素値I(p-dmax)との差分を求め、その求めた差分の値、または該差分の値をスケール調整してなる値を前記各撮像画像の所定の領域内の各画素の画素値として有する画像を、前記同一物の視差を求めるために用いる前処理後画像データとして得る前処理実行手段とを備えたことを特徴とする(第2発明)。
Therefore, the image processing apparatus according to the second invention of the present application includes a first captured image and a second captured image respectively captured by the first imaging device and the second imaging device arranged in parallel in a predetermined direction. In order to obtain the parallax of the same object existing in both, the image processing device that pre-processes each captured image,
For any one of the first captured image and the second captured image, each pixel value I (p) of the plurality of pixels in the one captured image and each pixel On the other hand, the variance of the difference from the pixel value I (p + d) of the pixels having an interval of the number of pixels d in the predetermined direction is ω 2 (d 2 ), and each of the plurality of pixels of the one captured image is The variance of the difference between the pixel value I (p) and the pixel value I (p + 1) of a pixel having an interval of one pixel in the predetermined direction with respect to each pixel is defined as ω 2 (1 2 ). The number of pixels d such that the absolute value of the difference between the variance ω 2 (d 2 ) and the value obtained by multiplying the variance ω 2 (1 2 ) by the number of pixels d is smaller than a predetermined value. Preliminary processing means for obtaining a maximum value dmax based on sampling data of pixel values of a plurality of sets of pixels spaced in the predetermined direction in the one captured image;
For each pixel in a predetermined area of each captured image, a pixel value I (p + dmax) of a pixel having an interval of the number of pixels of the maximum value dmax in a positive direction in the predetermined direction, and the predetermined value A difference from the pixel value I (p-dmax) of a pixel having an interval of the number of pixels of the maximum value dmax in the negative direction is obtained, and the obtained difference value or the difference value is scaled. Preprocessing execution means for obtaining, as preprocessed image data used for obtaining the parallax of the same object, an image having a value obtained as a pixel value of each pixel in a predetermined area of each captured image. (2nd invention).

この第2発明によれば、前記予備処理手段により求められる最大値dmaxは、前記第2確率的分布が正規分布で近似され得るような前記画素数dの最大値に相当するものとなる。従って、この最大値dmaxを使用して前記第1発明と同様に各撮像画像に前処理を施すことにより、前記第1発明と同様の効果を奏することができる。   According to the second aspect of the invention, the maximum value dmax obtained by the preliminary processing means corresponds to the maximum value of the number of pixels d such that the second stochastic distribution can be approximated by a normal distribution. Therefore, by using this maximum value dmax and pre-processing each captured image in the same manner as in the first invention, the same effect as in the first invention can be obtained.

この第2発明では、前記予備処理手段は、例えば次のように前記最大値dmaxを求めればよい。すなわち、前記予備処理手段は、前記分散ω2(12)を、前記一方の撮像画像において前記所定の方向に1画素分の間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求める手段と、前記画素数dの値を2以上の整数値で順次増加させていくように設定しつつ、そのdの値の各設定値に対応する前記分散ω2(d2)を、前記一方の撮像画像において前記所定の方向に当該設定値の画素数の間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求める手段と、前記dの値の各設定値に対応して求めた前記分散ω2(d2)と、前記求めた分散ω2(12)に当該設定値を乗じてなる値との差の絶対値が前記所定値よりも小さいか否かを判断する手段と、その判断結果が否定的になったときのdの値の設定値の1つ前の設定値を前記最大値dmaxとして決定する手段とから構成すればよい(第3発明)。 In the second aspect of the invention, the preliminary processing means may obtain the maximum value dmax as follows, for example. That is, the preliminary processing means obtains the variance ω 2 (1 2 ) based on sampling data of pixel values of a plurality of sets of pixels having an interval of one pixel in the predetermined direction in the one captured image. And the variance ω 2 (d 2 ) corresponding to each set value of the d value is set so that the value of the pixel number d is sequentially increased by an integer value of 2 or more. And a means for obtaining on the basis of sampling data of pixel values of a plurality of sets of pixels having an interval of the number of pixels of the set value in the predetermined direction in the captured image, and obtained in accordance with each set value of the value of d Means for determining whether an absolute value of a difference between the variance ω 2 (d 2 ) and a value obtained by multiplying the calculated variance ω 2 (1 2 ) by the set value is smaller than the predetermined value; , The setting value immediately before the setting value of d when the judgment result is negative It may be composed of a means for determining a serial maximum value dmax (third invention).

この第3発明によれば、まず、前記一方の撮像画像において前記所定の方向に1画素分の間隔を存する複数組の画素の画素値のサンプリングデータに基づいて前記分散ω2(12)が求められる。そして、dの値が2,3,4,……というように順次設定されつつ、その各設定値に対応する前記分散ω2(d2)が、前記一方の撮像画像において前記所定の方向に当該設定値の画素数の間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求められる。さらに、そのdの各設定値に対応して求められた分散ω2(d2)と、前記分散ω2(12)に当該設定値を乗じてなる値との差の絶対値が前記所定値よりも小さいか否か(その差がほぼ0であるか否か)が判断される。この場合、dの値の設定値がある値を超えると、前記第2確率的分布と正規分布との近似度合いが低くなるので、上記判断の結果が否定的となる。そこで、第3発明では、上記判断の結果が否定的となったときのdの値の設定値の1つ前の設定値を前記最大値dmaxとして決定する。これにより、前処理用の最大値dmaxを簡易な探索的手法によって適切に決定できる。 According to the third aspect of the invention, first, the variance ω 2 (1 2 ) is calculated based on sampling data of pixel values of a plurality of sets of pixels having an interval of one pixel in the predetermined direction in the one captured image. Desired. Then, while the value of d is sequentially set as 2, 3, 4,..., The variance ω 2 (d 2 ) corresponding to each set value is set in the predetermined direction in the one captured image. It is obtained based on sampling data of pixel values of a plurality of sets of pixels having an interval of the number of pixels of the set value. Further, the absolute value of the difference between the variance ω 2 (d 2 ) obtained corresponding to each set value of d and the value obtained by multiplying the variance ω 2 (1 2 ) by the set value is the predetermined value. It is determined whether or not the value is smaller than the value (whether or not the difference is substantially zero). In this case, when the set value of d exceeds a certain value, the degree of approximation between the second probabilistic distribution and the normal distribution becomes low, so the result of the above determination becomes negative. Therefore, in the third aspect of the invention, the set value immediately before the set value of d when the above determination is negative is determined as the maximum value dmax. Thereby, the maximum value dmax for preprocessing can be appropriately determined by a simple exploratory method.

前記第1〜第3発明では、前処理用のdの値の最大値dmaxを求めるために、第1の撮像画像および第2撮像画像の一方だけを使用するようにしたが、両者の撮像画像を使用してdmaxの値を決定することもできる。   In the first to third aspects of the invention, only one of the first captured image and the second captured image is used to obtain the maximum value dmax of the d value for preprocessing. Can also be used to determine the value of dmax.

そこで、本願の第4発明の画像処理装置は、所定の方向で互いに並設された第1の撮像装置と第2の撮像装置とによりそれぞれ撮像された第1の撮像画像および第2の撮像画像の両者に存在する同一物の視差を求めるために、各撮像画像に前処理を施す画像処理装置であって、
前記第1の撮像画像および第2の撮像画像のそれぞれに対して、その各撮像画像内の複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で画素数dの間隔を存する画素の画素値I(p+d)との差の値の確率的分布を、0の平均値を有すると共に前記画素数dの値に応じた標準偏差を有する正規分布で近似されるような前記画素数dの最大値dmaxの候補値を、各撮像画像毎に、各撮像画像において前記所定の方向に間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求めると共に、その求めた各撮像画像に対応する前記最大値dmaxの候補値のうちの小さい方の候補値を前処理用の最大値dmaxとして決定する予備処理手段と、
前記各撮像画像の所定の領域内の各画素に対して、前記所定の方向における正の向きに前記前処理用の最大値dmaxの画素数の間隔を存する画素の画素値I(p+dmax)と、該所定の方向における負の向きに前記前処理用の最大値dmaxの間隔を存する画素の画素値I(p-dmax)との差分を求め、その求めた差分の値、または該差分の値をスケール調整してなる値を前記各撮像画像の所定の領域内の各画素の画素値として有する画像を、前記同一物の視差を求めるために用いる前処理後画像データとして得る前処理実行手段とを備えたことを特徴とする(第4発明)。
Accordingly, the image processing apparatus according to the fourth aspect of the present invention provides a first captured image and a second captured image respectively captured by the first imaging device and the second imaging device arranged in parallel in a predetermined direction. In order to obtain the parallax of the same object existing in both, the image processing device that pre-processes each captured image,
For each of the first captured image and the second captured image, a pixel value I (p) of each of the plurality of pixels in each captured image and a pixel in the predetermined direction with respect to each pixel The stochastic distribution of the difference value from the pixel value I (p + d) of pixels having an interval of several d is a normal distribution having an average value of 0 and a standard deviation corresponding to the value of the number of pixels d. A candidate value for the maximum value dmax of the number d of pixels to be approximated is obtained for each captured image based on sampling data of pixel values of a plurality of sets of pixels that are spaced in the predetermined direction in each captured image. And a preliminary processing means for determining a smaller candidate value among the candidate values of the maximum value dmax corresponding to each obtained captured image as the maximum value dmax for preprocessing,
A pixel value I (p + dmax) of a pixel having an interval of the number of pixels of the maximum value dmax for preprocessing in a positive direction in the predetermined direction with respect to each pixel in the predetermined region of each captured image. And the pixel value I (p-dmax) of the pixel having the interval of the maximum value dmax for preprocessing in the negative direction in the predetermined direction, and the difference value obtained or the difference Preprocessing execution means for obtaining an image having a value obtained by adjusting the scale as a pixel value of each pixel in a predetermined area of each captured image as preprocessed image data used for obtaining the parallax of the same object (4th invention).

この第4発明によれば、前記予備処理手段は、各撮像画像毎に、前記最大値dmaxの候補値を求め、それらの候補値のうちの小さい方の候補値を前処理用の最大値dmaxとして決定する。このため、第1の撮像画像および第2の撮像画像のいずれに対しても好適な前処理用の最大値dmaxが決定される。そして、この前処理用の最大値dmaxを使用して、前記第1発明と同様に、各撮像画像に前処理を施すことにより、前記第1発明と同様の効果を奏することができる。   According to the fourth aspect of the invention, the preliminary processing means obtains a candidate value for the maximum value dmax for each captured image, and uses the smaller one of the candidate values as the maximum value dmax for preprocessing. Determine as. Therefore, a suitable preprocessing maximum value dmax is determined for both the first captured image and the second captured image. Then, using the maximum value dmax for preprocessing, the same effect as in the first invention can be obtained by performing preprocessing on each captured image as in the first invention.

また、前記第2発明に関して説明した如く、各撮像画像において、前記第2確率的分布が正規分布で近似され得るような前記画素数dの最大値dmaxは、換言すれば、上記分散ω2(d2)と、分散ω2(12)に画素数dの値を乗じてなる値との差の絶対値が0もしくはこれに近い値になるようなdの最大値dmaxであると考えることもできる。 In addition, as described with reference to the second invention, in each captured image, the maximum value dmax of the number of pixels d such that the second stochastic distribution can be approximated by a normal distribution is, in other words, the variance ω 2 ( The maximum value dmax of d is such that the absolute value of the difference between d 2 ) and the value obtained by multiplying the variance ω 2 (1 2 ) by the value of the number of pixels d is 0 or close to this value. You can also.

そこで、本願の第5発明の画像処理装置は、所定の方向で互いに並設された第1の撮像装置と第2の撮像装置とによりそれぞれ撮像された第1の撮像画像および第2の撮像画像の両者に存在する同一物の視差を求めるために、各撮像画像に前処理を施す画像処理装置であって、
前記第1の撮像画像および第2の撮像画像のそれぞれに対して、その各撮像画像内の複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で画素数dの間隔を存する画素の画素値I(p+d)との差の分散をω2(d2)とし、前記一方の撮像画像の複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で1画素分の間隔を存する画素の画素値I(p+1)との差の分散をω2(12)としたとき、前記分散ω2(d2)と、前記分散ω2(12)に前記画素数dを乗じてなる値との差の絶対値が所定値よりも小さくなるような前記画素数dの最大値dmaxの候補値を、各撮像画像毎に、各撮像画像において前記所定の方向に間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求めると共に、その求めた各撮像画像に対応する前記最大値dmaxの候補値のうちの小さい方の候補値を前処理用の最大値dmaxとして決定する予備処理手段と、
前記各撮像画像の所定の領域内の各画素に対して、前記所定の方向における正の向きに前記前処理用の最大値dmaxの画素数の間隔を存する画素の画素値I(p+dmax)と、該所定の方向における負の向きに前記前処理用の最大値dmax画素数の間隔を存する画素の画素値I(p-dmax)との差分を求め、その求めた差分の値、または該差分の値をスケール調整してなる値を前記各撮像画像の所定の領域内の各画素の画素値として有する画像を、前記同一物の視差を求めるために用いる前処理後画像データとして得る前処理実行手段とを備えたことを特徴とする(第5発明)。
Therefore, an image processing apparatus according to a fifth aspect of the present invention provides a first captured image and a second captured image respectively captured by a first imaging device and a second imaging device arranged in parallel in a predetermined direction. In order to obtain the parallax of the same object existing in both, the image processing device that pre-processes each captured image,
For each of the first captured image and the second captured image, a pixel value I (p) of each of the plurality of pixels in each captured image and a pixel in the predetermined direction with respect to each pixel A variance of a difference from a pixel value I (p + d) of pixels having an interval of several d is ω 2 (d 2 ), and each pixel value I (p) of the plurality of pixels of the one captured image is When the variance of the difference between each pixel and the pixel value I (p + 1) of the pixel having an interval of one pixel in the predetermined direction is ω 2 (1 2 ), the variance ω 2 (d 2 ) and a candidate value for the maximum value dmax of the number of pixels d such that the absolute value of the difference between the variance ω 2 (1 2 ) multiplied by the number of pixels d is smaller than a predetermined value, For each captured image, each captured image is obtained based on sampling data of pixel values of a plurality of sets of pixels that are spaced apart in the predetermined direction. A pretreatment means for determining the smaller candidate values of ones of the candidate values of the maximum value dmax to respond as the maximum value dmax of pretreatment,
A pixel value I (p + dmax) of a pixel having an interval of the number of pixels of the maximum value dmax for preprocessing in a positive direction in the predetermined direction with respect to each pixel in the predetermined region of each captured image. And a pixel value I (p-dmax) of a pixel having an interval of the maximum number of dmax pixels for preprocessing in the negative direction in the predetermined direction, and the difference value obtained or Pre-processing for obtaining, as pre-processed image data, an image having a value obtained by adjusting a difference value as a pixel value of each pixel in a predetermined region of each captured image as a pixel value of the same object And an execution means (fifth invention).

この第5発明によれば、前記予備処理手段により各撮像画像毎に求められる最大値dmaxの候補値は、各撮像画像において、前記第2確率的分布が正規分布で近似され得るような前記画素数dの最大値に相当するものとなる。従って、これらの最大値dmaxの候補値のうちの小さい方の候補値を前処理用の最大値dmaxとして決定することによって、前記第4発明と同様に、第1の撮像画像および第2の撮像画像のいずれに対しても好適な前処理用の最大値dmaxが決定される。そして、この前処理用の最大値dmaxを使用して、前記第1発明と同様に、各撮像画像に前処理を施すことにより、前記第1発明と同様の効果を奏することができる。   According to the fifth aspect of the present invention, the candidate value of the maximum value dmax obtained for each captured image by the preliminary processing means is such that the second stochastic distribution can be approximated by a normal distribution in each captured image. This corresponds to the maximum value of the number d. Therefore, by determining the smaller candidate value of these maximum value dmax candidate values as the preprocessing maximum value dmax, the first captured image and the second captured image are the same as in the fourth aspect of the invention. A pre-processing maximum value dmax suitable for any of the images is determined. Then, using the maximum value dmax for preprocessing, the same effect as in the first invention can be obtained by performing preprocessing on each captured image as in the first invention.

この第5発明では、前記予備処理手段は、前記第3発明と同様の手法によって、各撮像画像毎のdmaxの候補値を決定すればよい。すなわち、前記第5発明では、前記予備処理手段は、前記各撮像画像毎に、前記分散ω2(12)を、各撮像画像ににおいて前記所定の方向に1画素分の間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求める手段と、前記各撮像画像毎に、前記画素数dの値を2以上の整数値で順次増加させていくように設定しつつ、そのdの値の各設定値に対応する前記分散ω2(d2)を、各撮像画像において前記所定の方向に当該設定値の画素数の間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求める手段と、前記各撮像画像毎に、前記dの値の各設定値に対応して求めた前記分散ω2(d2)と、前記求めた分散ω2(12)に当該設定値を乗じてなる値との差の絶対値が前記所定値よりも小さいか否かを判断する手段と、前記撮像画像毎に、その判断結果が否定的になったときのdの値の設定値の1つ前の設定値を各撮像画像に対応する前記最大値dmaxの候補値として決定する手段と、各撮像画像に対応して決定された前記最大値dmaxの候補値のうちの小さい方の候補値を前記前処理用の最大値dmaxとして決定する手段とから構成すればよい(第6発明)。 In the fifth invention, the preliminary processing means may determine the dmax candidate value for each captured image by the same method as in the third invention. That is, in the fifth aspect, the preliminary processing means includes a plurality of sets of the variance ω 2 (1 2 ) for each captured image and an interval of one pixel in the predetermined direction in each captured image. Means for obtaining the sampling value of the pixel value of each pixel, and for each of the captured images, the value of d is set while sequentially increasing the value of the number of pixels d by an integer value of 2 or more. The variance ω 2 (d 2 ) corresponding to each set value is obtained based on sampling data of pixel values of a plurality of sets of pixels having an interval of the number of pixels of the set value in the predetermined direction in each captured image Means, and for each captured image, the variance ω 2 (d 2 ) determined corresponding to each set value of the value of d and the calculated variance ω 2 (1 2 ) are multiplied by the set value. Means for determining whether or not the absolute value of the difference from the value is smaller than the predetermined value; Means for determining, for each captured image, a setting value immediately before the set value of d when the determination result is negative as a candidate value of the maximum value dmax corresponding to each captured image; What is necessary is just to comprise from the means which determines the smaller candidate value of the candidate values of the said maximum value dmax determined corresponding to the captured image as the said maximum value dmax for pre-processing (6th invention).

この第6発明よれば、各撮像画像毎に、前記第3発明と同様の処理によって、dmaxの候補値が決定される。そして、これらの候補値のうちの小さい方の値が前処理用の最大値dmaxとして決定される。従って、前処理用の最大値dmaxを簡易な探索的手法を使用して、適切に決定できる。   According to the sixth aspect of the invention, for each captured image, a dmax candidate value is determined by the same processing as in the third aspect of the invention. The smaller one of these candidate values is determined as the maximum value dmax for preprocessing. Therefore, the maximum value dmax for preprocessing can be appropriately determined using a simple exploratory method.

なお、以上説明した各発明において、各撮像画像の前処理後画像データを用いた視差の検出は、従来と同様の手法を使用して行なえばよい。すなわち、第1の撮像画像および第2の撮像画像のいずれか一方の撮像画像の任意の画素(ある物体の像を捉えている画素)に対し、その画素を含む局所領域の画素値の分布との一致度合いが最大となるような他方の撮像画像の局所領域をSADなどの相関関数を使用して探索することによって、当該一方の撮像画像の画素に対応する他方の撮像画像の画素を決定し、前記所定の方向におけるそれらの画素の位置の差を視差として検出するようにすればよい。この場合、特に演算処理負荷が小さいSADを使用することが好適である。   In each of the inventions described above, the detection of parallax using the preprocessed image data of each captured image may be performed using a method similar to the conventional method. That is, with respect to an arbitrary pixel (a pixel capturing an image of an object) in any one of the first captured image and the second captured image, the distribution of pixel values in the local region including the pixel By searching for a local region of the other captured image that maximizes the degree of coincidence using a correlation function such as SAD, the pixel of the other captured image corresponding to the pixel of the one captured image is determined. The difference between the positions of the pixels in the predetermined direction may be detected as parallax. In this case, it is particularly preferable to use SAD with a small calculation processing load.

本発明の画像処理装置の第1実施形態を図1〜図3を参照して説明する。   A first embodiment of the image processing apparatus of the present invention will be described with reference to FIGS.

図1は本実施形態の装置のシステム構成を示すブロック図である。同図を参照して、本実施形態では、自動車などの車両1の前方に存在する人などの対象物を監視するために、該車両1の前部に2つの撮像装置2R,2Lが搭載されている。撮像装置2R,2Lは、CCDカメラなどにより構成される。これらの撮像装置2R,2Lは、本実施形態では、その光軸を車両1の前後方向に向けて、該車両1の左右方向に並設されている。撮像装置2R,2Lは、それぞれ車両1の前方に向かって右側、左側に存する。そして、車両1には、これらの撮像装置2R,2Lで撮像された画像の映像信号が入力される画像処理ユニット3が搭載されている。この画像処理ユニット3は、マイクロコンピュータなどを含む電子回路ユニットであり、入力された映像信号を基に、車両1の前方側に存在する人などの物体を認識し、その認識した物体の車両1に対する空間的な相対位置を検出するなどの処理を実行する。   FIG. 1 is a block diagram showing the system configuration of the apparatus of this embodiment. With reference to the figure, in the present embodiment, in order to monitor an object such as a person existing in front of a vehicle 1 such as an automobile, two imaging devices 2R and 2L are mounted on the front portion of the vehicle 1. ing. The imaging devices 2R and 2L are configured by a CCD camera or the like. In the present embodiment, these imaging devices 2R and 2L are arranged side by side in the left-right direction of the vehicle 1 with their optical axes directed in the front-rear direction of the vehicle 1. The imaging devices 2R and 2L are located on the right side and the left side of the vehicle 1, respectively. The vehicle 1 is equipped with an image processing unit 3 to which video signals of images taken by these imaging devices 2R and 2L are input. The image processing unit 3 is an electronic circuit unit including a microcomputer and the like, recognizes an object such as a person existing on the front side of the vehicle 1 based on the input video signal, and the vehicle 1 of the recognized object. Processing such as detecting a spatial relative position with respect to is executed.

画像処理ユニット3は、そのハードウェアおよびソフトウェアにより実現される機能として、画像取得部4、画像前処理部5、視差算出部6、物体抽出部7、およびトラッキング部8を備える。   The image processing unit 3 includes an image acquisition unit 4, an image preprocessing unit 5, a parallax calculation unit 6, an object extraction unit 7, and a tracking unit 8 as functions realized by the hardware and software.

ここで、画像処理ユニット3の各部の概略的処理を以下に説明する。   Here, a schematic process of each part of the image processing unit 3 will be described below.

各撮像装置2R,2Lの出力(映像信号)は、所定の処理周期で画像取得部4に取り込まれる。この画像取得部4は、入力された各撮像装置2R,2Lの撮像画像の各画素の映像信号(アナログ信号)をA/D変換し、そのA/D変換したデジタルデータを図示しない画像メモリに記憶保持する。該デジタルデータは、各撮像画像の各画素の画素値を示すデータであり、その画素値は、本実施形態では輝度値である。以降、撮像装置2Rから得られた撮像画像を右画像、撮像装置2Lから得られた撮像画像を左画像という。なお、本実施形態では、これらの右画像および左画像はグレースケール画像である。   Outputs (video signals) of the imaging devices 2R and 2L are taken into the image acquisition unit 4 at a predetermined processing cycle. The image acquisition unit 4 performs A / D conversion on the video signal (analog signal) of each pixel of the input captured images of the imaging devices 2R and 2L, and the A / D converted digital data is stored in an image memory (not shown). Keep in memory. The digital data is data indicating the pixel value of each pixel of each captured image, and the pixel value is a luminance value in the present embodiment. Hereinafter, the captured image obtained from the imaging device 2R is referred to as a right image, and the captured image obtained from the imaging device 2L is referred to as a left image. In the present embodiment, these right image and left image are grayscale images.

このように画像取得部4で画像メモリに記憶保持される右画像および左画像は、画像前処理部5に入力される。この画像前処理部5は、入力された右画像および左画像にそれぞれ後述するように前処理を施し、前処理後画像データを作成する。なお、画像処理ユニット3は、この画像前処理部5の機能によって、本発明の画像処理装置としての機能を実現している。   Thus, the right image and the left image stored and held in the image memory by the image acquisition unit 4 are input to the image preprocessing unit 5. The image preprocessing unit 5 performs preprocessing on the input right image and left image as will be described later, and creates preprocessed image data. The image processing unit 3 realizes the function as the image processing apparatus of the present invention by the function of the image preprocessing unit 5.

上記前処理後画像データは、視差算出部6に入力される。この視差算出部6は、右画像の前処理後画像データと、左画像の前処理後画像データとに基づいて、右画像および左画像のいずれか一方、例えば右画像の各画素で捉えられている物体の視差を検出する。そして、その検出した視差に基づいて、右画像の各画素で捉えられている物体の距離を算出し、所謂、距離マップ(算出した距離を右画像の各画素に対応付けたマップ)を作成する。なお、視差の検出処理の具体的な例は後述する。   The preprocessed image data is input to the parallax calculation unit 6. The parallax calculation unit 6 is captured by one of the right image and the left image, for example, each pixel of the right image, based on the preprocessed image data of the right image and the preprocessed image data of the left image. The parallax of the object is detected. Then, based on the detected parallax, the distance of the object captured by each pixel of the right image is calculated, and a so-called distance map (a map in which the calculated distance is associated with each pixel of the right image) is created. . A specific example of the parallax detection process will be described later.

視差算出部6で算出された距離マップは、物体抽出部7に入力される。この物体抽出部7は、入力された距離マップに基づいて、右画像中に存在する物体を抽出する。例えば、右画像中で、車両1からの距離がほぼ同一(距離差が所定の範囲内)で、且つ、連続している画素群を個々の物体を示すものとして抽出する。   The distance map calculated by the parallax calculation unit 6 is input to the object extraction unit 7. The object extraction unit 7 extracts an object present in the right image based on the input distance map. For example, in the right image, a continuous pixel group having the same distance from the vehicle 1 (distance difference within a predetermined range) and continuous is extracted as an individual object.

この物体抽出部7の出力(個々の物体の右画像での存在領域を示すデータ)は、トラッキング部8に入力される。このトラッキング部8は、互いに異なる時刻で得られた右画像のそれぞれから前記物体抽出部7により抽出された物体同士の同一性を判断し、同一の物体についての時刻間追跡を行なう。具体的には、時刻k1で得られた右画像から抽出された物体Aと、時刻k2で得られた右画像から抽出された物体Bとの同一性を判断し、同一であると判断したときには、物体AとBとの識別ラベルを同一にする。この場合、物体A,Bの同一性は、例えば、物体A,Bの形状や輝度分布(右画像上での輝度分布)などの特徴量を基に判断される。   The output of the object extraction unit 7 (data indicating the existence area in the right image of each object) is input to the tracking unit 8. The tracking unit 8 determines the identity of the objects extracted by the object extracting unit 7 from each of the right images obtained at different times, and performs tracking for the same object for the time. Specifically, the identity of the object A extracted from the right image obtained at time k1 and the object B extracted from the right image obtained at time k2 is determined, and when it is determined that they are the same The identification labels of the objects A and B are the same. In this case, the identity of the objects A and B is determined based on, for example, feature quantities such as the shapes of the objects A and B and the luminance distribution (luminance distribution on the right image).

なお、以上のようにして右画像および左画像を基に抽出された物体の距離情報は、例えばその物体と車両1との接触の可能性の判断などに利用され、接触の可能性が高いと判断された物体については、車両1の運転者に視覚的あるいは聴覚的な報知が行なわれる。あるいは、車両1の補助的な運転操作(ハンドル操作、ブレーキ操作など)が図示しないアクチュエータを介して行なわれる。   Note that the distance information of the object extracted based on the right image and the left image as described above is used, for example, to determine the possibility of contact between the object and the vehicle 1, and the possibility of contact is high. The determined object is visually or audibly notified to the driver of the vehicle 1. Alternatively, an auxiliary driving operation (handle operation, brake operation, etc.) of the vehicle 1 is performed via an actuator (not shown).

次に、前記画像前処理部5の処理を以下に詳細に説明する。まず、画像前処理部5の処理の原理的な説明を行なう。   Next, the processing of the image preprocessing unit 5 will be described in detail below. First, the principle of the processing of the image preprocessing unit 5 will be described.

以降の説明では、右画像および左画像のそれぞれに対して、横方向(左右方向)をx方向、縦方向(上下方向)をy方向とするxy座標系が設定されているものとする。この場合、右画像に対するxy座標系の原点と、左画像に対するxy座標系の原点とは、それぞれ、右画像、左画像に対して同じ位置関係となる点(例えば左右の各画像の左上隅の点や、各画像の中央点など)に設定されているものとする。そして、右画像の位置(x,y)の画素をGR(x,y)、その輝度値をIR(x,y)と表記する。同様に、左画像の位置(x,y)の画素をGL(x,y)、その輝度値をIL(x,y)と表記する。さらに、右画像の前処理後の各画素GR(x,y)の輝度値をIR'(x,y)、左画像の前処理後の各画素GL(x,y)の輝度値をIL'(x,y)と表記する。ただし、右画像と左画像とを区別する必要が無いときは、GR(x,y)、GL(x,y)を代表的にG(x,y)で表し、IR(x,y)、IL(x,y)を代表的にI(x,y)で表し、IR'(x,y)、IL'(x,y)を代表的にI'(x,y)で表す。   In the following description, it is assumed that an xy coordinate system in which the horizontal direction (left-right direction) is the x direction and the vertical direction (up-down direction) is the y direction is set for each of the right image and the left image. In this case, the origin of the xy coordinate system for the right image and the origin of the xy coordinate system for the left image have the same positional relationship with respect to the right image and the left image (for example, the upper left corner of each of the left and right images). Point, the center point of each image, etc.). The pixel at the position (x, y) of the right image is expressed as GR (x, y), and the luminance value is expressed as IR (x, y). Similarly, the pixel at the position (x, y) of the left image is expressed as GL (x, y), and the luminance value is expressed as IL (x, y). Furthermore, the brightness value of each pixel GR (x, y) after preprocessing of the right image is IR ′ (x, y), and the brightness value of each pixel GL (x, y) after preprocessing of the left image is IL ′. Expressed as (x, y). However, when there is no need to distinguish between the right image and the left image, GR (x, y) and GL (x, y) are typically represented by G (x, y), IR (x, y), IL (x, y) is typically represented by I (x, y), and IR ′ (x, y) and IL ′ (x, y) are typically represented by I ′ (x, y).

本実施形態では、撮像装置2R,2Lの並列方向は、x方向であるので、前記視差算出部6で算出すべき視差は、左右の画像間のx方向(左右方向)での視差である。この場合、視差の検出精度を高めるために左右の各画像に施す前処理は、一般的に、次式(1)により表されるものとする。   In this embodiment, since the parallel direction of the imaging devices 2R and 2L is the x direction, the parallax to be calculated by the parallax calculation unit 6 is a parallax in the x direction (left and right direction) between the left and right images. In this case, it is assumed that the preprocessing applied to the left and right images in order to increase the parallax detection accuracy is generally expressed by the following equation (1).


上記式(1)のαは「1」以上のある整数値、ad(d=−α,…,0,…,α)は重み係数である。この式(1)は、画素G(x,y)に対して、その画素G(x,y)からx軸の正方向および負方向にそれぞれ画素数αの間隔を有する範囲内に存する2α+1個の画素(画素G(x-α,y)から画素G(x+α,y)までx方向で連続的に並ぶ画素)のそれぞれの輝度値の重み付き平均値(線形結合値)を、該画素G(x,y)の新たな輝度値I’(x,y)とする前処理を表している。なお、この前処理は、y座標の値には依存しないので、以降の説明では、y座標値をしばしば省略する。例えばI(x,y)をI(x)と略記する。 In the above formula (1), α is a certain integer value of “1” or more, and a d (d = −α,..., 0,..., Α) is a weighting coefficient. This expression (1) is obtained for the pixel G (x, y) with 2α + 1 pixels within a range having an interval of the number of pixels α from the pixel G (x, y) in the positive direction and the negative direction of the x axis. Weighted average values (linear combination values) of the respective luminance values of the pixels (pixels continuously arranged in the x direction from the pixel G (x−α, y) to the pixel G (x + α, y)), This represents preprocessing for setting a new luminance value I ′ (x, y) of the pixel G (x, y). Note that this preprocessing does not depend on the value of the y coordinate, and therefore the y coordinate value is often omitted in the following description. For example, I (x, y) is abbreviated as I (x).

式(1)により表される前処理は、重み係数adの組(これは一般にオペレータといわれる)により規定される。本実施形態では、このような式(1)により表現される前処理のうち、該前処理により得られる画像データ(より詳しくは右画像の前処理後の輝度値IR’(x,y)から構成されるデータと左画像の前処理後の輝度値IL’(x,y)から構成されるデータとの組)から、できるだけ視差を精度よく検出し得ると考えられる重み係数adの組を用いて、左右の各画像の前処理を行なう。そのような前処理は、以下の式(2)、(3)で表現される確率モデルに基づいて決定される。 The preprocessing represented by equation (1) is defined by a set of weighting factors a d (this is commonly referred to as an operator). In the present embodiment, among the preprocessing expressed by the equation (1), image data obtained by the preprocessing (more specifically, from the luminance value IR ′ (x, y) after the preprocessing of the right image). A set of weighting factors a d that are considered to be able to detect parallax with as high accuracy as possible from a set of data and data composed of luminance values IL ′ (x, y) after preprocessing of the left image) And pre-process the left and right images. Such pre-processing is determined based on a probability model expressed by the following equations (2) and (3).


IL(x)=IR(x)+ε(x) ,ε(x)≒N(μ,σ) ……(2)
I(x+d)=I(x)+τ(d) ,τ(d)≒N(0,ω(d2)) ……(3)

これらの式(2)、(3)において、N(a,b)(a,bは一般変数)は、中心値(平均値)および標準偏差がそれぞれa,bである正規分布関数を意味する。そして、式(2)は、右画像の画素GR(x,y)と、左画像の画素GL(x,y)とに視差0で同じ物体の像が捉えられているとした場合に、画素GR(x,y)、GL(x,y)のそれぞれの輝度値IR(x,y)、IL(x,y)との差ε(x)の確率的な分布が、中心値(平均値)および標準偏差をそれぞれμ,σとする正規分布関数N(μ,σ)で近似されることを意味する。この場合、ε(x)は、撮像装置2R,2Lの特性の違いなどに起因するノイズに相当している。式(2)では、そのノイズが、輝度値IL(x,y)と輝度値IR(x,y)と間に平均的にμのオフセットを生じさせ、且つ、そのオフセットの分散(ばらつき)がσ2となる正規分布状のノイズとして表現されている。

IL (x) = IR (x) + ε (x), ε (x) ≒ N (μ, σ) (2)
I (x + d) = I (x) + τ (d), τ (d) ≈N (0, ω (d 2 )) (3)

In these formulas (2) and (3), N (a, b) (a and b are general variables) means a normal distribution function whose median (average value) and standard deviation are a and b, respectively. . Equation (2) is obtained when the same object image is captured with parallax 0 between the pixel GR (x, y) of the right image and the pixel GL (x, y) of the left image. The probabilistic distribution of the difference ε (x) from the respective luminance values IR (x, y) and IL (x, y) of GR (x, y) and GL (x, y) is the center value (average value) ) And standard deviation are respectively approximated by a normal distribution function N (μ, σ) with μ and σ. In this case, ε (x) corresponds to noise caused by a difference in characteristics between the imaging devices 2R and 2L. In Equation (2), the noise causes an average offset of μ between the luminance value IL (x, y) and the luminance value IR (x, y), and the variance (variation) of the offset is It is expressed as noise with a normal distribution of σ 2 .

また、式(3)におけるω(d2)は、その値がdの絶対値の増加に伴い単調に増加する関数を意味する。なお、d=0のときには、ω(d2)=0とする。従って、式(3)は、左右の各画像において、x方向にd画素だけ離れた2つの画素G(x,y)、G(x+d,y)が比較的近い場合に、それらの画素G(x,y)、G(x+d,y)の輝度値I(x,y)、I(x+d,y)の差τ(d)の確率的な分布が、中心値(平均値)および標準偏差をそれぞれ0,ω(d2)とする正規分布関数で近似され、且つ、その差τ(d)の値の分散(ばらつき)ω2(d2)が、dの絶対値が大きくなるに従って(画素G(x,y)、G(x+d,y)が離れるに従って)、大きくなることを表現している。この式(3)は、換言すれば、画素G(x,y)、G(x+d,y)が互いに近い画素である場合(dの絶対値が「1」に近い場合)には、それらの画素G(x,y)、G(x+d,y)に同一の物体の像が捉えられている確率が高く、ひいては、それらの輝度値I(x,y)、I(x+d,y)の差τ(d)が、0に近い値になる確率が高いということを表現している。さらに、式(3)は、画素G(x,y)、G(x+d,y)が離れているほど、画素G(x,y)、G(x+d,y)でそれぞれ捉えられている物体が互いに異なる確率が高まり、ひいては、それらの輝度値I(x,y)、I(x+d,y)の差τ(d)の絶対値が大きくなる確率が高くなるということを表現している。 Further, ω (d 2 ) in the equation (3) means a function whose value increases monotonously as the absolute value of d increases. Note that ω (d 2 ) = 0 when d = 0. Therefore, the expression (3) is obtained when the two pixels G (x, y) and G (x + d, y) separated by d pixels in the x direction are relatively close in the left and right images. The probabilistic distribution of the difference τ (d) between the luminance values I (x, y) and I (x + d, y) of G (x, y) and G (x + d, y) Value) and standard deviation are approximated by a normal distribution function with 0 and ω (d 2 ), respectively, and the variance (variation) ω 2 (d 2 ) of the difference τ (d) is the absolute value of d Is expressed as the value of G increases (as pixels G (x, y) and G (x + d, y) increase). In other words, this expression (3) is obtained when the pixels G (x, y) and G (x + d, y) are close to each other (when the absolute value of d is close to “1”). There is a high probability that an image of the same object is captured at the pixels G (x, y) and G (x + d, y), and as a result, their luminance values I (x, y) and I (x + It expresses that the difference τ (d) between d, y) has a high probability of becoming a value close to zero. Furthermore, the expression (3) is captured by the pixels G (x, y) and G (x + d, y) as the pixels G (x, y) and G (x + d, y) are further away from each other. The probability that different objects are different from each other increases, and the probability that the absolute value of the difference τ (d) between the luminance values I (x, y) and I (x + d, y) increases will increase. expressing.

前記式(1)、(2)、(3)を前提としたとき、左右の各画像に前記式(1)による前処理を施した後の画像データ(前処理後画像データ)のS/N比は、次式(4)で示すように、同式(4)の右辺の式で表される量と相関性を有する。   When the above equations (1), (2), and (3) are assumed, the S / N of the image data (preprocessed image data) after the left and right images are preprocessed by the equation (1). The ratio has a correlation with the amount represented by the expression on the right side of the expression (4), as shown by the following expression (4).

すなわち、S/N比の2乗値は、式(4)の右辺の式により表される量に比例する。この式(4)の右辺の分母は、右画像の前処理後の画像データにおける画素GR(x,y)の輝度値IR’(x,y)と、左画像の前処理後の画像データにおける画素GL(x,y)の輝度値IL’(x,y)との差の分散に応じた量を示す。この量は、前記式(2)のεの分散(ばらつき)に依存する量である。また、式(4)の右辺の分子は、左右の画像のそれぞれの前処理後の各画像データにおいてx方向に間隔を存する画素G(x,y)、G(x+d,y)間の輝度値の差(変化量)の分散に応じた量を示す。この量は、前記式(3)のτの分散(ばらつき)に依存する量である。   That is, the square value of the S / N ratio is proportional to the amount represented by the expression on the right side of Expression (4). The denominator of the right side of this equation (4) is the luminance value IR ′ (x, y) of the pixel GR (x, y) in the preprocessed image data of the right image and the preprocessed image data of the left image. An amount corresponding to the variance of the difference between the luminance value IL ′ (x, y) of the pixel GL (x, y) is shown. This amount depends on the dispersion (variation) of ε in the equation (2). In addition, the numerator on the right side of Expression (4) is the pixel G (x, y), G (x + d, y) that is spaced in the x direction in each image data after preprocessing of the left and right images. An amount corresponding to the variance of the difference (change amount) in luminance value is shown. This amount depends on the dispersion (variation) of τ in the equation (3).

ここで、左右の画像の前処理後の画像データから視差(本実施形態ではx方向の視差)を精度よく検出するためには、
(A)右画像の前処理後の画像データと左画像の前処理後の画像データとの間での輝度値の差のばらつきができるだけ小さいこと
(B)右画像の前処理後の画像データと左画像の前処理後の画像データとの間での輝度値の差の平均値ができるだけ0に近いこと
(C)前処理後の左右の各画像データにおいて、x方向における輝度値の変化が顕著に現れやすいこと
が好ましい。この場合、上記(A)の条件から、式(4)の右辺の分母の値ができるだけ小さいことが要求される。また、上記(C)の条件から、式(4)の右辺の分子の値ができるだけ大きいことが要求される。さらに、前記(B)の条件から、少なくとも前記式(1)の重み係数ad(d=−α,…,0,…,α)の総和Σad=a+…+a0+…+aαが「0」であることが要求される。
Here, in order to accurately detect the parallax (parallax in the x direction in the present embodiment) from the image data after the preprocessing of the left and right images,
(A) The variation in luminance value difference between the pre-processed image data of the right image and the pre-processed image data of the left image is as small as possible. (B) The pre-processed image data of the right image The average value of the difference in luminance value with the pre-processed image data of the left image is as close to 0 as possible (C) In the left and right image data after the pre-processing, the change in the luminance value in the x direction is remarkable. It is preferable that it appears easily. In this case, the value of the denominator on the right side of Equation (4) is required to be as small as possible from the above condition (A). Further, from the condition (C), it is required that the value of the numerator on the right side of the formula (4) is as large as possible. Further, from the condition (B), at least the sum Σa d = a −α +... + A 0 +... + A of the weight coefficients a d (d = −α,..., 0,. It is required that α is “0”.

これらの要求をできるだけ満たすように、前記式(1)の重み係数adの組(前処理のオペレータ)を設定して、そのオペレータを使用した前処理を左右の各画像に対して施すことによって、その前処理後の画像データのS/N比を高め、ひいては、視差の検出精度を高めることができる。 In order to satisfy these requirements as much as possible, a set of weight coefficients a d (pre-processing operator) in the above equation (1) is set, and pre-processing using the operator is performed on the left and right images. Thus, the S / N ratio of the pre-processed image data can be increased, and as a result, the detection accuracy of parallax can be increased.

上記の要求を満たす重み係数adの組は、次式(5)により与えられる。そして、このとき、前記式(1)は、次式(6)となる。 A set of weighting factors a d satisfying the above requirements is given by the following equation (5). At this time, the expression (1) becomes the following expression (6).


d≠±αであるadに対して、ad=0
d=±αであるadに対して、ad=±1(複合同順)
……(5)

I’(x,y)=I(x+α,y)−I(x-α,y) ……(6)

このようにして得られた前処理の式(6)は、x方向の視差の検出精度を高める(前処理後の画像データのS/N比を高める)ためには、できるだけx方向で離れた画素の輝度値の差をとるような前処理を、左右の各画像に施すことが良いことを示している。

with respect to a d ≠ ± α a d, a d = 0
against d = a ± α a d, a d = ± 1 ( Composite same order)
...... (5)

I ′ (x, y) = I (x + α, y) −I (x−α, y) (6)

The pre-processing equation (6) thus obtained is separated as much as possible in the x-direction in order to improve the detection accuracy of the parallax in the x-direction (increase the S / N ratio of the image data after the pre-processing). This shows that it is preferable to perform preprocessing such as taking a difference in luminance values of pixels on the left and right images.

ただし、式(6)は、前記式(2)、(3)の確率モデルを前提として得られたものである。そして、特に前記式(3)の確率モデルは、一般に、dの絶対値が大き過ぎると、実際の事象との乖離が生じる。従って、式(6)の前処理によってS/N比が高くなる画像データを好適に得るためには、式(3)の確率モデルが近似的に成立し得るdの最大値(限界値)を式(6)のαの値として用いることが好ましい。   However, Expression (6) is obtained on the assumption of the probability models of Expressions (2) and (3). In particular, in the probability model of the formula (3), generally, when the absolute value of d is too large, a deviation from an actual event occurs. Therefore, in order to suitably obtain image data in which the S / N ratio is increased by the preprocessing of Expression (6), the maximum value (limit value) of d at which the probability model of Expression (3) can be approximately established is set. It is preferable to use as the value of α in formula (6).

そこで、本実施形態では、式(3)の確率モデルが近似的に成立し得るdの最大値dmax(>0)を式(6)のαの値としてなる次式(7)によって、左右の各画像に前処理を施すこととする。   Therefore, in the present embodiment, the left and right sides of the left and right are expressed by the following equation (7) in which the maximum value dmax (> 0) of d that the probability model of equation (3) can approximately hold is used as the value of α in equation (6). Each image is preprocessed.


I’(x,y)=I(x+dmax,y)−I(x-dmax,y) ……(7)

この式(7)の前処理におけるdの最大値dmaxは、次のようにして決定できる。まず、前記式(3)の確率モデルによれば、輝度値I(x+d)、I(x)の差τの分散ω2(d2)に関して、次式(8)が成立する。

I '(x, y) = I (x + dmax, y) -I (x-dmax, y) (7)

The maximum value dmax of d in the preprocessing of the equation (7) can be determined as follows. First, according to the probability model of the equation (3), the following equation (8) is established for the variance ω 2 (d 2 ) of the difference τ between the luminance values I (x + d) and I (x).


ω2(d2)=d・ω2(12) ……(8)

すなわち、式(3)の確率モデルが成立する場合、左右の各画像において、x方向にd画素だけ離れた2つの画素G(x+d,y)、G(x,y)の輝度値の差の分散ω2(d2)は、x方向に1画素だけ離れた2つの画素G(x+1,y)、G(x,y)(x方向で隣接する2つの画素)の輝度値の差の分散ω2(12)のd倍となる。従って、ある値のdに対して、式(3)の確率モデルが近似的に成立するか否かは、ω2(d2)とd・ω2(12)とがほぼ等しいか否か(それらの差がほぼ0であるか否か)によって、判断することが可能である。具体的には、ある値のdに対して、次式(9)の不等式が成立するか否かによって、式(3)の確率モデルが近似的に成立するか否かを判断することができる。なお、式(9)の「c」は0近傍の所定値(>0)である。

ω 2 (d 2 ) = d · ω 2 (1 2 ) (8)

That is, when the probability model of Expression (3) is established, the luminance values of two pixels G (x + d, y) and G (x, y) separated by d pixels in the x direction in the left and right images. Difference variance ω 2 (d 2 ) is a luminance value of two pixels G (x + 1, y) and G (x, y) (two pixels adjacent in the x direction) separated by one pixel in the x direction. Of the difference ω 2 (1 2 ). Therefore, whether or not the probability model of Equation (3) is approximately established for a certain value d is whether ω 2 (d 2 ) and d · ω 2 (1 2 ) are substantially equal. Judgment can be made by (whether or not the difference between them is substantially zero). Specifically, whether or not the probability model of the equation (3) is approximately established can be determined by whether or not the inequality of the following equation (9) is established for a certain value d. . Note that “c” in the equation (9) is a predetermined value in the vicinity of 0 (> 0).


|ω2(d2)−d・ω2(12)|<c ……(9)

また、任意のdの値に対して、分散ω2(d2)は、前記式(3)のτの分散であるので、撮像装置2R,2Lからそれぞれ取得した右画像または左画像の輝度値I(x,y)のサンプリングデータを使用して、次式(10)により求めることができる。

| Ω 2 (d 2 ) −d · ω 2 (1 2 ) | <c (9)

Also, for any value of d, the variance ω 2 (d 2 ) is the variance of τ in the above equation (3), so the luminance values of the right image and the left image acquired from the imaging devices 2R and 2L, respectively. Using the sampling data of I (x, y), it can be obtained by the following equation (10).


なお、Nは、輝度値I(x+d),I(x)の組のサンプリングデータ数である。そして、式(10)の右辺の分母は、各サンプリングデータにおける輝度値I(x+d),I(x)の差の2乗値の総和を意味する。補足すると、この式(10)により求められる分散ω2(d2)は、標本分散である。 N is the number of sampling data of a set of luminance values I (x + d) and I (x). The denominator on the right side of Equation (10) means the sum of the squares of the differences between the luminance values I (x + d) and I (x) in each sampling data. Supplementally, the variance ω 2 (d 2 ) obtained by this equation (10) is the sample variance.

従って、dの値を「1」から順番に仮設定して、式(10)によりω2(d2)を求め、式(9)の不等式を満たすか否かを判断することによって、式(3)の確率モデルが近似的に成立し得るdの最大値dmaxを探索的に決定することができる。なお、dの値が「1」であるときは、式(9)の不等式が成立することは自明であるので、実際上は、dの値を2以上の整数値に設定した場合にのみ、式(9)の不等式を満たすか否かを判断すればよい。 Accordingly, the value of d is provisionally set in order from “1”, ω 2 (d 2 ) is obtained by the equation (10), and whether or not the inequality of the equation (9) is satisfied is determined. The maximum value dmax of d for which the probability model of 3) can be approximately established can be determined in an exploratory manner. Note that when the value of d is “1”, it is obvious that the inequality of equation (9) holds, so in practice, only when the value of d is set to an integer value of 2 or more, What is necessary is just to judge whether the inequality of Formula (9) is satisfy | filled.

以上説明したことを基礎として、画像前処理部5の処理を具体的に説明する。   Based on what has been described above, the processing of the image preprocessing unit 5 will be specifically described.

画像前処理部5は、図2のフローチャートで示すように、左右の各画像に対する前処理を実行する。   As shown in the flowchart of FIG. 2, the image preprocessing unit 5 performs preprocessing for the left and right images.

画像前処理部5は、まず、前記画像取得部4で取得された右画像および左画像のうちのいずれか一方、例えば右画像の輝度値I(x,y)のデータを基に、前記式(10)の右辺の演算により、前記式(3)の確率モデルのdの値を「1」としたときの分散ω2(12)を求める(STEP1)。すなわち、右画像において、x方向に互いに隣接する画素GR(x+1,y),GR(x,y)の輝度値の差(I(x+1,y)−I(x,y))の分散を求める。この場合、本実施形態では、例えば右画像の全領域における画素GR(x+1,y),GR(x,y)の全ての組を式(10)の演算のサンプル対象とし、そのサンプル対象の各組の画素の輝度値(I(x+1,y),I(x,y))が分散ω2(12)の算出のためのサンプリングデータとして用いられる。 First, the image preprocessing unit 5 uses the above formula based on the data of the luminance value I (x, y) of one of the right image and the left image acquired by the image acquisition unit 4, for example, the right image. By calculating the right side of (10), the variance ω 2 (1 2 ) when the value of d in the probability model of Equation (3) is “1” is obtained (STEP 1). That is, in the right image, the difference in luminance values (I (x + 1, y) −I (x, y)) of pixels GR (x + 1, y) and GR (x, y) adjacent to each other in the x direction. Find the variance of. In this case, in this embodiment, for example, all sets of pixels GR (x + 1, y) and GR (x, y) in the entire region of the right image are set as sample targets for the calculation of Expression (10), and the sample targets The luminance values (I (x + 1, y), I (x, y)) of each set of pixels are used as sampling data for calculating the variance ω 2 (1 2 ).

次いで、画像前処理部5は、前記最大値dmaxの仮値として、「1」を設定し(STEP2)、さらに、分散ω2(d2)を算出しようとするdの値として、最大値dmaxの現在値(直前のSTEP2で設定された仮値)から「1」だけ増加させた値を設定する(STEP3)。そして、画像前処理部5は、このSTEP3で設定したdの値(=dmax+1。これは2以上の整数値である)に対して、分散ω2(d2)を算出する(STEP4)。この場合、前記STEP1の場合と同様に、右画像の全領域における画素GR(x+d,y),GR(x,y)の全ての組を式(10)の演算のサンプル対象とし、そのサンプル対象の各組の画素の輝度値(I(x+d,y),I(x,y))が分散ω2(d2)の算出のためのサンプリングデータとして用いられる。 Next, the image preprocessing unit 5 sets “1” as the provisional value of the maximum value dmax (STEP 2), and further sets the maximum value dmax as the value of d for which the variance ω 2 (d 2 ) is to be calculated. Is set to a value increased by “1” from the current value (temporary value set in the immediately preceding STEP 2) (STEP 3). Then, the image preprocessing unit 5 calculates the variance ω 2 (d 2 ) with respect to the value of d set in STEP 3 (= dmax + 1, which is an integer value of 2 or more) (STEP 4). In this case, as in the case of STEP 1, all the sets of pixels GR (x + d, y) and GR (x, y) in the entire region of the right image are sampled for the calculation of Expression (10), The luminance values (I (x + d, y), I (x, y)) of each set of pixels to be sampled are used as sampling data for calculating the variance ω 2 (d 2 ).

次いで画像前処理部5は、STEP1で求めた分散ω2(12)とSTEP4で求めた分散ω2(d2)とに対して、前記式(9)の不等式が成立するか否かを判断する(STEP5)。この判断結果が肯定的である場合には、画像前処理部5は、最大値dmaxの仮値として、現在のdの値(最新のSTEP3の処理により決定された値)を設定する(STEP6)。換言すれば、最大値dmaxの仮値を、現在値から「1」だけ増加させる。そして、画像前処理部5は、前記STEP3からの処理を再度実行する。 Next, the image preprocessing unit 5 determines whether or not the inequality of the equation (9) is established for the variance ω 2 (1 2 ) obtained in STEP 1 and the variance ω 2 (d 2 ) obtained in STEP 4. Judgment is made (STEP 5). If the determination result is affirmative, the image preprocessing unit 5 sets the current value of d (value determined by the latest processing of STEP 3) as the provisional value of the maximum value dmax (STEP 6). . In other words, the provisional value of the maximum value dmax is increased by “1” from the current value. Then, the image preprocessing unit 5 executes the processing from STEP3 again.

このようにして、STEP3〜6の処理が繰り返されることにより、STEP4で分散ω2(d2)を求めるときのdの値が2以上の整数値で「1」づつ増加されていく。そして、dの値が、ある値を超えると、前記STEP5の判断結果が否定的になる。このようにSTEP5の判断結果が否定的になると、dmaxの現在値(これはdの値の現在値の1つ前の値である)が、最終的に前記式(7)の前処理に使用するdmaxの値として確定される(STEP7)。これにより、前記式(3)の確率モデルが近似的に成立するようなdの最大値dmaxが、右画像の輝度値のデータを基に探索的に決定される。 In this way, by repeating the processing of STEP 3 to STEP 6, the value of d when obtaining the variance ω 2 (d 2 ) in STEP 4 is incremented by “1” as an integer value of 2 or more. When the value of d exceeds a certain value, the determination result in STEP5 becomes negative. Thus, when the determination result in STEP 5 becomes negative, the current value of dmax (this is the value immediately before the current value of d) is finally used for the preprocessing of the equation (7). The value of dmax to be determined is determined (STEP 7). As a result, the maximum value dmax of d that approximately establishes the probability model of Equation (3) is determined exploratively based on the luminance value data of the right image.

このように最大値dmaxを確定した後、画像前処理部5は、左右の各画像に対して、前記式(7)の前処理を施す(STEP8)。   After determining the maximum value dmax in this way, the image preprocessing unit 5 performs the preprocessing of the equation (7) on the left and right images (STEP 8).

以上が、本実施形態における画像前処理部5の処理の詳細である。このような前処理によって、高いS/N比を有して、視差の算出に適した前処理後画像データが得られる。なお、前記STEP1〜7の処理は、前記第1〜第3発明における予備処理手段を構成する処理である。また、STEP8は、前記第1〜第3発明における前処理実行手段を構成する処理である。   The above is the details of the processing of the image preprocessing unit 5 in the present embodiment. By such pre-processing, post-processed image data having a high S / N ratio and suitable for parallax calculation is obtained. Note that the processing of STEP 1 to STEP 7 is processing constituting the preliminary processing means in the first to third inventions. STEP 8 is a process constituting the pre-processing execution means in the first to third inventions.

図3は、このような前処理により得られる前処理後画像データの画像を概略的に例示する図である。具体的には、図3(a)は、撮像装置2Rで撮像された右画像を示している。この例では、右画像には、撮像装置2R,2Lを搭載している車両(自車両)が走行している2車線の道路20と、該車両の前方を走行している他車両21と、道路20の両側の存在する林22とが撮像されている。なお、左画像の図示は省略するが、その左画像においても道路20、他車両21および林22が撮像されている。   FIG. 3 is a diagram schematically illustrating an image of preprocessed image data obtained by such preprocessing. Specifically, FIG. 3A shows a right image captured by the imaging device 2R. In this example, the right image includes a two-lane road 20 on which a vehicle (own vehicle) carrying the imaging devices 2R and 2L is traveling, and another vehicle 21 traveling in front of the vehicle, The forests 22 existing on both sides of the road 20 are imaged. In addition, although illustration of a left image is abbreviate | omitted, the road 20, the other vehicle 21, and the forest 22 are imaged also in the left image.

図3(b)は、図3(a)の右画像に前処理を施してなる画像データの画像を示している。図示のように、該画像データは、右画像に写っている物体の輪郭が比較的顕著に現れるような画像となっている。   FIG. 3B shows an image of image data obtained by performing preprocessing on the right image of FIG. As shown in the figure, the image data is an image in which the contour of the object shown in the right image appears relatively remarkably.

補足すると、本実施形態では、前記式(10)により分散ω2(d2)(d=1の場合を含む)を求めるときに、右画像を使用したが、左画像を使用してもよい。また、分散ω2(d2)を求めるときのサンプル対象として、右画像の全領域における画素GR(x+d,y),GR(x,y)の全ての組を使用したが、左右いずれかの画像の一部の領域(例えば画像の周縁領域を除いた領域)内の複数組の画素をサンプル対象としてもよい。この場合、左右の各画像の2値化処理などにより、各画像中の物体の存在箇所を概略的に認識するようにした場合には、その認識した存在箇所を含む領域内の複数組の画素をサンプル対象として、分散ω2(d2)を求めるようにしてもよい。 Supplementally, in the present embodiment, the right image is used when the variance ω 2 (d 2 ) (including the case where d = 1) is obtained by the equation (10), but the left image may be used. . In addition, as a sample object when obtaining the variance ω 2 (d 2 ), all the sets of the pixels GR (x + d, y) and GR (x, y) in the entire region of the right image are used. A plurality of sets of pixels in a partial region of the image (for example, a region excluding the peripheral region of the image) may be sampled. In this case, when the location of the object in each image is roughly recognized by binarization processing of the left and right images, a plurality of sets of pixels in the region including the recognized location May be obtained as a sample object, and the variance ω 2 (d 2 ) may be obtained.

また、本実施形態では、左右の各画像の全領域の画素に対して、単一のdmaxの値を使用して前処理を行なうようにしたが、各画像のx方向に並ぶ画素の列毎に、各別に決定したdmaxの値を使用して、前処理を行なうようにしてもよい。この場合には、右画像または左画像のx方向の各列の画像データを基に、前記図2のSTEP1〜STEP7の処理を実行することによって、x方向の各列毎のdmaxの値を決定するようにすればよい。そして、左右の各画像に対して、x方向の各列毎に、決定したdmaxの値を用いて前記式(7)の前処理を実行するようにすればよい。   In the present embodiment, the preprocessing is performed using the single dmax value for the pixels in the entire region of each of the left and right images, but for each column of pixels arranged in the x direction of each image. Alternatively, pre-processing may be performed using the value of dmax determined separately. In this case, the dmax value for each column in the x direction is determined by executing the processing in STEP 1 to STEP 7 in FIG. 2 based on the image data in each column in the x direction of the right image or the left image. You just have to do it. Then, the preprocessing of Expression (7) may be executed for the left and right images using the determined dmax value for each column in the x direction.

前記したように画像前処理部5で求められた前処理後画像データを使用して、前記視差算出部6の処理は例えば次のように行なわれる。   Using the preprocessed image data obtained by the image preprocessing unit 5 as described above, the processing of the parallax calculation unit 6 is performed as follows, for example.

左右の各画像の前処理後画像データのうちのいずれか一方、例えば、右画像の前処理後画像データにおける各画素GR(x,y)に対して、その画素GR(x,y)を中心とする所定サイズの相関性判断領域(例えば長方形の局所領域)が右画像の前処理後画像データの画像内に設定される。そして、左画像の前処理後画像データの画像に対して、所定サイズの探索領域が設定される。この探索領域は、相関性判断領域よりもx方向に広い領域で、且つその内部に相関性判断領域内の画像データと同等の画像データが含まれるような領域に設定される。   Either one of the pre-processed image data of each of the left and right images, for example, each pixel GR (x, y) in the pre-processed image data of the right image is centered on that pixel GR (x, y) Is set in the image of the preprocessed image data of the right image. Then, a search area of a predetermined size is set for the image of the preprocessed image data of the left image. This search area is set to an area that is wider in the x direction than the correlation determination area and includes image data equivalent to the image data in the correlation determination area.

そして、左画像の前処理後画像データの画像の探索領域内で、右画像の前処理後画像データの画像の相関性判断領域内の輝度値の分布に最も一致するような輝度値分布を有する領域(相関性判断領域と同一のサイズの局所領域)を、SADなどの公知の相関演算手法によって探索し、その探索された領域の中心点に対応する左画像の画素GL(x',y)が、相関性判断領域の中心点に対応する右画像の画素と同じ物体を捉えている画素として決定される。   And, in the search area of the image of the pre-processed image data of the left image, the brightness value distribution that best matches the distribution of the brightness value in the correlation determination area of the image of the pre-processed image data of the right image A region (a local region having the same size as the correlation determination region) is searched by a known correlation calculation method such as SAD, and the pixel GL (x ′, y) of the left image corresponding to the center point of the searched region Is determined as a pixel capturing the same object as the pixel of the right image corresponding to the center point of the correlation determination area.

さらに、このようにして、右画像の各画素GR(x,y)に対応して決定される左画像の画素GL(x',y)のx座標値x'と、右画像の画素GR(x,y)のx座標値xとの差(x'−x)[ピクセル]が、右画像の画素GR(x,y)で捉えられている物体に関する左右の画像間の視差Δとして算出される。   Further, in this way, the x coordinate value x ′ of the pixel GL (x ′, y) of the left image determined corresponding to each pixel GR (x, y) of the right image and the pixel GR ( The difference (x′−x) [pixel] from the x coordinate value x of x, y) is calculated as the parallax Δ between the left and right images related to the object captured by the pixel GR (x, y) of the right image. The

さらに、その視差Δから、次式(11)によって、右画像の画素GR(x,y)で捉えられている物体の車両1からの距離zが算出される。   Furthermore, the distance z from the vehicle 1 of the object captured by the pixel GR (x, y) of the right image is calculated from the parallax Δ by the following equation (11).


z=(f×D)/(Δ×p) ……(11)

なお、fは撮像装置2R,2Lの焦点距離、Dは撮像装置2R,2Lの基線長(光軸の間隔)、pは画素ピッチ(1画素分の長さ)である。

z = (f × D) / (Δ × p) (11)

Note that f is the focal length of the imaging devices 2R and 2L, D is the base line length (interval of the optical axis) of the imaging devices 2R and 2L, and p is the pixel pitch (length of one pixel).

以上説明した視差算出部6の処理によって、前記距離マップが作成されることとなる。   The distance map is created by the processing of the parallax calculation unit 6 described above.

この視差算出部6の処理では、前記式(7)の前処理によって得られた前処理後画像データを用いているので、視差を精度よく検出することができる。   In the process of the parallax calculation unit 6, the preprocessed image data obtained by the preprocess of the equation (7) is used, so that the parallax can be detected with high accuracy.

このことを検証するために、本願発明者は、車両1を静止させた状態で、該車両1の前方に該車両1から6m離れた位置に他車両を配置し、撮像装置2R,2Lにより得られた右画像および左画像の前処理後画像データから、該他車両に関する視差を前述の手法によって算出した。さらに、これと比較するために、撮像装置6R,6Lにより得られた右画像および左画像をそのまま用いて、該他車両に関する視差を算出した。そして、それらの視差の、実際の距離から換算される視差(視差の真値)に対する誤差の二乗和を算出した。   In order to verify this, the inventor of the present application places another vehicle in a position 6 m away from the vehicle 1 in front of the vehicle 1 while the vehicle 1 is stationary, and obtains it by the imaging devices 2R and 2L. The parallax relating to the other vehicle was calculated from the preprocessed image data of the right image and the left image obtained by the above-described method. Furthermore, in order to compare with this, the parallax regarding the other vehicle was calculated using the right image and the left image obtained by the imaging devices 6R and 6L as they are. Then, the sum of squares of errors with respect to the parallax converted from the actual distance (the true value of the parallax) was calculated.

この結果、前処理後画像データを使用した場合における視差の誤差の二乗和は、1919であり、右画像および左画像をそのまま使用した場合における視差の誤差の二乗和は、5688であった。このことから、本実施形態における前処理が、視差の検出精度を高めるために効果的であることが判る。   As a result, the sum of squares of the parallax error when the preprocessed image data is used is 1919, and the square sum of the parallax errors when the right image and the left image are used as they are is 5688. From this, it can be seen that the preprocessing in the present embodiment is effective for increasing the accuracy of detection of parallax.

次に、本発明の第2実施形態を図4のフローチャートを参照して説明する。なお、本実施形態は、前記第1実施形態と画像前処理部5の処理だけが前記第1実施形態と相違する。従って、第1実施形態と同一部分については説明を省略する。   Next, a second embodiment of the present invention will be described with reference to the flowchart of FIG. Note that the present embodiment is different from the first embodiment only in the processing of the first embodiment and the image preprocessing unit 5. Therefore, the description of the same parts as those in the first embodiment is omitted.

前記第1実施形態では、前処理用の式(7)のdmaxの値を、右画像および左画像のいずれか一方だけを使用して決定する例を示したが、本実施形態では、両者の画像を使用して、dmaxの値を決定する。   In the first embodiment, an example in which the value of dmax in the preprocessing equation (7) is determined using only one of the right image and the left image is shown. The image is used to determine the value of dmax.

図4は本実施形態における画像前処理部5の処理を示すフローチャートである。同図を参照して、STEP11〜STEP17まで、前記第1実施形態における図2のSTEP1〜7と同じ処理が実行される。これにより、右画像に基づく、dの最大値dmaxの候補値dmaxRが決定される。   FIG. 4 is a flowchart showing the processing of the image preprocessing unit 5 in the present embodiment. Referring to the figure, the same processing as STEP 1 to STEP 7 in FIG. 2 in the first embodiment is executed from STEP 11 to STEP 17. Thereby, the candidate value dmaxR of the maximum value dmax of d based on the right image is determined.

次いで、STEP18〜24まで、左画像を使用して、STEP11〜STEP17と同様の処理が実行される。このSTEP18〜24の処理は、STEP11〜STEP17の処理と、分散ω2(d2)を求めるために使用する画像が異なるだけである。そして、STEP18〜24の処理によって、左画像に基づく、dの最大値dmaxの候補値dmaxLが決定される。 Next, from STEP18 to STEP24, the same processing as STEP11 to STEP17 is executed using the left image. The processing of STEPs 18 to 24 is different from the processing of STEP 11 to STEP 17 only in the image used for obtaining the variance ω 2 (d 2 ). Then, the candidate values dmaxL of the maximum value dmax of d based on the left image are determined by the processing of STEPs 18 to 24.

なお、STEP11〜STEP17の処理と、STEP18〜24の処理とは、それらの実行順序を逆にしてもよく、あるいは、時分割処理などにより、並列的に実行してもよい。   Note that the processing of STEP 11 to STEP 17 and the processing of STEP 18 to 24 may be executed in reverse order, or may be executed in parallel by time-sharing processing or the like.

次いで、画像処理部5は、右画像に基づく候補値dmaxRと、左画像に基づく候補値dmaxLとのうちの小さい方を、最終的に式(7)の前処理用のdmaxの値として決定する(STEP25)。その後は、画像前処理部5は、このように決定したdmaxの値を使用して、前記式(7)の前処理を、左右の各画像に施す(STEP26)。   Next, the image processing unit 5 finally determines the smaller of the candidate value dmaxR based on the right image and the candidate value dmaxL based on the left image as the value of dmax for preprocessing in Expression (7). (STEP 25). After that, the image pre-processing unit 5 uses the dmax value determined in this way to perform the pre-processing of Equation (7) on the left and right images (STEP 26).

以上説明した以外の構成および処理は、前記第1実施形態と同じである。なお、前記STEP11〜25の処理は、前記第4〜第6発明における予備処理手段を構成する処理である。また、STEP26は、前記第4〜第6発明における前処理実行手段を構成する処理である。   The configuration and processing other than those described above are the same as those in the first embodiment. Note that the processing in STEPs 11 to 25 is processing that constitutes preliminary processing means in the fourth to sixth inventions. STEP 26 is processing that constitutes pre-processing execution means in the fourth to sixth inventions.

かかる本実施形態では、右画像と左画像との両者を使用してdmaxを決定するので、両画像に対して好適な前処理を施すことができる。そして、本実施形態においても、第1実施形態と同様に視差の検出精度を高めることができる。   In this embodiment, since dmax is determined using both the right image and the left image, suitable preprocessing can be performed on both images. Also in this embodiment, the parallax detection accuracy can be increased as in the first embodiment.

なお、以上説明した各実施形態では、前記式(7)により前処理を行なうようにしたが、式(7)の右辺の演算結果に、所定のゲインを乗じる処理、あるいは、所定のオフセット値を加える処理、あるいは、それらの複合処理を行なうことで、前処理後の画素値I’(x,y)のスケール調整をしてもよい。   In each of the embodiments described above, the preprocessing is performed according to the equation (7). However, a process of multiplying the calculation result on the right side of the equation (7) by a predetermined gain or a predetermined offset value is used. The scale adjustment of the pixel value I ′ (x, y) after the pre-processing may be performed by performing the adding process or the combined process.

また、前記各実施形態では、右画像および左画像の全領域の画素G(x,y)に対して前処理を施すようにしたが、それらの画像のうちの、視差を検出しようとする物体が含まれるような所定の領域(部分的な画像領域)内の画素G(x,y)に対してのみ、前処理を実行するようにしてもよい。   In each of the above embodiments, the pre-processing is performed on the pixels G (x, y) in the entire area of the right image and the left image. Of these images, an object for which parallax is to be detected. The pre-processing may be executed only for the pixel G (x, y) in a predetermined area (partial image area) in which the image is included.

また、前記各実施形態では、撮像装置2R,2Lを左右方向に並列させた場合を例に採って説明したが、それらの撮像装置を上下方向に並列させ、上下方向における視差を検出するようにしてもよい。その場合には、y方向(上下方向)で前記式(9)の不等式を満たすような最大のdの値dmaxを求め、そのdmaxを使用して次式(12)による前処理を各撮像画像に施すようにすればよい。   In each of the above embodiments, the case where the imaging devices 2R and 2L are arranged in parallel in the left-right direction has been described as an example. However, these imaging devices are arranged in parallel in the up-down direction so as to detect parallax in the up-down direction. May be. In that case, the maximum d value dmax that satisfies the inequality of the above equation (9) in the y direction (vertical direction) is obtained, and the preprocessing by the following equation (12) is performed for each captured image using the dmax. Should be applied.


I’(x,y)=I(x,y+dmax)−I(x,y-dmax) ……(12)

また、前記各実施形態では、画素値として輝度値を使用したが、各撮像画像がカラー画像であるような場合には、各画素における色相や彩度を画素値として使用してもよい。

I '(x, y) = I (x, y + dmax) -I (x, y-dmax) (12)

In each of the above embodiments, the luminance value is used as the pixel value. However, when each captured image is a color image, the hue or saturation of each pixel may be used as the pixel value.

本発明の実施形態における装置のシステム構成を示すブロック図。The block diagram which shows the system configuration | structure of the apparatus in embodiment of this invention. 本発明の第1実施形態における画像前処理部の処理を示すフローチャート。3 is a flowchart showing processing of an image preprocessing unit according to the first embodiment of the present invention. 図3(a)は撮像画像の例を示す図、図3(b)はその撮像画像の前処理後の画像の例を示す図。FIG. 3A is a diagram illustrating an example of a captured image, and FIG. 3B is a diagram illustrating an example of an image after pre-processing of the captured image. 本発明の第2実施形態における画像前処理部の処理を示すフローチャート。The flowchart which shows the process of the image pre-processing part in 2nd Embodiment of this invention.

符号の説明Explanation of symbols

2R,2L…撮像装置、5…画像前処理部、STEP1〜STEP7…予備処理手段、STEP8…前処理実行手段、STEP11〜STEP25…予備処理手段、STEP26…前処理実行手段。   2R, 2L ... Imaging device, 5 ... Image preprocessing unit, STEP1 to STEP7 ... Preliminary processing means, STEP8 ... Preprocessing execution means, STEP11 to STEP25 ... Preliminary processing means, STEP26 ... Preprocessing execution means.

Claims (6)

所定の方向で互いに並設された第1の撮像装置と第2の撮像装置とによりそれぞれ撮像された第1の撮像画像および第2の撮像画像の両者に存在する同一物の視差を求めるために、各撮像画像に前処理を施す画像処理装置であって、
前記第1の撮像画像および第2の撮像画像のうちのいずれか一方の撮像画像に対して、当該一方の撮像画像内の複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で画素数dの間隔を存する画素の画素値I(p+d)との差の値の確率的分布を、0の平均値を有すると共に前記画素数dの値に応じた標準偏差を有する正規分布で近似することが可能となる前記画素数dの最大値dmaxを、前記一方の撮像画像において前記所定の方向に間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求める予備処理手段と、
前記各撮像画像の所定の領域内の各画素に対して、前記所定の方向における正の向きに前記最大値dmaxの画素数の間隔を存する画素の画素値I(p+dmax)と、該所定の方向における負の向きに前記最大値dmaxの画素数の間隔を存する画素の画素値I(p-dmax)との差分を求め、その求めた差分の値、または該差分の値をスケール調整してなる値を前記各撮像画像の所定の領域内の各画素の画素値として有する画像を、前記同一物の視差を求めるために用いる前処理後画像データとして得る前処理実行手段とを備えたことを特徴とする画像処理装置。
In order to obtain the parallax of the same object existing in both the first captured image and the second captured image respectively captured by the first imaging device and the second imaging device arranged in parallel in a predetermined direction An image processing apparatus that performs preprocessing on each captured image,
For any one of the first captured image and the second captured image, each pixel value I (p) of the plurality of pixels in the one captured image and each pixel On the other hand, the stochastic distribution of the difference value from the pixel value I (p + d) of the pixel having an interval of the pixel number d in the predetermined direction has an average value of 0 and corresponds to the value of the pixel number d. The maximum value dmax of the number of pixels d that can be approximated by a normal distribution having a standard deviation is used as sampling data of pixel values of a plurality of sets of pixels spaced in the predetermined direction in the one captured image. Preliminary processing means to be determined based on;
For each pixel in a predetermined area of each captured image, a pixel value I (p + dmax) of a pixel having an interval of the number of pixels of the maximum value dmax in a positive direction in the predetermined direction, and the predetermined value A difference from the pixel value I (p-dmax) of a pixel having an interval of the number of pixels of the maximum value dmax in the negative direction is obtained, and the obtained difference value or the difference value is scaled. Preprocessing execution means for obtaining, as preprocessed image data used for obtaining the parallax of the same object, an image having a value obtained as a pixel value of each pixel in a predetermined area of each captured image. An image processing apparatus.
所定の方向で互いに並設された第1の撮像装置と第2の撮像装置とによりそれぞれ撮像された第1の撮像画像および第2の撮像画像の両者に存在する同一物の視差を求めるために、各撮像画像に前処理を施す画像処理装置であって、
前記第1の撮像画像および第2の撮像画像のうちのいずれか一方の撮像画像に対して、当該一方の撮像画像内の複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で画素数dの間隔を存する画素の画素値I(p+d)との差の分散をω2(d2)とし、前記一方の撮像画像の複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で1画素分の間隔を存する画素の画素値I(p+1)との差の分散をω2(12)としたとき、前記分散ω2(d2)と、前記分散ω2(12)に前記画素数dを乗じてなる値との差の絶対値が所定値よりも小さくなるような前記画素数dの最大値dmaxを、前記一方の撮像画像において前記所定の方向に間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求める予備処理手段と、
前記各撮像画像の所定の領域内の各画素に対して、前記所定の方向における正の向きに前記最大値dmaxの画素数の間隔を存する画素の画素値I(p+dmax)と、該所定の方向における負の向きに前記最大値dmaxの画素数の間隔を存する画素の画素値I(p-dmax)との差分を求め、その求めた差分の値、または該差分の値をスケール調整してなる値を前記各撮像画像の所定の領域内の各画素の画素値として有する画像を、前記同一物の視差を求めるために用いる前処理後画像データとして得る前処理実行手段とを備えたことを特徴とする画像処理装置。
In order to obtain the parallax of the same object existing in both the first captured image and the second captured image respectively captured by the first imaging device and the second imaging device arranged in parallel in a predetermined direction An image processing apparatus that performs preprocessing on each captured image,
For any one of the first captured image and the second captured image, each pixel value I (p) of the plurality of pixels in the one captured image and each pixel On the other hand, the variance of the difference from the pixel value I (p + d) of the pixels having an interval of the number of pixels d in the predetermined direction is ω 2 (d 2 ), and each of the plurality of pixels of the one captured image is The variance of the difference between the pixel value I (p) and the pixel value I (p + 1) of a pixel having an interval of one pixel in the predetermined direction with respect to each pixel is defined as ω 2 (1 2 ). The number of pixels d such that the absolute value of the difference between the variance ω 2 (d 2 ) and the value obtained by multiplying the variance ω 2 (1 2 ) by the number of pixels d is smaller than a predetermined value. Preliminary processing means for obtaining a maximum value dmax based on sampling data of pixel values of a plurality of sets of pixels spaced in the predetermined direction in the one captured image;
For each pixel in a predetermined area of each captured image, a pixel value I (p + dmax) of a pixel having an interval of the number of pixels of the maximum value dmax in a positive direction in the predetermined direction, and the predetermined value A difference from the pixel value I (p-dmax) of a pixel having an interval of the number of pixels of the maximum value dmax in the negative direction is obtained, and the obtained difference value or the difference value is scaled. Preprocessing execution means for obtaining, as preprocessed image data used for obtaining the parallax of the same object, an image having a value obtained as a pixel value of each pixel in a predetermined area of each captured image. An image processing apparatus.
前記予備処理手段は、前記分散ω2(12)を、前記一方の撮像画像において前記所定の方向に1画素分の間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求める手段と、
前記画素数dの値を2以上の整数値で順次増加させていくように設定しつつ、そのdの値の各設定値に対応する前記分散ω2(d2)を、前記一方の撮像画像において前記所定の方向に当該設定値の画素数の間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求める手段と、
前記dの値の各設定値に対応して求めた前記分散ω2(d2)と、前記求めた分散ω2(12)に当該設定値を乗じてなる値との差の絶対値が前記所定値よりも小さいか否かを判断する手段と、
その判断結果が否定的になったときのdの値の設定値の1つ前の設定値を前記最大値dmaxとして決定する手段とから構成されることを特徴とする請求項2記載の画像処理装置。
The preliminary processing means obtains the variance ω 2 (1 2 ) based on sampling data of pixel values of a plurality of sets of pixels having an interval of one pixel in the predetermined direction in the one captured image; ,
While setting the value of the number of pixels d to be sequentially increased by an integer value of 2 or more, the variance ω 2 (d 2 ) corresponding to each set value of the value of d is set to the one captured image. Means for obtaining based on sampling data of pixel values of a plurality of sets of pixels having an interval of the number of pixels of the set value in the predetermined direction;
The absolute value of the difference between the variance ω 2 (d 2 ) determined corresponding to each set value of the value d and the value obtained by multiplying the calculated variance ω 2 (1 2 ) by the set value is Means for determining whether the value is smaller than the predetermined value;
3. The image processing according to claim 2, further comprising means for determining, as the maximum value dmax, a setting value immediately before a setting value of d when the determination result is negative. apparatus.
所定の方向で互いに並設された第1の撮像装置と第2の撮像装置とによりそれぞれ撮像された第1の撮像画像および第2の撮像画像の両者に存在する同一物の視差を求めるために、各撮像画像に前処理を施す画像処理装置であって、
前記第1の撮像画像および第2の撮像画像のそれぞれに対して、その各撮像画像内の複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で画素数dの間隔を存する画素の画素値I(p+d)との差の値の確率的分布を、0の平均値を有すると共に前記画素数dの値に応じた標準偏差を有する正規分布で近似されるような前記画素数dの最大値dmaxの候補値を、各撮像画像毎に、各撮像画像において前記所定の方向に間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求めると共に、その求めた各撮像画像に対応する前記最大値dmaxの候補値のうちの小さい方の候補値を前処理用の最大値dmaxとして決定する予備処理手段と、
前記各撮像画像の所定の領域内の各画素に対して、前記所定の方向における正の向きに前記前処理用の最大値dmaxの画素数の間隔を存する画素の画素値I(p+dmax)と、該所定の方向における負の向きに前記前処理用の最大値dmaxの間隔を存する画素の画素値I(p-dmax)との差分を求め、その求めた差分の値、または該差分の値をスケール調整してなる値を前記各撮像画像の所定の領域内の各画素の画素値として有する画像を、前記同一物の視差を求めるために用いる前処理後画像データとして得る前処理実行手段とを備えたことを特徴とする画像処理装置。
In order to obtain the parallax of the same object existing in both the first captured image and the second captured image respectively captured by the first imaging device and the second imaging device arranged in parallel in a predetermined direction An image processing apparatus that performs preprocessing on each captured image,
For each of the first captured image and the second captured image, a pixel value I (p) of each of the plurality of pixels in each captured image and a pixel in the predetermined direction with respect to each pixel The stochastic distribution of the difference value from the pixel value I (p + d) of pixels having an interval of several d is a normal distribution having an average value of 0 and a standard deviation corresponding to the value of the number of pixels d. A candidate value for the maximum value dmax of the number d of pixels to be approximated is obtained for each captured image based on sampling data of pixel values of a plurality of sets of pixels that are spaced in the predetermined direction in each captured image. And a preliminary processing means for determining a smaller candidate value among the candidate values of the maximum value dmax corresponding to each obtained captured image as the maximum value dmax for preprocessing,
A pixel value I (p + dmax) of a pixel having an interval of the number of pixels of the maximum value dmax for preprocessing in a positive direction in the predetermined direction with respect to each pixel in the predetermined region of each captured image. And the pixel value I (p-dmax) of the pixel having the interval of the maximum value dmax for preprocessing in the negative direction in the predetermined direction, and the difference value obtained or the difference Preprocessing execution means for obtaining an image having a value obtained by adjusting the scale as a pixel value of each pixel in a predetermined area of each captured image as preprocessed image data used for obtaining the parallax of the same object An image processing apparatus comprising:
所定の方向で互いに並設された第1の撮像装置と第2の撮像装置とによりそれぞれ撮像された第1の撮像画像および第2の撮像画像の両者に存在する同一物の視差を求めるために、各撮像画像に前処理を施す画像処理装置であって、
前記第1の撮像画像および第2の撮像画像のそれぞれに対して、その各撮像画像内の複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で画素数dの間隔を存する画素の画素値I(p+d)との差の分散をω2(d2)とし、前記一方の撮像画像の複数の画素のそれぞれの画素値I(p)と、その各画素に対して前記所定の方向で1画素分の間隔を存する画素の画素値I(p+1)との差の分散をω2(12)としたとき、前記分散ω2(d2)と、前記分散ω2(12)に前記画素数dを乗じてなる値との差の絶対値が所定値よりも小さくなるような前記画素数dの最大値dmaxの候補値を、各撮像画像毎に、各撮像画像において前記所定の方向に間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求めると共に、その求めた各撮像画像に対応する前記最大値dmaxの候補値のうちの小さい方の候補値を前処理用の最大値dmaxとして決定する予備処理手段と、
前記各撮像画像の所定の領域内の各画素に対して、前記所定の方向における正の向きに前記前処理用の最大値dmaxの画素数の間隔を存する画素の画素値I(p+dmax)と、該所定の方向における負の向きに前記前処理用の最大値dmax画素数の間隔を存する画素の画素値I(p-dmax)との差分を求め、その求めた差分の値、または該差分の値をスケール調整してなる値を前記各撮像画像の所定の領域内の各画素の画素値として有する画像を、前記同一物の視差を求めるために用いる前処理後画像データとして得る前処理実行手段とを備えたことを特徴とする画像処理装置。
In order to obtain the parallax of the same object existing in both the first captured image and the second captured image respectively captured by the first imaging device and the second imaging device arranged in parallel in a predetermined direction An image processing apparatus that performs preprocessing on each captured image,
For each of the first captured image and the second captured image, a pixel value I (p) of each of the plurality of pixels in each captured image and a pixel in the predetermined direction with respect to each pixel A variance of a difference from a pixel value I (p + d) of pixels having an interval of several d is ω 2 (d 2 ), and each pixel value I (p) of the plurality of pixels of the one captured image is When the variance of the difference between each pixel and the pixel value I (p + 1) of the pixel having an interval of one pixel in the predetermined direction is ω 2 (1 2 ), the variance ω 2 (d 2 ) and a candidate value for the maximum value dmax of the number of pixels d such that the absolute value of the difference between the variance ω 2 (1 2 ) multiplied by the number of pixels d is smaller than a predetermined value, For each captured image, each captured image is obtained based on sampling data of pixel values of a plurality of sets of pixels that are spaced apart in the predetermined direction. A pretreatment means for determining the smaller candidate values of ones of the candidate values of the maximum value dmax to respond as the maximum value dmax of pretreatment,
A pixel value I (p + dmax) of a pixel having an interval of the number of pixels of the maximum value dmax for preprocessing in a positive direction in the predetermined direction with respect to each pixel in the predetermined region of each captured image. And a pixel value I (p-dmax) of a pixel having an interval of the maximum number of dmax pixels for preprocessing in the negative direction in the predetermined direction, and the difference value obtained or Pre-processing for obtaining, as pre-processed image data, an image having a value obtained by adjusting a difference value as a pixel value of each pixel in a predetermined region of each captured image as a pixel value of the same object An image processing apparatus comprising: an execution unit.
前記予備処理手段は、前記各撮像画像毎に、前記分散ω2(12)を、各撮像画像ににおいて前記所定の方向に1画素分の間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求める手段と、
前記各撮像画像毎に、前記画素数dの値を2以上の整数値で順次増加させていくように設定しつつ、そのdの値の各設定値に対応する前記分散ω2(d2)を、各撮像画像において前記所定の方向に当該設定値の画素数の間隔を存する複数組の画素の画素値のサンプリングデータに基づいて求める手段と、
前記各撮像画像毎に、前記dの値の各設定値に対応して求めた前記分散ω2(d2)と、前記求めた分散ω2(12)に当該設定値を乗じてなる値との差の絶対値が前記所定値よりも小さいか否かを判断する手段と、
前記撮像画像毎に、その判断結果が否定的になったときのdの値の設定値の1つ前の設定値を各撮像画像に対応する前記最大値dmaxの候補値として決定する手段と
各撮像画像に対応して決定された前記最大値dmaxの候補値のうちの小さい方の候補値を前記前処理用の最大値dmaxとして決定する手段とから構成されることを請求項5記載の画像処理装置。
The preliminary processing unit is configured to sample the variance ω 2 (1 2 ) for each captured image, and sampling data of pixel values of a plurality of sets of pixels having an interval of one pixel in the predetermined direction in each captured image. A means of obtaining based on
Wherein each captured image, the while setting the value of the number of pixels d as will by sequentially increasing by 2 or more integer values, the dispersion omega 2 corresponding to each set of the values of the d (d 2) A means for obtaining, based on sampling data of pixel values of a plurality of sets of pixels having an interval of the number of pixels of the set value in the predetermined direction in each captured image;
A value obtained by multiplying the variance ω 2 (d 2 ) obtained corresponding to each set value of the value d and the obtained variance ω 2 (1 2 ) for each captured image by the set value. Means for determining whether the absolute value of the difference between and is smaller than the predetermined value;
Means for determining, for each captured image, a setting value immediately before a setting value of d when the determination result is negative as a candidate value of the maximum value dmax corresponding to each captured image; 6. The image according to claim 5, further comprising means for determining a smaller candidate value among the candidate values of the maximum value dmax determined corresponding to the captured image as the maximum value dmax for preprocessing. Processing equipment.
JP2006273260A 2006-10-04 2006-10-04 Image processing device Expired - Fee Related JP4749986B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006273260A JP4749986B2 (en) 2006-10-04 2006-10-04 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006273260A JP4749986B2 (en) 2006-10-04 2006-10-04 Image processing device

Publications (2)

Publication Number Publication Date
JP2008090742A JP2008090742A (en) 2008-04-17
JP4749986B2 true JP4749986B2 (en) 2011-08-17

Family

ID=39374796

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006273260A Expired - Fee Related JP4749986B2 (en) 2006-10-04 2006-10-04 Image processing device

Country Status (1)

Country Link
JP (1) JP4749986B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8446350B2 (en) 2008-03-25 2013-05-21 Nikon Corporation Liquid crystal panel, liquid crystal panel device, display device, and projector
JP6668594B2 (en) * 2014-02-25 2020-03-18 株式会社リコー Parallax calculation system, information processing device, information processing method, and program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2923063B2 (en) * 1991-02-19 1999-07-26 日本電信電話株式会社 Multi-view stereo image measurement method

Also Published As

Publication number Publication date
JP2008090742A (en) 2008-04-17

Similar Documents

Publication Publication Date Title
JP6184877B2 (en) Vehicle external recognition device
US7650012B2 (en) Moving-object height determining apparatus by image processing of two-dimensional image
JP4899424B2 (en) Object detection device
JP4631096B2 (en) Vehicle periphery monitoring device
US7769227B2 (en) Object detector
WO2010047054A1 (en) Vehicle periphery monitoring apparatus
JP2004037239A (en) Identical object judging method and system, and misregistration correcting method and system
JP3255360B2 (en) Inspection method of distance data and its inspection device
US10595003B2 (en) Stereo camera apparatus and vehicle comprising the same
JP2009009331A (en) White line detector and white line detection method
CN112261390B (en) Vehicle-mounted camera equipment and image optimization device and method thereof
US20060126897A1 (en) Vehicle surroundings monitoring apparatus
JP5048609B2 (en) Object tracking device and program
JP4749986B2 (en) Image processing device
US10417507B2 (en) Freespace detection apparatus and freespace detection method
JP4397573B2 (en) Image processing device
US20060115122A1 (en) Vehicle surroundings monitoring apparatus
JP4935769B2 (en) Plane region estimation apparatus and program
JP2008026999A (en) Obstacle detection system and obstacle detection method
JP4704998B2 (en) Image processing device
JP2000331169A (en) Method and device for measuring motion vector of image
WO2021029206A1 (en) Image processing device
JPH09322153A (en) Automatic monitor
JP2006010652A (en) Object-detecting device
JPH09178855A (en) Method of detecting obstruction

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081127

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110328

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140527

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees