JP7152880B2 - Ranging device, ranging system and ranging method - Google Patents

Ranging device, ranging system and ranging method Download PDF

Info

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
Application number
JP2018104431A
Other languages
Japanese (ja)
Other versions
JP2019211219A (en
Inventor
咲子 西野
ホセイン テヘラニニキネジャド
ユーチュエン シュー
誠一 三田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyota School Foundation
Denso Corp
Original Assignee
Toyota School Foundation
Denso Corp
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 Toyota School Foundation, Denso Corp filed Critical Toyota School Foundation
Priority to JP2018104431A priority Critical patent/JP7152880B2/en
Publication of JP2019211219A publication Critical patent/JP2019211219A/en
Application granted granted Critical
Publication of JP7152880B2 publication Critical patent/JP7152880B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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.

特開2015-114269号公報JP 2015-114269 A

このような測距装置では、画素コストと、視差の変化量を表す接続コストとの和である合計コストが最小となるように対応点の組み合わせ(以下、「パス」とも呼ぶ)を計算して、視差が決定される場合がある。しかし、従来技術において、車両のワイパや、降雪などの悪天候による画像上の一時的なノイズが、視差を決定する場合にどのような影響をおよぼすかについて充分に検討されているとはいえない。発明者らは、画像内に一時的なノイズがある場合、従来の技術では画素コストを誤って算出し、この誤った画素コストがパスの計算に用いられることによって誤った視差が決定される場合がある、という課題を有することを見出した。 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)と;得られた前記基準画素に対する前記複数の比較画素の前記非類似度を用いて、前記基準画素または前記比較画素の少なくともいずれか一方が外乱である確率(P)を、前記基準画素のそれぞれについて演算する外乱推定部(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.

測距システムを搭載した自動運転車両の概略構成を示すブロック図。FIG. 1 is a block diagram showing a schematic configuration of an automatic driving vehicle equipped with a ranging system; 測距システムが実行する距離画像生成処理を示すフロー図。FIG. 4 is a flowchart showing distance image generation processing executed by the distance measurement system; 測距システムが撮像した左画像および右画像の模式図。Schematic diagrams of a left image and a right image captured by a ranging system. 非類似度計算部が視差と非類似度をマッピングした結果を表す説明図。FIG. 10 is an explanatory diagram showing a result of mapping disparity and dissimilarity by a dissimilarity calculation unit; 外乱推定部が画素ごとに外乱である確率を求めた結果を表す説明図。Explanatory drawing showing the result which the disturbance estimation part calculated|required the probability that it is a disturbance for every pixel. 重み付け部によって重み付けされた非類似度を表す説明図。FIG. 4 is an explanatory diagram showing dissimilarities weighted by a weighting unit; 対応点設定部による対応点の設定方法を模式的に表す説明図。FIG. 4 is an explanatory diagram schematically showing a method of setting corresponding points by a corresponding point setting unit; 取得した左右の画像から視差画像を生成する処理の説明図。FIG. 4 is an explanatory diagram of processing for generating a parallax image from acquired left and right images;

A.第1実施形態:
図1に示す自動運転車両100は、駆動部制御とブレーキ制御と操舵角制御のすべてを自動で実行する車両である。自動運転車両100は、測距システム20と、制御部50とを備えている。測距システム20は、車両の前方を撮像し、その撮像画像に写った対象までの距離を算出する機能を有する。測距システム20は、画像取得部22と、測距装置30とを備える。本明細書において、「自動運転」とは、ドライバ(運転者)が車両の運転操作を行うことなく、駆動部制御とブレーキ制御と操舵角制御のすべてを自動で実行する運転を意味する。
A. First embodiment:
An automatically driven vehicle 100 shown in FIG. 1 is a vehicle that automatically executes all of drive unit control, brake control, and steering angle control. The automatic driving vehicle 100 includes a ranging system 20 and a control section 50 . The distance measuring system 20 has a function of capturing an image of the front of the vehicle and calculating the distance to the object shown in the captured image. The ranging system 20 includes an image acquisition section 22 and a ranging device 30 . In this specification, "automatic driving" means driving in which drive unit control, brake control, and steering angle control are all automatically performed without the driver performing a driving operation of the vehicle.

画像取得部22は、自動運転車両100の前方を撮像範囲として、複数の画像を取得可能なカメラである。本実施形態において、画像取得部22としては、一対の撮像画像を取得するステレオカメラを採用している。画像取得部22は、自動運転車両100の重力方向について同じ高さで、自動運転車両100の進行方向の左右に離れた位置にそれぞれ配置される。画像取得部22は、例えば白線の走路区画線と黄線の走路区画線を区別するために、対象物の色を識別可能なカラーカメラであることが好ましい。 The image acquisition unit 22 is a camera capable of acquiring a plurality of images with an imaging range in front of the automatic driving vehicle 100 . In this embodiment, a stereo camera that acquires a pair of captured images is used as the image acquisition unit 22 . The image acquisition units 22 are arranged at the same height with respect to the direction of gravity of the automatically driven vehicle 100 and at positions separated to the left and right of the traveling direction of the automatically driven vehicle 100 . The image acquisition unit 22 is preferably a color camera capable of distinguishing the color of the object in order to distinguish white lane markings and yellow lane markings, for example.

測距装置30は、カメラECUであり、CPUとメモリとを含む回路である。測距装置30は、不揮発性記憶媒体に格納されたコンピュータプログラムを実行することによって、非類似度計算部32と、外乱推定部34と、重み付け部36と、対応点設定部38と、距離画像生成部39と、平滑処理部40との機能をそれぞれ実現する。測距装置30は、画像取得部22によって撮影された左右の画像を基準画像及び比較画像として用いて、視差画像を生成する。視差画像は、基準画像に存在する物体までの距離を表す画像であることから、「距離画像」とも呼ぶ。なお、測距装置30の機能の一部をハードウェア回路で実現するようにしてもよい。 The distance measuring device 30 is a camera ECU, and is a circuit including a CPU and a memory. By executing a computer program stored in a non-volatile storage medium, the distance measuring device 30 calculates a dissimilarity calculation unit 32, a disturbance estimation unit 34, a weighting unit 36, a corresponding point setting unit 38, and a distance image. The functions of the generating unit 39 and the smoothing processing unit 40 are realized respectively. The distance measuring device 30 uses the left and right images captured by the image acquisition unit 22 as a reference image and a comparison image to generate parallax images. A parallax image is also called a "distance image" because it is an image representing the distance to an object existing in the reference image. A part of the functions of the distance measuring device 30 may be realized by a hardware circuit.

制御部50は、複数のECUから構成される。制御部50は、画像認識処理の結果を測距システム20から取得し、衝突を回避するための駆動部制御とブレーキ制御と操舵角制御を実行する。 The control unit 50 is composed of a plurality of ECUs. The control unit 50 acquires the result of image recognition processing from the distance measuring system 20, and executes drive unit control, brake control, and steering angle control for avoiding a collision.

図2に示すように、本実施形態の測距システム20の各部によって、距離画像生成処理の各処理が実行される。ステップS10において、画像取得部22は、左右のカメラによって基準画像と、比較画像とを取得する。ステップS20からステップS70までの制御は、測距システム20の測距装置30の各部の制御によって実行される。 As shown in FIG. 2, each part of the distance measuring system 20 of this embodiment executes each process of the distance image generation process. In step S10, the image acquisition unit 22 acquires a reference image and a comparison image using the left and right cameras. Control from step S<b>20 to step S<b>70 is executed by control of each part of distance measuring device 30 of distance measuring system 20 .

ステップ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 dissimilarity calculator 32 calculates the dissimilarity from the pixel values of the reference pixel and the comparison pixel. More specifically, in step S22, the dissimilarity calculator 32 selects one reference pixel from the acquired reference image. In step S24, the dissimilarity calculator 32 selects one comparison pixel having the same height in the Y direction as the selected reference pixel. In step S25, the dissimilarity calculator 32 calculates the parallax of the comparison pixel with respect to the reference pixel. In step S26, the dissimilarity calculator 32 calculates the dissimilarity between the reference pixel and the comparison pixel. In step S28, the dissimilarity calculator 32 confirms whether or not all comparison pixels in the comparison image have been selected for one reference pixel. If the dissimilarity calculation unit 32 does not determine that all comparison pixels have been selected (S28: NO), the process returns to step S24. When determining that all the comparison pixels have been selected (S28: YES), the dissimilarity calculation unit 32 confirms whether or not all the reference pixels in the reference image have been selected in step S29. If it is not determined that all the reference pixels have been selected (S29: NO), the process of the dissimilarity calculator 32 returns to step S22. When all the reference pixels have been selected (S29: YES), that is, when the dissimilarity calculation for all the reference pixels is completed, the processing by the dissimilarity calculation unit 32 is terminated, and the processing of step S30 is executed. be done.

ステップS30において、外乱推定部34は、後述する式(1)~(5)に、ステップS20で算出された非類似度のうち最も低い非類似度および2番目に低い非類似度を用いて、基準画素が外乱である確率P(以下、単に「確率P」とも呼ぶ)を、基準画素ごとに算出する。ステップS40において、重み付け部36は、ステップS20で算出された非類似度と、確率Pとを掛け合わせた重み付け非類似度を算出する。 In step S30, the disturbance estimating unit 34 uses the lowest dissimilarity and the second lowest dissimilarity among the dissimilarities calculated in step S20 in equations (1) to (5) described later, A probability P 0 that the reference pixel is a disturbance (hereinafter also simply referred to as “probability P 0 ”) is calculated for each reference pixel. In step S40, the weighting unit 36 calculates a weighted dissimilarity by multiplying the dissimilarity calculated in step S20 by the probability P0 .

ステップS50において、対応点設定部38は、ステップS40において算出された重み付け非類似度と、接続コストとを用いて基準画素ごとに対応点を設定する。ステップS60において、距離画像生成部39は、基準画像と比較画像とから、距離画像としての視差画像を作成する。ステップS70において、平滑処理部40は、メディアンフィルタによって視差を平滑化する処理を行って、視差を補正した視差画像を得る。以上により、本実施形態の測距システム20による距離画像生成処理は終了する。 In step S50, the corresponding point setting unit 38 sets corresponding points for each reference pixel using the weighted dissimilarity calculated in step S40 and the connection cost. In step S60, the distance image generator 39 creates a parallax image as a distance image from the reference image and the comparison image. In step S<b>70 , the smoothing processing unit 40 performs processing for smoothing the parallax using a median filter to obtain a parallax image in which the parallax is corrected. With the above, the distance image generation processing by the distance measuring system 20 of the present embodiment ends.

図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 dissimilarity calculation unit 32 will be described with reference to FIG. FIG. 3 shows an example in which the left image PL and the right image PR captured by the image acquisition unit 22 are sampled. A left image PL schematically shows a dot-matrix image captured by the left camera of the image acquisition unit 22 . Similarly, the right image PR schematically shows a dot-matrix image captured by the right camera of the image acquisition section 22 . The resolution of these images is expressed in pixels. The left image PL and the right image PR in FIG. 3 are composed of 14×8 pixels for easy understanding of the technology, but are not limited to this, and images composed of pixels larger than 14×8 pixels. may be Note that the X direction in the drawing represents the horizontal direction of the image, and the Y direction represents the gravity direction of the image.

画像取得部22の左右のカメラは、上述したように重力方向において同じ高さに配される。そのため、左画像PLおよび右画像PRは、重力方向の同じ高さであって、互いに水平方向の左右に離れたそれぞれの位置から、同一の方向である自動運転車両100の前方を撮像した画像となる。よって、基準画像の行番号と比較画像の行番号との高さは互いに一致している。ここで、右画像PRには、本実施形態の自動運転車両100に搭載されたワイパDpが撮像されている。このワイパDpは、右画像PRのみに撮像されたいわゆる外乱である。このワイパDpを、以下「外乱Dp」とも呼ぶ。本明細書において、外乱とは、画像取得部22の左右のカメラのうち、一方のカメラのみに撮像されたオブジェクトを意味する。 The left and right cameras of the image acquisition unit 22 are arranged at the same height in the direction of gravity as described above. Therefore, the left image PL and the right image PR are the same height in the gravitational direction, and are taken from respective positions separated from each other in the horizontal direction to the left and right, respectively, in front of the automatic driving vehicle 100 in the same direction. Become. Therefore, the heights of the line numbers of the reference image and the line numbers of the comparison image match each other. Here, in the right image PR, the wiper Dp mounted on the automatic driving vehicle 100 of this embodiment is imaged. This wiper Dp is a so-called disturbance imaged only in the right image PR. This wiper Dp is hereinafter also referred to as "disturbance Dp". In this specification, a disturbance means an object imaged by only one of the left and right cameras of the image acquisition unit 22 .

非類似度計算部32は、基準画像から基準画素を抽出し、比較画像から比較画素を抽出し、基準画素と比較画素との画素値から非類似度を演算する機能を有する。本実施形態の非類似度計算部32は、左画像PLを基準画像として用いる。以下、左画像PLを基準画像PLとも呼ぶ。非類似度計算部32は、基準画像PLを構成する画素のうち一つの画素を基準画素として選択し、これを順に繰り返して基準画像PLの全て画素を選択する。基準画素の選択の順序は、どのような順序であってもよい。本実施形態では、非類似度計算部32は、初めに左上の画素を基準画素として選択し、1画素ずつ順に右にずらしていく。非類似度計算部32は、基準画素を右端まで選択したら、Y方向について1画素分を下にずらして、左端から同様に継続する。このようにして、全ての画素が基準画素として選択される。本実施形態において、基準画素が選択されると、基準画素を取り囲む8つの周辺画素も付随して選択される。基準画素および周辺画素を取り囲む矩形状の領域は、窓と呼ばれる。本実施形態において、窓は、1辺を3画素とする正方形である。窓の1辺は3画素には限定されず、2画素であってもよく、4画素以上であってもよい。 The dissimilarity calculator 32 has a function of extracting a reference pixel from a reference image, extracting a comparison pixel from a comparison image, and calculating a dissimilarity from the pixel values of the reference pixel and the comparison pixel. The dissimilarity calculator 32 of this embodiment uses the left image PL as a reference image. Hereinafter, the left image PL will also be referred to as a reference image PL. The dissimilarity calculator 32 selects one pixel as a reference pixel from among the pixels forming the reference image PL, and repeats this in order to select all the pixels of the reference image PL. The order of selection of reference pixels may be any order. In the present embodiment, the dissimilarity calculation unit 32 first selects the upper left pixel as the reference pixel, and sequentially shifts it to the right by one pixel. After selecting the reference pixels up to the right end, the dissimilarity calculation unit 32 shifts one pixel downward in the Y direction and continues in the same manner from the left end. In this way, all pixels are selected as reference pixels. In this embodiment, when a reference pixel is selected, eight surrounding pixels surrounding the reference pixel are also selected. A rectangular area surrounding the reference pixel and surrounding pixels is called a window. In this embodiment, the window is a square with 3 pixels on each side. One side of the window is not limited to 3 pixels, and may be 2 pixels or 4 pixels or more.

本実施形態の非類似度計算部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 dissimilarity calculator 32 of this embodiment uses the right image PR as a comparison image. Hereinafter, the right image PR will also be referred to as a comparison image PR. Note that the distance measurement system 20 may be configured such that the right image PR is the reference image and the left image PL is the comparison image. Peripheral pixels included in the window are also selected when the comparison pixels are selected. Pixels to be selected as comparison pixels are pixels in the comparison image PR whose position in the Y direction, ie, height, matches that of the reference pixel. Template matching (also called “block matching”) is used to extract comparison pixels from the comparison image PR. In this embodiment, NCC (Normalized Cross Correlation) is used to calculate the similarity between windows. Note that SAD (Sum of Absolute Difference) or SSD (Sum of Squared Difference) may be used to calculate the degree of similarity. The degree of similarity is a quantified degree of similarity between pixel values of windows containing pixels to be compared. In this embodiment, the degree of similarity is expressed in a range from 0 to 1, and the closer to 1, the more similar. In this specification, a pixel value is a density value (also called a "luminance value") that corresponds to the brightness of a pixel. RGB density values are used as pixel values in this embodiment. When the captured image is a color image, the value of luminance Y represented by the following equation (a), in which each density value of RGB is expressed as R, G, and B, respectively, may be used.
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 dissimilarity calculation unit 32 determines a parallax value, which is the amount of deviation between the reference pixel and the comparison pixel, along with the selection of the comparison pixel. A parallax value is expressed in units of pixels. In the reference image PL of FIG. 3, an example is shown in which a pixel positioned 6 pixels from the left in the X direction and 4 pixels from the top in the Y direction is selected as the reference pixel La. Hereinafter, X=n denotes that the position in the X direction is the position of the n-th pixel from the left. The comparative image PR in FIG. 3 shows an example in which the comparative pixel Ra positioned at X=2, the comparative pixel Rb positioned at X=6, and the comparative pixel Rc positioned at X=10 are selected. . For the comparison pixel Rb, the parallax value with respect to the reference pixel La is zero. On the other hand, the comparison pixel Rc has a parallax value of −4 pixels with respect to the reference pixel La, and the comparison pixel Ra has a parallax value of 4 pixels with respect to the reference pixel La. In this way, the dissimilarity calculation unit 32 determines the parallax value between the target reference pixel and each comparison pixel having the same position in the Y direction for each reference pixel.

図4を用いて、非類似度計算部32による非類似度を算出する機能について説明する。非類似度計算部32は、基準画素と比較画素との非類似度の結果を、節点(node)として格子状にマッピングする。図4の横軸は、基準画像PLのX方向における1ピクセル毎の基準画素の位置を表す。図4の縦軸は、基準画素に対応する比較画素の視差値を表す。節点はX方向の画素数や視差値に相当する数をマッピングされるが、技術の理解を容易にするため、図4では図示を省略して一部の節点のみが示されている。本実施形態において、非類似度とは、一つの基準画素を含む窓と、一つの比較画素を含む窓との画素値の非類似の程度を数値化したものを表し、画素コストとも呼ばれる。非類似度は、窓同士の非類似の程度には限定されず、画素同士の非類似の程度を数値化したものであってもよい。非類似度は、1/(類似度)として、類似度の逆数とする式によって表される。非類似度は、大きい数値であるほど非類似であることを示す。 The function of calculating the dissimilarity by the dissimilarity calculator 32 will be described with reference to FIG. The dissimilarity calculator 32 maps the result of the dissimilarity between the reference pixel and the comparison pixel as nodes in a grid pattern. The horizontal axis of FIG. 4 represents the position of the reference pixel for each pixel in the X direction of the reference image PL. The vertical axis in FIG. 4 represents the parallax value of the comparison pixel corresponding to the reference pixel. Although the number of pixels in the X direction and the number corresponding to the parallax value are mapped to the nodes, only some of the nodes are shown in FIG. In the present embodiment, the dissimilarity is a quantified degree of dissimilarity between pixel values of a window containing one reference pixel and a window containing one comparison pixel, and is also called pixel cost. The degree of dissimilarity is not limited to the degree of dissimilarity between windows, and may be a numerical value of the degree of dissimilarity between pixels. The dissimilarity is expressed as 1/(similarity) by a formula that is the reciprocal of the similarity. A higher dissimilarity value indicates a higher degree of dissimilarity.

非類似度計算部32は、基準画像PL内の各基準画素に対する各比較画素との非類似度を、視差ごとにマッピングする。図4の例では、Y方向において上から4ピクセルの位置を高さとする基準画素が選択された場合の例を表している。この図4に例示されたような非類似度のマッピングは、基準画素の高さ分、すなわち基準画像PLの例において8行分である8組分を作成される。 The dissimilarity calculator 32 maps the dissimilarity between each reference pixel in the reference image PL and each comparison pixel for each parallax. In the example of FIG. 4, a reference pixel having a height of four pixels from the top in the Y direction is selected. The dissimilarity mapping as exemplified in FIG. 4 is created for eight groups corresponding to the height of the reference pixel, that is, eight rows in the example of the reference image PL.

本実施形態の測距装置30が備える外乱推定部34の機能を説明する。外乱推定部34は、上述した非類似度計算部32によって算出された非類似度を用いて、基準画素または比較画素の少なくともいずれか一方が外乱である確率を、基準画像PL内の基準画素のそれぞれについて演算する。はじめに、外乱推定部34は、以下の式(1)、式(2)を用いて、MSM(the matching score measure)法による信頼度CMSMと、PKRN(peak-ratio naive)法による信頼度CPKRNとを演算する。 The function of the disturbance estimator 34 included in the distance measuring device 30 of this embodiment will be described. The disturbance estimation unit 34 uses the dissimilarity calculated by the dissimilarity calculation unit 32 to calculate the probability that at least one of the reference pixel and the comparison pixel is the disturbance of the reference pixel in the reference image PL. Compute for each. First, the disturbance estimating unit 34 uses the following equations (1) and (2) to calculate the reliability C MSM by the matching score measure (MSM) method and the reliability C by the PKRN (peak-ratio naive) method Calculate PKRN .

Figure 0007152880000001
Figure 0007152880000001
Figure 0007152880000002
Figure 0007152880000002

は最小の非類似度の値を表し、cは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 disturbance estimation unit 34 calculates probabilities using the following equations (3) and (4).

Figure 0007152880000003
Figure 0007152880000003
Figure 0007152880000004
Figure 0007152880000004

およびNは、カメラや使用状況などの特性に応じて定まる固定値である。本実施形態において、N=10、N=1の値が用いられる。最後に、外乱推定部34は、基準画素または比較画素の少なくとも一方が外乱である確率Pを、PMSMとPPKRNを用いた以下の式(5)を用いて演算する。確率Pは、基準画素ごとに算出される。 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 disturbance estimator 34 calculates the probability P o that at least one of the reference pixel and the comparison pixel is the disturbance using the following equation (5) using P MSM and P PKRN . The probability Po is calculated for each reference pixel.

Figure 0007152880000005
Figure 0007152880000005

図5には、基準画像PLのY方向の上から4ピクセルの高さの基準画素の列での基準画素ごとに算出された確率Pの一部を例示している。このように、統計上の外れ値の影響を低減した信頼度を用いて、基準画素または比較画素の少なくとも一方が外乱である確率が算出される。この外乱である確率を導入して非類似度を算出することによって、外乱の影響を低減した視差が得られる。 FIG. 5 illustrates part of the probability P 0 calculated for each reference pixel in a reference pixel row having a height of 4 pixels from the top in the Y direction of the reference image PL. In this way, the probability that at least one of the reference pixel and the comparison pixel is the disturbance is calculated using the reliability that reduces the influence of the statistical outlier. By introducing this probability of being a disturbance and calculating the dissimilarity, a parallax in which the influence of the disturbance is reduced can be obtained.

図6を用いて、本実施形態の測距装置30が備える重み付け部36の機能について説明する。節点はX方向の画素数や視差値に相当する数をマッピングされるが、技術の理解を容易にするため、図6では図示を省略して一部の節点のみが示されている。重み付け部36は、重み付け非類似度を演算する機能を備える。重み付け非類似度とは、非類似度計算部32によって算出された非類似度を、外乱推定部34によって算出された上述の確率Pによって重み付けされた非類似度である。重み付け非類似度は、マッピングされた各基準画素の非類似度(図4参照)に、X方向の列ごとの確率P(図5参照)を掛け合わせて求められる。例えば、図6の列X1のすべての非類似度には、図5のX=1の場合の確率P=1が掛け合わせられ、図6の列X2のすべての非類似度には、図5のX=2の確率P=0.1が掛け合わせられる。すなわち、マッピングされた節点の視差間では、掛け合わせられる確率Pは同じである。図6の各節点には、技術の理解を容易にするため、非類似度と確率Pとを掛け合わせた状態、すなわち算出途中の状態、の重み付け非類似度が示されている。また、図6では、Y方向の上から4ピクセルの位置を高さとする基準画素が選択された場合の例が示されている。重み付け部36は、重み付け非類似度を全ての高さの基準画素に対して算出する。すなわち、この図6に例示されたような重み付け非類似度の算出は、基準画素の高さ分、すなわち基準画像PLの例において8行分である8組分を実行される。 The function of the weighting unit 36 included in the distance measuring device 30 of this embodiment will be described with reference to FIG. Although the number of nodes corresponding to the number of pixels in the X direction and the number of parallax values are mapped, only some of the nodes are shown in FIG. The weighting unit 36 has a function of calculating a weighted dissimilarity. The weighted dissimilarity is a dissimilarity obtained by weighting the dissimilarity calculated by the dissimilarity calculator 32 by the probability P 0 calculated by the disturbance estimator 34 . The weighted dissimilarity is obtained by multiplying the dissimilarity of each mapped reference pixel (see FIG. 4) by the probability P 0 (see FIG. 5) for each column in the X direction. For example, all dissimilarities in column X1 of FIG. 6 are multiplied by the probability P 0 =1 for X=1 in FIG. 5 are multiplied by the probability P 0 =0.1 of X=2. That is, between disparities of mapped nodes, the multiplied probabilities P 0 are the same. Each node in FIG. 6 shows the weighted dissimilarity in the state in which the dissimilarity is multiplied by the probability P0 , that is, the state in the process of calculation, in order to facilitate understanding of the technology. Also, FIG. 6 shows an example in which a reference pixel having a height of 4 pixels from the top in the Y direction is selected. The weighting unit 36 calculates the weighted dissimilarity with respect to the reference pixels of all heights. That is, the calculation of the weighted dissimilarity as illustrated in FIG. 6 is performed for the height of the reference pixel, that is, for eight rows corresponding to eight groups in the example of the reference image PL.

図7を用いて、本実施形態の測距装置30が備える対応点設定部38および距離画像生成部39の機能について説明する。図7では、図6と同様に技術の理解を容易にするため一部の節点の図示が省略されている。対応点設定部38は、ビタビアルゴリズムを用いて、重み付け部36が算出した重み付け非類似度から基準画素のそれぞれに対応する比較画素である対応点を設定する。ビタビアルゴリズムとは、尤もらしい経路を探索する動的計画法アルゴリズムの一種である。対応点設定部38は、基準画像の全ての高さに対して対応点を設定し、全ての基準画素に対して対応点を設定する。 Functions of the corresponding point setting unit 38 and the distance image generation unit 39 included in the distance measuring device 30 of the present embodiment will be described with reference to FIG. In FIG. 7, as in FIG. 6, illustration of some nodes is omitted to facilitate understanding of the technology. The corresponding point setting unit 38 uses the Viterbi algorithm to set corresponding points, which are comparison pixels corresponding to each of the reference pixels, from the weighted dissimilarity calculated by the weighting unit 36 . The Viterbi algorithm is a type of dynamic programming algorithm that searches for plausible paths. The corresponding point setting unit 38 sets corresponding points for all heights of the reference image and sets corresponding points for all reference pixels.

本実施形態のビタビアルゴリズムには、マルチパスビタビアルゴリズム(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 point setting unit 38 calculates the sum of the weighted dissimilarity and the connection cost. The corresponding point setting unit 38 sets the combination of nodes that minimizes the sum as the combination of corresponding points at one height of the reference image. The corresponding point setting unit 38 repeats this for all heights of the reference image, and sets corresponding points for all reference pixels in the reference image.

図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 point setting unit 38 thus calculates the sum of the weighted dissimilarity and the connection cost for all the combinations of the nodes, and selects the combination that minimizes the sum of the weighted dissimilarity and the connection cost as the corresponding point. set. In FIG. 7, the combination from node NP1 to node NP3 via node NP2 has the smallest sum of weighted dissimilarity and connection cost among all combinations. At this time, the corresponding point setting unit 38 sets a combination of pixels corresponding to the nodes NP1, NP2, and NP3 as corresponding points. The corresponding point setting unit 38 sets corresponding points for each height of the reference image, and sets corresponding points for all reference pixels. As described above, according to the ranging system 20 of the present embodiment, the multipath Viterbi algorithm performs optimization by combining corresponding points that minimize the sum of the weighted dissimilarity and the parallax change amount. The larger the value of the parallax change amount, the higher the possibility of extracting an erroneous parallax. The ranging system 20 of the present embodiment uses the parallax change amounts indicated by D1 to D4 in the figure for setting corresponding points. Therefore, a combination of corresponding points can be obtained while reducing the possibility of extracting an erroneous parallax. Also, by applying the existing multi-pass Viterbi algorithm, it is possible to set the weighted dissimilarity of the most probable sequence by a simpler method. In addition, compared to the aspect of setting corresponding points only by the weighted dissimilarity without using the parallax change amount, there is a problem that an erroneous parallax is determined by selecting an erroneous weighted dissimilarity due to the influence of disturbance. The occurrence can be suppressed.

距離画像生成部39は、設定された対応点に対応する視差値から、距離画像としての視差画像を作成する。平滑処理部40は、メディアンフィルタを利用し、視差画像の視差値を平滑化する処理によって視差画像を補正する。本実施形態の平滑処理部40は、定時荷重メディアンフィルタ(the constant time weighted median filter)を利用する。メディアンフィルタには、荷重メディアンフィルタ(weighted median filter)やメディアンフィルタ(unweighted median filter)が利用されてもよい。メディアンフィルタの導入により、視差画像上において、視差値に含まれたノイズを低減し、物体の境界であるエッジ部分をより明確に抽出させることができる。 The distance image generator 39 creates a parallax image as a distance image from the parallax values corresponding to the set corresponding points. The smoothing processing unit 40 uses a median filter to correct the parallax images by smoothing the parallax values of the parallax images. The smoothing unit 40 of this embodiment utilizes the constant time weighted median filter. A weighted median filter or an unweighted median filter may be used as the median filter. By introducing the median filter, it is possible to reduce the noise included in the parallax values on the parallax image and more clearly extract the edge portion, which is the boundary of the object.

図8を用いて、測距システム20による距離画像生成処理によって生成される画像について説明する。図8の最上段には、画像取得部22によって取得された基準画像PL2および比較画像PR2が示されている。比較画像PR2には、自動運転車両100に搭載されたワイパ(以下、「外乱Dp2」とも呼ぶ)が示されている。非類似度計算部32は、基準画像PL2と比較画像PR2とから非類似度を計算する。外乱推定部34は、外乱である確率Pを算出する。算出した外乱である確率Pによって表される画像が、図8の中段にある画像PC1である。画像PC1において、外乱である確率Pが高いほど画像が黒色に近い色として表される。画像PC1の右下は、右画像PR2の外乱Dpに相当する位置の周辺であり、外乱である確率Pの高い領域DRが示されている。 An image generated by distance image generation processing by the distance measurement system 20 will be described with reference to FIG. At the top of FIG. 8, the reference image PL2 and the comparison image PR2 obtained by the image obtaining section 22 are shown. The comparative image PR2 shows a wiper mounted on the automatic driving vehicle 100 (hereinafter also referred to as "disturbance Dp2"). The dissimilarity calculator 32 calculates the dissimilarity from the reference image PL2 and the comparison image PR2. The disturbance estimator 34 calculates a probability P0 of disturbance. The image represented by the calculated disturbance probability P0 is the image PC1 in the middle of FIG. In the image PC1, the higher the probability P0 of the disturbance, the closer the image is to black. The lower right of the image PC1 is the periphery of the position corresponding to the disturbance Dp in the right image PR2, and the area DR with a high probability of being the disturbance P0 is shown.

重み付け部36は、外乱である確率Pによって非類似度に重み付けをした重み付け非類似度を算出する。対応点設定部38によって対応点が設定され、距離画像生成部39によって視差画像が生成される。視差画像は、平滑処理部40によって平滑化処理をされて、距離画像DIとして生成される。距離画像DIの右下近傍には、領域DRに相当する外乱の影響を受けた部分が除去されている。このように、本実施形態の測距システム20によれば、非類似度は、外乱推定部34によって演算された外乱である確率Pを考慮した重み付け非類似度として算出される。これにより、外乱の影響を低減した視差画像が得られることができる。したがって、外乱の影響を受けて誤った視差を算出する不具合の発生が低減され、正しい視差を誤った視差に補正してしまう不具合が低減されることができる。 The weighting unit 36 calculates a weighted dissimilarity by weighting the dissimilarity with the probability P0 of disturbance. A corresponding point setting unit 38 sets corresponding points, and a distance image generating unit 39 generates a parallax image. The parallax image is smoothed by a smoothing processor 40 and generated as a distance image DI. In the vicinity of the lower right of the distance image DI, the portion affected by the disturbance corresponding to the area DR is removed. Thus, according to the ranging system 20 of the present embodiment, the dissimilarity is calculated as a weighted dissimilarity considering the probability P0 of the disturbance calculated by the disturbance estimator 34 . This makes it possible to obtain a parallax image in which the influence of disturbance is reduced. Therefore, it is possible to reduce the occurrence of the problem of calculating an incorrect parallax under the influence of disturbance, and reduce the problem of correcting the correct parallax to an incorrect parallax.

B.他の実施形態:
B1.他の実施形態1:
上記実施形態の測距システム20では、各部の機能は使用される環境によって制限されることなく稼働する態様を例として示した。これに対して、測距システムを使用する環境に応じて外乱推定部34、重み付け部36、対応点設定部38との各処理が実行される態様であってもよい。上述したように、外乱とは、画像取得部の左右のカメラのうち、一方のカメラのみに撮像されたオブジェクトを意味する。車両の走行において、外乱の影響が大きいと考えられる環境としては、例えば次のような場合が想定される。測距システムを夜間に使用する場合、自動運転車両に備えられるワイパを稼働する場合、自動運転車両に備えられるライトを点灯する場合、降雪の激しい場合などである。測距システムは、これらの環境のうち少なくともいずれか一つの場合の環境に該当するときに、外乱推定部、重み付け部、対応点設定部との各処理を実行し、これらの環境のいずれにも該当しないときには各処理を実行しない態様であってもよい。このような態様においては、外乱の影響が小さい環境での処理の負荷が低減されることができる。
B. Other embodiments:
B1. Alternative Embodiment 1:
In the distance measuring system 20 of the above-described embodiment, the function of each unit is shown as an example in which it operates without being restricted by the environment in which it is used. Alternatively, the processes of the disturbance estimating section 34, the weighting section 36, and the corresponding point setting section 38 may be executed according to the environment in which the ranging system is used. As described above, the disturbance means an object imaged by only one of the left and right cameras of the image acquisition unit. For example, the following cases are assumed as environments in which the influence of disturbance is considered to be large in vehicle travel. This includes using the distance measuring system at night, activating the wipers provided in the autonomous vehicle, turning on the lights provided in the autonomous vehicle, and heavy snowfall. When the ranging system corresponds to at least one of these environments, the disturbance estimator, the weighting unit, and the corresponding point setting unit perform each process. Each process may not be executed when it does not apply. In such an aspect, the processing load can be reduced in an environment where the influence of disturbance is small.

B2.他の実施形態2:
上記実施形態の測距システム20では、外乱推定部34は、最小の非類似度の値cと、2番目に小さい非類似度の値cとを用いて算出した信頼度CMSMと信頼度CPKRNとを用いて、外乱である確率Pを求めた。これに対して、測距システムによる信頼度の算出は、例えば、最小の非類似度のみを用いる態様や、最小の非類似度と2番目に小さい非類似度に加え、3番目に小さい非類似度を用いる態様など、外れ値の影響を低減する種々の組み合わせによって外乱である確率Pを求める態様であってもよい。
B2. Alternative Embodiment 2:
In the ranging system 20 of the above-described embodiment, the disturbance estimator 34 uses the minimum dissimilarity value c1 and the second smallest dissimilarity value c2 to calculate the reliability C MSM and the reliability The probability P o of being a disturbance was obtained using the degree C PKRN . On the other hand, the calculation of reliability by the ranging system, for example, uses only the lowest dissimilarity, or uses the lowest dissimilarity and the second lowest dissimilarity, and the third lowest dissimilarity It is also possible to obtain the probability P o of disturbance by various combinations that reduce the influence of outliers, such as a mode using degrees.

B3.他の実施形態3:
上記実施形態の測距システム20では、対応点設定部38は、X方向において隣り合う基準画素に対応する節点間の位置ズレ量である視差変化量を用いて対応点の組み合わせを決定する。これに対して、視差変化量を考慮せず、重み付け非類似度のみによって対応点を設定する態様であってもよい。このような態様においては、より小さな重み付け非類似度が選択される態様であることが好ましい。
B3. Alternative Embodiment 3:
In the distance measuring system 20 of the above-described embodiment, the corresponding point setting unit 38 determines a combination of corresponding points using the parallax change amount, which is the amount of positional deviation between nodes corresponding to reference pixels adjacent in the X direction. On the other hand, it is also possible to set corresponding points based only on the weighted dissimilarity without considering the parallax change amount. In such an aspect, it is preferred that a smaller weighted dissimilarity is selected.

B4.他の実施形態4:
上記実施形態の測距システム20では、対応点設定部38は、重み付け非類似度と接続コストとの和が最小となる組み合わせを対応点として設定する。これに対して、測距システムは、例えば、測距システムを使用する環境に応じて、重み付け非類似度と接続コストとのいずれか一方に更に重み付けをして足し合わせた総和が最小となる組み合わせを対応点として設定してもよいし、重み付け非類似度のみの総和が最小となる組み合わせを対応点として設定してもよい。
B4. Alternative Embodiment 4:
In the ranging system 20 of the above-described embodiment, the corresponding point setting unit 38 sets the combination that minimizes the sum of the weighted dissimilarity and the connection cost as corresponding points. On the other hand, the ranging system further weights either one of the weighted dissimilarity and the connection cost according to the environment in which the ranging system is used, for example. may be set as the corresponding points, or a combination that minimizes the sum of only the weighted dissimilarities may be set as the corresponding points.

B5.他の実施形態5:
上記実施形態の測距システム20では、平滑処理部40は、距離画像生成部39によって作成された視差画像に対してメディアンフィルタを利用し、視差画像の視差値を平滑化する処理によって視差画像を補正する。これに対して、視差画像の生成前に平滑処理部によって平滑化を行った後に、距離画像生成部によって視差画像を生成する態様であってもよい。また、測距システム20は、平滑処理部を備えず、メディアンフィルタを利用しない態様であってもよい。このような態様においては、加重平均フィルタや移動平均フィルタなどの種々のフィルタによって平滑化するなど、生成する画像の画素ごとの濃度値のノイズの影響を低減する態様であることが好ましい。
B5. Alternative Embodiment 5:
In the distance measuring system 20 of the above-described embodiment, the smoothing processing unit 40 uses a median filter for the parallax images created by the distance image generation unit 39, and smoothes the parallax values of the parallax images to smooth the parallax images. to correct. On the other hand, the distance image generation unit may generate the parallax images after smoothing is performed by the smoothing processing unit before the generation of the parallax images. Further, the distance measuring system 20 may be configured without a smoothing processor and without using a median filter. In such a mode, it is preferable to reduce the influence of noise on the density value of each pixel of the image to be generated, such as smoothing with various filters such as a weighted average filter and a moving average filter.

B6.他の実施形態6:
上記実施形態では、測距システム20が自動運転車両100に備えられる態様を例として説明した。これに対して、測距システムは、手動運転車両に備えられる態様であってもよい。なお、「手動運転」とは、駆動部制御のための操作(アクセルペダルの踏込)と、ブレーキ制御のための操作(ブレーキベダルの踏込)と、操舵角制御のための操作(ステアリングホイールの回転)を、ドライバが実行する運転を意味する。
B6. Alternative Embodiment 6:
In the above-described embodiment, a mode in which the distance measuring system 20 is provided in the automatically driving vehicle 100 has been described as an example. On the other hand, the ranging system may be provided in a manually operated vehicle. "Manual operation" includes operations for controlling the drive unit (depressing the accelerator pedal), operations for controlling the brakes (depressing the brake pedal), and operations for controlling the steering angle (rotation of the steering wheel). ) means the driving performed by the driver.

本開示は、上述の実施形態に限られるものではなく、その趣旨を逸脱しない範囲において種々の構成で実現することができる。例えば、発明の概要の欄に記載した各形態中の技術的特徴に対応する実施形態中の技術的特徴は、上述の課題の一部又は全部を解決するために、あるいは、上述の効果の一部又は全部を達成するために、適宜、差し替えや、組み合わせを行うことが可能である。また、その技術的特徴が本明細書中に必須なものとして説明されていなければ、適宜、削除することが可能である。 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 基準画素、P 外乱である確率、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)

測距装置(30)であって、
複数の画像のうちの一つの画像である基準画像(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.
請求項1に記載の測距装置であって、
前記外乱推定部は、複数の前記非類似度のうち、最も低い前記非類似度(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.
請求項1または請求項2に記載の測距装置であって、
前記対応点設定部は、前記基準画素のそれぞれに対して前記比較画素を一つずつ選択し、一の基準画素に対して選択された一の比較画素の視差値と、前記一の基準画素に隣接する他の基準画素に対して選択された他の比較画素の視差値との差によって求められる視差変化量を用いて、前記基準画素のそれぞれに対応する前記対応点の組み合わせを決定する、測距装置。
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.
請求項3に記載の測距装置であって、
前記対応点設定部は、選択された前記比較画素の前記重み付け非類似度と、前記視差変化量との和が最小となるように前記組み合わせを決定する、測距装置。
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.
請求項1から請求項4のいずれか一項に記載の測距装置であって、
更に、前記基準画素ごとの前記ずれ量を平滑化する処理を行って前記ずれ量を補正する平滑処理部を備える、測距装置。
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.
請求項1から請求項5のいずれか一項に記載の測距装置であって、
前記測距装置は、車両(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.
複数の画像を取得する画像取得部(22)と、
前記請求項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.
JP2018104431A 2018-05-31 2018-05-31 Ranging device, ranging system and ranging method Active JP7152880B2 (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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