JP7485580B2 - Distance calculation device and distance calculation method - Google Patents
Distance calculation device and distance calculation method Download PDFInfo
- Publication number
- JP7485580B2 JP7485580B2 JP2020173657A JP2020173657A JP7485580B2 JP 7485580 B2 JP7485580 B2 JP 7485580B2 JP 2020173657 A JP2020173657 A JP 2020173657A JP 2020173657 A JP2020173657 A JP 2020173657A JP 7485580 B2 JP7485580 B2 JP 7485580B2
- Authority
- JP
- Japan
- Prior art keywords
- distance
- image
- vehicle
- coefficient
- detection unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000004364 calculation method Methods 0.000 title claims description 121
- 238000001514 detection method Methods 0.000 claims description 87
- 238000000034 method Methods 0.000 description 26
- 238000010586 diagram Methods 0.000 description 23
- 230000006399 behavior Effects 0.000 description 7
- 230000002159 abnormal effect Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 239000000284 extract Substances 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Landscapes
- Measurement Of Optical Distance (AREA)
Description
本発明は、距離算出装置および距離算出方法に関する。 The present invention relates to a distance calculation device and a distance calculation method.
従来、画像などに基づいて距離を測定する技術がある。特許文献1には、ステレオカメラが撮影した測距対象の画像を基にして、測距対象までの距離を測定する第1の測距と、発光部が測距対象に光ビームを照射して、反射されてきた反射光を基にして、測距対象までの距離を測定する第2の測距と、を選択して実行する測距部を備えた測距装置が開示されている。
Conventionally, there is technology for measuring distance based on images, etc.
ここで、距離の算出を安価な構成で実現できることが望まれている。例えば、単眼のカメラによる画像から距離を算出することができれば、コスト低減が可能となる。 Here, it is desirable to be able to calculate distance using an inexpensive configuration. For example, if distance could be calculated from an image taken with a monocular camera, costs could be reduced.
本発明の目的は、安価な構成によって距離を算出することができる距離算出装置および距離算出方法を提供することである。 The object of the present invention is to provide a distance calculation device and a distance calculation method that can calculate distance with an inexpensive configuration.
本発明の距離算出装置は、移動体に搭載されたカメラによって生成された前記移動体の進行方向を撮像した動画を取得する画像取得部と、前記移動体の進行方向に沿って互いに異なる位置にある第一構造物および第二構造物を前記動画の画像から検出する検出部と、前記移動体の速度データおよび前記検出部の検出結果に基づいて前記第一構造物に対応する位置から前記第二構造物に対応する位置までの前記移動体の移動距離を取得し、かつ前記検出部の検出結果および取得した前記移動距離から画像縦方向の画素数と距離との関係を示す係数を決定する距離係数算出部と、前記係数と前記画像における画像縦方向の画素数とに基づいて前記移動体の進行方向に沿った距離を算出する距離算出部と、を備えたことを特徴とする。 The distance calculation device of the present invention is characterized by comprising an image acquisition unit that acquires a video image of the moving body in the traveling direction generated by a camera mounted on the moving body, a detection unit that detects a first structure and a second structure located at different positions along the traveling direction of the moving body from an image of the video, a distance coefficient calculation unit that acquires the moving distance of the moving body from a position corresponding to the first structure to a position corresponding to the second structure based on the speed data of the moving body and the detection result of the detection unit, and determines a coefficient indicating the relationship between the number of pixels in the vertical direction of the image and the distance from the detection result of the detection unit and the acquired moving distance, and a distance calculation unit that calculates the distance along the traveling direction of the moving body based on the coefficient and the number of pixels in the vertical direction of the image in the image.
本発明に係る距離算出装置は、第一構造物および第二構造物を動画の画像から検出し、かつ第一構造物に対応する位置から第二構造物に対応する位置までの移動体の移動距離を取得する。距離係数算出部は、検出部の検出結果および取得した移動距離から画像縦方向の画素数と距離との関係を示す係数を決定する。距離算出部は、係数と画像における画像縦方向の画素数とに基づいて移動体の進行方向に沿った距離を算出する。本発明に係る距離算出装置によれば、安価な構成によって距離を算出することができるという効果を奏する。 The distance calculation device according to the present invention detects a first structure and a second structure from a video image, and obtains the distance traveled by a moving object from a position corresponding to the first structure to a position corresponding to the second structure. The distance coefficient calculation unit determines a coefficient indicating the relationship between the number of pixels in the vertical direction of the image and the distance from the detection result of the detection unit and the obtained distance traveled. The distance calculation unit calculates the distance along the traveling direction of the moving object based on the coefficient and the number of pixels in the vertical direction of the image in the image. The distance calculation device according to the present invention has the effect of being able to calculate the distance with an inexpensive configuration.
以下に、本発明の実施形態に係る距離算出装置および距離算出方法につき図面を参照しつつ詳細に説明する。なお、この実施形態によりこの発明が限定されるものではない。また、下記の実施形態における構成要素には、当業者が容易に想定できるものあるいは実質的に同一のものが含まれる。 The distance calculation device and distance calculation method according to the embodiment of the present invention will be described in detail below with reference to the drawings. Note that the present invention is not limited to these embodiments. Furthermore, the components in the following embodiments include those that can be easily imagined by a person skilled in the art or those that are substantially the same.
[実施形態]
図1から図15を参照して、実施形態について説明する。本実施形態は、距離算出装置および距離算出方法に関する。図1は、実施形態に係る距離算出装置のブロック図、図2は、構造物が撮像されている画像を示す図、図3は、構造物を代表する画素の位置を説明する図、図4は、構造物が撮像されている画像を示す図、図5は、車両の位置を示す図、図6は、構造物が撮像されている画像を示す図、図7は、車両の位置を示す図、図8は、複数のフレームを示す図、図9は、平均速度の算出方法を説明する図、図10は、構造物が撮像されている画像を示す図である。
[Embodiment]
An embodiment will be described with reference to Fig. 1 to Fig. 15. The embodiment relates to a distance calculation device and a distance calculation method. Fig. 1 is a block diagram of the distance calculation device according to the embodiment, Fig. 2 is a diagram showing an image in which a structure is captured, Fig. 3 is a diagram explaining the position of a pixel representing the structure, Fig. 4 is a diagram showing an image in which the structure is captured, Fig. 5 is a diagram showing the position of a vehicle, Fig. 6 is a diagram showing an image in which the structure is captured, Fig. 7 is a diagram showing the position of a vehicle, Fig. 8 is a diagram showing a plurality of frames, Fig. 9 is a diagram explaining a method for calculating an average speed, and Fig. 10 is a diagram showing an image in which the structure is captured.
図11は、構造物の間の距離を示す図、図12は、係数および距離の算出方法を説明する図、図13は、距離の算出方法を説明する図、図14および図15は、実施形態に係る距離算出装置および距離算出方法のフローチャートである。 Figure 11 shows the distance between structures, Figure 12 explains the coefficient and distance calculation method, Figure 13 explains the distance calculation method, and Figures 14 and 15 are flowcharts of the distance calculation device and distance calculation method according to the embodiment.
図1に示す本実施形態の距離算出装置1は、車両100に搭載される。例示された距離算出装置1は、算出した距離に基づいて運転者による運転操作を支援するように構成されている。車両100は、例えば、自動車であり、ハイブリッド自動車、プラグインハイブリッド自動車、電気自動車であってもよい。車両100は、貨物を輸送する車両または人員を輸送する車両であってもよい。
The
車両100には、ドライブレコーダ20が搭載されている。ドライブレコーダ20は、車両100に搭載される車載器の一例である。ドライブレコーダ20は、単眼のカメラ21を有する。カメラ21は、車両100の進行方向を連続的に撮像する。つまり、カメラ21は、動画データを生成する装置である。カメラ21は、車両100の前方を撮像する。なお、ドライブレコーダ20は、車両100の後方を撮像するカメラを有していてもよい。
The
ドライブレコーダ20は、カメラ21によって撮像された画像を記録する映像記録部23を有する。映像記録部23は、例えば、不揮発性のメモリである。ドライブレコーダ20は、メモリカードを映像記録部23として使用してもよい。ドライブレコーダ20は、カメラ21によって撮像された画像データ、およびその画像データの撮像時刻を映像記録部23に記録する。
The
車両100には、車両100の走行速度を検出する速度センサ22が搭載されている。速度センサ22は、所定の時間間隔で走行速度を検出する。ドライブレコーダ20は、速度センサ22と通信するインタフェースを有する。ドライブレコーダ20は、速度センサ22から取得した速度データ、および速度データの取得時刻を記録する速度記録部24を有する。速度記録部24は、例えば、不揮発性のメモリである。ドライブレコーダ20は、メモリカードを速度記録部24として使用してもよい。
The
距離算出装置1は、判定部2、警告部3、距離算出部4、検出部5、距離係数記録部6、画像取得部7、および距離係数算出部8を有する。距離算出装置1は、距離算出機能10を有する。距離算出機能10は、距離算出部4、検出部5、距離係数記録部6、画像取得部7、および距離係数算出部8によって実現される。
The
画像取得部7は、ドライブレコーダ20の映像記録部23から動画データを取得する。この動画は、カメラ21によって車両100の前方が撮像された動画である。動画データは、各フレームの画像および撮像時刻を含む。画像取得部7は、例えば、ドライブレコーダ20と通信を行なう通信インタフェースであってもよい。画像取得部7が取得した動画データは、距離算出装置1のメモリ等に記録されてもよい。
The image acquisition unit 7 acquires video data from the
検出部5は、動画データの画像から構造物を検出する。図2に示す画像G1には、検出部5によって検出される構造物が撮像されている。画像の下部には、車両100のダッシュボード101が写っている。検出部5は、車両100が走行している道路200に沿って設置された構造物を検出する。検出部5は、図2に示す画像G1において、構造物A、構造物B、構造物C、および構造物Dを検出する。構造物A,B,C,Dは、車両100の進行方向に沿って互いに異なる位置に配置されている。以下の説明では、車両100の進行方向を単に「進行方向X」と称する。構造物A,B,C,Dは、進行方向Xの後方から前方に向けてこの順序で並んでいる。
The
検出部5によって検出される構造物A,B,C,Dは、電柱、街灯、信号機、看板等の地面から上方に向けて突出している構造物である。これらの構造物A,B,C,Dは、例えば、地面から上方に向けて突出した支柱を有する。検出部5は、例えば、道路200の両端の構造物を検出するが、一方の端に沿った構造物を抽出する。本実施形態の検出部5は、ドライバから見た場合に道路200の左端に沿った構造物A,B,C,Dを抽出する。
The structures A, B, C, and D detected by the
図2に示すように、検出部5は、各構造物A,B,C,Dに関して、構造物が撮像されている範囲を検出する。範囲RAは、画像において構造物Aが撮像されている範囲である。言い換えると、範囲RAは、構造物Aを囲む枠である。同様に、範囲RB,RC,RDは、それぞれ構造物B,C,Dが撮像されている範囲であり、構造物B,C,Dを囲む枠である。範囲RA,RB,RC,RDの形状は、矩形である。また、範囲RA,RB,RC,RDの四隅は、画像の画素位置である。
As shown in FIG. 2, the
検出部5は、図3に示すように、構造物A,B,C,Dを代表する画素の位置Pa,Pb,Pc,Pdを決定する。画素の位置Pa,Pb,Pc,Pdは、画像縦方向における位置である。例えば、画素の位置Paは、構造物Aを代表する画素の画像縦方向の位置である。画素の位置Paは、例えば、範囲RAの下端の位置である。言い換えると、画素の位置Paは、構造物Aの下端を撮像した画素の位置である。画素の位置Pb,Pc,Pdは、構造物B,C,Dを代表する画素の画像縦方向の位置である。画素の位置Pb,Pc,Pdは、例えば、それぞれ範囲RB,RC,RDの下端の位置である。
As shown in FIG. 3, the
本実施形態の距離算出装置1は、画素の位置Pa,Pb,Pc,Pdと、車両100が構造物A,B,C,Dに沿って走行したときの移動距離と、に基づいて係数Ki(i=1,2,3,…)を決定する。係数Kiは、画像縦方向の画素数と道路200上の実際の距離との関係を示す係数である。距離算出装置1は、以下に説明するように、画像縦方向の画素数と係数Kiとに基づいて実際の距離を算出する。
The
距離係数算出部8は、車両100の走行速度のデータおよび検出部5の検出結果に基づいて車両100の移動距離を取得する。ここでは、一例として、構造物Cから構造物Dまでの距離の取得方法を説明する。距離係数算出部8は、車両100が構造物Cに対応する位置に到達したときの時刻Tc、および車両100が構造物Dに対応する位置に到達したときの時刻Tdをそれぞれ決定する。時刻Tcおよび時刻Tdは、以下に説明するように、検出部5によって決定される。距離係数算出部8は、時刻Tcおよび時刻Tdに関する情報を検出部5から取得する。
The distance
検出部5は、ドライブレコーダ20から取得した複数の画像Gから、車両100が構造物Cに対応する位置に到達したときに撮像された画像を選択する。図4は、車両100が構造物Cの位置に到達したときに撮像された画像G3である。図5には、図4の画像G3が撮像されたときの車両100の位置が示されている。車両100は、構造物Cに対応する位置Xcに到達している。位置Xcは、車両100の進行方向Xに沿った構造物Cの位置である。言い換えると、位置Xcは、道路200における仮想線Ic上の位置である。仮想線Icは、進行方向Xと直交する横方向Yに沿って構造物Cから引いた直線である。
The
なお、画像G3を撮像したときの車両100の位置は、位置Xcよりもわずかに手前の位置であると考えられる。しかしながら、構造物Cから構造物Dまでの距離を算出する上でこの位置の差が与える影響はわずかである。従って、本実施形態では、画像G3を撮像したときの車両100の位置が位置Xcであるものとみなす。
The position of the
図4に示す画像G3において、構造物Cの範囲RCは左端に位置している。より詳しくは、範囲RCにおける左側の辺RC1が画像G3における左端の画素に位置している。つまり、画像G3は、構造物Cが画像横方向の端GLで見切れるときの画像である。言い換えると、画像G3は、構造物Cがカメラ21の撮像範囲の範囲内から範囲外へ移行し始めるときに撮像された画像である。検出部5は、構造物Cの範囲RCが左端に位置している画像を画像G3として選択する。
In image G3 shown in FIG. 4, the range RC of structure C is located at the left end. More specifically, the left edge RC1 of range RC is located at the leftmost pixel in image G3. In other words, image G3 is an image when structure C is cut off at the horizontal end GL of the image. In other words, image G3 is an image captured when structure C begins to move from within the imaging range of
検出部5は、ドライブレコーダ20から取得した複数の画像Gから、車両100が構造物Dに対応する位置Xdに到達したときに撮像された画像を選択する。図6は、車両100が位置Xdに到達したときに撮像された画像G4である。図7には、図6の画像G4が撮像されたときの車両100の位置が示されている。車両100は、構造物Dに対応する位置Xdに到達している。位置Xdは、車両100の進行方向Xに沿った構造物Dの位置である。言い換えると、位置Xdは、道路200における仮想線Id上の位置である。仮想線Idは、横方向Yに沿って構造物Dから引いた直線である。
The
なお、画像G4を撮像したときの車両100の位置は、位置Xdよりもわずかに手前の位置であると考えられる。しかしながら、構造物Cから構造物Dまでの距離を算出する上でこの位置の差が与える影響はわずかである。従って、本実施形態では、画像G4を撮像したときの車両100の位置が位置Xdであるものとみなす。
The position of the
図6に示す画像G4において、構造物Dの範囲RDは左端に位置している。範囲RDにおける左側の辺RD1が画像G4における左端の画素に位置している。つまり、画像G4は、構造物Dが画像横方向の端GLで見切れるときの画像である。言い換えると、画像G4は、構造物Dがカメラ21の撮像範囲の範囲内から範囲外へ移行し始めるときに撮像された画像である。検出部5は、構造物Dの範囲RDが左端に位置している画像を画像G4として選択する。
In image G4 shown in FIG. 6, the range RD of structure D is located at the left end. The left side RD1 of range RD is located at the leftmost pixel in image G4. In other words, image G4 is an image when structure D is cut off at the horizontal end GL of the image. In other words, image G4 is an image captured when structure D begins to move from within the imaging range of
距離係数算出部8は、検出部5から画像G3および画像G4についての情報を取得する。距離係数算出部8は、画像G3が撮像された時刻を時刻Tcとして設定し、画像G4が撮像された時刻を時刻Tdとして設定する。距離係数算出部8は、以下に説明するように、時刻Tcから時刻Tdまでの車両100の走行距離を計算する。
The distance
図8に示すように、画像G3から画像G4までの間に複数のフレームが存在する。以下の説明では、動画におけるi番目のフレームをフレームFiと記載する。画像G3のフレーム番号i=c、画像G4のフレーム番号i=dである。距離係数算出部8は、例えば、各フレーム間の平均速度VAに基づいて各フレーム間における車両100の走行距離を算出する。図9には、一つのフレームFnから次のフレームFn+1までに取得された速度値Vjが示されている。フレームFnが撮像された時刻tnに速度値V0が取得される。この速度値V0は、平均速度VAの算出には用いない。フレームFn+1が撮像された時刻tn+1に速度値Vmが取得される。速度値V1から速度値Vmまでの各速度値Vjに基づいて、下記[数1]によって平均速度VAが算出される。ここで、mは、時刻tnを過ぎて最初に取得された速度値V1から時刻tn+1までに取得される速度値Vjの個数である。この個数mには、時刻tn+1において取得された速度値Vjが含まれる。図9の例では、m=7である。
距離係数算出部8は、下記[数2]によって位置Xcから位置Xdまでの距離Lcdを算出する。ここで、VAiは、フレームFiからフレームFi+1までの平均速度VA、ΔTは、一つのフレームから次のフレームまでの時間間隔である。つまり、距離Lcdは、フレームFcからフレームFdまでの平均速度VAの積分値である。
上記の[数2]によって算出された距離Lcdは、構造物Cに対応する位置Xcから構造物Dに対応する位置Xdまでの車両100の移動距離である。上記のように、距離Lcdは、車両100の速度データおよび検出部5の検出結果に基づいて取得される。
The distance Lcd calculated by the above [Equation 2] is the travel distance of the
位置Xcから位置Xdまでの距離Lcdの算出手順と同様の手順により、構造物Aから構造物Bまでの距離Lab、構造物Bから構造物Cまでの距離Lbcが算出される。例えば、距離Labを算出する場合、検出部5は、構造物Aが見切れるときの画像を検出する。図2の画像G1は、構造物Aが見切れるときの画像である。画像G1において、構造物Aの範囲RAが左端に位置している。画像G1が撮像された時刻は、車両100が構造物Aに対応する位置Xaに到達したときの時刻Taとされる。
The distance Lab from structure A to structure B and the distance Lbc from structure B to structure C are calculated using a procedure similar to that used to calculate the distance Lcd from position Xc to position Xd. For example, when calculating the distance Lab, the
また、検出部5は、構造物Bが見切れるときの画像を検出する。図10の画像G2は、構造物Bが見切れるときの画像である。画像G2において、構造物Bの範囲RBが左端に位置している。画像G2が撮像された時刻は、車両100が構造物Bに対応する位置Xbに到達したときの時刻Tbとされる。図11には、車両100が構造物A,B,C,Dに到達する時刻、および構造物A,B,C,D間の距離Lab,Lbc,Lcdが示されている。距離係数算出部8は、時刻Taから時刻Tbまでの車両100の速度データに基づいて距離Labを算出する。同様に、距離係数算出部8は、時刻Tbから時刻Tcまでの車両100の速度データに基づいて距離Lbcを算出する。
The
距離係数算出部8は、取得された距離Lab,Lbc,Lcdに基づいて、係数Ki(i=1,2,3,…)を決定する。係数Kiは、画像縦方向の画素数と、車両100の進行方向Xに沿った距離との関係を示す係数である。
The distance
距離係数算出部8は、例えば、構造物A,B,C,Dの全てが撮像されている画像に基づいて係数Kiを決定する。図12に示す画像G0には、構造物A,B,C,Dの全てが撮像されている。距離係数算出部8は、画像の各画素範囲Si(i=1,2,3,…)について係数Kiを決定する。画素範囲S1は、画像縦方向の座標値Zにおける画素の位置Paから画素の位置Pbまでの範囲である。なお、座標値Zの原点は画像の下端とする。
The distance
画素範囲S2は、座標値Zにおける画素の位置Pbから画素の位置Pcまでの範囲である。画素範囲S3は、座標値Zにおける画素の位置Pcから画素の位置Pdまでの範囲である。 Pixel range S2 is the range from pixel position Pb to pixel position Pc at coordinate value Z. Pixel range S3 is the range from pixel position Pc to pixel position Pd at coordinate value Z.
距離係数算出部8は、画素範囲S1についての係数K1を下記式(1)によって算出する。ここで、N1:画素範囲S1における画像縦方向の画素数である。
K1=Lab/N1 (1)
The distance
K1=Lab/N1 (1)
距離係数算出部8は、画素範囲S2についての係数K2を下記式(2)によって算出し、画素範囲S3についての係数K3を下記式(3)によって算出する。なお、N2:画素範囲S2における画像縦方向の画素数、N3:画素範囲S3における画像縦方向の画素数である。距離係数算出部8は、算出した係数K1,K2,K3を距離係数記録部6に記憶させる。
K2=Lbc/N2 (2)
K3=Lcd/N3 (3)
Distance
K2=Lbc/N2 (2)
K3=Lcd/N3 (3)
距離算出部4は、係数K1,K2,K3と、画像縦方向の画素数とに基づいて、車両100の進行方向Xに沿った距離を算出する。距離算出部4は、例えば、道路200上の点201から点202までの進行方向Xに沿った距離L1を以下のようにして算出する。なお、点201の位置は、構造物Aに対応する位置Xaである。点202は、進行方向Xにおいて構造物Cと構造物Dとの間に位置する点である。距離算出部4は、画素の位置Pcから点202に対応する画素までの画像縦方向の画素数ΔZを取得する。距離算出部4は、例えば、画素数ΔZを検出部5から取得する。距離算出部4は、距離L1を下記式(4)によって算出する。
L1=Lab+Lbc+K3×ΔZ (4)
The
L1 = Lab + Lbc + K3 × ΔZ (4)
距離算出部4は、点202が構造物Bと構造物Cとの間に位置する点である場合、以下のように距離L1を算出する。距離算出部4は、画素の位置Pbから点202に対応する画素までの画像縦方向の画素数ΔZを取得する。距離算出部4は、距離L1を下記式(5)によって算出する。
L1=Lab+K2×ΔZ (5)
When
L1 = Lab + K2 × ΔZ (5)
距離算出部4は、点202が構造物Aと構造物Bとの間に位置する点である場合、以下のように距離L1を算出する。距離算出部4は、画素の位置Paから点202に対応する画素までの画像縦方向の画素数ΔZを取得する。距離算出部4は、距離L1を下記式(6)によって算出する。
L1=K1×ΔZ (6)
When
L1=K1×ΔZ (6)
距離算出部4は、車両100から前方の地点までの距離を算出することができる。図13の画像Gxは、先行車両110が撮像された画像である。画像Gxは、構造物Aが画像横方向の端で見切れるときの画像である。つまり、画像Gxは、車両100が構造物Aに対応する位置Xaに到達したときの画像である。従って、画素の位置Paから道路200上の点までの距離は、車両100から前方の点までの距離に相当する。
The
図13において、画素の位置Pxは先行車両110を代表する画素の位置である。先行車両110の検出および画素の位置Pxの検出は、検出部5によって実行される。先行車両110は、構造物Cと構造物Dとの間に位置している。この場合、距離算出部4は、画素の位置Pcから画素の位置Pxまでの画像縦方向の画素数ΔZを検出部5から取得する。距離算出部4は、車両100から先行車両110までの距離Lxを下記式(7)によって算出する。
Lx=Lab+Lbc+K3×ΔZ (7)
13, pixel position Px is the position of a pixel representative of the preceding
Lx = Lab + Lbc + K3 × ΔZ (7)
上記のように、本実施形態に係る距離算出装置1は、単眼のカメラ21が生成した動画に基づいて前方の位置までの距離を算出することができる。よって、ステレオカメラやLiDAR、ToFセンサ等の高価な距離検出装置を用いることなく距離を算出することが可能である。また、距離算出装置1は、車両100よりも前方の任意の二地点間の距離を算出することができる。なお、上記の係数Kiは、構造物A,B,C,Dが撮像されていない画像に対して適用可能である。言い換えると、画素範囲S1,S2,S3に対する係数K1,K2,K3は、カメラ21によって撮像された任意の画像に適用可能である。
As described above, the
図14および図15を参照して、本実施形態に係る距離算出装置1の動作について説明する。図14は、係数Kiを算出するフェーズのフローチャートである。距離算出装置1は、例えば、図14のフローチャートに示される動作を定期的に実行する。図14のフローチャートは、例えば、一日に一回実行されてもよく、数日に一回実行されてもよい。ステップS10において、距離係数算出部8は、速度データを取得する。取得される速度データは、例えば、一定の期間に速度センサ22によって取得された連続する速度値および取得時刻のデータである。ステップS10が実行されると、ステップS20に進む。
The operation of the
ステップS20において、距離係数算出部8は、各フレーム間の平均速度VAを算出する。距離係数算出部8は、例えば、検出部5から各フレームの撮像時刻に関する情報を取得し、この情報に基づいて平均速度VAを算出する。ステップS20が実行されると、ステップS80に進む。
In step S20, the distance
ステップS30において、画像取得部7は、映像データを取得する。取得する映像データは、カメラ21によって撮像された動画データであり、連続的に撮像された複数の画像を含む。ステップS30は、カメラ21によって進行方向Xが撮像された動画を取得するステップに対応する。ステップS30が実行されると、ステップS40,S50,S70に進む。
In step S30, the image acquisition unit 7 acquires video data. The acquired video data is video data captured by the
ステップS40において、画像取得部7は、各フレーム間の時間ΔTを算出する。画像取得部7は、一つのフレームが撮像された時刻と、直前のフレームが撮像された時刻と、に基づいてフレーム間の時間ΔTを算出する。画像取得部7は、例えば、算出された時間ΔTをフレーム番号に紐付けて記録する。なお、フレーム間の時間ΔTは、フレームレートから算出されてもよい。ステップS40が実行されると、ステップS80に進む。 In step S40, the image acquisition unit 7 calculates the time ΔT between each frame. The image acquisition unit 7 calculates the time ΔT between frames based on the time when one frame was captured and the time when the immediately preceding frame was captured. The image acquisition unit 7 records the calculated time ΔT, for example, by linking it to the frame number. Note that the time ΔT between frames may be calculated from the frame rate. Once step S40 has been executed, the process proceeds to step S80.
ステップS50において、検出部5は、各画像データから物体を検出する。検出対象の物体は、例えば、例示された構造物A,B,C,D等の構造物を含む。検出対象の物体は、先行車両110を含む他の車両、歩行者、信号、停止線、横断歩道等を含む。これらの物体は、例えば、ドライバに対する運転支援に係わる物体である。検出部5は、例えば、検出された物体の種類、および検出された物体の範囲を動画のフレーム番号に紐付けて記録する。
In step S50, the
ステップS50は、車両100の進行方向Xに沿って互いに異なる位置にある第一構造物および第二構造物を画像から検出するステップに対応する。第一構造物および第二構造物は、距離を算出する際の目印となる構造物である。例えば、図2の画像G1において、第一構造物および第二構造物は、構造物A,B,C,Dのうち任意の二つの構造物である。一例として、検出部5は、構造物Aから構造物Bまでの走行距離を取得する場合、構造物Aを第一構造物として検出し、構造物Bを第二構造物として検出する。ステップS50が実行されると、ステップS60に進む。
Step S50 corresponds to a step of detecting a first structure and a second structure located at different positions along the traveling direction X of the
ステップS60において、検出部5は、物体間のフレーム数を算出する。検出部5は、一つの構造物が画像の端で見切れてから、次の構造物が画像の端で見切れるまでのフレーム数をカウントする。検出部5は、例えば、算出されたフレーム数を構造物に紐付けて記録する。なお、物体間のフレーム数は、時刻Ta,Tb,Tc,Tdおよびフレームレートから算出されてもよい。ステップS60が実行されると、ステップS80に進む。
In step S60, the
ステップS70において、検出部5は、画像縦方向の画素位置を検出する。検出される画素位置は、例えば、構造物を代表する画素の位置Pa,Pb,Pc,Pdである。ステップS70が実行されると、ステップS90に進む。
In step S70, the
ステップS80において、距離係数算出部8は、物体間の距離を算出する。距離係数算出部8は、ステップS20で算出された平均速度VAと、ステップS40で算出されたフレーム間の時間ΔTと、に基づいてフレーム間の車両100の走行距離を算出する。距離係数算出部8は、構造物A,B,C,Dが画像の端で見切れるときのフレーム番号を検出部5から取得する。距離係数算出部8は、フレーム間の走行距離および取得したフレーム番号に基づいて、距離Lab,Lbc,Lcdを取得する。ステップS80が実行されると、ステップS90に進む。
In step S80, the distance
ステップS90において、距離係数算出部8は、係数Kiを算出する。算出される係数Kiは、物体間の画像縦方向の画素位置に対する距離の比例係数である。距離係数算出部8は、例えば、構造物A,B,C,Dの全てが撮像されている画像に基づいて係数Ki(i=1,2,3,…)を決定する。距離係数算出部8は、算出した係数Kiを距離係数記録部6に記憶させる。ステップS90が実行されると、フローチャートが終了する。
In step S90, the distance
図15は、係数Kiに基づいて距離を算出するフェーズのフローチャートである。図15のフローチャートは、例えば、車両100の走行中に繰り返し実行される。ステップS110において、距離算出部4は、距離係数記録部6から係数Ki(i=1,2,3…)を取得する。ステップS110が実行されると、ステップS150に進む。
Figure 15 is a flowchart of the phase in which distance is calculated based on the coefficient Ki. The flowchart in Figure 15 is executed repeatedly, for example, while the
ステップS120において、画像取得部7は、映像データを取得する。ステップS120は、カメラ21によって進行方向Xが撮像された動画を取得するステップに対応する。ステップS120が実行されると、ステップS130およびS160に進む。
In step S120, the image acquisition unit 7 acquires video data. Step S120 corresponds to a step of acquiring a video image of the traveling direction X captured by the
ステップS130において、検出部5は、各画像データから物体を検出する。検出対象の物体は、例えば、例示された構造物A,B,C,D等の構造物を含む。検出対象の物体は、先行車両110を含む他の車両、歩行者、信号、停止線、横断歩道等を含む。検出部5は、例えば、検出された物体の種類、および検出された物体の範囲を動画のフレーム番号に紐付けて記録する。ステップS130が実行されると、ステップS140に進む。
In step S130, the
ステップS140において、検出部5は、距離算出部4の指令に基づいて前方に存在する移動体の画像縦方向の画素位置を検出する。前方の移動体は、例えば、前走車である。距離算出部4は、検出部5から移動体の画素位置を取得する。ステップS140が実行されると、ステップS150に進む。
In step S140, the
ステップS150において、距離算出部4は、自車と前方の移動体との距離を算出する。前方の移動体が前走車である場合、自車と前走車との距離Lxが算出される。この場合、距離算出部4は、ステップS110で取得した係数Kiと、ステップS140で取得した画素位置と、に基づいて車両100から先行車両110までの距離Lxを算出する。
In step S150, the
ステップS150は、係数Kiと画像における画像縦方向の画素数とに基づいて車両100の進行方向Xに沿った距離を算出するステップに対応する。ステップS150が実行されると、ステップS180に進む。
Step S150 corresponds to a step of calculating the distance along the traveling direction X of the
ステップS160において、検出部5は、物体の行動検出を行なう。より詳しくは、検出部5は、ディープラーニング等の機械学習によって、映像データから物体の行動を検出する機能を獲得している。検出部5は、物体が検出された複数の画像データに基づいて、その物体の行動を検出する。例えば、検出部5は、蛇行運転している先行車両110や蛇行運転している前方の自転車等を検出することができる。検出部5は、例えば、蛇行運転している物体が検出されたフレーム番号、物体の種類、および物体の位置を記録する。ステップS160が実行されると、ステップS170に進む。
In step S160, the
ステップS170において、判定部2は、検出された前方の移動体の行動が異常であるかを判定する。判定部2は、検出部5による検出結果に基づいてステップS170の判定を行なう。判定部2は、例えば、蛇行運転する先行車両110が検出された場合や、ふらふらしながら走行している自転車が検出された場合に行動が異常であると判定する。ステップS170の判定の結果、移動体の行動が異常であると肯定判定された場合にはステップS180に進み、否定判定された場合にはステップS210に進む。
In step S170, the
ステップS180において、判定部2は、前方の移動体との距離が下限値以下であるかを判定する。距離が下限値以下であると肯定判定された場合にはステップS190に進み、否定判定された場合にはステップS210に進む。
In step S180, the
ステップS190において、判定部2は、自車両に対して危険な移動体が存在すると判定する。ステップS190が実行されると、ステップS200に進む。
In step S190, the
ステップS200において、判定部2は、警告部3に対して警告動作の実行を指令する。警告部3は、音声、光、映像等によってドライバに対して警告を発する。ステップS200が実行されると、フローチャートが終了する。
In step S200, the
ステップS210において、判定部2は、検出された物体が車両100に対して安全であると判定する。ステップS210が実行されると、本フローチャートが終了する。
In step S210, the
以上説明したように、本実施形態に係る距離算出装置1は、画像取得部7と、検出部5と、距離係数算出部8と、距離算出部4と、を有する。画像取得部7は、車両100に搭載されたカメラ21によって生成された動画を取得する。取得される動画は、車両100の進行方向Xを連続的に撮像した複数の画像を含んでいる。検出部5は、車両100の進行方向Xに沿って互いに異なる位置にある第一構造物および第二構造物を動画の画像から検出する。距離係数算出部8は、車両100の速度データおよび検出部5の検出結果に基づいて第一構造物に対応する位置から第二構造物に対応する位置までの車両100の移動距離を取得する。
As described above, the
距離係数算出部8は、検出部5の検出結果および取得した移動距離から画像縦方向の画素数と距離との関係を示す係数Kiを決定する。距離算出部4は、係数Kiと画像における画像縦方向の画素数とに基づいて車両100の進行方向Xに沿った距離Lを算出する。本実施形態の距離算出装置1は、単眼のカメラ21による動画に基づいて進行方向Xに沿った距離を算出することができる。よって、本実施形態に係る距離算出装置1によれば、安価な構成によって距離を算出することが可能である。
The distance
本実施形態の検出部5は、参照画像から第一の位置を検出する。参照画像は、第一構造物および第二構造物の両方が撮像されている画像であり、例えば、図12に示す画像G0である。第一の位置は、第一構造物を代表する画素の画像縦方向の位置である。検出部5は、構造物Aを第一構造物として検出した場合、画素の位置Paを第一の位置として検出する。更に、検出部5は、参照画像から、第二構造物を代表する画素の画像縦方向の位置である第二の位置を検出する。検出部5は、構造物Bを第二構造物として検出した場合、画素の位置Pbを第二の位置として検出する。
The
距離係数算出部8は、第一の位置から第二の位置までの画像縦方向の画素数と、取得した距離とに基づいて、第一の位置から第二の位置までの画素範囲における係数Kiを決定する。構造物Aが第一構造物であり、構造物Bが第二構造物である場合、距離係数算出部8は、取得した距離Labに基づいて画素範囲S1における係数K1を決定する。
The distance
参照画像である画像G0に三つ以上の構造物が撮像されている場合、検出部5および距離係数算出部8は、上記のプロセスを繰り返す。例えば、検出部5は、構造物Bを第一構造物として検出し、構造物Cを第二構造物として検出する。この場合、検出部5は、画素の位置Pbを第一の位置として検出し、画素の位置Pcを第二の位置として検出する。距離係数算出部8は、画素の位置Pbから画素の位置Pcまでの画像縦方向の画素数と、取得した距離Lbcとに基づいて、画素の位置Pbから画素の位置Pcまでの画素範囲S2における係数K2を決定する。
When three or more structures are captured in image G0, which is the reference image, the
更に、検出部5は、構造物Cを第一構造物として検出し、構造物Dを第二構造物として検出する。この場合、検出部5は、画素の位置Pcを第一の位置として検出し、画素の位置Pdを第二の位置として検出する。距離係数算出部8は、画素の位置Pcから画素の位置Pdまでの画像縦方向の画素数と、取得した距離Lcdとに基づいて、画素の位置Pcから画素の位置Pdまでの画素範囲S3における係数K3を決定する。
Furthermore, the
なお、第一構造物および第二構造物は、隣接した構造物でなくてもよい。例えば、検出部5は、構造物Aを第一構造物として検出し、構造物Cを第二構造物として検出してもよい。このようにした場合、係数Kiの決定および距離算出における演算負荷を軽減することができる。一方、隣接した構造物を第一構造物および第二構造物として検出する場合、画像を細かな区間に分けて距離を算出することができ、距離の算出精度を向上させることができる。
The first structure and the second structure do not have to be adjacent structures. For example, the
本実施形態の画像取得部7は、車両100に搭載されたカメラ21から車両100の前景の画像を取得する。検出部5は、車両100が走行する道路200に沿って配置された構造物A,B,C,Dを第一構造物および第二構造物として検出する。道路200に沿って配置された構造物は、車両100の進行方向Xに沿ってほぼ直線状に配置されていることが多いと考えられる。よって、距離の算出精度が向上する。
The image acquisition unit 7 of this embodiment acquires an image of the foreground of the
本実施形態の距離係数算出部8は、第一構造物が画像における画像横方向の端GLで見切れる時刻、および第二構造物が画像における画像横方向の端GLで見切れる時刻に基づいて車両100の移動距離を取得する。これにより、移動距離の算出誤差が生じにくい。
In this embodiment, the distance
[実施形態の変形例]
車両100からの距離を検出する対象は、先行車両110には限定されない。距離の検出対象は、自転車等の車両や歩行者であってもよく、道路200の路面に表示された停止線、横断歩道等の道路標示であってもよい。距離の検出対象は、道路200の信号機や道路標識であってもよい。
[Modification of the embodiment]
The object for which the distance from the
検出部5は、道路200の右端に沿った構造物を抽出するように構成されてもよい。この場合、検出部5は、構造物が画像の右端で見切れるときに車両100が構造物に対応する位置に到達したと判定してもよい。
The
本実施形態の距離算出装置1は、自動車以外の車両、例えば鉄道の車両に適用されてもよい。距離算出装置1は、車両以外の移動体に適用されてもよい。
The
上記の実施形態および変形例に開示された内容は、適宜組み合わせて実行することができる。 The contents disclosed in the above embodiments and variations can be implemented in any suitable combination.
1 距離算出装置
2 判定部
3 警告部
4 距離算出部
5 検出部
6 距離係数記録部
7 画像取得部
8 距離係数算出部
10 距離算出機能
20 ドライブレコーダ
21 カメラ
22 速度センサ
23 映像記録部
24 速度記録部
100:車両、 110:先行車両
200 道路
A,B,C,D 構造物
Fi フレーム
G1,G2,G3,G4,Gx 画像
GL 画像横方向の端
Ki 係数
Lab,Lbc,Lcd,Lx 距離
RA,RB,RC,RD 範囲
Pa,Pb,Pc,Pd 構造物を代表する画素の位置
S1,S2,S3 画素範囲
Ta,Tb,Tc,Td 時刻
VA 平均速度
Vj 速度値
Xa:構造物Aに対応する位置、 Xb:構造物Bに対応する位置、
Xc:構造物Cに対応する位置、 Xd:構造物Dに対応する位置
X:進行方向、 Y:横方向
Z:画像縦方向の座標値、 ΔZ:画像縦方向の画素数
ΔT フレーム間の時間
REFERENCE SIGNS
Xc: position corresponding to structure C, Xd: position corresponding to structure D, X: direction of travel, Y: horizontal direction, Z: coordinate value in the vertical direction of the image, ΔZ: number of pixels in the vertical direction of the image, ΔT: time between frames
Claims (5)
前記移動体の進行方向に沿って互いに異なる位置にある第一構造物および第二構造物を前記動画の画像から検出する検出部と、
前記移動体の速度データおよび前記検出部の検出結果に基づいて前記第一構造物に対応する位置から前記第二構造物に対応する位置までの前記移動体の移動距離を取得し、かつ前記検出部の検出結果および取得した前記移動距離から画像縦方向の画素数と距離との関係を示す係数を決定する距離係数算出部と、
前記係数と前記画像における画像縦方向の画素数とに基づいて前記移動体の進行方向に沿った距離を算出する距離算出部と、
を備えたことを特徴とする距離算出装置。 an image acquisition unit that acquires a video image of a moving object in a traveling direction generated by a camera mounted on the moving object;
a detection unit that detects a first structure and a second structure that are located at different positions along a traveling direction of the moving object from an image of the moving image;
a distance coefficient calculation unit that acquires a moving distance of the moving object from a position corresponding to the first structure to a position corresponding to the second structure based on speed data of the moving object and a detection result of the detection unit, and determines a coefficient indicating a relationship between the number of pixels in the vertical direction of the image and the distance based on the detection result of the detection unit and the acquired moving distance;
a distance calculation unit that calculates a distance along a traveling direction of the moving object based on the coefficient and the number of pixels in a vertical direction of the image in the image;
A distance calculation device comprising:
前記検出部は、前記参照画像から、前記第二構造物を代表する画素の画像縦方向の位置である第二の位置を検出し、
前記距離係数算出部は、前記第一の位置から前記第二の位置までの画像縦方向の画素数と、取得した前記移動距離とに基づいて、前記第一の位置から前記第二の位置までの範囲における前記係数を決定する
請求項1に記載の距離算出装置。 the detection unit detects a first position, which is a position in a vertical direction of an image of a pixel representative of the first structure, from a reference image in which both the first structure and the second structure are captured;
the detection unit detects, from the reference image, a second position that is a position in a vertical direction of an image of a pixel that represents the second structure;
The distance calculation device according to claim 1 , wherein the distance coefficient calculation unit determines the coefficient in the range from the first position to the second position based on the number of pixels in a vertical direction of an image from the first position to the second position and the acquired movement distance.
前記検出部は、前記車両が走行する道路に沿って配置された構造物を前記第一構造物および前記第二構造物として検出する
請求項1または2に記載の距離算出装置。 The image acquisition unit acquires an image of a scene in front of the vehicle from the camera mounted on the vehicle,
The distance calculation device according to claim 1 , wherein the detection unit detects structures arranged along a road on which the vehicle travels as the first structure and the second structure.
請求項1から3の何れか1項に記載の距離算出装置。 The distance calculation device according to claim 1 , wherein the distance coefficient calculation unit obtains the distance traveled by the moving body based on a time when the first structure is visible at a horizontal edge of the image and a time when the second structure is visible at a horizontal edge of the image.
前記移動体の進行方向に沿って互いに異なる位置にある第一構造物および第二構造物を前記動画の画像から検出するステップと、
前記移動体の速度データおよび前記検出するステップの検出結果に基づいて前記第一構造物から前記第二構造物までの前記移動体の移動距離を取得するステップと、
前記検出するステップの検出結果および取得した前記移動距離から画像縦方向の画素数と距離との関係を示す係数を決定するステップと、
前記係数と前記画像における画像縦方向の画素数とに基づいて前記移動体の進行方向に沿った距離を算出するステップと、
を含むことを特徴とする距離算出方法。 acquiring a video captured by a camera mounted on the moving object in the traveling direction of the moving object;
detecting, from images of the video, a first structure and a second structure that are located at different positions along a traveling direction of the moving object;
acquiring a moving distance of the moving object from the first structure to the second structure based on speed data of the moving object and a detection result of the detecting step;
determining a coefficient indicating a relationship between the number of pixels in the vertical direction of the image and the distance from the detection result of the detecting step and the acquired movement distance;
calculating a distance along a moving direction of the moving object based on the coefficient and the number of pixels in a vertical direction of the image in the image;
A distance calculation method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020173657A JP7485580B2 (en) | 2020-10-15 | 2020-10-15 | Distance calculation device and distance calculation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020173657A JP7485580B2 (en) | 2020-10-15 | 2020-10-15 | Distance calculation device and distance calculation method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2022065245A JP2022065245A (en) | 2022-04-27 |
JP7485580B2 true JP7485580B2 (en) | 2024-05-16 |
Family
ID=81386271
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020173657A Active JP7485580B2 (en) | 2020-10-15 | 2020-10-15 | Distance calculation device and distance calculation method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7485580B2 (en) |
-
2020
- 2020-10-15 JP JP2020173657A patent/JP7485580B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2022065245A (en) | 2022-04-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5441549B2 (en) | Road shape recognition device | |
CN102317954B (en) | Method for detecting objects | |
US8289189B2 (en) | Camera system for use in vehicle parking | |
EP1806595B1 (en) | Estimating distance to an object using a sequence of images recorded by a monocular camera | |
US9495603B2 (en) | Method for determining whether a vehicle can pass through an object by means of a 3-D camera | |
JP4714104B2 (en) | Object tilt detection device | |
CN106324618B (en) | Realize the method based on laser radar detection lane line system | |
JP2018092501A (en) | On-vehicle image processing apparatus | |
EP2963634B1 (en) | Stereo camera device | |
US20110169957A1 (en) | Vehicle Image Processing Method | |
JP5982298B2 (en) | Obstacle detection device and obstacle detection method | |
WO2019116687A1 (en) | Road map generation system and road map generation method | |
JP4901275B2 (en) | Travel guidance obstacle detection device and vehicle control device | |
EP2928178A1 (en) | On-board control device | |
CN110378836B (en) | Method, system and equipment for acquiring 3D information of object | |
CN103608217A (en) | Retrofit parking assistance kit | |
JP3961584B2 (en) | Lane marking detector | |
JP2007309799A (en) | On-board distance measuring apparatus | |
JP4256992B2 (en) | Obstacle detection device | |
KR101980509B1 (en) | Inter-vehicle distance estimation method and inter-vehicle distance estimation device | |
JP7485580B2 (en) | Distance calculation device and distance calculation method | |
JP7320184B2 (en) | electric vehicle | |
JP4997604B2 (en) | Personal mobile vehicle driving support device | |
JP5723561B2 (en) | Driving assistance device | |
JP4106163B2 (en) | Obstacle detection apparatus and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230919 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20240327 |
|
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: 20240501 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240502 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7485580 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |