JP6054771B2 - Background model construction apparatus, background model construction method, and program - Google Patents
Background model construction apparatus, background model construction method, and program Download PDFInfo
- Publication number
- JP6054771B2 JP6054771B2 JP2013033791A JP2013033791A JP6054771B2 JP 6054771 B2 JP6054771 B2 JP 6054771B2 JP 2013033791 A JP2013033791 A JP 2013033791A JP 2013033791 A JP2013033791 A JP 2013033791A JP 6054771 B2 JP6054771 B2 JP 6054771B2
- Authority
- JP
- Japan
- Prior art keywords
- background model
- pixel
- foreground
- image
- target pixel
- 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 a background model construction apparatus, a background model construction method, and a program for constructing a dynamic background model.
従来、予め定められた位置に固定された固定カメラにより撮影された映像から、人物や移動する物体などの、動的な前景領域を抽出する技術が提案されている。 Conventionally, a technique for extracting a dynamic foreground region such as a person or a moving object from an image taken by a fixed camera fixed at a predetermined position has been proposed.
例えば非特許文献1には、固定カメラ環境において動的な前景領域を抽出するために、混合ガウス分布で表現した背景モデルを構築する技術が、示されている。また、この非特許文献1には、混合ガウス分布の分布数をシーンに合わせて動的に変更することで、照明変動などの一時的な背景の見かけの変化に対して頑健な動的な背景モデルを構築する技術も、示されている。
For example, Non-Patent
また、非特許文献2には、動的な背景モデルを構築する技術は示されていないが、複数のカメラを利用したステレオ視で得られる視差に基づいて、前景領域を抽出する技術が、示されている。
Non-Patent
非特許文献1に示されている上述の技術では、前景が移動している場合には、この前景を背景と混同することなく逐次動的な背景モデルを構築できる。しかし、前景が移動を一時的に停止するなどによって前景が静止に近い状態にある場合には、前景と背景とを本質的に区別することが難しく、時間が経過するに従って、前景領域が背景領域とみなされていき、前景領域が背景領域に溶け込んでいく現象が発生してしまっていた。
In the above-described technique disclosed in
そこで、非特許文献1には、前景領域が背景領域に溶け込んでいく現象を解決するために、背景モデルの構築とは別に、テンプレートマッチングといった手法により前景領域を追跡する技術も示されている。しかし、この前景領域を追跡する技術は、照明変動や前景の変形に対して頑健ではない。このため、照明変動や前景の変形などにより、テンプレートマッチングにより生成した初期のテンプレートとは前景領域が異なる場合には、上述のように前景が静止に近い状態になってしまうと、前景領域を適切に抽出できる動的な背景モデルを構築することはできなかった。
Therefore, Non-Patent
非特許文献1による上述の問題は、一般的な背景でかつ照明の変動が存在する環境において、途中で一時的に静止するような動作を行う人物の領域を前景領域として抽出する場合に、特に顕著化する。途中で一時的に静止するような動作を行う人物の領域とは、例えば、直立しており、下半身の動きは少ないが、頭や手などの上半身は動いている人物の領域のことである。
The above-mentioned problem according to Non-Patent
一方、非特許文献2に示されているステレオ視で得られる視差は、照明変動による影響を受けにくい。しかし、模様の少ない領域や、のっぺりした領域といった、テクスチャの少ない領域では、視差の推定が困難である。このため、非特許文献2で示されている技術では、テクスチャの少ない領域が存在している場合に、前景領域を適切には抽出できなかった。
On the other hand, the parallax obtained by the stereo vision shown in Non-Patent
そこで、本発明は、上述の課題に鑑みてなされたものであり、照明変動や前景の変形が発生し得る環境において撮影された画像に、テクスチャの少ない領域が存在している場合であっても、前景領域を適切に抽出できる動的な背景モデルを構築できることを目的とする。 Therefore, the present invention has been made in view of the above-described problems, and even when an image taken in an environment in which illumination fluctuation or foreground deformation can occur, there is a region with less texture. An object is to construct a dynamic background model that can appropriately extract the foreground region.
本発明は、上記の課題を解決するために、以下の事項を提案している。
(1) 本発明は、動的な背景モデルを構築する背景モデル構築装置(例えば、図1の背景モデル構築装置1に相当)であって、画素値に基づいて、前景領域を含まない空舞台の画像を複数の領域に分割する領域分割手段(例えば、図1の領域分割部14に相当)と、前景領域を含み得る画像を前記複数の領域に分割して得られる各領域の画素情報に基づいて、背景モデルを更新する背景モデル更新手段(例えば、図1の背景モデル更新部16に相当)と、を備えることを特徴とする背景モデル構築装置を提案している。
The present invention proposes the following matters in order to solve the above problems.
(1) The present invention is a background model construction apparatus (for example, equivalent to the background
ここで、動的な背景モデルを構築する対象となる画像のことを、対象画像と呼ぶこととする。すると、前景領域を含まない空舞台の画像とは、前景が映っていない対象画像のことであり、前景領域を含み得る画像とは、対象画像のことである。 Here, an image that is a target for constructing a dynamic background model is referred to as a target image. Then, the sky stage image that does not include the foreground region is a target image that does not show the foreground, and the image that can include the foreground region is the target image.
そこで、この発明によれば、画素値に基づいて、前景が映っていない対象画像を複数の領域に分割し、対象画像をこれら複数の領域に分割して得られる各領域の画素情報に基づいて、背景モデルを更新することとした。このため、互いに隣接しており画素値が類似する画素同士が同一の領域に含まれるように対象画像を分割し、分割した各領域内の各画素の画素情報を参照することで、各画素について前景であるか否かを判断することができる。したがって、前景が静止に近い状態であっても、この前景領域の画素値を背景モデルの更新に用いないようにすることができる。したがって、前景領域が背景領域に溶け込んでいってしまうのを抑制可能である動的な背景モデルを構築できる。 Therefore, according to the present invention, based on pixel values, the target image in which the foreground is not reflected is divided into a plurality of regions, and the target image is divided into the plurality of regions, based on the pixel information of each region. The background model was updated. Therefore, by dividing the target image so that pixels that are adjacent to each other and have similar pixel values are included in the same region, and refer to the pixel information of each pixel in each divided region, It can be determined whether or not it is a foreground. Therefore, even if the foreground is almost stationary, the pixel values in the foreground area can be prevented from being used for updating the background model. Therefore, it is possible to construct a dynamic background model that can suppress the foreground region from being mixed into the background region.
(2) 本発明は、(1)の背景モデル構築装置について、前記領域分割手段は、互いに隣接しており画素値が類似する画素同士が同一の領域に含まれるように、前記空舞台の画像を前記複数の領域に分割することを特徴とする背景モデル構築装置を提案している。 (2) In the background model construction apparatus according to (1), the area dividing unit includes the image of the empty stage so that pixels adjacent to each other and having similar pixel values are included in the same area. Is divided into the plurality of regions, and a background model construction device is proposed.
ここで、空舞台の画像について、画素値に基づいて複数の領域に分割して、互いに隣接しており画素値が類似する画素同士が同一の領域に含まれるように分割したものとする。すると、空舞台の画像において同一の領域に含まれていた画素同士の画素値は、照明変動が発生し得る状況における対象画像においても、前景領域でなければ類似しているものと想定できる。 Here, it is assumed that the sky stage image is divided into a plurality of regions based on the pixel values so that pixels adjacent to each other and having similar pixel values are included in the same region. Then, it can be assumed that the pixel values of the pixels included in the same area in the sky stage image are similar to each other in the target image in a situation in which illumination fluctuations may occur unless they are in the foreground area.
そこで、この発明によれば、(1)の背景モデル構築装置において、互いに隣接しており画素値が類似する画素同士が同一の領域に含まれるように、空舞台の画像を複数の領域に分割することした。このため、同一の領域に含まれる対象画像の各画素の画素値が類似しているか否かを判断することによって、画素が前景であるか否かを判断することができる。 Therefore, according to the present invention, in the background model construction device of (1), an empty stage image is divided into a plurality of regions so that pixels that are adjacent to each other and have similar pixel values are included in the same region. I did it. Therefore, it is possible to determine whether or not the pixel is the foreground by determining whether or not the pixel values of the pixels of the target image included in the same region are similar.
(3) 本発明は、(1)または(2)の背景モデル構築装置について、前記背景モデル更新手段は、処理する対象画素を含む領域の画素値の中央値と、当該対象画素の画素値と、の差分に基づいて、当該対象画素が前景であるか否かを判断し、背景モデルを更新することを特徴とする背景モデル構築装置を提案している。 (3) In the background model construction device according to (1) or (2), the background model update unit includes: a median value of pixel values of a region including a target pixel to be processed; a pixel value of the target pixel; Based on the difference between the two, a background model construction apparatus is proposed in which it is determined whether or not the target pixel is a foreground, and the background model is updated.
ここで、上述のように、空舞台の画像について、互いに隣接しており画素値が類似する画素同士が同一の領域に含まれるように分割したものとすると、空舞台の画像において同一の領域に含まれていた画素同士の画素値は、照明変動が発生し得る状況における対象画像においても、前景領域でなければ類似しているものと想定できる。このため、対象画像における対象画素を含む領域の画素値の中央値を、前景領域に隠蔽された背景領域の画素値とみなすことが可能である。 Here, as described above, if the sky stage image is divided so that pixels that are adjacent to each other and have similar pixel values are included in the same area, the sky stage image is divided into the same area. It can be assumed that the pixel values of the included pixels are similar to each other in the target image in a situation where illumination fluctuations may occur unless the foreground region. For this reason, it is possible to regard the median value of the pixel values of the region including the target pixel in the target image as the pixel value of the background region hidden in the foreground region.
そこで、この発明によれば、(1)または(2)の背景モデル構築装置において、対象画素を含む領域の画素値の中央値と、対象画素の画素値と、の差分に基づいて、対象画素が前景であるか否かを判断し、背景モデルを更新することとした。このため、上述の差分が大きい場合には、対象画素が前景であると判断し、上述の差分が小さい場合には、対象画素が背景であると判断することで、前景領域を的確に求めることができ、動的な背景モデルを的確に構築できる。 Therefore, according to the present invention, in the background model construction device of (1) or (2), the target pixel is based on the difference between the median pixel value of the region including the target pixel and the pixel value of the target pixel. It is determined whether or not is a foreground, and the background model is updated. For this reason, when the above-described difference is large, it is determined that the target pixel is the foreground, and when the above-described difference is small, it is determined that the target pixel is the background, thereby accurately obtaining the foreground region. Can build a dynamic background model accurately.
(4) 本発明は、(3)の背景モデル構築装置について、前記背景モデル更新手段は、前記差分に基づいて対象画素が前景であると判断した場合には、当該対象画素を含む領域の画素値の中央値を用いて背景モデルを更新し、前記差分に基づいて対象画素が前景ではないと判断した場合には、当該対象画素の現在の画素値を用いて背景モデルを更新することを特徴とする背景モデル構築装置を提案している。 (4) In the background model construction device according to (3), when the background model update unit determines that the target pixel is a foreground based on the difference, a pixel in a region including the target pixel A background model is updated using a median value, and when it is determined that the target pixel is not a foreground based on the difference, the background model is updated using the current pixel value of the target pixel. A background model construction device is proposed.
この発明によれば、(3)の背景モデル構築装置において、上述の差分に基づいて対象画素が前景であると判断した場合には、対象画素を含む領域の画素値の中央値を用いて背景モデルを更新することとした。このため、対象画像における対象画素を含む領域の画素値の中央値を、前景領域に隠蔽された背景領域の画素値として用いて、背景モデルを更新することができる。したがって、背景モデルの更新に対する前景の画素値の影響を抑えることができるので、動的な背景モデルを的確に構築できる。 According to the present invention, in the background model construction device of (3), when it is determined that the target pixel is the foreground based on the above-described difference, the background value is determined using the median value of the pixel values of the region including the target pixel It was decided to update the model. Therefore, the background model can be updated by using the median pixel value of the area including the target pixel in the target image as the pixel value of the background area hidden in the foreground area. Therefore, since the influence of the foreground pixel value on the background model update can be suppressed, a dynamic background model can be accurately constructed.
また、この発明によれば、(3)の背景モデル構築装置において、上述の差分に基づいて対象画素が前景ではないと判断した場合には、対象画素の現在の画素値を用いて背景モデルを更新することとした。このため、背景領域については、画素値をそのまま用いて背景モデルを更新することができるので、動的な背景モデルを的確に構築できる。 According to the present invention, in the background model construction device of (3), when it is determined that the target pixel is not the foreground based on the above-described difference, the background model is determined using the current pixel value of the target pixel. I decided to update it. For this reason, the background model can be updated using the pixel value as it is for the background region, so that a dynamic background model can be accurately constructed.
(5) 本発明は、(1)から(4)のいずれかの背景モデル構築装置について、ステレオ画像の視差情報を求めるステレオ対応点探索手段(例えば、図5のステレオ対応点探索部21に相当)を備え、前記背景モデル更新手段は、前記領域分割手段により分割された各領域の画素情報と、前記ステレオ対応点探索手段により求められた視差情報と、に基づいて、背景モデルを更新することを特徴とする背景モデル構築装置を提案している。
(5) The present invention relates to a stereo corresponding point search means (for example, equivalent to the stereo corresponding
この発明によれば、(1)から(4)のいずれかの背景モデル構築装置において、背景モデルの更新を、画像を分割した各領域の画素情報と、ステレオ画像の視差情報と、に基づいて行うこととした。このため、テクスチャが複雑な領域については、ステレオ画像の視差情報に基づいて背景モデルを更新することで、照明変動や前景の変形などが発生した場合であっても、動的な背景モデルを的確に構築できる。一方、テクスチャが少ない領域については、画像を分割した各領域の画素情報に基づいて背景モデルを更新することで、テクスチャが少ない領域が存在している場合であっても、動的な背景モデルを的確に構築できる。 According to this invention, in the background model construction device according to any one of (1) to (4), the background model is updated based on the pixel information of each region obtained by dividing the image and the parallax information of the stereo image. I decided to do it. For this reason, for backgrounds with complex textures, the background model is updated based on the parallax information of the stereo image, so that the dynamic background model can be accurately identified even when illumination fluctuations or foreground deformation occur. Can be built. On the other hand, for areas with less texture, the background model is updated based on the pixel information of each area obtained by dividing the image, so that even if there are areas with less texture, Can be constructed accurately.
(6) 本発明は、(5)の背景モデル構築装置について、前記ステレオ対応点探索手段により求められた視差情報から奥行情報を求める奥行情報算出手段(例えば、図5の奥行情報算出部22に相当)と、前記奥行情報算出手段により求められた奥行情報の信頼度を求める奥行信頼値マップ生成手段(例えば、図5の奥行信頼値マップ生成部23に相当)を備え、前記背景モデル更新手段は、前記奥行信頼値マップ生成手段により求められた奥行情報の信頼度に基づいて、前記領域分割手段により分割された各領域の画素情報に基づいて背景モデルを生成するのか、前記ステレオ対応点探索手段により求められた視差情報に基づいて背景モデルを生成するのかを、画素ごとに決定することを特徴とする背景モデル構築装置を提案している。
(6) The present invention relates to the background model construction device of (5), depth information calculation means for obtaining depth information from the parallax information obtained by the stereo corresponding point search means (for example, in the depth
ここで、一般的に、視差情報から奥行情報を求めることができ、テクスチャが複雑な領域では、奥行情報の信頼度が高くなり、テクスチャが少ない領域では、奥行情報の信頼度が低くなる。 Here, in general, depth information can be obtained from disparity information, and the reliability of depth information is high in an area where the texture is complex, and the reliability of depth information is low in an area where the texture is small.
そこで、この発明によれば、(5)の背景モデル構築装置において、視差情報から求めた奥行情報の信頼度に基づいて、背景モデルの更新を、画像を分割した各領域の画素情報に基づいて行うのか、ステレオ画像の視差情報に基づいて行うのかを、画素ごとに決定することとした。このため、奥行情報の信頼度に基づいて、テクスチャが複雑な領域であるのか、テクスチャが少ない領域であるのかを判断することができる。したがって、テクスチャに応じて適した方法で、背景モデルを更新することができる。 Therefore, according to the present invention, in the background model construction device of (5), based on the reliability of the depth information obtained from the disparity information, the background model is updated based on the pixel information of each region into which the image is divided. Whether to perform the determination based on the parallax information of the stereo image is determined for each pixel. For this reason, based on the reliability of the depth information, it can be determined whether the texture is a complex region or a region with few textures. Therefore, the background model can be updated by a method suitable for the texture.
(7) 本発明は、(6)の背景モデル構築装置について、前記背景モデル更新手段は、前景を含まないステレオ画像から前記奥行情報算出手段により求められた対象画素の初期奥行情報と、当該対象画素の現在の奥行情報と、の差異に基づいて、当該対象画素が前景であるか否かを判断し、背景モデルを更新することを特徴とする背景モデル構築装置を提案している。 (7) In the background model construction apparatus according to (6), the background model update unit includes initial depth information of the target pixel obtained by the depth information calculation unit from a stereo image that does not include a foreground, and the target Based on the difference from the current depth information of the pixel, a background model construction device is proposed in which it is determined whether or not the target pixel is the foreground, and the background model is updated.
ここで、前景領域の画素の奥行情報と、空舞台を撮影した映像におけるこの画素の奥行情報とは、大きく異なることになる。 Here, the depth information of the pixel in the foreground region and the depth information of this pixel in the video shot of the sky stage are greatly different.
そこで、この発明によれば、(6)の背景モデル構築装置において、対象画素の初期奥行情報と現在の奥行情報との差異に基づいて、対象画素が前景であるか否かを判断し、背景モデルを更新することとした。このため、上述の差異が大きい場合には、対象画素が前景であると判断し、上述の差異が小さい場合には、対象画素が背景であると判断することで、前景領域を的確に求めることができ、動的な背景モデルをより的確に構築できる。 Therefore, according to the present invention, in the background model construction device of (6), it is determined whether or not the target pixel is the foreground based on the difference between the initial depth information of the target pixel and the current depth information. It was decided to update the model. For this reason, when the above-described difference is large, it is determined that the target pixel is the foreground, and when the above-described difference is small, it is determined that the target pixel is the background, thereby accurately obtaining the foreground region. Can build a dynamic background model more accurately.
(8) 本発明は、(7)の背景モデル構築装置について、前記背景モデル更新手段は、処理する対象画素を含む領域の画素値の中央値と、当該対象画素の画素値と、の差分に基づいて、当該対象画素が前景であるか否かを判断し、前記奥行信頼値マップ生成手段により求められた奥行情報の信頼度が予め定められた閾値より大きく、かつ、前記差異に基づいて対象画素が前景であると判断した場合には、直前のフレームで背景モデルの更新に用いた値を用いて背景モデルを更新し、前記奥行信頼値マップ生成手段により求められた奥行情報の信頼度が予め定められた閾値以下で、かつ、前記差分に基づいて対象画素が前景であると判断した場合には、当該対象画素を含む領域の画素値の中央値を用いて背景モデルを更新し、前記差分または前記差異に基づいて対象画素が前景ではないと判断した場合には、当該対象画素の現在の画素値を用いて背景モデルを更新することを特徴とする背景モデル構築装置を提案している。 (8) In the background model construction device according to (7), the background model update unit calculates a difference between a median pixel value of a region including a target pixel to be processed and a pixel value of the target pixel. And determining whether the target pixel is a foreground, the reliability of the depth information obtained by the depth confidence value map generating means is greater than a predetermined threshold, and the target based on the difference When it is determined that the pixel is the foreground, the background model is updated using the value used for the background model update in the immediately preceding frame, and the reliability of the depth information obtained by the depth confidence value map generation unit is If it is determined that the target pixel is a foreground based on the difference, the background model is updated using the median value of the pixel value of the region including the target pixel, Difference or When the target pixel on the basis of the serial difference is determined not to be a foreground proposes a background model building apparatus characterized by updating the background model using the current pixel value of the target pixel.
この発明によれば、(7)の背景モデル構築装置において、奥行情報の信頼度が高く、かつ、上述の差異に基づいて対象画素が前景であると判断した場合には、直前のフレームで背景モデルの更新に用いた値を用いて背景モデルを更新することとした。このため、テクスチャが複雑な前景領域については、動的な背景モデルの更新に対する影響を大幅に抑えることができ、動的な背景モデルをより的確に構築できる。 According to the present invention, in the background model construction device of (7), when the reliability of the depth information is high and it is determined that the target pixel is the foreground based on the above-described difference, the background is displayed in the immediately preceding frame. The background model was updated using the values used for updating the model. For this reason, foreground regions with complex textures, the influence on the update of the dynamic background model can be greatly suppressed, and the dynamic background model can be constructed more accurately.
また、この発明によれば、(7)の背景モデル構築装置において、奥行情報の信頼度が高く、かつ、上述の差分に基づいて対象画素が前景であると判断した場合には、対象画素を含む領域の画素値の中央値を用いて背景モデルを更新することとした。このため、対象画像における対象画素を含む領域の画素値の中央値を、前景領域に隠蔽された背景領域の画素値として用いて、背景モデルを更新することができる。したがって、背景モデルの更新に対する前景の画素値の影響を抑えることができるので、動的な背景モデルを的確に構築できる。 Further, according to the present invention, in the background model construction device of (7), when the reliability of the depth information is high and it is determined that the target pixel is the foreground based on the above difference, the target pixel is determined. The background model is updated using the median of the pixel values of the included region. Therefore, the background model can be updated by using the median pixel value of the area including the target pixel in the target image as the pixel value of the background area hidden in the foreground area. Therefore, since the influence of the foreground pixel value on the background model update can be suppressed, a dynamic background model can be accurately constructed.
また、この発明によれば、(7)の背景モデル構築装置において、上述の差分または差異に基づいて対象画素が前景ではないと判断した場合には、対象画素の現在の画素値を用いて背景モデルを更新することとした。このため、背景領域については、画素値をそのまま用いて背景モデルを更新することができるので、動的な背景モデルを的確に構築できる。 Also, according to the present invention, in the background model construction device of (7), when it is determined that the target pixel is not a foreground based on the above-described difference or difference, the background is generated using the current pixel value of the target pixel. It was decided to update the model. For this reason, the background model can be updated using the pixel value as it is for the background region, so that a dynamic background model can be accurately constructed.
(9) 本発明は、領域分割手段(例えば、図1の領域分割部14に相当)および背景モデル更新手段(例えば、図1の背景モデル更新部16に相当)を備え、動的な背景モデルを構築する背景モデル構築装置(例えば、図1の背景モデル構築装置1に相当)における背景モデル構築方法であって、前記領域分割手段が、画素値に基づいて、画像を複数の領域に分割する第1のステップ(例えば、図3のステップS13の処理に相当)と、前記背景モデル更新手段が、前記領域分割手段により分割された各領域の画素情報に基づいて、背景モデルを更新する第2のステップ(例えば、図4のステップS24、S25の処理に相当)と、を備えることを特徴とする背景モデル構築方法を提案している。
(9) The present invention includes an area dividing means (for example, equivalent to the
この発明によれば、画素値に基づいて画像を複数の領域に分割し、分割した各領域の画素情報に基づいて背景モデルを更新することとした。このため、上述した効果と同様の効果を奏することができる。 According to the present invention, the image is divided into a plurality of areas based on the pixel values, and the background model is updated based on the pixel information of each divided area. For this reason, the effect similar to the effect mentioned above can be produced.
(10) 本発明は、領域分割手段(例えば、図1の領域分割部14に相当)および背景モデル更新手段(例えば、図1の背景モデル更新部16に相当)を備え、動的な背景モデルを構築する背景モデル構築装置(例えば、図1の背景モデル構築装置1に相当)における背景モデル構築方法を、コンピュータに実行させるためのプログラムであって、前記領域分割手段が、画素値に基づいて、画像を複数の領域に分割する第1のステップ(例えば、図3のステップS13の処理に相当)と、前記背景モデル更新手段が、前記領域分割手段により分割された各領域の画素情報に基づいて、背景モデルを更新する第2のステップ(例えば、図4のステップS24、S25の処理に相当)と、をコンピュータに実行させるためのプログラムを提案している。
(10) The present invention includes a region dividing unit (for example, equivalent to the
この発明によれば、コンピュータを用いてプログラムを実行することで、画素値に基づいて画像を複数の領域に分割し、分割した各領域の画素情報に基づいて背景モデルを更新することとした。このため、上述した効果と同様の効果を奏することができる。 According to the present invention, by executing a program using a computer, an image is divided into a plurality of regions based on pixel values, and the background model is updated based on pixel information of each divided region. For this reason, the effect similar to the effect mentioned above can be produced.
本発明によれば、照明変動や前景の変形が発生し得る環境において撮影された画像に、テクスチャの少ない領域が存在している場合であっても、前景領域を適切に抽出できる動的な背景モデルを構築できる。 According to the present invention, a dynamic background that can appropriately extract a foreground area even in a case where an area photographed in an environment in which illumination fluctuations or foreground deformation can occur, includes an area with less texture. You can build a model.
以下、本発明の実施の形態について図面を参照しながら説明する。なお、以下の実施形態における構成要素は適宜、既存の構成要素などとの置き換えが可能であり、また、他の既存の構成要素との組み合せを含む様々なバリエーションが可能である。したがって、以下の実施形態の記載をもって、特許請求の範囲に記載された発明の内容を限定するものではない。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. Note that the constituent elements in the following embodiments can be appropriately replaced with existing constituent elements, and various variations including combinations with other existing constituent elements are possible. Accordingly, the description of the following embodiments does not limit the contents of the invention described in the claims.
<第1実施形態>
[背景モデル構築装置1の構成および動作]
図1は、本発明の第1実施形態に係る背景モデル構築装置1のブロック図である。背景モデル構築装置1は、制御部11、初期背景モデル生成部12、フレーム平滑化部13、領域分割部14、前景候補領域抽出部15、および背景モデル更新部16を備える。
<First Embodiment>
[Configuration and operation of background model construction apparatus 1]
FIG. 1 is a block diagram of a background
制御部11は、1台のカメラで撮影された映像や画像の入力を受け付けたり、種々の処理(例えば、後述のステップS5の処理など)を行ったりする。制御部11が入力を受け付ける映像としては、前景を含まないシーン(空舞台)の映像がある。空舞台の映像は、動的な背景モデルを構築する対象となる映像であって前景が映っていないもののことであり、例えば、動的な背景モデルの構築を開始する際に、制御部11に入力される。また、制御部11が入力を受け付ける画像としては、現在のフレームの画像がある。現在のフレームの画像は、前景を含み得るシーンの画像、言い換えると動的な背景モデルを構築する対象となる映像を構成する各画像のことであり、例えば、背景モデルを更新する期間においてフレームが更新されるたびに、制御部11に入力される。 The control unit 11 receives input of images and images taken by one camera, and performs various processes (for example, a process in step S5 described later). As an image for which the control unit 11 receives an input, there is an image of a scene (sky stage) that does not include a foreground. An empty stage video is a video for which a dynamic background model is to be constructed and does not show a foreground. For example, when the construction of a dynamic background model is started, the control unit 11 Entered. An image for which the control unit 11 receives an input is an image of the current frame. An image of a current frame is an image of a scene that can include a foreground, in other words, each image that constitutes a video for which a dynamic background model is to be constructed. Each time it is updated, it is input to the control unit 11.
初期背景モデル生成部12は、画素値に基づく初期背景モデルの生成を行う。具体的には、制御部11により入力が受け付けられた空舞台の映像を用いて、非特許文献3に示されている技術により、以下のようにして画素ごとに初期背景モデルの構築を行う。
The initial background model generation unit 12 generates an initial background model based on pixel values. Specifically, an initial background model is constructed for each pixel as follows using the technique shown in
ここで、上述の空舞台の映像を構成する複数のカメラ画像のうちの1つのカメラ画像I(x、y)に着目し、時刻tにおける画素{x、y}の画素値をXtと表すこととする。すると、時刻tまでに得られた画素値{X1、X2、・・・Xt}は、K個のガウス分布を用いてモデル化することができ、現在の画素Xtが持つ確率は、以下の数式(1)で表すことができる。 Here, paying attention to one camera image I (x, y) of the plurality of camera images constituting the above-described sky stage image, the pixel value of the pixel {x, y} at time t is expressed as X t. I will do it. Then, the pixel values {X 1 , X 2 ,... X t } obtained up to time t can be modeled using K Gaussian distributions, and the probability of the current pixel X t is Can be expressed by the following mathematical formula (1).
数式(1)において、wk,tは、時刻tにおけるk番目のガウス分布が持つ重みを示し、μk、tは、時刻tにおけるk番目のガウス分布の平均値を示し、Σk、tは、時刻tにおけるk番目のガウス分布の分散共分散行列を示す。また、Kは、ガウス分布の数を示し、利用可能なメモリ領域に応じて予め設定され、通常3〜5程度が適当である。また、ηは、以下の数式(2)で表されるガウス分布の密度関数である。 In Equation (1), w k, t represents the weight of the kth Gaussian distribution at time t, μ k, t represents the average value of the kth Gaussian distribution at time t, and Σ k, t Represents a variance-covariance matrix of the kth Gaussian distribution at time t. K indicates the number of Gaussian distributions, which is set in advance according to the available memory area, and is generally about 3 to 5. Moreover, η is a density function of Gaussian distribution expressed by the following formula (2).
すると、初期背景モデル生成部12は、まず、時刻t+1において新たに観測された画素値Xt+1がマッチする分布をK個の分布の中から探す。具体的には、画素値Xt+1が分布の平均値から標準偏差2.5以内であれば、その分布にマッチしているものとする。
Then, the initial background model generation unit 12 first searches the K distributions for a distribution that matches the newly observed pixel value X t + 1 at
次に、マッチする分布を見つけた場合には、K個のガウス分布の重みと、マッチする分布の平均値および分散値と、を更新する。一方、マッチする分布を見つけることができなかった場合には、分散が大きく重みが小さい分布を削除して、新たに現在の画素値を平均値とし、削除した分散値および重みを用いて分布を作成する。 Next, when a matching distribution is found, the weights of the K Gaussian distributions and the average value and the variance value of the matching distribution are updated. On the other hand, if a matching distribution cannot be found, the distribution having a large variance and a small weight is deleted, the current pixel value is newly set as an average value, and the distribution is calculated using the deleted variance value and weight. create.
次に、以下の数式(3)を満たすB個の分布を、新たな背景モデルとする。数式(3)において、Tは、予め定められた閾値を示す。この数式(3)は、ガウス分布の重みを照合度の高い順に足し合わせていき、その重みの合計が閾値Tを初めて越えるときの分布までを、背景モデルとして利用することを、意味している。 Next, B distributions satisfying the following mathematical formula (3) are set as new background models. In Equation (3), T represents a predetermined threshold value. This mathematical formula (3) means that the weights of the Gaussian distribution are added in the descending order of matching, and the distribution when the sum of the weights exceeds the threshold T for the first time is used as the background model. .
フレーム平滑化部13は、制御部11により入力が受け付けられた空舞台の映像から、この映像の全ての画素値を平均した平滑化画像を生成する。
The
領域分割部14は、フレーム平滑化部13により生成された平滑化画像に対して領域分割処理を行う。この領域分割処理によれば、互いに隣接しており画素値が類似する画素同士は、同一の分割領域に分類され、平滑化画像が複数の分割領域に分割されることになる。なお、領域分割処理には、例えば、非特許文献4に示されているOpenCVにて画像ピラミッドを利用する手法(PyrSegmentation())や、Mean-Shift法による手法(PyrMeanShiftFiltering())のプログラムを用いることができる。
The
前景候補領域抽出部15は、制御部11により入力が受け付けられた現在のフレームの画像から、前景候補領域を抽出する。具体的には、非特許文献3に示されている技術により、画素値Xtがマッチする分布を探すことにより、制御部11により入力が受け付けられた現在のフレームの画像から前景候補領域を抽出する。画素値Xtがマッチするか否かは、例えば、現在の画素値が分布の平均値から標準偏差2.5以内であれば、その分布にマッチしているものとし、その分布が背景モデルである場合にはその画素を背景とし、その分布が背景モデルではない場合にはその画素を前景候補とする。
The foreground candidate
背景モデル更新部16は、現在のフレームの画像に基づいて背景モデルを更新する。具体的には、画素ごとに、真に前景であるか否かを判断する。そして、真に前景であると判断した画素については、その画素の現在の画素値を破棄し、その画素を含む分割領域の中央値を用いて、背景モデルを更新する。一方、背景であると判断された画素については、その画素の現在の画素値を用いて、背景モデルを更新する。
The background
以上の構成を備える背景モデル構築装置1は、図2を用いて後述する背景モデル構築処理を行って、画素ごとに、初期の背景モデルである初期背景モデルの生成と、背景モデルの更新と、を行う。
The background
図2は、背景モデル構築装置1が行う背景モデル構築処理のフローチャートである。
FIG. 2 is a flowchart of background model construction processing performed by the background
ステップS1において、背景モデル構築装置1は、制御部11により、空舞台の映像の入力を受け付ける。そして、空舞台の映像が入力されると、ステップS2に処理を移す。
In step S <b> 1, the background
ステップS2において、背景モデル構築装置1は、初期背景モデル生成処理を行って初期背景モデルを生成し、ステップS3に処理を移す。背景モデル構築装置1が行う初期背景モデル生成処理の詳細については、図3を用いて後述する。
In step S2, the background
ステップS3において、背景モデル構築装置1は、制御部11により、現在のフレームの画像の入力を受け付ける。そして、現在のフレームの画像が入力されると、ステップS4に処理を移す。
In step S <b> 3, the background
ステップS4において、背景モデル構築装置1は、背景モデル更新処理を行って、現在のフレームの画像に基づいて背景モデルの更新を行い、ステップS5に処理を移す。背景モデル構築装置1が行う背景モデル更新処理の詳細については、図4を用いて後述する。
In step S4, the background
ステップS5において、背景モデル構築装置1は、制御部11により、最終フレームまで背景モデルの更新を行ったか否かを判別する。そして、行ったと判別した場合には、図2に示した背景モデル構築処理を終了し、行っていないと判別した場合には、ステップS6に処理を移す。
In step S5, the background
ステップS6において、背景モデル構築装置1は、制御部11により、ステップS3〜S5の各処理を行うフレームである処理対象フレームを更新し、ステップS3に処理を戻す。
In step S6, the background
図3は、背景モデル構築装置1が行う初期背景モデル生成処理のフローチャートである。
FIG. 3 is a flowchart of the initial background model generation process performed by the background
ステップS11において、背景モデル構築装置1は、初期背景モデル生成部12により、ステップS1において入力を受け付けた空舞台の映像を用いて、画素値に基づく初期背景モデルの生成を行って、ステップS12に処理を移す。
In step S11, the background
ステップS12において、背景モデル構築装置1は、フレーム平滑化部13により、ステップS1において入力を受け付けた空舞台の映像から、この映像の全ての画素値を平均した平滑化画像を生成し、ステップS13に処理を移す。
In step S12, the background
ステップS13において、背景モデル構築装置1は、領域分割部14により、ステップS12において生成した平滑化画像に対して領域分割処理を行って、図3に示した初期背景モデル生成処理を終了する。
In step S13, the background
図4は、背景モデル構築装置1が行う背景モデル更新処理のフローチャートである。
FIG. 4 is a flowchart of the background model update process performed by the background
ステップS21において、背景モデル構築装置1は、前景候補領域抽出部15により、ステップS3において入力を受け付けた現在のフレームの画像から前景候補領域を抽出し、ステップS22に処理を移す。
In step S21, the background
ステップS22において、背景モデル構築装置1は、背景モデル更新部16により、ステップS21において前景候補領域を抽出した結果に基づいて、画素ごとに、前景候補であるか否かを判別する。そして、前景候補であると判別した場合には、ステップS23に処理を移し、前景候補ではないと判別した場合には、ステップS25に処理を移す。
In step S22, the background
ステップS23において、背景モデル構築装置1は、背景モデル更新部16により、現在のフレームの画像をステップS13における複数の分割領域に分割して得られる各領域の画素情報に基づいて、ステップS22において前景候補であると判別した画素ごとに、真に前景であるか否かを判断する。具体的には、まず、現在のフレームの画像を、ステップS13において分割した複数の分割領域に分割する。次に、ステップS22において前景候補であると判別した画素ごとに、現在のフレーム画像の各分割領域のうちその画素(以降、対象画素と呼ぶ)が含まれる分割領域の画素値の中央値と、対象画素の画素値と、の差分を求める。次に、求めた差分が予め定められた閾値より大きい場合には、対象画素が真に前景であると判断し、ステップS24に処理を移す。一方、求めた差分が予め定められた閾値以下である場合には、対象画素が背景であると判断し、ステップS25に処理を移す。
In step S23, the background
ステップS24において、背景モデル構築装置1は、背景モデル更新部16により、対象画素の現在の画素値を破棄し、対象画素を含む分割領域の画素値の中央値を用いて、背景モデルを更新し、図4に示した背景モデル更新処理を終了する。
In step S24, the background
ステップS25において、背景モデル構築装置1は、背景モデル更新部16により、対象画素の現在の画素値を用いて、背景モデルを更新し、図4に示した背景モデル更新処理を終了する。
In step S25, the background
以上の背景モデル構築装置1によれば、以下の効果を奏することができる。
According to the background
背景モデル構築装置1は、空舞台の画像について、画素値に基づいて複数の領域に分割して、互いに隣接しており画素値が類似する画素同士が同一の領域に含まれるように分割する。このため、空舞台の画像において同一の領域に含まれていた画素同士の画素値は、照明変動が発生し得る状況における現在のフレームの画像においても、前景領域でなければ類似しているものと想定できる。このため、現在のフレームの画像における対象画素を含む領域の画素値の中央値を、前景領域に隠蔽された背景領域の画素値とみなすことが可能である。
The background
そこで、背景モデル構築装置1は、対象画素を含む分割領域の画素値の中央値と、対象画素の画素値と、の差分に基づいて、対象画素が前景であるか否かを判断する。このため、前景領域を的確に求めることができ、動的な背景モデルを的確に構築できる。
Therefore, the background
また、背景モデル構築装置1は、前景であると判断した画素については、この画素を含む分割領域の画素値の中央値を用いて背景モデルを更新する。このため、現在のフレームの画像における対象画素を含む領域の画素値の中央値を、前景領域に隠蔽された背景領域の画素値として用いて、背景モデルを更新することができる。したがって、背景モデルの更新に対する前景の画素値の影響を抑えることができるので、前景領域が背景領域に溶け込んでいってしまうのを抑制可能である動的な背景モデルを構築できる。
Further, the background
また、背景モデル構築装置1は、背景であると判断した画素については、この画素の現在の画素値を用いて背景モデルを更新する。このため、背景領域については、画素値をそのまま用いて背景モデルを更新することができるので、動的な背景モデルを的確に構築できる。
Also, the background
<第2実施形態>
[背景モデル構築装置1Aの構成および動作]
図1は、本発明の第2実施形態に係る背景モデル構築装置1Aのブロック図である。背景モデル構築装置1Aは、図1に示した本発明の第1実施形態に係る背景モデル構築装置1とは、制御部11の代わりに制御部11Aを備える点と、初期背景モデル生成部12の代わりに初期背景モデル生成部12Aを備える点と、フレーム平滑化部13の代わりにフレーム平滑化部13Aを備える点と、背景モデル更新部16の代わりに背景モデル更新部16Aを備える点と、ステレオ対応点探索部21、奥行情報算出部22、および奥行信頼値マップ生成部23を備える点と、が異なる。なお、背景モデル構築装置1Aにおいて、背景モデル構築装置1と同一構成要件については、同一符号を付し、その説明を省略する。
Second Embodiment
[Configuration and Operation of Background
FIG. 1 is a block diagram of a background
制御部11Aは、2台のカメラのそれぞれで撮影された映像や画像の入力を受け付けたり、種々の処理(例えば、後述のステップS55の処理など)を行ったりする。制御部11Aが入力を受け付ける映像としては、2台のカメラのうち左側に配置されたもので撮影された空舞台の映像(以降、空舞台のL映像と呼ぶ)と、2台のカメラのうち右側に配置されたもので撮影された空舞台の映像(以降、空舞台のR映像と呼ぶ)と、がある。空舞台のL映像およびR映像は、例えば、動的な背景モデルの構築を開始する際に、制御部11Aに入力される。また、制御部11Aが入力を受け付ける画像としては、2台のカメラのうち左側に配置されたもので撮影された現在のフレームの画像(以降、現在のフレームのL画像と呼ぶ)と、2台のカメラのうち右側に配置されたもので撮影された現在のフレームの画像(以降、現在のフレームのR画像と呼ぶ)と、がある。現在のフレームのL画像およびR画像は、前景を含み得るシーンの画像であり、例えば、背景モデルを更新する期間においてフレームが更新されるたびに、制御部11Aに入力される。 The control unit 11A accepts input of images and images taken by each of the two cameras, and performs various processes (for example, a process in step S55 described later). The control unit 11A accepts input as an image of an empty stage (hereinafter referred to as an L image of the empty stage) taken with the left camera out of the two cameras and an image of the two cameras. There is an image of an empty stage (hereinafter referred to as an R image of the empty stage) taken with the one arranged on the right side. The empty stage L video and R video are input to the control unit 11A when, for example, construction of a dynamic background model is started. The control unit 11A accepts an input as an image of the current frame (hereinafter referred to as an L image of the current frame) captured by the left camera of the two cameras, and two images. There is an image of the current frame (hereinafter referred to as an R image of the current frame) captured by the camera arranged on the right side of the camera. The L image and R image of the current frame are images of a scene that can include the foreground, and are input to the control unit 11A each time the frame is updated in a period in which the background model is updated, for example.
初期背景モデル生成部12Aは、初期背景モデル生成部12と同様に、画素値に基づく初期背景モデルの生成を行う。ただし、初期背景モデル生成部12が、1台のカメラで撮影された空舞台の映像を用いて初期背景モデルを生成するのに対して、初期背景モデル生成部12Aは、2台のカメラで撮影された空舞台の映像(空舞台のL映像およびR映像)を用いて初期背景モデルを生成する。
Similar to the initial background model generation unit 12, the initial background
フレーム平滑化部13Aは、フレーム平滑化部13と同様に、平滑化画像を生成する。ただし、フレーム平滑化部13が、1台のカメラで撮影された空舞台の映像から平滑化画像を生成するのに対して、フレーム平滑化部13Aは、2台のカメラで撮影された空舞台の映像(空舞台のL映像およびR映像)のそれぞれから平滑化画像を生成する。このため、フレーム平滑化部13Aでは、2種類の平滑化画像が生成されることになる。
Similar to the
ステレオ対応点探索部21は、ステレオ対応関係の探索を行う。ステレオ対応関係の探索には、空舞台のL映像の平滑化画像の各画素と、空舞台のR映像の平滑化画像の各画素と、に対して行う場合(図6参照)と、現在のフレームのL画像の各画素と、現在のフレームのR画像の各画素と、に対して行う場合と、がある。ステレオ対応関係の探索では、ステレオ対応点探索部21は、非特許文献5に示されている広域領域での整合性を考慮したブロックマッチング手法を用いる。
The stereo correspondence
なお、ステレオ対応関係の探索では、ステレオ対応点探索部21は、輝度ベースの対応点探索を行う。この際には、非特許文献4に示されているOpenCVのStereoSGBM()を用いることができる。
In the search for the stereo correspondence, the stereo correspondence
また、ステレオ対応関係の探索を行うために、ステレオ対応点探索部21は、予め、チェスボードといった既知の平面物体を利用して、非特許文献6に示されている技術に基づいて、2台のカメラのそれぞれの内部パラメータおよび外部パラメータを取得し、左側のカメラに対応する左側の平行ステレオ画像と、右側のカメラに対応する右側の平行ステレオ画像と、を作成する。具体的には、非特許文献4に示されているオープンソースライブラリOpenCVのstereoRectify()およびremap()を用いることで実現できる。
In addition, in order to search for stereo correspondence, the stereo correspondence
奥行情報算出部22は、ステレオ対応点探索部21により作成された左側の平行ステレオ画像および右側の平行ステレオ画像を用いて、これら左右の平行ステレオ画像の各画素により指し示される各点の奥行情報を求める。
The depth
ここで、左側の平行ステレオ画像をIl(x、y)と表し、右側の平行ステレオ画像をIr(x、y)と表すこととする。すると、左側の平行ステレオ画像Il中の任意の点Il(xl、yl)に対応する点は、右側の平行ステレオ画像Ir中ではIr(xr、yr)上に存在することになる。なお、yl=yrである。そこで、左側の平行ステレオ画像の点Il(xl、y)に対応する右側の平行ステレオ画像の点が、点Ir(xr、y)であるものとすると、これら平行ステレオ画像から、以下の数式(4)に示す奥行情報Zを求めることができる。 Here, the left parallel stereo image is represented as I l (x, y), and the right parallel stereo image is represented as I r (x, y). Then, a point corresponding to an arbitrary point I l (x l , y l ) in the left parallel stereo image I l exists on I r (x r , y r ) in the right parallel stereo image I r. Will do. It should be noted, is a y l = y r. Therefore, assuming that the point of the right parallel stereo image corresponding to the point I l (x l , y) of the left parallel stereo image is the point I r (x r , y), from these parallel stereo images, Depth information Z shown in the following mathematical formula (4) can be obtained.
数式(4)において、cは、基線長を示し、fは、焦点距離を示し、dは、xl−xrで求まる視差を示す。 In Equation (4), c represents the baseline length, f represents the focal length, and d represents the parallax obtained from x 1 −x r .
奥行信頼値マップ生成部23は、ステレオ対応点探索部21によるステレオ対応点探索におけるコスト関数(例えば、非特許文献6に示されている技術により定義される)を用いてブロックマッチングの信頼度を画素ごとに推定して、奥行情報算出部22により求められた奥行情報の信頼度を画素ごとに推定する。ブロックマッチングの信頼度は、上述のコスト関数の最小値と、上述のコスト関数の2番目に小さい値と、の差分により推定することができる。
The depth confidence value
背景モデル更新部16Aは、現在のフレームの画像に基づいて背景モデルを更新する。具体的には、画素ごとに、真に前景であるか否かを判断する。そして、奥行信頼値マップ生成部23により推定された奥行情報の信頼度が高く、前景であると判断した画素については、直前のフレームで背景モデルの更新に用いた値を用いて背景モデルを更新する。一方、奥行信頼値マップ生成部23により推定された奥行情報の信頼度が低く、前景であると判断した画素については、その画素の現在の画素値を破棄し、その画素を含む分割領域の中央値を用いて、背景モデルを更新する。また、他の場合については、その画素の現在の画素値を用いて、背景モデルを更新する。
The background
以上の構成を備える背景モデル構築装置1Aは、図7を用いて後述する背景モデル構築処理を行って、画素ごとに、初期の背景モデルである初期背景モデルの生成と、背景モデルの更新と、を行う。
The background
図7は、背景モデル構築装置1Aが行う背景モデル構築処理のフローチャートである。
FIG. 7 is a flowchart of background model construction processing performed by the background
ステップS51において、背景モデル構築装置1Aは、制御部11Aにより、空舞台のL映像およびR映像の入力を受け付ける。そして、空舞台のL映像およびR映像が入力されると、ステップS52に処理を移す。
In step S51, the background
ステップS52において、背景モデル構築装置1Aは、初期背景モデル生成処理を行って初期背景モデルを生成し、ステップS53に処理を移す。背景モデル構築装置1Aが行う初期背景モデル生成処理の詳細については、図8を用いて後述する。
In step S52, the background
ステップS53において、背景モデル構築装置1Aは、制御部11Aにより、現在のフレームのL画像およびR画像の入力を受け付ける。そして、現在のフレームのL画像およびR画像が入力されると、ステップS54に処理を移す。
In step S53, the background
ステップS54において、背景モデル構築装置1Aは、背景モデル更新処理を行って、現在のフレームの画像に基づいて背景モデルの更新を行い、ステップS55に処理を移す。背景モデル構築装置1Aが行う背景モデル更新処理の詳細については、図9、10を用いて後述する。
In step S54, the background
ステップS55において、背景モデル構築装置1Aは、制御部11Aにより、最終フレームまで背景モデルの更新を行ったか否かを判別する。そして、行ったと判別した場合には、図7に示した背景モデル構築処理を終了し、行っていないと判別した場合には、ステップS56に処理を移す。
In step S55, the background
ステップS56において、背景モデル構築装置1Aは、制御部11Aにより、ステップS53〜S55の各処理を行うフレームである処理対象フレームを更新し、ステップS53に処理を戻す。
In step S56, the background
図8は、背景モデル構築装置1Aが行う初期背景モデル生成処理のフローチャートである。
FIG. 8 is a flowchart of the initial background model generation process performed by the background
ステップS61において、背景モデル構築装置1Aは、初期背景モデル生成部12Aにより、ステップS51において入力を受け付けた空舞台のL映像およびR映像を用いて、画素値に基づく初期背景モデルの生成を行って、ステップS62に処理を移す。
In step S61, the background
ステップS62において、背景モデル構築装置1Aは、フレーム平滑化部13Aにより、ステップS51において入力を受け付けた空舞台のL映像およびR映像から、空舞台のL映像の全ての画素値を平均した平滑化画像と、空舞台のR映像の全ての画素値を平均した平滑化画像と、を生成し、ステップS63に処理を移す。
In step S62, the background
ステップS63において、背景モデル構築装置1Aは、ステレオ対応点探索部21により、空舞台のL映像およびR映像に対してステレオ対応関係の探索を行って、ステップS64に処理を移す。
In step S63, the background
ステップS64において、背景モデル構築装置1Aは、奥行情報算出部22により、初期奥行情報を求め、ステップS65に処理を移す。具体的には、ステップS63において生成した左側の平行ステレオ画像および右側の平行ステレオ画像を用いて、これら左右の平行ステレオ画像の各画素により指し示される各点の奥行値を求め、初期奥行情報とする。
In step S64, the background
ステップS65において、背景モデル構築装置1Aは、奥行信頼値マップ生成部23により、ステップS64において求めた初期奥行情報の信頼度を画素ごとに求め、ステップS66に処理を移す。
In step S65, the background
ステップS66において、背景モデル構築装置1Aは、領域分割部14により、ステップS62において生成した平滑化画像に対して領域分割処理を行って、図8に示した初期背景モデル生成処理を終了する。
In step S66, the background
図9、10は、背景モデル構築装置1Aが行う背景モデル更新処理のフローチャートである。
9 and 10 are flowcharts of the background model update process performed by the background
ステップS71において、背景モデル構築装置1Aは、ステレオ対応点探索部21により、ステップS53において入力を受け付けた現在のフレームのL画像およびR画像に対してステレオ対応関係の探索を行って、ステップS72に処理を移す。
In step S71, the background
ステップS72において、背景モデル構築装置1Aは、奥行情報算出部22により、ステップS53において入力を受け付けた現在のフレームのL画像およびR画像から奥行情報を求め、ステップS73に処理を移す。
In step S72, the background
ステップS73において、背景モデル構築装置1Aは、前景候補領域抽出部15により、ステップS53において入力を受け付けた現在のフレームのL画像およびR画像から前景候補領域を抽出し、ステップS74に処理を移す。
In step S73, the background
ステップS74において、背景モデル構築装置1Aは、背景モデル更新部16Aにより、ステップS73において前景候補領域を抽出した結果に基づいて、画素ごとに、前景候補であるか否かを判別する。そして、前景候補であると判別した場合には、ステップS76に処理を移し、前景候補ではないと判別した場合には、ステップS75に処理を移す。
In step S74, the background
ステップS75において、背景モデル構築装置1Aは、背景モデル更新部16Aにより、対象画素の現在の画素値を用いて、背景モデルを更新し、図9、10に示した背景モデル更新処理を終了する。
In step S75, the background
ステップS76において、背景モデル構築装置1Aは、背景モデル更新部16Aにより、ステップS74において前景候補であると判別した画素ごとに、ステップS65において求めた初期奥行信頼値が予め定められた閾値より大きいか否かを判別する。そして、大きい場合には、ステップS79に処理を移し、大きくない場合には、ステップS77に処理を移す。
In step S76, the background
ステップS77において、背景モデル構築装置1Aは、背景モデル更新部16Aにより、ステップS74において前景候補であると判別した画素ごとに、対象画素を含む分割領域の画素値の中央値と、対象画素の画素値と、の差分を求める。そして、求めた差分が予め定められた閾値より大きい場合には、対象画素が真に前景であると判断し、ステップS78に処理を移す。一方、求めた差分が予め定められた閾値以下である場合には、対象画素が背景であると判断し、ステップS75に処理を移す。
In step S77, the background
ステップS78において、背景モデル構築装置1Aは、背景モデル更新部16Aにより、対象画素の現在の画素値を破棄し、対象画素を含む分割領域の画素値の中央値を用いて、背景モデルを更新し、図9、10に示した背景モデル更新処理を終了する。
In step S78, the background
ステップS79において、背景モデル構築装置1Aは、背景モデル更新部16Aにより、ステップS74において前景候補であると判別した画素ごとに、ステップS64において求めた初期奥行情報から現在の奥行値を減算した値が予め定められた閾値より大きいか否かを判別する。そして、大きい場合には、対象画素が真に前景であると判断し、ステップS80に処理を移す。一方、大きくない場合には、対象画素が背景であると判断し、ステップS75に処理を移す。
In step S79, the background
ステップS80において、背景モデル構築装置1Aは、背景モデル更新部16Aにより、対象画素の現在の画素値を破棄し、直前のフレームで背景モデルを更新するのに用いた値を用いて、背景モデルを更新し、図9、10に示した背景モデル更新処理を終了する。なお、現在のフレームが最初のフレームである場合には、空舞台の撮影時の平均画素値を用いて、背景モデルを更新する。
In step S80, the background
以上の背景モデル構築装置1Aによれば、以下の効果を奏することができる。
According to the above background
背景モデル構築装置1Aは、テクスチャが複雑な領域については、左右の平行ステレオ画像の視差情報を用いて奥行情報を求め、この奥行情報に基づいて背景モデルを更新する。このため、照明変動や前景の変形などが発生した場合であっても、動的な背景モデルを的確に構築できる。
The background
また、背景モデル構築装置1Aは、テクスチャが少ない領域については、画像を分割した各分割領域の画素情報に基づいて背景モデルを更新する。このため、テクスチャが少ない領域が存在している場合であっても、動的な背景モデルを的確に構築できる。
Further, the background
また、背景モデル構築装置1Aは、奥行情報の信頼度を求め、この奥行情報の信頼度に基づいて、テクスチャが複雑な領域であるのか、テクスチャが少ない領域であるのかを判断する。このため、テクスチャに応じて適した方法で、背景モデルを更新することができる。
Further, the background
また、背景モデル構築装置1Aは、対象画素の初期奥行情報と現在の奥行情報との差異に基づいて、対象画素が前景であるか否かを判断する。このため、前景領域を的確に求めることができ、動的な背景モデルをより的確に構築できる。
Further, the background
また、背景モデル構築装置1Aは、奥行情報の信頼度が高く、かつ、上述の差異に基づいて対象画素が前景であると判断した画素については、直前のフレームで背景モデルの更新に用いた値を用いて背景モデルを更新する。このため、テクスチャが複雑な前景領域については、動的な背景モデルの更新に対する影響を大幅に抑えることができ、動的な背景モデルをより的確に構築できる。
Further, the background
また、背景モデル構築装置1Aは、背景モデル構築装置1と同様に、空舞台の画像について、画素値に基づいて複数の領域に分割して、互いに隣接しており画素値が類似する画素同士が同一の領域に含まれるように分割する。このため、空舞台の画像において同一の領域に含まれていた画素同士の画素値は、照明変動が発生し得る状況における現在のフレームの画像においても、前景領域でなければ類似しているものと想定できる。このため、現在のフレームの画像における対象画素を含む領域の画素値の中央値を、前景領域に隠蔽された背景領域の画素値とみなすことが可能である。
Similarly to the background
そこで、背景モデル構築装置1Aは、奥行情報の信頼度が高く、かつ、上述の差分に基づいて対象画素が前景であると判断した画素については、対象画素を含む領域の画素値の中央値を用いて背景モデルを更新する。このため、現在のフレームの画像における対象画素を含む領域の画素値の中央値を、前景領域に隠蔽された背景領域の画素値として用いて、背景モデルを更新することができる。したがって、背景モデルの更新に対する前景の画素値の影響を抑えることができるので、動的な背景モデルを的確に構築できる。
Therefore, the background
なお、本発明の背景モデル構築装置1や背景モデル構築装置1Aの処理を、コンピュータ読み取り可能な非一時的な記録媒体に記録し、この記録媒体に記録されたプログラムを背景モデル構築装置1や背景モデル構築装置1Aに読み込ませ、実行することによって、本発明を実現できる。
Note that the processing of the background
ここで、上述の記録媒体には、例えば、EPROMやフラッシュメモリといった不揮発性のメモリ、ハードディスクといった磁気ディスク、CD−ROMなどを適用できる。また、この記録媒体に記録されたプログラムの読み込みおよび実行は、背景モデル構築装置1や背景モデル構築装置1Aに設けられたプロセッサによって行われる。
Here, for example, a nonvolatile memory such as an EPROM or a flash memory, a magnetic disk such as a hard disk, a CD-ROM, or the like can be applied to the above-described recording medium. Further, reading and execution of the program recorded on the recording medium is performed by a processor provided in the background
また、上述のプログラムは、このプログラムを記憶装置などに格納した背景モデル構築装置1や背景モデル構築装置1Aから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネットなどのネットワーク(通信網)や電話回線などの通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。
The above-described program is transmitted from the background
また、上述のプログラムは、上述の機能の一部を実現するためのものであってもよい。さらに、上述の機能を背景モデル構築装置1や背景モデル構築装置1Aにすでに記録されているプログラムとの組み合せで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。
Further, the above-described program may be for realizing a part of the above-described function. Furthermore, what can implement | achieve the above-mentioned function in combination with the program already recorded on the background
以上、この発明の実施形態につき、図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計なども含まれる。 The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes a design that does not depart from the gist of the present invention.
例えば、上述の第2実施形態において、図8のステップS66の処理は、ステップS65の処理の後に行うものとしたが、これに限らず、ステップS62の処理が完了した後であればいつ行ってもよい。 For example, in the second embodiment described above, the process in step S66 in FIG. 8 is performed after the process in step S65. However, the present invention is not limited to this, and any time after the process in step S62 is completed. Also good.
1、1A・・・背景モデル構築装置
11、11A・・・制御部
12、12A・・・初期背景モデル生成部
13、13A・・・フレーム平滑化部
14・・・領域分割部
15・・・前景候補領域抽出部
16、16A・・・背景モデル更新部
21・・・ステレオ対応点探索部
22・・・奥行情報算出部
23・・・奥行信頼値マップ生成部
DESCRIPTION OF
Claims (9)
画素値に基づいて、前景領域を含まない空舞台の画像を複数の領域に分割する領域分割手段と、
前景領域を含み得る画像を前記複数の領域に分割して得られる各領域の画素情報に基づいて、背景モデルを更新する背景モデル更新手段と、
を備え、
前記領域分割手段は、互いに隣接しており画素値が類似する画素同士が同一の領域に含まれるように、前記空舞台の画像を前記複数の領域に分割することを特徴とする背景モデル構築装置。 A background model construction device for constructing a dynamic background model,
Area dividing means for dividing an empty stage image not including the foreground area into a plurality of areas based on the pixel values;
Background model update means for updating a background model based on pixel information of each area obtained by dividing an image that may include a foreground area into the plurality of areas;
Equipped with a,
The area dividing unit divides the sky stage image into the plurality of areas so that pixels adjacent to each other and having similar pixel values are included in the same area. .
前記差分に基づいて対象画素が前景であると判断した場合には、当該対象画素を含む領域の画素値の中央値を用いて背景モデルを更新し、
前記差分に基づいて対象画素が前景ではないと判断した場合には、当該対象画素の現在の画素値を用いて背景モデルを更新することを特徴とする請求項2に記載の背景モデル構築装置。 The background model update means includes
If it is determined that the target pixel is the foreground based on the difference, the background model is updated using the median of the pixel values of the region including the target pixel,
The background model construction apparatus according to claim 2 , wherein when the target pixel is determined not to be a foreground based on the difference, the background model is updated using a current pixel value of the target pixel.
前記背景モデル更新手段は、前記領域分割手段により分割された各領域の画素情報と、前記ステレオ対応点探索手段により求められた視差情報と、に基づいて、背景モデルを更新することを特徴とする請求項1から3のいずれかに記載の背景モデル構築装置。 Stereo corresponding point search means for obtaining parallax information of a stereo image is provided,
The background model update means updates the background model based on the pixel information of each area divided by the area dividing means and the disparity information obtained by the stereo corresponding point search means. The background model construction apparatus according to any one of claims 1 to 3 .
前記奥行情報算出手段により求められた奥行情報の信頼度を求める奥行信頼値マップ生成手段を備え、
前記背景モデル更新手段は、前記奥行信頼値マップ生成手段により求められた奥行情報の信頼度に基づいて、前記領域分割手段により分割された各領域の画素情報に基づいて背景モデルを生成するのか、前記ステレオ対応点探索手段により求められた視差情報に基づいて背景モデルを生成するのかを、画素ごとに決定することを特徴とする請求項4に記載の背景モデル構築装置。 Depth information calculation means for obtaining depth information from the parallax information obtained by the stereo corresponding point search means;
A depth confidence value map generating means for determining the reliability of the depth information obtained by the depth information calculating means,
Whether the background model update means generates a background model based on pixel information of each area divided by the area dividing means based on the reliability of the depth information obtained by the depth confidence value map generation means, 5. The background model construction apparatus according to claim 4 , wherein whether to generate a background model based on the disparity information obtained by the stereo corresponding point search unit is determined for each pixel.
処理する対象画素を含む領域の画素値の中央値と、当該対象画素の画素値と、の差分に基づいて、当該対象画素が前景であるか否かを判断し、
前記奥行信頼値マップ生成手段により求められた奥行情報の信頼度が予め定められた閾値より大きく、かつ、前記差異に基づいて対象画素が前景であると判断した場合には、直前のフレームで背景モデルの更新に用いた値を用いて背景モデルを更新し、
前記奥行信頼値マップ生成手段により求められた奥行情報の信頼度が予め定められた閾値以下で、かつ、前記差分に基づいて対象画素が前景であると判断した場合には、当該対象画素を含む領域の画素値の中央値を用いて背景モデルを更新し、
前記差分または前記差異に基づいて対象画素が前景ではないと判断した場合には、当該対象画素の現在の画素値を用いて背景モデルを更新することを特徴とする請求項6に記載の背景モデル構築装置。 The background model update means includes
Based on the difference between the median pixel value of the region including the target pixel to be processed and the pixel value of the target pixel, it is determined whether the target pixel is a foreground,
When the reliability of the depth information obtained by the depth confidence value map generation means is greater than a predetermined threshold value, and when it is determined that the target pixel is a foreground based on the difference, the background in the immediately preceding frame Update the background model with the values used to update the model,
If the reliability of the depth information obtained by the depth confidence value map generation means is equal to or lower than a predetermined threshold value and the target pixel is determined to be a foreground based on the difference, the target pixel is included. Update the background model with the median pixel value of the region,
The background model according to claim 6 , wherein when it is determined that the target pixel is not a foreground based on the difference or the difference, a background model is updated using a current pixel value of the target pixel. Construction device.
前記領域分割手段が、画素値に基づいて、画像を複数の領域に分割する第1のステップと、
前記背景モデル更新手段が、前記領域分割手段により分割された各領域の画素情報に基づいて、背景モデルを更新する第2のステップと、
を備え、
前記第1のステップにおいて、互いに隣接しており画素値が類似する画素同士が同一の領域に含まれるように、空舞台の画像を前記複数の領域に分割することを特徴とする背景モデル構築方法。 A background model construction method in a background model construction device that comprises a region division means and a background model update means, and constructs a dynamic background model,
A first step in which the area dividing means divides the image into a plurality of areas based on pixel values;
A second step in which the background model updating means updates a background model based on pixel information of each area divided by the area dividing means;
Equipped with a,
In the first step, an empty stage image is divided into the plurality of regions so that pixels adjacent to each other and having similar pixel values are included in the same region. .
前記領域分割手段が、画素値に基づいて、画像を複数の領域に分割する第1のステップと、
前記背景モデル更新手段が、前記領域分割手段により分割された各領域の画素情報に基づいて、背景モデルを更新する第2のステップと、
を備え、
前記第1のステップにおいて、互いに隣接しており画素値が類似する画素同士が同一の領域に含まれるように、空舞台の画像を前記複数の領域に分割することを特徴とするコンピュータに実行させるためのプログラム。 A program for causing a computer to execute a background model construction method in a background model construction apparatus that comprises a region division means and a background model update means, and constructs a dynamic background model,
A first step in which the area dividing means divides the image into a plurality of areas based on pixel values;
A second step in which the background model updating means updates a background model based on pixel information of each area divided by the area dividing means;
Equipped with a,
In the first step, an image of an empty stage is divided into the plurality of regions so that pixels adjacent to each other and having similar pixel values are included in the same region . Program for.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013033791A JP6054771B2 (en) | 2013-02-22 | 2013-02-22 | Background model construction apparatus, background model construction method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013033791A JP6054771B2 (en) | 2013-02-22 | 2013-02-22 | Background model construction apparatus, background model construction method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014164446A JP2014164446A (en) | 2014-09-08 |
JP6054771B2 true JP6054771B2 (en) | 2016-12-27 |
Family
ID=51615010
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013033791A Active JP6054771B2 (en) | 2013-02-22 | 2013-02-22 | Background model construction apparatus, background model construction method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6054771B2 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104537668B (en) * | 2014-12-29 | 2017-08-15 | 浙江宇视科技有限公司 | A kind of quick parallax image computational methods and device |
JP6800681B2 (en) * | 2016-09-30 | 2020-12-16 | キヤノン株式会社 | Image processing equipment, image processing methods and computer programs |
WO2020161888A1 (en) * | 2019-02-08 | 2020-08-13 | 三菱電機株式会社 | Background model generation device, background model generation program, and background model generation method |
CN110766915A (en) * | 2019-09-19 | 2020-02-07 | 重庆特斯联智慧科技股份有限公司 | Alarm method and system for identifying fire fighting access state |
CN111028262A (en) * | 2019-12-06 | 2020-04-17 | 衢州学院 | Multi-channel composite high-definition high-speed video background modeling method |
CN113111883B (en) * | 2021-03-23 | 2023-06-06 | 浙江大华技术股份有限公司 | License plate detection method, electronic device and storage medium |
CN114519696B (en) * | 2021-12-31 | 2022-11-29 | 扬州盛强薄膜材料有限公司 | PVC heat shrinkage film detection method and system based on optical intelligence |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004178243A (en) * | 2002-11-27 | 2004-06-24 | Nippon Telegr & Teleph Corp <Ntt> | Device and method for extracting traveling object, its program and recording medium having the same program recorded thereon |
JP4961234B2 (en) * | 2007-03-23 | 2012-06-27 | 株式会社日立製作所 | Object tracking device |
JP2009031939A (en) * | 2007-07-25 | 2009-02-12 | Advanced Telecommunication Research Institute International | Image processing apparatus, method and program |
JP5213627B2 (en) * | 2008-10-07 | 2013-06-19 | キヤノン株式会社 | Image processing apparatus and image processing method |
JP5155110B2 (en) * | 2008-11-17 | 2013-02-27 | 株式会社日立国際電気 | Monitoring device |
JP5318664B2 (en) * | 2009-05-28 | 2013-10-16 | セコム株式会社 | Object detection device |
JP2012060268A (en) * | 2010-09-06 | 2012-03-22 | Toshiba Teli Corp | Flowing water monitor system and flowing water monitor program |
JP5404580B2 (en) * | 2010-11-05 | 2014-02-05 | 日本電信電話株式会社 | Image processing apparatus, image processing method, and recording medium recording image processing program |
-
2013
- 2013-02-22 JP JP2013033791A patent/JP6054771B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2014164446A (en) | 2014-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6054771B2 (en) | Background model construction apparatus, background model construction method, and program | |
JP6631179B2 (en) | Foreground image division method and apparatus, program, and recording medium | |
JP6934887B2 (en) | Methods and systems for real-time 3D capture and live feedback with monocular cameras | |
JP6030617B2 (en) | Image processing apparatus and image processing method | |
CN110998659B (en) | Image processing system, image processing method, and program | |
US10559062B2 (en) | Method for automatic facial impression transformation, recording medium and device for performing the method | |
US9626766B2 (en) | Depth sensing using an RGB camera | |
KR100931311B1 (en) | Depth estimation device and its method for maintaining depth continuity between frames | |
JP2014127208A (en) | Method and apparatus for detecting object | |
JP2013524593A (en) | Methods and configurations for multi-camera calibration | |
JP2011134114A (en) | Pattern recognition method and pattern recognition apparatus | |
KR102455468B1 (en) | Method and apparatus for reconstructing three dimensional model of object | |
JP2016099982A (en) | Behavior recognition device, behaviour learning device, method, and program | |
JP2018151689A (en) | Image processing apparatus, control method thereof, program and storage medium | |
KR102110459B1 (en) | Method and apparatus for generating three dimension image | |
WO2014093906A1 (en) | Model based video projection | |
WO2013144418A1 (en) | Image segmentation | |
JP2013185905A (en) | Information processing apparatus, method, and program | |
JP6272071B2 (en) | Image processing apparatus, image processing method, and program | |
JP5200042B2 (en) | Disparity estimation apparatus and program thereof | |
JP6452324B2 (en) | Image processing apparatus, image processing method, and program | |
JP2016081252A (en) | Image processor and image processing method | |
JP2010257267A (en) | Device, method and program for detecting object area | |
US10440350B2 (en) | Constructing a user's face model using particle filters | |
JP2019507934A (en) | 3D motion evaluation apparatus, 3D motion evaluation method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150828 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160713 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160802 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160929 |
|
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: 20161108 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20161201 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6054771 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |