JP7121708B2 - Object extractor, method and program - Google Patents
Object extractor, method and program Download PDFInfo
- Publication number
- JP7121708B2 JP7121708B2 JP2019149690A JP2019149690A JP7121708B2 JP 7121708 B2 JP7121708 B2 JP 7121708B2 JP 2019149690 A JP2019149690 A JP 2019149690A JP 2019149690 A JP2019149690 A JP 2019149690A JP 7121708 B2 JP7121708 B2 JP 7121708B2
- Authority
- JP
- Japan
- Prior art keywords
- background
- update rate
- current frame
- difference threshold
- displacement information
- 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
Links
Images
Landscapes
- Image Analysis (AREA)
Description
本発明は、オブジェクト抽出装置、方法およびプログラムに係り、特に、映像の各フレームから、過去フレームを統計的に処理した背景モデルを背景とする背景差分計算によりオブジェクトを抽出するオブジェクト抽出装置、方法およびプログラムに関する。 The present invention relates to an object extraction device, method, and program, and more particularly to an object extraction device, method, and program for extracting an object from each frame of a video by background difference calculation using a background model obtained by statistically processing past frames as a background. Regarding the program.
主に画像中からの移動物体の検出や、非特許文献1に示されるような自由視点映像の制作などを目的として、前景領域と背景領域とを分離する手法が数多く提案されている。その中で、事前に撮影した前景の存在しない背景画像などをベースに背景の特徴をモデル化し、背景モデルと入力画像との差分が大きい領域を前景として抽出するアプローチは背景差分法と呼ばれる。
Many techniques for separating a foreground region and a background region have been proposed mainly for the purpose of detecting a moving object in an image and producing a free-viewpoint video as shown in
背景差分法の例として、非特許文献2には、複数のガウス分布を混合させた混合ガウス分布を用いて背景をモデル化する手法が開示されている。非特許文献2は、混合ガウス分布によってモデル化された背景に対し、一定の差分以上の画素を前景として抽出することで前景と背景との分離を実現する。
As an example of the background subtraction method, Non-Patent
非特許文献2で使用される背景モデルは、フレームを経るごとに徐々に更新される機構を備えている。これにより、背景部分に変化が生じた場合にも、徐々に背景の特徴を学習することで、その状況に応じた背景モデルを保持することが可能になる。
The background model used in Non-Patent
非特許文献3では、背景差分を実施する際に設定する前景抽出のための閾値を、人物の追跡によって得られる人物位置に応じて画素ごとに適応的に変化させることで、背景差分の精度を高める手法が開示されている。非特許文献3では、このような人物の認識や追跡情報に基づくパラメータ変更により、非特許文献2が開示する背景差分を用いた技術の精度をさらに向上させることが期待できる。
In Non-Patent Document 3, the accuracy of the background subtraction is improved by adaptively changing the threshold for foreground extraction that is set when performing the background subtraction for each pixel according to the human position obtained by tracking the person. A method for increasing is disclosed. In Non-Patent Document 3, it is expected that the accuracy of the technology using background subtraction disclosed in Non-Patent
特許文献1は、物体認識の結果に基づいて、背景差分法を実施する際の閾値および更新率の双方を画素ごとに動的に変更することで、高精度な前景抽出を実現する発明に関するものである。
特許文献1では、前景として抽出したい物体が存在する可能性が高い領域の背景差分閾値を、物体認識の結果に基づいて低くすることで、抽出対象物体が前景として抽出されやすくできる。加えて、物体認識の結果に基づいて、物体が存在する画素の背景モデルの更新率を低くすることで、静止している物体に欠けが生じることを防止できる。 In Japanese Patent Laid-Open No. 2004-100001, the background difference threshold value of a region in which an object to be extracted as the foreground is likely to exist is lowered based on the result of object recognition, thereby making it easier to extract the object to be extracted as the foreground. In addition, by lowering the update rate of the background model for the pixels where the object exists based on the result of object recognition, it is possible to prevent the static object from being chipped.
本発明の発明者等は、非特許文献2,3及び特許文献1に開示されているような背景差分法ベースの手法で抽出したシルエットを用い、非特許文献1に代表されるような自由視点映像の制作を行って考察を行った。
The inventors of the present invention used silhouettes extracted by a background subtraction-based method as disclosed in
その結果、非特許文献1に開示されている自由視点映像技術の制作工程では、背景差分法を用いてシルエット画像を作成し、その後、各シルエット画像をベースに3次元空間上の積集合を計算することで視体積を生成し、対象物体の3Dモデル化を行うが、このときのシルエット抽出の精度が自由視点映像の品質に大きく影響を及ぼすことを確認した。
As a result, in the production process of the free-viewpoint video technology disclosed in Non-Patent
非特許文献2に開示されている手法は、背景を統計的にモデル化し、徐々に更新を行うことで、緩やかな背景の変化や規則的な背景部分の変化に関してロバストにシルエット抽出を行えるという強みがあった。しかしながら、背景が複雑かつ急峻に変化するようなシーンには適用が難しかった。
The method disclosed in Non-Patent
背景が複雑なシーンの例としては、スポーツの試合において選手やボールの抽出を行いたい場合に、選手の背後に頻繁に切り替わりが発生する広告表示用の液晶ディスプレイが配置されているシーンや、悪天候で背景の状況が常に大きく変化し続けるようなシーンが挙げられる。 An example of a scene with a complex background is a scene in which a liquid crystal display for displaying advertisements that frequently switch is placed behind the player when you want to extract players and balls in a sports game, or a scene in which bad weather is used. Scenes in which the background situation constantly changes greatly can be cited.
このようなシーンでは、背景が急激に変化することに加え、その背景の変化に規則性がないことも多いことから、背景を誤って前景として抽出してしまう可能性が高くなる。これらの抽出困難なシーンにおいて抽出を行うためには、非特許文献2の手法では精度的に不十分である。
In such a scene, the background changes abruptly, and the change of the background often has no regularity. Therefore, there is a high possibility that the background is mistakenly extracted as the foreground. The method of Non-Patent
このような技術課題を解決するために、非特許文献3や特許文献1のように、人物追跡や人物認識を行い、その結果に基づいて、背景差分法の閾値や更新率を変更する手法が提案されていた。しかしながら、非特許文献3では、追跡で得られる矩形に基づいて、その内部の閾値を小さくし、抽出されやすくする機構しか開示されていない。したがって、対象物体の抽出をしやすくはなるものの、閾値を下げた領域ではノイズなどが多く発生しやすくなるという新たな課題が生じ得る。
In order to solve such technical problems, as in Non-Patent Document 3 and
一方、特許文献1では、人物認識の結果に基づいて、閾値のみならず背景モデルの更新率にも変化を加えることで精度の高い抽出を行う。この閾値および更新率の調整は、あくまで毎フレームの人物認識の結果のみに基づいて行われ、特に複数フレームに渡って人物が連続で認識されているような領域の閾値は低く設定される。
On the other hand, in
しかしながら、長く静止していた人物が突然動き出すような状況においては、物体が長く静止していた画素位置の閾値が、しばらくの間低く設定され続けるため、本領域でノイズが現れやすくなる。加えて、今まで物体が認識されていなかった領域、すなわち閾値の高い領域に物体が移動する場合には欠けが発生しやすくなるという問題があった。このように、特許文献1は対象物体の不規則な移動に関して、ノイズや欠けが発生しやすいという課題を有していた。
However, in situations where a person who has been standing still for a long time suddenly starts to move, the threshold for pixel positions where the object has been standing still for a long time continues to be set low for a while, so noise tends to appear in this area. In addition, there is a problem that chipping is likely to occur when an object moves to an area where the object has not been recognized, ie, an area with a high threshold value. As described above,
本発明の目的は、上記の技術課題を解決し、オブジェクトが不規則に移動、静止するなど、その動きが激しい場合でもロバストなオブジェクト抽出を可能にするオブジェクト抽出装置、方法およびプログラムを提供することにある。 It is an object of the present invention to solve the above technical problems and to provide an object extraction device, method, and program that enable robust object extraction even when the object moves violently, such as when the object moves irregularly or stands still. It is in.
上記の目的を達成するために、本発明は、映像の各フレームから、過去フレームを統計的に処理した背景モデルを背景とする背景差分計算によりオブジェクトを抽出するオブジェクト抽出装置において、以下の構成を具備した点に特徴がある。 In order to achieve the above object, the present invention provides an object extracting apparatus for extracting an object from each frame of a video by background difference calculation using a background model obtained by statistically processing past frames as a background, and having the following configuration. It is characterized by the fact that it is equipped.
(1) 各フレームからオブジェクト領域を検出する手段(102)と、フレーム間でのオブジェクト領域の変位情報を取得する手段(103)と、前フレームに用いた背景差分閾値を前記変位情報に基づいて現フレームの対応する画素領域に移動して現フレームに用いる背景差分閾値を決定する手段(104a)と、前記背景モデルと現フレームとの差分を前記更新した背景差分閾値と比較する背景差分計算により現フレームの各画素を背景および前景のいずれかに識別する手段(105)と、現フレームに基づいて前記背景モデルを更新する手段(106)とを具備した。 (1) means (102) for detecting an object region from each frame; means (103) for acquiring displacement information of the object region between frames; means (104a) for moving to a corresponding pixel region of the current frame to determine a background difference threshold to be used for the current frame; and background difference calculation for comparing the difference between the background model and the current frame with the updated background difference threshold. Means (105) for identifying each pixel of the current frame as either background or foreground, and means (106) for updating the background model based on the current frame.
(2) 背景モデルを更新する手段(106)が背景モデルに現フレームを所定の更新率で反映させて更新する際の当該更新率を前記変位情報に基づいて決定する更新率決定手段(104b)を更に具備した。 (2) update rate determination means (104b) for determining the update rate based on the displacement information when the means (106) for updating the background model updates the background model by reflecting the current frame at a predetermined update rate; was further provided.
(3) 更新率決定手段(104b)は、前記変位情報に基づいて、変位速度が大きい画素ほど更新率を高く調整するようにした。 (3) Based on the displacement information, the update rate determination means (104b) adjusts the update rate to a higher value for a pixel with a higher displacement speed.
(4) 更新率決定手段(104b)は、現フレームに対するオブジェクト検出の結果に基づいて、オブジェクトが検出された画素の更新率を低く調整するようにした。 (4) The update rate determining means (104b) adjusts the update rate of the pixel where the object is detected to be low based on the object detection result for the current frame.
(5) 背景モデルを更新する手段(106)は、前記識別する手段(105)による識別の結果に基づいて、前景に識別された画素は背景に識別された画素よりも低い更新率で更新するようにした。 (5) means (106) for updating the background model updates the pixels identified as the foreground at a lower update rate than the pixels identified as the background, based on the identification result of the identifying means (105); I made it
(6) 背景差分閾値を決定する手段は、前記変位情報に基づいて決定した背景差分閾値を、現フレームに対するオブジェクト検出の結果に基づいて、オブジェクトが検出された画素について低く調整するようにした。 (6) The means for determining the background difference threshold adjusts the background difference threshold determined based on the displacement information to be lower for the pixels where the object is detected based on the result of object detection for the current frame.
(7) 前記変位情報に基づいて背景差分閾値が移動された移動元の各画素の更新率を初期化する手段をさらに具備した。 (7) It further comprises means for initializing the update rate of each pixel of the movement source of which the background difference threshold has been moved based on the displacement information.
(8) 前記変位情報に基づいて背景差分閾値が移動された移動元の各画素の背景差分閾値を初期化する手段をさらに具備した。 (8) Further provided is means for initializing the background difference threshold of each pixel of the movement source of which the background difference threshold has been moved based on the displacement information.
(1) フレーム間でのオブジェクト領域の変位情報に基づいて、前フレームに用いた背景差分閾値を現フレームの対応する画素領域に移動して現フレームに用いる背景差分閾値を決定するので、オブジェクトが不規則に移動、静止するなど、その動きが激しい場合でもロバストなオブジェクト抽出が可能になる。 (1) Based on the displacement information of the object area between frames, the background difference threshold used in the previous frame is moved to the corresponding pixel area in the current frame to determine the background difference threshold used in the current frame. Robust object extraction becomes possible even when the movement is intense, such as moving or standing still irregularly.
(2) 背景モデルを更新する手段が背景モデルに現フレームを所定の更新率で反映させて更新する際の当該更新率を前記変位情報に基づいて決定するので、オブジェクトの動きに応じて背景モデルを適応的に最適化できるようになる。 (2) The means for updating the background model determines the update rate when updating the background model by reflecting the current frame at a predetermined update rate based on the displacement information. can be adaptively optimized.
(3) 更新率決定手段は、変位速度が大きい画素ほど更新率を高く調整するので、長時間静止するオブジェクトについては更新処理の繰り返しによる欠けなどが発生しにくくなる一方、高速に移動するオブジェクトには高い更新率が割り当てられるので、輪郭を綺麗に削りやすくなる。 (3) The update rate determining means adjusts the update rate to a higher value as the displacement speed of a pixel increases. is assigned a high update rate, which makes it easier to sharpen contours.
(4) 更新率決定手段は、オブジェクトが検出された画素の更新率を低く調整するので、静止しているオブジェクトの識別結果に欠けが生じることを防止できるようになる。 (4) Since the update rate determining means adjusts the update rate of the pixel where the object is detected to be low, it is possible to prevent the identification result of the stationary object from being deficient.
(5) 背景モデルを更新する手段は、前景に識別された画素は背景に識別された画素よりも低い更新率で更新するので、静止しているオブジェクトの識別結果に欠けが生じることを防止できるようになる。 (5) The means for updating the background model updates the pixels identified as the foreground at a lower update rate than the pixels identified as the background, so that it is possible to prevent the identification results of stationary objects from being deficient. become.
(6) 背景差分閾値を決定する手段は、変位情報に基づいて決定した背景差分閾値を、オブジェクトが検出された画素について低く調整するので、オブジェクトの検出された領域が背景差分計算により前景に識別しやすくなる。 (6) The means for determining the background difference threshold adjusts the background difference threshold determined based on the displacement information to be lower for the pixels where the object is detected, so that the detected area of the object is identified as the foreground by the background difference calculation. easier to do.
(7) 変位情報に基づいて背景差分閾値が移動された移動元の各画素の更新率を初期化する手段を具備したので、更新率が低い値に維持され続けることを原因とするノイズの発生を防止できるようになる。 (7) Since means for initializing the update rate of each pixel of the movement source whose background difference threshold has been moved based on the displacement information is provided, noise occurs due to the update rate being maintained at a low value. can be prevented.
(8) 変位情報に基づいて背景差分閾値が移動された移動元の各画素の背景差部閾値を初期化する手段を具備したので、背景差分閾値が低い値に維持され続けることを原因とするノイズの発生を防止できるようになる。 (8) The background difference threshold is maintained at a low value because a means for initializing the background difference threshold of each pixel whose background difference threshold has been moved based on the displacement information is provided. It becomes possible to prevent the occurrence of noise.
以下、図面を参照して本発明の実施の形態について詳細に説明する。図1は、本発明の一実施形態に係るオブジェクト抽出装置1の主要部の構成を示した機能ブロック図である。本実施形態では、映像の各フレームから背景差分によりオブジェクトを抽出する際に、背景として過去のフレーム画像を統計的に処理した背景モデルが用いられる。
BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a functional block diagram showing the configuration of main parts of an
このようなオブジェクト抽出装置1は、CPU、メモリ、インタフェースおよびこれらを接続するバス等を備えた汎用のコンピュータやサーバに、後述する各機能を実現するアプリケーション(プログラム)を実装することで構成できる。あるいはアプリケーションの一部をハードウェア化またはプログラム化した専用機や単能機としても構成できる。
Such an
フレーム画像取得部101は、カメラ2が撮影した映像からフレーム画像Iを取得し、オブジェクト検出部102、背景差分計算部105および背景モデル更新部106へ提供する。このフレーム画像Iは、カメラ等で撮影した映像をハードディスクなどに保存しておき、この保存された画像を入力として処理を行ってもよい。オブジェクト検出部102は、図2に一例を示したように、各フレームからオブジェクトを検出し、現フレームINにおける検出結果O (x, y)をオブジェクト分布LN (x, y)として出力する。ここで、Nはフレーム番号を示し、(x, y)はフレーム内での各画素の位置を示している。オブジェクト分布LN (x, y)では、オブジェクトが検出された画素には高い値、オブジェクトが検出されない画素には低い値が、0~1の範囲でそれぞれ登録される。
The frame
本実施形態では、検出対象のオブジェクトを様々な環境下で撮影したカメラ映像の各フレームから画像特徴量を抽出し、深層学習の結果を法則化した学習モデルを用いて各オブジェクトを検出する。 In this embodiment, an image feature amount is extracted from each frame of a camera video of an object to be detected under various environments, and each object is detected using a learning model that normalizes the results of deep learning.
例えば、カメラ映像が球技を撮影した映像であれば、ボールや選手がオブジェクトとして検出される。このようなオブジェクト検出には、非特許文献6に開示されるように、オブジェクトの形状まで含めて抽出できる深層学習ベースの抽出手法や、非特許文献7に開示されるように、オブジェクトの矩形領域を抽出できる手法を適用できる。あるいは、HOG (Histograms of Oriented Gradients) 特徴量などの画像特徴量に基づいて各オブジェクトを抽出しても良い。 For example, if the camera video is a video of a ball game, the ball and the player are detected as objects. For such object detection, as disclosed in Non-Patent Document 6, a deep learning-based extraction method that can extract even the shape of the object, as disclosed in Non-Patent Document 7, a rectangular region of the object is used. can be applied. Alternatively, each object may be extracted based on an image feature amount such as HOG (Histograms of Oriented Gradients) feature amount.
なお、オブジェクト検出部102が各オブジェクトのクラスを識別できるように構成されていれば、識別クラスの情報も含めて出力するようにしても良い。識別クラスの情報とは、オブジェクトが、例えば"人物"なのか"ボール"なのかを識別するための情報である。
Note that if the
また、オブジェクト検出部102が検出結果の確からしさを示す尤度を算出できるように構成されていれば、この尤度をオブジェクト検出結果O (x, y)に反映させ、後述する背景差分パラメータ決定部104におけるパラメータ決定に利用してもよい。
Further, if the
さらに、オブジェクト分布LN (x, y)は、次式(1)に示すように、前フレームIN-1のオブジェクト分布LN -1と現フレームINのオブジェクト検出結果O (x, y)とを所定の割合mで加算した重み付け和として求めても良い。これにより、1つのフレームで物体認識に誤りが生じた場合でも、その影響が他のフレームに与える影響を軽減することができる。 Furthermore, the object distribution L N (x, y) is the object distribution L N -1 of the previous frame I N -1 and the object detection result O (x, y ) may be obtained as a weighted sum obtained by adding them at a predetermined ratio m. As a result, even if an object recognition error occurs in one frame, the effect of the error on other frames can be reduced.
変位情報取得部103は、現フレームINに対するオブジェクト検出の結果と前フレームIN-1に対するオブジェクト検出の結果とを比較し、フレーム間での各オブジェクトの変位方向および変位量を変位情報として取得する。このとき、変位情報を非特許文献4に開示されたオプティカルフローの計算により取得するのであれば、一般的にオブジェクトの事前検出が不要なので、現フレームINおよび前フレームIN-1から変位情報を取得することができる。なお、オプティカルフローを用いれば変位情報を比較的高速かつ簡易に算出できるものの確度は十分とは言えない。
The displacement
その他にも、図3に示したように、検出したオブジェクトを追跡することで変位情報を得るアプローチがある。この場合、オブジェクト検出部102が検出したオブジェクト領域をスタートとして、非特許文献5に開示される物体追跡技術を用いてフレーム間でオブジェクトの位置を追跡していく。このとき、フレームごとにオブジェクト検出も並行して実施し、オブジェクト検出の結果が追跡結果と重なる場合には、検出結果を新しい追跡のスタートとして繰り返し追跡を行うようなアプローチを採用してもよい。これらのアプローチに基づき、変位情報取得部103はフレーム間での各画素の変位方向と変位量とを取得できる。
Another approach is to obtain displacement information by tracking the detected object, as shown in FIG. In this case, starting from the object area detected by the
背景差分パラメータ決定部104は、背景差分閾値決定部104a、更新率決定部104bおよび初期化部104cを含み、現フレームINに背景差分計算を適用する際の閾値(背景差分閾値)や背景(背景モデル)の更新率といった背景差分パラメータを決定する。
The background difference
前記背景差分閾値決定部104aは、図4に示したように、前フレームIN-1のオブジェクト領域に適用された背景差分閾値を前記変位情報に基づいて現フレームINの対応する領域の各画素に移動させることで、現フレームINに適用する背景差分閾値を決定する。たとえば、前フレームIN-1から現フレームINへの変位情報を変位ベクトル(Δx, Δy)、前フレームIN-1に適用した背景差分閾値をTN-1(x, y)で表現すれば、現フレームINに適用する変位ベースの閾値TN_MOV(x, y)は次式(2)で求められる。
The background difference
なお、前フレームIN-1では独立していた2つのオブジェクトの画素が現フレームINでは同じ画素に移動してくるようなケースでは、同じ画素に2箇所から閾値が移動してくることが考えられる。このようなケースでは、各閾値の平均値あるいは小さい方の値を優先的に選択するなどの手段を採って変位ベースの閾値TN_MOV(x, y)を得る。 Note that in the case where the pixels of two objects that were independent in the previous frame I N-1 move to the same pixel in the current frame I N , it is possible that the threshold values will move to the same pixel from two locations. Conceivable. In such cases, measures such as preferentially choosing the mean or the smaller value of each threshold are taken to obtain the displacement-based threshold T N_MOV (x, y).
また、デプス推定などに基づいて、重なった複数のオブジェクトの前後関係を判定することができる場合には、前面の移動物体の閾値を優先的に反映させるような機構を具備していてもよい。このときに、前フレームIN-1からの移動先に該当しない画素に関しては、次式(3)に基づいて前フレームIN-1の対応する画素の閾値TN-1_(x, y)をそのまま採用することができる。 In addition, if the front-back relationship of a plurality of overlapping objects can be determined based on depth estimation or the like, a mechanism may be provided that preferentially reflects the threshold value of the front moving object. At this time, for pixels that do not correspond to the movement destination from the previous frame I N -1, the threshold T N-1_ (x, y) of the corresponding pixel in the previous frame I N-1 is calculated based on the following equation (3). can be adopted as is.
前記背景差分閾値決定部104aは更に、前記移動ベースで背景差分閾値TN_MOV(x, y)を計算した後、オブジェクト検出部102が出力するオブジェクト検出の結果LN (x, y)をTN_MOV(x, y)に反映させるための調整値TC (x, y)を次式(4)により計算する。Tmaxはフレーム間での閾値の変化量の最大値を示す定数であり、予め設定されている。
The background difference
すなわち、オブジェクト分布LN (x, y)によりオブジェクトが存在するとされた画素が前景と判定されやすくするためには、その閾値を下げることが望ましい。そこで、本実施形態ではオブジェクトが存在する画素では負の調整値TC (x, y)が得られ、オブジェクトが存在しない画素では正の調整値TC (x, y)が得られるようにしている。 In other words, it is desirable to lower the threshold in order to make it easier to determine that the pixels in which the object exists according to the object distribution L N (x, y) are in the foreground. Therefore, in the present embodiment, a negative adjustment value T C (x, y) is obtained for a pixel where an object exists, and a positive adjustment value T C (x, y) is obtained for a pixel where an object does not exist. there is
前記背景差分閾値決定部104aは、変位ベースの閾値TN_MOV(x, y)および調整値TC (x, y)を次式(5)に適用することにより、現フレームINに適用する最終的な背景差分閾値TN(x, y)を求める。
The background difference
このように、本実施形態ではオブジェクトが存在する可能性が高い領域に低い閾値が設定され、オブジェクトの存在可能性が低い領域には高い閾値が設定されるので、オブジェクトが抽出され易くなる効果が生まれる。 As described above, in the present embodiment, a low threshold value is set for an area where there is a high probability that an object exists, and a high threshold value is set for an area where there is a low possibility that an object exists. to be born.
更新率決定部104bは、後述する背景モデル更新部106が、前フレームまで(~IN-1)の各フレームを統計的に処理してモデル化した背景モデルに現フレームINの画素情報を反映して現フレームまで(~IN)の背景モデルに更新する際の当該反映の割合(更新率UN (x, y))を前記変位情報に基づいて画素ごとに決定する。
The update
本実施形態では、更新率UN (x, y)がフレーム間で大幅に変化することを避けるため、前フレームIN-1に対する背景差分計算で用いた背景モデルを更新した際の更新率UN-1(x, y)と補正値UC(x, y)とに基づいて、現フレームINに対する背景差分計算で用いる背景モデルを更新するための更新率UN (x, y)を次式(6)で求める。 In this embodiment, in order to prevent the update rate U N ( x , y) from changing significantly between frames, the update rate U Based on N −1(x, y) and the correction value U C (x, y), the update rate U N (x, y) for updating the background model used in the background subtraction calculation for the current frame I N is Calculated by the following formula (6).
ただし、更新率UN (x, y)は0~1の値の範囲を持つことから、0未満になる場合には0に、1より大きくなる場合には1になるように値を修正する。補正値UC(x, y)は、現フレームINでの各画素の更新率の変化量であり、次式(7)で求められる。 However, since the update rate U N (x, y) has a value range of 0 to 1, the value is corrected to 0 if it is less than 0, and 1 if it is greater than 1. . The correction value U C (x, y) is the amount of change in the update rate of each pixel in the current frame I N and is obtained by the following equation (7).
ここで、Umaxはフレーム間での更新率の変化量の最大値を示す定数であり、予め手動で設定される。MN (x, y)は、フレーム間での各画素の変位量すなわち変位速度の指標値であり、変位速度が大きい画素ほど大きい値が入力されるように設計され、0~1の範囲で正規化した値を採る。これにより、MN(x, y)が1のときにUC (x, y)はUmaxとなり、MN (x, y)が0のときにUC (x, y)は-Umaxとなることから、MN(x, y)に応じて更新率が最大でUmaxだけ変化することになる。 Here, U max is a constant that indicates the maximum amount of change in the update rate between frames, and is set manually in advance. M N (x, y) is the displacement amount of each pixel between frames, that is, the index value of the displacement speed. Take the normalized value. Thus, U C (x, y) is U max when M N (x, y) is 1, and U C (x, y) is -U max when M N (x, y) is 0. As a result, the update rate changes at most by U max according to M N (x, y).
このように、本実施形態では変位速度が大きい画素には大きい更新率が割り当てられ、変位速度が小さい画素には小さい更新率が割り当てられるため、長時間静止するオブジェクトに関し、更新処理の繰り返しによる欠けなどが発生しにくくなる。また、高速に移動するオブジェクトには高い更新率が割り当てられるので、輪郭を綺麗に削りやすくなる。 As described above, in this embodiment, a large update rate is assigned to a pixel with a high displacement speed, and a small update rate is assigned to a pixel with a low displacement speed. etc. will be less likely to occur. Also, since a high update rate is assigned to a fast-moving object, it becomes easier to sharpen the contour.
また、追跡中に別の物体が同じ位置に重なってくるようなケースでは、MN (x, y)が2つ得られるケースも考えられるが、この場合は平均や最大となる量MN (x, y)を採用することができる。また、閾値の決定と同様に、デプス推定などに基づいて、重なる複数の物体の前後関係を判定することができる場合には、前面の移動物体のMN (x, y)を優先的に反映させるような機構を設けても良い。 Also, in cases where another object overlaps the same position during tracking, there may be cases where two M N (x, y) are obtained, but in this case, the average or maximum amount M N ( x, y) can be adopted. Also, similar to the determination of the threshold value, if the anteroposterior relationship of multiple overlapping objects can be determined based on depth estimation, etc., M N (x, y) of the moving object in front is preferentially reflected. A mechanism may be provided to allow
さらに、閾値と同様に上式(7)にもオブジェクト分布LN (x, y)を反映させ、物体が存在する場合には更新率が低くなるような制御を追加しても良い。物体が存在する画素の更新率を低くすることで、静止物体の欠けなどを防止できる効果が期待できる。 Furthermore, similar to the threshold, the object distribution L N (x, y) may be reflected in the above equation (7), and control may be added to lower the update rate when an object exists. By lowering the update rate of pixels in which an object exists, it is possible to expect the effect of preventing missing of a stationary object.
なお、オブジェクト検出部102が各オブジェクトのクラスを識別できるのであれば、識別クラスごとに前記最大値Umax、Tmaxを設定してもよい。これにより、例えば人物の肌の色が床の色と酷似しており欠けやすく、ボールは背景とかけ離れた色をしているため欠けにくいという状況下で、人物クラスのTmax(Tmax_person)を大きく、ボールクラスのTmax(Tmax_ball)を小さく設計することで、人物クラスの方が認識されたケースの方が閾値の変動量が大きくなり、人物が存在する可能性が高いと思われる領域では、抽出がされやすくなることなどの効果が期待できる。
If the
さらに、前記更新率UN (x, y)および閾値TN(x, y)の決定の際に、矩形ベースの追跡方法による変位ベクトルの取得と、オプティカルフローなどから得られる画素ベースの変位ベクトルを組み合わせるアプローチを用いてもよい。 Furthermore, in determining the update rate U N (x, y) and the threshold T N ( x, y), the acquisition of the displacement vector by the rectangle-based tracking method and the pixel-based displacement vector obtained from optical flow, etc. A combined approach may also be used.
例えば、矩形ベースの追跡を実施している際に、当該矩形の中の画素にのみ、オプティカルフローを用いた変位ベクトルの取得を実施し、矩形内部にて、画素ごとに異なる閾値や更新率を得ることが考えられる。矩形ベースの追跡では一矩形につき一つの変位ベクトルしか得ることができないが、矩形内部で画素ベースの変位ベクトルを計算し、利用することによって、画素ごとに適応的に閾値と更新率を変化させることができる。これは、例えば上式(7)で利用される、各画素のMN (x, y)を矩形のMN1 (x, y)と画素ベースのMN2 (x, y)との重み付き和などを計算することで実現される。 For example, when performing rectangle-based tracking, we acquire displacement vectors using optical flow only for the pixels within the rectangle, and set different thresholds and update rates for each pixel within the rectangle. can be obtained. Rectangle-based tracking can only yield one displacement vector per rectangle, but by computing and using pixel-based displacement vectors inside the rectangle, we can adaptively vary the threshold and update rate for each pixel. can be done. This is the weighted sum of the rectangular M N1 (x, y) and the pixel-based M N2 (x, y), which is used, for example, in equation (7) above . This is achieved by calculating
このような処理を加えることで、矩形そのものは停止しているものの、矩形の内部で物体に動きがあるような場合に、適切なパラメータを設定できる可能性が高くなる。また、矩形内部だけで画素ベースの変位ベクトルの取得を行うため、画像全体で画素ベースの変位ベクトルの取得を行う場合と比べて高速に計算することが可能となる。 Adding such processing increases the possibility of setting appropriate parameters when the rectangle itself is stationary but the object is moving inside the rectangle. In addition, since the pixel-based displacement vector is obtained only within the rectangle, the calculation can be performed at a higher speed than when the pixel-based displacement vector is obtained for the entire image.
さらに、オブジェクト追跡領域ではその外側近傍の領域ほど背景/前景の識別結果が変化しやすいことから、矩形ベースの追跡であれば、矩形内の中央部に比べて外側の更新率を高目に微調整するなどの処理を加えても良い。 Furthermore, in the object tracking area, the background/foreground discrimination results are more likely to change in the area near the outside of the object tracking area. Processing such as adjustment may be added.
初期化部104cは、閾値TN-1(x, y)を変位ベクトルに基づいて移動されると、移動元の各画素(x-Δx, y-Δy)の閾値おおよび更新率を初期化する。これは、図5に一例を示したように、オブジェクトが移動していく場合に、移動元の領域でノイズが発生しやすくなることを抑止するために行われる。
When the threshold T N-1 (x, y) is moved based on the displacement vector, the
すなわち、移動元の閾値および更新率を放置すると、暫くの間、閾値は高く、更新率は低く維持されるため、このようなノイズが発生する場合がある。そこで、図6に示したように、本実施形態では移動元の閾値と更新率を初期化することで、ノイズの発生を抑制する効果が期待できる。 That is, if the threshold and the update rate of the movement source are left as they are, the threshold is kept high and the update rate low for a while, so such noise may occur. Therefore, as shown in FIG. 6, in this embodiment, by initializing the threshold value and the update rate of the movement source, an effect of suppressing the occurrence of noise can be expected.
背景差分計算部105は、各画素が単一のガウスモデルでモデル化された背景モデルを背景として用い、フレーム画像取得部101が取得した現フレームINの各画素を背景差分により前景および背景のいずれかに識別する。
The background
本実施形態では、後述する背景モデル更新部106から、前フレームIN-1までの背景モデルとして、画素ごとに時間軸上の平均μN-1(x, y)および標準偏差σN-1(x, y)を取得し、ガウス分布を用いた背景差分において次式(8)を満たす画素(x, y)を背景に識別する。
In the present embodiment, the background
ここで、IN(x, y)は現フレームINの各画素の輝度値、zは標準偏差の何倍までを背景と判断するかを調節するパラメータであり、背景差分閾値TN(x, y)が大きいほど背景と判断される可能性が高くなる。 Here, I N (x, y) is the luminance value of each pixel in the current frame I N , z is a parameter for adjusting the standard deviation up to which the background is judged to be the background, and the background difference threshold T N (x , y) is more likely to be judged as background.
なお、背景差分の判定に使う画像の色空間はグレースケールでも良いし、RGBやYUV等の色空間でも良いが、複数の色チャネルを持つ場合は、全てのチャネルを独立に処理し、全ての色が背景の条件を満たす画素が背景に識別されるようにすることが望ましい。 The color space of the image used to determine the background difference may be grayscale, RGB, YUV, or other color space. It is desirable to ensure that pixels whose color satisfies the background condition are identified as background.
また、上式(8)では標準偏差の項と閾値の項とを分けているが、背景差分閾値TN(x, y)に応じて標準偏差項の定数値zを調節するような機能を備えていてもよい。 In addition, although the standard deviation term and the threshold term are separated in the above equation (8), a function to adjust the constant value z of the standard deviation term according to the background difference threshold T N (x, y) is added. may be provided.
加えて、背景差分計算部105が計算結果として出力するマスクに対して何らかの後処理を実施しても良い。後処理とは、得られたマスクに対してフィルタ処理などを施すことによってマスクを洗練化する処理の総称であり、多くの背景差分アルゴリズムの中で、背景差分計算後に取り入れられている。
In addition, some post-processing may be performed on the mask output by the background
後処理の代表例としてはメディアンフィルタなどのフィルタ処理によるノイズ除去や、輪郭の膨張(dilation)と縮退(erosion)を繰り返すことで細かいノイズを除去する処理などが挙げられる。また、ユーザが指定したサイズより小さい前景領域は無条件で背景として扱うようなノイズ除去処理を実施しても良いし、前景に囲まれる背景領域のサイズが小さい場合には、前景領域として穴埋めるなどの処理を実施しても良い。 Representative examples of post-processing include noise removal by filtering such as a median filter, and processing to remove fine noise by repeating contour dilation and erosion. A foreground area smaller than the size specified by the user may be subjected to noise removal processing such that it is unconditionally treated as the background. If the size of the background area surrounded by the foreground is small, it is filled as the foreground area. etc. may be performed.
背景モデル更新部106は、現フレームに対する背景差分の計算結果に基づいて、背景として用いた背景モデルを次フレームIN+1用に更新する。本実施形態では、前フレームIN-1までの各画素の平均値μN-1(x, y)および標準偏差σN-1(x, y)が、現フレームINの画素情報および前記更新率決定部104bが決定した更新率UN(x, y)に基づいて更新される。すなわち、現フレームINの各画素の輝度値IN(x, y)を反映した各画素の平均μN(x, y)は次式(9)で計算される。
The background
さらに、現フレームの各画素の輝度値IN(x, y)を反映した各画素の標準偏差σN(x, y)は、次式(10),(11)で計算される。 Furthermore, the standard deviation σ N (x, y) of each pixel reflecting the luminance value I N (x, y) of each pixel in the current frame is calculated by the following equations (10) and (11).
なお、更新率UN(x, y)に関しては、背景差分計算部105による前景/背景の計算結果に基づいて、前景と判定された画素は背景と判定された画素よりも低い更新率で更新されるようにしても良い。一般に、背景の画素に対して高い更新率を、前景の画素に対して低い更新率を設定することで、前景と判定された領域が更新で欠けることを抑止できる効果が期待される。
Regarding the update rate U N (x, y), pixels determined to be the foreground are updated at a lower update rate than pixels determined to be the background based on the calculation result of the foreground/background by the background
また、背景モデルに関しては、実際にシルエット画像の抽出を試みる前に、事前に一定時間に渡り背景モデルを記録し、その背景モデルを利用して背景差分計算部での計算を実施するような機構を有していてもよい。 As for the background model, before actually trying to extract the silhouette image, the background model is recorded for a certain period of time in advance, and the background model is used to perform calculations in the background difference calculation unit. may have
計算結果出力部107は、背景差分計算部105による背景/前景の計算結果を映像として出力する。出力形式は、例えば図7に示したように、各フレームを背景の画素領域でマスクして得られるカラー画像形式でも良いし、あるいは背景と前景とを識別できる2値のマスク画像形式でも良い。
The calculation
図8は、本発明の一実施形態の動作を示したフローチャートであり、ステップS1では、フレーム画像取得部101によりカメラ映像から今回のフレーム画像(現フレームIN)が取得される。ステップS2では、オブジェクト検出部102により現フレームINからオブジェクト領域が検出される。ステップS3では、変位情報取得部103により、前フレームIN-1から検出したオブジェクト領域と現フレームINから検出したオブジェクト領域とに基づいてフレーム間でのオブジェクト領域の変位情報(Δx, Δy)が取得される。
FIG. 8 is a flowchart showing the operation of one embodiment of the present invention. In step S1, the current frame image (current frame I N ) is acquired from the camera video by the frame
ステップS4では、図4を参照して詳述したように、変位情報(Δx, Δy)および前フレームIN-1に適用した背景差分閾値TN-1(x, y)に基づいて変位ベース閾値TN_MOV(x, y)が計算される。ステップS5では、現フレームINに対するオブジェクト検出の結果に基づいて調整値TC(x, y)が計算される。ステップS6では、前記変位ベース閾値TN_MOV(x, y)および調整値TC(x, y)を上式(5)に適用することで、現フレームINに対する背景差分計算で用いる背景差分閾値TN(x, y)が決定される。 In step S4, as detailed with reference to FIG. 4, a displacement- based A threshold T N_MOV (x, y) is calculated. In step S5, an adjustment value T C (x, y) is calculated based on the object detection results for the current frame I N . In step S6, by applying the displacement base threshold T N_MOV (x, y) and the adjustment value T C (x, y) to the above equation (5), the background difference threshold used in the background difference calculation for the current frame I N is TN( x, y) is determined.
ステップS7では、図6を参照して詳述したように、前フレームIN-1に適用した背景差分閾値TN-1(x, y)を前記変位情報に基づいて移動した際の移動元の各画素(x-Δx, y-Δy)に設定されていた背景差分閾値および更新率が、前記初期化部104cにより初期化される。ステップS8では、上式(7)に基づいて更新率の補正値UC(x, y)が計算される。ステップS9では、補正値UC(x, y)および前フレームIN-1に適用した更新率UN-1(x, y)を上式(6)に適用することで、現フレームINに対する背景差分計算で用いる背景モデルを次フレームIN+1用に更新するための更新率UN(x, y)が決定される。
In step S7, as described in detail with reference to FIG. 6, the background difference threshold T N-1 (x, y) applied to the previous frame I N-1 is moved based on the displacement information. are initialized by the
ステップS10では、前フレームIN-1までの各フレームの画素情報を統計的に処理してモデル化した背景モデル(各画素の平均値μN-1(x, y)および標準偏差σN-1(x, y))が取得される。ステップS11では、前記背景差分計算部105が、現フレームINの画素情報と前記取得した背景モデルとの差分を前記背景差分閾値TN(x, y)と比較する背景差分計算を実行することで現フレームINの各画素が背景および前景のいずれかに識別される。
In step S10, a background model (mean μN-1(x, y) and standard deviation σN - 1( x, y)) is obtained. In step S11, the background
ステップS12では、前記ステップS9で決定した更新率UN(x, y)が、現フレームINに対する背景差分計算の結果に基づいて、前景と判定された画素は背景と判定された画素よりも低い更新率で更新されるように補正される。ステップS13では、前フレームIN-1に対する背景差分計算で用いた背景モデル(平均値μN-1(x, y),標準偏差σN-1(x, y))、現フレームINの画素情報IN(x, y)および更新率UN(x, y)を上式(9),(10)に適用することで背景モデルが次フレームIN+1用に更新される。 In step S12, the update rate U N (x, y) determined in step S9 is set such that the pixels determined to be the foreground are higher than the pixels determined to be the background based on the result of the background difference calculation for the current frame I N . Corrected to update at a lower update rate. In step S13, the background model (mean value μN-1(x, y), standard deviation σN-1(x, y)) used in the background subtraction calculation for the previous frame I N-1 and the pixel information of the current frame I N By applying I N (x, y) and the update rate U N (x, y) to the above equations (9) and (10), the background model is updated for the next frame I N+1 .
ステップS14では、映像が終了したか否かが判断される。終了していなければステップS1へ戻り、次フレームIN+1に対して上記の各処理が繰り返される。 In step S14, it is determined whether or not the video has ended. If not completed, the process returns to step S1, and the above processes are repeated for the next frame IN+1 .
1...オブジェクト抽出装置,2...カメラ,101...フレーム画像取得部,102...オブジェクト検出部,103...変位情報取得部,104...背景差分パラメータ決定部,104a...背景差分閾値決定部,104b...更新率決定部,104c...初期化部,105...背景差分計算部,106...背景モデル更新部,107...計算結果出力部
1... Object extraction device, 2... Camera, 101... Frame image acquisition unit, 102... Object detection unit, 103... Displacement information acquisition unit, 104... Background difference parameter determination unit, 104a... Background difference
Claims (15)
各フレームからオブジェクト領域を検出する手段と、
フレーム間でのオブジェクト領域の変位情報を取得する手段と、
前フレームに用いた背景差分閾値を前記変位情報に基づいて現フレームの対応する画素領域に移動して現フレームに用いる背景差分閾値を決定する手段と、
前記背景モデルと現フレームとの差分を前記更新した背景差分閾値と比較する背景差分計算により現フレームの各画素を背景および前景のいずれかに識別する手段と、
現フレームに基づいて前記背景モデルを更新する手段とを具備したことを特徴とするオブジェクト抽出装置。 An object extraction device for extracting an object from each frame of a video by background difference calculation using a background model obtained by statistically processing past frames as a background,
means for detecting object regions from each frame;
means for obtaining displacement information of an object area between frames;
means for determining a background difference threshold used for the current frame by moving the background difference threshold used for the previous frame to a corresponding pixel region of the current frame based on the displacement information;
means for identifying each pixel of the current frame as either background or foreground by a background difference calculation comparing the difference between the background model and the current frame to the updated background difference threshold;
and means for updating the background model based on the current frame.
各フレームからオブジェクト領域を検出し、
フレーム間でのオブジェクト領域の変位情報を取得し、
前フレームに用いた背景差分閾値を前記変位情報に基づいて現フレームの対応する画素領域に移動して現フレームに用いる背景差分閾値を決定し、
前記背景モデルと現フレームとの差分を前記更新した背景差分閾値と比較する背景差分計算により現フレームの各画素を背景および前景のいずれかに識別し、
現フレームに基づいて前記背景モデルを更新することを特徴とするオブジェクト抽出方法。 In an object extraction method in which a computer extracts an object from each frame of an image by background difference calculation using a background model obtained by statistically processing past frames as a background,
detect the object area from each frame,
Get the displacement information of the object area between frames,
moving the background difference threshold used for the previous frame to the corresponding pixel region of the current frame based on the displacement information to determine the background difference threshold used for the current frame;
identifying each pixel of the current frame as either background or foreground by a background difference calculation that compares the difference between the background model and the current frame to the updated background difference threshold;
An object extraction method, comprising updating the background model based on a current frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019149690A JP7121708B2 (en) | 2019-08-19 | 2019-08-19 | Object extractor, method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019149690A JP7121708B2 (en) | 2019-08-19 | 2019-08-19 | Object extractor, method and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021033407A JP2021033407A (en) | 2021-03-01 |
JP7121708B2 true JP7121708B2 (en) | 2022-08-18 |
Family
ID=74676556
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019149690A Active JP7121708B2 (en) | 2019-08-19 | 2019-08-19 | Object extractor, method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7121708B2 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006268345A (en) | 2005-03-23 | 2006-10-05 | Toshiba Corp | Image processing device and image processing method |
JP2011053915A (en) | 2009-09-02 | 2011-03-17 | Sony Corp | Image processing apparatus, image processing method, program, and electronic device |
JP2012257173A (en) | 2011-06-10 | 2012-12-27 | Canon Inc | Tracking device, tracking method, and program |
-
2019
- 2019-08-19 JP JP2019149690A patent/JP7121708B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006268345A (en) | 2005-03-23 | 2006-10-05 | Toshiba Corp | Image processing device and image processing method |
JP2011053915A (en) | 2009-09-02 | 2011-03-17 | Sony Corp | Image processing apparatus, image processing method, program, and electronic device |
JP2012257173A (en) | 2011-06-10 | 2012-12-27 | Canon Inc | Tracking device, tracking method, and program |
Also Published As
Publication number | Publication date |
---|---|
JP2021033407A (en) | 2021-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6719457B2 (en) | Method and system for extracting main subject of image | |
EP1859410B1 (en) | Method of tracking objects in a video sequence | |
EP1859411B1 (en) | Tracking objects in a video sequence | |
JP6655878B2 (en) | Image recognition method and apparatus, program | |
US9767568B2 (en) | Image processor, image processing method, and computer program | |
KR101198322B1 (en) | Method and system for recognizing facial expressions | |
US20160140399A1 (en) | Object detection apparatus and method therefor, and image recognition apparatus and method therefor | |
JP2009087090A (en) | Object tracking device and object tracing method | |
JP4373840B2 (en) | Moving object tracking method, moving object tracking program and recording medium thereof, and moving object tracking apparatus | |
Ribeiro et al. | Hand Image Segmentation in Video Sequence by GMM: a comparative analysis | |
US20230334235A1 (en) | Detecting occlusion of digital ink | |
Asaari et al. | Hand gesture tracking system using Adaptive Kalman Filter | |
Lin et al. | An efficient and robust moving shadow removal algorithm and its applications in ITS | |
KR102434397B1 (en) | Real time multi-object tracking device and method by using global motion | |
Katramados et al. | Real-time visual saliency by division of gaussians | |
JP2020119250A (en) | Object extraction method and device | |
JP2016052013A (en) | Image processing device, image processing method, program and recording medium | |
KR101542206B1 (en) | Method and system for tracking with extraction object using coarse to fine techniques | |
Hu et al. | Video object segmentation in rainy situations based on difference scheme with object structure and color analysis | |
Wang et al. | Efficient visual tracking by probabilistic fusion of multiple cues | |
JP7121708B2 (en) | Object extractor, method and program | |
GB2467643A (en) | Improved detection of people in real world videos and images. | |
JP2016081252A (en) | Image processor and image processing method | |
Huang et al. | Tracking camouflaged objects with weighted region consolidation | |
Zhu et al. | A transform domain approach to real-time foreground segmentation in video sequences |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210706 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220726 |
|
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: 20220803 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220805 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7121708 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |