JP6337504B2 - Image processing apparatus, moving body, robot, device control method and program - Google Patents

Image processing apparatus, moving body, robot, device control method and program Download PDF

Info

Publication number
JP6337504B2
JP6337504B2 JP2014032287A JP2014032287A JP6337504B2 JP 6337504 B2 JP6337504 B2 JP 6337504B2 JP 2014032287 A JP2014032287 A JP 2014032287A JP 2014032287 A JP2014032287 A JP 2014032287A JP 6337504 B2 JP6337504 B2 JP 6337504B2
Authority
JP
Japan
Prior art keywords
image
pixel
value
parallax
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014032287A
Other languages
Japanese (ja)
Other versions
JP2015158749A (en
Inventor
高橋 祐二
祐二 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2014032287A priority Critical patent/JP6337504B2/en
Publication of JP2015158749A publication Critical patent/JP2015158749A/en
Application granted granted Critical
Publication of JP6337504B2 publication Critical patent/JP6337504B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Studio Devices (AREA)

Description

本発明は、画像処理装置、移動体、ロボット、機器制御方法およびプログラムに関する。   The present invention relates to an image processing apparatus, a moving body, a robot, a device control method, and a program.

近年、自動車間の距離、または自動車と障害物との間の距離等を測定することにより自動車の衝突防止を図る車載システムが一般的に利用されてきている。このような車載システムは、例えば、自動車の前方を監視し、歩行者、他車両または障害物等との距離を測定し、各種認識処理、または、他車両等に衝突する可能性がある場合には、ステアリングを制御して衝突を回避する操舵制御、もしくはブレーキを制御して衝突の回避をするブレーキ制御等を実行する。   In recent years, in-vehicle systems that prevent collision of automobiles by measuring the distance between automobiles or the distance between automobiles and obstacles have been generally used. Such an in-vehicle system, for example, monitors the front of an automobile, measures the distance from a pedestrian, another vehicle, an obstacle, etc., and may collide with various recognition processes or other vehicles. Performs steering control for controlling the steering to avoid the collision, or braking control for controlling the brake to avoid the collision.

そのような距離を測定する方法として、ステレオカメラを用い、三角測量の原理を用いたステレオマッチング処理が用いられている。ステレオマッチング処理とは、ステレオカメラの2つのカメラのうち、一方のカメラで撮像された基準画像と、他方のカメラで撮像された比較画像との間で対応する画素をマッチングすることにより視差を求め、視差からステレオカメラと、画像に含まれる物体との距離を算出する処理である。   As a method for measuring such a distance, a stereo camera is used and a stereo matching process using the principle of triangulation is used. Stereo matching processing refers to finding the parallax by matching the corresponding pixels between a reference image captured by one camera and a comparison image captured by the other camera of the two cameras of the stereo camera. In this process, the distance between the stereo camera and the object included in the image is calculated from the parallax.

上述のようなステレオマッチング処理として、2つのカメラにより撮像された一対の画像のある所定領域(ブロック)の相関値(評価値)を計算し、最も相関が高い所定領域の位置が特定できた際にその所定領域における画素間のシフト量を視差として算出するブロックマッチング処理がある。このようなブロックマッチング処理を用いた技術として、ブロックマッチング処理の際に画像のエッジ情報を利用したテクスチャ特性値を用いることによって、処理の高速化を実現する技術が提案されている(特許文献1参照)。   As a stereo matching process as described above, when the correlation value (evaluation value) of a predetermined area (block) of a pair of images captured by two cameras is calculated, and the position of the predetermined area with the highest correlation can be identified In addition, there is a block matching process for calculating a shift amount between pixels in the predetermined area as a parallax. As a technique using such a block matching process, a technique has been proposed in which the processing speed is increased by using a texture characteristic value using edge information of an image in the block matching process (Patent Document 1). reference).

しかし、ブロックマッチング処理は比較的、高速かつ高精度に視差の演算が可能であるが、画像においてエッジ部分ではないテクスチャが弱い部分では、画像としての特徴を抽出することが困難であり、精度の高い視差を得ることができない場合がある。これに対し、ブロックマッチングのように、局所的な情報ではなく、画像全体の評価値を加味して視差値を求め、路面等のようにテクスチャの弱い部分においても精度よく視差を算出することができるデンスアルゴリズムであるSGM(Semi−Global Matching)法を用いた処理が提案されている(非特許文献1参照)。   However, although the block matching process can calculate parallax relatively quickly and with high accuracy, it is difficult to extract features as an image in a portion where the texture that is not an edge portion is weak in the image. In some cases, high parallax cannot be obtained. On the other hand, parallax values can be obtained by taking into consideration the evaluation value of the entire image, not local information, as in block matching, and the parallax can be accurately calculated even in areas with weak textures such as road surfaces. A process using an SGM (Semi-Global Matching) method, which is a dense algorithm, has been proposed (see Non-Patent Document 1).

しかしながら、SGM法等のデンスアルゴリズムを用いた処理(以下、デンス処理という)は、演算量がブロックマッチング処理よりも多く、処理工程が膨大でハードウェア等のリソースを多く必要とし、処理時間も多くかかる。したがって、リアルタイムに視差値を求めることが困難であり、認識処理の性能へ影響を与える可能性があるという問題点があった。   However, processing using a dense algorithm such as the SGM method (hereinafter referred to as dense processing) requires more computation than block matching processing, requires a large number of processing steps, requires many resources such as hardware, and takes a long processing time. Take it. Therefore, it is difficult to obtain the parallax value in real time, and there is a problem that the performance of recognition processing may be affected.

本発明は、上記に鑑みてなされたものであって、デンス処理を用いても認識処理の性能への影響を抑制する画像処理装置、移動体、ロボット、機器制御方法およびプログラムを提供することを目的とする。   The present invention has been made in view of the above, and provides an image processing apparatus, a moving body, a robot, a device control method, and a program that suppress the influence on the performance of recognition processing even when dense processing is used. Objective.

上述した課題を解決し、目的を達成するために、本発明は、第1撮像手段が被写体を撮像することにより得られた基準画像、および第2撮像手段が前記被写体を撮像することにより得られた比較画像を取得する取得手段と、前記基準画像および前記比較画像に基づいてデンス処理を実行し第1視差値を導出するデンス処理手段と、前記基準画像および前記比較画像に基づいてブロックマッチング処理を実行し第2視差値を導出するマッチング処理手段と、基準画像を構成する各画素が、エッジ部に相当する画素か非エッジ部に相当する画素かを検出し、その検出結果の情報である検出情報を出力する検出手段と、検出情報が、その検出情報に対応する基準画像の画素が非エッジ部に相当する画素であることを示す場合、その画素に対応する第1視差値を出力し、その検出情報に対応する基準画像の画素がエッジ部に相当する画素であることを示す場合、その画素に対応する第2視差値を出力する選択手段と、選択手段により出力された第1視差値および第2視差値によって視差画像を生成する生成手段と、を備えたことを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention is obtained by the reference image obtained by the first imaging unit imaging the subject and the second imaging unit imaging the subject. Acquisition means for acquiring a comparison image; dense processing means for performing a density process based on the reference image and the comparison image to derive a first parallax value; and a block matching process based on the reference image and the comparison image And a matching processing means for deriving a second parallax value and detecting whether each pixel constituting the reference image is a pixel corresponding to an edge portion or a pixel corresponding to a non-edge portion, and is information of a detection result Detection means for outputting detection information, and when the detection information indicates that the pixel of the reference image corresponding to the detection information is a pixel corresponding to a non-edge portion, When the parallax value is output and indicates that the pixel of the reference image corresponding to the detection information is a pixel corresponding to the edge portion, the selection unit that outputs the second parallax value corresponding to the pixel and the selection unit outputs Generating means for generating a parallax image based on the first parallax value and the second parallax value .

本発明によれば、デンス処理を用いても認識処理の性能への影響を抑制することができる。   According to the present invention, the influence on the performance of the recognition process can be suppressed even if the dense process is used.

図1は、撮像装置から物体物までの距離を導き出す原理を説明する図である。FIG. 1 is a diagram for explaining the principle of deriving the distance from an imaging device to an object. 図2は、基準画像、デンス視差画像およびエッジ視差画像を示す概念図である。FIG. 2 is a conceptual diagram illustrating a reference image, a dense parallax image, and an edge parallax image. 図3は、基準画像における基準画素に対応する比較画像における対応画素を求める場合の説明図である。FIG. 3 is an explanatory diagram for obtaining a corresponding pixel in a comparison image corresponding to a reference pixel in the reference image. 図4は、シフト量とコスト値との関係を示すグラフである。FIG. 4 is a graph showing the relationship between the shift amount and the cost value. 図5は、合成コストを導出するための概念図である。FIG. 5 is a conceptual diagram for deriving the synthesis cost. 図6は、シフト量と合成コスト値との関係を示すグラフである。FIG. 6 is a graph showing the relationship between the shift amount and the synthesis cost value. 図7は、第1の実施の形態に係る機器制御システムを車両に搭載した例を示す図である。FIG. 7 is a diagram illustrating an example in which the device control system according to the first embodiment is mounted on a vehicle. 図8は、第1の実施の形態に係る視差値導出装置の外観の一例を示す図である。FIG. 8 is a diagram illustrating an example of the appearance of the parallax value deriving device according to the first embodiment. 図9は、第1の実施の形態に係る視差値導出装置のハードウェア構成の一例を示す図である。FIG. 9 is a diagram illustrating an example of a hardware configuration of the disparity value deriving device according to the first embodiment. 図10は、第1の実施の形態に係る視差値導出装置のブロック構成の一例を示す図である。FIG. 10 is a diagram illustrating an example of a block configuration of the disparity value deriving device according to the first embodiment. 図11は、第1の実施の形態に係る視差値導出装置により撮像された画像の一例を示す図である。FIG. 11 is a diagram illustrating an example of an image captured by the parallax value deriving device according to the first embodiment. 図12は、第1の実施の形態において基準画像の画素に対するデンス処理のスキャン動作を示す図である。FIG. 12 is a diagram illustrating a scanning operation of dense processing for the pixels of the reference image in the first embodiment. 図13は、第1の実施の形態におけるシフト量と合成コスト値との関係を示すグラフである。FIG. 13 is a graph showing the relationship between the shift amount and the synthesis cost value in the first embodiment. 図14は、パラボラフィッティングによるサブピクセル推定を説明する図である。FIG. 14 is a diagram for explaining subpixel estimation by parabolic fitting. 図15は、最小二乗法によるサブピクセル推定を説明する図である。FIG. 15 is a diagram for explaining subpixel estimation by the method of least squares. 図16は、サブピクセル推定を用いたデンス視差画像を示す概念図である。FIG. 16 is a conceptual diagram showing a dense parallax image using sub-pixel estimation. 図17は、第1の実施の形態に係る視差値導出装置のデンス処理によるステレオマッチング処理の動作フローの一例を示す図である。FIG. 17 is a diagram illustrating an example of an operation flow of stereo matching processing by dense processing of the disparity value deriving device according to the first embodiment. 図18は、第1の実施の形態に係る視差値導出装置のブロックマッチング処理によるステレオマッチング処理の動作フローの一例を示す図である。FIG. 18 is a diagram illustrating an example of an operation flow of stereo matching processing by block matching processing of the disparity value deriving device according to the first embodiment. 図19は、第1の実施の形態に係る機器制御システムの処理のタイミングチャートを示す図である。FIG. 19 is a diagram illustrating a timing chart of the process of the device control system according to the first embodiment. 図20は、第2の実施の形態に係る機器制御システムの処理のタイミングチャートを示す図である。FIG. 20 is a diagram illustrating a timing chart of processing of the device control system according to the second embodiment. 図21は、第3の実施の形態に係る機器制御システムの処理のタイミングチャートを示す図である。FIG. 21 is a diagram illustrating a timing chart of processing of the device control system according to the third embodiment. 図22は、第4の実施の形態において基準画像の画素に対するデンス処理のスキャン動作を示す図である。FIG. 22 is a diagram illustrating a scanning operation of dense processing for the pixels of the reference image in the fourth embodiment. 図23は、第4の実施の形態に係る機器制御システムの処理のタイミングチャートを示す図である。FIG. 23 is a diagram illustrating a timing chart of processing of the device control system according to the fourth embodiment. 図24は、第5の実施の形態において基準画像の画素に対するデンス処理のスキャン動作を示す図である。FIG. 24 is a diagram illustrating a scanning operation of dense processing for the pixels of the reference image in the fifth embodiment. 図25は、第6の実施の形態に係る視差値導出装置のブロック構成の一例を示す図である。FIG. 25 is a diagram illustrating an example of a block configuration of the disparity value deriving device according to the sixth embodiment. 図26は、第7の実施の形態に係る視差値導出装置のブロック構成の一例を示す図である。FIG. 26 is a diagram illustrating an example of a block configuration of a disparity value deriving device according to the seventh embodiment. 図27は、非エッジ部を検出する動作の一例を示す図である。FIG. 27 is a diagram illustrating an example of an operation for detecting a non-edge portion.

[SGM法を用いた測距方法の概略]
まず、図1乃至図6を用いて、SGM法を用いた測距方法の概略について説明する。
[Outline of Ranging Method Using SGM Method]
First, an outline of a distance measuring method using the SGM method will be described with reference to FIGS.

(測距の原理)
図1は、撮像装置から物体物までの距離を導き出す原理を説明する図である。図1を参照しながら、ステレオマッチング処理により、ステレオカメラから物体に対する視差を導出し、この視差を示す視差値によって、ステレオカメラから物体までの距離を測定する原理について説明する。なお、以下では、説明を簡略化するため、所定領域(ブロック)のマッチングではなく、画素単位のマッチングの例について説明する。
(Principles of ranging)
FIG. 1 is a diagram for explaining the principle of deriving the distance from an imaging device to an object. With reference to FIG. 1, the principle of deriving a parallax with respect to an object from the stereo camera by stereo matching processing and measuring the distance from the stereo camera to the object with the parallax value indicating the parallax will be described. In the following, in order to simplify the description, an example of matching in units of pixels instead of matching of a predetermined area (block) will be described.

図1に示す撮像システム(ステレオカメラ)は、平行等位に配置された撮像装置510aと撮像装置510bとを有するものとする。撮像装置510a、510bは、それぞれ、入射する光を屈折させて物体の像を固体撮像素子である画像センサ(図示せず)に結像させる撮像レンズ511a、511bを有する。撮像装置510aおよび撮像装置510bによって撮像された各画像を、それぞれ比較画像Iaおよび基準画像Ibとする。図1において、3次元空間内の物体E上の点Sは、比較画像Iaおよび基準画像Ibそれぞれにおいて、撮像レンズ511aと撮像レンズ511bとを結ぶ直線と平行な直線上の位置に写像される。ここで、各画像に写像された点Sを、比較画像Iaにおいて点Sa(x,y)とし、基準画像Ibにおいて点Sb(X,y)とする。このとき、視差値dpは、比較画像Ia上の座標における点Sa(x,y)と基準画像Ib上の座標における点Sb(X,y)とを用いて、以下の(式1)のように表される。   The imaging system (stereo camera) illustrated in FIG. 1 includes an imaging device 510a and an imaging device 510b arranged in parallel equiposition. The imaging devices 510a and 510b respectively include imaging lenses 511a and 511b that refract incident light and form an image of an object on an image sensor (not shown) that is a solid-state imaging device. The images captured by the imaging device 510a and the imaging device 510b are referred to as a comparison image Ia and a reference image Ib, respectively. In FIG. 1, the point S on the object E in the three-dimensional space is mapped to a position on a straight line parallel to a straight line connecting the imaging lens 511a and the imaging lens 511b in each of the comparison image Ia and the reference image Ib. Here, the point S mapped to each image is a point Sa (x, y) in the comparative image Ia and a point Sb (X, y) in the reference image Ib. At this time, the parallax value dp is expressed by the following (Equation 1) using the point Sa (x, y) at the coordinates on the comparison image Ia and the point Sb (X, y) at the coordinates on the reference image Ib. It is expressed in

dp=X−x (式1)   dp = X−x (Formula 1)

また、図1において、比較画像Iaにおける点Sa(x,y)と撮像レンズ511aから撮像面上におろした垂線の交点との距離をΔaとし、基準画像Ibにおける点Sb(X,y)と撮像レンズ511bから撮像面上におろした垂線の交点との距離をΔbとすると、視差値dpは、dp=Δa+Δbと表すこともできる。   In FIG. 1, the distance between the point Sa (x, y) in the comparative image Ia and the intersection of the perpendicular line taken from the imaging lens 511a on the imaging surface is Δa, and the point Sb (X, y) in the reference image Ib is The parallax value dp can also be expressed as dp = Δa + Δb, where Δb is the distance between the imaging lens 511b and the intersection of the perpendiculars on the imaging surface.

次に、視差値dpを用いることにより、撮像装置510a、510bと物体Eとの間の距離Zを導出する。ここで、距離Zは、撮像レンズ511aの焦点位置と撮像レンズ511bの焦点位置とを結ぶ直線から物体E上の点Sまでの距離である。図1に示すように、撮像レンズ511aおよび撮像レンズ511bの焦点距離f、撮像レンズ511aと撮像レンズ511bとの間の長さである基線長B、および視差値dpを用いて、下記の(式2)により、距離Zを算出することができる。   Next, a distance Z between the imaging devices 510a and 510b and the object E is derived by using the parallax value dp. Here, the distance Z is a distance from a straight line connecting the focal position of the imaging lens 511a and the focal position of the imaging lens 511b to the point S on the object E. As shown in FIG. 1, using the focal length f of the imaging lens 511a and the imaging lens 511b, the baseline length B that is the length between the imaging lens 511a and the imaging lens 511b, and the parallax value dp, According to 2), the distance Z can be calculated.

Z=(B×f)/dp (式2)   Z = (B × f) / dp (Formula 2)

この(式2)により、視差値dpが大きいほど距離Zは小さく、視差値dpが小さいほど距離Zは大きくなることが分かる。   From this (Equation 2), it can be seen that the larger the parallax value dp, the smaller the distance Z, and the smaller the parallax value dp, the larger the distance Z.

(SGM法)
次に、図2乃至図6を用いて、SGM法を用いた測距方法について説明する。
(SGM method)
Next, a distance measuring method using the SGM method will be described with reference to FIGS.

図2は、基準画像、デンス視差画像およびエッジ視差画像を示す概念図である。このうち、図2(a)は、基準画像を示し、図2(b)は、図2(a)に示す基準画像に対するデンス視差画像を示し、図2(c)は、図2(a)に示す基準画像に対するエッジ視差画像を示す概念図である。ここで、基準画像は、図1に示す基準画像Ibに相当し、撮像された被写体が輝度値によって表された画像である。また、デンス視差画像とは、基準画像の各画素を、SGM法によって導出された基準画像における各画素に対応する視差値で表した画像を示すものとする。そして、エッジ視差画像は、基準画像の各画素を、エッジ検出法によって導出された基準画像における各画素に対応する視差値で表した画像を示すものとする。ただし、エッジ検出法によって導出できる視差値は、後述するように、基準画像におけるエッジ部のような比較的テクスチャの強い部分であり、テクスチャの弱い部分のように視差値を導出できない場合は、例えば視差値を「0」として画像を構成する。   FIG. 2 is a conceptual diagram illustrating a reference image, a dense parallax image, and an edge parallax image. 2A shows a reference image, FIG. 2B shows a dense parallax image with respect to the reference image shown in FIG. 2A, and FIG. 2C shows FIG. 2A. It is a conceptual diagram which shows the edge parallax image with respect to the reference | standard image shown in FIG. Here, the reference image corresponds to the reference image Ib shown in FIG. 1 and is an image in which the captured subject is represented by a luminance value. The dense parallax image is an image in which each pixel of the reference image is represented by a parallax value corresponding to each pixel in the reference image derived by the SGM method. The edge parallax image indicates an image in which each pixel of the reference image is represented by a parallax value corresponding to each pixel in the reference image derived by the edge detection method. However, as will be described later, the disparity value that can be derived by the edge detection method is a relatively textured portion such as an edge portion in the reference image, and when the disparity value cannot be derived such as a weak texture portion, An image is configured with a parallax value of “0”.

SGM法は、画像におけるテクスチャが弱い部分に対しても適切に視差値を導出するための方法であり、図2(a)に示す基準画像に基づいて、図2(b)に示すデンス視差画像を導出する方法である。なお、エッジ検出法は、図2(a)に示す基準画像に基づいて、図2(c)に示すエッジ視差画像を導出する方法である。SGM法によれば、図2(b)および図2(c)における破線の楕円内を比べると分かるように、デンス視差画像は、エッジ視差画像に比べてテクスチャが弱い道路等においても詳細な視差値に基づく距離を表すことができるため、より詳細な測距を行うことができる。   The SGM method is a method for appropriately deriving a parallax value even for a portion having a weak texture in an image. Based on the reference image shown in FIG. 2A, the dense parallax image shown in FIG. Is a method of deriving. Note that the edge detection method is a method for deriving the edge parallax image shown in FIG. 2C based on the reference image shown in FIG. According to the SGM method, the dense parallax image is a detailed parallax even on roads and the like where the texture is weaker than the edge parallax image, as can be seen by comparing the dashed ellipses in FIGS. 2B and 2C. Since the distance based on the value can be expressed, more detailed distance measurement can be performed.

SGM法は、基準画像に対する比較画像上のコスト値を算出して直ちに視差値を導出せず、コスト値を算出後、さらに、合成コスト値を算出することで視差値を導出する方法である。そして、SGM法は、最終的に、基準画像におけるほぼ全ての画素に対応する視差値で表された視差画像(ここでは、デンス視差画像)を導出する。   The SGM method is a method of deriving a parallax value by calculating a cost value after calculating a cost value on a comparative image with respect to a reference image, and then calculating a combined cost value after calculating the cost value. The SGM method finally derives a parallax image (here, a dense parallax image) represented by parallax values corresponding to almost all pixels in the reference image.

なお、エッジ検出法の場合は、コスト値を算出する点はSGM法と同じであるが、SGM法のように、合成コスト値を算出せずに、エッジ部のような比較的テクスチャの強い部分の視差値のみを算出する。   In the case of the edge detection method, the cost value is calculated in the same way as the SGM method. However, as in the SGM method, a comparatively strong texture such as an edge portion is calculated without calculating a synthesis cost value. Only the parallax value is calculated.

<コスト値の算出>
図3は、基準画像における基準画素に対応する比較画像における対応画素を求める場合の説明図である。図4は、シフト量とコスト値との関係を示すグラフである。図3および図4を参照しながら、コスト値C(p,d)の算出方法について説明する。図3のうち、図3(a)は、基準画像における基準画素を示す概念図を示し、図3(b)は、図3(a)に示す基準画素に対応する比較画像における対応画素の候補となる候補画素を順次シフトしながら(ずらしながら)、候補画素のコスト値を算出する際の概念図である。ここで、対応画素とは、基準画像における基準画素に最も類似する比較画像における画素を示す。また、コスト値とは、基準画像における基準画素に対する、比較画像における各候補画素の非類似度を表す評価値である。すなわち、以下に示すコスト値(および合成コスト値)は、値が小さいほど比較画像における候補画素が基準画素と類似していることを示す。
<Calculation of cost value>
FIG. 3 is an explanatory diagram for obtaining a corresponding pixel in a comparison image corresponding to a reference pixel in the reference image. FIG. 4 is a graph showing the relationship between the shift amount and the cost value. A method for calculating the cost value C (p, d) will be described with reference to FIGS. 3 and 4. 3A is a conceptual diagram showing reference pixels in the reference image, and FIG. 3B is a corresponding pixel candidate in the comparison image corresponding to the reference pixel shown in FIG. It is a conceptual diagram at the time of calculating the cost value of a candidate pixel, shifting the candidate pixel to become sequentially (shifting). Here, the corresponding pixel indicates a pixel in the comparison image that is most similar to the reference pixel in the reference image. The cost value is an evaluation value that represents the degree of dissimilarity of each candidate pixel in the comparison image with respect to the reference pixel in the reference image. That is, the cost value (and synthesis cost value) shown below indicates that the smaller the value, the more similar the candidate pixel in the comparative image is to the reference pixel.

図3(a)に示すように、基準画像Ibにおける所定の基準画素p(x,y)、および、基準画素p(x,y)に対する比較画像Iaにおけるエピポーラ線EL上の対応画素の候補である候補画素q(x+d,y)の各輝度値に基づいて、基準画素p(x,y)に対する対応画素の候補画素q(x+d,y)のコスト値C(p,d)が算出される。dは、基準画素pと候補画素qとのシフト量(ずれ量)であり、シフト量dは、画素単位でシフトされる。すなわち、図3では、候補画素q(x+d,y)を予め指定された範囲(例えば、0<d<25)において順次一画素分シフトしながら、候補画素q(x+d,y)と基準画素p(x,y)との輝度値の非類似度であるコスト値C(p,d)が算出される。   As shown in FIG. 3A, a predetermined reference pixel p (x, y) in the reference image Ib and a corresponding pixel candidate on the epipolar line EL in the comparison image Ia with respect to the reference pixel p (x, y). Based on each luminance value of a candidate pixel q (x + d, y), a cost value C (p, d) of a candidate pixel q (x + d, y) corresponding to the reference pixel p (x, y) is calculated. . d is a shift amount (shift amount) between the reference pixel p and the candidate pixel q, and the shift amount d is shifted in units of pixels. That is, in FIG. 3, the candidate pixel q (x + d, y) and the reference pixel p are sequentially shifted by one pixel within a predetermined range (for example, 0 <d <25). A cost value C (p, d), which is the dissimilarity of the luminance value with (x, y), is calculated.

なお、上述のように、撮像装置510a、510bは、それぞれ平行等位に配置されるため、比較画像Iaおよび基準画像Ibも、それぞれ平行等位の関係にある。したがって、基準画像Ibにおける基準画素pに対応する比較画像Iaにおける対応画素は、図3に示すエピポーラ線EL上に存在することになり、比較画像Iaにおける対応画素を求めるためには、比較画像Iaのエピポーラ線EL上の画素を探索すればよい。   As described above, since the imaging devices 510a and 510b are arranged in parallel equiposition, the comparison image Ia and the reference image Ib are also in parallel equivalence relations. Therefore, the corresponding pixel in the comparison image Ia corresponding to the reference pixel p in the reference image Ib exists on the epipolar line EL shown in FIG. 3, and in order to obtain the corresponding pixel in the comparison image Ia, the comparison image Ia The pixel on the epipolar line EL may be searched.

このようにして算出されたコスト値C(p,d)は、画素単位のシフト量dとの関係で、図4に示すグラフにより表される。図4の例では、コスト値Cは、シフト量d=5、12、19の場合が「0」となるため、最小値を求めることができない。例えば、画像におけるテクスチャが弱い部分がある場合には、このようにコスト値Cの最小値を求めることは困難になる。   The cost value C (p, d) calculated in this way is represented by the graph shown in FIG. 4 in relation to the shift amount d in pixel units. In the example of FIG. 4, the cost value C is “0” when the shift amount d = 5, 12, and 19, and thus the minimum value cannot be obtained. For example, when there is a portion where the texture is weak in the image, it is difficult to obtain the minimum value of the cost value C in this way.

<合成コスト値の算出>
図5は、合成コストを導出するための概念図である。図6は、シフト量と合成コスト値との関係を示すグラフである。図5および図6を参照しながら、合成コスト値Ls(p,d)の算出方法について説明する。
<Calculation of synthetic cost value>
FIG. 5 is a conceptual diagram for deriving the synthesis cost. FIG. 6 is a graph showing the relationship between the shift amount and the synthesis cost value. A method for calculating the combined cost value Ls (p, d) will be described with reference to FIGS. 5 and 6.

合成コスト値の算出は、SGM法に特有のものであり、コスト値C(p,d)の算出だけでなく、基準画素p(x,y)の周辺の画素を基準画素とした場合のコスト値を、基準画素p(x,y)におけるコスト値C(p,d)に集約させて、合成コスト値Ls(p,d)を算出するものである。合成コスト値Ls(p,d)を算出するためには、まず、経路コスト値Lr(p,d)を算出する。経路コスト値Lr(p,d)は、下記の(式3)によって算出する。   The calculation of the synthesis cost value is peculiar to the SGM method, and not only the calculation of the cost value C (p, d) but also the cost when the peripheral pixels of the reference pixel p (x, y) are used as the reference pixels. The values are aggregated into the cost value C (p, d) at the reference pixel p (x, y), and the combined cost value Ls (p, d) is calculated. In order to calculate the combined cost value Ls (p, d), first, the route cost value Lr (p, d) is calculated. The route cost value Lr (p, d) is calculated by the following (Formula 3).

Lr(p,d)=C(p,d)+min(Lr(p−r,k)+P(d,k))
(式3)
(P=0(d=kの場合)、
P=P1(|d−k|=1の場合)、
P=P2(>P1)(|d−k|>1の場合))
Lr (p, d) = C (p, d) + min (Lr (p−r, k) + P (d, k))
(Formula 3)
(P = 0 (when d = k))
P = P1 (when | d−k | = 1),
P = P2 (> P1) (when | dk |> 1))

(式3)に示すように経路コスト値Lrは、再帰的に求められる。ここで、rは、集約方向の方向ベクトルを示し、x方向およびy方向の2成分を有する。min()は、最小値を求める関数である。Lr(p−r,k)は、基準画素pの座標からr方向に1画素シフトした座標の画素について、シフト量を変化させた場合(この場合のシフト量をkとしている)のそれぞれの経路コスト値Lrを示す。そして、経路コスト値Lr(p−r,k)のうち、経路コスト値Lr(p,d)のシフト量であるdと、シフト量kとの間の関係に基づいて、下記の(1)〜(3)のように値P(d,k)を求め、Lr(p−r,k)+P(d,k)を算出している。   As shown in (Formula 3), the route cost value Lr is obtained recursively. Here, r indicates a direction vector in the aggregation direction, and has two components in the x direction and the y direction. min () is a function for obtaining the minimum value. Lr (p−r, k) is the respective path when the shift amount is changed (the shift amount in this case is k) for the pixel having the coordinate shifted by one pixel in the r direction from the coordinate of the reference pixel p. The cost value Lr is shown. Based on the relationship between d, which is the amount of shift of the route cost value Lr (p, d) in the route cost value Lr (pr, k), and the shift amount k, the following (1) The value P (d, k) is obtained as in (3), and Lr (pr, k) + P (d, k) is calculated.

(1)d=kの場合、P=0とする。すなわち、Lr(p−r,k)+P(d,k)=Lr(p−r,k)となる。
(2)|d−k|=1の場合、P=P1とする。すなわち、Lr(p−r,k)+P(d,k)=Lr(p−r,k)+P1となる。
(3)|d−k|>1の場合、P=P2(>P1)とする。すなわち、Lr(p−r,k)+P(d,k)=Lr(p−r,k)+P2となる。
(1) When d = k, P = 0. That is, Lr (p−r, k) + P (d, k) = Lr (p−r, k).
(2) When | d−k | = 1, P = P1. That is, Lr (p−r, k) + P (d, k) = Lr (p−r, k) + P1.
(3) When | d−k |> 1, P = P2 (> P1). That is, Lr (p−r, k) + P (d, k) = Lr (p−r, k) + P2.

そして、min(Lr(p−r,k)+P(d,k))は、上述の(1)〜(3)で算出したLr(p−r,k)+P(d,k)のうち最小の値を抽出した値となる。すなわち、比較画像Iaにおける基準画素pの座標の位置にある画素からr方向において隣接する画素(p−r)からシフト量dだけシフトした画素から離れた場合に、値P1、または値P1よりも大きい値P2を加算することにより、比較画像Iaにおける基準画素pの座標から離れた画素の経路コスト値Lrの影響を受け過ぎないようにしている。また、値P1および値P2は、予め実験により定められた固定パラメータであり、経路上で隣接する基準画素の視差値が連続になりやすいようなパラメータになっている。例えば、P1=48、P2=96である。このように、比較画像Iaにおいてr方向の各画素における経路コスト値Lrを求めるために、最初は、基準画像p(x,y)の座標からr方向の一番端の画素から経路コスト値Lrを求め、r方向に沿って経路コスト値Lrが求められる。   Min (Lr (p−r, k) + P (d, k)) is the smallest of Lr (p−r, k) + P (d, k) calculated in the above (1) to (3). It becomes the value which extracted the value of. That is, the value P1 or the value P1 is exceeded when the pixel located at the coordinate position of the reference pixel p in the comparison image Ia is away from the pixel shifted by the shift amount d from the pixel (p−r) adjacent in the r direction. By adding the large value P2, it is prevented from being excessively influenced by the path cost value Lr of the pixels away from the coordinates of the reference pixel p in the comparison image Ia. Further, the value P1 and the value P2 are fixed parameters determined in advance by experiments, and are parameters such that the parallax values of the reference pixels adjacent on the path are likely to be continuous. For example, P1 = 48 and P2 = 96. In this way, in order to obtain the path cost value Lr for each pixel in the r direction in the comparison image Ia, first, the path cost value Lr from the extreme end pixel in the r direction from the coordinates of the reference image p (x, y). And the route cost value Lr is obtained along the r direction.

そして、図5に示すように、8方向(r、r45、r90、r135、r180、r225、r270およびr315)の経路コスト値LrであるLr、Lr45、Lr90、Lr135、Lr180、Lr225、Lr270およびLr315が求められ、最終的に下記の(式4)に基づいて、合成コスト値Ls(p,d)が求められる。 Then, as shown in FIG. 5, Lr 0 , Lr 45 , Lr which are route cost values Lr in eight directions (r 0 , r 45 , r 90 , r 135 , r 180 , r 225 , r 270 and r 315 ). 90 , Lr 135 , Lr 180 , Lr 225 , Lr 270 and Lr 315 are obtained, and finally, a combined cost value Ls (p, d) is obtained based on the following (Equation 4).

Ls(p,d)=ΣLr (式4)   Ls (p, d) = ΣLr (Formula 4)

以上のようにして、算出された合成コスト値Ls(p,d)は、シフト量dとの関係で、図6に示すグラフによって表すことができる。図6の例では、合成コスト値Lsは、シフト量d=3の場合が最小値となるため、視差値dp=3として導出される。なお、上述の説明においては、r方向の数を8個として説明しているが、これに限定されるものではない。例えば、8方向をさらに2つに分割して16方向、または、3つに分割して24方向等にしてもよい。あるいは、8方向のうちのいずれかの経路コスト値Lrを求め、合成コスト値Lsを算出するものとしてもよい。   As described above, the calculated combined cost value Ls (p, d) can be represented by the graph shown in FIG. 6 in relation to the shift amount d. In the example of FIG. 6, the combined cost value Ls is derived as a parallax value dp = 3 because the minimum value is obtained when the shift amount d = 3. In the above description, the number in the r direction is eight, but the present invention is not limited to this. For example, the eight directions may be further divided into two to be 16 directions, or may be divided into three to be 24 directions. Or it is good also as what calculates | requires the path | route cost value Lr in any of eight directions, and calculates the synthetic | combination cost value Ls.

以下に、図面を参照しながら、本発明に係る画像処理装置、移動体、ロボット、機器制御方法およびプログラムの実施の形態を詳細に説明する。ここでは、ステレオマッチング処理を行う視差値導出装置1が自動車に搭載される場合を例に説明する。また、以下の実施の形態によって本発明が限定されるものではなく、以下の実施の形態における構成要素には、当業者が容易に想到できるもの、実質的に同一のもの、およびいわゆる均等の範囲のものが含まれる。さらに、以下の実施の形態の要旨を逸脱しない範囲で構成要素の種々の省略、置換および変更を行うことができる。   Hereinafter, embodiments of an image processing apparatus, a moving body, a robot, a device control method, and a program according to the present invention will be described in detail with reference to the drawings. Here, a case where the parallax value deriving device 1 that performs stereo matching processing is mounted on an automobile will be described as an example. In addition, the present invention is not limited by the following embodiments, and constituent elements in the following embodiments are easily conceivable by those skilled in the art, substantially the same, and so-called equivalent ranges. Is included. Furthermore, various omissions, substitutions, and changes of the components can be made without departing from the scope of the following embodiments.

[第1の実施の形態]
(視差値導出装置を備えた車両の概略構成)
図7は、第1の実施の形態に係る機器制御システムを車両に搭載した例を示す図である。図7を参照しながら、本実施の形態に係る機器制御システム50を搭載した車両100について説明する。図7のうち、図7(a)は、機器制御システム50を搭載した車両100の側面図であり、図7(b)は、車両100の正面図である。
[First Embodiment]
(Schematic configuration of a vehicle equipped with a parallax value deriving device)
FIG. 7 is a diagram illustrating an example in which the device control system according to the first embodiment is mounted on a vehicle. A vehicle 100 equipped with the device control system 50 according to the present embodiment will be described with reference to FIG. 7A, FIG. 7A is a side view of the vehicle 100 on which the device control system 50 is mounted, and FIG. 7B is a front view of the vehicle 100.

図7に示すように、自動車である車両100は、機器制御システム50を備えている。機器制御システム50は、居室空間である車室に設置された視差値導出装置1と、制御装置5と、ステアリングホイール6と、ブレーキペダル7と、を備えている。なお、機器制御システム50および視差値導出装置1は、いずれも「画像処理装置」として機能するものとする。   As shown in FIG. 7, a vehicle 100 that is an automobile includes a device control system 50. The device control system 50 includes a parallax value deriving device 1, a control device 5, a steering wheel 6, and a brake pedal 7 that are installed in a passenger compartment that is a living room space. Note that both the device control system 50 and the parallax value deriving device 1 function as “image processing devices”.

視差値導出装置1は、車両100の進行方向を撮像する撮像機能を有し、例えば、車両100のフロントウィンドウ内側のバックミラー近傍に設置される。視差値導出装置1は、詳細は後述するが、本体2と、本体2に固定された撮像部10a(第1撮像手段)と、撮像部10b(第2撮像手段)とを備えている。撮像部10a、10bは、車両100の進行方向の被写体を撮像できるように本体2に固定されている。   The parallax value deriving device 1 has an imaging function for imaging the traveling direction of the vehicle 100 and is installed, for example, in the vicinity of the rearview mirror inside the front window of the vehicle 100. The parallax value deriving device 1 includes a main body 2, an imaging unit 10 a (first imaging unit) fixed to the main body 2, and an imaging unit 10 b (second imaging unit), details of which will be described later. The imaging units 10 a and 10 b are fixed to the main body 2 so that a subject in the traveling direction of the vehicle 100 can be imaged.

制御装置5は、視差値導出装置1から受信した視差画像の画像データに基づいて求まる視差値導出装置1から被写体までの距離情報により、各種認識処理および各種車両制御を実行する。制御装置5は、認識処理の例として、状態の変化が大きい人物、標識、車両、その他の障害物(第2被写体)を認識する物体認識処理、または、道路の路面等のテクスチャの弱い等の状態の変化が小さい部分(第1被写体)を認識する路面認識処理等を実行する。制御装置5は、車両制御の例として、視差値導出装置1から受信した視差画像の画像データに基づいて、ステアリングホイール6を含むステアリング系統(制御対象)を制御して障害物を回避するステアリング制御、または、ブレーキペダル7(制御対象)を制御して車両100を減速および停止させるブレーキ制御等を実行する。なお、状態の変化が大きい被写体とは、例えば、人物、標識および車両等のように、画像の中で位置の変動の度合いが大きい被写体、またはテクスチャの強い被写体等を示すものとする。   The control device 5 executes various recognition processes and various vehicle controls based on the distance information from the parallax value deriving device 1 to the subject obtained based on the image data of the parallax image received from the parallax value deriving device 1. As an example of the recognition process, the control device 5 recognizes a person, a sign, a vehicle, and other obstacles (second subject) whose state change is large, or a texture such as a road surface is weak. A road surface recognition process for recognizing a portion (first subject) whose state change is small is executed. As an example of vehicle control, the control device 5 controls the steering system (control target) including the steering wheel 6 based on the image data of the parallax image received from the parallax value deriving device 1 to avoid an obstacle. Alternatively, brake control or the like for controlling the brake pedal 7 (control target) to decelerate and stop the vehicle 100 is executed. Note that a subject having a large change in state indicates, for example, a subject having a large degree of positional variation in an image, a subject having a strong texture, or the like, such as a person, a sign, or a vehicle.

このような視差値導出装置1および制御装置5を含む機器制御システム50のように、物体認識処理および路面認識処理等の認識処理、ならびにステアリング制御またはブレーキ制御等の車両制御が実行されることによって、車両100の運転の安全性を向上することができる。   By performing recognition processing such as object recognition processing and road surface recognition processing, and vehicle control such as steering control or brake control as in the device control system 50 including the parallax value deriving device 1 and the control device 5 described above. The safety of driving the vehicle 100 can be improved.

なお、上述のように、視差値導出装置1は、車両100の前方を撮像するものとしたが、これに限定されるものではない。すなわち、視差値導出装置1は、車両100の後方または側方を撮像するように設置されるものとしてもよい。この場合、視差値導出装置1は、車両100の後方の後続車、または側方を並進する他の車両等の距離を検出することができる。そして、制御装置5は、車両100の車線変更時または車線合流時等における危険を検知して、上述の車両制御を実行することができる。また、制御装置5は、車両100の駐車時等におけるバック動作において、視差値導出装置1によって検出された車両100の後方の障害物の視差画像に基づいて、衝突の危険があると判断した場合に、上述の車両制御を実行することができる。   As described above, the parallax value deriving device 1 images the front of the vehicle 100, but is not limited thereto. That is, the parallax value deriving device 1 may be installed so as to image the rear or side of the vehicle 100. In this case, the parallax value deriving device 1 can detect the distance of a subsequent vehicle behind the vehicle 100 or another vehicle that translates laterally. And the control apparatus 5 can detect the danger at the time of the lane change of the vehicle 100, or at the time of lane merge, etc., and can perform the above-mentioned vehicle control. In addition, when the control device 5 determines that there is a risk of a collision based on the parallax image of the obstacle behind the vehicle 100 detected by the parallax value deriving device 1 in the back operation when the vehicle 100 is parked or the like. In addition, the vehicle control described above can be executed.

(視差値導出装置の構成)
図8は、第1の実施の形態に係る視差値導出装置の外観の一例を示す図である。図8に示すように、視差値導出装置1は、上述のように、本体2と、本体2に固定された撮像部10aと、撮像部10bとを備えている。撮像部10a、10bは、本体2に対して平行等位に配置された一対の円筒形状のカメラで構成されている。また、説明の便宜上、図8に示す撮像部10aを「左」のカメラと称し、撮像部10bを「右」のカメラと称するものとする。
(Configuration of parallax value deriving device)
FIG. 8 is a diagram illustrating an example of the appearance of the parallax value deriving device according to the first embodiment. As shown in FIG. 8, the parallax value deriving device 1 includes the main body 2, the imaging unit 10a fixed to the main body 2, and the imaging unit 10b as described above. The imaging units 10 a and 10 b are configured by a pair of cylindrical cameras arranged in parallel equiposition with respect to the main body 2. For convenience of explanation, the imaging unit 10a illustrated in FIG. 8 is referred to as a “left” camera, and the imaging unit 10b is referred to as a “right” camera.

<視差値導出装置のハードウェア構成>
図9は、本実施の形態に係る視差値導出装置のハードウェア構成の一例を示す図である。図9を参照しながら、視差値導出装置1のハードウェア構成について説明する。
<Hardware configuration of parallax value deriving device>
FIG. 9 is a diagram illustrating an example of a hardware configuration of the disparity value deriving device according to the present embodiment. A hardware configuration of the parallax value deriving device 1 will be described with reference to FIG.

図9に示すように、視差値導出装置1は、本体2と、撮像部10aと、撮像部10bと、信号変換部20aと、信号変換部20bと、画像処理部30と、を備えている。   As illustrated in FIG. 9, the parallax value deriving device 1 includes a main body 2, an imaging unit 10 a, an imaging unit 10 b, a signal conversion unit 20 a, a signal conversion unit 20 b, and an image processing unit 30. .

本体2は、視差値導出装置1の筐体を構成するものであり、撮像部10a、10bを固定して支持し、信号変換部20a、20bおよび画像処理部30を内蔵する。   The main body 2 constitutes the casing of the parallax value deriving device 1, and fixes and supports the imaging units 10a and 10b, and incorporates the signal conversion units 20a and 20b and the image processing unit 30.

撮像部10aは、前方の被写体を撮像してアナログ形式の画像データを生成する処理部である。撮像部10aは、撮像レンズ11aと、絞り12aと、画像センサ13aと、を備えている。   The imaging unit 10a is a processing unit that captures an image of a front subject and generates analog image data. The imaging unit 10a includes an imaging lens 11a, a diaphragm 12a, and an image sensor 13a.

撮像レンズ11aは、入射する光を屈折させて物体の像を画像センサ13aに結像させるための光学素子である。絞り12aは、撮像レンズ11aを通過した光の一部を遮ることによって、画像センサ13aに結像される光の量を調整する部材である。画像センサ13aは、撮像レンズ11aに入射し、絞り12aを通過した光を電気的なアナログ形式の画像データに変換する固体撮像素子である。画像センサ13aは、例えば、CCD(Charge Coupled Devices)またはCMOS(Complementary Metal Oxide Semiconductor)によって実現される。   The imaging lens 11a is an optical element that refracts incident light to form an image of an object on the image sensor 13a. The diaphragm 12a is a member that adjusts the amount of light imaged on the image sensor 13a by blocking part of the light that has passed through the imaging lens 11a. The image sensor 13a is a solid-state imaging device that converts light that has entered the imaging lens 11a and passed through the aperture 12a into electrical analog image data. The image sensor 13a is realized by, for example, a CCD (Charge Coupled Devices) or a CMOS (Complementary Metal Oxide Semiconductor).

撮像部10bは、前方の被写体を撮像してアナログ形式の画像データを生成する処理部である。撮像部10bは、撮像レンズ11bと、絞り12bと、画像センサ13bと、を備えている。撮像レンズ11b、絞り12bおよび画像センサ13bの機能は、それぞれ上述した撮像レンズ11a、絞り12aおよび画像センサ13aの機能と同様である。また、撮像レンズ11aおよび撮像レンズ11bは、それぞれのレンズ面が互いに同一平面内になるように設置されている。   The imaging unit 10b is a processing unit that captures an image of a front subject and generates analog image data. The imaging unit 10b includes an imaging lens 11b, a diaphragm 12b, and an image sensor 13b. The functions of the imaging lens 11b, the diaphragm 12b, and the image sensor 13b are the same as the functions of the imaging lens 11a, the diaphragm 12a, and the image sensor 13a, respectively. In addition, the imaging lens 11a and the imaging lens 11b are installed such that their lens surfaces are in the same plane.

信号変換部20aは、撮像部10aにより生成されたアナログ形式の画像データを、デジタル形式の画像データに変換する処理部である。信号変換部20aは、CDS(Correlated Double Sampling)21aと、AGC(Auto Gain Control)22aと、ADC(Analog Digital Converter)23aと、フレームメモリ24aと、を備えている。   The signal conversion unit 20a is a processing unit that converts analog image data generated by the imaging unit 10a into digital image data. The signal converter 20a includes a CDS (Correlated Double Sampling) 21a, an AGC (Auto Gain Control) 22a, an ADC (Analog Digital Converter) 23a, and a frame memory 24a.

CDS21aは、画像センサ13aにより生成されたアナログ形式の画像データに対して、相関二重サンプリング、横方向の微分フィルタ、および縦方向の平滑フィルタ等によりノイズを除去する。AGC22aは、CDS21aによってノイズが除去されたアナログ形式の画像データの強度を制御する利得制御を行う。ADC23aは、AGC22aによって利得制御されたアナログ形式の画像データをデジタル形式の画像データに変換する。フレームメモリ24aは、ADC23aによって変換された画像データを記憶する。   The CDS 21a removes noise from the analog image data generated by the image sensor 13a using correlated double sampling, a horizontal differential filter, a vertical smoothing filter, and the like. The AGC 22a performs gain control for controlling the intensity of analog image data from which noise has been removed by the CDS 21a. The ADC 23a converts analog image data whose gain is controlled by the AGC 22a into digital image data. The frame memory 24a stores the image data converted by the ADC 23a.

信号変換部20bは、撮像部10bにより生成されたアナログ形式の画像データを、デジタル形式の画像データに変換する処理部である。信号変換部20bは、CDS21bと、AGC22bと、ADC23bと、フレームメモリ24bと、を備えている。CDS21b、AGC22b、ADC23bおよびフレームメモリ24bの機能は、それぞれ上述したCDS21a、AGC22a、ADC23aおよびフレームメモリ24aの機能と同様である。   The signal conversion unit 20b is a processing unit that converts analog image data generated by the imaging unit 10b into digital image data. The signal conversion unit 20b includes a CDS 21b, an AGC 22b, an ADC 23b, and a frame memory 24b. The functions of the CDS 21b, AGC 22b, ADC 23b, and frame memory 24b are the same as the functions of the CDS 21a, AGC 22a, ADC 23a, and frame memory 24a, respectively.

画像処理部30は、信号変換部20aおよび信号変換部20bによって変換された画像データに対して画像処理を実行する装置である。画像処理部30は、FPGA(Field Programmable Gate Array)31と、CPU(Central Processing Unit)32と、ROM(Read Only Memory)33と、RAM(Random Access Memory)34と、通信I/F(Interface)35と、CANC(CAN Controller)36と、バス39と、を備えている。   The image processing unit 30 is a device that performs image processing on the image data converted by the signal conversion unit 20a and the signal conversion unit 20b. The image processing unit 30 includes an FPGA (Field Programmable Gate Array) 31, a CPU (Central Processing Unit) 32, a ROM (Read Only Memory) 33, a RAM (Random Access Memory) 34, and a communication I / F (Interface). 35, a CANC (CAN Controller) 36, and a bus 39.

FPGA31は、集積回路であり、ここでは、画像データに基づく画像における視差値を導出する処理を行う。CPU32は、視差値導出装置1の各機能を制御する。ROM33は、CPU32が視差値導出装置1の各機能を制御するために実行する画像処理用プログラムを記憶している。RAM34は、CPU32のワークエリアとして使用される。通信I/F35は、外部コントローラ等と通信するためのインターフェースであり、例えば、図9に示すような画像表示装置3が接続される。CANC36は、CAN(Controller Area Network)プロトコルに基づいて、他の制御装置(ECU(Electronic Control Unit))等と通信を行い、例えば、図7に示すような制御装置5と接続される。なお、CANC36は、CANプロトコルによる通信を行うことに限定されるものではなく、例えば、FlexRayプロトコルによる通信を行うものとしてもよい。バス39は、図9に示すように、FPGA31、CPU32、ROM33、RAM34、通信I/F35およびCANC36を互いに電気的に接続するアドレスバスおよびデータバス等である。   The FPGA 31 is an integrated circuit, and here performs processing for deriving a parallax value in an image based on image data. The CPU 32 controls each function of the parallax value deriving device 1. The ROM 33 stores an image processing program that the CPU 32 executes to control each function of the parallax value deriving device 1. The RAM 34 is used as a work area for the CPU 32. The communication I / F 35 is an interface for communicating with an external controller or the like, and is connected to, for example, an image display device 3 as shown in FIG. The CANC 36 communicates with other control devices (ECU (Electronic Control Unit)) and the like based on a CAN (Controller Area Network) protocol, and is connected to the control device 5 as shown in FIG. 7, for example. The CANC 36 is not limited to performing communication using the CAN protocol, and may perform communication using the FlexRay protocol, for example. As shown in FIG. 9, the bus 39 is an address bus and a data bus that electrically connect the FPGA 31, the CPU 32, the ROM 33, the RAM 34, the communication I / F 35, and the CANC 36.

なお、FPGA31は、FPGAであることに限定されるものではなく、例えば、ASIC(Application Specific Integrated Circuit)もしくはDSP(Digital Signal Processor)によって構成、または、これらを組み合わせて構成されてもよい。   The FPGA 31 is not limited to being an FPGA, and may be configured by, for example, an ASIC (Application Specific Integrated Circuit) or a DSP (Digital Signal Processor), or a combination thereof.

図9に示す画像表示装置3は、液晶ディスプレイ、有機EL(Electro−Luminescence)ディスプレイ、またはHUD(Head Up Display)等の表示装置である。画像表示装置3は、信号変換部20a、20bにより変換された画像データに基づく画像、または、FPGA31により導出された視差値で表された視差画像等を表示する。視差画像を表示する方法としては、例えば、視差画像上のそれぞれの視差値(またはそれに基づく距離情報)に応じて異なる色で表示する方法等がある。   The image display device 3 shown in FIG. 9 is a display device such as a liquid crystal display, an organic EL (Electro-Luminescence) display, or a HUD (Head Up Display). The image display device 3 displays an image based on the image data converted by the signal conversion units 20a and 20b, a parallax image represented by a parallax value derived by the FPGA 31, and the like. As a method of displaying the parallax image, for example, there is a method of displaying in a different color according to each parallax value (or distance information based thereon) on the parallax image.

<視差値導出装置のブロック構成および各ブロックの動作>
図10は、第1の実施の形態に係る視差値導出装置のブロック構成の一例を示す図である。図11は、第1の実施の形態に係る視差値導出装置により撮像された画像の一例を示す図である。図12は、第1の実施の形態において基準画像の画素に対するデンス処理のスキャン動作を示す図である。図13は、第1の実施の形態におけるシフト量と合成コスト値との関係を示すグラフである。図14は、パラボラフィッティングによるサブピクセル推定を説明する図である。図15は、最小二乗法によるサブピクセル推定を説明する図である。図16は、サブピクセル推定を用いたデンス視差画像を示す概念図である。図10乃至図16を参照しながら、視差値導出装置1の要部のブロック構成および各ブロックの動作について説明する。
<Block Configuration of Disparity Value Deriving Device and Operations of Each Block>
FIG. 10 is a diagram illustrating an example of a block configuration of the disparity value deriving device according to the first embodiment. FIG. 11 is a diagram illustrating an example of an image captured by the parallax value deriving device according to the first embodiment. FIG. 12 is a diagram illustrating a scanning operation of dense processing for the pixels of the reference image in the first embodiment. FIG. 13 is a graph showing the relationship between the shift amount and the synthesis cost value in the first embodiment. FIG. 14 is a diagram for explaining subpixel estimation by parabolic fitting. FIG. 15 is a diagram for explaining subpixel estimation by the method of least squares. FIG. 16 is a conceptual diagram showing a dense parallax image using sub-pixel estimation. With reference to FIGS. 10 to 16, the block configuration of the main part of the parallax value deriving device 1 and the operation of each block will be described.

図10に示すように、視差値導出装置1は、画像取得部110(取得手段)と、フィルタ部210と、補正部310と、第1記憶部350と、視差値演算部300(デンス処理手段、マッチング処理手段)と、第2記憶部360と、視差画像生成部370(生成手段)と、を備えている。視差画像生成部370の出力側には、認識処理部410が接続されている。   As shown in FIG. 10, the parallax value derivation device 1 includes an image acquisition unit 110 (acquisition unit), a filter unit 210, a correction unit 310, a first storage unit 350, and a parallax value calculation unit 300 (dense processing unit). , A matching processing unit), a second storage unit 360, and a parallax image generation unit 370 (generation unit). A recognition processing unit 410 is connected to the output side of the parallax image generation unit 370.

画像取得部110は、左右2台のカメラにより前方の被写体を撮像して、それぞれアナログ形式の画像データを生成し、各画像データ基づく画像である2つの輝度画像を得る処理部である。画像取得部110により撮像された輝度画像の例を、図11に示す。図11は、2つの輝度画像のうち基準画像Ibの例として示したものであり、図11に示す基準画像Ibには、例えば、人物の画像である画像部Img1、車両の画像である画像部Img2、および道路の路面の画像である画像部Img3等を含む。画像取得部110は、図9に示す撮像部10aおよび撮像部10bによって実現される。   The image acquisition unit 110 is a processing unit that captures an object in front by two left and right cameras, generates image data in analog format, and obtains two luminance images that are images based on each image data. An example of the luminance image captured by the image acquisition unit 110 is shown in FIG. FIG. 11 shows an example of the reference image Ib of the two luminance images. The reference image Ib shown in FIG. 11 includes, for example, an image portion Img1 that is a person image and an image portion that is a vehicle image. Img2, an image portion Img3 that is an image of the road surface, and the like. The image acquisition unit 110 is realized by the imaging unit 10a and the imaging unit 10b illustrated in FIG.

フィルタ部210は、画像取得部110により得られた2つの輝度画像の画像データに対して、ノイズを除去し、デジタル形式の画像データに変換して出力する。ここで、フィルタ部210が出力する2つの輝度画像の画像データ(以下、単に「輝度画像」と称する)のうち、画像取得部110の右のカメラ(撮像部10b)により撮像された基準画像Ibの画像データ(以下、単に「基準画像Ib」という)とし、左のカメラ(撮像部10a)により撮像された比較画像Iaの画像データ(以下、単に「比較画像Ia」という)とする。すなわち、フィルタ部210は、画像取得部110から出力された2つの輝度画像に基づいて、基準画像Ibおよび比較画像Iaを出力する。フィルタ部210は、図9に示す信号変換部20a、20bによって実現される。   The filter unit 210 removes noise from the image data of the two luminance images obtained by the image acquisition unit 110, converts the image data into digital image data, and outputs the image data. Here, among the image data of the two luminance images output from the filter unit 210 (hereinafter simply referred to as “luminance image”), the reference image Ib captured by the right camera (imaging unit 10b) of the image acquisition unit 110. Image data (hereinafter, simply referred to as “reference image Ib”) and image data of the comparison image Ia (hereinafter simply referred to as “comparison image Ia”) captured by the left camera (imaging unit 10a). That is, the filter unit 210 outputs the reference image Ib and the comparison image Ia based on the two luminance images output from the image acquisition unit 110. The filter unit 210 is realized by the signal conversion units 20a and 20b illustrated in FIG.

補正部310は、フィルタ部210から入力した2つの画像(比較画像Ia、基準画像Ib)に対して、撮像部10aと撮像部10bとの間の光学的なずれ、および幾何学的なずれを補正し、補正した比較画像Iaおよび基準画像Ibを出力する。補正部310は、図9に示すFPGA31によって実現される。   The correction unit 310 performs an optical shift and a geometric shift between the imaging unit 10a and the imaging unit 10b with respect to the two images (the comparison image Ia and the reference image Ib) input from the filter unit 210. The corrected comparison image Ia and the reference image Ib are output. The correction unit 310 is realized by the FPGA 31 illustrated in FIG.

第1記憶部350は、補正部310から出力された比較画像Iaおよび基準画像Ibを一時記憶する記憶部である。第1記憶部350は、図9に示すRAM34によって実現される。なお、第1記憶部350は、図9において図示しないHDD(Hard Disk Drive)等の外部記憶装置によって実現されるものとしてもよい。   The first storage unit 350 is a storage unit that temporarily stores the comparison image Ia and the reference image Ib output from the correction unit 310. The first storage unit 350 is realized by the RAM 34 shown in FIG. The first storage unit 350 may be realized by an external storage device such as an HDD (Hard Disk Drive) not shown in FIG.

視差値演算部300は、比較画像Iaおよび基準画像Ibに対して、ステレオマッチング処理であるデンス処理およびブロックマッチング処理を実行する処理部である。視差値演算部300は、第1コスト算出部320(第1算出手段)と、コスト合成部330(合成手段)と、第1サブピクセル推定部340(第1導出手段)と、第2コスト算出部321(第2算出手段)と、第2サブピクセル推定部341(第2導出手段)と、を含んでいる。視差値演算部300は、図9に示すFPGA31によって実現され、本実施の形態では、視差値演算部300に含まれる上述の各処理部は、共通のハードウェア回路(集積回路)によって実現されているものとする。視差値演算部300のうち、第1コスト算出部320、コスト合成部330および第1サブピクセル推定部340は、後述する動作により、比較画像Iaおよび基準画像Ibに対してデンス処理を実行する。また、視差値演算部300のうち、第2コスト算出部321および第2サブピクセル推定部341は、後述する動作により、比較画像Iaおよび基準画像Ibに対してブロックマッチング処理を実行する。   The parallax value calculation unit 300 is a processing unit that performs a dense process and a block matching process, which are stereo matching processes, on the comparison image Ia and the reference image Ib. The parallax value calculation unit 300 includes a first cost calculation unit 320 (first calculation unit), a cost synthesis unit 330 (synthesis unit), a first subpixel estimation unit 340 (first derivation unit), and a second cost calculation. A unit 321 (second calculation unit) and a second sub-pixel estimation unit 341 (second derivation unit). The disparity value calculation unit 300 is realized by the FPGA 31 illustrated in FIG. 9, and in the present embodiment, the above-described processing units included in the disparity value calculation unit 300 are realized by a common hardware circuit (integrated circuit). It shall be. Of the parallax value calculation unit 300, the first cost calculation unit 320, the cost synthesis unit 330, and the first sub-pixel estimation unit 340 perform a dense process on the comparison image Ia and the reference image Ib by operations described later. In addition, in the parallax value calculation unit 300, the second cost calculation unit 321 and the second subpixel estimation unit 341 perform block matching processing on the comparison image Ia and the reference image Ib by operations described later.

第1コスト算出部320は、基準画像Ibにおける基準画素p(x,y)(第1基準領域)の輝度値、および、基準画素p(x,y)に基づく比較画像Iaにおけるエピポーラ線上で、基準画素p(x,y)の位置に相当する画素からシフト量dでシフトすることにより特定される、対応画素の候補である候補画素q(x+d,y)(第1候補領域)の各輝度値に基づいて、各候補画素q(x+d,y)の第1コスト値C1(p,d)を算出する。第1コスト算出部320が算出する第1コスト値C1としては、例えば、SAD(Sum of Absolute Differences)、またはSSD(Sum of Squared Differences)等を用いることができる。第1コスト算出部320は、上述のように、基準画像Ibにおける基準画素pごとに、比較画像Iaにおける各候補画素qの第1コスト値C1を算出していく。この場合、第1コスト算出部320は、図12に示すように、ラスタースキャンの要領で、基準画像Ibにおいて基準画素pを左上の画素から水平方向に一画素ずつ移動させつつ、かつ垂直方向に移動させながら、各基準画素pに対応する比較画像Iaにおける第1コスト値C1を算出していく。そして、シフト量dと、第1コスト算出部320により算出された第1コスト値C1との関係を示すグラフの例が、上述した図4に示すグラフにおいてコスト値Cを第1コスト値C1に置き換えたものである。   The first cost calculation unit 320 performs the luminance value of the reference pixel p (x, y) (first reference region) in the reference image Ib and the epipolar line in the comparison image Ia based on the reference pixel p (x, y). Each brightness of candidate pixel q (x + d, y) (first candidate region), which is a candidate for the corresponding pixel, specified by shifting by the shift amount d from the pixel corresponding to the position of the reference pixel p (x, y) Based on the value, the first cost value C1 (p, d) of each candidate pixel q (x + d, y) is calculated. As the first cost value C1 calculated by the first cost calculation unit 320, for example, SAD (Sum of Absolute Differences), SSD (Sum of Squared Differences), or the like can be used. As described above, the first cost calculation unit 320 calculates the first cost value C1 of each candidate pixel q in the comparison image Ia for each reference pixel p in the reference image Ib. In this case, as shown in FIG. 12, the first cost calculation unit 320 moves the reference pixel p in the reference image Ib from the upper left pixel one pixel at a time in the horizontal direction and in the vertical direction in the manner of raster scanning. While moving, the first cost value C1 in the comparison image Ia corresponding to each reference pixel p is calculated. An example of a graph showing the relationship between the shift amount d and the first cost value C1 calculated by the first cost calculation unit 320 is the cost value C is changed to the first cost value C1 in the graph shown in FIG. It is a replacement.

コスト合成部330は、基準画像Ibにおける基準画素p(x,y)の周辺の画素を基準画素とした場合のその基準画素(第2基準領域)についての比較画像Iaにおける画素の第1コスト値C1を、第1コスト算出部320により算出された候補画素q(x+d,y)の第1コスト値C1(p,d)に集約させて、候補画素q(x+d,y)の合成コスト値Ls(p,d)を算出する。コスト合成部330は、画素単位にシフトするシフト量dに基づいて合成コスト値Ls(p,d)を算出する。コスト合成部330は、合成コスト値Lsを算出するために、まず、上述の(式3)によって、所定のr方向の経路コスト値Lr(p,d)を算出する。次に、コスト合成部330は、図5および図12に示したように、8方向の経路コスト値LrであるLr、Lr45、Lr90、Lr135、Lr180、Lr225、Lr270およびLr315を算出し、最終的に上述の(式4)に基づいて、合成コスト値Ls(p,d)を算出する。そして、画素単位のシフト量dと、コスト合成部330により算出された合成コスト値Lsとの関係を示すグラフが、図13に示すグラフである。図13に示すように、合成コスト値Lsは、シフト量d=3のとき最小値となる。 The cost synthesizing unit 330 uses the pixel around the reference pixel p (x, y) in the reference image Ib as the reference pixel, and the first cost value of the pixel in the comparison image Ia for the reference pixel (second reference region). C1 is aggregated into the first cost value C1 (p, d) of the candidate pixel q (x + d, y) calculated by the first cost calculation unit 320, and the combined cost value Ls of the candidate pixel q (x + d, y) (P, d) is calculated. The cost synthesis unit 330 calculates a synthesis cost value Ls (p, d) based on the shift amount d that is shifted in units of pixels. In order to calculate the combined cost value Ls, the cost combining unit 330 first calculates a route cost value Lr (p, d) in a predetermined r direction according to the above (Equation 3). Next, as shown in FIGS. 5 and 12, the cost composition unit 330 performs Lr 0 , Lr 45 , Lr 90 , Lr 135 , Lr 180 , Lr 225 , Lr 270 and eight-way route cost values Lr. Lr 315 is calculated, and finally, the combined cost value Ls (p, d) is calculated based on the above (Formula 4). And the graph which shows the relationship between the shift amount d of a pixel unit and the synthetic | combination cost value Ls calculated by the cost synthetic | combination part 330 is a graph shown in FIG. As shown in FIG. 13, the combined cost value Ls becomes the minimum value when the shift amount d = 3.

第1サブピクセル推定部340は、コスト合成部330により算出された、基準画像Ibにおける基準画素についての比較画像Iaにおける画素の合成コスト値Lsの最小値(第1極値)に対応するシフト量d、およびそれに隣接するシフト量dにおける合成コスト値Lsに基づいて、サブピクセル推定を実行する。図13に示す合成コスト値Lsのグラフは、上述のように、画素単位のシフト量dに対する合成コスト値Lsのグラフである。図13に示すグラフの合成コスト値Lsの最小値は、画素単位のシフト量d=3における合成コスト値Lsということになる。すなわち、図13に示すような画素単位のシフト量dに対する合成コスト値Lsのグラフにおいては、視差値として画素単位の値を導出することしかできないことになる。ここで、サブピクセル推定とは、視差値を画素単位の値ではなく、画素より小さい単位(以下、サブピクセル単位という)の視差値を第1視差値dp1として推定して導出するものである。   The first sub-pixel estimation unit 340 calculates the shift amount corresponding to the minimum value (first extreme value) of the combined cost value Ls of the pixels in the comparison image Ia for the reference pixel in the reference image Ib calculated by the cost combining unit 330. Sub-pixel estimation is executed based on the combined cost value Ls at d and the shift amount d adjacent thereto. The graph of the synthesis cost value Ls shown in FIG. 13 is a graph of the synthesis cost value Ls with respect to the shift amount d in pixel units as described above. The minimum value of the synthesis cost value Ls in the graph shown in FIG. 13 is the synthesis cost value Ls at the shift amount d = 3 in pixel units. That is, in the graph of the combined cost value Ls with respect to the shift amount d in pixel units as shown in FIG. 13, it is only possible to derive the value in pixel units as the parallax value. Here, sub-pixel estimation is to estimate and derive a parallax value not in units of pixels but in units smaller than pixels (hereinafter referred to as sub-pixel units) as the first parallax value dp1.

まず、図14を参照しながら、第1サブピクセル推定部340がパラボラフィッティングによるサブピクセル推定を実行する場合について説明する。第1サブピクセル推定部340は、コスト合成部330によって算出された合成コスト値Lsのグラフ(図13)において、合成コスト値Lsが最小となるシフト量dの値を求める。図13の例では、シフト量d=3の場合が、合成コスト値Lsが最小となる。次に、第1サブピクセル推定部340は、シフト量d=3に隣接するシフト量dを求める。具体的には、シフト量d=2,4である。次に、第1サブピクセル推定部340は、図13に示すシフト量dと合成コスト値Lsとのグラフにおいて、図14に示すように、シフト量d=2,3,4である3点を通る下に凸の2次曲線を求める。そして、第1サブピクセル推定部340は、その2次曲線の極小値に対応するサブピクセル単位のシフト量dが第1視差値dp1であると推定する。   First, a case where the first subpixel estimation unit 340 performs subpixel estimation by parabolic fitting will be described with reference to FIG. The first sub-pixel estimation unit 340 obtains the value of the shift amount d that minimizes the synthesis cost value Ls in the graph of the synthesis cost value Ls calculated by the cost synthesis unit 330 (FIG. 13). In the example of FIG. 13, the combined cost value Ls is minimum when the shift amount d = 3. Next, the first sub-pixel estimation unit 340 obtains a shift amount d adjacent to the shift amount d = 3. Specifically, the shift amount d = 2,4. Next, in the graph of the shift amount d and the combined cost value Ls shown in FIG. 13, the first subpixel estimation unit 340 calculates three points where the shift amount d = 2, 3 and 4 as shown in FIG. 14. A convex quadratic curve passing through is obtained. Then, the first subpixel estimation unit 340 estimates that the shift amount d in subpixel units corresponding to the minimum value of the quadratic curve is the first parallax value dp1.

次に、図15を参照しながら、第1サブピクセル推定部340が最小二乗法によるサブピクセル推定を実行する場合について説明する。第1サブピクセル推定部340は、コスト合成部330によって算出された合成コスト値Lsのグラフ(図13)において、合成コスト値Lsが最小となるシフト量dの値を求める。図13の例では、シフト量d=3の場合が、合成コスト値Lsが最小となる。次に、第1サブピクセル推定部340は、シフト量d=3の近傍の4つのシフト量dを求める。具体的には、シフト量d=1,2,4,5である。次に、第1サブピクセル推定部340は、図13に示すシフト量dと合成コスト値Lsとのグラフにおいて、図15に示すように、最小二乗法によってシフト量d=1〜5である5点の近傍を通る下に凸の2次曲線を求める。そして、第1サブピクセル推定部340は、その2次曲線の極小値に対応するサブピクセル単位のシフト量dが第1視差値dp1であると推定する。   Next, a case where the first subpixel estimation unit 340 performs subpixel estimation by the least square method will be described with reference to FIG. The first sub-pixel estimation unit 340 obtains the value of the shift amount d that minimizes the synthesis cost value Ls in the graph of the synthesis cost value Ls calculated by the cost synthesis unit 330 (FIG. 13). In the example of FIG. 13, the combined cost value Ls is minimum when the shift amount d = 3. Next, the first sub-pixel estimation unit 340 obtains four shift amounts d in the vicinity of the shift amount d = 3. Specifically, the shift amount d = 1, 2, 4, 5. Next, in the graph of the shift amount d and the combined cost value Ls shown in FIG. 13, the first subpixel estimation unit 340 has a shift amount d = 1 to 5 by the least square method as shown in FIG. 15. A downward convex quadratic curve passing through the vicinity of the point is obtained. Then, the first subpixel estimation unit 340 estimates that the shift amount d in subpixel units corresponding to the minimum value of the quadratic curve is the first parallax value dp1.

第1サブピクセル推定部340は、図14に示すパラボラフィッティングによるサブピクセル推定、または、図15に示す最小二乗法によるサブピクセル推定のいずれかによって、第1視差値dp1を推定して導出する。   The first subpixel estimation unit 340 estimates and derives the first parallax value dp1 by either subpixel estimation by parabolic fitting shown in FIG. 14 or subpixel estimation by the least square method shown in FIG.

以上のように、コスト合成部330によって合成コスト値Lsが算出され、さらに、第1サブピクセル推定部340によって合成コスト値Lsのグラフについてサブピクセル推定が実行されるものとしている。これによって、輝度画像にテクスチャが弱い部分がある場合においても、精度よく視差値を導出することができ、かつ、サブピクセル単位で視差値を推定するので密な視差値を導出することができる。   As described above, the synthesis cost value Ls is calculated by the cost synthesis unit 330, and further, the first subpixel estimation unit 340 performs subpixel estimation on the graph of the synthesis cost value Ls. Thereby, even when there is a portion where the texture is weak in the luminance image, the parallax value can be accurately derived, and the parallax value is estimated in units of sub-pixels, so that a dense parallax value can be derived.

なお、サブピクセル推定は、上述のパラボラフィッティングによるもの、または、最小二乗法によるものに限定されるものではなく、その他の方法によるサブピクセル推定であってもよい。例えば、第1サブピクセル推定部340は、図14に示す3点を用いて、2次曲線ではなく、3点を通る等角直線を求めて視差値を推定する等角直線フィッティングによりサブピクセル推定を実行するものとしてもよい。   The sub-pixel estimation is not limited to the above-described parabolic fitting or the least-square method, and may be sub-pixel estimation using other methods. For example, the first subpixel estimation unit 340 uses the three points shown in FIG. 14 to perform subpixel estimation by equiangular straight line fitting that estimates a disparity value by obtaining an equiangular straight line that passes through three points instead of a quadratic curve. It is good also as what performs.

また、最小二乗法によるサブピクセル推定において、図15に示すグラフ上の5点を用いて2次曲線を求めるものとしたが、これに限定されるものではなく、異なる数の点を用いて2次曲線を求めるものとしてもよい。   Further, in the subpixel estimation by the least square method, the quadratic curve is obtained using the five points on the graph shown in FIG. 15, but the present invention is not limited to this. A quadratic curve may be obtained.

また、第1サブピクセル推定部340によるサブピクセル推定によってサブピクセル単位の第1視差値dp1を算出することに限定されるものではなく、サブピクセル推定の実行はせずに、画素単位の第1視差値dp1を算出するものとしてもよい。この場合、第1サブピクセル推定部340は、コスト合成部330により算出された、基準画像Ibにおける基準画素についての比較画像Iaにおける画素の合成コスト値Lsの最小値に対応するシフト量dを第1視差値dp1とすればよい。   The first subpixel estimation unit 340 is not limited to calculating the first parallax value dp1 in subpixel units by subpixel estimation. The first subpixel estimation is not performed, and the first in pixel units is not performed. The parallax value dp1 may be calculated. In this case, the first sub-pixel estimation unit 340 calculates the shift amount d corresponding to the minimum value of the combined cost value Ls of the pixels in the comparison image Ia for the reference pixel in the reference image Ib calculated by the cost combining unit 330. One parallax value dp1 may be used.

第2コスト算出部321は、基準画像Ibにおける基準画素p(x,y)を含む所定領域(ブロック)(第3基準領域)の輝度値、および、基準画素p(x,y)に基づく比較画像Iaにおけるエピポーラ線上で、基準画素p(x,y)の位置に相当する画素からシフト量dでシフトすることにより特定される、対応画素の候補である候補画素q(x+d,y)を含むブロック(第2候補領域)の各輝度値に基づいて、候補画素q(x+d,y)を含むブロックの第2コスト値C2(p,d)を算出する。第2コスト算出部321が算出する第2コスト値C2としては、例えば、SAD(Sum of Absolute Differences)、またはSSD(Sum of Squared Differences)等を用いることができる。第2コスト算出部321は、上述のように、基準画像Ibにおける基準画素pを含むブロックごとに、比較画像Iaにおける各候補画素qを含むブロックの第2コスト値C2を算出していく。この場合、第2コスト算出部321は、第1コスト算出部320と同様に、図12に示すように、ラスタースキャンの要領で、基準画像Ibにおいて基準画素pを左上の画素から水平方向に一画素ずつ移動させつつ、かつ垂直方向に移動させながら、各基準画素pを含むブロックに対応する比較画像Iaにおける第2コスト値C2を算出していく。   The second cost calculation unit 321 compares the luminance value of a predetermined area (block) (third reference area) including the reference pixel p (x, y) in the reference image Ib and the reference pixel p (x, y). A candidate pixel q (x + d, y), which is a candidate for the corresponding pixel, is identified by shifting by a shift amount d from the pixel corresponding to the position of the reference pixel p (x, y) on the epipolar line in the image Ia. Based on each luminance value of the block (second candidate region), a second cost value C2 (p, d) of the block including the candidate pixel q (x + d, y) is calculated. As the second cost value C2 calculated by the second cost calculation unit 321, for example, SAD (Sum of Absolute Differences), SSD (Sum of Squared Differences), or the like can be used. As described above, the second cost calculation unit 321 calculates the second cost value C2 of the block including each candidate pixel q in the comparison image Ia for each block including the reference pixel p in the reference image Ib. In this case, similarly to the first cost calculation unit 320, the second cost calculation unit 321 sets the reference pixel p in the horizontal direction from the upper left pixel in the reference image Ib as shown in FIG. The second cost value C2 in the comparison image Ia corresponding to the block including each reference pixel p is calculated while moving pixel by pixel and in the vertical direction.

そして、基準画像Ibにおける基準画素pを含むブロックが、テクスチャの弱い部分であるとした場合、シフト量dと、第2コスト算出部321により算出された第2コスト値C2との関係を示すグラフは、例えば、上述した図4に示すグラフにおいてコスト値Cを第2コスト値C2に置き換えたようなグラフが得られる。この場合、図4に示すグラフにおいては、シフト量d=5、12、19において、第2コスト値C2の最小値として近似した値となっているため、第2コスト値C2の最小値を求めることによって、基準画素に対応する比較画像Iaにおける対応画素を求めることは困難である。しかし、基準画像Ibにおける基準画素pを含むブロックが、エッジ部分を含む、すなわちテクスチャの強い部分であるとした場合、シフト量dと、第2コスト算出部321により算出された第2コスト値C2との関係を示すグラフは、例えば、上述した図13に示すグラフにおいて合成コスト値Lsを第2コスト値C2に置き換えたようなグラフが得られる。この場合、図13に示すグラフにおいては、シフト量d=3の場合、第2コスト値C2が最小値であると認識することができる。   If the block including the reference pixel p in the reference image Ib is a weak texture portion, a graph showing the relationship between the shift amount d and the second cost value C2 calculated by the second cost calculation unit 321. For example, a graph in which the cost value C is replaced with the second cost value C2 in the graph shown in FIG. 4 described above is obtained. In this case, in the graph shown in FIG. 4, since the shift amount d = 5, 12, 19 is an approximate value as the minimum value of the second cost value C2, the minimum value of the second cost value C2 is obtained. Thus, it is difficult to obtain the corresponding pixel in the comparison image Ia corresponding to the reference pixel. However, when the block including the reference pixel p in the reference image Ib includes an edge portion, that is, a portion having a strong texture, the shift amount d and the second cost value C2 calculated by the second cost calculation unit 321 are used. For example, a graph in which the combined cost value Ls is replaced with the second cost value C2 in the graph shown in FIG. 13 described above is obtained. In this case, in the graph shown in FIG. 13, when the shift amount d = 3, it can be recognized that the second cost value C2 is the minimum value.

第2サブピクセル推定部341は、第2コスト算出部321により算出された、基準画像Ibにおける基準画素を含むブロックについての比較画像Iaにおける画素のブロックの第2コスト値C2の最小値(第2極値)に対応するシフト量d、およびそれに隣接するシフト量dにおける第2コスト値C2に基づいて、サブピクセル推定を実行する。図13に示すグラフがシフト量dと第2コスト値C2との関係を示すグラフとした場合、上述のように、画素単位のシフト量dに対する第2コスト値C2のグラフということになる。この場合、グラフの第2コスト値C2の最小値は、画素単位のシフト量d=3における第2コスト値C2ということになる。すなわち、図13に示すような画素単位のシフト量dに対する第2コスト値C2のグラフにおいては、視差値として画素単位の値を導出することしかできないことになる。ここで、第1サブピクセル推定部340の動作について上述したように、第2サブピクセル推定部341は、サブピクセル推定によって、視差値を画素単位の値ではなく、画素より小さいサブピクセル単位の視差値を第2視差値dp2として推定して導出する。第2サブピクセル推定部341は、第1サブピクセル推定部340の動作について上述したように、パラボラフィッティングまたは最小二乗法によるサブピクセル推定のいずれかによって、第2視差値dp2を推定して導出する。   The second subpixel estimation unit 341 calculates the minimum value (second value) of the second cost value C2 of the block of pixels in the comparison image Ia for the block including the reference pixel in the reference image Ib, calculated by the second cost calculation unit 321. Subpixel estimation is executed based on the shift amount d corresponding to the extreme value) and the second cost value C2 in the shift amount d adjacent thereto. When the graph shown in FIG. 13 is a graph showing the relationship between the shift amount d and the second cost value C2, as described above, this is a graph of the second cost value C2 with respect to the shift amount d in pixel units. In this case, the minimum value of the second cost value C2 in the graph is the second cost value C2 at the shift amount d = 3 in pixel units. That is, in the graph of the second cost value C2 with respect to the shift amount d in pixel units as shown in FIG. 13, it is only possible to derive a value in pixel units as the parallax value. Here, as described above with respect to the operation of the first sub-pixel estimation unit 340, the second sub-pixel estimation unit 341 uses the sub-pixel estimation so that the disparity value is not a pixel unit value but a sub-pixel unit disparity smaller than a pixel. The value is estimated and derived as the second parallax value dp2. As described above with respect to the operation of the first subpixel estimation unit 340, the second subpixel estimation unit 341 estimates and derives the second parallax value dp2 by either parabolic fitting or subpixel estimation by the least square method. .

以上のように、第2コスト算出部321によって第2コスト値C2が算出され、さらに、第2サブピクセル推定部341によって第2コスト値C2のグラフについてサブピクセル推定が実行されるものとしている。これによって、輝度画像にエッジ部分を含む、すなわちテクスチャの強い部分においては、精度よく視差値を導出することができ、かつ、サブピクセル単位で視差値を推定するので密な視差値を導出することができる。   As described above, the second cost calculation unit 321 calculates the second cost value C2, and the second subpixel estimation unit 341 further performs subpixel estimation on the graph of the second cost value C2. As a result, the parallax value can be accurately derived in the luminance image including the edge portion, that is, the portion having a strong texture, and the parallax value is estimated in sub-pixel units, so that a dense parallax value is derived. Can do.

また、第2サブピクセル推定部341によるサブピクセル推定によってサブピクセル単位の第2視差値dp2を算出することに限定されるものではなく、サブピクセル推定の実行はせずに、画素単位の第2視差値dp2を算出するものとしてもよい。この場合、第2サブピクセル推定部341は、第2コスト算出部321により算出された、基準画像Ibにおける基準画素を含むブロックについての比較画像Iaの画素のブロックにおける第2コスト値C2の最小値に対応するシフト量dを第2視差値dp2とすればよい。   In addition, the second disparity estimation unit 341 is not limited to calculating the second disparity value dp2 in subpixel units by subpixel estimation. The parallax value dp2 may be calculated. In this case, the second sub-pixel estimation unit 341 calculates the minimum value of the second cost value C2 in the block of pixels of the comparison image Ia for the block including the reference pixel in the reference image Ib, calculated by the second cost calculation unit 321. The shift amount d corresponding to the second parallax value dp2 may be used.

第2記憶部360は、第1サブピクセル推定部340によって導出された第1視差値dp1、および第2サブピクセル推定部341によって導出された第2視差値dp2を記憶する記憶部である。第2記憶部360は、図9に示すRAM34によって実現される。なお、第2記憶部360は、図9において図示しないHDD等の外部記憶装置によって実現されるものとしてもよい。   The second storage unit 360 is a storage unit that stores the first parallax value dp1 derived by the first subpixel estimation unit 340 and the second parallax value dp2 derived by the second subpixel estimation unit 341. The second storage unit 360 is realized by the RAM 34 shown in FIG. The second storage unit 360 may be realized by an external storage device such as an HDD (not shown in FIG. 9).

視差画像生成部370は、第2記憶部360に記憶され、デンス処理によって導出された第1視差値dp1によって、基準画像Ibの各画素の輝度値を、その画素に対応する第1視差値dp1で表した画像であるデンス視差画像Ip1(第1視差画像)を生成する。また、視差画像生成部370は、第2記憶部360に記憶され、ブロックマッチング処理によって導出された第2視差値dp2によって、基準画像Ibの各画素の輝度を、その画素に対応する第2視差値dp2で表した画像であるエッジ視差画像Ip2(第2視差画像)を生成する。視差画像生成部370は、図9に示すFPGA31によって実現される。図16のうち、図16(a)は、比較画像Iaの一例を示し、図16(b)は、基準画像Ibの一例を示し、図16(c)は、視差画像生成部370により生成されたデンス視差画像Ip1の模式図を示す。   The parallax image generation unit 370 stores the luminance value of each pixel of the reference image Ib by the first parallax value dp1 stored in the second storage unit 360 and derived by the dense processing, and the first parallax value dp1 corresponding to the pixel. A dense parallax image Ip1 (first parallax image) is generated. In addition, the parallax image generation unit 370 stores the luminance of each pixel of the reference image Ib according to the second parallax value dp2 stored in the second storage unit 360 and derived by the block matching process. An edge parallax image Ip2 (second parallax image) that is an image represented by the value dp2 is generated. The parallax image generation unit 370 is realized by the FPGA 31 illustrated in FIG. 16A shows an example of the comparison image Ia, FIG. 16B shows an example of the reference image Ib, and FIG. 16C is generated by the parallax image generation unit 370. A schematic diagram of the dense parallax image Ip1 is shown.

認識処理部410は、視差画像生成部370により生成されたデンス視差画像Ip1に基づいて、認識処理として道路の路面等のテクスチャの弱い部分を認識する路面認識処理等を実行する。また、認識処理部410は、視差画像生成部370により生成されたエッジ視差画像Ip2に基づいて、認識処理として人物、標識、車両、その他の障害物を認識する物体認識処理等を実行する。認識処理部410は、図9に示す画像表示装置3、または、図7に示す制御装置5等によって実現される。なお、認識処理部410は、視差値導出装置1の外部の装置である画像表示装置3または制御装置5等において実現されることに限定されるものではない。すなわち、認識処理部410による認識処理は、視差値導出装置1で実行されるものとしてもよく、この場合、認識処理部410は、図9に示すFPGA31によって実現されるものとすればよい。   Based on the dense parallax image Ip1 generated by the parallax image generation unit 370, the recognition processing unit 410 executes a road surface recognition process for recognizing a weak texture portion such as a road surface as a recognition process. In addition, the recognition processing unit 410 executes object recognition processing for recognizing a person, a sign, a vehicle, and other obstacles as recognition processing based on the edge parallax image Ip2 generated by the parallax image generation unit 370. The recognition processing unit 410 is realized by the image display device 3 shown in FIG. 9 or the control device 5 shown in FIG. Note that the recognition processing unit 410 is not limited to being realized in the image display device 3 or the control device 5 that is an external device of the parallax value deriving device 1. That is, the recognition processing by the recognition processing unit 410 may be executed by the disparity value deriving device 1, and in this case, the recognition processing unit 410 may be realized by the FPGA 31 illustrated in FIG.

(視差値導出装置のデンス処理動作)
図17は、第1の実施の形態に係る視差値導出装置のデンス処理によるステレオマッチング処理の動作フローの一例を示す図である。図17を参照しながら、視差値導出装置1のデンス処理に基づく画像処理の動作の流れについて説明する。
(Density processing operation of parallax value deriving device)
FIG. 17 is a diagram illustrating an example of an operation flow of stereo matching processing by dense processing of the disparity value deriving device according to the first embodiment. The flow of the image processing operation based on the dense processing of the disparity value deriving device 1 will be described with reference to FIG.

<ステップS1−1>
視差値導出装置1の画像取得部110は、左のカメラ(撮像部10a)により前方の被写体を撮像して、それぞれアナログ形式の画像データを生成し、その画像データに基づく画像である輝度画像を得る。そして、ステップS2−1へ進む。
<Step S1-1>
The image acquisition unit 110 of the parallax value deriving device 1 images a front subject with the left camera (imaging unit 10a), generates analog image data, and generates a luminance image that is an image based on the image data. obtain. Then, the process proceeds to step S2-1.

<ステップS1−2>
視差値導出装置1の画像取得部110は、右のカメラ(撮像部10b)により前方の被写体を撮像して、それぞれアナログ形式の画像データを生成し、その画像データに基づく画像である輝度画像を得る。そして、ステップS2−2へ進む。
<Step S1-2>
The image acquisition unit 110 of the parallax value deriving device 1 images a front subject with the right camera (imaging unit 10b), generates analog image data, and generates a luminance image that is an image based on the image data. obtain. Then, the process proceeds to step S2-2.

<ステップS2−1>
視差値導出装置1のフィルタ部210は、撮像部10aにより撮像されて得られたアナログ形式の画像データに対して、ノイズを除去し、デジタル形式の画像データに変換する。そして、ステップS3−1へ進む。
<Step S2-1>
The filter unit 210 of the parallax value deriving device 1 removes noise from analog image data obtained by imaging by the imaging unit 10a and converts the image data into digital image data. Then, the process proceeds to step S3-1.

<ステップS2−2>
視差値導出装置1のフィルタ部210は、撮像部10bにより撮像されて得られたアナログ形式の画像データに対して、ノイズを除去し、デジタル形式の画像データに変換する。そして、ステップS3−2へ進む。
<Step S2-2>
The filter unit 210 of the parallax value deriving device 1 removes noise from analog image data obtained by imaging by the imaging unit 10b and converts the analog image data into digital image data. Then, the process proceeds to step S3-2.

<ステップS3−1>
フィルタ部210は、ステップS2−1において変換したデジタル形式の画像データに基づく画像をステレオマッチング処理における比較画像Iaとして出力する。そして、ステップS4へ進む。
<Step S3-1>
The filter unit 210 outputs an image based on the digital image data converted in step S2-1 as the comparison image Ia in the stereo matching process. Then, the process proceeds to step S4.

<ステップS3−2>
フィルタ部210は、ステップS2−2において変換したデジタル形式の画像データに基づく画像をステレオマッチング処理における基準画像Ibとして出力する。そして、ステップS4へ進む。
<Step S3-2>
The filter unit 210 outputs an image based on the digital image data converted in step S2-2 as the reference image Ib in the stereo matching process. Then, the process proceeds to step S4.

<ステップS4>
視差値導出装置1の補正部310は、フィルタ部210から入力した2つの画像(比較画像Ia、基準画像Ib)に対して、撮像部10aと撮像部10bと間の光学的なずれ、および幾何学的なずれを補正し、補正した比較画像Iaおよび基準画像Ibを出力する。視差値導出装置1の第1記憶部350は、補正部310から出力された比較画像Iaおよび基準画像Ibを一時記憶する。視差値導出装置1の第1コスト算出部320は、補正部310から出力された比較画像Iaおよび基準画像Ib、または、第1記憶部350に記憶された比較画像Iaおよび基準画像Ibを入力する。第1コスト算出部320は、基準画像Ibにおける基準画素p(x,y)の輝度値、および、基準画素p(x,y)に基づく比較画像Iaにおけるエピポーラ線上で、基準画素p(x,y)の位置に相当する画素からシフト量dでシフトすることにより特定される、対応画素の候補である候補画素q(x+d,y)の各輝度値に基づいて、各候補画素q(x+d,y)の第1コスト値C1(p,d)を算出する。そして、ステップS5へ進む。
<Step S4>
The correction unit 310 of the parallax value deriving device 1 has an optical shift between the image capturing unit 10a and the image capturing unit 10b, and a geometry with respect to the two images (the comparison image Ia and the reference image Ib) input from the filter unit 210. The geometrical deviation is corrected, and the corrected comparison image Ia and reference image Ib are output. The first storage unit 350 of the parallax value derivation device 1 temporarily stores the comparison image Ia and the reference image Ib output from the correction unit 310. The first cost calculation unit 320 of the parallax value deriving device 1 inputs the comparison image Ia and the reference image Ib output from the correction unit 310 or the comparison image Ia and the reference image Ib stored in the first storage unit 350. . The first cost calculation unit 320 uses the reference pixel p (x, y) on the epipolar line in the comparison image Ia based on the luminance value of the reference pixel p (x, y) in the reference image Ib and the reference pixel p (x, y). Each candidate pixel q (x + d, y) is determined based on each luminance value of the candidate pixel q (x + d, y), which is a candidate for the corresponding pixel, specified by shifting from the pixel corresponding to the position y) by the shift amount d. The first cost value C1 (p, d) of y) is calculated. Then, the process proceeds to step S5.

<ステップS5>
視差値導出装置1のコスト合成部330は、基準画像Ibにおける基準画素p(x,y)の周辺の画素を基準画素とした場合のその基準画素についての比較画像Iaにおける画素のコスト値Cを、第1コスト算出部320により算出された候補画素q(x+d,y)のコスト値C(p,d)に集約させて、候補画素q(x+d,y)の合成コスト値Ls(p,d)を算出する。コスト合成部330は、合成コスト値Lsを算出するために、所定のr方向の経路コスト値Lr(p,d)のうち、Lr、Lr45およびLr90については、比較画像Iaおよび基準画像Ibの全体(すなわち構成する画素値全体)が第1記憶部350に記憶されていなくても算出が可能である。すなわち、コスト合成部330は、補正部310から出力された比較画像Iaおよび基準画像Ibを構成する画素値のうち、直接入力された画素値で第1コスト算出部320により算出された第1コスト値C1に基づいて、Lr、Lr45およびLr90を算出できる。一方、コスト合成部330は、合成コスト値Lsを算出するために、所定のr方向の経路コスト値Lr(p,d)のうち、Lr135、Lr180、Lr225、Lr270およびLr315については、比較画像Iaおよび基準画像Ibの全体(すなわち構成する画素値全体)が第1記憶部350に記憶されていなければ算出ができない。すなわち、コスト合成部330は、補正部310から出力され、第1記憶部350に記憶された比較画像Iaおよび基準画像Ibを構成する画素値で第1コスト算出部320により算出された第1コスト値C1に基づいて、Lr135、Lr180、Lr225、Lr270およびLr315を算出する。そして、ステップS6へ進む。
<Step S5>
The cost composition unit 330 of the parallax value deriving device 1 calculates the cost value C of the pixel in the comparison image Ia for the reference pixel when the pixel around the reference pixel p (x, y) in the reference image Ib is used as the reference pixel. The cost value C (p, d) of the candidate pixel q (x + d, y) calculated by the first cost calculation unit 320 is aggregated, and the combined cost value Ls (p, d) of the candidate pixel q (x + d, y) ) Is calculated. In order to calculate the synthesis cost value Ls, the cost synthesis unit 330 calculates the comparison image Ia and the reference image for Lr 0 , Lr 45 and Lr 90 among the route cost values Lr (p, d) in a predetermined r direction. Calculation is possible even if the entire Ib (that is, the entire pixel value to be configured) is not stored in the first storage unit 350. That is, the cost composition unit 330 calculates the first cost calculated by the first cost calculation unit 320 using the directly input pixel value among the pixel values constituting the comparison image Ia and the reference image Ib output from the correction unit 310. Based on the value C1, Lr 0 , Lr 45 and Lr 90 can be calculated. On the other hand, the cost combining unit 330 calculates Lr 135 , Lr 180 , Lr 225 , Lr 270 and Lr 315 among predetermined route cost values Lr (p, d) in the r direction in order to calculate the combined cost value Ls. Cannot be calculated unless the entire comparison image Ia and the reference image Ib (that is, the entire pixel value) is stored in the first storage unit 350. That is, the cost composition unit 330 outputs the first cost calculated by the first cost calculation unit 320 with the pixel values that form the comparison image Ia and the reference image Ib that are output from the correction unit 310 and stored in the first storage unit 350. Based on the value C1, Lr 135 , Lr 180 , Lr 225 , Lr 270 and Lr 315 are calculated. Then, the process proceeds to step S6.

<ステップS6>
視差値導出装置1の第1サブピクセル推定部340は、コスト合成部330により算出された、基準画像Ibにおける基準画素についての比較画像Iaにおける画素の合成コスト値Lsの最小値に対応するシフト量d、およびそれに隣接するシフト量dにおける合成コスト値Lsに基づいて、サブピクセル推定を実行する。第1サブピクセル推定部340は、サブピクセル推定によって求めた近似曲線(図14および図15においては下に凸の2次曲線)の極小値に対応するサブピクセル単位のシフト量dが第1視差値dp1であると推定する。そして、ステップS7へ進む。
<Step S6>
The first sub-pixel estimation unit 340 of the parallax value deriving device 1 calculates the shift amount corresponding to the minimum value of the combined cost value Ls of the pixels in the comparison image Ia for the reference pixel in the reference image Ib, calculated by the cost combining unit 330. Sub-pixel estimation is executed based on the combined cost value Ls at d and the shift amount d adjacent thereto. The first sub-pixel estimation unit 340 determines that the shift amount d in sub-pixel units corresponding to the minimum value of the approximate curve obtained by the sub-pixel estimation (the downwardly convex quadratic curve in FIGS. 14 and 15) is the first parallax. Estimated to be the value dp1. Then, the process proceeds to step S7.

<ステップS7>
視差値導出装置1の第2記憶部360は、第1サブピクセル推定部340によって導出された第1視差値dp1を記憶する。視差値導出装置1の視差画像生成部370は、第2記憶部360に記憶され、デンス処理によって導出された第1視差値dp1によって、基準画像Ibの各画素の輝度値を、その画素に対応する第1視差値dp1で表した画像であるデンス視差画像Ip1を生成する。
<Step S7>
The second storage unit 360 of the parallax value derivation device 1 stores the first parallax value dp1 derived by the first subpixel estimation unit 340. The parallax image generation unit 370 of the parallax value deriving device 1 stores the luminance value of each pixel of the reference image Ib corresponding to the pixel by the first parallax value dp1 stored in the second storage unit 360 and derived by the dense processing. A dense parallax image Ip1 that is an image represented by the first parallax value dp1 is generated.

その後、デンス視差画像Ip1の画像データは、通信I/F35またはCANC36を介して出力され、視差値導出装置1の外部の装置(例えば、画像表示装置3または制御装置5)である認識処理部410によって、デンス視差画像Ip1に基づいた路面認識処理等の認識処理が実行される。   Thereafter, the image data of the dense parallax image Ip1 is output via the communication I / F 35 or the CANC 36, and the recognition processing unit 410 that is an apparatus external to the parallax value deriving apparatus 1 (for example, the image display apparatus 3 or the control apparatus 5). Thus, a recognition process such as a road surface recognition process based on the dense parallax image Ip1 is executed.

(視差値導出装置のブロックマッチング処理動作)
図18は、第1の実施の形態に係る視差値導出装置のブロックマッチング処理によるステレオマッチング処理の動作フローの一例を示す図である。図18を参照しながら、視差値導出装置1のブロックマッチング処理に基づく画像処理の動作の流れについて説明する。
(Block matching processing operation of parallax value deriving device)
FIG. 18 is a diagram illustrating an example of an operation flow of stereo matching processing by block matching processing of the disparity value deriving device according to the first embodiment. The flow of the image processing operation based on the block matching process of the disparity value deriving device 1 will be described with reference to FIG.

<ステップS11−1>
視差値導出装置1の画像取得部110は、左のカメラ(撮像部10a)により前方の被写体を撮像して、それぞれアナログ形式の画像データを生成し、その画像データに基づく画像である輝度画像を得る。そして、ステップS12−1へ進む。
<Step S11-1>
The image acquisition unit 110 of the parallax value deriving device 1 images a front subject with the left camera (imaging unit 10a), generates analog image data, and generates a luminance image that is an image based on the image data. obtain. Then, the process proceeds to step S12-1.

<ステップS11−2>
視差値導出装置1の画像取得部110は、右のカメラ(撮像部10b)により前方の被写体を撮像して、それぞれアナログ形式の画像データを生成し、その画像データに基づく画像である輝度画像を得る。そして、ステップS12−2へ進む。
<Step S11-2>
The image acquisition unit 110 of the parallax value deriving device 1 images a front subject with the right camera (imaging unit 10b), generates analog image data, and generates a luminance image that is an image based on the image data. obtain. Then, the process proceeds to step S12-2.

<ステップS12−1>
視差値導出装置1のフィルタ部210は、撮像部10aにより撮像されて得られたアナログ形式の画像データに対して、ノイズを除去し、デジタル形式の画像データに変換する。そして、ステップS13−1へ進む。
<Step S12-1>
The filter unit 210 of the parallax value deriving device 1 removes noise from analog image data obtained by imaging by the imaging unit 10a and converts the image data into digital image data. Then, the process proceeds to step S13-1.

<ステップS12−2>
視差値導出装置1のフィルタ部210は、撮像部10bにより撮像されて得られたアナログ形式の画像データに対して、ノイズを除去し、デジタル形式の画像データに変換する。そして、ステップS13−2へ進む。
<Step S12-2>
The filter unit 210 of the parallax value deriving device 1 removes noise from analog image data obtained by imaging by the imaging unit 10b and converts the analog image data into digital image data. Then, the process proceeds to step S13-2.

<ステップS13−1>
フィルタ部210は、ステップS12−1において変換したデジタル形式の画像データに基づく画像をステレオマッチング処理における比較画像Iaとして出力する。そして、ステップS14へ進む。
<Step S13-1>
The filter unit 210 outputs an image based on the digital image data converted in step S12-1 as the comparison image Ia in the stereo matching process. Then, the process proceeds to step S14.

<ステップS13−2>
フィルタ部210は、ステップS12−2において変換したデジタル形式の画像データに基づく画像をステレオマッチング処理における基準画像Ibとして出力する。そして、ステップS14へ進む。
<Step S13-2>
The filter unit 210 outputs an image based on the digital image data converted in step S12-2 as the reference image Ib in the stereo matching process. Then, the process proceeds to step S14.

<ステップS14>
視差値導出装置1の補正部310は、フィルタ部210から入力した2つの画像(比較画像Ia、基準画像Ib)に対して、撮像部10aと撮像部10bと間の光学的なずれ、および幾何学的なずれを補正し、補正した比較画像Iaおよび基準画像Ibを第2コスト算出部321に出力する。視差値導出装置1の第2コスト算出部321は、基準画像Ibにおける基準画素p(x,y)を含む所定領域(ブロック)の輝度値、および、基準画素p(x,y)に基づく比較画像Iaにおけるエピポーラ線上で、基準画素p(x,y)の位置に相当する画素からシフト量dでシフトすることにより特定される、対応画素の候補である候補画素q(x+d,y)を含むブロックの各輝度値に基づいて、候補画素q(x+d,y)を含むブロックの第2コスト値C2(p,d)を算出する。そして、ステップS15へ進む。
<Step S14>
The correction unit 310 of the parallax value deriving device 1 has an optical shift between the image capturing unit 10a and the image capturing unit 10b, and a geometry with respect to the two images (the comparison image Ia and the reference image Ib) input from the filter unit 210. The geometrical deviation is corrected, and the corrected comparison image Ia and reference image Ib are output to the second cost calculation unit 321. The second cost calculation unit 321 of the parallax value deriving device 1 compares the luminance value of a predetermined area (block) including the reference pixel p (x, y) in the reference image Ib and the reference pixel p (x, y). A candidate pixel q (x + d, y), which is a candidate for the corresponding pixel, is identified by shifting by a shift amount d from the pixel corresponding to the position of the reference pixel p (x, y) on the epipolar line in the image Ia. Based on each luminance value of the block, a second cost value C2 (p, d) of the block including the candidate pixel q (x + d, y) is calculated. Then, the process proceeds to step S15.

<ステップS15>
視差値導出装置1の第2サブピクセル推定部341は、第2コスト算出部321により算出された、基準画像Ibにおける基準画素を含むブロックについての比較画像Iaにおける画素のブロックの第2コスト値C2の最小値に対応するシフト量d、およびそれに隣接するシフト量dにおける第2コスト値C2に基づいて、サブピクセル推定を実行する。第2サブピクセル推定部341は、サブピクセル推定によって求めた近似曲線(図14および図15においては下に凸の2次曲線)の極小値に対応するサブピクセル単位のシフト量dが第2視差値dp2であると推定する。そして、ステップS16へ進む。
<Step S15>
The second subpixel estimation unit 341 of the disparity value deriving device 1 calculates the second cost value C2 of the block of the pixel in the comparison image Ia for the block including the reference pixel in the reference image Ib calculated by the second cost calculation unit 321. The sub-pixel estimation is executed based on the shift amount d corresponding to the minimum value of and the second cost value C2 in the shift amount d adjacent thereto. The second subpixel estimation unit 341 determines that the shift amount d in subpixel units corresponding to the minimum value of the approximate curve (downward convex secondary curve in FIGS. 14 and 15) obtained by the subpixel estimation is the second parallax. Estimated to be the value dp2. Then, the process proceeds to step S16.

<ステップS16>
視差値導出装置1の第2記憶部360は、第2サブピクセル推定部341によって導出された第2視差値dp2を記憶する。視差値導出装置1の視差画像生成部370は、第2記憶部360に記憶され、ブロックマッチング処理によって導出された第2視差値dp2によって、基準画像Ibの各画素の輝度を、その画素に対応する第2視差値dp2で表した画像であるエッジ視差画像Ip2を生成する。
<Step S16>
The second storage unit 360 of the parallax value derivation device 1 stores the second parallax value dp2 derived by the second subpixel estimation unit 341. The parallax image generation unit 370 of the parallax value deriving device 1 stores the luminance of each pixel of the reference image Ib according to the second parallax value dp2 stored in the second storage unit 360 and derived by the block matching process. An edge parallax image Ip2 that is an image represented by the second parallax value dp2 is generated.

その後、エッジ視差画像Ip2の画像データは、通信I/F35またはCANC36を介して出力され、視差値導出装置1の外部の装置(例えば、画像表示装置3または制御装置5)である認識処理部410によって、エッジ視差画像Ip2に基づいた物体認識処理等の認識処理が実行される。   Thereafter, the image data of the edge parallax image Ip2 is output via the communication I / F 35 or the CANC 36, and the recognition processing unit 410 that is an apparatus outside the parallax value deriving apparatus 1 (for example, the image display apparatus 3 or the control apparatus 5). Thus, a recognition process such as an object recognition process based on the edge parallax image Ip2 is executed.

(機器制御システムの処理の動作タイミング)
図19は、第1の実施の形態に係る機器制御システムの処理のタイミングチャートを示す図である。図19を参照しながら、本実施の形態に係る機器制御システム50の処理の動作タイミングについて説明する。
(Operation timing of device control system processing)
FIG. 19 is a diagram illustrating a timing chart of the process of the device control system according to the first embodiment. With reference to FIG. 19, the operation timing of processing of the device control system 50 according to the present embodiment will be described.

図19に示すように、画像取得部110は、有効フレーム信号FVがオン状態のとき、撮像部10a、10bによってそれぞれ1フレーム分、すなわちそれぞれ1つの輝度画像を得る。   As shown in FIG. 19, when the effective frame signal FV is in the on state, the image acquisition unit 110 obtains one luminance image, that is, one luminance image, respectively, by the imaging units 10a and 10b.

視差値演算部300の第2コスト算出部321および第2サブピクセル推定部341によるブロックマッチング処理は、画像取得部110による輝度画像の取得の途中からでも、第2視差値dp2の導出およびエッジ視差画像Ip2の生成(図19では、「視差値演算」と記載)が可能であり、かつ、演算処理の負荷もデンス処理と比較して軽い。したがって、ブロックマッチング処理においては、比較画像Iaおよび基準画像Ibの1組が取得されるごとに、視差値演算、および認識処理部410によるエッジ視差画像Ip2に基づく認識処理(図19では「物体認識処理」と例示)の実行が可能である。   The block matching processing by the second cost calculation unit 321 and the second subpixel estimation unit 341 of the parallax value calculation unit 300 is performed by the derivation of the second parallax value dp2 and the edge parallax even during the luminance image acquisition by the image acquisition unit 110. The image Ip2 can be generated (described as “parallax value calculation” in FIG. 19), and the load of the calculation process is lighter than that of the dense process. Accordingly, in the block matching process, every time one set of the comparison image Ia and the reference image Ib is acquired, the parallax value calculation and the recognition process based on the edge parallax image Ip2 by the recognition processing unit 410 (“object recognition” in FIG. 19). (Exemplary processing) can be executed.

一方、視差値演算部300の第1コスト算出部320、コスト合成部330および第1サブピクセル推定部340によるデンス処理は、まず、画像取得部110の輝度画像の取得と共に、比較画像Iaおよび基準画像Ibの第1記憶部350への記憶を開始する。また、上述のように、所定のr方向の経路コスト値Lrのうち、Lr、Lr45およびLr90については、画像取得部110による輝度画像の取得の途中からでも算出が可能である。しかし、デンス処理は、上述のように、所定のr方向の経路コスト値Lrのうち、Lr135、Lr180、Lr225、Lr270およびLr315については、画像取得部110による輝度画像の取得が終了し、第1記憶部350への比較画像Iaおよび基準画像Ibの記憶がなされていないと算出することができない。したがって、デンス処理は、ブロックマッチング処理よりも演算量が多く、処理時間が長いうえに、一部の演算については、第1記憶部350への比較画像Iaおよび基準画像Ibの記憶が完了していないと実行できない。よって、視差値演算部300による第1視差値dp1の導出、および視差画像生成部370によるデンス視差画像Ip1の生成(図19では、「視差値演算」と記載)は、ブロックマッチング処理における視差値演算よりも処理時間が長くなる。 On the other hand, the dense processing performed by the first cost calculation unit 320, the cost synthesis unit 330, and the first sub-pixel estimation unit 340 of the parallax value calculation unit 300 is first performed with the acquisition of the luminance image of the image acquisition unit 110, the comparison image Ia, Storage of the image Ib in the first storage unit 350 is started. Further, as described above, Lr 0 , Lr 45, and Lr 90 among the predetermined route cost values Lr in the r direction can be calculated even while the luminance image is acquired by the image acquisition unit 110. However, as described above, in the dense processing, the luminance image is acquired by the image acquisition unit 110 for Lr 135 , Lr 180 , Lr 225 , Lr 270 and Lr 315 out of the predetermined route cost value Lr in the r direction. The calculation cannot be performed unless the comparison image Ia and the reference image Ib are stored in the first storage unit 350. Therefore, the dense processing has a larger calculation amount and a longer processing time than the block matching processing, and the storage of the comparison image Ia and the reference image Ib in the first storage unit 350 has been completed for some operations. It cannot be executed without it. Therefore, the derivation of the first parallax value dp1 by the parallax value calculation unit 300 and the generation of the dense parallax image Ip1 by the parallax image generation unit 370 (described as “parallax value calculation” in FIG. 19) are the parallax values in the block matching process. Processing time is longer than calculation.

図19のタイムチャートの例では、デンス処理においては、例えば、比較画像Iaおよび基準画像Ibの1組の取得が2回行われる間に、視差値演算を1度実行することが可能であり、認識処理部410によるデンス視差画像Ip1に基づく認識処理(図19では「路面認識処理」と例示)についても1度の実行が可能である。しかし、比較画像Iaおよび基準画像Ibの1組の取得が2回行われるごとに、認識処理部410による路面認識処理等が行われるとしても、道路の路面の状態は通常は急激な変化を伴うものではないため、認識処理の性能への影響は少ない。また、路面認識処理以外に、画像において急激な変化を伴うものではない被写体の認識処理については、演算処理の負荷が大きいデンス処理により生成したデンス視差画像Ip1に基づいて実行するものとしても、その認識処理の性能への影響は少ない。なお、図19のタイムチャートの例では、デンス処理において、比較画像Iaおよび基準画像Ibの1組の取得が2回行われる間に、視差値演算を1度実行するものとしているが、認識処理の性能への影響が少ない限りにおいては、画像の取得が3回以上行われる間に、視差値演算が1度の実行が行われるものとしてもよい。   In the example of the time chart of FIG. 19, in the dense process, for example, the parallax value calculation can be executed once while one set of the comparison image Ia and the reference image Ib is acquired twice. The recognition processing based on the dense parallax image Ip1 by the recognition processing unit 410 (exemplified as “road surface recognition processing” in FIG. 19) can be executed once. However, every time a set of the comparison image Ia and the reference image Ib is acquired twice, the road surface state of the road is usually accompanied by a rapid change even if the road surface recognition process or the like by the recognition processing unit 410 is performed. Since it is not a thing, there is little influence on the performance of recognition processing. In addition to road surface recognition processing, subject recognition processing that is not accompanied by abrupt changes in the image may be executed based on the dense parallax image Ip1 generated by dense processing with a heavy processing load. There is little impact on the performance of the recognition process. In the example of the time chart of FIG. 19, the parallax value calculation is executed once while one set of the comparison image Ia and the reference image Ib is acquired twice in the dense process. As long as there is little influence on the performance, the parallax value calculation may be executed once while image acquisition is performed three or more times.

以上のように、本実施の形態に係る視差値導出装置1において、デンス処理およびブロックマッチング処理を実行する視差値演算部300は、共通のハードウェア(集積回路)で実現するものとし、デンス処理とブロックマッチング処理とを並列に実行するものとしている。この場合、ブロックマッチング処理は、デンス処理よりも演算処理の負荷が小さいため、比較画像Iaおよび基準画像Ibの1組が取得されるごとに、視差値演算、およびエッジ視差画像Ip2に基づく認識処理の実行が可能である。これに対し、デンス処理は、ブロックマッチング処理よりも演算処理の負荷が大きいため、比較画像Iaおよび基準画像Ibの1組の取得が複数回行われる間に、視差値演算、および、デンス視差画像Ip1に基づく認識処理について1度の実行が可能である。このように、デンス処理およびブロックマッチング処理を並列に動作させることが可能であり、変化のすくない被写体(道路の路面等)についての認識処理は、デンス視差画像によって処理、変化の多い被写体(人物、車両等)についての認識処理は、エッジ視差画像によって処理させるものとしている。これによって、演算処理の負荷が大きいデンス処理を用いても、各種認識処理の性能への影響を抑制することができる。   As described above, in the disparity value deriving device 1 according to the present embodiment, the disparity value calculation unit 300 that performs the dense processing and the block matching processing is realized by common hardware (integrated circuit). And block matching processing are executed in parallel. In this case, since the block matching processing is less computationally expensive than the dense processing, every time one set of the comparison image Ia and the reference image Ib is acquired, the parallax value calculation and the recognition processing based on the edge parallax image Ip2 Can be executed. On the other hand, since dense processing is more computationally intensive than block matching processing, parallax value computation and dense parallax images are obtained while one set of comparison image Ia and reference image Ib is acquired multiple times. The recognition process based on Ip1 can be executed once. In this way, dense processing and block matching processing can be operated in parallel, and recognition processing for a subject that does not change easily (such as a road surface of a road) is processed by a dense parallax image. The recognition processing for a vehicle or the like is processed by an edge parallax image. As a result, even if dense processing with a heavy processing load is used, the influence on the performance of various recognition processing can be suppressed.

また、視差値導出装置1において、第1サブピクセル推定部340および第2サブピクセル推定部341は、画素より小さい単位であるサブピクセル単位で視差値を導出することができるので、精度が高く、かつ密な視差値を導出することができ、より正確な視差画像を得ることができる。   Further, in the parallax value deriving device 1, the first subpixel estimation unit 340 and the second subpixel estimation unit 341 can derive the parallax value in units of subpixels, which is a unit smaller than a pixel, so that the accuracy is high. In addition, a dense parallax value can be derived, and a more accurate parallax image can be obtained.

なお、補正部310、第1コスト算出部320、コスト合成部330、第1サブピクセル推定部340、第2コスト算出部321、第2サブピクセル推定部341および視差画像生成部370は、FPGA31によって実現、すなわちハードウェア回路(集積回路)によって実現されるものとしたが、これに限定されるものではない。すなわち、補正部310、第1コスト算出部320、コスト合成部330、第1サブピクセル推定部340、第2コスト算出部321、第2サブピクセル推定部341および視差画像生成部370の少なくともいずれかは、ソフトウェアである画像処理用プログラムがCPU32によって実行されることにより、実現されてもよい。また、補正部310、第1コスト算出部320、コスト合成部330、第1サブピクセル推定部340、第2コスト算出部321、第2サブピクセル推定部341および視差画像生成部370は、機能を概念的にブロック構成したものであって、このような構成に限定されるものではない。   The correction unit 310, the first cost calculation unit 320, the cost synthesis unit 330, the first subpixel estimation unit 340, the second cost calculation unit 321, the second subpixel estimation unit 341, and the parallax image generation unit 370 are performed by the FPGA 31. Although it is assumed to be realized by a hardware circuit (integrated circuit), it is not limited to this. That is, at least one of the correction unit 310, the first cost calculation unit 320, the cost synthesis unit 330, the first subpixel estimation unit 340, the second cost calculation unit 321, the second subpixel estimation unit 341, and the parallax image generation unit 370. May be realized by the CPU 32 executing an image processing program that is software. The correction unit 310, the first cost calculation unit 320, the cost synthesis unit 330, the first subpixel estimation unit 340, the second cost calculation unit 321, the second subpixel estimation unit 341, and the parallax image generation unit 370 have functions. It is a block configuration conceptually and is not limited to such a configuration.

また、上述の画像処理用プログラムは、インストール可能な形式または実行可能な形式のファイルで、コンピュータで読み取り可能な記録媒体に記録して流通させてもよい。この記録媒体は、CD−ROMまたはSDカード等である。   Further, the above-described image processing program may be recorded in a computer-readable recording medium and distributed as a file in an installable format or an executable format. This recording medium is a CD-ROM or an SD card.

[第2の実施の形態]
第2の実施の形態に係る視差値導出装置および機器制御システムについて、第1の実施の形態に係る視差値導出装置および機器制御システムと相違する点を中心に説明する。本実施の形態に係る視差値導出装置1および機器制御システム50は、構成、ならびに、デンス処理およびブロックマッチング処理の各処理の内容については、第1の実施の形態と同様である。
[Second Embodiment]
The disparity value deriving device and device control system according to the second embodiment will be described focusing on differences from the disparity value deriving device and device control system according to the first embodiment. The disparity value deriving device 1 and the device control system 50 according to the present embodiment are the same as the first embodiment with respect to the configuration and the contents of the dense process and the block matching process.

(機器制御システムの処理の動作タイミング)
図20は、第2の実施の形態に係る機器制御システムの処理のタイミングチャートを示す図である。図20を参照しながら、本実施の形態に係る機器制御システム50の処理の動作タイミングについて説明する。
(Operation timing of device control system processing)
FIG. 20 is a diagram illustrating a timing chart of processing of the device control system according to the second embodiment. The operation timing of processing of the device control system 50 according to the present embodiment will be described with reference to FIG.

図20に示すように、画像取得部110は、有効フレーム信号FVがオン状態のとき、撮像部10a、10bによってそれぞれ1フレーム分、すなわち、それぞれ1つの輝度画像を得る。   As shown in FIG. 20, when the effective frame signal FV is in the on state, the image acquisition unit 110 obtains one luminance image by the imaging units 10 a and 10 b, that is, one luminance image.

本実施の形態に係る機器制御システム50は、所定の輝度画像の組数(所定のページ数)を画像取得部110により取得するごとに、ブロックマッチング処理のみの実行と、デンス処理とブロックマッチング処理との並列処理の実行とを、切り替えるものとしている。すなわち、機器制御システム50は、ブロックマッチング処理は、常時実行するものとし、デンス処理については、所定の輝度画像の組数ごとに処理の実行と停止とを繰り返すものとしている。   The device control system 50 according to the present embodiment executes only block matching processing, dense processing, and block matching processing every time the image acquisition unit 110 acquires a predetermined number of sets of luminance images (a predetermined number of pages). It is assumed that the execution of parallel processing with is switched. In other words, the device control system 50 always executes the block matching process, and the dense process repeats execution and stop of the process for each set of predetermined luminance images.

これによって、デンス処理およびブロックマッチング処理の両方を同時に実行しない期間を設けているので、演算量を低減することができる。本実施の形態に係る機器制御システム50の動作は、路面認識処理等のデンス視差画像に基づく認識処理があまり必要とされない場合に、特に有効である。   As a result, a period during which both dense processing and block matching processing are not executed simultaneously is provided, so that the amount of calculation can be reduced. The operation of the device control system 50 according to the present embodiment is particularly effective when recognition processing based on dense parallax images such as road surface recognition processing is not required.

なお、図20においては、ブロックマッチング処理のみが実行されるページ数と、デンス処理とブロックマッチング処理との並列処理が実行されるページ数とが同一のように記載されているが、これに限定されるものではない。例えば、上述のように、路面認識処理等のデンス視差画像に基づく認識処理があまり必要とされない場合においては、ブロックマッチング処理のみが実行されるページ数を、デンス処理とブロックマッチング処理との並列処理が実行されるページ数よりも多くしてもよい。   In FIG. 20, the number of pages on which only block matching processing is executed and the number of pages on which parallel processing of dense processing and block matching processing is executed are described as being the same, but this is not limitative. Is not to be done. For example, as described above, in the case where recognition processing based on dense parallax images such as road surface recognition processing is not required, the number of pages on which only block matching processing is executed is calculated as parallel processing of dense processing and block matching processing. May be larger than the number of pages executed.

[第3の実施の形態]
第3の実施の形態に係る視差値導出装置および機器制御システムについて、第1の実施の形態に係る視差値導出装置および機器制御システムと相違する点を中心に説明する。本実施の形態に係る視差値導出装置1および機器制御システム50は、構成、ならびに、デンス処理およびブロックマッチング処理の各処理の内容については、第1の実施の形態と同様である。
[Third Embodiment]
A parallax value deriving device and device control system according to a third embodiment will be described focusing on differences from the parallax value deriving device and device control system according to the first embodiment. The disparity value deriving device 1 and the device control system 50 according to the present embodiment are the same as the first embodiment with respect to the configuration and the contents of the dense process and the block matching process.

(機器制御システムの処理の動作タイミング)
図21は、第3の実施の形態に係る機器制御システムの処理のタイミングチャートを示す図である。図21を参照しながら、本実施の形態に係る機器制御システム50の処理の動作タイミングについて説明する。
(Operation timing of device control system processing)
FIG. 21 is a diagram illustrating a timing chart of processing of the device control system according to the third embodiment. With reference to FIG. 21, the operation timing of processing of the device control system 50 according to the present embodiment will be described.

図21に示すように、画像取得部110は、有効フレーム信号FVがオン状態のとき、撮像部10a、10bによってそれぞれ1フレーム分、すなわち、それぞれ1つの輝度画像を得る。   As shown in FIG. 21, when the effective frame signal FV is in the on state, the image acquisition unit 110 obtains one luminance image by the imaging units 10a and 10b, that is, one luminance image.

本実施の形態に係る機器制御システム50は、所定の輝度画像の組数(所定のページ数)を画像取得部110により取得するごとに、ブロックマッチング処理のみの実行と、デンス処理のみの実行とを、切り替えるものとしている。また、認識処理部410は、デンス処理のみを実行する期間では、デンス処理により導出された第1視差値dp1によるデンス視差画像Ip1に基づいて、物体認識処理および路面認識処理の双方を実行する。   The device control system 50 according to the present embodiment performs only block matching processing and only dense processing every time the image acquisition unit 110 acquires a predetermined number of sets of luminance images (a predetermined number of pages). Are to be switched. Further, the recognition processing unit 410 executes both the object recognition process and the road surface recognition process based on the dense parallax image Ip1 based on the first parallax value dp1 derived by the dense process in a period in which only the dense process is executed.

これによって、ブロックマッチング処理とデンス処理とを並列に実行させる必要がないので、ハードウェア回路の規模を縮小することができ、演算量、コストおよび電力消費量を低減させることができる。   As a result, it is not necessary to execute the block matching process and the dense process in parallel, so that the scale of the hardware circuit can be reduced, and the calculation amount, cost, and power consumption can be reduced.

[第4の実施の形態]
第4の実施の形態に係る視差値導出装置および機器制御システムについて、第1の実施の形態に係る視差値導出装置および機器制御システムと相違する点を中心に説明する。本実施の形態に係る視差値導出装置1および機器制御システム50は、構成、および、ブロックマッチング処理の内容については、第1の実施の形態と同様である。
[Fourth Embodiment]
A parallax value deriving device and device control system according to a fourth embodiment will be described focusing on differences from the parallax value deriving device and device control system according to the first embodiment. The disparity value deriving device 1 and the device control system 50 according to the present embodiment are the same as those in the first embodiment with respect to the configuration and the contents of the block matching process.

(視差値導出装置のデンス処理動作)
図22は、第4の実施の形態において基準画像の画素に対するデンス処理のスキャン動作を示す図である。図22を参照しながら、本実施の形態に係る視差値導出装置1のデンス処理について説明する。
(Density processing operation of parallax value deriving device)
FIG. 22 is a diagram illustrating a scanning operation of dense processing for the pixels of the reference image in the fourth embodiment. With reference to FIG. 22, the dense process of the disparity value deriving device 1 according to the present embodiment will be described.

上述の図11に示す基準画像Ibのように、人物、車両等の変化の多い被写体は、基準画像Ib全体に散在することが多いと考えられるが、路面等の変化の少ない被写体は、基準画像Ibのうち下側半分に存在することが多い。したがって、路面認識処理が特に必要となるのは、第1の実施の形態で視差画像生成部370により生成されるデンス視差画像Ip1全体ではなく、デンス視差画像Ip1の下側半分であることになる。そこで、本実施の形態に係る視差値導出装置1においては、図22に示すように、デンス処理の対象を基準画像Ibの下側半分とする。   Like the reference image Ib shown in FIG. 11 described above, it is considered that subjects with a lot of changes such as people and vehicles are often scattered throughout the reference image Ib. Often present in the lower half of Ib. Therefore, the road surface recognition process is particularly necessary not in the entire dense parallax image Ip1 generated by the parallax image generation unit 370 in the first embodiment, but in the lower half of the dense parallax image Ip1. . Therefore, in the disparity value deriving device 1 according to the present embodiment, as shown in FIG. 22, the dense processing target is the lower half of the reference image Ib.

具体的には、第1コスト算出部320は、基準画像Ibの下側半分における基準画素pの輝度値、および、基準画素pに基づく比較画像Iaにおけるエピポーラ線上で、基準画素pの位置に相当する画素からシフト量dでシフトすることにより特定される、対応画素の候補である候補画素qの各輝度値に基づいて、各候補画素qの第1コスト値C1を算出する。また、コスト合成部330は、基準画像Ibの下側半分における基準画素pの周辺の画素を基準画素とした場合のその基準画素についての比較画像Iaにおける画素の第1コスト値C1を、第1コスト算出部320により算出された候補画素qの第1コスト値C1に集約させて、候補画素qの合成コスト値Lsを算出する。また、第1サブピクセル推定部340は、コスト合成部330により算出された、基準画像Ibの下側半分における基準画素についての比較画像Iaにおける画素の合成コスト値Lsの最小値に対応するシフト量d、およびそれに隣接するシフト量dにおける合成コスト値Lsに基づいて、サブピクセル推定を実行し、サブピクセル単位の第1視差値dp1を導出する。そして、視差画像生成部370は、第2記憶部360に記憶され、デンス処理によって導出された基準画像Ibの下側半分に対応する第1視差値dp1によって、基準画像Ibの下側半分の各画素の輝度値を、その画素に対応する第1視差値dp1で表した画像であるデンス視差画像を生成する。   Specifically, the first cost calculation unit 320 corresponds to the luminance value of the reference pixel p in the lower half of the reference image Ib and the position of the reference pixel p on the epipolar line in the comparison image Ia based on the reference pixel p. The first cost value C1 of each candidate pixel q is calculated based on each luminance value of the candidate pixel q that is a candidate for the corresponding pixel specified by shifting from the pixel to be shifted by the shift amount d. In addition, the cost composition unit 330 calculates the first cost value C1 of the pixel in the comparison image Ia for the reference pixel when the pixel around the reference pixel p in the lower half of the reference image Ib is the reference pixel. The combined cost value Ls of the candidate pixel q is calculated by consolidating the first cost value C1 of the candidate pixel q calculated by the cost calculation unit 320. The first subpixel estimation unit 340 also calculates the shift amount corresponding to the minimum value of the combined cost value Ls of the pixels in the comparison image Ia for the reference pixel in the lower half of the reference image Ib, calculated by the cost combining unit 330. Subpixel estimation is performed based on d and the combined cost value Ls in the shift amount d adjacent thereto, and a first parallax value dp1 in subpixel units is derived. Then, the parallax image generation unit 370 stores each of the lower half of the reference image Ib based on the first parallax value dp1 corresponding to the lower half of the reference image Ib that is stored in the second storage unit 360 and derived by the dense processing. A dense parallax image that is an image in which the luminance value of a pixel is represented by the first parallax value dp1 corresponding to the pixel is generated.

以上のように、デンス処理を実行する対象を基準画像Ibの下側半分としているので、デンス処理の処理時間を半分にすることができる。   As described above, since the object on which the dense process is executed is the lower half of the reference image Ib, the processing time of the dense process can be halved.

(機器制御システムの処理の動作タイミング)
図23は、第4の実施の形態に係る機器制御システムの処理のタイミングチャートを示す図である。図23を参照しながら、本実施の形態に係る機器制御システム50の処理の動作タイミングについて説明する。
(Operation timing of device control system processing)
FIG. 23 is a diagram illustrating a timing chart of processing of the device control system according to the fourth embodiment. With reference to FIG. 23, the operation timing of processing of the device control system 50 according to the present embodiment will be described.

図23に示すように、画像取得部110は、有効フレーム信号FVがオン状態のとき、撮像部10a、10bによってそれぞれ1フレーム分、すなわち、それぞれ1つの輝度画像を得る。   As shown in FIG. 23, when the effective frame signal FV is in an on state, the image acquisition unit 110 obtains one luminance image by the imaging units 10a and 10b, that is, one luminance image.

上述のように、デンス処理を実行する対象を基準画像Ibの下側半分としたことによりデンス処理の処理時間を半分にすることができる。しがたって、図23に示すように、デンス処理は、ブロックマッチング処理と同様に、比較画像Iaおよび基準画像Ibの1組が取得されるごとに、視差値演算、および認識処理部410によるデンス視差画像(デンス視差画像Ip1の半分のサイズ)に基づく認識処理の実行が可能となる。   As described above, the processing time of the dense process can be halved by setting the target for performing the dense process to the lower half of the reference image Ib. Therefore, as shown in FIG. 23, the dense processing is performed by the parallax value calculation and the recognition processing unit 410 every time one set of the comparison image Ia and the reference image Ib is acquired, as in the block matching processing. The recognition process based on the parallax image (half the size of the dense parallax image Ip1) can be executed.

これによって、デンス処理による演算処理の負荷を低減することができる。また、比較画像Iaおよび基準画像Ibの1組が取得されるごとに、デンス視差画像に基づく認識処理を実行することが可能となるので、認識処理の性能を確保することができると共に、デンス視差画像に基づく認識処理の対象としていた被写体に急激な変化が発生しても対応することができる。   As a result, it is possible to reduce the load of calculation processing by dense processing. In addition, each time a set of the comparison image Ia and the reference image Ib is acquired, the recognition process based on the dense parallax image can be executed, so that the performance of the recognition process can be ensured and the dense parallax can be ensured. It is possible to cope with a sudden change in a subject that has been subjected to recognition processing based on an image.

なお、デンス処理の対象を基準画像Ibの下側半分としたが、これに限定されるものではなく、基準画像Ibの上下方向の特定の位置から下側の部分であってもよい。   Note that although the lower half of the reference image Ib is the target of the dense processing, the present invention is not limited to this, and may be a portion below a specific position in the vertical direction of the reference image Ib.

[第5の実施の形態]
第5の実施の形態に係る視差値導出装置および機器制御システムについて、第1の実施の形態に係る視差値導出装置および機器制御システムと相違する点を中心に説明する。本実施の形態に係る視差値導出装置1および機器制御システム50は、構成、および、ブロックマッチング処理の内容については、第1の実施の形態と同様である。
[Fifth Embodiment]
A parallax value deriving device and device control system according to a fifth embodiment will be described focusing on differences from the parallax value deriving device and device control system according to the first embodiment. The disparity value deriving device 1 and the device control system 50 according to the present embodiment are the same as those in the first embodiment with respect to the configuration and the contents of the block matching process.

(視差値導出装置のデンス処理動作)
図24は、第5の実施の形態において基準画像の画素に対するデンス処理のスキャン動作を示す図である。図24を参照しながら、本実施の形態に係る視差値導出装置1のデンス処理について説明する。
(Density processing operation of parallax value deriving device)
FIG. 24 is a diagram illustrating a scanning operation of dense processing for the pixels of the reference image in the fifth embodiment. With reference to FIG. 24, the dense process of the disparity value deriving device 1 according to the present embodiment will be described.

上述の図11に示す基準画像Ibのように、人物、車両等の変化の多い被写体は、基準画像Ib全体に散在することが多いと考えられるが、路面等の変化の少ない被写体は、基準画像Ibのうち下側半分に存在することが多い。したがって、コスト合成部330によって、図5に示すように8方向すべてから第1コスト値C1を集約させる必要はなく、本実施の形態においては、図24に示すように、0度、180度、225度、270度および315度の5方向(特定方向)から第1コスト値C1を集約させるものとする。   Like the reference image Ib shown in FIG. 11 described above, it is considered that subjects with a lot of changes such as people and vehicles are often scattered throughout the reference image Ib. Often present in the lower half of Ib. Therefore, it is not necessary for the cost composition unit 330 to aggregate the first cost values C1 from all eight directions as shown in FIG. 5, and in the present embodiment, as shown in FIG. 24, 0 degrees, 180 degrees, The first cost value C1 is aggregated from five directions (specific directions) of 225 degrees, 270 degrees, and 315 degrees.

具体的には、コスト合成部330は、合成コスト値Lsを算出するために、上述の(式3)によって、上述の5方向の経路コスト値Lr(p,d)、すなわち、Lr、Lr180、Lr225、Lr270およびLr315を算出し、これらの和をとって合成コスト値Lsとする。そして、第1サブピクセル推定部340および視差画像生成部370の動作によって、デンス視差画像を得る。 Specifically, in order to calculate the synthesis cost value Ls, the cost synthesis unit 330 calculates the above-described five-way route cost values Lr (p, d), that is, Lr 0 , Lr, according to the above (Equation 3). 180 , Lr 225 , Lr 270 and Lr 315 are calculated, and the sum thereof is taken as the combined cost value Ls. A dense parallax image is obtained by the operations of the first sub-pixel estimation unit 340 and the parallax image generation unit 370.

以上のように、デンス処理を実行する場合における、コスト合成部330による経路コスト値Lrの算出を8方向から5方向に減らしているので、デンス処理の処理時間を約半分にすることができる。これによって、第4の実施の形態と同様に、デンス処理は、ブロックマッチング処理と同様に、比較画像Iaおよび基準画像Ibの1組が取得されるごとに、視差値演算、および認識処理部410によるデンス視差画像に基づく認識処理の実行が可能となる。また、比較画像Iaおよび基準画像Ibの1組が取得されるごとに、デンス視差画像に基づく認識処理を実行することが可能となるので、認識処理の性能を確保することができると共に、デンス視差画像に基づく認識処理の対象としていた被写体に急激な変化が発生しても対応することができる。   As described above, since the calculation of the route cost value Lr by the cost composition unit 330 in the case of executing the dense process is reduced from eight directions to five directions, the processing time of the dense process can be halved. Thus, as in the fourth embodiment, the dense processing is performed every time one set of the comparison image Ia and the reference image Ib is acquired, as in the block matching processing. It is possible to execute recognition processing based on dense parallax images. In addition, each time a set of the comparison image Ia and the reference image Ib is acquired, the recognition process based on the dense parallax image can be executed, so that the performance of the recognition process can be ensured and the dense parallax can be ensured. It is possible to cope with a sudden change in a subject that has been subjected to recognition processing based on an image.

なお、コスト合成部330によって5方向の経路コスト値Lr(p,d)が算出されるものとしているが、これに限定されるものではなく、3方向または4方向等としてもよい。3方向としては、例えば、コスト合成部330はLr225、Lr270およびLr315を算出するものとし、4方向としては、例えば、コスト合成部330は、Lr、Lr225、Lr270およびLr315を算出するものとすればよい。 Note that the cost synthesis unit 330 calculates the route cost value Lr (p, d) in five directions, but is not limited to this, and may be three directions or four directions. As the three directions, for example, the cost composition unit 330 calculates Lr 225 , Lr 270 and Lr 315 , and as the four directions, for example, the cost composition unit 330 uses Lr 0 , Lr 225 , Lr 270 and Lr 315. May be calculated.

[第6の実施の形態]
第6の実施の形態に係る視差値導出装置および機器制御システムについて、第1の実施の形態に係る視差値導出装置および機器制御システムと相違する点を中心に説明する。本実施の形態に係る視差値導出装置1および機器制御システム50は、デンス処理およびブロックマッチング処理の各処理の内容については、第1の実施の形態と同様である。
[Sixth Embodiment]
The disparity value deriving device and device control system according to the sixth embodiment will be described focusing on differences from the disparity value deriving device and device control system according to the first embodiment. The disparity value deriving device 1 and the device control system 50 according to the present embodiment are the same as the first embodiment with respect to the contents of the dense processing and the block matching processing.

<視差値導出装置のブロック構成>
図25は、第6の実施の形態に係る視差値導出装置のブロック構成の一例を示す図である。図25を参照しながら、視差値導出装置1の要部のブロック構成について説明する。
<Block Configuration of Disparity Value Deriving Device>
FIG. 25 is a diagram illustrating an example of a block configuration of the disparity value deriving device according to the sixth embodiment. A block configuration of a main part of the parallax value deriving device 1 will be described with reference to FIG.

図25に示すように、視差値導出装置1は、画像取得部110と、フィルタ部210と、補正部310と、第1記憶部350と、視差値演算部300a(デンス処理手段)と、視差値演算部300b(マッチング処理手段)と、第2記憶部360と、視差画像生成部370と、を備えている。視差画像生成部370の出力側には、認識処理部410が接続されている。   As illustrated in FIG. 25, the parallax value derivation device 1 includes an image acquisition unit 110, a filter unit 210, a correction unit 310, a first storage unit 350, a parallax value calculation unit 300a (dense processing unit), and parallax. A value calculation unit 300b (matching processing means), a second storage unit 360, and a parallax image generation unit 370 are provided. A recognition processing unit 410 is connected to the output side of the parallax image generation unit 370.

視差値演算部300aは、第1コスト算出部320と、コスト合成部330と、第1サブピクセル推定部340と、を含んでおり、比較画像Iaおよび基準画像Ibに対してデンス処理を実行する。視差値演算部300bは、第2コスト算出部321と、第2サブピクセル推定部341と、を含んでおり、比較画像Iaおよび基準画像Ibに対してブロックマッチング処理を実行する。すなわち、本実施の形態に係る視差値導出装置1は、第1の実施の形態の視差値導出装置1における同一のハードウェア回路(集積回路)により実現されていた視差値演算部300に代えて、別個のハードウェア回路(集積回路)である視差値演算部300aと、視差値演算部300bとを備えている。図25に示す視差値導出装置1に含まれる各処理部の機能は、第1の実施の形態と同様である。   The parallax value calculation unit 300a includes a first cost calculation unit 320, a cost synthesis unit 330, and a first subpixel estimation unit 340, and performs a dense process on the comparison image Ia and the reference image Ib. . The parallax value calculation unit 300b includes a second cost calculation unit 321 and a second subpixel estimation unit 341, and executes block matching processing on the comparison image Ia and the reference image Ib. In other words, the disparity value deriving device 1 according to the present embodiment is replaced with the disparity value calculating unit 300 realized by the same hardware circuit (integrated circuit) in the disparity value deriving device 1 of the first embodiment. In addition, a disparity value calculation unit 300a and a disparity value calculation unit 300b, which are separate hardware circuits (integrated circuits), are provided. The functions of the respective processing units included in the parallax value deriving device 1 shown in FIG. 25 are the same as those in the first embodiment.

以上の構成のように、視差値演算部300aと視差値演算部300bとは別個のハードウェア回路によって構成されているので、デンス処理およびブロックマッチング処理を並列に実行することができると共に、各ハードウェア回路で独立に実行することができる。これによって、デンス処理およびブロックマッチング処理を、双方、第1の実施の形態と比較して高速に処理することができ、図23に示すようなタイミングチャートで実行することができる。したがって、比較画像Iaおよび基準画像Ibの1組が取得されるごとに、デンス視差画像に基づく認識処理を実行することが可能となるので、認識処理の性能を確保することができると共に、デンス視差画像に基づく認識処理の対象としていた被写体に急激な変化が発生しても対応することができる。   As described above, the parallax value calculation unit 300a and the parallax value calculation unit 300b are configured by separate hardware circuits, so that dense processing and block matching processing can be executed in parallel. Can be executed independently by the wear circuit. As a result, both dense processing and block matching processing can be processed at a higher speed than in the first embodiment, and can be executed with a timing chart as shown in FIG. Therefore, each time a set of the comparison image Ia and the reference image Ib is acquired, the recognition process based on the dense parallax image can be executed, so that the performance of the recognition process can be ensured and the dense parallax can be ensured. It is possible to cope with a sudden change in a subject that has been subjected to recognition processing based on an image.

[第7の実施の形態]
第7の実施の形態に係る視差値導出装置および機器制御システムについて、第6の実施の形態に係る視差値導出装置および機器制御システムと相違する点を中心に説明する。
[Seventh Embodiment]
The disparity value deriving device and device control system according to the seventh embodiment will be described focusing on differences from the disparity value deriving device and device control system according to the sixth embodiment.

<視差値導出装置のブロック構成および各ブロックの動作>
図26は、第7の実施の形態に係る視差値導出装置のブロック構成の一例を示す図である。図27は、非エッジ部を検出する動作の一例を示す図である。図26および図27を参照しながら、視差値導出装置1の要部のブロック構成および各ブロックの動作について説明する。
<Block Configuration of Disparity Value Deriving Device and Operations of Each Block>
FIG. 26 is a diagram illustrating an example of a block configuration of a disparity value deriving device according to the seventh embodiment. FIG. 27 is a diagram illustrating an example of an operation for detecting a non-edge portion. With reference to FIG. 26 and FIG. 27, the block configuration of the main part of the parallax value deriving device 1 and the operation of each block will be described.

図26に示すように、視差値導出装置1は、画像取得部110と、フィルタ部210と、補正部310と、第1記憶部350と、視差値演算部300aと、視差値演算部300bと、検出部380(検出手段)と、選択部390(選択手段)と、第2記憶部360aと、視差画像生成部370a(生成手段)と、を備えている。視差画像生成部370aの出力側には、認識処理部410(認識処理手段)が接続されている。   As illustrated in FIG. 26, the parallax value derivation device 1 includes an image acquisition unit 110, a filter unit 210, a correction unit 310, a first storage unit 350, a parallax value calculation unit 300a, and a parallax value calculation unit 300b. , A detection unit 380 (detection unit), a selection unit 390 (selection unit), a second storage unit 360a, and a parallax image generation unit 370a (generation unit). A recognition processing unit 410 (recognition processing means) is connected to the output side of the parallax image generation unit 370a.

視差値演算部300aは、第1コスト算出部320と、コスト合成部330と、第1サブピクセル推定部340と、を含んでおり、比較画像Iaおよび基準画像Ibに対してデンス処理を実行する。視差値演算部300bは、第2コスト算出部321と、第2サブピクセル推定部341と、を含んでおり、比較画像Iaおよび基準画像Ibに対してブロックマッチング処理を実行する。すなわち、本実施の形態に係る視差値導出装置1は、第6の実施の形態に係る視差値導出装置1と同様に、別個のハードウェア回路である視差値演算部300aと、視差値演算部300bとを備えている。   The parallax value calculation unit 300a includes a first cost calculation unit 320, a cost synthesis unit 330, and a first subpixel estimation unit 340, and performs a dense process on the comparison image Ia and the reference image Ib. . The parallax value calculation unit 300b includes a second cost calculation unit 321 and a second subpixel estimation unit 341, and executes block matching processing on the comparison image Ia and the reference image Ib. That is, the disparity value deriving device 1 according to the present embodiment is similar to the disparity value deriving device 1 according to the sixth embodiment, and the disparity value calculating unit 300a, which is a separate hardware circuit, and the disparity value calculating unit 300b.

検出部380は、補正部310から出力された基準画像Ibを入力し、基準画像Ibを構成する各画素が、エッジ部に相当する画素か非エッジ部に相当する画素かを検出し、検出した結果情報である検出情報を選択部390に渡す。検出部380は、基準画像Ibを構成する画素がエッジ部か非エッジ部かを、例えば、以下のように検出する。図27(a)に示すように、検出対象である注目画素が「E」であるものとし、注目画素である「E」に隣接して囲む隣接画素を「A〜D、F〜I」とする。検出部380は、注目画素である「E」の画素値と、隣接画素である「A〜D、F〜I」の画素値とのそれぞれの差の絶対値を算出する。次に、検出部380は、算出した8個の絶対値それぞれが、所定の閾値Th以下であるか否かを判定する。そして、検出部380は、図27(b)に示すように、8個の絶対値がすべて、所定の閾値Th以下である場合、注目画素である「E」は、非エッジ部であるものと判定する。また、検出部380は、図27(b)の条件を満たさない場合、注目画素である「E」は、エッジ部であるものと判定する。   The detection unit 380 receives the reference image Ib output from the correction unit 310, detects whether each pixel constituting the reference image Ib is a pixel corresponding to an edge portion or a pixel corresponding to a non-edge portion, and detects it. Detection information as result information is passed to the selection unit 390. For example, the detection unit 380 detects whether the pixels constituting the reference image Ib are edge portions or non-edge portions as follows. As shown in FIG. 27A, it is assumed that the pixel of interest to be detected is “E”, and the adjacent pixels that are adjacent to the pixel of interest “E” are denoted by “A to D, F to I”. To do. The detection unit 380 calculates the absolute value of the difference between the pixel value of “E” that is the target pixel and the pixel values of “A to D and F to I” that are adjacent pixels. Next, the detection unit 380 determines whether each of the calculated eight absolute values is equal to or less than a predetermined threshold Th. Then, as illustrated in FIG. 27B, the detection unit 380 determines that “E” that is the target pixel is a non-edge portion when all of the eight absolute values are equal to or less than a predetermined threshold Th. judge. In addition, when the condition of FIG. 27B is not satisfied, the detection unit 380 determines that “E” as the pixel of interest is an edge portion.

選択部390は、第1サブピクセル推定部340から第1視差値dp1を入力し、第2サブピクセル推定部341から第2視差値dp2を入力し、検出部380から検出情報を入力する。そして、選択部390は、基準画像Ibの特定の画素についての非エッジ部か否かを示す検出情報に基づいて、その特定の画素に対応する第1視差値dp1または第2視差値dp2のうちいずれかを出力して、第2記憶部360aに記憶させる。具体的には、選択部390は、基準画像Ibの特定の画素に対応する検出情報が非エッジ部を示す情報である場合、その特定の画素に対応する第1視差値dp1を出力し、その特定の画素と関連付けた第1視差値dp1を、第2記憶部360aに記憶させる。また、選択部390は、基準画像Ibの特定の画素に対応する検出情報がエッジ部を示す情報である場合、その特定の画素に対応する第2視差値dp2を出力し、その特定の画素と関連付けた第2視差値dp2を、第2記憶部360aに記憶させる。選択部390は、図9に示すFPGA31によって実現される。   The selection unit 390 receives the first parallax value dp1 from the first subpixel estimation unit 340, the second parallax value dp2 from the second subpixel estimation unit 341, and the detection information from the detection unit 380. Then, based on the detection information indicating whether or not the specific pixel of the reference image Ib is a non-edge part, the selection unit 390 includes the first parallax value dp1 or the second parallax value dp2 corresponding to the specific pixel. Either one is output and stored in the second storage unit 360a. Specifically, when the detection information corresponding to the specific pixel of the reference image Ib is information indicating a non-edge portion, the selection unit 390 outputs the first parallax value dp1 corresponding to the specific pixel, The first parallax value dp1 associated with the specific pixel is stored in the second storage unit 360a. Further, when the detection information corresponding to the specific pixel of the reference image Ib is information indicating an edge portion, the selection unit 390 outputs the second parallax value dp2 corresponding to the specific pixel, The associated second parallax value dp2 is stored in the second storage unit 360a. The selection unit 390 is realized by the FPGA 31 illustrated in FIG.

第2記憶部360aは、選択部390から出力された第1視差値dp1および第2視差値dp2を、それぞれ基準画像Ibの画素に関連付けて記憶する。第2記憶部360aは、図9に示すRAM34によって実現される。なお、第2記憶部360aは、図9において図示しないHDD等の外部記憶装置によって実現されるものとしてもよい。   The second storage unit 360a stores the first parallax value dp1 and the second parallax value dp2 output from the selection unit 390 in association with the pixel of the reference image Ib. The second storage unit 360a is realized by the RAM 34 shown in FIG. The second storage unit 360a may be realized by an external storage device such as an HDD (not shown in FIG. 9).

視差画像生成部370aは、第2記憶部360aに基準画像Ibの各画素に関連付けて記憶された第1視差値dp1および第2視差値dp2によって、基準画像Ibの各画素の輝度値を、その画素に対応する第1視差値dp1または第2視差値dp2で表した画像である混合視差画像Ip3を生成する。すなわち、混合視差画像Ip3は、第1視差値dp1および第2視差値dp2を混合して生成されたものであり、第1視差値dp1に対応する画素は、基準画像Ibにおける非エッジ部に相当する画素に対応し、第2視差値dp2に対応する画素は、基準画像Ibにおけるエッジ部に相当する画素に対応する。視差画像生成部370aは、図9に示すFPGA31によって実現される。   The parallax image generation unit 370a uses the first parallax value dp1 and the second parallax value dp2 stored in association with each pixel of the reference image Ib in the second storage unit 360a to calculate the luminance value of each pixel of the reference image Ib. A mixed parallax image Ip3 that is an image represented by the first parallax value dp1 or the second parallax value dp2 corresponding to the pixel is generated. That is, the mixed parallax image Ip3 is generated by mixing the first parallax value dp1 and the second parallax value dp2, and the pixel corresponding to the first parallax value dp1 corresponds to a non-edge portion in the reference image Ib. The pixel corresponding to the second parallax value dp2 corresponds to the pixel corresponding to the edge portion in the reference image Ib. The parallax image generation unit 370a is realized by the FPGA 31 illustrated in FIG.

認識処理部410は、視差画像生成部370aにより生成された混合視差画像Ip3に基づいて、道路の路面等のテクスチャの弱い部分を認識する路面認識処理等、および人物、標識、車両、その他の障害物を認識する物体認識処理等の双方を実行する。認識処理部410は、図9に示す画像表示装置3、または、図7に示す制御装置5等によって実現される。   The recognition processing unit 410 is based on the mixed parallax image Ip3 generated by the parallax image generation unit 370a, and recognizes a road surface recognition process for recognizing a weak textured part such as a road surface of a road, a person, a sign, a vehicle, and other obstacles. Both object recognition processing and the like for recognizing an object are executed. The recognition processing unit 410 is realized by the image display device 3 shown in FIG. 9 or the control device 5 shown in FIG.

なお、補正部310、第1コスト算出部320、コスト合成部330、第1サブピクセル推定部340、第2コスト算出部321、第2サブピクセル推定部341、検出部380、選択部390および視差画像生成部370aは、FPGA31によって実現、すなわちハードウェア回路によって実現されるものとしたが、これに限定されるものではない。すなわち、補正部310、第1コスト算出部320、コスト合成部330、第1サブピクセル推定部340、第2コスト算出部321、第2サブピクセル推定部341、検出部380、選択部390および視差画像生成部370aの少なくともいずれかは、ソフトウェアであるプログラムがCPU32によって実行されることにより、実現されてもよい。また、補正部310、第1コスト算出部320、コスト合成部330、第1サブピクセル推定部340、第2コスト算出部321、第2サブピクセル推定部341、検出部380、選択部390および視差画像生成部370aは、機能を概念的にブロック構成したものであって、このような構成に限定されるものではない。   The correction unit 310, the first cost calculation unit 320, the cost synthesis unit 330, the first subpixel estimation unit 340, the second cost calculation unit 321, the second subpixel estimation unit 341, the detection unit 380, the selection unit 390, and the parallax The image generation unit 370a is realized by the FPGA 31, that is, is realized by a hardware circuit, but is not limited thereto. That is, the correction unit 310, the first cost calculation unit 320, the cost synthesis unit 330, the first subpixel estimation unit 340, the second cost calculation unit 321, the second subpixel estimation unit 341, the detection unit 380, the selection unit 390, and the parallax At least one of the image generation units 370a may be realized by the CPU 32 executing a program that is software. In addition, the correction unit 310, the first cost calculation unit 320, the cost synthesis unit 330, the first subpixel estimation unit 340, the second cost calculation unit 321, the second subpixel estimation unit 341, the detection unit 380, the selection unit 390, and the parallax The image generation unit 370a has a conceptual block configuration of functions, and is not limited to such a configuration.

以上のような構成および動作のように、本実施の形態に係る視差値導出装置1は、輝度画像である基準画像Ibの各画素を、非エッジ部か否かを検出し、非エッジ部である画素に対しては視差値演算部300aにより導出された第1視差値dp1を用いて、エッジ部である画素に対しては視差値演算部300bにより導出された第2視差値dp2を用いて、混合視差画像Ip3を生成している。そして、認識処理部410は、この混合視差画像Ip3を用いて各種認識処理を実行するものとしている。これによって、道路の路面等のテクスチャの弱い部分を認識する路面認識処理等、および人物、標識、車両、その他の障害物を認識する物体認識処理等の双方において、共通の混合視差画像Ip3を利用して処理が可能となる。そして、混合視差画像Ip3を構成する視差値は、いずれの認識処理にも適した視差値となるので、認識処理の性能を向上させることができる。   As described above, the disparity value deriving device 1 according to the present embodiment detects whether or not each pixel of the reference image Ib, which is a luminance image, is a non-edge part. The first parallax value dp1 derived by the parallax value calculation unit 300a is used for a certain pixel, and the second parallax value dp2 derived by the parallax value calculation unit 300b is used for a pixel that is an edge unit. The mixed parallax image Ip3 is generated. And the recognition process part 410 shall perform various recognition processes using this mixed parallax image Ip3. As a result, the common mixed parallax image Ip3 is used both in the road surface recognition process for recognizing a weak textured part such as a road surface and the object recognition process for recognizing a person, a sign, a vehicle, and other obstacles. Can be processed. And since the parallax value which comprises mixed parallax image Ip3 becomes a parallax value suitable for any recognition process, the performance of a recognition process can be improved.

なお、上述の実施の形態では、コスト値C、第1コスト値C1および第2コスト値C2は非類似度を表す評価値としているが、類似度を表す評価値であってもよい。この場合、合成コスト値Lsがサブピクセル単位で最大となるシフト量dが第1視差値dp1となる。   In the above-described embodiment, the cost value C, the first cost value C1, and the second cost value C2 are evaluation values representing dissimilarities, but may be evaluation values representing similarity. In this case, the shift amount d that maximizes the combined cost value Ls in subpixel units is the first parallax value dp1.

また、上述の実施の形態では、説明の簡略化のために、画素単位でのマッチングで説明したが、これに限定されるものではなく、所定領域(ブロック)単位でマッチングされてもよい。この場合、基準画素を含む所定領域は基準領域として示され、対応画素を含む所定領域は対応領域として示され、対応画素の候補画素は候補領域として示される。また、この基準領域には基準画素のみの場合も含まれ、対応領域には対応画素のみの場合も含まれ、候補領域には候補画素のみの場合も含まれる。   In the above-described embodiment, for the sake of simplification of description, the description has been made on matching in units of pixels. However, the present invention is not limited to this, and matching may be performed in units of predetermined regions (blocks). In this case, the predetermined area including the reference pixel is indicated as the reference area, the predetermined area including the corresponding pixel is indicated as the corresponding area, and the candidate pixel of the corresponding pixel is indicated as the candidate area. The reference area includes the case of only the reference pixel, the corresponding area includes the case of only the corresponding pixel, and the candidate area includes the case of only the candidate pixel.

また、上述の実施の形態では、視差値導出装置1の外部の機器(例えば、画像表示装置3)が視差画像(視差値)に基づき、距離Zを算出しているが、これに限定されるものではなく、画像処理部30のCPU32が距離Zを算出するものとしてもよい。   In the above-described embodiment, the device (for example, the image display device 3) outside the parallax value deriving device 1 calculates the distance Z based on the parallax image (parallax value). However, the present invention is not limited to this. Instead, the CPU 32 of the image processing unit 30 may calculate the distance Z.

また、上述の実施の形態では、車両100としての自動車に搭載される視差値導出装置1について説明したが、これに限定されるものではない。例えば、他の車両の一例としてバイク、自転車、車椅子または農業用の耕運機等の車両に搭載されるものとしてもよい。また、移動体の一例としての車両だけでなく、ロボット等の移動体であってもよい。   Moreover, although the above-mentioned embodiment demonstrated the parallax value derivation | leading-out apparatus 1 mounted in the motor vehicle as the vehicle 100, it is not limited to this. For example, it may be mounted on a vehicle such as a motorcycle, bicycle, wheelchair, or agricultural cultivator as an example of another vehicle. In addition to a vehicle as an example of a moving body, a moving body such as a robot may be used.

さらに、ロボットは、移動体だけでなく、FA(Factory Automation)において固定設置される工業用ロボット等の装置であってもよい。また、固定設置される装置としては、ロボットだけでなく、防犯用の監視カメラ等であってもよい。   Furthermore, the robot may be an apparatus such as an industrial robot that is fixedly installed in an FA (Factory Automation) as well as a moving body. Further, the device to be fixedly installed may be not only a robot but also a surveillance camera for security.

1 視差値導出装置
2 本体
3 画像表示装置
5 制御装置
6 ステアリングホイール
7 ブレーキペダル
10a、10b 撮像部
11a、11b 撮像レンズ
12a、12b 絞り
13a、13b 画像センサ
20a、20b 信号変換部
21a、21b CDS
22a、22b AGC
23a、23b ADC
24a、24b フレームメモリ
30 画像処理部
31 FPGA
32 CPU
33 ROM
34 RAM
35 通信I/F
36 CANC
39 バス
50 機器制御システム
100 車両
110 画像取得部
210 フィルタ部
300、300a、300b 視差値演算部
310 補正部
320 第1コスト算出部
321 第2コスト算出部
330 コスト合成部
340 第1サブピクセル推定部
341 第2サブピクセル推定部
350 第1記憶部
360、360a 第2記憶部
370、370a 視差画像生成部
380 検出部
390 選択部
410 認識処理部
510a、510b 撮像装置
511a、511b 撮像レンズ
B 基線長
C コスト値
C1 第1コスト値
C2 第2コスト値
d シフト量
dp 視差値
dp1 第1視差値
dp2 第2視差値
E 物体
EL エピポーラ線
f 焦点距離
FV 有効フレーム信号
Ia 比較画像
Ib 基準画像
Img1〜Img3 画像部
Ip1 デンス視差画像
Ip2 エッジ視差画像
Ip3 混合視差画像
Lr 経路コスト値
Ls 合成コスト値
S、Sa、Sb 点
Th 閾値
Z 距離
DESCRIPTION OF SYMBOLS 1 Parallax value derivation | leading-out apparatus 2 Main body 3 Image display apparatus 5 Control apparatus 6 Steering wheel 7 Brake pedal 10a, 10b Imaging part 11a, 11b Imaging lens 12a, 12b Aperture 13a, 13b Image sensor 20a, 20b Signal conversion part 21a, 21b CDS
22a, 22b AGC
23a, 23b ADC
24a, 24b Frame memory 30 Image processing unit 31 FPGA
32 CPU
33 ROM
34 RAM
35 Communication I / F
36 CANC
39 bus 50 device control system 100 vehicle 110 image acquisition unit 210 filter unit 300, 300a, 300b parallax value calculation unit 310 correction unit 320 first cost calculation unit 321 second cost calculation unit 330 cost synthesis unit 340 first subpixel estimation unit 341 Second sub-pixel estimation unit 350 First storage unit 360, 360a Second storage unit 370, 370a Parallax image generation unit 380 Detection unit 390 Selection unit 410 Recognition processing unit 510a, 510b Imaging device 511a, 511b Imaging lens B Base length C Cost value C1 first cost value C2 second cost value d shift amount dp parallax value dp1 first parallax value dp2 second parallax value E object EL epipolar line f focal length FV effective frame signal Ia comparison image Ib reference image Img1 to Img3 image Department Ip1 Dense Differential image Ip2 edge parallax image Ip3 mixture parallax image Lr path cost value Ls synthesis cost value S, Sa, Sb point Th threshold Z distance

