JP2012221043A - Image processing method and monitoring device - Google Patents
Image processing method and monitoring device Download PDFInfo
- Publication number
- JP2012221043A JP2012221043A JP2011083701A JP2011083701A JP2012221043A JP 2012221043 A JP2012221043 A JP 2012221043A JP 2011083701 A JP2011083701 A JP 2011083701A JP 2011083701 A JP2011083701 A JP 2011083701A JP 2012221043 A JP2012221043 A JP 2012221043A
- Authority
- JP
- Japan
- Prior art keywords
- template
- image
- image processing
- edge
- memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Alarm Systems (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、監視対象となる領域で撮影された物体を監視する監視装置に関し、特に、監視対象となる物体の位置、移動方向、移動速度などを検出して効果的に監視が行えるようにするための画像処理方法及び監視装置に関する。 The present invention relates to a monitoring device that monitors an object photographed in a region to be monitored, and in particular, can detect effectively the position, moving direction, moving speed, etc. of the object to be monitored. The present invention relates to an image processing method and a monitoring apparatus.
従来の監視装置では、例えば、テレビカメラなどに代表される撮像装置によって監視領域を撮像した画像(入力画像)を画像処理手段によって処理し、入力画像中の所定の物体を自動的に検出し、該物体の位置や速度といった属性を基に監視領域を監視するような方法が広く用いられている。 In a conventional monitoring device, for example, an image (input image) obtained by imaging a monitoring area by an imaging device represented by a television camera or the like is processed by an image processing unit, and a predetermined object in the input image is automatically detected. A method of monitoring a monitoring area based on attributes such as the position and speed of the object is widely used.
このような入力画像中の所定の物体を自動的に検出するような方法の一例として、従来から、入力画像と背景画像との間で、あるいは所定の時間差で撮像した2枚の画像との間で、画素ごとの差分を計算し、入力画像の明るさ変化部分を検出する差分法(特に、前者は背景差分法、後者はフレーム間差分法と呼ばれる)や、画像内の局所的な動きの分布を求め、その動きの中で非零のベクトルを持つ領域のかたまりを見つけるオプティカルフロー法と呼ばれる方法が使用されている。これらの方法については、例えば、非特許文献1の238〜245ページに詳しく解説されている。 As an example of a method for automatically detecting a predetermined object in such an input image, conventionally, between the input image and the background image or between two images captured at a predetermined time difference. The difference method for calculating the pixel-by-pixel difference and detecting the brightness change part of the input image (especially the former is called the background difference method and the latter is called the inter-frame difference method), or the local motion in the image A method called an optical flow method is used in which a distribution is obtained and a cluster of regions having non-zero vectors in the motion is found. These methods are described in detail on pages 238 to 245 of Non-Patent Document 1, for example.
このような入力画像中の所定の物体を自動的に検出する方法は、監視する対象に応じて適切に選択する必要がある。例えば、背景差分法であれば、入力画像と背景画像との差分を取るため、入力画像中で背景画像に写っていない物体を、動く物体や静止物体に関わらず検出できるが、背景画像をあらかじめ推測しなければならず、さらに、例えば、木々の揺れ、水面の揺らぎなど、検出すべき物体以外の背景物が動いている場合、これらの物体も検出されてしまい、誤った警報、いわゆる誤報が発生する可能性がある。 Such a method of automatically detecting a predetermined object in the input image needs to be appropriately selected according to the object to be monitored. For example, in the background subtraction method, since the difference between the input image and the background image is taken, an object that is not shown in the background image in the input image can be detected regardless of a moving object or a stationary object. Furthermore, if background objects other than the object to be detected are moving, for example, shaking of trees, fluctuation of the water surface, etc., these objects are also detected, and false alarms, so-called false alarms are generated. May occur.
一方、フレーム間差分法やオプティカルフロー法では、背景画像をあらかじめ推測する必要がないが、検出すべき物体が静止した場合にはその検出ができなくなる。さらに、検出すべき物体の動きと、木々の揺れや水面の揺らぎなどの動きとを区別することが必要となり、検出すべき物体以外の物体の動きはノイズとして検出すべき物体の検出の妨げとなる。このように、フレーム間差分法やオプティカルフロー法では、検出すべき物体の以外のノイズが多い場合には、検出すべき物体とノイズとを正確に区別することが困難となり、ノイズを誤って検出物体と判定した場合には誤報が発生する。 On the other hand, in the inter-frame difference method and the optical flow method, it is not necessary to guess the background image in advance, but when the object to be detected is stationary, the detection cannot be performed. Furthermore, it is necessary to distinguish between the movement of the object to be detected and the movement of the trees and the water surface, and the movement of the object other than the object to be detected hinders detection of the object to be detected as noise. Become. As described above, in the inter-frame difference method or the optical flow method, when there is a lot of noise other than the object to be detected, it is difficult to accurately distinguish the object to be detected from the noise, and the noise is detected incorrectly. If it is determined as an object, a false alarm is generated.
以上のように、従来法である差分法やオプティカルフロー法は、時々刻々監視環境が変化するような背景部分に動きのある場面、特に、潮位変化があるような水上、水流によりゴミなどが流れているような水中、雲の流れなどがある空中などでは、背景画像をあらかじめ推測することが困難であることや、動きの分布の中から特定の検出すべき物体の動きのみを抽出することが困難であるため、このような監視環境に対しては、上記の従来法を搭載した監視装置を適用することができなかった。 As described above, the difference method and the optical flow method, which are the conventional methods, are used in scenes where the monitoring environment changes from moment to moment, especially when there is movement in the background, especially on the water where there is a change in the tide level, and dust flows due to the water flow. It is difficult to estimate the background image in advance, or to extract only the motion of a specific object to be detected from the motion distribution. Since it is difficult, the monitoring device equipped with the above-described conventional method cannot be applied to such a monitoring environment.
従来の映像監視装置においては、前述の通り、監視環境が時々刻々と変化するような場面で背景画像をあらかじめ用意しておくことは困難であり、適用範囲が限定されていた。例えば、水上、水中、空中などでの適用を考えると、潮位の変化、水泡や浮遊物の存在、雲の動きなども、差分法であれば画像の変化として現れたり、オプティカルフロー法であれば検出すべき物体以外の動きとして検出されたりして、検出すべき物体なのか、背景物の変化なのかを区別することを困難とさせていた。したがって、このような場面では、従来の映像監視装置を適用することができないという問題があった。 In the conventional video monitoring apparatus, as described above, it is difficult to prepare a background image in advance in a scene where the monitoring environment changes from moment to moment, and the application range is limited. For example, considering application in the water, underwater, and air, changes in the tide level, the presence of water bubbles and suspended solids, cloud movements, etc. may appear as image changes in the difference method, or in the optical flow method. It has been difficult to distinguish whether it is an object to be detected or a change in a background object by being detected as a motion other than the object to be detected. Therefore, in such a scene, there is a problem that the conventional video monitoring apparatus cannot be applied.
本発明は、このような従来の事情に鑑みなされたもので、撮像装置によって監視領域を撮像した画像から、検出すべき物体の位置や速度と言った属性を計測し、該物体を監視するようにした画像処理方法及び監視装置を提供することを目的とする。
さらに具体的には、監視環境が時々刻々と変化するような場面において、検出すべき物体と、背景領域の背景物とを区別できるようにして、監視領域を効果的に監視できるようにすることを目的とする。
The present invention has been made in view of such a conventional situation, and measures an attribute such as the position and speed of an object to be detected from an image obtained by imaging a monitoring area by an imaging device, and monitors the object. An object of the present invention is to provide an image processing method and a monitoring apparatus.
More specifically, in a scene where the monitoring environment changes from moment to moment, the object to be detected can be distinguished from the background object in the background area, so that the monitoring area can be effectively monitored. With the goal.
上記目的を達成するため、本発明に係る画像処理方法及び監視装置は、監視領域を撮像する撮像装置と、該撮像装置で撮像した入力画像を処理して該監視領域の中の物体を検出する画像処理装置と、該画像処理装置の物体の検出結果に基づき出力画像を表示する表示装置を有し、次のようにして、監視領域内の物体を検出する。 To achieve the above object, an image processing method and a monitoring apparatus according to the present invention detect an object in the monitoring area by processing an imaging apparatus that images the monitoring area and an input image captured by the imaging apparatus. An image processing device and a display device that displays an output image based on the detection result of the object of the image processing device are provided, and an object in the monitoring area is detected as follows.
すなわち、前記画像処理装置は、前記撮像装置で得られた入力画像のエッジ情報を抽出するエッジ抽出手段と、前記エッジ抽出手段によって得られたエッジ情報に基づいてテンプレート画像を作成するテンプレート作成手段と、前記テンプレート作成手段によって作成された少なくともテンプレート画像とその位置情報をテンプレートメモリに記憶するテンプレート記憶手段と、前記テンプレート記憶手段に記憶されたテンプレート画像とその位置情報に基づいて該テンプレート画像と類似する画像を入力画像中から探索する処理(テンプレートマッチング処理)を実行するテンプレートマッチング手段と、前記テンプレートマッチング処理の結果に基づいて前記テンプレートメモリに記憶されたテンプレートを更新するテンプレート更新手段と、前記エッジ抽出手段と前記テンプレートマッチング処理の結果に基づいて検出すべき物体の位置や速度の少なくとも一つの属性を計測する位置検出手段と、前記位置検出手段の結果に基づいて検出された物体の危険度を判定する危険度判定手段と、前記危険度判定手段に基づいて前記表示装置に判定結果を表示するようにして、監視領域を効果的に監視できるようにした。 That is, the image processing device includes an edge extraction unit that extracts edge information of the input image obtained by the imaging device, and a template creation unit that creates a template image based on the edge information obtained by the edge extraction unit. Template storage means for storing at least a template image created by the template creation means and its position information in a template memory; and a template image stored in the template storage means and similar to the template image based on the position information Template matching means for executing a process (template matching process) for searching for an image from the input image, and a template updater for updating the template stored in the template memory based on the result of the template matching process Position detection means for measuring at least one attribute of the position and speed of the object to be detected based on the result of the edge extraction means and the template matching process, and the object detected based on the result of the position detection means The monitoring area can be effectively monitored by displaying the determination result on the display device based on the risk determination means for determining the risk of the risk and the risk determination means.
さらに、前記テンプレート作成手段は、前記エッジ抽出手段によって得られたエッジ情報に基づいてエッジが多い領域を判定し、エッジが多いと判定した場合に、前記入力画像の該領域の画像に基づいてテンプレート画像を作成することで、テンプレートマッチング処理の精度を高めた。 Further, the template creation means determines an area with many edges based on the edge information obtained by the edge extraction means, and when it is determined that there are many edges, a template is created based on the image of the area of the input image. By creating an image, the accuracy of the template matching process was improved.
さらにまた、前記テンプレート作成手段は、エッジが多い領域かつ前記テンプレートメモリに記憶されたテンプレートの位置情報から算出したテンプレート画像の範囲との重複度が小さい領域の画像に基づいてテンプレート画像を作成することで、テンプレートマッチング処理に使用するテンプレート画像の数を適切に調整するようにした。 Furthermore, the template creation means creates a template image based on an image of a region having many edges and a region having a small degree of overlap with the template image range calculated from the template position information stored in the template memory. Therefore, the number of template images used for the template matching process is adjusted appropriately.
さらに、前記テンプレート更新手段は、前記テンプレートマッチング手段において、探索された領域とテンプレート画像との類似度を判定し、類似度が所定の値よりも高い場合に、該探索された領域の位置情報を前記テンプレートメモリに記憶されたテンプレートの位置情報と置き換えることで、テンプレートマッチング処理の結果に基づき信頼性の高いテンプレートのみを更新するようにした。 Further, the template updating means determines the similarity between the searched area and the template image in the template matching means, and if the similarity is higher than a predetermined value, the template updating means obtains position information of the searched area. By replacing the position information of the template stored in the template memory, only the highly reliable template is updated based on the result of the template matching process.
さらにまた、前記テンプレート更新手段は、前記テンプレートマッチング手段において、探索された領域とテンプレート画像との類似度を判定し、類似度が所定の値よりも低い場合に、前記テンプレートメモリに記憶されたテンプレートを削除することで、テンプレートマッチング処理の結果に基づき信頼性の低いテンプレートをテンプレートメモリから削除するようにした。 Furthermore, the template update means determines the similarity between the searched area and the template image in the template matching means, and the template stored in the template memory when the similarity is lower than a predetermined value. By deleting, a template with low reliability is deleted from the template memory based on the result of the template matching process.
さらに、前記テンプレートマッチング手段は、テンプレートメモリに記憶したテンプレート画像と類似する画像を入力画像中から探索する際に、探索範囲を限定することで、特定方向へ移動する物体のみを検出するようにした。 Further, the template matching means detects only an object moving in a specific direction by limiting a search range when searching for an image similar to the template image stored in the template memory from the input image. .
さらに、前記位置検出手段は、前記テンプレートメモリ内に記憶されたテンプレート、或いは、前記テンプレートマッチングステップにおいて類似度が所定値以上となるテンプレートに相当する領域において、前記入力画像のエッジ量を所定の座標軸に沿って投影し、検出すべき物体の位置または速度の少なくとも一つの属性を計測することで、テンプレートマッチング処理によって得られた信頼性の高いテンプレートの中から物体の属性を計測するようにした。 Further, the position detection means may convert the edge amount of the input image to a predetermined coordinate axis in a region corresponding to a template stored in the template memory or a template whose similarity is a predetermined value or more in the template matching step. And measuring at least one attribute of the position or velocity of the object to be detected, thereby measuring the attribute of the object from among the highly reliable templates obtained by the template matching process.
本発明によれば、抽出されたエッジ量から信頼性の高いテンプレートを新規登録し、信頼性の低いテンプレートを逐次削除しながらテンプレートの数を適切に調整し、検出すべき物体の位置や速度と言った属性を計測できるようにしたため、従来の画像処理方法及び監視装置の適用範囲をさらに広げることができる。 According to the present invention, a highly reliable template is newly registered from the extracted edge amount, the number of templates is appropriately adjusted while sequentially deleting unreliable templates, and the position and speed of an object to be detected Since the said attribute can be measured, the application range of the conventional image processing method and monitoring apparatus can be further expanded.
図1は、本発明の実施形態に係る、撮像装置による監視装置の一例を示す図である。本実施形態の監視装置は、撮像装置101と、画像処理装置102と、表示装置103によって構成される。
撮像装置101は、監視対象となる領域を可視光、赤外光などの波長を持つ電磁波の強度として撮像し、2次元画像として画像処理装置102に逐次出力する。
画像処理装置102は、撮像装置101から入力した画像に対して後述する処理を実行し、入力画像から所定の物体を抽出し、その結果を表示装置103に出力する。
表示装置103は、画像処理装置102の結果に基づき所定の表示を行う。
FIG. 1 is a diagram illustrating an example of a monitoring apparatus using an imaging apparatus according to an embodiment of the present invention. The monitoring apparatus according to the present embodiment includes an
The
The
The
本実施形態で使用される画像処理装置102は、例えばプロセッサやメモリなどを備えたコンピュータ、あるいはそれに類する装置によって実現される。また、監視装置の構成として、本構成の他にも、従来より、撮像装置制御のための装置や、各種外部記録装置、伝送機器等の構成要素を持つものも存在するが、説明を簡単にするため、本例では省略している。
以下、画像処理装置102の動作の具体例を実施例として説明する。
The
A specific example of the operation of the
本発明の実施例を、図1を用いて説明する。前述の通り、本発明の監視装置は、撮像装置101と、画像処理装置102と、表示装置103によって構成される。
画像処理装置102は、エッジ抽出部104と、テンプレート作成部105と、テンプレートメモリ106と、テンプレートマッチング部107と、位置検出部108と、危険度判定部109とによって構成される。
エッジ抽出部104は、撮像装置101から入力された入力画像処理しエッジ画像を生成して、テンプレート作成部105及び位置検出部108に出力する。
テンプレート作成部105は、撮像装置101から入力した入力画像とエッジ抽出部104から得られたエッジ画像に基づいてテンプレートを生成してテンプレートメモリ106に書き込む。
テンプレートメモリ106は、テンプレート生成部105やテンプレートマッチング部107からの出力に基づいてテンプレート画像や該テンプレート画像の位置情報などを記憶する。
テンプレートマッチング部107は、テンプレートメモリ106に記憶したテンプレート画像及び位置情報に基づいてテンプレートマッチング処理を行い、その結果を位置検出部108に出力する。
位置検出部108は、テンプレートマッチング108のテンプレートマッチング処理の結果及びエッジ抽出部104のエッジ画像を用いて検出すべき物体の位置や速度等の属性を検出して、その結果を危険度判定部109へ出力する。
危険度判定部109は、位置検出部108の検出結果に基づいて監視領域の危険度を判定して、その結果を出力装置103へ出力する。
An embodiment of the present invention will be described with reference to FIG. As described above, the monitoring device according to the present invention includes the
The
The
The
The
The
The
The
次に、前記画像処理装置102の動作を、図2のフローチャート、及び図3から図10の補足図を用い、河川を往来する船舶がゲート(水門)に近付く例を以って、詳細に説明する。
図2は、画像処理装置102における構成要素104から109までの処理を順を追って説明したものである。
先ず、画像入力ステップ201では、撮像装置101から、例えば、画像入力I/F(図示しない)などを介して、横640画素、縦480画素、1画素8ビットの画像を入力画像として入力する。
Next, the operation of the
FIG. 2 explains the processing from the
First, in the
次に、エッジ抽出ステップ202では、画像入力ステップ201で得られた入力画像に対して微分フィルタを適用して、入力画像のエッジ画像を得る。この微分フィルタの例として、従来のソーベルフィルタ(Sobel Filter)やプリューウィットフィルタ(Prewitt Filter)などが使用できる。これらのフィルタの詳細については、例えば、非特許文献1の114〜121ページに詳しく記載されている。この処理によって、入力画像全体の輝度レベルの変動に依存せず、例えば図3の画像301のような入力画像に写る構成物の輪郭やパターン等の情報が抽出できる。
Next, in the
次に、ブロック走査ループ開始ステップ203は、前記エッジ抽出ステップ202で得られたエッジ画像をいくつかのブロックに分割して、各ブロックに対してステップ204からステップ206までを実行する。このブロックの分割では、 図4に示すように、入力画像全体を所定の大きさ(例えば、横32画素、縦32画素)で縦横等間隔に分割する。このとき、隣接するブロック同士を一定の割合で重なるようにブロックを設定しても良い。
Next, the block scanning loop start
次に、ブロック内エッジ量算出ステップ204では、注目するブロックのエッジの総量を計算する。エッジ抽出ステップ202において、エッジ情報はエッジ画像として得られているため、エッジの総量は、注目するブロック内での画素値(エッジ強度)の累積値として表わされる。或いはエッジを示す画素の個数でもよい。
Next, in a block edge
次に、エッジ量判定ステップ205では、この累積値が所定のしきい値ETh(例えば、ブロックサイズ横32画素、縦32画素の場合、5000(1画素あたりの平均エッジ量は約5レベル))以上である場合には、エッジが多いと判断し、テンプレート作成・登録ステップ206へ分岐し、しきい値未満の場合は、ブロック走査ループ終了ステップ207へ分岐し、次のブロックを走査する。図4において、斜線で塗潰したブロックは、エッジ量判定ステップ205によって、エッジが多いと判定されたブロックを表わす。ブロック内に、検出すべき物体や背景構造物、揺れる波などのパターンを持った画像があった場合、その輪郭やパターンがエッジとなって抽出されるため、この判定により、被写体の候補となるブロックが抽出される。
Next, in the edge
次に、テンプレート作成・登録ステップ206では、エッジ量判定ステップ205でエッジが多いと判定されたブロック(図4における斜線で塗潰したブロック)のテンプレートを作成し、テンプレートメモリ106に記憶する。テンプレートは、少なくともテンプレート画像と、テンプレートの位置座標との2つの情報を有し、テンプレート画像は入力画像の当該ブロックの位置の部分画像、テンプレートの位置座標(xT,yT)は当該ブロックの(入力画像中での)位置となる。テンプレートは、それが何フレーム前の入力画像で登録されたかを示す世代情報、直前に検出された移動ベクトル(後述)等の情報を更に保持してもよい。
Next, in the template creation /
図2のフローチャートの2サイクル目以降においては、前記テンプレート作成・登録ステップ206は、エッジが多いと判定されたブロックの全てを登録するのではなく、テンプレートメモリ106内に記録されたテンプレートと当該ブロックとの重複度を判定して、画像同士が2/3(約67%)以上重複している場合には、テンプレートの登録を行わないようにする。重複度は、記録されたテンプレートの位置座標と当該ブロックの位置座標から容易に計算できる。
In the second and subsequent cycles of the flowchart of FIG. 2, the template creation /
次に、ブロック走査ループ終了ステップ207では、以上のようなステップ204からステップ206までのステップを、すべてのブロックの走査が終わるまで繰返す。図5は、テンプレートメモリ106に確保されたテンプレート領域500と、そこに記憶されたテンプレートを表わしており、ステップ203からステップ207までの処理(ブロック走査ループ)が終了すると、図4においてエッジが多いと判定された合計43個のブロックについてテンプレート画像とその位置座標(図示せず)がテンプレート501からテンプレート543として登録される。
Next, in the block scanning
次に、登録テンプレートループ開始ステップ208では、前記テンプレートメモリ106に登録された各テンプレートに対してステップ209からステップ213までを実行する。この処理されるテンプレートは、メモリ上の並び順や、登録された順(世代情報順)など、任意の順番で行ってよい。なお、直前のブロック走査ループで登録されたばかり(世代情報が0)のテンプレートは処理の対象から除いてよい。
Next, in a registered template
まず、テンプレートマッチングステップ209では、前記テンプレートメモリ106に登録された注目しているテンプレートに対してテンプレートマッチング処理を実行する。テンプレートマッチング処理は、テンプレート画像に類似する画像を入力画像中から探索する処理で、非特許文献1の202〜207ページに詳しく記載されている。ここで、テンプレートマッチング処理を実行する範囲を、例えば、元の位置(xT,yT)を中心に上下64画素、左右64画素などとし、マッチングの指標としては、例えば、式1に示すような相互相関係数を用いれば良い。
First, in the
ここで、 T(i,j)はテンプレート画像、 I(x,y)は入力画像、MとNは夫々テンプレート画像の幅と高さ(例えば32)である。相互相関係数Rは、類似度と呼ばれ、テンプレート画像と、入力画像中の探索範囲内で類似度が最も高い部分画像が、完全に一致する場合には、1.0となり、差が大きくなるにつれて小さな値となる。 Here, T (i, j) is a template image, I (x, y) is an input image, and M and N are the width and height (for example, 32) of the template image, respectively. The cross-correlation coefficient R is called similarity, and is 1.0 when the template image and the partial image having the highest similarity in the search range in the input image completely match, and the difference is large. As it becomes, it becomes a small value.
このテンプレートマッチング処理によって、テンプレートがどの位置(x,y)にマッチしたか、すなわち、各テンプレートに写る物体がどのような位置に動いた可能性があるかが分かる。
図6は、テンプレートマッチング処理の結果によって、テンプレートがどのような位置にマッチしたかを表示したものである。図中、矢印で示されるのは、テンプレートの位置と異なる位置にマッチしたものですなわち、これはテンプレートに写る物体の移動ベクトルを表わす。矢印を表示していないテンプレートは移動していないか探索範囲内での移動を検出できなかったことを表わす。このようにテンプレートマッチング処理によって、物体の移動方向が分かる。なお、本実施例では、テンプレートマッチング処理を実行する範囲を、正方領域として例示したが、これを例えば横長(例えば、上下4画素、左右64画素)に設定すれば、横方向の動きのみを検出することができる。
By this template matching process, it can be seen to which position (x, y) the template matches, that is, to which position the object shown in each template may have moved.
FIG. 6 shows what position the template matches according to the result of the template matching process. In the figure, an arrow indicates a position that matches a position different from the position of the template, that is, this represents a movement vector of an object shown in the template. A template that does not display an arrow indicates that it has not been moved or that movement within the search range could not be detected. In this way, the moving direction of the object is known by the template matching process. In this embodiment, the range in which the template matching process is executed is illustrated as a square area. However, if this is set to be horizontally long (for example, 4 pixels vertically and 64 pixels horizontally), only the movement in the horizontal direction is detected. can do.
次に、マッチング成否判定ステップ210では、例えば上記例では、マッチングによって算出された類似度を判定し、例えば、類似度が所定のしきい値RTh(例えば0.9)以上であれば、テンプレートマッチング処理が成功した(入力画像中でテンプレート画像に類似する画像が見つかった)とみなしテンプレート更新ステップ211に分岐し、類似度が所定のしきい値未満であれば、テンプレートマッチング処理が失敗した(入力画像中でテンプレート画像に類似する画像が見つからなかった)とみなしテンプレート削除ステップ213へ分岐する。
Next, in the matching success /
テンプレート更新ステップ211では、登録されたテンプレートの位置座標(xT,yT)を、新たにマッチングした位置座標で上書きして更新する。すなわち、テンプレートに写る物体の位置が最新の情報に更新される。
In the
次に、近接テンプレート削除ステップ212では、テンプレートメモリ106に記憶されたテンプレートと、注目しているテンプレートの位置を比較し、例えば、テンプレート画像同士が所定量OTh(例えば67%)以上重複している場合には、片方(例えば、テンプレートマッチング処理の際の類似度が小さい方)のテンプレートを、テンプレートメモリ106から削除する。これは、テンプレートメモリ106に登録されているテンプレートの内、重複しているテンプレートは、それぞれ独立にテンプレートマッチングを行ったとしても検出すべき物体に対して同様の情報が得られるため、片方を削除しても、得られる情報が変わりない上、処理時間が短縮できるという利点があるからである。
Next, in the proximity
一方、テンプレート削除ステップ213では、テンプレートマッチング処理に失敗したテンプレートをテンプレートメモリ106から削除する。これは、入力画像中でテンプレート画像に類似する画像が見つからなかったため、テンプレート自体の信頼性が低いと判断するためである。図6の例では、点線で囲まれたテンプレートで示している。このようなテンプレートは、ブロック内エッジ量算出ステップ204及びエッジ量判定ステップ205でエッジが多いと判定されテンプレート作成・登録ステップ206でテンプレートとして登録されたが、このエッジは、例えば、波などによって生じたものであり、このようなエッジは、時々刻々、その形状が変化することから、テンプレートマッチング処理によって高い類似度とならない。すなわち、テンプレートマッチング処理によって算出される類似度によって、テンプレートが監視環境が時々刻々と変化するような背景部分を指し示す場合でも、それをテンプレートメモリ106から除外することができる。
なお、このテンプレート削除ステップ213において、検出すべき被写体を映すテンプレートが削除されてしまった場合でも、撮像装置101から得られる入力画像を逐次処理していることから、次の入力画像が得られた段階で、新たにテンプレートとしてテンプレートメモリ106に登録される。
On the other hand, in the
Note that, in this
次に、登録テンプレートループ終了ステップ214では、以上のようなステップ209からステップ213までの処理(登録テンプレートループ)を、テンプレートメモリ106に登録されたテンプレートのすべての処理が終わるまで繰返す。
図7は、登録テンプレートループ終了ステップ214の直後における、テンプレートメモリ106に確保されたテンプレート画像700と、そこに記憶されたテンプレートを表わしており、テンプレートマッチング処理によって算出された類似度が小さく、信頼性が低いと判断されたテンプレート510、511、520、521、530、538、549、540、541、542,543が削除され、残りのテンプレートが、テンプレート701からテンプレート732として更新される。
Next, in the registration template
FIG. 7 shows the
次に、エッジ投影ステップ215では、テンプレートメモリ106に記録されたテンプレートの内、移動ベクトルがゼロでないものについて、テンプレート位置に該当するエッジ画像をX軸方向に投影する。これを図10を用いて説明する。
図10のエッジ画像1000において、移動ベクトルがゼロでないテンプレートに相当する領域を斜線で表わしている。なお図10では、テンプレートが存在しない部分においても、ブロック走査開始ステップ203でのブロック分割と同様の格子を便宜的に図示してある。また実際には、更新されたテンプレートは整然と並ばず、多少の重なりやずれがある。
Next, in an
In the
その下の投影グラフ1001では、斜線で表わされるテンプレート該当領域内の各エッジ量(エッジ画像の各画素値)をX軸に沿ってY軸方向(縦方向)に投影したグラフを表わしている。この投影グラフ1001から、斜線で表わされるテンプレートに写る物体の存在する範囲を推定することができる。
A
ここで、移動ベクトルがゼロでないテンプレートのみを使った理由として、監視する対象物体は、何らかの動きを持っていると仮定しているためである。すなわち、本実施例は、動きのない物体(地面に固定された硬質の物体など)は異常な動きなどを示さず、本来監視する必要のないものであるという、従来からの監視装置としての使用目的に合わせて構成されている。また、背景物が動く場合(本実施例では、ゲート(水門)の開閉など)は、あらかじめその位置、移動方向などが特定でき、検出すべき物体と区別することは容易であるため、本実施例では特に言及していない。 Here, the reason why only the template whose movement vector is not zero is used is that the target object to be monitored is assumed to have some motion. That is, the present embodiment is used as a conventional monitoring apparatus in which an object that does not move (such as a hard object fixed on the ground) does not exhibit abnormal movement and does not need to be monitored originally. It is configured for the purpose. In addition, when the background object moves (in this embodiment, the gate (sluice gate open / close), etc.), its position, moving direction, etc. can be specified in advance, and it is easy to distinguish it from the object to be detected. There is no particular mention in the examples.
また投影の対象は、テンプレート該当領域内ではなく、移動ベクトルがゼロでないテンプレートに十分近い分割ブロックとしてもよい。十分近い分割ブロックの定義を、その内部にテンプレートの中心を含むようなブロックであるとすれば、任意のテンプレートの位置座標(xT,yT)に対して、ブロックの位置座標(xB,yB)がxT−M/2<xB<xT+M/2、及びyT−N/2<yB<yT+N/2を満たすブロックを探せばよい。 Further, the projection target may be a divided block that is sufficiently close to a template whose movement vector is not zero, not within the template corresponding region. If the definition of a sufficiently close divided block is a block that includes the center of the template inside, the position coordinates of the block (x B , y T ) with respect to the position coordinates (x T , y T ) of any template What is necessary is to search for a block where y B ) satisfies x T −M / 2 <x B <x T + M / 2 and y T −N / 2 <y B <y T + N / 2.
次に、位置検出ステップ215では、エッジ投影ステップで算出した投影グラフ1001を、一定のレベルでしきい値処理し、物体の存在するx軸上での位置を検出する。さらに、物体の存在する位置の時間的な変化を計測することで物体のx軸方向の速度も計測することができる。なお、投影をテンプレート毎にその領域内で行ってから合成して得る場合、テンプレート同士の重なった部分が投影値に重複して反映されることになるが、物体の位置検出には影響ない。物体の速度は、斜線で表わされるテンプレートが保持している移動ベクトルの平均として算出してもよい。
Next, in the
次に、危険度判定ステップ217では、例えば、検出した物体の速度が所定の値を超えたか否かや、物体がゲートに所定の位置以下になるまで接近しているか否かなど、を判定し、その度合いを危険度として算出する。
次に、危険判断ステップ218では、危険度判定ステップ217で算出された危険度に対して、危険度が大きければ、警報発報ステップ219へ分岐し、危険度が小さければ画像入力ステップ201へ分岐する。
Next, in the
Next, in the
最後に、警報発報ステップ219では、例えば信号出力I/F(図示しない)などを介して、表示装置103に危険な状態であることを表示させ、処理を画像入力ステップ201に戻す。
Finally, in the
このようにして、本実施例1の画像処理装置103は、画像入力ステップ201から警報発報ステップ219までを処理の1サイクルとし、連続的に処理サイクル実行する。その過程で、テンプレートメモリ106に記憶されるテンプレートが逐次更新される。
2サイクル目以降、前記テンプレート作成・登録ステップ206は、エッジが多いブロックであっても、登録済みのテンプレートと領域の重複が多い場合には、テンプレートの登録を行わないようにした。これは、前記近接テンプレート削除ステップ212でテンプレートを削除した理由と同様に、当該ブロックによって作成されるテンプレートをテンプレートメモリ106に記録したとしても、検出すべき物体に対して既存のテンプレートでも同様の情報が得られるため、登録の必要がないからである。これにより、2サイクル目以降は、テンプレートメモリ106に新規登録されるテンプレートの数は減少する。
In this way, the
In the second and subsequent cycles, the template creation /
図8は、図7で示されるテンプレートメモリ106の状態で、既存のテンプレートと重複しない位置のブロックのみを斜線で示している。そして、テンプレート作成・登録ステップ206によって、図9のテンプレート933から941までが新たに登録される(テンプレート901から932は、図7のテンプレート701から732に対応する)。したがって、このように、連続的に処理サイクルを実行することで、監視環境が時々刻々変化するような背景部分をテンプレート画像として捉えているような信頼性の低いテンプレート(テンプレートマッチング処理で類似度が小さいテンプレート)は淘汰され、信頼性の高いテンプレートのみがテンプレートメモリ106に記憶され続けることになり、正確な物体の検出が行える。
FIG. 8 is a state of the
本実施例1では、テンプレートの追加は、唯一テンプレート作成・登録ステップ206で行われ、追加されるテンプレートはメッシュ状に等分割されたブロックを基にしているためサイズは一定である。またテンプレート画像の更新はせず、一旦登録された以後、削除されるまでテンプレート画像は保たれる。これらの特徴により、処理がシンプルになっている。
なおテンプレートは、被写体の遠近に応じて拡大・縮小してから一定サイズになるようしてもよい。
また、テンプレートメモリ106中のテンプレート数は、近接テンプレート削除ステップ212の働きにより分割ブロック数の2倍以下に収まるようになっているが、より少ない数に保つために、エッジ量の閾値ETh重複度の閾値OTh等をテンプレート数に応じて適応的に制御したり、古いテンプレートの強制削除をしてもよい。
また、ブロック走査プールと登録テンプレートループの順序は入れ替えてもよい。
また、エッジ画像をブロック走査ループ(テンプレート登録すべきブロックの抽出)と、位置検出ステップ216でのみ用いているが、テンプレートマッチング自体をエッジ画像で行うようにしてもよい。
In the first embodiment, the template is added only in the template creation /
Note that the template may be made to have a certain size after being enlarged or reduced according to the distance of the subject.
Further, the number of templates in the
Further, the order of the block scanning pool and the registered template loop may be switched.
Further, although the edge image is used only in the block scanning loop (extraction of a block to be registered as a template) and the
ここで、本発明に係るシステムや装置などの構成としては、必ずしも以上に示したものに限られず、種々な構成が用いられてもよい。また、本発明は、例えば、本発明に係る処理を実行する方法或いは方式や、このような方法や方式を実現するためのプログラムや当該プログラムを記録する記録媒体などとして提供することも可能であり、また、種々なシステムや装置として提供することも可能である。
また、本発明の適用分野としては、必ずしも以上に示したものに限られず、本発明は、種々な分野に適用することが可能なものである。
また、本発明に係るシステムや装置などにおいて行われる各種の処理としては、例えばプロセッサやメモリ等のハードウエア資源を備えたコンピュータが、コンピュータ読み取り可能な記録媒体に永続的に格納されたプログラムを実行することにより、制御される構成が用いられてもよい。また、当該処理を実行するための各機能手段が独立したハードウエア回路として構成されてもよい。
Here, the configuration of the system and apparatus according to the present invention is not necessarily limited to the configuration described above, and various configurations may be used. The present invention can also be provided as, for example, a method or method for executing the processing according to the present invention, a program for realizing such a method or method, or a recording medium for recording the program. It is also possible to provide various systems and devices.
The application field of the present invention is not necessarily limited to the above-described fields, and the present invention can be applied to various fields.
Further, as various processes performed in the system and apparatus according to the present invention, for example, a computer having hardware resources such as a processor and a memory executes a program permanently stored in a computer-readable recording medium. By doing so, a controlled configuration may be used. In addition, each functional unit for executing the processing may be configured as an independent hardware circuit.
101…撮像装置、102…画像処理装置、103…出力装置、104…エッジ抽出部、105…テンプレート作成部、106…テンプレートメモリ、107…テンプレートマッチング部、108…位置検出部、109…危険度判定部、
201…画像入力ステップ、202…エッジ抽出部、203…ブロック走査ループ開始ステップ、204…ブロック内エッジ量算出ステップ、205…エッジ量判定ステップ、206…テンプレート作成・登録ステップ、207…ブロック走査ループ終了ステップ、208…登録テンプレートループ開始ステップ、209…テンプレートマッチングステップ、210…マッチング成否判定ステップ、211…テンプレート更新ステップ、212…近接テンプレート削除ステップ、213…テンプレート削除ステップ、214…登録テンプレートループ終了ステップ、215…エッジ投影ステップ、216…位置検出ステップ、217…危険度判定ステップ、218…危険判断ステップ、219…警報発報ステップ。
DESCRIPTION OF
DESCRIPTION OF
Claims (7)
該撮像装置で撮像した入力画像を処理して該監視領域の中の物体を検出する画像処理装置と、該画像処理装置の物体の検出結果に基づき出力画像を表示する表示装置からなる監視装置において、前記画像処理装置は、前記撮像装置で得られた入力画像のエッジ情報を抽出するエッジ抽出ステップと、前記エッジ情報に基づいてテンプレート画像を作成するテンプレート作成ステップと、前記作成されたテンプレート画像とその位置情報をテンプレートメモリに記憶するテンプレート登録ステップと、前記記憶されたテンプレート画像とその位置情報に基づいて該テンプレート画像と類似する部分画像を入力画像中から探索するテンプレートマッチングステップと、前記探索の結果に基づいて前記記憶されたテンプレートを更新するテンプレート更新ステップと、前記エッジ抽出ステップと前記テンプレートマッチングステップの結果に基づいて検出すべき物体の位置や速度の少なくとも一つの属性を計測する位置検出ステップと、前記計測の結果に基づいて検出された物体の危険度を判定する危険度判定ステップと、前記危険度の判定結果に基づいて前記表示装置に判定結果を表示することを特徴とする画像処理方法。 An imaging device for imaging the monitoring area;
In a monitoring device comprising: an image processing device that processes an input image captured by the imaging device to detect an object in the monitoring region; and a display device that displays an output image based on an object detection result of the image processing device The image processing device includes an edge extraction step of extracting edge information of the input image obtained by the imaging device, a template creation step of creating a template image based on the edge information, and the created template image A template registration step for storing the position information in a template memory; a template matching step for searching the input image for a partial image similar to the template image based on the stored template image and the position information; and A template that updates the stored template based on the results An update step; a position detection step for measuring at least one attribute of the position and velocity of the object to be detected based on the results of the edge extraction step and the template matching step; and an object detected based on the measurement result An image processing method comprising: a risk determination step for determining a risk level; and a determination result displayed on the display device based on the risk determination result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011083701A JP5709255B2 (en) | 2011-04-05 | 2011-04-05 | Image processing method and monitoring apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011083701A JP5709255B2 (en) | 2011-04-05 | 2011-04-05 | Image processing method and monitoring apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012221043A true JP2012221043A (en) | 2012-11-12 |
JP5709255B2 JP5709255B2 (en) | 2015-04-30 |
Family
ID=47272535
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011083701A Active JP5709255B2 (en) | 2011-04-05 | 2011-04-05 | Image processing method and monitoring apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5709255B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6233824B1 (en) * | 2017-04-25 | 2017-11-22 | 合同会社ウイングビジョン | Image inspection apparatus, production system, image inspection method, program, and storage medium |
CN112070084A (en) * | 2020-09-04 | 2020-12-11 | 北京百度网讯科技有限公司 | Method and device for determining position of repeated image unit |
CN114693707A (en) * | 2020-12-31 | 2022-07-01 | 北京小米移动软件有限公司 | Object contour template obtaining method, device, equipment and storage medium |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10282622B2 (en) | 2016-12-09 | 2019-05-07 | Hitachi Kokusai Electric Inc. | Marine intrusion detection system and method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001060263A (en) * | 1999-06-15 | 2001-03-06 | Hitachi Denshi Ltd | Object tracking method and device |
JP2001175861A (en) * | 1999-12-20 | 2001-06-29 | Dainippon Printing Co Ltd | Template setting method |
JP2008112210A (en) * | 2006-10-27 | 2008-05-15 | Matsushita Electric Works Ltd | Automatic tracking method |
JP2009205611A (en) * | 2008-02-29 | 2009-09-10 | Fujitsu Ltd | Image target detection tracking device, image target detection tracking method, and image target detection tracking program |
-
2011
- 2011-04-05 JP JP2011083701A patent/JP5709255B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001060263A (en) * | 1999-06-15 | 2001-03-06 | Hitachi Denshi Ltd | Object tracking method and device |
JP2001175861A (en) * | 1999-12-20 | 2001-06-29 | Dainippon Printing Co Ltd | Template setting method |
JP2008112210A (en) * | 2006-10-27 | 2008-05-15 | Matsushita Electric Works Ltd | Automatic tracking method |
JP2009205611A (en) * | 2008-02-29 | 2009-09-10 | Fujitsu Ltd | Image target detection tracking device, image target detection tracking method, and image target detection tracking program |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6233824B1 (en) * | 2017-04-25 | 2017-11-22 | 合同会社ウイングビジョン | Image inspection apparatus, production system, image inspection method, program, and storage medium |
WO2018198991A1 (en) * | 2017-04-25 | 2018-11-01 | 株式会社ウイングビジョン | Image inspection device, production system, image inspection method, program, and storage medium |
JP2018185177A (en) * | 2017-04-25 | 2018-11-22 | 合同会社ウイングビジョン | Image inspection device, production system, image inspection method, program and memory medium |
CN112070084A (en) * | 2020-09-04 | 2020-12-11 | 北京百度网讯科技有限公司 | Method and device for determining position of repeated image unit |
CN112070084B (en) * | 2020-09-04 | 2024-01-12 | 北京百度网讯科技有限公司 | Method and device for determining position of repeated image unit |
CN114693707A (en) * | 2020-12-31 | 2022-07-01 | 北京小米移动软件有限公司 | Object contour template obtaining method, device, equipment and storage medium |
CN114693707B (en) * | 2020-12-31 | 2023-09-26 | 北京小米移动软件有限公司 | Object contour template acquisition method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
JP5709255B2 (en) | 2015-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2858008B1 (en) | Target detecting method and system | |
JP6204659B2 (en) | Video processing apparatus and video processing method | |
US9672634B2 (en) | System and a method for tracking objects | |
KR101787542B1 (en) | Estimation system and method of slope stability using 3d model and soil classification | |
JP2011170684A (en) | Object tracking device, object tracking method and object tracking program | |
KR20110023472A (en) | Apparatus and method for tracking object based on ptz camera using coordinate map | |
CN110647836B (en) | Robust single-target tracking method based on deep learning | |
US20110074927A1 (en) | Method for determining ego-motion of moving platform and detection system | |
Manchanda et al. | Analysis of computer vision based techniques for motion detection | |
JP5709255B2 (en) | Image processing method and monitoring apparatus | |
KR20110023468A (en) | Apparatus and method for detecting and tracking object based on adaptive background | |
JP2018139086A (en) | Correlation tracking device, correlation tracking method and correlation tracking program | |
TW201516965A (en) | Method of detecting multiple moving objects | |
Patel et al. | Comparison of optical flow algorithms for speed determination of moving objects | |
Sincan et al. | Moving object detection by a mounted moving camera | |
US20150350669A1 (en) | Method and apparatus for improving estimation of disparity in a stereo image pair using a hybrid recursive matching processing | |
JP2011090708A (en) | Apparatus and method for detecting the number of objects | |
KR101350460B1 (en) | Method and apparatus for removing motion blur of image | |
US20210304417A1 (en) | Observation device and observation method | |
CN104616320A (en) | Method for detecting vehicle in low-altitude aerial video based on gradient inhibition and epipolar constraint | |
JP2004295416A (en) | Image processing apparatus | |
JP6348020B2 (en) | Image processing apparatus, image processing method, and inspection method using the same | |
Zhang et al. | A traffic flow detection system combining optical flow and shadow removal | |
JP4998955B2 (en) | Collapse detection system and method | |
Depraz et al. | Real-time object detection and tracking in omni-directional surveillance using GPU |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140328 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20141211 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20141218 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150204 |
|
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: 20150226 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150227 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5709255 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 |
|
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 |