JP5231183B2 - 3D shape restoration device - Google Patents
3D shape restoration device Download PDFInfo
- Publication number
- JP5231183B2 JP5231183B2 JP2008298478A JP2008298478A JP5231183B2 JP 5231183 B2 JP5231183 B2 JP 5231183B2 JP 2008298478 A JP2008298478 A JP 2008298478A JP 2008298478 A JP2008298478 A JP 2008298478A JP 5231183 B2 JP5231183 B2 JP 5231183B2
- Authority
- JP
- Japan
- Prior art keywords
- matrix
- test distribution
- feature point
- observation data
- data matrix
- 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.)
- Expired - Fee Related
Links
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Description
本発明は、物体を撮影した画像(二次元形状)系列から、その物体の三次元形状を復元する三次元形状復元装置に関する。 The present invention relates to a three-dimensional shape restoration apparatus that restores a three-dimensional shape of an object from a series of images (two-dimensional shape) obtained by photographing the object.
従来より、物体を撮影した画像系列を入力し、その物体について予め設定された複数の特徴点について、その特徴点の位置を画像面上で追跡し、追跡により得られた特徴点位置系列から物体の三次元形状を復元する装置が知られている。 Conventionally, an image sequence obtained by photographing an object is input, the positions of the feature points of a plurality of feature points set in advance for the object are tracked on the image plane, and the object is obtained from the feature point position sequence obtained by the tracking. An apparatus for restoring the three-dimensional shape is known.
この主の三次元復元装置の一つとして、特徴点位置系列から観測データ行列を生成し、その観測データ行列を、物体の形状(特徴点の三次元位置)を表す形状行列と、物体の運動を表す運動行列とに因子分解する手法を用いたものがある(例えば、特許文献1〜3参照)。 As one of the main three-dimensional reconstruction devices, an observation data matrix is generated from a feature point position sequence, and the observation data matrix is represented by a shape matrix representing the shape of the object (three-dimensional position of the feature point) and the motion of the object. There is a method using a method of factoring into a motion matrix representing (see, for example, Patent Documents 1 to 3).
但し、因子分解法は、観測データ行列を構成するデータが全て揃っていないと、有効な結果が得られないため、特徴点の隠れ,誤追跡,フレームアウト等によって、特徴点位置系列(ひいては観測データ行列を構成するデータ)の欠損が頻繁に生じる実問題への適用は、非常に困難であるという問題があった。 However, the factorization method cannot obtain effective results unless all the data that make up the observation data matrix is available, so the feature point position series (and thus the observation) There has been a problem that it is very difficult to apply to actual problems in which data (data constituting a data matrix) is frequently lost.
これに対して出願人は、データを統計的に扱い、データの確率分布の分散をデータの信頼度として考慮した計算を行うことによって、データの欠損に対処する手法を提案している(特許文献4参照)。 On the other hand, the applicant has proposed a method for dealing with data loss by statistically treating the data and performing a calculation considering the variance of the probability distribution of the data as the reliability of the data (Patent Literature). 4).
しかし、この手法でも、形状を推定すべき物体が人物の顔である場合、サングラスやスカーフ等の装飾品によって特徴点が隠れた状態が継続すると、検出精度が劣化してしまう。 However, even in this method, when the object whose shape is to be estimated is a human face, detection accuracy deteriorates if the state in which the feature points are hidden by decorative items such as sunglasses and a scarf continues.
このため、予め固定的に設定された特徴点(以下「固定特徴点」という)だけでなく、その都度検出される予め規定された特徴(例えば、撮像された物体のエッジやコーナー等)を有する地点(以下「任意特徴点」という)を検出し、この任意特徴点も利用することが検討されている。
しかし、任意特徴点は、物体上に限らず、物体の背景や物体以外の物体上であっても、その特徴を有していれば抽出されてしまう。 However, the arbitrary feature point is extracted not only on the object but also on the background of the object or on an object other than the object if it has the feature.
しかし、特許文献1〜4に記載の従来装置では、いずれも、観測データ行列を構成する特徴点が、単一の対象物に由来していることを前提とするものであるため、特徴点が複数の対象物に由来している場合には、形状行列(ひいては物体の形状)を正しく求めることができないという問題があった。 However, in the conventional devices described in Patent Documents 1 to 4, since the feature points constituting the observation data matrix are premised on being derived from a single object, the feature points are In the case of being derived from a plurality of objects, there is a problem that the shape matrix (and consequently the shape of the object) cannot be obtained correctly.
なお、各特徴点が、どの物体に由来するかを識別し、その識別された特徴点を用いて物体毎に作成した観測データ行列を、それぞれ因子分解する手法が考えられる。しかし、特徴点の識別を、別の画像処理等によって行う必要があり、処理量が増大するだけでなく、その識別が困難であり、十分な精度が得られないという問題があった。 Note that it is conceivable to identify which object each feature point is derived from, and factorize each observation data matrix created for each object using the identified feature point. However, the feature points need to be identified by another image processing or the like, which not only increases the amount of processing, but also makes it difficult to identify the feature points, resulting in a problem that sufficient accuracy cannot be obtained.
また、観測データ行列を因子分解して形状行列を得る手法において、三次元形状の推定精度を向上させるには、計算に用いる画像系列を増やす(即ち、観測データ行列の次元を大きくする)必要がある。 In addition, in the method of obtaining the shape matrix by factoring the observation data matrix, it is necessary to increase the image sequence used for the calculation (that is, to increase the dimension of the observation data matrix) in order to improve the estimation accuracy of the three-dimensional shape. is there.
しかし、因子分解の際に必要となる計算量は、通常、観測データ行列の行数×列数の3乗に比例することが知られており、観測データ行列の次元を大きくすることによって爆発的に増大する。 However, it is known that the amount of calculation required for factorization is usually proportional to the cube of the number of rows of the observation data matrix × the number of columns, and explosive by increasing the dimension of the observation data matrix. To increase.
そして、計算量が増大すると、三次元形状復元装置を車両に搭載する場合等のように、使用できる演算器の計算能力に制限がある場合には、適用することが困難になるという問題もあった。 And when the amount of calculation increases, there is a problem that it becomes difficult to apply when there is a limit to the calculation capability of an arithmetic unit that can be used, such as when a three-dimensional shape restoration device is mounted on a vehicle. It was.
本発明は、上記問題点を解決するために、三次元形状復元装置において、観測データ行列(特徴点位置系列)中に複数の物体に由来するデータが混在していても因子分解の実行を可能とすること、更には、計算時間を低減することを目的とする。 In order to solve the above problems, the present invention enables the factorization to be performed even if data derived from a plurality of objects is mixed in the observation data matrix (feature point position series) in the three-dimensional shape restoration apparatus. Furthermore, it aims at reducing calculation time.
上記目的を達成するためになされた本発明の三次元形状復元装置では、特徴点追跡手段が、画像系列を入力し、入力された各画像から予め設定された特徴を有する複数の特徴点を抽出すると共に、特徴点のそれぞれについて該特徴点の位置を画像面上で追跡する。 In the three-dimensional shape restoration apparatus of the present invention made to achieve the above object, the feature point tracking means inputs an image sequence and extracts a plurality of feature points having preset features from each input image. At the same time, the position of each feature point is tracked on the image plane.
また、観測データ行列生成手段は、特徴点抽出追跡手段での抽出,追跡結果に従って、特徴点の位置を表す観測データ行列を生成する。そして、分解手段が、観測データ行列生成手段にて生成された観測データ行列を因子分解して、画像に写された物体の三次元形状を表す形状行列および前記物体の運動を表す運動行列を生成する。 The observation data matrix generation unit generates an observation data matrix representing the position of the feature point according to the extraction and tracking result of the feature point extraction and tracking unit. Then, the decomposition means factorizes the observation data matrix generated by the observation data matrix generation means to generate a shape matrix that represents the three-dimensional shape of the object imaged in the image and a motion matrix that represents the motion of the object. To do.
このとき、分解手段は、観測データ行列をx、形状行列をz、特徴点のそれぞれが属する物体を指定する指定行列をh、運動行列,特徴点の測定の正確さ,特徴点がそれぞれの物体に属している確率をまとめたモデルパラメータをθとして、観測データ行列xから事後確率P(θ,z,h|x)を計算することで、θ,z,hを求める。 At this time, the decomposition means x is the observation data matrix, z is the shape matrix, h is the designation matrix that specifies the object to which each feature point belongs, h is the motion matrix, the accuracy of measurement of the feature point, and the feature point is the respective object. Θ, z, h are obtained by calculating a posteriori probability P (θ, z, h | x) from the observation data matrix x, where θ is a model parameter that summarizes the probabilities belonging to.
このように構成された本発明の三次元形状復元装置によれば、観測データ行列xが複数の物体に由来する特徴点で構成された混合データ行列であっても、因子分解を実行することができ、指定行列hによって分類される特徴点毎、即ち、特徴点が由来する物体毎に、形状行列や運動行列を求めることができる。 According to the three-dimensional shape restoration apparatus of the present invention configured as described above, factorization can be performed even if the observed data matrix x is a mixed data matrix composed of feature points derived from a plurality of objects. The shape matrix and the motion matrix can be obtained for each feature point classified by the designation matrix h, that is, for each object from which the feature point is derived.
なお、本発明において、分解手段は、請求項2に記載のように、事後確率P(θ,z,h|x)の近似関数である試験分布q(θ,h,z)が、第1試験分布q(θ)と第2試験分布q(h,z)とに因子化されるものとして、事後確率P(θ,z,h|x)と試験分布q(θ,h,z)とのKL距離を最小にする第1試験分布q(θ)及び第2試験分布q(h,z)を求めることで、確率的に因子分解計算を実行するように構成されていてもよい。 In the present invention, the decomposition means has a test distribution q (θ, h, z), which is an approximate function of the posterior probability P (θ, z, h | x), as described in claim 2. The posterior probabilities P (θ, z, h | x) and the test distribution q (θ, h, z) are factorized into the test distribution q (θ) and the second test distribution q (h, z). The first test distribution q (θ) and the second test distribution q (h, z) that minimize the KL distance may be calculated and the factorization calculation may be executed probabilistically.
このように構成された本発明の三次元形状復元装置によれば、形状行列zを求めるのと同時に、指定行列hもベイズ推定によって確率的に求められるため、因子分解以外の特別な処理を行うことなく、簡単に特徴点を物体毎に識別することができる。 According to the three-dimensional shape restoration apparatus of the present invention configured as described above, a special process other than factorization is performed because the specified matrix h is also obtained probabilistically by Bayesian estimation simultaneously with obtaining the shape matrix z. Therefore, the feature points can be easily identified for each object.
そして、このようにベイズ推定を用いた因子分解を行う場合、請求項3に記載のように、観測データ行列生成手段は、予め設定されたフレーム数分の画像に基づいて観測データ行列xを生成し、分解手段は、第1試験分布q(θ)を固定して第2試験分布q(z,h)を推定する第1のステップ、及び、前記第2試験分布q(z,h)を固定して前記第1試験分布q(θ)を推定する第2のステップを、互いの推定結果を用いて交互に繰り返し実行する推定手段と、予め設定された終了条件が満たされている場合に、前記推定手段を終了させる終了手段とからなり、最終的に得られた前記第2試験分布q(z,h)から形状行列z及び指定行列hを得るように構成されていてもよい。 When factorization using Bayesian estimation is performed as described above, the observation data matrix generation unit generates the observation data matrix x based on images for a preset number of frames as described in claim 3. The decomposition means fixes the first test distribution q (θ) and estimates the second test distribution q (z, h), and the second test distribution q (z, h). When the second step of estimating the first test distribution q (θ) in a fixed manner is repeatedly executed alternately using the estimation results, and when a preset end condition is satisfied And ending means for ending the estimating means, and may be configured to obtain the shape matrix z and the designated matrix h from the finally obtained second test distribution q (z, h).
この場合、分解手段は、変分ベイズ推定法を実現するものであり、第1のステップがEステップ、第2のステップがMステップに相当する。 In this case, the decomposition means implements a variational Bayesian estimation method, and the first step corresponds to the E step and the second step corresponds to the M step.
但し、変分ベイズ推定法を用いても、計算に用いる画像系列の増加(即ち、観測データ行列の次元の増大)に応じて、計算量(計算時間)が指数関数的に増大することを避けることはできない。 However, even when the variational Bayes estimation method is used, the amount of calculation (calculation time) is prevented from increasing exponentially in accordance with the increase in the image sequence used for the calculation (that is, the increase in the dimension of the observation data matrix). It is not possible.
そこで、請求項4に記載のように、観測データ行列生成手段は、1フレーム分の画像毎に前記観測データ行列xを生成し、分解手段は、観測データ行列生成手段にて観測データ行列xが生成される毎に、第1試験分布q(θ)を固定して第2試験分布q(z,h)を推定する第1のステップ、及び、第2試験分布q(z,h)を固定して第1試験分布q(θ)を推定する第2のステップを、互いの推定結果を用いて実行する推定手段と、予め設定された終了条件が満たされている場合に、推定手段及び更新手段を終了させる終了手段とからなり、推定手段によって逐次的に得られる第2試験分布q(z,h)から形状行列z及び指定行列hを得るように構成されていていることが望ましい。 Therefore, as described in claim 4, the observation data matrix generation unit generates the observation data matrix x for each image of one frame, and the decomposition unit determines that the observation data matrix x is generated by the observation data matrix generation unit. A first step of fixing the first test distribution q (θ) and estimating the second test distribution q (z, h) each time it is generated, and fixing the second test distribution q (z, h) Then, when the second step of estimating the first test distribution q (θ) is executed using the mutual estimation results, and when the preset end condition is satisfied, the estimation unit and the update It is desirable that it is configured so as to obtain the shape matrix z and the designated matrix h from the second test distribution q (z, h) sequentially obtained by the estimation means.
つまり、推定手段では、計算に用いる画像系列を制限して、第1のステップ(Eステップ),第2のステップ(Mステップ)を1回ずつ実行し、これを繰り返し実行すると共に、推定手段から計算結果が得られる毎に、その計算結果に基づいて形状行列の分布を更新する。これは、変分ベイズ推定法を逐次計算にて実現(いわゆるオンライン化)するものである。 In other words, the estimation means limits the image series used for the calculation, executes the first step (E step) and the second step (M step) once, repeatedly executes this, and from the estimation means Each time a calculation result is obtained, the distribution of the shape matrix is updated based on the calculation result. This realizes the variational Bayesian estimation method by sequential calculation (so-called online).
このように、本発明の三次元形状復元装置によれば、使用する画像系列を複数に分割し、その分割した画像系列毎に因子分解を実行するため、画像系列を増やしても、処理量は推定手段での1回の処理を単位として加算的に増大するだけで、指数関数的に増大することがないため、因子分解に要する処理負荷(ひいては処理に要する時間)を大幅に削減することができる。 Thus, according to the three-dimensional shape restoration apparatus of the present invention, the image sequence to be used is divided into a plurality of parts, and factorization is performed for each of the divided image sequences. Since it only increases incrementally in units of one process in the estimation means and does not increase exponentially, the processing load required for factorization (and thus the time required for processing) can be greatly reduced. it can.
そして、当該三次元形状復元装置は、請求項5に記載のように、自動車に搭載して使用するように構成されていてもよい。 And the said three-dimensional shape decompression | restoration apparatus may be comprised so that it may mount and use for a motor vehicle, as described in Claim 5.
自動車に搭載される演算器は一般的に計算能力が低いが、そのような場合でも適用することができる。 An arithmetic unit mounted on an automobile generally has a low calculation capability, but can be applied even in such a case.
以下に本発明の実施形態を図面と共に説明する。 Embodiments of the present invention will be described below with reference to the drawings.
[第1実施形態]
図1は、本発明を適用した三次元形状復元装置としての画像処理装置1の全体構成を示すブロック図である。なお、画像処理装置1は、車両に搭載され、ドライバの頭部を撮影した画像から、ドライバのわき見や居眠り等を検出するための情報である頭部姿勢を時系列的に求める処理を実行する装置である。
[First Embodiment]
FIG. 1 is a block diagram showing an overall configuration of an image processing apparatus 1 as a three-dimensional shape restoration apparatus to which the present invention is applied. The image processing apparatus 1 is mounted on a vehicle and executes processing for obtaining a head posture in time series, which is information for detecting a driver's sidewalk, doze, or the like from an image obtained by photographing the driver's head. Device.
<全体構成>
図1に示すように、画像処理装置1は、ドライバシートの前面上部又は下部(例えば、メータ内)に設置され、ドライバの頭部を含む画像を取得するカメラ2と、カメラ2が取得した画像を取り込む画像取込装置3と、画像取込装置3を介して取り込んだ入力画像sf (fはフレームを識別する識別子)から、予め設定された特徴を有する複数の特徴点の位置(画像面上での二次元座標)x(p) (p=1,2,…P)を抽出すると共に、その抽出された特徴点を追跡して、その特徴点の位置の分布を規定するための特徴点推定分布パラメータ(平均値xf ,分散Vf )を求める特徴点追跡部4とを備えている。
<Overall configuration>
As shown in FIG. 1, an image processing apparatus 1 is installed on the front upper part or lower part (for example, in a meter) of a driver seat, acquires an image including a driver's head, and an image acquired by the camera 2. The position of a plurality of feature points having a preset feature (image plane) from the image capturing device 3 that captures the image and the input image s f (f is an identifier for identifying a frame) captured via the image capturing device 3 Features for extracting the two-dimensional coordinates) x (p) (p = 1, 2,... P) and tracking the extracted feature points to define the distribution of the positions of the feature points And a feature point tracking unit 4 for obtaining point estimation distribution parameters (average value x f , variance V f ).
また、画像処理装置1は、特徴点の三次元位置(ひいては、頭部の三次元形状)を規定する顔モデル(形状行列)Ca を供給する顔モデル供給部5と、特徴点追跡部4から供給される特徴点推定分布パラメータ、顔モデル供給部5から供給される顔モデルCa に基づき、カルマンフィルタを用いて、ドライバの頭部姿勢を表すアフィンパラメータAf を推定する推定部6と、推定部6が推定したアフィンパラメータAf に従って、頭部姿勢θx,θy,θzを算出する頭部姿勢算出部7から構成される。 In addition, the image processing apparatus 1 includes a face model supply unit 5 that supplies a face model (shape matrix) C a that defines a three-dimensional position of a feature point (and thus a three-dimensional shape of the head), and a feature point tracking unit 4. An estimation unit 6 for estimating an affine parameter A f representing the head posture of the driver using a Kalman filter based on the feature point estimation distribution parameter supplied from the face model and the face model C a supplied from the face model supply unit 5; According to the affine parameter A f estimated by the estimation unit 6, the head posture calculation unit 7 is configured to calculate the head postures θx, θy, and θz.
<特徴点追跡部>
特徴点追跡部4は、目尻,目頭,口元、鼻(鼻の穴,鼻の中心,鼻の左右端)等(図2(a)参照)、ドライバの顔の特徴を表す複数の特徴点(以下「固定特徴点」ともいう)の位置を抽出,追跡するする固定特徴点追跡部41と、画像中の追跡し易い特徴(例えば、撮像された物体のエッジやコーナ等)を有する部位(以下「任意特徴点」ともいう)の位置を抽出,追跡する任意特徴点追跡部43とからなる。
<Feature point tracking unit>
The feature point tracking unit 4 includes a plurality of feature points representing the features of the driver's face, such as the corners of the eyes, the eyes, the mouth, the nose (the nostrils, the center of the nose, the left and right ends of the nose), etc. (see FIG. 2A). A fixed feature point tracking unit 41 that extracts and tracks the position of the “fixed feature point” (hereinafter also referred to as “fixed feature point”), and a part (hereinafter, an edge or a corner of the imaged object) that is easy to track in the image And an arbitrary feature point tracking unit 43 for extracting and tracking the position of “optional feature point”.
そして、固定特徴点追跡部41は、予め用意されたテンプレートを用いて入力画像sf とのテンプレートマッチングによって、固定特徴点の抽出,追跡を行う。なお、テンプレートは、具体的には、図2(a)中の点線白枠にて示すようなものとなる。但し、図では、左口元、鼻の中心、左目尻についてのみ示す。 The fixed feature point tracking unit 41 extracts and tracks fixed feature points by template matching with the input image s f using a template prepared in advance. The template is specifically as shown by a dotted white frame in FIG. However, in the figure, only the left mouth, the center of the nose, and the left eye corner are shown.
一方、任意特徴点追跡部43は、SIFT(Scale Invariant Feature Transform) やKLT(Kanade-Lucas-Tomasi) といった周知の特徴点検出器を用いて任意特徴点の抽出,追跡を行う。 On the other hand, the arbitrary feature point tracking unit 43 extracts and tracks arbitrary feature points using a known feature point detector such as SIFT (Scale Invariant Feature Transform) or KLT (Kanade-Lucas-Tomasi).
ここで、図3は、任意特徴点追跡部43により抽出される任意特徴点の例を示す説明図である。但し、(a)が入力画像、(b)が固定特徴点追跡部41によって抽出される固定特徴点、(c)が任意特徴点追跡部43によって抽出される任意特徴点を示す。 Here, FIG. 3 is an explanatory diagram illustrating an example of arbitrary feature points extracted by the arbitrary feature point tracking unit 43. However, (a) is an input image, (b) is a fixed feature point extracted by the fixed feature point tracking unit 41, and (c) is an arbitrary feature point extracted by the arbitrary feature point tracking unit 43.
図3に示すように、任意特徴点は、ドライバ頭部からだけでなく、背景(車室)からも抽出されることになる。但し、ドライバがサングラス等を装着して固定特徴点(目尻,目頭等)が隠れたとしても、サングラスの輪郭等から多数の任意特徴点が抽出されることになる。 As shown in FIG. 3, the arbitrary feature points are extracted not only from the driver's head but also from the background (vehicle compartment). However, even if the driver wears sunglasses or the like and the fixed feature points (eye corners, eye heads, etc.) are hidden, many arbitrary feature points are extracted from the contours of the sunglasses.
つまり、特徴点追跡部4では、常時追跡対象となる固定特徴点以外に、任意特徴点が適宜、追跡対象として追加されることになる。 That is, in the feature point tracking unit 4, arbitrary feature points are appropriately added as tracking targets in addition to the fixed feature points that are always tracked targets.
但し、任意特徴点追跡部4は、任意特徴点の中で固定特徴点と一致するものを追跡対象から除外すると共に、後述する顔モデル供給部5からドライバ頭部に位置する特徴点(以下「頭部特徴点」という)の情報が得られた後は、その情報に基づいて、頭部特徴点以外の任意特徴点を追跡対象から除外するように構成されている。 However, the arbitrary feature point tracking unit 4 excludes any of the arbitrary feature points that coincide with the fixed feature points from the tracking target, and also features points (hereinafter referred to as “hereinafter“ After the information of “head feature points” is obtained, arbitrary feature points other than the head feature points are excluded from the tracking target based on the information.
また、固定特徴点及び任意特徴点の追跡には、いずれも、パーティクルフィルタが用いられており、その処理に必要な事後確率p(xf|Af)は、推定部6から供給を受けるように構成されている。 Further, both the fixed feature point and the arbitrary feature point are tracked using a particle filter, and the posterior probability p (x f | A f ) necessary for the processing is supplied from the estimation unit 6. It is configured.
<顔モデル>
顔モデル供給部5から供給される顔モデルCa は、特徴点追跡部4にて追跡される特徴点のうち、ドライバの顔上に位置するものの位置を三次元的に規定するものであり、図4に示すように、画像面における水平方向の座標軸をu軸、垂直方向の座標軸をv軸、三次元空間における水平方向の座標軸をX軸、垂直方向の座標軸をY軸、光軸方向(奥行き方向)の座標軸をZ軸として(1)(2)式で表される。但し、z(p) は、特徴点追跡部4で抽出されたp番目の特徴点(特徴点位置x(p) =(u(p),v(p))の3次元空間内での座標である。
<Face model>
The face model C a supplied from the face model supply unit 5 three-dimensionally defines the position of the feature point tracked by the feature point tracking unit 4 on the driver's face, As shown in FIG. 4, the horizontal coordinate axis on the image plane is the u axis, the vertical coordinate axis is the v axis, the horizontal coordinate axis in the three-dimensional space is the X axis, the vertical coordinate axis is the Y axis, and the optical axis direction ( The coordinate axis in the depth direction is expressed by the equations (1) and (2) with the Z axis as the Z axis. However, z (p) is the coordinate in the three-dimensional space of the p-th feature point (feature point position x (p) = (u (p) , v (p) ) extracted by the feature point tracking unit 4. It is.
推定部6で推定されるアフィンパラメータAf は、実世界(三次元のXYZ空間)における座標変換を、射影面である画像面(二次元のuv平面)上での座標変換として表す際に用いる変換行列であり、(3)(4)式に示す関係を有する。
The affine parameter A f estimated by the estimation unit 6 is used to express coordinate transformation in the real world (three-dimensional XYZ space) as coordinate transformation on an image plane (two-dimensional uv plane) that is a projection plane. It is a transformation matrix and has the relationship shown in equations (3) and (4).
但し、ある特徴点の三次元座標を(X,Y,Z)T ,座標変換後の三次元座標を(X’,Y’,Z’)T 、これら三次元座標を画像面上に射影した二次元座標、すなわち画像面上での特徴点の座標を(u,v)T,(u’,v’)Tとして、X=u,Y=v(すなわちX’=u’,Y’=v’)であると仮定する。 However, the three-dimensional coordinates of a certain feature point are (X, Y, Z) T , the three-dimensional coordinates after coordinate transformation are (X ′, Y ′, Z ′) T , and these three-dimensional coordinates are projected onto the image plane. Two-dimensional coordinates, that is, the coordinates of feature points on the image plane are (u, v) T and (u ′, v ′) T , and X = u, Y = v (that is, X ′ = u ′, Y ′ = v ′).
頭部姿勢算出部7では、頭部姿勢情報として、頭部の3軸角度θx,θy,θzを(5)〜(7)式を用いて算出する。
The head posture calculation unit 7 calculates the three-axis angles θx, θy, θz of the head using equations (5) to (7) as head posture information.
また、このようなアフィンパラメータAf には、カメラパラメータ(カメラの焦点距離、設置場所、向き等)及びドライバの頭部姿勢の変化を全て反映させることができる。 In addition, such affine parameters Af can reflect all changes in camera parameters (camera focal length, installation location, orientation, etc.) and driver's head posture.
<特徴点追跡部及び推定部での処理の概要>
ここで、図5は、特徴点追跡部4及び推定部6が扱う状態空間モデルを表すグラフである。
<Outline of processing in feature point tracking unit and estimation unit>
Here, FIG. 5 is a graph showing a state space model handled by the feature point tracking unit 4 and the estimation unit 6.
図5に示すように、フレームfにおける顔モデルの姿勢を表すアフィンパラメータAf を隠れ状態として求める上位層(推定部6)と、フレームfにおける特徴点群の位置xf =(xf (1),xf (2),…,xf (P))T を隠れ状態として求めるP個の追跡器からなる下位層(特徴点追跡部4)を備えており、フレーム1からfまでに入力された入力画像系列s1:f から、これら隠れ状態Af ,xf を、時系列ベイズ推定により推定するものである。 As shown in FIG. 5, the upper layer (estimator 6) that obtains the affine parameter A f representing the posture of the face model in the frame f as a hidden state, and the position x f = (x f (1 ) , X f (2) ,..., X f (P) ) It has a lower layer (feature point tracking unit 4) consisting of P number of trackers that find T as a hidden state. The hidden states A f and x f are estimated from the input image sequence s 1: f by time series Bayesian estimation.
なお、時系列ベイズ推定は、図6に示すように、状態変数をすべて確率変数として扱い、隠れ状態に関するフレームf−1における推定結果(推定分布)からフレームfにおける予測分布を求めると共に、フレームfにおける観測データから、検出すべき隠れ状態であるもっともらしさ(尤度)を求め、これら予測分布と尤度を考慮してフレームfにおける推定結果(推定分布)を得るという手順を繰り返すことで、逐次的に隠れ状態を推定するものである。 As shown in FIG. 6, time series Bayesian estimation treats all state variables as random variables, obtains a predicted distribution in frame f from an estimation result (estimated distribution) in frame f-1 regarding the hidden state, By repeating the procedure of obtaining the likelihood (likelihood) that is the hidden state to be detected from the observation data at, and obtaining the estimation result (estimation distribution) in the frame f in consideration of these prediction distribution and likelihood, The hidden state is estimated.
つまり、入力画像系列(観測データ)s1:f に基づいて、アフィンパラメータ(頭部姿勢の隠れ状態)Af を推定した事後確率(推定分布)p(Af|s1:f)を求めることになり、これを数式で記述すると(8)(9)式で表される。 That is, based on the input image sequence (observation data) s 1: f , the posterior probability (estimated distribution) p (A f | s 1: f ) obtained by estimating the affine parameter (head posture hidden state) A f is obtained. When this is described by mathematical formulas, it is represented by formulas (8) and (9).
そして、(8)式の部分を下位層(特徴点追跡部4)がパーティクルフィルタを用いて推定し、(9)式の部分を上位層(推定部6)がカルマンフィルタを用いて推定する。 The lower layer (feature point tracking unit 4) estimates the part of equation (8) using a particle filter, and the upper layer (estimator 6) estimates the portion of equation (9) using a Kalman filter.
なお、あるパラメータの確率分布がガウス分布(正規分布)に従う場合、そのパラメータの確率分布の計算は、実際には、その平均xf と分散Vf を求めれば十分である。 When the probability distribution of a certain parameter follows a Gaussian distribution (normal distribution), the calculation of the probability distribution of the parameter is actually sufficient if the average x f and the variance V f are obtained.
なお、このような推定部6の具体的な構成は、例えば、特願2005−368124号等に、また、特徴点追跡部4の具体的な構成は、例えば、特願2007−102914号等に詳述されているため、ここではその詳細についての説明を省略する。 The specific configuration of the estimation unit 6 is described in, for example, Japanese Patent Application No. 2005-368124, and the specific configuration of the feature point tracking unit 4 is, for example, in Japanese Patent Application No. 2007-102914. Since it is described in detail, a detailed description thereof is omitted here.
<顔モデル供給部>
次に、本発明の主要部である顔モデル供給部5について詳述する。
<Face model supply department>
Next, the face model supply unit 5 which is a main part of the present invention will be described in detail.
顔モデル供給部5は、図1に示すように、頭部を撮影した複数人分の映像から、それぞれ固定特徴点を抽出し、その抽出した結果に基づいて設定された平均的な固定特徴点の配置を表す平均顔モデルを記憶する平均顔モデル記憶部51と、外部からの起動指令によって起動し、特徴点追跡部4から逐次供給される特徴点推定分布パラメータxf に基づいて、カメラ2の被写体であるドライバ頭部に由来する特徴点(固定特徴点及び任意特徴点)の配置を表す個人顔モデルを、学習,生成する個人顔モデル学習部52と、個人顔モデル学習部52からの切替信号に従って、平均顔モデル記憶部51に記憶された平均顔モデル、個人顔モデル学習部52にて生成された個人顔モデルのいずれかを、顔モデルCa として選択して推定部6に供給する顔モデル切替部53とを備えている。 As shown in FIG. 1, the face model supply unit 5 extracts fixed feature points from the images of a plurality of people whose heads are photographed, and average fixed feature points set based on the extracted results. Based on the average face model storage unit 51 for storing the average face model representing the arrangement of the image and the feature point estimation distribution parameter x f that is activated by an activation command from the outside and is sequentially supplied from the feature point tracking unit 4 An individual face model learning unit 52 that learns and generates a personal face model representing the arrangement of feature points (fixed feature points and arbitrary feature points) derived from the driver's head, which is a subject, and an individual face model learning unit 52 In accordance with the switching signal, either the average face model stored in the average face model storage unit 51 or the individual face model generated by the individual face model learning unit 52 is selected as the face model C a and supplied to the estimation unit 6. Face to do And a model switching unit 53.
なお、個人顔モデル学習部52が本発明の三次元形状復元装置に相当し、複数の物体(例えば、ドライバ,車両,車両の窓に映る車外の風景など)に由来する特徴点xf が、それぞれどの物体に由来するものであるかを示す情報と、特徴点が由来する各物体(特にドライバの頭部)の形状とを同時に学習するものである。 Note that the individual face model learning unit 52 corresponds to the three-dimensional shape restoration device of the present invention, and the feature point x f derived from a plurality of objects (for example, a driver, a vehicle, a scenery outside the vehicle reflected in a vehicle window, etc.) Information indicating which object each is derived from and the shape of each object (especially the head of the driver) from which the feature points are derived are simultaneously learned.
<学習の概要>
個人顔モデル学習部52では、以下に示す手法により学習を行う。
<Summary of learning>
The personal face model learning unit 52 performs learning by the following method.
<モデル>
まず、学習に適用するモデルについて説明する。
<Model>
First, a model applied to learning will be described.
ここでは、物体が複数存在する場合の観測データ(特徴点群)の生成過程を考えると、生成過程が複数あって、各過程が確率的に選択されるMixtures of PPCA(Probabilistic Principal Component Analysis;確率的主成分分析)によってモデル化するものとする。 Here, considering the generation process of observation data (feature point group) when there are multiple objects, there are multiple generation processes, and each process is selected probabilistically. Modeled by dynamic principal component analysis).
まず、カメラによる画像の撮影を、三次元空間から二次元平面への線形写像(アフィンカメラ)と仮定する。撮像される物体の形状は時不変の剛体だとして、P個の特徴点の三次元位置を表す行列zを(10)式、フレームfの画像上での各特徴点の位置を表す行列xf を(11)式で表すものとする。但し、p番目の特徴点の三次元位置をz(p) 、フレームfにおけるp番目の特徴点の二次元位置をxf (p)とする。 First, it is assumed that image capturing by a camera is a linear mapping (affine camera) from a three-dimensional space to a two-dimensional plane. Assuming that the shape of the object to be imaged is a time-invariant rigid body, a matrix z representing the three-dimensional positions of the P feature points is expressed by equation (10), and a matrix x f representing the position of each feature point on the image of the frame f. Is expressed by equation (11). However, the three-dimensional position of the p-th feature point is z (p) , and the two-dimensional position of the p-th feature point in the frame f is x f (p) .
そして、P個の特徴点をフレーム数Fに渡って観測(特徴点追跡部4から取得)したとすると、(13)式に示す観測データ行列xが得られる。 Then, if P feature points are observed over the number of frames F (obtained from the feature point tracking unit 4), an observation data matrix x represented by equation (13) is obtained.
また、物体uに関して測定された特徴点の数をPu で表すものとすると、特徴点の総数Pは、(16)式で表される。 Further, assuming that the number of feature points measured for the object u is represented by P u , the total number P of feature points is represented by equation (16).
また、物体uに関する測定に混入するノイズεは期待値0、分散τ|u -1の正規分布に従うものとする。 Further, it is assumed that the noise ε mixed in the measurement relating to the object u follows a normal distribution with an expected value of 0 and a variance τ | u −1 .
特徴点pが物体uに属すると仮定すると、特徴点pのノイズの分布p(εp )は、(20)式で表されることになる。但し、d次元ベクトルとして表された確率変数xが期待値m、共分散Σの正規分布に従うことをN(x|m,Σ)で示し、その内容は(21)式で定義されるものとする。 Assuming that the feature point p belongs to the object u, the noise distribution p (ε p ) of the feature point p is expressed by equation (20). However, N (x | m, Σ) indicates that the random variable x expressed as a d-dimensional vector follows the normal distribution of the expected value m and covariance Σ, and the content is defined by the equation (21). To do.
これらの関係を図示したグラフィカルモデルを図7に示す。 A graphical model illustrating these relationships is shown in FIG.
なお、以下では、式の記述を簡略化するために、(22)(23)式に示すモデルパラメータθ,Jを用いるものとする。 In the following, model parameters θ and J shown in equations (22) and (23) are used to simplify the description of the equations.
また、事後分布(事後確率)p(θ,z,h|x)はベイズ推定により、(24)式のように記述される。 Further, the posterior distribution (posterior probability) p (θ, z, h | x) is described as shown in Equation (24) by Bayesian estimation.
<変分推定法>
変分推定法では、事後分布p(θ,h,z|x)の近似関数である試験分布q(θ,h,z)を計算する。但し、q(θ,h,z)=q(θ)q(h,z)と因子化されると仮定して、試験分布q(θ,h,z)と真の事後分布p(θ,h,z|x)との間のKL(Kullback-Leibler)疑似距離を最小化するように、試験分布q(θ)q(h,z)を調節する。
<Variation estimation method>
In the variation estimation method, a test distribution q (θ, h, z) that is an approximate function of the posterior distribution p (θ, h, z | x) is calculated. However, assuming that q (θ, h, z) = q (θ) q (h, z) is factorized, the test distribution q (θ, h, z) and the true posterior distribution p (θ, The test distribution q (θ) q (h, z) is adjusted so as to minimize a KL (Kullback-Leibler) pseudorange between h, z | x).
ところで、KL疑似距離を最小にする試験分布を求めるということは、自由エネルギーを最大にする試験分布を求めることに等しいことが知られている。つまり、変分推定法では、この自由エネルギーを最大にする試験分布が最も妥当な推定解であるということになる。 By the way, it is known that obtaining a test distribution that minimizes the KL pseudorange is equivalent to obtaining a test distribution that maximizes free energy. That is, in the variation estimation method, the test distribution that maximizes the free energy is the most appropriate estimated solution.
本件の場合、自由エネルギーFE は(31)式で表される。また、この場合、自由エネルギーFE を最大化する試験分布q(θ,h,z)は、事前の同時分布p0(J) に基づいて、(32)式及び(33)式に示す条件を満たすことが知られている。 In this case, free energy FE is expressed by equation (31). In this case, free energy F E It is known that the test distribution q (θ, h, z) that maximizes the condition satisfies the conditions shown in the equations (32) and (33) based on the prior simultaneous distribution p 0 (J).
この条件式(32)(33)を展開して得られる式は、推定対象であるθ,h,zが互いに依存した形式となっているため、明示的な解を得ることができない。しかし、条件式(32)(33)を繰り返し適用することは、自由エネルギーFE を対象とした勾配法を行うことに等しいため、近似的な解を得ることができる。 Expressions obtained by developing the conditional expressions (32) and (33) are in a form in which θ, h, and z that are estimation targets are mutually dependent, and thus an explicit solution cannot be obtained. However, applying the conditional expressions (32) and (33) repeatedly is free energy F E Since this is equivalent to performing the gradient method for, an approximate solution can be obtained.
具体的には、変分ベイズ法のEステップでは、試験分布q(θ)を固定した上で、試験分布q(h,z)を求め、変分ベイズ法のMステップでは、試験分布q(h,z)を固定した上で、試験分布q(θ)を求めるものとする。 Specifically, in the E step of the variational Bayes method, the test distribution q (θ) is fixed and the test distribution q (h, z) is obtained. In the M step of the variational Bayes method, the test distribution q ( The test distribution q (θ) is obtained after fixing h, z).
ここで、Eステップで求める各試験分布を(34)〜(36)式のようにパラメータ付けする。 Here, each test distribution obtained in the E step is parameterized as shown in equations (34) to (36).
ここで、個人顔モデル学習部52が実行する処理を、図8に示すフローチャートに沿って説明する。なお、本処理は、外部からの起動指令の入力により起動される。
Here, the process executed by the individual face model learning unit 52 will be described with reference to the flowchart shown in FIG. Note that this process is activated by an input of an activation command from the outside.
本処理が起動すると、まず、S110では、顔モデル切替部53が推定部6に供給する顔モデルCa として、平均顔モデル記憶部51に記憶された平均顔モデルを選択するように切替信号を出力して、S120に進む。 When this processing is started, first, in S110, the face model C a supply face model switching section 53 to the estimating portion 6, a switching signal to select the average face model stored in the average face model storage unit 51 Output, and proceed to S120.
これにより、推定部6では、画像(フレーム)が入力される毎に、平均顔モデルを用いたアフィンパラメータAf 、及び特徴点推定分布パラメータxf,Vfの算出が行われる。また、頭部姿勢算出部7では、推定部6にて求められたアフィンパラメータAf に基づいて、頭部姿勢θx,θy,θzの算出が行われる。 Thereby, every time an image (frame) is input, the estimation unit 6 calculates the affine parameters A f and the feature point estimation distribution parameters x f and V f using the average face model. Further, the head posture calculation unit 7 calculates the head postures θx, θy, and θz based on the affine parameters A f obtained by the estimation unit 6.
S120では、モデルパラメータθの試験分布である第1試験分布q(θ)を初期化してS130に進む。 In S120, the first test distribution q (θ) that is the test distribution of the model parameter θ is initialized, and the process proceeds to S130.
具体的には、(54)式に示した分布パラメータΘM 及び、(55)式に示した十分統計量r初期化され、例えば、全ての要素が、同じ一定値(例えば、0又は1又は0.5)に設定される。 Specifically, the distribution parameter Θ M shown in the equation (54) and the sufficient statistic r shown in the equation (55) are initialized. For example, all the elements have the same constant value (for example, 0 or 1 or 0.5).
S130では、特徴点追跡部4から予め設定された規定フレーム数F個分の特徴点パラメータxf ((11)式参照)の取得を完了したか否かを判断し、完了していなければ、完了するまで待機する。 In S130, it is determined whether or not the acquisition of feature point parameters x f (see formula (11)) for a predetermined number F of preset frames from the feature point tracking unit 4 is completed. Wait for completion.
そして規定フレーム数F分の特徴点パラメータxf の取得を完了すると、これらをまとめた観測データ行列x((13)式参照)を生成してS140に移行し、設定されている分布パラメータΘM に基づいて、第2試験分布q(z,h)の算出、即ち、変分ベイズのEステップとしての処理を実行して、S150へ進む。 When the acquisition of the feature point parameters x f for the specified number of frames F is completed, an observation data matrix x (see equation (13)) that summarizes these is generated, and the process proceeds to S140, and the set distribution parameter Θ M Based on the above, the calculation of the second test distribution q (z, h), that is, the process as the E step of variational Bayes is executed, and the process proceeds to S150.
具体的には、(53)式に示す分布パラメータΘS を、(42)〜(46)式に従って算出する。 Specifically, the distribution parameter Θ S shown in the equation (53) is calculated according to the equations (42) to (46).
S150では、観測データ行列x及びS140での第2試験分布q(z,h)の算出結果に従って、十分統計量rを更新し、続くS160では、第1試験分布q(θ)の算出、即ち、変分ベイズのMステップとしての処理を実行して、S170に進む。 In S150, the statistical amount r is sufficiently updated according to the observation data matrix x and the calculation result of the second test distribution q (z, h) in S140, and in S160, the calculation of the first test distribution q (θ), that is, Then, the process as the M step of variational Bayes is executed, and the process proceeds to S170.
具体的には、(54)式に示す分布パラメータΘM を、S150にて算出された十分統計量rを用い、(47)〜(52)式に従って算出する。 Specifically, the distribution parameter Θ M shown in the equation (54) is calculated according to the equations (47) to (52) using the sufficient statistic r calculated in S150.
S170では、S140,S160での算出結果に基づき、上述の(31)式を用いて自由エネルギーFE を算出してS190に進む。 In S170, S140, based on the calculation result in S160, the free energy F E using the above-described (31) equation Is calculated and the process proceeds to S190.
但し、自由エネルギーFE は、上述の処理によって得られた第1試験分布q(θ)及び第2試験分布q(h,z)から求められる運動行列Wおよび形状行列zに基づいて推定される位置と、観測により得られた位置(観測データ行列x)とが近いほど大きな値となる。 However, the free energy F E is estimated based on the motion matrix W and the shape matrix z obtained from the first test distribution q (θ) and the second test distribution q (h, z) obtained by the above-described processing. The closer the position is to the position (observation data matrix x) obtained by observation, the larger the value.
S180では、S170にて算出された自由エネルギーFE が、予め設定されたエネルギー閾値より大きいことを終了条件として、その終了条件を充足しているか否かを判断し、充足していなければ、S140に戻って、S140〜S170の処理を繰り返し、一方、終了条件を充足していれば、S190に移行する。 In S180, the free energy F E calculated in S170. Is set to be larger than a preset energy threshold, and it is determined whether or not the end condition is satisfied. If not satisfied, the process returns to S140, and the processes of S140 to S170 are repeated. If the end condition is satisfied, the process proceeds to S190.
ここでは、エネルギー閾値として、例えば、平均顔モデルを表す形状行列と、上述の処理で得られた運動行列Wとを用いて算出した自由エネルギー、またはその自由エネルギーより大きな値に設定された固定値を用いる。 Here, as the energy threshold, for example, the free energy calculated using the shape matrix representing the average face model and the motion matrix W obtained by the above processing, or a fixed value set to a value larger than the free energy Is used.
S190では、各特徴点p(p=1,2,…,P)について、その特徴点が由来する物体uを、(56)式に示す判別式を用いて判別し、その判別結果からドライバの頭部に由来する特徴点(以下「頭部特徴点」という)のみを抽出して特徴点追跡部4に通知する。 In S190, for each feature point p (p = 1, 2,..., P), the object u from which the feature point is derived is discriminated using the discriminant shown in equation (56), and the driver's Only feature points derived from the head (hereinafter referred to as “head feature points”) are extracted and notified to the feature point tracking unit 4.
S200では、第2試験分布q(h,z)から求められた形状行列のうち、S190にて得られた頭部特徴点に基づく部分のみを抽出した部分形状行列を生成し、その部分形状行列を個人顔モデルとして出力すると共に、顔モデル切替部53が推定部6に供給する顔モデルCa として、個人顔モデルを選択するように切替信号を出力して、本処理を終了する。 In S200, a partial shape matrix in which only a portion based on the head feature point obtained in S190 is extracted from the shape matrix obtained from the second test distribution q (h, z) is generated, and the partial shape matrix is generated. the outputs as an individual face model, as face model C a supply face model switching section 53 to the estimating unit 6, and outputs a switching signal to select the individual face model, and the process ends.
これにより、以後、推定部6では、画像(フレーム)が入力される毎に、個人顔モデルを用いたアフィンパラメータAf の算出が行われ、更に、そのアフィンパラメータAf に基づいて、頭部姿勢算出部7では、頭部姿勢θx,θy,θzの算出が行われる。 Thereby, thereafter, every time an image (frame) is input, the estimation unit 6 calculates the affine parameter A f using the individual face model, and further, based on the affine parameter A f , The posture calculation unit 7 calculates head postures θx, θy, and θz.
<効果>
以上説明したように、画像処理装置1では、頭部姿勢θx,θy,θzを推定する処理を開始した直後は、固定特徴点に基づく平均顔モデルを用いてアフィンパラメータAf の算出(顔向き推定)を行い、これと並行して、任意特徴点も利用した個人顔モデルの学習を実行し、その個人顔モデルの精度が十分に向上した時点で、平均顔モデルから個人顔モデルへの切替を行うようにされている。
<Effect>
As described above, the image processing apparatus 1 calculates the affine parameter Af using the average face model based on the fixed feature points (face orientation) immediately after the process of estimating the head postures θx, θy, and θz is started. In parallel with this, learning of the individual face model using arbitrary feature points is executed, and when the accuracy of the individual face model is sufficiently improved, switching from the average face model to the individual face model is performed. Have been to do.
従って、画像処理装置1によれば、ドライバが誰であっても、また、ドライバが身につける物品(サングラス,マスク,帽子,スカーフ等)によって、固定特徴点を抽出することができない場合であっても、頭部姿勢θx,θy,θzの推定を、処理の初期段階から、安定した精度の推定結果を得ることができ、しかも、平均顔モデルから個人顔モデルへの切替後は、高い精度の推定結果を得ることができる。 Therefore, according to the image processing apparatus 1, no fixed feature point can be extracted regardless of who the driver is or the article (sunglasses, mask, hat, scarf, etc.) worn by the driver. However, the estimation of the head postures θx, θy, and θz can be obtained from the initial stage of the processing with a stable accuracy estimation result, and after switching from the average face model to the individual face model, the accuracy is high. Can be obtained.
また、画像処理装置1では、観測データ行列xを因子分解する際に、指定行列hを導入して、各特徴点がどの物体に由来するかを同時に推定するようにされている。 Further, in the image processing apparatus 1, when the observation data matrix x is factorized, a designation matrix h is introduced to simultaneously estimate which object each feature point is derived from.
従って、画像処理装置1によれば、観測データ行列xに、ドライバ頭部に由来する特徴点(頭部特徴点)だけでなく、ドライバの頭部以外の物体(例えば、車両や窓に映る車外の景色等)に由来する特徴点(非頭部特徴点)が含まれていたとしても、即ち、観測データ行列xが混合データ行列であったとしても、その観測データ行列xを因子分解した結果から、物体の形状を個別に推定することができ、ひいてはドライバ頭部の形状を精度よく推定することができる。 Therefore, according to the image processing apparatus 1, not only the feature point (head feature point) derived from the driver's head but also an object other than the driver's head (for example, outside the vehicle reflected in the vehicle or window) Even if a feature point (non-head feature point) derived from the scenery of the image is included, that is, even if the observation data matrix x is a mixed data matrix, the result of factorizing the observation data matrix x Therefore, the shape of the object can be estimated individually, and as a result, the shape of the driver's head can be estimated with high accuracy.
また、画像処理装置1では、個人顔モデル学習部52にて得られた頭部特徴点の情報を、特徴点追跡部4にて供給するようにされているため、特徴点追跡部4では、頭部特徴点の情報に基づいて任意特徴点を選別することができ、その選別結果に基づき、例えば、非頭部特徴点の追跡を中止することによって、不要な追跡処理が実行されることを防止することができる。 Further, in the image processing apparatus 1, the feature point tracking unit 4 supplies information on the head feature points obtained by the individual face model learning unit 52. Arbitrary feature points can be selected based on the information of the head feature points, and unnecessary tracking processing can be executed based on the selection result, for example, by stopping tracking of non-head feature points. Can be prevented.
[第2実施形態]
次に、第2実施形態について説明する。
[Second Embodiment]
Next, a second embodiment will be described.
なお、本実施形態では、個人顔モデル学習部52での処理内容の一部が、第1実施形態のものとは異なるだけであるため、この相違する部分を中心に説明する。 In the present embodiment, only a part of the processing content in the individual face model learning unit 52 is different from that in the first embodiment, and thus this difference will be mainly described.
詳しくは、第1実施形態では、規定フレーム数F分の特徴点データが得られた後に、因子分解を一括して行う、いわゆるバッチ手法を用いているが、本実施形態では、1フレーム分の特徴点データを取得する毎に、逐次的にθ,h,zを推定する、所謂、オンライン推定法を実行するものである。 Specifically, in the first embodiment, a so-called batch method is used in which factorization is performed in a lump after feature point data for the specified number of frames F has been obtained. A so-called online estimation method is executed in which θ, h, and z are sequentially estimated each time feature point data is acquired.
<オンライン推定法の概要>
オンライン推定法では、(31)式に示す自由エネルギーFE を、(57)式に示すように、オンライン推定に適した形式のオンライン自由エネルギーFEλに置き換えて使用する。
<Outline of online estimation method>
In the online estimation method, the free energy F E shown in the equation (31) is replaced with an online free energy F E λ in a form suitable for online estimation as shown in the equation (57).
但し、忘却係数をλ(但し、0<λ<1)、現フレームをfc 、フレームfまでの観測に基づいた試験分布を(58)式、十分統計量を(59)式、忘却係数の影響を正規化するための係数を(60)式で表すものとする。 However, the forgetting factor is λ (where 0 <λ <1), the current frame is f c , the test distribution based on observations up to frame f is Equation (58), the sufficient statistics are Equation (59), and the forgetting factor is A coefficient for normalizing the influence is expressed by equation (60).
そして、十分統計量rfの減衰係数付き和は(62)式に示すように逐次的に計算することができ、また、正規化項も(63)式に示すように逐次的に計算することができる。 Then, the sum of the sufficient statistics r f with the attenuation coefficient can be calculated sequentially as shown in equation (62), and the normalization term is also calculated sequentially as shown in equation (63). Can do.
図9は、個人顔モデル学習部52が実行する処理の内容を示すフローチャートである。
FIG. 9 is a flowchart showing the contents of processing executed by the individual face model learning unit 52.
第1実施形態の場合と同様に、本処理は、初期化指令の入力により起動され、S310〜S340は、第1実施形態のS110〜S140と同様であるため説明を省略する。 As in the case of the first embodiment, this process is activated by the input of an initialization command, and steps S310 to S340 are the same as steps S110 to S140 of the first embodiment, and thus description thereof is omitted.
但し、S130にて使用される規定個数は、第1実施形態の場合より少ない数(例えば、数分の一から数十分の一程度)でよく、ここでは1とされている。 However, the specified number used in S130 may be a smaller number (for example, about a fraction to a fraction of a tenth) as in the first embodiment, and is 1 here.
そして、S350では、観測データ行列xf 及びS340での第2試験分布q(z,h)の算出結果に基づき、(62)(63)式を用いて、十分統計量<<r>>fcを更新し、続くS360では、第1試験分布q(θ)の算出、即ち、変分ベイズのMステップとしての処理を実行して、S170に進む。 Then, in S350, based on the observed data matrix x f and the second trial distribution q (z, h) at S340 calculation result of (62) (63) using the formula, sufficient statistics << r >> fc In the following S360, the calculation of the first test distribution q (θ), that is, the process as the M step of variational Bayes is executed, and the process proceeds to S170.
具体的には、(54)式に示す分布パラメータΘM を、S350にて算出された十分統計量<<r>>fcを、(47)〜(52)式の十分統計量の項(<<>>fcで囲われた項)に代入して算出する。 Specifically, the distribution parameter Θ M shown in the equation (54) is changed to the sufficient statistic << r >> fc calculated in S350, and the term of the sufficient statistic in the equations (47) to (52) (< Substituting into <>> fc term) and calculating.
S370では、S190と同様に頭部特徴点を抽出して特徴点追跡部4に通知し、続くS380では、(57)式に従ってオンライン自由エネルギーFEλを算出し、S390では、S180と同様に、その算出したオンライン自由エネルギーFEλが、予め設定されたエネルギー閾値より大きいことを終了条件として、その終了条件を充足しているか否かを判断する。 In S370, the head feature point is extracted and notified to the feature point tracking unit 4 in the same manner as in S190. In the subsequent S380, the online free energy F E λ is calculated according to the equation (57). In S390, as in S180. Then, on the condition that the calculated online free energy F E λ is larger than a preset energy threshold, it is determined whether or not the termination condition is satisfied.
そして、終了条件を充足していなければ、S330に戻って、S330〜S380の処理を繰り返し、一方、終了条件を充足していれば、S400に移行する。 If the end condition is not satisfied, the process returns to S330, and the processes of S330 to S380 are repeated. On the other hand, if the end condition is satisfied, the process proceeds to S400.
S400では、S200と同様に、頭部特徴点に基づく部分形状行列を個人顔モデルとして出力すると共に、顔モデル切替部53が推定部6に供給する顔モデルCa として、個人顔モデルを選択するように切替信号を出力して、本処理を終了する。 In S400, similarly to S200, and outputs the partial shape matrix based on the head feature point as an individual model face, the face model switch unit 53 as a face model C a to be supplied to the estimating unit 6 selects an individual face model In this way, the switching signal is output, and this processing is terminated.
<効果>
以上説明したように、本実施形態では、1フレーム毎に、Eステップ,Mステップを1回ずつ実行して第1試験分布p(θ)及び第2試験分布p(h,z)を求める処理を繰り返し、その結果を過去のデータほど比率が低下するように減衰係数ηfcを乗じて足し合わせていく、いわゆるオンライン化した変分ベイズ推定法を用いて、因子分解を行っている。
<Effect>
As described above, in the present embodiment, the processing for obtaining the first test distribution p (θ) and the second test distribution p (h, z) by executing the E step and the M step once for each frame. The factorization is performed using a so-called on-line variational Bayesian estimation method in which the results are multiplied and added by the attenuation coefficient η fc so that the ratio decreases as the past data decreases.
従って、本実施形態によれば、使用する画像系列の数(フレーム数)を増加させても、それによって増加する処理量は、Eステップ,Mステップを1回ずつ実行する際の処理量を単位として、加算的に増大するだけで、指数関数的に増大することがないため、因子分解に要する処理負荷(ひいては処理に要する時間)を大幅に削減することができる。 Therefore, according to the present embodiment, even if the number of image sequences to be used (the number of frames) is increased, the amount of processing increased by that is the amount of processing when the E step and the M step are executed once. As a result, since it increases only in an additive manner and does not increase exponentially, the processing load required for factorization (and thus the time required for processing) can be greatly reduced.
その結果、自動車に搭載される演算器は一般的に計算能力が低いが、そのような場合でも問題なく適用することができる。 As a result, an arithmetic unit mounted on an automobile generally has a low calculation capability, but even in such a case, it can be applied without any problem.
更に本実施形態では、Mステップで求める第1試験分布を規定するパラメータの算出式中に現れる十分統計量<<r>>fc 及び減衰係数ηfcを、前フレームでの算出結果を利用した簡易な式((62)(63)式参照)によって逐次的求めるようにされているため、因子分解に要する処理負荷を、更に削減することができる。 Further, in the present embodiment, the sufficient statistics << r >> fc and the attenuation coefficient η fc appearing in the calculation formula of the parameter that defines the first test distribution obtained in M steps are simply used by using the calculation result in the previous frame. Therefore, the processing load required for factorization can be further reduced.
また、本実施形態では、十分統計量<<r>>fcが求められれば観測データ行列xfcは不要であり、特徴点の増減に対応するために、過去の観測データ行列を記憶しておく必要がないため、装置の記憶容量も削減することができる。 In this embodiment, if sufficient statistics << r >> fc is obtained, the observation data matrix x fc is not necessary, and the past observation data matrix is stored in order to cope with the increase / decrease of the feature points. Since it is not necessary, the storage capacity of the apparatus can be reduced.
[実験]
図10に示すような二つの物体(四角柱,三角柱)を適当に動かして画像に投影したものを入力画像系列として、第2実施形態で説明した処理を実行する画像処理装置1に処理を行わせて形状行列zを求めた。なお、特徴点としては、各物体の頂点を用いた。
[Experiment]
Processing is performed on the image processing apparatus 1 that executes the processing described in the second embodiment, with an input image series obtained by appropriately moving two objects (a quadrangular prism and a triangular prism) as shown in FIG. Thus, the shape matrix z was obtained. In addition, the vertex of each object was used as a feature point.
図11は、処理の結果得られた形状行列zから推定し二つの物体の形状の推定誤差(RMS誤差)の推移を観測フレーム数に対して示したものであり、(a)が四角柱についての結果、(b)が三角柱についての結果である。 FIG. 11 shows the transition of the estimation error (RMS error) of the shapes of two objects estimated from the shape matrix z obtained as a result of the processing, with respect to the number of observation frames. As a result, (b) is the result for the triangular prism.
図11からは、フレーム数が少ないと推定精度が低いが、フレーム数の増加に共に推定精度が向上していること、及び、二つの物体を正しく分離できていることがわかる。 From FIG. 11, it can be seen that the estimation accuracy is low when the number of frames is small, but the estimation accuracy is improved as the number of frames increases, and that two objects can be correctly separated.
[他の実施形態]
以上本発明の実施形態について説明したが、本発明は上記実施形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において、様々な態様での実施が可能である。
[Other Embodiments]
Although the embodiment of the present invention has been described above, the present invention is not limited to the above-described embodiment, and can be implemented in various modes without departing from the gist of the present invention.
例えば、上記実施形態では、頭部姿勢を推定するためにアフィンパラメータを用いているが、これは頭部姿勢の推定を行うことができれば、例えば、アフィンパラメータを用いずに、拡張カルマンフィルタを利用して直接頭部推定を行う手法等を採用してもよい。 For example, in the above embodiment, an affine parameter is used to estimate the head posture. If the head posture can be estimated, for example, an extended Kalman filter is used without using the affine parameter. For example, a method of directly performing head estimation may be employed.
また、因子分解を終了させる際の終了条件として、平均顔モデルから求めた自由エネルギーに基づいて設定されたエネルギー閾値を用いているが、例えば、処理の繰り返し回数が、予め設定された回数閾値より大きいことを終了条件としてもよい。この場合、処理を終了させるか否かの判断のために、自由エネルギーを算出する必要がなくなるため、当該装置での処理負荷を、より一層軽減することができ、また、常に一定時間内で処理を終了させることができる。 In addition, as an end condition when terminating factorization, an energy threshold set based on the free energy obtained from the average face model is used. For example, the number of repetitions of the process is greater than a preset count threshold. A large value may be used as the end condition. In this case, since it is not necessary to calculate free energy to determine whether or not to end the processing, the processing load on the device can be further reduced, and the processing is always performed within a certain time. Can be terminated.
1…画像処理装置 2…カメラ 3…画像取込装置 4…特徴点追跡部 5…顔モデル供給部 6…推定部 7…頭部姿勢算出部 41…固定特徴点追跡部 43…任意特徴点追跡部 51…平均顔モデル記憶部 52…個人顔モデル学習部 53…顔モデル切替部 DESCRIPTION OF SYMBOLS 1 ... Image processing apparatus 2 ... Camera 3 ... Image capture device 4 ... Feature point tracking part 5 ... Face model supply part 6 ... Estimation part 7 ... Head posture calculation part 41 ... Fixed feature point tracking part 43 ... Arbitrary feature point tracking 51: Average face model storage unit 52 ... Individual face model learning unit 53 ... Face model switching unit
Claims (5)
該特徴点抽出追跡手段での抽出,追跡結果に従って、前記特徴点の位置を表す観測データ行列を生成する観測データ行列生成手段と、
該観測データ行列生成手段にて生成された観測データ行列を因子分解して、前記画像に写された物体の三次元形状を表す形状行列および該物体の運動を表す運動行列を生成する分解手段と、
を備えた三次元形状復元装置において、
前記分解手段は、
前記観測データ行列をx、前記形状行列をz、前記特徴点のそれぞれが属する物体を指定する指定行列をh、前記運動行列,前記特徴点の測定の正確さ,前記特徴点がそれぞれの物体に属している確率をまとめたモデルパラメータをθとして、前記観測データ行列xから事後確率P(θ,z,h|x)を計算することで、θ,z,hを求めることを特徴とする三次元形状復元装置。 Feature point extraction tracking that inputs an image series, extracts a plurality of feature points having a preset feature from each input image, and tracks the position of the feature point on the image plane for each of the feature points Means,
An observation data matrix generation means for generating an observation data matrix representing the position of the feature point according to the extraction and tracking results of the feature point extraction tracking means;
Decomposition means for factorizing the observation data matrix generated by the observation data matrix generation means to generate a shape matrix representing the three-dimensional shape of the object imaged in the image and a motion matrix representing the motion of the object; ,
In a three-dimensional shape restoration apparatus equipped with
The disassembling means includes
The observation data matrix is x, the shape matrix is z, the designation matrix for designating an object to which each of the feature points belongs, h, the motion matrix, the accuracy of measurement of the feature points, and the feature points for each object. A cubic is characterized in that θ, z, h are obtained by calculating a posteriori probability P (θ, z, h | x) from the observed data matrix x, where θ is a model parameter summarizing the probability of belonging. Original shape restoration device.
前記事後確率P(θ,z,h|x)の近似関数である試験分布q(θ,h,z)が、第1試験分布q(θ)と第2試験分布q(h,z)とに因子化されるものとして、前記事後確率P(θ,z,h|x)と前記試験分布q(θ,h,z)とのKL距離を最小にする前記第1試験分布q(θ)及び第2試験分布q(h,z)を求めることで、確率的に因子分解計算を実行することを特徴とする請求項1に記載の三次元形状復元装置。 The disassembling means includes
The test distribution q (θ, h, z), which is an approximate function of the posterior probability P (θ, z, h | x), is a first test distribution q (θ) and a second test distribution q (h, z). The first test distribution q () that minimizes the KL distance between the posterior probability P (θ, z, h | x) and the test distribution q (θ, h, z). 2. The three-dimensional shape restoration apparatus according to claim 1, wherein factorization calculation is executed stochastically by obtaining θ) and the second test distribution q (h, z).
前記分解手段は、
前記第1試験分布q(θ)を固定して前記第2試験分布q(z,h)を推定する第1のステップ、及び、前記第2試験分布q(z,h)を固定して前記第1試験分布q(θ)を推定する第2のステップを、互いの推定結果を用いて交互に繰り返し実行する推定手段と、
予め設定された終了条件が満たされている場合に、前記推定手段を終了させる終了手段と、
からなり、最終的に得られた前記第2試験分布q(z,h)から形状行列z及び指定行列hを得ることを特徴とする請求項2に記載の三次元形状復元装置。 The observation data matrix generation means generates the observation data matrix x based on images for a preset number of frames,
The disassembling means includes
A first step of fixing the first test distribution q (θ) and estimating the second test distribution q (z, h), and fixing the second test distribution q (z, h) Estimating means for alternately and repeatedly executing the second step of estimating the first test distribution q (θ) using each other's estimation results;
Ending means for ending the estimating means when a preset ending condition is satisfied;
3. The three-dimensional shape restoration apparatus according to claim 2, wherein the shape matrix z and the designated matrix h are obtained from the second test distribution q (z, h) finally obtained.
前記分解手段は、
前記観測データ行列生成手段にて前記観測データ行列xが生成される毎に、前記第1試験分布q(θ)を固定して前記第2試験分布q(z,h)を推定する第1のステップ、及び、前記第2試験分布q(z,h)を固定して前記第1試験分布q(θ)を推定する第2のステップを、互いの推定結果を用いて実行する推定手段と、
予め設定された終了条件が満たされている場合に、前記推定手段及び更新手段を終了させる終了手段と、
からなり、前記推定手段によって逐次的に得られる前記第2試験分布q(z,h)から形状行列z及び指定行列hを得ることを特徴とする請求項2に記載の三次元形状復元装置。 The observation data matrix generation means generates the observation data matrix x for each image of one frame,
The disassembling means includes
Each time the observation data matrix x is generated by the observation data matrix generation means, a first test distribution q (z, h) is estimated by fixing the first test distribution q (θ). Estimating means for executing the second step of estimating the first test distribution q (θ) by fixing the second test distribution q (z, h) using the estimation results;
Ending means for ending the estimating means and the updating means when a preset ending condition is satisfied;
3. The three-dimensional shape restoration apparatus according to claim 2, wherein the shape matrix z and the designation matrix h are obtained from the second test distribution q (z, h) sequentially obtained by the estimation means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008298478A JP5231183B2 (en) | 2008-11-21 | 2008-11-21 | 3D shape restoration device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008298478A JP5231183B2 (en) | 2008-11-21 | 2008-11-21 | 3D shape restoration device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2010123070A JP2010123070A (en) | 2010-06-03 |
| JP5231183B2 true JP5231183B2 (en) | 2013-07-10 |
Family
ID=42324336
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008298478A Expired - Fee Related JP5231183B2 (en) | 2008-11-21 | 2008-11-21 | 3D shape restoration device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5231183B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114627023B (en) * | 2022-03-21 | 2025-08-12 | 北京有竹居网络技术有限公司 | Image restoration method, device, equipment, medium and product |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3079275B2 (en) * | 1997-05-29 | 2000-08-21 | 工業技術院長 | Image processing method and apparatus for dividing a plurality of objects |
| JP2002251592A (en) * | 2001-02-22 | 2002-09-06 | Toshiba Corp | Pattern recognition dictionary learning method |
| JP2005092639A (en) * | 2003-09-18 | 2005-04-07 | Digital Fashion Ltd | Image processing device, method and program and recording medium for recording this program |
| JP4483334B2 (en) * | 2004-02-18 | 2010-06-16 | 富士ゼロックス株式会社 | Image processing device |
| JP4971015B2 (en) * | 2007-04-10 | 2012-07-11 | 株式会社デンソー | Estimator |
| JP5048381B2 (en) * | 2007-04-10 | 2012-10-17 | 株式会社デンソー | 3D shape restoration device |
-
2008
- 2008-11-21 JP JP2008298478A patent/JP5231183B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2010123070A (en) | 2010-06-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110998594B (en) | Method and system for detecting motion | |
| EP2132680B1 (en) | Efficient and accurate 3d object tracking | |
| JP4928601B2 (en) | How to locate object features | |
| Isaacson et al. | Loner: Lidar only neural representations for real-time slam | |
| Li et al. | Monocular tracking of 3D human motion with a coordinated mixture of factor analyzers | |
| Makris et al. | Hierarchical particle filtering for 3d hand tracking | |
| KR20100094560A (en) | Face posture estimating device, face posture estimating method, and face posture estimating program | |
| JP2022546643A (en) | Image processing system and method for landmark position estimation with uncertainty | |
| JP2013156680A (en) | Face tracking method and face tracker and vehicle | |
| KR20210155317A (en) | 3D gaze estimation method and apparatus using multi-stream CNNs | |
| CN115720664B (en) | Object position estimation device, object position estimation method, and recording medium | |
| Lee et al. | Human body tracking with auxiliary measurements | |
| Migniot et al. | 3D human tracking from depth cue in a buying behavior analysis context | |
| JP5231183B2 (en) | 3D shape restoration device | |
| Kaliamoorthi et al. | Parametric annealing: A stochastic search method for human pose tracking | |
| JP4971015B2 (en) | Estimator | |
| JP4836065B2 (en) | Edge tracking method and computer program therefor | |
| Sharifi et al. | Marker-based human pose tracking using adaptive annealed particle swarm optimization with search space partitioning | |
| JP5048381B2 (en) | 3D shape restoration device | |
| JP2004326688A (en) | Method for estimating corresponding points between images and template matching system | |
| JP4921847B2 (en) | 3D position estimation device for an object | |
| Farshidi et al. | Robust sequential view planning for object recognition using multiple cameras | |
| McCall et al. | Pose invariant affect analysis using thin-plate splines | |
| Ghedia et al. | A novel approach for monocular 3d object tracking in cluttered environment | |
| Sagmeister | Driver pose estimation using synthetic car interiors |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110615 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20110615 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120524 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120626 |
|
| 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: 20130226 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130321 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160329 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5231183 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 |
|
| LAPS | Cancellation because of no payment of annual fees |