JP4800367B2 - Moving object extraction device, moving object extraction method, and moving object extraction program - Google Patents
Moving object extraction device, moving object extraction method, and moving object extraction program Download PDFInfo
- Publication number
- JP4800367B2 JP4800367B2 JP2008269128A JP2008269128A JP4800367B2 JP 4800367 B2 JP4800367 B2 JP 4800367B2 JP 2008269128 A JP2008269128 A JP 2008269128A JP 2008269128 A JP2008269128 A JP 2008269128A JP 4800367 B2 JP4800367 B2 JP 4800367B2
- Authority
- JP
- Japan
- Prior art keywords
- background
- probability
- foreground
- pixel
- gray value
- 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
Images
Landscapes
- Image Analysis (AREA)
Description
本発明は、ある背景の前段で前景として移動している移動対象を撮影した撮影画像から移動対象を抽出する移動対象抽出装置、移動対象抽出方法及び移動対象抽出プログラムの技術に関する。 The present invention relates to a technique for a moving target extracting apparatus, a moving target extracting method, and a moving target extracting program for extracting a moving target from a captured image obtained by shooting a moving target moving as a foreground in a preceding stage of a background.
現在、実環境を撮影した映像から人や車など特定の移動対象を抽出する画像処理技術が存在している。そして、そのような移動対象を背景から抽出する具体的方法としては、例えば、撮影された映像から時間的に連続する2枚の画像を取り出して各画素の輝度変動、換言すれば輝度値の差分を計算し、撮影された映像における一定時間の複数の画像に対して同様の計算を繰り返して移動対象の移動方向等を特定する背景差分法を用いることができる。しかしながら、このような方法は抽出しようとする移動対象以外の背景に輝度変動や揺らぎがないことを前提条件とするため、常に一定の輝度が与えられている会社の受付窓口での監視サービス等でしか利用できず、抽出精度が非常に低いことが知られている。 Currently, there exists an image processing technique for extracting a specific moving object such as a person or a car from a video of a real environment. As a specific method for extracting such a moving object from the background, for example, two temporally continuous images are taken out from the captured video and the luminance fluctuation of each pixel, in other words, the difference in luminance value is obtained. The background subtraction method can be used in which the same calculation is repeated for a plurality of images in a certain period of time in the captured video to specify the moving direction of the moving target. However, since such a method is based on the premise that there is no luminance fluctuation or fluctuation in the background other than the moving object to be extracted, it is a monitoring service at a reception desk of a company that always gives a certain luminance. However, it is known that the extraction accuracy is very low.
そこで、背景の輝度についても時々刻々と変化することについても考慮し、一定期間に撮影した背景のみの画像から背景の平均輝度を平均画像として予め計算しておき、その平均画像に対する移動対象の輝度変動を計算することにより、前述の抽出精度を高くする方法が存在している。
しかしながら、撮影しようとする実環境には風の影響に起因する樹木の揺れや地球の自転に起因する太陽光の陰影の変化等の様々な要因が含まれるため、平均画像自体も時々刻々と変化し、背景から移動対象を確実に抽出することは困難である。移動対象については人や車の具体的形状を予めモデル化しておくことにより、移動対象をある程度抽出することが可能となるが、移動対象は人や車以外にも存在し、たとえ人のみを対象とする場合であっても撮影方向によっては人としての形状が変化するため、形状に関するモデル化も困難である。以上から、前景と背景とが時空間的に同時に変化するため、前述した単純な背景差分法では前景としての移動対象を抽出することが困難であるという問題があった。 However, since the actual environment to be photographed includes various factors such as tree shake due to wind effects and changes in the shade of sunlight due to the rotation of the earth, the average image itself also changes from moment to moment. However, it is difficult to reliably extract the moving object from the background. By modeling the specific shapes of people and cars in advance, it is possible to extract the objects to be moved to a certain extent. Even in this case, since the shape of a person changes depending on the shooting direction, it is difficult to model the shape. From the above, since the foreground and the background change simultaneously in space and time, there is a problem that it is difficult to extract the moving object as the foreground by the simple background subtraction method described above.
本発明は、上記を鑑みてなされたものであり、前景として移動している移動対象を安定かつ精度よく抽出する移動対象抽出装置、移動対象抽出方法及び移動対象抽出プログラムを提供することを課題とする。 The present invention has been made in view of the above, and it is an object of the present invention to provide a moving target extraction device, a moving target extraction method, and a moving target extraction program that stably and accurately extract a moving target moving as a foreground. To do.
第1の請求項に係る発明は、ある背景の前段で前景として移動している移動対象を撮影した撮影画像から前記移動対象を抽出する移動対象抽出装置において、前記背景のみを撮影した背景画像であって、所定の範囲で動作する動的領域を有する時系列な複数の背景画像を蓄積しておく背景画像蓄積手段と、前記背景画像を表現している各濃淡値が占める割合を背景発生確率として計算する背景発生確率計算式を蓄積しておく背景発生確率計算式蓄積手段と、前記撮影画像において前記前景の濃淡値が占める割合を所定の前景発生確率として蓄積しておく前景発生確率蓄積手段と、ベイズ推定法を適用した条件付き確率であって、前記撮影画像を構成する各画素が濃淡値で表現される場合に、当該画素が背景である条件付き背景確率と前景である条件付き前景確率との比率を用いて、当該画素が背景であるか前景であるかを分類する画素分類式を蓄積しておく画素分類式蓄積手段と、前記撮影画像を入力し、撮影画像格納手段に格納する入力手段と、前記背景発生確率計算式蓄積手段から前記背景発生確率計算式を読み出すと共に前記背景画像蓄積手段から前記背景画像を読み出して、当該背景画像の各濃淡値に対して前記背景発生確率をそれぞれ計算する計算手段と、前記背景発生確率計算式蓄積手段から前記背景確率発生計算式を読み出して、前記複数の背景画像の前記動的領域について前記背景発生確率をそれぞれ計算し、各濃淡値に対して当該背景発生確率を生起頻度とするヒストグラムを複数生成する第1のヒストグラム生成手段と、非線形最小二乗法を用いて前記複数のヒストグラムに近似する近似関数を生成する第1の近似関数生成手段と、連続する2枚の前記背景画像を用いて、前記動的領域内で任意点が移動する速度を正規化相互相関法を用いて計算する速度ベクトル計算手段と、当該動的領域内で当該速度を有する前記任意点が占める割合を速度発生確率として計算し、各速度に対して当該速度発生確率を生起頻度とするヒストグラムを生成する第2のヒストグラム生成手段と、非線形最小二乗法を用いて当該ヒストグラムに近似する近似関数を生成する第2の近似関数生成手段と、前記画素分類式蓄積手段から前記画素分類式を読み出し、前記前景発生確率蓄積手段から前記前景発生確率を読み出し、更に前記撮影画像格納手段から前記撮影画像を読み出して、当該撮影画像を構成している各画素に対して、当該各画素の濃淡値に対応する前記計算手段で計算された前記背景発生確率を前記条件付き背景確率とすると共に当該前景発生確率を前記条件付き前景確率として前記画素分類式をそれぞれ計算し、当該各画素が背景であるか前景であるかを分類する画素分類手段と、前記前景として分類された画素を前記移動対象として抽出する抽出手段と、を有し、前記画素分類手段は、前記動的領域については、前記第1の近似関数生成手段で生成された近似関数を満たす背景発生確率と、前記第2の近似関数生成手段で生成された近似関数を満たす速度発生確率との乗算値を、前記条件付き背景確率として前記分類を行うことを要旨とする。 The invention according to the first aspect, in the moving object extraction unit for extracting the moving object from the captured image obtained by photographing a moving object which is moving as the foreground in front of a background, the background image taken only the background A background image storage means for storing a plurality of time-series background images having a dynamic region operating within a predetermined range, and a background occurrence probability as a ratio of each gray value representing the background image A background occurrence probability calculation expression storage means for storing a background occurrence probability calculation expression to be calculated as a foreground occurrence probability storage means for storing a proportion of the gray value of the foreground in the photographed image as a predetermined foreground occurrence probability And a conditional probability to which the Bayesian estimation method is applied, and when each pixel constituting the captured image is expressed by a gray value, the conditional background probability that the pixel is the background and the foreground A pixel classification formula storage means for storing a pixel classification formula for classifying whether the pixel is the background or the foreground using a ratio with the conditional foreground probability, and the captured image is input and the captured image is stored. Reading out the background occurrence probability calculation formula from the background generation probability calculation formula storage means and reading out the background image from the background image storage means, and for each gray value of the background image Calculation means for calculating each background occurrence probability, and reading the background probability occurrence calculation formula from the background occurrence probability calculation formula storage means, respectively calculating the background occurrence probability for the dynamic region of the plurality of background images, First histogram generating means for generating a plurality of histograms having the background occurrence probability as an occurrence frequency for each gray value, and the plurality of the plurality of histograms using a non-linear least square method Using a first approximate function generating means for generating an approximate function that approximates a strogram and two continuous background images, the speed at which an arbitrary point moves in the dynamic region is normalized using a cross-correlation method. The velocity vector calculation means for calculating the velocity and the ratio of the arbitrary point having the velocity in the dynamic region is calculated as a velocity occurrence probability, and a histogram with the velocity occurrence probability as an occurrence frequency is generated for each velocity. The second histogram generation means, a second approximation function generation means for generating an approximation function approximating the histogram using a nonlinear least square method, and reading out the pixel classification formula from the pixel classification formula storage means, The foreground occurrence probability is read from the foreground occurrence probability accumulating means, the photographed image is read from the photographed image storage means, and each pixel constituting the photographed image is read out. And calculating the pixel classification formula using the background occurrence probability calculated by the calculation means corresponding to the gray value of each pixel as the conditional background probability and using the foreground occurrence probability as the conditional foreground probability. And a pixel classification unit that classifies whether each pixel is a background or a foreground, and an extraction unit that extracts the pixel classified as the foreground as the movement target , the pixel classification unit including: For the dynamic region, multiplication of the background occurrence probability that satisfies the approximation function generated by the first approximation function generation unit and the velocity generation probability that satisfies the approximation function generated by the second approximation function generation unit The gist is that the classification is performed using the value as the conditional background probability .
第2の請求項に係る発明は、前記速度ベクトル計算手段は、前記連続する2枚の背景画像の各動的領域で同一の濃淡値を持つ対応点間の距離を計算することにより、前記動的領域内で任意点が移動する速度を計算するものであって、求めたい対応点を含む一定領域(M×N)を一単位とし、前記2枚の背景画像の動的領域における一定領域間の類似度Rを以下の式(但し、(i,j)は画素の位置であり、Iは一方の背景画像の濃淡値であり、I(Iの上に−(バー)付)は当該背景画像の平均濃淡値であり、Tは他方の背景画像の濃淡値であり、T(Tの上に−(バー)付)は当該背景画像の平均濃淡値である)を用いて計算し、当該類似度Rが最大となる一定領域を対応点とする
第3の請求項に係る発明は、前記第1の近似関数生成手段及び前記第2の近似関数生成手段は、コーシー分布又はカイ分布を用いて前記近似関数を生成することを要旨とする。 The gist of the third aspect of the invention is that the first approximate function generating means and the second approximate function generating means generate the approximate function using a Cauchy distribution or a chi distribution .
第4の請求項に係る発明は、ある背景の前段で前景として移動している移動対象を撮影した撮影画像から前記移動対象を抽出する移動対象抽出方法において、前記背景のみを撮影した背景画像であって、所定の範囲で動作する動的領域を有する時系列な複数の背景画像を背景画像蓄積手段に蓄積しておく第1のステップと、前記背景画像を表現している各濃淡値が占める割合を背景発生確率として計算する背景発生確率計算式を背景発生確率計算式蓄積手段に蓄積しておく第2のステップと、前記撮影画像において前記前景の濃淡値が占める割合を所定の前景発生確率として前景発生確率蓄積手段に蓄積しておく第3のステップと、ベイズ推定法を適用した条件付き確率であって、前記撮影画像を構成する各画素が濃淡値で表現される場合に、当該画素が背景である条件付き背景確率と前景である条件付き前景確率との比率を用いて、当該画素が背景であるか前景であるかを分類する画素分類式を画素分類式蓄積手段に蓄積しておく第4のステップと、前記撮影画像を入力し、撮影画像格納手段に格納する第5のステップと、前記背景発生確率計算式蓄積手段から前記背景発生確率計算式を読み出すと共に前記背景画像蓄積手段から前記背景画像を読み出して、当該背景画像の各濃淡値に対して前記背景発生確率をそれぞれ計算する第6のステップと、前記背景発生確率計算式蓄積手段から前記背景確率発生計算式を読み出して、前記複数の背景画像の前記動的領域について前記背景発生確率をそれぞれ計算し、各濃淡値に対して当該背景発生確率を生起頻度とするヒストグラムを複数生成する第7のステップと、非線形最小二乗法を用いて前記複数のヒストグラムに近似する近似関数を生成する第8のステップと、連続する2枚の前記背景画像を用いて、前記動的領域内で任意点が移動する速度を正規化相互相関法を用いて計算する第9のステップと、当該動的領域内で当該速度を有する前記任意点が占める割合を速度発生確率として計算し、各速度に対して当該速度発生確率を生起頻度とするヒストグラムを生成する第10のステップと、非線形最小二乗法を用いて当該ヒストグラムに近似する近似関数を生成する第11のステップと、前記画素分類式蓄積手段から前記画素分類式を読み出し、前記前景発生確率蓄積手段から前記前景発生確率を読み出し、更に前記撮影画像格納手段から前記撮影画像を読み出して、当該撮影画像を構成している各画素に対して、当該各画素の濃淡値に対応する前記第6のステップで計算された前記背景発生確率を前記条件付き背景確率とすると共に当該前景発生確率を前記条件付き前景確率として前記画素分類式をそれぞれ計算し、当該各画素が背景であるか前景であるかを分類する第12のステップと、前記前景として分類された画素を前記移動対象として抽出する第13のステップと、を有し、前記第12のステップは、前記動的領域については、前記第8のステップで生成された近似関数を満たす背景発生確率と、前記第11のステップで生成された近似関数を満たす速度発生確率との乗算値を、前記条件付き背景確率として前記分類を行うことを要旨とする。 The invention according to the fourth aspect, in the moving object extraction method for extracting the moving object from the captured image obtained by photographing a moving object which is moving as the foreground in front of a background, the background image taken only the background A first step of storing a plurality of time-series background images having a dynamic region operating in a predetermined range in the background image storage means, and each gray value representing the background image occupies A second step of storing a background occurrence probability calculation formula in the background occurrence probability calculation formula storage means for calculating a ratio as a background occurrence probability; and a ratio of the foreground gray value in the photographed image to a predetermined foreground occurrence probability A foreground occurrence probability storage means, and a conditional probability to which a Bayesian estimation method is applied, where each pixel constituting the captured image is expressed by a gray value. Using the ratio of the conditional background probability that the pixel is the background and the conditional foreground probability that is the foreground, the pixel classification formula for classifying whether the pixel is the background or the foreground is stored in the pixel classification formula storage means A fourth step of inputting, the fifth step of inputting the photographed image and storing it in the photographed image storage means; reading out the background occurrence probability calculation formula from the background occurrence probability calculation formula storage means; and the background image A sixth step of reading the background image from the storage means and calculating the background occurrence probability for each gray value of the background image, and the background probability generation calculation expression from the background generation probability calculation expression storage means Read out, calculate the background occurrence probability for each of the dynamic regions of the plurality of background images, and a histogram having the background occurrence probability as an occurrence frequency for each gray value A seventh step of generating a number; an eighth step of generating an approximation function approximating the plurality of histograms using a non-linear least square method; and A ninth step of calculating the speed at which the arbitrary point moves within the dynamic region using the normalized cross-correlation method, and calculating the ratio of the arbitrary point having the speed in the dynamic region as the speed occurrence probability, A tenth step of generating a histogram having the speed occurrence probability for the speed as an occurrence frequency; an eleventh step of generating an approximation function approximating the histogram using a nonlinear least square method; and the pixel classification formula The pixel classification formula is read from the storage means, the foreground occurrence probability is read from the foreground occurrence probability storage means, and the photographed image is read from the photographed image storage means. For each pixel constituting the captured image, the background occurrence probability calculated in the sixth step corresponding to the gray value of each pixel is set as the conditional background probability and the foreground occurrence probability is The pixel classification formula is calculated as the conditional foreground probability, respectively, and a twelfth step of classifying whether each pixel is a background or a foreground, and a pixel classified as the foreground is extracted as the movement target. A thirteenth step , wherein the twelfth step is generated in the eleventh step and the background occurrence probability satisfying the approximation function generated in the eighth step for the dynamic region. The gist is to perform the classification as a conditional background probability based on a multiplication value of a speed occurrence probability that satisfies the approximate function .
第5の請求項に係る発明は、前記第9のステップは、前記連続する2枚の背景画像の各動的領域で同一の濃淡値を持つ対応点間の距離を計算することにより、前記動的領域内で任意点が移動する速度を計算するものであって、求めたい対応点を含む一定領域(M×N)を一単位とし、前記2枚の背景画像の動的領域における一定領域間の類似度Rを以下の式(但し、(i,j)は画素の位置であり、Iは一方の背景画像の濃淡値であり、I(Iの上に−(バー)付)は当該背景画像の平均濃淡値であり、Tは他方の背景画像の濃淡値であり、T(Tの上に−(バー)付)は当該背景画像の平均濃淡値である)を用いて計算し、当該類似度Rが最大となる一定領域を対応点とする
第6の請求項に係る発明は、前記第8のステップ及び前記第11のステップは、コーシー分布又はカイ分布を用いて前記近似関数を生成することを要旨とする。 The gist of the sixth aspect of the invention is that the eighth step and the eleventh step generate the approximate function using a Cauchy distribution or a Chi distribution .
第7の請求項に係る発明は、請求項4乃至6のいずれか1項に記載の移動対象抽出方法における各ステップをコンピュータによって実行させることを要旨とする。 The gist of the seventh aspect of the invention is that the computer executes each step in the moving object extraction method according to any one of the fourth to sixth aspects.
本発明によれば、前景として移動している移動対象を安定かつ精度よく抽出する移動対象抽出装置、移動対象抽出方法及び移動対象抽出プログラムを提供することができる。 ADVANTAGE OF THE INVENTION According to this invention, the moving target extraction apparatus, the moving target extraction method, and the moving target extraction program which extract the moving target moving as a foreground stably and accurately can be provided.
〔第1の実施の形態〕
第1の実施の形態に係る移動対象抽出装置の構成及び処理の流れについて説明する前に、本発明の特徴について説明する。本発明は、実環境を撮影した撮影画像の背景から、その背景の前段で前景として移動している移動対象を抽出する移動対象抽出装置に関する発明である。例えば、興味対象である歩行者や走行車両などの移動対象を、山や海などの背景から抽出することを目的としている。
[First Embodiment]
Before describing the configuration and processing flow of the moving object extraction device according to the first embodiment, the features of the present invention will be described. The present invention relates to a moving object extraction apparatus that extracts a moving object that is moving as a foreground in the preceding stage of a background of a captured image obtained by photographing a real environment. For example, the object is to extract a moving object such as a pedestrian or a traveling vehicle that is an object of interest from a background such as a mountain or the sea.
具体的には、背景のみの背景画像を予め撮影しておき、その背景画像と上述した撮影画像との両者を用いて移動対象を抽出する処理を行うものであるが、その際にベイズ推定法を適用した点に特徴がある。ベイズ推定とは、ある証拠に基づいて、その原因となった事象を推定するための確率論的方法である(非特許文献2参照)。pを画像における確率とすると、事象bが生じたという条件で事象aが生じる条件付き確立をp(a|b)で表現することができる。 Specifically, a background image of only the background is captured in advance, and a process of extracting a moving object using both the background image and the captured image described above is performed. There is a feature in the point that is applied. Bayesian estimation is a probabilistic method for estimating an event that causes a cause based on certain evidence (see Non-Patent Document 2). If p is a probability in the image, a conditional establishment in which event a occurs under the condition that event b has occurred can be expressed as p (a | b).
このベイズ推定法に基づけば、ω0を背景の画素,ω1を前景の画素とした場合に、撮影画像を構成する各画素が濃淡値Iで表現される条件下で、この撮影画像における任意の画素が背景である条件付き確率p(ω0|I)を式(1)で、任意の画素が前景である条件付き確率p(ω1|I)を式(2)で表現することができる。
なお、式(1)の右辺の分子に記載されたp(ω0)は、その任意の画素が背景である事前背景確率であり、式(2)の右辺の分子に記載されたp(ω1)は、その任意の画素が前景である事前前景確率である。 Note that p (ω 0 ) described in the numerator on the right side of Expression (1) is the prior background probability that the arbitrary pixel is the background, and p (ω described in the numerator on the right side of Expression (2). 1 ) is a prior foreground probability that the arbitrary pixel is the foreground.
また、式(1)の右辺の分子に記載されたp(I|ω0)は、式(1)で示された条件付き背景確率p(ω0|I)の尤度である。本発明では、この尤度を、背景画像を表現している各濃淡値の画素数が全画素数に対して占める割合(背景発生確率)としている(式(3)参照)。なお、式(3)の右辺の分子に記載されたq(I)は、背景画像において濃淡値がIである画素数であり、分母に記載されたΣq(I)は、背景画像の総画素数である。
一方、式(2)の右辺の分子に記載されたp(I|ω1)は、式(2)で示された条件付き前景確率p(ω1|I)の尤度である。本発明では、この尤度を、撮影画像において前景の濃淡値が占める割合(前景発生確率)としている。一般に、この前景発生確率は未知であるため、ここでは最も低い確率であると仮定し、例えば式(4)に示すように、前景としての移動対象が一様な一色の輝度(濃淡)を有するものとする。なお、濃淡値とは0〜255の256段階で表現されことが一般的であるため、前景発生確率を1/256としている。
そして、撮影画像の各画素について、その各画素が背景であるか前景であるかをそれぞれ確率的に分類する。この分類については、式(5)に示すように、式(1)と式(2)との比率を計算し、計算結果が所定の閾値を超える場合には背景に属するものとし、超えない場合には前景に属するものとしている。
次に、本実施の形態に係る移動対象抽出装置の構成について説明する。図1は、第1の実施の形態に係る移動対象抽出装置の構成を示す構成図である。この移動対象抽出装置100は、入力部11と、計算部12と、画素分類部13と、抽出部14と、表示部15と、撮影画像格納部31と、背景画像蓄積部32と、背景発生確率計算式蓄積部33と、前景発生確率蓄積部34と、画素分類式蓄積部35とを備えている。
Next, the configuration of the movement target extraction device according to the present embodiment will be described. FIG. 1 is a configuration diagram illustrating a configuration of the moving target extraction device according to the first embodiment. The moving
撮影画像格納部31は、ある背景の前段で前景として移動している移動対象を撮影した撮影画像が移動対象抽出装置100に入力された場合に、入力部11の指示に基づいて、その撮影画像を一旦格納しておく機能を備えている。
When a captured image obtained by capturing a moving object that is moving as a foreground in the previous stage of a certain background is input to the movement
背景画像蓄積部32は、撮影画像が撮影した背景と同じ背景のみを撮影した背景画像を事前に蓄積しておく機能を備えている。
The background
背景発生確率計算式蓄積部33は、背景画像を表現している各濃淡値が占める割合を背景発生確率として計算する背景発生確率計算式(上述した式(3))を蓄積しておく機能を備えている。
The background occurrence probability calculation
前景発生確率蓄積部34は、撮影画像において前景の濃淡値が占める割合を所定の前景発生確率(上述した式(4))として蓄積しておく機能を備えている。
The foreground occurrence
画素分類式蓄積部35は、ベイズ推定法を適用した条件付き確率であって、撮影画像を構成する各画素が濃淡値で表現される場合に、任意の画素が背景である条件付き背景確率p(ω0|I)と、その任意の画素が前景である条件付き前景確率p(ω1|I)との比率を用いて、その任意の画素が背景であるか前景であるかを確率的に分類する画素分類式(上述した式(5))を蓄積しておく機能を備えている。
The pixel classification
入力部11は、前景として移動している移動対象を撮影した撮影画像が入力された場合に、その入力を受け付けて、撮影画像格納部31に格納する機能を備えている。
The
計算部12は、背景発生確率計算式蓄積部33から背景発生確率計算式を読み出すと共に、背景画像蓄積部32から背景画像を読み出して、背景画像の各濃淡値に対して背景発生確率をそれぞれ計算する機能を備えている。
The
画素分類部13は、画素分類式蓄積部35から画素分類式を読み出し、前景発生確率蓄積部34から前景発生確率を読み出し、更に撮影画像格納部31から撮影画像を読み出して、この撮影画像を構成している各画素に対して、各画素の濃淡値に対応する計算後の背景発生確率を条件付き背景確率とすると共に、前景発生確率を条件付き前景確率として画素分類式をそれぞれ計算し、撮影画像の各画素が背景であるか前景であるかを分類する機能を備えている。
The
抽出部14は、前景として分類された画素を移動対象として抽出する機能を備えている。表示部15は、抽出された移動対象を表示する機能を備えている。
The
続いて、本実施の形態に係る移動対象抽出装置の処理フローについて説明する。図2は、第1の実施の形態に係る移動対象抽出装置の処理フローを示すフロー図である。なお、背景画像蓄積部32に蓄積されている背景画像は、例えば、図3に示すように、9(=3×3)個の画素で構成され、i=2,j=2の画素については濃淡値Iが11であり、その他の画素については濃淡値Iが10である1枚の背景画像が蓄積されているものとする。また、入力される撮影画像は、例えば、図4に示すように、1枚目の撮影画像には濃淡値Iを150とする画素がi=0,j=1に存在し、2枚目の撮影画像には同濃淡値Iの画素がi=1,j=1に存在し、3枚目の撮影画像には同濃淡値Iの画素がi=2,j=1に存在しているものとする。即ち、濃淡値Iを150とする何かしらの移動対象が左側から右側に移動している状態が撮影されている。
Subsequently, a processing flow of the movement target extraction device according to the present embodiment will be described. FIG. 2 is a flowchart showing a processing flow of the movement target extraction device according to the first embodiment. The background image stored in the background
最初に、入力部11が、撮影画像の入力を受け付けて、撮影画像格納部31に格納する(ステップS101)。
First, the
次に、計算部12が、背景画像の各濃淡値に対して背景発生確率をそれぞれ計算する(ステップS102)。具体的には、図5の(a)および(b)に示すように、背景画像に含まれている濃淡値I=10,I=11についての背景発生確率をそれぞれ計算する。例えば、I=10である画素数は8個であり、背景画素の総画素数は9個なので、濃淡値Iが10の場合における背景発生確率は8/9となる。同様に、濃淡値Iが11の場合における背景発生確率は1/9となる。また、濃淡値Iは0〜255で表現されるため、他の濃淡値についての背景発生確率についても計算する。なお、この他の濃淡値については背景画素内に含まれていないため、図5の(c)に示すように背景発生確率は0(ゼロ)となる。
Next, the
続いて、画素分類部13が、撮影画像を構成している各画素に対して、各画素の濃淡値に対応する計算後の背景発生確率を条件付き背景確率の尤度p(I|ω0)として代入すると共に、前景発生確率を条件付き前景確率の尤度p(I|ω1)に代入して、画素分類式をそれぞれ計算し、その計算結果が1.0より大きい場合には、その画素は背景に属すると分類し、計算結果が例えば1.0以下の場合には、その画素は前景に属すると分類する(ステップS103)。具体的には、図6の(a)に示すように、1枚目の撮影画像におけるi=0,j=0の画素については、濃淡値I=10なので、背景画像を用いて計算された濃淡値I=10の場合における背景発生確率を式(5)のp(I|ω0)に代入し、前景発生確率である1/256を式(5)のp(I|ω1)に代入して計算する。なお、p(ω0),p(ω1)については前述したように事前背景確率,事前前景確率であるため、予め事前データが得られない場合には、例えばいずれも0.5として同じ確率で発生することができる。そして、最終的には227.0という計算結果となるので、その画素は背景に属するものとして分類する。同様に他の画素についても計算すると、図6の(b)に示すように、i=0,j=0の画素については0(ゼロ)となるので、その画素については前景として分類する。また、図6の(c)に示すように、i=2,j=2の画素については28となるので、その画素については背景として分類する。
Subsequently, the
そして、抽出部14が、前景として分類された画素を移動対象として抽出し(ステップS104)。最後に、表示部15が、抽出された移動対象を表示する(ステップS105)。
Then, the
全ての背景画像についてステップS103〜ステップS105を繰り返すことにより、図7に示すような抽出後の画像を表示することができる。 By repeating Steps S103 to S105 for all the background images, an image after extraction as shown in FIG. 7 can be displayed.
本実施の形態によれば、背景画像の各濃淡値に対して背景発生確率をそれぞれ計算し、撮影画像を構成している各画素に対して、各画素の濃淡値に対応する計算後の背景発生確率を条件付き背景確率とすると共に、所定の前景発生確率を条件付き前景確率としてベイズ推定法を適用した画素分類式をそれぞれ計算し、各画素が背景であるか前景であるかを分類するので、前景として移動している移動対象を安定かつ精度よく抽出することが可能となる。 According to the present embodiment, the background occurrence probability is calculated for each gray value of the background image, and the calculated background corresponding to the gray value of each pixel for each pixel constituting the captured image. A pixel classification formula that applies the Bayesian estimation method with the occurrence probability as the conditional background probability and the predetermined foreground occurrence probability as the conditional foreground probability is calculated to classify whether each pixel is the background or the foreground. Therefore, it is possible to stably and accurately extract the moving object moving as the foreground.
〔第2の実施の形態〕
第1の実施の形態については、背景が静的領域であることを前提に説明するものであったが、実際には静的領域の他に、風に揺らぐ木や重力方向に流れ落ちる滝といった動的領域も背景に含まれている場合が多い。そして、それら背景を背にして前段でバスが走行している場合には、図8に示すような撮影画像となるのがより一般的である。
[Second Embodiment]
The first embodiment has been described on the assumption that the background is a static region, but in fact, in addition to the static region, a motion such as a tree swaying in the wind or a waterfall flowing down in the direction of gravity. The target area is often included in the background. When the bus is traveling in the preceding stage with these backgrounds in the background, a captured image as shown in FIG. 8 is more common.
図8に示す撮影画像を用いて第1の実施の形態を適用した場合には、車両による濃淡値の変化と木や滝の濃淡値の変化とが同時に検出されてしまうため、前景としての走行車両のみを抽出することが困難となる可能性がある。そこで、本実施の形態では、根本を中心に左右等に振動する樹木や、上から下方向へと流れる滝等の動的領域について、時間の経過に伴う輝度の変化(濃淡値の変化)を考慮するものとする。 When the first embodiment is applied using the photographed image shown in FIG. 8, since the change in the gray value due to the vehicle and the change in the gray value of the tree or waterfall are detected at the same time, the vehicle runs as the foreground. It may be difficult to extract only the vehicle. Therefore, in this embodiment, luminance changes (changes in light and shade values) over time for dynamic regions such as trees that vibrate left and right around the root and waterfalls that flow from top to bottom. Shall be considered.
図9は、第2の実施の形態に係る移動対象抽出装置の構成を示す構成図である。この移動対象抽出装置100は、第1の実施の形態で説明した移動対象抽出装置100の構成に対して、ヒストグラム生成部16と、近似関数生成部17とを更に備えている。
FIG. 9 is a configuration diagram illustrating a configuration of the movement target extraction device according to the second embodiment. The movement
背景画像蓄積部32は、静的領域と所定の範囲で動きのある動的領域とを背景とし、一定時間Tで撮影された時系列な複数の背景画像を事前に蓄積しておく機能を備えている。なお、背景画像を時系列な複数の画像とする点において、第1の実施の形態と相違している。
The background
ヒストグラム生成部16は、背景発生確率計算式蓄積部33から背景確率発生計算式を読み出して、背景画像蓄積部32に蓄積された各背景画像の動的領域について背景発生確率をそれぞれ計算し、各濃淡値に対して背景発生確率を生起頻度とするヒストグラムをそれぞれ生成する機能を備えている。
The
近似関数生成部17は、非線形最小二乗法を用いて複数のヒストグラムに近似する近似関数をそれぞれ生成する機能を備えている。
The approximate
画素分類部13は、動的領域については、近似関数生成部17で生成された近似関数を満たす背景発生確率を条件付き背景確率として、第1の実施の形態で説明した分類と同様の分類を行う機能を備えている。なお、静的領域については、第1の実施の形態で説明した処理と同じ処理を行う機能を備えている。
For the dynamic region, the
なお、その他の機能ブロックについては第1の実施の形態で説明した機能と同様の機能を備えているため、ここではその説明を省略するものとする。 Since the other functional blocks have the same functions as those described in the first embodiment, the description thereof is omitted here.
続いて、本実施の形態に係る移動対象装置の処理フローについて説明する。図10は、第2の実施の形態に係る移動対象装置の処理フローを示すフロー図である。なお、背景画像蓄積部32に蓄積されている背景画像は、例えば、図11に示すように、18(=6×3)個の画素で構成された時系列な3枚の背景画像であって、i=3,j=1と、i=4,j=1と、i=5,j=1との範囲が樹木の動的領域であるものとする。
Subsequently, a processing flow of the movement target device according to the present embodiment will be described. FIG. 10 is a flowchart illustrating a processing flow of the movement target device according to the second embodiment. The background image stored in the background
最初に、入力部11が、撮影画像の入力を受け付けて、撮影画像格納部31に格納する(ステップS201)。
First, the
次に、計算部12が、3つの背景画像の静的領域について、各濃淡値に対して背景発生確率をそれぞれ計算する(ステップS202)。具体的な計算方法については第1の実施の形態で説明した計算方法と同様である。なお、静的領域のみならず、動的領域を含む全体についての背景発生確率を計算してもよい。
Next, the
続いて、ヒストグラム生成部16が、3つの背景画像の動的領域について背景発生確率をそれぞれ計算し、各濃淡値に対して背景発生確率を生起頻度とするヒストグラムをそれぞれ生成する(ステップS203)。具体的には、図12に示すように、まず1枚目の背景画像において、上記樹木の動的領域に含まれている濃淡値I=15,I=12についての背景発生確率をそれぞれ計算する。例えば、I=15である画素数は1個であり、背景画素の総画素数は18個なので、濃淡値Iが15の場合における背景発生確率は1/18となる。同様に、濃淡値Iが12の場合における背景発生確率は2/18となる。そして、濃淡値Iを横軸とし、背景発生確率を生起頻度を縦軸とするヒストグラムを生成する。続いて、2枚目,3枚目の背景画像についても同様にヒストグラムを生成する。
Subsequently, the
次に、近似関数生成部17が、非線形最小二乗法を用いて各ヒストグラムに近似する近似関数をそれぞれ生成する(ステップS204)。具体的には、図13に示すように、1つのヒストグラムを用いて1つの近似関数を生成し、生成された合計3つの近似関数を平均化したものを、樹木の動的領域に関する時間的な輝度変化を考慮した近似関数として生成する。なお、非線形最小二乗法を用いて近似関数を生成するにはある程度の時間を必要とするため、例えば1枚目の背景画像に基づくヒストグラムと2枚目の背景画像に基づくヒストグラムとの平均値を算出しておき、その平均化されたヒストグラムについて近似関数を求めるようにしてもよい。これにより、3つの背景画像から生成されるヒストグラムの数が3つから2つに軽減されるため、近似関数の計算に要する時間を短縮することができる。
Next, the approximate
ここで、近似関数の生成方法について説明しておく。近似関数の生成には、式(6)に示すコーシー分布を用いて生成することが可能であり、この式(6)を構成している2つの未知数μとτについては、非線形最小二乗法を用いて計算可能である。なお、xは、−∞<x<∞の範囲であるとする。
非線形最小二乗法とは、例えば、図14の実線で示すような計測値から点線で示すような近似関数を求める際に、例えば4つの点での誤差の総和rの二乗を2つの未知数μとτについての目的関数E(μ,τ)とし(式(7))、この目的関数が最小になるように計算を繰り返す方法である。
最小化問題として計算する場合には、目的関数E(μ,τ)を各未知数でそれぞれ偏微分した値が0(ゼロ)を満たすこと求められるので、式(8)が必要条件となる。
式(8)については、一般的に数値解法としての勾配法を適用することで求めることができ、結果として式(9)と式(10)を用いて未知数μとτを計算することが可能となる。
なお、Pは反復回数である。また、λは調整係数であって、ここではλ=0.01として計算するものとする。μ0=τ0=0という初期値を与えて計算を繰り返すと、μ=0.1,τ=0.5という値を求めることができ、これらの未知数を式(6)に代入することで、ヒストグラムから近似関数を計算することができる。なお、このような非線形最小二乗法を用いて近似関数を計算する方法は既に公知な技術であることを付言しておく。 Note that P is the number of iterations. Also, λ is an adjustment coefficient, and is calculated here as λ = 0.01. When the calculation is repeated by giving an initial value of μ 0 = τ 0 = 0, values of μ = 0.1 and τ = 0.5 can be obtained. By substituting these unknowns into equation (6), An approximate function can be calculated from the histogram. It should be noted that a method for calculating an approximate function using such a nonlinear least square method is already a known technique.
続いて、画素分類部13が、樹木の動的領域を構成している各画素については、平均化された近似関数を満たす背景発生確率を条件付き背景確率の尤度p(I|ω0)として代入すると共に、前景発生確率を条件付き前景確率の尤度p(I|ω1)に代入して、画素分類式をそれぞれ計算し、その計算結果が1.0より大きい場合には、その画素は背景に属すると分類し、計算結果が1.0以下の場合には、その画素は前景に属すると分類する。一方、樹木の動的領域以外の静的領域の各画素については、ステップS202の計算結果を用いて、第1の実施の形態のステップS103で説明した方法と同じ方法で各画素を分類する(ステップS205)。具体的な計算方法については第1の実施の形態で説明した計算方法と同様である。
Subsequently, for each pixel constituting the dynamic region of the tree, the
そして、抽出部14が、前景として分類された画素を移動対象として抽出し(ステップS206)。最後に、表示部15が、抽出された移動対象を表示する(ステップS207)。
Then, the
なお、動的領域が他にもある場合には、各動的領域に対してステップS203〜ステップS205の処理を行うことで同様の効果を得ることができる。 If there are other dynamic areas, the same effect can be obtained by performing the processing of steps S203 to S205 for each dynamic area.
本実施の形態によれば、背景画像の動的領域について、動的領域の背景発生確率を計算し、濃淡値に対して背景発生確率を生起頻度とするヒストグラムを生成し、非線形最小二乗法を用いてヒストグラムに近似する近似関数を生成し、この近似関数を用いて画素分類式を計算するので、背景画像に動的領域が含まれる場合であっても、前景として移動している移動対象を確実に抽出することが可能となる。 According to the present embodiment, for the dynamic region of the background image, the background occurrence probability of the dynamic region is calculated, the histogram having the background occurrence probability for the gray value is generated, and the nonlinear least square method is performed. Is used to generate an approximate function that approximates a histogram, and a pixel classification formula is calculated using this approximate function, so even if the background image contains a dynamic region, the moving object moving as the foreground It becomes possible to extract reliably.
〔第3の実施の形態〕
第2の実施の形態では、背景における動的領域について時間の経過に伴う輝度の変化(濃淡値の変化)を考慮したものであったが、本実施の形態は、その動的領域について時間の経過に伴う動きの変化(速度ベクトル)を更に考慮するものとする。動きの変化を推定する方法としては様々な方法が存在するが、本実施の形態では正規化相互相関法を用いて説明する。
[Third Embodiment]
In the second embodiment, a change in luminance (change in gray value) with the passage of time is taken into consideration for a dynamic region in the background. It is further assumed that the change in motion (velocity vector) with the passage of time is taken into consideration. There are various methods for estimating a change in motion. In this embodiment, a description will be given using a normalized cross-correlation method.
例えば、時間的に前後する2枚の背景画像における動的領域において、その動的領域間で同一の濃淡値を持つ対応点間の距離を計算することにより、動的領域における任意点が移動する速度ベクトルを求める方法である。なお、このような速度ベクトルの分布は、一般にオプティカルフローと称されている。 For example, in a dynamic region in two background images that are temporally changed, an arbitrary point in the dynamic region moves by calculating a distance between corresponding points having the same gray value between the dynamic regions. This is a method for obtaining a velocity vector. Such a velocity vector distribution is generally called an optical flow.
ここで、対応点を孤立的に探索した場合には、ノイズや類似する画素の存在等の影響により、対応点を安定的に求めることが困難である。そこで、求めたい対応点の周囲の点を含む小領域を一つの単位として背景画像の動的領域間における対応点を求めることができる。また、対応関係を求めるための基準として正規化相互相関法を用いることができる。従って、時間的に前後する背景画像の濃淡値をI,Tとし、画素の位置を(i,j)で表現し、小領域の範囲をN×Mとした場合には、式(11)を用いて小領域間の類似度を評価することができる。なお、IとTの上に−(バー)が付されたものは、各背景画像における平均濃淡値である。
このRが最大となるものを対応点とし、対応点間の距離を計算して、動的領域における任意点の速度ベクトルを求めることができる。 The velocity vector of an arbitrary point in the dynamic region can be obtained by calculating the distance between the corresponding points using the one having the maximum R as the corresponding point.
図15は、第3の実施の形態に係る移動対象抽出装置の構成を示す構成図である。この移動対象抽出装置100は、第2の実施の形態で説明した移動対象抽出装置100の構成に対して、速度ベクトル計算部18と、第2のヒストグラム生成部16bと、第2の近似関数生成部17bとを更に備えている。なお、第1のヒストグラム生成部16aと第1の近似関数生成部17aは、第2の実施の形態で説明したヒストグラム生成部16と近似関数生成部17と同じである。
FIG. 15 is a configuration diagram illustrating a configuration of the movement target extraction device according to the third embodiment. This moving
速度ベクトル計算部18は、連続する2枚の背景画像を用いて、動的領域内で任意点が移動する速度を正規化相互相関法を用いて計算する機能を備えている。
The speed
第2のヒストグラム生成部16bは、動的領域内で所定の速度を有する任意点が占める割合を速度発生確率として計算し、各速度に対して速度発生確率を生起頻度とするヒストグラムを生成する機能を備えている。
The second
第2の近似関数生成部17bは、非線形最小二乗法を用いて、第2のヒストグラム生成部16bで生成されたヒストグラムに近似する近似関数を生成する機能を備えている。
The second approximation
画素分類部13は、動的領域については、第1の近似関数生成部17で生成された近似関数を満たす背景発生確率と第2の近似関数生成部17bで生成された近似関数を満たす速度発生確率とを条件付き背景確率として、第1の実施の形態で説明した分類と同様の分類を行う機能を備えている。
For the dynamic region, the
なお、その他の機能ブロックについては第1の実施の形態及び第2の実施の形態で説明した機能と同様の機能を備えているため、ここではその説明を省略するものとする。 The other functional blocks have the same functions as those described in the first embodiment and the second embodiment, and thus description thereof is omitted here.
続いて、本実施の形態に係る移動対象装置の処理フローについて説明する。図16は、第3の実施の形態に係る移動対象装置の処理フローを示すフロー図である。なお、背景画像蓄積部32に蓄積されている背景画像は、第2の実施の形態で説明したのと同様に、時系列な3枚の背景画像であるする。
Subsequently, a processing flow of the movement target device according to the present embodiment will be described. FIG. 16 is a flowchart illustrating a processing flow of the movement target device according to the third embodiment. Note that the background images stored in the background
最初に、入力部11が、撮影画像の入力を受け付けて、撮影画像格納部31に格納する(ステップS301)。
First, the
次に、計算部12が、3つの背景画像の静的領域について、各濃淡値に対して背景発生確率をそれぞれ計算する(ステップS302)。具体的な計算方法については第1の実施の形態で説明した計算方法と同様である。なお、静的領域のみならず、動的領域を含む全体についての背景発生確率を計算してもよい。
Next, the
続いて、第1のヒストグラム生成部16aが、3つの背景画像の動的領域について背景発生確率をそれぞれ計算し、各濃淡値に対して背景発生確率を生起頻度とするヒストグラムをそれぞれ生成する(ステップS303)。具体的な計算方法については第2の実施の形態で説明した計算方法と同様である。
Subsequently, the first
そして、第1の近似関数生成部17aが、非線形最小二乗法を用いて第1のヒストグラム生成部16aで生成された各ヒストグラムに近似する近似関数をそれぞれ生成する(ステップS304)。具体的な計算方法については第2の実施の形態で説明した計算方法と同様である。
Then, the first approximate
次に、速度ベクトル計算部18が、背景画像の動的領域について、連続する1枚目と2枚目の背景画像を用いて、動的領域内で任意点が移動する速度(速度ベクトル)を正規化相互相関法を用いて計算する(ステップS305)。具体的には、例えば図17に示すような滝の動きが計算されることになる。
Next, the velocity
そして、第2のヒストグラム生成部16bが、動的領域内で同じ速度を有する任意点が占める割合を速度発生確率として計算し、各速度に対してその速度発生確率を生起頻度とするヒストグラムを生成する(ステップS306)。具体的には、滝の領域において、例えば図18の実線で示すようなヒストグラムが生成されることになる。
Then, the second
その後、第2の近似関数生成部17bが、非線形最小二乗法を用いて第2のヒストグラム生成部16bで生成されたヒストグラムに近似する近似関数を生成する(ステップS307)。
Thereafter, the second approximate
ここで、近似関数の生成方法について説明しておく。近似関数の生成には、式(12)に示すカイ分布(χ2)を用いて生成することが可能であり、この式(12)を構成している未知数κについては、非線形最小二乗法を用いて計算可能である。なお、xは、−∞<x<∞の範囲であるとする。また、Γはガンマ関数である。
非線形最小二乗法とは、第2の実施の形態で説明したように、図14の実線で示すような計測値から点線で示すような近似関数を求める際に、例えば4つの点での誤差の総和rの二乗を未知数κについての目的関数E(κ)とし(式(13))、この目的関数が最小になるように計算を繰り返す方法である。
最小化問題として計算する場合には、目的関数E(κ)を未知数κで偏微分した値が0(ゼロ)を満たすこと求められるので、式(14)が必要条件となる。
式(14)については、一般的に数値解法としての勾配法を適用することで求めることができ、結果として式(15)を用いて未知数κを計算することが可能となる。
Pは反復回数である。また、λは調整係数であって、ここではλ=0.01として計算するものとする。κ0=0という初期値を与えて計算を繰り返すと、κ=0.02という値を求めることができ、これらの未知数を式(12)に代入することで、ヒストグラムから近似関数を計算することができる。以上により、例えば図18の点線で示すような近似関数が生成されることになる。 P is the number of iterations. Also, λ is an adjustment coefficient, and is calculated here as λ = 0.01. When the calculation is repeated by giving an initial value of κ 0 = 0, a value of κ = 0.02 can be obtained, and an approximate function is calculated from the histogram by substituting these unknowns into equation (12). Can do. Thus, for example, an approximate function as indicated by a dotted line in FIG. 18 is generated.
続いて、画素分類部13が、樹木の動的領域を構成している各画素については、
式(16)に示すように、第1の近似関数生成部17aで生成された近似関数を満たす背景発生確率と、第2の近似関数生成部17bで生成された近似関数を満たす速度発生確率との乗算値を条件付き背景確率の尤度p(I|ω0)として代入すると共に、前景発生確率を条件付き前景確率の尤度p(I|ω1)に代入して、画素分類式をそれぞれ計算し、その計算結果が1.0より大きい場合には、その画素は背景に属すると分類し、計算結果が1.0以下の場合には、その画素は前景に属すると分類する。一方、樹木の動的領域以外の静的領域の各画素については、ステップS302の計算結果を用いて、第1の実施の形態のステップS103で説明した方法と同じ方法で各画素を分類する(ステップS308)。なお、背景発生確率と速度発生確率とを乗算することは一例であって、加算等の他計算方法を用いてもよい。
As shown in Expression (16), a background occurrence probability that satisfies the approximation function generated by the first approximation
そして、抽出部14が、前景として分類された画素を移動対象として抽出し(ステップS309)。最後に、表示部15が、抽出された移動対象を表示する(ステップS310)。
Then, the
なお、動的領域が他にもある場合には、各動的領域に対してステップS303〜ステップS308の処理を行うことで同様の効果を得ることができる。また、ステップS305〜ステップS307の処理は、ステップS303の処理の前であっても同様の効果を得ることができる。 If there are other dynamic areas, the same effect can be obtained by performing the processing of steps S303 to S308 for each dynamic area. Moreover, even if the process of step S305-step S307 is before the process of step S303, the same effect can be acquired.
滝や樹木などの変化については、輝度変化のみでは前景と類似する可能性があるが、動き情報を加味することにより、自然現象固有の成分をヒストグラム分布に反映することができ、移動対象の類似性をより確実に排除することができる。 Changes in waterfalls, trees, etc. may be similar to the foreground only by changes in brightness, but by adding motion information, natural phenomenon-specific components can be reflected in the histogram distribution, and similarities of moving objects can be reflected. Sex can be more reliably excluded.
本実施の形態によれば、背景画像の動的領域について、任意点が移動する速度を正規化相互相関法を用いて計算し、動的領域内で所定の速度を有する任意点が占める割合を速度発生確率として計算し、各速度に対して速度発生確率を生起頻度とするヒストグラムを生成し、非線形最小二乗法を用いて生成されたヒストグラムに近似する近似関数を生成し、この近似関数を用いて画素分類式を計算するので、背景画像に動的領域が含まれる場合であっても、前景として移動している移動対象をより確実に抽出することが可能となる。 According to the present embodiment, the speed at which an arbitrary point moves is calculated using a normalized cross-correlation method for the dynamic region of the background image, and the ratio of the arbitrary point having a predetermined speed in the dynamic region is calculated. Calculate as velocity generation probability, generate a histogram with velocity occurrence probability for each velocity, generate an approximation function that approximates the histogram generated using nonlinear least squares method, and use this approximation function Therefore, even if the background image includes a dynamic region, it is possible to more reliably extract the moving object that is moving as the foreground.
最後に、各実施の形態で説明した移動対象抽出装置は、コンピュータで構成され、各機能ブロックの各処理はプログラムで実行されるようになっている。また、各実施の形態で説明した移動対象抽出装置の各処理動作をプログラムとして例えばコンパクトディスクやフロッピー(登録商標)ディスク等の記録媒体に記録して、この記録媒体をコンピュータに組み込んだり、若しくは記録媒体に記録されたプログラムを、任意の通信回線を介してコンピュータにダウンロードしたり、又は記録媒体からインストールし、該プログラムでコンピュータを動作させることにより、上述した各処理動作を移動対象抽出装置として機能させることができるのは勿論である。 Finally, the movement target extraction apparatus described in each embodiment is configured by a computer, and each process of each functional block is executed by a program. Further, each processing operation of the moving object extraction apparatus described in each embodiment is recorded as a program on a recording medium such as a compact disk or a floppy (registered trademark) disk, and this recording medium is incorporated into a computer or recorded. A program recorded on a medium can be downloaded to a computer via an arbitrary communication line, or installed from a recording medium, and the computer can be operated with the program, whereby each processing operation described above functions as a movement target extraction device Of course, it can be made.
なお、本実施の形態で説明した移動対象抽出装置は、特にマルチメディア分野,符号化分野,通信分野,映像監視分野の技術分野において応用可能であることを付言しておく。 It should be noted that the moving object extraction apparatus described in the present embodiment is applicable particularly in the technical fields of the multimedia field, the coding field, the communication field, and the video surveillance field.
11…入力部
12…計算部
13…画素分類部
14…抽出部
15…表示部
16…ヒストグラム生成部
16a…第1のヒストグラム生成部
16b…第2のヒストグラム生成部
17…近似関数生成部
17a…第1の近似関数生成部
17b…第2の近似関数生成部
18…速度ベクトル計算部
31…撮影画像格納部
32…背景画像蓄積部
33…背景発生確率計算蓄積部
34…前景発生確率蓄積部
35…画素分類式蓄積部
100…移動対象装置
S101〜S105…ステップ
S201〜S207…ステップ
S301〜S310…ステップ
DESCRIPTION OF
Claims (7)
前記背景のみを撮影した背景画像であって、所定の範囲で動作する動的領域を有する時系列な複数の背景画像を蓄積しておく背景画像蓄積手段と、
前記背景画像を表現している各濃淡値が占める割合を背景発生確率として計算する背景発生確率計算式を蓄積しておく背景発生確率計算式蓄積手段と、
前記撮影画像において前記前景の濃淡値が占める割合を所定の前景発生確率として蓄積しておく前景発生確率蓄積手段と、
ベイズ推定法を適用した条件付き確率であって、前記撮影画像を構成する各画素が濃淡値で表現される場合に、当該画素が背景である条件付き背景確率と前景である条件付き前景確率との比率を用いて、当該画素が背景であるか前景であるかを分類する画素分類式を蓄積しておく画素分類式蓄積手段と、
前記撮影画像を入力し、撮影画像格納手段に格納する入力手段と、
前記背景発生確率計算式蓄積手段から前記背景発生確率計算式を読み出すと共に前記背景画像蓄積手段から前記背景画像を読み出して、当該背景画像の各濃淡値に対して前記背景発生確率をそれぞれ計算する計算手段と、
前記背景発生確率計算式蓄積手段から前記背景確率発生計算式を読み出して、前記複数の背景画像の前記動的領域について前記背景発生確率をそれぞれ計算し、各濃淡値に対して当該背景発生確率を生起頻度とするヒストグラムを複数生成する第1のヒストグラム生成手段と、
非線形最小二乗法を用いて前記複数のヒストグラムに近似する近似関数を生成する第1の近似関数生成手段と、
連続する2枚の前記背景画像を用いて、前記動的領域内で任意点が移動する速度を正規化相互相関法を用いて計算する速度ベクトル計算手段と、
当該動的領域内で当該速度を有する前記任意点が占める割合を速度発生確率として計算し、各速度に対して当該速度発生確率を生起頻度とするヒストグラムを生成する第2のヒストグラム生成手段と、
非線形最小二乗法を用いて当該ヒストグラムに近似する近似関数を生成する第2の近似関数生成手段と、
前記画素分類式蓄積手段から前記画素分類式を読み出し、前記前景発生確率蓄積手段から前記前景発生確率を読み出し、更に前記撮影画像格納手段から前記撮影画像を読み出して、当該撮影画像を構成している各画素に対して、当該各画素の濃淡値に対応する前記計算手段で計算された前記背景発生確率を前記条件付き背景確率とすると共に当該前景発生確率を前記条件付き前景確率として前記画素分類式をそれぞれ計算し、当該各画素が背景であるか前景であるかを分類する画素分類手段と、
前記前景として分類された画素を前記移動対象として抽出する抽出手段と、を有し、
前記画素分類手段は、
前記動的領域については、前記第1の近似関数生成手段で生成された近似関数を満たす背景発生確率と、前記第2の近似関数生成手段で生成された近似関数を満たす速度発生確率との乗算値を、前記条件付き背景確率として前記分類を行うことを特徴とする移動対象抽出装置。 In the moving object extraction apparatus for extracting the moving object from a captured image obtained by photographing the moving object moving as the foreground in the front stage of a certain background,
A background image storing means for storing a plurality of time-series background images having a dynamic region that operates within a predetermined range, which is a background image obtained by capturing only the background ;
A background occurrence probability calculation formula accumulating means for accumulating a background occurrence probability calculation formula for calculating, as a background occurrence probability, the proportion of each gray value representing the background image;
Foreground occurrence probability accumulation means for accumulating the proportion of the foreground gray value in the captured image as a predetermined foreground occurrence probability;
A conditional probability using a Bayesian estimation method, and when each pixel constituting the captured image is expressed by a gray value, a conditional background probability that the pixel is a background and a conditional foreground probability that is a foreground, A pixel classification formula storage means for storing a pixel classification formula for classifying whether the pixel is the background or the foreground using the ratio of
Input means for inputting the photographed image and storing it in the photographed image storage means;
A calculation for reading the background occurrence probability calculation formula from the background occurrence probability calculation formula storage means and reading the background image from the background image storage means to calculate the background occurrence probability for each gray value of the background image. Means,
The background probability generation calculation formula is read from the background generation probability calculation formula storage means, the background generation probability is calculated for each of the dynamic regions of the plurality of background images, and the background occurrence probability is calculated for each gray value. First histogram generating means for generating a plurality of histograms having occurrence frequencies;
First approximation function generation means for generating an approximation function that approximates the plurality of histograms using a non-linear least square method;
A velocity vector calculating means for calculating a velocity at which an arbitrary point moves in the dynamic region using a normalized cross-correlation method using the two continuous background images;
A second histogram generating means for calculating a ratio of the arbitrary point having the speed in the dynamic region as a speed generation probability, and generating a histogram having the speed generation probability as an occurrence frequency for each speed;
Second approximation function generation means for generating an approximation function approximating the histogram using a nonlinear least square method;
The pixel classification formula is read from the pixel classification formula storage means, the foreground occurrence probability is read from the foreground generation probability storage means, and the captured image is read from the captured image storage means to constitute the captured image. For each pixel, the background classification probability calculated by the calculation means corresponding to the gray value of each pixel is the conditional background probability and the foreground generation probability is the conditional foreground probability. Pixel classification means for calculating each of the pixels and classifying each pixel as a background or foreground;
Extracting means for extracting the pixels classified as the foreground as the moving object ,
The pixel classification means includes
For the dynamic region, multiplication of the background occurrence probability that satisfies the approximation function generated by the first approximation function generation unit and the velocity generation probability that satisfies the approximation function generated by the second approximation function generation unit The moving object extracting apparatus characterized in that the classification is performed using the value as the conditional background probability .
前記連続する2枚の背景画像の各動的領域で同一の濃淡値を持つ対応点間の距離を計算することにより、前記動的領域内で任意点が移動する速度を計算するものであって、
求めたい対応点を含む一定領域(M×N)を一単位とし、前記2枚の背景画像の動的領域における一定領域間の類似度Rを以下の式(但し、(i,j)は画素の位置であり、Iは一方の背景画像の濃淡値であり、I(Iの上に−(バー)付)は当該背景画像の平均濃淡値であり、Tは他方の背景画像の濃淡値であり、T(Tの上に−(バー)付)は当該背景画像の平均濃淡値である)を用いて計算し、当該類似度Rが最大となる一定領域を対応点とする
Calculating the speed at which an arbitrary point moves within the dynamic region by calculating the distance between corresponding points having the same gray value in each dynamic region of the two continuous background images; ,
The fixed area (M × N) including the corresponding point to be obtained is set as one unit, and the similarity R between the fixed areas in the dynamic area of the two background images is expressed by the following equation (where (i, j) is a pixel. Where I is the gray value of one background image, I (with-(bar) above I) is the average gray value of the background image, and T is the gray value of the other background image. Yes, T (with-(bar) on T) is the average gray value of the background image), and a certain region where the similarity R is maximum is taken as a corresponding point
コーシー分布又はカイ分布を用いて前記近似関数を生成することを特徴とする請求項1又は2に記載の移動対象抽出装置。 The first approximate function generating means and the second approximate function generating means are:
Cauchy distribution or moving object extracting apparatus according to claim 1 or 2, characterized in that to generate the approximation function by using the chi distribution.
前記背景のみを撮影した背景画像であって、所定の範囲で動作する動的領域を有する時系列な複数の背景画像を背景画像蓄積手段に蓄積しておく第1のステップと、
前記背景画像を表現している各濃淡値が占める割合を背景発生確率として計算する背景発生確率計算式を背景発生確率計算式蓄積手段に蓄積しておく第2のステップと、
前記撮影画像において前記前景の濃淡値が占める割合を所定の前景発生確率として前景発生確率蓄積手段に蓄積しておく第3のステップと、
ベイズ推定法を適用した条件付き確率であって、前記撮影画像を構成する各画素が濃淡値で表現される場合に、当該画素が背景である条件付き背景確率と前景である条件付き前景確率との比率を用いて、当該画素が背景であるか前景であるかを分類する画素分類式を画素分類式蓄積手段に蓄積しておく第4のステップと、
前記撮影画像を入力し、撮影画像格納手段に格納する第5のステップと、
前記背景発生確率計算式蓄積手段から前記背景発生確率計算式を読み出すと共に前記背景画像蓄積手段から前記背景画像を読み出して、当該背景画像の各濃淡値に対して前記背景発生確率をそれぞれ計算する第6のステップと、
前記背景発生確率計算式蓄積手段から前記背景確率発生計算式を読み出して、前記複数の背景画像の前記動的領域について前記背景発生確率をそれぞれ計算し、各濃淡値に対して当該背景発生確率を生起頻度とするヒストグラムを複数生成する第7のステップと、
非線形最小二乗法を用いて前記複数のヒストグラムに近似する近似関数を生成する第8のステップと、
連続する2枚の前記背景画像を用いて、前記動的領域内で任意点が移動する速度を正規化相互相関法を用いて計算する第9のステップと、
当該動的領域内で当該速度を有する前記任意点が占める割合を速度発生確率として計算し、各速度に対して当該速度発生確率を生起頻度とするヒストグラムを生成する第10のステップと、
非線形最小二乗法を用いて当該ヒストグラムに近似する近似関数を生成する第11のステップと、
前記画素分類式蓄積手段から前記画素分類式を読み出し、前記前景発生確率蓄積手段から前記前景発生確率を読み出し、更に前記撮影画像格納手段から前記撮影画像を読み出して、当該撮影画像を構成している各画素に対して、当該各画素の濃淡値に対応する前記第6のステップで計算された前記背景発生確率を前記条件付き背景確率とすると共に当該前景発生確率を前記条件付き前景確率として前記画素分類式をそれぞれ計算し、当該各画素が背景であるか前景であるかを分類する第12のステップと、
前記前景として分類された画素を前記移動対象として抽出する第13のステップと、を有し、
前記第12のステップは、
前記動的領域については、前記第8のステップで生成された近似関数を満たす背景発生確率と、前記第11のステップで生成された近似関数を満たす速度発生確率との乗算値を、前記条件付き背景確率として前記分類を行うことを特徴とする移動対象抽出方法。 In the moving target extraction method for extracting the moving target from a captured image obtained by shooting the moving target moving as the foreground in the front stage of a certain background,
A first step of accumulating in the background image accumulating means a plurality of time-series background images having a dynamic region that operates within a predetermined range, which is a background image obtained by photographing only the background ;
A second step of storing in the background occurrence probability calculation formula accumulating means a background occurrence probability calculation formula for calculating a ratio of each gray value representing the background image as a background occurrence probability;
A third step of accumulating in the foreground occurrence probability accumulation means as a predetermined foreground occurrence probability a ratio of the foreground gray value in the captured image;
A conditional probability using a Bayesian estimation method, and when each pixel constituting the captured image is expressed by a gray value, a conditional background probability that the pixel is a background and a conditional foreground probability that is a foreground, A fourth step of storing in the pixel classification formula storage means a pixel classification formula for classifying whether the pixel is the background or the foreground using the ratio of
A fifth step of inputting the photographed image and storing it in a photographed image storage means;
The background occurrence probability calculation formula is read from the background occurrence probability calculation formula storage means and the background image is read from the background image storage means to calculate the background occurrence probability for each gray value of the background image. 6 steps,
The background probability generation calculation formula is read from the background generation probability calculation formula storage means, the background generation probability is calculated for each of the dynamic regions of the plurality of background images, and the background occurrence probability is calculated for each gray value. A seventh step of generating a plurality of histograms having occurrence frequencies;
An eighth step of generating an approximation function approximating the plurality of histograms using a non-linear least square method;
A ninth step of calculating, using a normalized cross-correlation method, a speed at which an arbitrary point moves within the dynamic region using the two consecutive background images;
A tenth step of calculating a ratio of the arbitrary point having the speed in the dynamic region as a speed occurrence probability, and generating a histogram having the speed occurrence probability as an occurrence frequency for each speed;
An eleventh step of generating an approximation function approximating the histogram using a nonlinear least square method;
The pixel classification formula is read from the pixel classification formula storage means, the foreground occurrence probability is read from the foreground generation probability storage means, and the captured image is read from the captured image storage means to constitute the captured image. For each pixel, the background occurrence probability calculated in the sixth step corresponding to the gray value of each pixel is the conditional background probability and the foreground occurrence probability is the conditional foreground probability. A twelfth step of calculating a classification formula and classifying each pixel as a background or a foreground;
A thirteenth step of extracting the pixels classified as the foreground as the moving object ,
The twelfth step includes
For the dynamic region, the conditional value is a multiplication value of the background occurrence probability satisfying the approximate function generated in the eighth step and the speed occurrence probability satisfying the approximate function generated in the eleventh step. A moving object extraction method characterized by performing the classification as a background probability .
前記連続する2枚の背景画像の各動的領域で同一の濃淡値を持つ対応点間の距離を計算することにより、前記動的領域内で任意点が移動する速度を計算するものであって、
求めたい対応点を含む一定領域(M×N)を一単位とし、前記2枚の背景画像の動的領域における一定領域間の類似度Rを以下の式(但し、(i,j)は画素の位置であり、Iは一方の背景画像の濃淡値であり、I(Iの上に−(バー)付)は当該背景画像の平均濃淡値であり、Tは他方の背景画像の濃淡値であり、T(Tの上に−(バー)付)は当該背景画像の平均濃淡値である)を用いて計算し、当該類似度Rが最大となる一定領域を対応点とする
Calculating the speed at which an arbitrary point moves within the dynamic region by calculating the distance between corresponding points having the same gray value in each dynamic region of the two continuous background images; ,
The fixed area (M × N) including the corresponding point to be obtained is set as one unit, and the similarity R between the fixed areas in the dynamic area of the two background images is expressed by the following equation (where (i, j) is a pixel. Where I is the gray value of one background image, I (with-(bar) above I) is the average gray value of the background image, and T is the gray value of the other background image. Yes, T (with-(bar) on T) is the average gray value of the background image), and a certain region where the similarity R is maximum is taken as a corresponding point
コーシー分布又はカイ分布を用いて前記近似関数を生成することを特徴とする請求項4又は5に記載の移動対象抽出方法。 The eighth step and the eleventh step are:
6. The moving object extraction method according to claim 4, wherein the approximate function is generated using a Cauchy distribution or a chi distribution .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008269128A JP4800367B2 (en) | 2008-10-17 | 2008-10-17 | Moving object extraction device, moving object extraction method, and moving object extraction program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008269128A JP4800367B2 (en) | 2008-10-17 | 2008-10-17 | Moving object extraction device, moving object extraction method, and moving object extraction program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010097507A JP2010097507A (en) | 2010-04-30 |
JP4800367B2 true JP4800367B2 (en) | 2011-10-26 |
Family
ID=42259132
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008269128A Expired - Fee Related JP4800367B2 (en) | 2008-10-17 | 2008-10-17 | Moving object extraction device, moving object extraction method, and moving object extraction program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4800367B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4913888B2 (en) * | 2010-05-18 | 2012-04-11 | 日本電信電話株式会社 | Motion estimation method, motion estimation device, and motion estimation program |
JP6136537B2 (en) * | 2013-04-26 | 2017-05-31 | オムロン株式会社 | Image processing apparatus, image processing method, image processing control program, and recording medium |
CN106056626B (en) * | 2016-05-26 | 2018-10-23 | 河海大学 | A kind of moving target detecting method based on the interaction of prospect background model |
KR102099928B1 (en) * | 2018-01-12 | 2020-05-15 | 숭실대학교산학협력단 | Method and apparatus for tracking led in captured image based on probability |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3486229B2 (en) * | 1994-07-27 | 2004-01-13 | 株式会社東芝 | Image change detection device |
JPH11110564A (en) * | 1997-09-30 | 1999-04-23 | Mitsubishi Heavy Ind Ltd | Moving body measuring device |
JP3986643B2 (en) * | 1998-01-13 | 2007-10-03 | 三菱電機株式会社 | Image processing device for monitoring |
JP4622140B2 (en) * | 2001-04-13 | 2011-02-02 | ソニー株式会社 | Image processing apparatus, image processing method, recording medium, and program |
JP4166143B2 (en) * | 2002-11-21 | 2008-10-15 | 株式会社国際電気通信基礎技術研究所 | Face position extraction method, program for causing computer to execute face position extraction method, and face position extraction apparatus |
JP2007033088A (en) * | 2005-07-22 | 2007-02-08 | Canon Inc | Method for deriving area |
JP2007334746A (en) * | 2006-06-16 | 2007-12-27 | Olympus Corp | Image processor and image processing program |
JP2008216127A (en) * | 2007-03-06 | 2008-09-18 | Konica Minolta Holdings Inc | Distance image generation device, distance image generation method, and program |
-
2008
- 2008-10-17 JP JP2008269128A patent/JP4800367B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2010097507A (en) | 2010-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10671855B2 (en) | Video object segmentation by reference-guided mask propagation | |
US9767570B2 (en) | Systems and methods for computer vision background estimation using foreground-aware statistical models | |
JP7252188B2 (en) | Image processing system, image processing method and program | |
CN107256225B (en) | Method and device for generating heat map based on video analysis | |
KR101870902B1 (en) | Image processing apparatus and image processing method | |
Yuan et al. | UG $^{2+} $ Track 2: A Collective Benchmark Effort for Evaluating and Advancing Image Understanding in Poor Visibility Environments | |
CN109063549B (en) | High-resolution aerial video moving target detection method based on deep neural network | |
JP6565600B2 (en) | Attention detection device and attention detection method | |
CN108256567B (en) | Target identification method and system based on deep learning | |
JP4800367B2 (en) | Moving object extraction device, moving object extraction method, and moving object extraction program | |
JP2009048240A (en) | Detection method, detection device, monitoring method, and monitoring system of moving object in moving image | |
WO2015186347A1 (en) | Detection system, detection method, and program storage medium | |
Liu et al. | ACDnet: An action detection network for real-time edge computing based on flow-guided feature approximation and memory aggregation | |
JP2014110020A (en) | Image processor, image processing method and image processing program | |
KR100635883B1 (en) | System for real-time objects tracking | |
JP4918615B2 (en) | Object number detection device and object number detection method | |
JP2011018269A (en) | Device and method for detecting motion of translucent object | |
JP4751871B2 (en) | Imaging object detection apparatus and method | |
US11620360B2 (en) | Methods and systems for recognizing object using machine learning model | |
JP4674920B2 (en) | Object number detection device and object number detection method | |
JP2021117635A (en) | Object tracking device and object tracking method | |
JP2010141668A (en) | Moving object tracking apparatus, moving object tracking method, and moving object tracking program | |
CN110991365B (en) | Video motion information acquisition method, system and electronic equipment | |
KR20090031023A (en) | Moving object detecting method and system for controlling the same | |
Chen et al. | Dynamic background reconstruction in traffic surveillance systems |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20101216 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110111 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110307 |
|
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: 20110726 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110803 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140812 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |