JP2013104660A - Momentum estimation method based on stereo vision using monocular camera image and momentum estimation device using the same - Google Patents

Momentum estimation method based on stereo vision using monocular camera image and momentum estimation device using the same Download PDF

Info

Publication number
JP2013104660A
JP2013104660A JP2011246161A JP2011246161A JP2013104660A JP 2013104660 A JP2013104660 A JP 2013104660A JP 2011246161 A JP2011246161 A JP 2011246161A JP 2011246161 A JP2011246161 A JP 2011246161A JP 2013104660 A JP2013104660 A JP 2013104660A
Authority
JP
Japan
Prior art keywords
feature points
momentum
feature
basic matrix
feature point
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.)
Pending
Application number
JP2011246161A
Other languages
Japanese (ja)
Inventor
Yuji Ikedo
祐司 池戸
Masakazu Nishijima
征和 西嶋
Tatsuya Shiraishi
達也 白石
Naohide Uchida
尚秀 内田
Akihiko Nagata
暁彦 永田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyota Motor Corp
Original Assignee
Toyota Motor Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2011246161A priority Critical patent/JP2013104660A/en
Publication of JP2013104660A publication Critical patent/JP2013104660A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a method of calculating momentum and three-dimensional coordinates with high accuracy, while reducing an arithmetic load, upon performing momentum estimation based on monocular stereo vision.SOLUTION: Upon performing momentum estimation based on stereo vision using an image captured by a monocular camera, in consideration of each optical flow direction, feature points that form optical flows different in direction are efficiently sampled to be used for calculating a basic matrix. Concretely, in sampling the feature points that form the optical flows to be used for calculating the basic matrix, the sampled feature points are sorted into a predetermined number of groups on the basis of the direction of the optical flow. The feature points for the group including a plurality of feature points is converged. As for the group including no feature point, feature points are selected again. The above processing is repeated so that each of all the groups has one feature point. On the basis of the feature points, a basic matrix is calculated.

Description

本発明は、車両等の移動体に取り付けられたカメラによって撮像された画像を用いるステレオ視に基づく運動量推定方法、及び当該方法を使用する運動量推定装置に関する。より詳細には、本発明は、車両等の移動体に取り付けられた単眼カメラによって撮像された画像を用いるステレオ視に基づく運動量推定方法の推定精度を向上させる方法、及び当該方法を使用する運動量推定装置に関する。   The present invention relates to a momentum estimation method based on stereo vision using an image captured by a camera attached to a moving body such as a vehicle, and a momentum estimation apparatus using the method. More specifically, the present invention relates to a method for improving the estimation accuracy of a method for estimating momentum based on stereo vision using an image captured by a monocular camera attached to a moving body such as a vehicle, and momentum estimation using the method. Relates to the device.

従来から、車両等の移動体に搭載されたカメラによって周辺物の画像を撮像し、周辺の環境を三次元的に認識するシステムが開発されている。カメラ画像によって三次元座標(距離)を測定する方法としては、複数台のカメラを利用するステレオ視(以降、「複眼ステレオ視」とも称する)が一般的であるが、1台のカメラでも、異なる視点(異なる位置及び姿勢)から撮像された複数の画像を利用することにより、ステレオ視を実現することが可能であることが知られている(以降、「単眼ステレオ視」とも称する)。   2. Description of the Related Art Conventionally, a system has been developed in which an image of a peripheral object is captured by a camera mounted on a moving body such as a vehicle and the surrounding environment is three-dimensionally recognized. As a method for measuring the three-dimensional coordinates (distance) from a camera image, stereo vision using a plurality of cameras (hereinafter, also referred to as “compound eye stereo vision”) is common, but even a single camera is different. It is known that stereo vision can be realized by using a plurality of images taken from viewpoints (different positions and postures) (hereinafter also referred to as “monocular stereo vision”).

当該技術分野において周知であるように、単眼ステレオ視に基づく運動量推定を行う手法としては、例えば、異なる視点から撮像された複数の画像における特徴点のオプティカルフロー(光学的流動)を利用する手法が挙げられる。当該手法においては、先ず、異なる視点から2つの画像を撮像し、撮像された画像を画像処理装置に取り込む。斯くして取り込まれた2つの画像のうちの一方から複数の特徴点を算出する。これら複数の特徴点に対応する点を他方の画像から検索し、特徴点の移動状態を示すオプティカルフローを算出する。複数の特徴点から所定数の特徴点を選択し、選択された特徴点に基づいて基礎行列を算出し、算出された基礎行列に基づいて、選択された特徴点についてのエピポーラ誤差を算出する。この特徴点の選択、基礎行列の算出、及びエピポーラ誤差の算出を繰り返し、最も小さいエピポーラ誤差を示す最適な基礎行列を選択する。斯くして選択された最適な基礎行列に基づいてカメラ(を搭載する車両等の移動体)の運動量を算出し、算出された運動量に基づいて特徴点の三次元座標を算出する。   As is well known in the technical field, as a method for estimating the momentum based on monocular stereo vision, for example, there is a method using optical flow (optical flow) of feature points in a plurality of images taken from different viewpoints. Can be mentioned. In this method, first, two images are taken from different viewpoints, and the taken images are taken into an image processing apparatus. A plurality of feature points are calculated from one of the two images thus captured. Points corresponding to the plurality of feature points are searched from the other image, and an optical flow indicating the movement state of the feature points is calculated. A predetermined number of feature points are selected from a plurality of feature points, a basic matrix is calculated based on the selected feature points, and an epipolar error is calculated for the selected feature points based on the calculated basic matrix. The selection of the feature points, the calculation of the basic matrix, and the calculation of the epipolar error are repeated, and the optimal basic matrix showing the smallest epipolar error is selected. The momentum of the camera (a moving body such as a vehicle on which the camera is mounted) is calculated based on the optimal basic matrix thus selected, and the three-dimensional coordinates of the feature points are calculated based on the calculated momentum.

上記のように、オプティカルフローを利用して単眼ステレオ視に基づく運動量推定を行うに当たっては、個々の基礎行列の算出に用いる所定数の特徴点を選択する度に、選択された特徴点についてのエピポーラ誤差を求める必要があるため、最適な基礎行列を選択するのに必要とされる演算負荷が非常に大きい。そこで、当該技術分野においては、かかる演算負荷を軽減することを目的として、種々の方法が提案されている。   As described above, when estimating the momentum based on monocular stereo vision using the optical flow, every time a predetermined number of feature points used for calculation of each basic matrix is selected, an epipolar about the selected feature points is selected. Since it is necessary to obtain an error, the calculation load required to select an optimal base matrix is very large. Accordingly, in the technical field, various methods have been proposed for the purpose of reducing the calculation load.

例えば、個々の基礎行列の算出の度に選択される所定数の特徴点についてのエピポーラ誤差を求める代わりに、車輪速度センサ等の運動量検出手段から得られる情報を利用する等してカメラ(を搭載する車両等の移動体)の仮の運動量を算出又は推定し、斯くして得られた仮の運動量に基づいて仮の基礎行列を推定し、推定された仮の基礎行列に基づいて、個々の特徴点についてのエピポーラ誤差を予め算出し、大きいエピポーラ誤差を有する特徴点を除去し、残った特徴点に基づいて最適な基礎行列を算出する方法が提案されている(例えば、特許文献1を参照)。   For example, instead of obtaining an epipolar error for a predetermined number of feature points that are selected each time an individual basic matrix is calculated, a camera (equipped with information obtained from momentum detection means such as a wheel speed sensor) is installed. Calculating or estimating a temporary momentum of a moving body such as a vehicle, etc., estimating a temporary basic matrix based on the temporary momentum obtained in this way, and A method has been proposed in which an epipolar error for a feature point is calculated in advance, a feature point having a large epipolar error is removed, and an optimal basic matrix is calculated based on the remaining feature points (see, for example, Patent Document 1). ).

上記方法によれば、個々の基礎行列の算出のために所定数の特徴点を選択する度に選択された特徴点についてのエピポーラ誤差を求める必要が無いため、最適な基礎行列を算出するために必要とされる演算負荷を軽減することができる。しかしながら、そもそもオプティカルフローは誤差を有するため、上記方法のように個々の基礎行列の算出に用いる所定数の特徴点をランダム且つ無条件に選択した場合、オプティカルフローが有する誤差の影響により、算出された基礎行列が必ずしも正しくない場合がある。従って、基礎行列の算出精度を高めるためには、個々の基礎行列の算出に用いる特徴点の数を増やして、オプティカルフローが有する誤差の影響を小さくする必要がある。結果として、上記のような方法においても、運動量や三次元座標の算出精度を高めようとすると、最適な基礎行列を算出するために必要とされる演算負荷を十分に軽減することは困難である。   According to the above method, it is not necessary to obtain an epipolar error for a selected feature point every time a predetermined number of feature points are selected for calculation of each basic matrix. The required calculation load can be reduced. However, since optical flow has an error in the first place, when a predetermined number of feature points used for calculation of each basic matrix are selected randomly and unconditionally as in the above method, it is calculated due to the error of optical flow. The underlying matrix may not always be correct. Therefore, in order to increase the calculation accuracy of the basic matrix, it is necessary to increase the number of feature points used for calculation of each basic matrix to reduce the influence of errors of the optical flow. As a result, even in the method as described above, it is difficult to sufficiently reduce the calculation load required to calculate the optimal basic matrix if the accuracy of calculation of momentum and three-dimensional coordinates is to be increased. .

そこで、当該技術分野においては、オプティカルフローが有する誤差の影響を小さくすることを目的として、個々の基礎行列の算出に用いる特徴点をランダム且つ無条件に選択(サンプリング)するのではなく、個々のオプティカルフローの大きさを考慮して、異なる大きさを有するオプティカルフローを形成する所定数の特徴点を選択して基礎行列の算出に用いることが提案されている(例えば、特許文献2を参照)。   Therefore, in this technical field, for the purpose of reducing the influence of the error of the optical flow, the feature points used for calculation of each basic matrix are not randomly selected unconditionally (sampling), but individually. In consideration of the size of the optical flow, it has been proposed to select a predetermined number of feature points forming optical flows having different sizes and use them in the calculation of the basic matrix (see, for example, Patent Document 2). .

しかしながら、上記方法においては、個々の基礎行列の算出に用いる所定数の特徴点を選択する際に、オプティカルフローの大きさは考慮されているものの、オプティカルフローの向きが考慮されていないため、依然として運動量や三次元座標の算出精度を十分に高めることは困難である。   However, in the above method, when selecting a predetermined number of feature points used for calculation of each basic matrix, the size of the optical flow is considered, but the direction of the optical flow is not considered, so It is difficult to sufficiently increase the calculation accuracy of momentum and three-dimensional coordinates.

上述のように、当該技術分野においては、演算負荷を軽減しつつ単眼カメラ画像によるステレオ視に基づく運動量推定を高精度に実現することができる技術に対する継続的な要求が存在する。   As described above, in this technical field, there is a continuous demand for a technology that can realize a momentum estimation based on stereo vision using a monocular camera image with high accuracy while reducing a calculation load.

特開2007−256029号公報JP 2007-256029 A 特開2010−085240号公報JP 2010-085240 A

Multiple View Geometry in Computer Vision, Second Edition, 2003, Richard Hartley & Andrew Zisserman, Cambridge University Press     Multiple View Geometry in Computer Vision, Second Edition, 2003, Richard Hartley & Andrew Zisserman, Cambridge University Press

前述のように、当該技術分野においては、演算負荷を軽減しつつ単眼カメラ画像によるステレオ視に基づく運動量推定を高精度に実現することができる技術に対する継続的な要求が存在する。本発明は、かかる要求に応えるために為されたものである。より具体的には、本発明の1つの目的は、単眼ステレオ視に基づく運動量推定を実施するに当たり、演算負荷を軽減しつつ、運動量及び三次元座標を高精度に算出する方法を提供することである。   As described above, in this technical field, there is a continuous demand for a technique that can realize a momentum estimation based on stereo vision using a monocular camera image with high accuracy while reducing a calculation load. The present invention has been made to meet such a demand. More specifically, one object of the present invention is to provide a method for calculating the momentum and the three-dimensional coordinates with high accuracy while reducing the calculation load in performing the momentum estimation based on monocular stereo vision. is there.

本発明の上記1つの目的は、
移動体に搭載されて所定の領域を撮像する撮像手段と、
前記撮像手段が第1の位置及び第1の姿勢にあるときに撮像された第1の画像から、複数の特徴点を抽出する特徴点抽出手段と、
前記特徴点抽出手段によって前記第1の画像から抽出された前記特徴点の各々に対応する点を、前記撮像手段が前記第1の位置及び第1の姿勢とは異なる第2の位置及び第2の姿勢にあるときに撮像された第2の画像から検索し、特徴点の移動状態を表すオプティカルフローを算出するオプティカルフロー算出手段と、
前記特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択する特徴点選択ステップと、選択されたn個の特徴点に基づいて基礎行列を算出する基礎行列算出ステップと、算出された基礎行列に基づいて、前記特徴点抽出手段によって抽出された全ての特徴点についてのエピポーラ誤差を算出する誤差算出ステップと、を所定回数Nだけ繰り返し、斯くして得られたN個の基礎行列のうち最も小さいエピポーラ誤差を示す基礎行列を最適基礎行列として選択する基礎行列算出手段と、
前記基礎行列算出手段によって算出された前記最適基礎行列から、オプティカルフローによって得られる、特徴点に対応する点、及び前記撮像手段の内部パラメータに基づいて、前記撮像手段の運動量を算出することにより、前記移動体の運動量を算出する運動量算出手段と、
前記運動量算出手段によって算出された前記撮像手段の運動量に基づいて、個々の特徴点の三次元座標を算出する三次元座標算出手段と、
を備える運動量推定装置において、
前記特徴点選択ステップにおいて、前記特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択した後に、
選択されたn個の特徴点を、オプティカルフローの向きに基づいて予め定められたn個のグループに分けるグループ分けステップと、
前記n個のグループのうち、当該グループに属する特徴点が2個以上存在するグループについては、当該グループに属する2個以上の特徴点のうち1個のみを残して、その他の特徴点を削除する特徴点収束ステップと、
前記n個のグループのうち、当該グループに属する特徴点が存在しないグループについては、当該グループの数と同じ数の特徴点を改めて選択する特徴点再選択ステップと、
を、前記n個のグループの全てに特徴点が1個ずつ属する状態になるまで繰り返す、
運動量推定方法によって達成される。
One object of the present invention is to
An imaging means mounted on the moving body for imaging a predetermined area;
Feature point extracting means for extracting a plurality of feature points from a first image picked up when the image pickup means is in a first position and a first posture;
A point corresponding to each of the feature points extracted from the first image by the feature point extraction unit is a second position and a second point where the imaging unit is different from the first position and the first posture. An optical flow calculating unit that searches the second image captured when the posture is in the position and calculates an optical flow that represents a moving state of the feature point;
A feature point selection step of selecting a predetermined number n of feature points from the plurality of feature points extracted by the feature point extraction means; and a base matrix calculation step of calculating a base matrix based on the selected n feature points; An error calculation step of calculating epipolar errors for all feature points extracted by the feature point extraction means based on the calculated basic matrix, and repeating the predetermined N times, N A basic matrix calculation means for selecting a basic matrix indicating the smallest epipolar error among the basic matrices of as an optimal basic matrix;
By calculating the momentum of the imaging means based on the points corresponding to the feature points obtained by the optical flow from the optimal basic matrix calculated by the basic matrix calculation means and the internal parameters of the imaging means, A momentum calculating means for calculating the momentum of the moving body;
Three-dimensional coordinate calculation means for calculating three-dimensional coordinates of individual feature points based on the momentum of the imaging means calculated by the momentum calculation means;
In the momentum estimation device comprising:
In the feature point selection step, after selecting a predetermined number n of feature points from the plurality of feature points extracted by the feature point extraction means,
A grouping step for dividing the selected n feature points into predetermined n groups based on the direction of the optical flow;
Among the n groups, with respect to a group having two or more feature points belonging to the group, only one of the two or more feature points belonging to the group is left and the other feature points are deleted. A feature point convergence step;
A feature point reselecting step of selecting again the same number of feature points as the number of the groups of the n groups for which no feature points belong to the group,
Is repeated until one feature point belongs to each of the n groups.
This is achieved by the momentum estimation method.

上記のように、本発明に係る運動量推定方法においては、単眼カメラによって撮像された画像を用いるステレオ視に基づく運動量推定を行うに当たり、異なる向きを有するオプティカルフローを形成する特徴点を効率的にサンプリングして基礎行列の算出に用いるので、演算負荷を軽減しつつ、カメラの運動量及び特徴点の三次元座標を高精度に算出することができる。   As described above, in the momentum estimation method according to the present invention, when performing momentum estimation based on stereo vision using an image captured by a monocular camera, the feature points that form optical flows having different directions are efficiently sampled. Therefore, since it is used for calculation of the basic matrix, the momentum of the camera and the three-dimensional coordinates of the feature points can be calculated with high accuracy while reducing the calculation load.

本発明の1つの実施態様に係る運動量推定方法において実行される種々の処理の流れの概要を表すフローチャートである。It is a flowchart showing the outline | summary of the flow of the various processes performed in the momentum estimation method which concerns on one embodiment of this invention. 図1に示すフローチャートに含まれる基礎行列算出ステップ(S400)において実行される種々の処理の流れを表すフローチャートである。It is a flowchart showing the flow of the various processes performed in the base matrix calculation step (S400) included in the flowchart shown in FIG. 図2に示すフローチャートに含まれる特徴点選択ステップ(S410)において実行される種々の処理の流れを表すフローチャートである。It is a flowchart showing the flow of the various processes performed in the feature point selection step (S410) included in the flowchart shown in FIG.

前述のように、本発明は、単眼ステレオ視に基づく運動量推定を実施するに当たり、演算負荷を軽減しつつ、運動量及び三次元座標を高精度に算出する方法を提供することを1つの目的とする。   As described above, one object of the present invention is to provide a method for calculating the momentum and the three-dimensional coordinates with high accuracy while reducing the calculation load when performing the momentum estimation based on monocular stereo vision. .

本発明者は、上記目的を達成すべく鋭意研究の結果、単眼カメラによって撮像された画像を用いるステレオ視に基づく運動量推定を行うに当たり、従来技術のように個々の基礎行列の算出に用いるオプティカルフローを形成する特徴点(対応点)をランダム且つ無条件に選択するのではなく、個々のオプティカルフローの向きを考慮して、異なる向きを有するオプティカルフローを形成する特徴点を効率的にサンプリングして基礎行列の算出に用いることにより、演算負荷を軽減しつつ、カメラの運動量及び特徴点の三次元座標を高精度に算出することができることを見出し、本発明を想到するに至ったものである。   As a result of diligent research to achieve the above object, the present inventor, when performing momentum estimation based on stereo vision using an image captured by a monocular camera, uses an optical flow used to calculate individual basic matrices as in the prior art. Rather than randomly and unconditionally selecting feature points (corresponding points) that form an image, the feature points that form optical flows having different orientations are efficiently sampled in consideration of the direction of each optical flow. The present invention has been conceived by finding that it is possible to calculate the momentum of the camera and the three-dimensional coordinates of the feature points with high accuracy while reducing the calculation load by using the calculation of the basic matrix.

即ち、本発明の第1の実施態様は、
移動体に搭載されて所定の領域を撮像する撮像手段と、
前記撮像手段が第1の位置及び第1の姿勢にあるときに撮像された第1の画像から、複数の特徴点を抽出する特徴点抽出手段と、
前記特徴点抽出手段によって前記第1の画像から抽出された前記特徴点の各々に対応する点を、前記撮像手段が前記第1の位置及び第1の姿勢とは異なる第2の位置及び第2の姿勢にあるときに撮像された第2の画像から検索し、特徴点の移動状態を表すオプティカルフローを算出するオプティカルフロー算出手段と、
前記特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択する特徴点選択ステップと、選択されたn個の特徴点に基づいて基礎行列を算出する基礎行列算出ステップと、算出された基礎行列に基づいて、前記特徴点抽出手段によって抽出された全ての特徴点についてのエピポーラ誤差を算出する誤差算出ステップと、を所定回数Nだけ繰り返し、斯くして得られたN個の基礎行列のうち最も小さいエピポーラ誤差を示す基礎行列を最適基礎行列として選択する基礎行列算出手段と、
前記基礎行列算出手段によって算出された前記最適基礎行列から、オプティカルフローによって得られる、特徴点に対応する点、及び前記撮像手段の内部パラメータに基づいて、前記撮像手段の運動量を算出することにより、前記移動体の運動量を算出する運動量算出手段と、
前記運動量算出手段によって算出された前記撮像手段の運動量に基づいて、個々の特徴点の三次元座標を算出する三次元座標算出手段と、
を備える運動量推定装置において、
前記特徴点選択ステップにおいて、前記特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択した後に、
選択されたn個の特徴点を、オプティカルフローの向きに基づいて予め定められたn個のグループに分けるグループ分けステップと、
前記n個のグループのうち、当該グループに属する特徴点が2個以上存在するグループについては、当該グループに属する2個以上の特徴点のうち1個のみを残して、その他の特徴点を削除する特徴点収束ステップと、
前記n個のグループのうち、当該グループに属する特徴点が存在しないグループについては、当該グループの数と同じ数の特徴点を改めて選択する特徴点再選択ステップと、
を、前記n個のグループの全てに特徴点が1個ずつ属する状態になるまで繰り返す、
運動量推定方法である。
That is, the first embodiment of the present invention is:
An imaging means mounted on the moving body for imaging a predetermined area;
Feature point extracting means for extracting a plurality of feature points from a first image picked up when the image pickup means is in a first position and a first posture;
A point corresponding to each of the feature points extracted from the first image by the feature point extraction unit is a second position and a second point where the imaging unit is different from the first position and the first posture. An optical flow calculating unit that searches the second image captured when the posture is in the position and calculates an optical flow that represents a moving state of the feature point;
A feature point selection step of selecting a predetermined number n of feature points from the plurality of feature points extracted by the feature point extraction means; and a base matrix calculation step of calculating a base matrix based on the selected n feature points; An error calculation step of calculating epipolar errors for all feature points extracted by the feature point extraction means based on the calculated basic matrix, and repeating the predetermined N times, N A basic matrix calculation means for selecting a basic matrix indicating the smallest epipolar error among the basic matrices of as an optimal basic matrix;
By calculating the momentum of the imaging means based on the points corresponding to the feature points obtained by the optical flow from the optimal basic matrix calculated by the basic matrix calculation means and the internal parameters of the imaging means, A momentum calculating means for calculating the momentum of the moving body;
Three-dimensional coordinate calculation means for calculating three-dimensional coordinates of individual feature points based on the momentum of the imaging means calculated by the momentum calculation means;
In the momentum estimation device comprising:
In the feature point selection step, after selecting a predetermined number n of feature points from the plurality of feature points extracted by the feature point extraction means,
A grouping step for dividing the selected n feature points into predetermined n groups based on the direction of the optical flow;
Among the n groups, with respect to a group having two or more feature points belonging to the group, only one of the two or more feature points belonging to the group is left and the other feature points are deleted. A feature point convergence step;
A feature point reselecting step of selecting again the same number of feature points as the number of the groups of the n groups for which no feature points belong to the group,
Is repeated until one feature point belongs to each of the n groups.
It is a momentum estimation method.

上記撮像手段は、例えば、CCD(Charge Coupled Device)カメラ等の撮像装置であり、車両等の移動体に搭載されて、例えば移動体の前方等の所定の領域を撮像する。撮像された画像は、例えば、A/D(アナログ/デジタル)変換された画像信号として、画像メモリ等のデータ記憶手段に格納することができる。   The imaging means is an imaging device such as a CCD (Charge Coupled Device) camera, for example, and is mounted on a moving body such as a vehicle to image a predetermined area such as the front of the moving body. The captured image can be stored in a data storage unit such as an image memory, for example, as an A / D (analog / digital) converted image signal.

上記特徴点抽出手段は、撮像手段が第1の位置及び第1の姿勢にあるときに撮像された第1の画像から、複数の特徴点を抽出する。当業者に周知であるように、特徴点とは、画像における境界の形状を定義するために必要となる点であり、例えば、コーナーやエッジに該当する。かかる特徴点の抽出には、当該技術分野において広く知られている種々の方法を用いることができる。具体的には、特徴点の抽出には、例えば、ハリス(Harris)オペレータやSUSANオペレータを使用することができる。   The feature point extracting unit extracts a plurality of feature points from the first image captured when the imaging unit is in the first position and the first posture. As is well known to those skilled in the art, a feature point is a point required to define the shape of a boundary in an image, and corresponds to, for example, a corner or an edge. For the extraction of such feature points, various methods widely known in the technical field can be used. Specifically, for example, a Harris operator or a SUSAN operator can be used to extract feature points.

上記オプティカルフロー算出手段は、特徴点抽出手段によって第1の画像から抽出された特徴点の各々に対応する点を、撮像手段が第1の位置及び第1の姿勢とは異なる第2の位置及び第2の姿勢にあるときに撮像された第2の画像から検索し、特徴点の移動状態を表すオプティカルフローを算出する。当業者に周知であるように、オプティカルフローとは、第1の画像と第2の画像との間で特徴点が移動した軌跡である。換言すれば、オプティカルフローとは、時系列的な画像の組を利用して、画像の速度場を求め、当該速度場をベクトル集合で表現したものである。   The optical flow calculating means determines a point corresponding to each of the feature points extracted from the first image by the feature point extracting means by using a second position different from the first position and the first posture by the imaging means. A search is made from the second image captured when the camera is in the second posture, and an optical flow representing the movement state of the feature point is calculated. As is well known to those skilled in the art, the optical flow is a trajectory in which feature points have moved between the first image and the second image. In other words, the optical flow is obtained by obtaining a velocity field of an image using a set of time-series images and expressing the velocity field as a vector set.

かかるオプティカルフローの算出には、当該技術分野において広く知られている種々の方法を用いることができる。一般的に、オプティカルフローの算出方法は、勾配法とブロックマッチング法とに大別することができる。勾配法においては「オプティカルフロー拘束方程式」と呼ばれる輝度の時間/空間的微分(輝度勾配)の拘束方程式を用いて、これに制約条件を付加することによってオプティカルフローを求める。代表的な勾配法としては、例えば、Lucas−Kanade法やKLT(Kanade−Lucas−Tomasi)トラッカー等を挙げることができる。一方、ブロックマッチング法においては、一方の画像における特定のブロックをテンプレートとし、他方の画像において、対応する箇所を検索することによってオプティカルフローを求める。   For the calculation of the optical flow, various methods widely known in the art can be used. In general, optical flow calculation methods can be broadly classified into gradient methods and block matching methods. In the gradient method, an optical flow is obtained by adding a constraint condition to a constraint equation of luminance temporal / spatial differentiation (luminance gradient) called “optical flow constraint equation”. Typical gradient methods include, for example, the Lucas-Kanade method and the KLT (Kanade-Lucas-Tomasi) tracker. On the other hand, in the block matching method, a specific block in one image is used as a template, and an optical flow is obtained by searching for a corresponding portion in the other image.

上記基礎行列算出手段は、特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択する特徴点選択ステップと、選択されたn個の特徴点に基づいて基礎行列を算出する基礎行列算出ステップと、算出された基礎行列に基づいて、特徴点抽出手段によって抽出された全ての特徴点についてのエピポーラ誤差を算出する誤差算出ステップと、を所定回数Nだけ繰り返し、斯くして得られたN個の基礎行列のうち最も小さいエピポーラ誤差を示す基礎行列を最適基礎行列として選択する。   The basic matrix calculation means calculates a basic matrix based on the feature point selection step of selecting a predetermined number n of feature points from the plurality of feature points extracted by the feature point extraction means, and the selected n feature points. A basic matrix calculation step, and an error calculation step of calculating epipolar errors for all feature points extracted by the feature point extraction means based on the calculated basic matrix, are repeated a predetermined number of times N. A basic matrix indicating the smallest epipolar error among the obtained N basic matrices is selected as the optimal basic matrix.

上記基礎行列算出手段は、特徴点選択ステップにおいて、特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択する。本実施態様に係る運動量推定方法は、上記特徴点選択ステップに特徴を有するものであるが、詳細については後述する。上記特徴点選択ステップにおいて選択される特徴点の数である所定数nは、例えば、後述する基礎行列の算出に用いるアルゴリズム等に応じて、任意の自然数に設定することができる。所定数nを大きくするほど、個々の基礎行列の算出精度は高まるものの、基礎行列の算出に必要とされる演算負荷も高まる。逆に、所定数nを小さくするほど、個々の基礎行列の算出に必要とされる演算負荷は低くなるものの、基礎行列の算出精度も低くなる。   The basic matrix calculation means selects a predetermined number n of feature points from the plurality of feature points extracted by the feature point extraction means in the feature point selection step. The momentum estimation method according to the present embodiment is characterized by the feature point selection step, which will be described later in detail. The predetermined number n, which is the number of feature points selected in the feature point selection step, can be set to an arbitrary natural number according to, for example, an algorithm used for calculation of a basic matrix described later. As the predetermined number n increases, the calculation accuracy of each basic matrix increases, but the calculation load required for calculating the basic matrix also increases. Conversely, the smaller the predetermined number n, the lower the calculation load required for calculating each basic matrix, but the lower the calculation accuracy of the basic matrix.

次に、上記基礎行列算出手段は、基礎行列算出ステップにおいて、選択されたn個の特徴点に基づいて基礎行列を算出する。当業者に周知であるように、基礎行列とは、エピポーラ幾何学に基づいてステレオ視における画像間での点対応を数学的に記述する基礎行列である。換言すれば、基礎行列とは、画像間のエピポーラ拘束を表す行列である。かかる基礎行列の算出には、当該技術分野において広く知られている種々の方法を用いることができる。具体的には、基礎行列の算出には、例えば、公知のハートレー(Hartley)の8点アルゴリズムや、7点アルゴリズム、5点アルゴリズム等を使用することができる。   Next, the basic matrix calculation means calculates a basic matrix based on the selected n feature points in the basic matrix calculation step. As is well known to those skilled in the art, a basic matrix is a basic matrix that mathematically describes point correspondence between images in stereo vision based on epipolar geometry. In other words, the basic matrix is a matrix that represents epipolar constraints between images. For the calculation of the basic matrix, various methods widely known in the technical field can be used. Specifically, for example, a known Hartley eight-point algorithm, a seven-point algorithm, a five-point algorithm, or the like can be used to calculate the basic matrix.

次に、上記基礎行列算出手段は、誤差算出ステップにおいて、算出された基礎行列に基づいて、前記特徴点抽出手段によって抽出された全ての特徴点についてのエピポーラ誤差を算出する。当業者に周知であるように、エピポーラ誤差とは、算出された基礎行列に基づくエピポーラ線と特徴点との間の距離である。   Next, the basic matrix calculation means calculates an epipolar error for all the feature points extracted by the feature point extraction means based on the calculated basic matrix in the error calculation step. As is well known to those skilled in the art, the epipolar error is the distance between the epipolar line and the feature point based on the calculated basic matrix.

上記基礎行列算出手段は、上述の特徴点選択ステップ、基礎行列算出ステップ、及び誤差算出ステップを所定回数Nだけ繰り返し、斯くして得られたN個の基礎行列のうち最も小さいエピポーラ誤差を示す基礎行列を最適基礎行列として選択する。これにより、例えば、オプティカルフロー算出手段が、特徴点抽出手段によって第1の画像から抽出された特徴点の各々に対応する点(対応点)を、撮像手段が第1の位置及び第1の姿勢とは異なる第2の位置及び第2の姿勢にあるときに撮像された第2の画像から検索する際に、誤った点を検出した場合等、一部の対応点に大きい誤差が存在する場合に、かかる外れ値(アウトライア)の影響を排除し、基礎行列の算出精度を向上させることができる。即ち、基礎行列算出手段による最適な基礎行列の算出においては、エピポーラ誤差を評価量とするRANSAC(RANdam SAmple Consensus)と称されるロバストな手法を用いて、基礎行列の算出精度を向上させることができる。   The basic matrix calculation means repeats the above feature point selection step, basic matrix calculation step, and error calculation step a predetermined number of times N, and the basic matrix indicating the smallest epipolar error among the N basic matrices thus obtained. Select a matrix as the optimal basis matrix. As a result, for example, the optical flow calculation means sets the points (corresponding points) corresponding to each of the feature points extracted from the first image by the feature point extraction means, and the imaging means sets the first position and the first posture. When there is a large error in some of the corresponding points, such as when an incorrect point is detected when searching from the second image captured when the second position and the second posture are different from In addition, the influence of such outliers (outliers) can be eliminated, and the calculation accuracy of the basic matrix can be improved. In other words, in the calculation of the optimal basic matrix by the basic matrix calculation means, it is possible to improve the calculation accuracy of the basic matrix by using a robust method called RANSAC (RANdam Sample Sample Consensus) that uses the epipolar error as an evaluation amount. it can.

尚、上述の特徴点選択ステップ、基礎行列算出ステップ、及び誤差算出ステップを繰り返し実行する回数である所定回数Nは、例えば、Multiple View Geometry in Computer Vision, Second Edition, 2003, Richard Hartley & Andrew Zisserman, Cambridge University Press(非特許文献1)に記載されている統計学的な手法等に応じて、任意の自然数に設定することができる。所定回数Nを大きくするほど、最終的に選択される最適な基礎行列の算出精度は高まるものの、最適な基礎行列の算出に必要とされる演算負荷も高まる。逆に、所定回数Nを小さくするほど、最適な基礎行列の算出に必要とされる演算負荷は低くなるものの、最適な基礎行列の算出精度も低くなる。   Note that the predetermined number N, which is the number of times to repeatedly execute the feature point selection step, the basic matrix calculation step, and the error calculation step, is, for example, Multiple View Geometry Measurement, Second Edition, 2003, Richard Hartley & Andrew Zis. It can be set to an arbitrary natural number according to a statistical technique described in Cambridge University Press (Non-patent Document 1). As the predetermined number N is increased, the calculation accuracy of the optimum basic matrix to be finally selected increases, but the calculation load required for calculating the optimal basic matrix also increases. Conversely, the smaller the predetermined number N, the lower the calculation load required for calculating the optimum basic matrix, but the lower the calculation accuracy of the optimal basic matrix.

上記運動量算出手段は、基礎行列算出手段によって算出された最適基礎行列から、オプティカルフローによって得られる、特徴点に対応する点、及び撮像手段の内部パラメータに基づいて、撮像手段の運動量を算出することにより、移動体の運動量を算出する。当業者に周知であるように、撮像手段の内部パラメータとは、例えば、撮像手段が備えるレンズの焦点距離、画角、光軸点等を指す。   The momentum calculating means calculates the momentum of the imaging means based on the points corresponding to the feature points obtained by the optical flow and the internal parameters of the imaging means, from the optimum basic matrix calculated by the basic matrix calculating means. Thus, the momentum of the moving body is calculated. As is well known to those skilled in the art, the internal parameters of the imaging means refer to, for example, the focal length, angle of view, optical axis point of the lens provided in the imaging means.

上記三次元座標算出手段は、運動量算出手段によって算出された前記撮像手段の運動量に基づいて、個々の特徴点の三次元座標を算出する。   The three-dimensional coordinate calculating means calculates three-dimensional coordinates of individual feature points based on the momentum of the imaging means calculated by the momentum calculating means.

