JP2016070774A - Parallax value derivation device, moving body, robot, parallax value production method and program - Google Patents

Parallax value derivation device, moving body, robot, parallax value production method and program Download PDF

Info

Publication number
JP2016070774A
JP2016070774A JP2014199995A JP2014199995A JP2016070774A JP 2016070774 A JP2016070774 A JP 2016070774A JP 2014199995 A JP2014199995 A JP 2014199995A JP 2014199995 A JP2014199995 A JP 2014199995A JP 2016070774 A JP2016070774 A JP 2016070774A
Authority
JP
Japan
Prior art keywords
curve
value
candidate
image
parallax
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.)
Granted
Application number
JP2014199995A
Other languages
Japanese (ja)
Other versions
JP6519138B2 (en
Inventor
横田 聡一郎
Soichiro Yokota
聡一郎 横田
樹一郎 齊藤
Kiichiro Saito
樹一郎 齊藤
洋義 関口
Hiroyoshi Sekiguchi
洋義 関口
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 JP2014199995A priority Critical patent/JP6519138B2/en
Publication of JP2016070774A publication Critical patent/JP2016070774A/en
Application granted granted Critical
Publication of JP6519138B2 publication Critical patent/JP6519138B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To solve the problem in which as a method of obtaining a cost value, an SAD method enables an excellent cost value in a part where texture in an image is strong to be obtained, but does not enable the excellent cost value in a part where the texture in the image is weak, while a Census method enables a relatively excellent cost value to be obtained even in the part where the texture in the image is weak, but in the part where the texture in the image is strong, the Census method does not enable the excellent cost value to be obtained in comparison with the SAD method, and thus, a more correct cost value cannot be derived.SOLUTION: A first cost value C1 calculated by a cost calculation unit 310a, and a second cost value C2 calculated by a cost calculation unit 310b are selected using a reliability level (a prescribed reference) indicated by a comparison determination function CostSelval, which in turn exerts an effect that the more correct cost value can be derived.SELECTED DRAWING: Figure 12

Description

本発明は、物体を撮像して得られた複数の画像から、物体に対する視差を示す視差値を導出する発明に関する。   The present invention relates to an invention for deriving a parallax value indicating parallax with respect to an object from a plurality of images obtained by imaging the object.

従来から、ステレオ画像法によって、ステレオカメラから物体に対する視差を導き出し、この視差を示す視差値によって、三角測量の原理に基づき、ステレオカメラから物体までの距離を測定する測距方法が知られている。この測距方法により、例えば、自動車間の距離や、自動車と障害物間の距離が測定され、自動車の衝突防止に役立てられている。   2. Description of the Related Art Conventionally, a distance measuring method is known in which a parallax with respect to an object is derived from a stereo camera by a stereo image method, and a distance from the stereo camera to the object is measured based on a triangulation principle based on a parallax value indicating the parallax. . With this distance measuring method, for example, the distance between automobiles and the distance between automobiles and obstacles are measured, which is useful for preventing collision of automobiles.

また、視差値の求め方としては、ステレオマッチング処理が用いられている。このステレオマッチング処理は、ステレオカメラの2つのカメラのうち、一方のカメラによって得られた基準画像内の注目する基準画素に対して、他方のカメラによって得られた比較画像内の複数の対応画素の候補を順次シフトしながら、画像信号が最も類似する画素である対応画素の位置を求めることで、基準画像と比較画像の間の視差値を検出する。一般的には、2つのカメラによって得られた画像信号の輝度値を比較することで、シフト量毎に比較する輝度値のコスト値(Cost:ここでは「非類似度」)が最も低い画素の位置が求められる(特許文献1参照)。   Further, as a method for obtaining the parallax value, stereo matching processing is used. This stereo matching processing is performed by comparing a plurality of corresponding pixels in a comparison image obtained by the other camera with respect to a reference pixel of interest in a reference image obtained by one of the two cameras of the stereo camera. The parallax value between the reference image and the comparison image is detected by obtaining the position of the corresponding pixel that is the pixel with the most similar image signal while sequentially shifting the candidates. In general, by comparing the luminance values of image signals obtained by two cameras, the cost value (Cost: “dissimilarity” in this case) of the luminance value to be compared for each shift amount is the lowest. The position is determined (see Patent Document 1).

上述のようなコスト値を求める方式として、比較する画像から対応画素を含む所定領域を切り出し、この領域に対する輝度差の総和(SAD:Sum of Absolute Difference)からコスト値を求めるSAD方式や、上記領域の画素を2値化した結果からコスト値を求めるCensus方式等がある。   As a method for obtaining the cost value as described above, a SAD method for obtaining a cost value from a sum of luminance differences (SAD: Sum of Absolute Difference) with respect to this region by cutting out a predetermined region including the corresponding pixel from the image to be compared, or the region described above. There is a Census method for obtaining a cost value from the result of binarizing the pixels.

しかしながら、例えば、SAD方式では、画像におけるテクスチャが強い部分では良好なコスト値が得られるが、画像におけるテクスチャが弱い部分では良好なコスト値が得られない。これに対して、Census方式では、画像におけるテクスチャが弱い部分であっても比較的良好なコスト値が得られるが、画像におけるテクスチャが強い部分では、SAD方式に比べて良好なコスト値が得られない。これにより、より正確なコスト値を導き出すことができないという課題が生じる。   However, for example, in the SAD method, a good cost value can be obtained in a portion where the texture is strong in the image, but a good cost value cannot be obtained in a portion where the texture is weak in the image. In contrast, with the Census method, a relatively good cost value can be obtained even in a portion where the texture in the image is weak, but a good cost value is obtained in a portion where the texture in the image is strong compared to the SAD method. Absent. Thereby, the subject that a more exact cost value cannot be derived arises.

上述の課題を解決するため、請求項1に係る発明は、所定の物体を第1の位置で撮像して得た基準画像及び前記物体を第2の位置で撮像して得た比較画像に基づいて、前記物体に対する視差を示す視差値を導出する視差値導出装置であって、前記基準画像内の基準領域の輝度値と、前記比較画像内の対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に第1の非類似度を算出する第1の算出手段と、前記基準画像内の基準領域の輝度値と、前記比較画像内の対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に前記第1の非類似度とは異なる第2の非類似度を算出する第2の算出手段と、前記対応領域の候補毎の第1の非類似度の集まりである第1の曲線と、前記対応領域の候補毎の第2の非類似度の集まりである第2の曲線のうち、前記第1の曲線及び前記第2の曲線の各々が信頼できるかを示す信頼度に基づいて、特定の曲線を選択する選択手段と、一の基準領域に対する前記特定の曲線における各非類似度と、他の基準領域に対する前記特定の曲線における各非類似度とを合成する合成手段と、前記一の基準領域の前記基準画像における位置と、前記合成手段による合成後の非類似度が最小となる対応領域の前記比較画像における位置とに基づいて、前記視差値を導出する導出手段と、を有することを特徴とする視差値導出装置である。   In order to solve the above-described problem, the invention according to claim 1 is based on a reference image obtained by imaging a predetermined object at a first position and a comparative image obtained by imaging the object at a second position. A parallax value deriving device for deriving a parallax value indicating parallax with respect to the object, based on a luminance value of a reference region in the reference image and each luminance value of a candidate for a corresponding region in the comparison image First calculation means for calculating a first dissimilarity for each corresponding area candidate with respect to the reference area; a luminance value of the reference area in the reference image; and a corresponding area candidate in the comparison image. A second calculating unit that calculates a second dissimilarity different from the first dissimilarity for each candidate of the corresponding region with respect to the reference region based on each luminance value; and a candidate for the corresponding region A first curve that is a collection of first dissimilarities for each of the first curves and the corresponding region A specific curve is determined based on the reliability indicating whether each of the first curve and the second curve is reliable among the second curves that are the second set of dissimilarities for each candidate. Selecting means for selecting; combining means for combining each dissimilarity in the specific curve with respect to one reference area; and dissimilarity in the specific curve with respect to another reference area; and Derivation means for deriving the parallax value based on the position in the reference image and the position in the comparison image of the corresponding region where the dissimilarity after synthesis by the synthesis means is minimized This is a parallax value deriving device.

以上説明したように本発明によれば、対応領域の候補毎の第1の非類似度の集まりである第1の曲線と、前記対応領域の候補毎の第2の非類似度の集まりである第2の曲線のうち、前記第1の曲線及び前記第2の曲線の各々が信頼できるかを示す信頼度に基づいて、特定の曲線を選択する。これにより、より正確なコスト値を導き出すことができるという効果を奏する。   As described above, according to the present invention, the first curve, which is a first dissimilarity group for each corresponding area candidate, and the second dissimilarity group for each corresponding area candidate. Among the second curves, a specific curve is selected based on the reliability indicating whether each of the first curve and the second curve is reliable. Thereby, there exists an effect that a more exact cost value can be derived.

撮像装置から物体までの距離を導き出す原理の説明図である。It is explanatory drawing of the principle which derives | leads-out the distance from an imaging device to an object. (a)は基準画像、(b)は(a)に対する高密度視差画像、(c)は(a)に対するエッジ視差画像を示す概念図である。(A) is a reference image, (b) is a high-density parallax image for (a), and (c) is a conceptual diagram showing an edge parallax image for (a). (a)は基準画像における基準画素を示す概念図、(b)は(a)の基準画素に対して比較画像における対応画素の候補を順次シフトしながらシフト量を算出する際の概念図である。(A) is a conceptual diagram showing reference pixels in the reference image, and (b) is a conceptual diagram when calculating shift amounts while sequentially shifting corresponding pixel candidates in the comparative image with respect to the reference pixels in (a). . シフト量毎のコスト値を示すグラフである。It is a graph which shows the cost value for every shift amount. 合成コスト値を導き出すための概念図である。It is a conceptual diagram for deriving a synthesis cost value. 視差値毎の合成コスト値を示すグラフである。It is a graph which shows the synthetic | combination cost value for every parallax value. (a)は本発明の一実施形態に係る視差値導出装置を搭載した自動車の側面を表す概略図、(b)は自動車の正面を示す概略図である。(A) is a schematic diagram showing the side of a car carrying a parallax value derivation device concerning one embodiment of the present invention, and (b) is a schematic diagram showing the front of a car. 視差値導出装置の概観図である。It is a general-view figure of a parallax value derivation device. 視差値導出装置の全体のハードウェア構成図である。It is a hardware block diagram of the whole parallax value derivation | leading-out apparatus. Census方式の説明図である。It is explanatory drawing of a Census system. (a)は逆光時のSAD方式による高密度視差画像を示す概念図、(b)は逆光時のCensus方式による高密度視差画像を示す概念図である。(A) is a conceptual diagram which shows the high-density parallax image by the SAD system at the time of backlight, (b) is a conceptual diagram which shows the high-density parallax image by the Census system at the time of backlight. 視差値導出装置の主要部のハードウェア構成図である。It is a hardware block diagram of the principal part of a parallax value derivation device. SAD方式によるコスト曲線及びCensus方式によるコスト曲線を示したグラフである。It is the graph which showed the cost curve by a SAD system, and the cost curve by a Census system. コスト曲線を比較判定する際の説明図である。It is explanatory drawing at the time of comparing and determining a cost curve. (a)は通常時にSAD方式を利用した場合のコスト曲線及びCensus方式を利用した場合のコスト曲線を示したグラフ、(b)は逆光時にSAD方式を利用した場合のコスト曲線及びCensus方式を利用した場合のコスト曲線を示したグラフである。(A) is a graph showing a cost curve when using the SAD method at normal times and a cost curve when using the Census method, and (b) is using a cost curve and Census method when using the SAD method during backlighting. It is the graph which showed the cost curve at the time of doing. 実施形態の視差値生産方法の処理を示したフローチャートである。It is the flowchart which showed the process of the parallax value production method of embodiment.

以下、図面を用いて、本発明の一実施形態について説明する。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

〔SGM法を用いた測距方法の概略〕
まず、図1乃至図6を用いて、SGM(Semi-Global Matching)法を用いた測距方法の概略について説明する。なお、SGM法に関しては、非特許文献(Accurate and Efficient Stereo Processing by Semi-Global Matching and Mutual Information)に開示されているため、以下では概略を説明する。
[Outline of Ranging Method Using SGM Method]
First, an outline of a distance measuring method using an SGM (Semi-Global Matching) method will be described with reference to FIGS. Since the SGM method is disclosed in non-patent literature (Accurate and Efficient Stereo Processing by Semi-Global Matching and Mutual Information), an outline will be described below.

<測距の原理>
図1を用いて、ステレオ画像法により、ステレオカメラから物体に対する視差を導き出し、この視差を示す視差値によって、ステレオカメラから物体までの距離を測定する原理について説明する。なお、図1は、撮像装置から物体までの距離を導き出す原理の説明図である。また、以下では、説明を簡略化するため、複数の画素からなる所定領域ではなく、一画素単位で説明する。
<Principles of ranging>
With reference to FIG. 1, the principle of deriving a parallax with respect to an object from a stereo camera by the stereo image method and measuring the distance from the stereo camera to the object with a parallax value indicating the parallax will be described. FIG. 1 is an explanatory diagram of the principle of deriving the distance from the imaging device to the object. Further, in the following, in order to simplify the description, the description will be made on a pixel-by-pixel basis, not on a predetermined region composed of a plurality of pixels.

(視差値算出)
まず、図1で示される撮像装置10aおよび撮像装置10bによって撮像された各画像を、それぞれ基準画像Iaおよび比較画像Ibとする。なお、図1では、撮像装置10aおよび撮像装置10bが平行等位に設置されているものとする。図1において、3次元空間内の物体E上のS点は、撮像装置10aおよび撮像装置10bの同一水平線上の位置に写像される。すなわち、各画像中のS点は、基準画像Ia中の点Sa(x,y)および比較画像Ib中の点Sb(X,y)において撮像される。このとき、視差値Δは、撮像装置10a上の座標におけるSa(x,y)と撮像装置10b上の座標におけるSb(X,y)とを用いて、(式1)のように表される。
(Parallax value calculation)
First, the images captured by the imaging device 10a and the imaging device 10b shown in FIG. 1 are referred to as a reference image Ia and a comparative image Ib, respectively. In FIG. 1, it is assumed that the imaging device 10a and the imaging device 10b are installed in parallel equiposition. In FIG. 1, the point S on the object E in the three-dimensional space is mapped to a position on the same horizontal line of the imaging device 10a and the imaging device 10b. That is, the S point in each image is imaged at a point Sa (x, y) in the reference image Ia and a point Sb (X, y) in the comparative image Ib. At this time, the parallax value Δ is expressed as (Equation 1) using Sa (x, y) at the coordinates on the imaging device 10a and Sb (X, y) at the coordinates on the imaging device 10b. .

Δ=X−x (式1)
ここで、図1のような場合には、基準画像Ia中の点Sa(x,y)と撮像レンズ11aから撮像面上におろした垂線の交点との距離をΔaにし、比較画像Ib中の点Sb(X,y)と撮像レンズ11bから撮像面上におろした垂線の交点との距離をΔbにすると、視差値Δ=Δa+Δbとなる。
Δ = X−x (Formula 1)
Here, in the case as shown in FIG. 1, the distance between the point Sa (x, y) in the reference image Ia and the intersection of the perpendicular drawn from the imaging lens 11a on the imaging surface is set to Δa, and the comparison image Ib When the distance between the point Sb (X, y) and the intersection of the perpendicular line taken from the imaging lens 11b on the imaging surface is Δb, the parallax value Δ = Δa + Δb.

(距離算出)
また、視差値Δを用いることで、撮像装置10a,10bと物体Eとの間の距離Zを導き出すことができる。具体的には、距離Zは、撮像レンズ11aの焦点位置と撮像レンズ11bの焦点位置とを含む面から物体E上の特定点Sまでの距離である。図1に示されるように、撮像レンズ11a及び撮像レンズ11bの焦点距離f、撮像レンズ11aと撮像レンズ11bとの間の長さである基線長B、及び視差値Δを用いて、(式2)により、距離Zを算出することができる。
(Distance calculation)
Further, by using the parallax value Δ, the distance Z between the imaging devices 10a and 10b and the object E can be derived. Specifically, the distance Z is a distance from a plane including the focal position of the imaging lens 11a and the focal position of the imaging lens 11b to the specific point S on the object E. As shown in FIG. 1, using the focal length f of the imaging lens 11a and the imaging lens 11b, the baseline length B that is the length between the imaging lens 11a and the imaging lens 11b, and the parallax value Δ, (Equation 2 ) To calculate the distance Z.

Z=(B×f)/Δ (式2)
この(式2)により、視差値Δが大きいほど距離Zは小さく、視差値Δが小さいほど距離Zは大きくなる。
Z = (B × f) / Δ (Formula 2)
According to this (Equation 2), the larger the parallax value Δ, the smaller the distance Z, and the smaller the parallax value Δ, the larger the distance Z.

<SGM法>
続いて、図2乃至図6を用いて、SGM法を用いた測距方法について説明する。なお、図2(a)は基準画像、図2(b)は(a)に対する高密度視差画像、図2(c)は(a)に対するエッジ視差画像を示す概念図である。ここで、基準画像は、物体が輝度によって示された画像である。高密度視差画像は、SGM法によって、基準画像から導き出された画像であり、基準画像の各座標における視差値を示した画像である。エッジ視差画像は、ブロックマッチング法から導き出された画像であり、基準画像のエッジ部のような比較的テクスチャの強い部分のみの視差値を示した画像である。
<SGM method>
Next, a distance measuring method using the SGM method will be described with reference to FIGS. 2A is a reference image, FIG. 2B is a conceptual diagram showing a high-density parallax image for (a), and FIG. 2C is a conceptual diagram showing an edge parallax image for (a). Here, the reference image is an image in which an object is indicated by luminance. The high-density parallax image is an image derived from the reference image by the SGM method, and is an image showing the parallax value at each coordinate of the reference image. The edge parallax image is an image derived from the block matching method, and is an image showing the parallax value of only a portion having a relatively strong texture such as an edge portion of the reference image.

SGM法は、テクスチャが弱い物体に対しても適切に上記視差値を導き出す方法であり、図2(a)に示されている基準画像に基づいて、図2(b)に示されている高密度視差画像を導き出す方法である。なお、ブロックマッチング法を用いた場合には、図2(a)に示されている基準画像に基づいて、図2(c)に示されているエッジ視差画像が導き出される。図2(b)及び図2(c)における破線の楕円内を比べると分かるように、高密度視差画像は、エッジ視差画像に比べてテクスチャが弱い道路等の詳細な情報を表すことができるため、より詳細な測距を行うことができる。   The SGM method is a method for appropriately deriving the parallax value even for an object with a weak texture. Based on the reference image shown in FIG. This is a method for deriving a density parallax image. When the block matching method is used, the edge parallax image shown in FIG. 2C is derived based on the reference image shown in FIG. As can be seen by comparing the inside of the broken-line ellipse in FIGS. 2B and 2C, the high-density parallax image can represent detailed information such as a road having a weak texture compared to the edge parallax image. More detailed distance measurement can be performed.

このSGM法は、非類似度であるコスト値を算出して直ちに視差値を導出せず、コスト値を算出後、更に、合成非類似度である合成コスト値 (Synthesis Cost)を算出することで視差値を導出し、最終的にほぼ全ての画素における視差値を示す視差画像(ここでは、高密度視差画像)を導き出す方法である。   This SGM method does not calculate the cost value that is dissimilarity and immediately derives the parallax value, but after calculating the cost value, it further calculates the synthesis cost value that is the synthetic dissimilarity. This is a method of deriving a parallax value and finally deriving a parallax image (here, a high-density parallax image) indicating the parallax value in almost all pixels.

なお、ブロックマッチング法の場合は、コスト値を算出する点はSGM法と同じであるが、SGM法のように、合成コスト値を算出せずに、エッジ部のような比較的テクスチャの強い部分の視差値のみが導出される。   In the case of the block matching 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 derived.

(コスト値の算出)
まず、図3及び図4を用いて、コスト値C(p,d)の算出方法について説明する。図3(a)は基準画像における基準画素を示す概念図、図3(b)は(a)の基準画素に対して比較画像における対応画素の候補を順次シフトしながら(ずらしながら)シフト量(ずれ量)を算出する際の概念図である。図4は、シフト量毎のコスト値を示すグラフである。ここで、対応画素は、基準画像内の基準画素に最も類似する比較画像内の画素である。なお、以降、C(p,d)は、C(x,y,d)を表すものとして説明する。
(Calculation of cost value)
First, 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 shift amount (shifting) while sequentially shifting corresponding pixel candidates in the comparison image with respect to the reference pixels in FIG. It is a conceptual diagram at the time of calculating (shift amount). FIG. 4 is a graph showing the cost value for each shift amount. Here, the corresponding pixel is a pixel in the comparison image that is most similar to the reference pixel in the reference image. In the following description, C (p, d) represents C (x, y, d).

図3(a)に示されているように、基準画像内の所定の基準画素p(x,y)と、この基準画素p(x,y)に対する比較画像内におけるエピポーラ線(Epipolar Line)上の複数の対応画素の候補q(x+d,y)との各輝度値に基づいて、基準画素p(x,y)に対する各対応画素の候補q(x+d,y)のコスト値C(p,d)が算出される。dは、基準画素pと対応画素の候補qのシフト量(ずれ量)であり、本実施形態では、画素単位のシフト量が表されている。即ち、図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 and an epipolar line (Epipolar Line) in the comparison image for the reference pixel p (x, y). On the basis of each luminance value with a plurality of corresponding pixel candidates q (x + d, y), the cost value C (p, d) of each corresponding pixel candidate q (x + d, y) with respect to the reference pixel p (x, y). ) Is calculated. d is the shift amount (shift amount) between the reference pixel p and the corresponding pixel candidate q, and in this embodiment, the shift amount in pixel units is represented. That is, in FIG. 3, the corresponding pixel candidate q (x + d, y) is sequentially shifted by one pixel within a predetermined range (for example, 0 <d <25). And a cost value C (p, d), which is a dissimilarity between the luminance values of the reference pixel p (x, y).

このようにして算出されたコスト値C(p,d)は、図4に示されているように、シフト量d毎のコスト値Cの集まりであるコスト曲線CLのグラフによって表すことができる。図4では、コスト値Cは、シフト量d=5,12,19の場合が0(ゼロ)となるため、最小値を求めることができない。このように、テクスチャが弱い物体の場合には、コスト値Cの最小値を求めることは困難になる。   The cost value C (p, d) calculated in this way can be represented by a graph of a cost curve CL, which is a collection of cost values C for each shift amount d, as shown in FIG. In FIG. 4, the cost value C is 0 (zero) when the shift amount d = 5, 12, 19 and cannot be obtained. Thus, in the case of an object having a weak texture, it is difficult to obtain the minimum value of the cost value C.

(合成コスト値の算出)
次に、図5及び図6を用いて、合成コスト値Ls(p,d)の算出方法について説明する。図5は、合成コスト値を導き出すための概念図である。図6は、視差値毎の合成コスト値を示す合成コスト曲線のグラフである。本実施形態における合成コスト値の算出方法は、コスト値C(p,d)の算出だけでなく、所定の基準画素p(x,y)の周辺の画素を基準画素とした場合のコスト値を、基準画素p(x,y)におけるコスト値C(p,d)に集約させて、合成コスト値Ls(p,d)を算出する。
(Computation cost value calculation)
Next, a method for calculating the synthesis cost value Ls (p, d) will be described with reference to FIGS. 5 and 6. FIG. 5 is a conceptual diagram for deriving a synthesis cost value. FIG. 6 is a graph of a synthesis cost curve showing a synthesis cost value for each parallax value. The calculation method of the synthesis cost value in the present embodiment is not only the calculation of the cost value C (p, d), but also the cost value when pixels around the predetermined reference pixel p (x, y) are used as the reference pixels. The combined cost value Ls (p, d) is calculated by consolidating the cost value C (p, d) at the reference pixel p (x, y).

ここで、合成コスト値の算出方法について、より詳細に説明する。合成コスト値Ls(p,d)を算出するためには、まず、経路コスト値Lr(p,d)を算出する必要がある。(式3)は、経路コスト値Lr(p,d)を算出するための式であり、(式4)は、合成コスト値Lsを算出するための式である。   Here, the method of calculating the synthesis cost value will be described in more detail. In order to calculate the combined cost value Ls (p, d), it is first necessary to calculate the route cost value Lr (p, d). (Expression 3) is an expression for calculating the route cost value Lr (p, d), and (Expression 4) is an expression for calculating the combined cost value Ls.

Lr(p,d)=C(p,d)+min{(Lr(p−r,d),Lr(p−r,d−1)+P1,Lr(p−r,d+1)+P1,Lrmin(p−r)+p2} (式3)
ここで、rは、集約方向の方向ベクトルを示し、x方向およびy方向の2成分を有する。min{}は、最小値を求める関数である。Lrmin(p−r)は、pをr方向に1画素シフトした座標において、シフト量dを変化させた際のLr(p−r,d)の最小値を示す。なお、Lrは、(式3)に示されているように再帰的に適用される。また、P1及びP2は、予め実験により定められた固定パラメータであり、経路上で隣接する基準画素の視差値Δが連続になりやすいようなパラメータになっている。例えば、P1=48、P2=96である。
Lr (p, d) = C (p, d) + min {(Lr (pr, d), Lr (pr, d-1) + P1, Lr (pr, d + 1) + P1, Lrmin (p) -R) + p2} (Formula 3)
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. Lrmin (p−r) indicates the minimum value of Lr (p−r, d) when the shift amount d is changed in the coordinates obtained by shifting p by one pixel in the r direction. Note that Lr is applied recursively as shown in (Equation 3). P1 and P2 are fixed parameters determined in advance by experiments, and are parameters that make it easy for the parallax values Δ of adjacent reference pixels on the path to be continuous. For example, P1 = 48 and P2 = 96.

また、(式3)に示されているように、Lr(p,d)は、基準画素p(x,y)におけるコスト値Cに、図5に示されているr方向の各画素における各画素の経路コスト値Lrの最小値を加算することで求められる。このように、r方向の各画素におけるLrを求めるため、最初は、基準画像p(x,y)のr方向の一番端の画素からLrを求め、r方向に沿ってLrが求められる。   Further, as shown in (Equation 3), Lr (p, d) is the cost value C of the reference pixel p (x, y), and each of the pixels in the r direction shown in FIG. It is obtained by adding the minimum value of the path cost value Lr of the pixel. Thus, in order to obtain Lr for each pixel in the r direction, first, Lr is obtained from the pixel at the extreme end in the r direction of the reference image p (x, y), and Lr is obtained along the r direction.

そして、図5に示されているように、8方向のLr,Lr45,Lr90,Lr135,Lr180,Lr225,Lr270,Lr315求められ、最終的に(式4)に基づいて、合成コスト値Lsが求められる。 Then, as shown in FIG. 5, Lr 0 , Lr 45 , Lr 90 , Lr 135 , Lr 180 , Lr 225 , Lr 270 , and Lr 315 are obtained in the eight directions, and finally based on (Expression 4) Thus, the synthesis cost value Ls is obtained.

このようにして算出された合成コスト値Ls(p,d)は、図6に示されているように、シフト量d毎に合成コスト値Ls(p,d)が示される合成コスト曲線のグラフによって表すことができる。図6では、合成コスト値Lsは、シフト量d=3の場合が最小値となるため、視差値Δ=3として算出される。なお、上記説明ではrの数を8として説明しているが、これに限られることはない。例えば、8方向を更に2つに分割して16方向、3つに分割して24方向等にしてもよい。   The composite cost value Ls (p, d) calculated in this way is a graph of the composite cost curve in which the composite cost value Ls (p, d) is shown for each shift amount d as shown in FIG. Can be represented by In FIG. 6, the combined cost value Ls is calculated as a parallax value Δ = 3 because the minimum value is obtained when the shift amount d = 3. In the above description, the number of r is assumed to be 8. However, the present invention is not limited to this. For example, the eight directions may be further divided into two to be divided into sixteen directions and three into 24 directions.

〔本実施形態の具体的な説明〕
以下、図面を用いて、本実施形態の具体的な説明を行う。ここでは、自動車に搭載される視差値導出装置1について説明する。
[Specific Description of this Embodiment]
Hereinafter, this embodiment will be specifically described with reference to the drawings. Here, the parallax value deriving device 1 mounted on an automobile will be described.

<<実施形態の構成>>
まず、図7乃至図9用いて、本実施形態の全体構成について説明する。
<< Configuration of Embodiment >>
First, the overall configuration of the present embodiment will be described with reference to FIGS.

<外観構成>
図7及び図8を用いて、本実施形態の視差値導出装置1の外観構成を説明する。なお、図7(a)は本発明の一実施形態に係る視差値導出装置を搭載した自動車の側面を表す概略図、図7(b)は自動車の正面を示す概略図である。図8は、視差値導出装置の概観図である。
<Appearance configuration>
The appearance configuration of the parallax value deriving device 1 according to the present embodiment will be described with reference to FIGS. 7 and 8. FIG. 7A is a schematic diagram showing the side of an automobile equipped with the parallax value deriving device according to one embodiment of the present invention, and FIG. 7B is a schematic diagram showing the front of the automobile. FIG. 8 is an overview of the parallax value deriving device.

図7(a),(b)に示されているように、本実施形態の視差値導出装置1は、撮像装置10a及び撮像装置10bを備えており、撮像装置10a及び撮像装置10bは自動車の進行方向前方の光景を撮像することができるように設置される。   As shown in FIGS. 7A and 7B, the parallax value deriving device 1 of the present embodiment includes an imaging device 10a and an imaging device 10b, and the imaging device 10a and the imaging device 10b are those of an automobile. It is installed so that it can capture a scene in front of the traveling direction.

また、図8に示されているように、視差値導出装置1は、本体部2と、本体部2に対して設けられた一対の円筒状の撮像装置10a及び撮像装置10bとによって構成されている。   As shown in FIG. 8, the parallax value deriving device 1 includes a main body 2 and a pair of cylindrical imaging devices 10a and 10b provided to the main body 2. Yes.

<全体のハードウェア構成>
次に、図9を用いて、視差値導出装置1の全体のハードウェア構成について説明する。なお、図9は、視差値導出装置の全体のハードウェア構成図である。
<Overall hardware configuration>
Next, the overall hardware configuration of the parallax value deriving device 1 will be described with reference to FIG. FIG. 9 is an overall hardware configuration diagram of the parallax value deriving device.

図9に示されているように、視差値導出装置1は、撮像装置10a、撮像装置10b、信号変換装置20a、信号変換装置20b、及び画像処理装置30を備えている。   As shown in FIG. 9, the parallax value deriving device 1 includes an imaging device 10a, an imaging device 10b, a signal conversion device 20a, a signal conversion device 20b, and an image processing device 30.

このうち、撮像装置10aは、前方の光景を撮像して画像を表すアナログ信号を生成するものであり、撮像レンズ11a、絞り12a、画像センサ13aを備えている。撮像レンズ11aは、撮像レンズ11aを通過する光を屈折させて物体の像を結像させるための光学素子である。絞り12aは、撮像レンズ11aを通過した光の一部を遮ることによって、後述する画像センサ13aに入力される光の量を調整する。画像センサ13aは、撮像レンズ11a及び絞り12aから入力された光を電気的なアナログの画像信号に変換する半導体の素子であり、CCD(Charge Coupled Devices)やCMOS(Complementary Metal Oxide Semiconductor)によって実現される。なお、撮像装置10bは撮像装置10aと同じ構成を備えているため、撮像装置10bについての説明は省略する。また、撮像レンズ11aと撮像レンズ11bは、それぞれのレンズ面が互いに同一平面内になるように設置されている。   Among these, the imaging device 10a captures a front scene and generates an analog signal representing an image, and includes an imaging lens 11a, a diaphragm 12a, and an image sensor 13a. The imaging lens 11a is an optical element that forms an object image by refracting light passing through the imaging lens 11a. The diaphragm 12a adjusts the amount of light input to the image sensor 13a described later by blocking part of the light that has passed through the imaging lens 11a. The image sensor 13a is a semiconductor element that converts light input from the imaging lens 11a and the aperture 12a into an electrical analog image signal, and is realized by a CCD (Charge Coupled Devices) or a CMOS (Complementary Metal Oxide Semiconductor). The Since the imaging device 10b has the same configuration as the imaging device 10a, description of the imaging device 10b is omitted. Further, the imaging lens 11a and the imaging lens 11b are installed so that their lens surfaces are in the same plane.

また、信号変換装置20aは、撮像された画像を表すアナログ信号をデジタル形式の画像データに変換するものであり、CDS(Correlated Double Sampling)21a、AGC(Auto Gain Control)22a、ADC(Analog Digital Converter)23a、及びフレームメモリ24aを備えている。CDS21aは、画像センサ13aによって変換されたアナログの画像信号から相関二重サンプリングによってノイズを除去する。AGC22aは、CDS21aによってノイズが除去されたアナログの画像信号の強度を制御する利得制御を行う。ADC23aは、AGC22aによって利得制御されたアナログの画像信号をデジタル形式の画像データに変換する。フレームメモリ24aは、ADC23aによって変換された画像データを記憶する。   The signal converter 20a converts an analog signal representing a captured image into image data in a digital format, and includes a CDS (Correlated Double Sampling) 21a, an AGC (Auto Gain Control) 22a, and an ADC (Analog Digital Converter). ) 23a and a frame memory 24a. The CDS 21a removes noise from the analog image signal converted by the image sensor 13a by correlated double sampling. The AGC 22a performs gain control for controlling the intensity of the analog image signal from which noise has been removed by the CDS 21a. The ADC 23a converts an analog image signal 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によって変換されたアナログの画像信号から画像データを取得するものであり、CDS21b、AGC22b、ADC23b、及びフレームメモリ24bを有している。なお、CDS21b、AGC22b、ADC23b、及びフレームメモリ24bはそれぞれCDS21a、AGC22a、ADC23a、及びフレームメモリ24aと同じ構成であるため、それらについての説明は省略する。   Similarly, the signal conversion device 20b acquires image data from the analog image signal converted by the imaging device 10b, and includes a CDS 21b, an AGC 22b, an ADC 23b, and a frame memory 24b. Note that the CDS 21b, AGC 22b, ADC 23b, and frame memory 24b have the same configuration as the CDS 21a, AGC 22a, ADC 23a, and frame memory 24a, respectively, and thus description thereof is omitted.

