JP7152880B2 - Ranging device, ranging system and ranging method - Google Patents
Ranging device, ranging system and ranging method Download PDFInfo
- Publication number
- JP7152880B2 JP7152880B2 JP2018104431A JP2018104431A JP7152880B2 JP 7152880 B2 JP7152880 B2 JP 7152880B2 JP 2018104431 A JP2018104431 A JP 2018104431A JP 2018104431 A JP2018104431 A JP 2018104431A JP 7152880 B2 JP7152880 B2 JP 7152880B2
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- dissimilarity
- image
- comparison
- pixels
- 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
Links
Images
Landscapes
- Measurement Of Optical Distance (AREA)
Description
本発明は、測距装置、測距システムおよび測距方法に関する。 The present invention relates to a ranging device, a ranging system and a ranging method.
ステレオカメラによって得られる画像のステレオマッチングにおいて、画素コストと接続コストとを用いる測距装置が知られている(例えば、特許文献1)。画素コストは、左右の画像のうち一方の画像に含まれる一つの基準画素と、他方の画像に含まれる比較画素との非類似度を表す。接続コストは、基準画素のそれぞれに対して比較画素を一つずつ選択した際の、隣り合う基準画素に対応するそれぞれの比較画素の間の位置ズレ量を表す。 A distance measuring device that uses pixel cost and connection cost in stereo matching of images obtained by a stereo camera is known (for example, Patent Document 1). The pixel cost represents the degree of dissimilarity between a reference pixel included in one of the left and right images and a comparison pixel included in the other image. The connection cost represents the amount of positional deviation between the comparison pixels corresponding to adjacent reference pixels when one comparison pixel is selected for each reference pixel.
このような測距装置では、画素コストと、視差の変化量を表す接続コストとの和である合計コストが最小となるように対応点の組み合わせ(以下、「パス」とも呼ぶ)を計算して、視差が決定される場合がある。しかし、従来技術において、車両のワイパや、降雪などの悪天候による画像上の一時的なノイズが、視差を決定する場合にどのような影響をおよぼすかについて充分に検討されているとはいえない。発明者らは、画像内に一時的なノイズがある場合、従来の技術では画素コストを誤って算出し、この誤った画素コストがパスの計算に用いられることによって誤った視差が決定される場合がある、という課題を有することを見出した。 Such a distance measuring device calculates a combination of corresponding points (hereinafter also referred to as a "path") so as to minimize the total cost, which is the sum of the pixel cost and the connection cost representing the amount of change in parallax. , the parallax may be determined. However, in the prior art, it cannot be said that sufficient studies have been made on how temporary noise on images due to vehicle wipers or bad weather such as snowfall affects parallax determination. We found that when there is temporal noise in the image, the prior art incorrectly computes the pixel cost, and this incorrect pixel cost is used in the path computation, resulting in an incorrect disparity determination. It has been found that there is a problem that
本開示は、上述の課題の少なくとも一部を解決するためになされたものであり、以下の形態又は適用例として実現することが可能である。
[形態1]
本開示の一形態によれば、測距装置(30)が提供される。この測距装置は、複数の画像のうちの一つの画像である基準画像(PL,PL2)から抽出した一つの画素である基準画素(La)の画素値と、前記複数の画像のうち前記基準画像とは別の画像である比較画像(PR,PR2)から抽出した比較画素(Ra,Rb,Rc)の画素値との類似度の逆数により求められる前記基準画素と前記比較画素との非類似度を、前記基準画素のそれぞれについて演算する非類似度計算部(32)と、得られた前記基準画素に対する複数の前記比較画素の前記非類似度を用いて、前記基準画素または前記比較画素の少なくともいずれか一方が外乱である確率(P
0
)を、前記基準画素のそれぞれについて演算する外乱推定部(34)と、前記確率によって重み付けした前記非類似度である重み付け非類似度を、前記基準画素のそれぞれについて演算する重み付け部(36)と、前記重み付け非類似度を用いて、前記基準画素のそれぞれに対応する前記比較画素である対応点を設定する対応点設定部(38)と、を備える。前記基準画素と前記対応点とのずれ量を用いて、前記基準画像に含まれる対象までの距離を決定する。
The present disclosure has been made to solve at least part of the above-described problems, and can be implemented as the following forms or application examples.
[Mode 1]
According to one aspect of the present disclosure, a ranging device (30) is provided. This rangefinder measures a pixel value of a reference pixel (La), which is one pixel extracted from a reference image (PL, PL2), which is one of a plurality of images, and the reference pixel value of the plurality of images. Dissimilarity between the reference pixel and the comparison pixel obtained by the reciprocal of the degree of similarity with the pixel value of the comparison pixel (Ra, Rb, Rc) extracted from the comparison image (PR, PR2), which is an image different from the image. of the reference pixel or the comparison pixel using the dissimilarity calculation unit (32) that calculates the degree of dissimilarity for each of the reference pixels, and the obtained dissimilarity of the plurality of comparison pixels to the reference pixel. A disturbance estimator (34) for calculating the probability (P 0 ) that at least one of the pixels is a disturbance for each of the reference pixels; a weighting unit (36) for calculating each pixel; and a corresponding point setting unit (38) for setting corresponding points, which are the comparison pixels corresponding to each of the reference pixels, using the weighted dissimilarity. Prepare. A distance to an object included in the reference image is determined using the amount of deviation between the reference pixel and the corresponding point.
本開示の一形態によれば、測距装置(30)が提供される。この測距装置は:複数の画像のうちの一つの画像である基準画像(PL,PL2)から抽出した一つの画素である基準画素(La)と、前記複数の画像のうち前記基準画像とは別の画像である比較画像(PR,PR2)から抽出した比較画素(Ra,Rb,Rc)との画素値から前記基準画素と前記比較画素との非類似度を、前記基準画素のそれぞれについて演算する非類似度計算部(32)と;得られた前記基準画素に対する前記複数の比較画素の前記非類似度を用いて、前記基準画素または前記比較画素の少なくともいずれか一方が外乱である確率(P0)を、前記基準画素のそれぞれについて演算する外乱推定部(34)と;前記確率によって重み付けした前記非類似度である重み付け非類似度を、前記基準画素のそれぞれについて演算する重み付け部(36)と;前記重み付け非類似度を用いて、前記基準画素のそれぞれに対応する前記比較画素である対応点を設定する対応点設定部(38)と;を備える。前記基準画素と前記対応点とのずれ量を用いて、前記基準画像に含まれる対象までの距離を決定してよい。 According to one aspect of the present disclosure, a ranging device (30) is provided. This distance measuring device includes: a reference pixel (La) that is one pixel extracted from a reference image (PL, PL2) that is one of a plurality of images, and the reference image among the plurality of images. A dissimilarity between the reference pixel and the comparison pixel is calculated from the pixel value of the comparison pixel (Ra, Rb, Rc) extracted from the comparison image (PR, PR2), which is another image, for each of the reference pixels. a dissimilarity calculator (32); using the obtained dissimilarity of the plurality of comparison pixels to the reference pixel, the probability that at least one of the reference pixel or the comparison pixel is a disturbance ( P 0 ) for each of the reference pixels; and a weighting unit (36) for calculating the weighted dissimilarity, which is the dissimilarity weighted by the probability, for each of the reference pixels. ); and a corresponding point setting unit (38) that sets corresponding points, which are the comparison pixels corresponding to each of the reference pixels, using the weighted dissimilarity. A distance to an object included in the reference image may be determined using the amount of deviation between the reference pixel and the corresponding point.
上記形態の測距装置によれば、非類似度は、外乱推定部によって演算された外乱である確率を考慮した重み付け非類似度として算出される。これにより、外乱の影響を受けて誤った視差を算出する不具合の発生が低減され、正しい視差を誤った視差に補正してしまう不具合が低減されることができる。 According to the distance measuring device of the above aspect, the dissimilarity is calculated as a weighted dissimilarity considering the probability of the disturbance calculated by the disturbance estimating section. As a result, it is possible to reduce the occurrence of an erroneous parallax calculation under the influence of disturbance, and reduce the problem of correcting a correct parallax to an erroneous parallax.
上述した本発明の各形態の有する複数の構成要素はすべてが必須のものではなく、上述の課題の一部または全部を解決するため、あるいは、本明細書に記載された効果の一部または全部を達成するために、適宜、前記複数の構成要素の一部の構成要素について、その変更、削除、新たな他の構成要素との差し替え、限定内容の一部削除を行うことが可能である。また、上述の課題の一部または全部を解決するため、あるいは、本明細書に記載された効果の一部または全部を達成するために、上述した本発明の一形態に含まれる技術的特徴の一部または全部を上述した本発明の他の形態に含まれる技術的特徴の一部または全部と組み合わせて、本発明の独立した一形態とすることも可能である。 All of the plurality of constituent elements of the above-described embodiments of the present invention are not essential, and in order to solve some or all of the above problems, or some or all of the effects described in this specification In order to achieve the above, it is possible to appropriately change, delete, replace with new other components, and partially delete the limited content for some of the plurality of components. In addition, in order to solve part or all of the above problems or achieve part or all of the effects described in this specification, the technical features included in one aspect of the present invention described above It is also possible to combine some or all of the technical features included in the other forms of the present invention described above to form an independent form of the present invention.
A.第1実施形態:
図1に示す自動運転車両100は、駆動部制御とブレーキ制御と操舵角制御のすべてを自動で実行する車両である。自動運転車両100は、測距システム20と、制御部50とを備えている。測距システム20は、車両の前方を撮像し、その撮像画像に写った対象までの距離を算出する機能を有する。測距システム20は、画像取得部22と、測距装置30とを備える。本明細書において、「自動運転」とは、ドライバ(運転者)が車両の運転操作を行うことなく、駆動部制御とブレーキ制御と操舵角制御のすべてを自動で実行する運転を意味する。
A. First embodiment:
An automatically driven
画像取得部22は、自動運転車両100の前方を撮像範囲として、複数の画像を取得可能なカメラである。本実施形態において、画像取得部22としては、一対の撮像画像を取得するステレオカメラを採用している。画像取得部22は、自動運転車両100の重力方向について同じ高さで、自動運転車両100の進行方向の左右に離れた位置にそれぞれ配置される。画像取得部22は、例えば白線の走路区画線と黄線の走路区画線を区別するために、対象物の色を識別可能なカラーカメラであることが好ましい。
The
測距装置30は、カメラECUであり、CPUとメモリとを含む回路である。測距装置30は、不揮発性記憶媒体に格納されたコンピュータプログラムを実行することによって、非類似度計算部32と、外乱推定部34と、重み付け部36と、対応点設定部38と、距離画像生成部39と、平滑処理部40との機能をそれぞれ実現する。測距装置30は、画像取得部22によって撮影された左右の画像を基準画像及び比較画像として用いて、視差画像を生成する。視差画像は、基準画像に存在する物体までの距離を表す画像であることから、「距離画像」とも呼ぶ。なお、測距装置30の機能の一部をハードウェア回路で実現するようにしてもよい。
The distance measuring
制御部50は、複数のECUから構成される。制御部50は、画像認識処理の結果を測距システム20から取得し、衝突を回避するための駆動部制御とブレーキ制御と操舵角制御を実行する。
The
図2に示すように、本実施形態の測距システム20の各部によって、距離画像生成処理の各処理が実行される。ステップS10において、画像取得部22は、左右のカメラによって基準画像と、比較画像とを取得する。ステップS20からステップS70までの制御は、測距システム20の測距装置30の各部の制御によって実行される。
As shown in FIG. 2, each part of the distance measuring
ステップS20において、非類似度計算部32は、基準画素と比較画素との画素値から非類似度を計算する。より具体的には、ステップS22において、非類似度計算部32は、取得した基準画像から一つの基準画素を選択する。ステップS24において、非類似度計算部32は、選択された基準画素とY方向の同じ高さの一つの比較画素を選択する。ステップS25において、非類似度計算部32は、基準画素に対する比較画素の視差を計算する。ステップS26において、非類似度計算部32は、基準画素と比較画素との非類似度を算出する。ステップS28において、非類似度計算部32は、一つの基準画素に対して比較画像中の比較画素を全て選択したか否かを確認する。非類似度計算部32は、比較画素を全て選択したと判定しない場合(S28:NO)、ステップS24の処理に戻る。非類似度計算部32は、比較画素を全て選択したと判定した場合(S28:YES)、ステップS29において、基準画像中の基準画素を全て選択したか否かを確認する。基準画素を全て選択したと判定しない場合(S29:NO)、非類似度計算部32の処理は、ステップS22に戻る。基準画素を全て選択した場合(S29:YES)、すなわち、全ての基準画素に対して非類似度の算出を終了した場合、非類似度計算部32による処理は終了し、ステップS30の処理が実行される。
In step S20, the
ステップS30において、外乱推定部34は、後述する式(1)~(5)に、ステップS20で算出された非類似度のうち最も低い非類似度および2番目に低い非類似度を用いて、基準画素が外乱である確率P0(以下、単に「確率P0」とも呼ぶ)を、基準画素ごとに算出する。ステップS40において、重み付け部36は、ステップS20で算出された非類似度と、確率P0とを掛け合わせた重み付け非類似度を算出する。
In step S30, the
ステップS50において、対応点設定部38は、ステップS40において算出された重み付け非類似度と、接続コストとを用いて基準画素ごとに対応点を設定する。ステップS60において、距離画像生成部39は、基準画像と比較画像とから、距離画像としての視差画像を作成する。ステップS70において、平滑処理部40は、メディアンフィルタによって視差を平滑化する処理を行って、視差を補正した視差画像を得る。以上により、本実施形態の測距システム20による距離画像生成処理は終了する。
In step S50, the corresponding
図3を用いて、非類似度計算部32による視差値を算出する機能について説明する。図3には、画像取得部22によって撮像された左画像PLと、右画像PRとを標本化した例が示されている。左画像PLは、画像取得部22の左側カメラによって撮像されたドットマトリクス型の画像を模式的に示したものである。同様に、右画像PRは、画像取得部22の右側カメラによって撮像されたドットマトリクス型の画像を模式的に示したものである。これらの画像の解像度は、ピクセル(pixel)単位で表される。図3の左画像PLおよび右画像PRは、技術の理解を容易にするため14×8ピクセルで構成されているが、これに限定されず、14×8ピクセルより大きい画素数で構成される画像であってもよい。なお、図中のX方向は画像の水平方向、Y方向は画像の重力方向を表している。
A function of calculating a parallax value by the
画像取得部22の左右のカメラは、上述したように重力方向において同じ高さに配される。そのため、左画像PLおよび右画像PRは、重力方向の同じ高さであって、互いに水平方向の左右に離れたそれぞれの位置から、同一の方向である自動運転車両100の前方を撮像した画像となる。よって、基準画像の行番号と比較画像の行番号との高さは互いに一致している。ここで、右画像PRには、本実施形態の自動運転車両100に搭載されたワイパDpが撮像されている。このワイパDpは、右画像PRのみに撮像されたいわゆる外乱である。このワイパDpを、以下「外乱Dp」とも呼ぶ。本明細書において、外乱とは、画像取得部22の左右のカメラのうち、一方のカメラのみに撮像されたオブジェクトを意味する。
The left and right cameras of the
非類似度計算部32は、基準画像から基準画素を抽出し、比較画像から比較画素を抽出し、基準画素と比較画素との画素値から非類似度を演算する機能を有する。本実施形態の非類似度計算部32は、左画像PLを基準画像として用いる。以下、左画像PLを基準画像PLとも呼ぶ。非類似度計算部32は、基準画像PLを構成する画素のうち一つの画素を基準画素として選択し、これを順に繰り返して基準画像PLの全て画素を選択する。基準画素の選択の順序は、どのような順序であってもよい。本実施形態では、非類似度計算部32は、初めに左上の画素を基準画素として選択し、1画素ずつ順に右にずらしていく。非類似度計算部32は、基準画素を右端まで選択したら、Y方向について1画素分を下にずらして、左端から同様に継続する。このようにして、全ての画素が基準画素として選択される。本実施形態において、基準画素が選択されると、基準画素を取り囲む8つの周辺画素も付随して選択される。基準画素および周辺画素を取り囲む矩形状の領域は、窓と呼ばれる。本実施形態において、窓は、1辺を3画素とする正方形である。窓の1辺は3画素には限定されず、2画素であってもよく、4画素以上であってもよい。
The
本実施形態の非類似度計算部32は、右画像PRを比較画像として用いる。以下、右画像PRを比較画像PRとも呼ぶ。なお、測距システム20は、右画像PRを基準画像とし、左画像PLを比較画像とする態様であってもよい。比較画素を選択する際においても、窓に含まれる周辺画素が付随して選択される。比較画素として選択対象になるのは、比較画像PRのうち、基準画素とY方向の位置、すなわち高さ、が一致する画素である。比較画像PRからの比較画素の抽出には、テンプレートマッチング(template matching)(「ブロックマッチング」とも呼ぶ)が用いられる。本実施形態では、窓間の類似度の算出には、NCC(Normalized Cross Correlation)が用いられる。なお、類似度の算出にSAD(Sum of Absolute Difference)もしくはSSD(Sum of Squared Difference)が用いられてもよい。類似度とは、比較する画素を含む窓同士の画素値の類似の程度を数値化したもののことである。本実施形態において、類似度は、0から1の範囲で表され、1に近いほど類似していることを示す。本明細書において、画素値とは、画素の明るさに相当する値である濃度値(「輝度値」とも呼ぶ)のことである。本実施形態の画素値には、RGBの濃度値が用いられる。撮像された画像がカラー画像である場合には、RGBの各濃度値をそれぞれR,G,Bと表した以下の式(a)によって表される輝度Yの値が用いられてもよい。
Y=0.299R+0.587G+0.144B …(a)
The
Y=0.299R+0.587G+0.144B (a)
非類似度計算部32は、比較画素の選択に伴い、基準画素と比較画素とのずれ量である視差値を決定する。視差値は、ピクセル(pixel)単位で表される。図3の基準画像PLでは、X方向において左から6ピクセル、Y方向において上から4ピクセルの位置の画素が、基準画素Laとして選択された例が示されている。以下、X方向の位置が左からnピクセル目の位置であることを、X=nと表記する。図3の比較画像PRでは、X=2に位置する比較画素Raと、X=6に位置する比較画素Rbと、X=10に位置する比較画素Rcとが選択された例が示されている。比較画素Rbの場合、基準画素Laに対する視差値はゼロである。一方、比較画素Rcの場合、基準画素Laに対する視差値は-4ピクセルであり、比較画素Raの場合、基準画素Laに対する視差値は4ピクセルである。このように、非類似度計算部32は、着目した基準画素とY方向の位置が一致する各比較画素との視差値を、各基準画素に対して決定する。
The
図4を用いて、非類似度計算部32による非類似度を算出する機能について説明する。非類似度計算部32は、基準画素と比較画素との非類似度の結果を、節点(node)として格子状にマッピングする。図4の横軸は、基準画像PLのX方向における1ピクセル毎の基準画素の位置を表す。図4の縦軸は、基準画素に対応する比較画素の視差値を表す。節点はX方向の画素数や視差値に相当する数をマッピングされるが、技術の理解を容易にするため、図4では図示を省略して一部の節点のみが示されている。本実施形態において、非類似度とは、一つの基準画素を含む窓と、一つの比較画素を含む窓との画素値の非類似の程度を数値化したものを表し、画素コストとも呼ばれる。非類似度は、窓同士の非類似の程度には限定されず、画素同士の非類似の程度を数値化したものであってもよい。非類似度は、1/(類似度)として、類似度の逆数とする式によって表される。非類似度は、大きい数値であるほど非類似であることを示す。
The function of calculating the dissimilarity by the
非類似度計算部32は、基準画像PL内の各基準画素に対する各比較画素との非類似度を、視差ごとにマッピングする。図4の例では、Y方向において上から4ピクセルの位置を高さとする基準画素が選択された場合の例を表している。この図4に例示されたような非類似度のマッピングは、基準画素の高さ分、すなわち基準画像PLの例において8行分である8組分を作成される。
The
本実施形態の測距装置30が備える外乱推定部34の機能を説明する。外乱推定部34は、上述した非類似度計算部32によって算出された非類似度を用いて、基準画素または比較画素の少なくともいずれか一方が外乱である確率を、基準画像PL内の基準画素のそれぞれについて演算する。はじめに、外乱推定部34は、以下の式(1)、式(2)を用いて、MSM(the matching score measure)法による信頼度CMSMと、PKRN(peak-ratio naive)法による信頼度CPKRNとを演算する。
The function of the
c1は最小の非類似度の値を表し、c2は2番目に小さい非類似度の値を表し、σは算出した非類似度の標準偏差を表している。これにより、統計上の外れ値(アウトライヤー(Outlier)とも呼ぶ)の影響が低減されている。次に、外乱推定部34は、以下の式(3)、式(4)を用いて確率を演算する。
c1 represents the lowest dissimilarity value, c2 represents the second smallest dissimilarity value, and σ represents the standard deviation of the calculated dissimilarity. This reduces the impact of statistical outliers (also called outliers). Next, the
N1およびN2は、カメラや使用状況などの特性に応じて定まる固定値である。本実施形態において、N1=10、N2=1の値が用いられる。最後に、外乱推定部34は、基準画素または比較画素の少なくとも一方が外乱である確率Poを、PMSMとPPKRNを用いた以下の式(5)を用いて演算する。確率Poは、基準画素ごとに算出される。
N1 and N2 are fixed values that are determined according to characteristics such as the camera and usage conditions. In this embodiment, values of N 1 =10 and N 2 =1 are used. Finally, the
図5には、基準画像PLのY方向の上から4ピクセルの高さの基準画素の列での基準画素ごとに算出された確率Poの一部を例示している。このように、統計上の外れ値の影響を低減した信頼度を用いて、基準画素または比較画素の少なくとも一方が外乱である確率が算出される。この外乱である確率を導入して非類似度を算出することによって、外乱の影響を低減した視差が得られる。
FIG. 5 illustrates part of the probability
図6を用いて、本実施形態の測距装置30が備える重み付け部36の機能について説明する。節点はX方向の画素数や視差値に相当する数をマッピングされるが、技術の理解を容易にするため、図6では図示を省略して一部の節点のみが示されている。重み付け部36は、重み付け非類似度を演算する機能を備える。重み付け非類似度とは、非類似度計算部32によって算出された非類似度を、外乱推定部34によって算出された上述の確率P0によって重み付けされた非類似度である。重み付け非類似度は、マッピングされた各基準画素の非類似度(図4参照)に、X方向の列ごとの確率P0(図5参照)を掛け合わせて求められる。例えば、図6の列X1のすべての非類似度には、図5のX=1の場合の確率P0=1が掛け合わせられ、図6の列X2のすべての非類似度には、図5のX=2の確率P0=0.1が掛け合わせられる。すなわち、マッピングされた節点の視差間では、掛け合わせられる確率P0は同じである。図6の各節点には、技術の理解を容易にするため、非類似度と確率P0とを掛け合わせた状態、すなわち算出途中の状態、の重み付け非類似度が示されている。また、図6では、Y方向の上から4ピクセルの位置を高さとする基準画素が選択された場合の例が示されている。重み付け部36は、重み付け非類似度を全ての高さの基準画素に対して算出する。すなわち、この図6に例示されたような重み付け非類似度の算出は、基準画素の高さ分、すなわち基準画像PLの例において8行分である8組分を実行される。
The function of the
図7を用いて、本実施形態の測距装置30が備える対応点設定部38および距離画像生成部39の機能について説明する。図7では、図6と同様に技術の理解を容易にするため一部の節点の図示が省略されている。対応点設定部38は、ビタビアルゴリズムを用いて、重み付け部36が算出した重み付け非類似度から基準画素のそれぞれに対応する比較画素である対応点を設定する。ビタビアルゴリズムとは、尤もらしい経路を探索する動的計画法アルゴリズムの一種である。対応点設定部38は、基準画像の全ての高さに対して対応点を設定し、全ての基準画素に対して対応点を設定する。
Functions of the corresponding
本実施形態のビタビアルゴリズムには、マルチパスビタビアルゴリズム(Multi-path Viterbi Algorithm)を採用している。本実施形態のビタビアルゴリズムでは、上述した重み付け非類似度と、X方向において隣り合う基準画素に対応する節点間の位置ズレ量である視差変化量(以下、「接続コスト」とも呼ぶ)とが用いられる。ビタビアルゴリズムの計算対象となる接続コストの候補の数は、一つの節点に対して、X方向に隣接する画素の節点の数である。対応点設定部38は、重み付け非類似度と、接続コストとの和を算出する。対応点設定部38は、この和の値が最も小さくなる節点の組み合わせを、基準画像の一つの高さにおける対応点の組み合わせとして設定する。対応点設定部38は、これを基準画像の全ての高さについて繰り返し、基準画像中の全ての基準画素に対して対応点を設定する。
The Viterbi algorithm of this embodiment employs a multi-path Viterbi Algorithm. The Viterbi algorithm of this embodiment uses the above-described weighted dissimilarity and a parallax change amount (hereinafter also referred to as “connection cost”) that is a positional deviation amount between nodes corresponding to adjacent reference pixels in the X direction. be done. The number of connection cost candidates to be calculated by the Viterbi algorithm is the number of nodes of pixels adjacent to one node in the X direction. The corresponding
図7には、節点NP1~NP5と、一つの節点から隣接する節点への接続を模式的に表す4つの矢印D1~D4と、が例示されている。この各矢印の近傍には、各矢印に対応する接続コストを表す数値が模式的に表されている。接続コストは、視差の変化量が小さいほど低く設定される。本実施形態において、同じ視差値の隣り合う節点間の接続コストはゼロであり、接続される節点の視差値が1ピクセルずれるごとに、接続コストは1ずつ増加する。図7の例では、矢印D1に対応する接続コストは、節点NP1と同じ視差値の節点NP2との間の接続コストであり、ゼロである。節点NP2と節点NP3との間の矢印D2の接続コストも同様にゼロである。したがって、図示を省略した部分を除き、節点NP2を経由する節点NP1から節点NP3までの重み付け非類似度と接続コストとの和である合計コストは、2.5となる。他方、節点NP1と節点NP4との間の矢印D3では、節点NP1と節点NP4との間で視差値が2ピクセルずれているため、接続コストは2である。したがって、図示を省略した部分を除き、節点NP4を経由する節点NP1から節点NP5までの重み付け非類似度と接続コストとの和である合計コストは、4.6となる。 FIG. 7 illustrates node points NP1 to NP5 and four arrows D1 to D4 schematically representing connections from one node to adjacent nodes. Numerical values representing connection costs corresponding to the respective arrows are schematically represented near the respective arrows. The connection cost is set lower as the amount of change in parallax is smaller. In this embodiment, the connection cost between adjacent nodes with the same disparity value is zero, and the connection cost increases by one for each pixel disparity in the disparity values of the connected nodes. In the example of FIG. 7, the connection cost corresponding to the arrow D1 is the connection cost between the node NP1 and the node NP2 with the same parallax value, which is zero. The connection cost of arrow D2 between node NP2 and node NP3 is also zero. Therefore, the total cost, which is the sum of the weighted dissimilarity and the connection cost from the node NP1 to the node NP3 via the node NP2, is 2.5, except for the portion omitted from the drawing. On the other hand, in the arrow D3 between the node NP1 and the node NP4, the connection cost is 2 because the parallax value is shifted by 2 pixels between the node NP1 and the node NP4. Therefore, the total cost, which is the sum of the weighted dissimilarity and the connection cost from the node NP1 to the node NP5 via the node NP4, except for the portion omitted from the drawing, is 4.6.
対応点設定部38は、このように重み付け非類似度と接続コストとの和を、全ての節点の組み合わせで算出し、重み付け非類似度と接続コストとの和が最小となる組み合わせを対応点として設定する。図7では、節点NP2を経由する節点NP1から節点NP3までの組み合わせは、重み付け非類似度と接続コストとの和が、全ての組み合わせの中で最も小さいものとする。このとき、対応点設定部38は、節点NP1,NP2,NP3に対応する画素の組み合わせを対応点として設定する。対応点設定部38は、この対応点の設定を基準画像の高さごとに実行し、すべての基準画素に対して対応点を設定する。このように本実施形態の測距システム20によれば、マルチパスビタビアルゴリズムによって、重み付け非類似度と視差変化量との総和が最小値となる対応点の組み合わせによる最適化が実行される。視差変化量の値が大きいほど、誤った視差を抽出している可能性が高くなる。本実施形態の測距システム20は、対応点の設定に、図中のD1からD4に示される視差変化量を利用する。そのため、誤った視差を抽出する可能性を低減したうえで対応点の組み合わせが得られる。また、既存のマルチパスビタビアルゴリズムの適用により、より簡易な方法によって最も尤もらしい並びの重み付け非類似度を設定することができる。また、視差変化量を用いず重み付け非類似度のみによって対応点を設定する態様と比較して、外乱の影響による誤った重み付け非類似度が選択されることによって誤った視差が決定される不具合の発生を抑制することができる。
The corresponding
距離画像生成部39は、設定された対応点に対応する視差値から、距離画像としての視差画像を作成する。平滑処理部40は、メディアンフィルタを利用し、視差画像の視差値を平滑化する処理によって視差画像を補正する。本実施形態の平滑処理部40は、定時荷重メディアンフィルタ(the constant time weighted median filter)を利用する。メディアンフィルタには、荷重メディアンフィルタ(weighted median filter)やメディアンフィルタ(unweighted median filter)が利用されてもよい。メディアンフィルタの導入により、視差画像上において、視差値に含まれたノイズを低減し、物体の境界であるエッジ部分をより明確に抽出させることができる。
The
図8を用いて、測距システム20による距離画像生成処理によって生成される画像について説明する。図8の最上段には、画像取得部22によって取得された基準画像PL2および比較画像PR2が示されている。比較画像PR2には、自動運転車両100に搭載されたワイパ(以下、「外乱Dp2」とも呼ぶ)が示されている。非類似度計算部32は、基準画像PL2と比較画像PR2とから非類似度を計算する。外乱推定部34は、外乱である確率P0を算出する。算出した外乱である確率P0によって表される画像が、図8の中段にある画像PC1である。画像PC1において、外乱である確率P0が高いほど画像が黒色に近い色として表される。画像PC1の右下は、右画像PR2の外乱Dpに相当する位置の周辺であり、外乱である確率P0の高い領域DRが示されている。
An image generated by distance image generation processing by the
重み付け部36は、外乱である確率P0によって非類似度に重み付けをした重み付け非類似度を算出する。対応点設定部38によって対応点が設定され、距離画像生成部39によって視差画像が生成される。視差画像は、平滑処理部40によって平滑化処理をされて、距離画像DIとして生成される。距離画像DIの右下近傍には、領域DRに相当する外乱の影響を受けた部分が除去されている。このように、本実施形態の測距システム20によれば、非類似度は、外乱推定部34によって演算された外乱である確率P0を考慮した重み付け非類似度として算出される。これにより、外乱の影響を低減した視差画像が得られることができる。したがって、外乱の影響を受けて誤った視差を算出する不具合の発生が低減され、正しい視差を誤った視差に補正してしまう不具合が低減されることができる。
The
B.他の実施形態:
B1.他の実施形態1:
上記実施形態の測距システム20では、各部の機能は使用される環境によって制限されることなく稼働する態様を例として示した。これに対して、測距システムを使用する環境に応じて外乱推定部34、重み付け部36、対応点設定部38との各処理が実行される態様であってもよい。上述したように、外乱とは、画像取得部の左右のカメラのうち、一方のカメラのみに撮像されたオブジェクトを意味する。車両の走行において、外乱の影響が大きいと考えられる環境としては、例えば次のような場合が想定される。測距システムを夜間に使用する場合、自動運転車両に備えられるワイパを稼働する場合、自動運転車両に備えられるライトを点灯する場合、降雪の激しい場合などである。測距システムは、これらの環境のうち少なくともいずれか一つの場合の環境に該当するときに、外乱推定部、重み付け部、対応点設定部との各処理を実行し、これらの環境のいずれにも該当しないときには各処理を実行しない態様であってもよい。このような態様においては、外乱の影響が小さい環境での処理の負荷が低減されることができる。
B. Other embodiments:
B1. Alternative Embodiment 1:
In the
B2.他の実施形態2:
上記実施形態の測距システム20では、外乱推定部34は、最小の非類似度の値c1と、2番目に小さい非類似度の値c2とを用いて算出した信頼度CMSMと信頼度CPKRNとを用いて、外乱である確率Poを求めた。これに対して、測距システムによる信頼度の算出は、例えば、最小の非類似度のみを用いる態様や、最小の非類似度と2番目に小さい非類似度に加え、3番目に小さい非類似度を用いる態様など、外れ値の影響を低減する種々の組み合わせによって外乱である確率Poを求める態様であってもよい。
B2. Alternative Embodiment 2:
In the ranging
B3.他の実施形態3:
上記実施形態の測距システム20では、対応点設定部38は、X方向において隣り合う基準画素に対応する節点間の位置ズレ量である視差変化量を用いて対応点の組み合わせを決定する。これに対して、視差変化量を考慮せず、重み付け非類似度のみによって対応点を設定する態様であってもよい。このような態様においては、より小さな重み付け非類似度が選択される態様であることが好ましい。
B3. Alternative Embodiment 3:
In the
B4.他の実施形態4:
上記実施形態の測距システム20では、対応点設定部38は、重み付け非類似度と接続コストとの和が最小となる組み合わせを対応点として設定する。これに対して、測距システムは、例えば、測距システムを使用する環境に応じて、重み付け非類似度と接続コストとのいずれか一方に更に重み付けをして足し合わせた総和が最小となる組み合わせを対応点として設定してもよいし、重み付け非類似度のみの総和が最小となる組み合わせを対応点として設定してもよい。
B4. Alternative Embodiment 4:
In the ranging
B5.他の実施形態5:
上記実施形態の測距システム20では、平滑処理部40は、距離画像生成部39によって作成された視差画像に対してメディアンフィルタを利用し、視差画像の視差値を平滑化する処理によって視差画像を補正する。これに対して、視差画像の生成前に平滑処理部によって平滑化を行った後に、距離画像生成部によって視差画像を生成する態様であってもよい。また、測距システム20は、平滑処理部を備えず、メディアンフィルタを利用しない態様であってもよい。このような態様においては、加重平均フィルタや移動平均フィルタなどの種々のフィルタによって平滑化するなど、生成する画像の画素ごとの濃度値のノイズの影響を低減する態様であることが好ましい。
B5. Alternative Embodiment 5:
In the
B6.他の実施形態6:
上記実施形態では、測距システム20が自動運転車両100に備えられる態様を例として説明した。これに対して、測距システムは、手動運転車両に備えられる態様であってもよい。なお、「手動運転」とは、駆動部制御のための操作(アクセルペダルの踏込)と、ブレーキ制御のための操作(ブレーキベダルの踏込)と、操舵角制御のための操作(ステアリングホイールの回転)を、ドライバが実行する運転を意味する。
B6. Alternative Embodiment 6:
In the above-described embodiment, a mode in which the
本開示は、上述の実施形態に限られるものではなく、その趣旨を逸脱しない範囲において種々の構成で実現することができる。例えば、発明の概要の欄に記載した各形態中の技術的特徴に対応する実施形態中の技術的特徴は、上述の課題の一部又は全部を解決するために、あるいは、上述の効果の一部又は全部を達成するために、適宜、差し替えや、組み合わせを行うことが可能である。また、その技術的特徴が本明細書中に必須なものとして説明されていなければ、適宜、削除することが可能である。 The present disclosure is not limited to the embodiments described above, and can be implemented in various configurations without departing from the scope of the present disclosure. For example, the technical features in the embodiments corresponding to the technical features in the respective modes described in the Summary of the Invention column may be used to solve some or all of the above problems, or Substitutions and combinations may be made as appropriate to achieve part or all. Also, if the technical features are not described as essential in this specification, they can be deleted as appropriate.
30 測距装置、32 非類似度計算部、34 外乱推定部、36 重み付け部、38 対応点設定部、39 距離画像生成部、40 平滑処理部、La 基準画素、P0 外乱である確率、PL,PL2 基準画像、PR,PR2 比較画像、Ra,Rb,Rc 比較画素 30 ranging device, 32 dissimilarity calculating unit, 34 disturbance estimating unit, 36 weighting unit, 38 corresponding point setting unit, 39 range image generating unit, 40 smoothing processing unit, La reference pixel, P 0 probability of being disturbance, PL , PL2 reference image, PR, PR2 comparison image, Ra, Rb, Rc comparison pixel
Claims (8)
複数の画像のうちの一つの画像である基準画像(PL,PL2)から抽出した一つの画素である基準画素(La)の画素値と、前記複数の画像のうち前記基準画像とは別の画像である比較画像(PR,PR2)から抽出した比較画素(Ra,Rb,Rc)の画素値との類似度の逆数により求められる前記基準画素と前記比較画素との非類似度を、前記基準画素のそれぞれについて演算する非類似度計算部(32)と、
得られた前記基準画素に対する複数の前記比較画素の前記非類似度を用いて、前記基準画素または前記比較画素の少なくともいずれか一方が外乱である確率(P0)を、前記基準画素のそれぞれについて演算する外乱推定部(34)と、
前記確率によって重み付けした前記非類似度である重み付け非類似度を、前記基準画素のそれぞれについて演算する重み付け部(36)と、
前記重み付け非類似度を用いて、前記基準画素のそれぞれに対応する前記比較画素である対応点を設定する対応点設定部(38)と、を備え、
前記基準画素と前記対応点とのずれ量を用いて、前記基準画像に含まれる対象までの距離を決定する、
測距装置。 A ranging device (30),
A pixel value of a reference pixel (La), which is one pixel extracted from a reference image (PL, PL2), which is one of a plurality of images, and an image other than the reference image among the plurality of images The dissimilarity between the reference pixel and the comparison pixel obtained by the reciprocal of the similarity with the pixel value of the comparison pixel (Ra, Rb, Rc) extracted from the comparison image (PR, PR2) is a dissimilarity calculator (32) that calculates each of
Using the obtained dissimilarity of the plurality of comparison pixels to the reference pixel, the probability (P 0 ) that at least one of the reference pixel and the comparison pixel is a disturbance is calculated for each of the reference pixels. a disturbance estimator (34) that calculates
a weighting unit (36) for calculating a weighted dissimilarity, which is the dissimilarity weighted by the probability, for each of the reference pixels;
a corresponding point setting unit (38) that sets corresponding points, which are the comparison pixels corresponding to each of the reference pixels, using the weighted dissimilarity;
Determining a distance to an object included in the reference image using the amount of deviation between the reference pixel and the corresponding point;
rangefinder.
前記外乱推定部は、複数の前記非類似度のうち、最も低い前記非類似度(c1)と、2番目に低い前記非類似度(c2)とを用いて、前記確率を求める、測距装置。 The distance measuring device according to claim 1,
The disturbance estimating unit obtains the probability using the lowest dissimilarity (c 1 ) and the second lowest dissimilarity (c 2 ) among the plurality of dissimilarities. distance device.
前記対応点設定部は、前記基準画素のそれぞれに対して前記比較画素を一つずつ選択し、一の基準画素に対して選択された一の比較画素の視差値と、前記一の基準画素に隣接する他の基準画素に対して選択された他の比較画素の視差値との差によって求められる視差変化量を用いて、前記基準画素のそれぞれに対応する前記対応点の組み合わせを決定する、測距装置。 The distance measuring device according to claim 1 or claim 2,
The corresponding point setting unit selects the comparison pixels one by one for each of the reference pixels, and sets the parallax value of the one comparison pixel selected with respect to the one reference pixel to the one reference pixel. determining a combination of the corresponding points corresponding to each of the reference pixels using a parallax change amount obtained by a difference from a parallax value of another comparison pixel selected with respect to another adjacent reference pixel ; distance device.
前記対応点設定部は、選択された前記比較画素の前記重み付け非類似度と、前記視差変化量との和が最小となるように前記組み合わせを決定する、測距装置。 The distance measuring device according to claim 3,
The distance measuring device, wherein the corresponding point setting unit determines the combination so that the sum of the weighted dissimilarity of the selected comparison pixel and the parallax change amount is minimized.
更に、前記基準画素ごとの前記ずれ量を平滑化する処理を行って前記ずれ量を補正する平滑処理部を備える、測距装置。 The rangefinder according to any one of claims 1 to 4,
The distance measuring device further includes a smoothing processing unit that corrects the deviation amount by smoothing the deviation amount for each of the reference pixels.
前記測距装置は、車両(100)に搭載され、
前記測距装置が夜間に使用される第一の場合、前記車両に備えられるワイパを稼働する第二の場合、前記車両に備えられるライトを点灯する第三の場合、のうち少なくともいずれか一つの場合に該当するときに、前記外乱推定部と前記重み付け部と前記対応点設定部との前記各処理を実行し、前記第一の場合と前記第二の場合と前記第三の場合とのいずれの場合にも該当しないときに、前記外乱推定部と前記重み付け部と前記対応点設定部との前記各処理を実行しない、測距装置。 The rangefinder according to any one of claims 1 to 5,
The rangefinder is mounted on a vehicle (100),
At least one of a first case in which the range finder is used at night, a second case in which the wipers provided in the vehicle are operated, and a third case in which the lights provided in the vehicle are turned on. the disturbance estimating section, the weighting section, and the corresponding point setting section are executed when any of the first case, the second case, and the third case The distance measuring device does not execute each of the processes of the disturbance estimating section, the weighting section, and the corresponding point setting section when the case of (1) does not apply.
前記請求項1から請求項6のいずれか一項に記載の測距装置と、を備える、
測距システム(20)。 an image acquisition unit (22) for acquiring a plurality of images;
and the ranging device according to any one of claims 1 to 6,
A ranging system (20).
前記複数の画像のうちの一つの画像である基準画像から抽出した一つの画素である基準画素の画素値と、前記複数の画像のうち前記基準画像とは別の画像である比較画像から抽出した比較画素の画素値との類似度の逆数により求められる前記基準画素と前記比較画素との非類似度を、前記基準画素のそれぞれについて演算する工程と、
得られた前記基準画素に対する複数の前記比較画素の前記非類似度を用いて、前記基準画素または前記比較画素の少なくともいずれか一方が外乱である確率を、前記基準画素のそれぞれについて演算する工程と、
前記確率によって重み付けした前記非類似度である重み付け非類似度を、前記基準画素のそれぞれについて演算する工程と、
前記重み付け非類似度を用いて、前記基準画素のそれぞれに対応する前記比較画素である対応点を設定する工程と、を備える、測距装置の測距方法。 A distance measurement method for a distance measurement device including an image acquisition unit that acquires a plurality of images,
A pixel value of a reference pixel that is one pixel extracted from a reference image that is one of the plurality of images, and a comparison image that is an image different from the reference image among the plurality of images calculating, for each of the reference pixels, a degree of dissimilarity between the reference pixel and the comparison pixel, which is obtained from the reciprocal of the degree of similarity with the pixel value of the comparison pixel;
calculating the probability that at least one of the reference pixel and the comparison pixel is a disturbance for each of the reference pixels, using the obtained dissimilarity of the plurality of comparison pixels to the reference pixel; ,
calculating a weighted dissimilarity, which is the dissimilarity weighted by the probability, for each of the reference pixels;
and setting a corresponding point, which is the comparison pixel corresponding to each of the reference pixels, using the weighted dissimilarity.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018104431A JP7152880B2 (en) | 2018-05-31 | 2018-05-31 | Ranging device, ranging system and ranging method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018104431A JP7152880B2 (en) | 2018-05-31 | 2018-05-31 | Ranging device, ranging system and ranging method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019211219A JP2019211219A (en) | 2019-12-12 |
JP7152880B2 true JP7152880B2 (en) | 2022-10-13 |
Family
ID=68844046
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018104431A Active JP7152880B2 (en) | 2018-05-31 | 2018-05-31 | Ranging device, ranging system and ranging method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7152880B2 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011210246A (en) | 2010-03-12 | 2011-10-20 | Mitsubishi Electric Research Laboratories Inc | Method for handling occlusion in stereo image |
JP2015114269A (en) | 2013-12-13 | 2015-06-22 | 株式会社日本自動車部品総合研究所 | Corresponding points search method and distance measuring unit |
WO2017104574A1 (en) | 2015-12-14 | 2017-06-22 | 株式会社リコー | Image processing device, object recognition device, apparatus control system, image processing method and program |
-
2018
- 2018-05-31 JP JP2018104431A patent/JP7152880B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011210246A (en) | 2010-03-12 | 2011-10-20 | Mitsubishi Electric Research Laboratories Inc | Method for handling occlusion in stereo image |
JP2015114269A (en) | 2013-12-13 | 2015-06-22 | 株式会社日本自動車部品総合研究所 | Corresponding points search method and distance measuring unit |
WO2017104574A1 (en) | 2015-12-14 | 2017-06-22 | 株式会社リコー | Image processing device, object recognition device, apparatus control system, image processing method and program |
Also Published As
Publication number | Publication date |
---|---|
JP2019211219A (en) | 2019-12-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3082066B1 (en) | Road surface gradient detection device | |
US10129521B2 (en) | Depth sensing method and system for autonomous vehicles | |
JP3868876B2 (en) | Obstacle detection apparatus and method | |
JP6353289B2 (en) | Ranging correction device | |
US8406474B2 (en) | Method and apparatus for identifying obstacle in image | |
JP4697101B2 (en) | Vehicle detection device and light control device | |
US7623700B2 (en) | Stereoscopic image processing apparatus and the method of processing stereoscopic images | |
JP6377970B2 (en) | Parallax image generation apparatus and parallax image generation method | |
JP5402828B2 (en) | Lane boundary detection device, lane boundary detection program | |
JP2009009331A (en) | White line detector and white line detection method | |
US11132530B2 (en) | Method for three-dimensional graphic reconstruction of a vehicle | |
KR102296496B1 (en) | Method for providing robust object distance estimation based on camera by performing pitch calibration of camera more precisely with fusion of information acquired through camera and information acquired through v2v communication and device using the same | |
CN112700486B (en) | Method and device for estimating depth of road surface lane line in image | |
US10043106B2 (en) | Corresponding point searching method and distance detection device | |
WO2019058582A1 (en) | Distance estimation device and method | |
JP2007172500A (en) | Data processor | |
CN110876053A (en) | Image processing device, driving support system, and recording medium | |
JP2019066308A (en) | Parallax calculating device | |
JP4394487B2 (en) | Stereo image processing device | |
JP7152880B2 (en) | Ranging device, ranging system and ranging method | |
CN108292441A (en) | The method of vision system and control vision system for motor vehicles | |
JP6645936B2 (en) | State estimation device | |
JP2019128153A (en) | Distance calculation device and vehicle control device | |
WO2017010268A1 (en) | Estimation device and estimation program | |
JP6132807B2 (en) | Lane mark recognition device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210215 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220131 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220301 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220421 |
|
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: 20220906 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220930 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7152880 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |