JP6620443B2 - Monitoring program, monitoring apparatus, and monitoring method - Google Patents

Monitoring program, monitoring apparatus, and monitoring method Download PDF

Info

Publication number
JP6620443B2
JP6620443B2 JP2015142845A JP2015142845A JP6620443B2 JP 6620443 B2 JP6620443 B2 JP 6620443B2 JP 2015142845 A JP2015142845 A JP 2015142845A JP 2015142845 A JP2015142845 A JP 2015142845A JP 6620443 B2 JP6620443 B2 JP 6620443B2
Authority
JP
Japan
Prior art keywords
person
image data
persons
area
foremost
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
JP2015142845A
Other languages
Japanese (ja)
Other versions
JP2017027197A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2015142845A priority Critical patent/JP6620443B2/en
Publication of JP2017027197A publication Critical patent/JP2017027197A/en
Application granted granted Critical
Publication of JP6620443B2 publication Critical patent/JP6620443B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、監視プログラム、監視装置、及び監視方法に関する。   The present invention relates to a monitoring program, a monitoring device, and a monitoring method.

所定の領域を監視する監視装置の一つとして、カメラで撮像した画像(動画像を含む)から人物等の移動物体を検出して追跡する画像処理を行う装置が知られている。   As one of monitoring apparatuses that monitor a predetermined area, an apparatus that performs image processing for detecting and tracking a moving object such as a person from an image (including a moving image) captured by a camera is known.

この種の監視装置は、近年、店舗等におけるマーケティング分析や、交通量調査等への活用が検討されている。例えば、マーケティング分析においては、監視装置により店舗内や商店街等の画像から検出した人物の動線(移動経路)を解析することで、顧客が興味、関心を抱いている商品や店舗を把握することができる。   In recent years, this type of monitoring device has been studied for use in marketing analysis and traffic volume surveys in stores and the like. For example, in marketing analysis, a monitoring device analyzes a person's flow line (movement route) detected from an image in a store, a shopping street, or the like, thereby grasping products or stores in which the customer is interested or interested. be able to.

上記の監視装置による人物の追跡は、画像に含まれる人物を画像処理により検出し、人物固有の特徴を用いて複数の画像(動画像のフレーム)における人物同士を関連付けることで実現される。この際、人物の動線を把握するには、複数の画像における同一人物を正確に特定して追跡することが不可欠である。   The tracking of a person by the monitoring device described above is realized by detecting a person included in an image by image processing and associating persons in a plurality of images (moving image frames) using a person-specific feature. At this time, in order to grasp the flow line of a person, it is indispensable to accurately identify and track the same person in a plurality of images.

人物固有の特徴を用いて複数の画像における人物同士を関連付ける技術の一つとして、テンプレートマッチングと呼ばれる方法が知られている(例えば、特許文献1を参照。)。テンプレートマッチングでは、人物の特徴的な部分が映る部位をテンプレートとして用い、テンプレートとの類似度が高い人物をテンプレートの人物と同一人物とみなして関連付けることで人物の追跡を行う。このテンプレートマッチングでは、例えば、画像内で重なりが生じる可能性の低い頭部をテンプレートにすることで、複数の人物が重なって存在する環境でも人物の追跡を行うことができる(例えば、特許文献2を参照。)。   As one of techniques for associating persons in a plurality of images using features unique to a person, a method called template matching is known (see, for example, Patent Document 1). In template matching, a part where a characteristic part of a person is reflected is used as a template, and a person with high similarity to the template is regarded as the same person as the person of the template and is tracked. In this template matching, for example, a person can be tracked even in an environment where a plurality of persons overlap by using a head that is unlikely to overlap in an image as a template (for example, Patent Document 2). See).

また、人物の頭部の位置に基づいて人物を追跡する別の技術として、パーティクルフィルタと識別器とを用いる方法が知られている(例えば、特許文献3を参照。)。この方法では、撮像範囲の一部を共有するよう設置された複数のカメラで撮像した画像を用い、パーティクルフィルタにより頭部の位置推定を行う。そして、推定された頭部位置に対して頭部の前後左右を識別する4個の識別器を選択的に用いて評価を行った後、評価値を統合する(期待値を求める)ことで人物の追跡を行う。   As another technique for tracking a person based on the position of the person's head, a method using a particle filter and a discriminator is known (see, for example, Patent Document 3). In this method, the position of the head is estimated by a particle filter using images captured by a plurality of cameras installed so as to share a part of the imaging range. Then, the evaluation is performed by selectively using four discriminators for identifying the front, back, left, and right of the head with respect to the estimated head position, and then the evaluation values are integrated (expected value is obtained). Keep track of.

また、画像内の人物同士の重なり等により生じる人物の隠れによる追跡精度の低下を防ぐ技術の一つとして、撮像範囲の一部を共有するよう設置された複数の天井カメラを用いて人物の追跡を行う方法が知られている(例えば、特許文献4を参照。)。この方法では、天井カメラ(天井から下方を撮像するよう設置されたカメラ)で店舗内等を撮像し、人物同士の重なりや、店舗内に設置された棚等の固定物と人物との重なりの少ない画像を用いて人物の追跡を行う。   In addition, as one of the techniques to prevent degradation in tracking accuracy due to hiding of people caused by overlapping of people in the image, tracking people using multiple ceiling cameras installed to share part of the imaging range There is known a method for performing (see, for example, Patent Document 4). In this method, the inside of a store or the like is imaged with a ceiling camera (a camera installed so as to take an image from below the ceiling), and the overlap between people or a fixed object such as a shelf installed in the store overlaps with a person. A person is tracked using a small number of images.

更に、画像内の人物同士の重なり等により生じる人物の隠れによる追跡精度の低下を防ぐ別の技術として、カメラの撮像領域の三次元モデルを用いて対象物(人物)同士の前後関係等を判定する方法が知られている(例えば、特許文献5を参照。)。   In addition, as another technology to prevent degradation in tracking accuracy due to hiding of people caused by overlapping of people in the image, etc., determine the front-to-back relationship between objects (people) using a 3D model of the imaging area of the camera There is a known method (see, for example, Patent Document 5).

特開2008−250772号公報JP 2008-250772 A 特開2004−094518号公報JP 2004-094518 A 特開2008−026974号公報JP 2008-026974 A 特開2010−049296号公報JP 2010-049296 A 特開2012−155595号公報JP 2012-155595 A

人物固有の特徴を用いて画像内の人物を追跡する場合、追跡中の人物が交差したり、前後に連なって移動したりすることで画像内に人物同士の重なりが生じると、重なっている人物に固有の特徴を正確に得ることが困難なことがある。そのため、画像内に人物同士の重なりが生じると、人物同士の関連付けに誤りが生じ、以後の人物の追跡精度が低下することがある。   When tracking a person in an image using person-specific features, if the person being tracked crosses or moves back and forth, and the person overlaps in the image, the overlapping person It may be difficult to accurately obtain features unique to the. For this reason, if people overlap in the image, an error may occur in the association between the people, and the tracking accuracy of the subsequent people may be reduced.

また、特許文献5のように三次元モデルを用いて画像内の人物の前後関係を判定する場合、重なる人物の身長差を考慮しないと人物の前後関係を誤判定する可能性がある。更に、三次元モデルを用いた演算処理を行うため、監視装置(画像処理装置)における処理負荷が増大する。   Further, when determining the context of a person in an image using a three-dimensional model as in Patent Document 5, there is a possibility that the person's context is erroneously determined unless the height difference of overlapping persons is taken into consideration. Furthermore, since the arithmetic processing using the three-dimensional model is performed, the processing load on the monitoring device (image processing device) increases.

1つの側面において、本発明は、画像内の追跡中の人物に重なりが生じた場合に重なる人物の前後関係を正確かつ容易に判断することを目的とする。   In one aspect, an object of the present invention is to accurately and easily determine the front-to-back relationship of overlapping persons when the tracking person in the image overlaps.

1つの態様の監視プログラムは、下記(1)〜(4)の処理をコンピュータに実行させる。
(1)過去の画像データから検出された人物の位置に基づいて、現在の処理対象の画像データにおける人物の位置を推定する処理。
(2)推定した人物の位置に基づいて複数の人物が重なっていると判定した場合に、複数の人物の重なり領域を検出するとともに、複数の人物のうち画像データを撮像した撮像装置に最も近い位置にいる最前の人物の候補を選出する処理。
(3)選出した最前の人物の候補についての照合用データのうち他の人物との重なり領域に対応した領域と、現在の処理対象の画像データにおける重なり領域とを照合する処理。
(4)照合の結果に基づいて、最前の人物の候補が最前の人物であるか否かを判定する処理。
One aspect of the monitoring program causes a computer to execute the following processes (1) to (4).
(1) A process of estimating the position of a person in the current image data to be processed based on the position of the person detected from past image data.
(2) When it is determined that a plurality of persons are overlapped based on the estimated position of the person, the overlapping area of the plurality of persons is detected, and the closest to the imaging device that captured the image data among the plurality of persons The process of selecting the candidate for the foremost person at the position.
(3) A process of collating an area corresponding to an overlapping area with another person in the collation data for the selected candidate for the earliest person and an overlapping area in the current image data to be processed.
(4) A process of determining whether or not the foremost person candidate is the foremost person based on the result of collation.

上述の態様によれば、画像内の追跡中の人物に重なりが生じた場合に重なる人物の前後関係を正確かつ容易に判断することができる。   According to the above-described aspect, it is possible to accurately and easily determine the anteroposterior relationship of overlapping persons when the tracking person in the image overlaps.

撮像装置と人物との関係の一例を示す図である。It is a figure which shows an example of the relationship between an imaging device and a person. 撮像装置と人物とが図1Aに示した関係である場合に撮像装置で撮像した画像内の人物の関係を示す図である。It is a figure which shows the relationship of the person in the image imaged with the imaging device when an imaging device and a person are the relationship shown to FIG. 1A. 撮像装置と人物との関係の別の例を示す図である。It is a figure which shows another example of the relationship between an imaging device and a person. 撮像装置と人物とが図2Aに示した関係である場合に撮像装置で撮像した画像内の人物の関係を示す図である。It is a figure which shows the relationship of the person in the image imaged with the imaging device when an imaging device and a person are the relationship shown to FIG. 2A. 一実施形態に係る監視装置の機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of the monitoring apparatus which concerns on one Embodiment. 監視装置が行う画像処理を示すフローチャートである。It is a flowchart which shows the image processing which a monitoring apparatus performs. 人物位置推定処理の内容を示すフローチャートである。It is a flowchart which shows the content of a person position estimation process. 追跡中の人物の現在の処理対象フレームにおける位置の推定方法を説明する図である。It is a figure explaining the estimation method of the position in the present process target frame of the person under tracking. 重なり領域検出処理の内容を示すフローチャートである。It is a flowchart which shows the content of an overlap area | region detection process. 重なり領域の有無の判定方法及び重なり領域の算出方法を説明する図である。It is a figure explaining the determination method of the presence or absence of an overlapping area, and the calculation method of an overlapping area. 前後関係判定処理の内容を示すフローチャートである。It is a flowchart which shows the content of the context determination process. 頭部が下方にある人物1が人物2よりも手前にいる場合の前後関係判定処理の結果を説明する図である。It is a figure explaining the result of the context determination process in case the person 1 who has a head below is in front of the person 2. 頭部が下方にある人物1が人物2よりも奥にいる場合の前後関係判定処理の結果を説明する図である。It is a figure explaining the result of the context determination process in case the person 1 with the head below is behind the person 2. 人物追跡処理の内容を示すフローチャートである。It is a flowchart which shows the content of a person tracking process. 人物追跡処理における人物1,2の位置を特定する処理の内容を示すフローチャートである。It is a flowchart which shows the content of the process which specifies the position of the persons 1 and 2 in a person tracking process. 人物2の追跡に用いるテンプレートの設定方法を説明する図である。It is a figure explaining the setting method of the template used for the tracking of the person. テンプレートマッチングによる人物1,2の追跡方法を説明する図である。It is a figure explaining the tracking method of the persons 1 and 2 by template matching. コンピュータのハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of a computer.

まず、撮像装置から見て重なっている複数の人物を撮像したときの画像内の人物同士の関係を説明する。   First, the relationship between persons in an image when a plurality of persons overlapping when viewed from the imaging apparatus is imaged will be described.

図1Aは、撮像装置と人物との関係の一例を示す図である。図1Bは、撮像装置と人物とが図1Aに示した関係である場合に撮像装置で撮像した画像内の人物の関係を示す図である。図2Aは、撮像装置と人物との関係の別の例を示す図である。図2Bは、撮像装置と人物とが図2Aに示した関係である場合に撮像装置で撮像した画像内の人物の関係を示す図である。   FIG. 1A is a diagram illustrating an example of a relationship between an imaging apparatus and a person. FIG. 1B is a diagram illustrating a relationship between persons in an image captured by the imaging device when the imaging device and the person have the relationship illustrated in FIG. 1A. FIG. 2A is a diagram illustrating another example of the relationship between the imaging device and a person. 2B is a diagram illustrating a relationship between persons in an image captured by the imaging device when the imaging device and the person have the relationship illustrated in FIG. 2A.

図1Aに示すように、定点観測や監視に用いる撮像装置2は、例えば、地面5上を移動する人物6A,6B等の身長よりも高い位置に、光軸200が俯角になる向きで設置される。ここで、撮像装置2の撮像範囲に身長がほぼ同じ二人の人物6A,6Bがいて、この二人の人物6A,6Bの撮像装置2からの距離が異なる場合を考える。   As shown in FIG. 1A, the imaging device 2 used for fixed-point observation and monitoring is installed at a position higher than the height of a person 6A, 6B or the like moving on the ground 5 with the optical axis 200 being a depression angle, for example. The Here, it is assumed that there are two persons 6A and 6B having substantially the same height in the imaging range of the imaging apparatus 2, and the distances from the imaging apparatus 2 of the two persons 6A and 6B are different.

このとき、撮像装置2から見た人物6A,6Bの頭頂部への視線は、撮像装置2から近いほうの人物6Aの頭頂部への視線201の俯角が、撮像装置2から遠いほうの人物6Bの頭頂部への視線202の俯角よりも大きくなる。そのため、撮像装置2から見て二人の人物6A,6Bが重なっている場合、図1Bに示すように、撮像装置2で撮像した画像700では、撮像装置2から近いほうの人物6Aの頭部が、遠いほうの人物6Bの頭部よりもΔd1だけ下方に位置している。   At this time, the line of sight to the top of the person 6A, 6B viewed from the imaging device 2 is the person 6B whose depression angle of the line of sight 201 to the top of the person 6A closer to the imaging device 2 is far from the imaging device 2. It becomes larger than the depression angle of the line of sight 202 to the top of the head. Therefore, when two persons 6A and 6B overlap each other when viewed from the imaging device 2, as shown in FIG. 1B, in the image 700 captured by the imaging device 2, the head of the person 6A closer to the imaging device 2 However, it is located below the head of the far person 6B by Δd1.

ところが、撮像装置2の撮像範囲内を移動する人物は、撮像装置2からの距離が近いほうの人物の身長が遠いほうの人物の身長よりも高い場合がある。この場合、図2Aに示したように、撮像装置2から見た人物6C,6Dの頭頂部への視線は、撮像装置2から近いほうの人物6Cの頭頂部への視線203の俯角が、撮像装置2から遠いほうの人物6Dの頭頂部への視線204の俯角よりも小さくなることがある。撮像装置2から近いほうの人物6Cへの視線の俯角のほうが小さい場合、撮像装置2から見て二人の人物6C,6Dが重なっていると、撮像装置2で撮像した画像は、図2Bに示す画像701のようになる。画像701では、撮像装置2から近いほうの人物6Cの頭部が、遠いほうの人物6Dの頭部よりもΔd2だけ上方に位置している。   However, the person who moves within the imaging range of the imaging device 2 may be taller than the person who is farther away from the imaging device 2 than the person who is farther away. In this case, as shown in FIG. 2A, the line of sight of the line of sight 203 to the top of the person 6C closer to the image capturing apparatus 2 is the angle of view of the person 6C, 6D viewed from the image capturing apparatus 2. It may be smaller than the depression angle of the line of sight 204 to the top of the person 6D farther from the device 2. When the depression angle of the line of sight to the person 6C closer to the imaging device 2 is smaller and the two people 6C and 6D overlap when viewed from the imaging device 2, the image captured by the imaging device 2 is shown in FIG. 2B. It becomes like the image 701 shown. In the image 701, the head of the person 6C closer to the imaging device 2 is positioned above the head of the person 6D farther away by Δd2.

また、詳細な説明は省略するが、撮像装置2の光軸が仰角である場合、重なる人物の身長が同程度であれば撮像装置2から近いほうの人物の頭部が画面の上方になる。しかしながら、撮像装置2から近いほうの人物の身長が撮像装置2から遠いほうの人物の身長よりも低い場合、撮像装置2から近いほうの人物の頭部が画面の下方になることもある。   Although detailed description is omitted, when the optical axis of the imaging device 2 is an elevation angle, the head of the person closest to the imaging device 2 is above the screen if the heights of the overlapping persons are approximately the same. However, when the height of the person closer to the imaging device 2 is lower than the height of the person farther from the imaging device 2, the head of the person closer to the imaging device 2 may be at the bottom of the screen.

このように、画像内で重なる人物の頭部の位置と撮像装置2からの距離との関係は、重なる人物の身長や重なる人物同士の距離により変化する。そのため、画像内で重なる人物の頭部の上下関係に基づいて人物の前後関係を判定する場合、判定を誤ることがある。   As described above, the relationship between the position of the head of the person who overlaps in the image and the distance from the imaging device 2 varies depending on the height of the person who overlaps and the distance between the persons who overlap. Therefore, when determining the front-rear relationship of persons based on the upper-lower relationship of the heads of the persons that overlap in the image, the determination may be incorrect.

図3は、一実施形態に係る監視装置の機能的構成を示すブロック図である。
図3に示すように、本実施形態に係る監視装置1は、画像取得部100と、人物位置推定部101と、重なり領域検出部102と、前後関係判定部103と、人物追跡部104と、人物検出部105と、画像出力部106と、記憶部107と、を備える。
FIG. 3 is a block diagram illustrating a functional configuration of the monitoring device according to the embodiment.
As shown in FIG. 3, the monitoring device 1 according to the present embodiment includes an image acquisition unit 100, a person position estimation unit 101, an overlap region detection unit 102, a context determination unit 103, a person tracking unit 104, A person detection unit 105, an image output unit 106, and a storage unit 107 are provided.

画像取得部100は、撮像装置2で撮像した動画像データを取得する。また、画像取得部100は、例えば、取得した動画像データをフレーム毎に人物位置推定部101、及び人物検出部105に出力する。以下、取得した動画像データを単に動画像ともいう。   The image acquisition unit 100 acquires moving image data captured by the imaging device 2. Also, the image acquisition unit 100 outputs the acquired moving image data to the person position estimation unit 101 and the person detection unit 105 for each frame, for example. Hereinafter, the acquired moving image data is also simply referred to as a moving image.

人物位置推定部101は、取得した動画像における過去のフレームから検出された人物の位置情報に基づいて、現在の処理対象フレームに存在する人物の位置を推定する。また、人物位置推定部101は、推定した人物の位置に基づいて、現在の処理対象フレームに追跡中の人物についての人物領域を設定する。このとき、人物位置推定部101は、過去のフレームから検出された人物の位置情報を、記憶部107から読み出す。ここで、過去のフレームは、後述する画像処理を既に行ったフレームである。以下、過去のフレームから検出された人物のことを追跡中の人物ともいう。   The person position estimation unit 101 estimates the position of the person existing in the current processing target frame based on the position information of the person detected from the past frame in the acquired moving image. Further, the person position estimation unit 101 sets a person area for the person being tracked in the current processing target frame based on the estimated person position. At this time, the person position estimation unit 101 reads the position information of the person detected from the past frame from the storage unit 107. Here, the past frame is a frame in which image processing described later has already been performed. Hereinafter, a person detected from a past frame is also referred to as a tracking person.

重なり領域検出部102は、現在の処理対象フレームにおける追跡中の人物の位置に基づいて複数の人物が重なっている領域の有無を判定し、重なっている領域がある場合にはその重なり領域の位置及び寸法を算出する。また、重なり領域検出部102は、重なっている複数の人物のなかから、撮像装置2に最も近い位置にいる人物の候補を選出する。以下、重なっている複数の人物のうち撮像装置2に最も近い位置にいる人物を最前の人物という。重なり領域検出部102は、現在の処理対象フレーム、及び重なり領域の検出結果を前後関係判定部103に出力する。   The overlapping area detection unit 102 determines whether or not there is an area where a plurality of persons overlap based on the position of the person being tracked in the current processing target frame, and if there is an overlapping area, the position of the overlapping area And calculate dimensions. In addition, the overlapping area detection unit 102 selects a candidate for a person who is closest to the imaging device 2 from a plurality of overlapping persons. Hereinafter, the person who is closest to the imaging device 2 among the plurality of overlapping persons is referred to as the foremost person. The overlapping area detection unit 102 outputs the current processing target frame and the detection result of the overlapping area to the context determination unit 103.

前後関係判定部103は、重なり領域検出部102の検出結果と、重なっている人物についての照合用データとに基づいて、最前の人物の候補が最前の人物であるか否かを判定し、重なっている人物の前後関係を特定する。このとき、前後関係判定部103は、照合用データを記憶部107から読み出す。照合用データは、例えば、過去のフレームから抽出した、追跡中の人物の特徴部分を含む画像データである。また、人物の前後関係は、撮像装置2から見た奥行き方向での人物の位置関係であり、撮像装置2から見て撮像装置2により近い位置にいる人物を前(手前)にいる人物とする。前後関係判定部103は、現在の処理対象フレーム、及び特定した人物の前後関係を人物追跡部104に出力する。   The context determination unit 103 determines whether or not the foremost person candidate is the foremost person based on the detection result of the overlapping area detection unit 102 and the matching data for the overlapping person. Identify the context of the person At this time, the context determination unit 103 reads the verification data from the storage unit 107. The verification data is, for example, image data including a characteristic portion of a person being tracked extracted from a past frame. Further, the front-rear relationship of the person is the positional relationship of the person in the depth direction as viewed from the imaging device 2, and the person who is closer to the imaging device 2 as viewed from the imaging device 2 is the person in front (front). . The context determination unit 103 outputs the current processing target frame and the context of the identified person to the person tracking unit 104.

人物追跡部104は、追跡中の人物の位置の推定結果と、重なっている人物の前後関係と、追跡中の人物の照合用データとに基づいて、追跡中の人物についての現在の処理対象フレームにおける位置を特定する。このとき、人物追跡部104は、照合用データを記憶部107から読み出す。また、人物追跡部104は、現在の処理対象フレームにおける追跡中の人物の位置を、複数の人物を識別する数字等の識別子と対応付けて記憶部107に格納する。更に、人物追跡部104は、特定した追跡中の人物の位置を人物検出部105に出力する。   The person tracking unit 104 determines the current processing target frame for the person being tracked based on the estimation result of the position of the person being tracked, the context of the overlapping persons, and the matching data for the person being tracked. Specify the position at. At this time, the person tracking unit 104 reads the verification data from the storage unit 107. In addition, the person tracking unit 104 stores the position of the person being tracked in the current processing target frame in the storage unit 107 in association with an identifier such as a number for identifying a plurality of persons. Furthermore, the person tracking unit 104 outputs the position of the identified person being tracked to the person detecting unit 105.

人物検出部105は、現在の処理対象フレームから、過去のフレームには存在していない人物を検出する。人物検出部105は、例えば、Histograms of Oriented Gradients(HOG)特徴量を用いた人物検出処理により、現在の処理対象フレームに存在する人物を検出する。また、人物検出部105は、現在の処理対象フレームから検出した人物の位置と、人物追跡部104で求めた追跡中の人物の現在の処理対象フレームにおける位置とに基づいて、現在の処理対象フレームに新たに追跡対象とする人物が存在するか否かを判定する。新たに追跡対象とする人物が存在する場合、人物検出部105は、その人物を識別する識別子と、位置と、照合用データとを記憶部107に格納する。照合用データは、例えば、人物検出処理において検出した人物を囲む矩形の枠内の画像データとする。人物検出部105は、現在の処理対象フレーム、及び現在の処理対象フレームから検出した人物の位置情報を画像出力部106に出力する。   The person detection unit 105 detects a person who does not exist in the past frame from the current processing target frame. The person detection unit 105 detects a person existing in the current processing target frame by, for example, person detection processing using Histograms of Oriented Gradients (HOG) features. The person detection unit 105 also determines the current processing target frame based on the position of the person detected from the current processing target frame and the position of the person being tracked in the current processing target frame obtained by the person tracking unit 104. It is determined whether there is a new person to be tracked. If there is a new person to be tracked, the person detection unit 105 stores an identifier for identifying the person, a position, and verification data in the storage unit 107. The collation data is, for example, image data in a rectangular frame surrounding the person detected in the person detection process. The person detection unit 105 outputs the current processing target frame and the position information of the person detected from the current processing target frame to the image output unit 106.

画像出力部106は、例えば、撮像装置2から取得した動画像データに、追跡中の人物や新たに検出した人物を示す枠線等の情報を付加して表示装置3に出力する。画像出力部106は、例えば、人物検出部105から入力された追跡中の人物の位置情報及び新たに追跡対象となった人物の位置情報に基づいて、現在の処理対象フレームに枠線等の情報を付加する。
記憶部107は、追跡中の人物の位置、照合用データ等を記憶する。
For example, the image output unit 106 adds information such as a frame line indicating a person being tracked or a newly detected person to the moving image data acquired from the imaging apparatus 2 and outputs the data to the display apparatus 3. For example, based on the position information of the person being tracked and the position information of the person who has been newly tracked input from the person detection unit 105, the image output unit 106 includes information such as a frame line on the current processing target frame. Is added.
The storage unit 107 stores the position of the person being tracked, verification data, and the like.

図4は、監視装置が行う画像処理を示すフローチャートである。
監視装置1は、撮像装置2から取得した動画像データに対し図4に示したような画像処理を行い、撮像領域内を移動する人物を監視する。
FIG. 4 is a flowchart illustrating image processing performed by the monitoring apparatus.
The monitoring device 1 performs image processing as shown in FIG. 4 on the moving image data acquired from the imaging device 2, and monitors a person who moves within the imaging region.

監視装置1は、まず、撮像装置2で撮像した動画像の取得を開始する(ステップS1)。動画像の取得は、画像取得部100が行う。画像取得部100は、監視装置1による画像処理を終了するまで、撮像装置2から動画像を取得し、画像処理の単位となるフレーム毎に人物位置推定部101、及び人物検出部106に渡す処理を続ける。   First, the monitoring device 1 starts acquiring a moving image captured by the imaging device 2 (step S1). The image acquisition unit 100 acquires a moving image. The image acquisition unit 100 acquires a moving image from the imaging device 2 until the image processing by the monitoring device 1 is finished, and passes it to the person position estimation unit 101 and the person detection unit 106 for each frame that is a unit of image processing. Continue.

人物位置推定部101は、処理対象のフレームが入力されると、人物位置推定処理(ステップS2)を行う。人物位置推定部101は、まず、記憶部107から読み出した追跡中の人物の位置情報に基づいて、追跡中の人物の現在の監視対象フレームにおける位置を推定する。また、人物位置推定部101は、推定した人物の位置に基づいて、現在の処理対象フレームに追跡中の人物についての人物領域を設定する。人物の位置の推定及び人物領域の設定を終えると、人物位置推定部101は、現在の処理対象フレーム、追跡中の人物を識別する識別子、及び設定した人物領域を重なり領域検出部102に出力する。なお、画像処理の開始直後で追跡中の人物の位置情報が不足している場合、人物位置推定部101は、人物位置推定処理を行わず、現在の処理対象フレーム、及び処理をスキップしたことを示す情報を重なり領域検出部102に出力する。   When the process target frame is input, the person position estimation unit 101 performs a person position estimation process (step S2). The person position estimation unit 101 first estimates the position of the person being tracked in the current monitoring target frame based on the position information of the person being tracked read from the storage unit 107. Further, the person position estimation unit 101 sets a person area for the person being tracked in the current processing target frame based on the estimated person position. When the estimation of the position of the person and the setting of the person area are finished, the person position estimation unit 101 outputs the current processing target frame, the identifier for identifying the person being tracked, and the set person area to the overlapping area detection unit 102. . If the position information of the person being tracked is short immediately after the start of the image processing, the person position estimation unit 101 does not perform the person position estimation process, and skips the current processing target frame and the process. The indicated information is output to the overlapping area detection unit 102.

重なり領域検出部102は、人物位置推定部101から設定した人物領域等の情報を受け取ると、重なり領域検出処理(ステップS3)を行う。重なり領域検出部102は、まず、人物領域に基づいて、各人物について重なっている人物の有無を判定する。そして、重なっている人物がいる場合、重なり領域検出部102は、重なり領域の位置及び寸法を算出する処理を行う。更に、重なり領域検出部102は、重なっている複数の人物のなかから、撮像装置2に最も近い位置にいる最前の人物の候補を選出する。本実施形態では、重なっている複数の人物のうちフレーム(画面)内における頭部の位置が最も下方の人物を、最前の人物の候補に選出する。重なり領域を算出し、最前の人物の候補を選出すると、重なり領域検出部102は、現在の処理対象フレーム、及び検出した重なり領域に関する情報を前後関係判定部103に出力する。なお、人物位置推定部101が人物位置推定処理をスキップした場合、及び重なっている人物がいない場合、重なり領域検出部102は、現在の処理対象フレーム、及び重なり領域が存在しないことを示す情報を前後関係判定部103に出力する。   When the overlap area detection unit 102 receives information such as the person area set from the person position estimation unit 101, the overlap area detection unit 102 performs an overlap area detection process (step S3). The overlapping area detection unit 102 first determines the presence or absence of overlapping persons for each person based on the person area. When there are overlapping persons, the overlapping area detection unit 102 performs processing for calculating the position and size of the overlapping area. Furthermore, the overlapping area detection unit 102 selects a candidate for the earliest person who is closest to the imaging device 2 from among the overlapping persons. In the present embodiment, the person whose head position is the lowest in the frame (screen) among a plurality of overlapping persons is selected as the foremost person candidate. When the overlap region is calculated and the foremost person candidate is selected, the overlap region detection unit 102 outputs the current processing target frame and information regarding the detected overlap region to the context determination unit 103. Note that when the person position estimation unit 101 skips the person position estimation process and when there is no overlapping person, the overlapping area detection unit 102 displays information indicating that the current processing target frame and the overlapping area do not exist. Output to the context determination unit 103.

前後関係判定部103は、重なり領域検出部102から検出した重なり領域に関する情報等を受け取ると、前後関係判定処理(ステップS3)を行う。前後関係判定部103は、まず、現在の処理対象フレームと、重なり領域に関する情報と、記憶部107から読み出した重なる人物についての照合用データとに基づいて、最前の人物の候補が最前の人物であるか否かを判定する。当然のことであるが、最前の人物の候補が最前の人物であると判定した場合、前後関係判定部103は、最前の人物の候補を最前の人物に特定する。一方、最前の人物の候補が最前の人物ではないと判定した場合、前後関係判定部103は、最前の人物の候補を除く他の人物から最前の人物を特定する。例えば、重なっている人物が二人で、最前の人物の候補が最前の人物ではないと判定した場合、前後関係判定部103は、最前の人物の候補ではないほうの人物が最前の人物であると特定する。最前の人物の特定を終えると、前後関係判定部103は、現在の処理対象フレーム、及び特定した最前の人物の識別子を人物追跡部104に出力する。なお、重なり領域検出部102において重なり領域を検出しなかった場合、前後関係判定部103は、前後関係判定処理をスキップし、現在の処理対象フレーム、及び重なり領域が存在しないことを示す情報を人物追跡部104に出力する。   When the context determination unit 103 receives information on the overlap area detected from the overlap area detection unit 102, the context determination unit 103 performs a context determination process (step S3). The context determination unit 103 first determines that the foremost person candidate is the forefront person based on the current processing target frame, the information regarding the overlapping area, and the matching data for the overlapping person read from the storage unit 107. It is determined whether or not there is. Naturally, when it is determined that the foremost person candidate is the foremost person, the context determining unit 103 identifies the foremost person candidate as the foremost person. On the other hand, when it is determined that the foremost person candidate is not the foremost person, the context determination unit 103 identifies the foremost person from other persons excluding the foremost person candidate. For example, when it is determined that there are two overlapping persons and the foremost person candidate is not the foremost person, the context determination unit 103 determines that the person who is not the foremost person candidate is the foremost person. Is identified. When the identification of the forefront person is completed, the context determination unit 103 outputs the current processing target frame and the identifier of the identified foremost person to the person tracking unit 104. When the overlapping area is not detected by the overlapping area detection unit 102, the context determination unit 103 skips the context determination process, and displays information indicating that the current processing target frame and the overlapping area do not exist. Output to the tracking unit 104.

人物追跡部104は、前後関係判定部103から重なり領域における人物の前後関係を示す情報等を受け取ると、人物追跡処理(ステップS4)を行う。人物追跡部104は、現在の処理対象フレームにおける追跡中の人物の推定位置と、重なり領域の人物の前後関係と、各人物の照合用データとに基づいて、現在の処理対象フレームにおける追跡中の人物の位置を算出する。追跡中の人物の位置の算出は、照合用データをテンプレートとするテンプレートマッチングを用いて行う。テンプレートマッチングでは、現在の処理対象フレームにおいてテンプレート(照合用データ)との類似度が最も高い領域を算出する。人物追跡部104は、テンプレートマッチングの結果に基づき、照合用データとの類似度が最も高い領域を表す位置を追跡中の人物の位置に特定する。追跡中の人物の位置の特定を終えると、人物追跡部104は、特定した追跡中の人物の位置についての情報を人物検出部105に出力するとともに、記憶部107に記憶させた追跡中の人物の位置情報を更新する。   When the person tracking unit 104 receives information indicating the person's front-rear relationship in the overlapping area from the front-rear relationship determination unit 103, the person tracking unit 104 performs a person tracking process (step S4). The person tracking unit 104 performs tracking in the current processing target frame based on the estimated position of the person being tracked in the current processing target frame, the anteroposterior relationship of the persons in the overlapping area, and the matching data of each person. The position of the person is calculated. The position of the person being tracked is calculated using template matching using the matching data as a template. In template matching, a region having the highest similarity with a template (collation data) in the current processing target frame is calculated. Based on the result of template matching, the person tracking unit 104 identifies the position representing the area having the highest degree of similarity with the matching data as the position of the person being tracked. When the tracking of the position of the person being tracked is completed, the person tracking unit 104 outputs information on the position of the identified person being tracked to the person detection unit 105 and the person being tracked stored in the storage unit 107. Update location information.

人物検出部105は、現在の処理対象フレームにおける追跡中の人物の位置情報を受け取ると、人物検出処理(ステップS6)を行う。人物検出部105は、現在の処理対象フレームに対しHOG特徴量等を用いた人物検出処理を行って検出した人物の位置情報と、追跡中の人物の位置情報とを比較し、新たに追跡対象とする人物の位置情報を抽出する。人物検出部105は、現在の処理対象フレームに新たに追跡対象とする人物が存在する場合、当該人物に識別子を付与し、位置情報や照合用データを記憶部107に記憶させる。また、人物検出部105は、現在の処理対象フレーム、及び検出した人物の位置情報を画像出力部106に出力する。なお、人物検出部105が行う人物検出処理のうち、HOG特徴量等を用いて現在の処理対象フレームから人物を検出する処理は、ステップS2〜S5の後に限らず、ステップS2〜S5と並列に行ってもよい。   Upon receiving the position information of the person being tracked in the current processing target frame, the person detection unit 105 performs a person detection process (step S6). The person detection unit 105 compares the position information of the person detected by performing the person detection process using the HOG feature amount or the like on the current processing target frame with the position information of the person being tracked, and newly detects the tracking target. The position information of the person is extracted. When a person to be tracked newly exists in the current processing target frame, the person detection unit 105 assigns an identifier to the person and causes the storage unit 107 to store position information and verification data. In addition, the person detection unit 105 outputs the current processing target frame and the detected position information of the person to the image output unit 106. Of the person detection processes performed by the person detection unit 105, the process of detecting a person from the current processing target frame using the HOG feature amount or the like is not limited to after steps S2 to S5, but in parallel with steps S2 to S5. You may go.

画像出力部106は、人物検出部105から現在の処理対象フレーム、及び当該処理対象フレームから検出した人物の位置情報を受け取ると、現在の処理対象フレームに対する画像処理の結果を出力する(ステップS7)。画像出力部106は、例えば、現在の処理対象フレームに検出した人物を囲む枠線等を付加した表示データを作成し、作成した表示データを表示装置3に出力する。   Upon receiving the current processing target frame and the position information of the person detected from the processing target frame from the person detection unit 105, the image output unit 106 outputs the result of image processing for the current processing target frame (step S7). . For example, the image output unit 106 creates display data in which a frame line surrounding the detected person is added to the current processing target frame, and outputs the created display data to the display device 3.

上記ステップS2〜S7の処理を行った後、監視装置1は、処理を続けるか否かを判定する(ステップS8)。処理を続ける場合(ステップS8;Yes)、監視装置1は、次のフレームを現在の処理対象フレームとしてステップS2〜S7を行う。一方、処理を続けない場合(ステップS8;No)、監視装置1は、画像処理(監視処理)を終了する。   After performing the processes of steps S2 to S7, the monitoring device 1 determines whether or not to continue the process (step S8). When the processing is continued (step S8; Yes), the monitoring device 1 performs steps S2 to S7 with the next frame as the current processing target frame. On the other hand, when the processing is not continued (step S8; No), the monitoring device 1 ends the image processing (monitoring processing).

以下、ステップS2〜S5の処理について、図5〜図12Bを参照して詳細に説明する。   Hereinafter, the processing of steps S2 to S5 will be described in detail with reference to FIGS.

図5は、人物位置推定処理の内容を示すフローチャートである。
図4に示したフローチャートの人物位置推定処理(ステップS2)は、上記のように人物位置推定部101が行う。人物位置推定部101は、人物位置推定処理として、図5に示したような処理を行う。
FIG. 5 is a flowchart showing the contents of the person position estimation process.
The person position estimating process (step S2) in the flowchart shown in FIG. 4 is performed by the person position estimating unit 101 as described above. The person position estimation unit 101 performs the process shown in FIG. 5 as the person position estimation process.

人物位置推定部101は、まず、記憶部107に追跡中の人物の位置情報があるか否かをチェックする(ステップS200)。ステップS200において、人物位置推定部101は、現在の処理対象フレームの直前2フレームの人物の位置情報が記憶部107に記憶されているかをチェックする。ここで、人物の位置情報は、撮像装置2で撮像した動画像におけるカメラ座標系での座標とする。   The person position estimating unit 101 first checks whether or not there is position information of the person being tracked in the storage unit 107 (step S200). In step S <b> 200, the person position estimation unit 101 checks whether or not the position information of the person in the two frames immediately before the current processing target frame is stored in the storage unit 107. Here, the position information of the person is the coordinates in the camera coordinate system in the moving image captured by the imaging device 2.

人物の位置情報がない場合(ステップS200;No)、人物位置推定部101は、ステップS201以降の処理をスキップし、人物位置推定処理を終了する(リターン)。なお、図5では省略しているが、人物の位置情報がない場合、人物位置推定部101は、現在の処理対象フレーム、及び追跡中の人物が存在しないことを示す情報を重なり領域検出部102に出力してから人物位置推定処理を終了する。   When there is no person position information (step S200; No), the person position estimating unit 101 skips the processes after step S201 and ends the person position estimating process (return). Although not shown in FIG. 5, when there is no person position information, the person position estimation unit 101 displays information indicating that the current processing target frame and the person being tracked do not exist as an overlapping region detection unit 102. And the person position estimation process is terminated.

一方、人物の位置情報がある場合(ステップS200;Yes)、人物位置推定部101は、次に、記憶部107から過去の2フレームにおける人物の位置情報を読み出す(ステップS201)。   On the other hand, when there is person position information (step S200; Yes), the person position estimation unit 101 next reads the person position information in the past two frames from the storage unit 107 (step S201).

次に、人物位置推定部101は、読み出した位置情報を用いて、追跡中の人物の移動量を算出する(ステップS202)。人物の移動量は、現在の処理対象フレームの2フレーム前の位置から1フレーム前の位置までの距離と、2フレーム前の位置から1フレーム前の位置への移動方向とで表される。本実施形態では、現在の処理対象フレームの1フレーム前の位置を示す座標と2フレーム前の位置を表す座標との差分を移動量とする。また、ステップS201で複数の人物の位置情報を読み出した場合、人物位置推定部101は、ステップS202において読み出した人数分の移動量を人物毎に算出する。   Next, the person position estimation unit 101 calculates the movement amount of the person being tracked using the read position information (step S202). The movement amount of the person is represented by the distance from the position two frames before the current processing target frame to the position one frame before and the moving direction from the position two frames before to the position one frame before. In the present embodiment, the difference between the coordinates indicating the position one frame before the current processing target frame and the coordinates indicating the position two frames before is used as the movement amount. When the position information of a plurality of persons is read in step S201, the person position estimation unit 101 calculates the movement amount for each person read in step S202.

次に、人物位置推定部101は、算出した移動量に基づいて、現在の処理対象フレームにおける追跡中の人物の位置を推定する(ステップS203)。ステップS203において、人物位置推定部101は、1フレーム前の位置を表す座標に算出した移動量を加算して得られる座標を、現在の処理対象フレームにおける追跡中の人物の推定位置とする。   Next, the person position estimation unit 101 estimates the position of the person being tracked in the current processing target frame based on the calculated movement amount (step S203). In step S <b> 203, the person position estimation unit 101 sets the coordinate obtained by adding the calculated movement amount to the coordinates representing the position one frame before as the estimated position of the person being tracked in the current processing target frame.

次に、人物位置推定部101は、ステップS203で推定した人物の位置に基づいて、人物領域を設定する(ステップS204)。本実施形態では、人物位置推定部101は、例えば、1フレーム前における人物領域と、ステップS202で算出した移動量とに基づいて、現在の処理対象フレームに追跡中の人物についての人物領域を設定する。   Next, the person position estimation unit 101 sets a person area based on the position of the person estimated in step S203 (step S204). In the present embodiment, the person position estimation unit 101 sets a person area for the person being tracked in the current processing target frame based on, for example, the person area one frame before and the movement amount calculated in step S202. To do.

人物領域の設定を終了すると、人物位置推定部101は、現在の処理対象フレーム、推定した人物の位置、及び設定した人物領域を重なり領域検出部102に出力し、人物位置推定処理を終了する。なお、ステップS203において推定した位置(座標)が処理対象フレーム内でとり得る値の範囲外になった人物も、後述する人物追跡処理においてフレーム内に該当する人物の位置が特定されることがある。そのため、人物位置推定部101は、追跡中の全ての人物についての推定位置及び人物領域を重なり領域検出部102に出力する。   When the setting of the person area is finished, the person position estimating unit 101 outputs the current processing target frame, the estimated person position, and the set person area to the overlapping area detecting unit 102, and the person position estimating process is ended. It should be noted that the position of the person in the frame may be specified in the person tracking process to be described later even for a person whose position (coordinates) estimated in step S203 is outside the range of values that can be taken in the processing target frame. . Therefore, the person position estimation unit 101 outputs the estimated positions and person regions for all the persons being tracked to the overlapping region detection unit 102.

図6は、追跡中の人物の現在の処理対象フレームにおける位置の推定方法を説明する図である。図6において、フレーム時刻tのフレーム712は現在の処理対象フレームであり、フレーム時刻t−1のフレーム711及びフレーム時刻t−2のフレーム710は過去のフレームである。   FIG. 6 is a diagram for explaining a method of estimating the position of the person being tracked in the current processing target frame. In FIG. 6, a frame 712 at a frame time t is a current processing target frame, and a frame 711 at a frame time t-1 and a frame 710 at a frame time t-2 are past frames.

フレーム712に対して人物位置推定処理を行うときには、フレーム710における人物6Eの位置を表す座標(PXt−2,PYt−2)、及びフレーム711における人物6Eの位置を表す座標(PXt−1,PYt−1)が記憶部107に記憶されている。そのため、人物位置推定部101は、まず、ステップS201でフレーム710における人物6Eの位置を表す座標(PXt−2,PYt−2)、及びフレーム711における人物6Eの位置を表す座標(PXt−1,PYt−1)を読み出す。そして、人物位置推定部101は、次のステップS202で、読み出した人物6Eについての座標(PXt−2,PYt−2)及び(PXt−1,PYt−1)を用いて時刻t−2からt−1までの人物6Eの移動量(ΔPX,ΔPY)を算出する。移動量(ΔPX,ΔPY)は、下記式(1−1)及び(1−2)により算出する。 When the person position estimation process is performed on the frame 712, coordinates (PX t-2 , PY t-2 ) representing the position of the person 6E in the frame 710 and coordinates (PX t−) representing the position of the person 6E in the frame 711 are displayed. 1 , PY t-1 ) is stored in the storage unit 107. Therefore, the person position estimating unit 101 first coordinates (PX t-2, PY t -2) which represents the position of the person 6E in the frame 710 in step S201, and coordinates representing the position of the person 6E in the frame 711 (PX t −1 , PY t−1 ). Then, in the next step S202, the person position estimating unit 101 uses the coordinates (PX t-2 , PY t-2 ) and (PX t-1 , PY t-1 ) about the read person 6E at time t. The movement amount (ΔPX, ΔPY) of the person 6E from −2 to t−1 is calculated. The movement amounts (ΔPX, ΔPY) are calculated by the following equations (1-1) and (1-2).

ΔPX=PXt−1−PXt−2 ・・・(1−1)
ΔPY=PYt−1−PYt−2 ・・・(1−2)
ΔPX = PX t−1 −PX t−2 (1-1)
ΔPY = PY t−1 −PY t−2 (1-2)

ここで、動画像のフレームレートが極端に低い場合を除けば、連続するフレーム間における人物6Eの移動量に大きな変動はないとみなすことができる。すなわち、フレームレートが極端に低い場合を除き、時刻t−2からt−1までの人物6Eの移動量と、時刻t−1からtまでの人物6Eの移動量とに大きな差異はないとみなすことができる。そのため、時刻tのフレーム712における人物6Eの位置は、時刻t−2からt−1までの人物6Eの移動量(ΔPX,ΔPY)を用いた線形近似により推定することができる。よって、人物位置推定部101は、ステップS203で、下記式(2−1)及び(2−2)により時刻tのフレーム712における人物6Eの推定位置を示す座標(PX,PY)を算出する。 Here, except for the case where the frame rate of the moving image is extremely low, it can be considered that there is no great variation in the movement amount of the person 6E between consecutive frames. That is, unless the frame rate is extremely low, it is considered that there is no significant difference between the movement amount of the person 6E from time t-2 to t-1 and the movement amount of the person 6E from time t-1 to t-1. be able to. Therefore, the position of the person 6E in the frame 712 at time t can be estimated by linear approximation using the movement amount (ΔPX, ΔPY) of the person 6E from time t-2 to t-1. Therefore, in step S203, the person position estimation unit 101 calculates coordinates (PX t , PY t ) indicating the estimated position of the person 6E in the frame 712 at time t by the following equations (2-1) and (2-2). To do.

PX=PXt−1+ΔPX
=2・PXt−1−PXt−2 ・・・(2−1)
PY=PYt−1+ΔPY
=2・PYt−1−PYt−2 ・・・(2−2)
PX t = PX t-1 + ΔPX
= 2 · PX t−1 −PX t−2 (2-1)
PY t = PY t-1 + ΔPY
= 2 · PY t-1 -PY t-2 (2-2)

また、時刻tのフレーム712における人物6Eについての人物領域AR1は、時刻t−1のフレーム711における人物6Eの人物領域AR、すなわち時刻t−1のフレーム711に対する画像処理で得られた人物6Eを示す領域に基づいて設定する。例えば、フレーム711における人物6Eの人物領域ARにおける4つの頂点A1〜A4の各座標を移動量(ΔPX,ΔPY)だけ移動させた点B1〜B4を頂点とする領域を、時刻tのフレーム712における人物6Eについての人物領域AR1とする。   The person area AR1 for the person 6E in the frame 712 at the time t is the person area AR of the person 6E in the frame 711 at the time t-1, that is, the person 6E obtained by the image processing on the frame 711 at the time t-1. Set based on the area shown. For example, an area having vertices at points B1 to B4 obtained by moving the coordinates of the four vertices A1 to A4 in the person area AR of the person 6E in the frame 711 by the movement amount (ΔPX, ΔPY) in the frame 712 at the time t. A person area AR1 for the person 6E is assumed.

なお、人物6Eの位置を示す座標は、図6に示したような人物6Eの頭部の中心の座標に限らず、他の部位の座標であってもよい。   The coordinates indicating the position of the person 6E are not limited to the coordinates of the center of the head of the person 6E as shown in FIG. 6, but may be coordinates of other parts.

図7は、重なり領域検出処理の内容を示すフローチャートである。
図4に示したフローチャートの重なり領域検出処理(ステップS3)は、上記のように重なり領域検出部102が行う。重なり領域検出部102は、重なり領域検出処理として、図7に示したような処理を行う。
FIG. 7 is a flowchart showing the contents of the overlapping area detection process.
The overlapping area detection process (step S3) in the flowchart shown in FIG. 4 is performed by the overlapping area detection unit 102 as described above. The overlapping area detection unit 102 performs processing as shown in FIG. 7 as overlapping area detection processing.

重なり領域検出部102は、まず、ステップS2の処理結果に基づいて、現在の処理対象フレームに複数の人物領域があるか否かを判定する(ステップS300)。人物領域が1つ又は0の場合(ステップS300;No)、重なり領域検出部102は、ステップS301以降の処理をスキップし、重なり領域検出処理を終了する(リターン)。なお、図7では省略しているが、人物領域が1つ又は0の場合、重なり領域検出部102は、現在の処理対象フレーム、及び前後関係の判定が必要な人物領域がないことを示す情報を前後関係判定部103に出力してから重なり領域検出処理を終了する。   The overlapping area detection unit 102 first determines whether or not there are a plurality of person areas in the current processing target frame based on the processing result in step S2 (step S300). When the number of person areas is one or zero (step S300; No), the overlapping area detection unit 102 skips the processes after step S301 and ends the overlapping area detection process (return). Although not shown in FIG. 7, when the number of person areas is one or zero, the overlapping area detection unit 102 indicates that there is no person area that requires the current processing target frame and the context determination. Is output to the context determination unit 103, and then the overlapping area detection process is terminated.

一方、複数の人物領域がある場合(ステップS300;Yes)、重なり領域検出部102は、次に、1つの人物領域を選択し、選択した人物領域についての重複フラグを0にする(ステップS301)。   On the other hand, when there are a plurality of person areas (step S300; Yes), the overlap area detection unit 102 next selects one person area and sets the overlap flag for the selected person area to 0 (step S301). .

次に、重なり領域検出部102は、選択した人物領域と重なり、かつ重なり領域が未設定の人物領域があるか否かをチェックする(ステップS302)。ステップS302において、重なり領域検出部102は、例えば、選択した人物領域と他の人物領域とに重なり領域があるか否かの判定を、以下のような方法で行う。まず、選択した人物領域の4つの頂点のうち左上及び右下の頂点の座標(Xs,Ys)及び(Xe,Ye)と、他の人物領域の4つの頂点のうち左上及び右下の頂点の座標(Xs’,Ys’)及び(Xe’,Ye’)とを抽出する。そして、これらの座標値が下記の条件1又は2を満たす場合、2つの人物領域に重なり領域が存在すると判定する。   Next, the overlapping area detection unit 102 checks whether there is a person area that overlaps with the selected person area and the overlapping area is not set (step S302). In step S302, the overlapping area detection unit 102 determines, for example, whether or not there is an overlapping area between the selected person area and another person area by the following method. First, the coordinates (Xs, Ys) and (Xe, Ye) of the upper left and lower right vertices of the four vertices of the selected person area, and the upper left and lower right vertices of the four vertices of the other person areas The coordinates (Xs ′, Ys ′) and (Xe ′, Ye ′) are extracted. When these coordinate values satisfy the following condition 1 or 2, it is determined that there is an overlapping area in the two person areas.

(条件1)Xs<Xs’<Xe及びXs<Xe’<Xeのいずれか或いは両方を満たし、かつ、Ys<Ys’<Ye及びYs<Ye’<Yeのいずれか或いは両方を満たす。   (Condition 1) One or both of Xs <Xs ′ <Xe and Xs <Xe ′ <Xe are satisfied, and one or both of Ys <Ys ′ <Ye and Ys <Ye ′ <Ye are satisfied.

(条件2)Xs’<Xs<Xe’及びXs<Xe’<Xeのいずれか或いは両方を満たし、かつ、Ys<Ys’<Ye及びYs<Ye’<Yeのいずれか或いは両方を満たす。   (Condition 2) One or both of Xs ′ <Xs <Xe ′ and Xs <Xe ′ <Xe are satisfied, and one or both of Ys <Ys ′ <Ye and Ys <Ye ′ <Ye are satisfied.

選択した人物領域と重なり、かつ重なり領域が未設定の人物領域がある場合(ステップS302;Yes)、重なり領域検出部102は、重複フラグを1にし、頭部が画面下方になる人物を人物1、頭部が画面上方になる人物を人物2とする(ステップS303)。ここで、画面下方及び画面上方は、それぞれ、処理対象フレームを正立方向で表示したときの下方及び上方である。また、頭部の上下方向の位置関係は、例えば、各人物領域の上辺のy座標で判断する。また、本実施形態では、図1Aに示したように光軸200が俯角になるよう設置された撮像装置2で撮像した動画像の人物を追跡している。この場合、重なっている複数の人物の身長が同程度であれば撮像装置2から近い人物の頭部のほうが画面下方になるが、撮像装置2から近い人物の身長が高い場合、図2Bに示したように撮像装置2から近い人物の頭部のほうが画面上方になることもある。そのため、本実施形態におけるステップS303では、重なっている複数の人物のうち頭部が画面下方になる人物を撮像装置2から最も近い人物(すなわち最前の人物)の候補とし、他の人物と区別するため人物1というラベルを付す。   If there is a person area that overlaps the selected person area and the overlap area is not set (step S302; Yes), the overlap area detection unit 102 sets the overlap flag to 1 and designates the person whose head is at the bottom of the screen as person 1 The person whose head is at the top of the screen is called person 2 (step S303). Here, the screen lower side and the screen upper side are the lower side and the upper side, respectively, when the processing target frame is displayed in the upright direction. Further, the positional relationship of the head in the vertical direction is determined by, for example, the y coordinate of the upper side of each person area. Further, in the present embodiment, as shown in FIG. 1A, a person in a moving image captured by the imaging apparatus 2 installed so that the optical axis 200 becomes a depression angle is tracked. In this case, if the height of a plurality of overlapping persons is approximately the same, the head of the person close to the imaging device 2 is at the bottom of the screen, but if the height of the person close to the imaging device 2 is high, FIG. As described above, the head of a person close to the imaging device 2 may be at the top of the screen. Therefore, in step S303 in the present embodiment, a person whose head is at the bottom of the screen among a plurality of overlapping persons is set as a candidate for the person closest to the imaging device 2 (that is, the foremost person) and distinguished from other persons. Therefore, the label of person 1 is attached.

次に、重なり領域検出部102は、選択した人物領域と、当該人物領域に重なる人物領域との重なり領域を算出する(ステップS304)。ステップS304において、重なり領域検出部102は、例えば、以下の方法で重なり領域を算出する。すなわち、重なり領域の4つの頂点のうち左上の頂点、右上の頂点、及び右下の頂点の座標をそれぞれ(Xso,Yso),(Xeo,Yso),及び(Xeo,Yeo)とし、下記式(3−1)〜(3−3)によりXso,Yso,Xeo,Yeoを算出する。   Next, the overlapping area detection unit 102 calculates an overlapping area between the selected person area and a person area overlapping the person area (step S304). In step S304, the overlapping area detection unit 102 calculates the overlapping area by the following method, for example. That is, the coordinates of the upper left vertex, the upper right vertex, and the lower right vertex of the four vertices of the overlapping area are respectively (Xso, Yso), (Xeo, Yso), and (Xeo, Yeo), and the following formula ( Xso, Yso, Xeo, and Yeo are calculated according to (3-1) to (3-3).

Xso=max(Xs,Xs’) ・・・(3−1)
Yso=max(Ys,Ys’) ・・・(3−2)
Xeo=min(Xe,Xe’) ・・・(3−3)
Xeo=min(Ye,Ye’) ・・・(3−4)
Xso = max (Xs, Xs ′) (3-1)
Yso = max (Ys, Ys ′) (3-2)
Xeo = min (Xe, Xe ′) (3-3)
Xeo = min (Ye, Ye ′) (3-4)

ここで、max(a,b)は値aと値bのうち大きいほうの値を選択することを意味し、min(a,b)は値aと値bのうち小さいほうの値を選択することを意味する。   Here, max (a, b) means that the larger value of values a and b is selected, and min (a, b) selects the smaller value of values a and b. Means that.

ステップS304で重なり領域を算出した後、重なり領域検出部102は、ステップS301で選択していない人物領域、すなわちステップS301〜S304について未処理の人物領域があるか否かを判定する(ステップS305)。   After calculating the overlap area in step S304, the overlap area detection unit 102 determines whether there is a person area not selected in step S301, that is, whether there is an unprocessed person area for steps S301 to S304 (step S305). .

一方、ステップS302において選択した人物領域と重なり、かつ重なり領域が未設定の人物領域がないと判定した場合(ステップS302;No)、重なり領域検出部102は、ステップS303,S304をスキップし、ステップS305の判定を行う。   On the other hand, when it is determined that there is no person area that overlaps with the person area selected in step S302 and the overlapping area is not set (step S302; No), the overlapping area detection unit 102 skips steps S303 and S304, The determination in S305 is performed.

ステップS305において未処理の人物領域があると判定した場合(ステップS305;Yes)、重なり領域検出部102は、ステップS301に戻り、未処理の人物領域に対しステップS301〜S304の処理を行う。そして、ステップS305において未処理の人物領域はないと判定した場合(ステップS305;No)、重なり領域検出部102は、重なり領域検出処理を終了する。なお、図7では省略しているが、ステップS305において未処理の人物領域はないと判定した後、重なり領域検出部102は、現在の処理対象フレーム、及び重なり領域に関する情報等を前後関係判定部103に出力してから重なり領域検出処理を終了する。   If it is determined in step S305 that there is an unprocessed person area (step S305; Yes), the overlapping area detection unit 102 returns to step S301, and performs the processes of steps S301 to S304 on the unprocessed person area. When it is determined in step S305 that there is no unprocessed person area (step S305; No), the overlapping area detection unit 102 ends the overlapping area detection process. Although not shown in FIG. 7, after determining that there is no unprocessed person area in step S <b> 305, the overlapping area detection unit 102 displays the current processing target frame, information about the overlapping area, and the like as a context determination unit. After the output to 103, the overlapping area detection process is terminated.

図8は、重なり領域の有無の判定方法及び重なり領域の算出方法を説明する図である。
図8に示したフレーム713では、人物6Fについての人物領域AR1と、人物6Gについての人物領域AR2とが重なっている。また、人物6Fと人物6Gとは、人物6Fの頭部のほうが画面下方(+y方向)にある。
FIG. 8 is a diagram illustrating a method for determining whether or not there is an overlapping region and a method for calculating the overlapping region.
In the frame 713 shown in FIG. 8, the person area AR1 for the person 6F and the person area AR2 for the person 6G overlap. Further, the person 6F and the person 6G have the head of the person 6F in the lower part of the screen (+ y direction).

このようなフレーム713に対して重なり領域検出処理を行う場合、重なり領域検出部102は、例えば、まず、ステップS301で人物領域AR1を選択し、ステップS302で人物領域AR1と人物領域AR2とが重なるかを判定する。ここで、人物領域AR1の4つの頂点のうち左上の頂点、右上の頂点、及び右下の頂点の座標をそれぞれ(Xs,Ys),(Xe,Ys),及び(Xe,Ye)とする。また、人物領域AR2の4つの頂点のうち左上の頂点、右上の頂点、及び右下の頂点の座標をそれぞれ(Xs’,Ys’),(Xe’,Ys’),及び(Xe’,Ye’)とする。このとき、2つの人物領域AR1,AR2は、x方向の座標がXs<Xs’<Xeであり、y方向の座標がYs<Ye’<Yeである。そのため、2つの人物領域AR1,AR2は条件1を満たしており、ステップS302において重なり領域があると判定される。よって、2つの人物領域AR1,AR2の重なり領域が未設定の場合、ステップS303,S304により重なり領域(太い点線で示した領域)OAが設定される。   When performing the overlapping area detection process on such a frame 713, for example, the overlapping area detection unit 102 first selects the person area AR1 in step S301, and the person area AR1 and the person area AR2 overlap in step S302. Determine whether. Here, of the four vertices of the person area AR1, the coordinates of the upper left vertex, the upper right vertex, and the lower right vertex are (Xs, Ys), (Xe, Ys), and (Xe, Ye), respectively. The coordinates of the upper left vertex, the upper right vertex, and the lower right vertex of the four vertices of the person area AR2 are respectively (Xs ′, Ys ′), (Xe ′, Ys ′), and (Xe ′, Ye). '). At this time, in the two person areas AR1 and AR2, the coordinate in the x direction is Xs <Xs ′ <Xe, and the coordinate in the y direction is Ys <Ye ′ <Ye. Therefore, the two person areas AR1 and AR2 satisfy the condition 1, and it is determined in step S302 that there is an overlapping area. Therefore, when the overlapping area of the two person areas AR1 and AR2 is not set, an overlapping area (area indicated by a thick dotted line) OA is set in steps S303 and S304.

また、図8に示した人物6Fと人物6Gとは、人物6Fの頭部のほうが下方にある。そのため、ステップS303では、人物6Fに最前の人物の候補であることを表す人物1のラベルが付与され、人物6Gには人物2のラベルが付与される。また、ステップS304で式(3−1)〜(3−4)を用いて人物領域AR1,AR2の重なり領域を算出すると、重なり領域OAの4つの頂点のうち左上、右上、右下の頂点の座標は、それぞれ(Xs’,Ys),(Xe,Ys),及び(Xe,Ye’)となる。   Moreover, the person 6F and the person 6G shown in FIG. 8 have the head of the person 6F below. Therefore, in step S303, a label of person 1 indicating that the person 6F is the foremost person candidate is given, and a label of person 2 is given to person 6G. Further, when the overlapping areas of the person areas AR1 and AR2 are calculated using the equations (3-1) to (3-4) in step S304, the upper left, upper right, and lower right vertices of the four vertices of the overlapping area OA are calculated. The coordinates are (Xs ′, Ys), (Xe, Ys), and (Xe, Ye ′), respectively.

図9は、前後関係判定処理の内容を示すフローチャートである。
図4に示したフローチャートの前後関係判定処理(ステップS4)は、上記のように前後関係判定部103が行う。前後関係判定部103は、前後関係判定処理として、図9に示したような処理を行う。
FIG. 9 is a flowchart showing the contents of the context determination process.
The context determination process (step S4) in the flowchart shown in FIG. 4 is performed by the context determination unit 103 as described above. The context determination unit 103 performs a process as illustrated in FIG. 9 as the context determination process.

前後関係判定部103は、まず、ステップS3の処理結果に基づいて、重複フラグが1の人物領域の組があるか否かを判定する(ステップS400)。該当する人物領域の組がない場合(ステップS400;No)、前後関係判定部103は、ステップS401以降の処理をスキップし、前後関係判定処理を終了する(リターン)。ここで、重複フラグが1の人物領域の組がない場合は、現在の処理対象フレームに追跡中の人物が存在しない場合、及び追跡中の人物が一人の場合、並びに追跡中の人物が複数で各人物の人物領域に重なりがない場合を含む。なお、図9では省略しているが、重複フラグが1の人物領域の組がない場合、前後関係判定部103は、現在の処理対象フレーム、及び人物領域の重なりがないことを示す情報等を人物追跡部104に出力してから前後関係判定処理を終了する。   The context determination unit 103 first determines whether or not there is a set of person regions with an overlap flag of 1 based on the processing result of step S3 (step S400). When there is no corresponding person area pair (step S400; No), the context determination unit 103 skips the processing after step S401 and ends the context determination process (return). Here, when there is no set of person areas with the overlap flag of 1, when there is no person being tracked in the current processing target frame, when there is only one person being tracked, and there are a plurality of persons being tracked. This includes the case where the person areas of each person do not overlap. Although not shown in FIG. 9, when there is no pair of person regions with the overlap flag of 1, the context determination unit 103 displays information indicating that there is no overlap between the current processing target frame and the person regions. After outputting to the person tracking unit 104, the context determination process is terminated.

一方、重複フラグが1の人物領域の組がある場合(ステップS400;Yes)、前後関係判定部103は、次に、重複フラグが1で判定フラグが未設定の人物領域の組の1つを選択する(ステップS401)。ここで、判定フラグは、重なり領域検出処理で選出した最前の人物の候補が最前の人物であるか否かの判定結果を示すフラグである。   On the other hand, when there is a set of person areas with the overlap flag set to 1 (step S400; Yes), the context determination unit 103 next selects one of the set of person areas with the overlap flag set to 1 and the determination flag not set. Select (step S401). Here, the determination flag is a flag indicating a determination result of whether or not the foremost person candidate selected in the overlapping area detection process is the foremost person.

次に、前後関係判定部103は、選択した人物領域の組みについて、人物1の照合用データにおける重なり領域部分と人物領域の重なり領域との照合割合M1、及び人物2についての照合用データと人物領域との照合割合M2を算出する(ステップS402)。ここで、照合割合M1の算出に用いる人物領域の重なり領域、及び照合割合M2の算出に用いる人物領域は、それぞれ、現在の処理対象フレームにおける重なり領域及び人物領域である。また、照合割合M1,M2は、2つの画像の類似度や一致度の算出に用いる既知の関数により算出する。   Next, the context determination unit 103 selects the matching ratio M1 between the overlapping area portion and the overlapping area of the person area in the matching data for the person 1 and the matching data and the person for the person 2 for the selected combination of the person areas. The comparison ratio M2 with the area is calculated (step S402). Here, the overlapping area of the person area used for calculating the matching ratio M1 and the person area used for calculating the matching ratio M2 are the overlapping area and the person area in the current processing target frame, respectively. The matching ratios M1 and M2 are calculated by a known function used to calculate the similarity and coincidence between two images.

次に、前後関係判定部103は、照合割合M1,M2がM1<Th1かつM2>Th2であるか否か、及び2つの照合位置が同じ位置に存在するか否かを判定する(ステップS403)。ここで、Th1及びTh2はそれぞれ予め定めた閾値であり、例えば、照合割合M1,M2が0≦M1≦1,0≦M2≦1の場合、それぞれ0.7〜0.8程度の数値とする。   Next, the context determination unit 103 determines whether or not the collation ratios M1 and M2 are M1 <Th1 and M2> Th2, and whether the two collation positions exist at the same position (step S403). . Here, Th1 and Th2 are respectively predetermined threshold values. For example, when the collation ratios M1 and M2 are 0 ≦ M1 ≦ 1, 0 ≦ M2 ≦ 1, the values are about 0.7 to 0.8, respectively. .

M1<Th1かつM2>Th2である場合、又は2つの照合位置が同じ位置に存在する場合(ステップS403;Yes)、前後関係判定部103は、人物1が遮蔽状態であると判定し、判定フラグを0にする(ステップS404)。ここで、遮蔽状態は、人物1よりも前に人物2がいて、人物1の一部又は全部が人物2に隠れている状態を意味する。すなわち、重なっている人物領域の組に対する判定フラグを0にすることで、当該人物領域の組における最前の人物は、最前の人物の候補(人物1)ではなく、人物2であることが特定される。   When M1 <Th1 and M2> Th2, or when two collation positions are present at the same position (step S403; Yes), the context determination unit 103 determines that the person 1 is in the shielding state, and the determination flag Is set to 0 (step S404). Here, the occlusion state means a state in which the person 2 is present before the person 1 and a part or all of the person 1 is hidden by the person 2. That is, by setting the determination flag for a set of overlapping person areas to 0, it is specified that the foremost person in the set of person areas is not the foremost person candidate (person 1) but the person 2. The

一方、M1≧Th1又はM2≦Th2であり、かつ2つの照合位置が同じ位置に存在しない場合(ステップS403;No)、前後関係判定部103は、人物1のほうが前であると判定し、判定フラグを1にする(ステップS405)。すなわち、重なっている人物領域の組に対する判定フラグを1にすることで、当該人物領域の組における最前の人物は最前の人物の候補(人物1)であることが特定される。   On the other hand, when M1 ≧ Th1 or M2 ≦ Th2 and the two collation positions do not exist at the same position (step S403; No), the context determination unit 103 determines that the person 1 is ahead and determines The flag is set to 1 (step S405). That is, by setting the determination flag for a set of overlapping person areas to 1, it is specified that the foremost person in the set of person areas is the foremost person candidate (person 1).

ステップS404又はS405により判定フラグの値を設定した後、前後関係判定部103は、判定フラグが未設定の人物領域の組があるか否かをチェックする(ステップS406)。判定フラグが未設定の人物領域の組がある場合(ステップS406;Yes)、前後関係判定部103は、未設定の人物領域の組に対しステップS401〜ステップS405の処理を行う。そして、ステップS406において判定フラグが未設定の人物領域の組がないと判定した場合(ステップS406;No)、前後関係判定部103は、前後関係判定処理を終了する。なお、図9では省略しているが、ステップS406において判定フラグが未設定の人物領域の組はないと判定した後、前後関係判定部103は、現在の処理対象フレーム、及び処理結果に関する情報等を人物追跡部104に出力してから前後関係判定処理を終了する。   After setting the value of the determination flag in step S404 or S405, the context determination unit 103 checks whether there is a set of person areas for which the determination flag is not set (step S406). When there is a set of person areas for which the determination flag is not set (step S406; Yes), the context determination unit 103 performs the processing of steps S401 to S405 for the set of person areas that are not set. If it is determined in step S406 that there is no set of person regions for which the determination flag is not set (step S406; No), the context determination unit 103 ends the context determination process. Although omitted in FIG. 9, after determining in step S406 that there is no set of person areas for which the determination flag is not set, the context determination unit 103 determines information about the current processing target frame, processing result, and the like. Is output to the person tracking unit 104, and the context determination processing ends.

図10Aは、頭部が下方にある人物1が人物2よりも手前にいる場合の前後関係判定処理の結果を説明する図である。図10Bは、頭部が下方にある人物1が人物2よりも奥にいる場合の前後関係判定処理の結果を説明する図である。   FIG. 10A is a diagram illustrating the result of the context determination process when the person 1 with the head below is in front of the person 2. FIG. 10B is a diagram illustrating the result of the context determination process when the person 1 with the head below is behind the person 2.

図10Aに示したフレーム713のように二人の人物6F,6Gが重なっている場合、重なり領域検出処理(ステップS3)により、頭部がより画面下方に位置する人物6Fが人物1となり、頭部がより画面上方に位置する人物6Gが人物2となる。そのため、前後関係判定処理のステップS402では、次のような照合割合M1,M2の算出処理が行われる。まず、人物1(人物6F)については、照合用データBR1のうちフレーム713の重なり領域OA(太い点線で囲まれた領域)と対応する部分領域BR1’を、フレーム713の重なり領域OA及びその近傍領域と照合して照合割合M1を算出する。このとき、図10Aに示したように、人物6Fが人物6Gよりも前(撮像装置側)にいれば、重なり領域OA内で人物6Fが人物6Gに隠れることはない。そのため、照合割合M1は、人物6Fと人物6Gとが重なっていない状態である場合と同程度の大きな値になる。   When two persons 6F and 6G overlap each other as in the frame 713 shown in FIG. 10A, the person 6F whose head is positioned further down the screen becomes the person 1 by the overlapping area detection process (step S3). The person 6G whose part is located at the upper part of the screen is the person 2. Therefore, in step S402 of the context determination process, the following collation ratios M1 and M2 are calculated. First, for the person 1 (person 6F), the partial area BR1 ′ corresponding to the overlapping area OA (the area surrounded by the thick dotted line) of the frame 713 in the verification data BR1 is set to the overlapping area OA of the frame 713 and its vicinity. Collation ratio M1 is calculated by collating with the area. At this time, as shown in FIG. 10A, if the person 6F is in front of the person 6G (on the imaging device side), the person 6F is not hidden by the person 6G in the overlapping area OA. Therefore, the matching ratio M1 is a large value that is about the same as when the person 6F and the person 6G do not overlap.

また、人物2(人物6G)については、照合用データBR2の全体を、フレーム713の人物2についての人物領域AR2及びその近傍領域と照合して照合割合M2を算出する。このとき、図10Aに示したように、人物6Fが人物6Gよりも前(撮像装置側)にいると、人物6Gの一部が人物6Fで遮蔽される。そのため、照合割合M2は人物6Fと人物6Gとが重なっていない状態である場合に比べて小さな値になる。   For the person 2 (person 6G), the entire matching data BR2 is checked against the person area AR2 for the person 2 in the frame 713 and its neighboring area to calculate the matching ratio M2. At this time, as shown in FIG. 10A, when the person 6F is in front of the person 6G (on the imaging apparatus side), a part of the person 6G is shielded by the person 6F. For this reason, the matching ratio M2 is a smaller value than when the person 6F and the person 6G do not overlap.

一方、図10Bに示したフレーム714のように二人の人物6F,6Gが重なっており、前(撮像装置側)にいる人物6Gの頭部のほうがより画面上方に位置する場合、奥にいる人物6Fが人物1となり、前にいる人物6Gが人物2となる。すなわち、実際には最前の人物ではない人物6Fが、最前の人物の候補となる。そのため、前後関係判定処理のステップS402では、人物1(人物6F)については、照合用データBR1のうち重なり領域OAと対応する部分領域BR1’を、フレーム714の重なり領域OA及びその近傍領域と照合して照合割合M1を算出する。このとき、図10Bに示したように、人物6Gが人物6Fよりも前(撮像装置側)にいると、重なり領域OAでは人物6Fの一部が人物6Gに遮蔽される。そのため、照合割合M1は、人物6Fと人物6Gとが重なっていない状態である場合に比べて小さな値になる。   On the other hand, when two persons 6F and 6G overlap each other like a frame 714 shown in FIG. 10B and the head of the person 6G in front (on the imaging device side) is located at the upper part of the screen, the person is in the back. The person 6F becomes the person 1 and the person 6G in front becomes the person 2. That is, the person 6F who is not actually the foremost person is the foremost person candidate. Therefore, in step S402 of the context determination process, for the person 1 (person 6F), the partial area BR1 ′ corresponding to the overlapping area OA in the matching data BR1 is checked against the overlapping area OA of the frame 714 and its neighboring area. Thus, the collation ratio M1 is calculated. At this time, as shown in FIG. 10B, when the person 6G is in front of the person 6F (on the imaging device side), a part of the person 6F is shielded by the person 6G in the overlapping area OA. Therefore, the collation ratio M1 is a small value compared to the case where the person 6F and the person 6G do not overlap.

また、人物2(人物6G)については、照合用データBR2の全体を、フレーム714の人物2についての人物領域AR2及びその近傍領域と照合して照合割合M2を算出する。このとき、人物6Gが前(撮像装置側)にいると、人物6Gが人物6Fで遮蔽されることはないため、照合割合M2は人物6Fと人物6Gとが重なっていない状態である場合と同程度の大きな値になる。   For the person 2 (person 6G), the entire matching data BR2 is collated with the person area AR2 for the person 2 in the frame 714 and its neighboring area to calculate the matching ratio M2. At this time, if the person 6G is in front (on the imaging device side), the person 6G is not shielded by the person 6F, so the matching ratio M2 is the same as when the person 6F and the person 6G do not overlap. It will be a large value.

更に、人物1についての照合領域BR1の部分領域BR1’と人物2についての照合領域BR2とが同じ位置にある場合、頭部が下方にある人物1(人物6F)が人物2(人物6G)よりも奥にいると、人物1の全体が人物2に遮蔽されてしまう。   Further, when the partial area BR1 ′ of the collation area BR1 for the person 1 and the collation area BR2 for the person 2 are at the same position, the person 1 (person 6F) whose head is below the person 2 (person 6G). If the person is in the back, the entire person 1 is shielded by the person 2.

よって、本実施形態の前後関係判定処理において、上記のようにM1<Th1かつM2>Th2である場合、又は2つの照合位置が同じ位置に存在する場合、前後関係判定部103は、人物2のほうが前であると判定する。   Therefore, in the context determination process of the present embodiment, when M1 <Th1 and M2> Th2 as described above, or when two collation positions exist at the same position, the context determination unit 103 Is determined to be before.

このように、前後関係判定部103が行う前後関係判定処理では、重なっている複数の人物の頭部の位置関係、及び人物毎に算出した照合割合に基づいて、重なっている複数の人物の前後関係を判定する。また、重なっている複数の人物のうち最前の人物の候補に選出された人物については、照合用データのうち重なり領域検出処理のステップS304で算出した重なり領域と対応する部分領域のみを用いて照合割合M1を算出する。そのため、本実施形態の前後関係判定処理によれば、図10Bに示したように、前にいる人物の頭部が奥にいる人物の頭部よりも画面上方にある場合でも、両人物の前後関係を正確に判定することができる。   As described above, in the context determination processing performed by the context determination unit 103, the front and back of a plurality of overlapping persons are based on the positional relationship of the heads of the overlapping persons and the collation ratio calculated for each person. Determine the relationship. In addition, for the person selected as the foremost person candidate among a plurality of overlapping persons, only the partial area corresponding to the overlap area calculated in step S304 of the overlap area detection process in the verification data is used. The ratio M1 is calculated. Therefore, according to the context determination process of the present embodiment, as shown in FIG. 10B, even when the head of the person in front is above the head of the person in the back, The relationship can be accurately determined.

例えば、人物1と人物2との重なり領域が狭く、かつ図10Bに示したように人物1(人物6F)が実際には他の人物6Gよりも奥にいる場合、人物6Fのうち人物6Gに遮蔽される部分が少なくなる。そのため、人物1についての照合用データBR1の全体を用いて照合割合M1を算出すると、照合割合M1は、人物6Gと人物6Fとが重なっていない状態である場合に比べてわずかに小さくなるだけである。よって、人物1についての照合用データBR1の全体を用いて照合割合M1を算出すると、人物6G及び人物6Fのどちらが前にいるかを正確に判定することが困難になる。   For example, when the overlapping area between the person 1 and the person 2 is narrow and the person 1 (person 6F) is actually behind the other person 6G as shown in FIG. There are fewer parts to be shielded. Therefore, when the matching ratio M1 is calculated using the entire matching data BR1 for the person 1, the matching ratio M1 is only slightly smaller than when the person 6G and the person 6F do not overlap. is there. Therefore, if the matching ratio M1 is calculated using the entire matching data BR1 for the person 1, it is difficult to accurately determine which person 6G or person 6F is ahead.

これに対し、本実施形態の前後関係判定処理では、上記のように最前の人物の候補に選出された人物6Fについての照合割合M1は、重なり領域OAのみで算出する。そのため、最前の人物の候補である人物6Fよりも前に他の人物6Gがいる場合、重なり領域OA内における人物6Fのうち人物6Gで遮蔽された部分の割合は、人物領域AR1における人物6Fのうち人物6Gで遮蔽された部分の割合よりも高くなる。そして、照合する領域内における照合対象人物のうち他の人物等で遮蔽された部分の割合が高いほど、照合割合は小さくなる。したがって、重なり領域OAと対応する部分領域BR1’のみで照合割合M1を算出すると、照合用データBR1の全体を用いて照合割合M1を算出した場合に比べて、照合割合M1が小さくなる。よって、最前の人物の候補(人物1)についての照合割合M1を重なり領域OAと対応する部分領域BR1’のみを用いて算出すると、人物1と人物2との重なり領域が狭い場合でも、人物6G及び人物6Fの前後関係を正確に判定することが可能になる。   On the other hand, in the context determination process of the present embodiment, the matching ratio M1 for the person 6F selected as the foremost person candidate as described above is calculated only from the overlapping area OA. Therefore, when there is another person 6G before the person 6F who is the foremost person candidate, the ratio of the part shielded by the person 6G in the person 6F in the overlapping area OA is the ratio of the person 6F in the person area AR1. Of these, the ratio is higher than the ratio of the portion shielded by the person 6G. Then, the higher the ratio of the portion that is shielded by other persons in the verification target person in the verification target area, the smaller the verification ratio. Therefore, if the matching ratio M1 is calculated only with the partial area BR1 'corresponding to the overlapping area OA, the matching ratio M1 is smaller than when the matching ratio M1 is calculated using the entire matching data BR1. Therefore, if the matching ratio M1 for the foremost person candidate (person 1) is calculated using only the partial area BR1 ′ corresponding to the overlap area OA, the person 6G can be obtained even when the overlap area between the person 1 and the person 2 is narrow. In addition, it is possible to accurately determine the context of the person 6F.

図11Aは、人物追跡処理の内容を示すフローチャートである。図11Bは、人物追跡処理における人物1,2の位置を特定する処理の内容を示すフローチャートである。   FIG. 11A is a flowchart showing the content of the person tracking process. FIG. 11B is a flowchart showing the contents of the process of specifying the positions of the persons 1 and 2 in the person tracking process.

図4に示したフローチャートの人物追跡処理(ステップS5)は、上記のように人物追跡部104が行う。人物追跡部104は、人物追跡処理として、図11A及び図11Bに示したような処理を行う。   The person tracking process (step S5) of the flowchart shown in FIG. 4 is performed by the person tracking unit 104 as described above. The person tracking unit 104 performs the process shown in FIGS. 11A and 11B as the person tracking process.

人物追跡部104は、まず、ステップS2〜S4の処理結果に基づいて、現在の処理対象フレームに追跡中の人物がいるか否かを判定する(ステップS500)。追跡中の人物がいない場合(ステップS500;No)、人物追跡部104は、ステップS501以降の処理をスキップし、人物追跡処理を終了する(リターン)。なお、図11Aでは省略しているが、追跡中の人物がいない場合、人物追跡部104は、追跡中の人物がいないことを示す情報を人物検出部105に出力してから人物追跡処理を終了する。   The person tracking unit 104 first determines whether there is a person being tracked in the current processing target frame based on the processing results of steps S2 to S4 (step S500). If there is no person being tracked (step S500; No), the person tracking unit 104 skips the processes after step S501 and ends the person tracking process (return). Although omitted in FIG. 11A, when there is no person being tracked, the person tracking unit 104 outputs information indicating that there is no person being tracked to the person detecting unit 105 and then ends the person tracking process. To do.

追跡中の人物がいる場合(ステップ500;Yes)、人物追跡部104は、次に、重複フラグが0の人物領域、すなわち他の人物領域との重なり領域が存在しない人物領域があるか否かをチェックする(ステップS501)。重複フラグが0の人物領域がある場合(ステップS501;Yes)、人物追跡部104は、既知の追跡方法(例えば、テンプレートマッチング)により、該当する人物の位置を特定する(ステップS502)。また、ステップS502において、人物追跡部104は、記憶部107が記憶している過去のフレームにおける人物の位置情報のうちステップS502で位置を特定した人物についての位置情報を更新する。そして、ステップS502の処理を終えると、人物追跡部104は、次に、重複フラグが1の人物領域の組があるか否かをチェックする(ステップS503)。   When there is a person being tracked (step 500; Yes), the person tracking unit 104 next determines whether there is a person area whose overlap flag is 0, that is, a person area that does not have an overlap area with another person area. Is checked (step S501). If there is a person region with an overlap flag of 0 (step S501; Yes), the person tracking unit 104 specifies the position of the corresponding person by a known tracking method (for example, template matching) (step S502). In step S502, the person tracking unit 104 updates the position information about the person whose position is specified in step S502 among the position information of the person in the past frame stored in the storage unit 107. When the process of step S502 is completed, the person tracking unit 104 next checks whether or not there is a set of person areas whose overlap flag is 1 (step S503).

また、重複フラグが0の人物領域がない場合(ステップS501;No)、人物追跡部104は、ステップS502をスキップしてステップS503のチェックを行う。   If there is no person area with an overlap flag of 0 (step S501; No), the person tracking unit 104 skips step S502 and checks in step S503.

重複フラグが1の人物領域の組がない場合(ステップS503;No)、人物追跡部104は、ステップS504以降の処理をスキップし、人物追跡処理を終了する。追跡中の人物がいて重複フラグが1の人物領域の組がない場合、追跡中の人物は他の人物と重ならない人物のみであり、ステップS502において位置が特定されている。そのため、図11Aでは省略しているが、重複フラグが1の人物領域の組がない場合、人物追跡部104は、ステップS502で特定した追跡中の人物の位置を示す情報を人物検出部105に出力してから人物追跡処理を終了する。   When there is no pair of person areas with the overlap flag of 1 (step S503; No), the person tracking unit 104 skips the processes after step S504 and ends the person tracking process. If there is a person being tracked and there is no set of person areas with the overlap flag set to 1, the person being tracked is only a person who does not overlap with another person, and the position is specified in step S502. Therefore, although omitted in FIG. 11A, when there is no set of person regions with the overlap flag of 1, the person tracking unit 104 sends information indicating the position of the person being tracked identified in step S502 to the person detecting unit 105. The person tracking process is terminated after outputting.

一方、重複フラグが1の人物領域の組がある場合(ステップS503;Yes)、人物追跡部104は、次に、人物領域の組を1つ選択し(ステップS504)、選択した人物領域の組についての判定フラグが1であるか否かをチェックする(ステップS505)。判定フラグが1である場合(ステップS505;Yes)、人物追跡部104は、選択した人物領域の組における人物1,2の位置を特定する処理(ステップS506)を行う。   On the other hand, when there is a set of person areas with the overlap flag being 1 (step S503; Yes), the person tracking unit 104 next selects one set of person areas (step S504) and sets the selected person area. It is checked whether or not the determination flag for is 1 (step S505). When the determination flag is 1 (step S505; Yes), the person tracking unit 104 performs a process of identifying the positions of the persons 1 and 2 in the selected person area set (step S506).

また、判定フラグが0である場合(ステップS505;No)、人物追跡部104は、次に、選択した人物領域の組における人物1についての照合用データを保持するとともに、人物1についての遮蔽フラグを1にする(ステップS507)。その後、人物追跡部104は、選択した人物領域の組における人物2について、現在の処理対象フレームにおける人物2の位置を特定する(ステップS508)。   If the determination flag is 0 (step S505; No), the person tracking unit 104 next holds the matching data for the person 1 in the selected person area set and also the shielding flag for the person 1. Is set to 1 (step S507). After that, the person tracking unit 104 identifies the position of the person 2 in the current processing target frame for the person 2 in the selected person area set (step S508).

ステップS506又はステップS508により人物の位置を特定すると、人物追跡部104は、次に、重複フラグが1の全ての人物領域の組について追跡(人物の位置を特定する処理)をしたか否かを判断する(ステップS509)。未処理の人物領域の組がある場合(ステップS509;No)、人物追跡部104は、未処理の人物領域の組に対しステップS504以降の処理を行う。そして、全ての人物領域の組について追跡を行った場合(ステップS509;Yes)、人物追跡部104は、人物追跡処理を終了する。なお、図11Aでは省略しているが、全ての人物領域の組に対しステップS504〜S508の処理を行った場合、人物追跡部104は、特定した追跡中の人物の位置を示す情報等を人物検出部105に出力してから人物追跡処理を終了する。   When the position of the person is specified in step S506 or step S508, the person tracking unit 104 next determines whether or not tracking (a process for specifying the position of the person) has been performed for all pairs of person regions having the overlap flag of 1. Judgment is made (step S509). If there is a set of unprocessed person areas (step S509; No), the person tracking unit 104 performs the processing from step S504 on for the set of unprocessed person areas. If tracking is performed for all pairs of person regions (step S509; Yes), the person tracking unit 104 ends the person tracking process. Although omitted in FIG. 11A, when the processing of steps S504 to S508 is performed on all pairs of human regions, the person tracking unit 104 displays information indicating the position of the identified person being tracked, etc. After outputting to the detection unit 105, the person tracking process is terminated.

上記の人物追跡処理におけるステップS506の処理、すなわち重複フラグ及び判定フラグが1の人物領域の組における人物1,2の位置を特定する処理として、人物追跡部104は、図11Bに示したような処理を行う。   As the process of step S506 in the person tracking process described above, that is, the process of specifying the positions of the persons 1 and 2 in the set of person areas with the overlap flag and the determination flag being 1, the person tracking unit 104 is as shown in FIG. Process.

人物1,2の位置を特定する処理において、人物追跡部104は、まず、人物1,2の人物領域を表す座標を読み出す(ステップS506a)。次に、人物追跡部104は、人物1,2の人物領域におけるy座標の最小値を抽出する(ステップS506b)。   In the process of specifying the positions of the persons 1 and 2, the person tracking unit 104 first reads out coordinates representing the person areas of the persons 1 and 2 (step S506a). Next, the person tracking unit 104 extracts the minimum value of the y coordinate in the person areas of the persons 1 and 2 (step S506b).

次に、人物追跡部104は、人物2の人物領域から、人物1,2の人物領域におけるy座標の最小値で挟まれた重なりのない領域を抽出する(ステップS506c)。次に、人物追跡部104は、人物1の照合用データの全体、及び人物2の照合用データのうちステップS506cで抽出した重なりのない領域と対応する部分領域を人物1,2の位置の特定に用いるテンプレートに設定する(ステップS506d)。   Next, the person tracking unit 104 extracts from the person area of the person 2 a non-overlapping area sandwiched between the minimum values of the y coordinates in the person areas of the persons 1 and 2 (step S506c). Next, the person tracking unit 104 specifies the positions of the persons 1 and 2 in the entire matching data for the person 1 and the partial area corresponding to the non-overlapping area extracted in step S506c in the matching data for the person 2. The template is used for the template (step S506d).

次に、人物追跡部104は、設定した人物1,2のテンプレートを用いて現在の処理対象フレームを走査し、各位置における類似度Rを算出する(ステップS506e)。類似度Rは、例えば、下記式(4)のような評価関数R(x,y)を用いて算出する。   Next, the person tracking unit 104 scans the current processing target frame using the set templates of the persons 1 and 2, and calculates the similarity R at each position (step S506e). The similarity R is calculated using, for example, an evaluation function R (x, y) as in the following formula (4).

Figure 0006620443
Figure 0006620443

式(4)において、T(x’,y’)はテンプレートの座標(x’,y’)の画素値であり、I(x+x’,y+y’)は処理対象フレームの座標(x+x’,y+y’)の画素値である。また、式(4)において、w及びhは、それぞれ、テンプレートのx方向(左右方向)の画素数及びy方向(上下方向)の画素数である。   In Expression (4), T (x ′, y ′) is the pixel value of the template coordinates (x ′, y ′), and I (x + x ′, y + y ′) is the coordinates (x + x ′, y + y) of the processing target frame. ') Pixel value. In Equation (4), w and h are the number of pixels in the x direction (left and right direction) and the number of pixels in the y direction (up and down direction), respectively.

次に、人物追跡部104は、類似度Rが最も高い位置を現在の処理対象フレームにおける人物の位置とし、記憶部107が記憶する人物の位置を表す座標を更新する(ステップS506f)。このステップS506fの処理を終えると、人物追跡部104は、人物1,2の位置を特定する処理を終了する(リターン)。   Next, the person tracking unit 104 sets the position with the highest similarity R as the position of the person in the current processing target frame, and updates the coordinates representing the position of the person stored in the storage unit 107 (step S506f). When the process of step S506f is completed, the person tracking unit 104 ends the process of specifying the positions of the persons 1 and 2 (return).

図12Aは、人物2の追跡に用いるテンプレートの設定方法を説明する図である。図12Bは、テンプレートマッチングによる人物1,2の追跡方法を説明する図である。   FIG. 12A is a diagram for explaining a template setting method used for tracking the person 2. FIG. 12B is a diagram for explaining a tracking method of the persons 1 and 2 by template matching.

図11Bに示した人物1,2の位置を特定する処理は、判定フラグが1である人物領域の組に対して行う。判定フラグが1である人物領域の組では、図12Aに示したフレーム713のように、重なる二人の人物6F、6Gのうち頭部がより画面下方の人物6F(人物1)のほうが人物6G(人物2)よりも前にいるので人物6Gの一部は人物6Fに遮蔽されている。そのため、人物6Gの照合用データBR2の全体をテンプレートとしたテンプレートマッチングを行った場合、人物6Fで遮蔽された部分における類似度(一致度)が低くなり、人物6Gの位置を精度良く特定することが難しい。よって、人物6G(人物2)の位置を特定する際には、照合用データのうち人物6F(人物1)の人物領域と重ならない領域のみを用いて特定することが好ましい。   The process of specifying the positions of the persons 1 and 2 shown in FIG. 11B is performed for a set of person areas whose determination flag is 1. In the group of person regions whose determination flag is 1, the person 6F (person 1) whose head is at the lower side of the screen of the two overlapping persons 6F and 6G is the person 6G as shown in the frame 713 in FIG. 12A. Since it is in front of (person 2), a part of person 6G is shielded by person 6F. For this reason, when template matching is performed using the entire matching data BR2 of the person 6G as a template, the similarity (matching degree) in the portion shielded by the person 6F is reduced, and the position of the person 6G is accurately identified. Is difficult. Therefore, when specifying the position of the person 6G (person 2), it is preferable to specify using only an area that does not overlap the person area of the person 6F (person 1) in the verification data.

そこで、本実施形態では、図12Aに示したように、人物6Gの照合用データBR2のうち人物領域AR1のy座標の最小値と人物領域AR2のy座標の最小値とで挟まれる高さΔd3の領域と対応した部分領域BR2’を、人物2のテンプレートに設定する。   Therefore, in the present embodiment, as shown in FIG. 12A, the height Δd3 sandwiched between the minimum value of the y coordinate of the person area AR1 and the minimum value of the y coordinate of the person area AR2 in the comparison data BR2 of the person 6G. The partial region BR2 ′ corresponding to the region is set as the template of the person 2.

一方、重なっている人物6F,6Gのうち前にいる人物6F(人物1)は、遮蔽された部分がない。そのため、人物6Fについては、照合領域BR1全体を追跡用のテンプレートとして用いることができる。   On the other hand, the person 6F (person 1) in front of the overlapping persons 6F and 6G has no shielded portion. Therefore, for the person 6F, the entire collation area BR1 can be used as a tracking template.

また、図12Bに示したように、現在の処理対象フレーム715において追跡中の二人の人物6H,6Jが重なっている場合、重なり領域判定処理において頭部の位置がより画面下方である人物6Hが人物1(最前の人物の候補)になる。そして、上記の前後関係判定処理を続けて行うことで、最前の人物の候補である人物6Hが人物6Jよりも前にいることが特定され、人物6H,6Jに対する判定フラグが1になる。よって、フレーム715についての人物追跡処理では、図11Bに示した処理により人物6H,6Jの位置を特定する。   Also, as shown in FIG. 12B, when two persons 6H and 6J that are being tracked overlap in the current processing target frame 715, the person 6H whose head position is at the lower side of the screen in the overlapping area determination process. Becomes person 1 (the candidate for the foremost person). Then, by continuing the above-described context determination process, it is specified that the person 6H who is the foremost person candidate is ahead of the person 6J, and the determination flag for the persons 6H and 6J becomes 1. Therefore, in the person tracking process for the frame 715, the positions of the persons 6H and 6J are specified by the process shown in FIG. 11B.

この際、前にいる人物6Hについては、人物6Hの照合用データBR1の全体をテンプレートとして、テンプレートマッチングを行う。人物6Hは他の人物に遮蔽された部分がないため、照合用データBR1の全体をテンプレートとして用いた場合に、遮蔽された部分が含まれることによる類似度Rの低下は起こらない。そのため、人物6Hについては、照合用データBR1の全体をテンプレートとして用いることで、人物6Hの正確な位置を算出する。   At this time, for the person 6H in front, template matching is performed using the entire matching data BR1 of the person 6H as a template. Since the person 6H does not have a portion shielded by another person, when the entire matching data BR1 is used as a template, the similarity R does not decrease due to the inclusion of the shielded portion. Therefore, for the person 6H, the exact position of the person 6H is calculated by using the entire matching data BR1 as a template.

一方、奥にいる人物6Jについては、人物領域AR2のうち人物6Hの人物領域AR1と重ならない領域AR2’を求め、照合用データBR2のうち人物領域AR2の部分領域AR2’と対応した部分領域BR2’のみをテンプレートとして用いる。奥にいる人物6Jは、その一部が前にいる人物6Hに遮蔽されているため、照合用データBR2の全体をテンプレートとして用いると、人物6Hに遮蔽された部分が含まれることにより類似度Rが低下する。これに対し、本実施形態の人物追跡処理では、上記のように照合用データBR2のうち人物6Hの人物領域AR1と重ならない部分領域BR2’(頭部6J’)のみをテンプレートとして用いる。そのため、人物6Hに遮蔽された部分が含まれることによる類似度Rの低下を防げ、人物6Jの位置を精度良く算出することができる。   On the other hand, for the person 6J in the back, an area AR2 ′ that does not overlap the person area AR1 of the person 6H in the person area AR2 is obtained, and the partial area BR2 corresponding to the partial area AR2 ′ of the person area AR2 in the matching data BR2 Use only 'as a template. Since a part of the person 6J in the back is shielded by the person 6H in the front, if the entire matching data BR2 is used as a template, the similarity R is obtained because the part shielded by the person 6H is included. Decreases. In contrast, in the person tracking process of the present embodiment, only the partial area BR2 '(head 6J') that does not overlap with the person area AR1 of the person 6H in the verification data BR2 as described above is used as a template. For this reason, it is possible to prevent the similarity R from being lowered due to the inclusion of the shielded portion in the person 6H, and to calculate the position of the person 6J with high accuracy.

以上のように、本実施形態に係る画像処理では、撮像装置2の光軸200の方向から推定される人物の前後関係とフレーム(画像)内における頭部の位置の上下関係とに基づいて、重なっている人物のうち最前の人物の候補を選出する。そして、前後関係判定処理により、最前の人物の候補が最前の人物であるか否かを判定し、最前の人物を特定する。その際、上記のように最前の人物の候補についての照合を重なり領域のみで行うことで、重なり領域が狭い場合でも、重なっている人物のなかから最前の人物を正確に特定することができる。また、本実施形態に係る画像処理では、現在の処理対象フレームから得られる二次元の情報に基づいて人物の前後関係を特定することができるので、三次元モデルを用いて人物の前後関係を特定する場合に比べて監視装置1における処理負荷が軽減される。よって、本実施形態によれば、画像内の追跡中の人物に重なりが生じた場合に重なる人物の前後関係を正確かつ容易に判断することができる。   As described above, in the image processing according to the present embodiment, based on the front-rear relationship of the person estimated from the direction of the optical axis 200 of the imaging device 2 and the vertical relationship of the position of the head in the frame (image), The candidate of the first person is selected from the overlapping persons. Then, by the context determination process, it is determined whether or not the foremost person candidate is the foremost person, and the foremost person is specified. At this time, as described above, the matching of the forefront person candidate is performed only in the overlapping area, so that even when the overlapping area is narrow, the foremost person can be accurately identified from the overlapping persons. Further, in the image processing according to the present embodiment, since it is possible to specify the person's context based on the two-dimensional information obtained from the current processing target frame, the person's context is specified using a three-dimensional model. Compared with the case where it does, the processing load in the monitoring apparatus 1 is reduced. Therefore, according to the present embodiment, it is possible to accurately and easily determine the anteroposterior relation of overlapping persons when the tracking person in the image overlaps.

また、本実施形態に係る画像処理では、重なっている人物のうち前後関係判定処理により奥(後ろ)にいると特定された人物については、前にいる人物と重ならない領域のみを用いて現在の処理対象フレームにおける位置を特定(追跡)する。そのため、奥にいる人物の位置を特定する際に、前にいる人物と重なり遮蔽された部分領域における類似度の低下による位置の特定精度の低下を防ぐことが可能になる。よって、本実施形態によれば、画像内の人物を精度良く追跡することができる。   Further, in the image processing according to the present embodiment, for the person who is identified as being in the back (back) by the context determination process among the overlapping persons, only the area that does not overlap with the person in front is used. The position in the processing target frame is specified (tracked). Therefore, when specifying the position of a person in the back, it is possible to prevent a decrease in position specifying accuracy due to a decrease in similarity in a partial area that is overlapped and shielded by the person in front. Therefore, according to the present embodiment, it is possible to accurately track a person in the image.

なお、図4、図5、図7、図9、図11A及び図11Bのフローチャートは、画像処理の一例に過ぎず、監視装置1の構成や条件に応じて一部の処理を変更又は省略してもよい。例えば、前後関係判定処理は、人物1についての照合用データBR1における部分領域BR1’と人物領域の重なり領域OAとの照合割合M1のみを算出し、照合割合M1と閾値Th1との大小関係のみで人物1,2の前後関係を判定するようにしてもよい。また、人物検出処理におけるHOG特徴量等を用いて現在の処理対象フレームから人物を検出する処理は、ステップS5の処理結果を用いずに行うことが可能であるため、ステップS2〜S5の後に限らず、ステップS2〜S5と並列に行うようにしてもよい。   4, 5, 7, 9, 11 </ b> A, and 11 </ b> B are merely examples of image processing, and some of the processing is changed or omitted depending on the configuration and conditions of the monitoring device 1. May be. For example, the context determination process calculates only the matching ratio M1 between the partial area BR1 ′ in the matching data BR1 for the person 1 and the overlapping area OA of the person area, and only the magnitude relationship between the matching ratio M1 and the threshold Th1. You may make it determine the context of the persons 1 and 2. In addition, the process of detecting a person from the current processing target frame using the HOG feature amount or the like in the person detection process can be performed without using the processing result of step S5, and is therefore limited to steps after steps S2 to S5. Instead, it may be performed in parallel with steps S2 to S5.

また、本実施形態に係る画像処理において、撮像装置2から取得する画像データは、動画像データに限らず、例えば、非常に短い撮像間隔(例えば、0.5秒以下)で撮像された複数の静止画像データであってもよい。   In the image processing according to the present embodiment, the image data acquired from the imaging device 2 is not limited to moving image data, and, for example, a plurality of images captured at a very short imaging interval (for example, 0.5 seconds or less). Still image data may be used.

また、上記の画像処理を行う監視装置1は、例えば、コンピュータと、コンピュータに上記の画像処理を実行させるプログラムとにより実現可能である。以下、監視装置1として動作させることが可能なコンピュータについて、図13を参照して説明する。   The monitoring device 1 that performs the above image processing can be realized by, for example, a computer and a program that causes the computer to execute the above image processing. Hereinafter, a computer that can be operated as the monitoring apparatus 1 will be described with reference to FIG. 13.

図13は、コンピュータのハードウェア構成を示す図である。
図13に示すように、コンピュータ9は、Central Processing Unit(CPU)901と、主記憶装置902と、補助記憶装置903と、Digital Signal Processor(DSP)904と、を備える。また、コンピュータ9は、入力装置905と、表示装置906と、インタフェース装置907と、記憶媒体駆動装置908と、通信装置909と、を更に備える。コンピュータ9におけるこれらの要素901〜909は、バス910により相互に接続されており、要素間でのデータの受け渡しが可能になっている。
FIG. 13 is a diagram illustrating a hardware configuration of a computer.
As illustrated in FIG. 13, the computer 9 includes a central processing unit (CPU) 901, a main storage device 902, an auxiliary storage device 903, and a digital signal processor (DSP) 904. The computer 9 further includes an input device 905, a display device 906, an interface device 907, a storage medium driving device 908, and a communication device 909. These elements 901 to 909 in the computer 9 are connected to each other by a bus 910 so that data can be exchanged between the elements.

CPU 901は、オペレーティングシステムを含む各種のプログラムを実行することによりコンピュータ9の全体の動作を制御する演算処理装置である。   The CPU 901 is an arithmetic processing unit that controls the overall operation of the computer 9 by executing various programs including an operating system.

主記憶装置902は、Read Only Memory(ROM)及びRandom Access Memory(RAM)を含む。ROMには、例えばコンピュータ9の起動時にCPU 901が読み出す所定の基本制御プログラム等が予め記録されている。また、RAMは、CPU 901が各種のプログラムを実行する際に、必要に応じて作業用記憶領域として使用する。   The main storage device 902 includes a read only memory (ROM) and a random access memory (RAM). In the ROM, for example, a predetermined basic control program read by the CPU 901 when the computer 9 is activated is recorded in advance. The RAM is used as a working storage area as needed when the CPU 901 executes various programs.

補助記憶装置903は、Hard Disk Drive(HDD)やSolid State Drive(SSD)等の主記憶装置902に比べて大容量の記憶装置である。補助記憶装置903には、CPU 901によって実行される各種のプログラムや各種のデータ等を記憶させる。補助記憶装置903に記憶させるプログラムとしては、例えば、図4、図5、図7、図9、図11A及び図11Bに示したような画像処理をコンピュータ9に実行させるプログラムが挙げられる。また、補助記憶装置903に記憶させるデータとしては、例えば、上記のプログラムによる画像処理を行った後の画像データ等が挙げられる。   The auxiliary storage device 903 is a storage device with a larger capacity than the main storage device 902 such as a hard disk drive (HDD) or a solid state drive (SSD). The auxiliary storage device 903 stores various programs executed by the CPU 901, various data, and the like. Examples of the program stored in the auxiliary storage device 903 include a program that causes the computer 9 to execute image processing as shown in FIGS. 4, 5, 7, 9, 11 </ b> A, and 11 </ b> B. Further, as data to be stored in the auxiliary storage device 903, for example, image data after image processing by the above program is performed.

DSP 904は、CPU 901からの制御信号等に従って画像処理における一部の処理等を行う演算処理装置である。   The DSP 904 is an arithmetic processing unit that performs a part of the image processing in accordance with a control signal from the CPU 901 and the like.

入力装置905は、例えばキーボード装置やマウス装置であり、コンピュータ9のオペレータにより操作されると、その操作内容に対応付けられている入力情報をCPU 901に送信する。   The input device 905 is, for example, a keyboard device or a mouse device. When operated by an operator of the computer 9, the input device 905 transmits input information associated with the operation content to the CPU 901.

表示装置906は、例えば液晶ディスプレイである。液晶ディスプレイは、CPU 901等から送信される表示データに従って各種のテキスト、画像等を表示する。   The display device 906 is a liquid crystal display, for example. The liquid crystal display displays various texts, images, and the like according to display data transmitted from the CPU 901 or the like.

インタフェース装置907は、例えば、コンピュータ9を撮像装置2や他の電子機器と接続するための入出力装置である。   The interface device 907 is, for example, an input / output device for connecting the computer 9 to the imaging device 2 and other electronic devices.

記憶媒体駆動装置908は、図示しない可搬型記憶媒体に記録されているプログラムやデータの読み出し、補助記憶装置903に記憶されたデータ等の可搬型記憶媒体への書き込みを行う装置である。可搬型記憶媒体としては、例えば、USB規格のコネクタが備えられているフラッシュメモリが利用可能である。また、可搬型記憶媒体としては、Compact Disk(CD)、Digital Versatile Disc(DVD)、Blu-ray Disc(Blu-rayは登録商標)等の光ディスクも利用可能である。   The storage medium driving device 908 is a device that reads a program and data recorded on a portable storage medium (not shown) and writes data stored in the auxiliary storage device 903 to the portable storage medium. As the portable storage medium, for example, a flash memory equipped with a USB standard connector can be used. Further, as a portable storage medium, an optical disc such as a Compact Disk (CD), a Digital Versatile Disc (DVD), and a Blu-ray Disc (Blu-ray is a registered trademark) can be used.

通信装置909は、インターネット等の通信網10を介してコンピュータ9と他のコンピュータ等とを通信可能に接続する装置である。   The communication device 909 is a device that connects the computer 9 and other computers through the communication network 10 such as the Internet so that they can communicate with each other.

このコンピュータ9は、CPU 901が補助記憶装置903から上述した画像処理を含むプログラムを読み出し、DSP 904、主記憶装置902、補助記憶装置903等と協働して撮像装置2から取得した画像データの画像処理を実行する。この際、CPU 901は、画像処理における演算処理の一部、例えば人物追跡処理や人物検出処理をDSP 904に実行させる。   In the computer 9, the CPU 901 reads out the program including the above-described image processing from the auxiliary storage device 903, and cooperates with the DSP 904, the main storage device 902, the auxiliary storage device 903, and the like to acquire the image data acquired from the imaging device 2. Perform image processing. At this time, the CPU 901 causes the DSP 904 to execute a part of calculation processing in image processing, for example, person tracking processing or person detection processing.

また、コンピュータ9で画像処理を行った後の画像データは、例えば、補助記憶装置903に記憶させておき、必要に応じてコンピュータ9で再生する。また、画像処理後の画像データは、例えば、通信装置909を用い、通信網10を介して他のコンピュータ(例えば管理サーバ)に転送することもできる。また、画像処理後の画像データは、例えば、記憶媒体駆動装置908を用い、光ディスク等に記録して保管することもできる。   Further, the image data after image processing by the computer 9 is stored in, for example, the auxiliary storage device 903 and is reproduced by the computer 9 as necessary. The image data after image processing can also be transferred to another computer (for example, a management server) via the communication network 10 using the communication device 909, for example. Further, the image data after the image processing can be recorded and stored on an optical disk or the like using the storage medium driving device 908, for example.

なお、監視装置1として用いるコンピュータ9は、図13に示した全ての構成要素を含む必要はなく、用途や条件に応じて一部の構成要素を省略することも可能である。例えば、DSP 904を省略し、CPU 901において図4に示した画像処理における全ての演算処理を行う構成であってもよい。また、コンピュータ9は、種々のプログラムを実行することにより複数の機能を実現する汎用型のものに限らず、人物の検出及び追跡に特化した画像処理装置でもよい。   Note that the computer 9 used as the monitoring device 1 does not need to include all the components shown in FIG. 13, and some components can be omitted depending on the application and conditions. For example, the DSP 904 may be omitted, and the CPU 901 may perform all the arithmetic processing in the image processing shown in FIG. The computer 9 is not limited to a general-purpose computer that realizes a plurality of functions by executing various programs, but may be an image processing device specialized for detecting and tracking a person.

以上記載した実施形態に関し、更に以下の付記を開示する。
(付記1)
過去の画像データから検出された人物の位置に基づいて、現在の処理対象の画像データにおける人物の位置を推定し、
推定した前記人物の位置に基づいて複数の人物が前記現在の処理対象の画像データにおいて重なっていると判定した場合に、当該複数の人物の重なり領域を検出するとともに、前記複数の人物のうち前記画像データを撮像した撮像装置に最も近い位置にいる最前の人物の候補を選出し、
選出した前記最前の人物の候補についての照合用データのうち他の人物との重なり領域に対応した領域と、前記現在の処理対象の画像データにおける重なり領域とを照合し、
当該照合の結果に基づいて、前記最前の人物の候補が最前の人物であるか否かを判定する、
処理をコンピュータに実行させる監視プログラム。
(付記2)
選出した前記最前の人物の候補についての照合用データのうち前記他の人物との重なり領域に対応した領域と、前記現在の処理対象の画像データにおける重なり領域との前記照合では、更に、前記他の人物についての照合用データと、前記現在の処理対象の画像データにおける当該他の人物についての人物領域とを照合し、
前記最前の人物の候補が最前の人物であるか否かの判定は、前記最前の人物の候補についての照合結果、前記他の人物についての照合結果、及び前記照合用データのうち照合に用いた領域の大小関係に基づいて行う、
ことを特徴とする付記1に記載の監視プログラム。
(付記3)
前記最前の人物の候補が最前の人物であるか否かの判定結果に基づいて、前記現在の処理対象の画像データにおける人物の位置を特定し、
前記現在の処理対象の画像データにおける人物と前記過去の画像データから検出された人物との関連付けを行い、前記現在の処理対象の画像データにおける前記人物の位置を前記過去の画像データから検出された人物の位置として保持する、
処理を更に前記コンピュータに実行させることを特徴とする付記1に記載の監視プログラム。
(付記4)
前記現在の処理対象の画像データにおける人物の位置の特定では、
前記最前の人物の候補が最前の人物であるか否かの判定結果に基づいて、前記現在の処理対象の画像データにおいて重なっている人物の前後関係を特定した後、
最前の人物に特定された人物については、当該人物の照合用データの全部を用いて前記現在の処理対象の画像データにおける位置を特定し、
最前の人物に特定された前記人物と重なっている他の人物については、当該人物の照合用データのうち前記重なり領域を除く部分領域のみを用いて前記現在の処理対象の画像データにおける位置を特定する、
ことを特徴とする付記3に記載の監視プログラム。
(付記5)
最前の人物に特定された前記人物と重なっている他の人物の照合用データの全体が前記重なり領域に含まれる場合、当該他の人物の前記現在の処理対象の画像データにおける位置は、前記過去の画像データにおける位置から推定した位置に特定する、
ことを特徴とする付記4に記載の監視プログラム。
(付記6)
前記現在の処理対象の画像データから人物を検出し、
検出した前記現在の処理対象の画像データの人物のうち前記過去の画像データから検出された人物と関連付けされた人物を除く全ての人物の位置を、前記過去の画像データから検出された人物の位置に追加する、
処理を更に前記コンピュータに実行させることを特徴とする付記3に記載の監視プログラム。
(付記7)
前記複数の人物が前記現在の処理対象の画像データにおいて重なっていると判定した場合の前記最前の人物の候補の選出は、前記現在の処理対象の画像データにおける前記複数の人物の頭部の位置に基づいて行う、
ことを特徴とする付記1に記載の監視プログラム。
(付記8)
前記撮像装置の光軸が俯角である場合、
前記複数の人物が前記現在の処理対象の画像データにおいて重なっていると判定した場合の前記最前の人物の候補の選出では、前記複数の人物のうち前記現在の処理対象の画像データにおける頭部の位置が最も下方である人物を選出する、
ことを特徴とする付記1に記載の監視プログラム。
(付記9)
撮像装置で撮像した画像データを取得する画像取得部と、
過去の画像データから検出された人物の位置に基づいて、現在の処理対象の画像データにおける人物の位置を推定する位置推定部と、
推定した前記人物の位置に基づいて複数の人物が前記現在の処理対象の画像データにおいて重なっていると判定した場合に、当該複数の人物の重なり領域を検出するとともに、前記複数の人物のうち前記画像データを撮像した撮像装置に最も近い位置にいる最前の人物の候補を選出する重なり領域検出部と、
選出した前記最前の人物の候補についての照合用データのうち他の人物との重なり領域に対応した領域と、前記現在の処理対象の画像データにおける重なり領域とを照合し、当該照合の結果に基づいて、前記最前の人物の候補が最前の人物であるか否かを判定する前後関係判定部と、
を備えることを特徴とする監視装置。
(付記10)
前記前後関係判定部は、
選出した前記最前の人物の候補についての照合用データのうち他の人物との重なり領域に対応した領域と、前記現在の処理対象の画像データにおける重なり領域とを照合するとともに、前記他の人物についての照合用データと、前記現在の処理対象の画像データにおける当該他の人物についての人物領域とを照合し、
前記最前の人物の候補についての照合結果、前記他の人物についての照合結果、及び前記照合用データのうち照合に用いた領域の大小関係に基づいて、当該最前の人物の候補が最前の人物であるか否かを判定する、
ことを特徴とする付記9に記載の監視装置。
(付記11)
当該監視装置は、
前記最前の人物の候補が最前の人物であるか否かの判定結果に基づいて重なっている人物の前後関係を特定するとともに、前記現在の処理対象の画像データにおける人物の位置を特定し、前記現在の処理対象の画像データにおける人物と前記過去の画像データから検出された人物との関連付けを行う人物追跡部、
を更に備えることを特徴とする付記9に記載の監視装置。
(付記12)
前記人物追跡部は、
前記最前の人物の候補が最前の人物であるか否かの判定結果に基づいて最前の人物に特定された人物については、当該人物の照合用データの全部を用いて前記現在の処理対象の画像データにおける位置を特定し、最前の人物に特定された前記人物と重なっている他の人物については、当該人物の照合用データのうち重なり領域を除く部分領域のみを用いて前記現在の処理対象の画像データにおける位置を特定する、
ことを特徴とする付記11に記載の監視装置。
(付記13)
当該監視装置は、
前記現在の処理対象の画像データから人物を検出し、検出した前記現在の処理対象の画像データの人物のうち前記過去の画像データから検出された人物と関連付けされた人物を除く全ての人物を、前記過去の画像データから検出された人物に追加する人物検出部、
を更に備えることを特徴とする付記11に記載の監視装置。
(付記14)
コンピュータが、
過去の画像データから検出された人物の位置に基づいて、現在の処理対象の画像データにおける人物の位置を推定し、
推定した前記人物の位置に基づいて複数の人物が重なっていると判定した場合に、当該複数の人物の重なり領域を検出するとともに、前記複数の人物のうち前記画像データを撮像した撮像装置に最も近い位置にいる最前の人物の候補を選出し、
選出した前記最前の人物の候補についての照合用データのうち他の人物との重なり領域に対応した領域と、前記現在の処理対象の画像データにおける重なり領域とを照合し、
当該照合の結果に基づいて、前記最前の人物の候補が最前の人物であるか否かを判定する、
処理を実行することを特徴とする監視方法。
(付記15)
選出した前記最前の人物の候補についての照合用データのうち前記他の人物との重なり領域に対応した領域と、前記現在の処理対象の画像データにおける重なり領域との照合では、前記他の人物についての照合用データと、前記現在の処理対象の画像データにおける当該他の人物についての人物領域との照合も行い、
前記最前の人物の候補が最前の人物であるか否かの判定は、前記最前の人物の候補についての照合結果、前記他の人物についての照合結果、及び前記照合用データのうち照合に用いた領域の大小関係に基づいて行う、
ことを特徴とする付記14に記載の監視方法。
(付記16)
前記コンピュータが、
前記最前の人物の候補が最前の人物であるか否かの判定結果に基づいて、前記現在の処理対象の画像データにおける人物の位置を特定し、
前記現在の処理対象の画像データにおける人物と前記過去の画像データから検出された人物との関連付けを行い、前記現在の処理対象の画像データにおける前記人物の位置を前記過去の画像データから検出された人物の位置として保持する、
処理を更に実行することを特徴とする付記14に記載の監視方法。
(付記17)
前記現在の画像データにおける人物の位置の特定では、
前記最前の人物の候補が最前の人物であるか否かの判定結果に基づいて、前記現在の処理対象の画像データにおいて重なっている人物の前後関係を特定した後、
最前の人物に特定された人物については、当該人物の照合用データの全部を用いて前記現在の処理対象の画像データにおける位置を特定し、
最前の人物に特定された前記人物と重なっている他の人物については、当該人物の照合用データのうち重なり領域を除く部分領域のみを用いて前記現在の処理対象の画像データにおける位置を特定する、
ことを特徴とする付記16に記載の監視方法。
(付記18)
前記コンピュータが、
前記現在の処理対象の画像データから人物を検出し、
検出した前記現在の処理対象の画像データの人物のうち前記過去の画像データから検出された人物と関連付けされた人物を除く全ての人物の位置を、前記過去の画像データから検出された人物の位置に追加する、
処理を更に実行することを特徴とする付記16に記載の監視方法。
(付記19)
前記複数の人物が前記現在の処理対象の画像データにおいて重なっていると判定した場合の前記最前の人物の候補の選出は、前記現在の処理対象の画像データにおける前記複数の人物の頭部の位置に基づいて行う、
ことを特徴とする付記14に記載の監視方法。
(付記20)
前記撮像装置の光軸が俯角である場合、
前記複数の人物が前記現在の処理対象の画像データにおいて重なっていると判定した場合の前記最前の人物の候補の選出では、前記複数の人物のうち前記現在の処理対象の画像データにおける頭部の位置が最も下方である人物を選出する、
ことを特徴とする付記14に記載の監視方法。
The following additional notes are disclosed with respect to the embodiment described above.
(Appendix 1)
Based on the position of the person detected from the past image data, the position of the person in the current image data to be processed is estimated,
When it is determined that a plurality of persons overlap in the current image data to be processed based on the estimated positions of the persons, an overlapping area of the plurality of persons is detected, and the plurality of persons Select the foremost person candidate who is closest to the imaging device that captured the image data,
Collating the area corresponding to the overlapping area with the other person in the matching data for the selected candidate for the earliest person and the overlapping area in the current image data to be processed;
Based on the result of the comparison, it is determined whether the candidate for the foremost person is the foremost person,
A monitoring program that causes a computer to execute processing.
(Appendix 2)
In the collation between the area corresponding to the overlap area with the other person in the collation data for the selected candidate for the earliest person and the overlap area in the current image data to be processed, the other The verification data for the person and the person area for the other person in the current processing target image data,
The determination as to whether or not the foremost person candidate is the foremost person was used for collation among the collation result for the foremost person candidate, the collation result for the other person, and the collation data. Based on the size relationship of the area,
The monitoring program according to supplementary note 1, characterized by:
(Appendix 3)
Based on the determination result of whether the foremost person candidate is the foremost person, the position of the person in the current image data to be processed is specified,
The person in the current processing target image data is associated with the person detected from the past image data, and the position of the person in the current processing target image data is detected from the past image data Keep it as the position of the person,
The monitoring program according to claim 1, further causing the computer to execute processing.
(Appendix 4)
In specifying the position of a person in the current image data to be processed,
Based on the determination result of whether or not the foremost person candidate is the foremost person, after identifying the context of overlapping persons in the current processing target image data,
For the person specified as the foremost person, the position in the current image data to be processed is specified using all the matching data of the person,
For the other person who overlaps the person specified as the foremost person, the position in the current image data to be processed is specified using only the partial area of the person's verification data excluding the overlapping area. To
The monitoring program according to supplementary note 3, characterized by:
(Appendix 5)
When the entire matching data of another person overlapping the person specified as the foremost person is included in the overlapping area, the position of the other person in the current image data to be processed is the past Specify the position estimated from the position in the image data of
The monitoring program according to supplementary note 4, characterized in that:
(Appendix 6)
Detecting a person from the current image data to be processed;
The positions of all persons other than the persons associated with the persons detected from the past image data among the detected persons of the current image data to be processed are the positions of the persons detected from the past image data. To add to the
The monitoring program according to claim 3, further causing the computer to execute processing.
(Appendix 7)
The selection of the forefront person candidate when it is determined that the plurality of persons overlap in the current processing target image data is the position of the heads of the plurality of persons in the current processing target image data. Based on
The monitoring program according to supplementary note 1, characterized by:
(Appendix 8)
When the optical axis of the imaging device is a depression angle,
In selecting the foremost person candidate when it is determined that the plurality of persons overlap in the current processing target image data, the head of the current processing target image data among the plurality of persons is selected. Select the person with the lowest position,
The monitoring program according to supplementary note 1, characterized by:
(Appendix 9)
An image acquisition unit for acquiring image data captured by the imaging device;
A position estimation unit that estimates the position of the person in the current image data to be processed based on the position of the person detected from the past image data;
When it is determined that a plurality of persons overlap in the current image data to be processed based on the estimated positions of the persons, an overlapping area of the plurality of persons is detected, and the plurality of persons An overlapping area detection unit for selecting a candidate for the forefront person who is closest to the imaging device that captured the image data;
Based on the result of the collation, the area corresponding to the overlap area with the other person in the collation data for the selected candidate for the earliest person is collated with the overlap area in the current image data to be processed. A context determination unit for determining whether the foremost person candidate is the foremost person;
A monitoring device comprising:
(Appendix 10)
The context determining unit
Of the collation data for the selected candidate for the earliest person, the area corresponding to the overlapping area with the other person is compared with the overlapping area in the current image data to be processed, and the other person Are compared with the person area for the other person in the current image data to be processed,
Based on the collation result for the foremost person candidate, the collation result for the other person, and the size relationship of the areas used for collation in the collation data, the foremost person candidate is the foremost person. Determine if there is,
The monitoring apparatus according to appendix 9, characterized by:
(Appendix 11)
The monitoring device
Specifying the front-to-back relationship of overlapping persons based on the determination result of whether or not the foremost person candidate is the foremost person, and specifying the position of the person in the current image data to be processed, A person tracking unit for associating a person in the current image data to be processed with a person detected from the past image data;
The monitoring apparatus according to appendix 9, further comprising:
(Appendix 12)
The person tracking unit
For the person identified as the foremost person based on the determination result of whether or not the foremost person candidate is the foremost person, the current processing target image is used by using all of the matching data of the person. For the other person who identifies the position in the data and overlaps with the person specified as the foremost person, only the partial area excluding the overlapping area in the matching data of the person is used for the current processing target. Identify the location in the image data,
The monitoring apparatus according to appendix 11, characterized by:
(Appendix 13)
The monitoring device
A person is detected from the current image data to be processed, and all persons other than the person associated with the person detected from the past image data among the detected persons of the current image data to be processed are A person detection unit for adding to a person detected from the past image data;
The monitoring apparatus according to appendix 11, further comprising:
(Appendix 14)
Computer
Based on the position of the person detected from the past image data, the position of the person in the current image data to be processed is estimated,
When it is determined that a plurality of persons are overlapped based on the estimated position of the person, the overlapping area of the plurality of persons is detected, and among the plurality of persons, the imaging device that captured the image data is the most Select the candidate for the person who is closest to you
Collating the area corresponding to the overlapping area with the other person in the matching data for the selected candidate for the earliest person and the overlapping area in the current image data to be processed;
Based on the result of the comparison, it is determined whether the candidate for the foremost person is the foremost person,
A monitoring method characterized by executing processing.
(Appendix 15)
In the collation of the area corresponding to the overlap area with the other person in the collation data for the selected candidate for the earliest person and the overlap area in the current image data to be processed, the other person The matching data and the person area for the other person in the current image data to be processed
The determination as to whether or not the foremost person candidate is the foremost person was used for collation among the collation result for the foremost person candidate, the collation result for the other person, and the collation data. Based on the size relationship of the area,
15. The monitoring method according to appendix 14, wherein
(Appendix 16)
The computer is
Based on the determination result of whether the foremost person candidate is the foremost person, the position of the person in the current image data to be processed is specified,
The person in the current processing target image data is associated with the person detected from the past image data, and the position of the person in the current processing target image data is detected from the past image data Keep it as the position of the person,
15. The monitoring method according to appendix 14, wherein the process is further executed.
(Appendix 17)
In specifying the position of a person in the current image data,
Based on the determination result of whether or not the foremost person candidate is the foremost person, after identifying the context of overlapping persons in the current processing target image data,
For the person specified as the foremost person, the position in the current image data to be processed is specified using all the matching data of the person,
For other persons overlapping with the person specified as the foremost person, the position in the current image data to be processed is specified using only the partial area excluding the overlapping area of the person's verification data. ,
The monitoring method according to supplementary note 16, characterized by:
(Appendix 18)
The computer is
Detecting a person from the current image data to be processed;
The positions of all the persons other than the person associated with the person detected from the past image data among the persons of the detected current image data to be processed are the positions of the persons detected from the past image data. To add to the
The monitoring method according to appendix 16, wherein the process is further executed.
(Appendix 19)
The selection of the forefront person candidate when it is determined that the plurality of persons overlap in the current processing target image data is the position of the heads of the plurality of persons in the current processing target image data. Based on
15. The monitoring method according to appendix 14, wherein
(Appendix 20)
When the optical axis of the imaging device is a depression angle,
In selecting the foremost person candidate when it is determined that the plurality of persons overlap in the current processing target image data, the head of the current processing target image data among the plurality of persons is selected. Select the person with the lowest position,
15. The monitoring method according to appendix 14, wherein

1 監視装置
100 画像取得部
101 人物位置推定部
102 重なり領域検出部
103 前後関係判定部
104 人物追跡部
105 人物検出部
106 画像出力部
107 記憶部
2 撮像装置
3 表示装置
5 地面
6A〜6J 人物
700,701,710〜715 画像(フレーム)
9 コンピュータ
901 CPU
902 主記憶装置
903 補助記憶装置
904 DSP
905 入力装置
906 表示装置
907 インタフェース装置
908 記憶媒体駆動装置
909 通信装置
910 バス
10 通信網
DESCRIPTION OF SYMBOLS 1 Monitoring apparatus 100 Image acquisition part 101 Person position estimation part 102 Overlapping area | region detection part 103 Front-rear relationship determination part 104 Person tracking part 105 Person detection part 106 Image output part 107 Memory | storage part 2 Imaging device 3 Display apparatus 5 Ground 6A-6J Person 700 , 701, 710-715 Image (frame)
9 Computer 901 CPU
902 Main storage device 903 Auxiliary storage device 904 DSP
905 Input device 906 Display device 907 Interface device 908 Storage medium drive device 909 Communication device 910 Bus 10 Communication network

Claims (9)

過去の画像データから検出された人物の位置に基づいて、現在の処理対象の画像データにおける人物の位置を推定し、
推定した前記人物の位置に基づいて複数の人物が前記現在の処理対象の画像データにおいて重なっていると判定した場合に、当該複数の人物の重なり領域を検出するとともに、前記複数の人物のうち前記画像データを撮像した撮像装置に最も近い位置にいる最前の人物の候補を選出し、
選出した前記最前の人物の候補についての照合用データのうち他の人物との重なり領域に対応した領域と、前記現在の処理対象の画像データにおける重なり領域とを照合し、
当該照合の結果に基づいて、前記最前の人物の候補が最前の人物であるか否かを判定する、
処理をコンピュータに実行させる監視プログラム。
Based on the position of the person detected from the past image data, the position of the person in the current image data to be processed is estimated,
When it is determined that a plurality of persons overlap in the current image data to be processed based on the estimated positions of the persons, an overlapping area of the plurality of persons is detected, and the plurality of persons Select the foremost person candidate who is closest to the imaging device that captured the image data,
Collating the area corresponding to the overlapping area with the other person in the matching data for the selected candidate for the earliest person and the overlapping area in the current image data to be processed;
Based on the result of the comparison, it is determined whether the candidate for the foremost person is the foremost person,
A monitoring program that causes a computer to execute processing.
選出した前記最前の人物の候補についての照合用データのうち前記他の人物との重なり領域に対応した領域と、前記現在の処理対象の画像データにおける重なり領域との前記照合では、更に、前記他の人物についての照合用データと、前記現在の処理対象の画像データにおける当該他の人物についての人物領域とを照合し、
前記最前の人物の候補が最前の人物であるか否かの判定は、前記最前の人物の候補についての照合結果、前記他の人物についての照合結果、及び、前記現在の処理対象の画像データにおける前記重なり領域と前記現在の処理対象の画像データにおける前記他の人物についての人物領域とが同じ位置に存在するか否かに基づいて行う、
ことを特徴とする請求項1に記載の監視プログラム。
In the collation between the area corresponding to the overlap area with the other person in the collation data for the selected candidate for the earliest person and the overlap area in the current image data to be processed, the other The verification data for the person and the person area for the other person in the current processing target image data,
The determination as to whether or not the foremost person candidate is the foremost person is based on the collation result for the foremost person candidate, the collation result for the other person, and the current image data to be processed. Based on whether the overlap area and the person area for the other person in the current image data to be processed exist at the same position ,
The monitoring program according to claim 1.
前記最前の人物の候補が最前の人物であるか否かの判定結果に基づいて、前記現在の処理対象の画像データにおける人物の位置を特定し、
前記現在の処理対象の画像データにおける人物と前記過去の画像データから検出された人物との関連付けを行い、前記現在の処理対象の画像データにおける前記人物の位置を前記過去の画像データから検出された人物の位置として保持する、
処理を更に前記コンピュータに実行させることを特徴とする請求項1に記載の監視プログラム。
Based on the determination result of whether the foremost person candidate is the foremost person, the position of the person in the current image data to be processed is specified,
The person in the current processing target image data is associated with the person detected from the past image data, and the position of the person in the current processing target image data is detected from the past image data Keep it as the position of the person,
The monitoring program according to claim 1, further causing the computer to execute processing.
前記現在の処理対象の画像データにおける人物の位置の特定では、
前記最前の人物の候補が最前の人物であるか否かの判定結果に基づいて、前記現在の処理対象の画像データにおいて重なっている人物の前後関係を特定した後、
最前の人物に特定された人物については、当該人物の照合用データの全部を用いて前記現在の処理対象の画像データにおける位置を特定し、
最前の人物に特定された前記人物と重なっている他の人物については、当該人物の照合用データのうち前記重なり領域を除く部分領域のみを用いて前記現在の処理対象の画像データにおける位置を特定する、
ことを特徴とする請求項3に記載の監視プログラム。
In specifying the position of a person in the current image data to be processed,
Based on the determination result of whether or not the foremost person candidate is the foremost person, after identifying the context of overlapping persons in the current processing target image data,
For the person specified as the foremost person, the position in the current image data to be processed is specified using all the matching data of the person,
For the other person who overlaps the person specified as the foremost person, the position in the current image data to be processed is specified using only the partial area of the person's verification data excluding the overlapping area. To
The monitoring program according to claim 3.
前記現在の処理対象の画像データから人物を検出し、
検出した前記現在の処理対象の画像データの人物のうち前記過去の画像データから検出された人物と関連付けされた人物を除く全ての人物の位置を、前記過去の画像データから検出された人物の位置に追加する、
処理を更に前記コンピュータに実行させることを特徴とする請求項3に記載の監視プログラム。
Detecting a person from the current image data to be processed;
The positions of all persons other than the persons associated with the persons detected from the past image data among the detected persons of the current image data to be processed are the positions of the persons detected from the past image data. To add to the
The monitoring program according to claim 3, further causing the computer to execute processing.
前記複数の人物が前記現在の処理対象の画像データにおいて重なっていると判定した場合の前記最前の人物の候補の選出は、前記現在の処理対象の画像データにおける前記複数の人物の頭部の位置に基づいて行う、
ことを特徴とする請求項1に記載の監視プログラム。
The selection of the forefront person candidate when it is determined that the plurality of persons overlap in the current processing target image data is the position of the heads of the plurality of persons in the current processing target image data. Based on
The monitoring program according to claim 1.
前記撮像装置の光軸が俯角である場合、
前記複数の人物が前記現在の処理対象の画像データにおいて重なっていると判定した場合の前記最前の人物の候補の選出では、前記複数の人物のうち前記現在の処理対象の画像データにおける頭部の位置が最も下方である人物を選出する、
ことを特徴とする請求項1に記載の監視プログラム。
When the optical axis of the imaging device is a depression angle,
In selecting the foremost person candidate when it is determined that the plurality of persons overlap in the current processing target image data, the head of the current processing target image data among the plurality of persons is selected. Select the person with the lowest position,
The monitoring program according to claim 1.
撮像装置で撮像した画像データを取得する画像取得部と、
過去の画像データから検出された人物の位置に基づいて、現在の処理対象の画像データにおける人物の位置を推定する位置推定部と、
推定した前記人物の位置に基づいて複数の人物が前記現在の処理対象の画像データにおいて重なっていると判定した場合に、当該複数の人物の重なり領域を検出するとともに、前記複数の人物のうち前記画像データを撮像した撮像装置に最も近い位置にいる最前の人物の候補を選出する重なり領域検出部と、
選出した前記最前の人物の候補についての照合用データのうち他の人物との重なり領域に対応した領域と、前記現在の処理対象の画像データにおける重なり領域とを照合し、当該照合の結果に基づいて、前記最前の人物の候補が最前の人物であるか否かを判定する前後関係判定部と、
を備えることを特徴とする監視装置。
An image acquisition unit for acquiring image data captured by the imaging device;
A position estimation unit that estimates the position of the person in the current image data to be processed based on the position of the person detected from the past image data;
When it is determined that a plurality of persons overlap in the current image data to be processed based on the estimated positions of the persons, an overlapping area of the plurality of persons is detected, and the plurality of persons An overlapping area detection unit for selecting a candidate for the forefront person who is closest to the imaging device that captured the image data;
Based on the result of the collation, the area corresponding to the overlap area with the other person in the collation data for the selected candidate for the earliest person is collated with the overlap area in the current image data to be processed. A context determination unit for determining whether the foremost person candidate is the foremost person;
A monitoring device comprising:
コンピュータが、
過去の画像データから検出された人物の位置に基づいて、現在の処理対象の画像データにおける人物の位置を推定し、
推定した前記人物の位置に基づいて複数の人物が重なっていると判定した場合に、当該複数の人物の重なり領域を検出するとともに、前記複数の人物のうち前記画像データを撮像した撮像装置に最も近い位置にいる最前の人物の候補を選出し、
選出した前記最前の人物の候補についての照合用データのうち他の人物との重なり領域に対応した領域と、前記現在の処理対象の画像データにおける重なり領域とを照合し、
当該照合の結果に基づいて、前記最前の人物の候補が最前の人物であるか否かを判定する、
処理を実行することを特徴とする監視方法。
Computer
Based on the position of the person detected from the past image data, the position of the person in the current image data to be processed is estimated,
When it is determined that a plurality of persons are overlapped based on the estimated position of the person, the overlapping area of the plurality of persons is detected, and among the plurality of persons, the imaging device that captured the image data is the most Select the candidate for the person who is closest to you
Collating the area corresponding to the overlapping area with the other person in the matching data for the selected candidate for the earliest person and the overlapping area in the current image data to be processed;
Based on the result of the comparison, it is determined whether the candidate for the foremost person is the foremost person,
A monitoring method characterized by executing processing.
JP2015142845A 2015-07-17 2015-07-17 Monitoring program, monitoring apparatus, and monitoring method Active JP6620443B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015142845A JP6620443B2 (en) 2015-07-17 2015-07-17 Monitoring program, monitoring apparatus, and monitoring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015142845A JP6620443B2 (en) 2015-07-17 2015-07-17 Monitoring program, monitoring apparatus, and monitoring method

Publications (2)

Publication Number Publication Date
JP2017027197A JP2017027197A (en) 2017-02-02
JP6620443B2 true JP6620443B2 (en) 2019-12-18

Family

ID=57946726

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015142845A Active JP6620443B2 (en) 2015-07-17 2015-07-17 Monitoring program, monitoring apparatus, and monitoring method

Country Status (1)

Country Link
JP (1) JP6620443B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11538260B2 (en) 2018-03-30 2022-12-27 Nec Solution Innovators, Ltd. Object identification apparatus, object identification method, and nontransitory computer readable medium storing control program
US11645763B2 (en) * 2018-10-31 2023-05-09 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
JP7248345B2 (en) * 2019-03-11 2023-03-29 Necソリューションイノベータ株式会社 Image processing device, image processing method and program
JP7326965B2 (en) * 2019-07-29 2023-08-16 富士通株式会社 Image processing device, image processing program, and image processing method
JP6891984B1 (en) * 2020-01-22 2021-06-18 沖電気工業株式会社 Object detection device, object detection method, program and recording medium
JP7491260B2 (en) 2021-04-26 2024-05-28 トヨタ自動車株式会社 Person detection device, person detection method and computer program for detecting persons

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4467838B2 (en) * 2001-06-15 2010-05-26 パナソニック株式会社 Image recognition apparatus and image recognition method
JP2014093023A (en) * 2012-11-06 2014-05-19 Canon Inc Object detection device, object detection method and program

Also Published As

Publication number Publication date
JP2017027197A (en) 2017-02-02

Similar Documents

Publication Publication Date Title
JP6620443B2 (en) Monitoring program, monitoring apparatus, and monitoring method
US10373380B2 (en) 3-dimensional scene analysis for augmented reality operations
Dong et al. A non-target structural displacement measurement method using advanced feature matching strategy
US10331962B2 (en) Detecting device, detecting method, and program
KR102214934B1 (en) Stereo matching apparatus and method using unary confidences learning and pairwise confidences learning
CN108198044B (en) Commodity information display method, commodity information display device, commodity information display medium and electronic equipment
Zhou et al. Moving object detection and segmentation in urban environments from a moving platform
EP3239931A1 (en) Image processing apparatus and image processing method
JP6221390B2 (en) Image processing apparatus, program, and image processing method
KR102584527B1 (en) Method and Apparatus for counting the number of person
JP2010204805A (en) Periphery-monitoring device and method
JP2017083980A (en) Behavior automatic analyzer and system and method
JP2015055875A (en) Determining source lane of moving item merging into destination lane
JP2013206458A (en) Object classification based on external appearance and context in image
JP6361313B2 (en) Vehicle detection method and apparatus
JP5396585B2 (en) Feature identification method
JP4836065B2 (en) Edge tracking method and computer program therefor
JP6163732B2 (en) Image processing apparatus, program, and method
US9413477B2 (en) Screen detector
JP6828445B2 (en) Object tracking program, object tracking method and object tracking device
KR20170093421A (en) Method for determining object of interest, video processing device and computing device
JP2011090708A (en) Apparatus and method for detecting the number of objects
Chen et al. 3-d mediated detection and tracking in wide area aerial surveillance
JP7040627B2 (en) Calculator, information processing method and program
US12033406B2 (en) Method and device for identifying presence of three-dimensional objects using images

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180413

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190319

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190509

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191105

R150 Certificate of patent or registration of utility model

Ref document number: 6620443

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150