JP6529526B2 - Background image generation device and object detection device - Google Patents

Background image generation device and object detection device Download PDF

Info

Publication number
JP6529526B2
JP6529526B2 JP2017013138A JP2017013138A JP6529526B2 JP 6529526 B2 JP6529526 B2 JP 6529526B2 JP 2017013138 A JP2017013138 A JP 2017013138A JP 2017013138 A JP2017013138 A JP 2017013138A JP 6529526 B2 JP6529526 B2 JP 6529526B2
Authority
JP
Japan
Prior art keywords
background
image
model
background image
control signal
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
JP2017013138A
Other languages
Japanese (ja)
Other versions
JP2018121289A (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 JP2017013138A priority Critical patent/JP6529526B2/en
Publication of JP2018121289A publication Critical patent/JP2018121289A/en
Application granted granted Critical
Publication of JP6529526B2 publication Critical patent/JP6529526B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、所定の空間の背景物の三次元モデルから当該空間の背景画像を生成する背景画像生成装置、および、生成した背景画像を撮影画像と比較することによって当該空間の物体を検出する物体検出装置に関する。   The present invention relates to a background image generating device for generating a background image of a space from a three-dimensional model of a background of a predetermined space, and an object for detecting an object in the space by comparing the generated background image with a photographed image. It relates to a detection device.

防犯等の目的で、監視空間を撮影した撮影画像を背景差分処理あるいは背景相関処理して、監視空間に現れた人や不審物などの物体を検出する技術が知られている。これらの処理においては、人や不審物が写っていない背景画像を随時生成する必要がある。   There is known a technique for detecting an object such as a person or a suspicious object appearing in a monitoring space by subjecting a photographed image obtained by photographing the monitoring space to background subtraction processing or background correlation processing for the purpose of crime prevention and the like. In these processes, it is necessary to generate a background image free of people and suspicious objects at any time.

ところが、イベント会場など多くの人が行き交う混雑空間においては人や不審物が写っていないシーンの出現頻度が低いため背景画像の生成が難しい。   However, it is difficult to generate a background image in a crowded space where many people come and go, such as at event venues, because the frequency of appearance of scenes where people and suspicious objects are not appearing is low.

そこで、従来、監視空間の背景物の三次元モデル(背景モデル)をレンダリングして背景画像を生成していた。例えば、下記特許文献1,2に記載の物体検出装置においては、まず、背景モデルの照明条件や半固定物を複数通りに変動させてレンダリングし、撮影画像に最も類似するレンダリング画像を背景画像として選出する。あるいは、さらに撮影画像に最も類似するレンダリング画像に対して撮影画像に近づける補正を行って背景画像を生成する。   Therefore, conventionally, a three-dimensional model (background model) of the background object of the monitoring space is rendered to generate a background image. For example, in the object detection apparatus described in Patent Documents 1 and 2 below, first, the illumination condition of the background model and the semi-fixed object are varied and rendered in a plurality of ways, and the rendering image most similar to the photographed image is used as the background image. elect. Alternatively, the rendered image most similar to the captured image is corrected to be close to the captured image to generate a background image.

特開2016−194778号公報Unexamined-Japanese-Patent No. 2016-194778 特開2016−194779号公報JP, 2016-194779, A

しかしながら、上述の先行技術においては、撮影画像に写っている背景以外の物体の影響で、生成した背景画像について撮影画像に対する過剰な近似が生じる場合があり、背景画像の誤差が大きくなる要因や物体検出精度が低下する要因となっていた。   However, in the above-described prior art, the generated background image may have an excessive approximation with respect to the captured image due to the influence of an object other than the background appearing in the captured image, which may cause an error in the background image or an object This has been a factor in the decrease in detection accuracy.

例えば、撮影画像に明るい色の服を着た人が多くまたは大きく写っている場合に、照明が点灯していなくてもこれらの人が写ったことによって撮影画像が明るくなり得る。このような場合に、撮影画像に最も類似するレンダリング画像を背景画像として選出する、あるいはさらにレンダリング画像を撮影画像に近づける補正を無制限に行うと、実際の照明条件よりも輝度の高い背景画像が生成されて誤差が大きくなり、人の服の部分が検出されにくくなったり、人以外の部分が検出されやすくなったりする。   For example, in the case where many people wearing bright clothes are included in the captured image, the captured image may be brightened even if the light is not lit. In such a case, if the rendering image most similar to the captured image is selected as the background image, or if the correction is made to make the rendered image closer to the captured image without restriction, a background image having a higher luminance than the actual lighting condition is generated. As a result, the error increases, making it difficult to detect parts of human clothes or making it easier to detect parts other than people.

また、先行技術においては、照明条件や半固定物の状態を探索する範囲が広かったため、背景画像を生成する処理の負荷が大きかった。   In addition, in the prior art, the range of searching for the lighting conditions and the state of the semi-fixed object is wide, so the processing load for generating the background image is heavy.

本発明は上記問題を鑑みてなされたものであり、撮影画像に背景以外の物体が写っていても背景物の三次元モデルに基づく背景画像の生成を高精度で低負荷に行うことができる背景画像生成装置、および、生成した背景画像を用いて背景以外の物体を高精度に検出できる物体検出装置を提供することを目的とする。   The present invention has been made in view of the above problems, and it is possible to generate a background image based on a three-dimensional model of a background with high accuracy and low load even if an object other than the background appears in the captured image. An object of the present invention is to provide an image generation device and an object detection device capable of detecting an object other than the background with high accuracy using the generated background image.

(1)本発明に係る背景画像生成装置は、カメラによる所定の空間の撮影に対し、当該空間に存在する背景物の画像であり前記撮影に対応したタイミングでの背景画像を生成する装置であって、前記背景物の三次元モデルであって背景物それぞれの光学的な特徴量又は三次元座標値をモデルパラメータとして含む背景モデルを記憶している記憶手段と、前記背景物に含まれる所定の機器の動作を制御する制御信号を取得する制御信号取得手段と、取得した前記制御信号により生じる前記機器の動作状態に応じて当該機器の前記モデルパラメータを変更した背景モデルを生成するモデル生成手段と、前記モデル生成手段により生成された前記背景モデルを、前記カメラの撮影面にレンダリングして前記背景画像を生成する背景画像生成手段と、を備える。   (1) The background image generating apparatus according to the present invention is an apparatus for generating a background image at a timing corresponding to the photographing, which is an image of a background object existing in the space with respect to photographing of a predetermined space by a camera. Storage means for storing a background model which is a three-dimensional model of the background and which includes optical feature quantities or three-dimensional coordinate values of each of the background as model parameters, and a predetermined one included in the background Control signal acquisition means for acquiring a control signal for controlling the operation of the device; Model generation means for generating a background model in which the model parameter of the device is changed according to the operation state of the device generated by the acquired control signal Background image generation means for rendering the background model generated by the model generation means on a shooting surface of the camera to generate the background image; Provided.

(2)上記(1)に記載する背景画像生成装置は、前記カメラにより前記空間を撮影した撮影画像を取得する撮影画像取得手段をさらに有し、前記モデル生成手段は、前記制御信号取得手段が前記制御信号を取得すると、当該制御信号に対して予め想定される前記モデルパラメータの変化範囲にて前記モデルパラメータが異なる複数の前記背景モデルを生成し、前記背景画像生成手段は、前記複数の背景モデルのそれぞれを前記撮影面にレンダリングして複数のレンダリング画像を生成し、当該レンダリング画像のうち前記撮影画像との相違度が最小のものを用いて前記背景画像を生成する構成とすることができる。   (2) The background image generating device described in the above (1) further includes a photographed image acquiring unit that acquires a photographed image obtained by photographing the space with the camera, and the model generation unit is the control signal acquiring unit. When the control signal is acquired, a plurality of the background models having different model parameters in a variation range of the model parameter assumed in advance with respect to the control signal are generated, and the background image generation unit generates the plurality of backgrounds Each of the models may be rendered on the imaging plane to generate a plurality of rendering images, and the background image may be generated using one of the rendering images that has the least degree of difference from the imaging image. .

(3)上記(2)に記載する背景画像生成装置において、前記背景画像生成手段は、前記相違度が最小の前記レンダリング画像の画素値を所定限度内で変化させることで当該レンダリング画像を前記撮影画像に近づける補正を行って前記背景画像を生成する構成とすることができる。   (3) In the background image generation device described in (2), the background image generation unit changes the pixel value of the rendered image with the smallest degree of difference within a predetermined limit, thereby capturing the rendered image. The background image may be generated by performing correction close to the image.

(4)上記(2)および(3)に記載する背景画像生成装置において、前記制御信号に対する前記モデルパラメータの前記変化範囲は、当該制御信号に対応する目標範囲と当該目標範囲への移行途中の範囲とからなり、前記モデル生成手段は、所定期間以上続けて、前記背景画像に対応する前記モデルパラメータの変化が所定の閾値以下であり、且つ当該モデルパラメータが前記目標範囲内である場合、新たな前記目標範囲への移行を指示する前記制御信号が取得されるまで、前記変化範囲のうち前記目標範囲のみについて前記モデルパラメータが異なる複数の前記背景モデルを生成する構成とすることができる。   (4) In the background image generation device described in the above (2) and (3), the change range of the model parameter with respect to the control signal is a target range corresponding to the control signal and a transition to the target range. The model generation unit is configured to continuously generate a new value when the change of the model parameter corresponding to the background image is equal to or less than a predetermined threshold and the model parameter is within the target range continuously for a predetermined period or more. The plurality of background models having different model parameters may be generated only for the target range within the change range until the control signal instructing transition to the target range is acquired.

(5)上記(1)に記載する背景画像生成装置において、前記背景画像生成手段は、前記モデル生成手段により生成された前記背景モデルを前記撮影面にレンダリングしたレンダリング画像を生成し、当該レンダリング画像の画素値を所定限度内で変化させることで当該レンダリング画像を前記撮影画像に近づける補正を行って前記背景画像を生成する構成とすることができる。   (5) In the background image generating device described in the above (1), the background image generating means generates a rendered image by rendering the background model generated by the model generating means on the photographing surface, and the rendered image The background image can be generated by performing correction that brings the rendering image closer to the captured image by changing the pixel value of the pixel within a predetermined limit.

(6)本発明に係る物体検出装置は、上記(1)〜(5)に記載する背景画像生成装置が前記カメラの撮影タイミングに対応して生成した前記背景画像を、前記カメラが当該撮影タイミングにて前記空間を撮影した撮影画像と比較して、前記背景物以外の物体を前記空間にて検出する。   (6) In the object detection device according to the present invention, the camera generates the background image generated by the background image generation device described in the above (1) to (5) in response to the shooting timing of the camera. The object other than the background object is detected in the space in comparison with the photographed image obtained by photographing the space in

本発明の背景画像生成装置によれば、撮影画像に背景以外の物体が写っていても高精度で低負荷に背景画像を生成することが可能となる。また本発明の物体検出装置によれば、上記背景画像を用いて背景以外の物体を高精度に検出することが可能となる。   According to the background image generation device of the present invention, even when an object other than the background is shown in the photographed image, it is possible to generate the background image with high accuracy and low load. Further, according to the object detection device of the present invention, it is possible to detect an object other than the background with high accuracy using the background image.

本発明の実施形態に係る物体検出装置の概略の構成を示すブロック図である。It is a block diagram showing a schematic structure of an object detection device concerning an embodiment of the present invention. 制御信号により動作を制御される機器の構成例を示す概略のブロック図である。FIG. 2 is a schematic block diagram showing an example of configuration of a device whose operation is controlled by a control signal. 本発明の実施形態に係る物体検出装置の概略の機能ブロック図である。1 is a schematic functional block diagram of an object detection device according to an embodiment of the present invention. 機器が1つの電灯で構成される照明機器である場合のモデル制御情報を説明する模式図である。It is a schematic diagram explaining model control information in case an apparatus is a lighting apparatus comprised with one light. 機器が3つの電灯で構成される照明機器である場合のモデル制御情報を説明する模式図である。It is a schematic diagram explaining model control information in case an apparatus is a lighting apparatus comprised with three lights. 機器が自動ドアである場合のモデル制御情報を説明する模式図である。It is a schematic diagram explaining model control information in case an apparatus is an automatic door. モデル生成手段による背景モデルの生成の例を説明する模式図である。It is a schematic diagram explaining the example of production | generation of the background model by a model production | generation means. 本発明の実施形態に係る物体検出装置の概略の動作を示すフロー図である。It is a flowchart which shows the general | schematic operation | movement of the object detection apparatus based on embodiment of this invention. 本発明の実施形態に係る物体検出装置の概略の動作を示すフロー図である。It is a flowchart which shows the general | schematic operation | movement of the object detection apparatus based on embodiment of this invention.

以下、本発明の実施の形態(以下、実施形態という)について、図面に基づいて説明する。本発明の実施形態として、監視カメラが撮影した画像から所定の空間(監視空間)に現れた人などの物体(背景物以外の物体)を検出する物体検出装置1の例を説明する。背景物は監視空間を構成する構成物であり、建築構造物や設備などの常設物体である。これに対し、背景物以外の物体は監視空間に一時的に出現する人や車輌などの物体である。   Hereinafter, embodiments of the present invention (hereinafter, referred to as embodiments) will be described based on the drawings. As an embodiment of the present invention, an example of an object detection apparatus 1 for detecting an object (an object other than a background object) such as a person appearing in a predetermined space (monitoring space) from an image captured by a surveillance camera will be described. Background objects are components constituting a surveillance space, and are permanent objects such as building structures and facilities. On the other hand, objects other than background objects are objects such as people and vehicles that temporarily appear in the monitoring space.

図1は物体検出装置1の概略の構成を示すブロック図である。監視空間を構成する背景物には機器2が含まれる。本実施形態における機器2は背景物のうち制御信号に基づき動作して動作状態が変化するものであり、機器2はその動作により画像に変化を生じさせる。監視空間に背景物として存在する機器2は例えば、照明機器や自動ドアである。一方、機器2以外の背景物は例えば、床、壁、机、手動のドアである。   FIG. 1 is a block diagram showing a schematic configuration of the object detection device 1. The background object that constitutes the surveillance space includes the device 2. The device 2 in the present embodiment is operated based on the control signal among the background objects to change the operation state, and the device 2 causes a change in the image by the operation. The devices 2 present as background objects in the monitoring space are, for example, lighting devices and automatic doors. On the other hand, backgrounds other than the device 2 are, for example, a floor, a wall, a desk, and a manual door.

物体検出装置1は例えば、照明機器による明るさ変化などに適合した背景画像を生成する背景画像生成装置を含み、背景画像を撮影画像と比較することによって物体の出現により変化した領域を検出する。具体的には、物体検出装置1は機器インターフェース部3、カメラ4、記憶部5、画像処理部6およびユーザーインターフェース部7を備える。なお、背景画像は理想的には背景物のみを撮影した画像であり、本発明においては背景物のみを撮影した画像をコンピュータグラフィックスにより模した画像である。   The object detection device 1 includes, for example, a background image generation device that generates a background image adapted to a change in brightness due to a lighting device, and detects a region changed due to the appearance of an object by comparing the background image with a photographed image. Specifically, the object detection device 1 includes a device interface unit 3, a camera 4, a storage unit 5, an image processing unit 6, and a user interface unit 7. The background image is ideally an image obtained by capturing only the background, and in the present invention, an image obtained by capturing only the background is simulated by computer graphics.

機器2は、物体検出装置1の機器インターフェース部3と接続され、物体検出装置1の画像処理部6は、機器2の動作を制御する制御信号を機器2から機器インターフェース部3を介して取得する。   The device 2 is connected to the device interface unit 3 of the object detection device 1, and the image processing unit 6 of the object detection device 1 obtains a control signal for controlling the operation of the device 2 from the device 2 via the device interface unit 3. .

図2は機器2の構成例を示す概略のブロック図である。図2(a)に示す機器2aは1つのスイッチ20により1つの電灯21の点灯/消灯動作を制御する照明機器である。また、図2(b)に示す機器2bは1つのスイッチ20により3つの電灯21(電灯A〜C)の点灯/消灯動作を一括して制御する照明機器である。例えば、電灯21は蛍光灯または白熱灯などである。照明機器である機器2a,2bは例えば、スイッチ20がON状態とされると電灯21が通電されて点灯し、スイッチがOFF状態とされると電灯21への通電が停止されて消灯する。ちなみに、オフィスや工場などの照明機器は機器2bのような形態に構成されていることが多い。   FIG. 2 is a schematic block diagram showing a configuration example of the device 2. The device 2 a shown in FIG. 2A is a lighting device that controls the on / off operation of one lamp 21 by one switch 20. Moreover, the apparatus 2b shown in FIG.2 (b) is a lighting apparatus which controls collectively the lighting / light extinction operation | movement of three lights 21 (lights AC) by one switch 20. FIG. For example, the light 21 is a fluorescent lamp or an incandescent lamp. For example, when the switch 20 is turned on, the light 21 is energized and turned on when the switch 20 is turned on, and when the switch is turned off, the light 21 is stopped and turned off. By the way, lighting equipment such as an office or a factory is often configured in a form like the equipment 2b.

スイッチ20が機械式の場合、電灯21に印加される電圧/電流が当該電灯21の点灯/消灯動作を制御する制御信号に相当する。この場合、機器2a,2bは、電灯21に印加される電気信号自体を制御信号として物体検出装置1に出力してもよいし、当該電気信号からその印加の有無を表す信号を別途生成して物体検出装置1に出力してもよい。例えば、機器2a,2bは、スイッチ20がON状態であるとき所定の高電圧(ハイレベル)となり、一方、スイッチ20がOFF状態であるとき所定の低電圧(ローレベル)となる電気信号を物体検出装置1に出力する。また、スイッチ20がトランジスタなど電子的にON/OFFを切り替える素子で構成される場合には、スイッチ20のON/OFFを切り替える電気信号を制御信号として取り出すことができる。   When the switch 20 is a mechanical switch, the voltage / current applied to the lamp 21 corresponds to a control signal for controlling the on / off operation of the lamp 21. In this case, the devices 2a and 2b may output the electrical signal itself applied to the light 21 as a control signal to the object detection device 1, or separately generate a signal representing the presence or absence of the application from the electrical signal. It may be output to the object detection device 1. For example, when the switch 20 is in the ON state, the devices 2a and 2b have a predetermined high voltage (high level), and when the switch 20 is in the OFF state, the devices 2a and 2b have electric signals that become the predetermined low voltage (low level) Output to the detection device 1. In addition, when the switch 20 is configured by an element such as a transistor that electronically switches ON / OFF, an electric signal that switches ON / OFF of the switch 20 can be extracted as a control signal.

図2(c)に示す機器2cは人感センサ22の出力に応じてドア23が開閉するタイプの自動ドアである。すなわち、人感センサ22のセンサ出力信号が自動ドア2cの開閉動作を制御する制御信号である。具体的には人感センサ22は例えば、人を検知している間はハイレベルの電圧を出力し、一方、人を検知していない間はローレベルの電圧を出力する。このセンサ出力信号のローレベルからハイレベルへの電圧変化がドア23を開いて閉じる動作指示を表す制御信号として利用される。また、ドア23の閉状態のときのローレベルの電圧をドア23の閉状態を維持する動作指示を表す制御信号として利用できる。   The device 2 c shown in FIG. 2C is an automatic door of a type in which the door 23 opens and closes in accordance with the output of the human sensor 22. That is, the sensor output signal of the human sensor 22 is a control signal for controlling the opening and closing operation of the automatic door 2c. Specifically, for example, the human sensor 22 outputs a high level voltage while detecting a human, and outputs a low level voltage while not detecting a human. The voltage change from the low level to the high level of the sensor output signal is used as a control signal representing an operation instruction to open and close the door 23. Further, the low level voltage when the door 23 is in the closed state can be used as a control signal representing an operation instruction for maintaining the door 23 in the closed state.

画像処理部6は機器2の制御信号の変化から当該機器2の動作が移行する契機、すなわち監視空間の環境(背景)の変化の契機を認識することができる。制御信号の変化は、撮影画像を取得するたびに制御信号を記憶部5に記憶しておき、今回の制御信号を前回の制御信号と比較することで検出できる。あるいは、制御信号の変化は、前回撮影画像を取得してから今回撮影画像を取得するまでの制御信号の波形を微分して閾値処理することにより検出できる。また、画像処理部6は機器2の制御信号から当該機器2の動作の維持を認識することができる。   The image processing unit 6 can recognize from the change of the control signal of the device 2 an opportunity for the operation of the device 2 to shift, that is, an opportunity for the change of the environment (background) of the monitoring space. The change of the control signal can be detected by storing the control signal in the storage unit 5 each time the captured image is acquired and comparing the current control signal with the previous control signal. Alternatively, the change in the control signal can be detected by differentiating the waveform of the control signal from acquisition of the previous captured image to acquisition of the current captured image and performing threshold processing. Further, the image processing unit 6 can recognize the maintenance of the operation of the device 2 from the control signal of the device 2.

機器インターフェース部3は、背景物に含まれる所定の機器の動作を制御する制御信号を取得する制御信号取得手段であり、具体的には機器2および画像処理部6と接続され、機器2からの制御信号を取得して画像処理部6に出力する回路である。   The device interface unit 3 is a control signal acquisition unit that acquires a control signal for controlling the operation of a predetermined device included in the background, and more specifically, is connected to the device 2 and the image processing unit 6. It is a circuit which acquires a control signal and outputs it to the image processing unit 6.

カメラ4はいわゆる監視カメラであり、監視空間を所定時間おきに撮影する撮影手段である。具体的にはカメラ4は画像処理部6と接続され、監視空間を撮影して撮影画像を生成し、撮影画像を画像処理部6に出力する。例えば、カメラ4はイベント会場内に設定した各監視空間の天井に当該監視空間を俯瞰する視野に固定された状態で設置され、当該監視空間を5フレーム/秒の間隔で撮影する。なお、本実施形態では、本発明の背景画像生成装置における、空間を撮影した撮影画像を取得する撮影画像取得手段としてカメラ4を備えるが、撮影画像取得手段はカメラ4から撮影画像を取得するインターフェース機能だけを備えるものであってもよい。   The camera 4 is a so-called surveillance camera, and is an imaging means for imaging the surveillance space at predetermined time intervals. Specifically, the camera 4 is connected to the image processing unit 6, photographs the monitoring space, generates a photographed image, and outputs the photographed image to the image processing unit 6. For example, the camera 4 is installed on the ceiling of each monitoring space set in the event hall in a fixed state in a field of view over the monitoring space, and images the monitoring space at an interval of 5 frames / second. In the present embodiment, the camera 4 is provided as a photographed image acquisition unit for acquiring a photographed image obtained by photographing a space in the background image generation device of the present invention, but the photographed image acquisition unit is an interface for acquiring a photographed image from the camera 4 It may have only a function.

記憶部5はROM(Read Only Memory)、RAM(Random Access Memory)等の記憶装置である。記憶部5は、各種プログラムや各種データを記憶し、画像処理部6との間でこれらの情報を入出力する。例えば、記憶部5は背景物の三次元モデルである背景モデルや、カメラ4のカメラパラメータを予め記憶する。   The storage unit 5 is a storage device such as a read only memory (ROM) or a random access memory (RAM). The storage unit 5 stores various programs and various data, and inputs and outputs such information from the image processing unit 6. For example, the storage unit 5 stores in advance a background model which is a three-dimensional model of a background object, and camera parameters of the camera 4.

画像処理部6はCPU(Central Processing Unit)、DSP(Digital Signal Processor)、MCU(Micro Control Unit)等の演算装置を用いて構成される。画像処理部6は記憶部5と接続され、記憶部5からプログラムを読み出して実行することで後述する各手段として機能する。また、画像処理部6は各種データを記憶部5から読み出し、また各種データを記憶部5に記憶させる。また、画像処理部6は機器2およびカメラ4とも直接的または間接的に接続され、機器2からの制御信号およびカメラ4からの撮影画像を取得して、背景画像の生成、物体の検知などを行う。また、画像処理部6はユーザーインターフェース部7とも接続され、ユーザーインターフェース部7を介して、検知結果などをユーザーに示し、またユーザーからの操作入力を受け付ける。   The image processing unit 6 is configured using an arithmetic device such as a central processing unit (CPU), a digital signal processor (DSP), and a micro control unit (MCU). The image processing unit 6 is connected to the storage unit 5 and functions as each unit described later by reading and executing a program from the storage unit 5. Further, the image processing unit 6 reads various data from the storage unit 5 and stores various data in the storage unit 5. The image processing unit 6 is also connected directly or indirectly to the device 2 and the camera 4 and acquires a control signal from the device 2 and a photographed image from the camera 4 to generate a background image, detect an object, etc. Do. In addition, the image processing unit 6 is also connected to the user interface unit 7, shows the detection result and the like to the user via the user interface unit 7, and receives an operation input from the user.

ユーザーインターフェース部7はキーボード、マウス、ディスプレイ等からなるユーザーインターフェース装置であり、画像処理部6と接続され、画像処理部6から入力されたデータを表示し、ユーザーが入力したデータを画像処理部6に出力する。例えば、ユーザーインターフェース部7は警備員などのユーザーにより使用され、物体検出結果の表示、機器2の不具合の警告表示、機器2の復旧信号の入力などに用いられる。   The user interface unit 7 is a user interface device including a keyboard, a mouse, a display and the like, and is connected to the image processing unit 6 to display data inputted from the image processing unit 6 and to display data inputted by the user. Output to For example, the user interface unit 7 is used by a user such as a security guard, and is used to display an object detection result, to display a warning of a failure of the device 2, to input a recovery signal of the device 2, and the like.

図3は物体検出装置1の概略の機能ブロック図である。機器インターフェース部3は制御信号取得手段30として機能し、カメラ4は撮影手段40として機能し、記憶部5は背景モデル記憶手段50等として機能する。また、画像処理部6はモデル生成手段60、背景画像生成手段61および物体検出手段62等として機能する。ユーザーインターフェース部7は物体検出手段62による検出結果を出力する出力手段70として機能する。   FIG. 3 is a schematic functional block diagram of the object detection device 1. The device interface unit 3 functions as a control signal acquisition unit 30, the camera 4 functions as a photographing unit 40, and the storage unit 5 functions as a background model storage unit 50 or the like. Further, the image processing unit 6 functions as a model generation unit 60, a background image generation unit 61, an object detection unit 62, and the like. The user interface unit 7 functions as an output unit 70 that outputs the detection result of the object detection unit 62.

物体検出装置1に用いられる背景画像生成装置は、機器2、制御信号取得手段30、撮影手段40、背景モデル記憶手段50、モデル生成手段60および背景画像生成手段61を備える。   The background image generation device used in the object detection device 1 includes an apparatus 2, a control signal acquisition unit 30, an imaging unit 40, a background model storage unit 50, a model generation unit 60, and a background image generation unit 61.

背景モデル記憶手段50は監視空間に存在する背景物の三次元モデルであって背景物それぞれの光学的な特徴量または三次元座標値をモデルパラメータとして含む背景モデルを記憶する。   The background model storage means 50 is a three-dimensional model of a background present in the monitoring space, and stores a background model including optical feature quantities or three-dimensional coordinate values of each background as model parameters.

背景モデルは、背景物で構成された監視空間のコンピュータグラフィックスを生成するために必要な情報からなる。具体的には背景モデルは、監視空間を模したXYZ座標系における各背景物の位置、姿勢、立体形状にて表される三次元座標値および各背景物の表面の色、テクスチャ、反射特性のデータを含み、これらのデータが対応する背景物番号と紐付けて背景モデル記憶手段50に記憶されている。   The background model consists of the information necessary to generate computer graphics of the surveillance space composed of background objects. Specifically, the background model is the position, posture, three-dimensional coordinate value represented by a three-dimensional shape and the color, texture, and reflection characteristics of the surface of each background object in an XYZ coordinate system that simulates a monitoring space. The data is stored in the background model storage means 50 in association with the corresponding background object number including the data.

なお、背景モデルは精密であるほど良く、例えばドアであればドア板とドアノブ、机であれば天板と脚というように色、テクスチャおよび反射特性が異なるパーツそれぞれを背景物と定義して背景モデルを記憶させておくのが好適である。他方、壁のように大きな背景物は各面の光源からの距離の差が大きくなるため各面を背景物と定義するのが好適である。   The more accurate the background model, the better. For example, each part with different color, texture, and reflection characteristics such as a door plate and door knob for a door and a top plate and a leg for a desk is defined as a background object It is preferable to store the model. On the other hand, it is preferable to define each surface as a background since a large background such as a wall has a large difference in distance from the light source on each surface.

背景モデルを構成するモデルパラメータは予め定義され、監視空間の実環境に合わせて適宜更新される。特に、動作により画像に変化を生じる機器2に関し、モデルパラメータは動作状態に応じて適宜、具体的な値を設定され、背景画像にて機器2の動作状態の変化を表現するために用いられる。   The model parameters constituting the background model are predefined, and appropriately updated according to the real environment of the monitoring space. In particular, regarding the device 2 that causes a change in the image due to the operation, the model parameter is appropriately set to a specific value according to the operation state, and is used to express the change in the operation state of the device 2 in the background image.

光源については、背景モデルは監視空間を模したXYZ座標系における当該光源の位置および当該光源の配光、色温度などで表される照明特性を含む。照明機器は光源でもある。光源には太陽を含めてもよい。背景モデルにて光源について各光源の点消灯状態を設定し、点灯状態が設定された光源の出力を照明特性に演算することにより、監視空間に対する複数の照明条件を模擬できる。   For the light source, the background model includes the position of the light source in the XYZ coordinate system that simulates the monitoring space, and the illumination characteristics represented by the light distribution of the light source, the color temperature, and the like. Lighting equipment is also a light source. The light source may include the sun. A plurality of illumination conditions for the monitoring space can be simulated by setting the on / off state of each light source for the light source in the background model and calculating the output of the light source whose illumination state is set as the illumination characteristic.

すなわち、背景モデル記憶手段50は、カメラ4が撮影対象としている所定の空間を構成する構成物である複数の背景物それぞれの三次元座標値と各背景物の光学的な特徴量(色、テクスチャ、反射特性、および該空間を照明する光源の照明特性)とを含んだ背景モデルを記憶している。   That is, the background model storage unit 50 is configured to calculate three-dimensional coordinate values of each of a plurality of background objects that are components constituting a predetermined space that the camera 4 is to capture and an optical feature amount (color and texture of each background object). , Reflection characteristics, and illumination characteristics of a light source illuminating the space).

