JP2001060263A - Object tracking method and device - Google Patents

Object tracking method and device

Info

Publication number
JP2001060263A
JP2001060263A JP2000180186A JP2000180186A JP2001060263A JP 2001060263 A JP2001060263 A JP 2001060263A JP 2000180186 A JP2000180186 A JP 2000180186A JP 2000180186 A JP2000180186 A JP 2000180186A JP 2001060263 A JP2001060263 A JP 2001060263A
Authority
JP
Japan
Prior art keywords
image
template
detected
matching
input
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.)
Granted
Application number
JP2000180186A
Other languages
Japanese (ja)
Other versions
JP3560326B2 (en
Inventor
Wataru Ito
渡 伊藤
Hirotada Ueda
博唯 上田
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.)
Hitachi Denshi KK
Original Assignee
Hitachi Denshi KK
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 Hitachi Denshi KK filed Critical Hitachi Denshi KK
Priority to JP2000180186A priority Critical patent/JP3560326B2/en
Publication of JP2001060263A publication Critical patent/JP2001060263A/en
Application granted granted Critical
Publication of JP3560326B2 publication Critical patent/JP3560326B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a highly reliable and stable object tracking method for detecting and tracking accurately an object despite the large change of direction of the object by correcting the position of a partial image detected via the edge detection into a detecting position where the current time of the object is detected and updating the partial image of the corrected position as a new template. SOLUTION: The template matching processing is carried out between a template image of a stored time and an input image (103). When the highest matching degree is larger than the prescribed value (104), the edge processing of the input image is carried out about the template image having the highest matching degree and the position of an object is corrected according to an obtained edge image (105). The position of the object having its corrected position is updated as a new template image (106). That is, a detecting position is corrected into a position where the highest edge density is secured and accordingly the position of a template is never shifted from the object even though the object changes its direction.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、撮像装置を用いた
監視装置に係り、特に撮像視野内に侵入した物体を、撮
像装置から入力する映像信号の中から自動的に検出し、
検出した物体の動きを自動的に追跡するようにした物体
追跡方法と、検出した物体の動きに応じて視野方向(撮
像中心方向)を調節するようにした物体追跡装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a monitoring apparatus using an image pickup device, and more particularly, to a method for automatically detecting an object that has entered a field of view from a video signal input from the image pickup device.
The present invention relates to an object tracking method for automatically tracking the movement of a detected object, and to an object tracking device for adjusting a visual field direction (imaging center direction) according to the detected movement of the object.

【0002】[0002]

【従来の技術】カメラ等の撮像装置を用いた映像監視装
置は、従来から広く用いられている。しかし、このよう
な映像監視装置を用いた監視システムにおいて、その監
視視野内に入り込んでくる人間や自動車などの侵入物体
の検出及び追跡を、監視員がモニタに表示される画像を
見ながら行なう有人監視ではなく、カメラ等の画像入力
手段から入力される画像から侵入物体を自動的に検出
し、その動きを自動的に追跡するようにし、所定の報知
や警報処置が得られるようにしたシステムが要求される
ようになってきている。
2. Description of the Related Art A video monitoring apparatus using an image pickup device such as a camera has been widely used. However, in a surveillance system using such a video surveillance device, a manned person who monitors and detects an intruding object such as a human or a car entering the surveillance field of view while watching the image displayed on the monitor. Instead of monitoring, a system that automatically detects an intruding object from an image input from image input means such as a camera and automatically tracks the movement of the intruding object so that a predetermined notification and alarm action can be obtained. It is becoming required.

【0003】このようなシステムを実現するためには、
まず、差分法などによって視野内の侵入物体を検出す
る。差分法とは、テレビジョンカメラ(以下、TVカメラ
と称する)等の撮像装置により得られた入力画像と、予
め作成した基準背景画像、即ち、検出すべき物体の写っ
ていない画像とを比較し、画素毎に輝度値の差分を求
め、その差分値の大きい領域を物体として検出するもの
である。このようにして検出された侵入物体の位置に相
当する入力画像の部分画像をテンプレートとして登録
し、逐次入力される画像の中でテンプレート画像と一致
度が最大となる位置を検出する。この方法は、テンプレ
ートマッチングと呼ばれ広く知られ、例えば、1985
年に総研出版より出版された田村秀行氏監修による『コ
ンピュータ画像処理入門』と題する書籍のP149〜P153で
解説されている。通常、テンプレートマッチングを用い
て対象物体を追跡する場合、対象物体の姿勢の変化に追
従するため、マッチング処理によって検出された対象物
体の位置の画像を新たにテンプレートとして逐次更新す
る。これらの処理を図4〜図7によって説明する。
In order to realize such a system,
First, an intruding object in the visual field is detected by a difference method or the like. The difference method compares an input image obtained by an imaging device such as a television camera (hereinafter, referred to as a TV camera) with a reference background image created in advance, that is, an image without an object to be detected. , A difference in luminance value is obtained for each pixel, and an area having a large difference value is detected as an object. A partial image of the input image corresponding to the position of the intruding object detected in this way is registered as a template, and a position at which the degree of coincidence with the template image is maximum among sequentially input images is detected. This method is called template matching and is widely known.
It is described in P149-P153, a book entitled "Introduction to Computer Image Processing", supervised by Mr. Hideyuki Tamura, published by Soken Shuppan in 2015. Normally, when tracking a target object using template matching, an image of the position of the target object detected by the matching process is successively updated as a new template in order to follow a change in the posture of the target object. These processes will be described with reference to FIGS.

【0004】図4は差分法を用いた侵入物体検出処理の
一例を表すフローチャート、図5はテンプレートマッチ
ングを用いた侵入物体追跡の一例を表すフローチャー
ト、図6は、図4と図5で表される侵入物体検出処理か
ら初期のテンプレート画像登録までの流れを画像の例に
よって説明するための図である。また図7は、図5で表
される侵入物体追跡処理の流れを画像の例を用いて説明
するための図であり、一定の時間間隔で入力された画像
が初期に与えられたテンプレート画像をもとにどのよう
に実行されていくか(初期のテンプレートがどのように
変化していくか)を説明する図である。
FIG. 4 is a flowchart showing an example of an intruding object detection process using the difference method, FIG. 5 is a flowchart showing an example of intruding object tracking using template matching, and FIG. 6 is shown in FIG. 4 and FIG. FIG. 8 is a diagram for explaining a flow from an intruding object detection process to an initial template image registration using an example of an image. FIG. 7 is a diagram for explaining the flow of the intruding object tracking process shown in FIG. 5 by using an example of an image. An image input at a certain time interval is a template image initially given. FIG. 9 is a diagram for explaining how the process is executed based on how (an initial template changes).

【0005】図6で、601は入力画像、609は入力画像60
1中の人型の物体、602は基準背景画像、606は差分処理
部、603は差分処理部606において差分処理された後の差
分画像、610は人型の物体609に相当する差分画像603中
の人型の差分画像、607は二値化処理部、604は二値化処
理部607によって二値化処理された差分画像603の二値化
画像、611は人型の差分画像610に相当する二値化画像60
4中の人型物体(人型の二値化画像)、612は人型の二値
化画像611の外接矩形、608は画像抽出部、605は入力画
像601から外接矩形612の囲む領域をテンプレート画像と
して切出すことを説明する画像、613は入力画像601から
切出した初期テンプレート画像である。
In FIG. 6, reference numeral 601 denotes an input image, and 609 denotes an input image 60.
1, a human-shaped object, 602 is a reference background image, 606 is a difference processing unit, 603 is a difference image after being subjected to difference processing in the difference processing unit 606, and 610 is a difference image 603 corresponding to a human-shaped object 609. , 607 corresponds to the binarized image of the difference image 603 subjected to the binarization processing by the binarization processing unit 607, and 611 corresponds to the humanoid difference image 610. Binary image 60
4, a human-shaped object (human-shaped binary image), 612 is a circumscribed rectangle of the human-shaped binary image 611, 608 is an image extraction unit, and 605 is a template for an area surrounding the circumscribed rectangle 612 from the input image 601. An image 613 for explaining extraction as an image is an initial template image extracted from the input image 601.

【0006】図4と図6において、まず、TVカメラから
例えば320×240画素の入力画像601を入力する(画像入
力ステップ401)。次に、差分処理部606において、入力
画像601と、予め作成した基準背景画像602との画素毎の
差分を計算し、差分画像603を取得する。この時、入力
画像601中の人型の物体609は差分画像603中に、人型の
差分画像610として現れる(差分処理ステップ402)。そ
して、二値化処理部607において、差分画像603の各画素
に対しての差分値が所定のしきい値以下の画素の値を
“0”、しきい値以上の画素の値を“255”(1画素を8ビ
ットとして)に置換えて、二値化画像604を得る。この
時、入力画像601に撮像された人型の物体609は、二値化
画像604中の人型物体611として検出され、人型物体611
の外接矩形612が生成される(二値化処理ステップ40
3)。次に物体存在判定ステップ404では、画像抽出部60
8において、二値化画像604中で画素値が“255”となっ
た画素のかたまりを検出し、画素値が“255”となる画
素のかたまりが存在する場合は物体検出処理を終了し、
存在したかたまりの外接矩形に相当する入力画像に部分
画像を初期テンプレート画像613として後述の画像メモ
リ305(図3)に登録する。また、画素値が“255”とな
る画素のかたまりが存在しない場合は画像入力ステップ
401へ分岐する。
In FIGS. 4 and 6, first, an input image 601 of, for example, 320 × 240 pixels is input from a TV camera (image input step 401). Next, the difference processing unit 606 calculates a difference for each pixel between the input image 601 and the previously created reference background image 602, and acquires a difference image 603. At this time, the human-shaped object 609 in the input image 601 appears as a human-shaped difference image 610 in the difference image 603 (difference processing step 402). Then, in the binarization processing unit 607, the value of a pixel whose difference value with respect to each pixel of the difference image 603 is equal to or smaller than a predetermined threshold is “0”, and the value of a pixel equal to or larger than the threshold is “255”. (1 pixel is 8 bits) to obtain a binary image 604. At this time, the humanoid object 609 captured in the input image 601 is detected as the humanoid object 611 in the binarized image 604, and the humanoid object 611 is detected.
Is generated (binary processing step 40).
3). Next, in the object presence determination step 404, the image extraction unit 60
In step 8, a cluster of pixels having a pixel value of “255” is detected in the binarized image 604, and if there is a cluster of pixels having a pixel value of “255”, the object detection process ends.
A partial image is registered as an initial template image 613 in an image memory 305 (FIG. 3), which will be described later, in the input image corresponding to the circumscribed rectangle of the existing lump. If there is no cluster of pixels having a pixel value of “255”, the image input step
Branch to 401.

【0007】物体追跡処理の流れを図5に従って説明す
る。図5の物体検出処理ステップ101と初期テンプレー
ト登録ステップ102とにおいて、図4と図6で説明した
ように物体検出処理と初期テンプレート画像の登録がな
された後の処理について図7を用いて説明する。図4と
図6で説明した物体検出処理が終了した後は、図5に示
すフローチャートに従って物体追跡処理がなされる。
The flow of the object tracking process will be described with reference to FIG. The processing after the object detection processing and the registration of the initial template image as described in FIGS. 4 and 6 in the object detection processing step 101 and the initial template registration step 102 in FIG. 5 will be described with reference to FIG. . After the object detection processing described in FIGS. 4 and 6 is completed, the object tracking processing is performed according to the flowchart shown in FIG.

【0008】図7で、701aは時刻t0-1において更新され
た物体のテンプレート画像、701は時刻t0-1での入力画
像におけるテンプレート画像701aの位置を示す図、702
は時刻t0での入力画像、702aは時刻t0においてテンプレ
ートマッチング処理によって検出された物体の位置(テ
ンプレート画像)、702bは1フレーム前(t0-1)でのテ
ンプレート画像の位置、702cはテンプレートマッチング
処理(例えば、図5のフローチャート)で探索する探索
範囲、702dは時刻t0-1からt0まで人型物体が移動した方
向と軌跡を表す移動矢印(例えば、テンプレート画像70
1aの中心位置からテンプレート画像702aの中心位置へ向
かう矢印)、702eはテンプレートマッチング処理で人型
物体を検出した位置、703aは時刻t0で更新された物体の
テンプレート画像、703は時刻t0での入力画像における
テンプレート画像703aの位置を示す図、704は時刻t0+1
での入力画像、704aは時刻t0+1においてテンプレートマ
ッチング処理によって検出された物体の位置(テンプレ
ート画像)、704bは1フレーム前(t0)でのテンプレー
ト画像の位置、704cはテンプレートマッチング処理で探
索する探索範囲、704dは時刻t0-1からt0+1まで人型物体
が移動した方向と軌跡を表す移動矢印(例えば、テンプ
レート画像701aの中心位置からテンプレート画像703aの
中心位置を経由して704aの中心位置へ向かう矢印)、70
5aは時刻t0+1で更新された物体のテンプレート画像、70
5は時刻t0+1での入力画像におけるテンプレート画像705
aの位置を示す図、706は時刻t0+2での入力画像、706aは
時刻t0+2においてテンプレートマッチング処理によって
検出された物体の位置(テンプレート画像)、706bは1
フレーム前(t0+1)でのテンプレート画像の位置、706c
はテンプレートマッチング処理で探索する探索範囲、70
6dは時刻t0-1からt0+2まで人型物体が移動した方向と軌
跡を表す移動矢印(例えば、テンプレート画像701aの中
心位置からテンプレート画像703aの中心位置、テンプレ
ート画像705aの中心位置を経由して706aの中心位置へ向
かう矢印)、707aは時刻t0+2で更新された物体のテンプ
レート画像、707は時刻t0+2での入力画像におけるテン
プレート画像707aの位置を示す図、708は時刻t0+3での
入力画像、708aは時刻t0+3においてテンプレートマッチ
ング処理によって検出された物体の位置(テンプレート
画像)、708bは1フレーム前(t0+2)でのテンプレート
画像の位置、708cはテンプレートマッチング処理で探索
する探索範囲、708dは時刻t0-1からt0+3まで人型物体が
移動した方向と軌跡を表す移動矢印(例えば、テンプレ
ート画像701aの中心位置からテンプレート画像703aの中
心位置、テンプレート画像705aの中心位置、テンプレー
ト画像707aの中心位置を経由して708aの中心位置へ向か
う矢印)である。
In FIG. 7, reference numeral 701a denotes a template image of the object updated at time t0-1, reference numeral 701 denotes a position of the template image 701a in the input image at time t0-1;
Is the input image at time t0, 702a is the position of the object detected by the template matching process at time t0 (template image), 702b is the position of the template image one frame before (t0-1), and 702c is the template matching process A search range to be searched in (for example, the flowchart of FIG. 5), 702d is a moving arrow (for example, template image 70) indicating the direction and trajectory of the humanoid object from time t0-1 to time t0.
Arrow pointing from the center position of 1a to the center position of the template image 702a), 702e is the position where the humanoid object is detected in the template matching process, 703a is the template image of the object updated at time t0, and 703 is the input at time t0 FIG. 704 shows the position of the template image 703a in the image.
, 704a is the position of the object detected by the template matching process at time t0 + 1 (template image), 704b is the position of the template image one frame before (t0), and 704c is searched by the template matching process. The search range, 704d, is a moving arrow indicating the direction and trajectory of the humanoid object from time t0-1 to t0 + 1 (for example, from the center position of template image 701a to the center of 704a via the center position of template image 703a). Arrow to position), 70
5a is the template image of the object updated at time t0 + 1, 70
5 is a template image 705 in the input image at time t0 + 1
FIG. 706 shows the input image at time t0 + 2, 706a shows the position of the object detected by the template matching process at time t0 + 2 (template image), and 706b shows 1
Position of template image before frame (t0 + 1), 706c
Is the search range to be searched in the template matching process, 70
6d is a moving arrow (for example, from the center position of the template image 701a to the center position of the template image 703a, the center position of the template image 705a, 707a is a template image of the object updated at time t0 + 2, 707 is a diagram showing the position of the template image 707a in the input image at time t0 + 2, and 708 is a time t0 + 708a is the position (template image) of the object detected by the template matching process at time t0 + 3, 708b is the position of the template image one frame before (t0 + 2), and 708c is the template matching process. 708d is a moving arrow representing the direction and trajectory of the humanoid object from time t0-1 to time t0 + 3 (for example, from the center position of the template image 701a to the position of the template image 703a. Heart position, the center position of the template image 705a, a via the center position of the template image 707a toward the center position of 708a arrows).

【0009】即ち、図5と図7において、物体追跡処理
が開始され、二値化画像604中に物体が存在すると判定
され、物体検出処理ステップ101を終了する(図4)。
そして、二値化画像604中の人型の二値化画像のかたま
りの外接矩形に相当する入力画像601の部分画像を、初
期テンプレート画像613(図7のテンプレート画像701
a)として画像メモリ305(図3)に登録する(初期テン
プレート登録ステップ102)。続いて、逐次入力される
入力画像中の探索範囲702c内でテンプレート画像701aと
一致度r(Δx,Δy)が最大となる部分画像702aを検出する
(テンプレートマッチッングステップ103)。即ち、テ
ンプレートマッチッングステップ103では、最大一致度
と、その最大一致度が求められた位置とを得る。
That is, in FIGS. 5 and 7, the object tracking processing is started, it is determined that an object exists in the binary image 604, and the object detection processing step 101 is ended (FIG. 4).
Then, the partial image of the input image 601 corresponding to the circumscribed rectangle of the cluster of the human-shaped binarized images in the binarized image 604 is converted into the initial template image 613 (the template image 701 in FIG. 7).
a) is registered in the image memory 305 (FIG. 3) (initial template registration step 102). Subsequently, a partial image 702a having the maximum coincidence r (Δx, Δy) with the template image 701a is detected within the search range 702c in the input image sequentially input (template matching step 103). That is, in the template matching step 103, the maximum matching degree and the position where the maximum matching degree is obtained are obtained.

【0010】この一致度r(Δx,Δy)を算出する方法とし
て、例えば以下の式(1)で得られる正規化相関と呼ばれ
る指標を用いることができる。
As a method of calculating the degree of coincidence r (Δx, Δy), for example, an index called a normalized correlation obtained by the following equation (1) can be used.

【数1】 (Equation 1)

【0011】ここで、入力画像702に対してテンプレー
トマッチングを行なった場合、f(x,y)は入力画像702、f
t(x,y)はテンプレート画像701a、(x0,y0)は登録した
テンプレート画像701aの左上の座標(画像は左上を原点
としている)、Dtはテンプレートの探索範囲702cを表
し、探索範囲702c内にテンプレート画像701aとまったく
同じ画素値を持つ画像が存在した場合には、一致度r(Δ
x,Δy)は“1.0”となる。テンプレートマッチングステ
ップ103では、この式(1)で表される指標を(Δx,Δy)∈D
で表される探索範囲702cに対して計算し、その中で一致
度r(Δx,Δy)が最大となる位置(外接矩形)702aを検出
する。この探索範囲702cは、対象物体の見かけの移動量
によって決定される。例えば、速度40km/hで移動する物
体を、50m離れたTVカメラ(素子サイズ6.5mm×4.8mmのC
CD、焦点距離25mmのレンズ、入力画像サイズ320×240画
素(pix)。処理間隔0.1frame/sec)で監視する場合、
水平方向の物体の見かけの移動量は27.4pix/frame、垂
直方向は27.8pix/frameとなり、Dを-30pix<Δx<30pi
x,-30pix<Δy<30pix程度に設定すればよい。尚、一致
度の算出方法は上述の正規化相関の指標に限られるもの
ではない。例えば、入力画像とテンプレート画像間で各
画素毎の差をとって、その絶対値の累積値の逆数を一致
度としてもよい。
Here, when template matching is performed on the input image 702, f (x, y) is
t (x, y) is the template image 701a, (x 0 , y 0 ) is the upper left coordinates of the registered template image 701a (the image has the upper left as the origin), and D t represents the template search range 702c. If an image having the same pixel value as the template image 701a exists in the range 702c, the matching degree r (Δ
x, Δy) is “1.0”. In the template matching step 103, the index represented by the equation (1) is defined as (Δx, Δy) ∈D
Is calculated for the search range 702c represented by the following formula, and a position (circumscribed rectangle) 702a at which the degree of coincidence r (Δx, Δy) is the maximum is detected. This search range 702c is determined by the apparent movement amount of the target object. For example, an object moving at a speed of 40 km / h can be viewed from a TV camera 50 m away (C 6.5 mm x 4.8 mm).
CD, lens with a focal length of 25 mm, input image size 320 × 240 pixels (pix). When monitoring at a processing interval of 0.1 frame / sec)
The apparent movement amount of the object in the horizontal direction is 27.4 pix / frame and that in the vertical direction is 27.8 pix / frame, and D is -30 pix <Δx <30 pi.
x, -30 pix <Δy <30 pix may be set. The method of calculating the degree of coincidence is not limited to the above-described index of the normalized correlation. For example, the difference between each pixel between the input image and the template image may be calculated, and the reciprocal of the accumulated value of the absolute values may be used as the degree of coincidence.

【0012】次に、最大一致度判定ステップ104では、
テンプレートマッチングステップ103において、テンプ
レート画像701aと一致度が最大となる入力画像702の位
置に、物体が移動した(外接矩形702bから外接矩形702a
に移動した)と判断したあと、次に、最大一致度が所定
値以下に低下した場合(例えば“0.5”未満)、入力画
像中に対象物体がいなくなったものとして、物体検出処
理ステップ101へ分岐し、最大一致度が所定値以上であ
った場合(例えば“0.5”以上)は、テンプレート更新
ステップ106へ分岐する。テンプレート更新ステップ106
では、入力画像中の探索範囲702c内でテンプレート画像
701aと一致度r(△x,△y)が最大となる部分画像702aを
使ってテンプレート画像701aをテンプレート画像703aに
更新する。ここで、テンプレート画像を更新する理由
は、対象物体の姿勢が変化(例えば、対象物体の人が手
を上げたり、腰を曲げたり、足を上げたりして画像が変
化)し、テンプレート画像を更新しないと一致度が低下
してしまい、追跡結果の信頼性が低下するためである。
従って、検出された物体の位置の部分画像702eを新たな
テンプレート画像703aとして更新し、対象物体が姿勢を
変えた場合でも安定な追跡を行なうようにしている。
Next, in the maximum matching degree determination step 104,
In the template matching step 103, the object is moved to the position of the input image 702 where the degree of coincidence with the template image 701a is maximum (from the circumscribed rectangle 702b to the circumscribed rectangle 702a).
Next, when the maximum matching degree falls below a predetermined value (for example, less than “0.5”), it is determined that there is no target object in the input image, and the process branches to the object detection processing step 101. If the maximum matching degree is equal to or more than the predetermined value (for example, “0.5” or more), the process branches to the template updating step. Template update step 106
Now, within the search range 702c in the input image,
The template image 701a is updated to the template image 703a using the partial image 702a having the maximum coincidence r (rx, △ y) with 701a. Here, the reason for updating the template image is that the posture of the target object changes (for example, the image of the target object changes when the person raises his / her hand, bends, or raises his / her legs), and the template image is updated. If not updated, the degree of coincidence decreases, and the reliability of the tracking result decreases.
Therefore, the partial image 702e of the detected position of the object is updated as a new template image 703a, and stable tracking is performed even when the target object changes its posture.

