JP4828265B2 - Image sensor - Google Patents

Image sensor Download PDF

Info

Publication number
JP4828265B2
JP4828265B2 JP2006067786A JP2006067786A JP4828265B2 JP 4828265 B2 JP4828265 B2 JP 4828265B2 JP 2006067786 A JP2006067786 A JP 2006067786A JP 2006067786 A JP2006067786 A JP 2006067786A JP 4828265 B2 JP4828265 B2 JP 4828265B2
Authority
JP
Japan
Prior art keywords
edge
image
intruder
background object
difference area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2006067786A
Other languages
Japanese (ja)
Other versions
JP2007249270A (en
Inventor
千尋 佐藤
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.)
Secom Co Ltd
Original Assignee
Secom Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Secom Co Ltd filed Critical Secom Co Ltd
Priority to JP2006067786A priority Critical patent/JP4828265B2/en
Publication of JP2007249270A publication Critical patent/JP2007249270A/en
Application granted granted Critical
Publication of JP4828265B2 publication Critical patent/JP4828265B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Alarm Systems (AREA)
  • Closed-Circuit Television Systems (AREA)
  • Burglar Alarm Systems (AREA)

Description

本発明は、監視空間を所定時間間隔で順次撮像して得た複数の監視画像を画像処理することにより、草木等の動背景物を検出できる画像センサに関するものである。   The present invention relates to an image sensor that can detect a moving background object such as a plant by performing image processing on a plurality of monitoring images obtained by sequentially imaging a monitoring space at predetermined time intervals.

近年、セキュリティシステムにおいて、カメラ等の撮像装置によって撮像された監視画像を画像処理して侵入者等を検出する画像センサが数多く提供されている。このような画像センサでは、基準となる背景画像を記憶しておき、時々刻々と撮像される監視画像と背景画像との差分処理を行って差分領域を抽出し、この差分領域に基づいて侵入者を検出している。   In recent years, many image sensors that detect intruders or the like by processing a monitoring image captured by an imaging device such as a camera in a security system have been provided. In such an image sensor, a background image as a reference is stored, and a difference area is extracted between the monitoring image captured every moment and the background image, and an intruder is extracted based on the difference area. Is detected.

このような画像センサにおいては、草木やのぼり等の背景物が風により揺れた場合等にも侵入者が現れた場合と同様に差分領域が抽出される。そのため、画像センサは、背景物の動きを誤検出せずに侵入者のみを確実に検出することが必要とされる。   In such an image sensor, a difference area is extracted in the same manner as when an intruder appears even when a background object such as a plant or a stream is shaken by the wind. Therefore, the image sensor is required to reliably detect only the intruder without erroneously detecting the movement of the background object.

特許文献1には、監視画像を構成する各画素中の最大輝度値と最小輝度値に基づいて侵入物体の検出を行わないマスク領域を設定することが記載されている。
特許文献2には、差分領域における背景画像のエッジと監視画像のエッジとの類似度を算出し、算出した類似度に基づいて侵入者を検出することが記載されている。特許文献2に記載の発明においては、外乱により生じた差分領域においては高い類似度が算出され、侵入者により生じた差分領域においては低い類似度が算出されることを利用している。
特開2002−279429 特開2001−243475
Japanese Patent Application Laid-Open No. H10-228688 describes setting a mask region in which an intruding object is not detected based on the maximum luminance value and the minimum luminance value in each pixel constituting the monitoring image.
Patent Document 2 describes that the similarity between the edge of the background image and the edge of the monitoring image in the difference area is calculated, and an intruder is detected based on the calculated similarity. In the invention described in Patent Document 2, a high similarity is calculated in a difference area caused by a disturbance, and a low similarity is calculated in a difference area caused by an intruder.
JP2002-279429 JP2001-243475

しかしながら、特許文献1に記載の発明においては、動く背景物に係る画素の位置がマスク領域に設定されてしまうため、侵入者と動く背景物が監視画像上で重なる場合には侵入者の検出もれを生じるおそれがある。そのため、検出もれが生じないように画像センサの設置位置を選ぶ必要がある。   However, in the invention described in Patent Document 1, since the position of the pixel related to the moving background object is set in the mask area, the intruder can be detected when the moving object overlaps the intruder on the monitoring image. There is a risk of this. Therefore, it is necessary to select an installation position of the image sensor so that no detection leak occurs.

また、動く背景物においては、そのエッジ位置が変動するために特許文献2に記載の発明の類似度は低く算出されてしまい、動く背景物を侵入者として誤検出してしまう。   In addition, since the edge position of a moving background object varies, the similarity of the invention described in Patent Document 2 is calculated to be low, and the moving background object is erroneously detected as an intruder.

本発明は、上記問題に鑑みてなされたものであり、監視空間を撮像して得た監視画像を画像処理することにより監視空間に存在する動背景物を的確に検出できる画像センサと、この検出結果により動背景物の影響を排除して高精度に侵入者を検出できる画像センサの実現を目的とする。   The present invention has been made in view of the above problems, and an image sensor capable of accurately detecting a moving background object existing in the monitoring space by performing image processing on the monitoring image obtained by imaging the monitoring space, and this detection The purpose is to realize an image sensor that can detect an intruder with high accuracy by eliminating the influence of moving background objects.

請求項1に記載された画像センサは、
監視空間を撮像した監視画像を順次取得し、前記監視空間に存在する動背景物を、前記監視画像上の特定の画素においてエッジの出現と消滅が繰り返される現象から検出する画像センサであって、
前記監視画像の各位置におけるエッジの有無を検出しエッジ位置を記憶するエッジ検出手段と、
過去の第一の所定時間内に前記エッジ検出手段が検出したエッジの有無が第一の所定回数である3回以上変動したエッジ変動位置を検出するエッジ変動位置検出手段と、
前記監視画像と予め記憶した背景画像との差分領域を抽出する差分領域抽出手段と、
前記差分領域内における前記エッジ位置と前記エッジ変動位置の一致度を算出するエッジ一致度算出手段と、
前記一致度が所定値以上である前記差分領域を動背景物として検出する動背景物検出手段と、
を具備することを特徴としている。
The image sensor according to claim 1 comprises:
Sequentially acquires the monitor image of the captured monitoring space, the pre-Symbol dynamic background object present in the monitoring space, an image sensor for detecting the phenomenon that the disappearance in a particular pixel on the monitoring image and the appearance of the edges is repeated ,
Edge detection means for detecting the presence or absence of an edge at each position of the monitoring image and storing the edge position;
Edge fluctuation position detection means for detecting an edge fluctuation position that has changed three or more times , the presence or absence of the edge detected by the edge detection means within the first predetermined time in the past being a first predetermined number of times ;
A difference area extracting means for extracting a difference area between the monitoring image and the background image stored in advance;
An edge matching degree calculating means for calculating a matching degree between the edge position and the edge fluctuation position in the difference region;
A moving background object detecting means for detecting the difference region having the matching degree equal to or greater than a predetermined value as a moving background object;
It is characterized by comprising.

請求項2に記載された画像センサは、請求項1に記載の画像センサにおいて、
前記第一の所定時間以上の長さを有する過去の第二の所定時間内に前記エッジ検出手段がエッジを検出しなかった回数が第二の所定回数以上である位置を前記エッジ変動位置から除外するエッジ変動位置補正手段を具備している。
The image sensor according to claim 2 is the image sensor according to claim 1,
Positions where the number of times the edge detection means did not detect an edge within the second predetermined time in the past having a length equal to or longer than the first predetermined time are excluded from the edge fluctuation position. Edge fluctuation position correcting means for performing

請求項3に記載された画像センサは、請求項1又は2に記載の画像センサにおいて、
前記第一の所定時間を含む第三の所定時間内に前記エッジ検出手段がエッジを検出した回数が第三の所定回数以上であるエッジ定在位置を検出し、エッジ定在位置に隣接する位置を前記エッジ変動位置から除外するエッジ変動位置補正手段を具備している。
The image sensor according to claim 3 is the image sensor according to claim 1 or 2,
A position adjacent to the edge standing position by detecting an edge standing position where the number of times the edge detecting means detects an edge within a third predetermined time including the first predetermined time is equal to or more than a third predetermined number of times. Is provided with an edge fluctuation position correcting means for excluding from the edge fluctuation position.

請求項4に記載された画像センサは、請求項1乃至3のいずれかひとつに記載の画像センサにおいて、
前記差分領域における前記監視画像から侵入者の特徴量を抽出し、該特徴量が所定基準を超えると侵入者を検出する侵入者検出手段を具備し、
前記侵入者検出手段は、動背景物検出手段が動背景物を検出したときに前記所定基準を高く変更する。
The image sensor according to claim 4 is the image sensor according to any one of claims 1 to 3,
Intruder detection means for extracting an intruder feature amount from the monitoring image in the difference area and detecting the intruder when the feature amount exceeds a predetermined reference,
The intruder detection unit changes the predetermined criterion to be high when the moving background object detection unit detects the moving background object.

請求項5に記載された画像センサは、請求項1乃至3のいずれかひとつに記載の画像センサにおいて、
前記動背景物検出手段が動背景物を検出しなかった前記差分領域において前記監視画像から侵入者の特徴量を抽出し、該特徴量が所定基準を超えると侵入者を検出する侵入者検出手段を具備している。
The image sensor according to claim 5 is the image sensor according to any one of claims 1 to 3,
Intruder detection means for extracting an intruder feature amount from the monitoring image in the difference area where the moving background object detection means did not detect a moving background object, and detecting the intruder when the feature amount exceeds a predetermined reference It has.

請求項1に記載された画像センサによれば、過去のエッジ変動位置と現在のエッジ位置との一致度が高い場合に、差分領域を草木の揺れ、文字や記号等が記載されたのぼりや旗、理容店のサインポール、電光掲示板の発光掲示物等の動背景物により生じるものと判断し、侵入者により生じる差分領域と区別するので、当該動背景物を的確に検出することができる。   According to the image sensor described in claim 1, when the degree of coincidence between the past edge fluctuation position and the current edge position is high, the difference area is defined as a banner or flag in which characters, symbols, and the like are described. Since it is determined that it is caused by a moving background such as a sign pole of a barber shop or a light-emitting bulletin board of an electric bulletin board, it is distinguished from a difference area caused by an intruder, so that the moving background can be accurately detected.

請求項2に記載された画像センサによれば、請求項1に記載の画像センサによる効果に加え、さらに、監視画像中で過去長時間に亘り無エッジであった位置をエッジ変動位置から除外できるので、侵入者等の移動物体により一時的に生じた可能性のあるエッジ変動に基づきエッジ変動位置を検出した誤りを的確に補正することができる。   According to the image sensor described in claim 2, in addition to the effect of the image sensor according to claim 1, it is possible to exclude a position that has been edgeless for a long time in the monitoring image from the edge variation position. Therefore, it is possible to accurately correct an error in which the edge fluctuation position is detected based on edge fluctuation that may be temporarily caused by a moving object such as an intruder.

請求項3に記載された画像センサによれば、請求項1又は2に記載の画像センサによる効果に加え、さらに、定常的にエッジが存在する定在エッジ位置に隣接する位置をエッジ変動位置から除外することができるので、日照等の環境条件の変動により静止物体のエッジの一部が変動してエッジ変動位置を誤検出しても、この誤りを的確に補正することができる。   According to the image sensor described in claim 3, in addition to the effect of the image sensor according to claim 1 or 2, the position adjacent to the stationary edge position where the edge is constantly present is detected from the edge fluctuation position. Since it can be excluded, even if a part of the edge of the stationary object fluctuates due to fluctuations in environmental conditions such as sunlight and the edge fluctuation position is erroneously detected, this error can be corrected accurately.

請求項4に記載された画像センサによれば、請求項1乃至3に記載の画像センサによる効果に加え、さらに、差分領域における監視画像から抽出される侵入者の特徴量の比較対象である所定基準を、動背景物を検出した場合には高く変更することとしたので、動背景物を侵入者として検出する誤りが減少し、高精度に侵入者を検出することができる。すなわち、差分領域に動背景物が有る場合には、例えば検出されたエッジ位置とエッジ変動位置との一致度に応じた所定基準を用いる(一致度が高くなるほど所定基準を高くする)等により、この効果を達成することができる。   According to the image sensor described in claim 4, in addition to the effects of the image sensor according to claims 1 to 3, the predetermined value which is a comparison target of the feature amount of the intruder extracted from the monitoring image in the difference region is further provided. Since the reference is changed to be higher when a moving background object is detected, errors in detecting the moving background object as an intruder are reduced, and the intruder can be detected with high accuracy. That is, when there is a moving background object in the difference area, for example, by using a predetermined reference according to the degree of coincidence between the detected edge position and the edge fluctuation position (the higher the degree of coincidence, the higher the predetermined reference), etc. This effect can be achieved.

請求項5に記載された画像センサによれば、請求項1乃至3に記載の画像センサによる効果に加え、さらに、差分領域に動背景物を検出した場合には侵入者の検出はせず、差分領域に動背景物を検出しなかった場合には当該差分領域における監視画像から侵入者の特徴量を抽出し、該特徴量が所定基準を超えると侵入者を検出するので、動背景物が検出された差分領域について侵入者は検出されなくなり、比較的簡易なデータ処理により動背景物を誤って侵入者として検出する不都合を回避できる。   According to the image sensor described in claim 5, in addition to the effect of the image sensor according to claims 1 to 3, in addition, when a moving background object is detected in the difference area, no intruder is detected, When a moving background object is not detected in the difference area, the feature amount of the intruder is extracted from the monitoring image in the difference area, and the intruder is detected when the feature amount exceeds a predetermined reference. An intruder is not detected for the detected difference area, and the inconvenience of erroneously detecting a moving background object as an intruder can be avoided by relatively simple data processing.

1.本発明の概要
まず、本発明の実施形態に係る画像センサの全体構成を簡単に説明する。
本例の画像センサは、カメラ等の撮像手段により監視空間を時間的に適当な間隔をおいて撮像することにより複数の監視画像を順次取得し、これら監視画像を以下に説明するような手法で画像処理することにより、監視空間に存在する動背景物を侵入者等と区別して検出する機能を備えた画像センサである。
1. First, an overall configuration of an image sensor according to an embodiment of the present invention will be briefly described.
The image sensor of the present example sequentially acquires a plurality of monitoring images by imaging the monitoring space at an appropriate time interval by an imaging means such as a camera, and these monitoring images are obtained by a method described below. This is an image sensor having a function of detecting a moving background object existing in a monitoring space by distinguishing it from an intruder or the like by performing image processing.

なお、ここで本画像センサが検出しようとする動背景物とは、監視画像中に現れる草木の揺れ、文字や記号等が記載された動くのぼりや旗、理容店の回転するサインポール、電光掲示板の移動する発光掲示物等のように、背景画像中に存在し動きを伴う物体であって比較的多くのエッジ(輪郭、境界等)が検出される物体を意味する。また、侵入者とは、背景画像中には存在しないが、時として監視画像中に入ってくる物体(人、動物、物その他を含む)を意味する。   Here, the moving background object to be detected by the image sensor is the movement of the vegetation that appears in the surveillance image, the moving banner or flag on which characters or symbols are written, the rotating sign pole of the barber shop, the electric bulletin board This means an object that is present in the background image and has a motion, and a relatively large number of edges (contours, boundaries, etc.) are detected, such as a moving light-emitting display. An intruder means an object (including a person, an animal, an object, etc.) that does not exist in the background image but sometimes enters the monitoring image.

本例の画像センサは、監視画像の各位置(各画素)におけるエッジの有無を順次検出して記憶し、過去の一定の時間内に検出されたエッジの有無が繰り返し変動していた場合に、その位置をエッジ変動位置として検出する。そして、監視画像と予め記憶した背景画像との差分領域を差分領域抽出手段により抽出し、この差分領域内において、新たに検出されたエッジの位置と前記エッジ変動位置との一致度を算出し、これが所定値以上である場合、すなわち検出されたエッジの多くがエッジ変動の繰り返しにより出現したものであるということが過去のデータから判断される場合に、前記差分領域内の当該位置に動背景物があるものと判断し、侵入者と区別する。   The image sensor of this example sequentially detects and stores the presence / absence of an edge at each position (each pixel) of the monitoring image, and when the presence / absence of an edge detected within a certain past time has repeatedly fluctuated, That position is detected as an edge fluctuation position. Then, a difference area between the monitoring image and the background image stored in advance is extracted by the difference area extraction unit, and in this difference area, the degree of coincidence between the position of the newly detected edge and the edge fluctuation position is calculated, When this is equal to or greater than a predetermined value, that is, when it is determined from past data that many of the detected edges appear due to repeated edge fluctuations, a moving background object at the position in the difference area It is determined that there is an intruder and is distinguished

2.実施形態の構成
以下に、本例の画像センサの実施形態(本例)の構成について図面を参照して詳細に説明する。
図1は、本例の画像センサの構成を示す機能ブロック図、図2は本例の画像センサの基本動作の全体を示す流れ図、図3は前記基本動作におけるエッジ変動位置検出処理を示す流れ図、図4は前記基本動作におけるエッジ変動位置補正処理を示す流れ図、図5は前記基本動作におけるエッジ一致度算出処理を示す流れ図、図6〜図8は前記エッジ変動位置検出処理の一例の説明図、図8〜図11は前記エッジ変動位置補正処理の一例の説明図、図12及び図13は前記エッジ変動位置補正処理の他の一例の説明図である。
2. Configuration of Embodiment Hereinafter, a configuration of an embodiment (this example) of an image sensor of this example will be described in detail with reference to the drawings.
FIG. 1 is a functional block diagram showing the configuration of the image sensor of this example, FIG. 2 is a flowchart showing the entire basic operation of the image sensor of this example, and FIG. 3 is a flowchart showing edge variation position detection processing in the basic operation. FIG. 4 is a flowchart showing edge variation position correction processing in the basic operation, FIG. 5 is a flowchart showing edge matching degree calculation processing in the basic operation, and FIGS. 6 to 8 are explanatory diagrams of examples of the edge variation position detection processing. 8 to 11 are explanatory diagrams of an example of the edge variation position correction process, and FIGS. 12 and 13 are explanatory diagrams of another example of the edge variation position correction process.

(1)構成(図1)
本例の画像センサの構成及び機能を図1を参照して説明する。
[撮像部1]
本例の撮像部1は、CCD、C−MOS等の撮像素子を有するカメラ装置及びLED等の照明装置を有しており、後述する画像取得部2に接続され、監視空間を撮像して少なくとも輝度値を含む画素値のデータ系列であるとともに画像平面上の画素の位置をデータの並び順として保持する画像データを生成し、この画像データを電気信号として画像取得部2に出力する。
(1) Configuration (Fig. 1)
The configuration and function of the image sensor of this example will be described with reference to FIG.
[Imaging unit 1]
The imaging unit 1 of the present example includes a camera device having an imaging element such as a CCD and a C-MOS and an illumination device such as an LED, and is connected to an image acquisition unit 2 to be described later and images at least a monitoring space. Image data that is a data series of pixel values including luminance values and holds the positions of the pixels on the image plane as the arrangement order of the data is generated, and the image data is output to the image acquisition unit 2 as an electrical signal.

撮像部1は、少なくとも侵入者の検出を行う一連の動作期間中は、動かずに同一の監視空間を撮像する必要があるが、必ずしも常に一定の配置・向きに固定されるべきものではなく、必要に応じて異なる監視空間を撮像できるように構成してもよい。   The imaging unit 1 needs to image the same monitoring space without moving at least during a series of operation periods in which an intruder is detected. However, the imaging unit 1 should not always be fixed in a fixed arrangement and orientation. You may comprise so that a different monitoring space can be imaged as needed.

なお本明細書では、撮像部1が出力する画像データを監視画像と呼ぶ。また、本明細書では、必要に応じ位置を座標(x,y)と表記し、画素値を例えば輝度値I(x,y)などというようにxとyの関数で表す。   In the present specification, the image data output by the imaging unit 1 is referred to as a monitoring image. In this specification, the position is expressed as coordinates (x, y) as necessary, and the pixel value is expressed by a function of x and y, such as a luminance value I (x, y).

撮像部1による監視画像の撮像及び出力は、予め設定した一定の時間間隔(定められた時間の一定の長さの単位を示し本例では例えば0.2秒)にて行われる。つまり、撮像部1は0.2秒置きの一定時間間隔で、各時刻ごとに瞬間的な動作で監視領域を撮像する。本明細書では、この時間間隔を区切る各瞬間を時刻tの表記にて表すとともに、時間軸上に存在する特定の前記時間間隔を示すために当該時間間隔を区切る前記時刻の一方の時刻をもって当該時間間隔を示すこともあるものとする。   Imaging and output of the monitoring image by the imaging unit 1 are performed at a preset constant time interval (indicating a unit of a fixed length of a predetermined time, for example, 0.2 seconds in this example). That is, the imaging unit 1 captures the monitoring area with a momentary operation at each time interval at a constant time interval of 0.2 seconds. In the present specification, each moment that delimits this time interval is represented by the notation of time t, and in order to indicate a specific time interval existing on the time axis, one time of the time that delimits the time interval is used. It may also indicate a time interval.

[画像取得部2]
前記画像取得部2は、前記撮像部1及び後述する制御部3に対して監視画像を入出力するインターフェース回路である。すなわち、画像取得部2は、撮像部1と制御部3とに接続され、撮像部1が出力する監視画像を順次入力して制御部3へ出力する。
[Image acquisition unit 2]
The image acquisition unit 2 is an interface circuit that inputs and outputs a monitoring image to the imaging unit 1 and a control unit 3 described later. That is, the image acquisition unit 2 is connected to the imaging unit 1 and the control unit 3, and sequentially inputs the monitoring images output by the imaging unit 1 and outputs them to the control unit 3.

[記憶部4]
記憶部4は、制御部3に接続されており、ROM、RAM等の半導体メモリ、HDD等の磁気ディスク、CD−ROM、DVD−RAM等の光ディスクドライブ及びその他のあらゆる記憶媒体により構成可能である。記憶部4は、監視画像を画像処理して侵入者を検出するプログラム、本装置の各部を制御するプログラム、予め設定されたデータ、プログラム実行時に生成される背景画像、エッジ画像等の各種データを記憶し、これらのプログラム、データは必要に応じて制御部3により読み出されたり書き込まれたりする。
[Storage unit 4]
The storage unit 4 is connected to the control unit 3 and can be configured by a semiconductor memory such as ROM and RAM, a magnetic disk such as HDD, an optical disk drive such as CD-ROM and DVD-RAM, and any other storage medium. . The storage unit 4 stores various data such as a program for detecting an intruder by performing image processing on a monitoring image, a program for controlling each unit of the apparatus, preset data, a background image generated when the program is executed, and an edge image. These programs and data are stored and read or written by the control unit 3 as necessary.

[制御部3]
前記制御部3は、DSP、マイコン、LSI等のCPU、数値演算プロセッサ等の演算装置によって構成でき、画像取得部2と出力部5と記憶部4とに接続される。制御部3は、画像取得部2が出力する監視画像のデータが入力されるとともに記憶部4からプログラムを読み出し、これらのプログラムに従って該監視画像を画像処理して監視空間に存在する侵入者を検出し、検出結果を出力部5へ出力する。また、画像処理を行う際に必要に応じて記憶部4からデータを読み出したり、記憶部4へデータを書き込んだりする。
[Control unit 3]
The control unit 3 can be constituted by a calculation device such as a CPU such as a DSP, a microcomputer, an LSI, or a numerical calculation processor, and is connected to the image acquisition unit 2, the output unit 5, and the storage unit 4. The control unit 3 receives monitoring image data output from the image acquisition unit 2 and reads out a program from the storage unit 4 and performs image processing on the monitoring image according to these programs to detect an intruder existing in the monitoring space. The detection result is output to the output unit 5. Further, when performing image processing, data is read from the storage unit 4 or written to the storage unit 4 as necessary.

[出力部5]
出力部5は、侵入者の検出結果を外部へ出力するインターフェース回路であり、入力側には制御部3に接続されて検出結果を表す電気信号が入力され、出力側は警備システムのコントローラ等の外部装置に接続されて当該外部装置に電気信号を出力する。例えば、検出結果が侵入者を検出したことを表すものであった場合、その旨を表す電気信号を外部装置へ伝送する。出力部5はブザーやLED等の報知手段を備えても良く、検出結果が侵入者を検出したことを表すものであると、これらの報知手段に通電してブザーを鳴動させたりLEDを点灯させたりして周囲の者の注意を喚起することができる。
[Output unit 5]
The output unit 5 is an interface circuit that outputs the detection result of the intruder to the outside. The input side is connected to the control unit 3 and an electric signal representing the detection result is input. The output side is a controller of a security system or the like. It is connected to an external device and outputs an electrical signal to the external device. For example, if the detection result indicates that an intruder has been detected, an electrical signal indicating that fact is transmitted to the external device. The output unit 5 may be provided with notification means such as a buzzer or LED. If the detection result indicates that an intruder has been detected, the notification means is energized to sound the buzzer or turn on the LED. To alert the people around you.

以下に説明する差分領域抽出手段6、エッジ検出手段7、エッジ変動位置検出手段8、エッジ変動位置補正手段9、エッジ一致度算出手段10、動背景物検出手段11及び侵入者検出手段12は、図1に示すようにそれぞれ制御部3を構成する機能ブロックとして表されており、ハードウェアで構成することもできるが、本例では制御部3を構成するLSI等のCPUに格納されて機能する画像処理のプログラムとして構成されている。   Difference area extraction means 6, edge detection means 7, edge fluctuation position detection means 8, edge fluctuation position correction means 9, edge matching degree calculation means 10, moving background object detection means 11 and intruder detection means 12 described below are: As shown in FIG. 1, each block is represented as a functional block constituting the control unit 3 and can be constituted by hardware, but in this example, it is stored in a CPU such as an LSI constituting the control unit 3 and functions. It is configured as an image processing program.

[差分領域抽出手段6]
差分領域抽出手段6は、画像センサの起動直後、画像取得部2によって取得された監視画像を背景画像として記憶部4に記憶する。この背景画像は、以降に取得する監視画像から時々刻々と変化する差分領域を抽出する差分処理を行うための基準の画像となることから、この起動直後に行われる背景画像の記憶乃至後述する更新を、記憶部4における背景画像の初期化と呼ぶ。なお、この背景画像は、必ずしも起動直後に取得されたものを永続的に使用するものではなく、本例では取得された監視画像を用いて記憶部4に記憶された背景画像を適宜更新するものとする。
[Difference area extraction means 6]
The difference area extraction unit 6 stores the monitoring image acquired by the image acquisition unit 2 in the storage unit 4 as a background image immediately after activation of the image sensor. Since this background image is a reference image for performing a difference process for extracting a difference area that changes from moment to moment from a monitoring image acquired thereafter, storage of the background image performed immediately after the activation or update described later Is called initialization of the background image in the storage unit 4. Note that this background image does not always use what was acquired immediately after startup, and in this example, the background image stored in the storage unit 4 is appropriately updated using the acquired monitoring image. And

差分領域抽出手段6は、背景画像を初期化した後に、画像取得部2によって新たに取得された監視画像と記憶部4に記憶した背景画像との差分処理を行って差分領域を抽出する。抽出した差分領域には、侵入者等の背景画像に存在しない移動物体による差分領域の他に、草木等の背景画像に存在する動物体(動背景物)による差分領域が含まれる。   After the background image is initialized, the difference area extraction unit 6 performs a difference process between the monitoring image newly acquired by the image acquisition unit 2 and the background image stored in the storage unit 4 to extract the difference area. The extracted difference area includes a difference area due to a moving object (moving background object) existing in a background image such as a plant, in addition to a difference area due to a moving object that does not exist in the background image such as an intruder.

抽出した差分領域に関する情報は、差分領域抽出手段6から、エッジ一致度算出手段10及び侵入者検出手段12へ出力される。   Information regarding the extracted difference area is output from the difference area extraction means 6 to the edge coincidence calculation means 10 and the intruder detection means 12.

[エッジ検出手段7]
エッジ検出手段7は、監視画像の各画素位置におけるエッジの有無を検出する。その検出結果は、エッジを検出した位置の画素値を1、エッジを検出しなかった位置の画素値を0としたエッジ画像としてエッジ検出手段7が保持する。
[Edge detection means 7]
The edge detection means 7 detects the presence or absence of an edge at each pixel position of the monitoring image. The detection result is held by the edge detection means 7 as an edge image in which the pixel value at the position where the edge is detected is 1 and the pixel value at the position where the edge is not detected is 0.

エッジは、監視画像中の個々の物体の輪郭、又は材質や色彩の違い、陰影により現れる境界などであり、画像内で輝度値が大きく変化している位置に略線状に検出される。例えば、木の画像においては葉、枝等の輪郭、侵入者の画像においてはその輪郭、髪と顔といった部位の境界、衣服等の着用物の境界、着用物の模様等の位置にエッジが検出される。   An edge is an outline of an individual object in a monitoring image, a difference in material or color, a boundary that appears due to a shadow, or the like, and is detected in a substantially linear shape at a position where a luminance value greatly changes in the image. For example, edges are detected in the contours of leaves and branches in the image of a tree, the contours in the image of an intruder, the boundary of parts such as hair and face, the boundary of clothing such as clothing, and the pattern of the clothing. Is done.

エッジ画像はエッジ検出手段7からエッジ一致度算出手段10へ出力され、また過去のエッジ画像として記憶部4へ書き込まれる。   The edge image is output from the edge detection means 7 to the edge coincidence calculation means 10 and is written in the storage unit 4 as a past edge image.

[エッジ変動位置検出手段8]
エッジ変動位置検出手段8は、過去の第一の所定時間内にエッジ検出手段7が生成したエッジ画像を記憶部4から読み出し、これらのエッジ画像を生成された時刻の順に比較して画素位置ごとにエッジの有無が変動した回数を計数し、計数した回数が第一の所定回数以上である画素位置をエッジ変動位置として検出する。その検出結果は、エッジ変動位置の画素値を1、それ以外の位置の画素値を0とした動背景物画像としてエッジ変動位置検出手段8が保持するとともに、エッジ変動位置検出手段8からエッジ変動位置補正手段9へ出力される。
[Edge fluctuation position detecting means 8]
The edge variation position detection means 8 reads out the edge images generated by the edge detection means 7 within the first predetermined time in the past from the storage unit 4 and compares these edge images in the order of the generation times for each pixel position. The number of times that the presence or absence of the edge fluctuates is counted, and a pixel position where the counted number is equal to or more than the first predetermined number is detected as an edge fluctuation position. The detection result is held by the edge fluctuation position detection unit 8 as a moving background object image in which the pixel value at the edge fluctuation position is 1 and the pixel value at other positions is 0. It is output to the position correction means 9.

揺れる木においては複数の葉や枝が往復運動を繰り返すので、画像上で定点観測すると(すなわち画像上の特定の画素を対象としてエッジの検出を行うと)、葉や枝のエッジが出現と消滅を繰り返すこととなる。エッジ変動位置検出手段8はこのような物理現象を検出するものであり、動背景物のエッジが現時刻において出現する位置を予測する側面を持つ。本例ではエッジが出現した(無→有)回数と消滅した(有→無)回数との合計を計数する。なお、エッジの出現と消滅は対で生じるので、いずれか一方のみを計数しても良い。   In a swaying tree, multiple leaves and branches repeat reciprocating motion, so if you observe a fixed point on the image (that is, if you detect an edge for a specific pixel on the image), the edges of the leaves and branches appear and disappear Will be repeated. The edge fluctuation position detection means 8 detects such a physical phenomenon and has a side surface for predicting the position where the edge of the moving background object appears at the current time. In this example, the total of the number of times an edge has appeared (no → present) and the number of disappearance (present → no) is counted. Since the appearance and disappearance of edges occur in pairs, only one of them may be counted.

侵入者の移動によるエッジ変動の回数は典型的には2回であるから、これを排除して動背景物によるエッジ変動の繰り返しを検出できるように第一の所定回数は3以上に設定することが好適である。本実施例では、動背景物によるエッジ変動を最も早く検出するために第一の所定回数を3回とした。   Since the number of edge fluctuations due to the movement of an intruder is typically two, the first predetermined number should be set to 3 or more so that this can be eliminated and repeated edge fluctuations due to moving objects can be detected. Is preferred. In this embodiment, the first predetermined number of times is set to three in order to detect the edge fluctuation due to the moving background the earliest.

また本実施例では、第一の所定時間を8時刻前から1時刻前まで、すなわち1.8秒前から0.2秒前までの時間とし、この時間内に生成された8枚のエッジ画像のある画素においてエッジの有無の変動が3回認められた場合に、当該画素の位置をエッジ変動位置として認定し、検出する。   Further, in this embodiment, the first predetermined time is set to a time from 8 hours before to 1 hour, that is, from 1.8 seconds to 0.2 seconds before, and eight edge images generated within this time. When a change in presence or absence of an edge is recognized three times in a certain pixel, the position of the pixel is recognized as an edge change position and detected.

なお、本例では上記時間間隔の最小単位が0.2秒と設定されていたが、実際の設定がこれと異なれば、上述した8枚の画像から3回以上必要とされたエッジ変動位置の認定に必要な画像の枚数及びエッジ変動と認められる回数は、これとは異なることもありうる。すなわち、いかなる時間間隔で取得された何枚のエッジ画像から何回のエッジ変動が認められれば当該画素をエッジ変動位置と認めるべきかは、例えば監視画像内で監視可能な侵入者の画像の大きさの最小値や、監視画像を構成する画素の大きさ、また予想される侵入者の移動速度等に応じて、経験則を踏まえて最適な検出が行われるように設定すべきものである。   In this example, the minimum unit of the time interval is set to 0.2 seconds. However, if the actual setting is different from this, the edge variation position required three times or more from the eight images described above is used. The number of images necessary for recognition and the number of times recognized as edge fluctuations may be different. That is, how many edge fluctuations are recognized from how many edge images acquired at what time interval, and whether or not the pixel should be recognized as an edge fluctuation position is, for example, the size of an intruder image that can be monitored in the monitoring image In accordance with the minimum value, the size of the pixels constituting the monitoring image, the expected movement speed of the intruder, and the like, it should be set so that optimum detection is performed based on empirical rules.

従って本例における0.2秒前までという設定も一例であり、数秒程度の遅れがあっても良いし、1.6秒という設定も一例に過ぎない。但し、動背景物のエッジが出現と消滅を繰り返す状況が観察可能であることが必要なので、下限は3つの時間間隔に相当する時間であることが必要である。また、第一の所定時間が長すぎ、より多い枚数のエッジ画像の中からエッジ変動の存在をカウントすることとなると、エッジ変動を認めるべき最小の回数が変わらない限り、当該画素がエッジ変動位置と認められる可能性は高くなり、従って隣接する画素がいずれもエッジ変動位置と認められてしまうため、得られる動背景物画像は、エッジが移動した範囲がべた状に塗り潰されたような状態となり、エッジの位置が画像平面上で離散的に分布する性質が失われてしまう。このため上限は数秒程度とすることが好ましい。   Accordingly, the setting up to 0.2 seconds before in this example is an example, and there may be a delay of about several seconds, and the setting of 1.6 seconds is just an example. However, since it is necessary to be able to observe the situation where the edge of the moving background object repeatedly appears and disappears, the lower limit needs to be a time corresponding to three time intervals. In addition, when the first predetermined time is too long and the presence of edge fluctuation is counted from a larger number of edge images, the pixel is positioned at the edge fluctuation position as long as the minimum number of times that edge fluctuation should be recognized does not change. Therefore, since all adjacent pixels are recognized as edge fluctuation positions, the obtained moving background object image is in a state where the range in which the edge has moved is filled in a solid shape. The property that the edge positions are discretely distributed on the image plane is lost. For this reason, the upper limit is preferably about several seconds.

[エッジ変動位置補正手段9]
<無エッジ情報に基づく補正>
エッジ変動位置補正手段9は、エッジ変動位置検出手段8から動背景物画像を入力するとともに、第二の所定時間内にエッジ検出手段7が生成したエッジ画像を記憶部4から読み出し、これらのエッジ画像の各画素位置においてエッジが検出されなかった回数を計数し、この回数が第二の所定回数以上である画素位置には動背景物によるエッジ変動がなかったものとして、動背景物画像における当該画素位置の画素値を0とする。
[Edge fluctuation position correcting means 9]
<Correction based on edgeless information>
The edge fluctuation position correction means 9 receives the moving background object image from the edge fluctuation position detection means 8 and reads out the edge image generated by the edge detection means 7 within the second predetermined time from the storage unit 4 and outputs these edges. Count the number of times that an edge was not detected at each pixel position of the image, and assume that there was no edge fluctuation due to the moving background object at the pixel position where this number is the second predetermined number or more. The pixel value at the pixel position is set to 0.

この処理は、侵入者等の移動物体により一時的に生じたエッジ変動をエッジ変動位置検出手段8が検出した誤りを、過去の長い間エッジが検出されなかったという実績を根拠に補正するものである。   This process corrects an error detected by the edge fluctuation position detecting means 8 for edge fluctuation temporarily caused by a moving object such as an intruder based on the fact that the edge has not been detected for a long time. is there.

そのため、第二の所定時間は、第一の所定時間より過去の時間を含み、また、第一の所定時間と同じかより長い時間として設定することが好適である。より具体的には、第一の所定時間の始点時刻を終点時刻とし、第一の所定時間と同等以上の長さを有する第二の所定時間でもよいし、第一の所定時間の終点時刻を終点時刻とし、第一の所定時間を含む過去の時間帯であって、第一の所定時間よりも長い第二の所定時間でもよい。   Therefore, it is preferable that the second predetermined time includes a past time than the first predetermined time, and is set as a time equal to or longer than the first predetermined time. More specifically, the start time of the first predetermined time is set as the end time, the second predetermined time having a length equal to or longer than the first predetermined time may be used, or the end time of the first predetermined time may be set as the end time. The end time may be a second predetermined time that is a past time zone including the first predetermined time and is longer than the first predetermined time.

本実施例では、第二の所定時間を少なくとも16時刻前から1時刻前まで、すなわち3.2秒前から0.2秒前までを含む時間とし、この時間内に生成された少なくとも16枚のエッジ画像を処理対象とする。   In this embodiment, the second predetermined time is a time including at least 16 hours before to 1 hour before, that is, a time including 3.2 seconds before and 0.2 seconds before, and at least 16 sheets generated within this time. An edge image is a processing target.

第二の所定回数は、エッジ無しの状態が支配的であることが判定できること、照明等の環境変動やノイズの発生により突発的にエッジが出現し得ることを考慮して、処理対象とするエッジ画像の数よりもやや少なめに設定する。本実施例では、第二の所定回数を少なくとも14回とすることが好適である。   The second predetermined number of times is determined based on the fact that it can be determined that the state without an edge is dominant, and that an edge may appear suddenly due to environmental changes such as lighting or the occurrence of noise. Set slightly less than the number of images. In the present embodiment, it is preferable that the second predetermined number of times is at least 14.

<定在エッジ情報に基づく補正>
第三の所定時間内にエッジ検出手段7が生成し記憶したエッジ画像を記憶部4から読み出して、これらのエッジ画像において定常的にエッジが存在するエッジ定在位置を検出し、エッジ変動位置検出手段8が検出したエッジ変動位置がエッジ定在位置に隣接する場合に、エッジ変動位置には動背景物によるエッジ変動がなかったものとして、動背景物画像における当該画素位置の画素値を0とする。
<Correction based on standing edge information>
Edge image generated and stored by the edge detection means 7 within the third predetermined time is read out from the storage unit 4, edge standing positions where edges are regularly present in these edge images are detected, and edge fluctuation position detection is performed. When the edge fluctuation position detected by the means 8 is adjacent to the edge stationary position, the edge fluctuation position is assumed to have no edge fluctuation due to the moving background object, and the pixel value of the pixel position in the moving background object image is set to 0. To do.

静止物体のエッジの多くは同一位置に検出され続けるが、日照等の環境条件の変動によりその一部が検出されたりされなかったりすることがあり、エッジ変動位置検出手段8にてエッジ変動が検出されてしまうことがある。そこで、上記処理により、その近傍に安定して検出され続けるエッジが存在するようなエッジ変動位置は、エッジ変動位置検出手段8にて誤検出されたものとして補正する。   Many of the edges of a stationary object continue to be detected at the same position, but some of them may or may not be detected due to changes in environmental conditions such as sunshine. Edge fluctuations are detected by the edge fluctuation position detection means 8. It may be done. Therefore, by the above processing, an edge fluctuation position where there is an edge that is stably detected in the vicinity thereof is corrected as being erroneously detected by the edge fluctuation position detection means 8.

エッジ定在位置の検出はエッジ変動位置の検出と同じ環境条件で行うのが良く、第三の所定時間は第一の所定時間を含んでいることが好適である。本実施例では、第三の所定時間を第一の所定時間と同一に設定する。   The detection of the edge standing position is preferably performed under the same environmental conditions as the detection of the edge fluctuation position, and it is preferable that the third predetermined time includes the first predetermined time. In this embodiment, the third predetermined time is set to be the same as the first predetermined time.

エッジ変動位置補正手段9において上記2手法により補正された動背景物画像は、エッジ一致度算出手段10へ出力される。   The moving background object image corrected by the edge variation position correcting unit 9 by the above two methods is output to the edge coincidence degree calculating unit 10.

[エッジ一致度算出手段10]
エッジ一致度算出手段10は、差分領域抽出手段6から差分領域の情報を入力され、エッジ検出手段7から現時刻のエッジ画像を入力され、エッジ変動位置補正手段9から補正された動背景物画像を入力される。
[Edge coincidence calculation means 10]
The edge coincidence degree calculation means 10 receives the difference area information from the difference area extraction means 6, receives the edge image at the current time from the edge detection means 7, and is corrected by the edge variation position correction means 9. Is entered.

エッジ画像に保持された現時刻のエッジの位置と動背景物画像に保持されたエッジ変動位置との一致度を差分領域内において画素ごとに算出し、各差分領域内の各画素ごとの一致度を動背景物検出手段11へ出力する。この一致度とは、現時刻のエッジの位置が、エッジ変動位置に一致する割合を示し、差分領域が動背景物によるものか否かを判断する指標である。   The degree of coincidence between the edge position at the current time held in the edge image and the edge variation position held in the moving background image is calculated for each pixel in the difference area, and the degree of coincidence for each pixel in each difference area Is output to the moving background object detection means 11. The degree of coincidence indicates a ratio at which the position of the edge at the current time coincides with the edge fluctuation position, and is an index for determining whether or not the difference area is due to a moving background object.

揺れる木の葉や枝について抽出されたエッジ変動位置に、現時刻において侵入者等の移動物体のエッジが出現することもありうるが、侵入者の輪郭等は葉や枝の輪郭とは異なるので、その可能性は動背景物のエッジに比べて低い。木が揺れている場合、葉や枝は略往復運動を繰り返しているので、エッジ変動位置に現時刻のエッジが出現する可能性は高い。差分領域内の複数のエッジ変動位置について集計した一致度では、上記可能性の違いが有意な差となる。   The edge of a moving object such as an intruder may appear at the edge fluctuation position extracted for the leaves and branches of a swaying tree, but the intruder's outline etc. is different from the outline of the leaves and branches. The possibility is low compared to the edges of moving objects. When the tree is swaying, the leaves and branches repeat a reciprocating motion substantially, so the edge at the current time is likely to appear at the edge fluctuation position. In the degree of coincidence calculated for a plurality of edge fluctuation positions in the difference area, the difference in possibility is a significant difference.

[動背景物検出手段11]
動背景物検出手段11は、エッジ一致度算出手段10から、差分領域におけるエッジの一致度を入力して、各差分領域における動背景物の有無を検出し、検出結果及び一致度を侵入者検出手段12へ出力する。
[Moving Background Object Detection Unit 11]
The moving background object detection means 11 inputs the edge matching degree in the difference area from the edge matching degree calculation means 10, detects the presence or absence of a moving background object in each difference area, and detects the detection result and the matching degree as an intruder. Output to means 12.

差分領域のエッジの一致度を予め設定された所定値と比較して、一致度が所定値以上である場合に当該差分領域に動背景物有り、そうでない場合は当該差分領域に動背景物無しと判定する。   Compare the degree of coincidence of the edges of the difference area with a predetermined value, and if the degree of coincidence is greater than or equal to a predetermined value, there is a moving background in the difference area, otherwise there is no moving background in the difference area Is determined.

[侵入者検出手段12]
侵入者検出手段12は、取得された監視画像を入力し、差分領域抽出手段6からは差分領域の情報を入力し、動背景物検出手段11からは各差分領域における動背景物の有無と一致度の情報を入力する。
[Intruder detection means 12]
The intruder detection means 12 inputs the acquired monitoring image, inputs information on the difference area from the difference area extraction means 6, and matches the presence or absence of a moving background object in each difference area from the moving background object detection means 11. Enter the degree information.

差分領域における監視画像を画像処理して後述する侵入者の特徴量を抽出して、侵入者の特徴量を所定基準と比較し、特徴量が所定基準を超えたときに当該差分領域に侵入者有り、そうでない場合に当該差分領域に侵入者無しと判定する。   The feature image of the intruder described later is extracted by performing image processing on the monitoring image in the difference region, and the feature amount of the intruder is compared with a predetermined reference. When the feature amount exceeds the predetermined reference, the intruder enters the difference region. Yes, if not, it is determined that there is no intruder in the difference area.

このとき、動背景物検出手段11からの情報を参照して、当該差分領域に動背景物が有る場合には一致度に応じた所定基準を用いる。より具体的には、一致度が高くなるほど所定基準を高くする。一方、当該差分領域に動背景物が無い場合には、動背景物が有る場合より低く固定された所定基準を用いる。このようにすることで、動背景物が検出された差分領域では侵入者が検出されにくくなり、動背景物を誤って侵入者として検出するミスが起きにくくなる。   At this time, with reference to the information from the moving background object detection means 11, when there is a moving background object in the difference area, a predetermined criterion according to the degree of coincidence is used. More specifically, the higher the matching degree, the higher the predetermined reference. On the other hand, when there is no moving background object in the difference area, a predetermined reference fixed lower than when there is a moving background object is used. By doing in this way, it becomes difficult to detect an intruder in the difference area where the moving background object is detected, and it becomes difficult to make an error in detecting the moving background object as an intruder by mistake.

動背景物が検出されなかった差分領域についてのみ侵入者の特徴量の抽出と、所定基準との比較を行って侵入者の検出を行っても良い。   The intruder may be detected by extracting the feature amount of the intruder and comparing it with a predetermined standard only for the difference area where the moving background object is not detected.

侵入者検出手段12は、侵入者が検出された差分領域が1つでもあった場合は、侵入者を検出したことを表す信号を出力部5へ出力する。   The intruder detection means 12 outputs a signal indicating that an intruder has been detected to the output unit 5 when there is even one difference area where the intruder has been detected.

(2)画像センサの動作(図2〜図5)
画像センサに電源が投入されると、撮像部1は予め設定された一定の時間間隔にて監視画像を出力し、制御部3は記憶部4からプログラムを読み出し、新たな監視画像が取得されるたびにプログラムに従い図2〜図5のフローチャートに示す処理を繰り返し実行し、侵入者を検出する。なお、図2〜図5のフローチャートにおける各処理ステップにはそれぞれS+数字で表す処理ステップ番号を付して以下の説明における便宜とする。
以下、各処理ステップごとに説明する。
(2) Image sensor operation (Figures 2 to 5)
When the image sensor is turned on, the imaging unit 1 outputs a monitoring image at a predetermined time interval, and the control unit 3 reads a program from the storage unit 4 to acquire a new monitoring image. Each time the processes shown in the flowcharts of FIGS. 2 to 5 are repeatedly executed according to the program, an intruder is detected. Each processing step in the flowcharts of FIGS. 2 to 5 is given a processing step number represented by S + number for convenience in the following description.
Hereinafter, each processing step will be described.

[S21;監視画像取得]
制御部3は画像取得部2を介して撮像部1が出力する監視画像を取得する。取得した監視画像は一時的に記憶部4に記憶しても良い。
[S21: Monitor image acquisition]
The control unit 3 acquires a monitoring image output from the imaging unit 1 via the image acquisition unit 2. The acquired monitoring image may be temporarily stored in the storage unit 4.

[S22及びS23;背景画像初期化]
制御部3は差分領域抽出手段6により以下の処理を実行する。
画像センサの起動直後は、背景画像が初期化されていないので(S22にてNO)、ステップS23にて以下の初期化の処理を行う。
[S22 and S23; background image initialization]
The control unit 3 executes the following processing using the difference area extraction unit 6.
Since the background image is not initialized immediately after the image sensor is activated (NO in S22), the following initialization processing is performed in step S23.

起動直後の1時刻目は取得された監視画像を背景画像として記憶部4に新たに記憶する。その後数時刻(例えば5時刻)の間、新たに取得された監視画像と記憶部4に記憶した背景画像とを順次平均化し、平均化した背景画像を記憶部4に上書きして初期化済となる。初期化済になると(S22にてYES)、ステップS24へ移行する。   At the first time immediately after activation, the acquired monitoring image is newly stored in the storage unit 4 as a background image. Thereafter, for several hours (for example, 5 hours), the newly acquired monitoring image and the background image stored in the storage unit 4 are sequentially averaged, and the averaged background image is overwritten in the storage unit 4 and initialized. Become. When initialization has been completed (YES in S22), the process proceeds to step S24.

[S24;差分領域抽出]
制御部3は差分領域抽出手段6により以下の処理を実行する。
記憶部4から背景画像を読み出し、監視画像と背景画像の同一座標の画素同士について輝度値の差の絶対値を算出する。算出した差の絶対値が予め定めたしきい値より大きい画素は変化有り、それ以外の画素は変化無しと判定する。変化有りとされた画素の画素値を1、変化無しとされた画素の画素値を0として差分画像を生成する。
[S24: differential area extraction]
The control unit 3 executes the following processing using the difference area extraction unit 6.
A background image is read from the storage unit 4, and an absolute value of a difference in luminance value is calculated for pixels at the same coordinates of the monitoring image and the background image. It is determined that pixels whose absolute value of the calculated difference is greater than a predetermined threshold value have changed, and other pixels have no change. A difference image is generated by setting the pixel value of a pixel having changed to 1 and setting the pixel value of a pixel having no change to 0.

差分画像において近傍画素の画素値が互いに1であれば、これらの近傍画素を1つの差分領域としてまとめる。これらの各差分領域の面積(画素数)を算出し、算出した面積が予め設定した面積しきい値以上の差分領域は以降の処理の対象とし管理番号を付与して管理する。本例では管理番号を変数mで表す。面積が予め設定した面積しきい値未満の差分領域はノイズにより生じる小さな差分領域と判断して以降の処理対象としない。   If the pixel values of neighboring pixels are 1 in the difference image, these neighboring pixels are collected as one difference area. The area (number of pixels) of each difference area is calculated, and a difference area whose calculated area is equal to or larger than a preset area threshold is assigned as a target for subsequent processing and managed. In this example, the management number is represented by a variable m. A difference area whose area is less than a preset area threshold is determined as a small difference area caused by noise and is not subject to subsequent processing.

[S25;エッジ検出]
制御部3はエッジ検出手段7により以下の処理を実行する。
監視画像の各画素のエッジ強度値E(x,y)を次式(1)にて算出する。
[S25: Edge detection]
The control unit 3 executes the following processing by the edge detection means 7.
The edge intensity value E (x, y) of each pixel of the monitoring image is calculated by the following equation (1).

E(x,y)=(1/2)|I(x+1,y)−I(x−1、y)|+
(1/2)|I(x,y+1)−I(x、y−1)| … (1)
E (x, y) = (1/2) | I (x + 1, y) -I (x-1, y) | +
(1/2) | I (x, y + 1) -I (x, y-1) | (1)

エッジ強度値を予め設定したしきい値と比較し、エッジ強度値がしきい値より大きいと判断された画素はエッジ有り、それ以外の画素はエッジ無しと判定する。エッジ有りの画素の画素値を1、エッジ無しの画素の画素値を0としたエッジ画像を生成する。   The edge intensity value is compared with a preset threshold value, and a pixel for which the edge intensity value is determined to be greater than the threshold value is determined to have an edge, and other pixels are determined to have no edge. An edge image in which the pixel value of a pixel with an edge is 1 and the pixel value of a pixel without an edge is 0 is generated.

エッジ強度値は、上式以外にもSobel オペレータ、Prewitt オペレータ、Roberts オペレータ等の公知のオペレータを用いて算出することができる。   The edge strength value can be calculated using a known operator such as the Sobel operator, the Prewitt operator, and the Roberts operator in addition to the above formula.

生成したエッジ画像は記憶部4に記憶される。現時刻から8時刻前までのエッジ画像が常に記憶部4に記憶されているように9時刻前のエッジ画像を削除するとともに現時刻のエッジ画像を追加していく。   The generated edge image is stored in the storage unit 4. The edge image of 9 hours before is deleted and the edge image of the current time is added so that the edge images from the current time to 8 hours before are always stored in the storage unit 4.

[S26及び図3;エッジ変動位置検出]
制御部3は、エッジ変動位置検出手段8により、図2のS26において、図3のフローチャートに詳細を示す「エッジ変動位置検出」サブルーチン処理を以下に説明するように実行する。
[S26 and FIG. 3; edge fluctuation position detection]
The control unit 3 executes the “edge variation position detection” subroutine process, which is shown in detail in the flowchart of FIG. 3, by the edge variation position detection means 8 in S26 of FIG. 2 as described below.

ステップS301では、第一の所定時間である8時刻前から1時刻前に生成されたエッジ画像を記憶部4から読み出す。   In step S <b> 301, an edge image generated from 8 hours before 1 hour, which is the first predetermined time, is read from the storage unit 4.

ステップS302では、以下のステップS303〜S306で処理対象となるエッジ画像及び動背景物画像の座標(x,y)を順次設定する。   In step S302, the coordinates (x, y) of the edge image and moving background object image to be processed in the following steps S303 to S306 are sequentially set.

ステップS303では、ステップS301にて読み出した8枚のエッジ画像において、同一座標(x,y)の画素値同士を生成された順に比較して、0から1へ及び1から0へと時間的に変化した回数を当該座標におけるエッジの変動回数Nf(x,y)として計数する。   In step S303, in the eight edge images read out in step S301, pixel values of the same coordinates (x, y) are compared in the order of generation, and temporally from 0 to 1 and from 1 to 0. The number of times of change is counted as the number of edge fluctuations Nf (x, y) at the coordinates.

変動回数Nf(x,y)と予め設定したしきい値Tf1(第一の所定回数;3回)とを比較して、変動回数Nf(x,y)がしきい値Tf1以上であれば(S304にてYES)座標(x,y)をエッジ変動位置として検出し、動背景物画像の画素値L(x,y)に1を設定する(S305)。   The variation number Nf (x, y) is compared with a preset threshold value Tf1 (first predetermined number; three times), and if the variation number Nf (x, y) is equal to or greater than the threshold value Tf1 ( In S304, the coordinate (x, y) is detected as the edge fluctuation position, and 1 is set to the pixel value L (x, y) of the moving background object image (S305).

変動回数Nf(x,y)がしきい値Tf1未満であれば(S304にてNO)、画素値L(x,y)に0を設定する(S306)。   If variation count Nf (x, y) is less than threshold value Tf1 (NO in S304), pixel value L (x, y) is set to 0 (S306).

全画素について処理を行った場合は(S307にてYES)エッジ変動位置検出処理を終了して本処理にて生成されたエッジ変動位置を保持している動背景物画像をエッジ変動位置補正手段9へ出力して、図 2のステップS27へ移行する。そうでなければ(S307にてNO)、次に処理対象とする画素の座標を設定して同様の処理を繰り返すべくステップS302に戻る。   When processing has been performed for all pixels (YES in S307), the edge fluctuation position detection process is completed, and the moving background object image that holds the edge fluctuation position generated in this process is used as the edge fluctuation position correction means 9. The process proceeds to step S27 in FIG. If not (NO in S307), the process returns to step S302 to set the coordinates of the pixel to be processed next and repeat the same process.

[S27及び図4;エッジ変動位置補正]
制御部3は、エッジ変動位置補正手段9により、図2のS27において、図4のフローチャートに詳細を示す「エッジ変動位置補正」サブルーチン処理を以下に説明するように実行する。
[S27 and FIG. 4; edge fluctuation position correction]
The control unit 3 executes the “edge variation position correction” subroutine process, which is shown in detail in the flowchart of FIG. 4, in S27 of FIG. 2 by the edge variation position correction means 9 as described below.

ステップS401では、第三の所定時間である8時刻前から1時刻前に生成された8枚のエッジ画像を記憶部4から読み出す。   In step S <b> 401, eight edge images generated from 8 hours before 1 hour, which is the third predetermined time, are read from the storage unit 4.

まず、定在エッジ情報に基づく補正を行う。ステップS402では、以下のステップS403〜S406で処理対象となるエッジ画像及び定在エッジ画像の座標(x、y)を順次設定する。   First, correction based on the standing edge information is performed. In step S402, the coordinates (x, y) of the edge image and the standing edge image to be processed in the following steps S403 to S406 are sequentially set.

ステップS403では、ステップS401にて読み出した8枚のエッジ画像において同一座標(x,y)にある各画素の画素値が1である回数を当該座標における有エッジ回数Na(x,y)として計数する。   In step S403, the number of times the pixel value of each pixel at the same coordinate (x, y) is 1 in the eight edge images read out in step S401 is counted as the number of edged Na (x, y) in the coordinate. To do.

有エッジ回数Na(x,y)を予め設定したしきい値Ta(第三の所定回数)と比較して、有エッジ回数Na(x,y)がしきい値Ta以上である座標(x,y)を定在エッジ位置として検出し(S404にてYES)、定在エッジ画像の画素値A(x,y)に1を設定する(S405)。   By comparing the number of edged Na (x, y) with a preset threshold Ta (third predetermined number), the coordinates (x, y) is detected as a standing edge position (YES in S404), and 1 is set to the pixel value A (x, y) of the standing edge image (S405).

有エッジ回数Nf(x,y)がしきい値Ta未満であれば(S404にてNO)画素値A(x,y)に0を設定する(S406)。   If edge count Nf (x, y) is less than threshold value Ta (NO in S404), pixel value A (x, y) is set to 0 (S406).

本実施例では、しきい値Taを8とする。   In this embodiment, the threshold value Ta is 8.

全画素について処理を行った場合は(S407にてYES)、次のステップS408へ移行し、全画素の処理が終わっていない場合は(S407にてNO)、ステップS402へ戻り、次に処理対象とする画素の座標を設定して同様の処理を繰り返す。   If all pixels have been processed (YES in S407), the process proceeds to the next step S408. If all pixels have not been processed (NO in S407), the process returns to step S402, and the next processing target The same process is repeated by setting the coordinates of the pixel.

ステップS408では、動背景物画像において画素値が1である座標(エッジ変動位置)を順次サーチしてその座標(x,y)を以下のステップS409〜S411における処理対象として設定する。   In step S408, a coordinate (edge variation position) having a pixel value of 1 in the moving background object image is sequentially searched, and the coordinate (x, y) is set as a processing target in the following steps S409 to S411.

ステップS409では、定在エッジ画像において座標(x,y)の8近傍にある画素(当該画素に隣接する上・下・左・右・右上斜め・左上斜め・右下斜め・左下斜めの8方向の画素)のうち画素値が1である画素の数を近傍定在エッジ数Ns(x,y)として算出する。   In step S409, pixels in the vicinity of the coordinate (x, y) in the standing edge image in eight directions (upper, lower, left, right, upper right diagonal, upper left diagonal, lower right diagonal, and lower left diagonal adjacent to the pixel) The number of pixels having a pixel value of 1 is calculated as the number of neighboring standing edges Ns (x, y).

近傍定在エッジ数Ns(x,y)を予め設定したしきい値Tsと比較し、近傍定在エッジ数Ns(x,y)がしきい値Ts以上であれば(S410にてYES)、定在エッジが照明変動等により変動したものとして当該座標(x,y)にある動背景物画像の画素値L(x,y)を0に補正する(S411)。つまり、当初動背景物に依るものとして検出されたエッジを定在エッジであるとして判断を補正することができる。
なお、本実施例では、判断の基準となる前記しきい値Tsを3とする。
The number of neighboring standing edges Ns (x, y) is compared with a preset threshold value Ts, and if the number of neighboring standing edges Ns (x, y) is equal to or greater than the threshold value Ts (YES in S410). The pixel value L (x, y) of the moving background object image at the coordinate (x, y) is corrected to 0, assuming that the standing edge has changed due to illumination fluctuation or the like (S411). That is, it is possible to correct the determination that the edge detected as originally depending on the moving background object is the standing edge.
In this embodiment, the threshold value Ts, which is a criterion for determination, is set to 3.

全エッジ変動位置について処理を行った場合は(S412にてYES)、ステップS413へ移行して次の補正処理を開始する。そうでなければ(S412にてNO)、次に処理対象とするエッジ変動位置を設定して同様の処理を繰り返す。   When processing has been performed for all edge fluctuation positions (YES in S412), the process proceeds to step S413 to start the next correction processing. If not (NO in S412), the next edge change position to be processed is set and the same processing is repeated.

次に、無エッジ情報に基づく補正を行う。ステップS413では、以下のステップS414〜S423で処理対象となるエッジ画像及び動背景物画像、カウンタの座標(x、y)を順次設定する。   Next, correction based on edgeless information is performed. In step S413, the edge image, moving background object image, and counter coordinates (x, y) to be processed in the following steps S414 to S423 are sequentially set.

ステップS414では、ステップS401にて読み出した8枚のエッジ画像において同一座標(x,y)にある各画素の画素値が0である回数を当該座標における無エッジ回数Nn(x,y)として計数する。   In step S414, the number of times that the pixel value of each pixel at the same coordinate (x, y) in the eight edge images read out in step S401 is 0 is counted as the number of edgeless Nn (x, y) in the coordinate. To do.

無エッジ回数Nn(x,y)と予め設定したしきい値Tnとを比較して無エッジ回数Nn(x,y)がしきい値Tn以上であれば(S415にてYES)、カウンタCn(x,y)の値を1だけ増加させる(S416)。本例ではしきい値Tnを7に設定した。このカウンタは無エッジ情報を蓄積するためのものであり、カウンタ値が大きい程、無エッジ情報に基づく補正の必要が高くなる。なおカウンタCn(x,y)は画像センサの起動直後に0に初期化されているものとする。   If the number of edgeless Nn (x, y) is compared with a preset threshold value Tn and the number of edgeless Nn (x, y) is equal to or greater than threshold value Tn (YES in S415), counter Cn ( The value of x, y) is increased by 1 (S416). In this example, the threshold value Tn is set to 7. This counter is for accumulating edgeless information. The larger the counter value, the higher the need for correction based on edgeless information. Note that the counter Cn (x, y) is initialized to 0 immediately after the image sensor is activated.

ステップS417では、ステップS401にて読み出した8枚のエッジ画像において、同一座標(x、y)の画素値同士を生成された順に比較して、0から1へ及び1から0へと時間的に変化した回数を当該座標におけるエッジの変動回数Nf(x,y)として計数する。   In step S417, in the eight edge images read out in step S401, the pixel values of the same coordinates (x, y) are compared in the order of generation, and temporally from 0 to 1 and from 1 to 0. The number of times of change is counted as the number of edge fluctuations Nf (x, y) at the coordinates.

変動回数Nf(x,y)を予め設定したしきい値Tf2と比較して、変動回数Nf(x,y)がしきい値Tf2以上であれば(S418にてYES)、カウンタCn(x,y)の値を2分の1に修正し(S419)、ステップS422へ移行する。なお、カウンタの値は小数部を切り捨てた整数となる。
これにより、揺れていなかった草木が激しく揺れ始めた場合等にエッジ変動位置が誤って補正されないようにする。
Comparing the number of fluctuations Nf (x, y) with a preset threshold value Tf2, if the number of fluctuations Nf (x, y) is equal to or greater than threshold value Tf2 (YES in S418), counter Cn (x, y The value of y) is corrected to one half (S419), and the process proceeds to step S422. Note that the counter value is an integer with the fractional part truncated.
This prevents the edge fluctuation position from being erroneously corrected when, for example, the vegetation that has not been shaken starts to shake violently.

一方、変動回数Nf(x,y)がしきい値Tf2より小さければ(S418にてNO)、次にこの変動回数Nf(x,y)を予め設定したしきい値Tf3と比較し、変動回数Nf(x,y)がしきい値Tf3以上であれば(S420にてYES)、カウンタCn(x,y)の値を2だけ減少させる(S421)。カウンタCn(x,y)の値が負になる場合は値を0に修正する。これにより、揺れていなかった草木が揺れ始めた場合等にエッジ変動位置が誤って補正されないようにする。   On the other hand, if the number of fluctuations Nf (x, y) is smaller than threshold value Tf2 (NO in S418), the number of fluctuations Nf (x, y) is then compared with a preset threshold value Tf3. If Nf (x, y) is equal to or greater than threshold value Tf3 (YES in S420), the value of counter Cn (x, y) is decreased by 2 (S421). When the value of the counter Cn (x, y) becomes negative, the value is corrected to 0. As a result, the edge fluctuation position is prevented from being erroneously corrected when, for example, a plant that has not been shaken starts to shake.

しきい値Tf2はより激しい揺れを検出するための値であるから、Tf1≦Tf3<Tf2とするのが好適であり、本例ではしきい値Tf3を4、しきい値Tf2を5と設定した。また、ステップS419、S421におけるカウンタ値の除算、減算は一例であり、ステップS421の演算よりステップS419の演算の方がカウンタ値を大きく減らす思想の下で、各演算を適宜設定することができる。   Since the threshold value Tf2 is a value for detecting more severe shaking, it is preferable to set Tf1 ≦ Tf3 <Tf2. In this example, the threshold value Tf3 is set to 4 and the threshold value Tf2 is set to 5. . Further, the division and subtraction of the counter value in steps S419 and S421 is an example, and each calculation can be appropriately set based on the idea that the calculation in step S419 greatly reduces the counter value than the calculation in step S421.

カウンタCn(x,y)を予め設定したしきい値Tcと比較して、カウンタCn(x,y)が予め定めたしきい値Tc以上であれば(S422にてYES)、当該座標(x,y)に動背景物のエッジは出現していないものとして、動背景物画像の画素値L(x,y)に0を書き込む(S423)。なお、本例ではしきい値Tcを9と設定した。
以上のように、各画素位置において、過去8時刻の無エッジ回数が7回以上であればカウンタを1増加させ、カウンタの値が9以上となった画素位置は定常的にエッジが出現しない位置と認定して補正の対象に決定する。最短時間で補正の対象に決定される場合の第二の所定時間は16時刻、第二の所定回数は14回となる。このように補正の対象の決定は逐次的に行い、その処理の過程において第二の所定時間は16時刻以上の時間に動的に設定され、また第二の所定回数は14回以上の回数に動的に設定される。
The counter Cn (x, y) is compared with a preset threshold value Tc, and if the counter Cn (x, y) is greater than or equal to the predetermined threshold value Tc (YES in S422), the coordinates (x , Y), assuming that the edge of the moving background object does not appear, 0 is written to the pixel value L (x, y) of the moving background object image (S423). In this example, the threshold value Tc is set to 9.
As described above, at each pixel position, the counter is incremented by 1 if the number of no-edges in the past eight times is 7 or more, and the pixel position where the counter value is 9 or more is a position where no edge appears regularly. And determine the subject of amendment. When the correction target is determined in the shortest time, the second predetermined time is 16 hours and the second predetermined number of times is 14. In this way, the correction target is determined sequentially, and the second predetermined time is dynamically set to a time of 16 hours or more in the process, and the second predetermined number of times is set to 14 or more times. Set dynamically.

全画素について処理を行った場合(S424にてYES)はエッジ変動位置補正処理を終了し、本処理にて補正されエッジ変動位置を保持している動背景物画像をエッジ一致度算出手段10へ出力して、図2のステップS28へ移行する。そうでなければ(S424にてNO)、次に処理対象とする画素の座標(x、y)を設定して同様の処理を繰り返す。   If all pixels have been processed (YES in S424), the edge fluctuation position correction process is terminated, and the moving background object image corrected in this process and holding the edge fluctuation position is sent to the edge coincidence calculation means 10. The process proceeds to step S28 in FIG. Otherwise (NO in S424), the coordinates (x, y) of the pixel to be processed next are set and the same processing is repeated.

以上の処理により、侵入者等の移動物体によって一時的なエッジの出現と消滅が生じ、このためにエッジ変動位置検出手段8がエッジ変動位置を誤検出した場合に、これを補正することができる。   With the above processing, a temporary edge appears and disappears due to a moving object such as an intruder, and this can be corrected when the edge fluctuation position detecting means 8 erroneously detects the edge fluctuation position. .

[S28及び図5;エッジ一致度算出]
制御部3は、エッジ一致度算出手段10により、図2のS28において、図5のフローチャートに詳細を示す「エッジ変動位置補正」サブルーチン処理を以下に説明するように実行する。
[S28 and FIG. 5; edge coincidence calculation]
The control unit 3 executes the “edge variation position correction” subroutine process, which is described in detail in the flowchart of FIG. 5, in S28 of FIG.

ステップS501では、ステップS24にて抽出され以下のステップS502〜S507で処理対象となる差分領域mを順次設定する。   In step S501, difference areas m extracted in step S24 and subjected to processing in steps S502 to S507 below are sequentially set.

ステップS502では、エッジ画像と差分画像とを用い、差分領域mの内側に存在する現時刻のエッジ数e(m)を計数する。そのためには、エッジ画像と差分画像の論理積の総和を演算すればよい。   In step S502, the number of edges e (m) at the current time existing inside the difference area m is counted using the edge image and the difference image. For this purpose, the sum of logical products of the edge image and the difference image may be calculated.

エッジ数e(m)が予め設定したしきい値Teより少ない場合は(S503にてNO)、ほぼ確実に動背景物ではないので後述する一致度r(m)に0を設定する(S504)。   If the number of edges e (m) is smaller than a preset threshold value Te (NO in S503), it is almost certainly not a moving background object, so 0 is set to a matching degree r (m) described later (S504). .

エッジ数e(m)が予め設定したしきい値Te以上の場合は(S503にてYES)、動背景物の可能性があるのでエッジ画像及び動背景物画像、差分画像を用い、差分領域mの内側に存在する現時刻のエッジ位置とエッジ変動位置との一致数d(m)を計数する(S505)。そのためには、エッジ画像と動背景物画像と差分画像の論理積の総和を演算すればよい。   If the number of edges e (m) is equal to or greater than a preset threshold value Te (YES in S503), there is a possibility of a moving background object, so the edge area, moving background object image, and difference image are used, and the difference area m The number d (m) of coincidence between the edge position at the current time and the edge fluctuation position existing inside is counted (S505). For this purpose, the sum of logical products of the edge image, the moving background object image, and the difference image may be calculated.

ステップS506では、次式(2)により、一致数d(m)を出現した現時刻のエッジ数e(m)で正規化して一致度r(m)を算出する。
r(m)=d(m)/e(m)…(2)
In step S506, the degree of coincidence r (m) is calculated by normalizing the coincidence number d (m) with the number of edges e (m) at the current time when the coincidence number d (m) has appeared.
r (m) = d (m) / e (m) (2)

e(m)に代えて、差分領域mの内側に存在する現時刻のエッジ位置と差分領域mの内側に存在するエッジ変動位置との和を用いて、一致数d(m)を正規化しても良い。又は、e(m)に代えて、差分領域mの面積(画素数)を用いて一致数d(m)を正規化しても良い。   Instead of e (m), the sum of the edge position at the current time existing inside the difference area m and the edge fluctuation position existing inside the difference area m is used to normalize the number of matches d (m). Also good. Alternatively, the matching number d (m) may be normalized using the area (number of pixels) of the difference region m instead of e (m).

更に、所定関数を用いて一致度r(m)に変換を施してもよい。所定関数は、実際にr(m)を得たときに差分領域mが動背景物によるものである確率を実験的に求めておき、r(m)を前記確率(値域0〜1)に変換する関数に設定しておくことが好適である。   Furthermore, the matching degree r (m) may be converted using a predetermined function. The predetermined function experimentally obtains the probability that the difference area m is due to the moving background object when r (m) is actually obtained, and converts r (m) into the probability (range 0 to 1). It is preferable to set the function to be

全ての差分領域について処理を行った場合(S508にてYES)はエッジ一致度算出処理を終了して、各差分領域における一致度を動背景物検出手段11へ出力して、図2のステップS29へ移行する。そうでなければ(S508にてNO)、ステップS501に戻り、次に処理の対象とする差分領域mを設定して同様の処理を繰り返す。   If processing has been performed for all the difference areas (YES in S508), the edge coincidence degree calculation process is terminated, and the coincidence degree in each difference area is output to the moving background object detection means 11, and step S29 in FIG. Migrate to Otherwise (NO in S508), the process returns to step S501, and the same processing is repeated after setting the difference area m to be processed next.

[S29;動背景物検出]
制御部3は動背景物検出手段11により以下の処理を実行する。
各差分領域mについて、エッジ一致度r(m)と予め設定したしきい値Trとを比較して、エッジ一致度r(m)がしきい値Tr以上であれば差分領域mは動背景物によるものであると判定し、エッジ一致度r(m)がしきい値Tr未満であれば差分領域mは動背景物によるものではないと判定する。動背景物を検出するためのしきい値Trは0.5以上の値とするのが好適であり、本例では0.5と設定した。
[S29: Moving object detection]
The control unit 3 executes the following processing by the moving background object detection unit 11.
For each difference area m, the edge matching degree r (m) is compared with a preset threshold value Tr, and if the edge matching degree r (m) is equal to or greater than the threshold value Tr, the difference area m is a moving background object. If the edge matching degree r (m) is less than the threshold value Tr, it is determined that the difference area m is not due to a moving background object. The threshold value Tr for detecting a moving background object is preferably set to 0.5 or more, and is set to 0.5 in this example.

[S30;侵入者特徴量算出]
制御部3は侵入者検出手段12により以下の処理を実行する。
各差分領域について、種々の画像特徴量を抽出し、各画像特徴量を予め設定した所定関数に入力して値に変換し、更にこれら変換された値を重み付け加算し、当該差分領域の人らしさを表す指標(値域0〜1)を算出する。
[S30: Intruder feature value calculation]
The control unit 3 executes the following processing using the intruder detection means 12.
For each difference region, various image feature amounts are extracted, each image feature amount is input to a predetermined function set in advance, converted into a value, and the converted values are weighted and added, and the humanity of the difference region is calculated. Is calculated (value range 0 to 1).

抽出する画像特徴量と所定関数の特性を以下に例示する。
1)差分領域の面積(画素数)
所定関数は、面積が人とみなせる範囲内にあれば高い値を出力し、そうでなければ低い値を出力する。
2)差分領域の形状
所定関数は、縦に長い又は横に長いと高い値を出力し、そうでなければ低い値を出力する。
3)背景画像のテクスチャと監視画像のテクスチャの類似度
画像のテクスチャとは輝度のパターン乃至模様を意味する。テクスチャの類似度が高い場合は透過性の外乱(光や影)の可能性が高いので、所定関数は、類似度が高いと低い値を出力し、類似度が低ければ高い値を出力する。
4)背景画像に対する監視画像のエッジの増加率
所定関数は、増加率が高いと高い値を出力し、増加率が低いと低い値を出力する。
5)背景画像に対する監視画像のエッジの減少率
所定関数は、減少率が高いと高い値を出力し、減少率が低いと低い値を出力する。
The image feature quantity to be extracted and the characteristics of the predetermined function are exemplified below.
1) Area of difference area (number of pixels)
The predetermined function outputs a high value if the area is within a range that can be regarded as a person, and outputs a low value otherwise.
2) Shape of the difference area The predetermined function outputs a high value if it is long in the vertical direction or long in the horizontal direction, and outputs a low value otherwise.
3) Similarity between the texture of the background image and the texture of the monitoring image The texture of the image means a luminance pattern or pattern. When the texture similarity is high, there is a high possibility of transmissive disturbance (light or shadow). Therefore, the predetermined function outputs a low value when the similarity is high, and outputs a high value when the similarity is low.
4) Edge image increase rate relative to background image The predetermined function outputs a high value when the increase rate is high, and outputs a low value when the increase rate is low.
5) Reduction rate of edge of monitoring image with respect to background image The predetermined function outputs a high value when the reduction rate is high, and outputs a low value when the reduction rate is low.

動背景物検出手段11にて動背景物が検出されなかった差分領域については画像特徴量の抽出を省略しても良い。この場合、当該差分領域に関する指標は0とする。   Extraction of the image feature amount may be omitted for the difference area where the moving background object is not detected by the moving background object detection unit 11. In this case, the index related to the difference area is 0.

[S31;侵入者検出]
制御部3は侵入者検出手段12により各差分領域mについて以下の処理を実行する。
1)差分領域が侵入者によるものであるか否かを判定するためのしきい値Th(m)を設定する。
動背景物検出手段11にて動背景物が検出された差分領域mの場合、エッジの一致度r(m)が高いほど、動背景物である確率が高くなると考えられるから、動背景物と侵入者を区別するために、しきい値Th(m)を高く設定することとする。
Th(m)=(α・r(m)+1)・Th0 ( α>0) …(3)
動背景物検出手段11にて動背景物が検出されなかった差分領域mの場合であっても、直ちに侵入者によるものとはいえず、光等その他の原因で検出された可能性もあるので、動背景物が検出された場合のTh(m)よりも低く設定する。
Th(m)=Th0 …(4)
[S31; Intruder detection]
The control unit 3 performs the following processing for each difference area m by the intruder detection means 12.
1) A threshold value Th (m) for determining whether or not the difference area is due to an intruder is set.
In the case of the difference area m in which the moving background object is detected by the moving background object detection unit 11, it is considered that the higher the edge matching degree r (m), the higher the probability of being a moving background object. In order to distinguish intruders, the threshold value Th (m) is set high.
Th (m) = (α · r (m) +1) · Th0 (α> 0) (3)
Even in the case of the difference area m in which no moving background object is detected by the moving background object detection means 11, it cannot be said that it is immediately caused by an intruder, but may be detected due to other causes such as light. , It is set lower than Th (m) when a moving background object is detected.
Th (m) = Th0 (4)

2)人らしさを表す指標としきい値Th(m)とを比較し、該指標がしきい値Th(m )以上の場合に差分領域mは侵入者によるものと判定し、該指標がしきい値Th(m)未満の場合に差分領域mは侵入者によるものではないと判定する。   2) An index representing humanity is compared with a threshold value Th (m), and if the index is equal to or greater than the threshold value Th (m), it is determined that the difference area m is due to an intruder, and the index is a threshold value. If it is less than the value Th (m), it is determined that the difference area m is not due to an intruder.

侵入者による差分領域が1つでも存在した場合は、侵入者を検出したとする。   It is assumed that an intruder is detected when there is at least one difference area by the intruder.

エッジの一致度r(m)に応じてしきい値Th(m)を変更する例を示したが、エッジの一致度r(m)に応じて人らしさを表す指標を補正しても良い。この場合、エッジの一致度r(m)が高いほど、動背景物である確率が高くなると考えられるから、人らしさを表す指標を小さくする補正とし、しきい値Th(m)は一定値とする。   Although an example in which the threshold value Th (m) is changed according to the edge matching degree r (m) has been shown, an index representing humanity may be corrected according to the edge matching degree r (m). In this case, it is considered that the higher the edge matching degree r (m), the higher the probability that the object is a moving background object. Therefore, the threshold Th (m) is set to a constant value as a correction for reducing an index representing humanity. To do.

[S32〜S34;侵入者検出結果に応じた処理]
侵入者を検出した場合(S32にてYES)、制御部3は出力部5を介して外部装置に検出信号を出力する(S33)。侵入者を検出しなかった場合(S32にてNO)、制御部3は、照明変動による侵入者検出精度の低下を防ぐために差分領域抽出手段6により背景画像を以下のように更新する(S34)。
[S32 to S34; Processing According to Intruder Detection Result]
When an intruder is detected (YES in S32), control unit 3 outputs a detection signal to an external device via output unit 5 (S33). When no intruder has been detected (NO in S32), control unit 3 updates the background image as follows by difference area extraction means 6 in order to prevent a decrease in intruder detection accuracy due to illumination fluctuations (S34). .

1)現時刻の監視画像と記憶部4に記憶した背景画像とを平均化した背景画像を記憶部4に上書きしてもよい。
2)極端に大きな差分領域が抽出されるなどして急激な照明変動を検知したときに記憶している背景画像をクリアしても良い。この場合、次の時刻に背景画像初期化のステップを実行する。
ステップS34の処理に代えて侵入者が検出されたか否かによらず一定時刻おきに背景画像を現時刻の監視画像と置き換える更新を行っても良い。
1) A background image obtained by averaging the monitoring image at the current time and the background image stored in the storage unit 4 may be overwritten in the storage unit 4.
2) The stored background image may be cleared when an abrupt illumination change is detected, for example, by extracting an extremely large difference area. In this case, the background image initialization step is executed at the next time.
In place of the process in step S34, the background image may be replaced with the monitoring image at the current time at regular intervals regardless of whether or not an intruder has been detected.

(3)画像データ処理の実例(図6〜図13)
以上説明した本例の画像センサにおける画像処理例を具体的に説明する。
なお、参照する各図において、画像や拡大画像等の横方向の並びが2組ある場合は、これを段と称して上から上段、下段のように呼び、各段において横に並ぶ各図は、左図、中央図、右図のように称する。
(3) Examples of image data processing (FIGS. 6 to 13)
An example of image processing in the image sensor of this example described above will be specifically described.
In each figure to be referred to, when there are two sets of horizontal arrangements of images, enlarged images, etc., these are referred to as stages, called from the top to the top and bottom, and each figure arranged horizontally in each stage , Left figure, center figure, right figure.

[エッジ変動位置検出処理の例](図6〜図8)
現時刻をtとし、1時刻前を(t−1)、2時刻前を(t−2)…と表す。
図6上段は、エッジ検出手段7により生成されたエッジ画像である。エッジ有りを黒、エッジ無しを白で示した。
[Example of Edge Fluctuation Position Detection Processing] (FIGS. 6 to 8)
Let t be the current time, (t-1) one hour before, (t-2) ... two hours before.
The upper part of FIG. 6 is an edge image generated by the edge detection means 7. Black with an edge and white with no edge.

図6下段は、上段の各エッジ画像の一部を拡大したものである。
各ブロックは画素を表し、黒いブロックはエッジ有り(画素値1)、白いブロックはエッジ無し(画素値0)を示す。
The lower part of FIG. 6 is an enlarged view of a part of each edge image in the upper part.
Each block represents a pixel, a black block has an edge (pixel value 1), and a white block has no edge (pixel value 0).

図7上段左図は差分領域抽出手段6により作成された、時刻tの差分画像を示す。図中に示すように、差分領域には移動物体(侵入者)の差分領域と、動背景物による差分領域が含まれる。   The upper left figure of FIG. 7 shows the difference image at time t created by the difference area extraction means 6. As shown in the figure, the difference area includes the difference area of the moving object (intruder) and the difference area of the moving background object.

図7上段中央図は、エッジ変動位置検出手段8により生成された時刻tの動背景物画像である。エッジ変動位置を黒、なしを白で表した。   The middle diagram in the upper part of FIG. 7 is a moving background object image at time t generated by the edge fluctuation position detection means 8. Edge variation positions are shown in black and none are shown in white.

図7上段右図は、時刻tのエッジ画像を示す。エッジ有りを黒、エッジ無しを白で表した。   The upper right diagram in FIG. 7 shows an edge image at time t. Black with edges and white with no edges.

図7下段は、時刻tの動背景物画像(図7上段中央図)の一部を拡大したものである。各ブロックは画素を表し、黒いブロックはエッジ変動有り(画素値1)、白いブロックはエッジ変動無し(画素値0)を示す。   The lower part of FIG. 7 is an enlarged view of a part of the moving background object image at the time t (the upper middle part of FIG. 7). Each block represents a pixel, a black block indicates edge variation (pixel value 1), and a white block indicates no edge variation (pixel value 0).

ここで、図6及び図7の各画像を構成するいくつかの画素について具体的に検討する。
座標(x1,y1)では、葉の揺れによりエッジの出現と消滅とが繰り返されて、エッジ画像の画素値は10100101となった。変動回数Nf(x1,y1)は6回と計数され、しきい値Tf1以上であるから座標(x1,y1)はエッジ変動位置として検出され、動背景物画像の画素値L(x1,y1)は1となった。
一般に、このエッジ変動には複数の葉によるエッジ変動が含まれている。
Here, specific consideration will be given to several pixels constituting each image of FIGS.
At coordinates (x1, y1), the appearance and disappearance of the edge were repeated due to the shaking of the leaf, and the pixel value of the edge image was 10100101. The number of fluctuations Nf (x1, y1) is counted as 6, and since it is equal to or greater than the threshold value Tf1, the coordinates (x1, y1) are detected as the edge fluctuation position, and the pixel value L (x1, y1) of the moving background object image Became 1.
In general, the edge variation includes edge variation due to a plurality of leaves.

座標(x2,y2)では、侵入者の通過により、時刻(t−8)にエッジが出現して、エッジ画像の画素値は01000000となった。変動回数Nf(x2,y2)は2回と計数され、しきい値Tf1未満であるから座標(x2,y2)はエッジ変動位置としては検出されず、動背景物画像の画素値L(x2,y2)は0となった。   At coordinates (x2, y2), an edge appeared at time (t-8) due to the passage of the intruder, and the pixel value of the edge image was 01000000. The number of fluctuations Nf (x2, y2) is counted twice and is less than the threshold value Tf1, so the coordinates (x2, y2) are not detected as edge fluctuation positions, and the pixel value L (x2, y2) of the moving background object image is detected. y2) was zero.

座標(x3,y3)では、静止している幹の部分のエッジが常に存在して、エッジ画像の画素値は11111111となった。変動回数Nf(x3,y3)は0回と計数され、しきい値Tf1未満であるから座標(x3,y3)はエッジ変動位置としては検出されず、動背景物画像の画素値L(x3,y3)は0となった。   At the coordinates (x3, y3), there is always an edge of the stationary trunk portion, and the pixel value of the edge image is 11111111. The number of fluctuations Nf (x3, y3) is counted as 0, and is less than the threshold value Tf1, so the coordinates (x3, y3) are not detected as the edge fluctuation position, and the pixel value L (x3, x3) of the moving background object image is detected. y3) was zero.

図8左図は、差分領域内におけるエッジ変動位置を示すものである。すなわち、差分領域の外縁を点線で表示し、エッジ変動位置を黒、そうでないものを白で示す。   The left figure of FIG. 8 shows the edge fluctuation position in the difference area. That is, the outer edge of the difference area is indicated by a dotted line, the edge fluctuation position is indicated by black, and the other edge is indicated by white.

図8中央図は、差分領域内における時刻tでのエッジを示すものである。すなわち、差分領域の外縁を点線で表示し、エッジ位置を黒、そうでないものを白で示す。   The center diagram of FIG. 8 shows an edge at time t in the difference area. That is, the outer edge of the difference area is indicated by a dotted line, the edge position is indicated by black, and the other edge is indicated by white.

図8右図は、時刻tの差分領域内において、エッジ変動位置でありエッジである画素を示すものであり、差分領域の外縁を点線で表示し、エッジ変動位置でありエッジである画素を黒、そうでないものを白で示す。この図は、図8左図及び同中央図の2つの画像のANDをとったものであって、両者の合致した部分の数が一致数dとなる。   The right diagram in FIG. 8 shows pixels that are edge fluctuation positions and edges in the difference area at time t. The outer edge of the difference area is indicated by a dotted line, and the pixels that are edge fluctuation positions and edges are black. Those that are not are shown in white. This figure is an AND of the two images of the left figure and the central figure of FIG. 8, and the number of coincident parts of both is the coincidence number d.

エッジ一致度算出手段10においては、まず抽出領域内でエッジの数e(m)をエッジ画像から調べる。同様に抽出領域内でエッジ変動位置かつ現時刻のエッジ位置である画素の数d(m)を動背景物画像とエッジ画像から調べる。そして、r(m)=d(m)/e(m)を計算する。動背景物検出手段11では、r(m)>0.5であれば動背景物を検出したとする。動背景物であれば、エッジでありかつエッジ変動位置である画素は多いのでd(m)が大きく、r(m)も大きくなる。逆に、侵入者であればエッジでありかつエッジ変動位置である画素は少ないのでd(m)は小さく、r(m)も小さくなる。   In the edge coincidence calculation means 10, first, the number of edges e (m) in the extraction region is checked from the edge image. Similarly, the number d (m) of pixels that are the edge fluctuation position and the edge position at the current time in the extraction region is examined from the moving background object image and the edge image. Then, r (m) = d (m) / e (m) is calculated. The moving background object detection means 11 detects a moving background object if r (m)> 0.5. In the case of a moving background object, since there are many pixels that are edges and are edge fluctuation positions, d (m) is large and r (m) is also large. On the other hand, since an intruder has few pixels that are edges and edge fluctuation positions, d (m) is small and r (m) is also small.

動背景物画像は、略線状に検出されているエッジの情報に基づいて生成したので、エッジ変動位置は画像平面上で離散的に分布した状態となっている。このような分布であれば、エッジ変動位置とエッジ位置の一致の確認により動背景物を侵入者から区別して検出することができる。仮に、葉が移動した領域全体に(連続的に)エッジ変動位置が検出されてしまうと(領域が黒で塗りつぶされたような状態になると)、この領域において現時刻にエッジが出現した位置全てがエッジ変動位置と一致して一致度は常に1となってしまい動背景物と侵入者を区別できない。   Since the moving background object image is generated based on the information of the edge detected in a substantially linear shape, the edge fluctuation positions are in a state of being distributed discretely on the image plane. With such a distribution, moving background objects can be distinguished from intruders and detected by confirming the coincidence between the edge fluctuation position and the edge position. If the edge variation position is detected (continuously) in the entire area where the leaf has moved (when the area is filled with black), all the positions where the edge appears at the current time in this area. Coincides with the edge fluctuation position and the degree of coincidence is always 1, so that the moving background object and the intruder cannot be distinguished.

[無エッジ情報に基づくエッジ変動位置補正処理の例](図9〜図11)
現時刻をtとし、1時刻前を(t−1)、2時刻前を(t−2)…と示す。
図9上段と図10上段は、エッジ検出手段7により生成されたエッジ画像であり、エッジ有りを黒、エッジ無しを白で示した。図9下段と図10下段は、図9上段と図10上段に示す各エッジ画像の一部をそれぞれ拡大したものであり、黒いブロックはエッジ有り(画素値1)の画素、白いブロックはエッジ無し(画素値0)の画素を示す。図11上段左図は、エッジ変動位置検出手段8により生成された動背景物画像の一部である。エッジ変動位置を黒、そうでないものを白で示す。図11上段右図は、エッジ変動位置補正手段9により時刻tに生成されたカウンタCnを画像化したものである。説明を分かり易くするため、値がしきい値Tc以上である座標を黒、しきい値Tc未満である座標を白で示す。図11下段は、エッジ変動位置補正手段9により補正された動背景物画像を示す。エッジ変動位置を黒、そうでない位置を白で示す。
[Example of Edge Fluctuation Position Correction Processing Based on No-Edge Information] (FIGS. 9 to 11)
Let t be the current time, (t-1) one hour before, (t-2) ... two hours ago.
The upper part of FIG. 9 and the upper part of FIG. 10 are edge images generated by the edge detection means 7, and the presence of an edge is shown in black and the absence of an edge is shown in white. The lower part of FIG. 9 and the lower part of FIG. 10 are obtained by enlarging a part of each edge image shown in the upper part of FIG. 9 and the upper part of FIG. 10, black blocks are pixels with edges (pixel value 1), and white blocks are no edges. A pixel of (pixel value 0) is shown. The upper left diagram in FIG. 11 is a part of the moving background object image generated by the edge fluctuation position detecting means 8. Edge variation positions are shown in black, and other positions are shown in white. The upper right diagram in FIG. 11 is an image of the counter Cn generated at the time t by the edge fluctuation position correcting means 9. For easy understanding, coordinates whose value is greater than or equal to the threshold value Tc are shown in black, and coordinates whose value is less than the threshold value Tc are shown in white. The lower part of FIG. 11 shows the moving background object image corrected by the edge fluctuation position correcting means 9. The edge fluctuation position is shown in black, and the other position is shown in white.

ここで図9〜図11の各画像を構成するいくつかの画素について具体的に検討する。
まず、エッジ変動位置検出手段8による処理を検討する。
座標(x1,y1)では、侵入者によりエッジの出現と消滅とが一時的に繰り返され、時刻(t−9)から(t−1)のエッジ画像の画素値は10000010となった。そのため、時刻tに変動回数Nf(x1,y1)は3と計数されてしきい値Tf1以上となり、侵入者による変動であるにもかかわらず座標(x1,y1)はエッジ変動位置として誤検出され、動背景物画像の画素値L(x1,y1)は1となった。他にも2箇所の誤検出が生じた。
Here, a number of pixels constituting each of the images in FIGS. 9 to 11 will be specifically examined.
First, the processing by the edge fluctuation position detection means 8 will be examined.
At coordinates (x1, y1), the appearance and disappearance of an edge were temporarily repeated by an intruder, and the pixel value of the edge image from time (t-9) to (t-1) was 10000010. Therefore, the number of fluctuations Nf (x1, y1) is counted as 3 at time t and becomes equal to or greater than the threshold value Tf1, and the coordinate (x1, y1) is erroneously detected as an edge fluctuation position despite the fluctuation caused by the intruder. The pixel value L (x1, y1) of the moving background object image is 1. Two other false detections occurred.

次に、エッジ変動位置補正手段9による処理を検討する。
座標(x1,y1)では、時刻(t−25)から(t−18)に渡りエッジが検出されず、時刻(t−17)にて無エッジ回数Nn(x1,y1)は8と計数されてしきい値Tn以上となり、カウンタCn(x1,y1)は1となった。その後、時刻(t−16)から(t−9)でも無エッジ回数は8と計数されてカウンタは増加し、時刻(t−9)にてカウンタCn(x1,y1)はしきい値Tc以上の9となり、座標(x1,y1)は補正の対象となった。更に、時刻(t−9)からtに至ってもカウンタは減少せずに座標(x1,y1)は補正の対象であり続けた。
Next, processing by the edge fluctuation position correcting means 9 will be considered.
At coordinates (x1, y1), no edge is detected from time (t-25) to (t-18), and the number of edgeless times Nn (x1, y1) is counted as 8 at time (t-17). Thus, the threshold value Tn is exceeded and the counter Cn (x1, y1) is 1. Thereafter, even from time (t-16) to (t-9), the number of edgeless times is counted as 8, and the counter is increased. At time (t-9), the counter Cn (x1, y1) is equal to or greater than the threshold value Tc. 9 and the coordinates (x1, y1) were to be corrected. Further, even when the time (t-9) reaches t, the counter does not decrease and the coordinates (x1, y1) continue to be corrected.

時刻tにおいて、座標(x1,y1)は補正の対象であるため、動背景物画像の画素値L(x1,y1)は1から0へと補正された。他に誤検出されていた2箇所についても同様にして動背景物画像の画素値は0に補正された。   Since the coordinates (x1, y1) are correction targets at time t, the pixel value L (x1, y1) of the moving background object image is corrected from 1 to 0. The pixel values of the moving background object image were corrected to 0 in the same manner for the other two erroneously detected locations.

[定在エッジ情報に基づくエッジ変動位置補正処理の例](図12及び図13)
現時刻をtとし、1時刻前を(t−1)、2時刻前を(t−2)…と表す。
図12上段は、エッジ検出手段7により生成されたエッジ画像を表す。エッジ有りを黒、エッジ無しを白で示した。図12下段は、図12上段に示す各エッジ画像の一部をそれぞれ拡大したものである。黒いブロックはエッジ有り(画素値1)の画素、白いブロックはエッジ無し(画素値0)の画素を示す。図13上段左図は、エッジ変動位置検出手段8により生成された動背景物画像を示す。黒いブロックはエッジ変動あり、白いブロックはエッジ変動なしを示す。図13上段右図は、エッジ変動位置補正手段9により生成された定在エッジ画像の一部である。黒いブロックはエッジ定在位置を、白いブロックはそうでない位置を示す。図13下段は、エッジ変動位置補正手段9により補正された動背景物画像である。黒いブロックはエッジ変動あり、白いブロックはエッジ変動なしを示す。
[Example of edge variation position correction processing based on standing edge information] (FIGS. 12 and 13)
Let t be the current time, (t-1) one hour before, (t-2) ... two hours before.
The upper part of FIG. 12 represents the edge image generated by the edge detection means 7. Black with an edge and white with no edge. The lower part of FIG. 12 is an enlarged view of a part of each edge image shown in the upper part of FIG. A black block indicates a pixel with an edge (pixel value 1), and a white block indicates a pixel without an edge (pixel value 0). The upper left figure in FIG. 13 shows a moving background object image generated by the edge fluctuation position detecting means 8. Black blocks indicate edge fluctuations, and white blocks indicate no edge fluctuations. The upper right diagram in FIG. 13 is a part of the standing edge image generated by the edge fluctuation position correcting means 9. The black block indicates the edge standing position, and the white block indicates the position where it is not. The lower part of FIG. 13 is a moving background object image corrected by the edge fluctuation position correcting means 9. Black blocks indicate edge fluctuations, and white blocks indicate no edge fluctuations.

座標(x1,y1)、(x1,y2)、(x1,y3)では、静止物体である家のエッジが常に存在していて、エッジ画像における画素値は11111111となった。エッジ変動位置検出手段8ではこれらの座標における変動回数は0と計数されて動背景物画像の画素値は0となった。一方、エッジ変動位置補正手段9では、これらの座標における有エッジ回数は8と計数されて定在エッジ画像の画素値は1となった。   At coordinates (x1, y1), (x1, y2), and (x1, y3), the edge of the house, which is a stationary object, always exists, and the pixel value in the edge image is 11111111. In the edge fluctuation position detecting means 8, the number of fluctuations in these coordinates is counted as 0, and the pixel value of the moving background object image becomes 0. On the other hand, in the edge fluctuation position correcting means 9, the number of edges with these coordinates is counted as 8, and the pixel value of the standing edge image is 1.

座標(x2,y2)に出現するエッジも家のエッジであるが、照明変動により出現と消滅とを繰り返して、エッジ画像における画素値は10111110となった。そのため、エッジ変動位置検出手段8にて変動回数Nf(x2,y2)は3と計数されてしきい値Tf1以上となり、座標(x2,y2)はエッジ変動位置として誤検出され、動背景物画像の画素値L(x2,y2)は1となった。他にも3箇所の誤検出が生じた。   The edge that appears at the coordinates (x2, y2) is also the edge of the house, but the appearance and disappearance were repeated due to illumination fluctuations, and the pixel value in the edge image was 10111110. Therefore, the edge fluctuation position detection means 8 counts the number of fluctuations Nf (x2, y2) to be equal to or greater than the threshold value Tf1, and the coordinate (x2, y2) is erroneously detected as the edge fluctuation position, and the moving background object image The pixel value L (x2, y2) of was 1. Three other misdetections occurred.

しかしながら、定在エッジ画像において座標(x2,y2)の近傍である(x1,y1)、(x1,y2)、(x1,y3)の画素値が1であったため、エッジ変動位置補正手段9にて、近傍定在エッジ数Ns(x2,y2)は3と計数されてしきい値Ts以上となったため、動背景物画像の画素値L(x2,y2)は1から0へと補正された。他に誤検出されていた3箇所についても同様にして動背景物画像の画素値は0に補正された。   However, since the pixel values of (x1, y1), (x1, y2), (x1, y3) near the coordinates (x2, y2) in the standing edge image are 1, the edge fluctuation position correction means 9 Thus, the number of neighboring standing edges Ns (x2, y2) is counted as 3 and becomes equal to or greater than the threshold value Ts, so that the pixel value L (x2, y2) of the moving background object image is corrected from 1 to 0. . The pixel values of the moving background object image were corrected to 0 in the same manner at the other three locations that were erroneously detected.

図1は、本例の画像センサの構成を示す機能ブロック図である。FIG. 1 is a functional block diagram showing the configuration of the image sensor of this example. 図2は本例の画像センサの基本動作の全体を示す流れ図である。FIG. 2 is a flowchart showing the entire basic operation of the image sensor of this example. 図3は前記基本動作におけるエッジ変動位置検出処理を示す流れ図である。FIG. 3 is a flowchart showing the edge variation position detection process in the basic operation. 図4は前記基本動作におけるエッジ変動位置補正処理を示す流れ図である。FIG. 4 is a flowchart showing the edge variation position correction process in the basic operation. 図5は前記基本動作におけるエッジ一致度算出処理を示す流れ図である。FIG. 5 is a flowchart showing an edge matching degree calculation process in the basic operation. 図6は前記エッジ変動位置検出処理の一例の説明図である。FIG. 6 is an explanatory diagram of an example of the edge variation position detection process. 図7は前記エッジ変動位置検出処理の一例の説明図である。FIG. 7 is an explanatory diagram of an example of the edge variation position detection process. 図8は前記エッジ変動位置検出処理の一例の説明図である。FIG. 8 is an explanatory diagram of an example of the edge variation position detection process. 図9は前記エッジ変動位置補正処理の一例の説明図である。FIG. 9 is an explanatory diagram of an example of the edge variation position correction process. 図10は前記エッジ変動位置補正処理の一例の説明図である。FIG. 10 is an explanatory diagram of an example of the edge variation position correction process. 図11は前記エッジ変動位置補正処理の一例の説明図である。FIG. 11 is an explanatory diagram of an example of the edge variation position correction process. 図12は前記エッジ変動位置補正処理の一例の説明図である。FIG. 12 is an explanatory diagram of an example of the edge variation position correction process. 図13は前記エッジ変動位置補正処理の一例の説明図である。FIG. 13 is an explanatory diagram of an example of the edge variation position correction process.

符号の説明Explanation of symbols

1…撮像部
2…画像取得部
3…制御部
4…記憶部
5…出力部
6…差分領域抽出手段
7…エッジ検出手段
8…エッジ変動位置検出手段
9…エッジ変動位置補正手段
10…エッジ一致度算出手段
11…動背景物検出手段
12…侵入者検出手段
DESCRIPTION OF SYMBOLS 1 ... Imaging part 2 ... Image acquisition part 3 ... Control part 4 ... Memory | storage part 5 ... Output part 6 ... Difference area extraction means 7 ... Edge detection means 8 ... Edge fluctuation position detection means 9 ... Edge fluctuation position correction means 10 ... Edge matching Degree calculation means 11 ... Moving background object detection means 12 ... Intruder detection means

Claims (5)

監視空間を撮像した監視画像を順次取得し、前記監視空間に存在する動背景物を、前記監視画像上の特定の画素においてエッジの出現と消滅が繰り返される現象から検出する画像センサであって、
前記監視画像の各位置におけるエッジの有無を検出しエッジ位置を記憶するエッジ検出手段と、
過去の第一の所定時間内に前記エッジ検出手段が検出したエッジの有無が第一の所定回数である3回以上変動したエッジ変動位置を検出するエッジ変動位置検出手段と、
前記監視画像と予め記憶した背景画像との差分領域を抽出する差分領域抽出手段と、
前記差分領域内における前記エッジ位置と前記エッジ変動位置の一致度を算出するエッジ一致度算出手段と、
前記一致度が所定値以上である前記差分領域を動背景物として検出する動背景物検出手段と、
を具備することを特徴とする画像センサ。
Sequentially acquires the monitor image of the captured monitoring space, the pre-Symbol dynamic background object present in the monitoring space, an image sensor for detecting the phenomenon that the disappearance in a particular pixel on the monitoring image and the appearance of the edges is repeated ,
Edge detection means for detecting the presence or absence of an edge at each position of the monitoring image and storing the edge position;
Edge fluctuation position detection means for detecting an edge fluctuation position that has changed three or more times , the presence or absence of the edge detected by the edge detection means within the first predetermined time in the past being a first predetermined number of times ;
A difference area extracting means for extracting a difference area between the monitoring image and the background image stored in advance;
An edge matching degree calculating means for calculating a matching degree between the edge position and the edge fluctuation position in the difference region;
A moving background object detecting means for detecting the difference region having the matching degree equal to or greater than a predetermined value as a moving background object;
An image sensor comprising:
前記第一の所定時間以上の長さを有する過去の第二の所定時間内に前記エッジ検出手段がエッジを検出しなかった回数が第二の所定回数以上である位置を前記エッジ変動位置から除外するエッジ変動位置補正手段を更に具備する請求項1に記載の画像センサ。 Positions where the number of times the edge detection means did not detect an edge within the second predetermined time in the past having a length equal to or longer than the first predetermined time are excluded from the edge fluctuation position. The image sensor according to claim 1, further comprising an edge variation position correcting unit that performs the operation. 前記第一の所定時間を含む第三の所定時間内に前記エッジ検出手段がエッジを検出した回数が第三の所定回数以上であるエッジ定在位置を検出し、エッジ定在位置に隣接する位置を前記エッジ変動位置から除外するエッジ変動位置補正手段を具備する請求項1又は2に記載の画像センサ。 A position adjacent to the edge standing position by detecting an edge standing position where the number of times the edge detecting means detects an edge within a third predetermined time including the first predetermined time is equal to or more than a third predetermined number of times. The image sensor according to claim 1, further comprising an edge fluctuation position correcting unit that excludes the edge fluctuation position from the edge fluctuation position. 更に前記差分領域における前記監視画像から侵入者の特徴量を抽出し、該特徴量が所定基準を超えると侵入者を検出する侵入者検出手段を具備し、
前記侵入者検出手段は、動背景物検出手段が動背景物を検出したときに前記所定基準を高く変更する請求項1乃至3のいずれかひとつに記載の画像センサ。
Furthermore, it comprises an intruder detection means for extracting an intruder feature amount from the monitoring image in the difference area, and detecting the intruder when the feature amount exceeds a predetermined reference,
The image sensor according to any one of claims 1 to 3 , wherein the intruder detection unit changes the predetermined reference to a high level when the moving background object detection unit detects the moving background object.
前記動背景物検出手段が動背景物を検出しなかった前記差分領域において前記監視画像から侵入者の特徴量を抽出し、該特徴量が所定基準を超えると侵入者を検出する侵入者検出手段を具備する請求項1乃至3のいずれかひとつに記載の画像センサ。 Intruder detection means for extracting an intruder feature amount from the monitoring image in the difference area where the moving background object detection means did not detect a moving background object, and detecting the intruder when the feature amount exceeds a predetermined reference image sensor according to any one of claims 1 to 3 comprising a.
JP2006067786A 2006-03-13 2006-03-13 Image sensor Active JP4828265B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006067786A JP4828265B2 (en) 2006-03-13 2006-03-13 Image sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006067786A JP4828265B2 (en) 2006-03-13 2006-03-13 Image sensor

Publications (2)

Publication Number Publication Date
JP2007249270A JP2007249270A (en) 2007-09-27
JP4828265B2 true JP4828265B2 (en) 2011-11-30

Family

ID=38593547

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006067786A Active JP4828265B2 (en) 2006-03-13 2006-03-13 Image sensor

Country Status (1)

Country Link
JP (1) JP4828265B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4959736B2 (en) * 2009-02-27 2012-06-27 東芝テリー株式会社 Image processing apparatus and background image detection processing program
JP5903308B2 (en) * 2012-03-27 2016-04-13 セコム株式会社 Image monitoring device
JP6658402B2 (en) * 2016-08-26 2020-03-04 富士通株式会社 Frame rate determination device, frame rate determination method, and computer program for frame rate determination
JP7024239B2 (en) * 2017-07-25 2022-02-24 オムロン株式会社 Image processing system, image processing device and image processing program

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0729015A (en) * 1993-07-14 1995-01-31 Toshiba Corp Picture recognition device
JPH10111939A (en) * 1996-10-08 1998-04-28 Mitsubishi Electric Corp On-vehicle image processor
JP2000105835A (en) * 1998-07-28 2000-04-11 Hitachi Denshi Ltd Object recognizing method and object tracking and monitoring device
JP2003169319A (en) * 2001-11-30 2003-06-13 Mitsubishi Electric Corp Image-monitoring apparatus
JP4042602B2 (en) * 2003-03-26 2008-02-06 松下電工株式会社 Image processing device
JP4401842B2 (en) * 2004-03-31 2010-01-20 セコム株式会社 Image processing apparatus and intruder detection apparatus
JP4671737B2 (en) * 2005-03-31 2011-04-20 能美防災株式会社 Image processing device

Also Published As

Publication number Publication date
JP2007249270A (en) 2007-09-27

Similar Documents

Publication Publication Date Title
JP4811653B2 (en) Object detection device
US7982774B2 (en) Image processing apparatus and image processing method
JP4832894B2 (en) Image sensor
US20160117837A1 (en) Modification of at least one parameter used by a video processing algorithm for monitoring of a scene
KR20020034919A (en) Monitoring method for detecting an intruding object and monitoring apparatus therefor
US20110280478A1 (en) Object monitoring system and method
JP5060264B2 (en) Human detection device
JP2011123742A (en) Intruding object detector
JP4828265B2 (en) Image sensor
JP3721071B2 (en) Intruder detection system
JP7125843B2 (en) Fault detection system
JP7074174B2 (en) Discriminator learning device, discriminator learning method and computer program
JP2007180932A (en) Image sensor
JP4789223B2 (en) Intruder monitoring system
JP5142416B2 (en) Object detection device
JP2012088861A (en) Intrusion object detection device
JP2007201933A (en) Monitoring device using image
JPH10289321A (en) Image monitoring device
JP2000341679A (en) Picture recognizing device and monitoring device
US9842406B2 (en) System and method for determining colors of foreground, and computer readable recording medium therefor
JP6155106B2 (en) Image sensor
JP2009245200A (en) Smoke detection device
JP3736836B2 (en) Object detection method, object detection apparatus, and program
JP2002218443A (en) Intruding object detecting method for automatically determining threshold for intruding object detection and intruding object monitor
JP6124739B2 (en) Image sensor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081217

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110520

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110607

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110802

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: 20110830

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110914

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

Free format text: PAYMENT UNTIL: 20140922

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4828265

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250