ここで、背景モデルは各機器2についてモデルパラメータ以外にもその動作に関する情報を含み、ここでは当該情報を機器2のモデル制御情報と称する。   Here, the background model includes information on the operation of each device 2 in addition to the model parameters, and the information is referred to as model control information of the device 2 here.

図4は、機器2が1つの電灯で構成される照明機器である場合のモデル制御情報を説明する模式図であり、モデル制御情報の項目とその値域とが示されている。図4に示す照明機器は図2(a)の機器2aに該当する。   FIG. 4 is a schematic diagram for explaining model control information in the case where the device 2 is a lighting device configured by one light, and shows items of the model control information and their value ranges. The lighting apparatus shown in FIG. 4 corresponds to the apparatus 2a of FIG. 2 (a).

照明強度は照明機器の明るさに相当するものである。照明強度は照明機器についてのモデルパラメータであり、その値域は、スイッチがOFFで光を発しない状態を0%、スイッチがONで最も明るい状態を100%とする0〜100%である。ここで、照明機器の100%に対応する照明強度は実測により定めてもよいし、当該照明機器のカタログスペックなどに基づいて定めてもよい。   The illumination intensity corresponds to the brightness of the illumination device. The illumination intensity is a model parameter for the illumination device, and its value range is 0% where 0% does not emit light when the switch is OFF, and 0 to 100% where 100% is the brightest state when the switch is ON. Here, the illumination intensity corresponding to 100% of the lighting device may be determined by actual measurement, or may be determined based on the catalog specifications of the lighting device or the like.

照明強度推定レンジ(パラメータレンジ)は、モデル生成手段60が、制御信号により生じる照明機器の動作状態に応じて当該照明機器のモデルパラメータである照明強度を変更した背景モデルを生成する際に、照明強度を変化させる範囲である。照明強度推定レンジは基本的には照明機器の動作状態に応じて設定される。照明機器については動作状態として、例えば、点灯状態(スイッチがONされ照明強度が目標とする範囲に達して安定した状態)、消灯状態(スイッチがOFFされた状態)、点灯状態への移行中の状態(スイッチがONされた後、照明強度が目標範囲へ向けて変化している状態)を定めることができる。照明強度推定レンジは、例えば、点灯状態に対応する目標範囲として90%以上100%以下(90〜100%)を設定される。このように目標範囲に幅を持たせているのは、スイッチがONの場合に実際の照明強度が100%の値になるとは限らず、照明機器の経年劣化などにより実際の照明強度が100%に達しない場合もあるからである。また、消灯状態については0%、移行中状態については移行途中の範囲と定義する0%以上90%未満と目標範囲とを合わせた0〜100%が設定される。   The illumination intensity estimation range (parameter range) is an illumination when the model generation unit 60 generates a background model in which the illumination intensity as the model parameter of the illumination device is changed according to the operation state of the illumination device generated by the control signal. It is a range in which the intensity is changed. The illumination intensity estimation range is basically set according to the operating state of the illumination device. For lighting devices, for example, the lighting state (switch is turned on and the illumination intensity reaches a target range and is stable), the light-off state (switch is turned off), and the lighting device is in transition to the lighting state. It is possible to define the state (the state in which the illumination intensity changes towards the target range after the switch is turned on). The illumination intensity estimation range is set, for example, as 90% or more and 100% or less (90 to 100%) as a target range corresponding to the lighting state. The reason why the target range has a width in this way is that the actual illumination intensity does not necessarily have a value of 100% when the switch is ON, and the actual illumination intensity is 100% due to aging deterioration of the lighting equipment, etc. In some cases. Further, 0% is set for the unlit state, and 0% to less than 90%, which is defined as a range in the middle of transition, and 0 to 100%, which is the target range, are set.

照明強度推定レンジによりモデルパラメータである照明強度の変化範囲を制限することで、後述する照明強度の推定を高速に行うことができることに加え、想定される動作状態に対応する範囲外に誤って照明強度が推定されるといった危険性を回避することができる。そして、照明強度の推定誤りを回避することで、推定照明強度に基づいて生成される背景画像を用いた背景差分処理にて物体の誤抽出を起こりにくくすることができる。   In addition to the fact that the illumination intensity can be estimated at high speed, which will be described later, by restricting the change range of the illumination intensity which is a model parameter by the illumination intensity estimation range, the illumination erroneously out of the range corresponding to the assumed operating condition It is possible to avoid the risk that the intensity is estimated. Then, by avoiding the estimation error of the illumination intensity, it is possible to make the erroneous extraction of the object less likely to occur in the background subtraction process using the background image generated based on the estimated illumination intensity.

前回照明強度(前回パラメータ)は例えば、動作状態が「移行中」である際に、照明強度が一定になったかどうかを判定するためなどに利用される。具体的には、後述する動作にて撮影画像の取得ごとに繰り返される処理において、直近の推定値が前回照明強度に格納され、次の処理周期にて前回の照明強度の推定値として読み出され利用される。   The previous illumination intensity (previous parameter) is used, for example, to determine whether the illumination intensity has become constant or the like when the operating state is “during transition”. Specifically, in the process repeated for each captured image in the operation described later, the latest estimated value is stored as the previous illumination intensity, and is read as the previous estimated illumination intensity in the next processing cycle. It is used.

動作状態は、制御信号に応じて、上述した「点灯」、「消灯」、「移行中」のいずれかの状態を設定される。また、設定には必要に応じて、推定された照明強度が加味される。スイッチがOFFのときは動作状態には「消灯」が格納される。スイッチをONにした直後から推定照明強度が目標範囲に達し安定するまでの期間は、動作状態には「移行中」が格納される。推定された照明強度が目標範囲内にて安定すると、照明機器が十分に点灯し移行完了したとして動作状態には「点灯」が格納される。   The operation state is set according to the control signal to one of the above-described "lighting", "lighting off", and "transition". In addition, the estimated illumination intensity is added to the setting as necessary. When the switch is off, "off" is stored in the operating state. Immediately after the switch is turned on, "during transition" is stored in the operating state as a period until the estimated illumination intensity reaches the target range and becomes stable. When the estimated illumination intensity is stabilized in the target range, “lighting” is stored in the operating state as the lighting device is sufficiently lighted and the transition is completed.

安定カウンタは、動作状態を「移行中」から「点灯」とする際の判定に利用するためのカウンタであり、照明強度が安定して推定された回数をカウントし、カウント値が所定値以上になったら動作状態を「点灯」と判定するものである。一方、不安定カウンタは、電灯が一定期間以上安定しない、すなわち電灯がちらついている不具合を判定するためのカウンタである。具体的には、移行中にて新たに推定された照明強度と前回照明強度との差の大きさが所定の閾値以下であると、安定カウンタの値がインクリメントされ、逆に当該差が閾値より大きい場合には不安定カウンタの値がインクリメントされる。   The stability counter is a counter used to determine the operation state from “transitioning” to “lighting”, counts the number of times the illumination intensity has been stably estimated, and the count value is equal to or more than a predetermined value. If it does, the operation state is determined to be "lighting". On the other hand, the instability counter is a counter for determining that the lamp is not stable for a certain period of time, that is, the lamp is flickering. Specifically, when the difference between the newly estimated illumination intensity and the previous illumination intensity during transition is less than or equal to a predetermined threshold, the value of the stability counter is incremented, and conversely, the difference is greater than the threshold. If so, the value of the instability counter is incremented.

不具合検知フラグは、照明のスイッチをONにした際に、照明が点かない、照明が暗い、照明がちらつくといった不具合が発生した場合にONとし、ユーザーインターフェース部7を通じて器具の管理者等に通知するためのフラグである。   The defect detection flag is set to ON when a defect such as no illumination, dark illumination, or flickering occurs when the illumination switch is turned ON, and notifies the administrator of the appliance through the user interface unit 7 It is a flag for

図5は機器2が3つの電灯A〜Cで構成される照明機器である場合のモデル制御情報を説明する模式図であり、モデル制御情報の項目とその値域とが示されている。図5に示す照明機器は図2(b)の機器2bに該当する。   FIG. 5 is a schematic diagram for explaining model control information in the case where the device 2 is a lighting device configured by three lights A to C, and shows items of the model control information and their value ranges. The lighting apparatus shown in FIG. 5 corresponds to the apparatus 2b of FIG. 2 (b).

機器2bに関しては例えば、複数の電灯(電灯A〜C)が全て点灯状態であれば機器2bの動作状態は点灯状態とし、逆に全て消灯状態であれば機器2bの動作状態は消灯状態とし、いずれかの電灯が移行中であれば機器2bの動作状態は移行中状態であると定義することができる。また、機器2bに関しては、図4に示したモデル制御情報のうち照明強度、照明強度推定レンジ、前回照明強度、安定カウンタ、不安定カウンタ、不具合検知フラグは、図5に示すように電灯ごとに保持される。このように、電灯ごとにパラメータを保持しているため、個々の電灯で明るさのばらつきがある場合でも最適な照明強度の推定を行うことができ、背景画像生成の精度を高めることができる。また、不具合検知フラグを電灯ごとに保持しているため、不具合発生時の修理・交換箇所を即座に特定することが容易になる。   With regard to the device 2b, for example, the operating state of the device 2b is turned on if all the lights (lights A to C) are turned on, and conversely the operating state of the device 2b is turned off if all the lights are off If any of the lamps is in transition, the operating state of the device 2b can be defined as being in transition. Further, regarding the device 2b, among the model control information shown in FIG. 4, the illumination intensity, illumination intensity estimation range, previous illumination intensity, stability counter, instability counter, and malfunction detection flag are as shown in FIG. It is held. As described above, since the parameters are held for each lamp, it is possible to estimate the optimum illumination intensity even when there is a variation in brightness among the individual lamps, and it is possible to improve the accuracy of background image generation. In addition, since the failure detection flag is held for each light, it becomes easy to immediately identify the repair / replacement location when the failure occurs.

図6は機器2が自動ドアである場合のモデル制御情報を説明する模式図であり、モデル制御情報の項目とその値域とが示されている。図6に示す自動ドアは図2(c)の機器2cに該当する。   FIG. 6 is a schematic view for explaining model control information in the case where the device 2 is an automatic door, and shows items of the model control information and their value ranges. The automatic door shown in FIG. 6 corresponds to the device 2c of FIG. 2 (c).

開き幅はドア23が開いている部分の幅である。開き幅は自動ドア2cについてのモデルパラメータであり、その値域は、ドア23が完全に閉まっている状態を0%、完全に開いている状態を100%とする0〜100%である。   The opening width is the width of the portion where the door 23 is open. The opening width is a model parameter for the automatic door 2c, and its value range is 0 to 100% where 0% is the state in which the door 23 is completely closed and 100% is the completely open state.

開き幅推定レンジ(パラメータレンジ)は、モデル生成手段60が自動ドア2cの開き幅を変更した背景モデルを生成する際に、開き幅を変化させる範囲である。開き幅推定レンジは基本的に自動ドア2cの動作状態に応じて設定される。自動ドア2cについては動作状態として、例えば、閉状態(人感センサ22が人を検知せずドア23が閉鎖された状態)、開閉中の状態(人感センサ22が人を探知してドア23が開放、閉鎖の順に移行中の状態)を定めることができる。開き幅推定レンジは、例えば、閉状態について0〜1%を設定される。なお、開閉中が移行中状態であるのに対し、閉状態は移行完了状態に当たる。開閉中状態の開き幅推定レンジは、目標範囲とそこに到達するまでの移行途中の範囲とを合わせた範囲に設定される。具体的には、開閉中状態について、移行途中の範囲と定義する1%超100%以下と目標範囲に当たる0〜1%とを合わせた0〜100%が設定される。   The opening width estimation range (parameter range) is a range in which the opening width is changed when the model generation unit 60 generates a background model in which the opening width of the automatic door 2c is changed. The opening width estimation range is basically set according to the operating state of the automatic door 2c. The operation state of the automatic door 2c is, for example, a closed state (a state in which the human sensor 22 does not detect a person and a door 23 is closed), and a state in which it is opened or closed (a human sensor 22 detects a person and the door 23 is detected). Can be determined in the order of opening and closing). The opening width estimation range is set to, for example, 0 to 1% for the closed state. Note that the open state corresponds to the transition completion state while the open / close state is the transition state. The opening width estimation range of the open / close state is set to a range obtained by combining the target range and the transition midway until reaching the target range. Specifically, for the open / close state, 0% to 100%, which is a combination of 1% to 100% or less, which is defined as a transition midway, and 0 to 1%, which is a target range, is set.

前回開き幅(前回パラメータ)は例えば、動作状態が「開閉中」である際に、開き幅が一定になったかどうかを判定するためなどに利用される。具体的には、上述した前回照明強度と同様、直近の推定値が前回開き幅に格納され、次の処理周期にて利用される。   The previous opening width (previous parameter) is used, for example, to determine whether or not the opening width has become constant when the operating state is “during opening and closing”. Specifically, similarly to the previous illumination intensity described above, the latest estimated value is stored in the previous opening width and used in the next processing cycle.

動作状態は、推定された開き幅に基づいて、自動ドアの開閉状態が上述した「閉」、「開閉中」のいずれであるかを設定される。   The operating state is set based on the estimated opening width as to whether the open / close state of the automatic door is “closed” or “opened” described above.

安定カウンタ、不安定カウンタは基本的に上述した照明機器の場合と同様である。具体的には、安定カウンタは開き幅が安定して推定された回数をカウントし、カウント値が所定値以上になったら開閉動作の移行完了が判定され、一方、不安定カウンタは、開き幅が一定期間以上安定しない不具合を判定するために用いられる。   The stability counter and the instability counter are basically the same as in the case of the lighting apparatus described above. Specifically, the stability counter counts the number of times that the opening width is stably estimated, and when the count value becomes a predetermined value or more, the transition completion of the opening / closing operation is determined, while the instability counter has the opening width It is used to determine a defect that is not stable for a certain period of time or more.

不具合検知フラグは、例えば、人感センサが人を検知しても自動ドアが開かない事象や、人感センサが人を未検知の状態であっても自動ドアが閉まらない事象などの不具合が発生した場合にONとし、ユーザーインターフェース部7を通じて器具の管理者等に通知するためのフラグである。   The defect detection flag may cause, for example, an event that the automatic door does not open even if the human sensor detects a person, or an event that the automatic door does not close even if the human sensor does not detect a person It is a flag to be turned ON when notified and to notify the administrator of the appliance or the like through the user interface unit 7.

ここで、不具合検知フラグがONに設定された機器2については、パラメータレンジ(照明強度推定レンジ、開き幅推定レンジ)を上述した動作状態に応じた範囲とは別途の範囲に設定してもよい。例えば、劣化した照明機器の照明強度は、OFFからONへの制御信号の変化に対し、目標範囲より低い値で飽和し得る。本実施形態では、このように動作状態が移行途中の範囲で安定した機器2について不具合検知フラグをONにするとともに、当該機器のパラメータレンジを例えば、不具合検知までに到達した照明強度または開き幅を中心として±1%を上限/下限とする範囲に設定する。なお、例えば、照明機器が点灯と消灯とを繰り返すちらつきのような機器2の不安定な不具合については、パラメータレンジを0〜100%に設定することができる。   Here, for the device 2 in which the defect detection flag is set to ON, the parameter range (illumination intensity estimation range, opening width estimation range) may be set in a range different from the range according to the above-described operation state . For example, the illumination intensity of the degraded lighting device may saturate at a value lower than the target range for changes in control signal from OFF to ON. In the present embodiment, the defect detection flag is turned ON for the device 2 whose operation state is stable in the middle of the transition in this way, and the parameter range of the device is, for example, the illumination intensity or the opening width reached until the defect detection. The upper and lower limits of ± 1% are set as the center. The parameter range can be set to 0 to 100%, for example, for an unstable failure of the device 2 such as flickering in which the lighting device repeatedly turns on and off.

モデル生成手段60は、機器2にて制御信号により生じる動作状態に応じて当該機器のモデルパラメータを変更した背景モデルを生成する。これにより、機器2が制御信号により生起される動作状態である場合の空間を模した背景モデルが生成される。モデル生成手段60は生成した背景モデルを背景画像生成手段61に出力する。   The model generation unit 60 generates a background model in which model parameters of the device 2 are changed according to the operation state generated by the control signal in the device 2. As a result, a background model imitating a space when the device 2 is in the operating state generated by the control signal is generated. The model generation unit 60 outputs the generated background model to the background image generation unit 61.

本実施形態では、モデル生成手段60は、制御信号取得手段30が制御信号を取得すると、当該制御信号に対して予め想定されるモデルパラメータの変化範囲にてモデルパラメータが異なる複数の背景モデルを生成する。   In the present embodiment, when the control signal acquisition unit 30 acquires a control signal, the model generation unit 60 generates a plurality of background models having different model parameters in a change range of model parameters assumed in advance for the control signal. Do.

機器2が照明機器である場合、モデル生成手段60は制御信号に応じてモデルパラメータとされた照明機器の照明条件を変更する。ここでは、モデルパラメータは照明強度であり、例えば、モデル生成手段60は照明強度を1%刻みで変更し背景モデルを生成する。具体的には、動作状態が消灯から点灯へ移行中である場合は、モデル生成手段60は照明強度を、照明強度推定レンジに設定される0〜100%の範囲で1%刻みで変更する。この場合に生成される複数の背景モデルを移行中モデルと称する。動作状態が点灯状態である場合は、モデル生成手段60は照明強度を、照明強度推定レンジに設定される90〜100%の範囲で1%刻みで変更する。この場合に生成される複数の背景モデルを移行完了時モデルと称する。動作状態が消灯状態である場合は、モデル生成手段60は照明強度を0%とした背景モデルを生成する。なお、本実施形態では点灯から消灯への移行中は定義しない。つまり、制御信号から点灯から消灯への変化が検出された場合は移行中を経ずに消灯状態とする。すなわち、制御信号がONからOFFへ変化した場合には、モデル生成手段60は移行中モデルを生成せず、照明強度を0%とした移行完了時モデルのみを生成する。しかし、点灯から消灯への移行中を消灯から点灯への移行中と同様に定義することとして、例えば、照明強度を0〜100%の範囲で設定した移行中モデルを生成してもよい。   When the device 2 is a lighting device, the model generation unit 60 changes the lighting condition of the lighting device as the model parameter according to the control signal. Here, the model parameter is the illumination intensity. For example, the model generation unit 60 changes the illumination intensity in 1% steps to generate a background model. Specifically, when the operating state is in transition from off to on, the model generation unit 60 changes the illumination intensity in 1% steps in the range of 0 to 100% set in the illumination intensity estimation range. The plurality of background models generated in this case are referred to as in-transit models. When the operating state is the lighting state, the model generation unit 60 changes the illumination intensity in steps of 1% in the range of 90 to 100% set in the illumination intensity estimation range. The plurality of background models generated in this case are referred to as transition completion models. When the operating state is the unlit state, the model generation unit 60 generates a background model with the illumination intensity set to 0%. In the present embodiment, no definition is made during the transition from lighting to lighting off. That is, when a change from lighting to turning off is detected from the control signal, the state is turned off without going through the transition. That is, when the control signal changes from ON to OFF, the model generation unit 60 does not generate a model during transition, and generates only a transition completion model with an illumination intensity of 0%. However, for example, a transitioning model in which the illumination intensity is set in the range of 0 to 100% may be generated as the transition from on to off is defined similarly to the transition from off to on.

機器2が自動ドア等の可動機器であれば、モデル生成手段60は制御信号に応じて可動機器についてモデルパラメータとされた三次元座標値を変更する。例えば、自動ドアについては上述のように開き幅がモデルパラメータとされ、例えば、モデル生成手段60は開き幅を1%刻みで変更し背景モデルを生成する。具体的には、動作状態が開閉中である場合は、モデル生成手段60は開き幅を、開き幅推定レンジに設定される0〜100%の範囲で1%刻みで変更して、移行中モデルを生成する。また、モデル生成手段60は動作状態が閉状態である場合は、開き幅を0%および1%とした移行完了時モデルを生成する。   If the device 2 is a movable device such as an automatic door, the model generation unit 60 changes the three-dimensional coordinate values, which are used as model parameters for the movable device, according to the control signal. For example, for the automatic door, the opening width is used as a model parameter as described above. For example, the model generation unit 60 changes the opening width in 1% steps to generate a background model. Specifically, when the operating state is open or closed, the model generation unit 60 changes the opening width in 1% increments in the range of 0 to 100% set in the opening width estimation range, and the in-transition model Generate Further, when the operating state is in the closed state, the model generation unit 60 generates a transition completion model with the opening widths of 0% and 1%.

ここで、1つの制御信号により複数の機器の動作が制御される場合には、モデル生成手段60は個々の機器の動作状態の組み合わせについて背景モデルを生成する。例えば、1つのスイッチにより2つの電灯A,Bの点灯/消灯動作を一括して制御する照明機器において、両方の電灯の動作状態が点灯の場合は、モデル生成手段60は、電灯Aの照明強度について90〜100%の範囲で1%刻みで設定される11通りのモデルパラメータと電灯Bの照明強度について同様に設定される11通りのモデルパラメータとを組み合わせた121通りの背景モデルを出力する。   Here, when the operation of a plurality of devices is controlled by one control signal, the model generation unit 60 generates a background model for the combination of the operation states of the individual devices. For example, in a lighting apparatus in which the lighting / extinguishing operation of the two lights A and B is collectively controlled by one switch, the model generation unit 60 determines the illumination intensity of the lights A when the operating state of both lights is on. For example, 121 background models are output combining 11 model parameters set in 1% steps in the range of 90 to 100% and 11 model parameters set similarly for the illumination intensity of the lamp B.

図7はモデル生成手段60による背景モデルの生成の例を説明する模式図である。図7(a)〜(c)はそれぞれ図2(a)〜(c)の機器2a〜2cについてのモデル生成例を示している。図7(a)〜(c)はそれぞれ水平方向を時間軸とし、右向きに時間が経過する際の動作状態の変化の例を示している。   FIG. 7 is a schematic view for explaining an example of generation of a background model by the model generation means 60. As shown in FIG. FIGS. 7A to 7C show examples of model generation for the devices 2a to 2c in FIGS. 2A to 2C, respectively. FIGS. 7 (a) to 7 (c) each show a horizontal direction as a time axis, and show examples of changes in the operation state when time passes rightward.

図2(a)の機器2aについて、図7(a)に示すように、照明機器のスイッチ20がOFFからONに変わった場合、制御信号取得手段30が当該照明機器の状態を消灯から点灯に移行させる制御信号を取得し、モデル生成手段60が当該照明機器のモデルパラメータである照明強度を、移行中状態にて照明強度推定レンジに設定される0〜100%の範囲で変更し、移行中モデルとなる複数の背景モデルを生成する。   With regard to the device 2a of FIG. 2A, as shown in FIG. 7A, when the switch 20 of the lighting device is changed from OFF to ON, the control signal acquisition unit 30 changes the state of the lighting device from off to on The control signal to be transferred is acquired, and the model generation unit 60 changes the illumination intensity, which is a model parameter of the illumination device, in the range of 0-100% set in the illumination intensity estimation range in the transition state, and is in transition Generate multiple background models to be models.

照明強度が上昇し点灯状態になると、モデル生成手段60は照明強度を照明強度推定レンジに設定される90〜100%の範囲で変更し、移行完了時モデルとなる複数の背景モデルを生成する。   When the illumination intensity is increased and turned on, the model generation unit 60 changes the illumination intensity in the range of 90 to 100% set in the illumination intensity estimation range, and generates a plurality of background models serving as a transition completion model.

照明機器のスイッチがONからOFFに変わった場合は、制御信号取得手段30が当該照明機器の状態を点灯から消灯に移行させる制御信号を取得し、モデル生成手段60は当該照明機器の照明強度を0%とした移行完了時モデルを生成する。   When the switch of the lighting device changes from ON to OFF, the control signal acquisition unit 30 acquires a control signal to shift the state of the lighting device from lighting to lighting off, and the model generation unit 60 calculates the illumination intensity of the lighting device. Generate a transition completion model with 0%.

図2(b)の機器2bについては、図7(b)に示すように、モデル生成手段60は電灯A〜Cそれぞれの照明強度を図7(a)の1つの電灯と同様に変更して背景モデルを生成する。   As for the device 2b of FIG. 2 (b), as shown in FIG. 7 (b), the model generation means 60 changes the illumination intensity of each of the lamps A to C in the same manner as one lamp of FIG. 7 (a). Generate a background model.

図2(c)の機器2cについては、図7(c)に示すように、自動ドアの人感センサの出力が人の未検知状態から検知状態に変わった場合、制御信号取得手段30が当該自動ドアの状態を開閉中の状態(移行中状態)に移行させる制御信号を取得し、モデル生成手段60が当該自動ドアのモデルパラメータである開き幅を、移行中状態について開き幅推定レンジに設定される0〜100%の範囲で変更し、移行中モデルとなる複数の背景モデルを生成する。   With regard to the device 2c of FIG. 2C, as shown in FIG. 7C, when the output of the human sensor at the automatic door changes from the undetected state of the person to the detected state, the control signal acquisition means 30 The control signal to shift the state of the automatic door to the open / close state (transition state) is acquired, and the model generation unit 60 sets the opening width which is the model parameter of the automatic door to the opening width estimation range for the transition state. Change in the range of 0 to 100%, and generate multiple background models that become models during migration.

つまり、モデル生成手段60は、制御信号取得手段30が機器2の状態を移行させる制御信号を取得した場合に、機器2の動作状態に関する当該制御信号に対応する目標範囲とそこへの移行途中の範囲とを合わせたパラメータレンジにてモデルパラメータを設定して、移行中状態での監視空間を模した背景モデルとして移行中モデルを生成する。   That is, when the control signal acquisition unit 30 acquires the control signal for causing the state of the device 2 to transition, the model generation unit 60 is in the middle of transition to the target range corresponding to the control signal related to the operation state of the device 2. A model parameter is set with a parameter range that matches the range, and the in-transition model is generated as a background model that simulates the monitoring space in the in-transition state.

また、モデル生成手段60は、機器2の動作状態の移行が完了した後は、新たな目標範囲への移行を指示する制御信号が取得されるまでの間、移行途中の範囲のモデルパラメータについては背景モデルの生成を省略し、目標範囲のみにてモデルパラメータを設定して、移行完了状態での監視空間を模した背景モデルとして移行完了時モデルを生成する。このようにすることで、モデル生成手段60は、機器2からの制御信号に応じた範囲に制限した背景モデルを出力できる。   In addition, after the transition of the operation state of the device 2 is completed, the model generation unit 60 continues to obtain model parameters in the middle of the transition until the control signal instructing the transition to the new target range is acquired. The generation of the background model is omitted, the model parameters are set only in the target range, and the transition completion model is generated as a background model imitating the monitoring space in the transition completion state. By doing this, the model generation unit 60 can output the background model limited to the range corresponding to the control signal from the device 2.

背景画像生成手段61はモデル生成手段60により生成された背景モデルを、記憶部5に予め記憶されたカメラパラメータに基づきカメラ4の撮影面に仮想的にレンダリングし背景画像を生成する。ちなみにカメラパラメータはカメラ4の内部パラメータ及び外部パラメータであり、撮影位置姿勢の他に焦点距離、解像度(幅方向画素数、高さ方向画素数)、レンズ歪みなどを含む。背景画像生成手段61は生成した背景画像を物体検出手段62に出力する。   The background image generation unit 61 virtually renders the background model generated by the model generation unit 60 on the photographing surface of the camera 4 based on the camera parameters stored in advance in the storage unit 5 to generate a background image. The camera parameters are internal parameters and external parameters of the camera 4, and include focal length, resolution (the number of pixels in the width direction, the number of pixels in the height direction), lens distortion and the like in addition to the photographing position and orientation. The background image generation unit 61 outputs the generated background image to the object detection unit 62.

具体的には、まず背景画像生成手段61は、カメラパラメータから背景モデルのXYZ座標系におけるカメラ4の撮影面を導出する。次に背景画像生成手段61は、背景モデルに含まれる光源についてその位置および照明特性に従った光線データを生成する。その際、光源のうち機器2である照明機器については、背景モデルごとに、設定された照明強度に基づいて光線データの有無や出力を調整する。続いて背景画像生成手段61は、背景物での反射による光線データの色や出力の変化を背景物の色、テクスチャ、反射特性に従って調整する。そして背景画像生成手段61は光源から撮影面に到達する直接光、反射光の光線データを撮影面の各画素値に設定して背景画像を生成する。   Specifically, first, the background image generation unit 61 derives the photographing surface of the camera 4 in the XYZ coordinate system of the background model from the camera parameters. Next, the background image generation means 61 generates ray data according to the position and the illumination characteristic of the light source included in the background model. At that time, for the illumination device which is the device 2 among the light source, the presence or absence and output of the ray data are adjusted based on the set illumination intensity for each background model. Subsequently, the background image generating means 61 adjusts the change in color and output of the ray data due to the reflection on the background according to the color, texture and reflection characteristics of the background. The background image generation unit 61 sets ray data of direct light and reflected light reaching the imaging surface from the light source to each pixel value of the imaging surface to generate a background image.

上述したようにモデル生成手段60は、機器2の制御信号に応じて或るタイミングの監視空間について複数の背景モデルを生成し得る。カメラ4の或る撮影タイミングに対応して複数の背景モデルが生成された場合、背景画像生成手段61は複数の背景モデルのそれぞれをカメラパラメータに基づきレンダリングして複数のレンダリング画像を生成する。そして、背景画像生成手段61は、それらレンダリング画像のうち、カメラ4の当該撮影タイミングの撮影画像との相違度が最小のものを用いて背景画像を生成する。   As described above, the model generation unit 60 can generate a plurality of background models for the monitoring space at a certain timing in response to the control signal of the device 2. When a plurality of background models are generated corresponding to a certain imaging timing of the camera 4, the background image generation unit 61 renders each of the plurality of background models based on the camera parameters to generate a plurality of rendered images. Then, the background image generation unit 61 generates a background image using one of the rendered images that has the least degree of difference from the photographed image at the photographing timing of the camera 4.

例えば、背景画像生成手段61は、撮影画像の画素値の代表特徴量とレンダリング画像の画素値の代表特徴量との差を相違度として算出する。代表特徴量は例えば平均画素値とすることができる。或いは平均画素値および画素値の分散を代表特徴量としてもよい。また、画素値は色でもよく、或いは濃淡値でもよい。   For example, the background image generation unit 61 calculates, as the degree of difference, the difference between the representative feature amount of the pixel value of the captured image and the representative feature amount of the pixel value of the rendering image. The representative feature amount can be, for example, an average pixel value. Alternatively, the average pixel value and the variance of the pixel values may be used as the representative feature amount. Also, the pixel values may be colors or gray values.

また、代表特徴量は撮影画像において背景物以外が写った領域(人物領域など)を除いて算出することが望ましい。そのため、背景画像生成手段61は例えば、人が存在し得ない領域として高さ2m以上の位置に予め定めた評価領域内の画素を用いて代表特徴量を算出する。   In addition, it is desirable to calculate the representative feature amount excluding an area (such as a person area) in which the area other than the background is captured in the captured image. Therefore, the background image generation unit 61 calculates a representative feature amount using, for example, pixels in an evaluation area predetermined at a height of 2 m or more as an area where a person can not exist.

或いは、背景画像生成手段61は例えば、レンダリング画像において背景物ごとに当該背景物の領域の画素値の分散を算出し、分散が所定値未満である領域内の画素を用いて代表特徴量を算出する。   Alternatively, for example, the background image generation unit 61 calculates the variance of pixel values of the region of the background object for each background object in the rendering image, and calculates the representative feature amount using pixels in the region where the variance is less than a predetermined value. Do.

さらに、背景画像生成手段61は、機器2について、相違度が最小のレンダリング画像の画素値を所定限度内で変化させ、これにより当該レンダリング画像に対し撮影画像に近づける補正を施して背景画像を生成する。   Furthermore, the background image generation unit 61 changes the pixel value of the rendering image with the smallest degree of difference within the predetermined limit for the device 2, thereby performing correction to bring the rendering image closer to the photographed image to generate a background image. Do.

この補正を行う理由について説明する。カメラ4が撮影する空間は一般に複数の立体物から構成される複雑な構造となっている。そのため、照明条件の変化に対する背景画像の画素値変化は各背景物の凹凸、各背景物の光源に対する向きや距離、各背景物の材質、背景物間の多重反射などに影響される他、空間に現れた人物など背景物以外の物体にも影響される。   The reason for making this correction will be described. The space taken by the camera 4 is generally a complex structure composed of a plurality of three-dimensional objects. Therefore, the pixel value change of the background image to the change of the lighting condition is influenced by the unevenness of each background, the direction and distance to the light source of each background, the material of each background, multiple reflections between backgrounds, etc. It is also affected by objects other than the background, such as the person appearing in.

そのため、背景画像の画素値変化は背景画像全体でみると一様ではなく複雑な非線形変化となる。複数の背景物の三次元座標値を保持した背景モデルを基に生成した背景画像を利用すれば、各背景物の凹凸、向き、距離、材質、多重反射の影響を比較的精度よく再現できるが、物体検出処理に要求される精度で再現することは難しい。また、背景物以外の影響を再現することも困難である。   Therefore, the pixel value change of the background image is not uniform but complex non-linear change in the entire background image. By using a background image generated based on a background model holding the three-dimensional coordinate values of a plurality of background objects, the effects of unevenness, orientation, distance, material, and multiple reflections of each background object can be reproduced relatively accurately. It is difficult to reproduce with the accuracy required for object detection processing. In addition, it is also difficult to reproduce the effects other than the background.

そこで、背景画像生成手段61は、撮影画像に適合する照明条件のレンダリング画像を選定することによって一次近似を行い、選定したレンダリング画像を撮影画像に近づける補正を行うことによって高精度な背景画像を得る。   Therefore, the background image generation unit 61 performs primary approximation by selecting a rendering image of illumination conditions that matches the captured image, and obtains a highly accurate background image by performing correction that brings the selected rendering image closer to the captured image. .

背景画像生成手段61は、相違度最小により選定したレンダリング画像における各画素の画素値を撮影画像の当該画素の画素値に応じて補正する。具体的には、背景画像生成手段61は画素ごとに、予め設定した補正の限度の範囲内にて、当該画素におけるレンダリング画像の画素値を撮影画像の画素値に近づける。例えば、補正の限度として画素ごとに下限と上限を定め、各画素を下限値以上、上限値以下の画素値の範囲で補正する。例えば、各画素における撮影画像の画素値とレンダリング画像の画素値との差を算出し、当該差を当該画素でのレンダリング画像の画素値に加算して補正画素値を求める。また、当該補正画素値が下限値を下回るときは、下限値で補正画素値を置き換え、上限値を上回るときは、上限値で補正画素値を置き換える。   The background image generation unit 61 corrects the pixel value of each pixel in the rendering image selected by the difference degree minimum according to the pixel value of the pixel in the photographed image. Specifically, for each pixel, the background image generation unit 61 brings the pixel value of the rendering image at the pixel close to the pixel value of the captured image within the range of the preset correction limit. For example, the lower limit and the upper limit are determined for each pixel as the correction limit, and each pixel is corrected within a range of pixel values which is equal to or greater than the lower limit and equal to or smaller than the upper limit. For example, the difference between the pixel value of the photographed image at each pixel and the pixel value of the rendering image is calculated, and the difference is added to the pixel value of the rendering image at the pixel to obtain a corrected pixel value. In addition, when the correction pixel value is below the lower limit value, the correction pixel value is replaced by the lower limit value, and when the correction pixel value is above the upper limit value, the correction pixel value is replaced by the upper limit value.

このとき、撮影画像において背景物以外が写った領域(人物領域など)を除く画素について選択的に補正を行うことによって補正を高精度化できる。そのために、背景画像生成手段61は相違度最小により選定したレンダリング画像と撮影画像とを局所ごとに比較して相違度が予め定めた閾値T1以上である相違領域を検出し、背景物の像のうち相違領域以外の部分の画素について補正を行う。   At this time, the correction can be performed with high accuracy by selectively correcting the pixels excluding the area (such as the human area) where the areas other than the background appear in the photographed image. For that purpose, the background image generation means 61 compares the rendered image selected by the difference degree minimum with the photographed image for each local, detects a difference area having a difference degree of not less than a predetermined threshold T1, and The correction is performed on the pixels of the portion other than the difference area.

また、背景画像は背景モデルにおけるテクスチャの微小な誤差を含み得る。そのため、背景画像生成手段61は複数の近傍画素をまとめた小領域単位で比較を行う。小領域は、撮影画像を格子状に区分した各ブロックとすることもできるが、人物等の形状をより高精度に検出するためにスーパーピクセルとすることが望ましい。すなわち、背景画像生成手段61は、撮影画像を画素値が類似する近傍画素どうしをまとめた複数の小領域に区分して小領域ごとに撮影画像の代表特徴量と選定したレンダリング画像の代表特徴量との相違度を算出し、相違度が閾値T1以上である小領域を相違領域として検出する。この場合の代表特徴量は例えば各小領域の平均画素値および画素値の分散とすることができる。或いは平均画素値を代表特徴量としてもよい。また、画素値は色でもよく、或いは濃淡値でもよい。   Also, the background image may include minor errors in the texture in the background model. Therefore, the background image generation unit 61 performs comparison in units of small areas in which a plurality of neighboring pixels are put together. The small area may be each block obtained by dividing the photographed image into a grid, but it is desirable to be a super pixel in order to detect the shape of a person or the like with higher accuracy. That is, the background image generation unit 61 divides the captured image into a plurality of small regions in which neighboring pixels having similar pixel values are grouped, and represents the representative feature amount of the captured image and the representative feature amount of the selected rendering image for each small region. And the small area whose degree of difference is equal to or greater than the threshold T1 is detected as a different area. The representative feature amount in this case can be, for example, the average pixel value of each small area and the variance of the pixel values. Alternatively, the average pixel value may be used as the representative feature amount. Also, the pixel values may be colors or gray values.

上述した補正の下限は、選択したレンダリング画像を生成したときの照明強度よりも1%弱い照明強度(当該照明強度が0%を下回る場合は0%)のレンダリング画像の画素値とし、また上限は、選択したレンダリング画像を生成したときの照明強度よりも1%強い照明強度(当該照明強度が100%を超える場合は100%)のレンダリング画像の画素値とすることができる。ここで、補正画素値の下限、上限を与える照明強度のレンダリング画像が、モデル生成手段60が出力した背景モデルに無い照明強度のものである場合は、改めてモデル生成手段60に当該照明強度のレンダリング画像を出力させる。   The lower limit of the correction described above is the pixel value of the rendered image at an illumination intensity 1% weaker (0% if the illumination intensity is less than 0%) than the illumination intensity at the time of generating the selected rendering image. The pixel value of the rendering image can be set to an illumination intensity that is 1% stronger (100% when the illumination intensity exceeds 100%) than the illumination intensity when the selected rendering image is generated. Here, when the rendering image of the illumination intensity giving the lower limit and the upper limit of the correction pixel value is an illumination intensity not included in the background model output by the model generation unit 60, rendering of the illumination intensity is performed again to the model generation unit 60. Output an image.

また、選択したレンダリング画像における各画素の画素値に予め設定した割合を乗算して、または予め定めた値を減算、加算して下限と上限を定めてもよい。   Alternatively, the lower limit and the upper limit may be determined by multiplying the pixel value of each pixel in the selected rendering image by a preset ratio, or subtracting and adding a predetermined value.

複数の照明機器のモデルパラメータ変更が組み合わさったレンダリング画像については、各照明機器の照明強度が、選択したレンダリング画像を生成したときの照明強度よりも1%弱い照明強度のレンダリング画像の画素値を下限に定め、各照明機器の照明強度が、選択したレンダリング画像を生成したときの照明強度よりも1%強い照明強度のレンダリング画像の画素値を上限に定めてもよい。   For rendered images in which model parameter changes of a plurality of lighting devices are combined, the pixel values of the rendering images of which the lighting intensity of each lighting device is 1% weaker than the lighting intensity at the time of generating the selected rendering image The lower limit may be set, and the upper limit may be set to the pixel value of the rendering image having an illumination intensity that is 1% stronger than the illumination intensity when the selected rendering image is generated.

上述したように、背景モデルの生成に際しモデルパラメータの変化範囲をパラメータレンジで制限することで、背景画像生成手段61により生成される背景画像は、想定される動作状態に対応する範囲外の状態のものとなる危険性を回避することができる。つまり、モデル生成手段60により生成される背景モデルが機器2からの制御信号に応じた範囲の変更に制限されているため、撮影画像に写った背景以外の物体の影響で撮影画像に過剰に近い背景画像が生成される不具合を抑制できる。   As described above, the background image generated by the background image generation unit 61 is out of the range corresponding to the assumed operation state by limiting the change range of the model parameter with the parameter range when generating the background model. It is possible to avoid the risk of becoming a thing. That is, since the background model generated by the model generation means 60 is limited to the change of the range according to the control signal from the device 2, it is excessively close to the photographed image due to the influence of objects other than the background shown in the photographed image. It is possible to suppress a defect that a background image is generated.

例えば、照明機器が消灯されている状態で監視空間に白い服を着た人物が複数人同時に入ってきたために撮影画像が明るくなっている場合であっても、背景モデルは照明強度0%に制限される。そのため照明強度0%以外のレンダリング画像が選択されることがない。また照明強度0%から乖離した補正が行われることもない。よって、撮影画像に写った人の影響で実際の照明条件よりも過剰に明るい背景画像を生成してしまう誤りを防ぐことができる。   For example, the background model is limited to a lighting intensity of 0% even when the photographed image is bright because a plurality of persons dressed in white clothes simultaneously enter the monitoring space with the lighting equipment turned off. Be done. Therefore, no rendering image other than 0% illumination intensity is selected. In addition, no correction deviates from the illumination intensity of 0%. Therefore, it is possible to prevent an error in which a background image excessively brighter than the actual illumination condition is generated due to the influence of a person appearing in the photographed image.

また、照明機器が点灯している状態で監視空間に黒い服を着た人物が複数人同時に入ってきたために撮影画像が暗くなっている場合であっても、背景モデルは照明強度90〜100%に制限される。そのため照明強度90%未満のレンダリング画像が選択されることがない。また照明強度90〜100%の範囲から乖離した補正が行われることもない。よって、撮影画像に写った人の影響で実際の照明条件よりも過剰に暗い背景画像を生成してしまう誤りを防ぐことができる。   In addition, even if the photographed image is dark because a plurality of persons dressed in black are simultaneously entering the monitoring space while the lighting device is on, the background model has an illumination intensity of 90 to 100%. Limited to Therefore, a rendering image with an illumination intensity of less than 90% is not selected. In addition, correction that deviates from the range of the illumination intensity of 90 to 100% is not performed. Therefore, it is possible to prevent an error in which a background image excessively darker than the actual illumination condition is generated due to the influence of a person appearing in the photographed image.

また、背景モデルの変更範囲を制限することにより、レンダリング処理等の負荷を減少させることができる。   Also, by limiting the range of change of the background model, it is possible to reduce the load of rendering processing and the like.

物体検出手段62は、カメラの撮影タイミングに対応する背景モデルから背景画像生成手段61が生成した背景画像を、カメラが当該撮影タイミングにて監視空間を撮影した撮影画像と比較して、背景物以外の物体を監視空間にて検出する。背景物以外の物体とは、監視空間に現れた人など、撮影画像には撮影されているが背景モデルにおいてモデル化されておらず背景画像には現れていない物体である。   The object detection means 62 compares the background image generated by the background image generation means 61 from the background model corresponding to the photographing timing of the camera with the photographed image of the monitoring space photographed by the camera at the photographing timing. Objects in the surveillance space. An object other than a background object is an object such as a person who appears in the monitoring space, which is captured in a captured image but is not modeled in the background model and does not appear in the background image.

上述したように、背景モデルから生成した背景画像は背景モデルにおけるテクスチャの微小な誤差を含み得る。そのため、物体検出手段62は、複数の近傍画素をまとめた小領域単位で比較を行う。小領域は、撮影画像を格子状に分割した各ブロックとすることもできるが、人物等の形状をより高精度に検出するためにスーパーピクセルとすることが望ましい。   As mentioned above, the background image generated from the background model may include minor errors in the texture in the background model. Therefore, the object detection means 62 performs comparison in small area units in which a plurality of neighboring pixels are put together. The small area may be each block obtained by dividing the photographed image into a lattice, but it is desirable to be a super pixel in order to detect the shape of a person or the like with higher accuracy.

すなわち、物体検出手段62は、撮影画像を画素値が類似する近傍画素どうしをまとめた複数の小領域に区分して小領域ごとに撮影画像の代表特徴量と背景画像の代表特徴量の相違度を算出し、相違度が予め定めた閾値T2以上である小領域に背景物以外の物体が存在すると判定する。   That is, the object detection means 62 divides the photographed image into a plurality of small areas in which neighboring pixels having similar pixel values are grouped, and the degree of difference between the representative feature quantity of the photographed image and the representative feature quantity of the background image for each small area. Is calculated, and it is determined that an object other than the background object exists in a small area where the degree of difference is equal to or greater than a predetermined threshold value T2.

代表特徴量は例えば各小領域の平均画素値および画素値の分散とすることができる。この場合、撮影画像と背景画像とのそれぞれから算出した平均画素値どうしの差、画素値の分散どうしの差を予め定めた重みで重みづけて加算した重みづけ和を相違度とすることができる。或いは環境によっては平均画素値のみ、エッジ密度のみを代表特徴量としてもよい。また、画素値は色でもよく、或いは濃淡値でもよい。   The representative feature amount can be, for example, the average pixel value of each small area and the variance of the pixel values. In this case, a weighted sum obtained by weighting and adding the difference between the average pixel values calculated from each of the photographed image and the background image and the difference between the pixel value dispersions can be used as the dissimilarity. . Alternatively, depending on the environment, only the average pixel value or only the edge density may be used as the representative feature amount. Also, the pixel values may be colors or gray values.

ここで、背景物の手前に当該背景物と色が類似する服を着た人物などが存在する場合、画素値の代表特徴量のみでは検出対象物体の一部を検出し損ねる場合がある。そこで物体検出手段62は、閾値T2による小領域の検出に加えて、予め定めた閾値T3以上の有意なエッジ差分が検出された小領域において閾値T2よりも低く定めた閾値T4以上である小領域にも背景物以外の物体が存在すると判定する。このように画素値の特徴量とエッジの特徴量の両方を評価することで、背景物の手前に当該背景物と画像の複雑度が類似する検出対象物体や当該背景物と色が類似する検出対象物体が存在しても高精度な検出が可能となる。   Here, in the case where a person or the like who wears clothes having a color similar to that of the background object is present in front of the background object, a part of the detection target object may fail to be detected with only the representative feature value of the pixel value. Therefore, in addition to the detection of the small area by the threshold T2, the object detection means 62 is a small area which is at least the threshold T4 set lower than the threshold T2 in the small area where a significant edge difference equal to or greater than a predetermined threshold T3 is detected. Also, it is determined that there is an object other than the background object. As described above, by evaluating both the feature value of the pixel value and the feature value of the edge, a detection target object having a similar degree of complexity to the background object in front of the background object or a detection having a similar color to the background object Even if there is a target object, highly accurate detection is possible.

次に物体検出装置1の動作について説明する。図8および図9は物体検出装置1の概略の動作を示すフロー図である。   Next, the operation of the object detection device 1 will be described. FIG. 8 and FIG. 9 are flowcharts showing the general operation of the object detection device 1.

画像処理部6は、カメラ4から撮影画像を取得すると(ステップS1)、制御信号取得手段30である機器インターフェース部3から機器2の制御信号を取得する(ステップS2)。すなわち、カメラ4による撮影タイミングと基本的に同期して、機器2の制御信号が取得される。   When acquiring the photographed image from the camera 4 (step S1), the image processing unit 6 acquires the control signal of the device 2 from the device interface unit 3 which is the control signal acquisition unit 30 (step S2). That is, the control signal of the device 2 is acquired basically in synchronization with the photographing timing by the camera 4.

画像処理部6はモデル生成手段60として動作し、制御信号が前回の取得時から変化したか否かを判定する(ステップS3)。変化したと判定した場合(ステップS3にてYESの場合)、モデル生成手段60は当該機器2についての動作状態として「移行中」を設定する(ステップS4)。具体的には、機器2が照明機器であれば、スイッチ20がOFFからONに切り替えられる際の制御信号の変化に対して、背景モデル記憶手段50の当該機器のモデル制御情報における動作状態に「移行中」が設定され、照明強度推定レンジに0〜100%が設定される。また、機器2が自動ドアであれば、制御信号である人感センサ22の出力が未検知時のローレベルの電圧から検知時のハイレベルの電圧に変化したときに動作状態に「開閉中」が設定され、開き幅推定レンジに0〜100%が設定される。また、ステップS4における動作状態の「移行中」(または「開閉中」)の設定と併せて、モデル生成手段60は安定カウンタ、不安定カウンタのカウント値を0にリセットし、また、不具合検知フラグをOFFにセットする。なお、既に述べたように本実施形態では、照明機器のONからOFFへの切り替え時には移行中を定義しないので、この場合は、モデル生成手段60は動作状態に「消灯」を設定し、照明強度推定レンジに0%を設定する。   The image processing unit 6 operates as the model generation unit 60, and determines whether the control signal has changed since the previous acquisition (step S3). When it is determined that a change has occurred (in the case of YES at step S3), the model generation means 60 sets "during transition" as the operation state of the device 2 (step S4). Specifically, if the device 2 is a lighting device, the operating state in the model control information of the device of the background model storage unit 50 is “for the change of the control signal when the switch 20 is switched from OFF to ON. “Under transition” is set, and the illumination intensity estimation range is set to 0 to 100%. In addition, if the device 2 is an automatic door, the control state is "opened" when the output of the human sensor 22, which is a control signal, changes from a low level voltage when not detected to a high level when detected. Is set, and 0-100% is set to the opening width estimation range. Further, in conjunction with the setting of “transitioning” (or “opening and closing”) of the operation state in step S4, the model generation unit 60 resets the count value of the stability counter and the instability counter to 0, and the defect detection flag Set to OFF. As described above, in the present embodiment, the transition from ON to OFF of the lighting apparatus is not defined as being in transition, so in this case, the model generation unit 60 sets “off” to the operation state, and the illumination intensity Set the estimated range to 0%.

一方、制御信号が変化しなかったと判定した場合は(ステップS3にてNOの場合)、モデル生成手段60はステップS4をスキップする。   On the other hand, when it is determined that the control signal has not changed (in the case of NO at step S3), the model generation means 60 skips step S4.

背景物の複数の機器2が存在する場合、モデル生成手段60は各機器についてステップS2〜S4の処理を行う。   When there are a plurality of devices 2 as background objects, the model generation unit 60 performs the processes of steps S2 to S4 for each device.

ステップS2〜S4の次に、モデル生成手段60は記憶部5の背景モデル記憶手段50から背景モデルを読み出して機器2の状態を確認し(S5,S6)、その状態に応じた背景モデルを生成する(S7,S8,S9)。   After steps S2 to S4, the model generation unit 60 reads the background model from the background model storage unit 50 of the storage unit 5, confirms the state of the device 2 (S5, S6), and generates the background model according to the state (S7, S8, S9).

具体的には、モデル生成手段60は機器2の状態に関し例えば、背景モデルに含まれるモデル制御情報のパラメータレンジ、動作状態および不具合検知フラグを読み出す。そして、動作状態が移行中(または開閉中)であり、且つ不具合検知フラグがOFFである機器2に関しては(ステップS5にてYES、且つステップS6にてNOの場合)、モデル生成手段60は当該機器2のモデルパラメータをパラメータレンジ内にて変更して移行中モデルを生成する(ステップS7)。   Specifically, the model generation unit 60 reads, for example, the parameter range of the model control information included in the background model, the operation state, and the defect detection flag regarding the state of the device 2. Then, with regard to the device 2 whose operation state is in transition (or during opening and closing) and the defect detection flag is OFF (YES in step S5 and NO in step S6), the model generation unit 60 The model parameter of the device 2 is changed within the parameter range to generate a model during transition (step S7).

例えば、機器2が移行中であり且つ不具合がまだ検知されていない照明機器であれば動作状態には移行中、照明強度推定レンジには0〜100%、不具合検知フラグにはOFFがそれぞれ設定されている。モデル生成手段60は当該照明機器に関し、照明強度推定レンジに従い、照明強度を順次0%,1%,…,100%と変更して移行中モデルを生成する。   For example, if the lighting apparatus is in transition and the defect has not yet been detected, the transition to the operating state is made, the illumination intensity estimation range is set to 0 to 100%, and the defect detection flag is set to OFF. ing. The model generation means 60 changes the illumination intensity sequentially to 0%, 1%,..., 100% according to the illumination intensity estimation range, and generates a transitioning model according to the illumination device.

また、例えば、機器2が移行中であり且つ不具合がまだ検知されていない自動ドアであれば動作状態には移行中、開き幅推定レンジには0〜100%、不具合検知フラグにはOFFが設定されている。モデル生成手段60は当該自動ドアに関し、開き幅推定レンジに従い、当該自動ドアの開き幅を順次0%,1%,…,100%と変更して移行中モデルを生成する。   Further, for example, if the automatic door is in transition and the defect is not detected yet, the transition state is in transition to 0 to 100% in the estimated opening width range and OFF is set in the defect detection flag. It is done. The model generation unit 60 sequentially changes the opening width of the automatic door to 0%, 1%,..., 100% according to the opening width estimation range to generate a model during transition.

動作状態が移行中であり且つ不具合発生中である機器2に関しては(ステップS5にてYES、且つステップS6にてYESの場合)、モデル生成手段60は当該機器2のモデルパラメータをパラメータレンジ内にて変更して不具合時モデルを生成する(S8)。   With regard to the device 2 whose operation state is in transition and a failure is occurring (YES in step S5 and YES in step S6), the model generation unit 60 sets the model parameters of the device 2 within the parameter range. To generate a failure model (S8).

例えば、機器2が照明強度85%で安定した不具合(劣化)が発生中の照明機器であれば動作状態には「移行中」、照明強度推定レンジには84〜86%、不具合検知フラグにはONが設定されている。モデル生成手段60は当該照明機器に関し、照明強度推定レンジに従い、照明強度を順次84%,85%,86%と変更して不具合時モデルを生成する。   For example, if the lighting apparatus is in a stable failure (deterioration) with a lighting intensity of 85%, the device 2 is "in transition" to the operating state, 84 to 86% for the lighting intensity estimation range, and for the failure detection flag ON is set. The model generation unit 60 sequentially changes the illumination intensity to 84%, 85%, and 86% in accordance with the illumination intensity estimation range, and generates a failure model according to the illumination intensity estimation range.

また例えば、機器2が照明強度の不安定な不具合(点消灯繰り返し)が発生中の照明機器であれば、動作状態は基本的には「移行中」であり、また、照明強度推定レンジには0〜100%、不具合検知フラグにはONが設定されている。モデル生成手段60は当該照明機器に関し、照明強度推定レンジに従い、照明強度を順次0%,1%,…,100%と変更して不具合時モデルを生成する。   Also, for example, if the device 2 is a lighting device in which an unstable defect of lighting intensity (repetition of light on / off) is occurring, the operation state is basically “during transition” and the lighting intensity estimation range is 0 to 100%, the defect detection flag is set to ON. The model generation unit 60 sequentially changes the illumination intensity to 0%, 1%,..., 100% according to the illumination intensity estimation range, and generates a failure model according to the illumination device.

例えば、機器2が開き幅50%で安定した不具合(停止)が発生中の自動ドアであれば、動作状態には「開閉中」、開き幅推定レンジには49〜51%、不具合検知フラグにはONが設定されている。モデル生成手段60は当該自動ドアに関し、開き幅推定レンジに従い、開き幅を順次49%,50%,51%と変更して不具合時モデルを生成する。   For example, if the device 2 is an automatic door in which a stable failure (stop) occurs with an opening width of 50%, the operating state is "during opening and closing", the open width estimation range is 49 to 51%, and a failure detection flag Is set to ON. The model generation unit 60 sequentially changes the opening width to 49%, 50%, and 51% according to the opening width estimation range for the automatic door, and generates a failure model.

また例えば、機器2が開き幅の不安定な不具合(開閉繰り返し)が発生中の自動ドアであれば、動作状態は基本的に「開閉中」であり、また、開き幅推定レンジには0〜100%、不具合検知フラグにはONが設定されている。モデル生成手段60は当該自動ドアに関し、開き幅推定レンジに従い、開き幅を順次0%,1%,…,100%と変更して不具合時モデルを生成する。   Further, for example, if the device 2 is an automatic door in which an unstable failure (open and close) of the opening width is occurring, the operating state is basically "during opening and closing" and the opening width estimation range is 0 to 0. 100%, the defect detection flag is set to ON. The model generation unit 60 sequentially changes the opening width to 0%, 1%,..., 100% according to the opening width estimation range for the automatic door, and generates a failure model.

機器2の状態が移行中ではない機器2に関しては(ステップS5にてNOの場合)、モデル生成手段60は当該機器2のモデルパラメータをパラメータレンジ内にて変更して移行完了時モデルを生成する(ステップS9)。   For the device 2 in which the state of the device 2 is not in transition (in the case of NO at step S5), the model generation unit 60 changes the model parameter of the device 2 within the parameter range to generate a transition completion model. (Step S9).

例えば、機器2が照明強度99%で点灯状態に移行完了している照明機器であれば、動作状態には「点灯」、照明強度推定レンジには90〜100%が設定されている。モデル生成手段60は当該照明機器に関し、照明強度推定レンジに従い、照明強度を順次90%,91%,…,100%と変更して移行完了時モデルを生成する。   For example, if the device 2 is a lighting device whose transition to the lighting state is completed with a lighting intensity of 99%, “lighting” is set in the operation state, and 90 to 100% is set in the lighting intensity estimation range. The model generation unit 60 sequentially changes the illumination intensity to 90%, 91%,..., 100% according to the illumination intensity estimation range, and generates a transition completion model according to the illumination device.

また例えば、機器2が消灯状態に移行完了した照明機器であれば、動作状態には「消灯」、照明強度推定レンジには0%が設定されている。モデル生成手段60は当該照明機器に関し、照明強度推定レンジに従い、照明強度を0%として移行完了時モデルを生成する。   Further, for example, when the device 2 is a lighting device that has completed transition to the light-off state, “off” is set in the operation state, and 0% is set in the illumination intensity estimation range. The model generation unit 60 generates a transition completion model with the illumination intensity set to 0% according to the illumination intensity estimation range for the illumination device.

また例えば、機器2が開き幅1%で閉状態に移行完了している自動ドアであれば、動作状態には「閉」、開き幅推定レンジには0〜1%が設定されている。モデル生成手段60は当該自動ドアに関し、開き幅推定レンジに従い、開き幅を順次0%,1%に変更して移行完了時モデルを生成する。   For example, if the device 2 is an automatic door that has completed transition to the closed state with an opening width of 1%, “closed” is set as the operating state, and 0-1% is set as the opening width estimation range. The model generation unit 60 sequentially changes the opening width to 0% and 1% according to the opening width estimation range for the automatic door, and generates a transition completion model.

背景物に複数の機器2が存在する場合、モデル生成手段60は各機器のモデルパラメータを上述のように動作状態等に応じて変更し、複数の機器2のモデルパラメータを組み合わせて背景モデルを生成する。   When there are a plurality of devices 2 in the background, the model generation unit 60 changes the model parameters of each device according to the operation state etc. as described above, and combines the model parameters of the plurality of devices 2 to generate a background model Do.

上述のようにモデル生成手段60により、制御信号に対して予め想定されるパラメータレンジ内にてモデルパラメータを設定して背景モデルが生成される。1つの機器2についてモデルパラメータはパラメータレンジにて複数通りに設定され得、背景物には複数の機器2が存在し得るので、基本的には、機器2または機器群の動作状態が異なる複数の背景モデルが生成される。但し、例えば、背景物に閉状態の自動ドアだけが存在する場合などには、背景モデルとして1通りの動作状態のものしか生成されない場合もある。   As described above, the model generation unit 60 sets model parameters within a parameter range previously assumed for the control signal to generate a background model. The model parameters for one device 2 can be set in a plurality of ways in the parameter range, and a plurality of devices 2 can exist in the background, so basically, a plurality of operation states of the device 2 or a group of devices are different. A background model is generated. However, for example, when there is only a closed automatic door in the background, there may be a case where only one operation state is generated as the background model.

背景モデルを生成すると、画像処理部6は背景画像生成手段61として動作し、モデル生成手段60により機器2の動作状態等に応じて生成された基本的に複数通りの背景モデルそれぞれを撮影手段40であるカメラ4の撮影面に対応する座標系にレンダリングしてレンダリング画像を生成する(ステップS10)。   When the background model is generated, the image processing unit 6 operates as the background image generation unit 61, and the image generation unit 40 basically performs each of a plurality of background models generated by the model generation unit 60 according to the operation state of the device 2. The rendering image is generated by rendering on the coordinate system corresponding to the imaging plane of the camera 4 (step S10).

背景画像生成手段61は、各レンダリング画像を撮影画像と比較して相違度を算出し、相違度が最小のレンダリング画像を選択する(ステップS11)。選択したレンダリング画像を背景画像とすることもできるが、本実施形態では、当該レンダリング画像に補正処理を施して背景画像を得る(ステップS12,S13)。   The background image generation unit 61 compares each rendering image with the captured image to calculate the degree of difference, and selects the rendering image with the smallest degree of difference (step S11). Although the selected rendering image can be used as a background image, in the present embodiment, the rendering image is subjected to correction processing to obtain a background image (steps S12 and S13).

具体的には、ステップS12では背景画像生成手段61は、補正対象となる選択レンダリング画像の基となった背景モデルに対応するモデルパラメータを基準にして、当該レンダリング画像の各画素の補正限度を決定する。そしてステップS13にて、背景画像生成手段61は、補正限度の範囲内で、選択レンダリング画像の各画素の画素値を撮影画像の対応画素の画素値に近づける補正を行う。   Specifically, in step S12, the background image generation unit 61 determines the correction limit of each pixel of the rendering image based on the model parameter corresponding to the background model that is the basis of the selected rendering image to be corrected. Do. Then, in step S13, the background image generation unit 61 performs correction in which the pixel value of each pixel of the selected rendering image approaches the pixel value of the corresponding pixel of the photographed image within the correction limit.

背景画像が生成されると、画像処理部6は物体検出手段62として動作し、撮影画像から物体の領域を検出する(ステップS14)。具体的には、物体検出手段62は、撮影画像とステップS13の補正処理で得られた背景画像との間で背景差分処理を行って変化領域を抽出し、例えば人のサイズとして予め定めた範囲内の大きさを有する変化領域を物体領域として検出する。   When the background image is generated, the image processing unit 6 operates as the object detection unit 62, and detects the area of the object from the photographed image (step S14). Specifically, the object detection means 62 performs background subtraction processing between the photographed image and the background image obtained in the correction processing of step S13 to extract a change area, and for example, a range predetermined as the size of a person A change area having an inner size is detected as an object area.

ステップS14にて人など、背景物以外の物体が検出された場合、画像処理部6は例えば、物体領域を単一色で塗りつぶしてプライバシーマスクを生成し、撮影画像にプライバシーマスクを重畳したマスク画像を出力手段70に出力して該画像を表示させる。他方、物体が検出されなかった場合には、画像処理部6は撮影画像をそのまま表示させる。   When an object such as a person or the like other than the background is detected in step S14, the image processing unit 6 fills in the object area with a single color, for example, to generate a privacy mask, and a mask image obtained by superposing the privacy mask on the photographed image It is output to the output means 70 to display the image. On the other hand, when the object is not detected, the image processing unit 6 displays the photographed image as it is.

次に、画像処理部6は再びモデル生成手段60として動作し、機器2の状態の判定および更新を行う(ステップS15〜S29)。以下、この処理を説明する。   Next, the image processing unit 6 operates again as the model generation unit 60 to determine and update the state of the device 2 (steps S15 to S29). Hereinafter, this process will be described.

モデル生成手段60は、機器2の動作状態が「移行中」であるか否かを確認する(ステップS15)。移行中ではない場合は(ステップS15にてNOの場合)、ステップS16〜S26をスキップして処理をステップS27に進める。   The model generation means 60 confirms whether the operation state of the device 2 is "in transition" (step S15). If it is not in transition (in the case of NO at step S15), the process skips steps S16 to S26 and advances the process to step S27.

一方、機器2が移行中である場合(ステップS15にてYESの場合)、モデル生成手段60は、ステップS11における選択レンダリング画像に対応する移行中モデルのモデルパラメータ(以下、今回パラメータ)と、記憶部5に記憶されている前回の選択レンダリング画像に対応する移行中モデルのモデルパラメータ(以下、前回パラメータ)との差を算出して閾値Tと比較する(ステップS16)。閾値Tは動作状態が安定している時の機器2の画像の変動幅に応じて予め定めておく。例えば、Tは1%とする。 On the other hand, when the device 2 is in transition (in the case of YES in step S15), the model generation unit 60 stores the model parameters of the in-transition model (hereinafter, current parameters) corresponding to the selected rendering image in step S11. The difference with the model parameter of the in-transition model (hereinafter referred to as the previous parameter) corresponding to the previous selected rendering image stored in the unit 5 is calculated and compared with the threshold value T D (step S16). The threshold value T D is determined in advance in accordance with the fluctuation range of the image of the device 2 when the operation state is stable. For example, T D is 1%.

差の絶対値がT以下である場合(ステップS16にてYESの場合)、モデル生成手段60は、当該機器の安定カウンタのカウント値を1だけ増加させて(ステップS17)、増加後のカウント値を閾値Tと比較する(ステップS18)。閾値Tは機器2の安定/不安定を弁別できる程度の時間長に予め定めておく。例えば、照明機器であれば1秒間相当のフレーム数である5がTとして設定され、自動ドアであれば連続入退場を加味して10秒間相当のフレーム数である50がTとして設定される。 When the absolute value of the difference is equal to or less than T D (in the case of YES at step S16), the model generation unit 60 increases the count value of the stability counter of the device by 1 (step S17). The value is compared to a threshold T S (step S18). The threshold value T S is set in advance to a time length enough to discriminate the stability / unstable state of the device 2. For example, in the case of lighting equipment, 5 which is the number of frames equivalent to 1 second is set as T S , and in the case of an automatic door, 50 which is the number of frames equivalent to 10 seconds is set as T S Ru.

安定カウンタの値がT以上であった場合(ステップS18にてYESの場合)、モデル生成手段60は、ステップS11で選択されたレンダリング画像が移行完了状態の背景モデルに対応するものであるか否かを確認する(ステップS19)。すなわち機器2の今回パラメータが目標範囲にあるか否かを確認する。機器2の今回パラメータが目標範囲であった場合(ステップS19にてYESの場合)、モデル生成手段60は当該機器の動作状態を移行完了を示す状態に設定する(ステップS20)。具体的には、照明機器については「点灯」、「消灯」、また自動ドアについては「閉」が設定される。この場合、モデル生成手段60は当該機器2のパラメータレンジを目標範囲に変更する。例えば、機器2が点灯への遷移が完了した照明機器である場合、照明強度推定レンジは90〜100%に設定される。 When the value of the stability counter is equal to or greater than T S (in the case of YES in step S18), the model generation unit 60 determines whether the rendering image selected in step S11 corresponds to the background model in the transition completion state. It is confirmed whether or not it is (step S19). That is, it is checked whether the current parameter of the device 2 is within the target range. If the current parameter of the device 2 is in the target range (YES in step S19), the model generation unit 60 sets the operation state of the device to a state indicating the completion of the transition (step S20). Specifically, “lighting” and “lighting off” are set for lighting devices, and “closing” is set for automatic doors. In this case, the model generation unit 60 changes the parameter range of the device 2 to the target range. For example, when the device 2 is a lighting device whose transition to lighting has been completed, the lighting intensity estimation range is set to 90 to 100%.

一方、機器2の今回パラメータが目標範囲にはなく、移行途中の範囲にある場合は(ステップS19にてNOの場合)、上述した照明機器の劣化による照明強度の低下のように、機器2の動作状態が目標範囲に到達する前に定常状態となった場合であるので、モデル生成手段60は、動作状態が安定している不具合が発生したとして当該機器の不具合検知フラグをONに設定する(ステップS21)。この場合、モデル生成手段60は、当該機器2のパラメータレンジをステップS11で選択された背景モデルのモデルパラメータを中心として±1%を上限/下限とする範囲に変更する。例えば、機器2が照明機器であり、ステップS11で選出した背景モデルの照明強度が85%であった場合、照明強度推定レンジに84〜86%と設定する。   On the other hand, if the current parameter of the device 2 is not in the target range and is in the middle of the transition (in the case of NO at step S19), the decrease of the illumination intensity as in the above-described deterioration of the illumination device occurs. Since the steady state is reached before the operating state reaches the target range, the model generation unit 60 sets the failure detection flag of the relevant device to ON, assuming that the failure in which the operating state is stable has occurred ( Step S21). In this case, the model generation unit 60 changes the parameter range of the device 2 to a range having ± 1% as the upper limit / lower limit centering on the model parameter of the background model selected in step S11. For example, when the device 2 is a lighting device and the illumination intensity of the background model selected in step S11 is 85%, the illumination intensity estimation range is set to 84 to 86%.

モデル生成手段60は不具合が発生中であることを検知すると、警告手段であるユーザーインターフェース部7にその旨を警告させる(ステップS22)。例えば、機器2が照明機器であれば、当該照明機器の設置面(天井など)を視野に含む仮想の撮影面に空間モデルをレンダリングして、レンダリング画像中にて不具合の発生している電灯の像を強調表示するとともに当該画像に文字列「電灯が劣化しています」を重畳させて警告表示させる。また、機器2が自動ドアであれば例えば、不具合の発生している自動ドアの像を背景画像において強調表示するとともに当該背景画像に文字列「自動ドアが止まっています」を重畳させて警告表示させる。   When the model generation unit 60 detects that a failure is occurring, the model generation unit 60 causes the user interface unit 7 as a warning unit to warn of that (step S22). For example, if the device 2 is a lighting device, a space model is rendered on a virtual shooting surface including the installation surface (ceiling etc.) of the lighting device in the field of view, and a problem occurs in the rendered image. At the same time as highlighting the image, the character string "Light is deteriorated" is superimposed on the image to display a warning. Also, if the device 2 is an automatic door, for example, an image of the automatic door having a defect is highlighted in the background image, and the character string "automatic door is stopped" is superimposed on the background image to display a warning Let

安定カウンタの値がT未満の場合(ステップS18にてNOの場合)、ステップS19〜S22をスキップして処理をステップS27に進める。 If the value of the stability counter is less than T S (NO in step S18), steps S19 to S22 are skipped and the process proceeds to step S27.

また、ステップS16にて、機器2の今回パラメータと前回パラメータとの差の大きさがTより大きかった場合(ステップS16にてNOの場合)、モデル生成手段60は、当該機器の不安定カウンタの値を1だけ増加させて(ステップS23)、増加後の不安定カウンタの値を閾値Tと比較する(ステップS24)。閾値Tは機器2が移行に要する程度の時間長に予め定めておく。例えば、照明機器であれば1秒間相当のフレーム数である5がTとして設定され、自動ドアであれば連続入退場を加味して10秒間相当のフレーム数である50がTとして設定される。 Further, in step S16, when the magnitude of the difference between the current parameter of the device 2 and the previous parameter is larger than T D (in the case of NO in step S16), the model generation unit 60 determines the instability counter of the device. and the value is increased by 1 (step S23), and compares the value of the instability counter the increased the threshold T U (step S24). Threshold T U is determined in advance to the time length of the extent to which the device 2 is required for the migration. For example, in the case of lighting equipment, 5 which is the number of frames equivalent to one second is set as T U , and in the case of an automatic door, 50 which is the number of frames equivalent to 10 seconds is set as T U Ru.

機器2の不安定カウンタの値がT以上であった場合は(ステップS24にてYESの場合)、例えば、照明機器が点灯と消灯とを繰り返すちらつきのような機器2の不安定な不具合が発生しているといえる。そこで、モデル生成手段60は、動作状態が不安定である不具合が発生したとして当該機器の不具合検知フラグをONに設定する(ステップS25)。この場合、モデル生成手段60は、当該機器2のパラメータレンジを移行中モデルのパラメータレンジと同じ設定とすることができ、例えば、0〜100%とする。 If the value of unstable counter device 2 was T U or more (YES in step S24), and for example, unstable failure device 2 such as a flicker illumination device repeatedly turning on and off It can be said that it has occurred. Therefore, the model generation unit 60 sets the malfunction detection flag of the device to ON, assuming that the malfunction whose operation state is unstable occurs (step S25). In this case, the model generation unit 60 can set the parameter range of the device 2 to the same setting as the parameter range of the in-transition model, for example, 0 to 100%.

モデル生成手段60は不具合が発生中であることを検知すると、警告手段であるユーザーインターフェース部7にその旨を警告させる(ステップS26)。例えば、機器2が照明機器であれば、当該照明機器の設置面(天井など)を視野に含む仮想の撮影面に空間モデルをレンダリングして、レンダリング画像中にて不具合の発生している電灯の像を強調表示するとともに当該画像に文字列「電灯にちらつきが発生しています」を重畳させて警告表示させる。また、機器2が自動ドアであれば例えば、不具合の発生している自動ドアの像を背景画像において強調表示するとともに当該背景画像に文字列「自動ドアが開閉を繰り返しています」を重畳させて警告表示させる。   When the model generation unit 60 detects that a failure is occurring, the model generation unit 60 causes the user interface unit 7 as a warning unit to warn of that (step S26). For example, if the device 2 is a lighting device, a space model is rendered on a virtual shooting surface including the installation surface (ceiling etc.) of the lighting device in the field of view, and a problem occurs in the rendered image. The image is highlighted and a warning "flicker on the light is occurring" is superimposed on the image to display a warning. Also, if the device 2 is an automatic door, for example, the image of the automatic door having a defect is highlighted in the background image and the character string "automatic door is repeatedly opening and closing" is superimposed on the background image Display a warning.

機器2の不安定カウンタの値がT未満であった場合(ステップS24にてNOの場合)、ステップS25,S26をスキップして処理をステップS27に進める。 If the value of the instability counter device 2 is less than T U (if at step S24 of NO), the process proceeds skips step S25, S26 to step S27.

ステップS27ではモデル生成手段60は、次回に前回パラメータとして参照するために今回パラメータを記憶部5に記憶させる。   In step S27, the model generation unit 60 stores the current parameter in the storage unit 5 to be referred to as the previous parameter next time.

ステップS22,S26での不具合警告を受けて、ユーザーである機器管理者は不具合発生中の機器2の修理・交換といった対処を行うことができる。当該対処により不具合が解消された場合、ユーザーはユーザーインターフェース部7を操作して復旧信号を入力する。モデル生成手段60は、復旧信号の入力を確認し(ステップS28)、復旧信号が入力されている場合(ステップS28にてYESの場合)、機器2の動作状態を「移行中」に設定する(ステップS29)。一方、復旧信号が入力されていない場合は(ステップS28にてNOの場合)、ステップS29はスキップされる。   In response to the defect warning in steps S22 and S26, the device administrator who is the user can take measures such as repair / replacement of the device 2 in which the defect is occurring. If the problem is resolved by the countermeasure, the user operates the user interface unit 7 to input a recovery signal. The model generation unit 60 confirms the input of the recovery signal (step S28), and sets the operation state of the device 2 to "during transition" when the recovery signal is input (in the case of YES at step S28). Step S29). On the other hand, when the recovery signal is not input (NO in step S28), step S29 is skipped.

背景物に複数の機器2が存在する場合、モデル生成手段60は各機器についてステップS15〜S29を実行する。   When there are a plurality of devices 2 in the background, the model generation unit 60 executes steps S15 to S29 for each device.

モデルパラメータの記録処理S27および復旧処理への対応処理S28,S29を終えると、画像処理部6は処理をステップS1に戻し、次の撮影画像に対する処理を開始する。   After completing the model parameter recording process S27 and the recovery process response processes S28 and S29, the image processing unit 6 returns the process to step S1 and starts the process for the next captured image.

なお、ステップS18の判定にて安定カウンタの値が閾値以上であったことが、今回パラメータと前回パラメータとの差の大きさが閾値T以下である状態が所定期間以上継続したことを保証するために、ステップS16にて今回パラメータと前回パラメータとの差の大きさが閾値Tを超えた場合には安定カウンタの値を0にリセットしてもよい。すなわち、これにより、所定期間以上続けて、モデルパラメータの変化が閾値T以下であり、且つモデルパラメータが目標範囲内である場合、新たな目標範囲への移行を指示する制御信号が取得されるまで、モデル生成手段60は、目標範囲のみについて動作状態を変更する移行完了時モデルを生成する。 Note that the value of stability counter in the determination of step S18 that is greater than or equal to the threshold, to ensure that the size is equal to or less than the threshold value T D state of the difference between the current parameter and the last parameter has continued more than a predetermined time period For this reason, when the magnitude of the difference between the current parameter and the previous parameter exceeds the threshold value T D in step S16, the value of the stability counter may be reset to zero. That is, as a result, when the change of the model parameter is equal to or less than the threshold value T D and the model parameter is within the target range continuously for a predetermined period or more, a control signal instructing transition to a new target range is acquired. The model generation means 60 generates a transition completion model which changes the operation state only for the target range.

[変形例]
(1)上記実施形態においては、背景画像生成手段61が、複数のレンダリング画像の中から撮像画像との相違度が最も低いレンダリング画像を選択し、さらに選択したレンダリング画像の画素値を撮像画像の対応する画素値に近づける補正を行って背景画像を生成する例を示した。その変形例においては、背景画像生成手段61は、補正を省略し、複数のレンダリング画像のうち撮像画像との相違度が最も低いレンダリング画像を背景画像とすることもできる。このような変形例は、例えば、背景画像上で机のエッジパターンを探索することにより監視空間内の机の移動を検出するような、画素値の高精度化よりも処理負荷の軽減を優先させたい用途において好適である。この変形例においても、撮影画像の過剰な近似を防止でき、撮影画像に背景以外の物体が写っていても背景モデルに基づき高精度で低負荷に背景画像を生成することが可能となる。
[Modification]
(1) In the above embodiment, the background image generation unit 61 selects the rendering image with the lowest degree of difference from the captured image from the plurality of rendering images, and further selects the pixel value of the selected rendering image as the captured image. The example which produces | generates a background image by performing correction | amendment which closely approaches to a corresponding pixel value was shown. In the modification, the background image generation unit 61 may omit the correction, and may use the rendering image having the lowest degree of difference from the captured image among the plurality of rendering images as the background image. In such a modification, for example, priority is given to reduction of the processing load over improvement in accuracy of pixel values, such as detecting movement of the desk in the monitoring space by searching for an edge pattern of the desk on the background image. It is suitable for the intended use. Also in this modified example, it is possible to prevent excessive approximation of the photographed image, and even if an object other than the background appears in the photographed image, it is possible to generate the background image with low load and high accuracy based on the background model.

(2)上記実施形態および変形例においては、複数通りの背景モデルに変更する場合、モデル生成手段60が一度に複数通りに背景モデルを生成する例を示したが、モデル生成手段60が背景画像生成手段61と連携して探索的に背景モデルを変更してもよい。例えば、移行中の照明機器に関しモデルパラメータである照明強度を0〜100%の範囲で1%刻みで設定する場合、まずモデル生成手段60が照明強度を50%に設定した背景モデルを出力し背景画像生成手段61がそのレンダリング画像と撮影画像との明るさの差を算出する。次に、当該差が正である(レンダリング画像の方が明るい)場合は、モデル生成手段60が照明強度を49%に変更した背景モデルを出力し、差が負である(レンダリング画像の方が暗い)場合は、モデル生成手段60が照明強度を51%に変更した背景モデルを出力する、というように差が0に近づく方向に照明強度を変更する。そして、背景画像生成手段61は、差の正負が変わったときまたは差の正負が変わらないまま範囲の下限または上限に達したときのレンダリング画像を用いて背景画像を生成する。このようにすることでさらに処理負荷を軽減できる。   (2) In the above embodiment and modification, an example is shown in which the model generation unit 60 generates a plurality of background models at a time when changing to a plurality of background models, but the model generation unit 60 generates a background image The background model may be changed in an exploratory manner in cooperation with the generation means 61. For example, in the case of setting the illumination intensity which is a model parameter in the range of 0 to 100% in 1% steps with respect to the lighting apparatus during transition, first, the model generation unit 60 outputs a background model in which the illumination intensity is set to 50%. The image generation means 61 calculates the difference in brightness between the rendered image and the photographed image. Next, when the difference is positive (the rendered image is brighter), the model generation unit 60 outputs a background model in which the illumination intensity is changed to 49%, and the difference is negative (the rendered image is In the case of dark), the illumination intensity is changed in the direction in which the difference approaches 0, such that the model generation means 60 outputs a background model in which the illumination intensity is changed to 51%. Then, the background image generation unit 61 generates a background image using a rendering image when the difference between positive and negative changes or when the lower or upper limit of the range is reached without changing the positive and negative of the difference. By doing this, the processing load can be further reduced.

1 物体検出装置、2 機器、3 機器インターフェース部、4 カメラ、5 記憶部、6 画像処理部、7 ユーザーインターフェース部、20 スイッチ、21 電灯、22 人感センサ、23 自動ドア、30 制御信号取得手段、40 撮影手段、50 背景モデル記憶手段、60 モデル生成手段、61 背景画像生成手段、62 物体検出手段。   Reference Signs List 1 object detection device, 2 devices, 3 device interface units, 4 cameras, 5 storage units, 6 image processing units, 7 user interface units, 20 switches, 21 lights, 22 human sensors, 23 automatic doors, 30 control signal acquisition means , 40 shooting means, 50 background model storage means, 60 model generation means, 61 background image generation means, 62 object detection means.

Claims (5)

カメラによる所定の空間の撮影に対し、当該空間に存在する背景物の画像であり前記撮影に対応したタイミングでの背景画像を生成する背景画像生成装置であって、
前記カメラにより前記空間を撮影した撮影画像を取得する撮影画像取得手段と、
前記背景物の三次元モデルであって背景物それぞれの光学的な特徴量又は三次元座標値をモデルパラメータとして含む背景モデルを記憶している記憶手段と、
前記背景物に含まれる所定の機器の動作を制御する制御信号を取得する制御信号取得手段と、
取得した前記制御信号により生じる前記機器の動作状態に応じて当該機器の前記モデルパラメータを変更し、当該制御信号に対して予め想定される前記モデルパラメータの変化範囲にて前記モデルパラメータが異なる複数の背景モデルを生成するモデル生成手段と、
前記モデル生成手段により生成された前記複数の背景モデルのそれぞれを、前記カメラの撮影面にレンダリングして複数のレンダリング画像を生成し、当該レンダリング画像のうち前記撮影画像との相違度が最小のものを用いて前記背景画像を生成する背景画像生成手段と、
を備えたことを特徴とする背景画像生成装置。
A background image generating apparatus that generates an image of a background object existing in a space and the timing corresponding to the imaging with respect to imaging of a predetermined space by a camera,
A photographed image acquisition unit that acquires a photographed image of the space photographed by the camera;
Storage means for storing a background model which is a three-dimensional model of the background, and which includes optical feature quantities or three-dimensional coordinate values of each background as model parameters;
Control signal acquisition means for acquiring a control signal for controlling the operation of a predetermined device included in the background object;
A plurality of model parameters of the device are changed according to the operation state of the device generated by the acquired control signal, and the model parameters are different in a change range of the model parameter assumed for the control signal in advance. Model generation means for generating a background model;
Each of the plurality of background models generated by the model generation unit is rendered on the photographing surface of the camera to generate a plurality of rendered images, and among the rendering images, the degree of difference with the photographed image is the smallest. and the background image generating means for generating the background image using,
A background image generation device characterized by comprising.
前記背景画像生成手段は、前記相違度が最小の前記レンダリング画像の画素値を所定限度内で変化させることで当該レンダリング画像を前記撮影画像に近づける補正を行って前記背景画像を生成すること、
を特徴とする請求項に記載の背景画像生成装置。
The background image generation unit generates the background image by performing correction that brings the rendering image closer to the captured image by changing the pixel value of the rendering image with the smallest degree of difference within a predetermined limit.
Background image generation apparatus according to claim 1, wherein the.
前記制御信号に対する前記モデルパラメータの前記変化範囲は、当該制御信号に対応する目標範囲と当該目標範囲への移行途中の範囲とからなり、
前記モデル生成手段は、所定期間以上続けて、前記背景画像に対応する前記モデルパラメータの変化が所定の閾値以下であり、且つ当該モデルパラメータが前記目標範囲内である場合、新たな前記目標範囲への移行を指示する前記制御信号が取得されるまで、前記変化範囲のうち前記目標範囲のみについて前記モデルパラメータが異なる複数の前記背景モデルを生成すること、
を特徴とする請求項又は請求項に記載の背景画像生成装置。
The change range of the model parameter with respect to the control signal includes a target range corresponding to the control signal and a range halfway through transition to the target range.
When the change of the model parameter corresponding to the background image is equal to or less than a predetermined threshold and the model parameter is within the target range, the model generation means continues to the new target range continuously for a predetermined period or more. Generating a plurality of the background models having different model parameters only for the target range within the change range, until the control signal instructing transition of
The background image generation device according to claim 1 or 2 , characterized in that
前記背景画像生成手段は、前記モデル生成手段により生成された前記背景モデルを前記撮影面にレンダリングしたレンダリング画像を生成し、当該レンダリング画像の画素値を所定限度内で変化させることで当該レンダリング画像を前記撮影画像に近づける補正を行って前記背景画像を生成すること、
を特徴とする請求項1に記載の背景画像生成装置。
The background image generation unit generates a rendering image obtained by rendering the background model generated by the model generation unit on the photographing surface, and changes the pixel value of the rendering image within a predetermined limit to generate the rendering image. Performing correction close to the photographed image to generate the background image;
The background image generation device according to claim 1, characterized in that
請求項1から請求項のいずれか1つに記載の背景画像生成装置が、前記カメラの撮影タイミングに対応して生成した前記背景画像を、前記カメラが当該撮影タイミングにて前記空間を撮影した撮影画像と比較して、前記背景物以外の物体を前記空間にて検出する物体検出装置。 The said background image generation apparatus as described in any one of the Claims 1-4 image | photographed the said space with the said imaging | photography timing the said background image which the background image produced | generated according to the imaging | photography timing of the said camera was said. An object detection apparatus for detecting an object other than the background object in the space, as compared with a photographed image.
JP2017013138A 2017-01-27 2017-01-27 Background image generation device and object detection device Active JP6529526B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017013138A JP6529526B2 (en) 2017-01-27 2017-01-27 Background image generation device and object detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017013138A JP6529526B2 (en) 2017-01-27 2017-01-27 Background image generation device and object detection device

Publications (2)

Publication Number Publication Date
JP2018121289A JP2018121289A (en) 2018-08-02
JP6529526B2 true JP6529526B2 (en) 2019-06-12

Family

ID=63044112

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017013138A Active JP6529526B2 (en) 2017-01-27 2017-01-27 Background image generation device and object detection device

Country Status (1)

Country Link
JP (1) JP6529526B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6240116B2 (en) * 2015-03-31 2017-11-29 セコム株式会社 Object detection device

Also Published As

Publication number Publication date
JP2018121289A (en) 2018-08-02

Similar Documents

Publication Publication Date Title
JP6240116B2 (en) Object detection device
WO2013136822A1 (en) Information processing device, image sensor device, and program
JP5887508B2 (en) Exposure control apparatus, imaging apparatus, image display apparatus, and exposure control method
CN110192241A (en) Control the brightness of emissive display
JP6548686B2 (en) Image comparison device
JP2020021300A (en) Fire monitoring device, fire monitoring system, and program for fire monitoring device
JP2023500510A (en) A system for performing ambient light image correction
KR20140057522A (en) Method and system for reliable reflective object detection using display light scene illumination
JP7092615B2 (en) Shadow detector, shadow detection method, shadow detection program, learning device, learning method, and learning program
JP2009140307A (en) Person detector
JP6064354B2 (en) Dimming system
KR20140122320A (en) Method for lighting control and lighting control system using the same
JP6415022B2 (en) Image processing apparatus, image processing method, and program
Murgia et al. An improved colorimetric invariants and RGB-depth-based codebook model for background subtraction using kinect
JP6529526B2 (en) Background image generation device and object detection device
JP2015092643A (en) Image processing device, image processing method thereof, computer program and image processing system
JP6483165B2 (en) Space monitoring device
JPH10289321A (en) Image monitoring device
JP6256137B2 (en) Sensor device and control system using sensor device
EP3337298A1 (en) Apparatus and method for controlling lighting conditions in a room
CN114731360B (en) System for performing image motion compensation
JP6472987B2 (en) Video projection system
CN104823524B (en) For the method for self calibration lighting apparatus and the lighting apparatus of execution this method
TWI451342B (en) Shadow Removal Method in Mobile Light Source Environment
JP6709954B2 (en) Lighting control system

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180925

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181120

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190514

R150 Certificate of patent or registration of utility model

Ref document number: 6529526

Country of ref document: JP

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