特開2012−018013号公報JP 2012-018013 A

H.Hirschmuller,Accurate and Efficient Stereo Processing by Semi−Global Matching and Mutual Imformation,IEEE Conference on Computer Vision and Pattern Recognition(CVPR),San Diego,CA,USA,June 20−26,2005.H. Hirschmuller, Accurate and Efficient Stereo Processing by Semi-Global Matching and Mutual Information, IEEE Conference on Computer Vision and Patter.

Claims (13)

第1撮像手段が被写体を撮像することにより得られた基準画像、および第2撮像手段が前記被写体を撮像することにより得られた比較画像を取得する取得手段と、
前記基準画像および前記比較画像に基づいてデンス処理を実行し第1視差値を導出するデンス処理手段と、
前記基準画像および前記比較画像に基づいてブロックマッチング処理を実行し第2視差値を導出するマッチング処理手段と、
前記基準画像を構成する各画素が、エッジ部に相当する画素か非エッジ部に相当する画素かを検出し、その検出結果の情報である検出情報を出力する検出手段と、
前記検出情報が、該検出情報に対応する前記基準画像の画素が前記非エッジ部に相当する画素であることを示す場合、該画素に対応する前記第1視差値を出力し、該検出情報に対応する前記基準画像の画素が前記エッジ部に相当する画素であることを示す場合、該画素に対応する前記第2視差値を出力する選択手段と、
前記選択手段により出力された前記第1視差値および前記第2視差値によって視差画像を生成する生成手段と、
を備えた画像処理装置。
An acquisition means for acquiring a reference image obtained by imaging the subject by the first imaging means, and a comparative image obtained by imaging the subject by the second imaging means;
Dense processing means for performing a dense process based on the reference image and the comparison image to derive a first parallax value;
Matching processing means for performing block matching processing based on the reference image and the comparison image to derive a second parallax value;
Detecting means for detecting whether each pixel constituting the reference image is a pixel corresponding to an edge portion or a pixel corresponding to a non-edge portion, and outputs detection information which is information of a detection result;
When the detection information indicates that the pixel of the reference image corresponding to the detection information is a pixel corresponding to the non-edge portion, the first parallax value corresponding to the pixel is output, and the detection information A selection unit that outputs the second parallax value corresponding to the pixel when the corresponding pixel of the reference image indicates a pixel corresponding to the edge portion;
Generating means for generating a parallax image based on the first parallax value and the second parallax value output by the selection means;
An image processing apparatus.
前記第1視差を用いて第1被写体に対する認識処理を実行し、前記第2視差を用いて前記第1被写体よりも状態の変化が大きい第2被写体に対する認識処理を実行する認識処理手段をさらに備えた請求項1に記載の画像処理装置。 Recognition processing means for executing recognition processing for the first subject using the first parallax value and executing recognition processing for the second subject having a greater change in state than the first subject using the second parallax value. The image processing apparatus according to claim 1, further comprising: 前記デンス処理手段は、
前記基準画像における第1基準領域の輝度値と、前記第1基準領域に基づく前記比較画像におけるエピポーラ線上で、前記第1基準領域の位置に相当する領域から、画素単位のシフト量でシフトすることにより特定される、前記第1基準領域に対応する前記比較画像の対応領域の候補となる複数の第1候補領域の輝度値と、に基づいて前記複数の第1候補領域それぞれの第1コスト値を算出する第1算出手段と、
前記第1基準領域の周辺の第2基準領域についての前記比較画像における第1コスト値を、前記第1候補領域の第1コスト値に集約させて、前記複数の第1候補領域それぞれの合成コスト値を算出する合成手段と、
前記比較画像における前記複数の第1候補領域の前記合成コスト値のうち第1極値に対応する前記シフト量に基づいて、前記第1視差値を導出する第1導出手段と、
を備えた請求項1または2に記載の画像処理装置。
The dense processing means is:
Shifting by a shift amount in units of pixels from the region corresponding to the position of the first reference region on the luminance value of the first reference region in the reference image and the epipolar line in the comparison image based on the first reference region. And the first cost value of each of the plurality of first candidate regions based on the luminance values of the plurality of first candidate regions that are candidates for the corresponding region of the comparison image corresponding to the first reference region. First calculating means for calculating
The first cost value in the comparison image for the second reference region around the first reference region is aggregated into the first cost value of the first candidate region, and the combined cost of each of the plurality of first candidate regions A synthesis means for calculating a value;
First derivation means for deriving the first parallax value based on the shift amount corresponding to a first extreme value among the combined cost values of the plurality of first candidate regions in the comparison image;
The image processing apparatus according to claim 1, further comprising:
前記マッチング処理手段は、
前記基準画像における第3基準領域の輝度値と、前記第3基準領域に基づく前記比較画像におけるエピポーラ線上で、前記第3基準領域の位置に相当する領域から、画素単位のシフト量でシフトすることにより特定される、前記第3基準領域に対応する前記比較画像の対応領域の候補となる複数の第2候補領域の輝度値と、に基づいて前記複数の第2候補領域それぞれの第2コスト値を算出する第2算出手段と、
前記比較画像における前記複数の第2候補領域の前記第2コスト値のうち第2極値に対応する前記シフト量に基づいて、前記第2視差値を導出する第2導出手段と、
を備えた請求項1〜3のいずれか一項に記載の画像処理装置。
The matching processing means includes
Shifting by a shift amount in units of pixels from the region corresponding to the position of the third reference region on the luminance value of the third reference region in the reference image and the epipolar line in the comparison image based on the third reference region. And the second cost value of each of the plurality of second candidate regions based on the brightness values of the plurality of second candidate regions that are candidates for the corresponding region of the comparison image corresponding to the third reference region. Second calculating means for calculating
Second derivation means for deriving the second parallax value based on the shift amount corresponding to a second extreme value among the second cost values of the plurality of second candidate regions in the comparison image;
The image processing apparatus according to claim 1, further comprising:
前記第1算出手段は、前記基準画像の所定位置から下側部分における前記第1基準領域の輝度値と、前記エピポーラ線上で、前記第1基準領域の位置に相当する領域から、画素単位のシフト量でシフトすることにより特定される、前記複数の第1候補領域の輝度値と、に基づいて前記複数の第1候補領域それぞれの第1コスト値を算出し、
前記合成手段は、前記基準画像の前記所定位置から下側部分における前記第1基準領域の周辺の第2基準領域についての前記比較画像における第1コスト値を、前記第1候補領域の第1コスト値に集約させて、前記複数の第1候補領域それぞれの前記合成コスト値を算出し、
前記第1導出手段は、前記基準画像の前記所定位置から下側部分に対応して前記第1視差値を導出し、
前記生成手段は、前記基準画像の前記所定位置から下側部分に対応した前記第1視差値に基づく視差画像を生成する請求項3に記載の画像処理装置。
The first calculation means shifts the luminance value of the first reference region in the lower part from the predetermined position of the reference image and the pixel unit shift from the region corresponding to the position of the first reference region on the epipolar line. Calculating a first cost value for each of the plurality of first candidate regions based on the luminance values of the plurality of first candidate regions identified by shifting by an amount;
The synthesizing unit uses the first cost value in the comparison image for the second reference region around the first reference region in the lower portion from the predetermined position of the reference image as the first cost of the first candidate region. A composite cost value of each of the plurality of first candidate regions is aggregated into a value,
The first deriving unit derives the first parallax value corresponding to a lower portion from the predetermined position of the reference image,
The image processing apparatus according to claim 3, wherein the generation unit generates a parallax image based on the first parallax value corresponding to a lower portion from the predetermined position of the reference image.
前記合成手段は、前記第1基準領域の複数の特定方向で隣接する前記第2基準領域についての前記比較画像における第1コスト値を、前記第1候補領域の第1コスト値に集約させて、前記複数の第1候補領域それぞれの前記各特定方向の経路コスト値を算出し、前記各経路コスト値を合計することにより前記合成コスト値を算出する請求項3に記載の画像処理装置。   The synthesizing unit aggregates the first cost value in the comparison image for the second reference region adjacent in a plurality of specific directions of the first reference region into the first cost value of the first candidate region, The image processing device according to claim 3, wherein a route cost value in each of the specific directions of each of the plurality of first candidate regions is calculated, and the combined cost value is calculated by summing the route cost values. 前記デンス処理手段および前記マッチング処理手段は、別々の集積回路によって構成された請求項1〜4のいずれか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the dense processing unit and the matching processing unit are configured by separate integrated circuits. 第1撮像手段が被写体を撮像することにより得られた基準画像、および第2撮像手段が前記被写体を撮像することにより得られた比較画像を取得する取得手段と、
前記基準画像および前記比較画像に基づいてデンス処理を実行し第1視差値を導出するデンス処理手段と、
前記基準画像および前記比較画像に基づいてブロックマッチング処理を実行し第2視差値を導出するマッチング処理手段と、
前記基準画像を構成する各画素が、エッジ部に相当する画素か非エッジ部に相当する画素かを検出し、その検出結果の情報である検出情報を出力する検出手段と、
前記検出情報が、該検出情報に対応する前記基準画像の画素が前記非エッジ部に相当する画素であることを示す場合、該画素に対応する前記第1視差値を出力し、該検出情報に対応する前記基準画像の画素が前記エッジ部に相当する画素であることを示す場合、該画素に対応する前記第2視差値を出力する選択手段と、
前記選択手段により出力された前記第1視差値および前記第2視差値によって視差画像を生成する生成手段と、
を備え、
前記デンス処理手段および前記マッチング処理手段は、別々の集積回路によって構成された画像処理装置。
An acquisition means for acquiring a reference image obtained by imaging the subject by the first imaging means, and a comparative image obtained by imaging the subject by the second imaging means;
Dense processing means for performing a dense process based on the reference image and the comparison image to derive a first parallax value;
Matching processing means for performing block matching processing based on the reference image and the comparison image to derive a second parallax value;
Detecting means for detecting whether each pixel constituting the reference image is a pixel corresponding to an edge portion or a pixel corresponding to a non-edge portion, and outputs detection information which is information of a detection result;
When the detection information indicates that the pixel of the reference image corresponding to the detection information is a pixel corresponding to the non-edge portion, the first parallax value corresponding to the pixel is output, and the detection information A selection unit that outputs the second parallax value corresponding to the pixel when the corresponding pixel of the reference image indicates a pixel corresponding to the edge portion;
Generating means for generating a parallax image based on the first parallax value and the second parallax value output by the selection means;
With
The dense processing means and the matching processing means are image processing apparatuses configured by separate integrated circuits.
第1撮像手段が被写体を撮像することにより得られた基準画像、および第2撮像手段が前記被写体を撮像することにより得られた比較画像を取得する取得手段と、
前記基準画像および前記比較画像に基づいてデンス処理を実行し第1視差値を導出するデンス処理手段と、
前記基準画像および前記比較画像に基づいてブロックマッチング処理を実行し第2視差値を導出するマッチング処理手段と、
前記基準画像を構成する各画素が、エッジ部に相当する画素か非エッジ部に相当する画素かを検出し、その検出結果の情報である検出情報を出力する検出手段と、
前記検出情報が、該検出情報に対応する前記基準画像の画素が前記非エッジ部に相当する画素であることを示す場合、該画素に対応する前記第1視差値を出力し、該検出情報に対応する前記基準画像の画素が前記エッジ部に相当する画素であることを示す場合、該画素に対応する前記第2視差値を出力する選択手段と、
前記選択手段により出力された前記第1視差値および前記第2視差値によって視差画像を生成する生成手段と、
を備え、
前記デンス処理手段および前記マッチング処理手段のうち、一方は集積回路によって構成され、他方はプログラムが実行されることにより実現される画像処理装置。
An acquisition means for acquiring a reference image obtained by imaging the subject by the first imaging means, and a comparative image obtained by imaging the subject by the second imaging means;
Dense processing means for performing a dense process based on the reference image and the comparison image to derive a first parallax value;
Matching processing means for performing block matching processing based on the reference image and the comparison image to derive a second parallax value;
Detecting means for detecting whether each pixel constituting the reference image is a pixel corresponding to an edge portion or a pixel corresponding to a non-edge portion, and outputs detection information which is information of a detection result;
When the detection information indicates that the pixel of the reference image corresponding to the detection information is a pixel corresponding to the non-edge portion, the first parallax value corresponding to the pixel is output, and the detection information A selection unit that outputs the second parallax value corresponding to the pixel when the corresponding pixel of the reference image indicates a pixel corresponding to the edge portion;
Generating means for generating a parallax image based on the first parallax value and the second parallax value output by the selection means;
With
One of the dense processing means and the matching processing means is constituted by an integrated circuit, and the other is realized by executing a program.
請求項1〜のいずれか一項に記載の画像処理装置を備えた移動体。 Mobile with an image processing apparatus according to any one of claims 1-9. 請求項1〜のいずれか一項に記載の画像処理装置を備えたロボット。 Robot having an image processing apparatus according to any one of claims 1-9. 第1撮像手段が被写体を撮像することにより得られた基準画像、および第2撮像手段が前記被写体を撮像することにより得られた比較画像を取得する取得ステップと、
前記基準画像および前記比較画像に基づいてデンス処理を実行し第1視差値を導出するデンス処理ステップと、
前記基準画像および前記比較画像に基づいてブロックマッチング処理を実行し第2視差値を導出するマッチング処理ステップと、
前記基準画像を構成する各画素が、エッジ部に相当する画素か非エッジ部に相当する画素かを検出し、その検出結果の情報である検出情報を出力する検出ステップと、
前記検出情報が、該検出情報に対応する前記基準画像の画素が前記非エッジ部に相当する画素であることを示す場合、該画素に対応する前記第1視差値を出力し、該検出情報に対応する前記基準画像の画素が前記エッジ部に相当する画素であることを示す場合、該画素に対応する前記第2視差値を出力する選択ステップと、
出力した前記第1視差値および前記第2視差値によって視差画像を生成する生成ステップと、
有する機器制御方法。
An acquisition step of acquiring a reference image obtained by imaging the subject by the first imaging means and a comparative image obtained by imaging the subject by the second imaging means;
A dense processing step of performing a dense process based on the reference image and the comparison image to derive a first parallax value;
A matching process step of performing a block matching process based on the reference image and the comparison image to derive a second parallax value;
A detection step of detecting whether each pixel constituting the reference image is a pixel corresponding to an edge portion or a pixel corresponding to a non-edge portion, and outputting detection information which is information of a detection result;
When the detection information indicates that the pixel of the reference image corresponding to the detection information is a pixel corresponding to the non-edge portion, the first parallax value corresponding to the pixel is output, and the detection information A selection step of outputting the second parallax value corresponding to the pixel when the corresponding pixel of the reference image indicates that the pixel corresponds to the edge portion;
Generating a parallax image based on the output first parallax value and the second parallax value;
A device control method.
第1撮像手段が被写体を撮像することにより得られた基準画像、および第2撮像手段が前記被写体を撮像することにより得られた比較画像を取得する取得手段と、
前記基準画像および前記比較画像に基づいてデンス処理を実行し第1視差値を導出するデンス処理手段と、
前記基準画像および前記比較画像に基づいてブロックマッチング処理を実行し第2視差値を導出するマッチング処理手段と、
前記基準画像を構成する各画素が、エッジ部に相当する画素か非エッジ部に相当する画素かを検出し、その検出結果の情報である検出情報を出力する検出手段と、
前記検出情報が、該検出情報に対応する前記基準画像の画素が前記非エッジ部に相当する画素であることを示す場合、該画素に対応する前記第1視差値を出力し、該検出情報に対応する前記基準画像の画素が前記エッジ部に相当する画素であることを示す場合、該画素に対応する前記第2視差値を出力する選択手段と、
前記選択手段により出力された前記第1視差値および前記第2視差値によって視差画像を生成する生成手段と、
をコンピュータに実現させるためのプログラム。
An acquisition means for acquiring a reference image obtained by imaging the subject by the first imaging means, and a comparative image obtained by imaging the subject by the second imaging means;
Dense processing means for performing a dense process based on the reference image and the comparison image to derive a first parallax value;
Matching processing means for performing block matching processing based on the reference image and the comparison image to derive a second parallax value;
Detecting means for detecting whether each pixel constituting the reference image is a pixel corresponding to an edge portion or a pixel corresponding to a non-edge portion, and outputs detection information which is information of a detection result;
When the detection information indicates that the pixel of the reference image corresponding to the detection information is a pixel corresponding to the non-edge portion, the first parallax value corresponding to the pixel is output, and the detection information A selection unit that outputs the second parallax value corresponding to the pixel when the corresponding pixel of the reference image indicates a pixel corresponding to the edge portion;
Generating means for generating a parallax image based on the first parallax value and the second parallax value output by the selection means;
A program to make a computer realize.
JP2014032287A 2014-02-21 2014-02-21 Image processing apparatus, moving body, robot, device control method and program Active JP6337504B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014032287A JP6337504B2 (en) 2014-02-21 2014-02-21 Image processing apparatus, moving body, robot, device control method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014032287A JP6337504B2 (en) 2014-02-21 2014-02-21 Image processing apparatus, moving body, robot, device control method and program

Publications (2)

Publication Number Publication Date
JP2015158749A JP2015158749A (en) 2015-09-03
JP6337504B2 true JP6337504B2 (en) 2018-06-06

Family

ID=54182706

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014032287A Active JP6337504B2 (en) 2014-02-21 2014-02-21 Image processing apparatus, moving body, robot, device control method and program

Country Status (1)

Country Link
JP (1) JP6337504B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6810009B2 (en) * 2017-09-29 2021-01-06 トヨタ自動車株式会社 Parallax calculator
CN111242990B (en) * 2020-01-06 2024-01-30 西南电子技术研究所(中国电子科技集团公司第十研究所) 360-degree three-dimensional reconstruction optimization method based on continuous phase dense matching
KR20230104298A (en) 2020-01-22 2023-07-07 노다르 인크. Non-rigid stereo vision camera system
CN112347882B (en) * 2020-10-27 2024-03-22 中德(珠海)人工智能研究院有限公司 Intelligent sorting control method and intelligent sorting control system
KR102583256B1 (en) * 2021-01-06 2023-10-04 노다르 인크. Method and system for providing confidence estimates to depth maps
WO2023244252A1 (en) 2022-06-14 2023-12-21 Nodar Inc. 3d vision system with automatically calibrated stereo vision sensors and lidar sensor

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5106771B2 (en) * 2005-11-08 2012-12-26 株式会社トヨタマップマスター Road marking measuring device
JP5188429B2 (en) * 2009-03-24 2013-04-24 富士重工業株式会社 Environment recognition device
JP2013073598A (en) * 2011-09-29 2013-04-22 Sony Corp Image processing device, image processing method, and program

Also Published As

Publication number Publication date
JP2015158749A (en) 2015-09-03

Similar Documents

Publication Publication Date Title
JP6565188B2 (en) Parallax value deriving apparatus, device control system, moving body, robot, parallax value deriving method, and program
JP6417886B2 (en) Parallax value deriving device, moving body, robot, parallax value production method, and program
JP6337504B2 (en) Image processing apparatus, moving body, robot, device control method and program
JP6561512B2 (en) Parallax value deriving device, moving body, robot, parallax value deriving method, parallax value producing method, and program
WO2017138245A1 (en) Image processing device, object recognition device, device control system, and image processing method and program
JP2014138420A (en) Depth sensing method and system for autonomous vehicle
JP6171593B2 (en) Object tracking method and system from parallax map
JP6589313B2 (en) Parallax value deriving apparatus, device control system, moving body, robot, parallax value deriving method, and program
JP6306735B2 (en) Stereo camera device and vehicle equipped with stereo camera device
EP3545464A1 (en) Information processing device, imaging device, equipment control system, mobile object, information processing method, and computer-readable recording medium
JP6543935B2 (en) PARALLEL VALUE DERIVING DEVICE, DEVICE CONTROL SYSTEM, MOBILE OBJECT, ROBOT, PARALLEL VALUE DERIVING METHOD, AND PROGRAM
JP6455164B2 (en) Parallax value deriving apparatus, device control system, moving body, robot, parallax value deriving method, and program
JPWO2017099199A1 (en) Image processing apparatus, object recognition apparatus, device control system, image processing method and program
JP6519138B2 (en) PARALLEL VALUE DERIVING DEVICE, MOBILE OBJECT, ROBOT, PARALLEL VALUE PRODUCTION METHOD, AND PROGRAM
JP6561511B2 (en) Parallax value deriving device, moving body, robot, parallax value production deriving method, parallax value producing method and program
JP2015230703A (en) Object detection device and object detection method
JP6387710B2 (en) Camera system, distance measuring method, and program
JP2018146495A (en) Object detection apparatus, object detection method, object detection program, imaging apparatus, and equipment control system
JP6515547B2 (en) PARALLEL VALUE DERIVING DEVICE, DEVICE CONTROL SYSTEM, MOBILE OBJECT, ROBOT, PARALLEL VALUE PRODUCTION METHOD, AND PROGRAM
JP6459482B2 (en) Parallax value deriving apparatus, device control system, moving body, robot, parallax value deriving method, and program
WO2018097269A1 (en) Information processing device, imaging device, equipment control system, mobile object, information processing method, and computer-readable recording medium
JP6561688B2 (en) DETECTING DEVICE, DETECTING METHOD, IMAGING DEVICE, DEVICE CONTROL SYSTEM, AND PROGRAM
JP6442911B2 (en) Parallax value deriving device, moving object, robot, parallax value deriving method, and program
KR20190069958A (en) Apparatus and Method for Detecting Moving Object
JP6701738B2 (en) Parallax value deriving device, parallax value deriving method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170207

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180130

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180330

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180423

R151 Written notification of patent or utility model registration

Ref document number: 6337504

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151