更に、画像処理装置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及び上記各構成要素31〜35を図9に示されているように電気的に接続するためのアドレスバスやデータバス等のバスライン39を備えている。   Further, the image processing device 30 is a device for processing the image data converted by the signal conversion device 20a and the signal conversion device 20b. The image processing apparatus 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, an I / F (Interface) 35, and each of the above-mentioned As shown in FIG. 9, a bus line 39 such as an address bus or a data bus is provided for electrically connecting the components 31 to 35 as shown in FIG.

このうち、FPGA31は、集積回路であり、ここでは、画像データが表す画像における視差値Δを算出する処理を行う。CPU32は、視差値導出装置1の各機能を制御する。ROM33は、CPU32が視差値導出装置の各機能を制御するために実行する画像処理用プログラムを記憶している。RAM34はCPU32のワークエリアとして使用される。I/F35は、外部コントローラ等と通信するためのインターフェイスであり、例えば、自動車のCAN(Controller Area Network)等に接続されることができる。   Among these, the FPGA 31 is an integrated circuit, and here performs a process of calculating the parallax value Δ in the image represented by the image data. The CPU 32 controls each function of the parallax value deriving device 1. The ROM 33 stores an image processing program executed by the CPU 32 to control each function of the parallax value deriving device. The RAM 34 is used as a work area for the CPU 32. The I / F 35 is an interface for communicating with an external controller or the like, and can be connected to a CAN (Controller Area Network) of an automobile, for example.

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

<コスト算出方式の説明>
ここで、図10及び図11を用いて、コスト算出方式の一例として、SAD方式とCensus方式について簡単に説明する。図10は、Census方式の説明図である。図11(a)は逆光時のSAD方式による高密度視差画像を示す概念図、図11(b)は逆光時のCensus方式による高密度視差画像を示す概念図である。
<Explanation of cost calculation method>
Here, the SAD method and the Census method will be briefly described as an example of the cost calculation method with reference to FIGS. FIG. 10 is an explanatory diagram of the Census method. FIG. 11A is a conceptual diagram showing a high-density parallax image by the SAD method at the time of backlighting, and FIG. 11B is a conceptual diagram showing a high-density parallax image by the Census method at the time of backlighting.

また、(式5)は、SAD方式によるコスト値(第1のコスト値の一例)を算出するための式であり、(式6)は、Census方式によるコスト値(第2のコスト値の一例)を算出するための式である。SAD方式は一般に多く使われている方式であり、比較画像から対応画素を含む所定領域を切り出し、この所定領域に対する輝度差の総和(SAD)からコスト値が算出される。一方、Census方式は、上記所定領域の対応画素(中心画素)を除いた周辺画素を2値化等した結果から対応画素におけるコスト値が算出される。例えば、図10(a)に示されているように、2値モードの場合、所定領域の8つの周辺画素のうち、所定の閾値(ここでは、輝度値80)未満の画素は「1」、所定の閾値以上の画素は「0」とすることで、「1」と「0」のうち、多い方を対応画素(中心画素)のコスト値としている。なお、図10(b)に示されているように、3値モードの場合、所定領域の8つの周辺画素のうち、第1の閾値(ここでは、輝度値83)を超える画素は「10」、第2の閾値(ここでは、輝度値80)未満の画素は「01」、これら以外の画素は「00」とすることで、「10」、「01」及び「00」のうち、最も多い値を対応画素のコスト値としている。   Further, (Expression 5) is an expression for calculating a cost value (an example of the first cost value) by the SAD method, and (Expression 6) is an cost value (an example of the second cost value) by the Census method. ). The SAD method is generally used, and a predetermined area including a corresponding pixel is cut out from the comparison image, and a cost value is calculated from the sum of luminance differences (SAD) with respect to the predetermined area. On the other hand, in the Census method, the cost value of the corresponding pixel is calculated from the result of binarizing the peripheral pixels excluding the corresponding pixel (center pixel) in the predetermined area. For example, as shown in FIG. 10A, in the binary mode, among the eight neighboring pixels in the predetermined region, a pixel that is less than a predetermined threshold (in this case, the luminance value 80) is “1”. By setting “0” to pixels that are equal to or greater than the predetermined threshold, the larger one of “1” and “0” is set as the cost value of the corresponding pixel (center pixel). As shown in FIG. 10B, in the case of the ternary mode, among the eight peripheral pixels in the predetermined area, the pixel exceeding the first threshold (in this case, the luminance value 83) is “10”. By setting “01” for pixels less than the second threshold value (in this case, luminance value 80) and “00” for other pixels, the largest number among “10”, “01”, and “00” The value is the cost value of the corresponding pixel.

ここで、i,jは所定領域内の画素位置、Iは基準画像の画素の輝度値、Tは比較画像の対応画素の輝度値を示す。
Here, i and j are pixel positions in the predetermined area, I is the luminance value of the pixel of the reference image, and T is the luminance value of the corresponding pixel of the comparison image.

上記のように、SAD方式とCensus方式は、それぞれ得意とするシーンが異なる。例えば、シーンが逆光の場合、SAD方式を利用すると、図11(a)に示されているように、多くのノイズが発生するが、Census方式を利用すると、図11(b)に示されているように、ノイズの発生を抑制することができる。一方、シーンが通常の場合、SAD方式の方がCensus方式よりもノイズを抑えることができる。   As described above, the SAD method and the Census method differ in their particular scenes. For example, when the scene is backlit, if the SAD method is used, a lot of noise is generated as shown in FIG. 11A, but if the Census method is used, it is shown in FIG. 11B. As shown, the generation of noise can be suppressed. On the other hand, when the scene is normal, the SAD method can suppress noise more than the Census method.

<主要部のハードウェア構成>
次に、図12乃至図15を用いて、視差値導出装置1の主要部のハードウェア構成について説明する。なお、図12は、視差値導出装置の主要部のハードウェア構成図である。
<Hardware configuration of main parts>
Next, the hardware configuration of the main part of the parallax value deriving device 1 will be described with reference to FIGS. 12 to 15. FIG. 12 is a hardware configuration diagram of the main part of the parallax value deriving device.

図9におけるFPGA31は、図12に示されているように、コスト算出部310a、コスト算出部310b、正規化部320a、正規化部320b、選択部330、コスト合成部340、及び視差値導出部350を備えている。これらは、FPGA31の回路の一部であるが、上記プログラムが実行されることにより、同じ処理を行うことができるようにしてもよい。なお、コスト算出部310aは、第1の算出手段の一例であり、コスト算出部310bは、第2の算出手段の一例である。   As shown in FIG. 12, the FPGA 31 in FIG. 9 includes a cost calculation unit 310a, a cost calculation unit 310b, a normalization unit 320a, a normalization unit 320b, a selection unit 330, a cost synthesis unit 340, and a parallax value derivation unit. 350. These are part of the circuit of the FPGA 31, but the same processing may be performed by executing the program. The cost calculation unit 310a is an example of a first calculation unit, and the cost calculation unit 310b is an example of a second calculation unit.

これらのうち、コスト算出部310aは、図3に示されているように、基準画像(図3(a)参照)内の基準画素p(x,y)の輝度値と、比較画像(図3(b)参照)内において基準画素p(x,y)に基づくエピポーラ線EL上でシフトさせることでシフト量d毎に特定される対応画素の候補q(x+d,y)の各輝度値とに基づくと共にSAD方式を利用することで、基準画素p(x,y)に対する対応画素の候補q(x+d,y)の各コスト値C1を算出する。これに対して、コスト算出部310bは、図3に示されているように、基準画像(図3(a)参照)内の基準画素p(x,y)の輝度値と、比較画像(図3(b)参照)内において基準画素p(x,y)に基づくエピポーラ線EL上でシフトさせることでシフト量d毎に特定される対応画素の候補q(x+d,y)の各輝度値とに基づくと共にCensus方式を利用することで、基準画素p(x,y)に対する対応画素の候補q(x+d,y)の各コスト値C2を算出する。   Among these, as shown in FIG. 3, the cost calculation unit 310a uses the luminance value of the reference pixel p (x, y) in the reference image (see FIG. 3A) and the comparison image (FIG. 3). In (b)), by shifting on the epipolar line EL based on the reference pixel p (x, y), each luminance value of the corresponding pixel candidate q (x + d, y) specified for each shift amount d is obtained. Based on the SAD method, the cost value C1 of the candidate pixel q (x + d, y) corresponding to the reference pixel p (x, y) is calculated. On the other hand, as shown in FIG. 3, the cost calculation unit 310b uses the luminance value of the reference pixel p (x, y) in the reference image (see FIG. 3A) and the comparison image (see FIG. 3). 3 (b)), each luminance value of the corresponding pixel candidate q (x + d, y) specified for each shift amount d by shifting on the epipolar line EL based on the reference pixel p (x, y) The cost value C2 of the candidate pixel q (x + d, y) corresponding to the reference pixel p (x, y) is calculated by using the Census method.

また、正規化部320aは、下記(式7)に基づいて、コスト算出部310aによって算出されたコスト値C1を正規化する。一方、正規化部320bは、(式8)に基づいて、コスト算出部310bによって算出されたコスト値C2を正規化する。   Further, the normalization unit 320a normalizes the cost value C1 calculated by the cost calculation unit 310a based on the following (formula 7). On the other hand, the normalization unit 320b normalizes the cost value C2 calculated by the cost calculation unit 310b based on (Equation 8).

正規化SAD値=(SAD_max-SAD_min)/SAD_max (式7)
正規化Census値=(Census_max-Census_min)/Census_max (式8)
図13は、SAD方式によるコスト曲線及びCensus方式によるコスト曲線を示したグラフである。図13に示されているように、SAD方式によるコスト値及びCensus方式によるコスト値は単位(スケール)が異なるため、それぞれのコスト曲線を比較するためには、正規化する必要がある。なお、FPGA31は、正規化部320a及び正規化部320bのうち、いずれか一方を備えていても、それぞれのコスト曲線を比較することは可能である。
Normalized SAD value = (SAD_max-SAD_min) / SAD_max (Formula 7)
Normalized Census value = (Census_max-Census_min) / Census_max (Equation 8)
FIG. 13 is a graph showing a cost curve based on the SAD method and a cost curve based on the Census method. As shown in FIG. 13, the cost value based on the SAD method and the cost value based on the Census method are different in units (scales), and thus need to be normalized in order to compare the respective cost curves. Note that even if the FPGA 31 includes either one of the normalization unit 320a and the normalization unit 320b, it is possible to compare the respective cost curves.

選択部330は、基準画像の画素毎に、テクスチャの強弱に応じた所定の基準に基づいて、コスト曲線CL1,CL2が正規化された後のコスト曲線CL1,CL2のうち、いずれか一方を選択する。ここで、図14及び図15を用い、上記所定の基準について詳細に説明する。図14は、コスト曲線を比較判定する際の説明図である。図15(a)は通常時にSAD方式を利用した場合のコスト曲線及びCensus方式を利用した場合のコスト曲線を示したグラフ、図15(b)は逆光時にSAD方式を利用した場合のコスト曲線及びCensus方式を利用した場合のコスト曲線を示したグラフである。   The selection unit 330 selects either one of the cost curves CL1 and CL2 after the cost curves CL1 and CL2 are normalized based on a predetermined reference corresponding to the strength of the texture for each pixel of the reference image. To do. Here, the predetermined reference will be described in detail with reference to FIGS. 14 and 15. FIG. 14 is an explanatory diagram for comparing and determining cost curves. FIG. 15A is a graph showing a cost curve when using the SAD method during normal time and a cost curve when using the Census method, and FIG. 15B is a cost curve when using the SAD method during backlighting. It is the graph which showed the cost curve at the time of using a Census system.

選択部330は、(式9)に示されているような比較判定関数CostSelvalで示されている所定の信頼度(所定の基準)を利用し、CostSelvalの値が小さい方のコスト曲線を選択する。   The selection unit 330 uses a predetermined reliability (predetermined criterion) indicated by the comparison determination function CostSelval as shown in (Equation 9), and selects a cost curve having a smaller CostSelval value. .

ここで、min1は、図14に示されているように、任意のコスト曲線CL0について説明すると、最小の極値min1のコスト値を示す。sA、sBは、最小の極値(最小値)min1を基点としたコスト曲線CL0の1次近似曲線fd1,fd2の傾き値を示す。shpmim1aは、規定間(例えば、5つ分のスライド量間)において、最小の極値(最小値)min1を頂点としたコスト曲線CL0の2次近似曲線sdの広がり度を示す。dm1m2は、最小の極値のコスト値と2番目に小さい極値のコスト値との差分を示す。なお、1次近似曲線fd1,fd2の代わりに、2次近似曲線を用いてもよいし、2次近似曲線sdの代わりに、1次近似曲線を用いてもよい。即ち、(w2(sA+sB))、(w1shpmin1a)は、コスト値Cの最小値を頂点とした近似曲線の広がりを示しており、この近似曲線には、1次曲線及び2次曲線の両方が含まれる。 Here, min1 indicates a cost value of the minimum extreme value min1 when an arbitrary cost curve CL0 is described as shown in FIG. s A and s B indicate slope values of the first-order approximation curves fd1 and fd2 of the cost curve CL0 with the minimum extreme value (minimum value) min1 as a base point. shp mim1a indicates the degree of spread of the quadratic approximate curve sd of the cost curve CL0 having the minimum extreme value (minimum value) min1 as the apex during a specified period (for example, between five slide amounts). d m1m2 represents the difference between the cost value of the smallest extreme value and the cost value of the second smallest extreme value. A secondary approximate curve may be used instead of the primary approximate curves fd1 and fd2, and a primary approximate curve may be used instead of the secondary approximate curve sd. That is, (w 2 (s A + s B )) and (w 1 shp min1a ) indicate the extent of the approximate curve having the minimum value of the cost value C as a vertex. Both quadratic curves are included.

また、w〜wは、それぞれ調整重み値である。w〜wのうち、少なくとも1つを0にすることができる。 Further, w 1 to w 4 are adjustment weight values, respectively. At least one of w 1 to w 4 can be zero.

例えば、w=w=w=0の場合、wmin1だけが残り、CostSelvalは、両コスト曲線CL1,CL2のうち、最小の極値(最小値)が小さい方が選択される基準となる。 For example, when w 2 = w 3 = w 4 = 0, only w 1 min1 remains, and CostSelval is a criterion in which the smallest extreme value (minimum value) of both cost curves CL1 and CL2 is selected. It becomes.

〜wのうち、w=w=w=0の場合、w2/(|sA|+|sB|))だけが残り、CostSelvalは、両コスト曲線CL1,CL2のうち、コスト値Cの最小値を頂点とした近似曲線の広がりが狭い方が選択される基準となる。 Of w 1 to w 4, the case of w 1 = w 3 = w 4 = 0, w 2 / (| s A | + | s B |)) only remains, CostSelval is both cost curve CL1, CL2 Among them, the narrower one of the approximate curves with the minimum value of the cost value C as a vertex is a criterion for selection.

〜wのうち、w=w=w=0の場合、w3/(shpmin1a)だけが残り、CostSelvalは、両コスト曲線CL1,CL2のうち、コスト値Cの最小値を頂点とした近似曲線の広がりが狭い方が選択される基準となる。 Of w 1 to w 4, the case of w 1 = w 2 = w 4 = 0, w 3 / (shp min1a) only remains, CostSelval, of both cost curve CL1, CL2, the minimum value of the cost value C The narrower the curve of the approximate curve with vertices at is the criterion for selection.

〜wのうち、w=w=w=0の場合、w4/(dm1m2))だけ残り、CostSelvalは、両コスト曲線CL1,CL2のうち、最小の極値(最小値)と2番目に小さい極値との差分が大きい方が選択される基準となる。 Of w 1 to w 4, the case of w 1 = w 2 = w 3 = 0, the remainder only w 4 / (d m1m2)) , CostSelval , of both cost curve CL1, CL2, minimum extreme value (minimum Value) and the second smallest extrema are the criteria for selection.

続いて、コスト合成部340は、選択部330によって選択された特定のコスト曲線におけるコスト値Cを利用して、一の基準画素p(x,y)に対する対応画素の候補q(x+d,y)の各コスト値Cと、他の基準画素p’(x’,y’)に対する対応画素の候補q’(x’+d,y’)の各コスト値Cとをシフト量d毎に合成し、合成コスト値Lsを出力する。なお、この合成の処理は、(式3)に基づいてコスト値Cから経路コスト値Lrを算出した後、更に、(式4)に基づいて各方向における経路コスト値Lrを加算して、最終的に合成コスト値Lsを算出する処理である。   Subsequently, the cost composition unit 340 uses the cost value C in the specific cost curve selected by the selection unit 330, and the corresponding pixel candidate q (x + d, y) for one reference pixel p (x, y). And the cost value C of the corresponding pixel candidate q ′ (x ′ + d, y ′) for the other reference pixel p ′ (x ′, y ′) for each shift amount d, The synthesis cost value Ls is output. In this synthesis process, after calculating the route cost value Lr from the cost value C based on (Equation 3), the route cost value Lr in each direction is further added based on (Equation 4). This is a process for calculating the combined cost value Ls.

更に、視差値導出部350は、一の基準画素p(x,y)の基準画像おける位置(x,y)と、コスト合成部340による合成後の合成コスト値Lsが最小となる対応画素q(x+Δ,y)の比較画像における位置(x+Δ,y)とに基づいて視差値Δを導出し、各画素における視差値を示す視差画像を出力する。   Furthermore, the parallax value deriving unit 350 corresponds to the position (x, y) in the reference image of one reference pixel p (x, y) and the corresponding pixel q that minimizes the combined cost value Ls after combining by the cost combining unit 340. The parallax value Δ is derived based on the position (x + Δ, y) in the comparison image of (x + Δ, y), and a parallax image indicating the parallax value at each pixel is output.

<実施形態の処理または動作>
次に、図16を用いて、本実施形態の処理または動作を説明する。図16は、実施形態の視差値生産方法の処理を示したフローチャートである。
<Process or Operation of Embodiment>
Next, the processing or operation of this embodiment will be described with reference to FIG. FIG. 16 is a flowchart illustrating processing of the parallax value production method according to the embodiment.

まず、図9に示されている撮像装置10aは、物体Eを撮像してアナログの画像データを生成する(ステップS1−1)。同じく、撮像装置10aは、物体を撮像してアナログの画像データを生成する(ステップS1−2)。   First, the imaging device 10a illustrated in FIG. 9 captures the object E and generates analog image data (step S1-1). Similarly, the imaging device 10a captures an object and generates analog image data (step S1-2).

次に、信号変換装置20aは、アナログの画像データを、デジタルの画像データに変換する(ステップS2−1)。同じく、信号変換装置20bは、アナログの画像データを、デジタルの画像データに変換する(ステップS2−2)。   Next, the signal converter 20a converts the analog image data into digital image data (step S2-1). Similarly, the signal conversion device 20b converts analog image data into digital image data (step S2-2).

次に、信号変換装置20aは、画像処理装置30のFPGA31に、変換後のデジタルの画像データを基準画像のデータとして出力する(ステップS3−1)。この基準画像の概念図は、図2(a)に示されている。同じく、信号変換装置20bは、画像処理装置30のFPGA31に、変換後のデジタルの画像データを比較画像のデータとして出力する(ステップS3−2)。この比較画像は、撮像装置10bによって撮像された画像であるが、図2(a)に示されている基準画像と極端な違いはないため、比較画像の概念図は図示しないで省略する。   Next, the signal conversion device 20a outputs the converted digital image data as reference image data to the FPGA 31 of the image processing device 30 (step S3-1). A conceptual diagram of this reference image is shown in FIG. Similarly, the signal conversion device 20b outputs the converted digital image data as comparison image data to the FPGA 31 of the image processing device 30 (step S3-2). Although this comparative image is an image captured by the imaging device 10b, since there is no extreme difference from the reference image shown in FIG. 2A, a conceptual diagram of the comparative image is omitted without being shown.

次に、図12に示されているコスト算出部310aは、SAD方式を利用して、基準画像のデータ及び比較画像のデータに基づき、図13のグラフで示されているように、シフト量d毎のコスト値C1を算出する(ステップS4−1)。同じく、コスト算出部310bは、Census方式を利用して、基準画像のデータ及び比較画像のデータに基づき、図13のグラフで示されているように、シフト量d毎のコスト値C2を算出する(ステップS4−2)。   Next, the cost calculation unit 310a shown in FIG. 12 uses the SAD method, based on the data of the reference image and the data of the comparison image, as shown in the graph of FIG. A cost value C1 for each is calculated (step S4-1). Similarly, the cost calculation unit 310b uses the Census method to calculate the cost value C2 for each shift amount d as shown in the graph of FIG. 13 based on the reference image data and the comparison image data. (Step S4-2).

次に、正規化部320aは、コスト算出部310aによって算出されたコスト値C1を正規化する(ステップS5−1)。同じく、正規化部320bは、コスト算出部310bによって算出されたコストC2を正規化する(ステップS5−2)。   Next, the normalization unit 320a normalizes the cost value C1 calculated by the cost calculation unit 310a (step S5-1). Similarly, the normalization unit 320b normalizes the cost C2 calculated by the cost calculation unit 310b (step S5-2).

次に、選択部330は、正規化部320aによって出力されたコスト値C1の集まりであるコスト曲線CL1(第1の曲線の一例)と、正規化部320bによって出力されたコスト値C2の集まりであるコスト曲線CL2(第2の曲線の一例)のうち、(式9)に示されている比較判定関数を用いて、特定のコスト曲線CL(特定の曲線の一例)を選択する(ステップS6)。   Next, the selection unit 330 includes a cost curve CL1 (an example of a first curve) that is a collection of cost values C1 output by the normalization unit 320a and a collection of cost values C2 output by the normalization unit 320b. Among a certain cost curve CL2 (an example of a second curve), a specific cost curve CL (an example of a specific curve) is selected using the comparison determination function shown in (Equation 9) (step S6). .

次に、コスト合成部340は、選択部330によって選択された特定のコスト曲線CLにおける各コスト値Cに基づいて、例えば、図6のグラフで示されているように、シフト量d毎に合成コスト値Lsを出力する(ステップS7)。図6の場合、合成コスト値Lsが最小となるシフト量はd=3であるため、視差値導出部350は、視差値Δ=3を導出する(ステップS8)。   Next, the cost synthesizing unit 340 synthesizes each shift amount d based on each cost value C in the specific cost curve CL selected by the selecting unit 330, for example, as shown in the graph of FIG. The cost value Ls is output (step S7). In the case of FIG. 6, since the shift amount that minimizes the combined cost value Ls is d = 3, the parallax value deriving unit 350 derives the parallax value Δ = 3 (step S8).

その後、図9に示されているI/F35から、高密度視差画像が送信され、図示しない視差値導出装置1の外部の装置におけるCPUによって、撮像装置10a,10bと物体Eとの間の距離Zが算出される。   Thereafter, a high-density parallax image is transmitted from the I / F 35 illustrated in FIG. 9, and the distance between the imaging devices 10 a and 10 b and the object E by the CPU in the device outside the parallax value deriving device 1 (not illustrated). Z is calculated.

<実施形態の主な効果>
以上説明したように本実施形態によれば、コスト算出部310aによって算出された第1のコスト値C1と、コスト算出部310bによって算出された第2のコスト値C2とを、比較判定関数CostSelvalで示されている信頼度を利用して選択するため、より正確なコスト値を導き出すことができるという効果を奏する。
<Main effects of the embodiment>
As described above, according to the present embodiment, the first cost value C1 calculated by the cost calculation unit 310a and the second cost value C2 calculated by the cost calculation unit 310b are represented by the comparison determination function CostSelval. Since the selected reliability is used for the selection, a more accurate cost value can be derived.

<<実施形態の補足>>
上記実施形態では、コスト算出部は、SAD方式又はCensus方式を利用してコスト値を算出したが、この方式に限るものではない。例えば、SSD(Sum of Squared Difference)方式、又は、NCC(Normalized Cross-Correlation)方式等の他の方式を用いてもよい。この場合、任意の2方式のうち、選択部330には得意なシーンを考慮してコスト曲線を選択するように設定される。
<< Supplement of Embodiment >>
In the above embodiment, the cost calculation unit calculates the cost value using the SAD method or the Census method, but the present invention is not limited to this method. For example, another method such as an SSD (Sum of Squared Difference) method or an NCC (Normalized Cross-Correlation) method may be used. In this case, among the two arbitrary methods, the selection unit 330 is set so as to select a cost curve in consideration of a good scene.

また、上記実施形態では、コスト値Cは非類似度として示されているが、類似度として示されてもよい。この場合、選択部330は、(式9)に示されているような比較判定関数CostSelvalで示されている所定の信頼度を利用し、CostSelvalのmim1に代えて、max1(最大の極値(最大値))が用いられる。また、この場合、合成コスト値Lsが最大となる視差値Δが導出される。また、非類似度と類似度の両者を含めて、一致度としてもよい。   Moreover, in the said embodiment, although the cost value C is shown as dissimilarity, you may show as similarity. In this case, the selection unit 330 uses a predetermined reliability indicated by the comparison determination function CostSelval as shown in (Equation 9), and replaces mim1 of CostSelval with max1 (maximum extreme value ( Maximum value)) is used. In this case, the parallax value Δ that maximizes the combined cost value Ls is derived. Moreover, it is good also as a coincidence degree including both dissimilarity and similarity.

また、上記実施形態では、説明の簡略化のために、一画素単位で説明したが、これに限るものではなく、複数の画素からなる所定領域単位で処理されてもよい。この場合、基準画素を含む所定領域は基準領域として示され、対応画素を含む所定領域は対応領域として表される。なお、この基準領域には基準画素のみの場合も含まれ、対応領域には対応画素のみの場合も含まれる。   In the above embodiment, for simplification of description, the description has been given in units of one pixel. However, the present invention is not limited to this, and processing may be performed in units of a predetermined area including a plurality of pixels. In this case, the predetermined area including the reference pixel is indicated as the reference area, and the predetermined area including the corresponding pixel is expressed as the corresponding area. The reference area includes the case of only the reference pixel, and the corresponding area includes the case of only the corresponding pixel.

更に、上記実施形態では、自動車に搭載される視差値導出装置1について説明したが、これに限るものではない。例えば、車両の一例としての自動車だけでなく、バイク、自転車、車椅子、農業用の耕運機等の車両に搭載されることができてもよい。また、移動体の一例としての車両だけでなく、ロボット等の移動体であってもよい。   Furthermore, although the said embodiment demonstrated the parallax value derivation | leading-out apparatus 1 mounted in a motor vehicle, it does not restrict to this. For example, it may be mounted not only on an automobile as an example of a vehicle but also on a vehicle such as a motorcycle, a bicycle, a wheelchair, and an agricultural cultivator. 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 fixedly installed in 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 security monitoring camera.

また、上記実施形態では、外部のCPUが距離Zを算出しているが、これに限るものではなく、画像処理装置30のCPU32が距離Zを算出してもよい。   In the above embodiment, the external CPU calculates the distance Z. However, the present invention is not limited to this, and the CPU 32 of the image processing apparatus 30 may calculate the distance Z.

1 視差値導出装置
2 本体部
10a 撮像装置
10b 撮像装置
20a 信号変換装置
20b 信号変換装置
30 画像処理装置
310a コスト算出部(第1の算出手段の一例)
310b コスト算出部(第2の算出手段の一例)
320a 正規化部(第1の正規化手段の一例)
320b 正規化部(第2の正規化手段の一例)
330 選択部(選択手段の一例)
340 コスト合成部(合成手段の一例)
350 視差値導出部(導出手段の一例)
DESCRIPTION OF SYMBOLS 1 Parallax value derivation | leading-out apparatus 2 Main part 10a Imaging device 10b Imaging device 20a Signal conversion device 20b Signal conversion device 30 Image processing device 310a Cost calculation part (an example of 1st calculation means)
310b Cost calculation unit (an example of second calculation means)
320a normalization unit (an example of first normalization means)
320b normalization unit (an example of second normalization means)
330 selection unit (example of selection means)
340 Cost composition part (an example of composition means)
350 Parallax value deriving unit (an example of deriving means)

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

Claims (18)

所定の物体を第1の位置で撮像して得た基準画像及び前記物体を第2の位置で撮像して得た比較画像に基づいて、前記物体に対する視差を示す視差値を導出する視差値導出装置であって、
前記基準画像内の基準領域の輝度値と、前記比較画像内の対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に第1の非類似度を算出する第1の算出手段と、
前記基準画像内の基準領域の輝度値と、前記比較画像内の対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に前記第1の非類似度とは異なる第2の非類似度を算出する第2の算出手段と、
前記対応領域の候補毎の第1の非類似度の集まりである第1の曲線と、前記対応領域の候補毎の第2の非類似度の集まりである第2の曲線のうち、前記第1の曲線及び前記第2の曲線の各々が信頼できるかを示す信頼度に基づいて、特定の曲線を選択する選択手段と、
一の基準領域に対する前記特定の曲線における各非類似度と、他の基準領域に対する前記特定の曲線における各非類似度とを合成する合成手段と、
前記一の基準領域の前記基準画像における位置と、前記合成手段による合成後の非類似度が最小となる対応領域の前記比較画像における位置とに基づいて、前記視差値を導出する導出手段と、
を有することを特徴とする視差値導出装置。
Parallax value derivation for deriving a parallax value indicating parallax for the object based on a reference image obtained by imaging a predetermined object at a first position and a comparison image obtained by imaging the object at a second position A device,
A first dissimilarity is calculated for each candidate of the corresponding region with respect to the reference region based on the luminance value of the reference region in the reference image and each luminance value of the candidate of the corresponding region in the comparison image. First calculating means;
Based on the luminance value of the reference area in the reference image and the respective luminance values of the corresponding area candidates in the comparison image, the first dissimilarity for each corresponding area candidate with respect to the reference area Second calculating means for calculating different second dissimilarities;
Of the first curve that is a set of first dissimilarities for each candidate for the corresponding region and the second curve that is a set of second dissimilarities for each candidate for the corresponding region, the first curve Selecting means for selecting a particular curve based on a confidence level indicating whether each of the second curve and the second curve is reliable;
Combining means for combining each dissimilarity in the specific curve with respect to one reference region and each dissimilarity in the specific curve with respect to another reference region;
Derivation means for deriving the parallax value based on the position of the one reference area in the reference image and the position of the corresponding area in the comparison image where the dissimilarity after synthesis by the synthesis means is minimized;
A parallax value deriving device characterized by comprising:
前記選択手段は、前記第1の曲線及び前記第2の曲線のうち、各非類似度の最小値が小さい方を選択することを特徴とする請求項1に記載の視差値導出装置。   The parallax value deriving device according to claim 1, wherein the selection unit selects one of the first curve and the second curve having a smaller minimum value of each dissimilarity. 前記選択手段は、前記第1の曲線及び前記第2の曲線のうち、各非類似度の最小値を頂点とした近似曲線の広がりが狭い方を選択することを特徴とする請求項1に記載の視差値導出装置。   2. The selection unit according to claim 1, wherein the selection unit selects one of the first curve and the second curve that has a narrower spread of an approximate curve having a minimum value of each dissimilarity as a vertex. Parallax value deriving device. 前記第1の算出手段は、前記基準画像内の基準領域の輝度値と、前記比較画像において所定方向にシフトさせることでシフト量毎に特定される対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に第1の非類似度を算出し、
前記第2の算出手段は、前記基準画像内の基準領域の輝度値と、前記比較画像において所定方向にシフトさせることでシフト量毎に特定される対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に第2の非類似度を算出し、
前記選択手段は、前記第1の曲線及び前記第2の曲線のうち、前記所定のスライド量間において、各非類似度の最小値を頂点とした近似曲線の広がりが狭い方を選択することを特徴とする請求項3に記載の視差値導出装置。
The first calculation means is based on the luminance value of the reference region in the reference image and each luminance value of the corresponding region candidate specified for each shift amount by shifting in a predetermined direction in the comparison image. , Calculating a first dissimilarity for each candidate of the corresponding region with respect to the reference region,
The second calculation means is based on the brightness value of the reference area in the reference image and each brightness value of the corresponding area candidate specified for each shift amount by shifting in a predetermined direction in the comparison image. Calculating a second dissimilarity for each candidate of the corresponding region with respect to the reference region;
The selection means selects one of the first curve and the second curve that has a narrower spread of an approximate curve having the minimum value of each dissimilarity as a vertex between the predetermined slide amounts. The parallax value deriving device according to claim 3, wherein
前記選択手段は、前記第1の曲線及び前記第2の曲線のうち、各非類似度の最小の極値と2番目に小さい極値との差分が大きい方を選択することを特徴とする請求項1に記載の視差値導出装置。   The selection means selects, from the first curve and the second curve, the one having the largest difference between the smallest extreme value of each dissimilarity and the second smallest extreme value. Item 2. The parallax value deriving device according to Item 1. 所定の物体を第1の位置で撮像して得た基準画像及び前記物体を第2の位置で撮像して得た比較画像に基づいて、前記物体に対する視差を示す視差値を導出する視差値導出装置であって、
前記基準画像内の基準領域の輝度値と、前記比較画像内の対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に第1の類似度を算出する第1の算出手段と、
前記基準画像内の基準領域の輝度値と、前記比較画像内の対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に前記第1の類似度とは異なる第2の類似度を算出する第2の算出手段と、
前記対応領域の候補毎の第1の類似度の集まりである第1の曲線と、前記前記対応領域の候補毎の第2の類似度の集まりである第2の曲線のうち、前記第1の曲線及び前記第2の曲線の各々が信頼できるかを示す信頼度に基づいて、特定の曲線を選択する選択手段と、
一の基準領域に対する前記特定の曲線における各類似度と、他の基準領域に対する前記特定の曲線における各類似度とを合成する合成手段と、
前記一の基準領域の前記基準画像における位置と、前記合成手段による合成後の類似度が最大となる対応領域の前記比較画像における位置とに基づいて、前記視差値を導出する導出手段と、
を有することを特徴とする視差値導出装置。
Parallax value derivation for deriving a parallax value indicating parallax for the object based on a reference image obtained by imaging a predetermined object at a first position and a comparison image obtained by imaging the object at a second position A device,
Based on the luminance value of the reference area in the reference image and each luminance value of the corresponding area candidate in the comparison image, a first similarity is calculated for each corresponding area candidate with respect to the reference area. 1 calculating means;
Based on the brightness value of the reference area in the reference image and the brightness values of the corresponding area candidates in the comparison image, the first similarity is different for each corresponding area candidate with respect to the reference area. Second calculating means for calculating a second similarity,
Of the first curve that is a first similarity group for each corresponding area candidate and the second curve that is a second similarity group for each corresponding area candidate, the first curve Selection means for selecting a particular curve based on a confidence level indicating whether each of the curve and the second curve is reliable;
Combining means for combining each similarity in the specific curve with respect to one reference region and each similarity in the specific curve with respect to another reference region;
Derivation means for deriving the parallax value based on the position of the one reference area in the reference image and the position of the corresponding area in the comparison image in which the similarity after synthesis by the synthesis means is maximized;
A parallax value deriving device characterized by comprising:
前記選択手段は、前記第1の曲線及び前記第2の曲線のうち、各類似度の最大値が大きい方を選択することを特徴とする請求項6に記載の視差値導出装置。   The parallax value deriving device according to claim 6, wherein the selection unit selects a larger one of the maximum values of the similarities among the first curve and the second curve. 前記選択手段は、前記第1の曲線及び前記第2の曲線のうち、各類似度の最大値を頂点とした近似曲線の広がりが狭い方を選択することを特徴とする請求項6に記載の視差値導出装置。   7. The selection unit according to claim 6, wherein the selection unit selects one of the first curve and the second curve that has a narrower spread of an approximate curve having a maximum value of each similarity as a vertex. Disparity value deriving device. 前記第1の算出手段は、前記基準画像内の基準領域の輝度値と、前記比較画像において所定方向にシフトさせることでシフト量毎に特定される対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に第1の類似度を算出し、
前記第2の算出手段は、前記基準画像内の基準領域の輝度値と、前記比較画像において所定方向にシフトさせることでシフト量毎に特定される対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に第2の類似度を算出し、
前記選択手段は、前記第1の曲線及び前記第2の曲線のうち、前記所定のスライド量間において、各類似度の最大値を頂点とした近似曲線の広がりが狭い方を選択することを特徴とする請求項8に記載の視差値導出装置。
The first calculation means is based on the luminance value of the reference region in the reference image and each luminance value of the corresponding region candidate specified for each shift amount by shifting in a predetermined direction in the comparison image. , Calculating a first similarity for each candidate of the corresponding region with respect to the reference region,
The second calculation means is based on the brightness value of the reference area in the reference image and each brightness value of the corresponding area candidate specified for each shift amount by shifting in a predetermined direction in the comparison image. , Calculating a second similarity for each candidate for the corresponding region with respect to the reference region,
The selection means selects one of the first curve and the second curve that has a narrower spread of an approximate curve having the maximum value of each similarity as a vertex between the predetermined slide amounts. The parallax value deriving device according to claim 8.
前記選択手段は、前記第1の曲線及び前記第2の曲線のうち、各類似度の最大の極値と2番目に大きい極値との差分が大きい方を選択することを特徴とする請求項6に記載の視差値導出装置。   The selection means selects one of the first curve and the second curve having a larger difference between the maximum extreme value and the second largest extreme value of each similarity. 7. The parallax value deriving device according to 6. 請求項1乃至10のいずれか一項に記載の視差値導出装置を備えたことを特徴とする移動体。   A moving body comprising the parallax value deriving device according to claim 1. 前記移動体は、車両又はロボットであることを特徴とする請求項11に記載の移動体。   The moving body according to claim 11, wherein the moving body is a vehicle or a robot. 請求項1乃至10のいずれか一項に記載の視差値導出装置を備えたことを特徴とするロボット。   A robot comprising the parallax value deriving device according to any one of claims 1 to 10. 前記ロボットは、固定設置される工業用ロボットであることを特徴とする請求項13に記載のロボット。   The robot according to claim 13, wherein the robot is an industrial robot fixedly installed. 所定の物体を第1の位置で撮像して得た基準画像及び前記物体を第2の位置で撮像して得た比較画像に基づいて、前記物体に対する視差を示す視差値を導出する視差値生産方法であって、
前記基準画像内の基準領域の輝度値と、前記比較画像内の対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に第1の非類似度を算出する第1の算出ステップと、
前記基準画像内の基準領域の輝度値と、前記比較画像内の対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に前記第1の非類似度とは異なる第2の非類似度を算出する第2の算出ステップと、
前記対応領域の候補毎の第1の非類似度の集まりである第1の曲線と、前記前記対応領域の候補毎の第2の非類似度の集まりである第2の曲線のうち、前記第1の曲線及び前記第2の曲線の各々が信頼できるかを示す信頼度に基づいて、特定の曲線を選択する選択ステップと、
一の基準領域に対する前記特定の曲線における各非類似度と、他の基準領域に対する前記特定の曲線における各非類似度とを合成する合成ステップと、
前記一の基準領域の前記基準画像における位置と、前記合成手段による合成後の非類似度が最小となる対応領域の前記比較画像における位置とに基づいて、前記視差値を導出する導出ステップと、
を含むことを特徴とする視差値導出方法。
Parallax value production for deriving a parallax value indicating parallax for the object based on a reference image obtained by imaging a predetermined object at a first position and a comparison image obtained by imaging the object at a second position A method,
A first dissimilarity is calculated for each candidate of the corresponding region with respect to the reference region based on the luminance value of the reference region in the reference image and each luminance value of the candidate of the corresponding region in the comparison image. A first calculation step;
Based on the luminance value of the reference area in the reference image and the respective luminance values of the corresponding area candidates in the comparison image, the first dissimilarity for each corresponding area candidate with respect to the reference area A second calculation step of calculating a different second dissimilarity;
Of the first curve that is a set of first dissimilarities for each candidate for the corresponding region and the second curve that is a set of second dissimilarities for each candidate for the corresponding region, the first curve A selection step of selecting a particular curve based on a confidence level indicating whether each of the first curve and the second curve is reliable;
Combining each dissimilarity in the specific curve with respect to one reference region and each dissimilarity in the specific curve with respect to another reference region;
A derivation step of deriving the parallax value based on the position of the one reference area in the reference image and the position of the corresponding area in the comparison image where the dissimilarity after synthesis by the synthesis means is minimized;
Including a parallax value.
所定の物体を第1の位置で撮像して得た基準画像及び前記物体を第2の位置で撮像して得た比較画像に基づいて、前記物体に対する視差を示す視差値を導出する視差値生産方法であって、
前記基準画像内の基準領域の輝度値と、前記比較画像内の対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に第1の類似度を算出する第1の算出ステップと、
前記基準画像内の基準領域の輝度値と、前記比較画像内の対応領域の候補の各輝度値とに基づいて、前記基準領域に対する前記対応領域の候補毎に前記第1の類似度とは異なる第2の類似度を算出する第2の算出ステップと、
前記対応領域の候補毎の第1の類似度の集まりである第1の曲線と、前記対応領域の候補毎の第2の類似度の集まりである第2の曲線のうち、前記第1の曲線及び前記第2の曲線の各々が信頼できるかを示す信頼度に基づいて、特定の曲線を選択する選択ステップと、
一の基準領域に対する前記特定の曲線における各類似度と、他の基準領域に対する前記特定の曲線における各類似度とを合成する合成ステップと、
前記一の基準領域の前記基準画像における位置と、前記合成手段による合成後の類似度が最大となる対応領域の前記比較画像における位置とに基づいて、前記視差値を導出する導出ステップと、
を含むことを特徴とする視差値生産方法。
Parallax value production for deriving a parallax value indicating parallax for the object based on a reference image obtained by imaging a predetermined object at a first position and a comparison image obtained by imaging the object at a second position A method,
Based on the luminance value of the reference area in the reference image and each luminance value of the corresponding area candidate in the comparison image, a first similarity is calculated for each corresponding area candidate with respect to the reference area. 1 calculation step;
Based on the brightness value of the reference area in the reference image and the brightness values of the corresponding area candidates in the comparison image, the first similarity is different for each corresponding area candidate with respect to the reference area. A second calculating step for calculating a second similarity;
Of the first curve, which is a collection of first similarities for each candidate of the corresponding region, and the second curve, which is a collection of second similarities for each candidate of the corresponding region, the first curve And a selection step of selecting a particular curve based on a confidence indicating whether each of the second curves is reliable;
Combining each similarity in the specific curve with respect to one reference region and each similarity in the specific curve with respect to another reference region;
A derivation step of deriving the parallax value based on the position of the one reference region in the reference image and the position of the corresponding region in the comparison image where the similarity after the combining by the combining unit is maximized;
The parallax value production method characterized by including.
コンピュータに、請求項15に記載の方法を実行させることを特徴とするプログラム。   A program causing a computer to execute the method according to claim 15. コンピュータに、請求項16に記載の方法を実行させることを特徴とするプログラム。   A program causing a computer to execute the method according to claim 16.
JP2014199995A 2014-09-30 2014-09-30 PARALLEL VALUE DERIVING DEVICE, MOBILE OBJECT, ROBOT, PARALLEL VALUE PRODUCTION METHOD, AND PROGRAM Active JP6519138B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014199995A JP6519138B2 (en) 2014-09-30 2014-09-30 PARALLEL VALUE DERIVING DEVICE, MOBILE OBJECT, ROBOT, PARALLEL VALUE PRODUCTION METHOD, AND PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014199995A JP6519138B2 (en) 2014-09-30 2014-09-30 PARALLEL VALUE DERIVING DEVICE, MOBILE OBJECT, ROBOT, PARALLEL VALUE PRODUCTION METHOD, AND PROGRAM

