JPH08123964A - Method and device for registering model pattern - Google Patents

Method and device for registering model pattern

Info

Publication number
JPH08123964A
JPH08123964A JP6282451A JP28245194A JPH08123964A JP H08123964 A JPH08123964 A JP H08123964A JP 6282451 A JP6282451 A JP 6282451A JP 28245194 A JP28245194 A JP 28245194A JP H08123964 A JPH08123964 A JP H08123964A
Authority
JP
Japan
Prior art keywords
frame
image
model pattern
predetermined
coordinates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP6282451A
Other languages
Japanese (ja)
Inventor
Toshiharu Kato
敏春 加藤
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP6282451A priority Critical patent/JPH08123964A/en
Publication of JPH08123964A publication Critical patent/JPH08123964A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

PURPOSE: To provide the model pattern registration device which can register a model pattern based upon an image in a frame by securely setting a specific area in an image displayed on a display device as the frame for registration through simple processing. CONSTITUTION: An image of a field at a monitor destination which is picked up by a video camera 10 is displayed on a monitor TV 44 through a video image input part 20 and an image processing part 30. A touch panel 41a is mounted on the monitor TV and an operator touches the center of an object to be registered (e.g. trespasser) on the screen. The coordinates (reference coordinate) of the contact point is detected by the touch panel and transferred to a CPU 32. The CPU 32 extracts the edge of the object to be registered, makes a search from the reference point in an X and a Y direction and detects the edge part, and decided with the detected lines as frame sides, thereby automatically setting the frame; and then the model pattern is generated on the basis of the image data in the frame through normal processing and registered.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、モデルパターン登録方
法及び装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a model pattern registration method and device.

【0002】[0002]

【従来の技術】一般に、パターンマッチングにより検査
(監視)領域中に存在する所定の物体や人などを検知す
る場合には、予め比較基準となるモデルパターンを登録
しておき、そのモデルパターンと判定対象画像との類似
度・適合度などを求め、対象物か否かを判断する。
2. Description of the Related Art Generally, when a predetermined object or person existing in an inspection (monitoring) area is detected by pattern matching, a model pattern serving as a comparison reference is registered in advance, and the model pattern is determined. The degree of similarity and the degree of conformity with the target image is obtained, and it is determined whether the target object.

【0003】そして、係るモデルパターンを登録するに
は、撮像した画像データをモニタに表示し、その状態で
その画像データの所定部分を囲む枠を設定する。この枠
は、通常矩形状となるため、表示画面中の始点と終点
(対角線上の一組の頂点)を指定することにより行な
う。
In order to register such a model pattern, the picked-up image data is displayed on the monitor, and in that state, a frame surrounding a predetermined portion of the image data is set. Since this frame normally has a rectangular shape, it is performed by designating a start point and an end point (a pair of vertices on a diagonal line) on the display screen.

【0004】[0004]

【発明が解決しようとする課題】しかしながら従来の枠
の設定方法では、マウス等を用いてポインタ(カーソ
ル)を移動させ、所定距離だけ離れた2点の座標を指定
していたため、当然のことながら少なくとも2回の指示
と両点間の移動処理の3つの工程を必要とし、瞬時に枠
を設定できず、その結果、モデル画像の登録にも時間を
要してしまう。
However, in the conventional frame setting method, the pointer (cursor) is moved using a mouse or the like to specify the coordinates of two points separated by a predetermined distance. It requires three steps of instruction at least twice and movement processing between the two points, the frame cannot be set instantaneously, and as a result, it takes time to register the model image.

【0005】例えばビデオカメラで撮像しオンラインで
伝送され、モニタに表示されている画像中の所定部分を
モデルパターンとして登録しようとした場合には、その
処理対象物が移動していると、枠の設定中の対象物が移
動してしまい、正しく枠を設定することができず、その
結果、オンラインでのモデルパターンの登録は困難であ
った。
For example, when a predetermined portion of an image displayed on a monitor which is picked up by a video camera and transmitted online and registered as a model pattern, the object to be processed is moving, a frame Since the object being set moved, the frame could not be set correctly, and as a result, it was difficult to register the model pattern online.

【0006】また、余裕をもって大きな枠を設定する
と、無用な背景部分が入り込み、モデルパターンとして
登録するためのメモリ容量が大きくなり、またその後の
マッチング処理も時間を要し、精度が悪くなる。
Further, if a large frame is set with a margin, useless background parts are introduced, the memory capacity for registering as a model pattern becomes large, and the subsequent matching process also takes time, resulting in poor accuracy.

【0007】さらに、予め登録する枠の大きさを固定値
として設定しておくと、実際に撮像され表示されている
対象物の大きさが変動するような場合には、正しく対応
できない(適したモデルパターンが生成できない)。
Further, if the size of the frame to be registered is set as a fixed value in advance, it is not possible to correctly cope with the case where the size of the object actually imaged and displayed changes. Model pattern cannot be generated).

【0008】さらに、設定する枠は対象物に外接するよ
うになっている方がよいが、対角線の頂点は、対象物の
エッジから離れているため、正確に接するような枠を設
定しにくい。
Further, it is better that the frame to be set is circumscribing the object, but since the vertex of the diagonal line is apart from the edge of the object, it is difficult to set the frame so as to make accurate contact.

【0009】本発明は、上記した背景に鑑みてなされた
もので、その目的とするところは、上記した問題を解決
し、表示装置上に表示された画像中の所定領域に対して
モデルパターンの登録を行うに際し、簡単な処理でもっ
て登録する枠の設定を短時間で設定でき、たとえ対象物
が移動しているような場合であっても確実に枠の切り出
し及びその後の枠内の画像に基づくモデルパターンの登
録を行うことのできるモデルパターン登録方法及び装置
を提供することにある。
The present invention has been made in view of the above background. An object of the present invention is to solve the above problems and to create a model pattern for a predetermined region in an image displayed on a display device. When registering, you can set the frame to be registered with a simple process in a short time, and even if the object is moving, you can reliably cut out the frame and display the image in the frame after that. It is an object of the present invention to provide a model pattern registration method and device capable of registering a model pattern based on the model pattern registration method.

【0010】[0010]

【課題を解決するための手段】上記した目的を達成する
ために、本発明に係るモデルパターン登録方法では、表
示装置に表示された画像中の所定領域をモデルパターン
として登録する方法において、前記画像中の所定位置を
指示されてそれを基準座標として受け取り、前記処理対
象の画像と、登録対象が存在しないかまたは異なる位置
にいる別の画像との差分を求め、得られた差分画像中に
対して前記与えられた基準座標から所定方向へサーチを
行って登録対象の境界を検出し、検出した境界に基づい
て所定の枠を設定し、前記設定した枠内に存在する画像
データに基づいてモデルパターンを生成するとともに登
録するようにした。
In order to achieve the above-mentioned object, in a model pattern registration method according to the present invention, in the method of registering a predetermined area in an image displayed on a display device as a model pattern, the image A predetermined position in the inside is designated and received as a reference coordinate, the difference between the image to be processed and another image where the registration target does not exist or is at a different position is calculated, and the difference image is obtained. Then, a search is performed in a predetermined direction from the given reference coordinates to detect a boundary to be registered, a predetermined frame is set based on the detected boundary, and a model is created based on image data existing in the set frame. The pattern is generated and registered.

【0011】そして、好ましくは前記基準座標が、登録
対象のほぼ中心位置を指定するようにし、前記基準座標
からの所定方向のサーチを、前記基準座標から上下及び
左右方向に行い、一方の境界が検出されず、反対方向の
境界が検出されている場合には、検出されなかった側は
前記基準位置から前記検出された反対方向の境界までの
距離とほぼ等距離の位置に境界が存在すると仮定し、前
記検出されまたは仮定された境界を前記枠を構成する枠
辺とすることである。
[0011] Preferably, the reference coordinates specify substantially the center position of the registration target, and a search in a predetermined direction from the reference coordinates is performed in the vertical and horizontal directions from the reference coordinates, and one boundary is If not detected and the boundary in the opposite direction is detected, it is assumed that the undetected side has a boundary at a position approximately equal to the distance from the reference position to the detected boundary in the opposite direction. However, the detected or assumed boundary is set as a frame side forming the frame.

【0012】そして、前記境界としは、例えば前記差分
画像に対して所定のフィルタリング処理を行うことによ
り抽出されたエッジ部分であり、そのエッジ強度に基づ
いて前記境界を検出するようにしてもよい。或いは、前
記差分画像を構成する濃淡画像に対してその濃度または
濃度差が所定の値以下になる部分を前記境界と判定する
ようにしてもよい。
The boundary is, for example, an edge portion extracted by performing a predetermined filtering process on the difference image, and the boundary may be detected based on the edge strength. Alternatively, a portion in which the density or the density difference of the grayscale images forming the difference image is equal to or less than a predetermined value may be determined as the boundary.

【0013】さらには、上記いずれかの方法により枠を
設定した後、その枠を前記表示装置上の所定位置に前記
画像と重畳して表示し、再度画像中の所定地点の座標入
力を受けた場合に、新たに入力された座標が前記基準座
標と同一箇所の場合には、前記設定した枠の大きさを変
更する補正を行うようにしたり、およびまたは、再度画
像中の所定地点の座標入力を受けた場合に、新たに入力
された座標が前記基準座標と異なる箇所の場合には、前
記設定した枠を新たに入力された座標に基づいて移動す
る補正を行うようにするとよい。
Further, after setting a frame by any of the above methods, the frame is displayed at a predetermined position on the display device so as to be superimposed on the image, and the coordinate input of a predetermined point in the image is received again. In this case, if the newly input coordinates are the same as the reference coordinates, correction is performed to change the size of the set frame, and / or the coordinates of a predetermined point in the image are input again. If the newly input coordinates are different from the reference coordinates, it is preferable to perform the correction of moving the set frame based on the newly input coordinates.

【0014】上記の登録方法を実施するのに適した本発
明に係るモデルパターン登録装置では、所定画像を表示
する表示装置と、前記表示装置上の任意の地点の座標を
入力する座標入力手段と、登録対象のエッジを抽出する
エッジ抽出手段と、前記座標入力手段により与えられる
座標から所定方向にサーチを行い、そのサーチ方向上で
の前記抽出されたエッジ部分を検出し、そのエッジ部分
に基づいてパターン登録用の枠を設定する枠設定手段
と、前記枠設定手段により設定された枠内の画像データ
に基づいてモデルパターンを生成するとともに記憶手段
に登録する手段とから構成した。
In the model pattern registration apparatus according to the present invention suitable for carrying out the above registration method, a display device for displaying a predetermined image and coordinate input means for inputting coordinates of an arbitrary point on the display device. An edge extraction means for extracting an edge to be registered, a search is performed in a predetermined direction from the coordinates given by the coordinate input means, the extracted edge portion in the search direction is detected, and based on the edge portion Frame setting means for setting a frame for pattern registration, and means for generating a model pattern based on the image data in the frame set by the frame setting means and registering it in the storage means.

【0015】また、登録対象を含む画像を表示する表示
装置と、前記表示装置上の任意の地点の座標を入力する
座標入力手段と、処理対象の前記画像と、その登録対象
画存在しない或いは異なる位置に存在する所定の比較画
像との差分を求める差分画像生成手段と、前記差分画像
生成手段により生成された差分画像に基づいて前記座標
入力手段により与えられる座標から所定方向にサーチを
行い、そのサーチ方向上での濃度或いは前後の濃度差に
基づいて前記対象物の境界を検出し、その境界に基づい
てパターン登録用の枠を設定する枠設定手段と、前記枠
設定手段により設定された枠内の画像データに基づいて
モデルパターンを生成するとともに記憶手段に登録する
手段とから構成しても良い。
Further, a display device for displaying an image including a registration target, coordinate input means for inputting coordinates of an arbitrary point on the display device, the image to be processed, and the registration target image do not exist or are different. A difference image generation means for obtaining a difference from a predetermined comparison image existing at a position, and a search is performed in a predetermined direction from coordinates given by the coordinate input means based on the difference image generated by the difference image generation means, A frame setting unit that detects the boundary of the object based on the density in the search direction or the difference in density before and after, and sets a frame for pattern registration based on the boundary, and a frame set by the frame setting unit. A model pattern may be generated on the basis of the image data in the above and registered in the storage means.

【0016】そして、前記座標入力手段が、前記表示装
置上に装着されたタッチパネルとすると好ましい。ま
た、補正命令入力手段をさらに備え、前記枠設定手段
が、前記補正命令入力手段から与えられた補正命令信号
に基づいて設定した枠の大きさまたは位置の少なくとも
一方を修正する補正機能を付加すると、より好ましい。
The coordinate input means is preferably a touch panel mounted on the display device. When the frame setting means further includes a correction function for correcting at least one of the size and the position of the frame set based on the correction command signal given from the correction command input means. , And more preferable.

【0017】[0017]

【作用】表示装置上に出力された画像中にモデルパター
ンとしての登録対象が存在すると、その登録対象内の所
定の座標(基準座標)を座標入力装置を用いて指示す
る。この所定の座標は、登録しようとするパターンの中
心部分がよい。また、座標入力装置として、タッチパネ
ルを用いると、表示装置上の画面すなわち表示されてい
る登録対象の所定部分を触ることにより、簡単かつ迅速
でしかも正確に基準座標が指示される。
When a registration target as a model pattern exists in the image output on the display device, predetermined coordinates (reference coordinates) in the registration target are designated using the coordinate input device. The predetermined coordinates are preferably the central portion of the pattern to be registered. Further, when a touch panel is used as the coordinate input device, the reference coordinates can be designated easily, quickly and accurately by touching a screen on the display device, that is, a predetermined portion of the registration target displayed.

【0018】基準座標が与えられると、処理対象の画像
と所定の比較する画像との差分が求める。すると、移動
のない或いは少ない背景部分を構成する画素の値は小さ
くなり、登録対象(その境界部分)が抽出される。次い
で所定のフィルタリングを行うと、エッジ部分が強調さ
れる。そこでその基準座標から所定方向、例えば上下左
右方向に向けてサーチを行い、登録対象のエッジ部分の
抽出を行う。そして、抽出されたなら、そのエッジ部分
に基づいてモデルパターン登録用の枠を設定する。
Given the reference coordinates, the difference between the image to be processed and a predetermined image to be compared is calculated. Then, the value of the pixel forming the background portion with or without movement becomes small, and the registration target (the boundary portion) is extracted. Then, when predetermined filtering is performed, the edge portion is emphasized. Therefore, a search is performed from the reference coordinates in a predetermined direction, for example, in the vertical and horizontal directions, and the edge portion to be registered is extracted. Then, if extracted, a frame for model pattern registration is set based on the edge portion.

【0019】具体的には、例えばエッジ部分が抽出され
たならば、当該エッジ部分を枠の辺とする。これによ
り、登録対象の必要最小限で、背景部分など不要な画像
部分の存在を可及的に抑制するための枠が自動的に設定
される。また、登録対象の形状やその時の撮像の状態
(他の物体などとの相対位置関係など)によっては、エ
ッジが抽出されないことがある。その場合には、検出さ
れた他のエッジ部分に基づいて、仮想的にエッジが存在
する箇所を設定し、その部分を枠の辺とする。これによ
り、エッジが検出されないことがあっても、エッジが検
出された他の部分に基づいて自動的の残りの枠辺も設定
され、各枠辺を連結して構成される閉空間が、登録用の
枠となる。その後、枠の内部に存在する画像データに対
して、所定の画像処理(画像をそのまま或いは所定の特
徴量抽出する等)を行いモデルパターンを生成・登録す
る。
Specifically, for example, when the edge portion is extracted, the edge portion is set as the side of the frame. As a result, a frame for automatically suppressing the existence of unnecessary image portions such as the background portion is automatically set with the minimum necessary registration target. In addition, depending on the shape of the registration target and the imaging state at that time (relative positional relationship with other objects, etc.), the edge may not be extracted. In that case, a portion where an edge virtually exists is set based on another detected edge portion, and that portion is set as a side of the frame. As a result, even if an edge is not detected, the remaining frame sides are automatically set based on the other parts where the edge is detected, and a closed space configured by connecting each frame side is registered. It becomes a frame for. After that, the image data existing inside the frame is subjected to predetermined image processing (the image as it is or a predetermined feature amount is extracted) to generate / register a model pattern.

【0020】また、その様なフィルタリングを行わなく
ても、背景部分の濃度が小さいため所定方向にサーチを
行い、各画素の濃度を検出することにより枠の設定が可
能となる。すなわち、サーチの結果、濃度差がない(少
ない)、或いは濃度が0または小さくなった部分が背景
と想定できるため、係る部分が登録対象の境界とし、所
定の枠を設定するようにしても良い(枠の設定以外は、
上記と同様の作用により実施される)。これにより、精
度は低下するもののフィルタリング処理が不要であるの
で、構成が簡単でより高速な処理が可能となる。
Even if such filtering is not performed, since the density of the background portion is small, it is possible to set the frame by performing a search in a predetermined direction and detecting the density of each pixel. That is, as a result of the search, it can be assumed that there is no density difference (small) or the density becomes 0 or small as the background. Therefore, such a part may be the boundary of the registration target, and a predetermined frame may be set. (Other than setting the frame,
It is carried out by the same operation as above). As a result, although the accuracy is reduced, the filtering process is not required, so that the configuration is simple and the process can be performed at higher speed.

【0021】さらに、所定の補正機能を付加した場合に
は、上記の作用により決定された枠に対する補正(大き
さや存在位置)を変更でき、より所望の枠を設定でき、
それに基づくパターン登録も精度良く行われる。
Furthermore, when a predetermined correction function is added, the correction (size and existing position) for the frame determined by the above operation can be changed, and a more desired frame can be set,
The pattern registration based on it is also performed accurately.

【0022】[0022]

【実施例】以下、本発明に係るモデルパターン登録方法
及び装置の好適な実施例を添付図面を参照にして詳述す
る。図1は、本発明が実装されるモデルパターン登録装
置の一実施例の全体構成図を示している。そして、本例
では、監視カメラ等のある現場(監視エリア)内に侵入
してきた人やその他の物体をモデルパターンとして登録
する場合に適用した例を示している。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT A preferred embodiment of a model pattern registration method and apparatus according to the present invention will be described in detail below with reference to the accompanying drawings. FIG. 1 shows an overall configuration diagram of an embodiment of a model pattern registration device in which the present invention is implemented. Then, in this example, an example applied to the case of registering a person or other object that has entered the site (monitoring area) such as a surveillance camera as a model pattern.

【0023】同図に示すように、監視領域を撮像するた
めの撮像装置たるビデオカメラ10の出力(ビデオ信
号)が、ビデオ画像取り込み部20に接続され、実写に
基づく所定の画像データがデジタル化され格納される。
そして、そのビデオ画像取り込み部20に取り込まれた
所定の画像データ(デジタル)が、画像処理部30に転
送され、そこにおいて入力装置41,41aから与えら
れる座標指示等にしたがって所定の処理が実行されて自
動的にモデルパターンを登録するための領域を示す枠を
設定し、その枠内の画像データに基づいてモデルパター
ンを生成する。
As shown in the figure, the output (video signal) of the video camera 10 which is an image pickup device for picking up the surveillance area is connected to the video image capturing section 20, and predetermined image data based on the actual image is digitized. And stored.
Then, the predetermined image data (digital) captured by the video image capturing section 20 is transferred to the image processing section 30, and predetermined processing is executed there according to the coordinate instruction or the like given from the input devices 41 and 41a. Then, a frame indicating an area for automatically registering the model pattern is set, and the model pattern is generated based on the image data in the frame.

【0024】そして、生成されたモデルパターンは、画
像処理部30に内蔵されるメインメモリ31や、画像処
理部30に接続されたHDD42やFDD43等の外部
記憶装置内の記憶媒体に登録され、必要に応じて読み出
され、モニタTV44上に所定位置に表示されたり、モ
ニタTV44に表示された監視領域の画像データとマッ
チングをとる際に用いられる。
The generated model pattern is registered in the main memory 31 built in the image processing unit 30 or a storage medium in an external storage device such as the HDD 42 or the FDD 43 connected to the image processing unit 30 and required. It is read out in accordance with the above, is displayed at a predetermined position on the monitor TV 44, and is used when matching with the image data of the monitoring area displayed on the monitor TV 44.

【0025】次に各部について詳述すると、ビデオ画像
取り込み部20では、ビデオカメラ10から送られるビ
デオ信号(アナログ)をビデオ入力部21で受取り、水
平/垂直同期信号に分離し、サンプリングした後A/D
変換器22でその明るさレベルがデジタル化され、X,
Yアドレスにしたがって順次ビデオメモリ23に格納さ
れる。すると、ビデオメモリ23内に、ビデオカメラ1
0で撮像されたビデオ画像をデジタル化して得られた現
場(監視領域)の画像データが格納される。
Next, each part will be described in detail. In the video image capturing part 20, the video signal (analog) sent from the video camera 10 is received by the video input part 21, separated into horizontal / vertical synchronizing signals, sampled and then A / D
The brightness level is digitized by the converter 22, and X,
It is sequentially stored in the video memory 23 according to the Y address. Then, in the video memory 23, the video camera 1
The image data of the site (monitoring area) obtained by digitizing the video image captured at 0 is stored.

【0026】モニタTV44は、本例ではカラーの液晶
ディスプレイを用いており、表面には基準点入力手段た
るタッチパネル41aを装着している。なお、本発明で
は、上記液晶ディスプレイに限ることなく、CRT等の
その他の表示装置を用いてももちろんよい。
As the monitor TV 44, a color liquid crystal display is used in this example, and a touch panel 41a as a reference point input means is mounted on the surface. It should be noted that the present invention is not limited to the liquid crystal display described above, and other display devices such as a CRT may of course be used.

【0027】入力装置41は、キーボード,マウス,ト
ラックボールその他の種々の装置を用いることができ、
モデルパターンの登録を行う際に必要な種々の命令を入
力できるようになっている。
The input device 41 can use various devices such as a keyboard, a mouse, a trackball, and the like.
Various commands required when registering a model pattern can be input.

【0028】画像処理部30は、通常はCPU32から
の制御命令に従って上記ビデオメモリ23に格納された
撮像中の実写データ(デジタル画像)が、そのままスル
ー状態でグラフィックメモリ(フレームメモリ)33に
転送され、そのメモリ33に一時格納されたデータがD
/A変換器34にてアナログ信号に変換後、モニタTV
44に表示される。また、上記各外部装置41〜43
は、画像処理部30に内蔵されたI/Oコントロール3
5に接続され、そのI/Oコントロール35を介して情
報の送受が行われるように構成される。また、タッチパ
ネル41aからタッチ箇所の座標信号も同様にI/Oコ
ントロール35を介してCPU32に送られる。
In the image processing section 30, the photographed actual image data (digital image) stored in the video memory 23 is transferred to the graphic memory (frame memory) 33 in a through state as it is in accordance with a control command from the CPU 32. , The data temporarily stored in the memory 33 is D
A / A converter 34 converts to analog signal, then monitor TV
44 is displayed. In addition, each of the external devices 41 to 43 described above
Is an I / O control 3 built in the image processing unit 30.
5 and is configured to transmit and receive information via the I / O control 35. Further, the coordinate signal of the touched portion from the touch panel 41a is similarly sent to the CPU 32 via the I / O control 35.

【0029】ここで本発明の要部となるCPU32の機
能について、図2以降のフローチャートに基づいて説明
する。通常は、ビデオカメラ10で撮像され送られてき
た監視領域の画像データ(現画像)をそのままモニタT
V44に出力する(ST1)。そして、操作者はモデル
パターンの登録を行う場合には、登録しようとする対象
物の中心部分の座標を指定する。具体的には、本例では
モニタTV44の表示画面上にタッチパネルを装着して
いるため、そのタッチパネル41aの所定位置を触るこ
とにより行う。従って、CPU32は、タッチパネル4
1aに対する操作者の指等の接触の有無を判断し、接触
された(押された)場合にはその時の表示画面を一時停
止(フリーズ)させた状態で、その指示されたX,Y座
標を取得する(ST2〜4)。なお、係る一時停止は、
グラフィックメモリ33に格納する画像データの内容を
更新しないことにより同一画像を出力し続けることにな
る。
The function of the CPU 32, which is the main part of the present invention, will now be described with reference to the flowcharts of FIG. Normally, the image data (current image) of the surveillance area picked up and sent by the video camera 10 is directly sent to the monitor T.
Output to V44 (ST1). Then, when registering the model pattern, the operator specifies the coordinates of the central portion of the target object to be registered. Specifically, in this example, since a touch panel is mounted on the display screen of the monitor TV 44, it is performed by touching a predetermined position on the touch panel 41a. Therefore, the CPU 32 uses the touch panel 4
It is determined whether or not the operator's finger or the like touches 1a, and when touched (pressed), the indicated X and Y coordinates are displayed while the display screen at that time is temporarily stopped (frozen). Acquire (ST2-4). In addition, the suspension is
By not updating the contents of the image data stored in the graphic memory 33, the same image can be continuously output.

【0030】次に、モデルパターンの登録をするための
枠(ウインドウ)の設定処理に移行する。まず、表示さ
れた画像に対して所定の前処理を行い、登録対象パター
ンのエッジ部分の抽出を行なう(ST5)。このステッ
プ5の具体的な処理は、図3に示すようになっている。
すなわち、この処理ステップ5(図3に示すフロー)
が、本発明におけるエッジ抽出手段を構成する。
Next, the process proceeds to a frame (window) setting process for registering the model pattern. First, a predetermined preprocessing is performed on the displayed image to extract the edge portion of the registration target pattern (ST5). The specific processing of this step 5 is as shown in FIG.
That is, this processing step 5 (flow shown in FIG. 3)
Constitute the edge extraction means in the present invention.

【0031】具体的には、まず登録する対象物が移動し
ているか否かを判断する(ST10)。この判断は、入
力装置41からのマニュアル入力(操作者の指示)に基
づいて行なう。なお、移動している場合とは、例えば侵
入者が監視領域中を移動している現象を意味し、移動し
ていない場合とは例えば侵入者が監視領域中のある地点
で立ち止まっているような現象を意味する。
Specifically, it is first determined whether or not the object to be registered is moving (ST10). This judgment is made based on a manual input from the input device 41 (instruction by the operator). The case where the intruder is moving means, for example, a phenomenon in which the intruder is moving in the surveillance area, and the case where the intruder is not moving is such that the intruder is stopped at a certain point in the surveillance area. Means a phenomenon.

【0032】そして、移動中の場合には、処理対象のグ
ラフィックメモリ33に格納されている画像データ(フ
レーム)と、その次にビデオメモリ23から転送されて
来る画像データとをCPU32が取り込み(連続する2
枚のフレームを取込む)、その2枚の画像の差分を求め
る(ST11)。一方、静止している場合には、予め撮
像し保持していた基準画像(侵入者等のいない通常の監
視領域を撮像しておいた画像)と、処理対象の画像デー
タとの差分を求める(ST12)。これにより、変化
(移動)しない背景部分は排除される。
When moving, the CPU 32 takes in the image data (frame) stored in the graphic memory 33 to be processed and the image data transferred next from the video memory 23 (continuously. To do 2
(Take in one frame) and obtain the difference between the two images (ST11). On the other hand, when it is stationary, the difference between the reference image (the image of the normal monitoring area where there is no intruder, etc.) previously captured and held and the image data to be processed is obtained ( ST12). As a result, the background portion that does not change (move) is eliminated.

【0033】しかし、このままでは、孤立点などのノイ
ズ等を有し、対象物のエッジ部分がぼやける。特に対象
物が移動している場合の連続する2フレームの差分を取
った場合には、対象物のエッジ部分が移動距離に従い所
定の幅を有することになる。そこで、所定のフィルタリ
ングを行ない、係る孤立点などのノイズを除去したり、
エッジの鮮鋭化を行う(ST13)。なお、係る処理
は、差分画像データに対して、ラプラシアンフィルタ
や、その他の所定のフィルタをかけることにより行う
が、具体的なフィルタの各係数等は、基本的に従来のも
のを用いることができ、また、必要に応じて適宜フィル
タ係数やマスの数等を修正することにより、より精度よ
くエッジ部分を抽出することもできる。
However, if left as it is, there is noise such as an isolated point, and the edge portion of the object is blurred. Particularly when the difference between two consecutive frames when the object is moving is calculated, the edge portion of the object has a predetermined width according to the moving distance. Therefore, a predetermined filtering is performed to remove noise such as the isolated point,
The edge is sharpened (ST13). Note that the processing is performed by applying a Laplacian filter or other predetermined filter to the difference image data, but the specific coefficients of the filter can be basically conventional ones. Also, the edge portion can be extracted with higher accuracy by appropriately modifying the filter coefficient, the number of squares, and the like as necessary.

【0034】なお、本例では登録する対象物の境界部分
を検出するに際し、差分後フィルタリングを行えエッジ
強度の明確な差を生じさせるようにしたが、本発明はこ
れに限ることなく、処理対象の画像を所定の画像(2つ
のフレーム間或いは基準画像)との取るため、その差分
処理のみによっても、背景部分は比較的精度良く排除で
きる(明るさが0または非常に小さい値となる)ので、
フィルタリングを行うことなく、濃淡画像データに対し
て濃淡の変化をサーチし、変化がなくなった(所定のし
きい値以下になる)、或いは明るさが「0」或いは所定
のしきい値以下になった箇所を対象物の境界と判定する
ようにしても良い。
In this example, when the boundary portion of the object to be registered is detected, post-difference filtering is performed to cause a clear difference in edge strength. However, the present invention is not limited to this, and the processing target is not limited to this. Since the image is taken as a predetermined image (between two frames or a reference image), the background portion can be removed with relatively high accuracy (the brightness becomes 0 or a very small value) only by the difference processing. ,
The grayscale image data is searched for a grayscale change without filtering, and the change disappears (becomes less than or equal to a predetermined threshold value), or the brightness is "0" or less than or equal to a predetermined threshold value. It is also possible to determine that the broken portion is the boundary of the object.

【0035】次に、図2に示すステップ6に戻り、枠設
定の基準となる基準点座標(入力座標)を中心(原点)
とするX−Y軸を想定し、その軸上に存在する上記対象
物のエッジの位置を検出し、それに基づいて枠を設定す
る。そして、この具体的なステップ6の処理は、図4に
示すようになっている。すなわち、この処理ステップ6
(図4に示すフロー)が、本発明における枠設定手段を
構成する。
Next, returning to step 6 shown in FIG. 2, the center (origin) is set to the reference point coordinate (input coordinate) which is the reference for frame setting.
Assuming an X-Y axis, the edge position of the object existing on the axis is detected, and the frame is set based on the detected position. Then, the specific process of step 6 is as shown in FIG. That is, this processing step 6
(The flow shown in FIG. 4) constitutes the frame setting means in the present invention.

【0036】まず、与えられた入力座標の上下方向(Y
軸)をサーチし、Y軸上のエッジの存在位置を検出する
(ST21)。このサーチは、本例では、サーチ方向す
なわちY軸と直行する方向に所定単位(10画素)の幅
を持つウインドウ(サーチ方向は1画素でウインドウの
中心はY軸)を設定し、サーチ方向に1画素ずつ移動し
ラインの状態を探査して変化の有無を求め、変化がなく
なった場合の1つ前のラインをエッジの存在位置とす
る。すなわち、上記ステップ5による前処理で、少なく
とも変化がない或いは少ない背景部分に対応する画素の
値は小さくなっている。従って、ウインドウ内の掻くが
その値を所定のしきい値で2値化し、各サーチ毎にウイ
ンドウ内に存在するしきい値を越える値を有する画素の
個数をカウントし、その個数が一定値以下になると、変
化がなくまたは少ない背景部分に到達したと想定でき
る。そして枠内に背景部分などの無用な画像データが存
在しないようにすべく、枠を必要最小限に小さく設定す
るために上記のように1つ前(入力座標(中心)側)の
ラインをエッジとした。
First, the vertical direction (Y
(Axis), and the existence position of the edge on the Y axis is detected (ST21). In this search, in this example, a window having a width of a predetermined unit (10 pixels) in the search direction, that is, a direction perpendicular to the Y axis (the search direction is 1 pixel and the center of the window is the Y axis) is set, and the search direction is set. The state of the line is searched by moving one pixel at a time to determine whether or not there is a change, and the line immediately before when there is no change is the position where the edge exists. That is, in the pre-processing in step 5, the value of the pixel corresponding to the background portion which is at least unchanged or small is small. Therefore, scratches in the window are binarized with a predetermined threshold value, and the number of pixels having a value exceeding the threshold value existing in the window is counted for each search. Then, it can be assumed that the background portion has been reached with little or no change. Then, in order to prevent unnecessary image data such as the background portion from existing in the frame, the line on the immediately preceding (input coordinate (center) side) is edged as described above in order to set the frame as small as necessary. And

【0037】そして、上下両方ともエッジ部分が抽出さ
れたなら当該ライン部分を、枠の上限(上辺)及び下限
(下辺)とする(ST22,23)。一方、片側のみエ
ッジ部分が検出されたならば、検出された側は当該ライ
ン部分を枠を構成する枠辺とし検出されない側の枠を構
成する枠辺は、検出された当該ラインに基づいて設定す
る。そして、本例では、入力座標を基準に点対称の位
置、すなわち、入力座標から検出された一方のエッジ部
分までの距離と等距離だけ反対側に離れた位置を上記エ
ッジが検出されなかった側の枠辺に設定する(ST2
4,25)。なお、対象物が侵入者(人間)とすると、
一般に登録するモデルパターンは人間の顔となるので、
上限のエッジは頭の上(頂点)となるので検出される
が、下側は胴体が存在するため、エッジ部分は検出され
にくい。したがって、通常のフローとしては、ステップ
22から24に飛び、しかしステップ25の処理では、
検出された上限に基づき下限を設定することになる。
If the edge portions are extracted on both the upper and lower sides, the line portions are set as the upper limit (upper side) and the lower limit (lower side) of the frame (ST22, 23). On the other hand, if an edge portion is detected on only one side, the detected side is set as the frame side that constitutes the frame and the frame side that constitutes the undetected side is set based on the detected line. To do. In this example, the point-symmetrical position with respect to the input coordinate, that is, the position where the edge is not detected is a position separated by the same distance as the distance from the input coordinate to one edge portion detected. To the frame edge of (ST2
4, 25). If the target is an intruder (human),
Generally, the model pattern to be registered is a human face, so
The upper limit edge is detected because it is above the head (vertex), but since the body exists on the lower side, it is difficult to detect the edge portion. Therefore, the normal flow is to jump from step 22 to step 24, but in the process of step 25,
The lower limit will be set based on the detected upper limit.

【0038】次に、入力座標から左右方向(X軸方向)
にサーチを行い、エッジ部分の抽出を行う(ST2
6)。このサーチの具体的な処理は、方向が異なるだけ
で、上記したステップ21における上下方向のサーチと
同様(入力座標から10画素分ずつサーチする)に行
う。
Next, from the input coordinates to the left-right direction (X-axis direction)
Is searched to extract the edge part (ST2
6). The specific processing of this search is performed in the same manner as in the vertical search in step 21 described above (searching for 10 pixels each from the input coordinates), except that the direction is different.

【0039】そして、上下方向へのサーチ後の処理と同
様に、両方ともエッジが抽出されたなら、各ラインをそ
れぞれ枠の左限(左辺),右限(右辺)と設定する(S
T28)。また、片側のみが検出された場合には、検出
された方はその検出した部分とし、検出されなかった側
は入力座標を基準に検出されたエッジ部分と等距離だけ
反対側に離れた部分を枠辺とする(ST29,30)。
Then, similarly to the processing after the search in the vertical direction, if both edges are extracted, each line is set as the left limit (left side) and the right limit (right side) of the frame (S).
T28). If only one side is detected, the detected side is the detected part, and the non-detected side is the part equidistant from the edge part detected based on the input coordinates on the opposite side. Frame sides (ST29, 30).

【0040】また、たとえば処理対象の侵入者が他の人
や設置物の物陰などに重なり、左右のエッジ部分が両方
とも検出されない場合がある。係る場合には、ステップ
21〜25までの処理により決定された上下の枠辺に基
づいて左右の枠辺を決定する(ST31)。すなわち、
対象物を人間とすると、縦長の長方形の枠を設定すると
最も効率よいモデルパターンが生成できるため、予め定
めておいた比率(縦横比で、入力装置41を介して設定
される)に基づいて、上下の長さに対する横幅を求め、
その横幅を有し入力座標が中心となるようなX軸上の点
を求め(上記横幅の半分の長さだけ離れた地点)、当該
部分を左右のそれぞれの枠辺に設定する。
In addition, for example, an intruder to be processed may overlap another person or the shadow of an installation object, and both the left and right edge portions may not be detected. In this case, the left and right frame sides are determined based on the upper and lower frame sides determined by the processing of steps 21 to 25 (ST31). That is,
When the object is a human, the most efficient model pattern can be generated by setting a vertically long rectangular frame. Therefore, based on a predetermined ratio (aspect ratio, set via the input device 41), Calculate the width for the vertical length,
A point on the X-axis having the width and having the input coordinates as the center is obtained (a point separated by half the width), and the portion is set on each of the left and right frame sides.

【0041】これにより、上下左右の各枠辺が設定され
るため、入力座標を中心とした矩形状の枠体が自動的に
設定でき、この設定した枠をグラフィックメモリ33に
格納された実写に基づく画像データに重ねて表示する
(ST32)。この時、基準点として指が触れた場所は
「+」マークで表示している。
As a result, since the upper, lower, left and right frame sides are set, a rectangular frame body centering on the input coordinates can be automatically set, and the set frame can be used as an actual image stored in the graphic memory 33. The image data is displayed so as to be superimposed on the base image data (ST32). At this time, the place touched by the finger as a reference point is indicated by a "+" mark.

【0042】なお、ステップ24での判定がNo、すな
わち上下のエッジ部分がともに検出されなかった場合に
は、本例ではエラー(枠の設定不可)として、処理を終
了する(ST33)。これは、本例では、監視領域内へ
の侵入者(特に人間)をモデルパターンとしてリアルタ
イムで登録し、その後自動的に追跡処理を行ったり、同
一人物の監視領域内の存在の有無を検知するためにオン
ラインによりモデルパターンを登録する場合に適用する
ため、人間であればかならず頭の頂点を検出できるはず
であるので、上記のようにステップ24でNoの時に
は、頭部分が隠れていたり、間違った或いは不適切な部
分を入力座標として指示した可能性が高いためにエラー
処理とした。
When the determination in step 24 is No, that is, when the upper and lower edge portions are not detected, an error (frame setting is impossible) is determined in this example, and the process is terminated (ST33). In this example, intruders (especially humans) who enter the monitoring area are registered in real time as a model pattern, and then tracking processing is automatically performed, and the presence or absence of the same person in the monitoring area is detected. Therefore, since it is applied when registering a model pattern online, a human must be able to detect the apex of the head without fail. Therefore, when the answer is No in step 24 as described above, the head part is hidden or is incorrect. In addition, since it is highly likely that an inappropriate portion was designated as the input coordinate, error processing was performed.

【0043】しかし、処理対象物が異なる場合は、上記
した判断を行わず、最初に左右方向のエッジ部分の検出
を行ったり、或いは、上下と左右方向のサーチの順番を
問わず、少なくとも1辺のエッジ部分が検出されれば、
検出されなかった側は、検出された所定の辺の存在位置
等に基づいて(例えばステップ25,30,32の処理
等を利用する)自動的に設定するようにしてもよい。
However, when the objects to be processed are different, at least one side is detected regardless of whether the edge part in the horizontal direction is first detected or the search order in the vertical and horizontal directions is not performed without making the above determination. If the edge part of is detected,
The non-detected side may be automatically set based on the detected position of the predetermined side or the like (for example, using the processing of steps 25, 30, 32).

【0044】このようにして、自動的に枠が設定された
ならば、図2に示すステップ7に戻り、補正命令の有無
を判断し、補正命令がなければ自動的に設定された枠で
正式なモデルパターン登録用の枠に決定し、その枠内に
存在する画像データ(グラフィックメモリ33に一時停
止状態で格納されている実写に基づく画像データ)をそ
のまま或いは所定の特徴量抽出を行いモデルパターン化
して登録する(ST7,8)。なお、枠内の画像データ
に基づく登録処理は、従来の方式を適用できるため、そ
の詳細な説明を省略する。
If the frame is automatically set in this way, the process returns to step 7 shown in FIG. 2 to judge the presence / absence of a correction command. If there is no correction command, the frame automatically set is officially set. A model pattern registration frame, and the image data existing in the frame (image data based on an actual image stored in the graphic memory 33 in a paused state) is extracted as it is or a predetermined feature amount is extracted as a model pattern. Convert and register (ST7, 8). Since the conventional method can be applied to the registration processing based on the image data in the frame, detailed description thereof will be omitted.

【0045】一方、本例では自動設定した枠(ステップ
32で所定位置に表示されている)を見た操作者が、そ
の適否を判断し、半マニュアルにより枠の位置や大きさ
の補正を行うことができるようにしている。具体的に
は、表示された画面上のいずれかの部分を触ると補正処
理(ST9)に移行する。
On the other hand, in this example, the operator who sees the automatically set frame (displayed at the predetermined position in step 32) judges the suitability and corrects the position and size of the frame semi-manually. I am able to do that. Specifically, when any part of the displayed screen is touched, the process proceeds to the correction process (ST9).

【0046】そして、補正処理の具体的な処理フロー
は、図5に示すようになっている。すなわち、まず一定
時間内にタッチパネル41aからの座標入力の有無を判
断し(ST40)、タッチされない場合にはその時の枠
の大きさ及び位置に決定し、ステップ8に戻る。
The specific processing flow of the correction processing is as shown in FIG. That is, first, it is judged whether or not there is a coordinate input from the touch panel 41a within a fixed time (ST40), and if not touched, the size and position of the frame at that time are determined, and the process returns to step 8.

【0047】座標入力があった場合には、その入力位置
が最初(或いは前回)押された入力座標(現在の枠の中
心で、「+」マークで表示している)と同じか否かを判
断し(ST41)、同一場所の場合には枠の修正命令と
判断し(ST42)、X,Y方向(上下,左右方向)
に、基準画素(本例では10画素)分だけ枠を広げる
(ST43)。これにより、中心位置を同じにして、各
枠辺の存在位置が10画素分ずつ広がる。従って、併せ
て上下方向及び左右方向はそれぞれ20画素分ずつ広が
る)。
When there is a coordinate input, it is determined whether or not the input position is the same as the input coordinate (which is indicated by the "+" mark at the center of the current frame) pressed first (or last time). Judgment (ST41), if it is the same place, it is judged to be a frame correction command (ST42), and X, Y directions (vertical and horizontal directions).
Then, the frame is expanded by the reference pixel (10 pixels in this example) (ST43). As a result, the existing positions of the frame sides are expanded by 10 pixels while keeping the center position the same. Therefore, the vertical direction and the horizontal direction are expanded by 20 pixels each.

【0048】そして、X方向またはY方向の入力座標か
らの枠辺の離反距離がMAX(例えば150画素分)に
広がるまでは、タッチパネルからの入力の都度枠を広げ
ていく(ST43,44)。一定値以上広がった場合に
は、操作者からの要求は自動的に設定した枠よりも小さ
くしたいものと判断し、X,Y方向(正負両方向)をそ
れぞれ所定画素分(例えば100画素分)ずつ小さくし
た(ST45)後、ステップ40に戻る。その後、同一
箇所をタッチし続けると、ステップ41〜44の処理を
繰り返し行うため、ステップ45で設定したMINの枠
から10画素分ずつ上下・左右方向に広がって行く。
Then, until the separation distance of the frame side from the input coordinate in the X direction or the Y direction spreads to MAX (for example, 150 pixels), the frame is expanded every time the input from the touch panel is made (ST43, 44). When it spreads over a certain value, it is judged that the request from the operator is desired to be smaller than the automatically set frame, and the X and Y directions (both positive and negative directions) are each a predetermined number of pixels (for example, 100 pixels). After reducing the size (ST45), the process returns to step 40. After that, if the same place is continuously touched, the processes of steps 41 to 44 are repeated, so that the pixels spread in the vertical and horizontal directions by 10 pixels from the MIN frame set in step 45.

【0049】すなわち、例えば自動設定された枠が図6
中実線で示すようになっているとすると、最初のうちは
図中破線で示すように枠は→→→…というように
徐々に大きくなる。一方、MAXまで広がってもさらに
タッチした場合には、同図中二点鎖線で示すようにMI
Nの枠になる。以後この処理を繰り返すことにより、枠
はMINの位置から所定数ずつ広がる。
That is, for example, the automatically set frame is shown in FIG.
If it is shown by a solid line, the frame gradually becomes large as shown by a broken line in the figure, such as →→→ ... On the other hand, if it is touched even if it spreads to MAX, MI is shown as indicated by the chain double-dashed line in the figure.
It becomes the frame of N. After that, by repeating this process, the frame is expanded from the MIN position by a predetermined number.

【0050】一方、前回の入力場所と異なる場所をタッ
チした場合には、ステップ41の分岐判断後ステップ4
6に飛び、枠の移動命令と判断して新たに与えられた座
標点が中心となるように枠を移動した(ST46,4
7)後、ステップ40に戻る。なお、この移動の際に
は、枠の大きさは変更しない。
On the other hand, if a place different from the previous input place is touched, the step 4 after the branch judgment of the step 41
Jumping to step 6, the frame is moved so that it is determined to be a frame moving command and the newly given coordinate point becomes the center (ST46, 4).
7) After that, it returns to step 40. The size of the frame is not changed during this movement.

【0051】すなわち、例えば自動設定された枠(中心
座標(X0 ,Y0 )が図7中実線で示すようになってい
るとすると、同図に示すように次に入力した座標(X,
Y)がずれていると、図中破線で示すように枠の位置が
移動する。
That is, for example, if an automatically set frame (center coordinates (X0, Y0) is as shown by the solid line in FIG. 7, the next input coordinate (X,
If Y) is deviated, the position of the frame moves as shown by the broken line in the figure.

【0052】そして、一定時間タッチパネルからの座標
入力がないと、その時に表示されている枠の大きさ及び
存在位置で正式なモデルパターン登録用の枠と決定し、
ステップ8に戻り、モデルパターンの登録処理を行な
う。なお、入力装置41やタッチパネル41aからの強
制登録信号に基づき、一定時間待つことなくその時の枠
の状態で登録するようにしてもよい。
If there is no coordinate input from the touch panel for a certain period of time, it is determined that the frame is a formal model pattern registration frame based on the size and position of the frame displayed at that time.
Returning to step 8, the model pattern registration process is performed. In addition, based on the compulsory registration signal from the input device 41 or the touch panel 41a, registration may be performed in the state of the frame at that time without waiting for a certain period of time.

【0053】なお、上記した実施例では、入力座標(基
準位置)の指示をタッチパネル41aにより行ったが、
本発明はこれに限ることなく、例えばマウス,トラック
ボールやキーボードなどからの命令に基づき、画面上を
カーソルまたはポインタを移動させ、所定位置にきた時
に確定命令(クリック,リターンなど)を送るようにし
てもよい。但し、タッチパネルを用いた場合は、カーソ
ルなどの移動時間も不要で短時間で指示入力が行えると
ともに、表示されている位置を直接触るために、簡単か
つ正確に所望の位置の入力指示ができる。
In the above embodiment, the input coordinates (reference position) is instructed by the touch panel 41a.
The present invention is not limited to this. For example, based on an instruction from a mouse, a trackball, a keyboard, or the like, a cursor or a pointer is moved on the screen, and a confirmation instruction (click, return, etc.) is sent when a predetermined position is reached. May be. However, when the touch panel is used, it is not necessary to move the cursor and the like, and the instruction input can be performed in a short time, and since the displayed position is directly touched, the input instruction of the desired position can be performed easily and accurately.

【0054】次に、上記した実施例を用い、本発明に係
るモデルパターン登録方法の一実施例について説明す
る。ビデオカメラ10にて撮像され転送されて来る画像
データが、モニタTVに示される。そして正常状態では
図8に示すような景色がモニタTV43上に表示されて
いるとする。この状態の画像データをCPU32は内部
のバッファまたは所定の記憶手段に格納しておく。
Next, one embodiment of the model pattern registration method according to the present invention will be described using the above-mentioned embodiment. Image data picked up by the video camera 10 and transferred is displayed on the monitor TV. Then, in a normal state, it is assumed that the scenery as shown in FIG. 8 is displayed on the monitor TV 43. The CPU 32 stores the image data in this state in an internal buffer or a predetermined storage means.

【0055】そして、この状態で監視を行っている時
に、例えばあるタイミングで図9に示すように、モニタ
TV44上に侵入者M1が表示され、その侵入者M1の
顔をモデルパターンとして登録するためには、モニタT
V44の画面上の顔の中心をタッチする。すると、図2
〜図4に示すフローチャートにしたがって、その入力座
標点を中心とする枠Wが求められ、タッチした位置(入
力座標点「+」マーク)とともにモニタTV43上に表
示される。
During monitoring in this state, the intruder M1 is displayed on the monitor TV 44 at a certain timing, for example, as shown in FIG. 9, and the face of the intruder M1 is registered as a model pattern. The monitor T
Touch the center of the face on the screen of V44. Then, Figure 2
According to the flowchart shown in FIG. 4, the frame W centering on the input coordinate point is obtained and displayed on the monitor TV 43 together with the touched position (input coordinate point “+” mark).

【0056】操作者は、この表示された枠Wでよい場合
にはそのまま放置すると、その枠W内の画像がモデルパ
ターンとして登録される。また、この表示位置を修正し
たい場合には、所定位置(「+」と同じかまたは異なる
位置)をタッチする。すると図5に示したフローチャー
トにしたがって、枠の大きさを修正したり位置を修正し
たりする。
If the operator can leave the displayed frame W as it is, the image in the frame W is registered as a model pattern. Further, when it is desired to correct the display position, a predetermined position (the same position as “+” or a different position) is touched. Then, according to the flowchart shown in FIG. 5, the size and position of the frame are corrected.

【0057】なお、上記した各実施例では、ビデオカメ
ラ(監視カメラ)から送られて来る監視領域の画像に基
づき、その領域内への侵入者の顔をモデルパターンとし
て登録し、その後の所定の処理(マッチングを取りなが
ら追跡処理をしたり、同一人物を検出することにより、
領域内での存在時間などを検出し、異常事態か否かの判
断等を行う)を行う際の比較の基準となるモデルパター
ンとして使用する例について説明したが、本発明はこれ
に限ることなく、種々のマッチングを行う際のモデルパ
ターンの作成・登録に利用することができる。しかも、
本実施例のようにビデオカメラで撮像中の画像に対する
オンライン登録を行えるという特徴(効果)を有する
が、本発明では、これに限ることなく、オンライン処理
ではなく任意の手法(デジタルスチールカメラやイメー
ジスキャナのように対象物が静止しているものを撮像す
る装置を用いても可)により取得・生成され、表示装置
に表示される画像中の所定部分をモデルパターンとして
登録する場合にも適用できる。
In each of the above-described embodiments, the face of the intruder in the area is registered as a model pattern based on the image of the area to be monitored sent from the video camera (monitor camera), and a predetermined pattern thereafter is registered. Processing (By performing tracking processing while matching and detecting the same person,
An example of using it as a model pattern that serves as a reference for comparison when detecting the existence time in the area and determining whether or not it is an abnormal situation has been described, but the present invention is not limited to this. , And can be used for creating / registering model patterns when performing various types of matching. Moreover,
Although the present embodiment has a feature (effect) that online registration can be performed for an image being picked up by a video camera, the present invention is not limited to this, and an arbitrary method (digital still camera or image It can also be applied to the case of registering a predetermined part in the image acquired and generated by a device such as a scanner that captures an image of a stationary object and displayed on the display device as a model pattern. .

【0058】[0058]

【発明の効果】以上のように、本発明に係るモデルパタ
ーン登録方法及び装置では、表示装置上に表示された画
像に対して、モデルパターンとして登録したい部分の一
点(例えば中心点)を基準座標として指示するだけで、
自動的に登録対象を含む所定の枠を設定し、その設定し
た枠内に存在する画像データから所定の画像処理により
モデルパターンを生成し登録することができる。すなわ
ち、登録処理を行う操作者は、基準座標を指示するとい
う処理を行うだけで、自動的に所望のモデルパターンを
登録できる。そして、コンピュータによる自動処理のた
め、枠の設定も高速化される。よって、例えば撮像装置
で撮像し、オンラインで伝送され表示装置上に表示され
る画面中の所定部分(登録対象)に対して、その対象物
の移動の有無を問わずオンラインでモデルパターン登録
を行うことができる。
As described above, in the model pattern registration method and device according to the present invention, one point (for example, the center point) of a portion to be registered as a model pattern is set as a reference coordinate in the image displayed on the display device. Just tell
It is possible to automatically set a predetermined frame including the registration target, generate a model pattern from the image data existing in the set frame by predetermined image processing, and register the model pattern. That is, the operator who performs the registration process can automatically register the desired model pattern only by performing the process of designating the reference coordinates. Since the computer automatically processes the frame, the setting of the frame is also speeded up. Therefore, for example, a model pattern is registered online with respect to a predetermined portion (registration target) in a screen which is imaged by an imaging device and transmitted online and displayed on a display device, regardless of whether or not the object is moved. be able to.

【0059】そして、基準座標の指示を行うための座標
入力手段としてタッチパネルを用いた場合(請求項9)
には、より簡単かつ迅速に基準座標を正確に入力するこ
とができ、処理速度及び処理結果の精度が向上する。
When a touch panel is used as coordinate input means for designating the reference coordinates (claim 9).
The reference coordinates can be input more accurately and more easily, which improves the processing speed and the accuracy of the processing result.

【0060】さらに、自動的に設定した枠に対して、所
定の補正処理を行うようにした場合(請求項5,6,1
0)には、実際の登録範囲を指定する枠と処理対象の画
像とが重畳した状態で表示しているため、簡単に自動設
定した枠の適否が判断でき、その存在位置や枠の大きさ
を最適な位置に簡単に補正できる。
Furthermore, in the case where a predetermined correction process is performed on the automatically set frame (claims 5, 6, 1).
In 0), since the frame that specifies the actual registration range and the image to be processed are displayed in a superimposed state, it is possible to easily determine the suitability of the automatically set frame, and determine the existing position and size of the frame. Can be easily corrected to the optimum position.

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

【図1】本発明に係る登録装置の好適な一実施例を示す
ブロック図である。
FIG. 1 is a block diagram showing a preferred embodiment of a registration device according to the present invention.

【図2】本実施例に用いられるCPUの機能を示すフロ
ーチャートである。
FIG. 2 is a flowchart showing functions of a CPU used in this embodiment.

【図3】本実施例に用いられるCPUの機能を示すフロ
ーチャートである。
FIG. 3 is a flowchart showing functions of a CPU used in this embodiment.

【図4】本実施例に用いられるCPUの機能を示すフロ
ーチャートである。
FIG. 4 is a flowchart showing functions of a CPU used in this embodiment.

【図5】本実施例に用いられるCPUの機能を示すフロ
ーチャートである。
FIG. 5 is a flowchart showing functions of a CPU used in this embodiment.

【図6】枠の大きさの補正方法の作用を説明する図であ
る。
FIG. 6 is a diagram illustrating an operation of a method for correcting a frame size.

【図7】枠の位置の補正方法の作用を説明する図であ
る。
FIG. 7 is a diagram illustrating the operation of the method for correcting the position of the frame.

【図8】モデルパターン登録方法の一実施例の各工程に
より表示されるモニタTVの表示画面を示す図である。
FIG. 8 is a diagram showing a display screen of the monitor TV displayed in each step of the embodiment of the model pattern registration method.

【図9】モデルパターン登録方法の一実施例の各工程に
より表示されるモニタTVの表示画面を示す図である。
FIG. 9 is a diagram showing a display screen of a monitor TV displayed in each step of the embodiment of the model pattern registration method.

【図10】モデルパターン登録方法の一実施例の各工程
により表示されるモニタTVの表示画面を示す図であ
る。
FIG. 10 is a diagram showing a display screen of a monitor TV displayed in each step of the embodiment of the model pattern registration method.

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

10 ビデオカメラ 20 ビデオ画像取り込み部 30 画像処理部 31 メインメモリ(記憶手段) 32,32′ CPU(エッジ抽出手段,枠設定手段) 33 グラフィックメモリ 34 D/A変換器 41 入力装置 41 タッチパネル(座標入力手段) 42 HDD(記憶手段) 43 FDD(記憶手段) 44 モニタTV(表示手段) 10 Video Camera 20 Video Image Capture Unit 30 Image Processing Unit 31 Main Memory (Storage Means) 32, 32 'CPU (Edge Extraction Means, Frame Setting Means) 33 Graphic Memory 34 D / A Converter 41 Input Device 41 Touch Panel (Coordinate Input Means) 42 HDD (storage means) 43 FDD (storage means) 44 Monitor TV (display means)

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 9061−5H 15/70 465 Z ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI technical display location 9061-5H 15/70 465 Z

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 表示装置に表示された画像中の所定領域
をモデルパターンとして登録する方法において、 前記画像中の所定位置を指示されてそれを基準座標とし
て受け取り、 前記処理対象の画像と、登録対象が存在しないかまたは
異なる位置にいる別の画像との差分を求め、 得られた差分画像中に対して前記与えられた基準座標か
ら所定方向へサーチを行って登録対象の境界を検出し、 検出した境界に基づいて所定の枠を設定し、 前記設定した枠内に存在する画像データに基づいてモデ
ルパターンを生成するとともに登録するようにしたモデ
ルパターン登録方法。
1. A method for registering a predetermined area in an image displayed on a display device as a model pattern, wherein a predetermined position in the image is designated and received as reference coordinates, and the image to be processed and the registration are performed. The difference between the target image and another image at a different position is determined, and the boundary of the registration target is detected by performing a search in the predetermined direction from the given reference coordinates in the obtained difference image, A model pattern registration method in which a predetermined frame is set based on the detected boundary, and a model pattern is generated and registered based on image data existing in the set frame.
【請求項2】 前記基準座標が、登録対象のほぼ中心位
置を指定するようにし、 前記基準座標からの所定方向のサーチを、前記基準座標
から上下及び左右方向に行い、 一方の境界が検出されず、反対方向の境界が検出されて
いる場合には、検出されなかった側は前記基準位置から
前記検出された反対方向の境界までの距離とほぼ等距離
の位置に境界が存在すると仮定し、 前記検出されまたは仮定された境界を前記枠を構成する
枠辺とするようにしたモデルパターン登録方法。
2. The reference coordinates specify substantially the center position of the registration target, and a search in a predetermined direction from the reference coordinates is performed in the vertical and horizontal directions from the reference coordinates, and one boundary is detected. However, when a boundary in the opposite direction is detected, it is assumed that the non-detected side has a boundary at a position substantially equal to the distance from the reference position to the detected boundary in the opposite direction, A model pattern registration method in which the detected or assumed boundary is set as a frame side forming the frame.
【請求項3】 前記境界が、前記差分画像に対して所定
のフィルタリング処理を行うことにより抽出されたエッ
ジ部分であり、 そのエッジ強度に基づいて前記境界を検出するようにし
た請求項1または2に記載のモデルパターン登録方法。
3. The boundary is an edge portion extracted by performing a predetermined filtering process on the difference image, and the boundary is detected based on the edge strength. The model pattern registration method described in.
【請求項4】 前記差分画像を構成する濃淡画像に対し
てその濃度または濃度差が所定の値以下になる部分を前
記境界と判定するようにした請求項1または2に記載の
モデルパターン登録方法。
4. The model pattern registration method according to claim 1 or 2, wherein the grayscale image forming the difference image is determined as the boundary at a portion where the density or the density difference is equal to or less than a predetermined value. .
【請求項5】 請求項1〜4のいずれかの方法により枠
を設定した後、その枠を前記表示装置上の所定位置に前
記画像と重畳して表示し、 再度画像中の所定地点の座標入力を受けた場合に、新た
に入力された座標が前記基準座標と同一箇所の場合に
は、前記設定した枠の大きさを変更する補正を行うよう
にした請求項1〜4のいずれか1項に記載のモデルパタ
ーン登録方法。
5. After setting a frame by the method according to any one of claims 1 to 4, the frame is displayed at a predetermined position on the display device so as to be superimposed on the image, and the coordinates of a predetermined point in the image are displayed again. 5. When receiving an input, if the newly input coordinate is at the same position as the reference coordinate, correction is performed to change the size of the set frame. The model pattern registration method described in the section.
【請求項6】 請求項1〜5のいずれかの方法により枠
を設定した後、その枠を前記表示装置上の所定位置に前
記画像と重畳して表示し、 再度画像中の所定地点の座標入力を受けた場合に、新た
に入力された座標が前記基準座標と異なる箇所の場合に
は、前記設定した枠を新たに入力された座標に基づいて
移動する補正を行うようにした請求項1〜5のいずれか
1項に記載のモデルパターン登録方法。
6. After setting a frame by the method according to any one of claims 1 to 5, the frame is displayed at a predetermined position on the display device so as to be superimposed on the image, and the coordinates of a predetermined point in the image are displayed again. 3. When receiving an input, if the newly input coordinates are different from the reference coordinates, correction is performed to move the set frame based on the newly input coordinates. 5. The model pattern registration method according to any one of items 5 to 5.
【請求項7】 登録対象を含む画像を表示する表示装置
と、 前記表示装置上の任意の地点の座標を入力する座標入力
手段と、 登録対象のエッジを抽出するエッジ抽出手段と、 前記座標入力手段により与えられる座標から所定方向に
サーチを行い、そのサーチ方向上での前記抽出されたエ
ッジ部分を検出し、そのエッジ部分に基づいてパターン
登録用の枠を設定する枠設定手段と、 前記枠設定手段により設定された枠内の画像データに基
づいてモデルパターンを生成するとともに記憶手段に登
録する手段を備えたモデルパターン登録装置。
7. A display device for displaying an image including a registration target, coordinate input means for inputting coordinates of an arbitrary point on the display device, edge extraction means for extracting an edge to be registered, and the coordinate input. A frame setting means for performing a search in a predetermined direction from coordinates given by the means, detecting the extracted edge portion in the search direction, and setting a frame for pattern registration based on the edge portion; A model pattern registration device comprising means for generating a model pattern on the basis of image data in a frame set by the setting means and for registering it in a storage means.
【請求項8】 登録対象を含む画像を表示する表示装置
と、 前記表示装置上の任意の地点の座標を入力する座標入力
手段と、 処理対象の前記画像と、その登録対象画存在しない或い
は異なる位置に存在する所定の比較画像との差分を求め
る差分画像生成手段と、 前記差分画像生成手段により生成された差分画像に基づ
いて前記座標入力手段により与えられる座標から所定方
向にサーチを行い、そのサーチ方向上での濃度或いは前
後の濃度差に基づいて前記対象物の境界を検出し、その
境界に基づいてパターン登録用の枠を設定する枠設定手
段と、 前記枠設定手段により設定された枠内の画像データに基
づいてモデルパターンを生成するとともに記憶手段に登
録する手段を備えたモデルパターン登録装置。
8. A display device for displaying an image including a registration target, coordinate input means for inputting coordinates of an arbitrary point on the display device, the image to be processed, and the registration target image not present or different from each other. A difference image generation unit that obtains a difference from a predetermined comparison image existing at a position, and a search is performed in a predetermined direction from the coordinates given by the coordinate input unit based on the difference image generated by the difference image generation unit. A frame setting unit that detects the boundary of the object based on the density in the search direction or the density difference before and after, and sets a frame for pattern registration based on the boundary, and a frame set by the frame setting unit. A model pattern registration device having means for generating a model pattern on the basis of image data in the inside and for registering it in a storage means.
【請求項9】 前記座標入力手段が、前記表示装置上に
装着されたタッチパネルである請求項7または8に記載
のモデルパターン登録装置。
9. The model pattern registration device according to claim 7, wherein the coordinate input means is a touch panel mounted on the display device.
【請求項10】 補正命令入力手段をさらに備え、 前記枠設定手段が、前記補正命令入力手段から与えられ
た補正命令信号に基づいて設定した枠の大きさまたは位
置の少なくとも一方を修正する補正機能を有するように
して請求項5〜9のいずれか1項に記載のモデルパター
ン登録装置。
10. A correction function further comprising a correction command input means, wherein the frame setting means corrects at least one of a size and a position of the frame set based on a correction command signal given from the correction command input means. The model pattern registration device according to claim 5, wherein the model pattern registration device includes:
JP6282451A 1994-10-24 1994-10-24 Method and device for registering model pattern Withdrawn JPH08123964A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6282451A JPH08123964A (en) 1994-10-24 1994-10-24 Method and device for registering model pattern

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6282451A JPH08123964A (en) 1994-10-24 1994-10-24 Method and device for registering model pattern

Publications (1)

Publication Number Publication Date
JPH08123964A true JPH08123964A (en) 1996-05-17

Family

ID=17652602

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6282451A Withdrawn JPH08123964A (en) 1994-10-24 1994-10-24 Method and device for registering model pattern

Country Status (1)

Country Link
JP (1) JPH08123964A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002175538A (en) * 2000-12-08 2002-06-21 Mitsubishi Electric Corp Device and method for portrait generation, recording medium with portrait generating program recorded thereon, terminal for communication, and communication method by terminal for communication

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002175538A (en) * 2000-12-08 2002-06-21 Mitsubishi Electric Corp Device and method for portrait generation, recording medium with portrait generating program recorded thereon, terminal for communication, and communication method by terminal for communication

Similar Documents

Publication Publication Date Title
US8331619B2 (en) Image processing apparatus and image processing method
JP3279479B2 (en) Video monitoring method and device
US8019164B2 (en) Apparatus, method and program product for matching with a template
JP4597391B2 (en) Facial region detection apparatus and method, and computer-readable recording medium
JP2000331158A (en) Facial image processor
WO2022237048A1 (en) Pose acquisition method and apparatus, and electronic device, storage medium and program
JP3382045B2 (en) Image projection system
CN112613123A (en) AR three-dimensional registration method and device for aircraft pipeline
JP4728795B2 (en) Person object determination apparatus and person object determination program
CN113673536B (en) Image color extraction method, system and medium
JP2002366963A (en) Method and device for processing image, imaging device and computer program
JPH04198741A (en) Shape defect detecting device
JP5217917B2 (en) Object detection and tracking device, object detection and tracking method, and object detection and tracking program
JPH08123964A (en) Method and device for registering model pattern
JP3638845B2 (en) Image processing apparatus and method
JP2846486B2 (en) Image input device
JPH1153539A (en) Circular pattern discriminating method and storage medium
JPH07168941A (en) Picture processor
JP2000082146A (en) Moving image processor
JPH02127393A (en) Object position detecting device
JPH08315149A (en) Intruding body recognition device
JP2000182056A (en) Picture processor
JPH0935058A (en) Image recognizing method
JPS63282889A (en) Image processing method
JPH0718810B2 (en) Pattern inspection method

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020115