【0013】上述の実施例では、差分法によって検出し
た侵入物体について作成したテンプレート画像は、検出
した画素のかたまりの外接矩形を取り込み、この外接矩
形に囲まれた部分画像をテンプレート画像として切出し
た。しかし、切出すテンプレート画像のサイズの決定方
法はこの方法に限らない。例えば、外接矩形に一定の定
数(例えば、0.8、または1.1等)を乗算してもよい。更
に、撮像素子としてCCD(Charge Coupled Device)を使
用した場合には、CCDのサイズ、レンズの焦点距離、CCD
から検出する物体の距離によって、対象とみなす物体の
大きさを予め算出できるので、算出した大きさをテンプ
レート画像サイズとすることもできる。
In the above embodiment, the template image created for the intruding object detected by the difference method takes in a circumscribed rectangle of a cluster of detected pixels, and cuts out a partial image surrounded by the circumscribed rectangle as a template image. However, the method for determining the size of the template image to be cut out is not limited to this method. For example, the circumscribed rectangle may be multiplied by a certain constant (for example, 0.8 or 1.1). Further, when a CCD (Charge Coupled Device) is used as an image sensor, the size of the CCD, the focal length of the lens, the CCD
Since the size of an object to be regarded as a target can be calculated in advance based on the distance of the object detected from, the calculated size can be used as the template image size.

【0014】次に、カメラ雲台制御ステップ107に移
る。図11は入力画像とテンプレートマッチングで検出
された対象物体の位置との関係を説明するための図であ
る。図11に言及して、カメラ雲台制御ステップ107に
ついて説明する。カメラ雲台制御ステップ107では、テ
ンプレートマッチングによって検出された対象物体の位
置と入力画像中央との変位、即ち、カメラの光軸(カメ
ラの視野方向)に対して対象物体が存在する方向に基づ
いてカメラ雲台302のパン・チルトモータを制御する。
つまり、テンプレートマッチングによって検出された対
象物体の中心位置(x0+△x+dx/2,y0+△y+dy/2)
((dx,dy)はテンプレート画像の大きさを表す)と入
力画像の中心位置(160,120)(画像サイズを320×240
とする)とを比較し、検出された対象物体の中心位置が
入力画像の中心位置に対して左側に位置する場合は、カ
メラ雲台のパンモータをカメラの光軸方向が左に移動す
るように制御し、右側に位置する場合はカメラ雲台のパ
ンモータをカメラの光軸方向が右に移動するように制御
する。また、検出された対象物体の中心位置が入力画像
の中心位置に対して上側に位置する場合は、カメラ雲台
のチルトモータをカメラの光軸方向が上に移動するよう
に制御し、下側に位置する場合は、カメラ雲台のチルト
モータをカメラの光軸方向が下に移動するように制御す
る。尚、パンモータ、チルトモータは同時に制御可能
で、例えば、検出された対象物体の中心位置が入力画像
の中心位置に対して左上側に位置する場合は、カメラ雲
台のパンモータをカメラの光軸方向が左に移動するよう
に制御し、かつ、チルトモータをカメラの光軸方向が上
に移動するように同時に制御する。このようにすること
で、カメラの光軸上に対する対象物体を捉えるようにカ
メラ雲台を制御することが可能となる。次に、警報・モ
ニタ表示ステップ108では、例えば対象物体が所定の警
報を出す範囲に存在する場合に警報を鳴らしたり、監視
モニタに対象物体の画像を表示したりする。
Next, the process proceeds to a camera head control step 107. FIG. 11 is a diagram for explaining the relationship between the input image and the position of the target object detected by template matching. The camera head control step 107 will be described with reference to FIG. In the camera head control step 107, the displacement between the position of the target object detected by the template matching and the center of the input image, that is, the direction in which the target object exists with respect to the optical axis of the camera (viewing direction of the camera). The pan / tilt motor of the camera platform 302 is controlled.
That is, the center position of the target object detected by template matching (x 0 + △ x + dx / 2, y 0 + △ y + dy / 2)
((Dx, dy) represents the size of the template image) and the center position of the input image (160,120) (image size is 320 × 240
When the center position of the detected target object is located on the left side of the center position of the input image, the pan motor of the camera platform is moved so that the optical axis direction of the camera moves to the left. If the camera is located on the right side, the pan motor of the camera platform is controlled so that the optical axis direction of the camera moves to the right. When the center position of the detected target object is located above the center position of the input image, the tilt motor of the camera platform is controlled so that the optical axis direction of the camera moves upward, and In this case, the tilt motor of the camera platform is controlled so that the optical axis direction of the camera moves downward. Note that the pan motor and the tilt motor can be simultaneously controlled. For example, when the center position of the detected target object is located on the upper left with respect to the center position of the input image, the pan motor of the camera platform is moved in the optical axis direction of the camera. Is controlled to move to the left, and the tilt motor is simultaneously controlled so that the optical axis direction of the camera moves upward. This makes it possible to control the camera platform so as to capture the target object on the optical axis of the camera. Next, in the alarm / monitor display step 108, for example, when the target object is within a predetermined alarm range, an alarm is sounded, or an image of the target object is displayed on the monitoring monitor.

【0015】警報・モニタ表示ステップ108が終わる
と、画像入力ステップ401に戻り、新しい入力画像を得
て、この現時刻での入力画像に対して再びテンプレート
マッチッング処理を行う。即ち、時刻t0での入力画像70
2により更新したテンプレート画像703aと、時刻t0+1で
の入力画像704とによりテンプレートマッチング処理を
行う。この時、探索範囲704cは時刻t0で更新されたテン
プレート画像704bを中心とした位置に移動しており、新
しい探索範囲で検索が行われる。そして、最大の一致度
を持った物体が検出され、その検出された物体の位置70
4aを元に新しいテンプレート画像705aが生成される。以
上のように、対象物体が存在する間は、ステップ401,
ステップ103,ステップ104,ステップ106,ステップ10
7,ステップ108の処理を繰返し、新しいテンプレート画
像706a、708a,‥‥‥へと次々にテンプレート画像を更
新しながら、対象物体を追跡し続ける。
When the alarm / monitor display step 108 is completed, the process returns to the image input step 401, where a new input image is obtained, and template matching processing is performed again on the input image at the current time. That is, the input image 70 at time t0
A template matching process is performed using the template image 703a updated in step 2 and the input image 704 at time t0 + 1. At this time, the search range 704c has moved to a position centered on the template image 704b updated at time t0, and a search is performed in a new search range. Then, the object having the highest degree of coincidence is detected, and the position 70 of the detected object is detected.
A new template image 705a is generated based on 4a. As described above, while the target object is present, steps 401,
Step 103, Step 104, Step 106, Step 10
7. The processing of step 108 is repeated, and the tracking of the target object is continued while updating the template images one after another to new template images 706a, 708a,.

【0016】前述のテンプレートマッチングを用いた侵
入物体の追跡法では、対象物体の向きが変化(例えば、
対象物体の人が右を向いたり、後ろを向いたり)する
と、対象物体とマッチング位置とのズレが大きくなり、
正確かつ安定したな追跡ができないという問題がある。
即ち、テンプレートマッチングは、テンプレート内の高
いコントラストの模様部分が一致するようにマッチング
されるという性質がある。例えば、対象物体が車輌であ
る場合において、はじめは正面を向いていて、車輌のほ
とんどすべてがマッチング対象となっていた場合(図8
の入力画像802)と、その後進行方向(向き)が変わり
横向きになってしまった車輌の前面部分だけがマッチン
グ対象となり、車輌全体がマッチング対象となっていた
時に比べて、マッチング中心が車両の中心から車輌の前
部に移動するため、検出位置ズレが生ずる。
In the tracking method for an intruding object using the template matching described above, the direction of the target object changes (for example,
When the target object person turns right or backwards), the deviation between the target object and the matching position increases,
There is a problem that accurate and stable tracking cannot be performed.
That is, the template matching has a property that matching is performed such that high-contrast pattern portions in the template match. For example, in a case where the target object is a vehicle, the vehicle is initially facing the front, and almost all of the vehicle is a matching target (FIG. 8).
Input image 802), and then only the front part of the vehicle, whose traveling direction (direction) has changed and turned sideways, becomes the matching target, and the matching center is the center of the vehicle compared to when the entire vehicle was the matching target. From the vehicle to the front of the vehicle, a detection position shift occurs.

【0017】これを図8を用いて説明する。図8は、侵
入物体追跡処理の流れを画像の例を用いて説明するため
に、撮像視野内での曲線を描く車道内を通過する車輌を
侵入物体とした場合の図である。801a,803a,805a,80
7aはそれぞれ時刻t1-1,時刻t1,時刻t1+1,時刻t1+2の
テンプレート画像、801,803,805,807はそれぞれテン
プレート画像801a,803a,805a,807aの更新時の位置を
示す画像、802,804,806,808はそれぞれ時刻t1,時刻
t1+1,時刻t1+2,時刻t1+3の入力画像、802a,804a,80
6a,809aは時刻t1,時刻t1+1,時刻t1+2,時刻t1+3にお
いてそれぞれテンプレートマッチング処理によって検出
された物体の位置、802b,804b,806b,808bはそれぞれ
1フレーム前でのテンプレート画像(時刻t1-1,時刻t
1,時刻t1+1,時刻t1+2でのそれぞれのテンプレート画
像)の位置である。図8において、時刻t1-1で登録され
たテンプレート画像801aは、移動車輌のフロント部がほ
ぼ正面を向いている画像である。時刻t1では、このテン
プレート画像801aを用いてテンプレートマッチングを行
ない、対象物体の移動した位置を検出すると共に、テン
プレート画像801aをテンプレート画像803aに更新する。
続いて、時刻t1+1ではテンプレート画像805aに更新さ
れ、更に時刻t1+2ではテンプレート画像807aに更新さ
れ、この処理を時刻t1+3まで行なうと、追跡開始時刻t1
で車輌のライトなどがあるフロント部分をテンプレート
マッチングしていたものが、時刻t1+3では、車輌の左側
にずれてマッチングされてしまう。
This will be described with reference to FIG. FIG. 8 is a diagram illustrating a case where a vehicle passing through a road that draws a curve in an imaging field of view is set as an intruding object in order to explain the flow of the intruding object tracking process using an example of an image. 801a, 803a, 805a, 80
7a is a template image at time t1-1, time t1, time t1 + 1, and time t1 + 2, respectively, and 801, 803, 805, and 807 are images showing the update positions of template images 801a, 803a, 805a, and 807a, respectively. , 802, 804, 806, and 808 are time t1 and time, respectively.
t1 + 1, input image at time t1 + 2, time t1 + 3, 802a, 804a, 80
6a and 809a are the positions of the objects detected by the template matching processing at time t1, time t1 + 1, time t1 + 2, and time t1 + 3, respectively, and 802b, 804b, 806b, and 808b are the template images one frame before, respectively. (Time t1-1, time t
1, template images at time t1 + 1 and time t1 + 2). In FIG. 8, a template image 801a registered at time t1-1 is an image in which the front portion of the moving vehicle is substantially facing the front. At time t1, template matching is performed using the template image 801a to detect the position where the target object has moved, and update the template image 801a to the template image 803a.
Subsequently, at time t1 + 1, the image is updated to the template image 805a, and at time t1 + 2, the image is updated to the template image 807a. When this processing is performed until time t1 + 3, the tracking start time t1
At the time t1 + 3, template matching was performed on the front part with the vehicle lights and the like, but the matching was shifted to the left side of the vehicle.

【0018】この現象は、テンプレートマッチングが対
象とする入力画像とテンプレート画像中のコントラスト
が高い画像部分の位置のズレを小さくする様にマッチン
グが行われるように働くためで、この例では車輌のライ
ト部分がそれにあたる。そのため、図8のように、対象
物体が向かって右から左に向きを変えるような場合には
左側にずれ、向って左側から右側に向きを変えるような
場合には右側にずれる。更に、時刻t1では、テンプレー
ト画像801a中には車輌の画像だけが入っていたが、対象
物体が向きを変えてテンプレート位置がずれたことによ
って、テンプレート画像807a中に対象物体以外の背景部
分の画像が入り込んでしまう。このテンプレート画像80
7aのような対象物体以外の画像を多く含んだテンプレー
ト画像を用いて追跡を続けた場合には、対象物体とマッ
チングできずに、テンプレートに入り込んだ背景部分と
マッチングしてしまう。従って、テンプレートマッチン
グを用いた物体追跡法は、対象物体の向きが変化するよ
うな場合には、対象物体の模様が見かけ上移動し、それ
に引張られてテンプレートの位置がずれるため、対象と
している物体を追跡している保証ができず、安定な追跡
を行うことができない。
This phenomenon is because the matching is performed so as to reduce the displacement between the input image to be subjected to the template matching and the image portion having a high contrast in the template image. The part corresponds to it. Therefore, as shown in FIG. 8, when the target object changes its direction from right to left, it shifts to the left, and when it changes its direction from left to right, it shifts to the right. Further, at time t1, only the image of the vehicle was included in the template image 801a, but the image of the background portion other than the target object was included in the template image 807a because the target object changed its orientation and shifted the template position. Gets in. This template image 80
If tracking is continued using a template image including many images other than the target object as in 7a, matching with the target object is impossible, and matching is performed with the background portion included in the template. Therefore, in the object tracking method using template matching, when the direction of the target object changes, the pattern of the target object apparently moves, and the position of the template is shifted by being pulled by the pattern. Cannot be guaranteed, and stable tracking cannot be performed.

