JP5152144B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP5152144B2
JP5152144B2 JP2009233622A JP2009233622A JP5152144B2 JP 5152144 B2 JP5152144 B2 JP 5152144B2 JP 2009233622 A JP2009233622 A JP 2009233622A JP 2009233622 A JP2009233622 A JP 2009233622A JP 5152144 B2 JP5152144 B2 JP 5152144B2
Authority
JP
Japan
Prior art keywords
feature point
extended focus
point
calculated
optical flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2009233622A
Other languages
Japanese (ja)
Other versions
JP2011081613A (en
Inventor
育郎 佐藤
博彦 柳川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Denso IT Laboratory Inc
Original Assignee
Denso Corp
Denso IT Laboratory Inc
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 Denso Corp, Denso IT Laboratory Inc filed Critical Denso Corp
Priority to JP2009233622A priority Critical patent/JP5152144B2/en
Publication of JP2011081613A publication Critical patent/JP2011081613A/en
Application granted granted Critical
Publication of JP5152144B2 publication Critical patent/JP5152144B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Description

本発明は、移動体に搭載されたビデオカメラなどの撮像装置が撮影した画像を処理する画像処理装置に関する。   The present invention relates to an image processing apparatus that processes an image captured by an imaging apparatus such as a video camera mounted on a moving body.

例えば自動車などの移動体にビデオカメラを搭載し、そのビデオカメラからの時々刻々と変化する画像を処理することにより、その画像中における移動物体を検出する装置が種々提案されている。   For example, various apparatuses for detecting a moving object in an image by mounting a video camera on a moving body such as an automobile and processing an image changing from the video camera every moment have been proposed.

例えば特許文献1に記載の装置では、まず、直進運動を行なう観測系が持つTVカメラ画像の時間変化を解析することにより、局所領域単位の動きであるオプティカルフローを抽出する。このオプティカルフローを直線の方程式に変換し、これらを連立して解くことにより、観測系の直進運動の方向の投影点であるFOE(拡張焦点:Focus of Expansion)位置を求め、記憶する。そして、記憶されているFOE位置に対する、現時点のFOE位置との時間的位置変化を解析して、この時間的位置変化が所定の変化量以上のときに、移動物体が存在すると判断する。   For example, in the apparatus described in Patent Document 1, first, an optical flow that is a motion in units of local regions is extracted by analyzing a time change of a TV camera image included in an observation system that performs a straight-ahead motion. By converting this optical flow into a linear equation and solving these simultaneously, the FOE (Focus of Expansion) position, which is the projection point in the direction of the linear motion of the observation system, is obtained and stored. Then, the temporal position change of the stored FOE position with the current FOE position is analyzed, and when the temporal position change is equal to or greater than a predetermined change amount, it is determined that a moving object exists.

特開平8−194822号公報JP-A-8-194822

上述した特許文献1の装置では、記憶しているFOE位置の算出時には移動物体が存在しないことを前提としている。しかしながら、例えば自動車などの移動体にビデオカメラを搭載した場合には、必ずしも移動物体が存在しない状況が出現するとは限らない。   In the apparatus of Patent Document 1 described above, it is assumed that there is no moving object when calculating the stored FOE position. However, for example, when a video camera is mounted on a moving body such as an automobile, a situation where a moving object does not always exist does not always appear.

ここで、特許文献1の装置では、単に、画像の局所領域単位の動きであるオプティカルフローをそれぞれ抽出して、それらオプティカルフローの交点であるFOE位置をLU分解法、特異点分解法等の計算手法により求めているだけである。このため、画像中に移動物体が含まれていたり、一部の静止物体に関して、静止物体ではあっても抽出されるオプティカルフローの誤差が大きかったりする場合には、精度良くFOE位置を求めることができない。移動物体の検出精度は、FOE位置の精度に依存するため、FOE位置精度が十分ではないと、移動物体の検出精度も低下することになる。   Here, the apparatus of Patent Document 1 simply extracts optical flows that are motions in units of local regions of an image, and calculates the FOE position that is the intersection of these optical flows by LU decomposition method, singular point decomposition method, or the like. It is only determined by the method. For this reason, when a moving object is included in an image or an error of an extracted optical flow is large even if it is a stationary object for some stationary objects, the FOE position can be obtained with high accuracy. Can not. Since the detection accuracy of the moving object depends on the accuracy of the FOE position, if the FOE position accuracy is not sufficient, the detection accuracy of the moving object also decreases.

本発明は、上述した点に鑑みてなされたものであり、FOEの位置を高精度に求めることが可能な画像処理装置を提供することを目的とする。   SUMMARY An advantage of some aspects of the invention is that it provides an image processing apparatus capable of obtaining the position of an FOE with high accuracy.

上記目的を達成するために、請求項1に記載の画像処理装置は、
移動体に搭載され、定期的に画像を撮像して出力する画像出力手段と、
画像出力手段により撮像された画像における、特徴点を複数抽出する特徴点抽出部と、
画像出力手段から時系列に出力された複数の画像における、同一特徴点の変化から、複数の特徴点のオプティカルフローをそれぞれ算出するオプティカルフロー算出部と、
オプティカルフロー算出部によって算出された複数のオプティカルフローを延長した交点である拡張焦点を算出する拡張焦点算出部と、
前記拡張焦点算出部によって算出された拡張焦点を用いて、前記特徴点が移動点であるか静止点であるかを判定する判定部と、を備え、
拡張焦点算出部は、複数の特徴点に関して、拡張焦点から特徴点の座標へ向かう線分と、当該特徴点のオプティカルフローとがなす角度を誤差として、各特徴点の誤差の総和を評価する評価関数を算出し、当該評価関数を用いて、誤差の総和が小さくなるように拡張焦点を定めるものであり、各特徴点の誤差から評価関数を算出する際に、拡張焦点から特徴点の座標へ向かう線分と特徴点のオプティカルフローとがなす角度が大きくなるほど、評価関数に対する当該特徴点の誤差の影響度合を低減する重み係数を用いることを特徴とする。
In order to achieve the above object, an image processing apparatus according to claim 1 is provided.
An image output means mounted on a moving body and periodically capturing and outputting an image;
A feature point extraction unit for extracting a plurality of feature points in the image captured by the image output means;
An optical flow calculator for calculating optical flows of a plurality of feature points from changes in the same feature points in a plurality of images output in time series from the image output means;
An extended focus calculation unit that calculates an extended focus that is an intersection obtained by extending a plurality of optical flows calculated by the optical flow calculation unit;
A determination unit that determines whether the feature point is a moving point or a stationary point by using the extended focus calculated by the extended focus calculation unit;
The extended focus calculation unit evaluates the sum of errors of each feature point with respect to a plurality of feature points, using an angle formed by a line segment from the extended focus to the coordinates of the feature point and the optical flow of the feature point as an error. A function is calculated and the extended focus is determined by using the evaluation function so that the sum of errors is reduced. When calculating the evaluation function from the error of each feature point, the extended focus is changed to the coordinate of the feature point. A weighting factor that reduces the degree of influence of the error of the feature point on the evaluation function is used as the angle formed by the line segment and the optical flow of the feature point increases.

上述したように、請求項1に記載の画像処理装置では、拡張焦点から特徴点の座標へ向かう線分と特徴点のオプティカルフローとがなす角度が大きくなるほど、評価関数に対する当該特徴点の誤差の影響度合を低減する重み係数を用いて、各特徴点の誤差から評価関数を算出し、このようにして算出された評価関数を用いて、誤差の総和が小さくなるように拡張焦点を定める。   As described above, in the image processing apparatus according to claim 1, as the angle formed by the line segment from the extended focus to the feature point coordinates and the optical flow of the feature point increases, the error of the feature point with respect to the evaluation function decreases. An evaluation function is calculated from the error of each feature point using a weighting factor that reduces the degree of influence, and an extended focus is determined using the evaluation function calculated in this way so that the total error is reduced.

移動点のオプティカルフローや、静止点のオプティカルフローであっても誤差が大きい場合には、そのオプティカルフローと、拡張焦点から各特徴点へ向かう線分とがなす角度は相対的に大きくなる。このようなオプティカルフローを持った特徴点に関しては、上述した重み係数により、評価関数を算出する際に、その特徴点の誤差の影響度合が低減される。換言すれば、重み係数を用いつつ評価関数を算出することにより、拡張焦点から特徴点へ向かう線分との角度差が小さいオプティカルフローを有する特徴点の誤差をより重視して、誤差の総和を評価する評価関数を算出することができる。   If the optical flow at the moving point or the optical flow at the stationary point has a large error, the angle formed by the optical flow and the line segment from the extended focus to each feature point is relatively large. Regarding the feature point having such an optical flow, when the evaluation function is calculated by the above-described weighting factor, the influence degree of the error of the feature point is reduced. In other words, by calculating the evaluation function using the weighting factor, the error sum of the feature points having an optical flow with a small angle difference from the line segment from the extended focus to the feature point is more important and the sum of the errors is calculated. An evaluation function to be evaluated can be calculated.

従って、画像中に移動点のオプティカルフローが含まれていたり、一部の静止点のオプティカルフローの誤差が大きかったりしても、それらの影響を低減して、主に、精度良く算出された静止点のオプティカルフローから拡張焦点の位置を定めることができる。この結果、拡張焦点の位置を高精度に求めることができる。   Therefore, even if the optical flow of the moving point is included in the image or the error of the optical flow of some stationary points is large, those effects are reduced, and the stationary The position of the extended focus can be determined from the optical flow of the points. As a result, the position of the extended focus can be obtained with high accuracy.

請求項2に記載したように、拡張焦点算出部は、判定部によって各特徴点が移動点であるか静止点であるかが判定されている場合、静止点と判定された特徴点のみを用いて、各特徴点の誤差の総和を評価する評価関数を算出するようにしても良い。このように、特徴点として、静止点のみを対象として評価関数を算出することにより、相対的に小さい誤差のみを用い、さらにその中でもより小さい誤差を重視して評価関数を算出することができる。従って、この評価関数を用いて、より精度良く拡張焦点の位置を定めることができる。   As described in claim 2, when the determination unit determines whether each feature point is a moving point or a stationary point, the extended focus calculation unit uses only the feature point determined to be a stationary point. Thus, an evaluation function for evaluating the sum of errors of the feature points may be calculated. As described above, by calculating the evaluation function for only the stationary point as the feature point, it is possible to calculate the evaluation function by using only a relatively small error and emphasizing a smaller error among them. Therefore, the position of the extended focus can be determined with higher accuracy using this evaluation function.

請求項3に記載したように、拡張焦点算出部は、以下の数式1によって表される評価関数Eを用い、この評価関数Eが最小となる拡張焦点Fを最小二乗法により求めることができる。   As described in claim 3, the extended focus calculation unit can use the evaluation function E represented by the following formula 1 to obtain the extended focus F at which the evaluation function E is minimized by the least square method.

Figure 0005152144
Figure 0005152144

数式1において、|Vi∧(Pi−F)|は、オプティカルフローViと、拡張焦点Fから特徴点Piへ向かう線分(Pi−F)との外積の値を示している。外積の値は、オプティカルフローViと拡張焦点Fから特徴点Piへ向かう線分(Pi−F)とのなす角度が大きくなるほど、大きくなる。従って、重み係数Wiを用いて、角度の小さい外積の値を重視しつつ評価関数Eを算出し、この評価関数Eが最小値となるように拡張焦点Fの位置を定めることにより、各静止点のオプティカルフローに合致した拡張焦点Fの位置を求めることができる。   In Equation 1, | Vi∧ (Pi−F) | represents the value of the outer product of the optical flow Vi and the line segment (Pi−F) from the extended focus F to the feature point Pi. The value of the outer product increases as the angle between the optical flow Vi and the line segment (Pi-F) from the extended focus F toward the feature point Pi increases. Therefore, the evaluation function E is calculated using the weight coefficient Wi while placing importance on the value of the outer product with a small angle, and the position of the extended focus F is determined so that the evaluation function E becomes the minimum value. The position of the extended focal point F that matches the optical flow can be obtained.

請求項4に記載したように、拡張焦点算出部は、各特徴点Piの重み係数Wiの初期値を、過去に算出された拡張焦点Fprevを用いて算出される外積値Riを利用して、以下の数式2のように定め、重み係数Wiの初期値を用いて評価関数Eが最小となる拡張焦点Fが求められたら、外積値Riにおける過去に算出された拡張焦点Fprevを、求めた拡張焦点Fで置換することにより、各特徴点の重み係数Wiを更新し、更新した重み係数Wiを用いて評価関数Eが最小となる拡張焦点Fを求めるとの手順を繰り返すことで、拡張焦点Fの変動が所定範囲に収まるようになると、そのときの拡張焦点Fを今回の拡張焦点Fと定めることが好ましい。   As described in claim 4, the extended focus calculation unit uses the outer product value Ri calculated using the extended focus Fprev calculated in the past as the initial value of the weighting factor Wi of each feature point Pi, When the extended focus F that minimizes the evaluation function E is determined using the initial value of the weighting factor Wi, as shown in Equation 2, the extended focus Fprev calculated in the past at the outer product value Ri is calculated. By replacing the focal point F, the weighting factor Wi of each feature point is updated, and the procedure of obtaining the extended focal point F that minimizes the evaluation function E using the updated weighting factor Wi is repeated, thereby expanding the focal point F. When the fluctuation in the range falls within a predetermined range, it is preferable that the extended focus F at that time is determined as the current extended focus F.

Figure 0005152144
Figure 0005152144

今回の拡張焦点の位置は、過去(前回)に算出した拡張焦点Fprevの近傍に存在すると仮定することができる。そこで、重み係数Wiの初期値を、オプティカルフローViと、過去に算出された拡張焦点Fprevから特徴点Piへ向かう線分(Pi−Fprev)との外積値Riを利用して定める。なお、Roは、予め実験等により定める定数である。これにより、誤差の大きい特徴点Piほど、重みが小さくなるように、重み係数Wiを定めることができる。逆に、誤差が小さい特徴点Piほど、1を上限として重みが大きくなるように、重み係数Wiを定めることができる。すなわち、上述した数式2によって重み係数Wiを算出した場合、重み係数Wiは、誤差がゼロであって外積値Riがゼロとなるときの1を最大値として、誤差が大きくなるにつれて単調減少する。従って、各特徴点Piの誤差の大きさに適切に対応した重み係数Wiを算出することができる。   It can be assumed that the position of the extended focus this time is in the vicinity of the extended focus Fprev calculated in the past (previous). Therefore, the initial value of the weighting factor Wi is determined using the outer product value Ri of the optical flow Vi and the line segment (Pi-Fprev) from the extended focus Fprev calculated in the past to the feature point Pi. Note that Ro is a constant determined in advance by experiments or the like. Thus, the weighting factor Wi can be determined so that the feature point Pi having a larger error has a smaller weight. On the contrary, the weighting factor Wi can be determined so that the feature point Pi with a smaller error has a larger weight with 1 being the upper limit. That is, when the weighting factor Wi is calculated by the above-described equation 2, the weighting factor Wi monotonously decreases as the error increases, with 1 being the maximum value when the error is zero and the outer product value Ri is zero. Accordingly, it is possible to calculate the weighting factor Wi that appropriately corresponds to the magnitude of the error of each feature point Pi.

さらに、数式2を用いて重み係数Wiを算出することにより、拡張焦点Fから各特徴点Piまでの距離差の影響が、評価関数Eに反映されることを抑制することができる。つまり、評価関数Eを算出する際の、オプティカルフローViと、拡張焦点Fから特徴点Piへ向かう線分(Pi−F)との外積値は、それらがなす角度のみによらず、オプティカルフローViの長さや、拡張焦点Fから特徴点Piへ向かう線分(Pi−F)の長さの影響を受ける。オプティカルフローViの長さや、拡張焦点Fから特徴点Piへ向かう線分(Pi−F)の長さは、各特徴点と拡張焦点との距離など応じて相違する。従って、重み係数Wiの初期値を、オプティカルフローViと、過去に算出された拡張焦点Fprevから特徴点Piへ向かう線分(Pi−F)との外積値Riを利用して数式2のように定めることにより、各特徴点Piについて、オプティカルフローViと、拡張焦点Fから特徴点Piに向かう線分(Pi−F)とがなす角度θiを誤差として、誤差の総和を評価する評価関数Eを算出する際に、各特徴点Piと拡張焦点Fとの距離差の影響を低減することができる。   Furthermore, by calculating the weighting coefficient Wi using Equation 2, it is possible to suppress the influence of the distance difference from the extended focus F to each feature point Pi from being reflected in the evaluation function E. That is, the outer product value of the optical flow Vi and the line segment (Pi-F) from the extended focus F to the feature point Pi when calculating the evaluation function E is not limited to the angle formed by the optical flow Vi. And the length of the line segment (Pi-F) from the extended focus F to the feature point Pi. The length of the optical flow Vi and the length of the line segment (Pi-F) from the extended focus F to the feature point Pi differ depending on the distance between each feature point and the extension focus. Therefore, the initial value of the weighting factor Wi is expressed as in Equation 2 using the outer product value Ri of the optical flow Vi and the line segment (Pi-F) from the extended focus Fprev calculated in the past to the feature point Pi. By defining, for each feature point Pi, an evaluation function E for evaluating the total sum of errors with an angle θi formed by the optical flow Vi and a line segment (Pi−F) from the extended focus F to the feature point Pi as an error is defined. When calculating, the influence of the distance difference between each feature point Pi and the extended focus F can be reduced.

そして、重み係数Wiの初期値を用いて評価関数Eが最小となる拡張焦点Fが求められたら、重み係数Wiを算出するための外積値Riにおける過去に算出された拡張焦点Fprevを、求めた拡張焦点Fで置換することにより、各特徴点の重み係数Wiを更新する。さらに、更新した重み係数Wiを用いて評価関数Eが最小となる拡張焦点Fを求めるとの手順を、拡張焦点Fの変動が所定範囲に収まるようになるまで繰り返す。これにより、拡張焦点の位置をより高精度に求めることができる。   When the extended focus F that minimizes the evaluation function E is obtained using the initial value of the weight coefficient Wi, the extended focus Fprev calculated in the past in the outer product value Ri for calculating the weight coefficient Wi is obtained. By replacing with the extended focus F, the weight coefficient Wi of each feature point is updated. Further, the procedure of obtaining the extended focus F that minimizes the evaluation function E using the updated weighting factor Wi is repeated until the variation of the extended focus F falls within a predetermined range. Thereby, the position of the extended focus can be obtained with higher accuracy.

なお、重み係数Wiは、上述した数式2に従って算出されるものに限られず、例えば、請求項5に記載したように、以下の数式3に従って算出されても良い。   Note that the weighting factor Wi is not limited to the one calculated according to the above-described equation 2, and may be calculated according to the following equation 3, for example, as described in claim 5.

Figure 0005152144
Figure 0005152144

数式3によれば、重み係数Wiの初期値が、オプティカルフローViと、過去に算出された拡張焦点Fprevから特徴点Piへ向かう線分(Pi−Fprev)との外積の逆数として定められる。そして、数式2の場合と同様に、重み係数Wiの初期値を用いて評価関数Eが最小となる拡張焦点Fが求められたら、数式3の重み係数Wiにおける過去に算出された拡張焦点Fprevを、求めた拡張焦点Fで置換することにより、各特徴点の重み係数Wiを更新する。さらに、更新した重み係数Wiを用いて評価関数Eが最小となる拡張焦点Fを求めるとの手順を、拡張焦点Fの変動が所定範囲に収まるようになるまで繰り返す。   According to Equation 3, the initial value of the weighting factor Wi is determined as the reciprocal of the outer product of the optical flow Vi and the line segment (Pi-Fprev) from the extended focus Fprev calculated in the past to the feature point Pi. Similarly to the case of Expression 2, when the extended focus F that minimizes the evaluation function E is obtained using the initial value of the weight coefficient Wi, the extended focus Fprev calculated in the past in the weight coefficient Wi of Expression 3 is obtained. Then, the weight coefficient Wi of each feature point is updated by replacing with the obtained extended focus F. Further, the procedure of obtaining the extended focus F that minimizes the evaluation function E using the updated weighting factor Wi is repeated until the variation of the extended focus F falls within a predetermined range.

上記の数式3に従って重み係数Wiを算出した場合も、誤差の大きい特徴点ほど、重みが小さくなるように、重み係数Wiを定めることができる。ただし、誤差が極めて小さくなったときに、重み係数Wiが極大化するので、求めるべき拡張焦点位置の不安定化を招きやすいとのデメリットはあるが、数式2に比較して、重み係数Wiを算出するための演算を簡略化することができる。   Even when the weighting factor Wi is calculated according to the above Equation 3, the weighting factor Wi can be determined such that the feature point having the larger error has a smaller weight. However, since the weighting factor Wi is maximized when the error becomes extremely small, there is a demerit that it is easy to cause instability of the extended focal position to be obtained. The calculation for calculating can be simplified.

なお、数式3に従って重み係数Wiを算出する場合、求めるべき拡張焦点位置の不安定化を抑制するために、請求項6に記載したように、重み係数Wiが、所定の上限値以上の大きさとなったとき、その上限値を重み係数Wiとして用いることが好ましい。これにより、誤差が極めて小さくなったとき、重み係数Wiが過剰に大きくなることを防止することができる。   Note that when the weighting factor Wi is calculated according to Equation 3, in order to suppress the destabilization of the extended focal position to be obtained, the weighting factor Wi has a magnitude greater than or equal to a predetermined upper limit as described in claim 6. When this happens, the upper limit value is preferably used as the weighting factor Wi. Thereby, when the error becomes extremely small, it is possible to prevent the weight coefficient Wi from becoming excessively large.

請求項7に記載したように、判定部は、拡張焦点から特徴点の座標へ向かう線分と、当該特徴点のオプティカルフローとがなす角度が第1判定角度以下である場合に、その特徴点を静止点であると判定することができる。静止点のオプティカルフローは、拡張焦点位置に投影されるものであるため、精度の高い拡張焦点位置を求めることができれば、拡張焦点から特徴点の座標へ向かう線分と、当該特徴点のオプティカルフローとがなす角度が第1判定角度以下との簡単な判定処理により、静止点であることを判定できる。   As described in claim 7, when the angle formed by the line segment from the extended focus to the coordinates of the feature point and the optical flow of the feature point is equal to or less than the first determination angle, the determination unit Can be determined to be a stationary point. Since the optical flow of the stationary point is projected onto the extended focus position, if the extended focus position with high accuracy can be obtained, the line segment from the extended focus to the coordinate of the feature point and the optical flow of the feature point are displayed. It is possible to determine that the point is a stationary point by a simple determination process in which the angle between and is equal to or less than the first determination angle.

ただし、請求項8に記載したように、判定部は、拡張焦点算出部によって拡張焦点が算出されるごとに、拡張焦点から特徴点の座標へ向かう線分と、当該特徴点のオプティカルフローとがなす角度と第1判定角度との比較を行い、その角度が第1判定角度以下との判定が複数回連続して成立した場合に、その特徴点を静止点と判定するようにしても良い。これにより、静止点に関する判定精度を高めることができる。   However, as described in claim 8, each time the extended focus is calculated by the extended focus calculation unit, the determination unit calculates a line segment from the extended focus to the feature point coordinates and the optical flow of the feature point. The angle formed may be compared with the first determination angle, and when the determination that the angle is equal to or less than the first determination angle is continuously made a plurality of times, the feature point may be determined as a stationary point. Thereby, the determination precision regarding a stationary point can be raised.

また、請求項9に記載したように、判定部は、拡張焦点から特徴点の座標へ向かう線分と、当該特徴点のオプティカルフローとがなす角度が第2判定角度より大きい場合に、その特徴点を移動点であると判定することができる。拡張焦点から特徴点の座標へ向かう線分の向きとは異なるオプティカルフローを示すのは、移動点に限られ、精度の高い拡張焦点位置を求めることができれば、拡張焦点から特徴点の座標へ向かう線分と、当該特徴点のオプティカルフローとがなす角度が第2判定角度以上との簡単な判定処理により、移動点であることを判定できる。   According to a ninth aspect of the present invention, when the angle formed by the line segment from the extended focus to the coordinate of the feature point and the optical flow of the feature point is larger than the second determination angle, the determination unit It can be determined that the point is a moving point. The optical flow that is different from the direction of the line segment from the extended focus to the feature point coordinates is limited to the moving point, and if a highly accurate extended focus position can be obtained, the extension focus moves to the feature point coordinates. It can be determined that the point is a moving point by a simple determination process in which the angle formed by the line segment and the optical flow of the feature point is equal to or greater than the second determination angle.

請求項10に記載したように、判定部は、拡張焦点算出部によって拡張焦点が算出されるごとに、拡張焦点から特徴点の座標へ向かう線分と、当該特徴点のオプティカルフローとがなす角度と第2判定角度との比較を行い、その角度が第2判定角度より大きいとの判定が複数回連続して成立した場合に、その特徴点を移動点と判定するようにしても良い。これにより、移動点に関する判定精度を高めることができる。   As described in claim 10, each time the extended focus is calculated by the extended focus calculator, the determination unit is an angle formed by a line segment from the extended focus to the coordinates of the feature point and the optical flow of the feature point. And the second determination angle may be compared, and if it is determined that the angle is larger than the second determination angle continuously for a plurality of times, the feature point may be determined as the moving point. Thereby, the determination precision regarding a moving point can be improved.

請求項11に記載したように、拡張焦点算出部は、今回算出された拡張焦点と過去に算出された拡張焦点とを平均処理して、最終的な拡張焦点を求めても良い。これにより、拡張焦点の位置の変動を抑えて、安定化された拡張焦点位置を求めることができる。   As described in the eleventh aspect, the extended focus calculation unit may obtain the final extended focus by averaging the extended focus calculated this time and the extended focus calculated in the past. Accordingly, it is possible to obtain a stabilized extended focus position while suppressing fluctuations in the position of the extended focus.

本発明の実施形態による画像処理装置の構成を示す構成図である。It is a block diagram which shows the structure of the image processing apparatus by embodiment of this invention. 画像処理装置において実行される各種の機能を説明するためのフロー図である。It is a flowchart for demonstrating the various functions performed in an image processing apparatus. 本実施形態による画像処理装置において、移動物体の検出手法の概要を説明するための説明図である。It is explanatory drawing for demonstrating the outline | summary of the detection method of a moving object in the image processing apparatus by this embodiment. Ri/Roの変化に対する重み係数Wiの変化を示したグラフである。It is the graph which showed the change of the weighting coefficient Wi with respect to the change of Ri / Ro. 本実施形態による画像処理装置において算出されるFOE位置の誤差と、本実施形態における重み係数Wiを用いずに算出したFOE位置の誤差とを対比して示すグラフである。5 is a graph showing an FOE position error calculated in the image processing apparatus according to the present embodiment and an FOE position error calculated without using the weighting coefficient Wi in the present embodiment.

以下、本発明の実施形態による画像処理装置について、図面に基づいて詳細に説明する。本実施形態による画像処理装置は、移動体に搭載され、移動体とともに移動する撮像装置が撮影した画像を処理することにより、画像に移動物体が含まれているか否かを判定して移動物体の検知を行なうものである。なお、本実施形態では、画像処理装置が、自動車に搭載された例について説明する。   Hereinafter, an image processing apparatus according to an embodiment of the present invention will be described in detail with reference to the drawings. The image processing apparatus according to the present embodiment is mounted on a moving body and processes an image captured by an imaging apparatus that moves together with the moving body, thereby determining whether the moving object is included in the image and determining the moving object. Detection is performed. In the present embodiment, an example in which the image processing apparatus is mounted on an automobile will be described.

図1に示すように、画像処理装置100は、撮像装置としてのビデオカメラ10、及びこのビデオカメラ10によって撮影された画像を処理する画像処理ECU20とを備えている。   As shown in FIG. 1, the image processing apparatus 100 includes a video camera 10 as an imaging apparatus and an image processing ECU 20 that processes an image taken by the video camera 10.

ビデオカメラ10は、例えば、CCDカメラによって構成され、自動車の前方を撮影するように、自動車の運転席近傍の天井付近に設置される。なお、ビデオカメラ10を、車両の後方を撮影するように車室内に取り付けて、自動車が後退するときに、自動車の後方画像を撮影するようにしても良い。このビデオカメラ10は、定期的に画像を撮影して、その撮影した画像を画像処理ECU20に出力する。   The video camera 10 is constituted by, for example, a CCD camera, and is installed near the ceiling near the driver's seat of the automobile so as to photograph the front of the automobile. Note that the video camera 10 may be mounted in the vehicle interior so as to capture the rear of the vehicle, and a rear image of the vehicle may be captured when the vehicle moves backward. The video camera 10 periodically captures images and outputs the captured images to the image processing ECU 20.

画像処理ECU20は、図示しないCPU、ROM、RAM等からなるマイクロコンピュータの他、ビデオカメラ10から出力された画像をデジタル画像に変換するためのA/D変換器や、変換されたデジタル画像を保存する画像メモリ等を備えている。なお、画像メモリは、複数の画像を保存可能な記憶容量を有している。   The image processing ECU 20 stores an A / D converter for converting an image output from the video camera 10 into a digital image, and a converted digital image, in addition to a microcomputer including a CPU, ROM, RAM, etc. (not shown). An image memory or the like is provided. Note that the image memory has a storage capacity capable of storing a plurality of images.

この画像処理ECU20は、予め記憶されているプログラムに従って、各種の機能を実行する。例えば、ビデオカメラ10から時系列に出力される複数の画像における、同一特徴点の変化から、画像に含まれる各々の特徴点のオプティカルフローを算出し、算出された複数のオプティカルフローに基づいて、FOE位置を算出する。そして、算出されたFOE位置を用いて、各特徴点が移動点であるか静止点であるかを判定する。このようにして、画像処理ECU20は、移動物体の検知を行い、その検知結果を制御装置30に出力する。   The image processing ECU 20 executes various functions according to a program stored in advance. For example, an optical flow of each feature point included in the image is calculated from a change in the same feature point in a plurality of images output in time series from the video camera 10, and based on the calculated plurality of optical flows, Calculate the FOE position. Then, using the calculated FOE position, it is determined whether each feature point is a moving point or a stationary point. In this way, the image processing ECU 20 detects the moving object and outputs the detection result to the control device 30.

制御装置30は、画像処理ECU20による移動物体の検知結果に基づいて、例えば、車両の前方に移動物体が存在することを運転者に報知したりするものである。   Based on the detection result of the moving object by the image processing ECU 20, for example, the control device 30 notifies the driver that there is a moving object in front of the vehicle.

次に、図2のフロー図に基づいて、画像処理ECU20において実行される各種の機能について詳しく説明する。なお、図2では、基本的に、画像処理ECU20において実行される各種機能を機能ブロックとして表している。ただし、画像処理ECU20では、ビデオカメラ20によって画像の出力が開始されたとき、その時系列に出力される画像に応じて、実行する機能が変化する。そのため、図2では、画像処理ECU20において実行される機能ブロックの経時的な変化も併せて示している。具体的には、同一の機能ブロックには同一の参照番号を付与しつつ、その同一の機能ブロックが異なる時間帯に動作する場合には、参照番号に異なるアルファベットを添付している。   Next, various functions executed in the image processing ECU 20 will be described in detail based on the flowchart of FIG. In FIG. 2, basically, various functions executed in the image processing ECU 20 are represented as functional blocks. However, in the image processing ECU 20, when image output is started by the video camera 20, the function to be executed changes according to the images output in time series. Therefore, FIG. 2 also shows changes over time of the functional blocks executed in the image processing ECU 20. Specifically, the same reference number is assigned to the same functional block, and different alphabets are attached to the reference number when the same functional block operates in different time zones.

まず、図2における、各種の機能ブロックについて説明する。画像処理ECU20は、特徴点算出部41を有する。この特徴点算出部41は、コーナー点抽出部42と、近傍点削除部43とから構成される。コーナー点抽出部42は、画像メモリ40に新たなデジタル画像が保存されると、そのデジタル画像を取り込んで、そのデジタル画像における特徴点として、エッジや、物体の角等を抽出する。また、近傍点削除部43は、コーナー点抽出部42が抽出したエッジや物体の角などの特徴点の中で、既に抽出されている特徴点の座標近傍に存在する特徴点を削除する。既に抽出されている特徴点の座標近傍に存在する特徴点は、抽出済みの特徴点が移動したものである可能性が高い。このため、近傍点削除部43によって、そのような特徴点を削除することにより、特徴点算出部41は、新たにデジタル画像に出現した、新規の特徴点のみを算出することになる。そして、特徴点算出部41によって算出された新規の特徴点は、第1オプティカルフロー算出部44に与えられる。   First, various functional blocks in FIG. 2 will be described. The image processing ECU 20 has a feature point calculation unit 41. The feature point calculation unit 41 includes a corner point extraction unit 42 and a neighborhood point deletion unit 43. When a new digital image is stored in the image memory 40, the corner point extraction unit 42 takes in the digital image and extracts edges, object corners, and the like as feature points in the digital image. Further, the neighboring point deletion unit 43 deletes the feature points existing in the vicinity of the coordinates of the feature points already extracted from the feature points such as the edges and the corners of the object extracted by the corner point extraction unit 42. There is a high possibility that a feature point existing in the vicinity of the coordinate of a feature point that has already been extracted is one in which the extracted feature point has moved. For this reason, by deleting such feature points by the neighboring point deletion unit 43, the feature point calculation unit 41 calculates only new feature points newly appearing in the digital image. Then, the new feature point calculated by the feature point calculation unit 41 is given to the first optical flow calculation unit 44.

本実施形態では、特徴点のオプティカルフローを算出するオプティカルフロー算出部として、第1〜第3オプティカルフロー算出部44〜46を有している。   In the present embodiment, first to third optical flow calculation units 44 to 46 are provided as optical flow calculation units for calculating the optical flow of feature points.

第1オプティカルフロー算出部44は、上述したように、特徴点算出部41によって算出された新規の特徴点に基づき、既に抽出され、静止点候補もしくは移動点候補として判定済みの特徴点以外の、新規な特徴点についてのオプティカルフローを算出する。このため、第1オプティカルフロー算出部44は、異なるタイミングで画像メモリ40に保存された2つのデジタル画像において、特徴点算出部41によって算出された特徴点を対応付けることにより、その特徴点の動きベクトルに相当するオプティカルフローを算出する。   As described above, the first optical flow calculation unit 44 is already extracted based on the new feature points calculated by the feature point calculation unit 41, and other than the feature points that have already been determined as stationary point candidates or moving point candidates. The optical flow for a new feature point is calculated. For this reason, the first optical flow calculation unit 44 associates the feature points calculated by the feature point calculation unit 41 in the two digital images stored in the image memory 40 at different timings, thereby moving the motion vectors of the feature points. The optical flow corresponding to is calculated.

第2のオプティカルフロー算出部45は、静止点候補として判定済みの特徴点のオプティカルフローを算出する。また、第3のオプティカルフロー算出部46は、移動点候補として判定済みの特徴点のオプティカルフローを算出するものである。第2及び第3のオプティカルフロー算出部45,46におけるオプティカルフローの算出手法は、第1のオプティカルフロー算出部と同様である。   The second optical flow calculation unit 45 calculates the optical flow of feature points that have been determined as still point candidates. The third optical flow calculation unit 46 calculates an optical flow of feature points that have been determined as moving point candidates. The method of calculating the optical flow in the second and third optical flow calculation units 45 and 46 is the same as that of the first optical flow calculation unit.

なお、上述した例では、特徴点算出部41が、エッジや物体の角等の特徴点を算出するものであったが、他の手法によって特徴点を算出することも可能である。例えば、一つのデジタル画像を小領域に分割し、その小領域のうち明るさ分布に特徴があるものを特徴点とすることができる。この場合、もう一つのデジタル画像において、小領域に対応する窓を設定し、その窓をすこしずつずらしながら、小領域の明るさ分布と最も相関の高い位置を探索する。このようにしても、特徴点のオプティカルフローを算出することができる。   In the above-described example, the feature point calculation unit 41 calculates feature points such as edges and corners of an object. However, the feature points can be calculated by other methods. For example, one digital image can be divided into small areas, and those small areas having characteristics in brightness distribution can be used as feature points. In this case, in another digital image, a window corresponding to the small area is set, and the position having the highest correlation with the brightness distribution of the small area is searched while slightly shifting the window. Even in this way, the optical flow of the feature points can be calculated.

FOE算出部47は、静止点候補となる特徴点が判定済みであり、第2オプティカルフロー算出部45によって、静止点候補の特徴点のオプティカルフローが算出されている場合には、そのオプティカルフローに基づいてFOE座標を算出する。第2オプティカルフロー算出部45によって静止点候補のオプティカルフローが算出されていない場合には、第1オプティカルフロー算出部44によって算出された、新規な特徴点のオプティカルフローに基づいてFOE座標を算出する。   The FOE calculation unit 47 has already determined the feature point to be a still point candidate, and when the second optical flow calculation unit 45 has calculated the optical flow of the feature point of the still point candidate, Based on this, FOE coordinates are calculated. When the optical flow of the still point candidate is not calculated by the second optical flow calculation unit 45, the FOE coordinates are calculated based on the optical flow of the new feature point calculated by the first optical flow calculation unit 44. .

なお、FOE算出部47は、第1〜第3オプティカルフロー算出部44〜46によって算出された全てのオプティカルフローに基づいてFOE座標を算出しても良いし、第2オプティカルフロー算出部45によって算出されたオプティカルフローに、第1もしくは第3オプティカルフロー算出部44,46によって算出されたオプティカルフローを組み合わせてFOE座標を算出しても良い。本実施形態では、後述するように、各特徴点のオプティカルフローの誤差の総和を評価する評価関数を算出して、その誤差の総和が最も小さくなるようにFOE座標を定める。その評価関数の算出に際して、重み係数Wiを用い、誤差の大きいオプティカルフローに対しては、小さな重み係数Wiを設定する。このため、FOE座標を求めるためのオプティカルフローに、移動点のオプティカルフローが含まれていたりしても、精度良くFOE座標を求めることができる。   The FOE calculation unit 47 may calculate the FOE coordinates based on all the optical flows calculated by the first to third optical flow calculation units 44 to 46, or may be calculated by the second optical flow calculation unit 45. The FOE coordinates may be calculated by combining the optical flow calculated by the first or third optical flow calculation unit 44 or 46 with the optical flow thus calculated. In this embodiment, as will be described later, an evaluation function for evaluating the sum of optical flow errors of each feature point is calculated, and the FOE coordinates are determined so that the sum of the errors is minimized. When calculating the evaluation function, a weighting factor Wi is used, and a small weighting factor Wi is set for an optical flow with a large error. For this reason, even if the optical flow for obtaining the FOE coordinates includes the optical flow of the moving point, the FOE coordinates can be obtained with high accuracy.

ここで、FOE算出部47における、FOE座標Fの算出方法について説明する。本実施形態では、図3に示すように、FOE座標Fから各特徴点Piの座標へ向かう線分(Pi−F)と、当該特徴点PiのオプティカルフローViとがなす角度θiを誤差として、各特徴点Piの誤差の総和を評価する評価関数Eを以下の数式4のように定める。すると、画像上のFOE座標Fは、評価関数Eで定められる重みつき最小二乗問題の解として求めることができる。   Here, the calculation method of the FOE coordinate F in the FOE calculation part 47 is demonstrated. In this embodiment, as shown in FIG. 3, an angle θi formed by a line segment (Pi−F) from the FOE coordinate F to the coordinate of each feature point Pi and the optical flow Vi of the feature point Pi is defined as an error. An evaluation function E that evaluates the sum of errors of each feature point Pi is defined as in Equation 4 below. Then, the FOE coordinate F on the image can be obtained as a solution of the weighted least square problem defined by the evaluation function E.

Figure 0005152144
Figure 0005152144

数式4において、|Vi∧(Pi−F)|は、オプティカルフローViと、FOE座標Fから特徴点の座標Piへ向かう線分(Pi−F)との外積の値を示している。外積の値は、オプティカルフローViとFOE座標Fから特徴点座標Piへ向かう線分(Pi−F)とのなす角度θiが大きくなるほど、大きくなる。   In Equation 4, | Vi∧ (Pi−F) | represents the value of the outer product of the optical flow Vi and the line segment (Pi−F) from the FOE coordinate F to the coordinate Pi of the feature point. The value of the outer product increases as the angle θi formed between the optical flow Vi and the line segment (Pi−F) from the FOE coordinate F toward the feature point coordinate Pi increases.

ここで、特徴点が静止点である場合には、通常、FOE座標Fから特徴点座標Piへ向かう線分と特徴点のオプティカルフローViとがなす角度θiは、ゼロもしくはゼロに近い値となる。従って、オプティカルフローViとFOE座標Fから特徴点座標Piへ向かう線分(Pi−F)とのなす角度θiが大きくなるのは、特徴点が移動点である場合や、静止点であっても、算出されたオプティカルフローViの誤差が大きい場合である。(ただし、現実問題として、移動点と静止点とを完全に分離することは困難である。)そして、このような移動点のオプティカルフローViや誤差が大きい静止点のオプティカルフローViの影響を極力排除して、FOE座標Fを求めるようにすれば、FOE位置の精度向上につながる。   Here, when the feature point is a stationary point, the angle θi formed by the line segment from the FOE coordinate F to the feature point coordinate Pi and the optical flow Vi of the feature point is usually zero or a value close to zero. . Therefore, the angle θi formed between the optical flow Vi and the line segment (Pi-F) from the FOE coordinate F to the feature point coordinate Pi increases when the feature point is a moving point or a stationary point. This is a case where the error of the calculated optical flow Vi is large. (However, as a real problem, it is difficult to completely separate the moving point and the stationary point.) Then, the influence of the optical flow Vi at such a moving point and the optical flow Vi at a stationary point with a large error as much as possible is considered. If it is excluded and the FOE coordinate F is obtained, the accuracy of the FOE position is improved.

そこで、本実施形態では、移動点のオプティカルフローViや、誤差が大きい静止点のオプティカルフローViに対しては、後述するように、重み係数Wiが小さくなるように設定する。これにより、評価関数Eを算出する際に、移動点のオプティカルフローViや、誤差が大きい静止点のオプティカルフローViの影響度合が低減される。換言すれば、重み係数Wiを用いつつ評価関数Eを算出することにより、FOE座標Fから特徴点座標Piへ向かう線分との角度θiが小さいオプティカルフローViを有する特徴点Piの誤差をより重視して、誤差の総和を評価する評価関数Eを算出することができる。   Therefore, in the present embodiment, the weight coefficient Wi is set to be small as will be described later for the optical flow Vi at the moving point and the optical flow Vi at the stationary point where the error is large. Thereby, when calculating the evaluation function E, the influence degree of the optical flow Vi of the moving point and the optical flow Vi of the stationary point having a large error is reduced. In other words, by calculating the evaluation function E using the weight coefficient Wi, the error of the feature point Pi having the optical flow Vi having a small angle θi with the line segment from the FOE coordinate F to the feature point coordinate Pi is more emphasized. Thus, the evaluation function E for evaluating the sum of errors can be calculated.

従って、画像中に移動点のオプティカルフローViが含まれていたり、一部の静止点のオプティカルフローViの誤差が大きく算出されたりしても、それらの影響を実質的に受けることなく、主に、精度良く算出された静止点のオプティカルフローViからFOE座標Fを高精度に求めることができる。   Therefore, even if the optical flow Vi of the moving point is included in the image or the error of the optical flow Vi of a part of the stationary points is calculated largely, it is mainly not affected by the influence. The FOE coordinate F can be obtained with high accuracy from the optical flow Vi of the stationary point calculated with high accuracy.

重み係数Wiは、オプティカルフローViとFOE座標Fから特徴点座標Piへ向かう線分(Pi−F)とのなす角度θiが大きいほど、小さい値となるように設定される。具体的には、下記の数式5のように設定することができる。   The weighting factor Wi is set to be smaller as the angle θi formed between the optical flow Vi and the line segment (Pi-F) from the FOE coordinate F to the feature point coordinate Pi is larger. Specifically, it can be set as shown in Equation 5 below.

Figure 0005152144
Figure 0005152144

今回のFOE座標Fの位置は、過去(前回)に算出したFOE座標Fprevの近傍に存在すると仮定することができる。そこで、重み係数Wiの初期値を、オプティカルフローViと、過去に算出されたFOE座標Fprevから特徴点Piへ向かう線分(Pi−Fprev)との外積値Riを利用して定める。   It can be assumed that the current position of the FOE coordinate F exists in the vicinity of the FOE coordinate Fprev calculated in the past (previous). Therefore, the initial value of the weighting coefficient Wi is determined using the outer product value Ri of the optical flow Vi and the line segment (Pi-Fprev) from the FOE coordinate Fprev calculated in the past to the feature point Pi.

具体的には、外積値Riを、予め実験等により定めた定数Roにより除算した値の二乗値に1を加え、その平方根の逆数を重み係数Wiとする。図4は、Ri/Roを横軸にとり、Ri/Roの変化に対する重み係数Wiの変化を示したグラフである。Roは定数であるため、重み係数Wiは、外積値Riの増加に対して、単調減少する単調減少関数となっている。   Specifically, 1 is added to the square value of the value obtained by dividing the outer product value Ri by a constant Ro determined in advance by experiments or the like, and the reciprocal of the square root is used as the weighting factor Wi. FIG. 4 is a graph showing changes in the weighting factor Wi with respect to changes in Ri / Ro, with Ri / Ro as the horizontal axis. Since Ro is a constant, the weighting factor Wi is a monotonically decreasing function that monotonously decreases as the outer product value Ri increases.

そして、Ri>>R0となる特徴点Piのデータは、近似的にRi/Roの逆数となる相対的に小さな重みがかかることになり、評価関数Eにおける最小二乗法の解に与える影響を小さく抑えることができる。一方、Ri<<R0となる特徴点Piのデータに対しては、重みが1−0.5(Ri/Ro)で漸近近似され、Ri/Roがゼロに近づくほど1を上限として大きな重みがかかることになる。このように、誤差の極めて小さい特徴点Piのデータは、通常の重みのない最小二乗法の解法と(近似的に)同等の扱われ方をされる。 The data of the feature point Pi where Ri >> R0 is given a relatively small weight that is approximately the inverse of Ri / Ro, and the influence on the solution of the least squares method in the evaluation function E is reduced. Can be suppressed. On the other hand, for data of the feature point Pi satisfying Ri << R0, the weight is asymptotically approximated by 1−0.5 (Ri / Ro) 2 , and as Ri / Ro approaches zero, a larger weight is set with 1 being the upper limit. Will take. As described above, the data of the feature point Pi having a very small error is handled in an (equivalent) manner equivalent to the solution of the normal least square method without weight.

なお、定数Roがあまりに小さければ解が統計的に安定でなくなり、あまりに大きければ解がノイズの影響を受けやすくなる。よって、定数Roはあらかじめ、使用環境に近い環境で実験をして適切な値に定められる。   If the constant Ro is too small, the solution is not statistically stable, and if it is too large, the solution is susceptible to noise. Therefore, the constant Ro is set in advance to an appropriate value through experiments in an environment close to the usage environment.

このように、数式5に従って重み係数Wiを算出することにより、誤差の大きい特徴点Piのデータほど重みが小さくなり、逆に、誤差が小さい特徴点Piのデータほど、1を上限として重みが大きくなるように、重み係数Wiを定めることができる。従って、各特徴点Piの誤差の大きさに適切に対応した重み係数Wiを算出することができる。   Thus, by calculating the weighting coefficient Wi in accordance with Equation 5, the weight of the feature point Pi with a larger error becomes smaller, and conversely, the data of the feature point Pi with a smaller error becomes larger with 1 as the upper limit. Thus, the weighting factor Wi can be determined. Accordingly, it is possible to calculate the weighting factor Wi that appropriately corresponds to the magnitude of the error of each feature point Pi.

さらに、上述した重み係数Wiを用いることにより、FOE座標Fから各特徴点Piまでの距離差の影響が、評価関数Eに反映されることを抑制することができる。つまり、評価関数Eを算出する際の、オプティカルフローViと、FOE座標Fから特徴点Piへ向かう線分(Pi−F)との外積値は、それらがなす角度θiのみによらず、オプティカルフローViの長さや、FOE座標Fから特徴点Piへ向かう線分(Pi−F)の長さの影響を受ける。オプティカルフローViの長さや、FOE座標Fから特徴点Piへ向かう線分(Pi−F)の長さは、各特徴点とFOE座標Fとの距離などによって相違する。   Further, by using the above-described weighting factor Wi, it is possible to suppress the influence of the distance difference from the FOE coordinate F to each feature point Pi from being reflected in the evaluation function E. That is, the outer product value of the optical flow Vi and the line segment (Pi−F) from the FOE coordinate F to the feature point Pi when calculating the evaluation function E is not dependent on only the angle θi formed by them, but the optical flow. It is influenced by the length of Vi and the length of the line segment (Pi-F) from the FOE coordinate F to the feature point Pi. The length of the optical flow Vi and the length of the line segment (Pi-F) from the FOE coordinate F to the feature point Pi differ depending on the distance between each feature point and the FOE coordinate F.

本実施形態では、重み係数Wiの初期値を、オプティカルフローViと、過去に算出されたFOE座標Fprevから特徴点Piへ向かう線分(Pi−F)との外積値Riを含む項の逆数としている。このため、重み係数Wiの初期値は、オプティカルフローViや線分(Pi−F)の変化に応じて、その変化を相殺するように変化する。これにより、誤差の総和を評価する評価関数Eを算出する際に、各特徴点PiとFOE座標Fとの距離差の影響を低減することができる。   In the present embodiment, the initial value of the weight coefficient Wi is set as the reciprocal number of the term including the outer product value Ri of the optical flow Vi and the line segment (Pi-F) from the FOE coordinate Fprev calculated in the past to the feature point Pi. Yes. For this reason, the initial value of the weight coefficient Wi changes in accordance with the change in the optical flow Vi or the line segment (Pi-F) so as to cancel the change. Thereby, when calculating the evaluation function E for evaluating the total sum of errors, the influence of the distance difference between each feature point Pi and the FOE coordinate F can be reduced.

そして、下記の数式6に示すように、FOE座標Fの算出と、重み係数Wiの更新を繰り返し実行する。   Then, as shown in Equation 6 below, the calculation of the FOE coordinate F and the update of the weighting factor Wi are repeatedly executed.

Figure 0005152144
Figure 0005152144

つまり、重み係数Wiの初期値を用いて評価関数Eが最小となるFOE座標F(t)が求められたら、外積値Riにおける過去に算出されたFOE座標Fprevを、求めたFOE座標F(t)で置換することにより、各特徴点Piに関しての外積値Riを更新する(Ri(t)→Ri(t+1))。そして、更新した外積値Ri(t+1)を用いて、重み係数Wiを更新する(Wi(t)→Wi(t+1))。さらに、更新した重み係数Wi(t+1)を用いて評価関数Eが最小となるFOE座標F(t+1)を求める。このような手順を、FOE座標Fの変動が所定範囲に収まるようになるまで繰り返す。これにより、FOE座標Fの位置をより高い精度で求めることができる。 That is, when the FOE coordinate F (t) that minimizes the evaluation function E is obtained using the initial value of the weight coefficient Wi, the FOE coordinate Fprev calculated in the past in the outer product value Ri is obtained as the calculated FOE coordinate F (t ) To update the outer product value Ri for each feature point Pi (Ri (t) → Ri (t + 1) ). Then, the weight coefficient Wi is updated using the updated outer product value Ri (t + 1) (Wi (t) → Wi (t + 1) ). Further, the FOE coordinate F (t + 1) that minimizes the evaluation function E is obtained using the updated weighting factor Wi (t + 1) . Such a procedure is repeated until the fluctuation of the FOE coordinate F falls within a predetermined range. Thereby, the position of the FOE coordinate F can be obtained with higher accuracy.

図5に、上述した手法により求めたFOE座標Fの精度を、全く重みを用いないでFOE座標を求めた場合と対比して示す。なお、図5に示すグラフでは、重みのみ変更しただけで、FOE座標を求める手法は本実施形態の手法と同じにしている。すなわち、図5は、重みありの場合となしの場合とでそれぞれFOE座標を求めたシミュレーション結果であり、FOE座標Fの真値は分かっている。シミュレーションにおいては、特徴点Piのオプティカルフローに、ランダムに生成された誤差を付加したシミュレーションデータを用意し、それぞれ、最小二乗法によりFOE座標Fの位置を求めた。このシミュレーションによる試行は20回繰り返し、重みありの場合となしの場合における、FOEの計算値と真値とのずれの平均も算出した。なお、重み係数Wiを用いた計算では、重み係数Wiの更新は5回行った。   FIG. 5 shows the accuracy of the FOE coordinates F obtained by the above-described method in comparison with the case where the FOE coordinates are obtained without using any weight. In the graph shown in FIG. 5, only the weight is changed, and the method for obtaining the FOE coordinates is the same as the method of the present embodiment. That is, FIG. 5 shows simulation results for obtaining FOE coordinates for cases with and without weight, and the true value of the FOE coordinates F is known. In the simulation, simulation data in which randomly generated errors were added to the optical flow of the feature point Pi was prepared, and the position of the FOE coordinate F was obtained by the least square method. The trial by this simulation was repeated 20 times, and the average of the difference between the calculated value of FOE and the true value was calculated with and without weight. In the calculation using the weight coefficient Wi, the weight coefficient Wi was updated five times.

図5に示すように、本実施形態による手法で求めたFOE座標と真値とのずれの平均は、重み係数Wiを用いない場合よりも小さくなっており、本実施形態により、真値に近いFOE座標を求めることができることが分かる。   As shown in FIG. 5, the average of the deviation between the FOE coordinates and the true value obtained by the method according to the present embodiment is smaller than when the weighting factor Wi is not used, and is close to the true value according to the present embodiment. It can be seen that the FOE coordinates can be obtained.

以上のようにして、FOE算出部47によってFOE座標Fが算出されると、そのFOE座標Fが、図2に示す判定部48に与えられる。判定部48は、θ算出部49、θ判定部50、静止点候補判定部51、及び移動点候補判定部52と、を有する。   When the FOE calculation unit 47 calculates the FOE coordinate F as described above, the FOE coordinate F is given to the determination unit 48 shown in FIG. The determination unit 48 includes a θ calculation unit 49, a θ determination unit 50, a still point candidate determination unit 51, and a moving point candidate determination unit 52.

θ算出部49は、第1〜第3オプティカルフロー算出部44〜46によってそれぞれ算出されオプティカルフローViと、FOE算出部47によって算出されたFOE座標Fから各特徴点Piを結んだ線分とのなす角度θを、次の数式7に従って、各特徴点ごとに算出する。   The θ calculation unit 49 includes an optical flow Vi calculated by the first to third optical flow calculation units 44 to 46 and a line segment connecting the feature points Pi from the FOE coordinates F calculated by the FOE calculation unit 47. The formed angle θ is calculated for each feature point according to the following formula 7.

Figure 0005152144
Figure 0005152144

θ判定部50は、θ算出部49によって各特徴点ごとに算出された角度θを、所定の基準角度θthと比較する。そして、角度θが所定の基準角度θth以下である場合には、その特徴点のデータを静止点候補判定部51に与える。一方、角度θが所定の基準角度θthより大きい場合には、その特徴点のデータを移動点候補判定部52に与える。なお、θ判定部50は、静止点候補の判定と移動点候補の判定とに用いる基準角度を異ならせても良い。この場合、静止点候補判定基準角度は、移動点候補判定基準角度よりも小さく設定される。そして、静止点候補判定基準角度と移動点候補判定基準角度との間の角度を有する特徴点については、いずれかの基準角度を越えるまで、静止点か移動点かの判断が保留される。この判断が保留された特徴点のオプティカルフローは、別途設ける第4のオプティカルフロー算出部において算出される。   The θ determination unit 50 compares the angle θ calculated for each feature point by the θ calculation unit 49 with a predetermined reference angle θth. When the angle θ is equal to or smaller than the predetermined reference angle θth, the feature point data is given to the stationary point candidate determination unit 51. On the other hand, when the angle θ is larger than the predetermined reference angle θth, the feature point data is given to the moving point candidate determination unit 52. Note that the θ determination unit 50 may change the reference angle used for determination of a stationary point candidate and determination of a moving point candidate. In this case, the stationary point candidate determination reference angle is set smaller than the moving point candidate determination reference angle. For feature points having an angle between the stationary point candidate determination reference angle and the moving point candidate determination reference angle, the determination of whether the point is a stationary point or a moving point is suspended until any reference angle is exceeded. The optical flow of the feature point for which this determination is suspended is calculated by a fourth optical flow calculation unit provided separately.

このように本実施形態では、図3に示すように、FOE座標Fから特徴点Piの座標へ向かう線分と、当該特徴点PiのオプティカルフローViとがなす角度θが所定の基準角度θthよりも大きいか否かによって、特徴点が移動点であるか静止点であるかを判定することができる。これは、本実施形態により、高精度なFOE座標Fを求めることができるためである。   Thus, in the present embodiment, as shown in FIG. 3, the angle θ formed by the line segment from the FOE coordinate F to the coordinate of the feature point Pi and the optical flow Vi of the feature point Pi is based on the predetermined reference angle θth. It can be determined whether the feature point is a moving point or a stationary point depending on whether or not it is larger. This is because the FOE coordinate F with high accuracy can be obtained according to the present embodiment.

なお、従来、移動点と静止点とを分離するために、RANSAC法や、クラスタリング法などの処理手法を用いることが知られているが、それらの手法は、通常、演算量が膨大となる。それに対して、本実施形態では、最小二乗法を数回程度繰り返すことで、高精度なFOE座標Fを求めることができ、そのような高精度なFOE座標Fを利用することで、移動点と静止点との分離は、単なる角度の判定処理のみで足りる。従って、従来の手法に比較して少ない演算量で、ノイズに対して頑健なFOE座標Fの算出と、移動点、静止点の分離が可能となる。   Conventionally, in order to separate the moving point and the stationary point, it is known to use a processing method such as the RANSAC method or the clustering method. However, these methods usually require a large amount of calculation. On the other hand, in the present embodiment, the high-precision FOE coordinate F can be obtained by repeating the least squares method several times, and by using such a high-precision FOE coordinate F, the moving point and Separation from the stationary point is sufficient only for the angle determination process. Accordingly, it is possible to calculate the FOE coordinate F that is robust against noise and to separate the moving point and the stationary point with a small amount of calculation compared to the conventional method.

静止点候補判定部51は、θ判定部50から与えられた特徴点を静止点候補として判定し、移動点候補判定部52は、θ判定部50から与えられた特徴点を移動点候補として判定する。そして、静止点候補判定部51は、静止点候補として判定した特徴点のデータを座標更新部53に与え、移動点候補判定部52は、移動点候補として判定した特徴点のデータを座標更新部54に与える。   The still point candidate determining unit 51 determines the feature point given from the θ determining unit 50 as a still point candidate, and the moving point candidate determining unit 52 determines the feature point given from the θ determining unit 50 as a moving point candidate. To do. Then, the still point candidate determining unit 51 gives the feature point data determined as the still point candidate to the coordinate updating unit 53, and the moving point candidate determining unit 52 transmits the feature point data determined as the moving point candidate to the coordinate updating unit. 54.

座標更新部53,54は、与えられた特徴点のデータに含まれる各々のオプティカルフローViを用いて、静止点候補及び移動点候補の座標を更新する。そして、更新した座標を近傍点削除部43に与える。これにより、近傍点削除部43は、上述したように、コーナー点抽出部42が抽出したエッジや物体の角などの特徴点の中で、既に抽出されている特徴点の座標近傍に存在する特徴点を削除することができる。   The coordinate updating units 53 and 54 update the coordinates of the stationary point candidate and the moving point candidate using each optical flow Vi included in the given feature point data. Then, the updated coordinates are given to the neighboring point deletion unit 43. As a result, the neighboring point deletion unit 43, as described above, among the feature points such as edges and object corners extracted by the corner point extraction unit 42, features that exist in the vicinity of the coordinates of feature points that have already been extracted. Points can be deleted.

さらに、座標更新部53は、座標を更新した静止点候補となる特徴点のデータを、次フレームの画像が画像メモリ40に保存されたときに、静止点候補の特徴点のオプティカルフローViを算出する第2オプティカルフロー算出部45に与える。また、座標更新部54は、座標を更新した移動点候補となる特徴点のデータを、第3オプティカルフロー算出部46に与える。   Further, the coordinate update unit 53 calculates the optical flow Vi of the feature point of the still point candidate when the image of the next frame is stored in the image memory 40 with respect to the feature point data that becomes the still point candidate whose coordinates are updated. To the second optical flow calculation unit 45. In addition, the coordinate update unit 54 provides the third optical flow calculation unit 46 with the data of feature points that are candidate movement points whose coordinates have been updated.

次に、図2に基づき、画像処理ECU20において実行される機能ブロックの経時的な変化に関して説明する。   Next, the change over time of the functional blocks executed in the image processing ECU 20 will be described with reference to FIG.

図2では、時刻T1のタイミングで画像メモリ40aに最初の第1フレームの画像が保存されたことを前提としている。この時点では、画像処理ECU20では、一枚分の画像データしか得ていない。このため、特徴点算出部41a以外の機能を実行することができない。特徴点算出部41aは、画像の特徴点を算出するものであるため、画像が画像メモリ40aに保存された時点で実行される。従って、画像処理ECU20は、次フレームの画像が画像メモリ40bに保存されるまで、特徴点算出部41a以外の機能を実行することなく待機する。   In FIG. 2, it is assumed that an image of the first first frame is stored in the image memory 40a at the timing of time T1. At this time, the image processing ECU 20 has obtained only one image data. For this reason, functions other than the feature point calculation unit 41a cannot be executed. Since the feature point calculation unit 41a calculates the feature points of the image, the feature point calculation unit 41a is executed when the image is stored in the image memory 40a. Therefore, the image processing ECU 20 waits without executing any function other than the feature point calculation unit 41a until the image of the next frame is stored in the image memory 40b.

時刻T2のタイミングで、第2フレームの画像が画像メモリ40bに保存されると、その画像が第1オプティカルフロー算出部44bに与えられる。これにより、第1オプティカルフロー算出部44は、2枚分の画像を得て、特徴点の動きベクトルであるオプティカルフローViを算出可能となる。ただし、この時点においても、特徴点に関して静止点判定及び移動点判定は行なわれていないので、第2及び第3オプティカルフロー算出部45b、46bにてオプティカルフローViの算出は行なわれない。   When the image of the second frame is stored in the image memory 40b at the time T2, the image is given to the first optical flow calculation unit 44b. Accordingly, the first optical flow calculation unit 44 can obtain two images and calculate the optical flow Vi that is a motion vector of the feature point. However, at this point in time, the still point determination and the moving point determination are not performed for the feature points, and thus the optical flow Vi is not calculated by the second and third optical flow calculation units 45b and 46b.

また、第2オプティカルフロー算出部45bにて静止点のオプティカルフローが算出されていないので、FOE算出部47bは、第1オプティカル算出部44bが算出したオプティカルフローに基づいて、FOE座標Fを算出する。   Further, since the optical flow of the stationary point is not calculated by the second optical flow calculation unit 45b, the FOE calculation unit 47b calculates the FOE coordinate F based on the optical flow calculated by the first optical calculation unit 44b. .

時刻T3のタイミングで、さらに第3フレームの画像が画像メモリ40cに保存されると、その画像が、第1〜第3オプティカルフロー算出部44c〜46cに与えられる。この時点では、時刻T1と時刻T2とで取得された2枚分の画像から抽出された特徴点について、静止点判定、あるいは移動点判定がなされているためである。そして、これ以後は、新たな画像が画像メモリ40に保存されるごとに、時刻T3のケースと同様に、第1〜第3オプティカルフロー算出部44〜46にて、それぞれ新規の特徴点、静止点候補、及び移動点候補のオプティカルフローが算出される。   When an image of the third frame is further stored in the image memory 40c at the time T3, the image is given to the first to third optical flow calculation units 44c to 46c. This is because, at this time, the stationary point determination or the moving point determination is performed on the feature points extracted from the two images acquired at time T1 and time T2. Thereafter, each time a new image is stored in the image memory 40, the first to third optical flow calculation units 44 to 46 respectively create new feature points and still images as in the case of the time T3. The optical flow of the point candidate and the moving point candidate is calculated.

以上、本発明の好ましい実施形態について説明したが、本発明は、上述した実施形態になんら制限されることなく、本発明の主旨を逸脱しない範囲において、種々の変形が可能である。   The preferred embodiments of the present invention have been described above, but the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the spirit of the present invention.

例えば、上述した実施形態では、FOE座標Fから特徴点Piの座標へ向かう線分(Pi−F)と、当該特徴点のオプティカルフローViとがなす角度θiと所定の基準角度θthとの1回の比較結果に応じて、特徴点Piが静止点候補、あるいは移動点候補であるかを判定した。   For example, in the above-described embodiment, once the angle θi formed by the line segment (Pi−F) from the FOE coordinate F to the coordinate of the feature point Pi and the optical flow Vi of the feature point and the predetermined reference angle θth. According to the comparison result, it was determined whether the feature point Pi is a stationary point candidate or a moving point candidate.

しかしながら、FOE算出部47によってFOE座標Fが算出されるごとに、FOE座標Fから特徴点Piへ向かう線分(Pi−F)と、当該特徴点のオプティカルフローViとがなす角度θiと基準角度θthとの比較を行い、その角度θiが基準角度θth以下との判定が複数回連続して成立した場合に、その特徴点Piを静止点と判定したり、その角度θiが基準角度θthより大きいとの判定が複数回連続して成立した場合に、その特徴点Piを移動点と判定したりしても良い。これにより、静止点及び移動点に関する判定精度を高めることができる。   However, every time the FOE coordinate F is calculated by the FOE calculation unit 47, the angle θi formed by the line segment (Pi-F) from the FOE coordinate F to the feature point Pi and the optical flow Vi of the feature point and the reference angle When comparison with θth is made and it is determined that the angle θi is equal to or smaller than the reference angle θth continuously, the feature point Pi is determined to be a stationary point, or the angle θi is larger than the reference angle θth. Or the feature point Pi may be determined as the moving point. Thereby, the determination precision regarding a stationary point and a moving point can be raised.

また、FOE算出部47は、新たなフレームの画像が画像メモリ40に保存されるごとに、FOE座標Fを算出するが、今回算出されたFOE座標Fと過去に算出された1つ以上のFOE座標Fとを所定の重みづけで平均処理して、最終的なFOE座標を求めても良い。これにより、FOE座標の位置の変動を抑えて、安定化されたFOE座標位置を求めることができる。   The FOE calculation unit 47 calculates the FOE coordinate F every time an image of a new frame is stored in the image memory 40. The FOE coordinate F calculated this time and one or more FOEs calculated in the past are calculated. The final FOE coordinates may be obtained by averaging the coordinates F with a predetermined weight. Thereby, the fluctuation | variation of the position of FOE coordinate can be suppressed and the stabilized FOE coordinate position can be calculated | required.

また、上述した実施形態では、オプティカルフローViと、FOE座標Fから特徴点座標Piへ向かう線分(Pi−F)との外積を用いて、評価関数Eを定義した。しかしながら、オプティカルフローViとFOE座標Fから特徴点座標Piへ向かう線分(Pi−F)とのなす角度θiを誤差として、その誤差を評価できるものであれば、評価関数として採用することができる。   In the above-described embodiment, the evaluation function E is defined using the outer product of the optical flow Vi and the line segment (Pi-F) from the FOE coordinate F to the feature point coordinate Pi. However, any angle θi formed between the optical flow Vi and the line segment (Pi-F) from the FOE coordinate F to the feature point coordinate Pi can be used as an evaluation function as long as the error can be evaluated. .

さらに、上述した実施形態では、数式5に従って重み係数Wiを算出したが、重み係数Wiの算出式は、これに限られない。例えば、重み係数Wiの算出式を、下記の数式8に示すように、より簡略化しても良い。   Furthermore, in the above-described embodiment, the weighting factor Wi is calculated according to Formula 5, but the formula for calculating the weighting factor Wi is not limited to this. For example, the calculation formula for the weight coefficient Wi may be simplified as shown in the following formula 8.

Figure 0005152144
Figure 0005152144

数式8によれば、重み係数Wiの初期値が、オプティカルフローViと、過去に算出された拡張焦点Fprevから特徴点Piへ向かう線分(Pi−Fprev)との外積の逆数として定められる。そして、数式5の場合と同様に、重み係数Wiの初期値を用いて評価関数Eが最小となる拡張焦点Fが求められたら、数式8の重み係数Wiにおける過去に算出された拡張焦点Fprevを、求めた拡張焦点Fで置換することにより、各特徴点Piの重み係数Wiを更新する。さらに、更新した重み係数Wiを用いて評価関数Eが最小となるFOE座標Fを求めるとの手順を、FOE座標Fの変動が所定範囲に収まるようになるまで繰り返す。   According to Equation 8, the initial value of the weighting factor Wi is determined as the reciprocal of the outer product of the optical flow Vi and the line segment (Pi-Fprev) from the extended focus Fprev calculated in the past to the feature point Pi. Similarly to the case of Equation 5, when the extended focus F that minimizes the evaluation function E is obtained using the initial value of the weighting factor Wi, the extended focus Fprev calculated in the past in the weighting factor Wi of Equation 8 is obtained. Then, the weighting factor Wi of each feature point Pi is updated by replacing with the obtained extended focus F. Further, the procedure of obtaining the FOE coordinate F that minimizes the evaluation function E using the updated weight coefficient Wi is repeated until the fluctuation of the FOE coordinate F falls within a predetermined range.

上記の数式3に従って重み係数Wiを算出した場合も、オプティカルフローViと、FOE座標Fから特徴点座標Piへ向かう線分(Pi−F)との角度が大きく、従って誤差が大きい特徴点のデータほど、重みが小さくなるように、重み係数Wiを定めることができる。さらに、数式8に従って算出される重み係数Wiを用いた場合も、FOE座標Fから各特徴点Piまでの距離差の影響が、評価関数Eに反映されることを抑制することができる。   Even when the weighting factor Wi is calculated in accordance with Equation 3 above, feature point data with a large angle between the optical flow Vi and the line segment (Pi-F) from the FOE coordinate F to the feature point coordinate Pi is large. As the weight becomes smaller, the weighting coefficient Wi can be determined. Furthermore, even when the weighting coefficient Wi calculated according to Expression 8 is used, the influence of the distance difference from the FOE coordinate F to each feature point Pi can be suppressed from being reflected in the evaluation function E.

ただし、オプティカルフローViと、FOE座標Fから特徴点座標Piへ向かう線分(Pi−F)との角度(誤差)が極めて小さくなったとき、数式8によって算出される重み係数Wiは極大化することになる。重み係数Wiが極大化すると、求めるべきFOE座標が不安定化しやすいとのデメリットが生じる。   However, when the angle (error) between the optical flow Vi and the line segment (Pi-F) from the FOE coordinate F to the feature point coordinate Pi becomes extremely small, the weighting coefficient Wi calculated by Expression 8 is maximized. It will be. When the weighting factor Wi is maximized, there is a demerit that the FOE coordinates to be obtained are likely to be unstable.

このため、数式8に従って重み係数Wiを算出する場合、重み係数Wiが、所定の上限値以上の大きさとなったとき、その上限値を重み係数Wiとして用いることが好ましい。これにより、誤差が極めて小さくなったとき、重み係数Wiが過剰に大きくなることを防止することができる。ただし、この場合、上限値に対応する誤差よりも小さい誤差を持つ特徴点の重み係数Wiは、すべて上限値に統一されてしまうので、数式5に従って重み係数Wiを算出した場合に比較して、FOE座標Fの精度が若干低下する。   For this reason, when calculating the weighting factor Wi according to Equation 8, when the weighting factor Wi is greater than or equal to a predetermined upper limit value, the upper limit value is preferably used as the weighting factor Wi. Thereby, when the error becomes extremely small, it is possible to prevent the weight coefficient Wi from becoming excessively large. However, in this case, since the weight coefficients Wi of the feature points having an error smaller than the error corresponding to the upper limit value are all unified to the upper limit value, compared with the case where the weight coefficient Wi is calculated according to Equation 5, The accuracy of the FOE coordinate F is slightly reduced.

さらに、重み係数Wiの算出式として、数式5や数式8に示すような外積を用いずに、さらに簡略化することもできる。例えば、下記の数式9に従って、重み係数Wiを算出するようにしても良い。   Furthermore, the calculation formula of the weight coefficient Wi can be further simplified without using the outer product as shown in Formula 5 or Formula 8. For example, the weight coefficient Wi may be calculated according to the following formula 9.

Figure 0005152144
Figure 0005152144

この場合にも、誤差としての、オプティカルフローViと、FOE座標Fから特徴点座標Piへ向かう線分(Pi−F)との角度θiが大きくなるほど、小さくなるように重み係数Wiを算出することができる。   Also in this case, the weighting factor Wi is calculated so as to decrease as the angle θi between the optical flow Vi as an error and the line segment (Pi-F) from the FOE coordinate F to the feature point coordinate Pi increases. Can do.

10 ビデオカメラ、20 画像処理ECU、40 画像メモリ、41 特徴点算出部、44 第1オプティカルフロー算出部、45 第2オプティカルフロー算出部、46 第3オプティカルフロー算出部、47 FOE算出部、48 判定部、53,54 座標更新部、100 画像処理装置   DESCRIPTION OF SYMBOLS 10 Video camera, 20 Image processing ECU, 40 Image memory, 41 Feature point calculation part, 44 1st optical flow calculation part, 45 2nd optical flow calculation part, 46 3rd optical flow calculation part, 47 FOE calculation part, 48 determination Unit, 53, 54 coordinate update unit, 100 image processing apparatus

Claims (11)

移動体に搭載され、定期的に画像を撮像して出力する画像出力手段と、
前記画像出力手段により撮像された画像における、特徴点を複数抽出する特徴点抽出部と、
前記画像出力手段から時系列に出力された複数の画像における、同一特徴点の変化から、複数の特徴点のオプティカルフローをそれぞれ算出するオプティカルフロー算出部と、
前記オプティカルフロー算出部によって算出された複数のオプティカルフローを延長した交点である拡張焦点を算出する拡張焦点算出部と、
前記拡張焦点算出部によって算出された拡張焦点を用いて、前記特徴点が移動点であるか静止点であるかを判定する判定部と、を備え、
前記拡張焦点算出部は、複数の特徴点に関して、拡張焦点から特徴点の座標へ向かう線分と、当該特徴点のオプティカルフローとがなす角度を誤差として、各特徴点の誤差の総和を評価する評価関数を算出し、当該評価関数を用いて、前記誤差の総和が小さくなるように拡張焦点を定めるものであり、各特徴点の誤差から前記評価関数を算出する際に、拡張焦点から特徴点の座標へ向かう線分とその特徴点のオプティカルフローとがなす角度が大きくなるほど、前記評価関数に対する当該特徴点の誤差の影響度合を低減する重み係数を用いることを特徴とする画像処理装置。
An image output means mounted on a moving body and periodically capturing and outputting an image;
A feature point extraction unit for extracting a plurality of feature points in the image captured by the image output means;
An optical flow calculation unit that calculates optical flows of a plurality of feature points from changes in the same feature points in a plurality of images output in time series from the image output unit;
An extended focus calculation unit that calculates an extended focus that is an intersection obtained by extending a plurality of optical flows calculated by the optical flow calculation unit;
A determination unit that determines whether the feature point is a moving point or a stationary point by using the extended focus calculated by the extended focus calculation unit;
The extended focus calculation unit evaluates the sum of errors of each feature point with respect to a plurality of feature points, using an angle formed by a line segment from the extended focus to the coordinate of the feature point and the optical flow of the feature point as an error. An evaluation function is calculated, and an extended focus is determined by using the evaluation function so that the sum of the errors becomes small. When calculating the evaluation function from an error of each feature point, the feature point is calculated from the extended focus. An image processing apparatus using a weighting coefficient that reduces a degree of influence of an error of a feature point on the evaluation function as an angle formed by a line segment toward the coordinates of the point and an optical flow of the feature point increases.
前記拡張焦点算出部は、前記判定部によって各特徴点が移動点であるか静止点であるかを判定されている場合、静止点と判定された特徴点のみを用いて、各特徴点の誤差の総和を評価する評価関数を算出することを特徴とする請求項1に記載の画像処理装置。   When the determination unit determines whether each feature point is a moving point or a stationary point, the extended focus calculation unit uses only the feature point determined to be a stationary point and uses the error of each feature point. The image processing apparatus according to claim 1, wherein an evaluation function for evaluating the sum of the image is calculated. 前記拡張焦点算出部は、以下の数式1によって表される評価関数Eを用い、この評価関数Eが最小となる拡張焦点Fを最小二乗法により求めることを特徴とする請求項1または請求項2に記載の画像処理装置。
Figure 0005152144
3. The extended focus calculation unit obtains an extended focus F at which the evaluation function E is minimum by a least square method using an evaluation function E represented by the following formula 1. An image processing apparatus according to 1.
Figure 0005152144
前記拡張焦点算出部は、各特徴点の重み係数Wiの初期値を、過去に算出された拡張焦点Fprevを用いて算出される外積値Riを利用して、以下の数式2のように定め、重み係数Wiの初期値を用いて評価関数Eが最小となる拡張焦点Fが求められたら、外積値Riにおける過去に算出された拡張焦点Fprevを、求めた拡張焦点Fで置換することにより、各特徴点の外積値Ri及び重み係数Wiを更新し、更新した重み係数Wiを用いて評価関数Eが最小となる拡張焦点Fを求めるとの手順を繰り返すことで、拡張焦点Fの変動が所定範囲に収まるようになると、そのときの拡張焦点Fを今回の拡張焦点Fと定めることを特徴とする請求項3に記載の画像処理装置。
Figure 0005152144
The extended focus calculation unit determines an initial value of the weighting factor Wi of each feature point using an outer product value Ri calculated using the extended focus Fprev calculated in the past, as shown in Equation 2 below. When the extended focus F that minimizes the evaluation function E is obtained using the initial value of the weighting coefficient Wi, each of the extended focus Fprev calculated in the past in the outer product value Ri is replaced with the obtained extended focus F. By repeating the procedure of updating the outer product value Ri and the weighting factor Wi of the feature point and obtaining the extended focus F that minimizes the evaluation function E using the updated weighting factor Wi, the variation of the extended focus F is within a predetermined range. The image processing apparatus according to claim 3, wherein the extended focus F at that time is determined as the current extended focus F.
Figure 0005152144
前記拡張焦点算出部は、各特徴点の重み係数Wiの初期値を、過去に算出された拡張焦点Fprevを用いて以下の数式3のように定め、重み係数Wiの初期値を用いて前記評価関数Eが最小となる拡張焦点Fが求められたら、重み係数Wiにおける過去に算出された拡張焦点Fprevを、求めた拡張焦点Fで置換することにより、各特徴点の重み係数Wiを更新し、更新した重み係数Wiを用いて前記評価関数Eが最小となる拡張焦点Fを求めるとの手順を繰り返すことで、拡張焦点Fの変動が所定範囲に収まるようになると、そのときの拡張焦点を今回の拡張焦点と定めることを特徴とする請求項3に記載の画像処理装置。
Figure 0005152144
The extended focus calculation unit determines an initial value of the weighting factor Wi of each feature point using the extended focus Fprev calculated in the past as shown in Equation 3 below, and uses the initial value of the weighting factor Wi to perform the evaluation. When the extended focus F that minimizes the function E is obtained, the weighted coefficient Wi of each feature point is updated by replacing the previously calculated extended focus Fprev with the weighted coefficient Wi by the obtained extended focus F. By repeating the procedure of obtaining the extended focus F that minimizes the evaluation function E using the updated weight coefficient Wi, when the fluctuation of the extended focus F falls within a predetermined range, the extended focus at that time is set to the current focus. The image processing apparatus according to claim 3, wherein the image processing apparatus is defined as an extended focal point.
Figure 0005152144
前記重み係数Wiが、所定の上限値以上の大きさとなったとき、その上限値を重み係数Wiとして用いることを特徴とする請求項5に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein when the weight coefficient Wi is greater than or equal to a predetermined upper limit value, the upper limit value is used as the weight coefficient Wi. 前記判定部は、前記拡張焦点から特徴点の座標へ向かう線分と、当該特徴点のオプティカルフローとがなす角度が第1判定角度以下である場合に、その特徴点を静止点であると判定することを特徴とする請求項1乃至請求項6のいずれか記載の画像処理装置。   The determination unit determines that the feature point is a stationary point when an angle formed by a line segment from the extended focus to the coordinate of the feature point and an optical flow of the feature point is equal to or less than a first determination angle. The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus. 前記判定部は、前記拡張焦点算出部によって拡張焦点が算出されるごとに、前記拡張焦点から特徴点の座標へ向かう線分と、当該特徴点のオプティカルフローとがなす角度と前記第1判定角度との比較を行い、前記角度が前記第1判定角度以下との判定が複数回連続して成立した場合に、その特徴点を静止点と判定することを特徴とする請求項7に記載の画像処理装置。   Each time the extended focus is calculated by the extended focus calculation unit, the determination unit includes an angle formed by a line segment from the extended focus to the feature point coordinates and the optical flow of the feature point, and the first determination angle. The feature point is determined to be a stationary point when the determination that the angle is equal to or less than the first determination angle is made a plurality of times in succession. Processing equipment. 前記判定部は、前記拡張焦点から特徴点の座標へ向かう線分と、当該特徴点のオプティカルフローとがなす角度が第2判定角度より大きい場合に、その特徴点を移動点であると判定することを特徴とする請求項1乃至請求項6のいずれかに記載の画像処理装置。   The determination unit determines that the feature point is a moving point when an angle formed by a line segment from the extended focus to the coordinate of the feature point and an optical flow of the feature point is larger than a second determination angle. The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus. 前記判定部は、前記拡張焦点算出部によって拡張焦点が算出されるごとに、前記拡張焦点から特徴点の座標へ向かう線分と、当該特徴点のオプティカルフローとがなす角度と前記第2判定角度との比較を行い、前記角度が前記第2判定角度より大きいとの判定が複数回連続して成立した場合に、その特徴点を移動点と判定することを特徴とする請求項9に記載の画像処理装置。   Each time the extended focus is calculated by the extended focus calculation unit, the determination unit includes an angle formed by a line segment from the extended focus to the feature point coordinates and the optical flow of the feature point, and the second determination angle. The feature point is determined as a moving point when the determination that the angle is larger than the second determination angle is made a plurality of times in succession. Image processing device. 前記拡張焦点算出部は、今回算出された拡張焦点と過去に算出された拡張焦点とを平均処理して、最終的な拡張焦点を求めることを特徴とする請求項1乃至請求項10のいずれかに記載の画像処理装置。   11. The extended focus calculation unit obtains a final extended focus by averaging the extended focus calculated this time and the extended focus calculated in the past. An image processing apparatus according to 1.
JP2009233622A 2009-10-07 2009-10-07 Image processing device Active JP5152144B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009233622A JP5152144B2 (en) 2009-10-07 2009-10-07 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009233622A JP5152144B2 (en) 2009-10-07 2009-10-07 Image processing device

Publications (2)

Publication Number Publication Date
JP2011081613A JP2011081613A (en) 2011-04-21
JP5152144B2 true JP5152144B2 (en) 2013-02-27

Family

ID=44075599

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009233622A Active JP5152144B2 (en) 2009-10-07 2009-10-07 Image processing device

Country Status (1)

Country Link
JP (1) JP5152144B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5944781B2 (en) 2012-07-31 2016-07-05 株式会社デンソーアイティーラボラトリ Mobile object recognition system, mobile object recognition program, and mobile object recognition method
DE102015112289A1 (en) 2015-07-28 2017-02-02 Valeo Schalter Und Sensoren Gmbh Method for identifying an object in a surrounding area of a motor vehicle, driver assistance system and motor vehicle

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3435240B2 (en) * 1995-01-20 2003-08-11 株式会社東芝 Moving object detecting apparatus and method
JP3988758B2 (en) * 2004-08-04 2007-10-10 日産自動車株式会社 Moving body detection device
JP4538630B2 (en) * 2004-08-13 2010-09-08 国立大学法人静岡大学 System and method for detecting moving objects
JP4367475B2 (en) * 2006-10-06 2009-11-18 アイシン精機株式会社 Moving object recognition apparatus, moving object recognition method, and computer program

Also Published As

Publication number Publication date
JP2011081613A (en) 2011-04-21

Similar Documents

Publication Publication Date Title
US10755428B2 (en) Apparatuses and methods for machine vision system including creation of a point cloud model and/or three dimensional model
JP4367475B2 (en) Moving object recognition apparatus, moving object recognition method, and computer program
JP4915655B2 (en) Automatic tracking device
KR100985805B1 (en) Apparatus and method for image stabilization using adaptive Kalman filter
WO2015198930A1 (en) Distance measurement device, and distance measurement correction device using correction parameter
JP5756709B2 (en) Height estimation device, height estimation method, and height estimation program
CN105069804B (en) Threedimensional model scan rebuilding method based on smart mobile phone
US8111877B2 (en) Image processing device and storage medium storing image processing program
JP6444283B2 (en) Posture determination device
CN108369739B (en) Object detection device and object detection method
JP2016099982A (en) Behavior recognition device, behaviour learning device, method, and program
JP2019114103A (en) Object recognition processing device, object recognition processing method and program
JP2011022995A (en) Vanishing point estimation device and program
KR102295183B1 (en) object tracking method for CCTV video by use of CCTV projection model
JP5155110B2 (en) Monitoring device
JP2005214914A (en) Traveling speed detecting device and traveling speed detection method
JP5267100B2 (en) Motion estimation apparatus and program
JP5082955B2 (en) Vehicle detection apparatus and method, and program
JP5152144B2 (en) Image processing device
JP6336935B2 (en) Moving object tracking device
JP2010231350A (en) Person identifying apparatus, its program, and its method
JPWO2015198592A1 (en) Information processing apparatus, information processing method, and information processing program
JP2005157924A (en) Image movement detector
JP2011259342A (en) Image processing apparatus and image processing method
JP6602089B2 (en) Image processing apparatus and control method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120113

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121026

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: 20121106

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121119

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151214

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5152144

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250