JPH10105689A - Moving body movement detector - Google Patents

Moving body movement detector

Info

Publication number
JPH10105689A
JPH10105689A JP27698296A JP27698296A JPH10105689A JP H10105689 A JPH10105689 A JP H10105689A JP 27698296 A JP27698296 A JP 27698296A JP 27698296 A JP27698296 A JP 27698296A JP H10105689 A JPH10105689 A JP H10105689A
Authority
JP
Japan
Prior art keywords
image
template
image frame
moving object
vehicle
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.)
Pending
Application number
JP27698296A
Other languages
Japanese (ja)
Inventor
Akihiro Fujii
明宏 藤井
Naohiro Amamoto
直弘 天本
Akitoshi Tsukamoto
明利 塚本
Koji Matsumoto
浩司 松本
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 JP27698296A priority Critical patent/JPH10105689A/en
Publication of JPH10105689A publication Critical patent/JPH10105689A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To detect the movement of an individual vehicle with a high precision without error. SOLUTION: The difference value between a background picture frame 15 previously photographed without vehicles and a preceding picture frame 14 photographed just before is binarized, and this binarized difference picture 16 is masked with individual vehicle area mask pictures 17 and 18 obtained from a vehicle area mask picture generation part 10, and these mask areas are cut out to generate templates. Since this template of each vehicle obtained by cutting out has the noise eliminated and is accurate, the movement vector of each vehicle is detected with a high precision by matching to a current picture frame.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、車両等の移動体を
カメラを用いて撮影し、その挙動を調べるための移動体
の挙動検知装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a moving body behavior detecting device for photographing a moving body such as a vehicle using a camera and examining its behavior.

【0002】[0002]

【従来の技術】道路交通容量の拡大、交通事故の抑制あ
るいは省エネルギー等を目的として、次世代道路交通シ
ステムの研究が盛んに進められている。こうしたシステ
ムでは、道路上を走行する車両を撮影し、車両毎にその
挙動を検知する技術が要求される。この目的のために次
のような技術が紹介されている(文献:安居院 猛,塚
中 正太,長橋 宏:画像処理による通行車両の抽出:
信学春季全大,D−627(1994))。この種のシ
ステムでは予め車両の映っていない道路を撮影し、所定
の時間間隔で繰り返し道路上を走行する車両を撮影す
る。そして、各撮影された画像を比較することによって
車両毎の動きベクトルを求める。
2. Description of the Related Art Next-generation road traffic systems have been actively studied for the purpose of increasing road traffic capacity, suppressing traffic accidents, and saving energy. In such a system, a technology for photographing a vehicle traveling on a road and detecting the behavior of each vehicle is required. The following technologies have been introduced for this purpose (Literature: Takeshi Yasuiin, Shota Tsukanaka, Hiroshi Nagahashi: Extraction of passing vehicles by image processing:
IEEJ Spring Spring, D-627 (1994)). In this type of system, a road where a vehicle is not shown is photographed in advance, and a vehicle traveling on the road is repeatedly photographed at predetermined time intervals. Then, a motion vector for each vehicle is obtained by comparing the captured images.

【0003】[0003]

【発明が解決しようとする課題】ところで、上記のよう
な従来の車両挙動検知装置には次のような解決すべき課
題があった。従来のシステムでは、道路上に車両が存在
するかどうかを、道路のみを撮影した画像と道路上を走
行する車両を撮影した画像の差分値を求めるようにして
判断する。しかしながら、雑音等が混入すると差分画像
が乱れ、検知した画像の位置や輪郭が乱れることから、
誤検出が発生するという問題があった。また、新たに画
面の隅に入ってきた車両は画面中に車両の一部だけしか
撮影されないため、検出精度が悪くなるという問題があ
った。
The above-described conventional vehicle behavior detecting device has the following problems to be solved. In a conventional system, it is determined whether or not a vehicle exists on a road by calculating a difference value between an image obtained by capturing only the road and an image obtained by capturing a vehicle traveling on the road. However, if noise or the like is mixed, the difference image is disturbed, and the position and contour of the detected image are disturbed.
There is a problem that erroneous detection occurs. In addition, a vehicle newly entering the corner of the screen has a problem that the detection accuracy is deteriorated because only a part of the vehicle is photographed in the screen.

【0004】[0004]

【課題を解決するための手段】本発明は以上の点を解決
するため次の構成を採用する。 〈構成1〉移動体を撮影するカメラと、移動体と共にそ
の背景を撮影した現画像フレームと、現画像フレームの
撮影直前に移動体と共にその背景を撮影した前画像フレ
ームと、背景を撮影した背景画像フレームとを保持する
記憶部と、上記背景画像フレームと前画像フレームとの
差分を2値化して2値化差分画像を得る2値化部と、前
画像フレームと2値化差分画像により、各移動体の画像
を含む小領域の画像から成るテンプレートを得るテンプ
レート作成部と、このテンプレートと現画像フレームと
のマッチングにより、各移動体の動きベクトルを検出す
る動きベクトル検出部と、動きベクトルを検出したとき
のテンプレートの輪郭から、現画像フレーム中の各移動
体の画像以外の部分をマスクするためのマスク画像を得
るマスク画像作成部とを備え、上記テンプレート作成部
は、上記マスク画像作成部から受け入れたマスク画像に
より、2値化差分画像の不要部分をマスクして、各移動
体のテンプレートを得ることを特徴とする移動体挙動検
知装置。
The present invention employs the following structure to solve the above problems. <Structure 1> A camera that captures a moving object, a current image frame whose background is captured together with the moving object, a previous image frame whose background is captured together with the moving object immediately before capturing the current image frame, and a background that captures the background A storage unit for storing an image frame, a binarization unit for binarizing a difference between the background image frame and the previous image frame to obtain a binarized difference image, and a previous image frame and a binarized difference image, A template creating unit that obtains a template composed of an image of a small area including an image of each moving object, a motion vector detecting unit that detects a motion vector of each moving object by matching this template with the current image frame, Mask image creation for obtaining a mask image for masking a portion other than the image of each moving object in the current image frame from the outline of the template at the time of detection Wherein the template creating section masks unnecessary portions of the binarized difference image with a mask image received from the mask image creating section to obtain a template for each moving body. Detection device.

【0005】〈構成2〉構成1において、画像内に移動
体が進入する一部分に背景ブロック領域を設定し、2値
化部は、前画像フレームと背景ブロック領域の画像によ
り2値化差分画像を得て、テンプレート作成部はこの2
値化差分画像の不要部分をマスク画像でマスクし、テン
プレートを作成することを特徴とする移動体挙動検知装
置。
<Structure 2> In structure 1, a background block area is set in a part where the moving object enters the image, and the binarization unit generates a binarized difference image using the image of the previous image frame and the background block area. Then, the template creation section
A moving object behavior detecting device, wherein an unnecessary portion of a binarized difference image is masked with a mask image to create a template.

【0006】〈構成3〉構成1または2において、動き
ベクトル検出部は、現画像フレームに、その周辺部分を
除外した所定の検知領域を設定し、この検知領域内での
み、テンプレートを用いたマッチングを行うことを特徴
とする移動体挙動検知装置。
<Structure 3> In structure 1 or 2, the motion vector detecting section sets a predetermined detection area in the current image frame excluding a peripheral portion thereof, and performs matching using a template only in this detection area. A mobile object behavior detecting device characterized by performing the following.

【0007】〈構成4〉構成1または2において、動き
ベクトル検出部は、移動体の移動方向にテンプレートを
移動する場合に、テンプレートを伸縮しながらマッチン
グを行うことを特徴とする移動体挙動検知装置。
<Structure 4> In the structure 1 or 2, the motion vector detecting section performs matching while expanding and contracting the template when moving the template in the moving direction of the moving object. .

【0008】〈構成5〉構成1において、既に記憶した
背景画像フレームと、移動体のいない前画像フレームと
に差分を生じたとき、記憶部は、既に記憶した背景画像
フレームと移動体のいない前画像フレームとを交換する
ことを特徴とする移動体挙動検知装置。
<Structure 5> In the structure 1, when a difference is generated between the already stored background image frame and the previous image frame without the moving object, the storage unit stores the difference between the already stored background image frame and the previous image frame without the moving object. A moving object behavior detecting device for exchanging an image frame.

【0009】〈構成6〉構成2において、既に記憶した
背景ブロック領域の画像と、移動体のいない前画像フレ
ームの該当部分とに差分を生じたとき、記憶部は、既に
記憶した背景ブロック領域の画像と移動体のいない前画
像フレームの該当部分とを交換することを特徴とする移
動体挙動検知装置。
<Structure 6> In the structure 2, when a difference is generated between the image of the background block area already stored and the corresponding portion of the previous image frame without the moving object, the storage unit stores the image of the background block area already stored. A moving body behavior detecting device for exchanging an image with a corresponding portion of a previous image frame having no moving body.

【0010】〈構成7〉構成5または6において、2値
化差分画像を利用して、前画像フレーム中の移動体の無
い背景部分の画像を抽出して、交換の対象となる前画像
フレームを得る背景画像領域作成部を備えたことを特徴
とする移動体挙動検知装置。
<Structure 7> In the structure 5 or 6, the image of the background portion without the moving object in the previous image frame is extracted using the binarized difference image, and the previous image frame to be exchanged is extracted. A moving object behavior detecting device comprising a background image area creating unit for obtaining the moving object.

【0011】〈構成8〉構成1または2において、テン
プレート作成部が、2値化差分画像と、既に作成されて
記憶されたマスク画像とを用いて、テンプレートを作成
する場合に、2値化差分画像の移動体を含む領域とマス
ク画像の移動体を含む領域の間の内分線を、テンプレー
トの輪郭に選定することを特徴とする移動体挙動検知装
置。
<Structure 8> In structure 1 or 2, when the template creating unit creates a template using the binarized difference image and the mask image already created and stored, the binarized difference A moving object behavior detecting device, wherein an internal dividing line between an area including a moving object of an image and an area including a moving object of a mask image is selected as a contour of a template.

【0012】[0012]

【発明の実施の形態】以下、本発明の実施の形態を具体
例を用いて説明する。 〈具体例1〉図1は、本発明の移動体挙動検知装置具体
例を示すブロック図である。この装置は、カメラ1、A
/D変換部2、現画像フレーム記憶部3、前画像フレー
ム記憶部4、背景画像フレーム記憶部5、差分器6、2
値化部7、テンプレート作成部8、動きベクトル検出部
9及び車両領域マスク画像作成部10から構成される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described below using specific examples. <Embodiment 1> FIG. 1 is a block diagram showing a specific example of a moving body behavior detecting apparatus according to the present invention. This device is camera 1, A
/ D conversion unit 2, current image frame storage unit 3, previous image frame storage unit 4, background image frame storage unit 5, difference units 6, 2,
It comprises a value conversion section 7, a template creation section 8, a motion vector detection section 9, and a vehicle area mask image creation section 10.

【0013】カメラ1は、道路の比較的高い位置から車
両を撮影できるように図示しない適当なフレーム等によ
って固定配置されている。カメラ1は走行している車両
を道路と共に撮影して、その撮影した画像をアナログ信
号として出力する。A/D変換部2は、カメラ1から入
力したアナログ信号をディジタル信号に変換するための
装置である。現画像フレーム記憶部3は、ディジタル化
された後の現画像フレーム13を一時的に格納するため
のメモリである。前画像フレーム記憶部4は、直前に撮
影された現画像フレームを前画像フレーム14として一
時格納しておくメモリである。背景画像フレーム記憶部
5は、道路上に走行車両がない場合に予め撮影した背景
画像フレーム15を格納しておくメモリから構成され
る。
The camera 1 is fixedly arranged by a suitable frame (not shown) so that a vehicle can be photographed from a relatively high position on a road. The camera 1 photographs a running vehicle together with a road and outputs the photographed image as an analog signal. The A / D converter 2 is a device for converting an analog signal input from the camera 1 into a digital signal. The current image frame storage unit 3 is a memory for temporarily storing the digitized current image frame 13. The previous image frame storage unit 4 is a memory for temporarily storing a current image frame shot immediately before as a previous image frame 14. The background image frame storage unit 5 includes a memory that stores a background image frame 15 photographed in advance when there is no traveling vehicle on the road.

【0014】差分器6は、前画像フレーム記憶部4から
前画像フレーム14を受け入れ、背景画像フレーム記憶
部5から背景画像フレーム15を受け入れて、両者の差
分値を出力する回路である。また、2値化部7は、設定
された閾値を基準とし差分器6の出力を2値化する装置
である。こうして、2値化部7は2値化差分画像16を
出力する。テンプレート作成部8は、後で説明するテン
プレートを生成し、動きベクトル検出部9に供給する装
置である。動きベクトル検出部9は、各車両のテンプレ
ートと一致する画像を現画像フレーム13中で検出して
テンプレートに対応する車両の動きベクトルを得るため
の装置である。車両領域マスク画像作成部10は、次の
動きベクトル検出に適する車両領域マスク画像を生成す
る装置である。
The differentiator 6 is a circuit that receives the previous image frame 14 from the previous image frame storage unit 4, receives the background image frame 15 from the background image frame storage unit 5, and outputs a difference value between the two. The binarizing unit 7 is a device that binarizes the output of the differentiator 6 based on the set threshold value. Thus, the binarizing section 7 outputs the binarized difference image 16. The template creating unit 8 is a device that creates a template to be described later and supplies the template to the motion vector detecting unit 9. The motion vector detection unit 9 is a device for detecting an image that matches the template of each vehicle in the current image frame 13 and obtaining a motion vector of the vehicle corresponding to the template. The vehicle region mask image creation unit 10 is a device that generates a vehicle region mask image suitable for detecting the next motion vector.

【0015】図2は、図1に示した現画像フレーム記憶
部3に格納された現画像フレーム13と、前画像フレー
ム記憶部4に格納された前画像フレーム14と、背景画
像フレーム記憶部5に記憶された背景画像フレーム15
とを示した図である。この図に示すように、背景画像フ
レーム15と前画像フレーム14との差分をとれば、前
画像フレーム中の2台の車両の画像が取り出される。そ
の画像から各車両1台分の画像を切り離して、現画像フ
レーム13とのマッチングを行えば、その車両が前画像
フレームからどれだけ移動したかを検出できる。
FIG. 2 shows a current image frame 13 stored in the current image frame storage unit 3 shown in FIG. 1, a previous image frame 14 stored in the previous image frame storage unit 4, and a background image frame storage unit 5. Background image frame 15 stored in
FIG. As shown in this figure, if the difference between the background image frame 15 and the previous image frame 14 is obtained, the images of the two vehicles in the previous image frame are extracted. By separating the image of each vehicle from the image and performing matching with the current image frame 13, it is possible to detect how much the vehicle has moved from the previous image frame.

【0016】図3には、図1に示した差分器6の出力説
明図を示す。また、図4には、図1に示した2値化部7
の出力説明図を示す。図1に示した差分器6は、前画像
フレーム14と背景画像フレーム15とを受け入れて両
者の絶対値差分をとる。差分器6は、図2に示した前画
像フレーム14と背景画像フレーム15について、画素
単位であるいは後に説明するブロック単位で差分値をと
り、所定の閾値で2値化する。これで図3のような絶対
値差分ブロック19を得る。更に周辺が背景と考えられ
る孤立した差分が“0”にならない有値のブロックは、
自動的に背景と同一のブロックに置き換えるといった雑
音消去処理をして明瞭な車両部分の映像を得るようにす
るとよい。
FIG. 3 is an explanatory view of the output of the differentiator 6 shown in FIG. FIG. 4 shows the binarizing unit 7 shown in FIG.
FIG. The differentiator 6 shown in FIG. 1 receives the previous image frame 14 and the background image frame 15 and calculates the absolute value difference between the two. The differentiator 6 calculates a difference value between the previous image frame 14 and the background image frame 15 shown in FIG. 2 on a pixel basis or on a block basis described later, and binarizes the difference with a predetermined threshold. Thus, an absolute value difference block 19 as shown in FIG. 3 is obtained. Furthermore, a valuation block in which the isolated difference in which the periphery is considered to be the background does not become “0” is
It is preferable to obtain a clear image of the vehicle portion by performing noise elimination processing such as automatically replacing the block with the same block as the background.

【0017】図4のように2値化部7の出力は、2値化
差分画像16の中に実際の車両の画像領域21のみが残
された内容となる。このような画像を得るために2値化
部は、例えば図3に示すように、差分器の出力を適当な
大きさのブロックに分割し、そのブロック内の全ての画
素値を積分して、その積分値が所定の閾値より大きいか
どうかでブロック全体を“1”にするか“0”にするか
という処理を行う。これによって、背景画像部分は全て
白に、車両の存在する部分は全て黒になるような画像処
理が可能となる。その結果が図4に示したとおりのもの
である。
As shown in FIG. 4, the output of the binarizing section 7 has a content in which only the actual vehicle image area 21 is left in the binarized difference image 16. In order to obtain such an image, the binarization unit divides the output of the differentiator into blocks of an appropriate size and integrates all the pixel values in the block as shown in FIG. 3, for example. Whether the entire block is set to "1" or "0" is performed depending on whether the integrated value is larger than a predetermined threshold value. This makes it possible to perform image processing in which the background image portion is all white and the vehicle existing portion is all black. The result is as shown in FIG.

【0018】図5では、2値化部7の出力した2値化差
分画像16を元にして、図1に示すテンプレート作成部
8が、テンプレートを生成する場合の説明を行う。図1
に示したテンプレート作成部8は、図4に示した2値化
差分画像16を受け入れると共に、車両毎に元の画像フ
レームからどの部分を切り取れば、その車両の画像が得
られるかを指定するための、個別車両領域マスク画像2
2−1や22−2を受け入れる。これらはいずれも図5
(a)、(b)に示すように、背景領域24の一部に窓
状に車両領域23を配置している。このような個別車両
領域マスク画像22−1,22−2は、走行する車両1
台分ごとに作成される。
FIG. 5 illustrates a case where the template creating section 8 shown in FIG. 1 generates a template based on the binarized difference image 16 output from the binarizing section 7. FIG.
4 accepts the binarized difference image 16 shown in FIG. 4 and specifies which part of the original image frame should be cut out for each vehicle to obtain an image of that vehicle. Individual vehicle area mask image 2
Accept 2-1 or 22-2. These are all shown in FIG.
As shown in (a) and (b), the vehicle area 23 is arranged in a window shape in a part of the background area 24. Such individual vehicle region mask images 22-1 and 22-2 are used for the traveling vehicle 1
Created for each car.

【0019】図5(a)に示す個別車両領域マスク画像
22−1により、2値化差分画像中の1台の車両を切り
出す領域が決定する。こうして、2値化差分画像中から
不要信号を排除し、前画像フレームから1台の車両のテ
ンプレートを切り出す。図5(c)に、そのテンプレー
トの例を示す。その後は、動きベクトル検出部9は、そ
のテンプレートを動かして現画像フレーム13とのマッ
チングを行い、前画像フレームから現画像フレームまで
の車両の移動方向を示す動きベクトルを検出する。車両
領域マスク画像作成部10は、動きベクトル検出後のテ
ンプレートの位置と輪郭の情報を動きベクトル検出部9
から受け入れて個別車両領域マスク画像22−1,22
−2を生成する。こうすれば、テンプレート以外の領域
の不要信号を一切排除できるようなマスクを得ることが
できる。
The region from which one vehicle is cut out in the binarized difference image is determined by the individual vehicle region mask image 22-1 shown in FIG. Thus, unnecessary signals are eliminated from the binarized difference image, and a template of one vehicle is cut out from the previous image frame. FIG. 5C shows an example of the template. After that, the motion vector detection unit 9 moves the template to perform matching with the current image frame 13 and detects a motion vector indicating the moving direction of the vehicle from the previous image frame to the current image frame. The vehicle area mask image creating unit 10 converts the position and outline information of the template after the motion vector detection into motion vector detecting unit 9.
From the individual vehicle area mask images 22-1 and 22
-2 is generated. In this way, it is possible to obtain a mask capable of completely eliminating unnecessary signals in an area other than the template.

【0020】図6には、テンプレート作成部の動作フロ
ーチャートを示す。図に示すように、まずテンプレート
作成部8は、ステップS1で2値化部7から出力される
2値化差分画像を受け入れ、ステップS2でここに車両
があるかどうかを判断する。2値化差分画像全体のデー
タが全て“0”であれば車両がない。この場合にはその
まま処理を終了する。一方車両があると判断するとステ
ップS3に移り、個別車両マスク画像を受け入れる。そ
して、これらを用いてステップS4で前画像フレームか
らテンプレートを切り出し、ステップS5でそのテンプ
レートを出力する。なお、車両領域マスク画像作成部1
0は、動きベクトル検出部9で使用したテンプレートの
数、及びその後に新たに進入してきた車両がある場合に
はその数を加えて個別車両領域マスク画像を生成する。
FIG. 6 shows an operation flowchart of the template creating section. As shown in the figure, first, the template creating unit 8 receives the binarized difference image output from the binarizing unit 7 in step S1, and determines whether or not there is a vehicle here in step S2. If the data of the entire binarized difference image is all "0", there is no vehicle. In this case, the process ends. On the other hand, when it is determined that there is a vehicle, the process proceeds to step S3, and the individual vehicle mask image is accepted. Then, using these, a template is cut out from the previous image frame in step S4, and the template is output in step S5. Note that the vehicle area mask image creation unit 1
0 adds the number of templates used by the motion vector detection unit 9 and the number of vehicles that have newly entered after that, and generates an individual vehicle region mask image by adding the number.

【0021】図7には、上記の図6のステップS5の動
作を更に詳細に説明したフローチャートを示す。テンプ
レート作成部8は、まず始めに2値化差分画像の中の各
画素を連結しているもの同士でラベル付けを行う(ステ
ップS1)。即ち、図4に示したような2値化差分画像
16の中に点在する黒画素の各かたまりにこれらを区別
するためのラベル付けを行う。そして、ステップS2に
おいて、Nが“0”より大きいかどうかを判断する。即
ち、画像中に車両が存在しているかどうかを判断する。
車両が存在すればステップS3に進み、パラメータiを
“0”に設定する。このパラメータiは、1台分ずつテ
ンプレートを生成する際に各テンプレートに付与するカ
ウンタである。
FIG. 7 is a flowchart illustrating the operation of step S5 in FIG. 6 in more detail. First, the template creating section 8 labels the connected pixels of the binary difference image with each other (step S1). That is, a label is applied to each cluster of black pixels scattered in the binarized difference image 16 as shown in FIG. Then, in step S2, it is determined whether N is greater than "0". That is, it is determined whether a vehicle exists in the image.
If a vehicle exists, the process proceeds to step S3, and the parameter i is set to “0”. This parameter i is a counter that is added to each template when generating templates one by one.

【0022】ステップS4では、2値化差分画像16か
ら個別車両領域マスク画像により不要信号を除去する。
即ち、個別車両領域マスク画像中の車両領域と2値化差
分画像16中に存在するラベル領域が一部重なった場合
ラベル領域以外の信号を除去する。ステップS5では、
前画像フレーム14からテンプレートの切り出しを行
う。つまり、ステップS4で重なった2値化差分画像1
6中のラベル領域の部分と同位置の部分のみを前画像フ
レーム14から切り出し、これをテンプレートとしてい
る。次に、ステップS6とステップS7によって車両の
数だけ処理を繰り返すと、全ての車両についてテンプレ
ートが生成できる。ステップS8では、2値化差分画像
内で残ったラベルの中で、画像両端のラベルのみを新た
に進入してきた車両と判断して対応する同位置の部分を
前画像フレーム14から切り出し、新規のテンプレート
として出力する。これによって、雑音部分をラベルと判
断してテンプレートを作成するのを防止できる。以上の
処理によって、全ての車両についてテンプレートが生成
される。
In step S4, unnecessary signals are removed from the binarized difference image 16 using the individual vehicle area mask image.
That is, when the vehicle region in the individual vehicle region mask image and the label region existing in the binarized difference image 16 partially overlap, signals other than the label region are removed. In step S5,
A template is cut out from the previous image frame 14. That is, the binarized difference image 1 overlapped in step S4
6 is cut out from the previous image frame 14 only at the same position as that of the label area, and is used as a template. Next, when the processing is repeated by the number of vehicles in steps S6 and S7, templates can be generated for all vehicles. In step S8, of the labels remaining in the binarized difference image, only the labels at both ends of the image are determined to be vehicles that have newly entered, and a corresponding portion at the same position is cut out from the previous image frame 14, and a new image is obtained. Output as a template. This makes it possible to prevent a template from being created by determining a noise portion as a label. Through the above processing, templates are generated for all vehicles.

【0023】次に、図8に示す動きベクトル検出部の動
作フローチャートを説明する。図8のステップS1は、
車両が1つでもあれば動きベクトル検出を行うためのス
テップである。ステップS2では、パラメータiとパラ
メータeとを初期化する。そして、ステップS3におい
て、車両のテンプレートを受け入れる。次のステップS
4において、現画像フレームとテンプレートの間で、パ
ターンマッチングによる動きベクトルの検出を行う。即
ち、現画像フレーム中に、そのテンプレートと一致する
画像が存在するかどうかを比較処理等によって検出す
る。そのテンプレートは、例えば図2に示すように、車
両が画面の下から上に向かうにつれて、次第に小さくな
るようであれば、テンプレートを伸縮しながらマッチン
グを行う。そして、ステップS5において、最もマッチ
したときの動きベクトルを出力する。
Next, an operation flowchart of the motion vector detecting section shown in FIG. 8 will be described. Step S1 in FIG.
This is a step for detecting a motion vector if there is at least one vehicle. In step S2, the parameters i and e are initialized. Then, in step S3, the vehicle template is accepted. Next step S
In step 4, a motion vector is detected between the current image frame and the template by pattern matching. That is, whether or not there is an image that matches the template in the current image frame is detected by a comparison process or the like. As shown in FIG. 2, for example, as shown in FIG. 2, if the vehicle gradually becomes smaller from the bottom of the screen to the top, matching is performed while expanding and contracting the template. Then, in step S5, the motion vector at the time of the best match is output.

【0024】マッチングによりテンプレートの画像上の
位置座標が検出されると、前画像フレーム14中の同一
のテンプレートの位置座標と比較することによって、前
フレームから現フレームに移るまでの間、車両がどの方
向にどの距離だけ移動したかという動きベクトルを得る
ことができる。次のステップS6において、最もマッチ
したときのテンプレートが車両検知領域から外れたかど
うかを判断する。後で説明するように、例えば画像全体
についてテンプレートマッチングを行うとすれば、画像
の周辺部分で車両の一部だけしか画像中に現れていない
ようなものについてまで処理を行わなければならない。
こうすると、雑音等によって誤検出をするおそれがあ
る。そこで、画像全体でなく、周辺部分を除いた中央部
分のみをマッチングの対象とする。
When the position coordinates on the image of the template are detected by the matching, the position coordinates of the same template in the previous image frame 14 are compared with each other to determine the position of the vehicle from the previous frame to the current frame. It is possible to obtain a motion vector indicating how much distance has been moved in the direction. In the next step S6, it is determined whether or not the template at the time of the best match is out of the vehicle detection area. As will be described later, for example, if template matching is performed on the entire image, processing must be performed even on the peripheral portion of the image where only a part of the vehicle appears in the image.
In this case, erroneous detection may occur due to noise or the like. Therefore, not the entire image but only the central portion excluding the peripheral portion is set as a target of matching.

【0025】この車両検知領域というのはその中央部分
で、後で図10を用いて更に詳しく説明する。この範囲
からテンプレートがずれた場合には、その車両は挙動検
知の対象としない。そこで、ステップS8で減算用のパ
ラメータとして準備されたeをインクリメントする。一
方、マッチングが車両検知領域内で行われた場合には、
最もマッチしたときのテンプレートを後処理等のために
出力する(ステップS7)。その後、ステップS9でパ
ラメータiをインクリメントして、次の車両の処理に進
む(ステップS10)。ステップS2〜ステップS10
を車両分だけ繰り返し、その処理が終了すると、ステッ
プS11において、車両検知領域外に外れた車両数分だ
け全体の車両数を減少させて処理を終了する。
The vehicle detection area is a central portion thereof, and will be described later in more detail with reference to FIG. If the template deviates from this range, the vehicle is not targeted for behavior detection. Therefore, e prepared as a parameter for subtraction in step S8 is incremented. On the other hand, if the matching is performed in the vehicle detection area,
The template with the best match is output for post-processing or the like (step S7). Then, the parameter i is incremented in step S9, and the process proceeds to the next vehicle (step S10). Step S2 to step S10
Is repeated for the number of vehicles, and when the process is completed, in step S11, the total number of vehicles is reduced by the number of vehicles outside the vehicle detection area, and the process ends.

【0026】なお、上記のテンプレートマッチング処理
は、予め画像中で定めた範囲についてのみ行うようにし
たり、あるいは同一車両に対する過去の複数の動きベク
トルから次の移動距離や方向を推定し、その範囲で行う
ようにするとよい。これによって、マッチング処理の演
算量と演算時間を最適化できる。過去の動きベクトルか
ら推定した範囲にテンプレートを動かすためには、例え
ばi番目の車両に対する過去の複数のベクトルをmv
(i,1),mv(i,2),…,mv(i,n)とし
たとき、(1)式の基準ベクトルmv(i,0)を求め
る。 mv(i,0)=Σ p=1 n (α(p)×mv(i,p)) 但し:α(p)>0且つΣ p=1 n α(p)=1 …(1) このmv(i,0)を中心に前後左右の適当な範囲をテ
ンプレートを動かす範囲とすればよい。
The above-described template matching process is performed only for a predetermined range in the image, or the next moving distance or direction is estimated from a plurality of past motion vectors for the same vehicle, and the template matching process is performed within that range. It is better to do it. This makes it possible to optimize the calculation amount and the calculation time of the matching process. In order to move the template to the range estimated from the past motion vector, for example, a plurality of past vectors for the i-th vehicle are set to mv
Assuming that (i, 1), mv (i, 2),..., Mv (i, n), the reference vector mv (i, 0) of Expression (1) is obtained. mv (i, 0) = Σ p = 1 n (α (p) × mv (i, p)) where α (p)> 0 and Σ p = 1 n α (p) = 1 (1) An appropriate range in front, back, left and right around mv (i, 0) may be set as the range for moving the template.

【0027】また、テンプレートを上下に動かす場合
に、テンプレートを伸縮する方法としては、動かした大
きさに応じて適当な量の画素を間引いてテンプレートを
縮小したり、補間するようにして拡大すればよい。マッ
チング処理は現画像フレームとテンプレートとの間でテ
ンプレートを動かしながら画素の差分の絶対値平均を求
める。その絶対値平均が最小の場合に、マッチングが終
了したと判断すればよい。
When the template is moved up and down, the template may be expanded or contracted by thinning out an appropriate amount of pixels according to the moved size to reduce or enlarge the template by interpolation. Good. In the matching process, the average of the absolute values of the pixel differences is obtained while moving the template between the current image frame and the template. When the average of the absolute values is minimum, it may be determined that the matching has been completed.

【0028】車両検知領域から外れているかどうかとい
う判断は、例えば画面の内側に一定の車両検知領域を設
定した場合に、車両検知領域の内側の画素の値は“1”
とし、車両検知領域の外側の画素の値を“0”とする判
定画像を生成する。そして、この判定画像と個別車両領
域マスク画像の対応する画素同士についてその論理積を
求める。このとき例えば黒画素の場合は“0”、白画素
の場合は“1”とする。こうすれば、論理積画像の各画
素の値が全て“0”であれば、この個別車両領域マスク
画像中の車両は車両検知領域を外れていることになる。
即ち、個別車両領域マスク画像中の図5に示す車両領域
23が車両検知領域内部に存在する場合には、この部分
の画素が全て“1”となり、その他の画素は全て“0”
となる。一方、この車両領域が車両検知領域外に一部は
み出すと、この部分の画素の値は“0”となる。従っ
て、全てがはみ出した場合には全て“0”となり、車両
検知領域を外れていることが判断できる。これによっ
て、車両のごく一部しか画面中に現れていない場合に、
これをあえて動きベクトル処理の対象とすることによっ
て、誤検出を生じるのを防止できる。
For example, when a predetermined vehicle detection area is set inside the screen, the value of the pixel inside the vehicle detection area is "1".
Then, a determination image in which the value of the pixel outside the vehicle detection area is set to “0” is generated. Then, the logical product of the corresponding pixels of the determination image and the individual vehicle region mask image is obtained. At this time, for example, “0” is set for a black pixel, and “1” is set for a white pixel. In this way, if the value of each pixel of the logical product image is all “0”, the vehicle in the individual vehicle region mask image is out of the vehicle detection region.
That is, when the vehicle region 23 shown in FIG. 5 in the individual vehicle region mask image exists inside the vehicle detection region, all pixels in this portion are “1”, and all other pixels are “0”.
Becomes On the other hand, when the vehicle region partially protrudes outside the vehicle detection region, the value of the pixel in this portion becomes “0”. Therefore, if all of them protrude, they are all "0", and it can be determined that the vehicle is out of the vehicle detection area. This means that if only a small part of the vehicle appears on the screen,
By making this a target of motion vector processing, it is possible to prevent erroneous detection from occurring.

【0029】〈具体例1の効果〉以上説明したように、
具体例1の装置によれば、予め背景画像フレームと前画
像フレームを用いて2値化差分画像を得ると共に個別車
両領域マスク画像を利用して、車両毎に不要な雑音成分
を除いたテンプレートを生成して動きベクトル検出に使
用するので、個々の車両の動き検出を高い精度で誤りな
く検知できる。また、テンプレートによるマッチング処
理の際に、テンプレートの移動量に対応させてテンプレ
ートを拡大あるいは縮小するようにすれば、画像中で接
近するほど大きく撮影され遠ざかるほど小さく撮影され
る車両について、高い精度で動きベクトルの検出ができ
る。また、実際にカメラで撮影した画像よりも一回り小
さい、周辺部分を除外した車両検知領域を設定し、車両
検知領域を外れた車両については動きベクトルの検出を
行わないようにすれば、テンプレートマッチングによっ
て検出誤りを生じるような対象を除外し、信頼性の高い
挙動検知が可能となる。なお、本発明の装置は、具体例
1及び以下で説明するその他の具体例についても、車両
に限られず、カメラで撮影をすることができ、時間的に
変化する挙動を検知することの必要なあらゆる移動体に
対して実施することが可能である。
<Effect of Specific Example 1> As described above,
According to the device of the specific example 1, a binarized difference image is obtained in advance by using the background image frame and the previous image frame, and a template from which unnecessary noise components are removed for each vehicle by using the individual vehicle region mask image. Since it is generated and used for motion vector detection, motion detection of each vehicle can be detected with high accuracy and without error. Also, in the matching process using the template, if the template is enlarged or reduced in accordance with the amount of movement of the template, a vehicle that is photographed larger as approaching in the image and smaller as moving away from the image with high accuracy. A motion vector can be detected. Also, by setting a vehicle detection area that is one size smaller than the image actually captured by the camera and excluding the peripheral part, and not detecting a motion vector for a vehicle outside the vehicle detection area, template matching can be performed. As a result, a target that causes a detection error is excluded, and highly reliable behavior detection can be performed. In addition, the apparatus of the present invention is not limited to the vehicle in the specific example 1 and other specific examples described below, and it is possible to take a picture with a camera, and it is necessary to detect a time-varying behavior. It can be implemented for any moving object.

【0030】〈具体例2〉図9に、具体例2の装置のブ
ロック図を示す。この装置は、具体例1の装置と比較し
た場合に、差分器6に対して、背景ブロック領域画像を
供給するための背景ブロック領域画像記憶部29を接続
した点が異なる。その他の部分については、図1と全く
同様の構成であって、重複する説明を省略する。
<Embodiment 2> FIG. 9 shows a block diagram of the apparatus of Embodiment 2. This apparatus is different from the apparatus of the first embodiment in that a background block area image storage unit 29 for supplying a background block area image is connected to the differentiator 6. The other parts have the same configuration as that of FIG. 1 and duplicate description is omitted.

【0031】図10には、背景ブロック領域の処理説明
図を示す。図10(a)は、カメラによって撮影された
画面30を示している。車両の進行方向は左側の矢印に
示されている。この道路は2車線で、いずれの車両も画
面下から画面上に向かって進行するものとする。この場
合に、図中、一点鎖線で示した領域を車両検知領域33
に設定する。この車両検知領域33は、先に説明したと
おり、この範囲にテンプレートがある場合に動きベクト
ルの検出を行おうとする制限領域である。従って、画面
の周囲の所定の幅だけ除外したものを車両検知領域33
としている。一方、この例では、新たな車両が画面30
に現れるのは、画面の下側からである。そこで、処理を
軽減するために、この具体例では背景ブロック領域31
を新たに設定し、新たな車両の領域については、この背
景ブロック領域31での差分によってテンプレートを作
成する。そして、その他の車両領域は、個別車両領域マ
スク画像を利用して後述するようにテンプレートを作成
する。
FIG. 10 is a view for explaining the processing of the background block area. FIG. 10A shows a screen 30 captured by a camera. The direction of travel of the vehicle is indicated by the left arrow. This road has two lanes, and each vehicle travels from the bottom of the screen toward the top of the screen. In this case, the area shown by the dashed line in the figure is the vehicle detection area 33.
Set to. As described above, the vehicle detection area 33 is a restricted area where a motion vector is to be detected when a template exists in this range. Accordingly, the vehicle detection area 33 excluding a predetermined width around the screen is excluded.
And On the other hand, in this example, a new vehicle is displayed on the screen 30.
Appear from the bottom of the screen. Therefore, in order to reduce the processing, in this specific example, the background block area 31
Is newly set, and for a new vehicle area, a template is created based on the difference in the background block area 31. Then, for the other vehicle regions, a template is created using the individual vehicle region mask image as described later.

【0032】(b)には、車両の存在しない背景ブロッ
ク領域画像31−1を示した。また、(c)には、車両
の一部が存在する前画像フレームのブロック31−2を
示した。更に、(d)には、その後撮影した現画像フレ
ームのブロック31−3を示した。背景ブロック領域画
像31−1と前画像フレームのブロック31−2とを使
用すれば、図1で説明した具体例1と同様にして2値化
差分画像を得ることができ、更に個別車両領域マスク画
像を得ることができる。
(B) shows a background block area image 31-1 in which no vehicle exists. (C) shows a block 31-2 of the previous image frame in which a part of the vehicle exists. Further, (d) shows a block 31-3 of the current image frame photographed thereafter. If the background block area image 31-1 and the previous image frame block 31-2 are used, a binary difference image can be obtained in the same manner as in the specific example 1 described with reference to FIG. Images can be obtained.

【0033】この具体例2において、テンプレート作成
部8は図7のステップS5の切り出し動作とは異なる動
作を行う。即ち、テンプレート作成部8は、個別車両領
域マスク画像(i)の車両領域が背景ブロック領域31
外に存在する場合、そのままこの領域について前画像フ
レームからテンプレートを切り出す。また、個別車両領
域マスク画像(i)の車両領域が背景ブロック領域31
内に全てある場合、具体例1と同様に2値化差分画像の
ラベル領域と同じ領域について前画像フレームからテン
プレートを切り出す。
In the specific example 2, the template creating section 8 performs an operation different from the extracting operation in step S5 in FIG. That is, the template creating unit 8 determines that the vehicle area of the individual vehicle area mask image (i) is the background block area 31
If it exists outside, the template is cut out from the previous image frame for this area as it is. The vehicle area of the individual vehicle area mask image (i) is the background block area 31
In the case where there are all of them, the template is cut out from the previous image frame for the same region as the label region of the binarized difference image as in the first embodiment.

【0034】これに対し、個別車両領域マスク画像
(i)の車両領域の一部が背景ブロック領域31内に含
まれている場合、背景ブロック領域31の部分のテンプ
レートを、2値化差分画像の重なったラベル領域から切
り出し、それ以外の部分を個別車両領域マスク画像
(i)の車両領域から切り出し、両切り出したテンプレ
ートをつなぎ合わせて動きベクトル検出部9に供給する
テンプレートとする。動きベクトルの検出動作自体は、
具体例1と全く同様のため、重複する動作説明は省略す
る。
On the other hand, when a part of the vehicle area of the individual vehicle area mask image (i) is included in the background block area 31, the template of the background block area 31 is changed to the binary difference image. It is cut out from the overlapped label area, the other part is cut out from the vehicle area of the individual vehicle area mask image (i), and both cut out templates are joined to be a template to be supplied to the motion vector detecting unit 9. The motion vector detection operation itself
Since the operation is exactly the same as that of the specific example 1, the duplicate description of the operation is omitted.

【0035】〈具体例2の効果〉以上により、初めて画
面に現れる車両に対して、画像の一部分に限定して背景
ブロック領域31を設定し、これを用いて部分的な個別
車両領域マスク画像等の生成処理をすれば、演算処理量
が大幅に減少する効果がある。また、上記の例のよう
に、車両が大きく写る部分に限定して処理をすると、更
に検出精度の向上が期待できる。しかも、いずれの場合
にも、処理データ量を少なくして演算速度を向上させた
りする効果がある。
<Effect of Specific Example 2> As described above, for a vehicle that first appears on the screen, the background block area 31 is set to be limited to a part of the image, and a partial individual vehicle area mask image or the like is used using this. Has the effect of greatly reducing the amount of arithmetic processing. Further, if the processing is limited to a portion where the vehicle is largely captured as in the above example, further improvement in detection accuracy can be expected. In addition, in any case, there is an effect that the processing data amount is reduced and the calculation speed is improved.

【0036】背景ブロック領域はこの他に、各種の領域
に設定できる。図11と図12に、背景ブロック領域の
例説明図を示す。例えば、図11のように道路が上りと
下りとある場合、画面の下側部分と上側部分とにハッチ
ングを付したような背景ブロック領域31を設定してい
る。このように車両が画面から現れるような部分におい
て背景ブロック領域31を設定することによって、新た
に進入した車両を上下線共に抽出できる。また、図12
に示す例では、車両の移動を車両の側面から撮影する画
像を用いて検出している。この場合には、画像の左端と
右端とに背景ブロック領域31を設ける。これによっ
て、同様の効果を得ることができる。
The background block area can be set to various other areas. 11 and 12 show explanatory diagrams of examples of the background block area. For example, when the road is going up and down as shown in FIG. 11, the background block area 31 is set such that the lower part and the upper part of the screen are hatched. By setting the background block area 31 in a portion where the vehicle appears on the screen in this way, a newly entered vehicle can be extracted from both the upper and lower lines. FIG.
In the example shown in (1), the movement of the vehicle is detected using an image captured from the side of the vehicle. In this case, the background block area 31 is provided at the left end and the right end of the image. Thereby, a similar effect can be obtained.

【0037】〈具体例3〉図13には、具体例3の装置
のブロック図を示す。この装置は、図1に示した装置に
新たに背景画像フレーム作成部40を追加したものであ
る。その他の部分については、図1に示したものと全く
同様である。背景画像フレーム作成部40は、前画像フ
レーム記憶部4から前画像フレームを受け入れ、2値化
部7から出力される2値化差分画像を受け入れて背景画
像フレームを更新処理する部分である。
<Embodiment 3> FIG. 13 is a block diagram of an apparatus according to Embodiment 3. This device is obtained by adding a background image frame creating unit 40 to the device shown in FIG. The other parts are exactly the same as those shown in FIG. The background image frame creation unit 40 is a unit that receives the previous image frame from the previous image frame storage unit 4, receives the binary difference image output from the binarization unit 7, and updates the background image frame.

【0038】図14に、背景画像フレーム作成部のブロ
ック図を示す。ここには、2個の背景画像フレーム記憶
部41,5を設けている。これまで使用してきた背景画
像フレームは背景画像フレーム記憶部5に格納してあ
る。一方、新たに撮影した前画像フレームを背景画像フ
レーム記憶部41に一時記憶する。更に、2値化差分画
像記憶部43に、図13に示す2値化部7の出力を記憶
する。
FIG. 14 is a block diagram of the background image frame creating section. Here, two background image frame storage units 41 and 5 are provided. The background image frames used so far are stored in the background image frame storage unit 5. Meanwhile, the newly captured previous image frame is temporarily stored in the background image frame storage unit 41. Further, the output of the binarizing unit 7 shown in FIG. 13 is stored in the binarized difference image storage unit 43.

【0039】この回路において、これまで使用していた
背景画像フレームと前画像フレームとは差分器6と2値
化部7により処理され、2値化差分画像が得られる。そ
の2値化差分画像を2値化差分画像記憶部43に格納
し、その内容が例えばオールゼロの場合は“0”、一部
に“1”を含む場合は“1”を選択スイッチ部44に供
給する。このようにすれば、前画像フレームの内容と背
景画像フレームの内容とが一致しない場合に、新たに背
景画像フレーム記憶部に格納した前画像フレームの内容
を選択スイッチ部44から出力するようになる。これに
よって、新たに撮影された前画像フレームが背景画像フ
レームとして、背景画像フレーム記憶部5に再格納され
る。
In this circuit, the background image frame and the previous image frame which have been used so far are processed by the differentiator 6 and the binarizing section 7 to obtain a binarized differential image. The binarized difference image is stored in the binarized difference image storage unit 43, and “0” is set when the content is, for example, all zeros, and “1” is set when the content is partially included in the selection switch unit 44. Supply. With this configuration, when the content of the previous image frame does not match the content of the background image frame, the content of the previous image frame newly stored in the background image frame storage unit is output from the selection switch unit 44. . As a result, the newly captured previous image frame is stored again in the background image frame storage unit 5 as a background image frame.

【0040】なお、前画像フレーム中に車両が全くいな
い場合にはこの処理でよいが車両がいる場合には、その
車両の画像以外の部分だけ背景画像を書き換えればよ
い。一部分だけ書き換える際、どの部分を書き換えるか
は、2値化差分画像を利用すればよい。
This processing may be performed when no vehicle is present in the previous image frame. However, when a vehicle is present, the background image may be rewritten only in a portion other than the image of the vehicle. When rewriting only a part, which part should be rewritten may be determined by using a binarized difference image.

【0041】〈具体例3の効果〉以上のように、背景が
時間の経過とともに変化するような場合であっても、背
景画像フレーム記憶部の内容の全部又は一部をその都度
更新するので、車両の動きベクトル検出精度をより高く
することができる。これは、天候やその他の自然現象に
よって道路の映像が変化するような場合においても、車
両の検出を正確に行うために有効に機能する。
<Effect of Specific Example 3> As described above, even when the background changes with the passage of time, all or part of the content of the background image frame storage unit is updated each time. The accuracy of detecting the motion vector of the vehicle can be increased. This effectively functions to accurately detect a vehicle even when a road image changes due to weather or other natural phenomena.

【0042】〈具体例4〉図15には、具体例4の装置
のブロック図を示す。この装置は、図13に示した具体
例3の装置の背景画像フレーム作成部40及び背景画像
フレーム記憶部5を、背景ブロック領域画像作成部45
と背景ブロック領域画像記憶部29に置き換えたもので
ある。その他の部分については、具体例3の装置と同一
である。この背景ブロック領域画像作成部45は、図1
4に示した具体例3の背景画像フレーム作成部40と同
様の機能を有する。
<Embodiment 4> FIG. 15 is a block diagram of an apparatus according to Embodiment 4. This device stores the background image frame creating unit 40 and the background image frame storing unit 5 of the device of the specific example 3 shown in FIG.
And a background block area image storage unit 29. The other parts are the same as in the device of the third embodiment. This background block area image creation unit 45
It has the same function as the background image frame creation unit 40 of the specific example 3 shown in FIG.

【0043】図16には、背景ブロック領域画像作成部
のブロック図を示した。この図に示すように、背景ブロ
ック領域画像作成部45は、背景ブロック領域画像記憶
部46と、選択スイッチ部49と、2値化差分画像記憶
部48とから構成されている。この構成によって、具体
例3と同様に、背景ブロック領域部分の状態が時間と共
に変化するような場合に、その内容を更新できる。即
ち、これまでの背景ブロック領域画像を背景ブロック領
域画像記憶部29に記憶しておく一方、新たな画像を前
画像フレームから背景ブロック領域画像記憶部46に取
り入れ、2値化部7の出力する2値化差分画像を2値化
差分画像記憶部48に取り入れて、その内容に従って選
択スイッチ部49を動作させる。これによって、これま
での背景ブロック領域の内容と新たに撮影した背景ブロ
ック領域とが異なる場合には、背景ブロック領域画像記
憶部29に記憶された内容を更新する。もちろん、一部
の書き換えも可能である。
FIG. 16 is a block diagram of the background block area image creating section. As shown in the figure, the background block area image creating section 45 is composed of a background block area image storage section 46, a selection switch section 49, and a binarized difference image storage section 48. With this configuration, when the state of the background block area changes over time, the content can be updated, as in the specific example 3. That is, while the background block area image thus far is stored in the background block area image storage unit 29, a new image is taken from the previous image frame into the background block area image storage unit 46 and output from the binarization unit 7. The binarized difference image is taken into the binarized difference image storage unit 48, and the selection switch unit 49 is operated according to the contents. As a result, if the content of the background block area so far differs from the newly captured background block area, the content stored in the background block area image storage unit 29 is updated. Of course, some rewriting is also possible.

【0044】〈具体例4の効果〉具体例3と同様に、背
景が時間の経過と共に変化する場合、背景ブロック画像
をその都度更新し、高い精度で車両の動きベクトル検出
が可能となる。
<Effect of Embodiment 4> As in Embodiment 3, when the background changes with the passage of time, the background block image is updated each time, and the vehicle motion vector can be detected with high accuracy.

【0045】〈具体例5〉以上の具体例におけるテンプ
レート作成部は、2値化差分画像中の分割された車両領
域と、個別車両領域マスク画像の車両領域とが一部重な
った部分について、2値化差分画像中の車両領域を切り
出してテンプレートを作成している。本具体例5では、
更に精度の高いテンプレートを作成するために、2値化
差分画像中の車両領域を、個別車両領域マスク画像の車
両領域で補正する方式を説明する。
<Embodiment 5> In the above-described embodiment, the template creation unit performs the following processing on the part where the divided vehicle region in the binarized difference image partially overlaps with the vehicle region in the individual vehicle region mask image. The template is created by cutting out the vehicle area in the binarized difference image. In this specific example 5,
A method of correcting a vehicle region in a binarized difference image with a vehicle region of an individual vehicle region mask image to create a template with higher accuracy will be described.

【0046】図17は、2値化差分画像中の、ある車両
領域を補正する方式の説明図である。この処理は、例え
ばこの図に示すような手順で行われる。図1に示した車
両領域マスク画像作成部10から出力されるこれまでの
個別車両領域マスク画像の車両領域51を図17におい
て実線の円で示す。また、この車両領域51に重なった
2値化差分画像の車両領域52をハッチングを付した円
で示す。この場合に、両者を重ねたとき、両者の輪郭線
を内分する内分線53を求める。内分点は対応する点の
中央とすればよい。これは、図中破線で示した。この内
分線53に該当する円を、補正された個別車両領域マス
ク画像の車両領域54として新たなテンプレート切り出
しに使用する。
FIG. 17 is an explanatory diagram of a method for correcting a certain vehicle area in the binarized difference image. This process is performed, for example, according to the procedure shown in FIG. The vehicle area 51 of the individual vehicle area mask image output up to now from the vehicle area mask image creation unit 10 shown in FIG. 1 is shown by a solid circle in FIG. Further, the vehicle region 52 of the binarized difference image overlapping the vehicle region 51 is indicated by a hatched circle. In this case, when the two are superimposed, an internal segment 53 that internally divides the outline of both is obtained. The subdivision point may be the center of the corresponding point. This is indicated by a broken line in the figure. The circle corresponding to the internal dividing line 53 is used for cutting out a new template as the vehicle area 54 of the corrected individual vehicle area mask image.

【0047】図17の例1では、個別車両領域マスク画
像の車両領域51が2値化差分画像の車両領域52より
も広くなっている。例2ではこれと逆の関係になってい
る。いずれの場合にも内分線53を求めて、適切な大き
さの新たな補正された個別車両領域マスク画像の車両領
域54を得る。例3の場合には、個別車両領域マスク画
像の車両領域51と2値化差分画像の車両領域52の位
置がシフトしている。このような場合にも輪郭線の対応
する点の中間点をプロットして結び、内分線53を得
る。この内分線53は車両領域51と52を等間隔
(1:1)に内分するものに限定されない。その他、こ
れら車両領域51,52を任意の整数A,Bで内分する
ようにしてもよい。
In Example 1 of FIG. 17, the vehicle region 51 of the individual vehicle region mask image is wider than the vehicle region 52 of the binarized difference image. In Example 2, the relationship is reversed. In any case, the internal branch line 53 is obtained to obtain a vehicle area 54 of a new corrected individual vehicle area mask image of an appropriate size. In the case of Example 3, the positions of the vehicle region 51 of the individual vehicle region mask image and the vehicle region 52 of the binarized difference image are shifted. Even in such a case, the midpoints of the corresponding points on the contour line are plotted and connected to obtain the internal branch line 53. The internal dividing line 53 is not limited to the one that internally divides the vehicle regions 51 and 52 at equal intervals (1: 1). In addition, these vehicle regions 51 and 52 may be internally divided by arbitrary integers A and B.

【0048】〈具体例5の効果〉こうして、より正確に
移動体のテンプレートを前画像フレームから切り出すこ
とができる。なお、上記いずれの実施例においても、既
に説明したように、挙動検知の対象は車両に限定され
ず、人や動物、その他の移動体全てに適用できる。ま
た、車両の進行方向は一方のみとしたが、センターライ
ンを挟んで相互通行しているような路面をカメラで撮影
し、各種の方向へ移動する車両の挙動検知も同様の方法
で可能となる。また、具体例3や具体例4の選択スイッ
チ部44や選択スイッチ部49を動作させる信号は、差
分出力画像の平均値やあるいはαを0と1の間の実数と
した場合の加重加算値αa+(1−α)bとしてもよ
い。但し、画素値を(a,b)とする。
<Effect of Specific Example 5> In this way, the template of the moving object can be more accurately cut out from the previous image frame. In each of the above embodiments, as described above, the target of the behavior detection is not limited to the vehicle, but can be applied to all persons, animals, and other moving objects. In addition, although the traveling direction of the vehicle is only one direction, the same method can be used to detect the behavior of a vehicle moving in various directions by photographing a road surface that is passing through the center line with a camera. . The signal for operating the selection switch unit 44 or the selection switch unit 49 of the specific example 3 or the specific example 4 is an average value of the difference output image or a weighted addition value αa + when α is a real number between 0 and 1. (1-α) b may be used. However, the pixel value is (a, b).

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

【図1】本発明の移動体挙動検知装置ブロック図であ
る。
FIG. 1 is a block diagram of a moving object behavior detecting device according to the present invention.

【図2】(a)は現画像フレーム、(b)は前画像フレ
ーム、(c)は背景画像フレームである。
2A is a current image frame, FIG. 2B is a previous image frame, and FIG. 2C is a background image frame.

【図3】差分器の出力説明図である。FIG. 3 is an explanatory diagram of an output of a differentiator.

【図4】2値化部の出力説明図である。FIG. 4 is an explanatory diagram of an output of a binarizing unit.

【図5】個別車両領域マスク画像の説明図である。FIG. 5 is an explanatory diagram of an individual vehicle area mask image.

【図6】テンプレート作成部の動作フローチャート(そ
の1)である。
FIG. 6 is an operation flowchart (part 1) of a template creation unit.

【図7】テンプレート作成部の動作フローチャート(そ
の2)である。
FIG. 7 is an operation flowchart (No. 2) of the template creation unit.

【図8】動きベクトル検出部の動作フローチャートであ
る。
FIG. 8 is an operation flowchart of a motion vector detection unit.

【図9】具体例2の装置のブロック図である。FIG. 9 is a block diagram of an apparatus according to a specific example 2.

【図10】背景ブロック領域の処理説明図である。FIG. 10 is an explanatory diagram of processing of a background block area.

【図11】背景ブロック領域の例説明図(その1)であ
る。
FIG. 11 is an explanatory diagram (part 1) of an example of a background block area.

【図12】背景ブロック領域の例説明図(その2)であ
る。
FIG. 12 is a diagram (part 2) illustrating an example of a background block area.

【図13】具体例3の装置のブロック図である。FIG. 13 is a block diagram of an apparatus according to a third embodiment.

【図14】背景画像フレーム作成部のブロック図であ
る。
FIG. 14 is a block diagram of a background image frame creation unit.

【図15】具体例4の装置のブロック図である。FIG. 15 is a block diagram of an apparatus of a specific example 4.

【図16】背景ブロック領域画像作成部のブロック図で
ある。
FIG. 16 is a block diagram of a background block area image creation unit.

【図17】個別車両領域マスク画像の補正の説明図であ
る。
FIG. 17 is an explanatory diagram of correction of an individual vehicle area mask image.

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

1 カメラ 3 現画像フレーム記憶部 4 前画像フレーム記憶部 5 背景画像フレーム記憶部 6 差分器 7 2値化部 8 テンプレート作成部 9 動きベクトル検出部 DESCRIPTION OF SYMBOLS 1 Camera 3 Current image frame storage part 4 Previous image frame storage part 5 Background image frame storage part 6 Differentiator 7 Binarization part 8 Template creation part 9 Motion vector detection part

───────────────────────────────────────────────────── フロントページの続き (72)発明者 松本 浩司 東京都港区虎ノ門1丁目7番12号 沖電気 工業株式会社内 ────────────────────────────────────────────────── ─── Continuing on the front page (72) Koji Matsumoto Inventor Oki Electric Industry Co., Ltd. 1-7-12 Toranomon, Minato-ku, Tokyo

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 移動体を撮影するカメラと、 移動体と共にその背景を撮影した現画像フレームと、現
画像フレームの撮影直前に移動体と共にその背景を撮影
した前画像フレームと、背景を撮影した背景画像フレー
ムとを保持する記憶部と、 前記背景画像フレームと前画像フレームとの差分を2値
化して2値化差分画像を得る2値化部と、 前画像フレームと2値化差分画像により、各移動体の画
像を含む小領域の画像から成るテンプレートを得るテン
プレート作成部と、 このテンプレートと現画像フレームとのマッチングによ
り、各移動体の動きベクトルを検出する動きベクトル検
出部と、 動きベクトルを検出したときのテンプレートの輪郭か
ら、現画像フレーム中の各移動体の画像以外の部分をマ
スクするためのマスク画像を得るマスク画像作成部とを
備え、 前記テンプレート作成部は、前記マスク画像作成部から
受け入れたマスク画像により、2値化差分画像の不要部
分をマスクして、各移動体のテンプレートを得ることを
特徴とする移動体挙動検知装置。
1. A camera for photographing a moving object, a current image frame photographing the background together with the moving object, a previous image frame photographing the background together with the moving object immediately before photographing the current image frame, and a background photographing. A storage unit that holds a background image frame, a binarization unit that binarizes a difference between the background image frame and the previous image frame to obtain a binarized difference image, A template creating unit that obtains a template composed of an image of a small area including an image of each moving object; a motion vector detecting unit that detects a motion vector of each moving object by matching the template with the current image frame; Mask image for obtaining a mask image for masking a portion other than the image of each moving object in the current image frame from the outline of the template when A moving unit, wherein the template forming unit masks unnecessary portions of the binarized difference image with the mask image received from the mask image forming unit to obtain a template for each moving object. Body behavior detection device.
【請求項2】 請求項1において、 画像内に移動体が進入する一部分に背景ブロック領域を
設定し、 2値化部は、前画像フレームと背景ブロック領域の画像
により2値化差分画像を作成し、 前記テンプレート作成部は、前記マスク画像で前記2値
化差分画像の不要部分をマスクして、各移動体のテンプ
レートを作成することを特徴とする移動体挙動検知装
置。
2. The image processing apparatus according to claim 1, wherein a background block area is set in a part where the moving object enters the image, and the binarizing unit creates a binarized difference image from the image of the previous image frame and the background block area. The moving body behavior detection device, wherein the template creating unit creates a template for each moving body by masking an unnecessary portion of the binarized difference image with the mask image.
【請求項3】 請求項1または2において、 動きベクトル検出部は、現画像フレームに、その周辺部
分を除外した所定の検知領域を設定し、この検知領域内
でのみ、テンプレートを用いたマッチングを行うことを
特徴とする移動体挙動検知装置。
3. The motion vector detection unit according to claim 1, wherein the motion vector detection unit sets a predetermined detection area excluding a peripheral portion of the current image frame, and performs matching using a template only in the detection area. A moving object behavior detecting device characterized by performing the following.
【請求項4】 請求項1または2において、 動きベクトル検出部は、移動体の移動方向にテンプレー
トを移動する場合に、テンプレートを伸縮しながらマッ
チングを行うことを特徴とする移動体挙動検知装置。
4. The moving object behavior detecting device according to claim 1, wherein the motion vector detecting unit performs matching while expanding and contracting the template when moving the template in the moving direction of the moving object.
【請求項5】 請求項1において、 既に記憶した背景画像フレームと、移動体のいない前画
像フレームとに差分を生じたとき、 記憶部は、既に記憶した背景画像フレームと移動体のい
ない前画像フレームとを交換することを特徴とする移動
体挙動検知装置。
5. The storage unit according to claim 1, wherein when a difference is generated between the background image frame already stored and the previous image frame without the moving object, the storage unit stores the background image frame already stored and the previous image without the moving object. A moving body behavior detecting device characterized by exchanging a frame.
【請求項6】 請求項2において、 既に記憶した背景ブロック領域の画像と、移動体のいな
い前画像フレームの該当部分とに差分を生じたとき、 記憶部は、既に記憶した背景ブロック領域の画像と移動
体のいない前画像フレームの該当部分とを交換すること
を特徴とする移動体挙動検知装置。
6. The image processing apparatus according to claim 2, wherein when a difference is generated between the image of the background block area already stored and the corresponding portion of the previous image frame without the moving object, the storage unit stores the image of the background block area already stored. A mobile object behavior detecting device for exchanging a part of a previous image frame with no mobile object.
【請求項7】 請求項5または6において、 2値化差分画像を利用して、前画像フレーム中の移動体
の無い背景部分の画像を抽出して、交換の対象となる前
画像フレームを得る背景画像領域作成部を備えたことを
特徴とする移動体挙動検知装置。
7. The previous image frame to be exchanged according to claim 5 or 6, wherein an image of a background portion without a moving object in the previous image frame is extracted using the binarized difference image. A moving object behavior detection device comprising a background image area creation unit.
【請求項8】 請求項1または2において、 テンプレート作成部が、2値化差分画像と、既に作成さ
れて記憶されたマスク画像とを用いて、テンプレートを
作成する場合に、 2値化差分画像の移動体を含む領域とマスク画像の移動
体を含む領域の間の内分線を、テンプレートの輪郭に選
定することを特徴とする移動体挙動検知装置。
8. The binarized difference image according to claim 1, wherein the template creating unit creates a template using the binarized difference image and a mask image that has been created and stored. A moving object behavior detecting apparatus, wherein an internal dividing line between an area including the moving object of the mask image and an area including the moving object of the mask image is selected as a contour of the template.
JP27698296A 1996-09-27 1996-09-27 Moving body movement detector Pending JPH10105689A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27698296A JPH10105689A (en) 1996-09-27 1996-09-27 Moving body movement detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27698296A JPH10105689A (en) 1996-09-27 1996-09-27 Moving body movement detector

Publications (1)

Publication Number Publication Date
JPH10105689A true JPH10105689A (en) 1998-04-24

Family

ID=17577126

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27698296A Pending JPH10105689A (en) 1996-09-27 1996-09-27 Moving body movement detector

Country Status (1)

Country Link
JP (1) JPH10105689A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006046961A (en) * 2004-07-30 2006-02-16 Matsushita Electric Works Ltd Human body sensor
JP2009109508A (en) * 2008-12-15 2009-05-21 Panasonic Electric Works Co Ltd Human body detection sensor
JP2009223220A (en) * 2008-03-18 2009-10-01 Zenrin Co Ltd Road surface marking map creating method
JP2010175756A (en) * 2009-01-29 2010-08-12 Zenrin Co Ltd Method and device for generating road surface marking map
CN104700429A (en) * 2014-10-05 2015-06-10 安徽工程大学 Motion detection method of airborne display
US20160117842A1 (en) * 2014-10-27 2016-04-28 Playsight Enteractive Ltd. Object extraction from video images

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006046961A (en) * 2004-07-30 2006-02-16 Matsushita Electric Works Ltd Human body sensor
JP2009223220A (en) * 2008-03-18 2009-10-01 Zenrin Co Ltd Road surface marking map creating method
JP2009109508A (en) * 2008-12-15 2009-05-21 Panasonic Electric Works Co Ltd Human body detection sensor
JP4650565B2 (en) * 2008-12-15 2011-03-16 パナソニック電工株式会社 Human body detection sensor
JP2010175756A (en) * 2009-01-29 2010-08-12 Zenrin Co Ltd Method and device for generating road surface marking map
CN104700429A (en) * 2014-10-05 2015-06-10 安徽工程大学 Motion detection method of airborne display
US20160117842A1 (en) * 2014-10-27 2016-04-28 Playsight Enteractive Ltd. Object extraction from video images
US9639954B2 (en) * 2014-10-27 2017-05-02 Playsigh Interactive Ltd. Object extraction from video images
US20170200281A1 (en) * 2014-10-27 2017-07-13 Playsight Interactive Ltd. Object extraction from video images system and method
US9959632B2 (en) * 2014-10-27 2018-05-01 Playsight Interactive Ltd. Object extraction from video images system and method
US20180211397A1 (en) * 2014-10-27 2018-07-26 Playsight Interactive Ltd. Object extraction from video images system and method

Similar Documents

Publication Publication Date Title
JP4157620B2 (en) Moving object detection apparatus and method
CN109584300B (en) Method and device for determining heading angle of vehicle head
JPH1139469A (en) Face image processor
JPH11195127A (en) Method for recognizing white line and device therefor
JPH10105689A (en) Moving body movement detector
JP3912869B2 (en) Traffic flow measuring device
JP2002133421A (en) Moving body recognition method and device
JPH05205052A (en) Automatic tracking device
JPH07249128A (en) Picture processor for vehicle
JPH08320990A (en) Vehicle number reader
JPH10105690A (en) Wide area moving body following device
JPH11136664A (en) Automatic moving object tracking system
JP7360303B2 (en) Image processing device and image processing method
JPH06169458A (en) Automatic tracking device for moving body
JP2621806B2 (en) Background feature mask generation device and moving object feature extraction device
JP2702307B2 (en) Fingerprint correction system
JP2002042140A (en) Moving object measuring device and traffic flow measured image processing device
JPH0410200A (en) Traffic lane edge recognizing device
JP3585143B2 (en) Character string extraction method and device
JP2735033B2 (en) Lane change detection apparatus and method
JP3449836B2 (en) Image clipping method and apparatus
JP3118484B2 (en) Image segmentation method
JPH0922466A (en) Method for preparing background image and image processor
JPH05165950A (en) Method and device for generating outline image
JPH0933216A (en) Image processor carried on vehicle