【0019】[0019]

【発明が解決しようとする課題】前述の従来技術には、
対象物体の向きの変化が大きい場合には安定な追跡を行
うことができない欠点があった。本発明の目的は、上記
のような欠点を除去し、対象物体の向きの変化が大きい
場合にも、正確に物体を検出および追跡することができ
る、信頼性の高く安定に動作する物体追跡方法及び装置
を提供することにある。
The above-mentioned prior art includes the following:
When the change in the direction of the target object is large, there is a disadvantage that stable tracking cannot be performed. SUMMARY OF THE INVENTION An object of the present invention is to eliminate the above-mentioned drawbacks and to reliably and stably operate an object tracking method capable of accurately detecting and tracking an object even when the direction of the target object changes greatly. And a device.

【0020】[0020]

【課題を解決するための手段】上記の目的を達成するた
めに、本発明の物体追跡方法は、撮像装置によって逐次
取得する入力画像から撮像視野内の物体を検出し、検出
した物体を追跡する物体追跡方法において、現時刻に取
得した入力画像と、テンプレート画像とのテンプレート
マッチングを行い、現時刻に取得した入力画像の中から
テンプレート画像と一致度が最大となる部分画像の位置
を検出するマッチングステップと、マッチングステップ
によって検出した位置の部分画像を包含し、かつ検出し
た位置の部分画像より所定サイズ大きい拡張部分画像の
領域についてエッジ検出を行い、エッジ検出によって検
出した部分画像の位置を物体の現時刻の検出位置に補正
するマッチング位置補正ステップと、マッチング位置補
正ステップによって補正された位置の部分画像を新たな
テンプレートとして更新するテンプレート更新ステップ
とを設け、撮像視野内の物体を追跡するものである。ま
た、本発明の物体追跡方法において、位置補正ステップ
は、現時刻の入力画像の拡張部分画像の領域内で、エッ
ジの密度が最大になる部分画像の位置を検出したもので
ある。
In order to achieve the above object, an object tracking method according to the present invention detects an object in an imaging field of view from an input image sequentially acquired by an imaging device, and tracks the detected object. In the object tracking method, matching is performed by performing template matching between an input image acquired at the current time and a template image, and detecting a position of a partial image having a maximum matching degree with the template image from the input images acquired at the current time. Step, the edge detection is performed on an area of the extended partial image that includes the partial image at the position detected by the matching step and is larger than the partial image at the detected position by a predetermined size, and the position of the partial image detected by the edge detection is determined as A matching position correcting step for correcting the current position to the detected position, and a matching position correcting step. A template updating step of updating the partial image of the corrected position as a new template provided, is intended to track an object in the imaging field. In the object tracking method of the present invention, the position correction step detects a position of a partial image having a maximum edge density in an extended partial image area of the input image at the current time.

【0021】更に本発明の物体追跡方法において、位置
補正ステップは、拡張部分画像の領域内に含まれるエッ
ジ成分を抽出し、x軸及びy軸上にそれぞれ、y軸方向
及びx軸方向のエッジ成分量を累積表示し、x軸及びy
軸上の累積エッジ成分量から最大エッジ密度範囲を検出
したものである。また更に本発明の物体追跡方法におい
て、テンプレート画像のサイズは、物体の撮像視野内で
の見かけの移動量に基づき決定することができる。
Further, in the object tracking method according to the present invention, the position correcting step extracts an edge component included in the area of the extended partial image, and places an edge component on the x-axis and the y-axis in the y-axis direction and the x-axis direction, respectively. The component amount is cumulatively displayed, and the x-axis and y
The maximum edge density range is detected from the cumulative edge component amount on the axis. Still further, in the object tracking method of the present invention, the size of the template image can be determined based on the apparent movement amount of the object within the field of view of the image.

【0022】本発明の物体追跡方法はまた、入力画像か
ら差分法によって物体を検出し、検出した物体の少なく
とも一部を含む入力画像の所定サイズの部分画像をテン
プレート画像として登録する初期テンプレート登録ステ
ップを備え、記差分法によって検出した物体を追跡対象
物体として、追跡を行なう。更にまた、別の方法とし
て、位置補正ステップにおいて、取得した最大一致度が
所定の値未満であれば、差分法によって、現時刻の入力
画像から物体を検出し、検出した物体を追跡対象物体と
して追跡する。
The object tracking method according to the present invention also includes an initial template registration step of detecting an object from the input image by a difference method and registering a partial image of a predetermined size of the input image including at least a part of the detected object as a template image. And performs tracking with an object detected by the difference method as a tracking target object. Furthermore, as another method, in the position correction step, if the acquired maximum matching degree is less than a predetermined value, an object is detected from the input image at the current time by a difference method, and the detected object is set as a tracking target object. Chase.

【0023】また更に、本発明の物体追跡方法において
は、位置補正ステップによって検出された位置に基づい
て、撮像装置の視野方向を変えるための制御信号を発生
するカメラ雲台制御ステップを有し、その制御信号によ
って撮像装置の視野方向を、出された位置に常に向け、
検出した物体を追跡するものである。
Still further, the object tracking method of the present invention has a camera pan head control step of generating a control signal for changing a visual field direction of the imaging device based on the position detected in the position correction step, The direction of the field of view of the imaging device is always directed to the output position by the control signal,
This is for tracking the detected object.

【0024】本発明の物体追跡装置は、監視対象範囲を
逐次撮像する撮像装置と、撮像装置が取得した映像信号
を逐次画像信号に変換する画像入力インターフェース
と、画像入力インターフェースによって変換された画像
信号を処理する画像処理手段と、登録されたテンプレー
ト画像を格納する記憶装置とを備え、記画像処理手段
は、撮像装置から現時刻に入力した画像信号を記憶装置
にあらかじめ登録されたテンプレート画像によってテン
プレートマッチングを行ない、現時刻に入力した画像信
号の中から、テンプレート画像と最大の一致度を持つ部
分画像の位置を検出し、検出した位置の部分画像を包含
する、現時刻に入力した画像信号内の部分画像より所定
サイズ大きい拡張部分画像の領域について、エッジの密
度が最大となる部分画像の位置を検出し、エッジの密度
が最大となる部分画像の位置を、物体の現時刻における
検出位置とし、現時刻の検出位置の部分画像をを新たな
テンプレートマッチング位置と更新することによって撮
像装置の撮像視野内に侵入した物体を追跡するものであ
る。
An object tracking apparatus according to the present invention includes an imaging device for sequentially capturing an image of a monitored area, an image input interface for sequentially converting a video signal obtained by the imaging device into an image signal, and an image signal converted by the image input interface. And a storage device for storing the registered template image. The image processing device converts the image signal input from the imaging device at the current time into a template using a template image registered in the storage device in advance. Performs matching, detects the position of the partial image having the highest degree of coincidence with the template image from the image signal input at the current time, and includes the partial image at the detected position in the image signal input at the current time. For the area of the extended partial image that is larger than the partial image by a predetermined size, the partial image with the maximum edge density The position of the partial image having the maximum edge density is determined as the detection position of the object at the current time, and the partial image at the detection position of the current time is updated with a new template matching position. Of an object that has entered the imaging field of view.

【0025】また本発明の物体追跡装置は、撮像装置の
視野方向を変えるための雲台と、画像処理手段によって
撮像装置の視野方向を変えるために雲台を制御するため
の制御信号を供給する雲台制御インターフェースとを更
に備え、画像処理手段が、物体の現時刻における検出位
置に基づいて、物体の方向を検出し、得られた方向から
雲台制御インターフェースを介して、撮像装置の視野方
向を調節し、撮像装置の撮像視野内に侵入した物体を追
跡するものである。
Further, the object tracking device of the present invention supplies a camera platform for changing the visual field direction of the imaging device and a control signal for controlling the camera platform for changing the visual field direction of the imaging device by the image processing means. A camera platform control interface, wherein the image processing means detects the direction of the object based on the detected position of the object at the current time, and from the obtained direction, via the camera platform control interface, the viewing direction of the imaging device. Is adjusted to track an object that has entered the imaging field of view of the imaging device.

【0026】[0026]

【発明の実施の形態】本発明の物体追跡方法では、従来
からの対象物体の模様が見かけ上移動し、それに引張ら
れてテンプレートの位置がずれる問題を解決するため、
対象物体は背景部分に比べてエッジ成分が多いという特
徴を利用して、追跡処理の過程で更新するテンプレート
画像の位置を入力画像のエッジ画像の密度に基いて補正
する。即ち本発明は、差分法によって物体を検出し、検
出物体の画像をテンプレートとして保持し、検出位置の
周辺でエッジ画像の密度が最大となる位置に検出位置を
補正しながら対象物体を追跡することで、特に対象物体
の向きの変化が起こった場合でも安定に追跡を行うこと
ができる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The object tracking method of the present invention solves the problem that a pattern of a conventional target object apparently moves and is pulled by the pattern to shift the position of the template.
Using the feature that the target object has more edge components than the background portion, the position of the template image to be updated in the course of the tracking process is corrected based on the density of the edge image of the input image. That is, the present invention detects an object by the difference method, holds an image of the detected object as a template, and tracks the target object while correcting the detection position to a position where the density of the edge image is the maximum around the detection position. Thus, tracking can be performed stably even when the direction of the target object changes.

【0027】図3に、本発明の各実施例に共通する物体
追跡装置のハードウエア構成の一例を示す。301はTVカ
メラ、303は画像入力I/F、313はデータバス、305は画像
メモリ、306はワークメモリ、307はCPU、308はプログラ
ムメモリ、302はカメラ雲台、304は雲台制御I/F、309は
出力I/F、310は画像出力I/F、311は警告灯、312は監視
モニタである。TVカメラ301は画像入力I/F303に接続さ
れ、カメラ雲台302は雲台制御I/F304に接続され、警告
灯311は出力I/F309に接続され、監視モニタ312は画像出
力I/F310に接続されている。画像入力I/F303、雲台制御
I/F304、画像メモリ305、ワークメモリ306、CPU307、プ
ログラムメモリ308、出力I/F309及び画像出力I/F310
は、データバス313に接続されている。また、TVカメラ3
01はカメラ雲台302に取付けられている。
FIG. 3 shows an example of a hardware configuration of an object tracking device common to the embodiments of the present invention. 301 is a TV camera, 303 is an image input I / F, 313 is a data bus, 305 is an image memory, 306 is a work memory, 307 is a CPU, 308 is a program memory, 302 is a camera platform, and 304 is a platform controller I / F. F and 309 are output I / Fs, 310 is an image output I / F, 311 is a warning light, and 312 is a monitoring monitor. The TV camera 301 is connected to the image input I / F 303, the camera head 302 is connected to the head control I / F 304, the warning light 311 is connected to the output I / F 309, and the monitoring monitor 312 is connected to the image output I / F 310. It is connected. Image input I / F303, pan head control
I / F 304, image memory 305, work memory 306, CPU 307, program memory 308, output I / F 309, and image output I / F 310
Are connected to the data bus 313. Also TV Camera 3
01 is attached to the camera head 302.

【0028】図3において、TVカメラ301は監視対象
(視野範囲)を撮像する。撮像された映像信号は、画像
入力I/F303からデータバス313を介して画像メモリ305に
蓄積される。CPU307はプログラムメモリ308に保存され
ているプログラムに従って、ワークメモリ306内で画像
メモリ305に蓄積された画像の解析を行なう。CPU307
は、処理結果に応じてデータバス313から雲台制御I/F30
4を介してカメラ雲台302を制御してTVカメラ301の撮像
視野を変えたり、出力I/F309を介して警告灯311を点灯
し、画像出力I/F310を介して監視モニタ312に、例えば
侵入物体検出結果画像を表示する。尚、画像メモリ305
は、登録されたテンプレート画像を保存しておくための
テンプレート画像保持装置をも備えている。
In FIG. 3, a TV camera 301 captures an image of a monitoring target (viewing range). The captured video signal is stored in the image memory 305 from the image input I / F 303 via the data bus 313. The CPU 307 analyzes the image stored in the image memory 305 in the work memory 306 according to the program stored in the program memory 308. CPU307
Is a pan head control I / F 30 from the data bus 313 according to the processing result.
The camera head 302 is controlled via 4 to change the imaging field of view of the TV camera 301, the warning light 311 is turned on via the output I / F 309, and the monitoring monitor 312 via the image output I / F 310, for example, An intruding object detection result image is displayed. The image memory 305
Also has a template image holding device for storing the registered template images.

【0029】以降に説明するフローチャートは、すべて
上記図3で説明した物体追跡監視装置のハードウエア構
成を使って説明する。本発明の第1の実施例を図1によ
って説明する。図1は本発明の一実施例の処理プロセス
を説明するフローチャートである。図1は図5で示した
テンプレートマッチング法の処理プロセスにテンプレー
ト位置補正ステップ105を追加したものである。ステッ
プ101、102、401、103、104、106、107、108について
は、図4と図5によって説明したものと同じであるので
説明を省略する。
The flowcharts described below are all described using the hardware configuration of the object tracking / monitoring device described in FIG. A first embodiment of the present invention will be described with reference to FIG. FIG. 1 is a flowchart illustrating a processing process according to an embodiment of the present invention. FIG. 1 is obtained by adding a template position correction step 105 to the processing process of the template matching method shown in FIG. Steps 101, 102, 401, 103, 104, 106, 107, and 108 are the same as those described with reference to FIGS.

【0030】さて、最大一致度判定ステップ104におい
て、最大一致度が所定値以上であった場合、テンプレー
ト位置補正ステップ105へ進む。テンプレート位置補正
ステップ105での処理の内容を、図8において時刻t1+1
に得られた入力画像804と図9を用いて説明する。図9
は侵入物体追跡処理の流れを画像の例を用いて説明する
ために、撮像視野内での曲線を描く車道内を通過する車
輌を侵入物体とした場合の図で、図8の入力画像804に
ついて処理を行った場合の一例ある。901は入力画像で
図8の入力画像804と同じ画像が入力したもの、902は入
力画像901から微分フィルタ(図示しない)を使って抽
出したエッジ画像、903aは探索領域、903bは水平方向
(x軸)への投影像、903cは垂直方向(y軸)への投影
像、903は説明のために領域903aで切出したエッジ画像
に投影像903bと903cとを重ねて表示した図、804aは図8
で既に示したテンプレートマッチングで得られた検出位
置を表す範囲、904はx軸への投影像903bを表すグラフ、
904aはテンプレートマッチングによって得られた検出位
置を表す範囲、904bは累積投影値が最大となる範囲、90
5はy軸への投影像903cを表す図、905aはテンプレートマ
ッチングによって得られた検出位置を表す範囲、905bは
累積投影位置が最大となる範囲である。
If the maximum matching degree is equal to or more than the predetermined value in the maximum matching degree determining step 104, the process proceeds to the template position correcting step 105. The contents of the processing in the template position correction step 105 are shown in FIG.
An explanation will be given using the input image 804 obtained in FIG. FIG.
8 is a diagram showing a case where a vehicle passing through a road that draws a curve in an imaging field of view is set as an intruding object in order to explain the flow of the intruding object tracking process using an example of an image. There is an example of a case where processing is performed. Reference numeral 901 denotes an input image which is the same image as the input image 804 in FIG. 8; 902, an edge image extracted from the input image 901 using a differential filter (not shown); 903a, a search area; 903b, a horizontal direction (x 903c is a projected image in the vertical direction (y-axis), 903 is a diagram in which the projected images 903b and 903c are superimposed on the edge image cut out in the area 903a for explanation, and 804a is a diagram. 8
A range representing the detection position obtained by the template matching already shown in 904, a graph representing a projected image 903b on the x-axis,
904a is a range representing the detection position obtained by template matching, 904b is a range in which the cumulative projection value is maximum, 90
5 is a diagram showing a projection image 903c on the y-axis, 905a is a range showing a detection position obtained by template matching, and 905b is a range where the cumulative projection position is maximum.

【0031】図9において、テンプレート位置補正ステ
ップ105では、入力画像901に対してエッジ抽出処理を施
し、エッジ画像902を得る。このエッジ抽出処理は、例
えば、入力画像901に対してSobel,Roberts等の微分フ
ィルタを掛け、得られた画像を二値化する(エッジ部分
を“255”、それ以外を“0”とする)ことによって行わ
れる。この例については、例えば、1985年に総研出
版より出版された田村秀行氏監修による『コンピュータ
画像処理入門』と題する書籍のP118〜125に解説されて
いる。
In FIG. 9, in a template position correction step 105, an edge extraction process is performed on an input image 901 to obtain an edge image 902. In this edge extraction processing, for example, a differential filter such as Sobel or Roberts is applied to the input image 901 to binarize the obtained image (the edge portion is set to “255”, and the other portions are set to “0”). This is done by: This example is described in, for example, pages 118 to 125 of a book entitled "Introduction to Computer Image Processing" supervised by Mr. Hideyuki Tamura published by Soken Shuppan in 1985.

【0032】次にエッジ画像902をテンプレートマッチ
ングステップ103によって得られた検出位置804aの範囲
(図903の実線枠部分:左上の座標(x0,y0)、大きさ(dx,
dy))から上下左右を所定画素d分(dは対象物体の向き
の変化に伴うマッチング位置のズレの許容値、例えばd=
5 pix)拡げた探索領域903a(図903の点線枠部分:左
上の座標(x0−d,y0−d)、大きさ(dx+2d,dy+2d))で切出
し、x軸方向に対するエッジ画像の投影像903bと、y軸方
向に対するエッジ画像の投影像904cを求める。従って、
探索領域903aは、上記検出位置804aの範囲を包含する拡
張部分画像である。
Next, the range of the detection position 804a obtained by the template matching step 103 (solid line frame portion in FIG. 903: upper left coordinates (x 0 , y 0 ), size (dx,
dy)) from the top, bottom, left and right for a predetermined pixel d (d is the allowable value of the deviation of the matching position due to the change in the direction of the target object, for example, d =
5 pix) expanded search area 903a (dotted frame portion of FIG. 903: upper left coordinates (x 0 -d, y 0 -d ), cut in a size (dx + 2d, dy + 2d )), with respect to the x-axis direction A projection image 903b of the edge image and a projection image 904c of the edge image in the y-axis direction are obtained. Therefore,
The search area 903a is an extended partial image including the range of the detection position 804a.

【0033】グラフ904において、横軸は水平(x軸)方
向、縦軸はx軸方向の各画素(pix)毎のエッジ画像の投
影像903bの値hx(x)であり、グラフ905において、横軸は
垂直(y軸)方向、縦軸はy軸方向の各画素(pix)毎の
エッジ画像の投影像903cの値hy(y)である。x軸方向の
投影像903bのx=x0における投影値x(x0)は、探索領域903
aで切出したエッジ画像に対し、(x,y) を、x=x0におい
て、y0-d<y<y0+dy+d と変化させ、画素値が“255”と
なる画素数を計数して得る。また、y軸方向の投影像903
cのy=y0における投影値y(y0)は、探索領域903aで切出し
たエッジ画像に対し、(x,y)を、y=y0において、x0−d<
x<x0+dx+d と変化させ画素値が“255”となる画素数を
計数して得る。次に、図904はx軸への投影像903bを表す
グラフであり、範囲904aはテンプレートマッチングによ
って得られた検出位置を表す。また、範囲904bはその範
囲の累積投影値が最大となる範囲、すなわちエッジの密
度が最大となる範囲(x1<x<x1+dx)を示しており、こ
の位置は、次の式(2)によって得られる。
In the graph 904, the horizontal axis is the horizontal (x-axis) direction, and the vertical axis is the value hx (x) of the projected image 903b of the edge image for each pixel (pix) in the x-axis direction. The horizontal axis is the vertical (y-axis) direction, and the vertical axis is the value hy (y) of the projected image 903c of the edge image for each pixel (pix) in the y-axis direction. The projection value x (x 0 ) at x = x 0 of the projection image 903b in the x-axis direction is
For the edge image cut out in a, (x, y) is changed to y 0 -d <y <y 0 + dy + d at x = x 0 , and the number of pixels having a pixel value of “255” is calculated. Obtain by counting. Also, the projected image 903 in the y-axis direction
The projection value y (y 0 ) of c at y = y 0 is (x, y) with respect to the edge image cut out in the search area 903a, and x 0 −d <at y = y 0
By changing x <x 0 + dx + d, the number of pixels whose pixel value is “255” is obtained by counting. Next, FIG. 904 is a graph showing a projection image 903b on the x-axis, and a range 904a shows a detection position obtained by template matching. Moreover, the range 904b shows the range, i.e. the range in which the density of the edges is the maximum (x 1 <x <x 1 + dx) the cumulative projection value of the range is the maximum, this position, the following formula ( Obtained by 2).

【0034】[0034]

【数2】 (Equation 2)

【0035】この式(2)は、x1 を x0-d<x1<x0+d と変
化させた場合に、x1<x<x1+dx において hx(x) の累積
値が最も大きくなる x1 を求めることを表している。ま
た同様にy軸に対する投影像に対してもエッジの累積値
が最大となる範囲(y1<y<y1+dy)を得る。従って、テ
ンプレートマッチングステップ103によって検出された
対象物体の位置(左上の座標(x0,y0))は、テンプレー
ト位置補正ステップ105によって補正された位置(左上
の座標(x1,y1))に修正される。
[0035] The equation (2), when the x 1 is varied with x 0 -d <x 1 <x 0 + d, the cumulative value of hx (x) at x 1 <x <x 1 + dx is it represents the determination of the most larger x 1. Similarly, a range (y 1 <y <y 1 + dy) in which the cumulative value of the edge is maximum for the projection image on the y-axis is obtained. Accordingly, the position of the target object (the upper left coordinate (x 0 , y 0 )) detected by the template matching step 103 is the position corrected by the template position correction step 105 (the upper left coordinate (x 1 , y 1 )). Will be modified to

【0036】上記本発明の一実施例の効果について、図
10を用いて説明する。図10は、侵入物体追跡処理の
流れを画像の例を用いて説明するために、撮像視野内で
の曲線を描く車道内を通過する車輌を侵入物体とした場
合の図で、図8と同じ条件設定であり、図8で示したマ
ッチング処理の後に位置ズレ補正処理を追加したもので
ある。1001a,1003a,1005a,1007aはそれぞれ時刻t1-
1,時刻t1,時刻t1+1,時刻t1+2のテンプレート画像、1
001,1003,1005,1007はそれぞれテンプレート画像100
1a,1003a,1005a,1007aの更新時の位置を示す画像、1
002,1004,1006,1008はそれぞれ時刻t1,時刻t1+1,
時刻t1+2,時刻t1+3の入力画像、1002a,1004a,1006
a,1009aは時刻t1,時刻t1+1,時刻t1+2,時刻t1+3にお
いてそれぞれテンプレートマッチング処理によって検出
された物体の位置、1002b,1004b,1006b,1008bはそれ
ぞれ1フレーム前でのテンプレート画像(時刻t1-1,時
刻t1,時刻t1+1,時刻t1+2でのそれぞれのテンプレート
画像)の位置である。
The effect of the embodiment of the present invention will be described with reference to FIG. FIG. 10 is a diagram showing a case where a vehicle passing through a road that draws a curve in an imaging field of view is set as an intruding object in order to explain the flow of the intruding object tracking process using an example of an image. This is a condition setting in which a position shift correction process is added after the matching process shown in FIG. 1001a, 1003a, 1005a, and 1007a are at time t1-
1, time t1, time t1 + 1, time t1 + 2 template image, 1
001, 1003, 1005, and 1007 are each 100 template images
Image showing the updated position of 1a, 1003a, 1005a, 1007a, 1
002, 1004, 1006, and 1008 are time t1, time t1 + 1,
Input image at time t1 + 2, time t1 + 3, 1002a, 1004a, 1006
a and 1009a are the positions of the objects detected by the template matching processing at time t1, time t1 + 1, time t1 + 2, and time t1 + 3, respectively, and 1002b, 1004b, 1006b, and 1008b are the template images one frame before, respectively. (Template images at time t1-1, time t1, time t1 + 1, and time t1 + 2).

【0037】図8で示された方法では、テンプレートマ
ッチングが対象とする入力画像と、テンプレート画像の
中のコントラストが高い画像部分(図8の例では、車両
のフロント部分)の位置のズレを小さくするようにテン
プレートマッチングが行われるため、対象物体の向きの
変化が起る場面では、テンプレート画像中の車両フロン
ト部分の位置は変らないが、追跡処理を繰返す度に対象
物体以外の画像(背景画像)の画素が含まれる割合が大
きくなってしまう。
In the method shown in FIG. 8, the displacement between the input image to be subjected to template matching and the image portion having high contrast (the front portion of the vehicle in the example of FIG. 8) in the template image is reduced. When the orientation of the target object changes, the position of the front part of the vehicle in the template image does not change, but every time the tracking process is repeated, the image other than the target object (background image) ) Increases the proportion of pixels included.

【0038】それに対し、本発明の実施例を適用した図
10の場合には、テンプレートマッチング処理後にテン
プレート画像の位置をエッジが多く含まれる画素部分、
即ち、対象物体の画素部分に逐次位置補正するため、図
8の方法によるテンプレート画像に比べて、対象物体以
外の画素分が含まれる割合を小さくすることができる。
従って、図8と図10の同時刻のテンプレート位置、例
えば、809aと1009aとを比較すると、位置809aの場合に
は、テンプレート画像中に含まれる背景部分の画素の割
合が半分以上となっているが、位置1009aの場合には、
テンプレート画像のほとんどの部分が対象物体の画素と
なっている。
On the other hand, in the case of FIG. 10 to which the embodiment of the present invention is applied, the position of the template image after the template matching processing is changed to a pixel portion containing many edges,
That is, since the position is sequentially corrected for the pixel portion of the target object, the ratio of pixels other than the target object to be included can be reduced as compared with the template image according to the method of FIG.
Therefore, comparing the template positions at the same time in FIGS. 8 and 10, for example, 809a and 1009a, in the case of the position 809a, the ratio of the pixels of the background portion included in the template image is more than half. However, in the case of position 1009a,
Most parts of the template image are pixels of the target object.

【0039】上述のテンプレート位置補正ステップ105
の次に、テンプレート更新ステップ106の処理がなさ
れ、位置補正された対象物体の位置を新しいテンプレー
ト画像として更新する。以降、図5と同様な処理がなさ
れる。
The above-described template position correction step 105
Next, the process of the template update step 106 is performed, and the position of the position-corrected target object is updated as a new template image. Thereafter, the same processing as in FIG. 5 is performed.

【0040】上記のように本発明の実施例によれば、テ
ンプレートマッチングステップ103によって検出された
位置を対象物体に存在するエッジを検出し、そのエッジ
の密度が最大となる位置に検出位置を補正するため、対
象物体が向きを変えたとしてもテンプレートの位置が対
象物体からずれることがなく、正確に対象物体を追跡す
ることができる。
As described above, according to the embodiment of the present invention, the position detected in the template matching step 103 is detected as an edge existing in the target object, and the detected position is corrected to a position where the edge density becomes maximum. Therefore, even if the target object changes direction, the position of the template does not deviate from the target object, and the target object can be accurately tracked.

【0041】本発明の第2の実施例を図2を用いて説明
する。図2は本発明の処理プロセスの一実施例を表すフ
ローチャートである。図2は図1で表される第1の実施
例を表すフローチャートの最大一致度判定ステップ104
の代わりに分岐ステップ201と最大一致度判定ステップ1
04´を置き、テンプレート更新ステップ106の代わりに
複数テンプレート保存ステップ202を置いて構成したも
のである。
A second embodiment of the present invention will be described with reference to FIG. FIG. 2 is a flowchart showing one embodiment of the processing process of the present invention. FIG. 2 is a flowchart showing the maximum coincidence determination step 104 in the flowchart representing the first embodiment shown in FIG.
Instead of branching step 201 and maximum matching score determination step 1
04 ′ and a template update step 106 in place of a multiple template storage step 202.

【0042】図2において処理が開始されると、既に説
明した物体検出処理101から初期テンプレート登録ステ
ップ102によって、時刻t0-1における入力画像から取得
した画像を時刻t0-1のテンプレート画像として登録した
後、画像入力ステップ401に進む。画像入力ステップ401
で、時刻t0における入力画像を取得する。次に、テンプ
レートマッチング処理ステップ103では、保存された時
刻t0-1のテンプレート画像と、時刻t0における入力画像
とテンプレートマッチング処理がなされる。そして、分
岐ステップ201(後述する)を通り、最大一致度判定ス
テップ104´に進む。最大一致度判定ステップ104´で
は、最大一致度が所定値以上であった場合にはテンプレ
ート位置補正ステップ105に進み、最大一致度が所定値
未満であった場合には物体検出処理ステップ101に戻
る。
When the process is started in FIG. 2, the image acquired from the input image at time t0-1 is registered as the template image at time t0-1 by the initial template registration step 102 from the object detection process 101 described above. Thereafter, the process proceeds to the image input step 401. Image input step 401
Then, an input image at time t0 is obtained. Next, in the template matching processing step 103, template matching processing is performed between the stored template image at time t0-1 and the input image at time t0. Then, the processing proceeds to a maximum matching degree determination step 104 'through a branch step 201 (described later). In the maximum matching degree determination step 104 ', the process proceeds to the template position correcting step 105 when the maximum matching degree is equal to or more than the predetermined value, and returns to the object detection processing step 101 when the maximum matching degree is less than the predetermined value. .

【0043】テンプレート位置補正ステップ105では、
最大一致度判定ステップ104´において抽出した位置を
時刻t0での検出位置として補正する。そして、次の複数
テンプレート保存ステップ202では、位置補正した時刻t
0の検出位置をもとに時刻t0のテンプレートが新たに保
存される。この時、既に初期テンプレート登録ステップ
102において登録された時刻t0-1のテンプレ−ト画像は
そのまま保存される。次に、カメラ雲台制御ステップ10
7に進み、カメラの視野(光軸方向)を時刻t0における
検出位置に基づき対象物体の方向に向ける。次に、警報
・モニタ表示ステップ108に処理を移し、例えば警報を
鳴らしたり、例えば監視モニタに対象物体の画像を表示
したりする。警報・モニタ表示ステップ108が終了する
と、画像入力ステップ401に戻り、新しい入力画像を取
得し、再びテンプレートマッチッング処理を行う。
In the template position correction step 105,
The position extracted in the maximum matching degree determination step 104 'is corrected as a detection position at time t0. Then, in the next multiple template saving step 202, the position correction time t
The template at time t0 is newly stored based on the 0 detection position. At this time, the initial template registration step
The template image at time t0-1 registered at 102 is stored as it is. Next, camera head control step 10
Proceeding to 7, the camera's field of view (optical axis direction) is directed toward the target object based on the detection position at time t0. Next, the processing is shifted to the alarm / monitor display step 108, for example, to sound an alarm or to display an image of the target object on, for example, a monitoring monitor. When the alarm / monitor display step 108 ends, the process returns to the image input step 401 to acquire a new input image and perform the template matching process again.

【0044】再びテンプレートマッチッングステップ10
3に戻った時、保存されているテンプレートは時刻t0-2
のテンプレートと時刻t0-1のテンプレートの2つである
(時刻は“1”進んでいるため“-1”が加えられる)。
ここで、テンプレートマッチッングステップ103では時
刻t0の入力画像と、先ず時刻t0-1のテンプレートとのテ
ンプレートマッチング処理がなされ、分岐ステップ201
に進む。分岐ステップ201では、保存されているすべて
のテンプレート画像すべてについてテンプレートマッチ
ング処理がなされているかどうかを調べる。今、時刻t0
-1のテンプレートとのテンプレートマッチング処理がな
されたが、まだ時刻t0-2のテンプレートが残っている。
従って、この時はステップ103に戻り、時刻t0-2のテン
プレートと時刻t0の入力画像とのテンプレートマッチン
グ処理を行う。このようにして、次々と残っているテン
プレートとテンプレートマッチング処理を行い、すべて
のテンプレートについてテンプレートマッチング処理が
終了すれば、分岐ステップ201から処理ステップを最大
一致度判定ステップ104´に進む。
Template matching step 10 again
When returning to 3, the saved template is time t0-2
And the template at time t0-1 ("-1" is added because the time is advanced by "1").
Here, in the template matching step 103, a template matching process is performed between the input image at time t0 and the template at time t0-1.
Proceed to. In a branch step 201, it is checked whether or not template matching processing has been performed for all of the stored template images. Now, time t0
The template matching process with the template at -1 has been performed, but the template at time t0-2 still remains.
Therefore, at this time, the process returns to step 103 to perform the template matching process between the template at time t0-2 and the input image at time t0. In this way, the template matching process is performed on the remaining templates one after another, and when the template matching process is completed for all templates, the process proceeds from the branching step 201 to the maximum matching degree determination step 104 ′.

【0045】最大一致度判定ステップ104´では、テン
プレートマッチング処理によって、複数のテンプレート
画像それぞれについてに得られた最大一致度の中から一
番大きな値を選ぶ。そして、その一番大きな値の最大一
致度が所定値(例えば、0.5)以上であった場合にはテ
ンプレート位置補正ステップ105に進み、その一番大き
な値の最大一致度が所定値未満であった場合には、入力
画像中に対象物体が存在しなくなったものとして、物体
検出処理ステップ101に戻る。
In the maximum matching degree determination step 104 ', the largest value is selected from the maximum matching degrees obtained for each of the plurality of template images by the template matching process. When the maximum matching degree of the largest value is equal to or more than a predetermined value (for example, 0.5), the process proceeds to the template position correction step 105, and the maximum matching degree of the largest value is less than the predetermined value. In this case, it is determined that the target object no longer exists in the input image, and the process returns to the object detection processing step 101.

【0046】テンプレート位置補正ステップ105では、
最大一致度判定ステップ104´において一番値の大きい
最大一値度を得たテンプレート画像について入力画像の
エッジ処理を行い、得られたエッジ画像から対象物体の
位置を補正する。そして、次の複数テンプレート保存ス
テップ202では、位置補正した時刻t0の検出位置をもと
に時刻t0のテンプレートが新たに保存される。この時、
既に初期テンプレート登録ステップ102において登録さ
れた時刻t0-1のテンプレ−ト画像はそのまま保存され
る。この複数テンプレート保存ステップ202で保存する
テンプレート画像の数は、あらかじめ所定数(例えば、
“3”)を定めておき、所定数を超える時は、一番古い
時刻に取得したテンプレートを削除する。次にカメラ雲
台制御ステップ107に進み、カメラの視野方向(光軸方
向)を制御する。そして次に、警報・モニタ表示ステッ
プ108に進み、例えば警報を鳴らしたり、例えば監視モ
ニタに対象物体の画像を表示したりする。警報・モニタ
表示ステップ108が終わると、画像入力ステップ401に戻
り、新しい入力画像を得、再びテンプレートマッチッン
グ処理を続ける。上述の場合には、一番古い時刻に取得
したテンプレートを削除したが、テンプレートマッチン
グステップ103において算出した中で、最小の一致度が
得られたテンプレートを削除することでもよい。
In the template position correction step 105,
The edge processing of the input image is performed on the template image that has obtained the largest maximum single degree in the maximum matching degree determination step 104 ′, and the position of the target object is corrected from the obtained edge image. Then, in the next multiple template storage step 202, a template at time t0 is newly stored based on the position-corrected detection position at time t0. At this time,
The template image at time t0-1 already registered in the initial template registration step 102 is stored as it is. The number of template images to be saved in the multiple template saving step 202 is a predetermined number (for example,
“3”) is defined, and when the number exceeds a predetermined number, the template acquired at the oldest time is deleted. Next, the process proceeds to a camera platform control step 107, in which the visual field direction (optical axis direction) of the camera is controlled. Then, the process proceeds to an alarm / monitor display step 108, for example, to sound an alarm or to display an image of the target object on a monitor, for example. When the alarm / monitor display step 108 is completed, the process returns to the image input step 401, a new input image is obtained, and the template matching processing is continued again. In the above-described case, the template acquired at the oldest time is deleted. However, the template obtained at the template matching step 103 and having the minimum matching degree may be deleted.

【0047】この第2の実施例によれば、テンプレート
マッチングステップ103によって検出された位置をもと
に、対象物体に存在するエッジを検出し、そのエッジの
密度が最大となる位置に検出位置を補正し、異なる時刻
に得られた所定フレーム数分のテンプレート画像を独立
にマッチングさせるため、対象物体が向きを変えたり、
対象物体の前を別の物体が横切ったとしても、過去の複
数のテンプレート画像を対象として、最大の一致度を持
つ領域をテンプレートマッチング位置として補正するた
め、テンプレートの位置が対象物体からずれることがな
く、また別の物体を追跡することなく、対象物体を正確
に追跡することができる。
According to the second embodiment, an edge existing in the target object is detected based on the position detected in the template matching step 103, and the detected position is set to a position where the density of the edge becomes maximum. To correct and independently match the predetermined number of template images obtained at different times, the target object changes direction,
Even if another object crosses in front of the target object, the position of the template may deviate from the target object because the region with the highest degree of matching is corrected as the template matching position for multiple past template images. The target object can be accurately tracked without tracking another object.

【0048】[0048]

【発明の効果】以上のように本発明によれば、対象物体
の向きが変化する物体を追跡安定に物体を追跡すること
ができ、撮像装置を用いた監視装置の適用範囲を大きく
広げることができる。
As described above, according to the present invention, an object in which the direction of a target object changes can be tracked stably, and the applicable range of a monitoring device using an imaging device can be greatly expanded. it can.

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

【図1】 本発明の一実施例の処理動作を説明するため
のフローチャート。
FIG. 1 is a flowchart illustrating a processing operation according to an embodiment of the present invention.

【図2】 本発明の一実施例の処理動作を説明するため
のフローチャート。
FIG. 2 is a flowchart illustrating a processing operation according to an embodiment of the present invention.

【図3】 本発明が適用された監視装置の一実施例を示
すブロック構成図。
FIG. 3 is a block diagram showing an embodiment of a monitoring device to which the present invention is applied.

【図4】 従来の差分法による物体検出処理の一例を示
すフローチャート。
FIG. 4 is a flowchart illustrating an example of an object detection process according to a conventional difference method.

【図5】 従来のテンプレートマッチング法による物体
追跡処理の一例を示すフローチャート。
FIG. 5 is a flowchart showing an example of an object tracking process according to a conventional template matching method.

【図6】 従来の差分法による物体検出処理の動作を説
明する図。
FIG. 6 is a view for explaining the operation of an object detection process using a conventional difference method.

【図7】 従来のテンプレートマッチング法による物体
追跡処理の動作を説明する図。
FIG. 7 is a view for explaining the operation of an object tracking process using a conventional template matching method.

【図8】 従来のテンプレートマッチング法による物体
追跡処理の問題点を説明する図。
FIG. 8 is a view for explaining a problem of the object tracking processing by the conventional template matching method.

【図9】 本発明の物体追跡方法の一実施例を説明する
図。
FIG. 9 is a view for explaining an embodiment of the object tracking method of the present invention.

【図10】 本発明の物体追跡方法の一実施例を説明す
る図。
FIG. 10 is a view for explaining an embodiment of the object tracking method of the present invention.

【図11】 画像とテンプレートマッチングで検出され
た対象物体の位置との関係を説明するための図。
FIG. 11 is a diagram for explaining a relationship between an image and a position of a target object detected by template matching.

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

301:TVカメラ、 302:カメラ雲台、 303:画像入力I
/F、 304:雲台制御I/F、 305:画像メモリ、 306:
ワークメモリ、 307:CPU、 308:プログラムメモ
リ、 309は出力I/F、 310:画像出力I/F、 311:警
告灯、 312:監視モニタ、 313はデータバス、 60
1:入力画像、 602:基準背景画像、 603:差分処理
された後の差分画像、 604:二値化画像、 605:画
像、 606:差分処理部、 607:二値化処理部、 60
8:画像抽出部、 609:人型の物体、 610:人型の差
分画像、 611:人型の二値化画像、 612:外接矩形、
613:初期テンプレート画像、 701,703,705,70
7:画像、 701a,703a,705a,707a:テンプレート画
像、 702,704,706,708:入力画像、 702a,704a,
706a,708a:テンプレートマッチング処理によって検出
された物体の位置、 702b,704b,706b,708b:1フレ
ーム前でのテンプレート画像の位置、 702c,704c,70
6c,708c:探索範囲、 702d,704d,706d,708d:移動
矢印、 702e:二値化画像、 801,803,805,807:画
像、 801a,803a,805a,807a:テンプレート画像、
802,804,806,808:入力画像、 802a,804a,806a,
809a:テンプレートマッチング処理によって検出された
物体の位置、 802b,804b,806b,808b:1フレーム前
でのテンプレート画像の位置、 901:入力画像、 90
2:エッジ画像、 903a:領域、 903b,903c:投影
像、 903:説明のために領域903aで切出したエッジ画
像に投影像903bと903cとを重ねて表示した図、 904:x
軸への投影像903bを表す図、 904a:テンプレートマッ
チングによって得られた検出位置を表す範囲、 904b:
累積投影位置が最大となる範囲、 905:y軸への投影像
903cを表す図、 905a:テンプレートマッチングによっ
て得られた検出位置を表す範囲、 905b:累積投影位置
が最大となる範囲、 1001,1003,1005,1007:画像、
1001a,1003a,1005a,1007a:テンプレート画像、
1002,1004,1006,1008:入力画像、 1002a,1004a,
1006a,1009a:テンプレートマッチング処理によって検
出された物体の位置、 1002b,1004b,1006b,1008b:
1フレーム前でのテンプレート画像の位置。
301: TV camera, 302: Camera head, 303: Image input I
/ F, 304: Pan head control I / F, 305: Image memory, 306:
Work memory, 307: CPU, 308: Program memory, 309: Output I / F, 310: Image output I / F, 311: Warning light, 312: Monitor, 313: Data bus, 60
1: Input image, 602: Reference background image, 603: Difference image after differential processing, 604: Binary image, 605: Image, 606: Difference processing unit, 607: Binary processing unit, 60
8: Image extraction unit, 609: Humanoid object, 610: Humanoid difference image, 611: Humanoid binary image, 612: Bounding rectangle,
613: Initial template image, 701, 703, 705, 70
7: image, 701a, 703a, 705a, 707a: template image, 702, 704, 706, 708: input image, 702a, 704a,
706a, 708a: the position of the object detected by the template matching process, 702b, 704b, 706b, 708b: the position of the template image one frame before, 702c, 704c, 70
6c, 708c: search range, 702d, 704d, 706d, 708d: moving arrow, 702e: binarized image, 801, 803, 805, 807: image, 801a, 803a, 805a, 807a: template image,
802, 804, 806, 808: input image, 802a, 804a, 806a,
809a: the position of the object detected by the template matching process, 802b, 804b, 806b, 808b: the position of the template image one frame before, 901: the input image, 90
2: Edge image, 903a: Area, 903b, 903c: Projected image, 903: Diagram showing projected image 903b and 903c superimposed on edge image cut out in area 903a for explanation, 904: x
FIG. 904b: A diagram showing a projected image 903b on an axis, 904a: a range showing a detection position obtained by template matching, 904b:
Range where the cumulative projection position is maximum, 905: Projected image on y-axis
FIG. 903c, 905a: Range indicating the detected position obtained by template matching, 905b: Range where the cumulative projection position is maximum, 1001, 1003, 1005, 1007: Image,
1001a, 1003a, 1005a, 1007a: template image,
1002, 1004, 1006, 1008: Input image, 1002a, 1004a,
1006a, 1009a: Position of object detected by template matching processing, 1002b, 1004b, 1006b, 1008b:
The position of the template image one frame before.

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 撮像装置によって逐次取得する入力画像
から撮像視野内の物体を検出し、該検出した物体を追跡
する物体追跡方法において、 現時刻に取得した前記入力画像と、テンプレート画像と
のテンプレートマッチングを行い、前記現時刻に取得し
た入力画像の中から前記テンプレート画像と一致度が最
大となる部分画像の位置を検出するマッチングステップ
と、 前記マッチングステップによって検出した位置の部分画
像を包含し、かつ前記検出した位置の部分画像より所定
サイズ大きい拡張部分画像の領域についてエッジ検出を
行い、該エッジ検出によって検出した部分画像の位置を
物体の現時刻の検出位置に補正するマッチング位置補正
ステップと、 該マッチング位置補正ステップによって補正された位置
の部分画像を新たなテンプレートとして更新するテンプ
レート更新ステップとを設け、 前記撮像視野内の物体を追跡することを特徴とする物体
追跡方法。
1. An object tracking method for detecting an object in an imaging field of view from an input image sequentially acquired by an imaging device and tracking the detected object, comprising: a template of the input image acquired at a current time and a template image Performing matching, a matching step of detecting the position of the partial image having the highest degree of coincidence with the template image from the input image obtained at the current time, including a partial image of the position detected by the matching step, And a matching position correction step of performing edge detection on an area of the extended partial image that is larger than the partial image at the detected position by a predetermined size, and correcting the position of the partial image detected by the edge detection to a detection position of the current time of the object; The partial image at the position corrected by the matching position correction step is used as a new template. A template updating step of updating the rate as a rate, and tracking an object in the imaging field of view.
【請求項2】 請求項1記載の物体追跡方法において、
前記位置補正ステップは、前記現時刻の入力画像の前記
拡張部分画像の領域内で、エッジの密度が最大になる部
分画像の位置を検出することを特徴とする物体追跡方
法。
2. The object tracking method according to claim 1, wherein
The object tracking method, wherein the position correcting step detects a position of a partial image having a maximum edge density in an area of the extended partial image of the input image at the current time.
【請求項3】 請求項2記載の物体追跡方法において、
前記位置補正ステップは、前記拡張部分画像の領域内に
含まれるエッジ成分を抽出し、x軸及びy軸上にそれぞ
れ、y軸方向及びx軸方向のエッジ成分量を累積表示
し、該x軸及びy軸上の累積エッジ成分量から前記最大
エッジ密度範囲を検出することを特徴とする物体追跡方
法。
3. The object tracking method according to claim 2, wherein
The position correcting step extracts edge components included in the area of the extended partial image, accumulates and displays edge component amounts in the y-axis direction and the x-axis direction on the x-axis and the y-axis, respectively. And detecting the maximum edge density range from the accumulated edge component amount on the y-axis.
【請求項4】 請求項1乃至請求項3記載のいずれかの
物体追跡方法において、前記所定サイズは前記物体の前
記撮像視野内での見かけの移動量に基づき決定すること
を特徴とする物体追跡方法。
4. The object tracking method according to claim 1, wherein the predetermined size is determined based on an apparent movement amount of the object within the imaging field of view. Method.
【請求項5】 請求項1乃至請求項4のいずれかに記載
の物体追跡方法において、 前記入力画像から差分法によって物体を検出し、該検出
した物体の少なくとも一部を含む前記入力画像の所定サ
イズの部分画像を前記テンプレート画像として登録する
初期テンプレート登録ステップを備え、 前記差分法によって検出した物体を追跡対象物体とし
て、追跡を行なうことを特徴とする物体追跡方法。
5. The object tracking method according to claim 1, wherein an object is detected from said input image by a difference method, and said input image including at least a part of said detected object is determined. An object tracking method, comprising an initial template registration step of registering a partial image of a size as the template image, and performing tracking with an object detected by the difference method as a tracking target object.
【請求項6】 請求項5記載の物体追跡方法において、 前記位置補正ステップにおいて、取得した最大一致度が
所定の値未満であれば、前記差分法によって、現時刻の
入力画像から物体を検出し、該検出した物体を追跡対象
物体として追跡することを特徴とする物体追跡方法。
6. The object tracking method according to claim 5, wherein in the position correcting step, if the acquired maximum matching degree is less than a predetermined value, the object is detected from the input image at the current time by the difference method. And tracking the detected object as a tracking target object.
【請求項7】 請求項1乃至請求項6のいずれかに記載
の物体追跡方法において、 前記位置補正ステップによって検出された位置に基づい
て、前記撮像装置の視野方向を変えるための制御信号を
発生するカメラ雲台制御ステップを有し、 該制御信号によって前記撮像装置の視野方向を前記検出
された位置に常に向けて、前記検出した物体を追跡する
ことを特徴とする物体追跡方法。
7. The object tracking method according to claim 1, wherein a control signal for changing a view direction of the imaging device is generated based on the position detected in the position correction step. An object tracking method, comprising: a camera head control step of: performing a control so that a direction of a field of view of the imaging device is always directed to the detected position by the control signal to track the detected object.
【請求項8】 撮像視野内の物体を検出し、該検出した
物体を追跡する物体追跡方法において、 監視対象範囲を逐次撮像する撮像装置と、 該撮像装置が取得した映像信号を逐次画像信号に変換す
る画像入力インターフェースと、 該画像入力インターフェースによって変換された前記画
像信号を処理する画像処理手段と、 テンプレート画像として登録された画像を格納する記憶
装置とを備え、 前記画像処理手段は、前記撮像装置から現時刻に入力し
た画像信号を前記記憶装置にあらかじめ登録されたテン
プレート画像によってテンプレートマッチングを行な
い、 前記現時刻に入力した画像信号の中から、前記テンプレ
ート画像と最大の一致度を持つ部分画像の位置を検出
し、 前記検出した位置の前記部分画像を包含する、前記現時
刻に入力した画像信号内の前記部分画像より所定サイズ
大きい拡張部分画像の領域について、エッジの密度が最
大となる部分画像の位置を検出し、 該エッジの密度が最大となる部分画像の位置を、物体の
現時刻における検出位置とし、 該現時刻の検出位置の部分画像をを新たなテンプレート
マッチング位置と更新することによって前記撮像装置の
撮像視野内に侵入した物体を追跡することを特徴とする
物体追跡装置。
8. An object tracking method for detecting an object in an imaging field of view and tracking the detected object, comprising: an imaging device for sequentially imaging a monitoring target range; and a video signal acquired by the imaging device being sequentially converted to an image signal. An image input interface for converting, an image processing means for processing the image signal converted by the image input interface, and a storage device for storing an image registered as a template image, wherein the image processing means The image signal input at the current time from the device is subjected to template matching using a template image registered in advance in the storage device, and among the image signals input at the current time, a partial image having the highest degree of coincidence with the template image Input at the current time, including the partial image at the detected position. In the region of the extended partial image larger than the partial image by a predetermined size in the image signal, the position of the partial image having the maximum edge density is detected, and the position of the partial image having the maximum edge density is determined as the position of the object. An object tracking device for tracking an object that has entered the imaging field of view of the imaging device by updating a partial image of the detection position at the current time with a new template matching position as a detection position at the current time. .
【請求項9】 請求項8の物体追跡装置において、 前記撮像装置の視野方向を変えるための雲台と、 前記画像処理手段によって前記撮像装置の視野方向を変
えるために前記雲台を制御するための制御信号を供給す
る雲台制御インターフェースとを更に備え、 前記画像処理手段が、前記物体の現時刻における検出位
置に基づいて、前記物体の方向を検出し、得られた方向
から前記雲台制御インターフェースを介して、前記撮像
装置の視野方向を調節し、前記撮像装置の撮像視野内に
侵入した物体を追跡することを特徴とする物体追跡装
置。
9. The object tracking apparatus according to claim 8, further comprising: a camera platform for changing a viewing direction of the imaging device; and controlling the camera platform to change a viewing direction of the imaging device by the image processing means. And a head control interface for supplying a control signal of the head. The image processing means detects a direction of the object based on a detection position of the object at a current time, and controls the head based on the obtained direction. An object tracking device, comprising: adjusting an angle of view of the imaging device via an interface to track an object that has entered the imaging field of view of the imaging device.
JP2000180186A 1999-06-15 2000-06-15 Object tracking method and object tracking device Expired - Fee Related JP3560326B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000180186A JP3560326B2 (en) 1999-06-15 2000-06-15 Object tracking method and object tracking device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP16774699 1999-06-15
JP11-167746 1999-06-15
JP2000180186A JP3560326B2 (en) 1999-06-15 2000-06-15 Object tracking method and object tracking device

Publications (2)

Publication Number Publication Date
JP2001060263A true JP2001060263A (en) 2001-03-06
JP3560326B2 JP3560326B2 (en) 2004-09-02

Family

ID=26491685

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000180186A Expired - Fee Related JP3560326B2 (en) 1999-06-15 2000-06-15 Object tracking method and object tracking device

Country Status (1)

Country Link
JP (1) JP3560326B2 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006258943A (en) * 2005-03-15 2006-09-28 Fujinon Corp Autofocus system
JP2006267220A (en) * 2005-03-22 2006-10-05 Fujinon Corp Auto focus system
JP2006267221A (en) * 2005-03-22 2006-10-05 Fujinon Corp Auto focus system
JP2010157924A (en) * 2008-12-26 2010-07-15 Canon Inc Subject tracking apparatus, method for controlling the same, imaging apparatus, display apparatus and program
JP2010271817A (en) * 2009-05-20 2010-12-02 Hitachi Kokusai Electric Inc Image processing method
WO2012063468A1 (en) * 2010-11-11 2012-05-18 パナソニック株式会社 Image processing device, image processing method and program
JP2012208887A (en) * 2011-03-30 2012-10-25 Denso Corp Object tracing device and object tracing system
JP2012221043A (en) * 2011-04-05 2012-11-12 Hitachi Kokusai Electric Inc Image processing method and monitoring device
CN103473542A (en) * 2013-09-16 2013-12-25 清华大学 Multi-clue fused target tracking method
WO2018020722A1 (en) * 2016-07-29 2018-02-01 オムロン株式会社 Image processing apparatus and image processing method
JP2019105925A (en) * 2017-12-11 2019-06-27 株式会社デンソー Image processing apparatus, control system, and image processing method
WO2019230965A1 (en) * 2018-06-01 2019-12-05 日本電信電話株式会社 Object likelihood estimation device, method, and program
WO2020079807A1 (en) * 2018-10-18 2020-04-23 日本電気株式会社 Object tracking device, object tracking method, and program
CN112070084A (en) * 2020-09-04 2020-12-11 北京百度网讯科技有限公司 Method and device for determining position of repeated image unit

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006258943A (en) * 2005-03-15 2006-09-28 Fujinon Corp Autofocus system
JP2006267220A (en) * 2005-03-22 2006-10-05 Fujinon Corp Auto focus system
JP2006267221A (en) * 2005-03-22 2006-10-05 Fujinon Corp Auto focus system
JP2010157924A (en) * 2008-12-26 2010-07-15 Canon Inc Subject tracking apparatus, method for controlling the same, imaging apparatus, display apparatus and program
JP2010271817A (en) * 2009-05-20 2010-12-02 Hitachi Kokusai Electric Inc Image processing method
US8798387B2 (en) 2010-11-11 2014-08-05 Panasonic Intellectual Property Corporation Of America Image processing device, image processing method, and program for image processing
CN102714695A (en) * 2010-11-11 2012-10-03 松下电器产业株式会社 Image processing device, image processing method and program
WO2012063468A1 (en) * 2010-11-11 2012-05-18 パナソニック株式会社 Image processing device, image processing method and program
JP5859958B2 (en) * 2010-11-11 2016-02-16 パナソニック インテレクチュアル プロパティ コーポレーション オブアメリカPanasonic Intellectual Property Corporation of America Image processing apparatus, image processing method, and program
JP2012208887A (en) * 2011-03-30 2012-10-25 Denso Corp Object tracing device and object tracing system
JP2012221043A (en) * 2011-04-05 2012-11-12 Hitachi Kokusai Electric Inc Image processing method and monitoring device
CN103473542A (en) * 2013-09-16 2013-12-25 清华大学 Multi-clue fused target tracking method
CN103473542B (en) * 2013-09-16 2017-01-11 清华大学 Multi-clue fused target tracking method
JP2018018393A (en) * 2016-07-29 2018-02-01 オムロン株式会社 Image processing device and image processing method
WO2018020722A1 (en) * 2016-07-29 2018-02-01 オムロン株式会社 Image processing apparatus and image processing method
US10521917B2 (en) 2016-07-29 2019-12-31 Omron Corporation Image processing apparatus and image processing method for object tracking
JP2019105925A (en) * 2017-12-11 2019-06-27 株式会社デンソー Image processing apparatus, control system, and image processing method
JP7047362B2 (en) 2017-12-11 2022-04-05 株式会社デンソー Image processing equipment, control system, and image processing method
WO2019230965A1 (en) * 2018-06-01 2019-12-05 日本電信電話株式会社 Object likelihood estimation device, method, and program
JP2019211914A (en) * 2018-06-01 2019-12-12 日本電信電話株式会社 Object identity estimation device, method and program
WO2020079807A1 (en) * 2018-10-18 2020-04-23 日本電気株式会社 Object tracking device, object tracking method, and program
CN112070084A (en) * 2020-09-04 2020-12-11 北京百度网讯科技有限公司 Method and device for determining position of repeated image unit
CN112070084B (en) * 2020-09-04 2024-01-12 北京百度网讯科技有限公司 Method and device for determining position of repeated image unit

Also Published As

Publication number Publication date
JP3560326B2 (en) 2004-09-02

Similar Documents

Publication Publication Date Title
JP3768073B2 (en) Object tracking method and object tracking apparatus
US6687386B1 (en) Object tracking method and object tracking apparatus
JP3279479B2 (en) Video monitoring method and device
US7113616B2 (en) Object tracking method and apparatus using template matching
JP3560326B2 (en) Object tracking method and object tracking device
KR101449295B1 (en) Apparatus and method for tracking parking-lot
US8184859B2 (en) Road marking recognition apparatus and method
KR100676232B1 (en) Object tracking method, object tracking apparatus and computer-readable record medium with recorded object tracking program
US20060140447A1 (en) Vehicle-monitoring device and method using optical flow
US20060133785A1 (en) Apparatus and method for distinguishing between camera movement and object movement and extracting object in a video surveillance system
JP2002197444A (en) Run lane recognition device for vehicle
US20090052742A1 (en) Image processing apparatus and method thereof
JP2001216520A (en) Surroundings monitor device for vehicle
JPH0792423B2 (en) Headlight optical axis adjustment method
JP5539250B2 (en) Approaching object detection device and approaching object detection method
JP3823782B2 (en) Leading vehicle recognition device
JP4578864B2 (en) Automatic tracking device and automatic tracking method
JPH1023322A (en) Camera shake correcting method and picture monitoring system
JP3857558B2 (en) Object tracking method and apparatus
JP2002342762A (en) Object tracing method
JPH1144533A (en) Preceding vehicle detector
JP2002104113A (en) Rear monitoring device
JPH11345392A (en) Device and method for detecting obstacle
JP2004213648A (en) Method and device for tracking object
JP3605955B2 (en) Vehicle identification device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040105

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040305

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040524

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040524

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3560326

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080604

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090604

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100604

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110604

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120604

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130604

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140604

Year of fee payment: 10

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees