JP6292613B2 - Background extraction device, principal component analysis device, and principal component analysis program - Google Patents

Background extraction device, principal component analysis device, and principal component analysis program Download PDF

Info

Publication number
JP6292613B2
JP6292613B2 JP2014056631A JP2014056631A JP6292613B2 JP 6292613 B2 JP6292613 B2 JP 6292613B2 JP 2014056631 A JP2014056631 A JP 2014056631A JP 2014056631 A JP2014056631 A JP 2014056631A JP 6292613 B2 JP6292613 B2 JP 6292613B2
Authority
JP
Japan
Prior art keywords
covariance matrix
vector
eigenvectors
unit
dimensional
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
JP2014056631A
Other languages
Japanese (ja)
Other versions
JP2015179413A (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.)
Osaka City University
Original Assignee
Osaka City University
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 Osaka City University filed Critical Osaka City University
Priority to JP2014056631A priority Critical patent/JP6292613B2/en
Publication of JP2015179413A publication Critical patent/JP2015179413A/en
Application granted granted Critical
Publication of JP6292613B2 publication Critical patent/JP6292613B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Description

本発明は、画像の背景を抽出する背景抽出装置、及び、画像の背景の抽出等に特に適した主成分分析を行う主成分分析装置及び主成分分析プログラムに関する。   The present invention relates to a background extraction apparatus that extracts an image background, a principal component analysis apparatus and a principal component analysis program that perform principal component analysis particularly suitable for image background extraction and the like.

主成分分析を行うための一般的な方法としては、対象となるデータセットの共分散行列を算出し、当該共分散行列の固有ベクトルを算出する方法がある。主成分分析は、様々な分野で利用されており、例えば、画像の背景の抽出にも利用することができる。この場合、具体的には、多数の画像を各々ベクトルとみなしてこれらのベクトルの集合を主成分分析することにより、比較的低次元の固有空間(固有ベクトルにより形成される空間)を形成する(非特許文献1参照)。そして、入力画像を当該固有空間に射影した射影画像を入力画像の背景画像と推定し、対象画像と当該背景画像との差分を算出することで、前景を抽出する。   As a general method for performing principal component analysis, there is a method of calculating a covariance matrix of a target data set and calculating an eigenvector of the covariance matrix. Principal component analysis is used in various fields. For example, it can also be used to extract the background of an image. In this case, specifically, a relatively low-dimensional eigenspace (a space formed by eigenvectors) is formed by considering a large number of images as vectors and performing principal component analysis on a set of these vectors (non-native). Patent Document 1). Then, the projection image obtained by projecting the input image into the eigenspace is estimated as the background image of the input image, and the foreground is extracted by calculating the difference between the target image and the background image.

鳥生隆ら,固有空間への非線形射影に基づく画像各部の注目度の定量化,一般社団法人映像情報メディア学会,映像情報メディア学会誌:映像情報メディア59巻6号,894−900,2005年6月1日Takashi Torio et al. Quantification of attention of each part of image based on non-linear projection to eigenspace, The Institute of Image Information and Television Engineers, Journal of Image Information Media Society, Vol. 59, 894-900, 2005 6 January 1

対象となるデータセットの個数が非常に多い場合や、対象となるデータセットの次元数が非常に高い場合等には、主成分分析に要する計算負荷は多大なものとなる。ところで、主成分分析を行うと、対象となるデータセットの次元数だけ固有ベクトルが算出されることになる。しかしながら、以上の背景抽出の例のように、用途によっては、データセットの次元数と同じ個数だけの固有ベクトルは必要ではなく、より少ない個数の固有ベクトルさえ算出できれば十分な場合が多々ある。   When the number of target data sets is very large, or when the number of dimensions of the target data set is very high, the calculation load required for the principal component analysis becomes great. By the way, when principal component analysis is performed, eigenvectors are calculated by the number of dimensions of the target data set. However, as in the above background extraction example, depending on the application, it is not necessary to have as many eigenvectors as the number of dimensions of the data set, and it is often sufficient to calculate even a smaller number of eigenvectors.

本発明は、画像の背景の抽出を行う場合等、必要とされる固有ベクトルの個数が少ない場合に、主成分分析に要する計算負荷を低減することができる背景抽出装置、主成分分析装置及び主成分分析プログラムを提供することを目的とする。   The present invention provides a background extraction device, a principal component analysis device, and a principal component that can reduce the calculation load required for principal component analysis when the number of required eigenvectors is small, such as when extracting the background of an image. The purpose is to provide an analysis program.

本発明の第1観点に係る背景抽出装置は、対象画像の背景を抽出する装置であって、主成分分析部と、近似部とを備える。前記主成分分析部は、N枚(Nは、2以上の整数)のテスト画像にそれぞれ対応するN個のP次元(Pは、3以上の整数)のテストベクトルV1,V2,・・・,VNを主成分分析することにより、M個(Mは、M+1<Pを満たす整数)の固有ベクトルu1(N),u2(N),・・・,uM(N)を算出する。前記近似部は、前記対象画像に対応する対象ベクトルをM個の固有ベクトルu1(N),u2(N),・・・,uM(N)の線形結合として近似し、前記線形結合を前記対象画像の背景に対応する背景ベクトルとして設定する。前記主成分分析部は、初期共分散行列導出部と、初期固有ベクトル算出部と、固有ベクトル追加部と、低次元共分散行列導出部と、固有ベクトル更新部とを有する。前記初期共分散行列導出部は、テストベクトルV1,V2,・・・,VL(Lは、L<Nを満たす自然数)の共分散行例CLを導出する。前記初期固有ベクトル算出部は、共分散行列CLのM個の固有ベクトルu1(L),u2(L),・・・,uM(L)を算出する。前記固有ベクトル追加部は、k=L+1,L+2,・・・,Nに対し順次、テストベクトルVkに基づいて、M個の固有ベクトルu1(k−1),u2(k−1),・・・,uM(k−1)に直交する単位ベクトルを算出し、M+1番目の固有ベクトルuM+1(k−1)として設定する。前記低次元共分散行列導出部は、k=L+1,L+2,・・・,Nに対し順次、テストベクトルVkに基づいて、テストベクトルV1,V2,・・・,Vkの共分散行列Ckとして近似的に、M+1個の固有ベクトルu1(k−1),u2(k−1),・・・,uM+1(k−1)を用いて、M+1次元の共分散行列Ck’を導出する。前記固有ベクトル更新部は、k=L+1,L+2,・・・,Nに対し順次、共分散行列Ck’のM個のM+1次元の固有ベクトルを算出し、M個のP次元の固有ベクトルu1(k),u2(k),・・・,uM(k)に変換する。 A background extraction apparatus according to a first aspect of the present invention is an apparatus that extracts a background of a target image, and includes a principal component analysis unit and an approximation unit. The principal component analysis unit includes N P-dimensional (P is an integer of 3 or more) test vectors V 1 , V 2 ,... Corresponding to N (N is an integer of 2 or more) test images. .., V N are subjected to principal component analysis to calculate M (M is an integer satisfying M + 1 <P) eigenvectors u 1 (N), u 2 (N),..., U M (N) To do. The approximating unit approximates the target vector corresponding to the target image as a linear combination of M eigenvectors u 1 (N), u 2 (N),..., U M (N), and the linear combination is approximated. A background vector corresponding to the background of the target image is set. The principal component analysis unit includes an initial covariance matrix derivation unit, an initial eigenvector calculation unit, an eigenvector addition unit, a low-dimensional covariance matrix derivation unit, and an eigenvector update unit. The initial covariance matrix deriving unit derives covariance row examples C L of test vectors V 1 , V 2 ,..., V L (L is a natural number satisfying L <N). The initial eigenvector calculation unit calculates M eigenvectors u 1 (L), u 2 (L),..., U M (L) of the covariance matrix C L. The eigenvector adding unit sequentially applies M number of eigenvectors u 1 (k−1), u 2 (k−1),... Based on the test vector V k to k = L + 1, L + 2,. .., U M (k−1) is orthogonal to the unit vector and set as the ( M + 1) th eigenvector u M + 1 (k−1). The low-dimensional covariance matrix derivation unit sequentially calculates the covariance of the test vectors V 1 , V 2 ,..., V k based on the test vector V k for k = L + 1, L + 2,. Approximate M + 1 eigenvectors u 1 (k−1), u 2 (k−1),..., U M + 1 (k−1) as a matrix C k , and M + 1-dimensional covariance. A matrix C k ′ is derived. The eigenvector update unit sequentially calculates M M + 1-dimensional eigenvectors of the covariance matrix C k ′ for k = L + 1, L + 2,..., N, and M M-dimensional eigenvectors u 1 (k ), U 2 (k),..., U M (k).

本発明の第2観点に係る主成分分析装置は、N個(Nは、2以上の整数)のP次元(Pは、3以上の整数)のベクトルV1,V2,・・・,VNを主成分分析することにより、M個(Mは、M+1<Pを満たす整数)の固有ベクトルu1(N),u2(N),・・・,uM(N)を算出する主成分分析装置であって、ベクトル格納部と、初期共分散行列導出部と、初期共分散行列格納部と、初期固有ベクトル算出部と、固有ベクトル追加部と、低次元共分散行列導出部と、低次元共分散行列格納部と、固有ベクトル更新部を備える。前記ベクトル格納部は、ベクトルV1,V2,・・・,VNを格納する。前記初期共分散行列導出部は、前記ベクトル格納部からベクトルV1,V2,・・・,VL(Lは、L<Nを満たす自然数)を読み出し、ベクトルV1,V2,・・・,VLの共分散行例CLを導出する。前記初期共分散行列格納部は、共分散行列CLを格納する。前記初期固有ベクトル算出部は、前記初期共分散行列格納部から共分散行列CLを読み出し、共分散行列CLのM個の固有ベクトルu1(L),u2(L),・・・,uM(L)を算出する。前記固有ベクトル追加部は、k=L+1,L+2,・・・,Nに対し順次、前記ベクトル格納部からベクトルVkを読み出し、ベクトルVkに基づいて、M個の固有ベクトルu1(k−1),u2(k−1),・・・,uM(k−1)に直交する単位ベクトルを算出し、M+1番目の固有ベクトルuM+1(k−1)として設定する。前記低次元共分散行列導出部は、k=L+1,L+2,・・・,Nに対し順次、前記ベクトル格納部からベクトルVkを読み出し、ベクトルVkに基づいて、ベクトルV1,V2,・・・,Vkの共分散行列Ckとして近似的に、M+1個の固有ベクトルu1(k−1),u2(k−1),・・・,uM+1(k−1)を用いて、M+1次元の共分散行列Ck’を導出する。前記低次元共分散行列格納部は、k=L+1,L+2,・・・,Nに対し順次、共分散行列Ck’を格納する。前記固有ベクトル更新部は、k=L+1,L+2,・・・,Nに対し順次、前記低次元共分散行列格納部から共分散行列Ck’を読み出し、共分散行列Ck’のM個のM+1次元の固有ベクトルを算出し、M個のP次元の固有ベクトルu1(k),u2(k),・・・,uM(k)に変換する。 The principal component analyzer according to the second aspect of the present invention is an N (N is an integer of 2 or more) P-dimensional (P is an integer of 3 or more) vectors V 1 , V 2 ,. by principal component analysis N, (in M, M + 1 <integer satisfying P) M pieces eigenvectors u 1 of (N), u 2 (N ), ···, calculates a u M (N) main components An analysis device comprising: a vector storage unit, an initial covariance matrix derivation unit, an initial covariance matrix storage unit, an initial eigenvector calculation unit, an eigenvector addition unit, a low-dimensional covariance matrix derivation unit, and a low-dimensional covariance matrix A variance matrix storage unit and an eigenvector update unit are provided. The vector storage unit stores vectors V 1 , V 2 ,..., V N. The initial covariance matrix derivation unit, the vector V 1 from the vector storage section, V 2, ···, V L (L is L <natural number satisfying N) reads out the vector V 1, V 2, · · Derives the covariance example C L of V L. The initial covariance matrix storage unit stores a covariance matrix C L. The initial eigenvector calculation unit, the read initial covariance matrix storage unit from the covariance matrix C L, the covariance matrix C L of the M eigenvectors u 1 (L), u 2 (L), ···, u M (L) is calculated. The eigenvector additional section, k = L + 1, L + 2, ···, sequentially to N, reads the vector V k from the vector storage section, based on the vector V k, M eigenvectors u 1 (k-1) , U 2 (k−1),..., U M (k−1), a unit vector is calculated and set as the ( M + 1) th eigenvector u M + 1 (k−1). The low-dimensional covariance matrix derivation unit, k = L + 1, L + 2, ···, sequentially to N, reads the vector V k from the vector storage section, based on the vector V k, the vector V 1, V 2, ..., M + 1 eigenvectors u 1 (k-1), u 2 (k-1), ..., u M + 1 (k-1) approximately as a covariance matrix C k of V k. Is used to derive an M + 1 dimensional covariance matrix C k ′. The low-dimensional covariance matrix storage unit sequentially stores a covariance matrix C k ′ for k = L + 1, L + 2,. The eigenvector updating unit sequentially reads the covariance matrix C k ′ from the low-dimensional covariance matrix storage unit for k = L + 1, L + 2,..., N, and M M + 1 of the covariance matrix C k ′. A dimensional eigenvector is calculated and converted into M P-dimensional eigenvectors u 1 (k), u 2 (k),..., U M (k).