Publications (2)

Publication Number Publication Date
JP2016070774A true JP2016070774A (en) 2016-05-09
JP6519138B2 JP6519138B2 (en) 2019-05-29

Family

ID=55864426

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014199995A Active JP6519138B2 (en) 2014-09-30 2014-09-30 PARALLEL VALUE DERIVING DEVICE, MOBILE OBJECT, ROBOT, PARALLEL VALUE PRODUCTION METHOD, AND PROGRAM

Country Status (1)

Country Link
JP (1) JP6519138B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016090449A (en) * 2014-11-07 2016-05-23 国立研究開発法人産業技術総合研究所 Stereo matching apparatus, stereo matching program, and stereo matching method
JP2016099318A (en) * 2014-11-26 2016-05-30 国立研究開発法人産業技術総合研究所 Stereo matching device, stereo matching program, and stereo matching method
US10872432B2 (en) 2018-01-05 2020-12-22 Panasonic Intellectual Property Management Co., Ltd. Disparity estimation device, disparity estimation method, and program
CN114812429A (en) * 2022-03-06 2022-07-29 南京理工大学 Binocular vision metal gear three-dimensional appearance measuring device and method based on Gray code structured light

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1151644A (en) * 1997-08-05 1999-02-26 Honda Motor Co Ltd Distance measuring instrument for vehicle
JP2001169308A (en) * 1999-12-06 2001-06-22 Mixed Reality Systems Laboratory Inc Depth information measurement instrument and composite reality exhibition system
JP2004234423A (en) * 2003-01-31 2004-08-19 Seiko Epson Corp Stereoscopic image processing method, stereoscopic image processor and stereoscopic image processing program
JP2006227827A (en) * 2005-02-16 2006-08-31 Toshiba Corp Image matching method and apparatus
WO2012165491A1 (en) * 2011-05-30 2012-12-06 パナソニック株式会社 Stereo camera device and computer-readable recording medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1151644A (en) * 1997-08-05 1999-02-26 Honda Motor Co Ltd Distance measuring instrument for vehicle
JP2001169308A (en) * 1999-12-06 2001-06-22 Mixed Reality Systems Laboratory Inc Depth information measurement instrument and composite reality exhibition system
JP2004234423A (en) * 2003-01-31 2004-08-19 Seiko Epson Corp Stereoscopic image processing method, stereoscopic image processor and stereoscopic image processing program
JP2006227827A (en) * 2005-02-16 2006-08-31 Toshiba Corp Image matching method and apparatus
WO2012165491A1 (en) * 2011-05-30 2012-12-06 パナソニック株式会社 Stereo camera device and computer-readable recording medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吉田裕、実吉敬二: "物体境界情報を失わないSemi-Global-Matching", 日本ロボット学会学術講演会予稿集(CD-ROM), vol. 32nd, JPN6018027878, 4 September 2014 (2014-09-04), JP, pages ROMBUNNO.2J2-05 *
岩波理化学辞典, vol. 第3版増補版, JPN6018045892, 24 February 1981 (1981-02-24), JP, pages 88 - 707 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016090449A (en) * 2014-11-07 2016-05-23 国立研究開発法人産業技術総合研究所 Stereo matching apparatus, stereo matching program, and stereo matching method
JP2016099318A (en) * 2014-11-26 2016-05-30 国立研究開発法人産業技術総合研究所 Stereo matching device, stereo matching program, and stereo matching method
US10872432B2 (en) 2018-01-05 2020-12-22 Panasonic Intellectual Property Management Co., Ltd. Disparity estimation device, disparity estimation method, and program
CN114812429A (en) * 2022-03-06 2022-07-29 南京理工大学 Binocular vision metal gear three-dimensional appearance measuring device and method based on Gray code structured light
CN114812429B (en) * 2022-03-06 2022-12-13 南京理工大学 Binocular vision metal gear three-dimensional appearance measuring device and method based on Gray code structured light

Also Published As

Publication number Publication date
JP6519138B2 (en) 2019-05-29

Similar Documents

Publication Publication Date Title
JP6417886B2 (en) Parallax value deriving device, moving body, robot, parallax value production method, and program
JP6561512B2 (en) Parallax value deriving device, moving body, robot, parallax value deriving method, parallax value producing method, and program
JP6565188B2 (en) Parallax value deriving apparatus, device control system, moving body, robot, parallax value deriving method, and program
JP6589313B2 (en) Parallax value deriving apparatus, device control system, moving body, robot, parallax value deriving method, and program
JP2013164351A (en) Stereo parallax calculation device
WO2016063545A1 (en) Stereo camera apparatus and vehicle provided with stereo camera apparatus
US11509813B2 (en) Image processing device
JP6519138B2 (en) PARALLEL VALUE DERIVING DEVICE, MOBILE OBJECT, ROBOT, PARALLEL VALUE PRODUCTION METHOD, AND PROGRAM
JP2016152027A (en) Image processing device, image processing method and program
JP6455164B2 (en) Parallax value deriving apparatus, device control system, moving body, robot, parallax value deriving method, and program
JP6543935B2 (en) PARALLEL VALUE DERIVING DEVICE, DEVICE CONTROL SYSTEM, MOBILE OBJECT, ROBOT, PARALLEL VALUE DERIVING METHOD, AND PROGRAM
JP6561511B2 (en) Parallax value deriving device, moving body, robot, parallax value production deriving method, parallax value producing method and program
JP6337504B2 (en) Image processing apparatus, moving body, robot, device control method and program
JP2016095229A (en) Parallax value derivation device, movable body, robot, parallax value production method, and program
JP6442911B2 (en) Parallax value deriving device, moving object, robot, parallax value deriving method, and program
JP6515547B2 (en) PARALLEL VALUE DERIVING DEVICE, DEVICE CONTROL SYSTEM, MOBILE OBJECT, ROBOT, PARALLEL VALUE PRODUCTION METHOD, AND PROGRAM
JP2015195019A (en) Disparity deriving apparatus, movable apparatus, robot, method of deriving disparity, method of producing disparity, and program
JP6459482B2 (en) Parallax value deriving apparatus, device control system, moving body, robot, parallax value deriving method, and program
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: 20170907

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180712

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180724

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180921

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181127

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190123

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190408

R151 Written notification of patent or utility model registration

Ref document number: 6519138

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151