尚、本実施態様に係る運動量推定方法を使用する運動量推定装置が備える特徴点抽出手段、オプティカルフロー算出手段、基礎行列算出手段、運動量算出手段、及び三次元座標算出手段は、必ずしもそれぞれが個別の構成要素として構成されている必要は無い。例えば、これらの各種手段は、運動量推定装置が搭載された車両等の移動体が備える電子制御装置(ECU:Electric Control Unit)において実現される機能として実装されていてもよい。また、これらの各種手段は、運動量推定装置専用のECUにおいて実装されていてもよく、あるいは運動量推定装置が搭載された車両等の移動体が備える他の目的のためのECUにおいて実装されていてもよい。更に、これらの各種手段は、単一のECUにおいて実装されていてもよく、あるいは複数のECUにおいて分散的に実装されていてもよい。   It should be noted that the feature point extracting means, optical flow calculating means, basic matrix calculating means, momentum calculating means, and three-dimensional coordinate calculating means provided in the momentum estimating apparatus using the momentum estimating method according to the present embodiment are not necessarily individual. It need not be configured as a component. For example, these various means may be implemented as a function realized in an electronic control unit (ECU: Electronic Control Unit) provided in a moving body such as a vehicle on which the momentum estimation device is mounted. These various means may be implemented in an ECU dedicated to the momentum estimation device, or may be implemented in an ECU for other purposes provided in a moving body such as a vehicle on which the momentum estimation device is mounted. Good. Further, these various means may be implemented in a single ECU, or may be implemented in a distributed manner in a plurality of ECUs.

また、上記ECUの構成としては、例えば、上記各種手段によって行われる各種処理に相当する演算処理等を実行するための中央処理装置(CPU:Contral Processing Unit)(例えば、マイクロコンピュータ等)、例えば、上記演算処理等をCPUに実行させるためのプログラムや上記撮像手段からの画像信号等を格納するためのデータ記憶装置(例えば、RAM(Random Access Memory)、ROM(Read Only Memory)、HDD(Hard Disk Drive)等)、例えば、上記撮像手段からの画像信号等を受け取ったり、上記演算処理の結果を他の機器(例えば、表示装置等)に送出したりするためのデータ入出力ポート等を含む構成を挙げることができる。但し、本実施態様に係る運動量推定方法を使用する運動量推定装置が備える各種手段を実現する構成は上記説明によって限定されるものではなく、各々の手段の機能を実現することができる限り、如何なる構成であってもよい。   In addition, as a configuration of the ECU, for example, a central processing unit (CPU: Central Processing Unit) (for example, a microcomputer) for executing arithmetic processing corresponding to various processes performed by the various means, for example, A data storage device (for example, a RAM (Random Access Memory), a ROM (Read Only Memory), a HDD (Hard Disk) for storing a program for causing the CPU to execute the arithmetic processing and the like, an image signal from the imaging means, and the like. Drive) etc.), for example, a configuration including a data input / output port or the like for receiving an image signal or the like from the imaging means, or sending the result of the arithmetic processing to another device (for example, a display device or the like) Can be mentioned. However, the configuration for realizing various means included in the momentum estimation apparatus using the momentum estimation method according to the present embodiment is not limited by the above description, and any configuration as long as the function of each means can be realized. It may be.

前述のように、本実施態様に係る運動量推定方法は、撮像手段と、特徴点抽出手段と、オプティカルフロー算出手段と、基礎行列算出手段と、運動量算出手段と、三次元座標算出手段と、を備える運動量推定装置において、ステレオ視に基づく運動量推定を行うに当たり、従来技術のように個々の基礎行列の算出に用いるオプティカルフローを形成する特徴点(対応点)をランダム且つ無条件に選択するのではなく、個々のオプティカルフローの向きを考慮して、異なる向きを有するオプティカルフローを形成する特徴点を効率的にサンプリングして基礎行列の算出に用いることにより、演算負荷を軽減しつつ、カメラの運動量及び特徴点の三次元座標を高精度に算出する。   As described above, the momentum estimation method according to the present embodiment includes an imaging unit, a feature point extraction unit, an optical flow calculation unit, a basic matrix calculation unit, a momentum calculation unit, and a three-dimensional coordinate calculation unit. In the momentum estimation device provided, when performing momentum estimation based on stereo vision, the feature points (corresponding points) that form the optical flow used for calculation of each basic matrix are selected randomly and unconditionally as in the prior art. In addition, taking into account the direction of individual optical flows, the feature points that form optical flows with different orientations are efficiently sampled and used to calculate the basic matrix, thereby reducing the computational load and reducing the momentum of the camera. And the three-dimensional coordinates of the feature points are calculated with high accuracy.

具体的には、本実施態様に係る運動量推定方法によれば、特徴点選択ステップにおいて、特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択した後に、
選択されたn個の特徴点を、オプティカルフローの向きに基づいて予め定められたn個のグループに分けるグループ分けステップと、
前記n個のグループのうち、当該グループに属する特徴点が2個以上存在するグループについては、当該グループに属する2個以上の特徴点のうち1個のみを残して、その他の特徴点を削除する特徴点収束ステップと、
前記n個のグループのうち、当該グループに属する特徴点が存在しないグループについては、当該グループの数と同じ数の特徴点を改めて選択する特徴点再選択ステップと、
が、n個のグループの全てに特徴点が1個ずつ属する状態になるまで繰り返される。
Specifically, according to the momentum estimation method according to the present embodiment, after selecting a predetermined number n of feature points from a plurality of feature points extracted by the feature point extraction unit in the feature point selection step,
A grouping step for dividing the selected n feature points into predetermined n groups based on the direction of the optical flow;
Among the n groups, with respect to a group having two or more feature points belonging to the group, only one of the two or more feature points belonging to the group is left and the other feature points are deleted. A feature point convergence step;
A feature point reselecting step of selecting again the same number of feature points as the number of the groups of the n groups for which no feature points belong to the group,
Is repeated until one feature point belongs to all of the n groups.

上記グループ分けステップにおいては、選択されたn個の特徴点が、オプティカルフローの向きに基づいて予め定められたn個のグループに振り分けられる。オプティカルフローの向きに基づいて予め定められたn個のグループとは、例えば、個々の特徴点によって形成されるオプティカルフローの向きの角度の範囲に応じて分けられたn個(即ち、選択された特徴点の数と同じ数)のグループであってもよい。より具体的には、オプティカルフローの向きに基づいて予め定められたn個のグループは、例えば、撮像手段によって撮像された画像における水平方向をX軸方向、鉛直方向をY軸方向とするX−Y座標平面におけるX軸上での正の向きの角度が0°(ゼロ度)であり、且つ反時計回り方向を角度が増大する方向であると定義した場合、360°をn個の角度領域に分け、個々のオプティカルフローの向きの角度(以降、単に「θ」と表記する場合がある)が何れの角度領域に該当するかに応じて、特徴点をグループ分けすることができる。この場合、n個の角度領域は均等に分けられたものであってもよく、不均等に分けられたものであってもよい。また、個々の特徴点によって形成されるオプティカルフローの向きの角度(θ)は、個々の特徴点の第1の画像における座標と第2の画像における座標とから幾何学的に算出することができる。   In the grouping step, the selected n feature points are sorted into n groups determined in advance based on the direction of the optical flow. The n groups predetermined based on the direction of the optical flow are, for example, n groups (that is, selected according to the range of the angle of the direction of the optical flow formed by individual feature points). It may be a group of the same number as the number of feature points). More specifically, the n groups predetermined based on the direction of the optical flow are, for example, X− where the horizontal direction in the image captured by the imaging unit is the X axis direction and the vertical direction is the Y axis direction. When the angle of the positive direction on the X axis in the Y coordinate plane is 0 ° (zero degree) and the counterclockwise direction is defined as the direction in which the angle increases, 360 ° is defined as n angular regions. The feature points can be grouped according to which angle region the angle of the direction of each optical flow (hereinafter sometimes simply referred to as “θ”) corresponds. In this case, the n angle regions may be equally divided or may be unevenly divided. Further, the angle (θ) of the direction of the optical flow formed by the individual feature points can be geometrically calculated from the coordinates of the individual feature points in the first image and the coordinates in the second image. .

上記特徴点収束ステップにおいては、上記グループ分けステップにおいてn個の特徴点がn個のグループに振り分けられた結果、n個のグループのうち、当該グループに属する特徴点が2個以上存在するグループが存在する場合は、当該グループに属する2個以上の特徴点のうち1個のみを残して、その他の特徴点を削除することにより、当該グループに属する特徴点を1個に収束させる。この際、特徴点が2個以上属するグループにおいて残される1個の特徴点(以降、「代表特徴点」と称する場合がある)は、例えば、ランダム且つ無条件に選択することができる。   In the feature point convergence step, as a result of the n feature points being assigned to the n groups in the grouping step, among the n groups, there are groups in which two or more feature points belonging to the group exist. If it exists, only one of the two or more feature points belonging to the group remains, and the other feature points are deleted, so that the feature points belonging to the group converge to one. At this time, one feature point remaining in a group to which two or more feature points belong (hereinafter may be referred to as “representative feature points”) can be selected randomly and unconditionally, for example.

あるいは、2個以上の特徴点が振り分けられたグループに属する個々の特徴点によって形成されるオプティカルフローの向きの角度と当該グループに隣り合う2つのグループの代表特徴点によって形成されるオプティカルフローの向きの角度との差(角度差)をそれぞれ算出し、当該グループに隣り合う2つのグループの一方のグループの代表特徴点との角度差(d1)と他方のグループの代表特徴点との角度差(d2)とがより均等な(d1とd2との差がより小さい)特徴点を、当該グループの代表特徴点として選択することができる。   Or the angle of the direction of the optical flow formed by the individual feature points belonging to the group to which two or more feature points are distributed and the direction of the optical flow formed by the representative feature points of two groups adjacent to the group The angle difference (d1) between the representative feature point of one of the two groups adjacent to the group and the representative feature point of the other group (angle difference) is calculated. A feature point that is more equal to d2) (a difference between d1 and d2 is smaller) can be selected as a representative feature point of the group.

尚、上記説明における「隣り合うグループ」とは、それぞれのグループを定義付けるオプティカルフローの向きの角度領域が隣り合うグループを指す。例えば、360°を均等に45°ずつの角度領域に分け、個々の角度領域に対応する8個のグループとして、0〜45°の角度領域に対応するグループ1、45〜90°の角度領域に対応するグループ2、…、315〜360°の角度領域に対応するグループ8を設定する場合、グループ2に隣り合う2つのグループは、グループ1及びグループ3である。   The “adjacent group” in the above description refers to a group in which the angular areas of the optical flow directions defining the respective groups are adjacent. For example, 360 ° is equally divided into 45 ° angular regions, and eight groups corresponding to the individual angular regions are divided into group 1, 45 ° to 90 ° angular regions corresponding to 0 ° to 45 ° angular regions. When the group 8 corresponding to the corresponding group 2,..., 315 to 360 ° angle region is set, the two groups adjacent to the group 2 are the group 1 and the group 3.

上記特徴点再選択ステップにおいては、上記グループ分けステップにおいてn個の特徴点がn個のグループに振り分けられた結果、n個のグループのうち、当該グループに属する特徴点が存在しないグループについては、当該グループの数と同じ数の特徴点を改めて選択する。上記特徴点収束ステップの結果、当該グループに属する特徴点が存在する全てのグループには特徴点が1個ずつ存在するので、特徴点再選択ステップにおいて当該グループに属する特徴点が存在しないグループの数と同じ数の特徴点が補充されることにより、特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点が改めて選択された状態となる。   In the feature point reselection step, as a result of the n feature points being assigned to the n groups in the grouping step, among the n groups, the feature points belonging to the group do not exist. The same number of feature points as the number of the group is selected again. As a result of the feature point convergence step, there is one feature point in every group where the feature points belonging to the group exist, so the number of groups where no feature points belonging to the group exist in the feature point reselection step As a result, the predetermined number n of feature points are newly selected from the plurality of feature points extracted by the feature point extracting means.

前述のように、本実施態様に係る運動量推定方法によれば、特徴点選択ステップにおいて、上記グループ分けステップ、特徴点収束ステップ、及び特徴点再選択ステップが、n個のグループの全てに特徴点が1個ずつ属する状態になるまで繰り返される。これにより、種々の異なる向きを有するオプティカルフローを形成する特徴点を効率的にサンプリングして基礎行列の算出に用いることができる。その結果、個々の基礎行列の算出精度が高まり、移動体の運動量及び特徴点の三次元座標の算出精度も高まる。   As described above, according to the momentum estimation method according to the present embodiment, in the feature point selection step, the grouping step, the feature point convergence step, and the feature point reselection step include feature points in all n groups. Is repeated until one of them becomes a state. Thereby, it is possible to efficiently sample feature points forming optical flows having various different directions and use them for calculation of the basic matrix. As a result, the calculation accuracy of each basic matrix increases, and the calculation accuracy of the three-dimensional coordinates of the momentum of the moving object and the feature points also increases.

また、本実施態様に係る運動量推定方法によれば、基礎行列の算出に用いる特徴点を選択(サンプリング)する際に、個々のオプティカルフローの向きを考慮して、種々の異なる向きを有するオプティカルフローを形成する特徴点を積極的且つ効率的にサンプリングすることができる。これにより、例えば、特定の角度領域に該当する向きを有するオプティカルフローを形成する特徴点ばかりを偏ってサンプリングした等の理由により大きい誤差を示す基礎行列を算出する可能性を低減することができる。その結果、最適な基礎行列を算出するために必要とされる演算負荷を軽減することができる。   Further, according to the momentum estimation method according to the present embodiment, when selecting (sampling) the feature points used for calculation of the basic matrix, the optical flows having various different directions are considered in consideration of the directions of the individual optical flows. It is possible to positively and efficiently sample the feature points forming. As a result, for example, it is possible to reduce the possibility of calculating a basic matrix indicating a larger error because, for example, the feature points forming the optical flow having the direction corresponding to the specific angle region are sampled biased. As a result, it is possible to reduce the calculation load required for calculating the optimum basic matrix.

即ち、本実施態様に係る運動量推定方法によれば、単眼ステレオ視に基づく運動量推定を実施するに当たり、演算負荷を軽減しつつ、運動量及び三次元座標を高精度に算出する方法を提供するという、本発明の1つの目的を達成することができる。   That is, according to the momentum estimation method according to the present embodiment, it provides a method for calculating the momentum and the three-dimensional coordinates with high accuracy while reducing the calculation load when performing the momentum estimation based on monocular stereo vision. One object of the present invention can be achieved.

ところで、前述のように、上記基礎行列算出手段は、特徴点選択ステップにおいて、特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択する。この所定数nは、例えば、基礎行列の算出に用いるアルゴリズム等に応じて、任意の自然数に設定することができる。一方、基礎行列の算出には、例えば、公知のハートレーの8点アルゴリズムや、7点アルゴリズム、5点アルゴリズム等、当該技術分野において広く知られている種々の方法を用いることができる。   By the way, as described above, the basic matrix calculation means selects a predetermined number n of feature points from the plurality of feature points extracted by the feature point extraction means in the feature point selection step. The predetermined number n can be set to an arbitrary natural number according to, for example, an algorithm used for calculating the basic matrix. On the other hand, for calculation of the basic matrix, various methods widely known in the technical field such as the known Hartley 8-point algorithm, 7-point algorithm, and 5-point algorithm can be used.

上記のように、基礎行列の算出には種々のアルゴリズムを用いることができる。例えば、前述のハートレーの8点アルゴリズムのように、基礎行列の算出において8個の特徴点を使用するアルゴリズムを用いる場合は、上記所定数nは8となる。かかる実施態様もまた、本発明の1つの実施態様として、本発明の範囲に含まれる。   As described above, various algorithms can be used to calculate the basic matrix. For example, when using an algorithm that uses eight feature points in the calculation of the basic matrix, such as the Hartley 8-point algorithm described above, the predetermined number n is 8. Such an embodiment is also included in the scope of the present invention as one embodiment of the present invention.

従って、本発明の第2の実施態様は、
本発明の前記第1の実施態様に係る運動量推定方法であって、
前記所定数nが8である、
運動量推定方法である。
Accordingly, the second embodiment of the present invention provides:
A momentum estimation method according to the first embodiment of the present invention, comprising:
The predetermined number n is 8.
It is a momentum estimation method.

上記のように、本実施態様に係る運動量推定方法においては、前記所定数nが8である。即ち、本実施態様に係る運動量推定方法によれば、前述の特徴点選択ステップにおいて、特徴点抽出手段によって抽出された複数の特徴点から8個の特徴点が選択される。その後、グループ分けステップにおいて、選択された8個の特徴点は、オプティカルフローの向きに基づいて予め定められた8個のグループに分けられ、特徴点収束ステップにおいて、8個のグループのうち、当該グループに属する特徴点が2個以上存在するグループについては、当該グループに属する2個以上の特徴点のうち1個のみを残して、その他の特徴点が削除され、特徴点再選択ステップにおいて、8個のグループのうち、当該グループに属する特徴点が存在しないグループについては、当該グループの数と同じ数の特徴点が改めて選択される。これらのステップが繰り返し実行され、やがて8個のグループの全てに特徴点が1個ずつ属する状態となる。   As described above, in the momentum estimation method according to the present embodiment, the predetermined number n is 8. That is, according to the momentum estimation method according to the present embodiment, eight feature points are selected from the plurality of feature points extracted by the feature point extraction means in the feature point selection step described above. Thereafter, in the grouping step, the selected eight feature points are divided into eight groups predetermined based on the direction of the optical flow, and in the feature point convergence step, among the eight groups, For a group having two or more feature points belonging to a group, only one of the two or more feature points belonging to the group is left, and other feature points are deleted. Among the groups, for a group in which no feature point belonging to the group exists, the same number of feature points as the number of the group is selected again. These steps are repeatedly executed, and eventually one feature point belongs to all eight groups.

上記のようにして8個の特徴点が選択(サンプリング)されると、前述の基礎行列算出ステップにおいて、選択された8個の特徴点に基づいて基礎行列が算出される。この際、基礎行列の算出には、例えば、前述のハートレーの8点アルゴリズムのように、8個の特徴点を基礎行列の算出に用いるアルゴリズムが用いられる。   When eight feature points are selected (sampled) as described above, a basic matrix is calculated based on the selected eight feature points in the basic matrix calculation step described above. At this time, for the calculation of the basic matrix, for example, an algorithm that uses eight feature points for calculation of the basic matrix, such as the aforementioned Hartley 8-point algorithm, is used.

ところで、本発明は、前述のように、これまで説明してきた各種実施態様及びそれらの変形例を含む種々の運動量推定方法を使用する運動量推定装置にも関する。そこで、かかる運動量推定装置としての本発明の実施態様について以下に述べるが、運動量推定方法としての本発明の前述の実施態様について説明と重複するので、運動量推定装置としての本発明の実施態様についての詳細な説明は割愛する。   By the way, as described above, the present invention also relates to a momentum estimation apparatus that uses various momentum estimation methods including the various embodiments described above and modifications thereof. Therefore, an embodiment of the present invention as such a momentum estimation apparatus will be described below. However, since it overlaps with the description of the above-described embodiment of the present invention as a momentum estimation method, the embodiment of the present invention as a momentum estimation apparatus will be described. Detailed explanation is omitted.

即ち、本発明の第3の実施態様は、
移動体に搭載されて所定の領域を撮像する撮像手段と、
前記撮像手段が第1の位置及び第1の姿勢にあるときに撮像された第1の画像から、複数の特徴点を抽出する特徴点抽出手段と、
前記特徴点抽出手段によって前記第1の画像から抽出された前記特徴点の各々に対応する点を、前記撮像手段が前記第1の位置及び第1の姿勢とは異なる第2の位置及び第2の姿勢にあるときに撮像された第2の画像から検索し、特徴点の移動状態を表すオプティカルフローを算出するオプティカルフロー算出手段と、
前記特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択する特徴点選択ステップと、選択されたn個の特徴点に基づいて基礎行列を算出する基礎行列算出ステップと、算出された基礎行列に基づいて、前記特徴点抽出手段によって抽出された全ての特徴点についてのエピポーラ誤差を算出する誤差算出ステップと、を所定回数Nだけ繰り返し、斯くして得られたN個の基礎行列のうち最も小さいエピポーラ誤差を示す基礎行列を最適基礎行列として選択する基礎行列算出手段と、
前記基礎行列算出手段によって算出された前記最適基礎行列から、オプティカルフローによって得られる、特徴点に対応する点、及び前記撮像手段の内部パラメータに基づいて、前記撮像手段の運動量を算出することにより、前記移動体の運動量を算出する運動量算出手段と、
前記運動量算出手段によって算出された前記撮像手段の運動量に基づいて、個々の特徴点の三次元座標を算出する三次元座標算出手段と、
を備える運動量推定装置において、
前記特徴点選択ステップにおいて、前記特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択した後に、
選択されたn個の特徴点を、オプティカルフローの向きに基づいて予め定められたn個のグループに分けるグループ分けステップと、
前記n個のグループのうち、当該グループに属する特徴点が2個以上存在するグループについては、当該グループに属する2個以上の特徴点のうち1個のみを残して、その他の特徴点を削除する特徴点収束ステップと、
前記n個のグループのうち、当該グループに属する特徴点が存在しないグループについては、当該グループの数と同じ数の特徴点を改めて選択する特徴点再選択ステップと、
を、前記n個のグループの全てに特徴点が1個ずつ属する状態になるまで繰り返す、
運動量推定装置である。
That is, the third embodiment of the present invention
An imaging means mounted on the moving body for imaging a predetermined area;
Feature point extracting means for extracting a plurality of feature points from a first image picked up when the image pickup means is in a first position and a first posture;
A point corresponding to each of the feature points extracted from the first image by the feature point extraction unit is a second position and a second point where the imaging unit is different from the first position and the first posture. An optical flow calculating unit that searches the second image captured when the posture is in the position and calculates an optical flow that represents a moving state of the feature point;
A feature point selection step of selecting a predetermined number n of feature points from the plurality of feature points extracted by the feature point extraction means; and a base matrix calculation step of calculating a base matrix based on the selected n feature points; An error calculation step of calculating epipolar errors for all feature points extracted by the feature point extraction means based on the calculated basic matrix, and repeating the predetermined N times, N A basic matrix calculation means for selecting a basic matrix indicating the smallest epipolar error among the basic matrices of as an optimal basic matrix;
By calculating the momentum of the imaging means based on the points corresponding to the feature points obtained by the optical flow from the optimal basic matrix calculated by the basic matrix calculation means and the internal parameters of the imaging means, A momentum calculating means for calculating the momentum of the moving body;
Three-dimensional coordinate calculation means for calculating three-dimensional coordinates of individual feature points based on the momentum of the imaging means calculated by the momentum calculation means;
In the momentum estimation device comprising:
In the feature point selection step, after selecting a predetermined number n of feature points from the plurality of feature points extracted by the feature point extraction means,
A grouping step for dividing the selected n feature points into predetermined n groups based on the direction of the optical flow;
Among the n groups, with respect to a group having two or more feature points belonging to the group, only one of the two or more feature points belonging to the group is left and the other feature points are deleted. A feature point convergence step;
A feature point reselecting step of selecting again the same number of feature points as the number of the groups of the n groups for which no feature points belong to the group,
Is repeated until one feature point belongs to each of the n groups.
It is a momentum estimation device.

また、本発明の第4の実施態様は、
本発明の前記第3の実施態様に係る運動量推定装置であって、
前記所定数nが8である、
運動量推定装置である。
The fourth embodiment of the present invention is
A momentum estimation apparatus according to the third embodiment of the present invention,
The predetermined number n is 8.
It is a momentum estimation device.

本発明の幾つかの実施態様に係る運動量推定方法の構成等につき、添付図面等を参照しつつ以下に説明する。但し、以下に述べる説明はあくまでも例示を目的とするものであり、本発明の範囲が以下の説明に限定されるものと解釈されるべきではない。   The configuration and the like of the momentum estimation method according to some embodiments of the present invention will be described below with reference to the accompanying drawings. However, the following description is for illustrative purposes only, and the scope of the present invention should not be construed as being limited to the following description.

1.運動量推定方法において実行される種々の処理の流れ(概要)
図1は、前述のように、本発明の1つの実施態様に係る運動量推定方法において実行される種々の処理の流れの概要を表すフローチャートである。図1に示すように、本実施例に係る運動量推定方法は、
車両等の移動体に搭載された撮像手段(例えば、カメラ等)によって所定の領域を撮像し、撮像された画像を取り込む画像取込ステップ(S100)と、
前記撮像手段が第1の位置及び第1の姿勢にあるときに撮像された第1の画像から、複数の特徴点を抽出する特徴点抽出ステップ(S200)と、
前記特徴点抽出ステップ(S200)において前記第1の画像から抽出された前記特徴点の各々に対応する点を、前記撮像手段が前記第1の位置及び第1の姿勢とは異なる第2の位置及び第2の姿勢にあるときに撮像された第2の画像から検索し、特徴点の移動状態を表すオプティカルフローを算出するオプティカルフロー算出ステップ(S300)と、
前記特徴点抽出ステップ(S200)において抽出された複数の特徴点から所定数nの特徴点を選択し、選択されたn個の特徴点に基づいて基礎行列を算出する基礎行列算出ステップ(S400)と、
前記基礎行列算出ステップ(S400)において算出された基礎行列から、オプティカルフローによって得られる対応点(特徴点に対応する点)及び撮像手段の内部パラメータに基づいて、前記撮像手段の運動量を算出することにより、移動体の運動量を算出する運動量算出ステップ(S500)と、
前記運動量算出ステップ(S500)において算出された撮像手段の運動量に基づいて、個々の特徴点の三次元座標を算出する三次元座標算出ステップ(S600)と、
を含む。
1. Flow of various processes executed in the momentum estimation method (outline)
FIG. 1 is a flowchart showing an overview of the flow of various processes executed in the method of estimating the momentum according to one embodiment of the present invention as described above. As shown in FIG. 1, the momentum estimation method according to the present embodiment is
An image capturing step (S100) for capturing a predetermined area by an imaging means (for example, a camera) mounted on a moving body such as a vehicle and capturing the captured image;
A feature point extracting step (S200) for extracting a plurality of feature points from a first image captured when the imaging means is in the first position and the first posture;
A point corresponding to each of the feature points extracted from the first image in the feature point extraction step (S200) is a second position where the imaging means is different from the first position and the first posture. And an optical flow calculating step (S300) for searching from the second image captured when in the second posture and calculating an optical flow representing the moving state of the feature point;
A basic matrix calculation step (S400) in which a predetermined number n of feature points are selected from the plurality of feature points extracted in the feature point extraction step (S200), and a basic matrix is calculated based on the selected n feature points. When,
From the basic matrix calculated in the basic matrix calculation step (S400), the momentum of the imaging means is calculated based on corresponding points (points corresponding to feature points) obtained by optical flow and internal parameters of the imaging means. From the momentum calculation step (S500) for calculating the momentum of the moving body,
A three-dimensional coordinate calculating step (S600) for calculating three-dimensional coordinates of individual feature points based on the momentum of the imaging means calculated in the momentum calculating step (S500);
including.

上記画像取込ステップ(S100)においては、前述のように、例えば、CCD(Charge Coupled Device)カメラ等の撮像手段を車両等の移動体に搭載して、例えば移動体の前方等の所定の領域の複数の画像を撮像する。撮像された画像は、例えば、A/D(アナログ/デジタル)変換された画像信号として、画像メモリ等のデータ記憶手段に格納することができる。尚、上記撮像手段は、例えば、時々刻々と変化する移動体周辺の状況を撮影する。従って、上記撮像手段は、例えば、所定のフレームレート(単位時間当たりに撮影する枚数)で画像を撮像するタイプのもの(例えば、動画撮像手段等)であってもよい。   In the image capturing step (S100), as described above, for example, an imaging unit such as a CCD (Charge Coupled Device) camera is mounted on a moving body such as a vehicle, and a predetermined area such as the front of the moving body, for example. A plurality of images are taken. The captured image can be stored in a data storage unit such as an image memory, for example, as an A / D (analog / digital) converted image signal. In addition, the said imaging means image | photographs the condition of the moving body periphery which changes every moment, for example. Therefore, the imaging unit may be of a type that captures an image at a predetermined frame rate (the number of images captured per unit time) (for example, a moving image capturing unit).

上記特徴点抽出ステップ(S200)においては、上記画像取込ステップ(S100)において取り込まれた画像のうち、第1の位置及び第1の姿勢にあるときに撮像された第1の画像から、例えばコーナーやエッジ等の複数の特徴点を抽出する。前述のように、特徴点の抽出には、例えば、ハリス(Harris)オペレータやSUSANオペレータを使用することができる。   In the feature point extraction step (S200), from among the images captured in the image capture step (S100), from the first image captured when in the first position and the first posture, for example, A plurality of feature points such as corners and edges are extracted. As described above, for example, a Harris operator or a SUSAN operator can be used to extract feature points.

上記オプティカルフロー算出ステップ(S300)においては、上記特徴点抽出ステップ(S200)において抽出された特徴点の移動状態を表すオプティカルフローを、上記画像取込ステップ(S100)において取り込まれた画像のうち、第2の位置及び第2の姿勢にあるときに撮像された第2の画像を用いて算出する。前述のように、オプティカルフローの算出には、例えばLucas−Kanade法等の勾配法やブロックマッチング法を使用することができる。   In the optical flow calculation step (S300), the optical flow representing the movement state of the feature points extracted in the feature point extraction step (S200) is selected from the images captured in the image capture step (S100). It calculates using the 2nd image imaged when it exists in a 2nd position and a 2nd attitude | position. As described above, a gradient method such as the Lucas-Kanade method or a block matching method can be used for calculating the optical flow.

上記基礎行列算出ステップ(S400)においては、上記特徴点抽出ステップ(S200)において抽出された複数の特徴点から所定数nの特徴点を選択し、選択されたn個の特徴点に基づいて基礎行列を算出する。本実施例に係る運動量推定方法は、上記特徴点の選択手法に特徴を有するものであるが、詳細については後述する。また、前述のように、基礎行列の算出には、例えば、公知のハートレーの8点アルゴリズムや、7点アルゴリズム、5点アルゴリズム等を使用することができる。更に、前述のように、本実施例に係る運動量推定方法においては、基礎行列の算出精度を向上させることを目的として、例えばエピポーラ誤差を評価量とするRANSAC手法を用いて、基礎行列の算出における外れ値(アウトライア)の影響を低減して、基礎行列の算出精度を向上させることができる。本実施例に係る運動量推定方法における基礎行列の算出精度の向上についても、後に詳述する。   In the basic matrix calculation step (S400), a predetermined number n of feature points are selected from the plurality of feature points extracted in the feature point extraction step (S200), and the basis is based on the selected n feature points. Calculate the matrix. The momentum estimation method according to the present embodiment has a feature in the feature point selection method, and details will be described later. As described above, for example, the known Hartley 8-point algorithm, 7-point algorithm, and 5-point algorithm can be used to calculate the basic matrix. Furthermore, as described above, in the momentum estimation method according to the present embodiment, for the purpose of improving the calculation accuracy of the basic matrix, for example, in the calculation of the basic matrix using the RANSAC method with the epipolar error as the evaluation amount. It is possible to reduce the influence of outliers (outliers) and improve the calculation accuracy of the basic matrix. The improvement of the calculation accuracy of the basic matrix in the momentum estimation method according to the present embodiment will also be described in detail later.

上記運動量算出ステップ(S500)においては、上記基礎行列算出ステップ(S400)において算出された基礎行列から、オプティカルフローによって得られる対応点(特徴点に対応する点)及び撮像手段の内部パラメータ(例えば、撮像手段が備えるレンズの焦点距離、画角、光軸点等)に基づいて、撮像手段の運動量を算出する。前述のように、撮像手段は移動体に搭載されているので、撮像手段の運動量を算出することにより、移動体の運動量を算出することができる。   In the momentum calculating step (S500), corresponding points (points corresponding to feature points) obtained by optical flow from the basic matrix calculated in the basic matrix calculating step (S400) and internal parameters of the imaging means (for example, The momentum of the imaging means is calculated based on the focal length, angle of view, optical axis point, etc. of the lens provided in the imaging means. As described above, since the imaging unit is mounted on the moving body, the momentum of the moving body can be calculated by calculating the momentum of the imaging unit.

上記三次元座標算出ステップ(S600)においては、上記運動量算出ステップ(S500)において算出された撮像手段の運動量に基づいて、個々の特徴点の三次元座標を算出する。このようにして、本実施例に係る運動量推定方法によれば、車両等の移動体に搭載された撮像手段(例えば、単眼カメラ等)によって移動体の周辺の画像を撮像することにより、移動体の周辺の環境を三次元的に認識することができる。   In the three-dimensional coordinate calculation step (S600), the three-dimensional coordinates of the individual feature points are calculated based on the momentum of the imaging means calculated in the momentum calculation step (S500). Thus, according to the momentum estimation method according to the present embodiment, the moving body is obtained by capturing an image around the moving body with an imaging unit (for example, a monocular camera) mounted on the moving body such as a vehicle. The surrounding environment can be recognized in three dimensions.

本実施例に係る運動量推定方法においては、上述のように、RANSAC手法を用いて基礎行列の算出精度を向上させたり、基礎行列の算出に用いる特徴点のサンプリング手法に工夫を凝らして基礎行列の算出に必要とされる演算負荷を軽減したりしている。そこで、本実施例に係る運動量推定方法における、これらの特徴につき、以下に説明する。   In the momentum estimation method according to the present embodiment, as described above, the RANSAC method is used to improve the calculation accuracy of the basic matrix, and the feature point sampling method used for calculating the basic matrix is devised to improve the basic matrix calculation. The calculation load required for the calculation is reduced. Therefore, these features in the method for estimating momentum according to the present embodiment will be described below.

2.エピポーラ誤差を評価量とするRANSAC手法による基礎行列の算出精度の向上
図2は、前述のように、図1に示すフローチャートに含まれる基礎行列算出ステップ(S400)において実行される種々の処理の流れを表すフローチャートである。図2に示すように、本実施例に係る運動量推定方法の基礎行列算出ステップ(S400)においては、前述の特徴点選択ステップ(S410)、基礎行列算出ステップ(S420)、及び誤差算出ステップ(S430)が所定回数Nだけ繰り返され、その後、最適基礎行列選択ステップ(S440)において、斯くして得られたN個の基礎行列のうち最も小さいエピポーラ誤差を示す基礎行列が最適基礎行列として選択される。
2. 2. Improvement of calculation accuracy of basic matrix by RANSAC method using epipolar error as evaluation quantity FIG. 2 is a flow of various processes executed in the basic matrix calculation step (S400) included in the flowchart shown in FIG. It is a flowchart showing. As shown in FIG. 2, in the basic matrix calculation step (S400) of the momentum estimation method according to the present embodiment, the above-mentioned feature point selection step (S410), basic matrix calculation step (S420), and error calculation step (S430). ) Is repeated a predetermined number of times N, and then, in the optimal basic matrix selection step (S440), the basic matrix indicating the smallest epipolar error among the N basic matrices thus obtained is selected as the optimal basic matrix. .

上記により、例えば、前述のオプティカルフロー算出ステップ(S300)において、特徴点抽出手段によって第1の画像から抽出された特徴点の各々に対応する点(対応点)を、撮像手段が第1の位置及び第1の姿勢とは異なる第2の位置及び第2の姿勢にあるときに撮像された第2の画像から検索する際に、誤った点を検出した場合等、一部の対応点に大きい誤差が存在する場合に、かかる外れ値(アウトライア)の影響を排除し、基礎行列の算出精度を向上させることができる。即ち、基礎行列算出ステップ(S400)において実行される特徴点選択ステップ(S410)、基礎行列算出ステップ(S420)、及び誤差算出ステップ(S430)、及び最適基礎行列選択ステップ(S440)による一連の処理の流れは、エピポーラ誤差を評価量とするRANSAC手法に該当し、最適な基礎行列の算出精度を向上させることができる。   As described above, for example, in the above-described optical flow calculation step (S300), the imaging unit sets the points corresponding to each of the feature points extracted from the first image by the feature point extraction unit (corresponding points) at the first position. And when searching from the second image captured when the second position and the second posture are different from the first posture, it is large for some corresponding points, such as when an erroneous point is detected. When there is an error, the influence of such outliers (outliers) can be eliminated, and the calculation accuracy of the basic matrix can be improved. That is, a series of processes by the feature point selection step (S410), the basic matrix calculation step (S420), the error calculation step (S430), and the optimum basic matrix selection step (S440) executed in the basic matrix calculation step (S400). This flow corresponds to the RANSAC method using an epipolar error as an evaluation amount, and can improve the calculation accuracy of the optimum basic matrix.

次に、本実施例に係る運動量推定方法において基礎行列の算出に用いる特徴点のサンプリング手法に工夫を凝らして基礎行列の算出に必要とされる演算負荷を軽減している一連の処理の流れにつき、以下に説明する。   Next, in the momentum estimation method according to this embodiment, the feature point sampling method used for calculation of the basic matrix is devised to reduce the calculation load required for calculation of the basic matrix. This will be described below.

3.エピポーラ誤差を評価量とするRANSAC手法による基礎行列の算出精度の向上
図3は、前述のように、図2に示すフローチャートに含まれる特徴点選択ステップ(S410)において実行される種々の処理の流れを表すフローチャートである。図3に示すように、本実施例に係る運動量推定方法の基礎行列算出ステップ(S400)に含まれる特徴点選択ステップ(S410)においては、ステップS411において、前述の特徴点抽出ステップ(S200)において抽出された複数の特徴点から、所定数nの特徴点が選択される。所定数nは、前述のように、例えば、基礎行列の算出に用いるアルゴリズム等に応じて、任意の自然数に設定することができる。本実施例においては、所定数nが8であるものとして説明する。
3. 3. Improvement of basic matrix calculation accuracy by RANSAC method using epipolar error as evaluation quantity FIG. 3 shows the flow of various processes executed in the feature point selection step (S410) included in the flowchart shown in FIG. It is a flowchart showing. As shown in FIG. 3, in the feature point selection step (S410) included in the basic matrix calculation step (S400) of the momentum estimation method according to the present embodiment, in the above-described feature point extraction step (S200) in step S411. A predetermined number n of feature points are selected from the extracted feature points. As described above, the predetermined number n can be set to an arbitrary natural number according to, for example, an algorithm used for calculating the basic matrix. In the present embodiment, description will be made assuming that the predetermined number n is 8.

次に、グループ分けステップ(S412)において、選択された8個(n個)の特徴点が、オプティカルフローの向きに基づいて予め定められた8個(n個)のグループに分けられる。ここで、オプティカルフローの向きに基づいて予め定められた8個(n個)のグループとは、前述のように、個々の特徴点によって形成されるオプティカルフローの向きの角度の範囲に応じて分けられたn個(本実施例においては8個)のグループである。本実施例においては、これら8個のグループは、撮像手段によって撮像された画像における水平方向をX軸方向、鉛直方向をY軸方向とするX−Y座標平面におけるX軸上での正の向きの角度が0°(ゼロ度)であり、且つ反時計回り方向を角度が増大する方向であると定義した場合、360°を8個の角度領域に分けることによって設定した。   Next, in the grouping step (S412), the selected eight (n) feature points are divided into eight (n) groups predetermined based on the direction of the optical flow. Here, the eight (n) groups predetermined based on the direction of the optical flow are divided according to the range of the angle of the direction of the optical flow formed by the individual feature points as described above. N groups (eight in this embodiment). In the present embodiment, these eight groups are positive orientations on the X-axis in the XY coordinate plane in which the horizontal direction in the image captured by the imaging unit is the X-axis direction and the vertical direction is the Y-axis direction. When the angle is defined as 0 ° (zero degree) and the counterclockwise direction is defined as the direction in which the angle increases, 360 ° is set by dividing it into eight angle regions.

即ち、本実施例においては、360°を均等に45°ずつの角度領域に分け、個々の角度領域に対応する8個のグループを設定した。結果として、本実施例においては、グループ1の角度領域は0〜45°、グループ2の角度領域は45〜90°、…、グループ8の角度領域は315〜360°となるように8個のグループを分けた。但し、本実施例においては8個のグループを均等な角度領域を有するように分けたが、前述のように、個々のグループを不均等に分けてもよい。   That is, in this embodiment, 360 ° is equally divided into 45 ° angular regions, and eight groups corresponding to the individual angular regions are set. As a result, in this embodiment, the angle region of group 1 is 0 to 45 °, the angle region of group 2 is 45 to 90 °,..., And the angle region of group 8 is 315 to 360 °. Divided the group. However, in the present embodiment, the eight groups are divided so as to have an equal angle region, but as described above, the individual groups may be divided unevenly.

また、個々の特徴点によって形成されるオプティカルフローの向きの角度(θ)は、前述のように、個々の特徴点の第1の画像における座標と第2の画像における座標とから、幾何学的に算出することができる。より詳しくは、撮像手段が第1の位置及び第1の姿勢にあるときに撮像された第1の画像における特徴点p1の座標を(u1,v1)とし、撮像手段が第1の位置及び第1の姿勢とは異なる第2の位置及び第2の姿勢にあるときに撮像された第2の画像における前記特徴点p1に対応する点p2の座標を(u2,v2)とする。この場合、特徴点p1によって形成されるオプティカルフローの向きの角度(θ)は、例えば、以下の式によって算出することができる。   Further, as described above, the angle (θ) of the direction of the optical flow formed by the individual feature points is calculated from the coordinates of the first feature image and the second image of the feature points. Can be calculated. More specifically, the coordinates of the feature point p1 in the first image captured when the imaging unit is in the first position and the first posture are (u1, v1), and the imaging unit is in the first position and the first position. Let (u2, v2) be the coordinates of the point p2 corresponding to the feature point p1 in the second image captured at the second position and the second posture different from the first posture. In this case, the angle (θ) of the direction of the optical flow formed by the feature point p1 can be calculated by the following equation, for example.

Figure 2013104660
Figure 2013104660

当該グループ分けステップ(S412)においては、上記のようにして算出されたオプティカルフローの向きの角度(θ)に基づいて、ステップS411において選択された8個の特徴点の各々が、上述の8個のグループ1乃至8に分類される。その結果、8個の特徴点が8個のグループの各々に1個ずつ配分される可能性もあるが、8個のグループの中の何れかに複数(即ち、2個以上)の特徴点が配分され、結果として特徴点が1個も配分されない空のグループが生ずる可能性もある。しかしながら、本発明は、前述のように、個々の基礎行列の算出に用いるオプティカルフローを形成する特徴点(対応点)を選択する際に、従来技術のように個々の基礎行列の算出に用いるオプティカルフローを形成する特徴点をランダム且つ無条件に選択するのではなく、個々のオプティカルフローの向きを考慮して、異なる向きを有するオプティカルフローを形成する特徴点を効率的にサンプリングして基礎行列の算出に用いることにより、演算負荷を軽減しつつ、カメラの運動量及び特徴点の三次元座標を高精度に算出しようとするものである。   In the grouping step (S412), each of the eight feature points selected in step S411 is based on the optical flow direction angle (θ) calculated as described above. Are classified into groups 1 to 8. As a result, eight feature points may be allocated to each of the eight groups, but a plurality of (ie, two or more) feature points are present in any of the eight groups. It is possible that an empty group will be allocated, resulting in no feature points being allocated. However, according to the present invention, as described above, when selecting feature points (corresponding points) forming an optical flow used for calculation of each basic matrix, the optical used for calculation of each basic matrix as in the prior art is selected. Rather than randomly and unconditionally selecting the feature points forming the flow, the feature points forming the optical flows having different orientations are efficiently sampled in consideration of the direction of the individual optical flows, and the base matrix By using it for calculation, it is intended to calculate the momentum of the camera and the three-dimensional coordinates of the feature points with high accuracy while reducing the calculation load.

従って、本実施例に係る運動量推定方法においては、8個のグループの中に、複数の特徴点が属するグループが存在するか否かを確認する(ステップS413)。複数の特徴点が属するグループが存在する場合(ステップS413:Yes)、特徴点収束ステップ(S415)において、かかるグループに属する複数の特徴点のうち1個だけを残し、その他の特徴点を削除する。この際、特徴点が2個以上属するグループにおいて残される1個の特徴点(代表特徴点)は、前述のように、例えば、ランダム且つ無条件に選択したり、あるいは、当該グループに隣り合う2つのグループの代表特徴点との角度差がより均等な特徴点を選択したりすることによって決定することができる。   Therefore, in the momentum estimation method according to the present embodiment, it is confirmed whether or not a group to which a plurality of feature points belongs is present among the eight groups (step S413). When there is a group to which a plurality of feature points belong (step S413: Yes), in the feature point convergence step (S415), only one of the plurality of feature points belonging to the group is left and the other feature points are deleted. . At this time, one feature point (representative feature point) remaining in a group to which two or more feature points belong is selected, for example, randomly and unconditionally, or 2 adjacent to the group. It can be determined by selecting a feature point having a more uniform angular difference from the representative feature points of two groups.

一方、本実施例に係る運動量推定方法においては、特徴点が1個も属していない空のグループが存在するか否かについても確認する(ステップS414)。特徴点が1個も属していない空のグループが存在する場合(ステップS415:Yes)、特徴点再選択ステップ(S416)において、空のグループの数と同じ数の特徴点が改めて選択される。これにより、8個の特徴点が改めて選択された状態となるので、グループ分けステップ(S412)に戻り、上述の各ステップが繰り返される。   On the other hand, in the momentum estimation method according to the present embodiment, it is also checked whether or not there is an empty group to which no feature point belongs (step S414). If there is an empty group to which no feature point belongs (step S415: Yes), the same number of feature points as the number of empty groups is selected again in the feature point reselecting step (S416). As a result, since eight feature points are selected again, the process returns to the grouping step (S412) and the above steps are repeated.

一方、特徴点が1個も属していない空のグループが存在しない場合(ステップS415:No)は、8個のグループの全てに特徴点が1個ずつ属する状態になっていることを意味する。従って、本実施例に係る運動量推定方法においては、次の基礎行列算出ステップ(S420)に処理が移る。   On the other hand, when there is no empty group to which no feature point belongs (step S415: No), it means that one feature point belongs to all eight groups. Therefore, in the momentum estimation method according to the present embodiment, the process proceeds to the next basic matrix calculation step (S420).

上述のように、本実施例に係る運動量推定方法によれば、特徴点選択ステップ(S410)において、上記グループ分けステップ(S412)、特徴点収束ステップ(S415)、及び特徴点再選択ステップ(S416)が、8個のグループの全てに特徴点が1個ずつ属する状態になるまで繰り返される。これにより、種々の異なる向きを有するオプティカルフローを形成する特徴点を効率的にサンプリングして基礎行列の算出に用いることができる。その結果、本実施例に係る運動量推定方法によれば、個々の基礎行列の算出精度が高まり、移動体の運動量及び特徴点の三次元座標の算出精度も高まる。   As described above, according to the momentum estimation method according to the present embodiment, in the feature point selection step (S410), the grouping step (S412), the feature point convergence step (S415), and the feature point reselection step (S416). ) Is repeated until one feature point belongs to all eight groups. Thereby, it is possible to efficiently sample feature points forming optical flows having various different directions and use them for calculation of the basic matrix. As a result, according to the momentum estimation method according to the present embodiment, the calculation accuracy of each basic matrix is increased, and the momentum of the moving body and the calculation accuracy of the three-dimensional coordinates of the feature points are also increased.

以上、本発明を説明することを目的として、特定の構成を有する幾つかの実施態様について説明してきたが、本発明の範囲は、これらの例示的な実施態様に限定されるものではなく、特許請求の範囲及び明細書に記載された事項の範囲内で、適宜修正を加えることができることは言うまでも無い。   Although several embodiments having specific configurations have been described above for the purpose of illustrating the present invention, the scope of the present invention is not limited to these exemplary embodiments, and patents Needless to say, modifications can be made as appropriate within the scope of the claims and the description of the specification.

Claims (4)

移動体に搭載されて所定の領域を撮像する撮像手段と、
前記撮像手段が第1の位置及び第1の姿勢にあるときに撮像された第1の画像から、複数の特徴点を抽出する特徴点抽出手段と、
前記特徴点抽出手段によって前記第1の画像から抽出された前記特徴点の各々に対応する点を、前記撮像手段が前記第1の位置及び第1の姿勢とは異なる第2の位置及び第2の姿勢にあるときに撮像された第2の画像から検索し、特徴点の移動状態を表すオプティカルフローを算出するオプティカルフロー算出手段と、
前記特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択する特徴点選択ステップと、選択されたn個の特徴点に基づいて基礎行列を算出する基礎行列算出ステップと、算出された基礎行列に基づいて、前記特徴点抽出手段によって抽出された全ての特徴点についてのエピポーラ誤差を算出する誤差算出ステップと、を所定回数Nだけ繰り返し、斯くして得られたN個の基礎行列のうち最も小さいエピポーラ誤差を示す基礎行列を最適基礎行列として選択する基礎行列算出手段と、
前記基礎行列算出手段によって算出された前記最適基礎行列から、オプティカルフローによって得られる、特徴点に対応する点、及び前記撮像手段の内部パラメータに基づいて、前記撮像手段の運動量を算出することにより、前記移動体の運動量を算出する運動量算出手段と、
前記運動量算出手段によって算出された前記撮像手段の運動量に基づいて、個々の特徴点の三次元座標を算出する三次元座標算出手段と、
を備える運動量推定装置において、
前記特徴点選択ステップにおいて、前記特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択した後に、
選択されたn個の特徴点を、オプティカルフローの向きに基づいて予め定められたn個のグループに分けるグループ分けステップと、
前記n個のグループのうち、当該グループに属する特徴点が2個以上存在するグループについては、当該グループに属する2個以上の特徴点のうち1個のみを残して、その他の特徴点を削除する特徴点収束ステップと、
前記n個のグループのうち、当該グループに属する特徴点が存在しないグループについては、当該グループの数と同じ数の特徴点を改めて選択する特徴点再選択ステップと、
を、前記n個のグループの全てに特徴点が1個ずつ属する状態になるまで繰り返す、
運動量推定方法。
An imaging means mounted on the moving body for imaging a predetermined area;
Feature point extracting means for extracting a plurality of feature points from a first image picked up when the image pickup means is in a first position and a first posture;
A point corresponding to each of the feature points extracted from the first image by the feature point extraction unit is a second position and a second point where the imaging unit is different from the first position and the first posture. An optical flow calculating unit that searches the second image captured when the posture is in the position and calculates an optical flow that represents a moving state of the feature point;
A feature point selection step of selecting a predetermined number n of feature points from the plurality of feature points extracted by the feature point extraction means; and a base matrix calculation step of calculating a base matrix based on the selected n feature points; An error calculation step of calculating epipolar errors for all feature points extracted by the feature point extraction means based on the calculated basic matrix, and repeating the predetermined N times, N A basic matrix calculation means for selecting a basic matrix indicating the smallest epipolar error among the basic matrices of as an optimal basic matrix;
By calculating the momentum of the imaging means based on the points corresponding to the feature points obtained by the optical flow from the optimal basic matrix calculated by the basic matrix calculation means and the internal parameters of the imaging means, A momentum calculating means for calculating the momentum of the moving body;
Three-dimensional coordinate calculation means for calculating three-dimensional coordinates of individual feature points based on the momentum of the imaging means calculated by the momentum calculation means;
In the momentum estimation device comprising:
In the feature point selection step, after selecting a predetermined number n of feature points from the plurality of feature points extracted by the feature point extraction means,
A grouping step for dividing the selected n feature points into predetermined n groups based on the direction of the optical flow;
Among the n groups, with respect to a group having two or more feature points belonging to the group, only one of the two or more feature points belonging to the group is left and the other feature points are deleted. A feature point convergence step;
A feature point reselecting step of selecting again the same number of feature points as the number of the groups of the n groups for which no feature points belong to the group,
Is repeated until one feature point belongs to each of the n groups.
The momentum estimation method.
請求項1に記載の運動量推定方法であって、
前記所定数nが8である、
運動量推定方法。
The momentum estimation method according to claim 1,
The predetermined number n is 8.
The momentum estimation method.
移動体に搭載されて所定の領域を撮像する撮像手段と、
前記撮像手段が第1の位置及び第1の姿勢にあるときに撮像された第1の画像から、複数の特徴点を抽出する特徴点抽出手段と、
前記特徴点抽出手段によって前記第1の画像から抽出された前記特徴点の各々に対応する点を、前記撮像手段が前記第1の位置及び第1の姿勢とは異なる第2の位置及び第2の姿勢にあるときに撮像された第2の画像から検索し、特徴点の移動状態を表すオプティカルフローを算出するオプティカルフロー算出手段と、
前記特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択する特徴点選択ステップと、選択されたn個の特徴点に基づいて基礎行列を算出する基礎行列算出ステップと、算出された基礎行列に基づいて、前記特徴点抽出手段によって抽出された全ての特徴点についてのエピポーラ誤差を算出する誤差算出ステップと、を所定回数Nだけ繰り返し、斯くして得られたN個の基礎行列のうち最も小さいエピポーラ誤差を示す基礎行列を最適基礎行列として選択する基礎行列算出手段と、
前記基礎行列算出手段によって算出された前記最適基礎行列から、オプティカルフローによって得られる、特徴点に対応する点、及び前記撮像手段の内部パラメータに基づいて、前記撮像手段の運動量を算出することにより、前記移動体の運動量を算出する運動量算出手段と、
前記運動量算出手段によって算出された前記撮像手段の運動量に基づいて、個々の特徴点の三次元座標を算出する三次元座標算出手段と、
を備える運動量推定装置において、
前記特徴点選択ステップにおいて、前記特徴点抽出手段によって抽出された複数の特徴点から所定数nの特徴点を選択した後に、
選択されたn個の特徴点を、オプティカルフローの向きに基づいて予め定められたn個のグループに分けるグループ分けステップと、
前記n個のグループのうち、当該グループに属する特徴点が2個以上存在するグループについては、当該グループに属する2個以上の特徴点のうち1個のみを残して、その他の特徴点を削除する特徴点収束ステップと、
前記n個のグループのうち、当該グループに属する特徴点が存在しないグループについては、当該グループの数と同じ数の特徴点を改めて選択する特徴点再選択ステップと、
を、前記n個のグループの全てに特徴点が1個ずつ属する状態になるまで繰り返す、
運動量推定装置。
An imaging means mounted on the moving body for imaging a predetermined area;
Feature point extracting means for extracting a plurality of feature points from a first image picked up when the image pickup means is in a first position and a first posture;
A point corresponding to each of the feature points extracted from the first image by the feature point extraction unit is a second position and a second point where the imaging unit is different from the first position and the first posture. An optical flow calculating unit that searches the second image captured when the posture is in the position and calculates an optical flow that represents a moving state of the feature point;
A feature point selection step of selecting a predetermined number n of feature points from the plurality of feature points extracted by the feature point extraction means; and a base matrix calculation step of calculating a base matrix based on the selected n feature points; An error calculation step of calculating epipolar errors for all feature points extracted by the feature point extraction means based on the calculated basic matrix, and repeating the predetermined N times, N A basic matrix calculation means for selecting a basic matrix indicating the smallest epipolar error among the basic matrices of as an optimal basic matrix;
By calculating the momentum of the imaging means based on the points corresponding to the feature points obtained by the optical flow from the optimal basic matrix calculated by the basic matrix calculation means and the internal parameters of the imaging means, A momentum calculating means for calculating the momentum of the moving body;
Three-dimensional coordinate calculation means for calculating three-dimensional coordinates of individual feature points based on the momentum of the imaging means calculated by the momentum calculation means;
In the momentum estimation device comprising:
In the feature point selection step, after selecting a predetermined number n of feature points from the plurality of feature points extracted by the feature point extraction means,
A grouping step for dividing the selected n feature points into predetermined n groups based on the direction of the optical flow;
Among the n groups, with respect to a group having two or more feature points belonging to the group, only one of the two or more feature points belonging to the group is left and the other feature points are deleted. A feature point convergence step;
A feature point reselecting step of selecting again the same number of feature points as the number of the groups of the n groups for which no feature points belong to the group,
Is repeated until one feature point belongs to each of the n groups.
Momentum estimation device.
請求項3に記載の運動量推定装置であって、
前記所定数nが8である、
運動量推定装置。
The momentum estimation apparatus according to claim 3,
The predetermined number n is 8.
Momentum estimation device.
JP2011246161A 2011-11-10 2011-11-10 Momentum estimation method based on stereo vision using monocular camera image and momentum estimation device using the same Pending JP2013104660A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011246161A JP2013104660A (en) 2011-11-10 2011-11-10 Momentum estimation method based on stereo vision using monocular camera image and momentum estimation device using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011246161A JP2013104660A (en) 2011-11-10 2011-11-10 Momentum estimation method based on stereo vision using monocular camera image and momentum estimation device using the same

Publications (1)

Publication Number Publication Date
JP2013104660A true JP2013104660A (en) 2013-05-30

Family

ID=48624330

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011246161A Pending JP2013104660A (en) 2011-11-10 2011-11-10 Momentum estimation method based on stereo vision using monocular camera image and momentum estimation device using the same

Country Status (1)

Country Link
JP (1) JP2013104660A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016038288A (en) * 2014-08-07 2016-03-22 日産自動車株式会社 Self position calculation device and self position calculation method
JP2017174105A (en) * 2016-03-23 2017-09-28 Kddi株式会社 Geometric verification device and program
CN112665577A (en) * 2020-12-29 2021-04-16 北京电子工程总体研究所 Monocular vision target positioning method and system based on inverse perspective transformation matrix

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016038288A (en) * 2014-08-07 2016-03-22 日産自動車株式会社 Self position calculation device and self position calculation method
JP2017174105A (en) * 2016-03-23 2017-09-28 Kddi株式会社 Geometric verification device and program
CN112665577A (en) * 2020-12-29 2021-04-16 北京电子工程总体研究所 Monocular vision target positioning method and system based on inverse perspective transformation matrix

Similar Documents

Publication Publication Date Title
JP5430456B2 (en) Geometric feature extraction device, geometric feature extraction method, program, three-dimensional measurement device, object recognition device
JP4943034B2 (en) Stereo image processing device
JP5671281B2 (en) Position / orientation measuring apparatus, control method and program for position / orientation measuring apparatus
JP3735344B2 (en) Calibration apparatus, calibration method, and calibration program
EP3258441B1 (en) Template creation device and template creation method
JP4814669B2 (en) 3D coordinate acquisition device
JP4940461B2 (en) 3D object recognition apparatus and 3D object recognition method
Orghidan et al. Camera calibration using two or three vanishing points
JP2008506953A5 (en)
CN109472820B (en) Monocular RGB-D camera real-time face reconstruction method and device
CN111612728B (en) 3D point cloud densification method and device based on binocular RGB image
JP6968342B2 (en) Object recognition processing device, object recognition processing method and program
CN110926330B (en) Image processing apparatus, image processing method, and program
WO2017051480A1 (en) Image processing device and image processing method
JP5439277B2 (en) Position / orientation measuring apparatus and position / orientation measuring program
CN109781003B (en) Method for determining next optimal measurement pose of structured light vision system
WO2022209435A1 (en) Computer program, model generation method, estimation method and estimation device
JP2013104660A (en) Momentum estimation method based on stereo vision using monocular camera image and momentum estimation device using the same
JP2018195070A (en) Information processing apparatus, information processing method, and program
CN112508885B (en) Method and system for detecting three-dimensional central axis of bent pipe
CN111127613B (en) Image sequence three-dimensional reconstruction method and system based on scanning electron microscope
JP5976089B2 (en) Position / orientation measuring apparatus, position / orientation measuring method, and program
JP2019211981A (en) Information processor, information processor controlling method and program
JP6080424B2 (en) Corresponding point search device, program thereof, and camera parameter estimation device
US9378555B2 (en) Enhanced outlier removal for 8 point algorithm used in camera motion estimation