本発明の第3観点に係る主成分分析プログラムは、N個(Nは、2以上の整数)のP次元(Pは、3以上の整数)のベクトルV1,V2,・・・,VNを主成分分析することにより、M個(Mは、M+1<Pを満たす整数)の固有ベクトルu1(N),u2(N),・・・,uM(N)を算出するためのプログラムである。前記主成分分析プログラムは、記憶部を有するコンピュータに、以下のステップ1〜8を実行させる。なお、ステップ5〜8は、k=L+1,L+2,・・・,Nに対し順次繰り返し実行される。
1)前記記憶部に、ベクトルV1,V2,・・・,VNを格納するステップ。
2)前記記憶部からベクトルV1,V2,・・・,VL(Lは、L<Nを満たす自然数)を読み出し、ベクトルV1,V2,・・・,VLの共分散行例CLを導出するステップ。
3)前記記憶部に、共分散行列CLを格納するステップ。
4)前記記憶部から共分散行列CLを読み出し、共分散行列CLのM個の固有ベクトルu1(L),u2(L),・・・,uM(L)を算出するステップ。
5)前記記憶部からベクトルVkを読み出し、ベクトルVkに基づいて、M個の固有ベクトルu1(k−1),u2(k−1),・・・,uM(k−1)に直交する単位ベクトルを算出し、M+1番目の固有ベクトルuM+1(k−1)として設定するステップ。
6)前記記憶部からベクトルVkを読み出し、ベクトルVkに基づいて、ベクトルV1,V2,・・・,Vkの共分散行列Ckとして近似的に、M+1個の固有ベクトルu1(k−1),u2(k−1),・・・,uM+1(k−1)を用いて、M+1次元の共分散行列Ck’を導出するステップ。
7)前記記憶部に、共分散行列Ck’を格納するステップ。
8)前記記憶部から共分散行列Ck’を読み出し、共分散行列Ck’のM個のM+1次元の固有ベクトルを算出し、M個のP次元の固有ベクトルu1(k),u2(k),・・・,uM(k)に変換するステップ。
The principal component analysis program according to the third aspect of the present invention provides N (N is an integer of 2 or more) P-dimensional (P is an integer of 3 or more) vectors V 1 , V 2 ,. By calculating N principal components, M (M is an integer satisfying M + 1 <P) eigenvectors u 1 (N), u 2 (N),..., U M (N) are calculated. It is a program. The principal component analysis program causes a computer having a storage unit to execute the following steps 1 to 8. Note that steps 5 to 8 are sequentially repeated for k = L + 1, L + 2,.
1) A step of storing vectors V 1 , V 2 ,..., V N in the storage unit.
2) the vector V 1 from the storage unit, V 2, · · ·, V L (L reads the L <natural number satisfying N), the vector V 1, V 2, · · ·, the covariance row of V L Example C Deriving L.
3) A step of storing a covariance matrix C L in the storage unit.
4) A step of reading the covariance matrix C L from the storage unit and calculating M eigenvectors u 1 (L), u 2 (L),..., U M (L) of the covariance matrix C L.
5) The vector V k is read from the storage unit, and M eigenvectors u 1 (k−1), u 2 (k−1),..., U M (k−1) based on the vector V k. Calculating a unit vector orthogonal to the M + 1-th eigenvector u M + 1 (k−1).
6) The vector V k is read from the storage unit, and M + 1 eigenvectors u 1 (approximately as a covariance matrix C k of vectors V 1 , V 2 ,..., V k based on the vector V k. k-1), u 2 (k−1),..., u M + 1 (k−1) are used to derive an M + 1-dimensional covariance matrix C k ′.
7) A step of storing a covariance matrix C k ′ in the storage unit.
8) The covariance matrix C k ′ is read from the storage unit, M M + 1 dimensional eigenvectors of the covariance matrix C k ′ are calculated, and M P dimensional eigenvectors u 1 (k), u 2 (k ),..., U M (k).

従来の主成分分析の方法では、N個のP次元のデータセット(ベクトルV1,V2,・・・,VN)を主成分分析する場合、N個のP次元のデータセットからP次元(P行P列)の共分散行列を算出し、これを固有値分解する必要がある。これに対し、本発明の以上の観点では、まず、N個のベクトルV1,V2,・・・,VNのうち、一部のベクトルV1,V2,・・・,VLのみを用いて(L<N)、共分散行列CLが算出される。この処理は、N個のベクトルV1,V2,・・・,VNの全てを用いて共分散行列を算出するのに比べ、計算負荷が低い。そして、共分散行列CLから、M個の固有ベクトルu1(L),u2(L),・・・,uM(L)が算出され、初期値として設定される。以後、残りのベクトルVL+1,VL+2,・・・,VNを順次用いて、M個の固有ベクトルのセットが順次更新されてゆき、最終的には、N個のベクトルV1,V2,・・・,VNに対する固有ベクトルu1(N),u2(N),・・・,uM(N)が算出される。 In the conventional principal component analysis method, when N P-dimensional data sets (vectors V 1 , V 2 ,..., V N ) are subjected to principal component analysis, N P-dimensional data sets are converted into P dimensions. It is necessary to calculate a covariance matrix of (P rows and P columns) and to perform eigenvalue decomposition on it. In contrast, in view of the above the present invention, firstly, N pieces of vector V 1, V 2, · · ·, of V N, a portion of the vector V 1, V 2, ···, V L only (L <N) is used to calculate the covariance matrix C L. This processing is less computationally expensive than calculating the covariance matrix using all N vectors V 1 , V 2 ,..., V N. Then, M eigenvectors u 1 (L), u 2 (L),..., U M (L) are calculated from the covariance matrix C L and set as initial values. Thereafter, the set of M eigenvectors is sequentially updated using the remaining vectors V L + 1 , V L + 2 ,..., V N in sequence, and finally, N vectors V 1 are used. , V 2, ···, eigenvector u 1 with respect to V N (N), u 2 (N), ···, u M (N) is calculated.

M個の固有ベクトルのセットの更新時には、近似的にP次元よりも次元数の低いM+1次元の共分散行列が算出され、当該低次元の共分散行列から新たなM個の固有ベクトルのセットが算出される。具体的には、最新のベクトルVkの情報に基づいて、最新のM個の固有ベクトルu1(k−1),u2(k−1),・・・,uM(k−1)に直交する単位ベクトルが算出される。これにより、当該単位ベクトルと、最新のM個の固有ベクトルのセットとを併せて、M+1個の固有ベクトルu1(k−1),u2(k−1),・・・,uM(k−1),uM+1(k−1)が定義される。そして、これらのM+1個の固有ベクトルu1(k−1),u2(k−1),・・・,uM+1(k−1)を用いて、P次元の共分散行列Ckが、M+1次元の共分散行列Ck’として近似的に導出される。すなわち、固有ベクトルのセットの更新時には、高次元の共分散行列に代えて、低次元の共分散行列が算出され、かつ、高次元の共分散行列に代えて、低次元の共分散行列から固有ベクトルのセットが算出されるため、計算負荷が低減される。 When updating the set of M eigenvectors, an M + 1 dimensional covariance matrix having a number of dimensions lower than the P dimension is approximately calculated, and a new set of M eigenvectors is calculated from the low dimensional covariance matrix. The Specifically, based on information of the latest vector V k, latest M eigenvectors u 1 (k-1), u 2 (k-1), ···, the u M (k-1) An orthogonal unit vector is calculated. Thereby, the unit vector and the latest set of M eigenvectors are combined, and M + 1 eigenvectors u 1 (k−1), u 2 (k−1),..., U M (k− 1), u M + 1 (k−1) is defined. Then, using these M + 1 eigenvectors u 1 (k−1), u 2 (k−1),..., U M + 1 (k−1), a P-dimensional covariance matrix C k is obtained. , M + 1-dimensional covariance matrix C k ′. That is, when updating the set of eigenvectors, a low-dimensional covariance matrix is calculated instead of the high-dimensional covariance matrix, and the eigenvectors are calculated from the low-dimensional covariance matrix instead of the high-dimensional covariance matrix. Since the set is calculated, the calculation load is reduced.

すなわち、本発明の以上の観点では、まず、全体の個数Nよりも少ないL個のデータセットを用いることで、高次元(P次元)の共分散行列を低負荷で算出する。そして、以後は、近似的に低次元(M+1次元)の共分散行列を算出し、これに基づいて固有ベクトルのセットを算出するため、更新時の処理も低負荷となる。従って、必要とされる固有ベクトルの個数Mが少ない場合に、主成分分析に要する計算負荷を低減することができる。   That is, according to the above aspect of the present invention, first, a high-dimensional (P-dimensional) covariance matrix is calculated with a low load by using L data sets that are smaller than the total number N. Thereafter, since a low-dimensional (M + 1-dimensional) covariance matrix is calculated approximately, and a set of eigenvectors is calculated based on the low-dimensional (M + 1-dimensional) covariance matrix, the processing at the time of updating is also reduced. Therefore, when the required number M of eigenvectors is small, the calculation load required for principal component analysis can be reduced.

なお、画像(オプティカルフローを含む)の情報を表現するには、原則として、画素数程度の(RGB値を各々を表現する場合であれば、画素数×3)情報が必要となる。従って、画像をベクトルで表現するとき、当該ベクトルの次元数Pは、非常に大きな値となる。そのため、画像に対応するベクトルを主成分分析する場合には、共分散行列の次元数Pも非常に大きくなり、計算負荷が多大になりがちである。しかしながら、一方で、画像の背景(オプティカルフローを含む)は、画像の次元数Pよりも大幅に少ない個数の固有ベクトルさえあれば、表現することができる。従って、以上の主成分分析のアルゴリズムを用いた第1観点の背景抽出装置によれば、画像の背景の抽出に必要な固有ベクトルのセットを、極めて低負荷で抽出することができる。   Note that, in order to express information of an image (including an optical flow), in principle, information about the number of pixels (the number of pixels × 3 if representing RGB values) is required. Therefore, when an image is represented by a vector, the dimension number P of the vector is a very large value. Therefore, when the principal component analysis is performed on the vector corresponding to the image, the dimension number P of the covariance matrix is very large, and the calculation load tends to be large. However, on the other hand, the background of an image (including optical flow) can be expressed as long as there is a number of eigenvectors significantly smaller than the number of dimensions P of the image. Therefore, according to the background extraction apparatus of the first aspect using the above principal component analysis algorithm, it is possible to extract a set of eigenvectors necessary for extracting the background of an image with a very low load.

本発明によれば、画像の背景の抽出を行う場合等、必要とされる固有ベクトルの個数が少ない場合に、主成分分析に要する計算負荷を低減することができる。   According to the present invention, when the number of eigenvectors required is small, such as when extracting the background of an image, the calculation load required for principal component analysis can be reduced.

本発明の一実施形態に係る背景抽出装置/主成分分析装置を含む見守りシステムの概略構成を示すブロック図。1 is a block diagram showing a schematic configuration of a watching system including a background extraction device / principal component analysis device according to an embodiment of the present invention. 学習処理の流れを示すフローチャート。The flowchart which shows the flow of a learning process. オプティカルフローの概念図。Optical flow conceptual diagram. 認識処理の流れを示すフローチャート。The flowchart which shows the flow of a recognition process.

以下、図面を参照しつつ、本発明に係る背景抽出装置、主成分分析装置及び主成分分析プログラムを、高齢者等の見守りシステムに適用した場合の一実施形態について説明する。   Hereinafter, an embodiment in which the background extraction device, the principal component analysis device, and the principal component analysis program according to the present invention are applied to a monitoring system for elderly people and the like will be described with reference to the drawings.

<1.見守りシステムの構成>
図1に示す見守りシステム100は、カメラ3と、カメラ3の遠隔に存在し、インターネットやLAN等のネットワーク6を介してカメラ3に接続されている監視コンピュータ1とを有する。カメラ3は、見守りの対象が存在する空間に配置され、見守りの対象を撮影するとともに、撮影した動画像(以下、対象動画像)をネットワーク6を介して監視コンピュータ1にリアルタイムに送信する。この機能を実現するため、カメラ3には、外付け又は内蔵の通信装置4が付属している。
<1. Configuration of watching system>
A watching system 100 shown in FIG. 1 includes a camera 3 and a monitoring computer 1 that exists remotely from the camera 3 and is connected to the camera 3 via a network 6 such as the Internet or a LAN. The camera 3 is arranged in a space where the watching target exists, and captures the watching target, and transmits the captured moving image (hereinafter, the target moving image) to the monitoring computer 1 via the network 6 in real time. In order to realize this function, the camera 3 is provided with an external or built-in communication device 4.

監視コンピュータ1は、本発明の一実施形態に係る背景抽出装置/主成分分析装置である。監視コンピュータ1には、CD−ROM、USBメモリ等のコンピュータで読み取り可能な記録媒体5から、又はネットワーク6を介して別のコンピュータから、画像処理プログラム2がインストールされている。画像処理プログラム2は、対象動画像から移動体、すなわち、見守りの対象を検出する機能を有するアプリケーションソフトウェアである。画像処理プログラム2には、本発明の一実施形態に係る主成分分析プログラムである、主成分分析を行うためのプログラムモジュール2aが含まれる。画像処理プログラム2及びこれに含まれるプログラムモジュール2aは、監視コンピュータ1に後述する動作に含まれるステップを実行させる。   The monitoring computer 1 is a background extraction apparatus / principal component analysis apparatus according to an embodiment of the present invention. An image processing program 2 is installed in the monitoring computer 1 from a computer-readable recording medium 5 such as a CD-ROM or a USB memory, or from another computer via the network 6. The image processing program 2 is application software having a function of detecting a moving object, that is, a watching target from the target moving image. The image processing program 2 includes a program module 2a for performing principal component analysis, which is a principal component analysis program according to an embodiment of the present invention. The image processing program 2 and the program module 2a included therein cause the monitoring computer 1 to execute steps included in the operation described later.

本実施形態におけるカメラ3は、例えば、首振り式のカメラや、移動式のロボットに搭載されているカメラであり、対象動画像を撮影する視点が移動するカメラである。後述されるとおり、監視コンピュータ1に実装されている移動体を検出するためのアルゴリズムは、固定されているカメラで撮影した動画像を対象とする場合はもちろん、移動しているカメラで撮影した動画像を対象とする場合にも対応している。従って、監視コンピュータ1は、視点が移動するカメラ3で撮影された対象動画像においても、正しく移動体を検出することができる。   The camera 3 in the present embodiment is, for example, a camera mounted on a swing-type camera or a mobile robot, and a camera that moves a viewpoint for capturing a target moving image. As will be described later, the algorithm for detecting a moving object mounted on the monitoring computer 1 is not limited to a moving image shot with a fixed camera, but of course a moving image shot with a moving camera. This also applies to the case of images. Therefore, the monitoring computer 1 can correctly detect the moving object even in the target moving image taken by the camera 3 whose viewpoint moves.

監視コンピュータ1は、例えば、見守りの対象の異常を監視するサービスを提供する会社により管理されているサーバコンピュータである。この場合、このような会社の従業員が、見守りの対象を監視することもできるし、見守りの対象の家族等が、携帯電話やパーソナルコンピュータ等の機器をネットワーク6を介して監視コンピュータ1に接続することにより、外出先から見守りの対象を監視することも可能である。また、上記のようなサーバコンピュータを省略し、カメラ3から直接、見守りの対象の家族等が所有している携帯電話やパーソナルコンピュータ等の機器に対象動画像が送信されるようにしてもよい。この場合、このような携帯電話やパーソナルコンピュータ等の機器が、監視コンピュータ1(本発明に係る背景抽出装置/主成分分析装置)に相当する。   The monitoring computer 1 is, for example, a server computer managed by a company that provides a service for monitoring an abnormality to be watched over. In this case, an employee of such a company can monitor the object to be watched, and a family to be watched connects a device such as a mobile phone or a personal computer to the monitor computer 1 via the network 6. By doing so, it is possible to monitor the object of watching from outside. Further, the server computer as described above may be omitted, and the target moving image may be transmitted directly from the camera 3 to a device such as a mobile phone or a personal computer owned by a family to be watched over. In this case, such a device such as a mobile phone or a personal computer corresponds to the monitoring computer 1 (background extraction apparatus / principal component analysis apparatus according to the present invention).

図1に示すとおり、監視コンピュータ1は、表示部10、入力部20、記憶部30、制御部40および通信部50を有する。これらの部10〜50は、互いにバス線7で接続されており、相互に通信可能である。本実施形態では、表示部10は、液晶ディスプレイ等で構成されており、適当な画面をユーザ(監視者)に対し表示するユーザーインターフェースである。また、入力部20は、マウスやキーボード、タッチパネル、操作ボタン等で構成されており、監視コンピュータ1に対するユーザ(監視者)からの操作を受け付けるユーザーインターフェースである。通信部50は、監視コンピュータ1をネットワーク6に接続するほか、USBメモリやメモリカード、CD−ROM、外付けハードディスク、デジタルカメラなどの外部記憶装置との間でデータ通信を行う通信インターフェースである。   As shown in FIG. 1, the monitoring computer 1 includes a display unit 10, an input unit 20, a storage unit 30, a control unit 40, and a communication unit 50. These units 10 to 50 are connected to each other via a bus line 7 and can communicate with each other. In the present embodiment, the display unit 10 is configured by a liquid crystal display or the like, and is a user interface that displays an appropriate screen to the user (monitoring person). The input unit 20 includes a mouse, a keyboard, a touch panel, operation buttons, and the like, and is a user interface that receives an operation from the user (monitoring person) for the monitoring computer 1. The communication unit 50 is a communication interface that connects the monitoring computer 1 to the network 6 and performs data communication with an external storage device such as a USB memory, a memory card, a CD-ROM, an external hard disk, or a digital camera.

記憶部30は、RAMのような揮発性の記憶装置に加え、ROMやハードディスク、フラッシュメモリ等の不揮発性の記憶装置から構成されている。記憶部30内の不揮発性の領域には、画像処理プログラム2が格納されている。また、記憶部30内の揮発性及び/又は不揮発性の記憶領域は、ベクトル格納部31、初期共分散行列格納部32、固有ベクトル格納部33及び低次元共分散行列格納部34として動作する。これらの部31〜34の詳細については、後述する。   The storage unit 30 includes a nonvolatile storage device such as a ROM, a hard disk, and a flash memory in addition to a volatile storage device such as a RAM. An image processing program 2 is stored in a non-volatile area in the storage unit 30. The volatile and / or nonvolatile storage areas in the storage unit 30 operate as a vector storage unit 31, an initial covariance matrix storage unit 32, an eigenvector storage unit 33, and a low-dimensional covariance matrix storage unit 34. Details of these parts 31 to 34 will be described later.

制御部40は、CPU等から構成されており、記憶部30内に格納されている画像処理プログラム2を読み出して実行することにより、仮想的に学習部41、動き導出部42、近似部43、領域検出部44及び解釈部45として動作する。また、学習部41は、仮想的にオプティカルフロー導出部41a、初期共分散行列導出部41b、初期固有ベクトル導出部41c、固有ベクトル追加部41d、低次元共分散行列導出部41e及び固有ベクトル更新部41fとして動作する。各部41〜45,41a〜41fの動作については、後述する。   The control unit 40 is configured by a CPU or the like, and reads and executes the image processing program 2 stored in the storage unit 30 to virtually acquire a learning unit 41, a motion derivation unit 42, an approximation unit 43, It operates as the area detection unit 44 and the interpretation unit 45. The learning unit 41 virtually operates as an optical flow deriving unit 41a, an initial covariance matrix deriving unit 41b, an initial eigenvector deriving unit 41c, an eigenvector adding unit 41d, a low-dimensional covariance matrix deriving unit 41e, and an eigenvector updating unit 41f. To do. The operation of each unit 41 to 45, 41a to 41f will be described later.

<2.監視処理>
以下、見守りシステム100により高齢者等の見守りの対象が監視される処理(以下、監視処理)の流れについて、詳細に説明する。監視処理は、主として、学習処理と、認識処理とにより構成される。学習処理は、固有ベクトルのセットを学習する処理である。固有ベクトルのセットとは、学習用に撮影されるテスト動画像に含まれるテスト画像のオプティカルフローの集合を主成分分析することにより得られる固有ベクトルのセットである。固有ベクトルのセットは、対象動画像に捉えられたカメラ3の視点の動き(背景の動き)を評価するためのパラメータとなる。認識処理は、学習処理により設定された固有ベクトルのセットを用いて、対象動画像に捉えられたカメラ3の視点の動きをキャンセルし、それにより、対象動画像に捉えられた移動体の動きを検出する処理である。また、認識処理では、移動体の動きの解釈も行われる。以下、学習処理について説明した後、認識処理について説明する。
<2. Monitoring process>
Hereinafter, the flow of processing (hereinafter referred to as monitoring processing) in which a monitoring target such as an elderly person is monitored by the monitoring system 100 will be described in detail. The monitoring process mainly includes a learning process and a recognition process. The learning process is a process of learning a set of eigenvectors. The set of eigenvectors is a set of eigenvectors obtained by principal component analysis of a set of optical flows of test images included in a test moving image photographed for learning. The set of eigenvectors is a parameter for evaluating the movement of the viewpoint of the camera 3 (background movement) captured in the target moving image. The recognition process uses the set of eigenvectors set by the learning process to cancel the movement of the viewpoint of the camera 3 captured in the target moving image, thereby detecting the movement of the moving body captured in the target moving image. It is processing to do. In the recognition process, the movement of the moving object is also interpreted. Hereinafter, after describing the learning process, the recognition process will be described.

<2−1.学習処理>
学習処理は、図2に示すフローチャートのとおりに実行される。まず、カメラ3によるテスト動画像の撮影処理が開始される(ステップS1)。テスト動画像は、固有ベクトルのセットの算出の元となる動画像である。なお、このとき使用されるカメラは、必ずしも認識処理で対象動画像を撮影するために使用されるカメラ3そのものである必要はなく、さらに、カメラ3と同じ機種のカメラである必要もない。しかしながら、学習処理では、カメラ3そのものか、又はカメラ3と同じ機種のカメラが使用されることが好ましい。なぜならば、レンズの歪曲度等の属性の異なるカメラにより撮影された動画像どうしは、カメラを全く同じように移動させながら、全く同一の風景を撮影したとしても、相違することになる。従って、認識処理で使用されるカメラと、学習処理で使用されるカメラとが相違すると、その分だけ、学習処理で導出されたパラメータを用いる認識処理での認識の精度が低下するからである。
<2-1. Learning process>
The learning process is executed according to the flowchart shown in FIG. First, a test moving image shooting process by the camera 3 is started (step S1). The test moving image is a moving image from which a set of eigenvectors is calculated. Note that the camera used at this time does not necessarily need to be the camera 3 itself used to capture the target moving image in the recognition process, and does not have to be a camera of the same model as the camera 3. However, in the learning process, it is preferable that the camera 3 itself or a camera of the same model as the camera 3 is used. This is because moving images shot by cameras having different attributes such as lens distortion are different even if the same scenery is shot while the cameras are moved in exactly the same way. Therefore, if the camera used in the recognition process is different from the camera used in the learning process, the recognition accuracy in the recognition process using the parameters derived in the learning process is reduced accordingly.

また、ステップS1で撮影される空間(以下、テスト空間)は、認識処理でカメラ3が見守る空間と同じである必要はない。なぜならば、後述するアルゴリズムから明らかなとおり、本実施形態に係る学習処理は、認識処理で見守られる空間の模様や明るさ等の図形のパターンを学習する処理ではなく、カメラ3の視点の動きのパターンを表現するための固有ベクトルのセットを学習する処理だからである。また、ステップS1では、カメラ3の視点を様々な方向に移動させながら、テスト空間が撮影される。これは、学習処理で学習される固有ベクトルのセットが、カメラ3のあらゆる視点の動きのパターンを表現することが可能なようにするためである。   Further, the space photographed in step S1 (hereinafter referred to as test space) does not have to be the same as the space that the camera 3 watches in the recognition process. This is because, as will be apparent from the algorithm described later, the learning process according to the present embodiment is not a process of learning a graphic pattern such as a space pattern or brightness observed in the recognition process, but a movement of the viewpoint of the camera 3. This is because it is a process of learning a set of eigenvectors for expressing a pattern. In step S1, the test space is photographed while moving the viewpoint of the camera 3 in various directions. This is because the set of eigenvectors learned in the learning process can express the movement patterns of all viewpoints of the camera 3.

さらに、ステップS1で撮影されるテスト空間は、移動体が存在しない空間とされることが好ましい。なぜならば、既に述べたとおり、学習処理で学習されるのは、対象動画像に含まれるカメラ3の視点の動きを評価するためのパラメータだからである。従って、このようなパラメータの算出の基礎となるテスト動画像には、移動体の動きが反映されておらず、カメラ3の視点の動きのみが反映されていることが好ましい。   Furthermore, it is preferable that the test space photographed in step S1 is a space where no moving object exists. This is because, as already described, what is learned by the learning process is a parameter for evaluating the movement of the viewpoint of the camera 3 included in the target moving image. Therefore, it is preferable that the motion of the moving object is not reflected in the test moving image that is the basis for calculating such parameters, and only the movement of the viewpoint of the camera 3 is reflected.

続くステップS2では、ステップS1で撮影されたテスト動画像をカメラ3から監視コンピュータ1へネットワーク6を介して送信する送信処理が開始される。送信処理では、以上の撮影処理により一定量のテスト動画像が撮影される度に、当該一定量のテスト動画像が送信される。なお、他の実施形態では、テスト動画像は、ネットワーク6経由で送信されるのではなく、USBメモリ等の外部記憶装置を介して監視コンピュータ1へ受け渡されてもよい。或いは、カメラ3を直接監視コンピュータ1へ接続することで受け渡されてもよい。この場合には、固有ベクトルのセットの算出に必要な量のテスト動画像の撮影が完了した後、当該テスト動画像が一括して受け渡されるように構成することができる。   In subsequent step S2, transmission processing for transmitting the test moving image taken in step S1 from the camera 3 to the monitoring computer 1 via the network 6 is started. In the transmission process, every time a fixed amount of test moving images is shot by the above shooting process, the fixed amount of test moving images is transmitted. In another embodiment, the test moving image may be transferred to the monitoring computer 1 via an external storage device such as a USB memory instead of being transmitted via the network 6. Alternatively, it may be delivered by connecting the camera 3 directly to the monitoring computer 1. In this case, it is possible to configure such that the test moving images are delivered in a lump after the imaging of the amount of test moving images necessary for calculating the set of eigenvectors is completed.

次に、ステップS3では、オプティカルフロー導出部41aが、ステップS2のテスト動画像から、時々刻々のオプティカルフローDkを導出する導出処理を開始する(kは、時刻を表し、k=1,2,・・・と増加する)。オプティカルフローDkとは、図3に示すように、テスト動画像に含まれる時刻kでのフレーム内の各点pijにその点pijの動きを表すベクトルdij(k)を割り当てたものである(i=1,2,・・・,I、かつ、j=1,2,・・・,J)。ここで、点pijとは、テスト動画像のフレーム上に等間隔に並べられた点の格子状配列のうち、上からi番目で左からj番目の点である。ベクトルdij(k)は、テスト動画像の時刻kにおける点pijに対応する1又は複数個の画素が、時刻kから時刻k+1の間に移動した移動量で表される2次元ベクトル(dijx(k),dijy(k))である。また、dijx(k)及びdijy(k)はそれぞれ、テスト動画像のフレームが存在するXY平面内での時刻kでのX方向への移動量及びY方向への移動量であり、テスト動画像の時刻k及び時刻k+1でのフレームの画素値に基づいて算出される。 Next, in step S3, the optical flow deriving unit 41a starts a derivation process for deriving the optical flow D k from time to time from the test moving image in step S2 (k represents time, k = 1, 2). , ... and increase). The optical flow D k, as shown in FIG. 3, which assigned the vector d ij (k) representing the motion of the point p ij at each point p ij in the frame at time k included in the test video image (I = 1, 2,..., I and j = 1, 2,..., J). Here, the point p ij is the i-th point from the top and the j-th point from the left in the lattice-like array of points arranged at equal intervals on the frame of the test moving image. The vector d ij (k) is a two-dimensional vector (d) represented by the amount of movement of one or more pixels corresponding to the point p ij at time k of the test moving image from time k to time k + 1. ijx (k), d ijy (k)). Further, d ijx (k) and d ijy (k) are the movement amount in the X direction and the movement amount in the Y direction at the time k in the XY plane where the frame of the test moving image exists, respectively. It is calculated based on the pixel values of the frames at time k and time k + 1 of the moving image.

すなわち、オプティカルフローDkとは、テスト動画像の時刻kにおけるフレーム内の様々な局所領域の動きを表すベクトル場であり、数1のとおり表すことができる。
なお、このようなオプティカルフローDkの具体的な算出方法については、勾配法やブロックマッチング法等の様々な方法が公知であるため、ここでは詳細な説明を省略する。
In other words, the optical flow D k is a vector field representing the motion of various local regions in the frame at the time k of the test moving image, and can be expressed as Equation 1.
In addition, since various methods, such as a gradient method and a block matching method, are well-known about the specific calculation method of such optical flow Dk , detailed description is abbreviate | omitted here.

オプティカルフロー導出部41aは、導出処理において、以上の送信処理により一定量のテスト動画像を取得する度に、当該一定量のテスト動画像に含まれるフレームのオプティカルフローDkを時系列に沿って順次導出してゆく。また、オプティカルフロー導出部41aは、オプティカルフローDkを導出する度に、これをベクトル格納部31内に格納する。すなわち、テスト動画像の送信、並びにオプティカルフローDkの導出及び格納は、テスト動画像の撮影に並行してリアルタイムに実行される。オプティカルフロー導出部41aは、N個のオプティカルフローD1,D2,・・・,DNが格納されるまで、ベクトル格納部31内にオプティカルフローDkを順次格納してゆく。Nは、本実施形態では、1000程度である。 In the derivation process, the optical flow deriving unit 41a obtains the optical flow Dk of frames included in the certain amount of test moving images in time series every time a certain amount of test moving images are acquired by the above transmission processing. Derived sequentially. The optical flow deriving unit 41 a stores the optical flow D k in the vector storage unit 31 every time it derives the optical flow D k . That is, the transmission of the test moving image and the derivation and storage of the optical flow D k are executed in real time in parallel with the shooting of the test moving image. The optical flow deriving unit 41a sequentially stores the optical flows Dk in the vector storage unit 31 until N optical flows D 1 , D 2 ,..., D N are stored. N is about 1000 in this embodiment.

以下では、説明の便宜上、オプティカルフローDkを列ベクトルとして捉え直し、ベクトルVkと表すこととする。ベクトルVkの次元数Pは、2×I×Jである。本実施形態では、ベクトルVkは、画像のオプティカルフローであるための、例えば、P=10000程度である。 In the following, for convenience of explanation, the optical flow D k is re-recognized as a column vector and expressed as a vector V k . The dimension number P of the vector V k is 2 × I × J. In the present embodiment, the vector V k is an optical flow of an image, and is about P = 10,000, for example.

続くステップS4,S5では、学習部41は、ベクトル格納部31内にL個のベクトルV1,V2,・・・,VL(Lは、L<Nを満たす自然数)が格納されるのを待って、これらのL個のベクトルV1,V2,・・・,VLに対し主成分分析を行う。本実施形態では、Lは、100程度である。 In subsequent steps S4 and S5, the learning unit 41 stores L vectors V 1 , V 2 ,..., V L (L is a natural number satisfying L <N) in the vector storage unit 31. Then, principal component analysis is performed on these L vectors V 1 , V 2 ,..., V L. In the present embodiment, L is about 100.

まず、ステップS4では、初期共分散行列導出部41bは、ベクトル格納部31からベクトルV1,V2,・・・,VLを読み出し、ベクトルV1,V2,・・・,VLの共分散行例CLを導出する。共分散行列CLは、数2の式に基づいて導出される。なお、行列(ベクトル)を表す記号の右肩に付される「t」の文字は、転置行列を意味する。
共分散行列CLの次元数は、P=2×I×Jである。初期共分散行列導出部41bは、共分散行列CLを、初期共分散行列格納部32内に格納する。
First, in step S4, the initial covariance matrix derivation unit 41b is a vector V 1, V 2 from the vector storage section 31, ..., reads the V L vector V 1, V 2, ..., the V L A covariance example CL is derived. The covariance matrix C L is derived based on the formula (2). Note that the letter “t” attached to the right shoulder of a symbol representing a matrix (vector) means a transposed matrix.
The number of dimensions of the covariance matrix C L is P = 2 × I × J. The initial covariance matrix deriving unit 41 b stores the covariance matrix C L in the initial covariance matrix storage unit 32.

続くステップS5では、初期固有ベクトル算出部41cは、初期共分散行列格納部32から共分散行列CLを読み出し、共分散行列CLのM個の固有ベクトルu1(L),u2(L),・・・,uM(L)及びM個の固有値λ1(L),λ2(L),・・・,λM(L)を算出する。また、共分散行列CLから導出可能な固有ベクトルの数はP個であるが、P個の全ての固有ベクトルが算出される必要はない。固有ベクトルは、背景の動きを表すオプティカルフロー(以下、背景オプティカルフロー)を表すのに十分な個数だけあれば足り、Mは、Pより大幅に小さく、例えば、5〜10程度である。固有値λi(L)は、P個中i番目に大きい固有値であり、固有ベクトルui(L)は、固有値λi(L)に対応する(i=1,2,・・・,M)。そして、初期固有ベクトル算出部41cは、これらのM個の固有ベクトルu1(L),u2(L),・・・,uM(L)及びM個の固有値λ1(L),λ2(L),・・・,λM(L)を、固有ベクトル格納部33内に格納する。 In step S5, the initial eigenvector calculation section 41c reads out the covariance matrix C L from the initial covariance matrix storage part 32, of the M covariance matrix C L eigenvectors u 1 (L), u 2 (L), , U M (L) and M eigenvalues λ 1 (L), λ 2 (L),..., Λ M (L) are calculated. The number of eigenvectors derivable from the covariance matrix C L is P, but it is not necessary to calculate all the P eigenvectors. It is sufficient that the eigenvectors have a sufficient number to represent the optical flow representing the movement of the background (hereinafter referred to as background optical flow), and M is significantly smaller than P, for example, about 5 to 10. The eigenvalue λ i (L) is the i-th largest eigenvalue out of P, and the eigenvector u i (L) corresponds to the eigenvalue λ i (L) (i = 1, 2,..., M). Then, the initial eigenvector calculation unit 41c includes the M eigenvectors u 1 (L), u 2 (L),..., U M (L) and the M eigenvalues λ 1 (L), λ 2 ( L),..., Λ M (L) are stored in the eigenvector storage unit 33.

以後、ベクトルVL+1,VL+2,・・・,VNが順次1つずつ選択され、ステップS6〜S8が、現在選択されているベクトル(以下、選択ベクトル)Vkに対し繰り返し実行される。なお、ステップS6〜S8において様々な数式が使用されるが、数式の根拠については後述することとし、まずは処理の流れについて説明する。 Thereafter, vectors V L + 1 , V L + 2 ,..., V N are sequentially selected one by one, and steps S 6 to S 8 are repeated for the currently selected vector (hereinafter referred to as selected vector) V k. Executed. Various formulas are used in steps S6 to S8. The basis of the formula will be described later. First, the flow of processing will be described.

ステップS6では、固有ベクトル追加部41dは、ベクトル格納部31から選択ベクトルVkを読み出すとともに、固有ベクトル格納部33からM個の固有ベクトルu1(k−1),u2(k−1),・・・,uM(k−1)を読み出す。そして、固有ベクトル追加部41dは、選択ベクトルVkに基づいて、M個の固有ベクトルu1(k−1),u2(k−1),・・・,uM(k−1)に直交する単位ベクトルを算出し、M+1番目の固有ベクトルuM+1(k−1)として設定する。固有ベクトルuM+1(k−1)は、数3の式に基づいて算出される。また、固有ベクトルuM+1(k−1)に対応する固有値λM+1(k−1)が、0と設定される。
In step S6, the eigenvector adding unit 41d reads the selection vector V k from the vector storage unit 31 and M eigenvectors u 1 (k−1), u 2 (k−1),. Read u M (k-1). Then, the eigenvector adding unit 41d is orthogonal to the M eigenvectors u 1 (k−1), u 2 (k−1),..., U M (k−1) based on the selection vector V k. A unit vector is calculated and set as the ( M + 1) th eigenvector u M + 1 (k−1). The eigenvector u M + 1 (k−1) is calculated based on the equation (3). Also, the eigenvalue λ M + 1 (k−1) corresponding to the eigenvector u M + 1 (k−1) is set to 0.

ただし、ベクトルVkΔは、数4の式に基づいて算出される。なお、(行列,行列)は、2つの行列の内積を表す。
固有ベクトル追加部41dは、固有ベクトルuM+1(k−1)及びλM+1(k−1)を、固有ベクトル格納部33内に格納する。
However, the vector V k Δ is calculated based on the equation (4). Note that (matrix, matrix) represents the inner product of two matrices.
The eigenvector adding unit 41 d stores the eigenvectors u M + 1 (k−1) and λ M + 1 (k−1) in the eigenvector storage unit 33.

ステップS7では、低次元共分散行列導出部41eは、ベクトル格納部31から選択ベクトルVkを読み出すとともに、固有ベクトル格納部33からM+1個の固有ベクトルu1(k−1),u2(k−1),・・・,uM+1(k−1)及びM+1個の固有値λ1(k−1),λ2(k−1),・・・,λM+1(k−1)を読み出す。そして、低次元共分散行列導出部41eは、これらの情報に基づいて、ベクトルV1,V2,・・・,Vkの共分散行列Ckを導出する。共分散行列Ckは、実際には、P次元の行列である。しかしながら、ここでは、低次元共分散行列導出部41eは、M+1個の固有ベクトルu1(k−1),u2(k−1),・・・,uM+1(k−1)を用いて、共分散行列Ckを近似的にM+1次元の共分散行列Ck’として算出する。具体的には、低次元共分散行列導出部41eは、M+1次元の共分散行列Ck’のl行m列の要素glm(k)を、数5の式に基づいて算出する(l=1,2,・・・,M+1、かつ、m=1,2,・・・,M+1)。
In step S7, the low-dimensional covariance matrix deriving unit 41e reads the selection vector V k from the vector storage unit 31 and M + 1 eigenvectors u 1 (k−1), u 2 (k−1) from the eigenvector storage unit 33. ), ···, u M + 1 (k-1) and M + 1 eigenvalues λ 1 (k-1), λ 2 (k-1), ···, λ M + 1 of the (k-1) read out. Then, the low-dimensional covariance matrix deriving unit 41e derives the covariance matrix C k of the vectors V 1 , V 2 ,..., V k based on these pieces of information. The covariance matrix C k is actually a P-dimensional matrix. However, here, the low-dimensional covariance matrix deriving unit 41e uses M + 1 eigenvectors u 1 (k−1), u 2 (k−1),..., U M + 1 (k−1). Thus, the covariance matrix C k is approximately calculated as an M + 1-dimensional covariance matrix C k ′. Specifically, the low-dimensional covariance matrix deriving unit 41e calculates the element g lm (k) of l rows and m columns of the M + 1 dimensional covariance matrix C k ′ based on the equation (5). 1, 2, ..., M + 1 and m = 1, 2, ..., M + 1).

ただし、δは、0〜1の間の定数であり、ciは、数6の式に基づいて(i=1,2,・・・,M+1)、δlmは、数7の式に基づいて算出される(l=1,2,・・・,M+1、かつ、m=1,2,・・・,M+1)。
すなわち、ステップS7では、P次元空間内のベクトルV1,V2,・・・,Vkを、M+1個の固有ベクトルu1(k−1),u2(k−1),・・・,uM+1(k−1)から形成されるM+1次元の固有空間内のベクトルとして近似的に捉えることにより、共分散行列Ckの次元数を低下させている。低次元共分散行列導出部41eは、M+1次元の共分散行列Ck’を、低次元共分散行列格納部34内に格納する。
However, δ is a constant between 0 and 1, c i is based on the equation (6 = 1 (1, 2,..., M + 1)), and δ lm is based on the equation (7). (L = 1, 2,..., M + 1 and m = 1, 2,..., M + 1).
That is, in step S7, the vectors V 1 , V 2 ,..., V k in the P-dimensional space are converted into M + 1 eigenvectors u 1 (k−1), u 2 (k−1),. The number of dimensions of the covariance matrix C k is reduced by approximating it as a vector in the M + 1 dimensional eigenspace formed from u M + 1 (k−1). The low-dimensional covariance matrix deriving unit 41 e stores the M + 1-dimensional covariance matrix C k ′ in the low-dimensional covariance matrix storage unit 34.

続くステップS8では、固有ベクトル更新部41fは、低次元共分散行列格納部34から共分散行列Ck’を読み出し、共分散行列Ck’のM個の固有ベクトルv1(k),v2(k),・・・,vM(k)及びM個の固有値λ1(k),λ2(k),・・・,λM(k)を算出する。固有ベクトルvi(k)は、固有値λi(k)に対応し、固有値λi(k)は、P個中i番目に大きい固有値である(i=1,2,・・・,M)。 In subsequent step S8, the eigenvector update unit 41f reads the covariance matrix C k ′ from the low-dimensional covariance matrix storage unit 34, and M eigenvectors v 1 (k), v 2 (k) of the covariance matrix C k ′. ), ···, v M (k ) and M eigenvalues λ 1 (k), λ 2 (k), ···, to calculate the λ M (k). Eigenvectors v i (k) corresponds to the eigenvalues λ i (k), the eigenvalues λ i (k) is a big eigenvalues in the P i-th (i = 1,2, ···, M ).

固有ベクトルv1(k),v2(k),・・・,vM(k)は、M+1次元のベクトルである。従って、固有ベクトル更新部41fは、数8の式に基づいて(i=1,2,・・・,M)、これらのM+1次元の固有ベクトルv1(k),v2(k),・・・,vM(k)を、P次元の固有ベクトルu1(k),u2(k),・・・,uM(k)に変換する。
ただし、vij(k)は、列ベクトルであるベクトルvi(k)のj番目の要素である。すなわち、ベクトルvi(k)は、vij(k)を用いて、数9の式のように与えられる(i=1,2,・・・,M)。
The eigenvectors v 1 (k), v 2 (k),..., V M (k) are M + 1 dimensional vectors. Therefore, the eigenvector update unit 41f is based on the equation (8) (i = 1, 2,..., M), and these M + 1-dimensional eigenvectors v 1 (k), v 2 (k),. , V M (k) are converted into P-dimensional eigenvectors u 1 (k), u 2 (k),..., U M (k).
However, v ij (k) is the j-th element of the vector v i (k) which is a column vector. That is, the vector v i (k) is given by the equation (9) using v ij (k) (i = 1, 2,..., M).

固有ベクトル更新部41fは、M個のP次元の固有ベクトルu1(k),u2(k),・・・,uM(k)及びM個の固有値λ1(k),λ2(k),・・・,λM(k)を、固有ベクトル格納部33内に格納する。 The eigenvector update unit 41f includes M P-dimensional eigenvectors u 1 (k), u 2 (k),..., U M (k) and M eigenvalues λ 1 (k), λ 2 (k). ,..., Λ M (k) are stored in the eigenvector storage unit 33.

そして、最後のベクトルVNに対するステップS6〜S8が終了すると、学習処理が終了する。学習処理が終了すると、固有ベクトル格納部33内には、N個のベクトルV1,V2,・・・,VNの最終的な主成分分析の結果として、M個のP次元の固有ベクトルu1(N),u2(N),・・・,uM(N)が保持されている。以下では、簡単のため、固有ベクトルu1(N),u2(N),・・・,uM(N)を、それぞれ固有ベクトルU1,U2,・・・,UNと表す。 When the steps S6 to S8 for the last vector V N are finished, the learning process is finished. When the learning process is completed, M P-dimensional eigenvectors u 1 are stored in the eigenvector storage unit 33 as a result of the final principal component analysis of N vectors V 1 , V 2 ,. (N), u 2 (N),..., U M (N) are held. In the following, for simplicity, the eigenvector u 1 (N), u 2 (N), ···, u M a (N), respectively eigenvector U 1, U 2, · · ·, expressed as U N.

なお、固有ベクトルU1,U2,・・・,UNとは、既に述べたとおり、テスト動画像から導出される多数のオプティカルフローDkから抽出される主成分である。また、テスト動画像とは、カメラ3の視点を様々な方向に移動させながらテスト空間を撮影したものである。従って、以上のような固有ベクトルU1,U2,・・・,UNを線型結合すれば、カメラ3のあらゆる視点の動き、すなわち、背景オプティカルフローを作成することが可能になる。 Note that the eigenvectors U 1 , U 2 ,..., U N are principal components extracted from a number of optical flows D k derived from the test moving image, as described above. The test moving image is an image of the test space while moving the viewpoint of the camera 3 in various directions. Therefore, if the eigenvectors U 1 , U 2 ,..., U N as described above are linearly combined, it is possible to create a movement of any viewpoint of the camera 3, that is, a background optical flow.

以上のとおり、ステップS4〜S8における主成分分析では、N個のベクトルV1,V2,・・・,VNの主成分分析を行うに当たり、まずはN個よりも少ないL個のベクトルV1,V2,・・・,VLに対して、低負荷で固有ベクトル及び固有値の初期値が算出される。そして、以後、残りのベクトルVL+1,VL+2,・・・,VNを順次用いて、固有ベクトル及び固有値が順次更新されてゆく。また、更新時のステップS7,S8は、初期値計算時のステップS4,S5と比べると、扱われる共分散行列の次元数がPからM+1まで低下している。従って、N個のベクトルV1,V2,・・・,VNからP次元の共分散行列CNを算出し、これを固有値分解する従来の処理に比べて、本実施形態に係る処理は短時間で終了する。特に、本実施形態では、Nは、1000程度、Pは、10000程度、Mは、5〜10程度であるため、計算負荷は大幅に減少する。 As described above, in the principal component analysis in steps S4 to S8, when performing the principal component analysis of N vectors V 1 , V 2 ,..., V N , first, L vectors V 1 that are fewer than N in number. , V 2 ,..., V L , initial values of eigenvectors and eigenvalues are calculated at a low load. Then, thereafter, the remaining vector V L + 1, V L + 2, ···, sequentially with V N, eigenvectors and eigenvalues Yuku are sequentially updated. In addition, in steps S7 and S8 at the time of updating, the number of dimensions of the covariance matrix to be handled is reduced from P to M + 1 compared to steps S4 and S5 at the time of initial value calculation. Therefore, the processing according to the present embodiment is compared with the conventional processing in which a P-dimensional covariance matrix C N is calculated from N vectors V 1 , V 2 ,. Finish in a short time. In particular, in this embodiment, N is about 1000, P is about 10000, and M is about 5 to 10, so that the calculation load is greatly reduced.

また、以上の学習処理では、L個のオプティカルフローD1,D2,・・・,DLが準備された後は、ステップS4〜S8における主成分分析の処理が、テスト動画像の撮影及び送信、オプティカルフローDkの導出の処理と並行してリアルタイムに実行される。従って、計算時間がさらに短縮されるようになっている。 In the above learning process, after the L optical flows D 1 , D 2 ,..., D L are prepared, the principal component analysis process in steps S4 to S8 is performed to capture a test moving image and It is executed in real time in parallel with the process of derivation of transmission and optical flow Dk . Therefore, the calculation time is further shortened.

以下、ステップS6〜S8における固有ベクトルの更新時のアルゴリズムについて説明する。すなわち、固有ベクトルu1(k−1),u2(k−1),・・・,uM(k−1)及び固有値λ1(k−1),λ2(k−1),・・・,λM(k−1)が与えられている場合に、固有ベクトルu1(k),u2(k),・・・,uM(k)及び固有値λ1(k),λ2(k),・・・,λM(k)を算出する方法について、説明する。 Hereinafter, an algorithm for updating eigenvectors in steps S6 to S8 will be described. That is, eigenvectors u 1 (k−1), u 2 (k−1),..., U M (k−1) and eigenvalues λ 1 (k−1), λ 2 (k−1),. , Λ M (k−1) is given, eigenvectors u 1 (k), u 2 (k),..., U M (k) and eigenvalues λ 1 (k), λ 2 ( A method for calculating k),..., λ M (k) will be described.

まず、V1,V2,・・・,Vkの共分散行列Ckは、数10のとおり表される。ただし、簡単のため、平均はゼロとする。
数10の式を変形すると、共分散行列Ckは、共分散行列Ck-1を用いて数11のとおり表される。
δは、0<δ<1の範囲内で適宜設定可能な定数である。δが大きい程、直近のベクトルVkの影響が大きく、δが小さい程、過去の記憶が残っていることになる。
First, V 1, V 2, · · ·, the covariance matrix C k of V k is expressed as number 10. However, for simplicity, the average is zero.
When the equation of Equation 10 is modified, the covariance matrix C k is expressed as Equation 11 using the covariance matrix C k−1 .
δ is a constant that can be set as appropriate within a range of 0 <δ <1. As δ is larger, the influence of the latest vector V k is larger, and as δ is smaller, the past memory remains.

ところで、ベクトルVkは、固有ベクトルu1(k−1),u2(k−1),・・・,uM(k−1)を用いて、数12の式のVk’に近似することができる。ただし、ciは、数13(数6に同じ)の式で表されるものとする。
By the way, the vector V k is approximated to V k ′ of Expression 12 using the eigenvectors u 1 (k−1), u 2 (k−1),..., U M (k−1). be able to. Here, c i is expressed by the equation (13) (same as equation (6)).

このとき、ベクトルVkとベクトルVk’との差分ベクトルVkΔは、以下の数14のように表される。
ここで、差分ベクトルVkΔと任意の固有ベクトルuj(k−1)(j=1,2,・・・,M)との内積を数14に基づいて計算すると、数15のように変形され、値が0となる。
At this time, a difference vector V k Δ between the vector V k and the vector V k ′ is expressed as the following Expression 14.
Here, when the inner product of the difference vector V k Δ and an arbitrary eigenvector u j (k−1) (j = 1, 2,..., M) is calculated based on the equation 14, it is transformed as the equation 15. And the value becomes 0.

すなわち、ベクトルVkΔは、固有ベクトルu1(k−1),u2(k−1),・・・,uM(k−1)に直交している。従って、共分散行列Ck-1のもう1つの固有ベクトルuM+1(k−1)を、ベクトルVkΔをベクトルVkΔの大きさで除した単位ベクトルとして、数16(数3と同じ)のように表すことができる。
That is, the vector V k Δ is orthogonal to the eigenvectors u 1 (k−1), u 2 (k−1),..., U M (k−1). Accordingly, the covariance matrix C k-1 Another eigenvector u M + 1 to (k-1), a unit vector obtained by dividing the vector V k delta in the magnitude of the vector V k delta, the number 16 (number 3 The same).

ところで、共分散行列Ckは、M個の固有ベクトルu1(k),u2(k),・・・,uM(k)を用いて、数17の式のとおり近似することができる。
数11の式に数17の式を代入すると、数18の式となる。
By the way, the covariance matrix C k can be approximated as shown in Expression 17 using M eigenvectors u 1 (k), u 2 (k),..., U M (k).
Substituting the formula 17 into the formula 11 yields the formula 18.

ここで、共分散行列Ckのl行m列の要素は、数19の式により定義されるglm(k)表すことができる(l,mは、自然数)。
数19の式に数18の式を代入して変形すると、数20(数5と同じ)の式が得られる。
Here, an element of l rows and m columns of the covariance matrix C k can be expressed by g lm (k) defined by the equation (19) (l and m are natural numbers).
Substituting the equation of equation 18 into the equation of equation 19 for transformation yields the equation of equation 20 (the same as equation 5).

ここで、l行m列(l=1,2,・・・,M+1,m=1,2,・・・,M+1)の要素をglm(k)とするM+1次元の行列Ck’を定義したとき、この行列Ck’の固有値方程式は、数21のようになる(iは、自然数)。
数21の式は、数22の式(iは、自然数)で表されるP次元の共分散行列Ckの固有値方程式の別表現である。
このとき、以上の2つの固有値方程式中のui(k)とvi(k)との間には、数23(数8と同じ)の関係がある。ただし、vij(k)は、数24(数9と同じ)で表される。
Here, an M + 1-dimensional matrix C k ′ having an element of l rows and m columns (l = 1, 2,..., M + 1, m = 1, 2,..., M + 1) as g lm (k) When defined, the eigenvalue equation of this matrix C k ′ is as shown in Equation 21 (i is a natural number).
Expression 21 is another expression of the eigenvalue equation of the P-dimensional covariance matrix C k expressed by Expression 22 (i is a natural number).
At this time, there is a relationship of Equation 23 (same as Equation 8) between u i (k) and v i (k) in the above two eigenvalue equations. However, v ij (k) is expressed by Expression 24 (same as Expression 9).

以上より、固有ベクトルの更新時において、P次元の共分散行列Ckの固有値問題を、より低次元のM+1次元の固有値問題へと変換し、計算負荷を低減することができる。 As described above, at the time of updating the eigenvector, the eigenvalue problem of the P-dimensional covariance matrix C k can be converted into a lower-dimensional M + 1-dimensional eigenvalue problem, and the calculation load can be reduced.

<2−2.認識処理>
続いて、図4を参照しつつ、学習処理後の認識処理について説明する。まず、認識処理と並行して、カメラ3により、時々刻々、認識処理の対象となる対象動画像が撮影される。対象動画像に含まれるフレームは、時々刻々、カメラ3から監視コンピュータ1へネットワーク6を介して送信され、記憶部30内に順次格納されてゆく。そして、記憶部30内に一定量のフレームが蓄積されると、図4に示す認識処理が開始される。
<2-2. Recognition process>
Next, the recognition process after the learning process will be described with reference to FIG. First, in parallel with the recognition process, a target moving image that is a target of the recognition process is captured by the camera 3 every moment. Frames included in the target moving image are transmitted from the camera 3 to the monitoring computer 1 via the network 6 and stored in the storage unit 30 sequentially. When a certain amount of frames are accumulated in the storage unit 30, the recognition process shown in FIG. 4 is started.

認識処理では、図4に示すとおり、記憶部30内に格納されている対象動画像の各フレームに対し、ステップS11〜S14が繰り返し実行される。まず、ステップS11では、その後のステップS12〜S14の処理の対象として、記憶部30内に格納されている未処理のフレームのうち、最も過去の時刻kに撮影されたフレーム(以下、対象フレーム)が選択される。   In the recognition process, steps S11 to S14 are repeatedly executed for each frame of the target moving image stored in the storage unit 30, as shown in FIG. First, in step S11, among the unprocessed frames stored in the storage unit 30 as the targets of the subsequent steps S12 to S14, a frame shot at the past time k (hereinafter referred to as a target frame). Is selected.

続いて、ステップS12では、動き導出部42が、時刻kでの対象フレームに対応するオプティカルフローEkを導出する。オプティカルフローEkは、テスト動画像の代わりに対象動画像を対象として、オプティカルフローDkと同様の方法で導出される。 Subsequently, in step S12, the motion deriving unit 42 derives an optical flow E k corresponding to the target frame at time k. The optical flow E k is derived by the same method as the optical flow D k for the target moving image instead of the test moving image.

すなわち、オプティカルフローEkとは、対象フレーム内の様々な局所領域の動きを表すベクトル場である。また、オプティカルフローEkとは、時刻kから時刻k+1の間の移動体の動きと、カメラ3の視点の動き、すなわち、移動体の背景の動きとを表すベクトル場である。以下では、オプティカルフローDkと同様、オプティカルフローEkを列ベクトルとして捉え直し、ベクトルWkと表す。 That is, the optical flow E k is a vector field that represents the movement of various local regions in the target frame. The optical flow E k is a vector field representing the movement of the moving body between time k and time k + 1 and the movement of the viewpoint of the camera 3, that is, the movement of the background of the moving body. In the following, like the optical flow D k , the optical flow E k is re-recognized as a column vector and expressed as a vector W k .

次に、ステップS13では、近似部43が、最小二乗法等の方法により、ステップS12で導出されたベクトルWkを、記憶部30内に格納されている固有ベクトルU1,U2,・・・,UNの線型結合として近似する。以下、この線型結合を表すベクトルをWk’と表す。このとき、ベクトルWk’は、M個の係数a1(k),a2(k),・・・,aM(k)を用いて、数25のように表される。従って、ステップS13は、N個の係数a1(k),a2(k),・・・,aM(k)を算出するステップである。
Next, in step S13, the approximating unit 43 converts the vector W k derived in step S12 into eigenvectors U 1 , U 2 ,. It is approximated as a linear combination of U N. Hereinafter, a vector representing this linear combination is represented as W k ′. At this time, the vector W k ′ is expressed as in Expression 25 using M coefficients a 1 (k), a 2 (k),..., A M (k). Therefore, step S13 is a step of calculating N coefficients a 1 (k), a 2 (k),..., A M (k).

ここで、既に述べたとおり、カメラ3の視点の動きは、固有ベクトルU1,U2,・・・,UNの線型結合として表すことが可能である。従って、ベクトルWkを固有ベクトルU1,U2,・・・,UNの線型結合として近似したベクトルWk’は、時刻kから時刻k+1の間のカメラ3の視点の動きを表していることになる。 Here, as already mentioned, the movement of the viewpoint of the camera 3, the eigenvectors U 1, U 2, · · ·, can be expressed as a linear combination of U N. Thus, eigenvector U 1 vector W k, U 2, · · ·, vector W k which approximates as linear combination of U N 'is that it represents the motion of the viewpoint of the camera 3 between time k at time k + 1 become.

次に、ステップS14では、領域検出部44が、ベクトルWkとベクトルWk’との差分である差分ベクトルFk=Wk−Wk’を導出する。なお、ここでは、ベクトルWkからカメラ3の視点の動きを表すベクトルWk’を引くことで、ベクトルWkからカメラ3の視点の動きをキャンセルしている。すなわち、差分ベクトルFkは、時刻kから時刻k+1の間の移動体の動きを表すものとなる。 Next, in step S < b> 14, the region detection unit 44 derives a difference vector F k = W k −W k ′ that is a difference between the vector W k and the vector W k ′. Here, by subtracting the vector W k 'representing the motion of the viewpoint of the camera 3 from the vector W k, and it cancels the movement of the viewpoint of the camera 3 from the vector W k. That is, the difference vector F k represents the movement of the moving body between time k and time k + 1.

続けて、領域検出部44は、差分ベクトルFkの各成分となるベクトルfij(k)の大きさを判断する(i=1,2,・・・,I、かつ、j=1,2,・・・,J)。そして、領域検出部44は、所定値よりも大きさの大きいベクトルfij(k)に対応する点pijを検出し、このような点pijを、時刻kの対象フレーム内で移動体の存在する領域として認識する。また、領域検出部44は、対象フレーム内で移動体の存在する領域を示す情報を記憶部30内に格納する。 Subsequently, the region detection unit 44 determines the magnitude of the vector f ij (k) that is each component of the difference vector F k (i = 1, 2,..., I and j = 1, 2). , ..., J). Then, the region detection unit 44 detects a point p ij corresponding to the vector f ij (k) having a magnitude larger than a predetermined value, and such a point p ij is detected in the target frame at time k. Recognize as an existing area. In addition, the region detection unit 44 stores information indicating a region where the moving object exists in the target frame in the storage unit 30.

以上のステップS11〜S14が繰り返されることにより、時々刻々のフレーム内での移動体の位置が検出される。図4に示すとおり、解釈部45は、適当な枚数のフレーム分の、移動体の存在する領域を示す情報が記憶部30内に蓄積される度に、対象動画像に捉えられた移動体の動きを解釈する(ステップS15)。また、解釈部45は、必要に応じて、その解釈の結果を表示部10及び通信部50を介して出力する。なお、移動体の動きを解釈するためのアルゴリズムとしては、様々なものが考えられるが、例えば、対象動画像から移動体として検出される見守りの対象となる高齢者等に何らかの異常が起こっていないか(適切な時間に起きて、活動しているか等)を判断することが考えられる。   By repeating the above steps S11 to S14, the position of the moving body within the frame is detected every moment. As shown in FIG. 4, each time the information indicating the area where the moving object exists for an appropriate number of frames is accumulated in the storage unit 30, the interpretation unit 45 stores the moving object captured in the target moving image. The movement is interpreted (step S15). Moreover, the interpretation part 45 outputs the result of the interpretation via the display part 10 and the communication part 50 as needed. There are various algorithms for interpreting the movement of the moving object. For example, there is no abnormality in an elderly person who is a monitoring target detected as a moving object from the target moving image. (Whether they are up and working at an appropriate time).

図4に示す認識処理は、以上のステップを記憶部30内から未処理のフレームがなくなるまで繰り返した後、終了する。   The recognition process shown in FIG. 4 ends after repeating the above steps until there are no unprocessed frames in the storage unit 30.

<3.変形例>
以上、本発明の一実施形態について説明したが、本発明は上記実施形態に限定されるものではなく、その趣旨を逸脱しない限りにおいて、種々の変更が可能である。例えば、以下の変更が可能である。また、以下の変形例の要旨は、適宜組み合わせることができる。
<3. Modification>
As mentioned above, although one Embodiment of this invention was described, this invention is not limited to the said embodiment, A various change is possible unless it deviates from the meaning. For example, the following changes can be made. Moreover, the gist of the following modifications can be combined as appropriate.

<3−1>
上記実施形態に係る主成分分析の方法は、画像の背景の抽出以外の任意の用途で利用可能である。ただし、画像の背景の抽出を行う場合等、必要とされる固有ベクトルの個数が少ない場合には、主成分分析に要する計算負荷を低減することができるため、特に有用である。
<3-1>
The principal component analysis method according to the above embodiment can be used for any purpose other than the extraction of the background of an image. However, when the number of eigenvectors required is small, such as when extracting the background of an image, the calculation load required for principal component analysis can be reduced, which is particularly useful.

<3−2>
上記実施形態に係る画像の背景の抽出の機能は、画像のオプティカルフローではなく、画像の画素値そのものを表すベクトルを対象とする場合にも使用することができる。この場合、ベクトルVkやWkを、画素値を表すベクトルとすればよい。なお、画像の背景を、オプティカルフローではなく画像の画素値そのもので表現する場合、画像の背景は、照明の変化や長時間放置される物体がある等、時間的に少しずつ変化する。このような場合には、学習処理を定期的に実行し、背景画像を表すための固有ベクトルのセットを定期的に更新することが好ましい。例えば、認識処理のステップS11において対象フレームを選択する度に、学習処理のステップS6〜S8と同様の固有ベクトルの更新処理を実行し、その後、ステップS13において、当該最新の固有ベクトルのセットを用いて背景画像を表す線形結合を算出してもよい。
<3-2>
The function of extracting the background of the image according to the above embodiment can be used not only for the optical flow of the image but also for a vector representing the pixel value of the image itself. In this case, the vectors V k and W k may be vectors representing pixel values. Note that when the background of the image is expressed not by the optical flow but by the pixel value of the image itself, the background of the image changes little by little, such as a change in illumination or an object left for a long time. In such a case, it is preferable to periodically execute the learning process and periodically update the set of eigenvectors for representing the background image. For example, each time a target frame is selected in step S11 of the recognition process, the eigenvector update process similar to that in steps S6 to S8 of the learning process is performed. Then, in step S13, the background is set using the latest set of eigenvectors. A linear combination representing an image may be calculated.

<3−3>
上記実施形態では、LとMの大きさに関して特に制約は設けられなかったが、L≧Mとすることが好ましい。L<Mの場合、ステップS5で算出されるλ1(L),λ2(L),・・・,λM(L)の中にゼロとなるものが2つ以上出現することがあり、その場合、M個の固有値及び固有ベクトルの選択に任意性が生じてしまうからである。M個の固有ベクトルを用いて背景画像又は背景オプティカルフローを近似するに当たっては、固有値の大きい固有ベクトルU1,U2,・・・,UMを用意することが重要となるため、精度の観点からは、L≧Mが好ましい。
<3-3>
In the above embodiment, there is no particular restriction on the size of L and M, but it is preferable that L ≧ M. When L <M, two or more zeros may appear in λ 1 (L), λ 2 (L),..., Λ M (L) calculated in step S5. In this case, the selection of M eigenvalues and eigenvectors is arbitrary. In approximating the background image or the background optical flow using M eigenvectors, it is important to prepare eigenvectors U 1 , U 2 ,..., U M having large eigenvalues. L ≧ M is preferable.

1 監視コンピュータ(背景抽出装置、主成分分析装置)
2 画像処理プログラム
2a プログラムモジュール(主成分分析プログラム)
30 記憶部
31 ベクトル格納部
32 初期共分散行列格納部
33 固有ベクトル格納部
34 低次元共分散行列格納部
41 学習部(主成分分析部)
41a オプティカルフロー導出部
41b 初期共分散行列導出部
41c 初期固有ベクトル算出部
41d 固有ベクトル追加部
41f 固有ベクトル更新部
43 近似部
1 Monitoring computer (background extraction device, principal component analysis device)
2 Image processing program 2a Program module (principal component analysis program)
30 storage unit 31 vector storage unit 32 initial covariance matrix storage unit 33 eigenvector storage unit 34 low-dimensional covariance matrix storage unit 41 learning unit (principal component analysis unit)
41a Optical flow deriving unit 41b Initial covariance matrix deriving unit 41c Initial eigenvector calculating unit 41d Eigenvector adding unit 41f Eigenvector updating unit 43 Approximating unit

Claims (3)

対象画像の背景を抽出する背景抽出装置であって、
N枚(Nは、2以上の整数)のテスト画像にそれぞれ対応するN個のP次元(Pは、3以上の整数)のテストベクトルV1,V2,・・・,VNを主成分分析することにより、M個(Mは、M+1<Pを満たす整数)の固有ベクトルu1(N),u2(N),・・・,uM(N)を算出する主成分分析部と、
前記対象画像に対応する対象ベクトルをM個の固有ベクトルu1(N),u2(N),・・・,uM(N)の線形結合として近似し、前記線形結合を前記対象画像の背景に対応する背景ベクトルとして設定する近似部と、
を備え、
前記主成分分析部は、
テストベクトルV1,V2,・・・,VL(Lは、L<Nを満たす自然数)の共分散行例CLを導出する初期共分散行列導出部と、
共分散行列CLのM個の固有ベクトルu1(L),u2(L),・・・,uM(L)を算出する初期固有ベクトル算出部と、
k=L+1,L+2,・・・,Nに対し順次、
テストベクトルVkに基づいて、M個の固有ベクトルu1(k−1),u2(k−1),・・・,uM(k−1)に直交する単位ベクトルを算出し、M+1番目の固有ベクトルuM+1(k−1)として設定する固有ベクトル追加部と、
テストベクトルVkに基づいて、テストベクトルV1,V2,・・・,Vkの共分散行列Ckとして近似的に、M+1個の固有ベクトルu1(k−1),u2(k−1),・・・,uM+1(k−1)を用いて、M+1次元の共分散行列Ck’を導出する低次元共分散行列導出部と、
共分散行列Ck’のM個の(M+1)次元の固有ベクトルを算出し、M個のP次元の固有ベクトルu1(k),u2(k),・・・,uM(k)に変換する固有ベクトル更新部と
を有する、
背景抽出装置。
A background extraction device for extracting a background of a target image,
The N P-dimensional (P is an integer of 3 or more) test vectors V 1 , V 2 ,..., V N corresponding to N (N is an integer of 2 or more) test images, respectively. A principal component analysis unit for calculating M (M is an integer satisfying M + 1 <P) eigenvectors u 1 (N), u 2 (N),..., U M (N) by analyzing;
The target vector corresponding to the target image is approximated as a linear combination of M eigenvectors u 1 (N), u 2 (N),..., U M (N), and the linear combination is used as the background of the target image. An approximation part set as a background vector corresponding to,
With
The principal component analysis unit
An initial covariance matrix derivation unit for deriving a covariance row example C L of test vectors V 1 , V 2 ,..., V L (L is a natural number satisfying L <N);
An initial eigenvector calculator that calculates M eigenvectors u 1 (L), u 2 (L),..., U M (L) of the covariance matrix C L ;
For k = L + 1, L + 2,.
Based on the test vector V k , a unit vector orthogonal to M eigenvectors u 1 (k−1), u 2 (k−1),..., U M (k−1) is calculated, and M + 1th An eigenvector adding unit that is set as an eigenvector u M + 1 (k−1) of
Based on the test vectors V k, test vectors V 1, V 2, ···, approximately as the covariance matrix C k of V k, M + 1 eigenvectors u 1 (k-1), u 2 (k- 1),..., U M + 1 (k−1), and a low-dimensional covariance matrix deriving unit for deriving an M + 1-dimensional covariance matrix C k ′;
M (M + 1) -dimensional eigenvectors of the covariance matrix C k ′ are calculated and converted to M P-dimensional eigenvectors u 1 (k), u 2 (k),..., U M (k). An eigenvector update unit
Background extraction device.
N個(Nは、2以上の整数)のP次元(Pは、3以上の整数)のベクトルV1,V2,・・・,VNを主成分分析することにより、M個(Mは、M+1<Pを満たす整数)の固有ベクトルu1(N),u2(N),・・・,uM(N)を算出する主成分分析装置であって、
ベクトルV1,V2,・・・,VNを格納するベクトル格納部と、
前記ベクトル格納部からベクトルV1,V2,・・・,VL(Lは、L<Nを満たす自然数)を読み出し、ベクトルV1,V2,・・・,VLの共分散行例CLを導出する初期共分散行列導出部と、
共分散行列CLを格納する初期共分散行列格納部と、
前記初期共分散行列格納部から共分散行列CLを読み出し、共分散行列CLのM個の固有ベクトルu1(L),u2(L),・・・,uM(L)を算出する初期固有ベクトル算出部と、
k=L+1,L+2,・・・,Nに対し順次、
前記ベクトル格納部からベクトルVkを読み出し、ベクトルVkに基づいて、M個の固有ベクトルu1(k−1),u2(k−1),・・・,uM(k−1)に直交する単位ベクトルを算出し、M+1番目の固有ベクトルuM+1(k−1)として設定する固有ベクトル追加部と、
前記ベクトル格納部からベクトルVkを読み出し、ベクトルVkに基づいて、ベクトルV1,V2,・・・,Vkの共分散行列Ckとして近似的に、M+1個の固有ベクトルu1(k−1),u2(k−1),・・・,uM+1(k−1)を用いて、M+1次元の共分散行列Ck’を導出する低次元共分散行列導出部と、
共分散行列Ck’を格納する低次元共分散行列格納部と、
前記低次元共分散行列格納部から共分散行列Ck’を読み出し、共分散行列Ck’のM個のM+1次元の固有ベクトルを算出し、M個のP次元の固有ベクトルu1(k),u2(k),・・・,uM(k)に変換する固有ベクトル更新部と、
を備える、
主成分分析装置。
N (N is an integer of 2 or more) P dimension (P is an integer of 3 or more) vectors V 1, V 2 of, ..., by principal component analysis V N, M (M is , M + 1 <P), eigenvectors u 1 (N), u 2 (N),..., U M (N),
A vector storage unit for storing vectors V 1 , V 2 ,..., V N ;
The vector V 1 from the vector storage section, V 2, ···, V L (L is, L <natural number satisfying N) reads out the covariance row Examples of vectors V 1, V 2, ···, V L An initial covariance matrix derivation unit for deriving C L ;
An initial covariance matrix storage for storing the covariance matrix C L ;
The covariance matrix C L is read from the initial covariance matrix storage, and M eigenvectors u 1 (L), u 2 (L),..., U M (L) of the covariance matrix C L are calculated. An initial eigenvector calculation unit;
For k = L + 1, L + 2,.
A vector V k is read from the vector storage unit, and M eigenvectors u 1 (k−1), u 2 (k−1),..., U M (k−1) are obtained based on the vector V k. An eigenvector adding unit that calculates an orthogonal unit vector and sets the unit vector as an M + 1th eigenvector u M + 1 (k−1);
I read the vector V k from the vector storage section, based on the vector V k, the vector V 1, V 2, · · ·, approximately as the covariance matrix C k of V k, M + 1 eigenvectors u 1 (k −1), u 2 (k−1),..., U M + 1 (k−1), and a low-dimensional covariance matrix deriving unit for deriving an M + 1-dimensional covariance matrix C k ′;
A low-dimensional covariance matrix storage for storing the covariance matrix C k ′;
The covariance matrix C k ′ is read from the low-dimensional covariance matrix storage unit, M M + 1 dimensional eigenvectors of the covariance matrix C k ′ are calculated, and M P dimensional eigenvectors u 1 (k), u 2 (k), ..., u M (k) to convert eigenvectors,
Comprising
Principal component analyzer.
N個(Nは、2以上の整数)のP次元(Pは、3以上の整数)のベクトルV1,V2,・・・,VNを主成分分析することにより、M個(Mは、M+1<Pを満たす整数)の固有ベクトルu1(N),u2(N),・・・,uM(N)を算出するための主成分分析プログラムであって、記憶部を有するコンピュータに、
前記記憶部に、ベクトルV1,V2,・・・,VNを格納するステップと、
前記記憶部からベクトルV1,V2,・・・,VL(Lは、L<Nを満たす自然数)を読み出し、ベクトルV1,V2,・・・,VLの共分散行例CLを導出するステップと、
前記記憶部に、共分散行列CLを格納するステップと、
前記記憶部から共分散行列CLを読み出し、共分散行列CLのM個の固有ベクトルu1(L),u2(L),・・・,uM(L)を算出するステップと、
k=L+1,L+2,・・・,Nに対し順次、
前記記憶部からベクトルVkを読み出し、ベクトルVkに基づいて、M個の固有ベクトルu1(k−1),u2(k−1),・・・,uM(k−1)に直交する単位ベクトルを算出し、M+1番目の固有ベクトルuM+1(k−1)として設定するステップと、
前記記憶部からベクトルVkを読み出し、ベクトルVkに基づいて、ベクトルV1,V2,・・・,Vkの共分散行列Ckとして近似的に、M+1個の固有ベクトルu1(k−1),u2(k−1),・・・,uM+1(k−1)を用いて、M+1次元の共分散行列Ck’を導出するステップと、
前記記憶部に、共分散行列Ck’を格納するステップと、
前記記憶部から共分散行列Ck’を読み出し、共分散行列Ck’のM個のM+1次元の固有ベクトルを算出し、M個のP次元の固有ベクトルu1(k),u2(k),・・・,uM(k)に変換するステップと
を実行させる、
主成分分析プログラム。
N (N is an integer of 2 or more) P dimension (P is an integer of 3 or more) vectors V 1, V 2 of, ..., by principal component analysis V N, M (M is , An integer satisfying M + 1 <P), a principal component analysis program for calculating eigenvectors u 1 (N), u 2 (N),..., U M (N). ,
Storing vectors V 1 , V 2 ,..., V N in the storage unit;
Vector V 1, V 2 from the storage unit, · · ·, V L (L is, L <natural number satisfying N) reads out the vector V 1, V 2, ···, V L of the covariance rows Example C Deriving L ;
Storing a covariance matrix C L in the storage unit;
Reading the covariance matrix C L from the storage unit and calculating M eigenvectors u 1 (L), u 2 (L),..., U M (L) of the covariance matrix C L ;
For k = L + 1, L + 2,.
A vector V k is read from the storage unit, and is orthogonal to M eigenvectors u 1 (k−1), u 2 (k−1),..., U M (k−1) based on the vector V k. Calculating a unit vector to be set and setting it as the ( M + 1) th eigenvector u M + 1 (k−1);
I read the vector V k from the storage unit, on the basis of the vector V k, the vector V 1, V 2, · · ·, approximately as the covariance matrix C k of V k, M + 1 eigenvectors u 1 (k- 1) deriving an M + 1 dimensional covariance matrix C k ′ using u 2 (k−1),..., U M + 1 (k−1);
Storing a covariance matrix C k ′ in the storage unit;
The covariance matrix C k ′ is read from the storage unit, M M + 1 dimensional eigenvectors of the covariance matrix C k ′ are calculated, and M P dimensional eigenvectors u 1 (k), u 2 (k), .., U M (k) are executed.
Principal component analysis program.
JP2014056631A 2014-03-19 2014-03-19 Background extraction device, principal component analysis device, and principal component analysis program Active JP6292613B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014056631A JP6292613B2 (en) 2014-03-19 2014-03-19 Background extraction device, principal component analysis device, and principal component analysis program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014056631A JP6292613B2 (en) 2014-03-19 2014-03-19 Background extraction device, principal component analysis device, and principal component analysis program

Publications (2)

Publication Number Publication Date
JP2015179413A JP2015179413A (en) 2015-10-08
JP6292613B2 true JP6292613B2 (en) 2018-03-14

Family

ID=54263405

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014056631A Active JP6292613B2 (en) 2014-03-19 2014-03-19 Background extraction device, principal component analysis device, and principal component analysis program

Country Status (1)

Country Link
JP (1) JP6292613B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002032760A (en) * 2000-07-17 2002-01-31 Mitsubishi Electric Corp Method and device for extracting moving object
US7336803B2 (en) * 2002-10-17 2008-02-26 Siemens Corporate Research, Inc. Method for scene modeling and change detection

Also Published As

Publication number Publication date
JP2015179413A (en) 2015-10-08

Similar Documents

Publication Publication Date Title
US11222239B2 (en) Information processing apparatus, information processing method, and non-transitory computer-readable storage medium
US10726244B2 (en) Method and apparatus detecting a target
US10872262B2 (en) Information processing apparatus and information processing method for detecting position of object
KR102519085B1 (en) Method and apparatus of multi-frame super resolution robust to local and global motion
US9275309B2 (en) System and method for rapid face recognition
JP6813055B2 (en) Image processing system, image processing method and program storage medium
TWI496092B (en) Face identifying device, character image searching system, program for controlling face identifying device, computer readable recording medium, and method for controlling face identifying device
TW202101371A (en) Method and apparatus for processing video stream
US20150339516A1 (en) Collation apparatus and method for the same, and image searching apparatus and method for the same
US20150215590A1 (en) Image demosaicing
JP6624794B2 (en) Image processing apparatus, image processing method, and program
CN105095853B (en) Image processing apparatus and image processing method
CN105225222B (en) Automatic assessment of perceptual visual quality of different image sets
JP2015099559A (en) Image processing apparatus, image processing method, and program
US20150227819A1 (en) Image processing method and apparatus using trained dictionary
JP7370922B2 (en) Learning method, program and image processing device
JP7176616B2 (en) Image processing system, image processing apparatus, image processing method, and image processing program
US20180160071A1 (en) Feature Detection In Compressive Imaging
JP6202938B2 (en) Image recognition apparatus and image recognition method
JP5791361B2 (en) PATTERN IDENTIFICATION DEVICE, PATTERN IDENTIFICATION METHOD, AND PROGRAM
JP6292613B2 (en) Background extraction device, principal component analysis device, and principal component analysis program
KR102300500B1 (en) Method, device and system for processing three-dimensional cut image of product
JP7448006B2 (en) Object position estimation device
JP7386630B2 (en) Image processing device, control method and program for the image processing device
Jia et al. Fast face hallucination with sparse representation for video surveillance

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180116

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180207

R150 Certificate of patent or registration of utility model

Ref document number: 6292613

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250