JP6982865B2 - Moving image distance calculation device and moving image distance calculation program - Google Patents
Moving image distance calculation device and moving image distance calculation program Download PDFInfo
- Publication number
- JP6982865B2 JP6982865B2 JP2017235198A JP2017235198A JP6982865B2 JP 6982865 B2 JP6982865 B2 JP 6982865B2 JP 2017235198 A JP2017235198 A JP 2017235198A JP 2017235198 A JP2017235198 A JP 2017235198A JP 6982865 B2 JP6982865 B2 JP 6982865B2
- Authority
- JP
- Japan
- Prior art keywords
- pixels
- time
- distance
- moving
- target pixel
- 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 87
- 238000000034 method Methods 0.000 claims description 80
- 238000000605 extraction Methods 0.000 claims description 32
- 230000005484 gravity Effects 0.000 claims description 21
- 238000005259 measurement Methods 0.000 claims description 8
- 230000001186 cumulative effect Effects 0.000 description 39
- 230000008569 process Effects 0.000 description 26
- 230000006870 function Effects 0.000 description 25
- 238000012545 processing Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 8
- 230000000007 visual effect Effects 0.000 description 8
- 230000008859 change Effects 0.000 description 6
- 230000007704 transition Effects 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 238000010191 image analysis Methods 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 206010047571 Visual impairment Diseases 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000001149 cognitive effect Effects 0.000 description 1
- 238000005314 correlation function Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- 239000013598 vector Substances 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Landscapes
- Measurement Of Optical Distance (AREA)
- Image Analysis (AREA)
Description
本発明は、動画像距離算出装置および動画像距離算出用プログラムに関し、より詳細には、移動する一台のカメラにより進行方向の正面の様子を撮影した動画像に基づいて、動画像に映った対象物からカメラまでの距離を算出する動画像距離算出装置および動画像距離算出用プログラムに関する。 The present invention relates to a moving image distance calculation device and a moving image distance calculation program, and more specifically, it is reflected in a moving image based on a moving image obtained by taking a front view in the traveling direction with a moving camera. The present invention relates to a moving image distance calculation device for calculating the distance from an object to a camera and a moving image distance calculation program.
近年、車両やドローンなどの移動物体に対して、正面方向の外界を撮影するためのカメラを設置することが多い。近時では、カメラにより正面方向の様子を単に撮影するだけでなく、車両やドローンなどの自動運転に必要な距離情報の取得等に、撮影された動画像を利用したいという要望が存在する。 In recent years, a camera for photographing the outside world in the front direction is often installed on a moving object such as a vehicle or a drone. Recently, there is a demand to use the captured moving image not only to capture the front view with a camera but also to acquire the distance information necessary for automatic driving of vehicles and drones.
移動物体と他物体との距離測定行う方法として、移動物体に距離センサ等を設置する方法が多く用いられている。距離センサとして、例えば、レーザーセンサ、超音波センサ、赤外線センサ等を用いて、他物体との距離を直接的に測定する方法が用いられている(例えば、非特許文献1参照)。 As a method of measuring the distance between a moving object and another object, a method of installing a distance sensor or the like on the moving object is often used. As the distance sensor, for example, a method of directly measuring the distance to another object by using a laser sensor, an ultrasonic sensor, an infrared sensor or the like is used (see, for example, Non-Patent Document 1).
また、近時では、ステレオカメラにより撮影された動画像を画像解析することによって、撮影された他物体との距離を算出する方法も用いられている(例えば、非特許文献2参照)。 Recently, a method of calculating the distance to another object taken by image analysis of a moving image taken by a stereo camera has also been used (see, for example, Non-Patent Document 2).
一般的に、車両に距離センサを設置する場合、1台の車両に複数台の距離センサを設置することが多い。例えば、車両から比較的近い他物体を検出するために、超音波センサが設置される。車両から比較的遠い他物体を検出するために、レーザーセンサが併設される。距離センサによる情報の精度を高めるためには、数種類の距離センサを複数設置することが必要になるため、コスト上昇を招くという問題が生じていた。特に、レーザーセンサは、他のセンサよりも高額であることから、コスト負担が増大するという問題があった。 Generally, when a distance sensor is installed in a vehicle, a plurality of distance sensors are often installed in one vehicle. For example, ultrasonic sensors are installed to detect other objects that are relatively close to the vehicle. A laser sensor is installed in order to detect other objects that are relatively far from the vehicle. In order to improve the accuracy of information by the distance sensor, it is necessary to install a plurality of distance sensors of several types, which causes a problem of cost increase. In particular, since the laser sensor is more expensive than other sensors, there is a problem that the cost burden increases.
また、レーザーセンサは、前方の物体との距離測定をすることはできても、その物体が人であるのか、車両であるのか、障害物であるのか等の測定対象の識別・特定を行うことが困難であるという問題があった。 In addition, although the laser sensor can measure the distance to an object in front, it identifies and identifies the measurement target such as whether the object is a person, a vehicle, or an obstacle. There was a problem that it was difficult.
ステレオカメラを用いて前方の物体との距離測定を行う場合には、画像解析処理等により測定対象物の識別・特定を行うことが可能である。しかしながら、ステレオカメラの場合には、少なくとも2台以上のカメラが必要になるため、コスト上昇を招くという問題があった。 When measuring the distance to the object in front using a stereo camera, it is possible to identify and specify the object to be measured by image analysis processing or the like. However, in the case of a stereo camera, at least two or more cameras are required, which causes a problem of cost increase.
さらに、ステレオカメラを用いる場合には、測定される距離の点群が、外界のどの物体に対応しているかを決定する必要がある。従って、ステレオカメラを利用する場合であっても、距離センサを併設することが多かった。 Furthermore, when using a stereo camera, it is necessary to determine which object in the outside world the point cloud of the measured distance corresponds to. Therefore, even when using a stereo camera, a distance sensor is often installed.
また、前方の対象物との距離を求めるために、複数の距離センサを用いると、全体としてセンサ設置のためのコスト上昇を招くと共に、それらのセンサ群により取得されたデータを統合するために複雑な処理が必要になるという問題が生じていた。同様の問題は、車両だけでなく、ドローン等のような移動物体において、他物体との距離を測定する場合に生ずる問題であった。 In addition, using multiple distance sensors to determine the distance to the object in front leads to an increase in the cost for sensor installation as a whole, and is complicated to integrate the data acquired by those sensor groups. There was a problem that various processing was required. A similar problem has occurred when measuring the distance to another object not only in a vehicle but also in a moving object such as a drone.
本発明は、上記問題に鑑みてなされたものであり、移動する1台のカメラによって進行方向の正面の様子が撮影された動画像に基づいて、動画像に映る対象物からカメラまでの距離を算出する動画像距離算出装置および動画像距離算出用プログラムを提供することを課題とする。 The present invention has been made in view of the above problems, and the distance from the object reflected in the moving image to the camera is determined based on the moving image in which the front view in the traveling direction is taken by one moving camera. An object of the present invention is to provide a moving image distance calculation device for calculation and a moving image distance calculation program.
上記課題を解決するために、本発明に係る動画像距離算出装置は、移動する1台のカメラによって移動方向の正面の様子を時間t=τ−T(但し、τ>0,T>0)から時間t=τまで撮影した動画像に基づいて、当該動画像に映る対象物から前記カメラまでの距離を算出する動画像距離算出装置であって、前記動画像の時間t=τ−Tの時のフレーム画像に映る対象物の画素の1つをターゲットピクセルとし、当該フレーム画像からM個(M≧2)の異なる対象物毎に前記ターゲットピクセルを抽出するターゲットピクセル抽出手段と、時間t=τ−Tから時間t=τまでの複数の前記フレーム画像に基づいて、前記ターゲットピクセル抽出手段により抽出されたM個の前記ターゲットピクセルの座標の軌跡を、2次元画像を対象とする動的計画法に基づいて、時間t=τ−Tの前記フレーム画像から時間t=τの前記フレーム画像までの時系列順に算出する軌跡算出手段と、該軌跡算出手段により算出されたM個の前記軌跡に基づいて、時間t=τ−Tの前記フレーム画像の座標から時間t=τの前記フレーム画像の座標までの移動画素数qm(m=1,2,・・・,M)を、M個の前記ターゲットピクセル毎に測定する移動画素数測定手段と、前記移動画素数測定手段により測定されたM個の前記移動画素数qmのうち、前記移動画素数が最も少ない画素数をμとし、前記移動画素数が最も多い画素数をγとし、M個の前記ターゲットピクセルによりそれぞれ特定される対象物から前記カメラまでの距離のうちで最も近い距離をZnとし、M個の前記ターゲットピクセルによりそれぞれ特定される対象物から前記カメラまでの距離のうちで最も遠い距離をZLとして、定数aおよび定数bを、
a=ZL・exp((μ/(γ−μ))log(ZL/ZN))
b=(1/(γ−μ))log(ZL/ZN)
により算出し、M個の前記ターゲットピクセルのそれぞれに対応する前記対象物から前記カメラまでの時間t=τにおける距離をZm(m=1,2,・・・,M)として、当該距離Zmを、前記定数aおよび前記定数bと、M個の前記移動画素数qmとに基づいて、
Zm=a・exp(−bqm)により算出する距離算出手段とを有することを特徴とする。
In order to solve the above problem, the moving image distance calculation device according to the present invention uses one moving camera to change the front view in the moving direction with time t = τ−T (however, τ> 0, T> 0). It is a moving image distance calculation device that calculates the distance from the object reflected in the moving image to the camera based on the moving image taken from the time t = τ, and the time t = τ−T of the moving image. A target pixel extraction means for extracting one of the pixels of an object reflected in the frame image at the time as a target pixel, and extracting the target pixel for each of M (M ≧ 2) different objects from the frame image, and time t = Based on the plurality of frame images from τ−T to time t = τ, the trajectory of the coordinates of the M target pixels extracted by the target pixel extraction means is dynamically planned for the two-dimensional image. Based on the method, the locus calculation means for calculating from the frame image at time t = τ −T to the frame image at time t = τ in chronological order, and the M loci calculated by the locus calculation means. based on the time t = tau-T the time from the coordinates of the frame image t = number of mobile pixels up coordinates of the frame image of tau q m of (m = 1,2, ···, M ) a, M pieces wherein to the number of pixels moved measuring means for measuring for each target pixel, among the measured M-number of the mobile number of pixels q m by the moving pixel number measuring means, and the number of pixels the number of moving pixels is smallest μ of, Let γ be the number of pixels having the largest number of moving pixels, and let Zn be the shortest distance from the object specified by the M target pixels to the camera, and the M target pixels be used. The farthest distance from the specified object to the camera is Z L , and the constant a and the constant b are set to Z L.
a = Z L · exp ((μ / (γ-μ)) log (Z L / Z N ))
b = (1 / (γ-μ)) log (Z L / Z N )
The distance Z at the time t = τ from the object corresponding to each of the M target pixels to the camera is defined as Z m (m = 1, 2, ..., M). m is based on the constant a and the constant b and the number of M moving pixels q m .
It is characterized by having a distance calculation means calculated by Z m = a · exp (−bq m).
また、本発明に係る動画像距離算出用プログラムは、移動する1台のカメラによって移動方向の正面の様子を時間t=τ−T(但し、τ>0,T>0)から時間t=τまで撮影した動画像に基づいて、当該動画像に映る対象物から前記カメラまでの距離を算出するための動画像距離算出用プログラムであって、制御手段に、前記動画像の時間t=τ−Tの時のフレーム画像に映る対象物の画素の1つをターゲットピクセルとして、当該フレーム画像からM個(M≧2)の異なる対象物毎に前記ターゲットピクセルを抽出させるターゲットピクセル抽出機能と、時間t=τ−Tから時間t=τまでの複数の前記フレーム画像に基づいて、前記ターゲットピクセル抽出機能により抽出されたM個の前記ターゲットピクセルの座標の軌跡を、2次元画像を対象とする動的計画法に基づいて、時間t=τ−Tの前記フレーム画像から時間t=τの前記フレーム画像までの時系列順に算出させる軌跡算出機能と、該軌跡算出機能により算出されたM個の前記軌跡に基づいて、時間t=τ−Tの前記フレーム画像の座標から時間t=τの前記フレーム画像の座標までの移動画素数qm(m=1,2,・・・,M)を、M個の前記ターゲットピクセル毎に測定させる移動画素数測定機能と、前記移動画素数測定機能により測定されたM個の前記移動画素数qmのうち、前記移動画素数が最も少ない画素数をμとし、前記移動画素数が最も多い画素数をγとし、M個の前記ターゲットピクセルによりそれぞれ特定される対象物から前記カメラまでの距離のうちで最も近い距離をZnとし、M個の前記ターゲットピクセルによりそれぞれ特定される対象物から前記カメラまでの距離のうちで最も遠い距離をZLとして、定数aおよび定数bを、
a=ZL・exp((μ/(γ−μ))log(ZL/ZN))
b=(1/(γ−μ))log(ZL/ZN)により算出させ、M個の前記ターゲットピクセルのそれぞれに対応する前記対象物から前記カメラまでの時間t=τにおける距離をZm(m=1,2,・・・,M)として、当該距離Zmを、前記定数aおよび前記定数bと、M個の前記移動画素数qmとに基づいて、
Zm=a・exp(−bqm)により算出させる距離算出機能とを実現させることを特徴とする。
Further, in the moving image distance calculation program according to the present invention, the front view in the moving direction is changed from time t = τ−T (where τ> 0, T> 0) to time t = τ by one moving camera. It is a moving image distance calculation program for calculating the distance from the object reflected in the moving image to the camera based on the moving images taken up to, and the time t = τ− of the moving image is used as a control means. A target pixel extraction function that uses one of the pixels of the object displayed in the frame image at the time of T as the target pixel and extracts the target pixel for each of M (M ≧ 2) different objects from the frame image, and time. Based on the plurality of frame images from t = τ−T to time t = τ, the locus of the coordinates of the M target pixels extracted by the target pixel extraction function is the motion for the two-dimensional image. A locus calculation function for calculating in chronological order from the frame image at time t = τ −T to the frame image at time t = τ based on the target planning method, and M of the above calculated by the locus calculation function. Based on the locus, the number of moving pixels q m (m = 1, 2, ..., M) from the coordinates of the frame image at time t = τ −T to the coordinates of the frame image at time t = τ is determined. and M of the measured to the number of pixels moved measurement function for each target pixel, among the measured M-number of the mobile number of pixels q m by the number of pixels moved measurement function, the number of pixels the number of moving pixels is smallest μ Let γ be the number of pixels having the largest number of moving pixels, and let Zn be the shortest distance from the object specified by the M target pixels to the camera, and M the targets. Let Z L be the farthest distance from the object specified by each pixel to the camera, and let constant a and constant b be.
a = Z L · exp ((μ / (γ-μ)) log (Z L / Z N ))
Calculated by b = (1 / (γ-μ)) log (Z L / Z N ), the distance from the object corresponding to each of the M target pixels to the camera at time t = τ is Z. As m (m = 1, 2, ..., M), the distance Z m is set based on the constant a and the constant b and the number of M moving pixels q m .
It is characterized by realizing a distance calculation function calculated by Z m = a · exp (−bq m).
また、上述した動画像距離算出装置または動画像距離算出用プログラムにおいて、ターゲットピクセルの抽出を行うために用いられる前記フレーム画像に対し、mean-shift法を適用することにより、当該フレーム画像を複数の領域に分割し、分割された前記領域のうち、前記対象物が映る領域の重心点の画素を前記ターゲットピクセルとして、あるいは、前記領域の画素に対して端から順番に番号を付加し、当該領域の画素の番号のうち中間の番号に該当する画素を前記ターゲットピクセルとして、異なる対象物が映るM個(M≧2)の領域毎に前記ターゲットピクセルを抽出するものであってもよい。 Further, by applying the mean-shift method to the frame image used for extracting the target pixel in the moving image distance calculation device or the moving image distance calculation program described above, a plurality of the frame images can be obtained. It is divided into regions, and among the divided regions, the pixel at the center of gravity of the region where the object is reflected is used as the target pixel, or the pixels in the region are numbered in order from the end to be the region. The pixel corresponding to the intermediate number among the pixel numbers of the above may be used as the target pixel, and the target pixel may be extracted for each of M (M ≧ 2) regions in which different objects are reflected.
本発明に係る動画像距離算出装置および動画像距離算出用プログラムによれば、移動するカメラにより進行方向の正面の様子が撮影された動画像に基づいて、動画像に映る対象物からカメラまでの距離を算出することが可能になる。 According to the moving image distance calculation device and the moving image distance calculation program according to the present invention, from the object reflected in the moving image to the camera based on the moving image in which the front view in the traveling direction is taken by the moving camera. It becomes possible to calculate the distance.
以下、本発明に係る動画像距離算出装置の一例を示し、図面を用いて詳細に説明する。図1は、動画像距離算出装置の概略構成を示したブロック図である。動画像距離算出装置100は、記録部101と、ROM(Read Only Memory)102と、RAM(Random Access Memory)103と、CPU(Central Processing Unit:制御手段、領域分割手段、ターゲットピクセル抽出手段、距離算出手段、軌跡算出手段、移動画素数測定手段、距離算出手段)104とを有している。
Hereinafter, an example of the moving image distance calculation device according to the present invention will be shown and described in detail with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of a moving image distance calculation device. The moving image
動画像距離算出装置100には、カメラ200が接続される。カメラ200は、例えば、車両やドローンなどに搭載される。カメラ200は、移動する車両等の進行方向正面の様子を動画像として撮影することが可能となっている。また、動画像距離算出装置100には、モニタ210が接続されている。モニタ210には、カメラ200によって撮影された動画像等を表示させることが可能になっている。
A
記録部101には、カメラ200により撮影された動画像が記録される。より詳細には、複数のフレーム画像を時系列的に記録したデータとして、記録部101に動画像が記録される。例えば、時間t=1から時間t=Tまでの動画像を、カメラ200で撮影した場合を考える。カメラ200の動画像として、Δt時間毎に1枚のフレームの画像(フレーム画像)を記録できる場合には、記録部101に、T/Δt枚のフレーム画像が時系列的に記録されることになる。本実施の形態に係る記録部101では、一例として、単位時間毎のフレーム画像をT枚記録することが可能になっている。
A moving image taken by the
なお、動画像距離算出装置100あるいはカメラ200に、フレームバッファーを設けて、カメラ200で撮影された単位時間毎のフレーム画像がフレームバッファーに一時的に記録され、フレームバッファーに記録されたフレーム画像が、時系列的に記録部101に記録される構成であってもよい。また、記録部101に記録される動画像は、カメラ200によりリアルタイムに撮影された動画像には限定されず、予めカメラ200によって撮影された動画像(過去の動画像)であってもよい。
A frame buffer is provided in the moving image
また、カメラ200により撮影された動画像は、デジタルの動画像だけには限定されない。例えば、撮影された動画像がアナログの動画像であっても、デジタル変換処理によって、時系列的にフレーム画像を記録部101に記録させることが可能であれば、動画像距離算出装置100の距離算出処理に利用することが可能である。
Further, the moving image taken by the
記録部101は、一般的なハードディスク等によって構成されている。なお、記録部101の構成は、ハードディスクだけに限定されるものではなく、フラッシュメモリ、SSD(Solid State Drive / Solid State Disk)などであってもよい。記録部101は、動画像を、時系列的な複数のフレーム画像として記録することが可能な記録媒体であるならば、具体的な構成は特に限定されない。
The
CPU104は、記録部101に時系列的に記録された複数のフレーム画像(動画像)に基づいて、フレーム画像に映っている対象物からカメラ200までの距離を、対象物の映っている画素に応じて算出する処理を行う。CPU104は、後述する処理プログラム(図11(a)(b)のフローチャートに基づくプログラム)に従って、特定の画素(ターゲットピクセル)毎の距離算出処理を行うが、その詳細については後述する。
Based on a plurality of frame images (moving images) recorded in time series in the
ROM102には、フレーム画像に映っている対象物からカメラ200までの距離を算出するためプログラム等が記録されている。RAM103は、CPU104の処理に利用されるワークエリアとして用いられる。
A program or the like is recorded in the
本実施の形態に係る動画像距離算出装置100では、CPU104で実行されるプログラム(図11(a)(b)に示すフローチャート)が、ROM102に記録される場合について説明を行う。しかしながら、これらのプログラムは、記録部101に記録されるものであってもよい。
In the moving image
カメラ200は、レンズを通してカメラ正面の景色等を動画像として撮影可能な撮影手段である。動画像を撮影することが可能であれば、カメラ200の種類・構成は特に限定されない。例えば、一般的なムービーカメラであってもよく、また、スマートフォン等のカメラ機能を利用するものであってもよい。
The
モニタ210は、カメラ200で撮影された動画像や、距離算出処理によりトラッキング処理された画素の軌跡が示される画像等(例えば、後述する図7や図8の画像等)を、ユーザに対して視認可能に表示させることが可能となっている。モニタ210には、液晶ディスプレイや、CRTディスプレイなどの一般的な表示装置が用いられる。
The
次に、記録部101に時系列順に記録されたフレーム画像に基づいて、フレーム画像に映った対象物の距離を算出する考え方について説明する。
Next, a concept of calculating the distance of an object reflected in the frame image based on the frame images recorded in the
2000年以上前に、ユークリッド(Euclid)が、動的視差(motion parallax)という視覚的現象について論じている。動的視差による視覚的現象とは、物体が等速で動いているときに、遠くの物の方が、近くの物よりも、視覚的に動きが小さくなる現象である。図2は、移動する物体から見た正面方向の様子を模式的に示した図である。図2に示すように、物体が前方に移動するとき、中心(図2のA参照)に位置する物は、あまり動かない。中心以外の周辺の様子(図2のB参照)を観察すると、遠くの物の動きは小さく、近くの物の動きは大きくなる。このような動的視差による視覚的現象は、日常的に観測される。この視覚的現象は、心理学的な研究の対象となっている。また、この視覚的現象を応用した技術が、コンピュータグラフィックスによるアニメーション処理や、パイロット運転技術教育用のシミュレータ開発などに利用されている。 More than 2000 years ago, Euclid discussed the visual phenomenon of motion parallax. The visual phenomenon due to dynamic parallax is a phenomenon in which when an object is moving at a constant velocity, the movement of a distant object is visually smaller than that of a nearby object. FIG. 2 is a diagram schematically showing a state in the front direction as seen from a moving object. As shown in FIG. 2, when the object moves forward, the object located in the center (see A in FIG. 2) does not move much. Observing the surroundings other than the center (see B in FIG. 2), the movement of distant objects is small, and the movement of nearby objects is large. Visual phenomena due to such dynamic parallax are observed on a daily basis. This visual phenomenon is the subject of psychological research. In addition, technology that applies this visual phenomenon is being used for animation processing using computer graphics and for developing simulators for pilot driving technology education.
動画像距離算出装置100では、動的視差による視覚的現象を利用して、移動する車両やドローン等に搭載されたカメラによって撮影された動画像より、動画像に映っている対象物からカメラ200までの距離を算出する。
The moving image
図3は、動画像のデータとターゲットピクセルとを説明するための図である。カメラ200により撮影された動画像を、f(x,y,t)で表す。変数xの範囲は、1≦x≦Xとし、変数yの範囲は、1≦y≦Yとし、変数tは、t=1,2,・・・,Tとする。Xは、カメラ200によって撮影される動画像の横画素数を示し、Yは縦画素数を示す。f(x,y,t)は、該当する画素の値であり、通常、RGB(R:赤、G:緑、B:青)の値を示す。(x,y)は該当する画素の座標点を示し、tは時間(相対時刻)を示す。
FIG. 3 is a diagram for explaining the moving image data and the target pixel. The moving image taken by the
動画像をf(x,y,t)で示すことにより、動画像のデータを図3のような直方体のデータとして表すことができる。図3の最も手前の面は、時間t=1のフレーム画像f(x,y,t)(但し、1≦x≦X,1≦y≦Y)を示すことになる。このフレーム画像中のいずれかの座標(x0,y0)のピクセルf(x0,y0,1)をターゲットピクセルとする。図3では、説明の便宜上、ターゲットピクセルが1つの場合について説明するが、ターゲットピクセルは、1つだけには限定されない。 By indicating the moving image by f (x, y, t), the moving image data can be represented as rectangular parallelepiped data as shown in FIG. The foremost surface of FIG. 3 shows a frame image f (x, y, t) at time t = 1 (however, 1 ≦ x ≦ X, 1 ≦ y ≦ Y). The pixel f (x 0 , y 0 , 1) at any of the coordinates (x 0 , y 0 ) in this frame image is set as the target pixel. In FIG. 3, for convenience of explanation, the case where there is one target pixel will be described, but the number of target pixels is not limited to one.
ターゲットピクセルが、時間tの経過とともに直方体の中でどのように動いて、時間t=Tのフレーム画像の中のいずれの画素に至るかを追跡することを考える。ターゲットピクセルの追跡を考えることにより、移動するカメラで正面の様子が撮影された場合に、動的視差の視覚的現象の観点から、動画像に記録された対象物の見え方が、どのように変化するかを検出することができる。 Consider tracking how a target pixel moves in a rectangular parallelepiped over time t to reach which pixel in the frame image at time t = T. By considering the tracking of the target pixel, how the object recorded in the moving image looks from the viewpoint of the visual phenomenon of dynamic parallax when the front view is taken by a moving camera. It is possible to detect whether it changes.
図4は、時間経過に伴って変化するターゲットピクセルの追跡処理を説明するための図である。図4には、時間t=1の時の座標(x0,y0)におけるターゲットピクセルf(x0,y0,1)と、時間t=Tの時の座標(x* 0(T),y* 0(T))におけるターゲットピクセルf(x* 0(T),y* 0(T),T)とが示されている。ターゲットピクセルの追跡を、トラッキングと称する。ターゲットピクセルが、時間t=1のフレーム画像の中の位置(x0,y0,1)(=(x0,y0))から、時間t=Tのフレーム画像の中の位置(x* 0(T),y* 0(T))へ移動した場合を考える。このとき、時間t=1から時間t=Tまでの経過時間Tによる、ターゲットピクセルの累積動的視差をq(x0,y0,T)とすると、累積動的視差q(x0,y0,T)は、
q(x0,y0,T)=|(x0,y0)−(x* 0(T),y* 0(T))|
として定めることができる。
FIG. 4 is a diagram for explaining a tracking process of a target pixel that changes with the passage of time. In FIG. 4, the target pixel f (x 0 , y 0 , 1) at the coordinates (x 0 , y 0 ) at the time t = 1 and the coordinates (x * 0 (T)) at the time t = T are shown. , Y * 0 (T)) and the target pixel f (x * 0 (T), y * 0 (T), T). Tracking the target pixel is called tracking. The target pixel is located in the frame image at time t = 1 from the position (x 0 , y 0 , 1) (= (x 0 , y 0 )) in the frame image at time t = T (x *. Consider the case of moving to 0 (T), y * 0 (T)). At this time, if the cumulative dynamic parallax of the target pixel due to the elapsed time T from the time t = 1 to the time t = T is q (x 0 , y 0 , T), the cumulative dynamic parallax q (x 0 , y). 0 , T) is
q (x 0 , y 0 , T) = | (x 0 , y 0 )-(x * 0 (T), y * 0 (T)) |
Can be determined as.
累積動的視差q(x0,y0,T)は、時間t=1のフレーム画像の座標(x0,y0)(=f(x0,y0,1)の座標)に映った対象物の現実世界の物体位置(物体点)が、時間t=Tのフレーム画像上の座標(x* 0(T),y* 0(T))に映った対象物の現実世界の物体位置(物体点)まで移動した場合における、カメラ200から現実世界の物体位置(物体点)までの距離の変化に対応するものである。累積動的視差の変化量と、カメラ200から現実世界の物体位置までの距離の変化量との対応関係を求めることにより、累積動的視差qに基づいて、カメラ200から現実世界の物体位置までの距離を求めることができる。
The cumulative dynamic parallax q (x 0 , y 0 , T) is reflected in the coordinates (x 0 , y 0 ) (= f (x 0 , y 0 , 1) coordinates of the frame image at time t = 1). The object position (object point) in the real world of the object is reflected in the coordinates (x * 0 (T), y * 0 (T)) on the frame image at time t = T. It corresponds to the change in the distance from the
図5は、累積動的視差に基づいて対象物からカメラ200までの距離を求める方法を説明するため図である。図5の縦軸は、カメラ200から対象物までの仮想距離Zvを示す。仮想距離Zvのプラスの方向は図の下方向である。図5の横軸は、累積動的視差qを示す。累積動的視差qのプラスの方向は、図の右方向である。カメラ200が正面方向に進むとすると、Δtの時間経過によって、仮想距離はΔZv(>0)だけ短くなり、累積動的視差は、Δq(>0または<0)だけ変化する。仮想距離Zvの値は、仮想であるゆえ、ある定数である単位累積動的視差q0の値に対応するものとする。動的視差の特性として、動的視差の値が大きいほど、カメラ200から物体までの距離は短く、動的視差の値が小さいほど、カメラ200から物体までの距離は長い現象が存在する。このため、仮想距離Zvと累積動的視差q0とのパラメータには、比例関係が成立する。すなわち、図5に示す関係から、Zv:q0=−ΔZv:Δqの比例関係が成立する。
FIG. 5 is a diagram for explaining a method of obtaining a distance from an object to the
この比例関関係から、−q0・ΔZv=Zv・Δqの関係式が成立し、
ΔZv/Zv=−Δq/q0
logZv=−q/q0+c (cは定数)と式を変形することにより
Zv=a・exp(−bq)
が成立する。ここで、a,bは正の定数である。またexp(−bq)は、自然対数の底の値(ネイピア数:Napier's constant)の−bq乗を示している。定数a,bの値が決定されると、カメラ200により撮影された動画像に基づき累積動的視差qの値を算出することにより、Zvの値を、仮想距離ではなく現実世界の距離として求めることが可能になる。
From this proportional relation, the relational expression of −q 0 · ΔZv = Zv · Δq is established.
ΔZv / Zv = −Δq / q 0
By transforming the equation with logZv = -q / q 0 + c (c is a constant)
Zv = a · exp (-bq)
Is established. Here, a and b are positive constants. Further, exp (-bq) indicates the value of the base of the natural logarithm (Napier's constant) to the power of -bq. When the values of the constants a and b are determined, the value of Zv is obtained as the distance in the real world instead of the virtual distance by calculating the value of the cumulative dynamic parallax q based on the moving image taken by the
定数a,bの値は、変数Zvと変数qとの変動範囲に基づいて決定される。Zvは、既に説明したように、カメラ200から物体位置までの仮想距離を示している。仮想距離は、対象世界(対象となる世界、対象となる環境)によって変わり得る値である。例えば、本実施の形態におけるZvの対象世界は、ターゲットピクセルの累積動的視差の値の変動に依存する、動画像の仮想的な3次元空間を対象世界としている。動画像の3次元空間(対象世界)で求められる仮想距離は、現実世界の距離とは異なる値である。このため、動画像の3次元空間(対象世界)の仮想距離Zvに対応する現実世界の距離の変動範囲を視察や他の方法で、事前に決定することにより、対象世界の距離から現実世界の距離を対応づけて求めることが可能になる。
The values of the constants a and b are determined based on the fluctuation range of the variable Zv and the variable q. Zv indicates the virtual distance from the
現実世界の距離Zを、対象世界の仮想距離Zvに対応づけることができれば、
Z=a・exp(−bq) ・・・式1
によって、現実世界の距離Zを求めることができる。つまり、現実世界におけるカメラ200から物体位置までの距離Zを求めることが可能になる。
If the distance Z in the real world can be associated with the virtual distance Zv in the target world,
Z = a · exp (−bq) ・ ・ ・
Allows the distance Z in the real world to be obtained. That is, it becomes possible to obtain the distance Z from the
本実施の形態では、一例として、動画像の3次元空間(対象世界)の仮想距離Zvに対応する現実世界の距離の変動範囲を視察によって決定する。つまり、動画像の3次元空間(対象世界)の仮想距離Zvが現実世界においてどのくらいの距離範囲に含まれるかを、ユーザの目視等の観察によって決定する。 In the present embodiment, as an example, the fluctuation range of the distance in the real world corresponding to the virtual distance Zv in the three-dimensional space (target world) of the moving image is determined by inspection. That is, it is determined by visual observation of the user or the like how much the virtual distance Zv in the three-dimensional space (target world) of the moving image is included in the real world.
例えば、フレーム画像に映ったM個の対象物の距離を算出する場合、動画像の3次元空間(対象世界)においてM個の仮想距離Zvが存在することになる。このM個の仮想距離Zvに対応する現実世界での距離範囲(カメラ200からM個のそれぞれの対象物までの距離が全て含まれると判断できる現実世界の距離範囲であって、目視により判断された現実世界の距離範囲)を、ZNからZLまでの距離範囲(ZN≦ZL)とする。仮想距離Zvの距離範囲は、ZN≦Zv≦ZLで表すことができる。なお、仮想距離Zvの距離範囲を示す距離ZNおよび距離ZLは、必ずしも目視により決定される場合には限定されず、他の方法により決定されるものであっても良い。
For example, when calculating the distances of M objects reflected in a frame image, M virtual distances Zv exist in the three-dimensional space (object world) of the moving image. The real-world distance range corresponding to the M virtual distances Zv (the real-world distance range in which it can be determined that all the distances from the
累積動的視差qの値の変動範囲は、個別に動画像から求められる実験的な値により決定される。つまり、先験的な情報は必要とされない。累積動的視差qの変動範囲は、動画像に映っている物体の現実世界によって左右され、かつ、時間範囲Tにも依存する変動範囲となる。ここで、累積動的視差qは、時間t=1のフレーム画像におけるターゲットピクセルが、時間t=Tのフレーム画像においてどこまで移動したかによって求めることができる。つまり、累積動的視差qは、時間t=1のフレーム画像の座標から時間t=Tのフレーム画像の座標まで移動した、ターゲットピクセルの移動画素数により求めることができる。例えば、M個の対象物のそれぞれに対応して、M個のターゲットピクセルが存在する場合には、累積動的視差(移動画素数)もターゲットピクセルの数に応じてM個求めることができる。このようにして求められたM個の累積動的視差(移動画素数)qの変動範囲を、μ≦q≦γとする。M個の移動画素数のうち最も少ない画素数がμに該当し、M個の移動画素数のうち最も多い画素数がγに該当することになる。つまり、μとγとは、動画像によって求められた複数のターゲットピクセルの移動画素数により定まる実験的な値である。 The fluctuation range of the value of the cumulative dynamic parallax q is determined by the experimental value individually obtained from the moving image. That is, no a priori information is required. The fluctuation range of the cumulative dynamic parallax q is a fluctuation range that depends on the real world of the object shown in the moving image and also depends on the time range T. Here, the cumulative dynamic parallax q can be obtained by how far the target pixel in the frame image at time t = 1 has moved in the frame image at time t = T. That is, the cumulative dynamic parallax q can be obtained by the number of moving pixels of the target pixel moved from the coordinates of the frame image at time t = 1 to the coordinates of the frame image at time t = T. For example, when there are M target pixels corresponding to each of the M objects, the cumulative dynamic parallax (number of moving pixels) can also be obtained as M according to the number of target pixels. The fluctuation range of the cumulative dynamic parallax (number of moving pixels) q of M obtained in this way is set to μ ≦ q ≦ γ. The smallest number of pixels among the M moving pixels corresponds to μ, and the largest number of M moving pixels corresponds to γ. That is, μ and γ are experimental values determined by the number of moving pixels of the plurality of target pixels obtained by the moving image.
μ,γとZL,ZNとの対応関係は、動的視差の性質に基づいて求めることができる。μはZLに対応し、γはZNに対応する。これは、仮想距離Zvが遠いほど、動画像の物体点(物体位置)の移動量が少なくなり、仮想距離Zvが近いほど、動画像の物体点(物体位置)の移動量が多くなるという、動的視差の性質によるものである。このように、仮想距離Zvの距離範囲のうち距離が最も短い距離ZNは、累積動的視差(移動画素数)qの変動範囲のうち最も移動量が多いγに対応し、仮想距離Zvの距離範囲のうち距離が最も長い距離ZLは、累積動的視差(移動画素数)qの変動範囲のうち最も移動量が少ないμに対応することになる。 The correspondence between μ, γ and Z L , Z N can be determined based on the nature of dynamic parallax. μ corresponds to Z L and γ corresponds to Z N. This is because the farther the virtual distance Zv is, the smaller the amount of movement of the object point (object position) of the moving image is, and the closer the virtual distance Zv is, the larger the amount of movement of the object point (object position) of the moving image is. This is due to the nature of dynamic parallax. In this way, the distance Z N having the shortest distance in the distance range of the virtual distance Zv corresponds to γ having the largest amount of movement in the fluctuation range of the cumulative dynamic parallax (number of moving pixels) q, and the virtual distance Zv. The distance Z L , which has the longest distance in the distance range, corresponds to μ, which has the smallest amount of movement in the fluctuation range of the cumulative dynamic parallax (number of moving pixels) q.
従って、Zv=a・exp(−bq)のZvとqの値に、μとZL、およびγとZNとを対応づけて代入することにより、次のa,bに関する連立方程式が成立する。 Therefore, by substituting the values of Zv and q of Zv = a · exp (−bq) with μ and Z L , and γ and Z N , the following simultaneous equations for a and b are established. ..
ZL=a・exp(−bμ) ・・・式2
ZN=a・exp(−bγ) ・・・式3
この連立方程式を解くと、下記のように、定数a,bを求めることができる。
Z L = a · exp (−bμ) ・ ・ ・ Equation 2
Z N = a · exp (−bγ) ・ ・ ・ Equation 3
By solving this simultaneous equation, the constants a and b can be obtained as follows.
a=ZL・exp((μ/(γ−μ))log(ZL/ZN)) ・・・式4
b=(1/(γ−μ))log(ZL/ZN) ・・・式5
このように、定数a,bを求めて、上述した式1に適用することによって、仮想距離Zvの値を現実世界の距離Zとして算出することが可能になる。
a = Z L · exp ((μ / (γ −μ)) log (Z L / Z N )) ・ ・ ・ Equation 4
b = (1 / (γ-μ)) log (Z L / Z N ) ・ ・ ・ Equation 5
In this way, by obtaining the constants a and b and applying them to the above-mentioned
次に、ターゲットピクセルのトラッキング方法について説明する。図6は、時間t−1の時のフレーム画像から時間tの時の1つのターゲットピクセル(x,y,t)へ遷移し得るピクセル群(局所領域)、つまり、遷移対象となり得るフレーム画像のピクセル群を示した図である。2次元画像を対象とした動的計画法を用いて時間tの画素のトラッキングを行う場合には、図6に示すように、トラッキングの対象となる時間t−1の局所領域のいずれかの画素から、時間tのターゲットピクセルへ遷移されることになる。この点で、図6には、ピクセルトラッキングを行う2次元画像を対象とした動的計画法での局所遷移が示されていると判断できる。この局所遷移に基づいて2次元画像を対象とした動的計画法の漸化式が作られる。 Next, the tracking method of the target pixel will be described. FIG. 6 shows a pixel group (local region) that can transition from a frame image at time t-1 to one target pixel (x, y, t) at time t, that is, a frame image that can be a transition target. It is a figure which showed the pixel group. When tracking pixels at time t using dynamic programming for a two-dimensional image, as shown in FIG. 6, any pixel in the local region at time t-1 to be tracked. Will be transitioned to the target pixel at time t. In this respect, it can be determined that FIG. 6 shows the local transition in the dynamic programming method for the two-dimensional image to be pixel-tracked. Based on this local transition, a recurrence formula of dynamic programming for a two-dimensional image is created.
ここで、2次元画像を対象とした動的計画法とは、2つの系列間の非線形性となる対応関係を求めるための方法であって、一般的に知られる動的計画法の1つの応用例に該当する。従来の動的計画法と異なる点は、局所距離の作り方である。本実施の形態で用いる2次元画像を対象とした動的計画法では、ターゲットピクセルの画素の値と、動画像のすべての画素の値との関係において局所距離を計算する。その後、ターゲットピクセルを始点として、時間t=Tの画像のすべての画素を可能な終点として、始点から終点に至る最小の累積距離を与えるパスを、動的計画法を用いて求める。このような手法を用いることによって、時間t=1から時間t=Tまでの複数のフレーム画像にわたるターゲットピクセルの追跡を行うことが可能になる。 Here, the dynamic programming method for a two-dimensional image is a method for obtaining a non-linear correspondence between two series, and is one application of a generally known dynamic programming method. Applies to the example. The difference from the conventional dynamic programming method is how to make the local distance. In the dynamic programming method for a two-dimensional image used in the present embodiment, the local distance is calculated in the relationship between the pixel value of the target pixel and the value of all the pixels of the moving image. Then, a path that gives the minimum cumulative distance from the start point to the end point is obtained by using dynamic programming, with the target pixel as the start point and all the pixels of the image at time t = T as possible end points. By using such a technique, it becomes possible to track the target pixel over a plurality of frame images from time t = 1 to time t = T.
2次元画像を対象とする動的計画法の漸化式は、まず、ターゲットピクセルf(x0,y0,1)を用いて局所距離と呼ばれる値、d(x,y,t)=|f(x0,y0,1)−f(x,y,t)|を計算する。d(x,y,t)の境界条件は、t≦0、または、x≦0、または、x>X、または、y≧0、または、y>Yに対して、d(x,y,t)=∞とする。また、最適な局所距離を累積することによって求められる値を最適累積距離S(x,y,t)とする。最適累積距離S(x,y,t)の初期条件を、0≦x≦X+1,0≦y≦Y+1,0≦t≦T,およびS(x0,y0,1)=0に対して、S(x,y,t)=∞とする。 The recurrence formula of the dynamic programming method for a two-dimensional image first uses a target pixel f (x 0 , y 0 , 1) and a value called a local distance, d (x, y, t) = | Calculate f (x 0 , y 0 , 1) -f (x, y, t) |. The boundary condition of d (x, y, t) is d (x, y, for t ≦ 0, or x ≦ 0, or x> X, or y ≧ 0, or y> Y. t) = ∞. Further, the value obtained by accumulating the optimum local distance is defined as the optimum cumulative distance S (x, y, t). The initial condition of the optimum cumulative distance S (x, y, t) is set to 0 ≦ x ≦ X + 1, 0 ≦ y ≦ Y + 1, 0 ≦ t ≦ T, and S (x 0 , y 0 , 1) = 0. , S (x, y, t) = ∞.
このような境界条件・初期条件が設定される場合、動的計画法に基づく最適累積距離の漸化式は、
となる。
When such boundary conditions and initial conditions are set, the recurrence formula of the optimum cumulative distance based on dynamic programming is used.
Will be.
ここで、N(i,j)≡{(i+α,j+β):|α|≦α0,|β|≦β0}と定義される。N(i,j)は、図6に示す時間t−1のフレーム画像の格子点の集合を示しており、動的計画法による漸化式の関与する範囲を示す。 Here, it is defined as N (i, j) ≡ {(i + α, j + β): | α | ≤α 0 , | β | ≤β 0}. N (i, j) shows a set of grid points of the frame image at time t-1 shown in FIG. 6, and shows the range in which the recurrence formula by dynamic programming is involved.
式6に示す漸化式を、t=1からt=Tまで作用させたときの最適累積値は、S(x,y,T)のスカラー値の分布(但し、1≦x≦X,1≦y≦Y)となる。t=1からt=Tまで作用させたときの最適累積値S(x,y,T)の値が、予め設定される閾値h以下の値となり、かつ最小値となる座標を求める。この座標を(x* 0(T),y* 0(T))とすると、次の式によってこの座標を求めることができる。
ここで、記号argは、最小値を与えることになる変数x,yを取り出すという操作を意味している。このとき、ターゲットピクセル(x0,y0)の時間Tによる累積動的視差をq(x0,y0,T)とすると、累積動的視差q(x0,y0,T)は、
q(x0,y0,T)=|(x0,y0)−(x* 0(T),y* 0(T))|
と定めることができる。この累積動的視差q(x0,y0,T)の関係式を用いて、ターゲットピクセルを追跡することにより、ターゲットピクセルの軌跡(トラッキング)に基づいて、カメラ200から対象物までの距離を求めることができる。
When the recurrence formula shown in Equation 6 is applied from t = 1 to t = T, the optimum cumulative value is the distribution of scalar values of S (x, y, T) (however, 1 ≦ x ≦ X, 1). ≦ y ≦ Y). The optimum cumulative value S (x, y, T) when acted from t = 1 to t = T is a value equal to or less than a preset threshold value h, and the coordinates are obtained to be the minimum value. Assuming that these coordinates are (x * 0 (T), y * 0 (T)), these coordinates can be obtained by the following equation.
Here, the symbol arg means an operation of extracting variables x and y that give a minimum value. At this time, if the cumulative dynamic parallax of the target pixel (x 0 , y 0 ) due to the time T is q (x 0 , y 0 , T), the cumulative dynamic parallax q (x 0 , y 0 , T) is.
q (x 0 , y 0 , T) = | (x 0 , y 0 )-(x * 0 (T), y * 0 (T)) |
Can be determined. By tracking the target pixel using the relational expression of the cumulative dynamic parallax q (x 0 , y 0 , T), the distance from the
ここで,ターゲットピクセルが動画像においてどのような軌跡をとったかは、次述する漸化式によって定めることができる。動画像におけるターゲットピクセルの軌跡は、ターゲットピクセルの変化を視覚化するための重要な情報になる。 Here, the trajectory of the target pixel in the moving image can be determined by the recurrence formula described below. The locus of the target pixel in the moving image is important information for visualizing the change of the target pixel.
ターゲットピクセルの軌跡を求めるためには、到達点(x* 0(T),y* 0(T),T)から(x* 0(1),y* 0(1),1)=(x0,y0,1)までに至る点列を漸化式により求める。 To find the locus of the target pixel, from the destination (x * 0 (T), y * 0 (T), T) to (x * 0 (1), y * 0 (1), 1) = (x) The sequence of points up to 0, y 0 , 1) is obtained by a recurrence formula.
まず、座標(x* 0(T−1),y* 0(T−1))のターゲットピクセルを、
(x* 0(T−1), y* 0(T−1))
=(x* 0(T)+i*,y* 0(T)+j*)によって求める。
First, the target pixel of the coordinates (x * 0 (T-1), y * 0 (T-1)) is set.
(X * 0 (T-1), y * 0 (T-1))
= (X * 0 (T) + i * , y * 0 (T) + j * ).
この場合の(i*,j*)は、
以下同様に、(x* 0(T−2),y* 0(T−2))のターゲットピクセルを、
(x* 0(T−2),y* 0(T−2))
=(x* 0(T−1)+i*,y* 0(T−1)+j*)によって求める。
Similarly, the target pixel of (x * 0 (T-2), y * 0 (T-2)) is set.
(X * 0 (T-2), y * 0 (T-2))
= (X * 0 (T-1) + i * , y * 0 (T-1) + j * ).
この場合の(i*,j*)は、
このようにして、(x* 0(1),y* 0(1),1)=(x0,y0,1)までに至る点列のターゲットピクセルを求めるために、T回続けて計算を行うことにより、
(x* 0(1), y* 0(1),1)=(x0,y0,1)を求めることができる。
In this way, in order to obtain the target pixel of the point sequence up to (x * 0 (1), y * 0 (1), 1) = (x 0 , y 0, 1), it is calculated T times in succession. By doing
(X * 0 (1), y * 0 (1), 1) = (x 0 , y 0 , 1) can be obtained.
次に、到達点(x* 0(T),y* 0(T),T)から(x* 0(1),y* 0(1),1)=(x0,y0,1)までに至る点列を、車両の進行方向の正面を撮影したカメラの動画像に適用することにより、カメラ200から対象物までの距離を計算する方法について、一例を示して説明する。
Next, from the arrival point (x * 0 (T), y * 0 (T), T) to (x * 0 (1), y * 0 (1), 1) = (x 0 , y 0 , 1) An example will be described of a method of calculating the distance from the
5個(M=5)のターゲットピクセルを時間t=1のフレーム画像から抽出する。T=30として、それぞれのターゲットピクセルを、上述した方法で追跡(トラッキング)して、時間t=30(=T)におけるフレーム画像の到達点を求める。図7は、時間t=1のフレーム画像において信号機が映る画素の1つをターゲットピクセルとして、時間t=1から時間t=30までターゲットピクセルをトラッキングさせた場合の軌跡(追跡の軌跡)が、時間t=30(=T)のフレーム画像に示された拡大図である。図8は、異なる5個の信号機を対象物として、信号機の画素の1つをそれぞれのターゲットピクセルとして設定し、5個のターゲットピクセルを同時にトラッキングさせた場合の軌跡(追跡の軌跡)が示された、時間t=30の時のフレーム画像を示している。 Five (M = 5) target pixels are extracted from the frame image at time t = 1. As T = 30, each target pixel is tracked by the method described above to obtain the arrival point of the frame image at time t = 30 (= T). FIG. 7 shows a locus (tracking locus) when the target pixel is tracked from time t = 1 to time t = 30 with one of the pixels in which the traffic light is reflected in the frame image at time t = 1 as the target pixel. It is an enlarged view shown in the frame image of time t = 30 (= T). FIG. 8 shows a locus (tracking locus) when five different traffic lights are set as objects, one of the pixels of the traffic light is set as each target pixel, and the five target pixels are tracked at the same time. Moreover, the frame image at the time t = 30 is shown.
図8に示す、5個のターゲットピクセルについて、フレーム画像上の追跡距離(トラッキング軌跡の始端ピクセルの座標から終端ピクセルの座標までの軌跡距離の長さ)の変動範囲を測定する。5個のターゲットピクセルの追跡距離のうち、追跡距離が最小距離となる場合の画素数(最小画素数)が4.0ピクセル、追跡距離が最大距離となる場合の画素数(最大画素数)が30.52ピクセルであった。これらの追跡距離の画素数に基づいて、上述したμとγとの値が決定される。本実施の形態の場合には、最小画素数を示す4.0ピクセルは、上述した式2の最小距離μの値に該当し、最大画素数を示す30.52ピクセルは、上述した式3の最大距離γに該当することになる。
最小距離(μ)=4.0ピクセル、最大距離(γ)=30.52ピクセル
For the five target pixels shown in FIG. 8, the fluctuation range of the tracking distance (the length of the locus distance from the coordinates of the start pixel to the coordinates of the end pixel of the tracking locus) on the frame image is measured. Of the five target pixel tracking distances, the number of pixels (minimum number of pixels) when the tracking distance is the minimum distance is 4.0 pixels, and the number of pixels (maximum number of pixels) when the tracking distance is the maximum distance is It was 30.52 pixels. The values of μ and γ described above are determined based on the number of pixels of these tracking distances. In the case of the present embodiment, 4.0 pixels indicating the minimum number of pixels correspond to the value of the minimum distance μ in the above-mentioned equation 2, and 30.52 pixels indicating the maximum number of pixels correspond to the value of the above-mentioned equation 3 in the above-mentioned equation 3. It corresponds to the maximum distance γ.
Minimum distance (μ) = 4.0 pixels, maximum distance (γ) = 30.52 pixels
また、時間t=30(=T)の時のフレーム画像に映っている5個の対象物(5個のターゲットピクセルに対応する5つの対象物)のうち、人間の視察によって、現実世界でのカメラ200から対応する5つの物体(信号機:対象物)までの距離は、最小距離となる50mから、最大距離となる100mまでの範囲に含まれている。これらの距離は、動画像に映っている対象物からカメラ200までの実際のスケール幅を示す。最小距離を示す50mは、上述した式3のZNの値に対応し、最大距離を示す100mは、上述した式2のZLの値に対応することになる。
最小距離(ZN)=50m、最大距離(ZL)=100m
Also, of the five objects (five objects corresponding to the five target pixels) shown in the frame image at time t = 30 (= T), by human inspection, in the real world. The distance from the
Minimum distance (Z N ) = 50 m, maximum distance (Z L ) = 100 m
なお、既に説明した動的視差の性質に基づいて、カメラ200から対象物までの距離が遠い程(ZL)、対応する対象物のターゲットピクセルの追跡距離が短くなり(μ)、カメラ200から対象物までの距離が近い程(ZN)、対応する対象物のターゲットピクセルの追跡距離が長くなる(γ)。このため、μはZLに対応し、γはZNと対応することになり、式2、式3に示したような関係が成立することになる。
In addition, based on the property of dynamic parallax described above, the farther the distance from the
これらのμ,γ,ZL,ZNを用いて上述した式4、式5および式1を計算することによって、5個のターゲットピクセルに対応する画素点に映っている対象物からカメラ200までの現実の距離を算出することができる。図8には、5個のターゲットピクセルの軌跡に対応して算出された現実世界の距離(現実世界のカメラ200からそれぞれの信号機までの距離)が示されている。図8に示すように、上述したμ,γ,ZL,ZNの値を用いて、式2〜式5に基づいて変数aおよびbを算出し、算出されたa,bを式1に代入することによって、各ターゲットピクセルの座標に映る対象物からカメラ200までの現実世界の距離の値を算出することができる。
By calculating the above-mentioned
次にターゲットピクセルの選択・決定について説明する。原理的には、フレーム画像f(x,y,t)(但し、1≦x≦X,1≦y≦Y)の全てのピクセルをターゲットピクセルにすることが可能である。しかしながら、ターゲットピクセルの対象を広げすぎると距離を算出するための計算量が増加してしまう。このため、ターゲットピクセルの数が適切になるように選別・削減することが好ましい。ターゲットピクセルを適切に選別・削減する方法の一例として、公知の領域分割方法を利用する。 Next, the selection / determination of the target pixel will be described. In principle, it is possible to set all the pixels of the frame image f (x, y, t) (however, 1 ≦ x ≦ X, 1 ≦ y ≦ Y) as target pixels. However, if the target of the target pixel is expanded too much, the amount of calculation for calculating the distance will increase. Therefore, it is preferable to select and reduce the number of target pixels so as to be appropriate. As an example of a method for appropriately selecting and reducing target pixels, a known region division method is used.
既存の領域分割手法のうち最も有力な手法の一つとして、mean-shift法(中間値シフト法)と呼ばれる方法が知られている。mean-shift法は、広く知られた領域分割手法であって、Open CV(Open Source Computer Vision Library)と呼ばれる、広く公開されたオープンソースのコンピュータビジョン向けのライブラリによって提供されている。mean-shift法をフレーム画像に適用することにより、フレーム画像の画素毎のRGB値(色情報)などに基づいて、フレーム画像に映る対象物等に応じて画像領域の分割が行われる。分割された領域のうち同一領域と判断される部分については、カメラからの距離がほぼ等しいと解釈する。本実施の形態では、分割された領域(分割領域)毎に重心点を求めて、それぞれの重心点をターゲットピクセルとして決定する。このようにしてターゲットピクセルを決定することにより、カメラ200からの距離がほぼ等しいと解釈され得る領域毎に距離算出を行うことができ、ターゲットピクセルの選定を適切に行うことが可能になる。また、ターゲットピクセルの数を分割領域の数まで削減することができるので、演算負担の軽減化を図ることが可能になる。
As one of the most promising methods among the existing area division methods, a method called a mean-shift method (intermediate value shift method) is known. The mean-shift method is a well-known area division method and is provided by a widely open library for computer vision called Open CV (Open Source Computer Vision Library). By applying the mean-shift method to the frame image, the image area is divided according to the object or the like reflected in the frame image based on the RGB value (color information) for each pixel of the frame image. Of the divided areas, the parts that are judged to be the same area are interpreted as having almost the same distance from the camera. In the present embodiment, the center of gravity point is obtained for each divided area (divided area), and each center of gravity point is determined as a target pixel. By determining the target pixel in this way, the distance can be calculated for each region where the distance from the
図9は、カメラにより撮影された風景画像に対してmean-shift法が適用された画像を示している。mean-shift法を適用することにより、フレーム画像の風景が複数の領域に分割され、同じ領域が、同じ色で示される。このようにして分割された領域毎に重心位置を求めて、該当する重心位置の画素をターゲットピクセルに設定する。 FIG. 9 shows an image in which the mean-shift method is applied to a landscape image taken by a camera. By applying the mean-shift method, the landscape of the frame image is divided into multiple areas, and the same area is shown in the same color. The position of the center of gravity is obtained for each region divided in this way, and the pixel at the corresponding center of gravity is set as the target pixel.
図11(a)は、カメラにより撮影された車両正面方向の動画像に基づいて、CPU104が、カメラ200から対象物までの距離を算出する方法を示したフローチャートである。距離算出の対象となる動画像は、時間t=τ−Tから時間t=τまでのフレーム画像f(x,y,t)(1≦x≦X,1≦y≦Y,τ−T≦t≦τ)とする。
FIG. 11A is a flowchart showing a method in which the
図10は、ROM102より読み込んだプログラムに基づいて、CPU104が距離算出処理を実行する場合の各機能部を示したブロック図である。CPU104は、図11(a)(b)に示す処理内容に応じて、領域分割部(領域分割手段)301、ターゲットピクセル抽出部(ターゲットピクセル抽出手段)302、軌跡算出部(軌跡算出手段)303、移動画素数測定部(移動画素数測定手段)304および距離算出部(距離算出手段)305として機能し、それぞれの処理を行う。
FIG. 10 is a block diagram showing each functional unit when the
まず、CPU104は、記録部101から時間t=τ−Tのフレーム画像を読み出して、読み出したフレーム画像に対してmean-shift法を適用し、フレーム画像の領域分割処理を行う(図11(a)のS.1:領域分割ステップ、領域分割機能)。この処理においてCPU104は、時間t=τ−Tのフレーム画像を複数の領域に分割する領域分割部(領域分割手段)301として機能する。
First, the
CPU104は、複数の領域に分割されたフレーム画像の領域のうち、カメラ200からの距離を測定する対象物が映る領域を求める。距離の測定対象となる対象物がM個ある場合には、M個の領域を求める。なお、Mは2以上の数とする。そして、CPU104は、M個の領域毎に重心点の座標を求めて、求められた重心点の座標の画素を時間t=τ−Tのターゲットピクセルとして、M個の領域毎に抽出する(S.2:ターゲットピクセル抽出ステップ、ターゲットピクセル抽出機能)。この処理においてCPU104は、M個のターゲットピクセルを抽出するターゲットピクセル抽出部(ターゲットピクセル抽出手段)302として機能する。
The
CPU104は、時間t=τ−Tのフレーム画像において決定された複数(M個)のターゲットピクセルに基づいて、時間t=τ−Tのフレーム画像から時間t=τのフレーム画像までのターゲットピクセルの軌跡を、2次元画像を対象とする動的計画法を用いたトラッキングアルゴリズムによって算出する(S.3:軌跡算出ステップ、軌跡算出機能)。そして、CPU104は、時間t=τのフレーム画像におけるターゲットピクセルの到達点の座標(x* 0(T),y* 0(T))を決定する。この処理においてCPU104は、時間t=τ−Tのフレーム画像におけるターゲットピクセルの画素位置から時間t=τのフレーム画像におけるターゲットピクセルの画素位置までのターゲットピクセルの軌跡を、M個のターゲットピクセルに応じて算出する軌跡算出部(軌跡算出手段)303として機能する。
The
なお、CPU104において、時間t=τのフレーム画像に対してmean-shift法を適用して、時間t=τのフレーム画像の領域分割処理を行った場合、時間t=τ−Tのフレーム画像においてターゲットピクセルが属する分割領域と、時間t=τのフレーム画像において対応するターゲットピクセルが到達した画素点の分割領域とは、通常一致することになる。
When the mean-shift method is applied to the frame image of time t = τ and the area division processing of the frame image of time t = τ is performed in the
CPU104は、時間t=τ−Tのフレーム画像の画素位置から時間t=τのフレーム画像の画素位置までの、ターゲットピクセルの追跡距離(移動距離)の長さ(画素数)を、M個のターゲットピクセル毎に測定する(S.4:移動画素数測定ステップ、移動画素数測定機能)。この処理においてCPU104は、時間t=τのフレーム画像において、M個のターゲットピクセルの移動距離を、移動画素数qm(m=1,2,・・・,M)として測定する移動画素数測定部(移動画素数測定手段)304として機能する。
The
CPU104は、求められたM個のフレーム画像の移動画素数qmのうち、最も移動画素数が少ない画素数を前述したμとし、最も移動画素数が多い画素数を前述したγとする。さらに、移動画素数が最も多い画素数のターゲットピクセルにより特定される対象物からカメラ200までの、時間t=τにおける現実世界の距離を、目視により決定してZnとする。また、移動画素数が最も少ない画素数のターゲットピクセルにより特定される対象物からカメラ200までの、時間t=τにおける現実世界の距離を、目視により決定してZLとする。
CPU104, of the moving pixel number q m of the M frame image obtained, most mobile number of pixels of the smaller number of pixels and μ described above, and γ mentioned above the most number of moving a large number of pixels pixel. Furthermore, from the object moving pixel number is specified by the largest number of pixels of the target pixel to the
そして、CPU104は、設定されたμ,γ,ZN,ZLを用いて、上述した式4および式5に値を代入することにより、定数aおよび定数bを求めて、求められた定数aおよび定数bと、M個のターゲットピクセル毎の移動画素数qm(m=1,2,・・・,M)とを用いて、それぞれのターゲットピクセルに該当する対象物からカメラ200までの時間t=τにおける現実世界の距離を算出する(S.5:距離算出ステップ、距離算出機能)。
Then, the
この処理においてCPU104は、設定されたμ,γ,ZN,ZLに基づいて求められた定数a,bと、ターゲットピクセル毎の移動画素数qmとに基づいて、各対象物からカメラ200までの現実世界の距離を算出する距離算出部(距離算出手段)305として機能する。
In this process, the
このようにして、CPU104は、カメラ200により撮影された動画像に基づいて、動画像に映った対象物からカメラ200までの時間t=τにおける現実世界の距離を算出する。時間t=τのフレーム画像において、分割された領域(分割領域)の同定を行うことにより、それぞれの分割領域に映る対象物が、信号機、看板、道路、壁、木、建物等のどのような物に該当するかを分類することができ、カメラ200から分類された各対象物までの距離情報を、パラメータとして求めることができる。このようにして求められたパラメータは、例えば、自動車等の自動運転制御等における重要な制御パラメータとして利用することが可能になる。
In this way, the
以上、本発明に係る動画像距離算出装置および動画像距離算出用プログラムについて、図面を用いて詳細に説明したが、本発明に係る動画像距離算出装置および動画像距離算出用プログラムは、実施の形態に示した動画像距離算出装置100の構成例等には限定されない。実施の形態において説明したターゲットピクセルのトラッキング処理では、mean-shift法により分割された領域の重心点に基づいて、ターゲットピクセルを決定する方法を説明した。しかしながら、ターゲットピクセルは、必ずしも分割領域の重心点に基づいて決定されるものに限定されない。
The moving image distance calculation device and the moving image distance calculation program according to the present invention have been described in detail with reference to the drawings. However, the moving image distance calculation device and the moving image distance calculation program according to the present invention have been carried out. The present invention is not limited to the configuration example of the moving image
例えば、最適累積値S(x,y,t)と予め設定される閾値hとを用いて、
S(x,y,t)/t≦h
の条件を満たす領域をR(x,y,t)とする。この領域の重心の座標をr(x*,y*,t)として、r(x*,y*,t)をターゲットピクセルに決定する方法を用いてもよい。従って、ターゲットピクセルのトラッキング処理は、r(x*,y*,t)を用いて、t=1,2,・・・,Tのトラッキングを行うことになる。ここで、R(x,y,t)を求めるために、最小累積値S(x,y,t)を時間tで除算する処理は、最小累積値を時間の長さで正規化する処理に該当する。また、閾値hは、経験的に定まる定数である。
For example, using the optimum cumulative value S (x, y, t) and the preset threshold value h,
S (x, y, t) / t ≦ h
Let R (x, y, t) be a region satisfying the above condition. A method of determining r (x * , y * , t) as the target pixel may be used, where the coordinates of the center of gravity of this region are r (x * , y *, t). Therefore, in the tracking process of the target pixel, r (x * , y * , t) is used to track t = 1, 2, ..., T. Here, the process of dividing the minimum cumulative value S (x, y, t) by the time t in order to obtain R (x, y, t) is the process of normalizing the minimum cumulative value by the length of time. Applicable. Further, the threshold value h is a constant determined empirically.
分割領域の重心点によってターゲットピクセルを決定しても、分割領域内にはターゲットピクセルに類似する画素が存在している。このため、トラッキングされるターゲットピクセルの画素位置の周辺にも、類似の積分値を備える画素が存在することになる。従って、閾値h以下となる正規化された最小累積値の値(S(x,y,t)/t)も、分割された領域を示すことになり、この領域の重心の座標をターゲットピクセルに決定することによって、トラッキング処理により求められるターゲットピクセルの信頼性を高めることになる。 Even if the target pixel is determined by the center of gravity point of the divided area, there are pixels similar to the target pixel in the divided area. Therefore, a pixel having a similar integrated value also exists around the pixel position of the target pixel to be tracked. Therefore, the value of the normalized minimum cumulative value (S (x, y, t) / t) that is equal to or less than the threshold value h also indicates the divided region, and the coordinates of the center of gravity of this region are set as the target pixel. By making a decision, the reliability of the target pixel required by the tracking process will be increased.
また、S(x,y,t)/t≦hの条件を満たす領域をR(x,y,t)として、この領域の重心の座標をトラッキングすることにより、バックトレースの視覚化を行いやすくなり、トラッキングが正確に行われているか判断しやすくすることができる。 Further, by tracking the coordinates of the center of gravity of this region with the region satisfying the condition of S (x, y, t) / t ≦ h as R (x, y, t), it is easy to visualize the back trace. Therefore, it is possible to easily determine whether the tracking is performed accurately.
さらに、従来のトラッキング手法では、動画像に映る対象物毎に個別にトラッキング処理を行う必要があったが、本発明に係る動画像距離算出装置および動画像距離算出用プログラムでは、図8に示したように、複数の対象物(より詳細には、複数のターゲットピクセル)について、同時にトラッキング処理を行うことが可能である。 Further, in the conventional tracking method, it is necessary to perform tracking processing individually for each object reflected in the moving image, but in the moving image distance calculation device and the moving image distance calculation program according to the present invention, it is shown in FIG. As described above, it is possible to simultaneously perform tracking processing on a plurality of objects (more specifically, a plurality of target pixels).
例えば、複数の対象物毎のターゲットピクセルをf(xm,ym,t)(但し、m=1,2,・・・,M)とする。ここで、mは、対象物を区別するための番号であり、Mはその対象物の総数である。 For example, the plurality of objects each of target pixels f (x m, y m, t) ( where, m = 1,2, ···, M ) and. Here, m is a number for distinguishing the objects, and M is the total number of the objects.
この対象物毎のターゲットピクセルをトラッキングするための動的計画法の漸化式では、局所距離dm(x,y,t)を
dm(x,y,t)=|f(xm,ym,1)−f(x,y,t)|
とし、最小累積値S(x,y,t)を
And the minimum cumulative value S (x, y, t)
このようにして、複数の対象物毎にターゲットピクセルを決定することにより、それぞれの対象物からカメラまでの距離を、トラッキングされるターゲットピクセル軌跡の終端から始端までの経路距離(軌跡のピクセル距離)を用いて、対象物毎に求めることが可能になる。 By determining the target pixel for each of a plurality of objects in this way, the distance from each object to the camera is determined by the path distance from the end to the start of the tracked target pixel locus (pixel distance of the locus). Can be used for each object.
また、実施の形態に係る動画像距離算出装置100では、図11(a)に示すように、CPU104が、過去から現在に向けて経時的に変化する(時間t=τ−Tから時間t=τまで変化する)動画像のフレーム画像に基づいて、ターゲットピクセルのトラッキング処理を行う場合について説明した。しかしながら、ターゲットピクセルのトラッキング処理を行う場合に、時間t=τから過去の時間t=τ−Tへと時間を遡るようにして、動画像のフレーム画像におけるターゲットピクセルのトラッキング処理を行うことも可能である。
Further, in the moving image
図11(b)は、CPU104が、時間t=τから時間t=τ−Tまで、時間tを過去に遡るようにしてターゲットピクセルのトラッキング処理を行う場合の処理内容を示したフローチャートである。CPU104は、時間t=τのフレーム画像に対して、mean-shift法を適用することにより、領域分割を行う(S.11:領域分割ステップ、領域分割機能)。
FIG. 11B is a flowchart showing the processing contents when the
そして、CPU104は、求められた分割領域の中から対象物が映るM個の領域を求めて、M個の領域毎に重心点の画素をターゲットピクセルとして抽出する(S.12:ターゲットピクセル抽出ステップ、ターゲットピクセル抽出機能)。例えば、抽出されたM個のターゲットピクセルの1つの画素を(x* 0(τ),y* 0(τ))とする。
Then, the
CPU104は、時間t=τから時間t=τ−Tまでの動画像に基づいて、ターゲットピクセルのトラッキング処理を行う(S.13:軌跡算出ステップ、軌跡算出機能)。このトラッキング処理により、時間t=τから時間t=τ−Tまでの過去に遡る時系列により、ターゲットピクセルの軌跡を求めることになる。時間t=τ−Tのフレーム画像におけるM個のターゲットピクセルのうちの1つの画素の到達点を(x* 0(τ−T),y* 0(τ−T))とする。CPU104は、時間t=τから時間t=τ−Tまでの軌跡によるターゲットピクセルの累積動的視差の値q(x* 0(τ),y* 0(τ))を、
q(x* 0(τ),y* 0(τ))
=|(x* 0(τ)−y* 0(τ))−(x* 0(τ−T),y* 0(τ−T))|
より求める。この累積動的視差の値q(x* 0(τ),y* 0(τ))は既に説明した移動画素数qmに該当する。従って、CPU104はこの処理により、移動画素数の測定を行うことになる(S.14:移動画素数測定ステップ、移動画素数測定機能)。
The
q (x * 0 (τ), y * 0 (τ))
= | (X * 0 (τ) -y * 0 (τ))-(x * 0 (τ-T), y * 0 (τ-T)) |
Ask more. The value q (x * 0 (τ), y * 0 (τ)) of this cumulative dynamic parallax corresponds to the number of moving pixels q m already described. Therefore, the
そして、CPU104は、求められた累積動的視差の値q(x* 0(τ),y* 0(τ))に基づいて、時間t=τのフレーム画像に映る対象物の距離を算出する(S.15:距離算出ステップ、距離算出機能)。時間t=τにおける対象物からカメラ200までの現実世界の距離は、
d(x* 0(τ),y* 0(τ))
=a・exp(−bq(x* 0(τ),y* 0(τ)))
により求めることができる。
Then, the
d (x * 0 (τ), y * 0 (τ))
= A · exp (−bq (x * 0 (τ), y * 0 (τ)))
Can be obtained by.
この式は、式1に示したZ=a・exp(−bq)に対応する。
This equation corresponds to Z = a · exp (−bq) shown in
このようにして、時間t=τから過去の時間t=τ−Tへと時間を遡るようにして、動画像のフレーム画像におけるターゲットピクセルのトラッキング処理を行って現実世界の距離を求めることにより、2つの利点が生じる。 In this way, the time is traced back from the time t = τ to the past time t = τ−T, and the tracking process of the target pixel in the frame image of the moving image is performed to obtain the distance in the real world. There are two advantages.
まず、時間t=τのフレーム画像における分割領域は、フレーム画像に映る対象物までの距離が近いこともあって、比較的広い領域となる傾向がある。このため、ターゲットピクセルを、より安定した分割領域に基づいて決定することが可能になるという利点が生じる。 First, the divided region in the frame image at time t = τ tends to be a relatively wide region because the distance to the object reflected in the frame image is short. This has the advantage that the target pixel can be determined based on a more stable split area.
次に、時間t=τから過去の時間t=τ−Tへと時間を遡るようにして、ターゲットピクセルのトラッキングを行うため、時間が遡ってもターゲットピクセルが動画像のフレームから外れてしまう現象が生じ難いという利点が生じる。時間t=τ−Tから時間t=τへと変化する動画像では、カメラ200の進行に伴って、時間t=τ−Tのフレーム画像に存在していたターゲットピクセルが、時間t=τになる前にフレーム画像から外れてしまい、時間t=τのフレーム画像に存在しない可能性も生じ得る。しかしながら、時間t=τから過去の時間t=τ−Tへと時間を遡るようにして、ターゲットピクセルのトラッキングを行う場合には、ターゲットピクセルが画面の中心方向へと移動する傾向となるため、ターゲットピクセルの移動量が僅かになっても、フレーム画像内に存在する可能性が高い。
Next, since the target pixel is tracked by tracing back the time from the time t = τ to the past time t = τ−T, the phenomenon that the target pixel is out of the frame of the moving image even if the time is traced back. Has the advantage of being less likely to occur. In the moving image that changes from time t = τ-T to time t = τ, the target pixel existing in the frame image of time t = τ-T changes to time t = τ as the
また、同様に、ターゲットピクセルの決定が行われた分割領域も、時間t=τ−Tのフレーム画像内に存在する可能性が高い。このため、時間t=τから過去の時間t=τ−Tへと時間を遡るようにして、ターゲットピクセルのトラッキングを行う場合には、ターゲットピクセルおよび分割領域がフレーム画像から外れてしまうという現象に対処する必要性が低減されるという利点が生じる。 Similarly, it is highly possible that the divided region in which the target pixel is determined also exists in the frame image at time t = τ−T. Therefore, when tracking the target pixel by tracing back the time from the time t = τ to the past time t = τ−T, the target pixel and the divided area deviate from the frame image. The advantage is that the need to deal with it is reduced.
なお、時間を遡るようにしてターゲットピクセルのトラッキングを行う場合、終端のピクセルが正しいターゲットピクセルと必ず同じピクセルになるとは保証できないが、この点に関しては、時間t=τ−Tから時間t=τへと経時的にターゲットピクセルのトラッキングを行う場合であっても同様である。 When tracking the target pixel by going back in time, it cannot be guaranteed that the terminal pixel will always be the same pixel as the correct target pixel, but in this regard, time t = τ−T to time t = τ. The same applies even when tracking the target pixel over time.
また、実施の形態に係る動画像距離算出装置100において、ターゲットピクセルのトラッキング処理を安定的に行うために、以下の方法を用いることも可能である。
Further, in the moving image
まず、実施の形態に係る画像距離算出装置100では、分割された領域(分割領域)毎に重心点を求めて、それぞれの重心点をターゲットピクセルとして決定する場合について説明した。しかしながら、分割領域の形状が、例えば、Lの字形状である場合、重心点が分割領域の外側に存在する場合が生じ得る。このような場合には、分割領域の外側の座標がターゲットピクセルとして決定されてしまうおそれがある。このため、領域内の画素に対して端から順番に番号を付加し、その領域の全ての画素数の半分の値に該当する番号(その領域の画素の番号のうち中間の番号に該当する)の画素を、ターゲットピクセルに決定する。このようにしてターゲットピクセルを決定することによって、分割領域内の画素をターゲットピクセルとして確実に決定することができる。
First, in the image
次に、決定されたターゲットピクセルの座標を、図11(b)のS.12において設定したように、(x* 0(τ), y* 0(τ))とするときに、ターゲットピクセルの値を1つの画素の値だけで定めるのではなく、ターゲットピクセルの座標の上下左右の画素の値の平均値によって決定することも可能である。 Next, the coordinates of the determined target pixel are set to S. in FIG. 11 (b). As set in 12, when (x * 0 (τ), y * 0 (τ)), the value of the target pixel is not determined by the value of only one pixel, but above and below the coordinates of the target pixel. It is also possible to determine by the average value of the values of the left and right pixels.
例えば、ターゲットピクセルの座標(x* 0(τ), y* 0(τ))の上下左右の座標を含む、5つの座標点の平均値を用いて、ターゲットピクセルの値P(x* 0(τ),y* 0(τ))を決定する場合には、
により値を決定することができる。このように複数の座標の値の平均値によりターゲットピクセルの値を決定することにより、より安定した値を得ることが可能になる。
For example, the value P (x * 0 (x * 0 (x * 0)) of the target pixel is used by using the average value of five coordinate points including the coordinates of the target pixel (x * 0 (τ), y * 0 (τ)). When determining τ), y * 0 (τ)),
The value can be determined by. By determining the value of the target pixel based on the average value of the values of the plurality of coordinates in this way, a more stable value can be obtained.
さらに、上述した局所距離の算出において、実施の形態に係る画像距離算出装置100では、ターゲットピクセルの値をf(x0,y0,1)として、局所距離を、ターゲットピクセルの値と、時間tの対象となる画素の値とのユークリット距離により算出して、
局所距離d(x,y,t)=|f(x0,y0,1)−f(x,y,t)|
によって求める場合について説明した。
Further, in the above-mentioned calculation of the local distance, in the image
Local distance d (x, y, t) = | f (x 0 , y 0 , 1) -f (x, y, t) |
I explained the case of requesting by.
しかしながら、局所距離の算出は、この方法には限定されない。例えば、2つの画素のコサイン相関関数を用いて距離値を算出することにより、局所距離を求めることも可能である。すなわち局所距離d(x,y,t)を、
により求めることができる。
However, the calculation of the local distance is not limited to this method. For example, it is also possible to obtain the local distance by calculating the distance value using the cosine correlation function of two pixels. That is, the local distance d (x, y, t) is set to
Can be obtained by.
式9の分子に示す<f(x,y,t),P(x* 0(τ),y* 0(τ))>は、RGBのベクトルの内積を示している。相関値は常にゼロと1との間の値を取るため、式9により求められる値は、画素の値の絶対的な変動に対して安定して求められることになる。このため、式9により算出された局所距離は、フレーム画像に発生し得るノイズ等の影響を受け難いという特徴を備える。 <F (x, y, t), P (x * 0 (τ), y * 0 (τ))> shown in the numerator of Equation 9 indicates the inner product of RGB vectors. Since the correlation value always takes a value between zero and 1, the value obtained by Equation 9 is stably obtained with respect to the absolute fluctuation of the pixel value. Therefore, the local distance calculated by the equation 9 has a feature that it is not easily affected by noise or the like that may occur in the frame image.
式9の場合の時間tのパラメータは、図11(b)を示して既に説明したように、τ−T≦t≦τとなるが、計算の進行は、時間τから時間τ−Tまでの過去に遡るようにして、時間tが進行することにより行われる。すなわち、時間tは、時間t=τ,τ−1,τ−2,・・・,τ−Tと進行し、ターゲットピクセルに到達する時間tは、時間t=τ−Tとなる。 The parameter of the time t in the case of the equation 9 is τ−T ≦ t ≦ τ as already explained with reference to FIG. 11B, but the progress of the calculation is from the time τ to the time τ−T. It is performed by advancing the time t so as to go back to the past. That is, the time t progresses as time t = τ, τ-1, τ-2, ..., τ−T, and the time t to reach the target pixel is time t = τ−T.
また、ターゲットピクセルのトラッキング処理においてバックトレースを視覚化することにより、トラッキングが正確に行われているか判断し易くなる。この点においては、既に説明したように、S(x,y,t)/t≦hの条件を満たす領域をR(x,y,t)として、この領域の重心の座標をトラッキングすることにより、バックトレースの視覚化を行い易くすることができる。 Further, by visualizing the back trace in the tracking process of the target pixel, it becomes easy to judge whether the tracking is performed accurately. In this respect, as described above, the region satisfying the condition of S (x, y, t) / t ≦ h is set as R (x, y, t), and the coordinates of the center of gravity of this region are tracked. , It is possible to facilitate the visualization of the back trace.
100 …動画像距離算出装置
101 …記録部
102 …ROM
103 …RAM
104 …CPU(制御手段、領域分割手段、ターゲットピクセル抽出手段、距離算出手段、軌跡算出手段、移動画素数測定手段、距離算出手段)
200 …カメラ
210 …モニタ
301 …領域分割部(領域分割手段)
302 …ターゲットピクセル抽出部(ターゲットピクセル抽出手段)
303 …軌跡算出部(軌跡算出手段)
304 …移動画素数測定部(移動画素数測定手段)
305 …距離算出部(距離算出手段)
100 ... Moving image
103 ... RAM
104 ... CPU (control means, area division means, target pixel extraction means, distance calculation means, locus calculation means, moving pixel number measuring means, distance calculation means)
200 ...
302… Target pixel extraction unit (target pixel extraction means)
303 ... Trajectory calculation unit (trajectory calculation means)
304 ... Moving pixel number measuring unit (moving pixel number measuring means)
305… Distance calculation unit (distance calculation means)
Claims (8)
前記動画像の時間t=τ−Tの時のフレーム画像に映る対象物の画素の1つをターゲットピクセルとし、当該フレーム画像からM個(M≧2)の異なる対象物毎に前記ターゲットピクセルを抽出するターゲットピクセル抽出手段と、
時間t=τ−Tから時間t=τまでの複数の前記フレーム画像に基づいて、前記ターゲットピクセル抽出手段により抽出されたM個の前記ターゲットピクセルの座標の軌跡を、2次元画像を対象とする動的計画法に基づいて、時間t=τ−Tの前記フレーム画像から時間t=τの前記フレーム画像までの時系列順に算出する軌跡算出手段と、
該軌跡算出手段により算出されたM個の前記軌跡に基づいて、時間t=τ−Tの前記フレーム画像の座標から時間t=τの前記フレーム画像の座標までの移動画素数qm(m=1,2,・・・,M)を、M個の前記ターゲットピクセル毎に測定する移動画素数測定手段と、
前記移動画素数測定手段により測定されたM個の前記移動画素数qmのうち、前記移動画素数が最も少ない画素数をμとし、前記移動画素数が最も多い画素数をγとし、M個の前記ターゲットピクセルによりそれぞれ特定される対象物から前記カメラまでの距離のうちで最も近い距離をZnとし、M個の前記ターゲットピクセルによりそれぞれ特定される対象物から前記カメラまでの距離のうちで最も遠い距離をZLとして、定数aおよび定数bを、
a=ZL・exp((μ/(γ−μ))log(ZL/ZN))
b=(1/(γ−μ))log(ZL/ZN)
により算出し、
M個の前記ターゲットピクセルのそれぞれに対応する前記対象物から前記カメラまでの時間t=τにおける距離をZm(m=1,2,・・・,M)として、当該距離Zmを、前記定数aおよび前記定数bと、M個の前記移動画素数qmとに基づいて、
Zm=a・exp(−bqm)
により算出する距離算出手段と
を有することを特徴とする動画像距離算出装置。 The front view in the moving direction is reflected in the moving image based on the moving image taken from the time t = τ-T (however, τ> 0, T> 0) to the time t = τ by one moving camera. A moving image distance calculation device that calculates the distance from an object to the camera.
One of the pixels of the object reflected in the frame image when the time t = τ−T of the moving image is set as the target pixel, and the target pixel is set for each of M (M ≧ 2) different objects from the frame image. Target pixel extraction means to extract and
Based on the plurality of frame images from time t = τ−T to time t = τ, the loci of the coordinates of the M target pixels extracted by the target pixel extraction means are targeted for a two-dimensional image. A locus calculation means for calculating in chronological order from the frame image at time t = τ −T to the frame image at time t = τ based on the dynamic planning method.
Based on the M loci calculated by the locus calculation means, the number of moving pixels q m (m =) from the coordinates of the frame image at time t = τ −T to the coordinates of the frame image at time t = τ. A moving pixel number measuring means for measuring 1, 2, ..., M) for each of the M target pixels,
Wherein among the mobile M-number of the number of pixels moved which is measured by the number measuring unit pixels q m, the moving pixel number is the smallest number of pixels as mu, the number of pixels the number of moving pixels is highest and gamma, the M the nearest distance among the distances from the object to be identified respectively by the target pixel to the camera and Z n, among the objects identified respectively by the M of the target pixel of the distance to the camera Let Z L be the farthest distance, and let constant a and constant b be
a = Z L · exp ((μ / (γ-μ)) log (Z L / Z N ))
b = (1 / (γ-μ)) log (Z L / Z N )
Calculated by
Let Z m (m = 1, 2, ..., M) be the distance from the object corresponding to each of the M target pixels to the camera at time t = τ , and set the distance Z m as described above. Based on the constant a and the constant b and the number of M moving pixels q m ,
Z m = a · exp (-bq m )
A moving image distance calculation device characterized by having a distance calculation means calculated by
前記動画像の時間t=τの時のフレーム画像に映る対象物の画素の1つをターゲットピクセルとし、当該フレーム画像からM個(M≧2)の異なる対象物毎に前記ターゲットピクセルを抽出するターゲットピクセル抽出手段と、
時間t=τ−Tから時間t=τまでの複数の前記フレーム画像に基づいて、前記ターゲットピクセル抽出手段により抽出されたM個の前記ターゲットピクセルの座標の軌跡を、2次元画像を対象とする動的計画法に基づいて、時間t=τの前記フレーム画像から時間t=τ−Tの前記フレーム画像までの過去に遡る時系列順に算出する軌跡算出手段と、
該軌跡算出手段により算出されたM個の前記軌跡に基づいて、時間t=τ−Tの前記フレーム画像の座標から時間t=τの前記フレーム画像の座標までの移動画素数qm(m=1,2,・・・,M)を、M個の前記ターゲットピクセル毎に測定する移動画素数測定手段と、
前記移動画素数測定手段により測定されたM個の前記移動画素数qmのうち、前記移動画素数が最も少ない画素数をμとし、前記移動画素数が最も多い画素数をγとし、M個の前記ターゲットピクセルによりそれぞれ特定される対象物から前記カメラまでの距離のうちで最も近い距離をZnとし、M個の前記ターゲットピクセルによりそれぞれ特定される対象物から前記カメラまでの距離のうちで最も遠い距離をZLとして、定数aおよび定数bを、
a=ZL・exp((μ/(γ−μ))log(ZL/ZN))
b=(1/(γ−μ))log(ZL/ZN)
により算出し、
M個の前記ターゲットピクセルのそれぞれに対応する前記対象物から前記カメラまでの時間t=τにおける距離をZm(m=1,2,・・・,M)として、当該距離Zmを、前記定数aおよび前記定数bと、M個の前記移動画素数qmとに基づいて、
Zm=a・exp(−bqm)
により算出する距離算出手段と
を有することを特徴とする動画像距離算出装置。 The front view in the moving direction is reflected in the moving image based on the moving image taken from the time t = τ-T (however, τ> 0, T> 0) to the time t = τ by one moving camera. A moving image distance calculation device that calculates the distance from an object to the camera.
One of the pixels of the object reflected in the frame image when the time t = τ of the moving image is set as the target pixel, and the target pixel is extracted for each of M (M ≧ 2) different objects from the frame image. Target pixel extraction method and
Based on the plurality of frame images from time t = τ−T to time t = τ, the loci of the coordinates of the M target pixels extracted by the target pixel extraction means are targeted for a two-dimensional image. Based on the dynamic planning method, a locus calculation means for calculating in chronological order retroactively from the frame image at time t = τ to the frame image at time t = τ −T.
Based on the M loci calculated by the locus calculation means, the number of moving pixels q m (m =) from the coordinates of the frame image at time t = τ −T to the coordinates of the frame image at time t = τ. A moving pixel number measuring means for measuring 1, 2, ..., M) for each of the M target pixels,
Wherein among the mobile M-number of the number of pixels moved which is measured by the number measuring unit pixels q m, the moving pixel number is the smallest number of pixels as mu, the number of pixels the number of moving pixels is highest and gamma, the M the nearest distance among the distances from the object to be identified respectively by the target pixel to the camera and Z n, among the objects identified respectively by the M of the target pixel of the distance to the camera Let Z L be the farthest distance, and let constant a and constant b be
a = Z L · exp ((μ / (γ-μ)) log (Z L / Z N ))
b = (1 / (γ-μ)) log (Z L / Z N )
Calculated by
Let Z m (m = 1, 2, ..., M) be the distance from the object corresponding to each of the M target pixels to the camera at time t = τ , and set the distance Z m as described above. Based on the constant a and the constant b and the number of M moving pixels q m ,
Z m = a · exp (-bq m )
A moving image distance calculation device characterized by having a distance calculation means calculated by
前記ターゲットピクセル抽出手段は、前記領域分割手段により分割された前記領域のうち、前記対象物が映る領域の重心点の画素を前記ターゲットピクセルとして、異なる対象物が映るM個(M≧2)の領域毎に前記ターゲットピクセルを抽出すること
を特徴とする請求項1又は請求項2に記載の動画像距離算出装置。 The target pixel extraction means has a region dividing means for dividing the frame image into a plurality of regions by applying a mean-shift method to the frame image used for extracting the target pixels.
The target pixel extraction means has M (M ≧ 2) objects of different objects reflected in the area divided by the area dividing means, with the pixel of the center of gravity of the area in which the object is reflected as the target pixel. The moving image distance calculation device according to claim 1 or 2, wherein the target pixel is extracted for each region.
前記ターゲットピクセル抽出手段は、前記領域分割手段により分割された前記領域の画素に対して端から順番に番号を付加し、当該領域の画素の番号のうち中間の番号に該当する画素を前記ターゲットピクセルとして、異なる対象物が映るM個(M≧2)の領域毎に前記ターゲットピクセルを抽出すること
を特徴とする請求項1又は請求項2に記載の動画像距離算出装置。 The target pixel extraction means has a region dividing means for dividing the frame image into a plurality of regions by applying a mean-shift method to the frame image used for extracting the target pixels.
The target pixel extraction means adds numbers in order from the end to the pixels in the area divided by the area dividing means, and the pixel corresponding to the middle number among the numbers of the pixels in the area is the target pixel. The moving image distance calculation device according to claim 1 or 2, wherein the target pixels are extracted for each of M (M ≧ 2) regions in which different objects are reflected.
制御手段に、
前記動画像の時間t=τ−Tの時のフレーム画像に映る対象物の画素の1つをターゲットピクセルとして、当該フレーム画像からM個(M≧2)の異なる対象物毎に前記ターゲットピクセルを抽出させるターゲットピクセル抽出機能と、
時間t=τ−Tから時間t=τまでの複数の前記フレーム画像に基づいて、前記ターゲットピクセル抽出機能により抽出されたM個の前記ターゲットピクセルの座標の軌跡を、2次元画像を対象とする動的計画法に基づいて、時間t=τ−Tの前記フレーム画像から時間t=τの前記フレーム画像までの時系列順に算出させる軌跡算出機能と、
該軌跡算出機能により算出されたM個の前記軌跡に基づいて、時間t=τ−Tの前記フレーム画像の座標から時間t=τの前記フレーム画像の座標までの移動画素数qm(m=1,2,・・・,M)を、M個の前記ターゲットピクセル毎に測定させる移動画素数測定機能と、
前記移動画素数測定機能により測定されたM個の前記移動画素数qmのうち、前記移動画素数が最も少ない画素数をμとし、前記移動画素数が最も多い画素数をγとし、M個の前記ターゲットピクセルによりそれぞれ特定される対象物から前記カメラまでの距離のうちで最も近い距離をZnとし、M個の前記ターゲットピクセルによりそれぞれ特定される対象物から前記カメラまでの距離のうちで最も遠い距離をZLとして、定数aおよび定数bを、
a=ZL・exp((μ/(γ−μ))log(ZL/ZN))
b=(1/(γ−μ))log(ZL/ZN)
により算出させ、
M個の前記ターゲットピクセルのそれぞれに対応する前記対象物から前記カメラまでの時間t=τにおける距離をZm(m=1,2,・・・,M)として、当該距離Zmを、前記定数aおよび前記定数bと、M個の前記移動画素数qmとに基づいて、
Zm=a・exp(−bqm)
により算出させる距離算出機能と
を実現させることを特徴とする動画像距離算出用プログラム。 The front view in the moving direction is reflected in the moving image based on the moving image taken from the time t = τ-T (however, τ> 0, T> 0) to the time t = τ by one moving camera. A moving image distance calculation program for calculating the distance from an object to the camera.
As a control means,
One of the pixels of the object reflected in the frame image when the time t = τ−T of the moving image is set as the target pixel, and the target pixel is set for each of M (M ≧ 2) different objects from the frame image. Target pixel extraction function to extract and
Based on the plurality of frame images from time t = τ−T to time t = τ, the loci of the coordinates of the M target pixels extracted by the target pixel extraction function are targeted for a two-dimensional image. Based on the dynamic planning method, a trajectory calculation function for calculating in chronological order from the frame image at time t = τ-T to the frame image at time t = τ, and
Based on the M loci calculated by the locus calculation function, the number of moving pixels q m (m =) from the coordinates of the frame image at time t = τ −T to the coordinates of the frame image at time t = τ. A moving pixel number measurement function that measures 1, 2, ..., M) for each of the M target pixels,
Wherein among the moving pixel number measurement function by the measured M number of the mobile number of pixels q m, the moving pixel number is the smallest number of pixels as mu, the number of pixels the number of moving pixels is highest and gamma, the M the nearest distance among the distances from the object to be identified respectively by the target pixel to the camera and Z n, among the objects identified respectively by the M of the target pixel of the distance to the camera Let Z L be the farthest distance, and let constant a and constant b be
a = Z L · exp ((μ / (γ-μ)) log (Z L / Z N ))
b = (1 / (γ-μ)) log (Z L / Z N )
Calculated by
Let Z m (m = 1, 2, ..., M) be the distance from the object corresponding to each of the M target pixels to the camera at time t = τ , and set the distance Z m as described above. Based on the constant a and the constant b and the number of M moving pixels q m ,
Z m = a · exp (-bq m )
A moving image distance calculation program characterized by realizing a distance calculation function calculated by
制御手段に、
前記動画像の時間t=τの時のフレーム画像に映る対象物の画素の1つをターゲットピクセルとして、当該フレーム画像からM個(M≧2)の異なる対象物毎に前記ターゲットピクセルを抽出させるターゲットピクセル抽出機能と、
時間t=τ−Tから時間t=τまでの複数の前記フレーム画像に基づいて、前記ターゲットピクセル抽出機能により抽出されたM個の前記ターゲットピクセルの座標の軌跡を、2次元画像を対象とする動的計画法に基づいて、時間t=τの前記フレーム画像から時間t=τ−Tの前記フレーム画像までの過去に遡る時系列順に算出させる軌跡算出機能と、
該軌跡算出機能により算出されたM個の前記軌跡に基づいて、時間t=τ−Tの前記フレーム画像の座標から時間t=τの前記フレーム画像の座標までの移動画素数qm(m=1,2,・・・,M)を、M個の前記ターゲットピクセル毎に測定させる移動画素数測定機能と、
前記移動画素数測定機能により測定されたM個の前記移動画素数qmのうち、前記移動画素数が最も少ない画素数をμとし、前記移動画素数が最も多い画素数をγとし、M個の前記ターゲットピクセルによりそれぞれ特定される対象物から前記カメラまでの距離のうちで最も近い距離をZnとし、M個の前記ターゲットピクセルによりそれぞれ特定される対象物から前記カメラまでの距離のうちで最も遠い距離をZLとして、定数aおよび定数bを、
a=ZL・exp((μ/(γ−μ))log(ZL/ZN))
b=(1/(γ−μ))log(ZL/ZN)
により算出させ、
M個の前記ターゲットピクセルのそれぞれに対応する前記対象物から前記カメラまでの時間t=τにおける距離をZm(m=1,2,・・・,M)として、当該距離Zmを、前記定数aおよび前記定数bと、M個の前記移動画素数qmとに基づいて、
Zm=a・exp(−bqm)
により算出させる距離算出機能と
を実現させることを特徴とする動画像距離算出用プログラム。 The front view in the moving direction is reflected in the moving image based on the moving image taken from the time t = τ-T (however, τ> 0, T> 0) to the time t = τ by one moving camera. A moving image distance calculation program for calculating the distance from an object to the camera.
As a control means,
One of the pixels of the object displayed in the frame image when the time t = τ of the moving image is set as the target pixel, and the target pixel is extracted from the frame image for each of M (M ≧ 2) different objects. Target pixel extraction function and
Based on the plurality of frame images from time t = τ−T to time t = τ, the loci of the coordinates of the M target pixels extracted by the target pixel extraction function are targeted for a two-dimensional image. Based on the dynamic planning method, a trajectory calculation function that calculates from the frame image at time t = τ to the frame image at time t = τ −T in chronological order retroactively.
Based on the M loci calculated by the locus calculation function, the number of moving pixels q m (m =) from the coordinates of the frame image at time t = τ −T to the coordinates of the frame image at time t = τ. A moving pixel number measurement function that measures 1, 2, ..., M) for each of the M target pixels,
Wherein among the moving pixel number measurement function by the measured M number of the mobile number of pixels q m, the moving pixel number is the smallest number of pixels as mu, the number of pixels the number of moving pixels is highest and gamma, the M the nearest distance among the distances from the object to be identified respectively by the target pixel to the camera and Z n, among the objects identified respectively by the M of the target pixel of the distance to the camera Let Z L be the farthest distance, and let constant a and constant b be
a = Z L · exp ((μ / (γ-μ)) log (Z L / Z N ))
b = (1 / (γ-μ)) log (Z L / Z N )
Calculated by
Let Z m (m = 1, 2, ..., M) be the distance from the object corresponding to each of the M target pixels to the camera at time t = τ , and set the distance Z m as described above. Based on the constant a and the constant b and the number of M moving pixels q m ,
Z m = a · exp (-bq m )
A moving image distance calculation program characterized by realizing a distance calculation function calculated by
前記ターゲットピクセル抽出機能において前記ターゲットピクセルの抽出を行うために用いられる前記フレーム画像に対し、mean-shift法を適用させることにより、当該フレーム画像を複数の領域に分割させる領域分割機能を実現させ、
前記ターゲットピクセル抽出機能において、前記領域分割機能により分割された前記領域のうち、前記対象物が映る領域の重心点の画素を前記ターゲットピクセルとして、異なる対象物が映るM個(M≧2)の領域毎に前記ターゲットピクセルを抽出させること
を特徴とする請求項5又は請求項6に記載の動画像距離算出用プログラム。 To the control means
By applying the mean-shift method to the frame image used for extracting the target pixel in the target pixel extraction function, a region division function for dividing the frame image into a plurality of regions is realized.
In the target pixel extraction function, among the areas divided by the area division function, M (M ≧ 2) in which different objects are reflected, with the pixel at the center of gravity of the area in which the object is reflected as the target pixel. The moving image distance calculation program according to claim 5 or 6, wherein the target pixel is extracted for each region.
前記ターゲットピクセル抽出機能において前記ターゲットピクセルの抽出を行うために用いられる前記フレーム画像に対し、mean-shift法を適用させることにより、当該フレーム画像を複数の領域に分割させる領域分割機能を実現させ、
前記ターゲットピクセル抽出機能において、前記領域分割機能により分割された前記領域の画素に対して端から順番に番号を付加させ、当該領域の画素の番号のうち中間の番号に該当する画素を前記ターゲットピクセルとして、異なる対象物が映るM個(M≧2)の領域毎に前記ターゲットピクセルを抽出させること
を特徴とする請求項5又は請求項6に記載の動画像距離算出用プログラム。 To the control means
By applying the mean-shift method to the frame image used for extracting the target pixel in the target pixel extraction function, a region division function for dividing the frame image into a plurality of regions is realized.
In the target pixel extraction function, numbers are added in order from the end to the pixels in the region divided by the region division function, and the pixel corresponding to the middle number among the pixel numbers in the region is the target pixel. The moving image distance calculation program according to claim 5 or 6, wherein the target pixels are extracted for each of M (M ≧ 2) regions in which different objects are reflected.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017235198A JP6982865B2 (en) | 2017-12-07 | 2017-12-07 | Moving image distance calculation device and moving image distance calculation program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017235198A JP6982865B2 (en) | 2017-12-07 | 2017-12-07 | Moving image distance calculation device and moving image distance calculation program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019101967A JP2019101967A (en) | 2019-06-24 |
| JP6982865B2 true JP6982865B2 (en) | 2021-12-17 |
Family
ID=66977013
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017235198A Active JP6982865B2 (en) | 2017-12-07 | 2017-12-07 | Moving image distance calculation device and moving image distance calculation program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6982865B2 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113538504B (en) * | 2020-04-16 | 2023-07-14 | 杭州海康威视数字技术股份有限公司 | Tracking target display method and electronic device in target moving scene at constant speed |
| CN112001457A (en) * | 2020-07-14 | 2020-11-27 | 浙江大华技术股份有限公司 | Image preprocessing method, device, system and computer readable storage medium |
| CN112364796B (en) * | 2020-11-18 | 2023-08-01 | 合肥湛达智能科技有限公司 | Target speed detection method and system based on deep learning |
| CN114332736B (en) * | 2022-01-07 | 2025-01-28 | 白银银珠电力(集团)有限责任公司 | A fire safety risk analysis method and system for power sites |
-
2017
- 2017-12-07 JP JP2017235198A patent/JP6982865B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019101967A (en) | 2019-06-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20210012520A1 (en) | Distance measuring method and device | |
| CN111856963B (en) | Parking simulation method and device based on vehicle-mounted looking-around system | |
| KR102766548B1 (en) | Generating method and apparatus of 3d lane model | |
| US10096158B2 (en) | Method and system for virtual sensor data generation with depth ground truth annotation | |
| JP6982865B2 (en) | Moving image distance calculation device and moving image distance calculation program | |
| US11605151B2 (en) | Vehicle undercarriage imaging | |
| CN116420096A (en) | Method and system for labeling LIDAR point cloud data | |
| KR20190132404A (en) | Direct vehicle detection as 3D bounding boxes using neural network image processing | |
| KR102295183B1 (en) | object tracking method for CCTV video by use of CCTV projection model | |
| CN114170499A (en) | Object detection method, tracking method, device, vision sensor and medium | |
| EP3327676B1 (en) | Method for displaying object on three-dimensional model | |
| CN112950717A (en) | Space calibration method and system | |
| CN107992827A (en) | A kind of method and device of the multiple mobile object tracking based on threedimensional model | |
| EP3913527B1 (en) | Method and device for performing behavior prediction by using explainable self-focused attention | |
| CN116050277A (en) | A method and device for capturing, sensing and simulating the reality of a coal mine underground scene | |
| JP7427615B2 (en) | Information processing device, information processing method and program | |
| US10936920B2 (en) | Determining geographical map features with multi-sensor input | |
| CN106327461A (en) | Image processing method and device used for monitoring | |
| CN108645375A (en) | One kind being used for vehicle-mounted biocular systems rapid vehicle distance measurement optimization method | |
| KR102618069B1 (en) | Method and apparatus for analyasing indoor building disaster information using point cloud data and visual information from ground survey robot | |
| EP4654570A2 (en) | Camera placement guidance | |
| KR20090113746A (en) | Estimation method of robot's magnetic position using spatial semantic information of object | |
| KR102396330B1 (en) | System and method for establishing recovery of runway based on image, ai and reinforcement learning at war | |
| WO2021223166A1 (en) | State information determination method, apparatus and system, and movable platform and storage medium | |
| CN115909219A (en) | Scene change detection method and system based on video analysis |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201028 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20211026 |
|
| 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: 20211109 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20211115 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6982865 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |