JP2001043458A - System for generating background picture - Google Patents

System for generating background picture

Info

Publication number
JP2001043458A
JP2001043458A JP11215064A JP21506499A JP2001043458A JP 2001043458 A JP2001043458 A JP 2001043458A JP 11215064 A JP11215064 A JP 11215064A JP 21506499 A JP21506499 A JP 21506499A JP 2001043458 A JP2001043458 A JP 2001043458A
Authority
JP
Japan
Prior art keywords
background
pixel
value
image
mask
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.)
Withdrawn
Application number
JP11215064A
Other languages
Japanese (ja)
Inventor
Naohiro Amamoto
直弘 天本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP11215064A priority Critical patent/JP2001043458A/en
Publication of JP2001043458A publication Critical patent/JP2001043458A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Burglar Alarm Systems (AREA)
  • Alarm Systems (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a background picture generating system by which a background picture excluding a mobile object is generated even when the mobile object exists on a screen and the proper background picture is obtained. SOLUTION: In the system, a prescribed area to be monitored is photographed, the inputted picture is stored in a frame buffer 102, the absolute value of a difference between the input picture of the time and the input picture one time before is binarized concerning the picture, a change area mask 104 where the value of a pixel with detected change is adopted as zero and the value of the pixel without detected change is adopted as one is generated, the value of a count buffer is counted-up by one concerning the pixel where change is not detected, the value of the count buffer is reset to zero concerning the pixel where change is detected, the values of the respective pixels in the count buffer are larger than a stored threshold, the pixel value of a new register mask 108 is set to one with respect to the pixel which is not established in a background establishing mask, the pixel value of the background establishing mask is set to zero and the pixel value of the input picture of the time is copied on the background picture with respect to the pixels which is one in value in a background mask updating means 107 and the new register mask 108.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、TVカメラを用い
て交通流監視や侵入監視等の基準画像として背景画像を
用いるシステムにおいて、たとえ画面内に移動物体が存
在する場合においても移動物体を除いた背景画像を生成
・更新し好適な背景画像を得ることが可能な背景画像生
成システムに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a system using a background image as a reference image such as a traffic flow monitor or an intrusion monitor using a TV camera, and removes a moving object even if the moving object exists on a screen. The present invention relates to a background image generation system capable of generating and updating a background image and obtaining a suitable background image.

【0002】[0002]

【従来の技術】従来,このような分野の技術としては、
例えば、(1)特開平4−273586号公報、(2)
特開平6−274786号公報などに開示されるものが
ある。
2. Description of the Related Art Conventionally, techniques in such a field include:
For example, (1) Japanese Patent Application Laid-Open No. 4-273586, (2)
There is one disclosed in JP-A-6-274786.

【0003】上記(1)に開示された車両検出装置によ
れば、予め背景のみからなる画像を入力し、背景画像と
して蓄積しておき、この背景画像と入力画像の差分を求
め、背景に対して極端に暗くなった領域は車両の真下の
陰になった領域であるとして、車両の有無を検出すると
いうものであった。
According to the vehicle detection device disclosed in the above (1), an image consisting of only a background is input in advance, stored as a background image, and a difference between the background image and the input image is obtained. The extremely dark area is a shaded area immediately below the vehicle, and the presence or absence of the vehicle is detected.

【0004】また、上記(2)に開示された道路交通異
常監視システムによれば、予め計測エリアを設定し、車
両の映っていない入力画像を基に計測エリアに一致する
背景画像を作成し、この背景画像と入力画像との差分を
求め、車両を検出しその座標を求める。その後、計測エ
リアの道幅方向の各区間にしたがって、車両毎に座標分
布を頻度化し、一定期間の通過車両分を累積していた。
そして、この累積頻度を通過台数で割って正規化し、車
両の走行位置スペクトルを得ていた。更に、時系列なス
ペクトルデータを入力して、異常の種別と度合いを自動
的に判定するというものであった。
According to the road traffic abnormality monitoring system disclosed in the above (2), a measurement area is set in advance, and a background image corresponding to the measurement area is created based on an input image where a vehicle is not reflected. The difference between the background image and the input image is obtained, the vehicle is detected, and its coordinates are obtained. Thereafter, according to each section of the measurement area in the road width direction, the coordinate distribution is frequency-ized for each vehicle, and the number of passing vehicles for a certain period is accumulated.
Then, the cumulative frequency is divided by the number of passing vehicles to normalize, thereby obtaining a traveling position spectrum of the vehicle. Further, time-series spectrum data is input to automatically determine the type and degree of abnormality.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上記し
た何れの技術においても、予め車両の走行していない画
像を撮影し、この画像を背景画像として登録しておくこ
とが前提条件となっている。このことは、交通量の少な
い地方部の道路環境では可能であるものの、交通量の多
い都市部の道路環境では車両の存在しない映像を撮影す
るのは困難である。
However, in any of the techniques described above, it is a precondition that an image in which the vehicle is not running is taken in advance and this image is registered as a background image. Although this is possible in a rural road environment with a small traffic volume, it is difficult to capture an image without vehicles in a road environment in an urban city with a large traffic volume.

【0006】本発明は、TVカメラを用いて交通流監視
や侵入監視等の基準画像として背景画像を用い、たとえ
画面内に移動物体が存在する場合においても移動物体を
除いた背景画像を生成し好適な背景画像を得ることがで
きる背景画像生成システムを提供することを目的とす
る。
The present invention uses a background image as a reference image for traffic flow monitoring, intrusion monitoring, and the like using a TV camera, and generates a background image excluding a moving object even when a moving object exists in the screen. An object of the present invention is to provide a background image generation system that can obtain a suitable background image.

【0007】[0007]

【課題を解決するための手段】本発明は、上記目的を達
成するために、 〔1〕背景画像生成システムにおいて、所定の監視区域
の画像を撮影する撮像装置と、前記撮像画像を処理し、
背景画像を生成する背景画像生成装置と、前記背景画像
を表示し、ユーザに呈示する画像表示装置とを備え、前
記背景画像生成装置は、前記撮像装置で撮像された入力
画像を記憶するフレームバッファと、前記フレームバッ
ファに記憶された画像に対して、当該時刻の入力画像と
その1時刻前の入力画像との差分の絶対値を2値化し、
変化が検出された画素の値を0、変化が検出されなかっ
た画素の値を1とした変化領域マスクを作成する変化検
出手段と、この変化検出手段において変化が検出されな
かった画素はカウントバッファの値を1カウントアップ
し、変化が検出された画素はカウントバッファの値を0
にリセットするカウントバッファ更新手段と、前記カウ
ントバッファの各画素値の比較に用いる閾値を記憶する
閾値記憶手段と、前記カウントバッファの各画素の値が
前記閾値記憶手段の閾値より大きく、かつ背景確定マス
クにおいて確定されていない画素は新規登録マスクの画
素値を1にセットし、背景確定マスクの画素値を0にセ
ットする背景マスク更新手段と、新規登録マスクで値1
の画素は当該時刻の入力画像の画素値を背景画像にコピ
ーする背景登録手段と、背景確定マスクにおいて、全て
の画素が確定したか否かを判定し、確定していなければ
継続して処理を行い、確定していれば背景画像を出力し
処理を終了する背景作成終了判定手段とを有することを
特徴とする。
In order to achieve the above object, the present invention provides: (1) an image pickup apparatus for taking an image of a predetermined monitoring area in a background image generation system;
A background image generation device that generates a background image; and an image display device that displays the background image and presents it to a user, wherein the background image generation device stores an input image captured by the imaging device. And binarizing an absolute value of a difference between an input image at the time and an input image one time before the input image with respect to the image stored in the frame buffer,
Change detection means for creating a change area mask in which the value of a pixel in which a change is detected is set to 0 and the value of a pixel in which a change is not detected is set to 1; Is incremented by one, and the pixel in which a change is detected is set to 0 in the count buffer.
Count buffer updating means for resetting the threshold value, a threshold value storing means for storing a threshold value used for comparing each pixel value of the count buffer, a value of each pixel of the count buffer being larger than the threshold value of the threshold value storing means, and setting of the background. For a pixel which has not been determined in the mask, the pixel value of the newly registered mask is set to 1 and the pixel value of the background determined mask is set to 0.
In the background registration means for copying the pixel value of the input image at that time into the background image, and in the background determination mask, it is determined whether or not all the pixels have been determined. The method further comprises a background creation end determining means for outputting a background image if the setting is confirmed and ending the processing.

【0008】〔2〕上記〔1〕記載の背景画像生成シス
テムにおいて、前記背景画像生成装置は、背景確定マス
クにおいて、確定されていない画素がノイズか否かを判
定し、ノイズであれば前記閾値記憶手段に記憶されてい
る閾値を小さくなる方向に変更する閾値変更手段をさら
に備えることを特徴とする。
[2] In the background image generation system according to [1], the background image generation device determines whether or not undetermined pixels are noise in the background determination mask. It is characterized by further comprising a threshold value changing means for changing the threshold value stored in the storage means to a smaller value.

【0009】〔3〕背景画像生成システムにおいて、所
定の監視区域の画像を撮影する撮像装置と、前記撮像画
像を処理し、背景画像を生成する背景画像生成装置と、
前記背景画像を表示し、ユーザに呈示する画像表示装置
とを備え、前記背景画像生成装置は、前記撮像装置で撮
像された入力画像を記憶するフレームバッファと、この
フレームバッファに記憶された画像に対して、当該時刻
の入力画像とその1時刻前の入力画像との差分の絶対値
を2値化し、変化が検出された画素の値を0、変化が検
出されなかった画素の値を1とした変化領域マスクを作
成する変化検出手段と、この変化検出手段において変化
が検出されなかった画素はカウントバッファの値を1カ
ウントアップし、変化が検出された画素はカウントバッ
ファの値を0にリセットするカウントバッファ更新手段
と、前記カウントバッファの各画素値の比較に用いる閾
値を記憶する閾値記憶手段と、前記カウントバッファの
各画素の値が前記閾値記憶手段の閾値より大きく、かつ
背景確定マスクにおいて確定されていない画素は新規登
録マスクの画素値を1にセットし、背景確定マスクの画
素値を0にセットする背景マスク更新手段と、既に背景
画像に登録されている画素については当該時刻の入力画
像を用いて更新を行い、新規登録マスクで値1の画素は
当該時刻の入力画像の画素値を背景画像にコピーする背
景更新手段と、背景確定マスクにおいて、全ての画素が
確定したか否かを判定し、確定していなければ継続して
処理を行い、確定していれば背景画像を出力し処理を終
了する背景作成終了判定手段とを有することを特徴とす
る。
[3] In a background image generation system, an imaging device for capturing an image of a predetermined monitoring area, a background image generation device for processing the captured image and generating a background image,
An image display device that displays the background image and presents it to a user, wherein the background image generation device includes a frame buffer that stores an input image captured by the imaging device, and an image stored in the frame buffer. On the other hand, the absolute value of the difference between the input image at the time and the input image one time before is binarized, and the value of a pixel where a change is detected is set to 0, and the value of a pixel where a change is not detected is set to 1 Detecting means for creating a changed area mask, and a pixel in which no change is detected by the change detecting means counts up the value of the count buffer by one, and a pixel in which a change is detected resets the value of the count buffer to zero. Count buffer updating means, threshold value storage means for storing a threshold value used for comparing each pixel value of the count buffer, and a value of each pixel of the count buffer For a pixel larger than the threshold value of the value storage means and not determined in the background fixed mask, the pixel value of the newly registered mask is set to 1 and the pixel value of the background fixed mask is set to 0; A pixel registered in the image is updated using the input image at the time, a pixel having a value of 1 with the newly registered mask is a background update unit that copies the pixel value of the input image at the time into the background image, In the finalized mask, it is determined whether or not all the pixels have been finalized. If the finalized image has not been finalized, the process is continuously performed. It is characterized by having.

【0010】〔4〕上記〔3〕記載の背景画像生成シス
テムにおいて、前記背景作成終了判定手段は、背景マス
クにおいて、すべての画素が確定したか否かを判定し、
確定していなければ継続して処理を行い、入力画像と背
景画像と背景確定マスクを合成した画像を逐次出力し、
ユーザからコマンド入力が行われたときはそのコマンド
を解釈し、全背景画像が確定していれば処理を終了する
ことを特徴とする。
[4] In the background image generation system according to the above [3], the background creation end determination means determines whether or not all pixels are determined in the background mask,
If it is not determined, the process is continuously performed, and an image obtained by combining the input image, the background image, and the background determination mask is sequentially output,
When a user inputs a command, the command is interpreted, and if all background images have been determined, the process is terminated.

【0011】[0011]

【発明の実施の形態】以下、本発明の実施の形態につい
て図を参照しながら詳細に説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings.

【0012】図1は本発明の第1実施例を示す背景画像
生成システムのブロック図、図2はそのカウントバッフ
ァの動作説明図である。
FIG. 1 is a block diagram of a background image generating system showing a first embodiment of the present invention, and FIG. 2 is an explanatory diagram of the operation of the count buffer.

【0013】本発明の背景画像生成システムは、背景及
び物体からなる映像を撮影するように設置されたITV
カメラ等の撮像装置(入力画像)101から動画像が背
景画像生成装置115に入力される。画像表示装置11
4はTVモニタ等の表示装置であり、背景画像生成装置
115において生成された背景画像を表示する。背景画
像生成装置115は、フレームバッファ102、変化検
出手段103、変化領域マスク104、カウントバッフ
ァ更新手段105、カウントバッファ106、背景マス
ク更新手段107、新規登録マスク108、背景確定マ
スク109、閾値記憶手段110、背景登録手段11
1、背景画像記憶手段112、背景作成終了判定手段1
13から構成される。
A background image generating system according to the present invention includes an ITV installed to capture an image composed of a background and an object.
A moving image is input to a background image generation device 115 from an imaging device (input image) 101 such as a camera. Image display device 11
A display device 4 such as a TV monitor displays the background image generated by the background image generation device 115. The background image generation device 115 includes a frame buffer 102, a change detection unit 103, a change area mask 104, a count buffer update unit 105, a count buffer 106, a background mask update unit 107, a new registration mask 108, a background determination mask 109, and a threshold storage unit. 110, background registration means 11
1. Background image storage means 112, background creation end determination means 1
13.

【0014】フレームバッファ102は、撮像装置10
1から得た入力画像を記憶する。変化検出手段103で
は、入力画像に関して時間的に変化する移動物体を検出
し、検出結果が2値画像として変化領域マスク104に
記憶される。 カウントバッファ更新手段105では、
変化領域マスク104を入力とし、カウントバッファ1
06の内容を更新する。また背景マスク更新手段107
では、カウントバッファ106において背景画像への新
規登録条件を満たす画素が存在するか否かの判定を行
い、条件を満たす画素が存在する場合は、その画素を新
規登録マスク108へ登録し、登録された画素は登録済
みであることを示すために背景確定マスク109に登録
済みフラグを記録する。
[0014] The frame buffer 102 is
The input image obtained from step 1 is stored. The change detection unit 103 detects a moving object that changes with time with respect to the input image, and stores the detection result as a binary image in the change area mask 104. In the count buffer updating means 105,
The change area mask 104 is input and the count buffer 1
06 is updated. Also, the background mask updating means 107
In the count buffer 106, it is determined whether there is a pixel that satisfies the new registration condition for the background image. If there is a pixel that satisfies the condition, the pixel is registered in the new registration mask 108 and registered. A registered flag is recorded in the background determination mask 109 to indicate that the pixel has been registered.

【0015】閾値記憶手段110には前記判定を行うた
めの閾値が記憶されている。背景登録手段111では、
新規登録マスク108に登録されている画素について当
該時刻の入力画像の画素値を背景画像記録手段112に
記録する。背景作成終了判定手段113では、背景画像
が完全に作成されたか否かを判定し、まだ作成されてい
ない画素が存在すれば、処理を継続し、全ての画素が確
定していれば背景画像IBGを出力し処理を終了する。画
像表示装置114はテレビモニタ等の表示装置であり、
背景作成終了判定手段113から出力された背景画像I
BGを表示する。
The threshold value storage means 110 stores a threshold value for making the above determination. In the background registration means 111,
For the pixels registered in the newly registered mask 108, the pixel value of the input image at that time is recorded in the background image recording unit 112. The background creation end determination means 113 determines whether or not the background image has been completely created. If there is a pixel that has not been created yet, the process is continued. If all the pixels are determined, the background image I is determined. BG is output and the process ends. The image display device 114 is a display device such as a television monitor,
Background image I output from background creation end determination means 113
Display BG .

【0016】以下、この背景画像生成システムの動作に
ついて説明する。
Hereinafter, the operation of the background image generating system will be described.

【0017】撮像装置101は、道路および路上を走行
する車両といった背景及び物体からなる画像を撮影す
る。撮像装置101で撮影された動画像は、フレームバ
ッファ102へ入力される。フレームバッファ102は
m枚(m≧2)の画像を格納可能なリングバッファであ
る。
The imaging device 101 captures an image composed of a background and an object such as a road and a vehicle running on the road. A moving image captured by the imaging device 101 is input to the frame buffer 102. The frame buffer 102 is a ring buffer capable of storing m (m ≧ 2) images.

【0018】変化検出手段103において当該時刻tの
入力画像とその1時刻前(t−1)の入力画像との差分
を求め、各画素の差分値の絶対値が閾値以上であれば
0、閾値以下であれば1であるような2値画像を作成
し、変化領域マスク104に記憶する。
The change detecting means 103 calculates the difference between the input image at the time t and the input image one time before (t-1), and if the absolute value of the difference value of each pixel is equal to or greater than the threshold value, 0; In the following case, a binary image that is 1 is created and stored in the change area mask 104.

【0019】次に、カウントバッファ更新手段105で
は変化領域マスク104を入力とし、カウントバッファ
106の内容を更新する。カウントバッファ106は、
入力画像サイズと同じ大きさ(画素数)を持ち、1画素
nbit(nビット)で構成されている。通常n=8
(0〜255)程度で十分である。また、処理開始時に
はすべて0に初期化されている。
Next, the count buffer updating means 105 receives the input of the change area mask 104 and updates the contents of the count buffer 106. The count buffer 106
It has the same size (number of pixels) as the input image size, and is composed of one pixel nbit (n bits). Usually n = 8
(0-255) is sufficient. At the start of the process, all are initialized to zero.

【0020】カウントバッファ更新手段105では、変
化検出手段103で変化が検出されなかった画素(変化
領域マスク104で値1の画素)についてはカウントバ
ッファ106において前記画素に対応する位置の値を1
カウントアップする。また、変化検出手段103で変化
が検出された画素(変化領域マスク104で値0の画
素)については、カウントバッファ106において前記
画素に対応する位置の値を0にリセットする。
In the count buffer updating means 105, the value of the pixel corresponding to the pixel whose change is not detected by the change detecting means 103 (the pixel having the value 1 in the change area mask 104) is set to 1 in the count buffer 106.
Count up. Further, for a pixel for which a change has been detected by the change detecting means 103 (a pixel having a value of 0 in the change area mask 104), the value of a position corresponding to the pixel in the count buffer 106 is reset to 0.

【0021】従って、カウントバッファ106の各画素
の値は、入力された動画像において画素毎に変化が検出
されなかった期間を表している。つまり、カウントバッ
ファ106の画素値が11であれば、入力された動画像
において、その位置の画素値は時刻(t−10)から現
在の時刻tまで変化が無かったことを表す。
Accordingly, the value of each pixel in the count buffer 106 represents a period during which no change is detected for each pixel in the input moving image. That is, if the pixel value of the count buffer 106 is 11, it indicates that the pixel value at that position in the input moving image has not changed from the time (t−10) to the current time t.

【0022】図2は本発明の第1実施例を示す背景画像
生成システムのカウントバッファの動作説明図である。
FIG. 2 is a diagram for explaining the operation of the count buffer of the background image generating system according to the first embodiment of the present invention.

【0023】この図は、カウントバッファ更新手段10
5において、新しい変化領域マスク104が入力された
ときのカウントバッファ106の更新手続きの1例を示
している。つまり、図2(a)に示すような変化領域マ
スクと図2(b)に示す更新前のカウントバッファとに
より、更新後のカウントバッファは図2(c)に示すよ
うになる。なお、図2中の桝目は変化領域マスク104
およびカウントバッファ106の3×3の領域を拡大表
記したものであり、数字は各々画素値を表している。
This figure shows a count buffer updating means 10
5 shows an example of a procedure for updating the count buffer 106 when a new change area mask 104 is input. In other words, the updated count buffer is as shown in FIG. 2C by the change area mask as shown in FIG. 2A and the count buffer before update shown in FIG. 2B. Note that the cells in FIG.
And the 3 × 3 area of the count buffer 106 is enlarged, and the numbers each represent a pixel value.

【0024】背景マスク更新手段107では、カウント
バッファ106の各画素について背景画像への登録条件
を満たしているか否かを判定し、満たしていれば新規登
録マスク108へ当該画素を登録し、背景確定マスク1
09へ背景画像への登録が確定したことを示すフラグが
記録される。
The background mask updating means 107 determines whether or not each pixel in the count buffer 106 satisfies the registration condition for the background image, and if so, registers the pixel in the new registration mask 108 and determines the background. Mask 1
At 09, a flag indicating that registration with the background image has been confirmed is recorded.

【0025】ここで、新規登録マスク108および背景
確定マスク109は各々入力画像と同じサイズの2値画
像であり、背景確定マスク109はシステム起動時に全
ての画素値が1に初期化されており、値1の画素は背景
画像へは未登録であり、値0の画素は既に背景画像へ登
録されていることを示す。新規登録マスク108は新し
い入力画像が入力される毎に0に初期化される。カウン
トバッファ106の値が予め閾値記憶手段110に記憶
されている閾値T以上であり、かつ背景確定マスク10
9の値が1であるという条件を満たす画素が存在すれ
ば、新規登録マスク108において前記画素に対応する
位置の画素値を1とし、背景確定マスク109の画素値
を0とする。すなわち、所定の時間入力画像において変
化が検出されず、過去に背景画像へ登録されていない画
素について新規に背景画像への登録を行う。
Here, the new registration mask 108 and the background fixed mask 109 are each a binary image having the same size as the input image, and all pixel values of the background fixed mask 109 are initialized to 1 when the system is started. A pixel having a value of 1 indicates that the pixel has not been registered in the background image, and a pixel having a value of 0 indicates that the pixel has been registered in the background image. The new registration mask 108 is initialized to 0 each time a new input image is input. The value of the count buffer 106 is equal to or greater than the threshold value T stored in the threshold value storage unit 110 in advance, and the background determination mask 10
If there is a pixel that satisfies the condition that the value of 9 is 1, the pixel value at the position corresponding to the pixel in the newly registered mask 108 is set to 1 and the pixel value of the background fixed mask 109 is set to 0. That is, a pixel that has not been detected in the input image for a predetermined time and has not been registered in the background image in the past is newly registered in the background image.

【0026】背景登録手段111では、新規登録マスク
108において値1の画素が存在すれば、フレームバッ
ファ102に格納されている当該時刻の入力画像の前記
画素に対応する位置の画素値を背景画像記録手段112
にコピーする。
If a pixel having a value of 1 exists in the newly registered mask 108, the background registration unit 111 records the pixel value at the position corresponding to the pixel in the input image at that time stored in the frame buffer 102 into the background image. Means 112
Copy to

【0027】最後に、背景作成終了判定手段113では
背景確定マスク109において値1の画素が存在するか
否かの判定を行い、もし、値1の画素が1つでも存在す
れば背景画像は不完全であるとして処理を継続する。値
1の画素が存在しなければ、背景画像の作成が完了した
として、画像を出力し処理を終了する。画像表示装置1
14では、背景作成終了判定手段113から出力される
背景画像記録手段112を表示する。
Finally, the background creation end determining means 113 determines whether or not a pixel having the value 1 exists in the background determination mask 109. If at least one pixel having the value 1 exists, the background image is not determined. Processing continues as complete. If the pixel having the value 1 does not exist, it is determined that the creation of the background image has been completed, the image is output, and the process ends. Image display device 1
At 14, the background image recording means 112 output from the background creation end determination means 113 is displayed.

【0028】このように構成したので、第1実施例の背
景画像生成システムによれば、都市部のような交通量の
多い道路で移動物体の存在しない画像の取得が困難であ
る(常に移動物体が存在する画像しか撮影できない)場
合においても、ITVカメラ等の撮像装置から得られる
動画像を用いて、良好な背景画像を生成することが可能
となる。
With this configuration, according to the background image generation system of the first embodiment, it is difficult to obtain an image without a moving object on a road with a large traffic volume such as an urban area (always a moving object). In this case, it is possible to generate a good background image using a moving image obtained from an imaging device such as an ITV camera.

【0029】次に、本発明の第2実施例について説明す
る。
Next, a second embodiment of the present invention will be described.

【0030】第2実施例は、撮像画像(入力画像)にノ
イズが多く画素値が不安定な場合でも、高速に背景画像
を生成することができる背景画像生成システムを提供す
ることができる。
The second embodiment can provide a background image generation system capable of generating a background image at high speed even when a picked-up image (input image) has a lot of noise and an unstable pixel value.

【0031】図3は本発明の第2実施例を示す背景画像
生成システムのブロック図である。
FIG. 3 is a block diagram of a background image generation system showing a second embodiment of the present invention.

【0032】この実施例の背景画像生成システムは、背
景及び物体からなる映像を撮影するように設置されたI
TVカメラ等の撮像装置201から動画像が背景画像生
成装置216に入力される。画像表示装置215はTV
モニタ等の表示装置であり、背景画像生成装置216に
おいて生成された背景画像を表示する。背景画像生成装
置216は、フレームバッファ202、変化検出手段2
03、変化領域マスク204、カウントバッファ更新手
段205、カウントバッファ206、背景マスク更新手
段207、新規登録マスク208、背景確定マスク20
9、閾値記憶手段210、閾値変更手段211、背景登
録手段212、背景画像記憶手段213、背景作成終了
判定手段214から構成される。
The background image generating system according to the present embodiment is provided with an I / O set to capture an image composed of a background and an object.
A moving image is input to the background image generation device 216 from the imaging device 201 such as a TV camera. The image display device 215 is a TV
It is a display device such as a monitor, and displays the background image generated by the background image generation device 216. The background image generation device 216 includes a frame buffer 202, a change detection unit 2
03, change area mask 204, count buffer updating means 205, count buffer 206, background mask updating means 207, new registration mask 208, background fixed mask 20
9, a threshold storage unit 210, a threshold change unit 211, a background registration unit 212, a background image storage unit 213, and a background creation end determination unit 214.

【0033】フレームバッファは202は撮像装置20
1から得た入力画像を記憶する。変化検出手段203で
は入力画像に関して時間的に変化する移動物体を検出
し、検出結果が2値画像として変化領域マスク204に
記憶される。
The frame buffer 202 is the imaging device 20.
The input image obtained from step 1 is stored. The change detection unit 203 detects a moving object that changes with time with respect to the input image, and the detection result is stored in the change area mask 204 as a binary image.

【0034】カウントバッファ更新手段205では、変
化領域マスク204を入力とし、カウントバッファ20
6の内容を更新する。また背景マスク更新手段207で
は、カウントバッファ206において背景画像への新規
登録条件を満たす画素が存在するか否かの判定を行い、
条件を満たす画素が存在する場合は、その画素を新規登
録マスク208へ登録し、登録された画素は登録済みで
あることを示すために背景確定マスク209に登録済み
フラグを記録する。
The count buffer updating means 205 receives the change area mask 204 as an input and
6 is updated. The background mask updating unit 207 determines whether there is a pixel in the count buffer 206 that satisfies the new registration condition for the background image.
If there is a pixel that satisfies the condition, the pixel is registered in the new registration mask 208, and a registered flag is recorded in the background determination mask 209 to indicate that the registered pixel has been registered.

【0035】閾値記憶手段210には前記判定を行うた
めの閾値が記憶されている。閾値変更手段211では、
背景確定マスク209で確定されてない画素の状況に応
じて閾値記憶手段210の閾値の調整を行う。
The threshold value storage means 210 stores a threshold value for making the above determination. In the threshold value changing means 211,
The threshold value of the threshold value storage unit 210 is adjusted according to the state of the pixel not determined by the background determination mask 209.

【0036】背景登録手段212では、新規登録マスク
208に登録されている画素について当該時刻の入力画
像の画素値を背景画像記録手段213に記録する。背景
作成終了判定手段214では、背景画像が完全に作成さ
れたか否かを判定し、まだ作成されていない画素が存在
すれば、処理を継続し、全ての画素が確定していれば、
背景画像記録手段213から背景画像を出力し処理を終
了する。画像表示装置215はテレビモニタ等の表示装
置であり、背景作成終了判定手段214から出力された
背景画像IBGを表示する。
The background registration unit 212 records the pixel value of the input image at the time of the pixel registered in the new registration mask 208 in the background image recording unit 213. The background creation end determination means 214 determines whether or not the background image has been completely created. If there is a pixel that has not been created yet, the process is continued. If all the pixels are determined,
The background image is output from the background image recording unit 213, and the process ends. The image display device 215 is a display device such as a television monitor, and displays the background image IBG output from the background creation end determination unit 214.

【0037】以下、この第2実施例の背景画像生成シス
テムの動作について説明する。
The operation of the background image generation system according to the second embodiment will be described below.

【0038】撮像装置201は、道路及び路上を走行す
る車両といった背景及び物体からなる動画像を撮影す
る。撮像装置201で撮影された動画像は、フレームバ
ッファ202へ入力される。フレームバッファ202は
m枚(m≧2)の画像を格納可能なリングバッファであ
る。
The imaging device 201 captures a moving image composed of a background and an object such as a road and a vehicle running on the road. A moving image captured by the imaging device 201 is input to the frame buffer 202. The frame buffer 202 is a ring buffer capable of storing m (m ≧ 2) images.

【0039】変化検出手段203において当該時刻tの
入力画像とその1時刻前(t−1)の入力画像との差分
を求め、各画素の差分値の絶対値が閾値以上であれば
0、閾値以下であれば1であるような2値画像を作成
し、変化領域マスク204に記憶する。
The change detecting means 203 calculates a difference between the input image at the time t and the input image one time before (t-1), and if the absolute value of the difference value of each pixel is equal to or larger than the threshold value, 0; In the following case, a binary image that is 1 is created and stored in the change area mask 204.

【0040】次に、カウントバッファ更新手段205で
は変化領域マスク204を入力とし、カウントバッファ
206の内容を更新する。カウントバッファ206は、
入力画像サイズと同じ大きさ(画素数)を持ち、1画素
nbit(nビット)で構成されている。通常n=8
(0〜255)程度で十分である。また、処理開始時に
はすべて0に初期化されている。
Next, the count buffer updating means 205 receives the change area mask 204 and updates the contents of the count buffer 206. The count buffer 206
It has the same size (number of pixels) as the input image size, and is composed of one pixel nbit (n bits). Usually n = 8
(0-255) is sufficient. At the start of the process, all are initialized to zero.

【0041】カウントバッファ更新手段205では、変
化検出手段203で変化が検出されなかった画素(変化
領域マスク204で値1の画素)については、カウント
バッファ206において前記画素に対応する位置の値を
1カウントアップする。また、変化検出手段203で変
化が検出された画素(変化領域マスク204で値0の画
素)については、カウントバッファ206において前記
画素に対応する位置の値を0にリセットする。
In the count buffer updating means 205, for a pixel for which no change is detected by the change detecting means 203 (a pixel having a value of 1 in the change area mask 204), the value of a position corresponding to the pixel in the count buffer 206 is set to 1 Count up. Further, for a pixel for which a change has been detected by the change detecting means 203 (a pixel having a value of 0 in the change area mask 204), the value of a position corresponding to the pixel is reset to 0 in the count buffer 206.

【0042】従って、カウントバッファ206の各画素
の値は、入力された動画像において画素毎に変化が検出
されなかった期間を表している。つまり、カウントバッ
ファ206の画素値が11であれば、入力された動画像
において、その位置の画素値は時刻(t−10)から現
在の時刻tまで変化が無かったことを表す。
Accordingly, the value of each pixel in the count buffer 206 represents a period during which no change is detected for each pixel in the input moving image. That is, if the pixel value of the count buffer 206 is 11, it indicates that the pixel value at that position in the input moving image has not changed from the time (t−10) to the current time t.

【0043】背景マスク更新手段207では、カウント
バッファ206の各画素について背景画像への登録条件
を満たしているか否かを判定し、満たしていれば新規登
録マスク208へ当該画素を登録し、背景確定マスク2
09へ背景画像への登録が確定したことを示すフラグが
記録される。
The background mask updating means 207 determines whether or not each pixel in the count buffer 206 satisfies the registration condition for the background image, and if so, registers the pixel in the new registration mask 208 and determines the background. Mask 2
At 09, a flag indicating that registration with the background image has been confirmed is recorded.

【0044】ここで、新規登録マスク208及び背景確
定マスク209は各々入力画像と同じサイズの2値画像
であり、背景確定マスク209はシステム起動時に全て
の画素値が1に初期化されており、値1の画素は背景画
像へは未登録であり、値0の画素は既に背景画像へ登録
されていることを示す。
Here, each of the newly registered mask 208 and the background fixed mask 209 is a binary image having the same size as the input image, and all pixel values of the background fixed mask 209 are initialized to 1 when the system is started. A pixel having a value of 1 indicates that the pixel has not been registered in the background image, and a pixel having a value of 0 indicates that the pixel has been registered in the background image.

【0045】新規登録マスク208は新しい入力画像が
入力される毎に0に初期化される。カウントバッファ2
06の値が予め閾値記憶手段210に記憶されている閾
値T以上であり、かつ背景確定マスク209の値が1で
あるという条件を満たす画素が存在すれば、新規登録マ
スク208において前記画素に対応する位置の画素値を
1とし、背景確定マスク209の画素値を0とする。す
なわち、所定の時間入力画像において変化が検出され
ず、過去に背景画像へ登録されていない画素について新
規に背景画像への登録を行う。
The new registration mask 208 is initialized to 0 each time a new input image is input. Count buffer 2
If there is a pixel that satisfies the condition that the value of “06” is equal to or larger than the threshold value T stored in the threshold value storage unit 210 in advance and the value of the background confirmation mask 209 is 1, the newly registered mask 208 corresponds to the pixel. The pixel value of the position to be set is set to 1 and the pixel value of the background fixed mask 209 is set to 0. That is, a pixel that has not been detected in the input image for a predetermined time and has not been registered in the background image in the past is newly registered in the background image.

【0046】閾値変更手段211では、背景確定マスク
209で確定されていない画素がノイズか否かを判別
し、ノイズであれば閾値記憶手段210に記憶されてい
る閾値Tの値をkだけ小さくした(T−k)を新たに閾
値として閾値記憶手段210に格納する。もしノイズで
なければ、閾値変更は行わない。
The threshold value changing means 211 determines whether or not a pixel not determined by the background determination mask 209 is noise. If the pixel is noise, the value of the threshold value T stored in the threshold value storage means 210 is reduced by k. (T−k) is newly stored in the threshold value storage unit 210 as a threshold value. If it is not noise, the threshold is not changed.

【0047】背景確定マスク209で確定されていない
画素がノイズであるか否かの判定は、背景確定マスク2
09に対して収縮処理(画像処理の基本技法、技術評論
社、長谷川・輿水他共著 など多数の解説書に紹介され
ている手法)を施し、この結果得られた画像中に値1の
画素が存在するか否かを調べ、1つも存在しなければ背
景確定マスク209において確定されていない画素はす
べてノイズであると判定される。ここで収縮とは、背景
確定マスク209をf(i,j)、その処理結果をg
(i,j)としたとき、次のような処理を行う。
The determination as to whether or not the pixel not determined by the background determination mask 209 is noise is made by the background determination mask 2
09 is subjected to contraction processing (a basic technique of image processing, a technique introduced in many commentary books such as Technical Review Company, Hasegawa and Koshimizu, etc.), and a pixel having a value of 1 is obtained in the resulting image. It is checked whether or not there is any pixel, and if there is no pixel, all pixels that have not been determined in the background determination mask 209 are determined to be noise. Here, the contraction means that the background fixed mask 209 is f (i, j) and the processing result is g
When (i, j) is set, the following processing is performed.

【0048】g(i,j)={0:f(i,j)=0あ
るいはf(i,j)の4近傍(あるいは8近傍)の何れ
かが0のとき。1はその他のときを示す。この処理によ
り、面積の小さなノイズ成分が除去される。
G (i, j) = {0: When f (i, j) = 0 or any of the four neighborhoods (or eight neighborhoods) of f (i, j) is 0. 1 indicates other times. By this processing, a noise component having a small area is removed.

【0049】このように、背景確定マスク209で確定
されていない画素がノイズであるか否かを判定し、ノイ
ズであると判定された場合は載置Tを小さくすることに
より、背景の確定を早めることが可能となる。
As described above, it is determined whether or not a pixel that has not been determined by the background determination mask 209 is noise. If it is determined that the pixel is noise, the placement T is reduced to determine the background. It is possible to haveten it.

【0050】なお、ここではノイズか否かの判定を行う
手法について記載したが、単純に背景確定マスク209
で確定されていない画素の総数が所定の数よりも少なく
なった場合に閾値を変更するようにしてもよい。また、
閾値の変更も1段階ではなく、数段階に分けて変更する
ことも可能である。
Although the method for determining whether noise is present has been described above, the background determination mask 209 is simply described.
The threshold value may be changed when the total number of pixels that have not been determined in the step becomes smaller than a predetermined number. Also,
The threshold value can be changed not in one step but in several steps.

【0051】背景登録手段212では、新規登録マスク
208において値1の画素が存在すれば、フレームバッ
ファ202に格納されている当該時刻の入力画像の前記
画素に対応する位置の画素値を背景画像記録手段213
にコピーする。
If a pixel having a value of 1 exists in the newly registered mask 208, the background registration unit 212 records the pixel value at the position corresponding to the pixel of the input image at that time stored in the frame buffer 202 as the background image. Means 213
Copy to

【0052】最後に、背景作成終了判定手段214では
背景確定マスク209において値1の画素が存在するか
否かの判定を行い、もし値1の画素が1つでも存在すれ
ば、背景画像は不完全であるとして処理を継続する。値
1の画素が存在しなければ、背景画像の作成が完了した
として、画像を出力し処理を終了する。画像表示装置2
15では、背景作成終了判定手段214から出力される
背景画像IBGを表示する。
Finally, the background creation end determination means 214 determines whether or not a pixel having a value of 1 exists in the background determination mask 209. If at least one pixel having a value of 1 exists, the background image is not determined. Processing continues as complete. If the pixel having the value 1 does not exist, it is determined that the creation of the background image has been completed, the image is output, and the process ends. Image display device 2
At 15, the background image IBG output from the background creation end determination means 214 is displayed.

【0053】このように第2実施例の背景画像生成シス
テムによれば、都市部のような交通量の多い道路で、移
動物体の存在しない画像の取得が困難である場合(常に
移動物体が存在する画像しか撮影できない場合)におい
ても、ITVカメラ等の撮像装置から得られる動画像を
用いて、高速に良好な背景画像を生成することが可能と
なる。また、撮像画像にノイズが多く画素値が不安定な
場合でも、高速に良好な背景画像を生成することが可能
である。
As described above, according to the background image generation system of the second embodiment, it is difficult to obtain an image without a moving object on a road with a large traffic volume such as an urban area. (Where only images to be captured can be captured), it is possible to generate a good background image at high speed using a moving image obtained from an imaging device such as an ITV camera. Further, even when the picked-up image has much noise and the pixel value is unstable, a good background image can be generated at high speed.

【0054】次に、本発明の第3実施例について説明す
る。
Next, a third embodiment of the present invention will be described.

【0055】この第3実施例は、背景を作成中に天候の
変化などにより背景の明るさが変化する場合でも、その
変化を吸収して、正確な背景画像を生成するようにした
ものである。
In the third embodiment, even when the brightness of the background changes due to a change in weather or the like while the background is being created, the change is absorbed and an accurate background image is generated. .

【0056】図4は本発明の第3実施例を示す背景画像
生成システムのブロック図である。
FIG. 4 is a block diagram of a background image generation system showing a third embodiment of the present invention.

【0057】この実施例の背景画像生成システムは、背
景及び物体からなる映像を撮影するように設置されたI
TVカメラ等の撮像装置301から動画像が背景画像生
成装置315に入力される。画像表示装置314はTV
モニタ等の表示装置であり、背景画像生成装置315に
おいて生成された背景画像を表示する。背景画像生成装
置315は、フレームバッファ302、変化検出手段3
03、変化領域マスク304、カウントバッファ更新手
段305、カウントバッファ306、背景マスク更新手
段307、新規登録マスク308、背景確定マスク30
9、閾値記憶手段310、背景更新手段311、背景画
像記憶手段312、背景作成終了判定手段313から構
成される。
The background image generation system according to the present embodiment is provided with an
A moving image is input to the background image generation device 315 from the imaging device 301 such as a TV camera. The image display device 314 is a TV
It is a display device such as a monitor, and displays the background image generated by the background image generation device 315. The background image generation device 315 includes the frame buffer 302, the change detection unit 3
03, change area mask 304, count buffer updating means 305, count buffer 306, background mask updating means 307, new registration mask 308, background fixed mask 30
9, a threshold storage unit 310, a background update unit 311, a background image storage unit 312, and a background creation end determination unit 313.

【0058】フレームバッファ302は、撮像装置30
1から得た入力画像を記憶する。変化検出手段303で
は入力画像に関して時間的に変化する移動物体を検出
し、検出結果が2値画像として変化領域マスク304に
記憶される。
[0058] The frame buffer 302 is
The input image obtained from step 1 is stored. The change detection unit 303 detects a moving object that changes with time in the input image, and stores the detection result in the change area mask 304 as a binary image.

【0059】カウントバッファ更新手段305では、変
化領域マスク304を入力とし、カウントバッファ30
6の内容を更新する。また背景マスク更新手段307で
は、カウントバッファ306において背景画像への新規
登録条件を満たす画素が存在するか否かの判定を行い、
条件を満たす画素が存在する場合は、その画素を新規登
録マスク308へ登録し、登録された画素は登録済みで
あることを示すために背景確定マスク309に登録済み
フラグを記録する。閾値記憶手段310には前記判定を
行うための閾値が記憶されている。
The count buffer updating means 305 receives the change area mask 304 as an input, and
6 is updated. The background mask updating unit 307 determines whether or not there is a pixel in the count buffer 306 that satisfies the new registration condition for the background image.
If there is a pixel that satisfies the condition, the pixel is registered in the new registration mask 308, and a registered flag is recorded in the background determination mask 309 to indicate that the registered pixel has been registered. The threshold value storage unit 310 stores a threshold value for making the above determination.

【0060】背景更新手段311では、新規登録マスク
308に登録されている画素については当該時刻の入力
画像の画素値を背景画像記録手段312に記録する。ま
た、既に背景画像として登録されている画素については
入力画像に応じて更新を行う。
The background updating unit 311 records the pixel value of the input image at the time of the pixel registered in the new registration mask 308 in the background image recording unit 312. In addition, a pixel already registered as a background image is updated according to the input image.

【0061】背景作成終了判定手段313では、背景画
像が完全に作成されたか否かを判定し、まだ作成されて
いない画素が存在すれば、処理を継続し、全ての画素が
確定しておれば背景画像IBGを出力し処理を終了する。
The background creation completion determination means 313 determines whether or not the background image has been completely created. If there is a pixel that has not been created yet, the process is continued. The background image IBG is output, and the process ends.

【0062】画像表示装置314はテレビモニタ等の表
示装置であり、背景作成終了判定手段313から出力さ
れた背景画像IBGを表示する。
The image display device 314 is a display device such as a television monitor, and displays the background image IBG output from the background creation end determination means 313.

【0063】以下、この背景画像生成システムの動作に
ついて説明する。
Hereinafter, the operation of the background image generation system will be described.

【0064】撮像装置301は、道路及び路上を走行す
る車両といった背景及び物体からなる動画像を撮影す
る。撮像装置301で撮影された動画像は、フレームバ
ッファ302へ入力される。フレームバッファ302は
m枚(m≧2)の画像を格納可能なリングバッファであ
る。
The imaging device 301 captures a moving image composed of a background and an object such as a road and a vehicle running on the road. A moving image captured by the imaging device 301 is input to the frame buffer 302. The frame buffer 302 is a ring buffer capable of storing m (m ≧ 2) images.

【0065】変化検出手段303において当該時刻tの
入力画像とその1時刻前(t−1)の入力画像との差分
を求め、各画素の差分値の絶対値が閾値以上であれば
0、閾値以下であれば1であるような2値画像を作成
し、変化領域マスク304に記憶する。
The change detecting means 303 obtains a difference between the input image at the time t and the input image one time before (t-1), and 0 if the absolute value of the difference value of each pixel is equal to or larger than the threshold, In the following case, a binary image that is 1 is created and stored in the change area mask 304.

【0066】次に、カウントバッファ更新手段305で
は変化領域マスク304を入力とし、カウントバッファ
306の内容を更新する。カウントバッファ306は、
入力画像サイズと同じ大きさ(画素数)を持ち、1画素
nbit(nビット)で構成されている。通常n=8
(0〜255)程度で十分である。また、処理開始時に
はすべて0に初期化されている。
Next, the count buffer updating means 305 receives the change area mask 304 as an input and updates the contents of the count buffer 306. The count buffer 306
It has the same size (number of pixels) as the input image size, and is composed of one pixel nbit (n bits). Usually n = 8
(0-255) is sufficient. At the start of the process, all are initialized to zero.

【0067】カウントバッファ更新手段305では、変
化検出手段303で変化が検出されなかった画素(変化
領域マスク304で値1の画素)についてはカウントバ
ッファ306において前記画素に対応する位置の値を1
カウントアップする。また、変化検出手段303で変化
が検出された画素(変化領域マスク304で値0の画
素)については、カウントバッファ306において前記
画素に対応する位置の値を0にリセットする。
The count buffer updating means 305 sets the value of the pixel corresponding to the pixel whose change is not detected by the change detecting means 303 (the pixel having a value of 1 in the change area mask 304) to 1 in the count buffer 306.
Count up. Further, for a pixel for which a change has been detected by the change detecting means 303 (a pixel having a value of 0 in the change area mask 304), the value of a position corresponding to the pixel is reset to 0 in the count buffer 306.

【0068】従って、カウントバッファ306の各画素
の値は、入力された動画像において画素毎に変化が検出
されなかった期間を表している。つまり、カウントバッ
ファ306の画素値が11であれば、入力された動画像
において、その位置の画素値は時刻(t−10)から現
在の時刻tまで変化が無かったことを表す。
Accordingly, the value of each pixel in the count buffer 306 represents a period during which no change is detected for each pixel in the input moving image. That is, if the pixel value of the count buffer 306 is 11, it indicates that the pixel value at that position in the input moving image has not changed from the time (t−10) to the current time t.

【0069】背景マスク更新手段307では、カウント
バッファ306の各画素について背景画像への登録条件
を満たしているか否かを判定し、満たしていれば新規登
録マスク308へ当該画素を登録し、背景確定マスク3
09へ背景画像への登録が確定したことを示すフラグが
記録される。ここで、新規登録マスク308および背景
確定マスク309は各々入力画像と同じサイズの2値画
像であり、背景確定マスク309はシステム起動時に全
ての画素値が1に初期化されており、値1の画素は背景
画像へは未登録であり、値0の画素は既に背景画像へ登
録されていることを示す。
The background mask updating means 307 determines whether or not each pixel of the count buffer 306 satisfies the registration condition for the background image, and if so, registers the pixel in the new registration mask 308 and determines the background. Mask 3
At 09, a flag indicating that registration with the background image has been confirmed is recorded. Here, the new registration mask 308 and the background determination mask 309 are each a binary image having the same size as the input image, and all pixel values of the background determination mask 309 are initialized to 1 when the system is started. The pixel has not been registered in the background image, and a pixel having a value of 0 indicates that the pixel has already been registered in the background image.

【0070】新規登録マスク308は新しい入力画像が
入力される毎に0に初期化される。カウントバッファ3
06の値が予め閾値記憶手段310に記憶されている閾
値T以上であり、かつ背景確定マスク309の値が1で
あるという条件を満たす画素が存在すれば、新規登録マ
スク308において前記画素に対応する位置の画素値を
1とし、背景確定マスク309の画素値を0とする。す
なわち、所定の時間入力画像において変化が検出され
ず、過去に背景画像へ登録されていない画素について新
規に背景画像への登録を行う。
The new registration mask 308 is initialized to 0 each time a new input image is input. Count buffer 3
If there is a pixel satisfying the condition that the value of “06” is equal to or greater than the threshold value T stored in the threshold value storage unit 310 in advance and the value of the background determination mask 309 is 1, the newly registered mask 308 corresponds to the pixel The pixel value at the position to be set is set to 1 and the pixel value of the background fixed mask 309 is set to 0. That is, a pixel that has not been detected in the input image for a predetermined time and has not been registered in the background image in the past is newly registered in the background image.

【0071】背景更新手段311では、新規登録マスク
308において値1の画素が存在すれば、フレームバッ
ファ302に格納されている当該時刻の入力画像の前記
画素に対応する位置の画素値を背景画像記録手段312
にコピーする。さらに、既に背景画像記録手段312に
登録されている画素については更新を行う。背景画像の
更新は以下のようにして行う。
If there is a pixel having a value of 1 in the newly registered mask 308, the background updating means 311 records the pixel value at the position corresponding to the pixel of the input image at that time stored in the frame buffer 302 in the background image. Means 312
Copy to Further, the pixels already registered in the background image recording unit 312 are updated. The updating of the background image is performed as follows.

【0072】まず、フレームバッファ302に格納され
ている当該時刻の入力画像と背景画像との差分を求め、
各画素の差分値の絶対値が閾値以上であれば0、閾値以
下であれば1であるような2値画像を作成する。この画
像において画素値が1であり、かつ背景確定マスク30
9において値が0である画素について、以下の式により
背景画像を更新する。
First, the difference between the input image at that time stored in the frame buffer 302 and the background image is obtained.
A binary image is created such that the absolute value of the difference value of each pixel is equal to or greater than a threshold value and is equal to 0 if the absolute value is equal to or less than the threshold value. In this image, the pixel value is 1 and the background fixed mask 30
The background image is updated by the following equation for the pixel whose value is 0 in 9:

【0073】Bt (i,j)=It (i,j)×〔1−
exp(−1/C)〕+Bt-1 (i,j)×exp(−
1/C) ここでBt (i,j)は更新後の背景画像、B
t-1 (i,j)は更新前の背景画像、It (i,j)は
当該時刻の入力画像、Cは時定数を表している。
B t (i, j) = I t (i, j) × [1-
exp (−1 / C)] + B t−1 (i, j) × exp (−
1 / C) where B t (i, j) is the updated background image,
t-1 (i, j) is updated before the background image, I t (i, j) is the input image of the time, C is represent time constants.

【0074】このように、既に背景画像として確定した
画素の値を最新の入力画像を用いて更新することによ
り、背景作成中に天候の変動等の理由により背景が変動
した場合でも、その変動を吸収することが可能となる。
As described above, by updating the value of the pixel already determined as the background image by using the latest input image, even if the background fluctuates due to the fluctuation of the weather during the creation of the background, the fluctuation can be reduced. It becomes possible to absorb.

【0075】最後に、背景作成終了判定手段313では
背景確定マスク309において値1の画素が存在するか
否かの判定を行い、もし値1の画素が1つでも存在すれ
ば、背景画像は不完全であるとして処理を継続する。値
1の画素が存在しなければ、背景画像の作成が完了した
として、画像を出力し処理を終了する。画像表示装置3
14では、背景作成終了判定手段313から出力される
背景画像IBGを表示する。
Finally, the background creation end determination means 313 determines whether or not a pixel having a value of 1 exists in the background determination mask 309. If at least one pixel having a value of 1 exists, the background image is not determined. Processing continues as complete. If the pixel having the value 1 does not exist, it is determined that the creation of the background image has been completed, the image is output, and the process ends. Image display device 3
At 14, the background image IBG output from the background creation end determination means 313 is displayed.

【0076】このように、第3実施例の背景画像生成シ
ステムによれば、都市部のような交通量の多い道路で移
動物体の存在しない画像の取得が困難であり、常に移動
物体が存在する画像しか撮影できない場合においても、
ITVカメラ等の撮像装置から得られる動画像を用い
て、高速に良好な背景画像を生成することが可能とな
る。
As described above, according to the background image generation system of the third embodiment, it is difficult to obtain an image without a moving object on a road with a large traffic volume such as an urban area, and a moving object always exists. Even when only images can be taken,
Using a moving image obtained from an imaging device such as an ITV camera, a good background image can be generated at high speed.

【0077】また、背景画像の生成途中に天候の変動な
どの理由により背景が変動したとしても、既に登録され
ている画素に関しては最新の入力画像を用いて更新を行
うため、たとえ背景の変動前に背景画像として登録され
た画素であっても、その変動を吸収することが可能であ
る。
Even if the background fluctuates during the generation of the background image due to a change in the weather or the like, the already registered pixels are updated using the latest input image. Even if the pixel is registered as a background image, the fluctuation can be absorbed.

【0078】次に、本発明の第4実施例について説明す
る。
Next, a fourth embodiment of the present invention will be described.

【0079】この第4実施例は、背景画像の再作成およ
び背景画像生成の強制終了等のユーザからのコマンド入
力を可能とし、ユーザの所望する背景画像を生成するよ
うにしたものである。
In the fourth embodiment, it is possible to input a command from the user, such as re-creating a background image and forcibly terminating generation of a background image, and generate a background image desired by the user.

【0080】図5は本発明の第4実施例を示す背景画像
生成システムのブロック図である。
FIG. 5 is a block diagram of a background image generating system showing a fourth embodiment of the present invention.

【0081】この実施例の背景画像生成システムは、背
景及び物体からなる映像を撮影するように設置されたI
TVカメラ等の撮像装置401において動画像がフレー
ムバッファ402に入力される。撮像装置401から動
画像が背景画像生成装置416に入力される。画像表示
装置414はTVモニタ等の表示装置であり、背景画像
生成装置416において生成された背景画像を表示す
る。背景画像生成装置416は、フレームバッファ40
2、変化検出手段403、変化領域マスク404、カウ
ントバッファ更新手段405、カウントバッファ40
6、背景マスク更新手段407、新規登録マスク40
8、背景確定マスク409、閾値記憶手段410、背景
更新手段411、背景画像記憶手段412、背景作成終
了判定手段413から構成される。
The background image generating system according to the present embodiment is provided with an I / O system installed to capture an image composed of a background and an object.
A moving image is input to a frame buffer 402 in an imaging device 401 such as a TV camera. A moving image is input from the imaging device 401 to the background image generation device 416. The image display device 414 is a display device such as a TV monitor, and displays the background image generated by the background image generation device 416. The background image generation device 416 includes the frame buffer 40
2. Change detection means 403, change area mask 404, count buffer update means 405, count buffer 40
6. Background mask updating means 407, newly registered mask 40
8, a background determination mask 409, a threshold storage unit 410, a background update unit 411, a background image storage unit 412, and a background creation end determination unit 413.

【0082】フレームバッファ402は、撮像装置40
1から得た入力画像を記憶する。変化検出手段403で
は撮像画像に関して時間的に変化する移動物体を検出
し、検出結果が2値画像として変化領域マスク404に
記憶される。カウントバッファ更新手段405では、変
化領域マスク404を入力とし、カウントバッファ40
6の内容を更新する。
The frame buffer 402 includes the image pickup device 40
The input image obtained from step 1 is stored. The change detection unit 403 detects a moving object that changes with time in the captured image, and stores the detection result as a binary image in the change area mask 404. The count buffer updating means 405 receives the change area mask 404 as an input and
6 is updated.

【0083】また、背景マスク更新手段407では、カ
ウントバッファ406において背景画像への新規登録条
件を満たす画素が存在するか否かの判定を行い、条件を
満たす画素が存在する場合は、その画素を新規登録マス
ク408へ登録し、登録された画素は登録済みであるこ
とを示すために背景確定マスク409に登録済みフラグ
を記録する。閾値記憶手段410には前記判定を行うた
めの閾値が記憶されている。
The background mask updating means 407 determines whether or not there is a pixel which satisfies the condition for newly registering a background image in the count buffer 406. The registered pixel is registered in the newly registered mask 408, and a registered flag is recorded in the background fixed mask 409 to indicate that the registered pixel has been registered. The threshold value storage unit 410 stores a threshold value for making the determination.

【0084】背景更新手段411では、新規登録マスク
408に登録されている画素については当該時刻の入力
画像の画素値を背景画像記録手段412に記録する。ま
た、既に背景画像として登録されている画素については
入力画像に応じて更新を行う。
The background updating unit 411 records the pixel value of the input image at the time of the pixel registered in the new registration mask 408 in the background image recording unit 412. In addition, a pixel already registered as a background image is updated according to the input image.

【0085】背景作成終了判定手段413では、背景画
像が完全に作成されたか否かを判定し、まだ作成されて
いない画素が存在すれば、処理を継続し、全ての画素が
確定しておれば背景画像を出力し処理を終了する。
The background creation completion determination means 413 determines whether or not the background image has been completely created. If there is a pixel that has not been created yet, the process is continued. The background image is output, and the process ends.

【0086】画像表示装置414はテレビモニタ等の表
示装置である。また、入力手段415はキーボード等の
入力装置であり、ユーザからのコマンド入力を可能とす
る。
[0086] The image display device 414 is a display device such as a television monitor. The input unit 415 is an input device such as a keyboard, and enables a user to input a command.

【0087】以下、この背景画像生成システムの動作に
ついて説明する。
Hereinafter, the operation of the background image generation system will be described.

【0088】撮像装置401は、道路および路上を走行
する車両といった背景及び物体からなる動画像を撮影す
る。撮像装置401で撮影された動画像は、フレームバ
ッファ402へ入力される。フレームバッファ402は
m枚(m≧2)の画像を格納可能なリングバッファであ
る。
The imaging device 401 captures a moving image composed of a background and an object such as a road and a vehicle running on the road. A moving image captured by the imaging device 401 is input to the frame buffer 402. The frame buffer 402 is a ring buffer capable of storing m (m ≧ 2) images.

【0089】変化検出手段403において当該時刻tの
入力画像とその1時刻前(t−1)の入力画像との差分
を求め、各画素の差分値の絶対値が閾値以上であれば
0、閾値以下であれば1であるような2値画像を作成
し、変化領域マスク404に記憶する。
The change detecting means 403 obtains the difference between the input image at the time t and the input image one time before (t-1), and if the absolute value of the difference value of each pixel is equal to or larger than the threshold value, 0; In the following case, a binary image that is 1 is created and stored in the change area mask 404.

【0090】次に、カウントバッファ更新手段405で
は変化領域マスク404を入力とし、カウントバッファ
406の内容を更新する。カウントバッファ406は、
入力画像サイズと同じ大きさ(画素数)を持ち、1画素
nbit(nビット)で構成されている。通常n=8
(0〜255)程度で十分である。また、処理開始時に
はすべて0に初期化されている。
Next, the count buffer updating means 405 receives the change area mask 404 as input and updates the contents of the count buffer 406. The count buffer 406
It has the same size (number of pixels) as the input image size, and is composed of one pixel nbit (n bits). Usually n = 8
(0-255) is sufficient. At the start of the process, all are initialized to zero.

【0091】カウントバッファ更新手段405では、変
化検出手段403で変化が検出されなかった画素(変化
領域マスク404で値1の画素)についてはカウントバ
ッファ406において前記画素に対応する位置の値を1
カウントアップする。また、変化検出手段403で変化
が検出された画素(変化領域マスク404で値0の画
素)については、カウントバッファ406において前記
画素に対応する位置の値を0にリセットする。
The count buffer updating means 405 sets the value of the pixel corresponding to the pixel whose change is not detected by the change detecting means 403 (the pixel having the value 1 in the change area mask 404) to 1 in the count buffer 406.
Count up. Also, for the pixel for which a change has been detected by the change detecting means 403 (the pixel having a value of 0 in the change area mask 404), the value of the position corresponding to the pixel in the count buffer 406 is reset to 0.

【0092】従って、カウントバッファ406の各画素
の値は、入力された動画像において画素毎に変化が検出
されなかった期間を表している。つまり、カウントバッ
ファ406の画素値が11であれば、入力された動画像
において、その位置の画素値は時刻(t−10)から現
在の時刻tまで変化が無かったことを表す。
Accordingly, the value of each pixel in the count buffer 406 represents a period during which no change is detected for each pixel in the input moving image. That is, if the pixel value of the count buffer 406 is 11, it indicates that the pixel value at that position in the input moving image has not changed from the time (t−10) to the current time t.

【0093】背景マスク更新手段407では、カウント
バッファ406の各画素について背景画像への登録条件
を満たしているか否かを判定し、満たしていれば新規登
録マスク408へ当該画素を登録し、背景確定マスク4
09へ背景画像への登録が確定したことを示すフラグが
記録される。
The background mask updating means 407 determines whether or not each pixel in the count buffer 406 satisfies the registration condition for the background image, and if so, registers the pixel in the new registration mask 408 and determines the background. Mask 4
At 09, a flag indicating that registration with the background image has been confirmed is recorded.

【0094】ここで、新規登録マスク408および背景
確定マスク409は各々入力画像と同じサイズの2値画
像であり、背景確定マスク409はシステム起動時に全
ての画素値が1に初期化されており、値1の画素は背景
画像へは未登録であり、値0の画素は既に背景画像へ登
録されていることを示す。
Here, the new registration mask 408 and the background determination mask 409 are each a binary image having the same size as the input image, and all pixel values of the background determination mask 409 are initialized to 1 when the system is started. A pixel having a value of 1 indicates that the pixel has not been registered in the background image, and a pixel having a value of 0 indicates that the pixel has been registered in the background image.

【0095】新規登録マスク408は新しい入力画像が
入力される毎に0に初期化される。カウントバッファ4
06の値が予め閾値記憶手段410に記憶されている閾
値T以上であり、かつ背景確定マスク409の値が1で
あるという条件を満たす画素が存在すれば、新規登録マ
スク408において前記画素に対応する位置の画素値を
1とし、背景確定マスク409の画素値を0とする。す
なわち、所定の時間入力画像において変化が検出され
ず、過去に背景画像へ登録されていない画素について新
規に背景画像への登録を行う。
The new registration mask 408 is initialized to 0 each time a new input image is input. Count buffer 4
If there is a pixel satisfying the condition that the value of 06 is equal to or greater than the threshold value T stored in the threshold value storage means 410 in advance and the value of the background confirmation mask 409 is 1, the newly registered mask 408 corresponds to the pixel. The pixel value of the position to be set is set to 1 and the pixel value of the background fixed mask 409 is set to 0. That is, a pixel that has not been detected in the input image for a predetermined time and has not been registered in the background image in the past is newly registered in the background image.

【0096】背景更新手段411では、新規登録マスク
408において値1の画素が存在すれば、フレームバッ
ファ402に格納されている当該時刻の入力画像の前記
画素に対応する位置の画素値を背景画像記録手段412
にコピーする。さらに、既に背景画像記録手段412に
登録されている画素については更新を行う。背景画像の
更新は以下のようにして行う。
If a pixel having a value of 1 exists in the newly registered mask 408, the background updating means 411 records the pixel value at the position corresponding to the pixel of the input image at that time stored in the frame buffer 402 as the background image. Means 412
Copy to Further, the pixel already registered in the background image recording unit 412 is updated. The updating of the background image is performed as follows.

【0097】まず、フレームバッファ402に格納され
ている当該時刻の入力画像と背景画像IBGとの差分を求
め、各画素の差分値の絶対値が閾値以上であれば0、閾
値以下であれば1であるような2値画像を作成する。こ
の画像において画素値が1であり、かつ背景確定マスク
409において値が0である画素について、以下の式に
より背景画像を更新する。
First, the difference between the input image at that time stored in the frame buffer 402 and the background image IBG is obtained, and if the absolute value of the difference value of each pixel is equal to or greater than the threshold value, 0; Create a binary image that is 1. For a pixel having a pixel value of 1 in this image and a value of 0 in the background confirmation mask 409, the background image is updated by the following equation.

【0098】Bt (i,j)=It (i,j)×〔1−
exp(−1/C)〕+Bt-1 (i,j)×exp(−
1/C) ここでBt (i,j)は更新後の背景画像、B
t-1 (i,j)は更新前の背景画像、It (i,j)は
当該時刻の入力画像、Cは時定数を表している。
B t (i, j) = I t (i, j) × [1-
exp (−1 / C)] + B t−1 (i, j) × exp (−
1 / C) where B t (i, j) is the updated background image,
t-1 (i, j) is updated before the background image, I t (i, j) is the input image of the time, C is represent time constants.

【0099】このように、既に背景画像として確定した
画素の値を最新の入力画像を用いて更新することによ
り、背景作成中に天候の変動等の理由により背景が変動
した場合でも、その変動を吸収することが可能となる。
As described above, by updating the value of a pixel already determined as a background image using the latest input image, even if the background fluctuates due to a change in weather or the like during creation of the background, the fluctuation can be reduced. It becomes possible to absorb.

【0100】背景作成終了判定手段413では背景確定
マスク409において値1の画素が存在するか否かの判
定を行い、もし値1の画素が1つでも存在すれば背景画
像は不完全であるとして処理を継続する。値1の画素が
存在しなければ、背景画像の作成が完了したとして、処
理を終了する。また、背景作成終了判定手段413では
フレームバッファ402に記憶されている当該時刻の入
力画像、背景画像IBGの中間結果および背景確定マスク
409を合成し、逐次出力する。
The background creation end determination means 413 determines whether or not a pixel having a value of 1 exists in the background determination mask 409. If at least one pixel having a value of 1 exists, the background image is determined to be incomplete. Continue processing. If the pixel having the value 1 does not exist, it is determined that the creation of the background image has been completed, and the process ends. In addition, the background creation end determination unit 413 combines the input image at that time, the intermediate result of the background image IBG , and the background determination mask 409 stored in the frame buffer 402 and sequentially outputs them.

【0101】画像表示装置414は、背景作成終了判定
手段413から出力された合成画像を動画像として表示
する。
The image display device 414 displays the composite image output from the background creation end determination means 413 as a moving image.

【0102】図6はその画像表示装置414で表示され
る画像の一例を示しており、左上が入力画像501、右
上が背景画像502、右下が背景確定マスク503であ
る。また、背景画像において黒で塗りつぶされている領
域および背景確定マスクで白(値1)く塗りつぶされて
いる領域は、背景画像未確定領域504であり、背景画
像の作成途中であることを示している。
FIG. 6 shows an example of an image displayed on the image display device 414. The upper left is an input image 501, the upper right is a background image 502, and the lower right is a background fixed mask 503. Further, a region painted black in the background image and a region painted white (value 1) by the background confirmation mask are background image undetermined regions 504, which indicate that the background image is being created. I have.

【0103】入力手段415では、ユーザからの入力を
受け付けるインタフェースを供給する。入力手段415
がキーボードで実現されている場合は、例えば背景再生
コマンドをR(Redo)キーに、背景生成終了コマン
ドをI(Interrupt)キーといったように、必
要なコマンドを割り当てる。Rキーが押された場合は、
背景作成終了判定手段413においてコマンドが解釈さ
れ、背景画像記録手段412、背景確定マスク409、
新規登録マスク408、カウントバッファ406が初期
化され、背景生成処理を再度行う。
The input means 415 provides an interface for receiving an input from the user. Input means 415
Is realized by a keyboard, for example, necessary commands are assigned such as an R (Redo) key for a background reproduction command and an I (Interrupt) key for a background generation end command. If the R key is pressed,
The command is interpreted by the background creation end determination unit 413, and the background image recording unit 412, the background fixed mask 409,
The new registration mask 408 and the count buffer 406 are initialized, and the background generation processing is performed again.

【0104】また、Iキーが押された場合も同様に背景
作成終了判定手段413でコマンドが解釈され、背景確
定マスク409で未確定(値1)の画素が存在すれば、
背景画像記録手段412においてその画素に対応する位
置にフレームバッファ402に記憶されている当該時刻
の入力画像の画素値をコピーし、背景生成の処理を終了
する。
Similarly, when the I key is pressed, the command is interpreted by the background creation end determination means 413, and if there is an undetermined (value 1) pixel in the background determination mask 409,
The background image recording unit 412 copies the pixel value of the input image at that time stored in the frame buffer 402 to a position corresponding to the pixel, and ends the background generation processing.

【0105】このようにユーザは、画像表示装置414
に表示されている像を目視で確認し、作成完了(作成途
中)した背景画像が所望するものと異なる、あるいは何
らかの理由により誤った背景画像が作成されたなどの場
合は背景再作成を指示することができる。また、既にユ
ーザが所望する領域の背景画像は確定し作成終了してい
るが、それ以外の領域に未確定の画素が1部残っている
ような場合、背景生成処理の終了を指示することができ
る。
As described above, the user operates the image display device 414.
Is visually checked, and if the completed background image is different from the desired background image or an erroneous background image is created for some reason, an instruction to recreate the background is issued. be able to. If the background image of the area desired by the user has already been determined and the creation has been completed, but one undetermined pixel remains in the other area, the end of the background generation processing may be instructed. it can.

【0106】このように、第4実施例の背景画像生成シ
ステムによれば、都市部のような交通量の多い道路で移
動物体の存在しない画像の取得が困難である場合(常に
移動物体が存在する画像しか撮影できない場合)におい
ても、ITVカメラ等の撮像装置から得られる動画像を
用いて、高速に良好な背景画像を生成することが可能と
なる。
As described above, according to the background image generation system of the fourth embodiment, it is difficult to obtain an image without a moving object on a road with a large traffic volume such as an urban area (when a moving object always exists). (Where only images to be captured can be captured), it is possible to generate a good background image at high speed using a moving image obtained from an imaging device such as an ITV camera.

【0107】更に、得られた背景画像がユーザの所望す
るものと異なる場合は背景画像の再生成を、既にユーザ
が所望する領域の背景画像は生成されており、それ以外
の領域に背景画像未確定の領域が存在する場合は背景画
像生成処理の終了を指示することができ、ユーザが装置
の簡単な制御を行えるようなインタフェースを供給する
ことが可能となる。
Further, when the obtained background image is different from the one desired by the user, the background image is regenerated, the background image of the area desired by the user has already been generated, and the background image has not been set in other areas. If the determined area exists, it is possible to instruct the end of the background image generation processing, and it is possible to provide an interface that allows the user to perform simple control of the apparatus.

【0108】また、本発明は上記実施例に限定されるも
のではなく、本発明の趣旨に基づき種々の変形が可能で
あり、それらを本発明の範囲から排除するものではな
い。
Further, the present invention is not limited to the above-described embodiment, and various modifications can be made based on the gist of the present invention, and they are not excluded from the scope of the present invention.

【0109】[0109]

【発明の効果】以上、詳細に説明したように、本発明に
よれば、以下のような効果を奏することができる。
As described above, according to the present invention, the following effects can be obtained.

【0110】(A)TVカメラを用いて交通流監視や侵
入監視等の基準画像として背景画像を用いるシステムに
おいて、たとえ画面内に移動物体が存在する場合におい
ても移動物体を除いた背景画像を生成し好適な背景画像
を得ることができる。
(A) In a system using a background image as a reference image such as a traffic flow monitor or an intrusion monitor using a TV camera, a background image excluding a moving object is generated even if a moving object exists in the screen. Thus, a suitable background image can be obtained.

【0111】(B)都市部のような交通量の多い道路で
移動物体の存在しない画像の取得が困難である場合(常
に移動物体が存在する画像しか撮影できない場合)にお
いても、ITVカメラ等の撮像装置から得られる動画像
を用いて、良好な背景画像を生成することが可能とな
る。
(B) Even when it is difficult to obtain an image without a moving object on a road with a lot of traffic such as an urban area (when only an image with a moving object can be photographed at all times), an ITV camera or the like may be used. Using the moving image obtained from the imaging device, it is possible to generate a good background image.

【0112】(C)都市部のような交通量の多い道路
で、移動物体の存在しない画像の取得が困難である場合
(常に移動物体が存在する画像しか撮影できない場合)
においても、ITVカメラ等の撮像装置から得られる動
画像を用いて、高速に良好な背景画像を生成することが
可能となる。また、撮像画像にノイズが多く画素値が不
安定な場合でも高速に良好な背景画像を生成することが
可能である。
(C) When it is difficult to obtain an image without a moving object on a road with a large traffic volume such as an urban area (when only an image with a moving object can always be captured)
Also, it is possible to generate a good background image at high speed using a moving image obtained from an imaging device such as an ITV camera. Further, even when the picked-up image has much noise and the pixel value is unstable, a good background image can be generated at high speed.

【0113】(D)都市部のような交通量の多い道路で
移動物体の存在しない画像の取得が困難であり、常に移
動物体が存在する画像しか撮影できない場合において
も、ITVカメラ等の撮像装置から得られる動画像を用
いて、高速に良好な背景画像を生成することが可能とな
る。また、背景画像の生成途中に天候の変動などの理由
により背景が変動したとしても、既に登録されている画
素に関しては最新の入力画像を用いて更新を行うため、
たとえ背景の変動前に背景画像として登録された画素で
あっても、その変動を吸収することが可能である。
(D) Even when it is difficult to obtain an image without a moving object on a road with a lot of traffic such as an urban area and can always photograph only an image with a moving object, an imaging device such as an ITV camera can be used. It is possible to generate a good background image at high speed using the moving image obtained from. Also, even if the background fluctuates during the generation of the background image due to weather fluctuation or the like, the already registered pixels are updated using the latest input image,
Even if a pixel is registered as a background image before the background change, the change can be absorbed.

【0114】(E)都市部のような交通量の多い道路で
移動物体の存在しない画像の取得が困難である場合(常
に移動物体が存在する画像しか撮影できない場合)にお
いても、ITVカメラ等の撮像装置から得られる動画像
を用いて、高速に良好な背景画像を生成することが可能
となる。また、得られた背景画像がユーザの所望するも
のと異なる場合は背景画像の再生成を、既にユーザが所
望する領域の背景画像は生成されており、それ以外の領
域に背景画像未確定の領域が存在する場合は背景画像生
成処理の終了を指示することができ、ユーザが装置の簡
単な制御を行えるようなインタフェースを供給すること
が可能となる。
(E) Even when it is difficult to obtain an image without a moving object on a road with a large traffic volume such as an urban area (when only an image with a moving object can be photographed at all times), an ITV camera or the like may be used. A good background image can be generated at high speed using a moving image obtained from the imaging device. If the obtained background image is different from the one desired by the user, the background image is regenerated. The background image of the area desired by the user has already been generated, and the undetermined background image is set in other areas. Exists, it is possible to instruct the end of the background image generation processing, and it is possible to supply an interface that allows the user to easily control the apparatus.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1実施例を示す背景画像生成システ
ムのブロック図である。
FIG. 1 is a block diagram of a background image generation system showing a first embodiment of the present invention.

【図2】本発明の第1実施例を示す背景画像生成システ
ムのカウントバッファの動作説明図である。
FIG. 2 is an explanatory diagram of an operation of a count buffer of the background image generation system according to the first embodiment of the present invention.

【図3】本発明の第2実施例を示す背景画像生成システ
ムのブロック図である。
FIG. 3 is a block diagram of a background image generation system showing a second embodiment of the present invention.

【図4】本発明の第3実施例を示す背景画像生成システ
ムのブロック図である。
FIG. 4 is a block diagram of a background image generation system showing a third embodiment of the present invention.

【図5】本発明の第4実施例を示す背景画像生成システ
ムのブロック図である。
FIG. 5 is a block diagram of a background image generation system showing a fourth embodiment of the present invention.

【図6】本発明の第4実施例を示す背景画像生成システ
ムの画像表示装置で表示される画像の一例を示す図であ
る。
FIG. 6 is a diagram illustrating an example of an image displayed on an image display device of a background image generation system according to a fourth embodiment of the present invention.

【符号の説明】[Explanation of symbols]

101,201,301,401 撮像装置 102,202,302,402 フレームバッファ 103,203,303,403 変化検出手段 104,204,304,404 変化領域マスク 105,205,305,405 カウントバッファ
更新手段 106,206,306,406 カウントバッファ 107,207,307,407 背景マスク更新手
段 108,208,308,408 新規登録マスク 109,209,309,409,503 背景確定
マスク 110,210,310,410 閾値記憶手段 111,212 背景登録手段 112,213,312,412 背景画像記録手段 113,214,313,413 背景作成終了判定
手段 114,215,314,414 画像表示装置 115,216,315,416 背景画像生成装置 211 閾値変更手段 311,411 背景更新手段 415 入力手段 501 入力画像 502 背景画像 504 背景画像未確定領域
101, 201, 301, 401 Imaging device 102, 202, 302, 402 Frame buffer 103, 203, 303, 403 Change detection means 104, 204, 304, 404 Change area mask 105, 205, 305, 405 Count buffer update means 106 , 206, 306, 406 Count buffer 107, 207, 307, 407 Background mask updating means 108, 208, 308, 408 New registration mask 109, 209, 309, 409, 503 Background determination mask 110, 210, 310, 410 Threshold value storage Means 111, 212 Background registration means 112, 213, 312, 412 Background image recording means 113, 214, 313, 413 Background creation end determination means 114, 215, 314, 414 Image display device 115, 216, 315, 41 6 Background Image Generation Device 211 Threshold Value Changing Unit 311, 411 Background Update Unit 415 Input Unit 501 Input Image 502 Background Image 504 Background Image Undetermined Area

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI テーマコート゛(参考) G06F 15/70 405 Fターム(参考) 5B057 AA19 BA02 DA16 DA20 DC32 5C054 CC00 CE12 FC01 FC04 FC12 FC15 FF03 GA04 GB14 HA18 HA30 5C084 AA01 AA06 BB01 BB31 DD12 GG52 GG54 GG65 GG78 5C087 AA08 AA19 EE06 EE07 EE14 GG02 GG06 GG18 GG19 GG31 GG43 5L096 BA02 CA02 EA37 GA10 GA51 HA02 LA05 LA08 ──────────────────────────────────────────────────続 き Continued on the front page (51) Int.Cl. 7 Identification symbol FI Theme coat ゛ (Reference) G06F 15/70 405 F-term (Reference) 5B057 AA19 BA02 DA16 DA20 DC32 5C054 CC00 CE12 FC01 FC04 FC12 FC15 FF03 GA04 GB14 HA18 HA30 5C084 AA01 AA06 BB01 BB31 DD12 GG52 GG54 GG65 GG78 5C087 AA08 AA19 EE06 EE07 EE14 GG02 GG06 GG18 GG19 GG31 GG43 5L096 BA02 CA02 EA37 GA10 GA51 HA02 LA05 LA08

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】(a)所定の監視区域の画像を撮影する撮
像装置と、(b)前記撮像画像を処理し、背景画像を生
成する背景画像生成装置と、(c)前記背景画像を表示
し、ユーザに呈示する画像表示装置とを備え、(d)前
記背景画像生成装置は、 前記撮像装置で撮像された入力画像を記憶するフレーム
バッファと、 前記フレームバッファに記憶された画像に対して、当該
時刻の入力画像とその1時刻前の入力画像との差分の絶
対値を2値化し、変化が検出された画素の値を0、変化
が検出されなかった画素の値を1とした変化領域マスク
を作成する変化検出手段と、 前記変化検出手段において変化が検出されなかった画素
はカウントバッファの値を1カウントアップし、変化が
検出された画素はカウントバッファの値を0にリセット
するカウントバッファ更新手段と、 前記カウントバッファの各画素値の比較に用いる閾値を
記憶する閾値記憶手段と、 前記カウントバッファの各画素の値が前記閾値記憶手段
の閾値より大きく、かつ背景確定マスクにおいて確定さ
れていない画素は新規登録マスクの画素値を1にセット
し、背景確定マスクの画素値を0にセットする背景マス
ク更新手段と、 新規登録マスクで値1の画素は当該時刻の入力画像の画
素値を背景画像にコピーする背景登録手段と、 背景確定マスクにおいて、全ての画素が確定したか否か
を判定し、確定していなければ継続して処理を行い、確
定していれば背景画像を出力し処理を終了する背景作成
終了判定手段とを有することを特徴とする背景画像生成
システム。
1. An imaging device that captures an image of a predetermined monitoring area, (b) a background image generation device that processes the captured image and generates a background image, and (c) displaying the background image. And an image display device for presenting to a user. (D) the background image generation device includes: a frame buffer that stores an input image captured by the imaging device; The absolute value of the difference between the input image at the time and the input image one time before the current time is binarized, and the value of the pixel whose change is detected is 0, and the value of the pixel whose change is not detected is 1 A change detecting means for creating an area mask; a pixel in which no change is detected by the change detecting means counts up the value of the count buffer by one; and a pixel in which a change is detected resets the value of the count buffer to zero. Count buffer updating means; threshold value storing means for storing a threshold value used for comparing each pixel value of the count buffer; and a value of each pixel of the count buffer being larger than the threshold value of the threshold value storing means, and determined in a background fixed mask. A background mask updating means for setting the pixel value of the newly registered mask to 1 for a pixel which has not been set and setting the pixel value of the background fixed mask to 0; In the background registration means for copying the value to the background image, and in the background determination mask, it is determined whether or not all the pixels have been determined. If the determination has not been performed, the process is continuously performed. A background image generation system comprising: a background creation end determination unit that outputs and ends processing.
【請求項2】 請求項1記載の背景画像生成システムに
おいて、 前記背景画像生成装置は、 背景確定マスクにおいて、確定されていない画素がノイ
ズか否かを判定し、ノイズであれば前記閾値記憶手段に
記憶されている閾値を小さくなる方向に変更する閾値変
更手段をさらに備えることを特徴とする背景画像生成シ
ステム。
2. The background image generation system according to claim 1, wherein the background image generation device determines whether or not undetermined pixels in the background determination mask are noise. A background image generation system, further comprising a threshold changing unit that changes a threshold stored in the background image in a direction of decreasing the threshold.
【請求項3】(a)所定の監視区域の画像を撮影する撮
像装置と、(b)前記撮像画像を処理し、背景画像を生
成する背景画像生成装置と、(c)前記背景画像を表示
し、ユーザに呈示する画像表示装置とを備え、(d)前
記背景画像生成装置は、 前記撮像装置で撮像された入力画像を記憶するフレーム
バッファと、 前記フレームバッファに記憶された画像に対して、当該
時刻の入力画像とその1時刻前の入力画像との差分の絶
対値を2値化し、変化が検出された画素の値を0、変化
が検出されなかった画素の値を1とした変化領域マスク
を作成する変化検出手段と、 前記変化検出手段において変化が検出されなかった画素
はカウントバッファの値を1カウントアップし、変化が
検出された画素はカウントバッファの値を0にリセット
するカウントバッファ更新手段と、 前記カウントバッファの各画素値の比較に用いる閾値を
記憶する閾値記憶手段と、 前記カウントバッファの各画素の値が前記閾値記憶手段
の閾値より大きく、かつ背景確定マスクにおいて確定さ
れていない画素は新規登録マスクの画素値を1にセット
し、背景確定マスクの画素値を0にセットする背景マス
ク更新手段と、 既に背景画像に登録されている画素については当該時刻
の入力画像を用いて更新を行い、新規登録マスクで値1
の画素は当該時刻の入力画像の画素値を背景画像にコピ
ーする背景更新手段と、 背景確定マスクにおいて、全ての画素が確定したか否か
を判定し、確定していなければ継続して処理を行い、確
定していれば背景画像を出力し処理を終了する背景作成
終了判定手段とを有することを特徴とする背景画像生成
システム。
3. An imaging device for capturing an image of a predetermined monitoring area; (b) a background image generation device for processing the captured image to generate a background image; and (c) displaying the background image. And an image display device for presenting to a user. (D) the background image generation device includes: a frame buffer that stores an input image captured by the imaging device; The absolute value of the difference between the input image at the time and the input image one time before the current time is binarized, and the value of the pixel whose change is detected is 0, and the value of the pixel whose change is not detected is 1 A change detecting means for creating an area mask; a pixel in which no change is detected by the change detecting means counts up the value of the count buffer by one; and a pixel in which a change is detected resets the value of the count buffer to zero. Count buffer updating means; threshold value storing means for storing a threshold value used for comparing each pixel value of the count buffer; and a value of each pixel of the count buffer being larger than the threshold value of the threshold value storing means, and determined in a background fixed mask. For a pixel that has not been set, the pixel value of the newly registered mask is set to 1, and the pixel value of the background fixed mask is set to 0. For a pixel that has already been registered in the background image, Update using the new registration mask and the value 1
The pixel of (1) determines whether or not all the pixels have been determined in the background updating unit that copies the pixel value of the input image at the time to the background image, and if the pixels have not been determined, continues the processing. A background image generation system comprising: a background creation end determination unit that outputs a background image if the determination is made and ends the processing.
【請求項4】 請求項3記載の背景画像生成システムに
おいて、 前記背景作成終了判定手段は、背景マスクにおいて、す
べての画素が確定したか否かを判定し、確定していなけ
れば継続して処理を行い、入力画像と背景画像と背景確
定マスクを合成した画像を逐次出力し、ユーザからコマ
ンド入力が行われたときはそのコマンドを解釈し、全背
景画像が確定していれば処理を終了することを特徴とす
る背景画像生成システム。
4. The background image generation system according to claim 3, wherein the background creation end determination means determines whether or not all pixels are determined in the background mask, and if not determined, continues processing. To sequentially output images obtained by synthesizing the input image, the background image, and the background determination mask, interpret the command when a user inputs a command, and terminate the process if all the background images have been determined. A background image generation system, characterized in that:
JP11215064A 1999-07-29 1999-07-29 System for generating background picture Withdrawn JP2001043458A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11215064A JP2001043458A (en) 1999-07-29 1999-07-29 System for generating background picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11215064A JP2001043458A (en) 1999-07-29 1999-07-29 System for generating background picture

Publications (1)

Publication Number Publication Date
JP2001043458A true JP2001043458A (en) 2001-02-16

Family

ID=16666166

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11215064A Withdrawn JP2001043458A (en) 1999-07-29 1999-07-29 System for generating background picture

Country Status (1)

Country Link
JP (1) JP2001043458A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006203444A (en) * 2005-01-19 2006-08-03 Inc Corp Background image formation device and program
US8098897B2 (en) 2006-11-07 2012-01-17 Olympus Corporation Multi dimensional imaging system
JP2012060299A (en) * 2010-09-07 2012-03-22 Canon Inc Image pickup device, control method thereof, program, and recording medium
US8179471B2 (en) 2009-01-30 2012-05-15 Olympus Corporation Focusing device and image pickup apparatus
JP2014074623A (en) * 2012-10-03 2014-04-24 Denso Corp Vehicle navigation system
JP2014081676A (en) * 2012-10-12 2014-05-08 Nippon Telegr & Teleph Corp <Ntt> Foreground detection device, foreground detection method, and computer program
JP2016503913A (en) * 2012-12-17 2016-02-08 ボリーメディアコミュニケーションズ(シンチェン)カンパニーリミテッドBoly Media Communications (Shenzhen)Co., Ltd Security monitoring system and corresponding alarm triggering method
US9500495B2 (en) 2012-10-03 2016-11-22 Denso Corporation Vehicular navigation system
CN110956146A (en) * 2019-12-04 2020-04-03 新奇点企业管理集团有限公司 Road background modeling method and device, electronic equipment and storage medium
JP2020197989A (en) * 2019-06-04 2020-12-10 キヤノン株式会社 Image processing system, image processing device, image processing method, and program
US11361448B2 (en) 2018-09-19 2022-06-14 Canon Kabushiki Kaisha Image processing apparatus, method of controlling image processing apparatus, and storage medium

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4596929B2 (en) * 2005-01-19 2010-12-15 株式会社インク Background image generation apparatus and background image generation program
JP2006203444A (en) * 2005-01-19 2006-08-03 Inc Corp Background image formation device and program
US8098897B2 (en) 2006-11-07 2012-01-17 Olympus Corporation Multi dimensional imaging system
US8179471B2 (en) 2009-01-30 2012-05-15 Olympus Corporation Focusing device and image pickup apparatus
JP2012060299A (en) * 2010-09-07 2012-03-22 Canon Inc Image pickup device, control method thereof, program, and recording medium
US9500495B2 (en) 2012-10-03 2016-11-22 Denso Corporation Vehicular navigation system
JP2014074623A (en) * 2012-10-03 2014-04-24 Denso Corp Vehicle navigation system
JP2014081676A (en) * 2012-10-12 2014-05-08 Nippon Telegr & Teleph Corp <Ntt> Foreground detection device, foreground detection method, and computer program
JP2016503913A (en) * 2012-12-17 2016-02-08 ボリーメディアコミュニケーションズ(シンチェン)カンパニーリミテッドBoly Media Communications (Shenzhen)Co., Ltd Security monitoring system and corresponding alarm triggering method
US11361448B2 (en) 2018-09-19 2022-06-14 Canon Kabushiki Kaisha Image processing apparatus, method of controlling image processing apparatus, and storage medium
JP2020197989A (en) * 2019-06-04 2020-12-10 キヤノン株式会社 Image processing system, image processing device, image processing method, and program
US11838674B2 (en) 2019-06-04 2023-12-05 Canon Kabushiki Kaisha Image processing system, image processing method and storage medium
JP7391542B2 (en) 2019-06-04 2023-12-05 キヤノン株式会社 Image processing system, image processing method, and program
CN110956146A (en) * 2019-12-04 2020-04-03 新奇点企业管理集团有限公司 Road background modeling method and device, electronic equipment and storage medium
CN110956146B (en) * 2019-12-04 2024-04-12 新奇点企业管理集团有限公司 Road background modeling method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JP3279479B2 (en) Video monitoring method and device
US6377711B1 (en) Methods and systems for detecting the edges of objects in raster images using diagonal edge detection
JP2001043458A (en) System for generating background picture
JP3038051B2 (en) Video region extraction device
JPH0973541A (en) Object detection device/method
CN116580182B (en) Method, system, equipment and storage medium for automatically-adjusted target detection
CN114565952A (en) Pedestrian trajectory generation method, device, equipment and storage medium
JP4421121B2 (en) Intruder detection method
JPH06333193A (en) Method for detecting mobile body
JP4676385B2 (en) Image composition method, image composition apparatus, and image composition program
JP2621806B2 (en) Background feature mask generation device and moving object feature extraction device
JP2667885B2 (en) Automatic tracking device for moving objects
JPH10105689A (en) Moving body movement detector
JP3163601B2 (en) Image processing apparatus and method
JP3075937B2 (en) Motion vector detection circuit and subject tracking camera device using the same
JP3138381B2 (en) Monitoring device
JPH06187437A (en) Method for measuring circular particle
JPH11120349A (en) System and method for extracting change between images
CN106101624A (en) Big data management system
JP2002269572A (en) Moving-object detecting method, moving-object detecting device and moving-object detecting program
JPH10320549A (en) Image filter
JPH09219853A (en) Moving image processing method and its device
JPH0556329A (en) Image blur amount detector
JP2004254141A (en) Device and method for monitoring intruding object
JPH0520436A (en) Inspection device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20061003