JP2009038777A - Automatic tracking apparatus - Google Patents

Automatic tracking apparatus Download PDF

Info

Publication number
JP2009038777A
JP2009038777A JP2007203718A JP2007203718A JP2009038777A JP 2009038777 A JP2009038777 A JP 2009038777A JP 2007203718 A JP2007203718 A JP 2007203718A JP 2007203718 A JP2007203718 A JP 2007203718A JP 2009038777 A JP2009038777 A JP 2009038777A
Authority
JP
Japan
Prior art keywords
tracking
tracking target
camera
mode
processing unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2007203718A
Other languages
Japanese (ja)
Other versions
JP5018321B2 (en
Inventor
Heihigashi Zen
へい東 全
Toshikage Sen
敏景 千
Soichi Sudo
聡一 須藤
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.)
Chiba University NUC
Koito Industries Ltd
Original Assignee
Chiba University NUC
Koito Industries 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 Chiba University NUC, Koito Industries Ltd filed Critical Chiba University NUC
Priority to JP2007203718A priority Critical patent/JP5018321B2/en
Publication of JP2009038777A publication Critical patent/JP2009038777A/en
Application granted granted Critical
Publication of JP5018321B2 publication Critical patent/JP5018321B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To more accurately track and image a tracking object. <P>SOLUTION: An automatic tracking apparatus includes a camera 1 capable of controlling panning, tilting and zooming; and a processing section 2. The processing section 2 includes a tracking processing means which performs tracking processing to track a tracking object on the basis of an image imaged by the camera 1, and a control means for controlling panning, tilting and zooming of the camera 1 so that the camera 1 tracks the tracking object in accordance with the result of the tracking processing by the tracking processing means. The tracking processing means includes a preliminary processing means for selecting, in the beginning of tracking start of the tracking object, either a single-part mode during which tracking processing is performed using a featured value obtained from an entire tracking object area that is an area corresponding to the tracking object, or a multi-part mode during which tracking processing is performed using featured values obtained from respective divided areas of the tracking object area; and a main processing means for performing tracking processing in the mode selected by the preliminary processing means. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、パン、チルト及びズームの制御が可能なカメラを用いて、追尾対象を自動追尾して撮像する自動追尾装置に関するものである。   The present invention relates to an automatic tracking device that automatically tracks and images a tracking target using a camera capable of controlling pan, tilt, and zoom.

従来から、このような自動追尾装置として、例えば、下記特許文献1に開示されている自動追尾装置が提案されている。この自動追尾装置は、テレビジョンカメラからの映像信号を入力すると共に映像信号を表示部に出力する画像入出力部と、画像入出力部よりの映像信号の前処理を行う画像処理部と、画像処理部を介し入力される参照画像データおよび探索画像データの相関値を求め探索画像上で最も相関性の高い位置を検出する相関演算部と、相関演算部よりの信号に基づいて前記テレビジョンカメラの旋回装置およびズームレンズを駆動制御すると共に前記各部を制御する中央演算処理部とからなるものである。
特開平11−187387号公報
Conventionally, as such an automatic tracking device, for example, an automatic tracking device disclosed in Patent Document 1 below has been proposed. The automatic tracking device includes an image input / output unit that inputs a video signal from a television camera and outputs the video signal to a display unit, an image processing unit that performs preprocessing of the video signal from the image input / output unit, and an image A correlation calculation unit that obtains a correlation value between the reference image data and the search image data input via the processing unit and detects a position having the highest correlation on the search image, and the television camera based on a signal from the correlation calculation unit And a central processing unit for controlling each of the above-mentioned parts as well as driving and controlling the swivel device and the zoom lens.
JP-A-11-187387

しかしながら、前記従来の自動追尾装置では、相関演算を用いて追尾対象の位置を求めているので、追尾対象の大きさや形状の変化に弱く、オクルージョン(隠蔽)の影響やカメラ制御による画像変動の影響も受け易く、このため、追尾対象を精度良く追尾することができなかった。   However, in the conventional automatic tracking device, since the position of the tracking target is obtained using the correlation calculation, it is weak against changes in the size and shape of the tracking target, the influence of occlusion (concealment) and the influence of image fluctuation due to camera control. Therefore, the tracking target cannot be tracked with high accuracy.

本発明は、このような事情に鑑みてなされたもので、追尾対象をより精度良く追尾して撮像することができる自動追尾装置を提供することを目的とする。   The present invention has been made in view of such circumstances, and an object of the present invention is to provide an automatic tracking device that can track and image a tracking target with higher accuracy.

前記課題を解決するため、本発明の第1の態様による自動追尾装置は、パン、チルト及びズームの制御が可能なカメラと、前記カメラにより撮像された画像を処理して、前記カメラが追尾対象を自動追尾して撮像するように前記カメラを制御する処理手段と、を備えたものである。前記処理手段は、前記カメラにより撮像された画像に基づいて追尾対象を追跡する追跡処理を行う追跡処理手段と、該追跡処理手段による前記追跡処理の結果に応じて前記カメラが前記追尾対象を追尾するように、前記カメラのパン、チルト及びズームを制御する制御手段と、を含む。前記追跡処理手段は、前記カメラにより撮像された画像に基づいて、前記追尾対象の追跡開始当初に、前記追尾対象に応じた領域である追尾対象領域の全体の領域から得た特徴量であるシングルパート特徴量を用いて追跡処理を行うシングルパートモードとするかそれとも前記追尾対象領域の分割された各領域からそれぞれ得た特徴量であるマルチパート特徴量を用いて追跡処理を行うマルチパートモードとするかを選択する予備処理手段と、前記予備処理手段により選択されたモードで追跡処理を行う本処理手段とを含む。   In order to solve the above-described problem, an automatic tracking device according to a first aspect of the present invention includes a camera capable of controlling pan, tilt, and zoom, and an image captured by the camera. And processing means for controlling the camera so as to automatically track the image and capture the image. The processing means performs tracking processing for tracking a tracking target based on an image captured by the camera, and the camera tracks the tracking target according to a result of the tracking processing by the tracking processing means. Control means for controlling pan, tilt and zoom of the camera. The tracking processing means is a single feature amount obtained from an entire area of the tracking target area, which is an area corresponding to the tracking target, at the beginning of tracking of the tracking target based on an image captured by the camera. A single part mode for performing tracking processing using part feature amounts, or a multi-part mode for performing tracking processing using multi-part feature amounts, which are feature amounts respectively obtained from the divided regions of the tracking target region, and Pre-processing means for selecting whether to perform, and main processing means for performing tracking processing in the mode selected by the pre-processing means.

この第1の態様によれば、前記カメラにより撮像された画像に基づいてシングルパートモードとマルチパートモードとを選択する前記予備処理手段が採用され、前記予備処理手段により選択されたモードで追跡処理が行われるので、常にシングルパートモードを行う場合に比べて、より多くの情報に基づいて追跡処理が行われるので、例えば人物同士の区別や人物と背景の区別が困難な追尾対象に対してもより精度良く追跡処理を行うことができ、ひいては、追尾対象をより精度良く追尾して撮像することができる。   According to the first aspect, the preliminary processing means for selecting a single part mode and a multipart mode based on an image captured by the camera is employed, and the tracking process is performed in the mode selected by the preliminary processing means. Since tracking processing is performed based on more information than in the case of always performing the single part mode, for example, even for tracking targets where it is difficult to distinguish between persons or between a person and a background. The tracking process can be performed with higher accuracy, and as a result, the tracking target can be tracked with higher accuracy and imaged.

本発明の第2の態様による自動追尾装置は、前記第1の態様において、前記特徴量がヒストグラムであるものである。この第2の態様によれば、ヒストグラムが使用されているので、追尾対象の大きさや形状の変化に強くなり、カメラの制御による画像変動に影響を受け難くなる。もっとも、本発明では特徴量はこの例に限定されるものではない。   An automatic tracking device according to a second aspect of the present invention is the automatic tracking device according to the first aspect, wherein the feature amount is a histogram. According to the second aspect, since the histogram is used, it is resistant to changes in the size and shape of the tracking target, and is less susceptible to image fluctuations due to camera control. However, the feature amount is not limited to this example in the present invention.

本発明の第3の態様による自動追尾装置は、前記第1の態様において、前記特徴量は、所定色空間におけるヒストグラムに基づくヒストグラムであるものである。この第3の態様は、前記特徴量の例を挙げたものであるが、本発明では特徴量はこの例に限定されるものではない。例えば、前記所定色空間としては、下記の第4の態様で挙げたCIE1976L色空間の他、均等色空間(L、a、b空間)、RGB色空間、CMYK色空間、YUV空間、XYZ空間などの様々な色空間でもよい。 In the automatic tracking device according to a third aspect of the present invention, in the first aspect, the feature amount is a histogram based on a histogram in a predetermined color space. In the third aspect, the example of the feature amount is given, but the feature amount is not limited to this example in the present invention. For example, as the predetermined color space, in addition to the CIE 1976 L * u * v * color space mentioned in the fourth embodiment below, a uniform color space (L * , a * , b * space), RGB color space, CMYK color Various color spaces such as a space, a YUV space, and an XYZ space may be used.

本発明の第4の態様による自動追尾装置は、前記第3の態様において、前記特徴量は、CIE1976L色空間における明度指数ヒストグラム及び知覚色度指数ヒストグラムをそれぞれ正規化したものを結合して1次元化して得たヒストグラムであるものである。この第4の態様は、前記特徴量の例を挙げたものであるが、本発明では特徴量はこの例に限定されるものではない。 The automatic tracking device according to a fourth aspect of the present invention is the automatic tracking device according to the third aspect, wherein the feature amount is obtained by normalizing a lightness index histogram and a perceptual chromaticity index histogram in a CIE1976L * u * v * color space. It is a histogram obtained by combining and making it one-dimensional. The fourth aspect is an example of the feature amount, but the feature amount is not limited to this example in the present invention.

本発明の第5の態様による自動追尾装置は、前記第1乃至第4のいずれかの態様において、前記予備処理手段は、前記カメラにより撮像された画像に基づいて、前記追尾対象の追跡開始当初の前記追尾対象領域の前記分割された前記各領域の前記特徴量同士の類似度を示す指標に従って、前記各領域の前記特徴量同士の類似度が所定以上に高い場合には前記シングルパートモードを選択し、前記各領域の前記特徴量同士の類似度が所定以下に低い場合には前記マルチパートモードを選択するものである。この第5の態様は、シングルパートモードとマルチパートモードとの選択の具体例を挙げたものであるが、本発明では必ずしもこの例に限定されるものではない。   The automatic tracking device according to a fifth aspect of the present invention is the automatic tracking device according to any one of the first to fourth aspects, wherein the preliminary processing means is based on an image captured by the camera at the beginning of tracking of the tracking target. When the similarity between the feature quantities of the regions is higher than a predetermined level according to an index indicating the similarity between the feature quantities of the divided regions of the tracking target region, the single part mode is selected. The multipart mode is selected when the similarity between the feature quantities in the respective regions is low below a predetermined level. The fifth aspect is a specific example of selection between the single-part mode and the multi-part mode, but the present invention is not necessarily limited to this example.

本発明の第6の態様による自動追尾装置は、前記第5の態様において、前記指標は、前記分割された前記各領域の前記特徴量同士の間のBhattacharyya距離であるものである。この第6の態様は、類似度を示す指標の具体例を挙げたものであるが、前記第5の態様ではこの例に限定されるものではない。   The automatic tracking device according to a sixth aspect of the present invention is the automatic tracking apparatus according to the fifth aspect, wherein the index is a Bhattacharyya distance between the feature quantities of the divided regions. In the sixth aspect, a specific example of an index indicating the degree of similarity is given. However, the fifth aspect is not limited to this example.

本発明の第7の態様による自動追尾装置は、前記第1乃至第6のいずれかの態様において、前記本処理手段は、前記カメラにより撮像された画像に基づいて、追尾対象領域の位置及び大きさをパラメータとした複数のパーティクルによるパーティクルフィルタにより、追跡結果として追尾対象領域の位置及び大きさを推定するものである。そして、前記パーティクルフィルタは、前記各パーティクルに関して、過去の追尾対象領域の特徴量(シングルパートモード時にはシングルパート特徴量、マルチパートモード時にはマルチパート特徴量)に基づく参照特徴量に対して当該パーティクルの特徴量(シングルパートモード時にはシングルパート特徴量、マルチパートモード時にはマルチパート特徴量)が相違する度合いを示す相違度によって算出した尤度を用いるものである。   The automatic tracking device according to a seventh aspect of the present invention is the automatic tracking apparatus according to any one of the first to sixth aspects, wherein the processing means is configured to determine the position and size of the tracking target area based on an image captured by the camera. The position and size of the tracking target region are estimated as a tracking result by a particle filter using a plurality of particles with the thickness as a parameter. Then, for each of the particles, the particle filter applies a reference feature amount based on a feature amount of a past tracking target region (single part feature amount in single-part mode, multi-part feature amount in multi-part mode). The likelihood calculated by the degree of difference indicating the degree of difference in the feature amount (single part feature amount in the single part mode, multi part feature amount in the multi part mode) is used.

この第7の態様によれば、前記パーティクルフィルタにより追跡結果として追尾対象領域の位置及び大きさを推定するので、相関演算とは異なり、複数の解の候補(複数のパーティクル)を持つので追跡失敗から回復する可能性が高くなり、オクルージョンや複雑な背景などに対して強く、より精度良く追跡処理を行うことができ、ひいては、追尾対象をより精度良く追尾して撮像することができる。なお、決定論的手法(例えば、テンプレートマッチングなど)では、解を一意に決定するため追跡失敗から回復できない。また、前記第7の態様によれば、追尾対象領域の位置及び大きさをパラメータとしたパーティクルが用いられているので、追尾対象の大きさも同時に決定することが可能となり、パン、チルト、ズームが制御された画像であっても安定した追尾が可能となる。   According to the seventh aspect, since the position and size of the tracking target region are estimated as the tracking result by the particle filter, tracking failure has occurred because there are a plurality of solution candidates (a plurality of particles) unlike the correlation calculation. Therefore, the tracking process can be performed with higher accuracy and more accurately with respect to occlusion and complicated backgrounds. As a result, the tracking target can be tracked with higher accuracy and imaged. A deterministic method (for example, template matching) cannot recover from a tracking failure because the solution is uniquely determined. In addition, according to the seventh aspect, since particles using the position and size of the tracking target region as parameters are used, the size of the tracking target can be determined at the same time, and panning, tilting, and zooming can be performed. Even a controlled image can be stably tracked.

本発明の第8の態様による自動追尾装置は、前記第7の態様において、前記各パーティクルの前記相違度は、シングルパートモード時には前記参照特徴量と当該パーティクルの前記シングルパート特徴量との間のBhattacharyya距離であるとともに、マルチパートモード時には前記参照特徴量と当該パーティクルの前記マルチパート特徴量との各間のBhattacharyya距離の平均値であるものである。この第8の態様は、相違度の具体例を挙げたものであるが、前記第7の態様ではこの例に限定されるものではない。   The automatic tracking device according to an eighth aspect of the present invention is the automatic tracking device according to the seventh aspect, wherein the degree of difference of each particle is between the reference feature amount and the single part feature amount of the particle in the single part mode. In addition to the Bhattacharyya distance, it is an average value of the Bhattacharyya distance between each of the reference feature quantity and the multipart feature quantity of the particle in the multipart mode. The eighth aspect is a specific example of the degree of difference, but the seventh aspect is not limited to this example.

本発明の第9の態様による自動追尾装置は、前記第1乃至第6のいずれかの態様において、前記本処理手段は、前記カメラにより撮像された画像に基づいて、追尾対象領域の位置をパラメータとした複数の第1のパーティクルによる第1のパーティクルフィルタにより、追跡結果の一部として追尾対象領域の位置を推定し、追尾対象領域の大きさをパラメータとしかつ前記第1のパーティクルフィルタにより推定された追尾対象の位置を持つ複数の第2のパーティクルによる第2のパーティクルフィルタにより、追跡結果の他の一部として追尾対象領域の大きさを推定するものである。そして、前記第1のパーティクルフィルタは、前記各第1のパーティクルに関して、過去の追尾対象領域の特徴量(シングルパートモード時にはシングルパート特徴量、マルチパートモード時にはマルチパート特徴量)に基づく参照特徴量に対して当該第1のパーティクルの特徴量(シングルパートモード時にはシングルパート特徴量、マルチパートモード時にはマルチパート特徴量)が相違する度合いを示す第1の相違度によって算出した尤度を用いるものである。前記第2のパーティクルフィルタは、前記各第2のパーティクルに関して、過去の追尾対象領域の特徴量(シングルパートモード時にはシングルパート特徴量、マルチパートモード時にはマルチパート特徴量)に基づく参照特徴量に対して当該第2のパーティクルの特徴量(シングルパートモード時にはシングルパート特徴量、マルチパートモード時にはマルチパート特徴量)が相違する度合いを示す第2の相違度によって算出した尤度を用いるものである。   The automatic tracking device according to a ninth aspect of the present invention is the automatic tracking device according to any one of the first to sixth aspects, wherein the processing means sets the position of the tracking target area as a parameter based on an image captured by the camera. The position of the tracking target area is estimated as a part of the tracking result by the first particle filter using the plurality of first particles, and the size of the tracking target area is used as a parameter and is estimated by the first particle filter. The size of the tracking target area is estimated as another part of the tracking result by the second particle filter using the plurality of second particles having the tracking target position. Then, the first particle filter relates to the first particles with reference feature amounts based on past feature amounts of the tracking target region (single-part feature amounts in the single-part mode and multi-part feature amounts in the multi-part mode). The likelihood calculated based on the first degree of difference indicating the degree of difference in the feature quantity of the first particle (single part feature quantity in the single part mode and multipart feature quantity in the multipart mode) is used. is there. The second particle filter performs a reference feature amount based on a feature amount of a past tracking target region (single part feature amount in single part mode, multipart feature amount in multipart mode) with respect to each second particle. Thus, the likelihood calculated by the second degree of difference indicating the degree of difference in the feature amount of the second particle (single part feature amount in the single part mode and multipart feature amount in the multipart mode) is used.

前記第7の態様では、前記パーティクルフィルタにより追跡結果として追尾対象領域の位置及び大きさを推定するのに対し、前記第9の態様では、前記第1のパーティクルフィルタにより追尾対象の位置を推定し、その推定位置を前提として前記第2のパーティクルフィルタにより追尾対象の大きさを推定している。したがって、前記第9の態様によれば、基本的に前記第7の態様と同様の利点が得られるとともに、前記第7の態様に比べて計算量を低減して処理時間を短縮することができる。ただし、前記第9の態様では前記第7の態様に比べれば追尾対象の追跡処理の精度が低下する可能性がある。よって、前記第9の態様は、追尾対象の動きがそれほど速くなく、画面上での追尾対象の移動量が少ないと想定される場合に特に有効である。   In the seventh aspect, the position and size of the tracking target area are estimated as tracking results by the particle filter, whereas in the ninth aspect, the position of the tracking target is estimated by the first particle filter. The size of the tracking target is estimated by the second particle filter on the assumption of the estimated position. Therefore, according to the ninth aspect, the same advantages as those of the seventh aspect can be basically obtained, and the processing time can be shortened by reducing the amount of calculation compared to the seventh aspect. . However, in the ninth aspect, there is a possibility that the accuracy of the tracking process of the tracking target may be lower than that in the seventh aspect. Therefore, the ninth aspect is particularly effective when the movement of the tracking target is not so fast and the movement amount of the tracking target on the screen is assumed to be small.

本発明の第10の態様による自動追尾装置は、前記第9の態様において、前記各第1のパーティクルの前記第1の相違度は、シングルパートモード時には前記参照特徴量と当該第1のパーティクルの前記シングルパート特徴量との間のBhattacharyya距離であるとともに、マルチパートモード時には前記参照特徴量と当該第1のパーティクルの前記マルチパート特徴量との各間のBhattacharyya距離の平均値であり、前記各第2のパーティクルの前記第2の相違度は、シングルパートモード時には前記参照特徴量と当該第2のパーティクルの前記シングルパート特徴量との間のBhattacharyya距離であるとともに、マルチパートモード時には前記参照特徴量と当該第2のパーティクルの前記マルチパート特徴量との各間のBhattacharyya距離の平均値であるものである。この第10の態様は、各相違度の具体例を挙げたものであるが、前記第9の態様ではこの例に限定されるものではない。   The automatic tracking device according to a tenth aspect of the present invention is the automatic tracking device according to the ninth aspect, wherein the first difference between the first particles is the reference feature amount and the first particle in the single part mode. The Bhattacharyya distance between the single part feature and the average value of the Bhattacharyya distance between each of the reference feature and the multipart feature of the first particle in the multipart mode. The second degree of difference of the second particle is a Bhattacharyya distance between the reference feature quantity and the single part feature quantity of the second particle in the single-part mode, and the reference feature in the multi-part mode. Is the average value of the Bhattacharyya distance between each of the quantity and the multipart feature of the second particle The The tenth aspect is a specific example of each degree of difference, but the ninth aspect is not limited to this example.

本発明の第11の態様による自動追尾装置は、前記第1乃至第10のいずれかの態様において、前記制御手段は、前記追跡処理手段による前記追跡処理の結果に基づいて現在から所定時間経過後の追尾対象領域の位置及び大きさを予測する予測手段を含み、前記制御手段は、前記予測手段による予測結果に応じて、前記カメラに対する現在のパン、チルト及びズームの制御状態を修正して前記カメラのパン、チルト及びズームを制御するものである。   The automatic tracking device according to an eleventh aspect of the present invention is the automatic tracking device according to any one of the first to tenth aspects, wherein the control unit is configured to allow a predetermined time from the current time based on a result of the tracking processing by the tracking processing unit. Predicting means for predicting the position and size of the tracking target area, and the control means corrects the current pan, tilt and zoom control states for the camera according to the prediction result by the predicting means, and It controls the pan, tilt and zoom of the camera.

この第11の態様によれば、予測制御が導入されているので、例えば、カメラが制御指令に対して応答してその指令状態になるまでの動作時間が画像処理時間に比べて長い場合であっても、追尾対象の急な動きの変化などにも対応することができ、追尾対象をより精度良く追尾して撮像することができる。なお、カメラのパン、チルト、ズームの制御速度があまりに速過ぎると、追尾対象を監視者が目で追う際に、カメラのパン、チルト、ズームの変化があまりに急激になってしまい、監視者に不快感を与えてしまい監視に適さなくなってしまうが、カメラとして制御速度が比較的遅いものを使用することができるので、カメラのパン、チルト、ズームの変化をスムーズにして監視により適した追尾を実現することができる。   According to the eleventh aspect, since predictive control is introduced, for example, the operation time until the camera responds to the control command and enters the command state is longer than the image processing time. However, it is possible to cope with a sudden change in the tracking target, and the tracking target can be tracked with higher accuracy and imaged. Note that if the camera pan, tilt, and zoom control speeds are too fast, the camera pan, tilt, and zoom will change too rapidly when the observer follows the tracking target. Although it may be uncomfortable and unsuitable for monitoring, a camera with a relatively slow control speed can be used, so the camera's pan, tilt and zoom changes are smoothed for tracking that is more suitable for monitoring. Can be realized.

本発明の第12の態様による自動追尾装置は、前記第11の態様において、前記予測手段は、カルマンフィルタにより、現在から所定時間経過後の追尾対象領域の位置及び大きさを予測するものである。この第12の態様では、カルマンフィルタが用いられているので、追尾対象領域の位置及び大きさを精度良く予測することができ、ひいては、追尾対象をより精度良く追尾して撮像することができる。もっとも、前記第11の態様では、予測手段はカルマンフィルタを用いたものに限定されるものではない。   The automatic tracking device according to a twelfth aspect of the present invention is the automatic tracking apparatus according to the eleventh aspect, wherein the predicting means predicts the position and size of the tracking target area after a predetermined time has elapsed from the present time by a Kalman filter. In the twelfth aspect, since the Kalman filter is used, the position and size of the tracking target region can be predicted with high accuracy, and as a result, the tracking target can be tracked with higher accuracy and imaged. However, in the eleventh aspect, the prediction means is not limited to that using a Kalman filter.

本発明によれば、追尾対象をより精度良く追尾して撮像することができる自動追尾装置を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the automatic tracking apparatus which can track and image a tracking object more accurately can be provided.

以下、本発明による自動追尾装置について、図面を参照して説明する。   Hereinafter, an automatic tracking device according to the present invention will be described with reference to the drawings.

[第1の実施の形態]   [First Embodiment]

図1は、本発明の第1の実施の形態による自動追尾装置を模式的に示すブロック図である。本実施の形態による自動追尾装置は、図1に示すように、パン、チルト及びズームの制御が可能なカメラ1と、処理部2と、分配器3と、表示・記録制御部4と、液晶パネル等の表示部5と、記録部6とを備えている。   FIG. 1 is a block diagram schematically showing an automatic tracking device according to a first embodiment of the present invention. As shown in FIG. 1, the automatic tracking device according to the present embodiment includes a camera 1 that can control pan, tilt, and zoom, a processing unit 2, a distributor 3, a display / recording control unit 4, and a liquid crystal display. A display unit 5 such as a panel and a recording unit 6 are provided.

カメラ1は、カメラ本体1aと、カメラ本体1aに装着され処理部2からのズームを制御する制御信号に応じて倍率を設定するズームレンズ1bと、カメラ本体1bが搭載され処理部2からのパン及びチルトを制御する制御信号に応じてカメラ本体1aのパン及びチルトを設定する回転台1cとを有している。   The camera 1 includes a camera body 1 a, a zoom lens 1 b that is mounted on the camera body 1 a and sets a magnification according to a control signal that controls zoom from the processing unit 2, and a pan from the processing unit 2. And a turntable 1c for setting pan and tilt of the camera body 1a according to a control signal for controlling the tilt.

分配器3は、カメラ1からの画像信号を、処理部2と表示・記録制御部4とに分配して供給する。画像処理部2は、分配器3を介して供給されたカメラからの画像信号に基づいて、カメラ1により撮像された画像を処理して、カメラ1が侵入者又は侵入物体等の追尾対象10(後述する図2参照)を自動追尾して撮像するように、カメラ1のパン、チルト及びズームを制御する。表示・記録制御部4は、分配器3を介して供給されたカメラからの画像信号が示す画像を、表示部5に表示させたり記録部6に記録させたりする。監視者は、表示部5に表示された画像を監視することができる。なお、監視者が画像を監視しないような場合は、分配器3を設けずに、カメラ1からの画像信号を処理部2に直接入力させてもよい。   The distributor 3 distributes and supplies the image signal from the camera 1 to the processing unit 2 and the display / recording control unit 4. The image processing unit 2 processes an image captured by the camera 1 based on the image signal from the camera supplied via the distributor 3, and the camera 1 tracks the tracking target 10 (such as an intruder or an intruding object). The pan, tilt, and zoom of the camera 1 are controlled so as to automatically track and capture an image (see FIG. 2 described later). The display / recording control unit 4 displays the image indicated by the image signal from the camera supplied via the distributor 3 on the display unit 5 or records the image on the recording unit 6. The monitor can monitor the image displayed on the display unit 5. Note that when the monitor does not monitor the image, the image signal from the camera 1 may be directly input to the processing unit 2 without providing the distributor 3.

図2は、カメラ1による追尾対象10の追尾の様子の例を模式的に示す図である。図2では、侵入者等の追尾対象10を追尾して、カメラ1の視野が変化している様子を示している。なお、実際には、追尾対象10の移動に伴い、回転台1bのパン及びチルトが変化することでカメラ1の視野の向きが変化するとともにズームレンズ1bが作動することでカメラ1の視野が拡大・縮小するが、図2では、カメラ1の各部の図示は省略しカメラ1の視野のみを模式的に示している。   FIG. 2 is a diagram schematically illustrating an example of the tracking state of the tracking target 10 by the camera 1. FIG. 2 shows a state in which the visual field of the camera 1 is changed by tracking the tracking target 10 such as an intruder. Actually, as the tracking target 10 moves, the pan and tilt of the turntable 1b change to change the direction of the field of view of the camera 1, and the zoom lens 1b operates to enlarge the field of view of the camera 1. Although reduced, in FIG. 2, illustration of each part of the camera 1 is omitted, and only the field of view of the camera 1 is schematically shown.

次に、本実施の形態による自動追尾装置の処理部2の動作の一例について、図3乃至図11を参照して説明する。図3は、処理部2の動作の一例を示す概略フローチャートである。図4は、図3中の追尾対象検知処理(ステップS2)を詳細に示すフローチャートである。図5は、図3中のモード選択処理(ステップS4)を詳細に示すフローチャートである。図6及び図7は、図3中の追跡処理の本処理(ステップS5)を詳細に示すフローチャートである。図8乃至図11は、図3中のカメラ制御処理(ステップ7)を詳細に示すフローチャートである。   Next, an example of the operation of the processing unit 2 of the automatic tracking device according to the present embodiment will be described with reference to FIGS. FIG. 3 is a schematic flowchart illustrating an example of the operation of the processing unit 2. FIG. 4 is a flowchart showing in detail the tracking target detection process (step S2) in FIG. FIG. 5 is a flowchart showing in detail the mode selection process (step S4) in FIG. 6 and 7 are flowcharts showing in detail the main process (step S5) of the tracking process in FIG. 8 to 11 are flowcharts showing in detail the camera control process (step 7) in FIG.

図3に示すように、処理部2は、動作を開始すると、まず、カメラ1をプリセット状態にする(ステップS1)。すなわち、処理部2は、カメラ1のパン、チルト及びズームを予め定められたパン、チルト及びズームにする。   As shown in FIG. 3, when the processing unit 2 starts operation, first, the processing unit 2 sets the camera 1 in a preset state (step S1). That is, the processing unit 2 changes the pan, tilt, and zoom of the camera 1 to predetermined pan, tilt, and zoom.

次に、処理部2は、プリセットされた状態、つまり、カメラ1のパン、チルト、ズームが固定の状態で、追尾対象を検知(動体検知)する追尾対象検知処理を行う(ステップS2)。この検知は、一般的に用いられている手法(図4中のS101〜S112)を適用する他に、レーザーレーダなどの他のセンシングデバイスによって行ってもよいし、画面上に表示された人物を監視者が指定手段としてのマウス等のポインティングデバイスによって指定することによって行ってもよい。   Next, the processing unit 2 performs a tracking target detection process for detecting a tracking target (moving object detection) in a preset state, that is, in a state where the pan, tilt, and zoom of the camera 1 are fixed (step S2). In addition to applying a commonly used method (S101 to S112 in FIG. 4), this detection may be performed by another sensing device such as a laser radar, or a person displayed on the screen may be detected. The monitoring may be performed by specifying with a pointing device such as a mouse as a specifying means.

ここで、図4を参照して、追尾対象検知処理(ステップS2)の一例について説明する。なお、図3中の追尾対象検知処理(ステップS2)は、図4に示す例に限定されるものではない。   Here, an example of the tracking target detection process (step S2) will be described with reference to FIG. Note that the tracking target detection process (step S2) in FIG. 3 is not limited to the example shown in FIG.

追尾対象検知処理(ステップS2)を開始すると、図4に示すように、処理部2は、まず、カメラ1が撮像した2枚の連続する画像をサンプリングし(ステップS101,S102)、それらの画像の差分画像(フレーム間差分画像)を生成する(ステップS103)。   When the tracking target detection process (step S2) is started, as illustrated in FIG. 4, the processing unit 2 first samples two consecutive images captured by the camera 1 (steps S101 and S102), and these images. The difference image (inter-frame difference image) is generated (step S103).

次いで、処理部2は、ステップS103で生成した差分画像を2値化する(ステップS104)。この2値化に用いる閾値は、固定閾値でもよいし、判別分析法に代表されるような可変閾値でもよい。   Next, the processing unit 2 binarizes the difference image generated in step S103 (step S104). The threshold value used for the binarization may be a fixed threshold value or a variable threshold value represented by discriminant analysis method.

引き続いて、処理部2は、ステップS104で2値化された画像をラベリングする(ステップS105)。そして、処理部2は、ラベリングされたものがあるか否かを判定し(ステップS106)、ラベリングされたものがなければステップS112へ移行する一方、ラベリングされたものがあれば、ステップS107へ移行する。   Subsequently, the processing unit 2 labels the image binarized in step S104 (step S105). Then, the processing unit 2 determines whether there is a labeled item (step S106). If there is no labeled item, the processing unit 2 proceeds to step S112. If there is a labeled item, the processing unit 2 proceeds to step S107. To do.

ステップS107において、処理部2は、ラベリングされたもの全てについてそれぞれ特徴量を取得する(ステップS107,S108)。ここでいう特徴量は、例えば面積や円形度など、追尾対象10を正確に検出するために必要なものである。   In step S107, the processing unit 2 acquires feature amounts for all the labeled items (steps S107 and S108). The feature amount referred to here is necessary for accurately detecting the tracking target 10 such as an area or a circularity.

その後、処理部2は、ステップS107で取得した全てのラベルの特徴量から、追尾対象10の候補となるものが存在するか否かを判定する(ステップS109)。存在しなければステップS112へ移行する一方、存在すればステップS110へ移行する。   Thereafter, the processing unit 2 determines whether there is a candidate for the tracking target 10 from the feature values of all the labels acquired in step S107 (step S109). If it does not exist, the process proceeds to step S112. If it exists, the process proceeds to step S110.

ステップS110において、処理部2は、追尾対象10の候補のうちから追尾対象10を決定する。このとき、追尾対象10の候補が1つであればそれを追尾対象10として決定し、追尾対象10の候補が複数存在すれば、所定の判断基準によって1つに絞り込んで、それを追尾対象10として決定する。   In step S <b> 110, the processing unit 2 determines the tracking target 10 from the tracking target 10 candidates. At this time, if there is one candidate for the tracking target 10, it is determined as the tracking target 10, and if there are a plurality of candidates for the tracking target 10, it is narrowed down to one according to a predetermined judgment criterion, and is selected as the tracking target 10. Determine as.

ステップS111の後に、処理部2は、追尾対象10が検知されたか否かを示す追尾対象検知フラグを1(1は、追尾対象10が検知されたこと示す。)にセットし(ステップS111)、追尾対象検知処理(ステップS2)を終了して、図3中のステップS3へ移行する。   After step S111, the processing unit 2 sets a tracking target detection flag indicating whether the tracking target 10 has been detected to 1 (1 indicates that the tracking target 10 has been detected) (step S111). The tracking target detection process (step S2) is terminated, and the process proceeds to step S3 in FIG.

ステップS112において、処理部2は、追尾対象検知フラグを0(0は、追尾対象10が検知されなかったこと示す。)にセットする。その後、追尾対象検知処理(ステップS2)を終了して、図3中のステップS3へ移行する。   In step S112, the processing unit 2 sets the tracking target detection flag to 0 (0 indicates that the tracking target 10 has not been detected). Thereafter, the tracking target detection process (step S2) is terminated, and the process proceeds to step S3 in FIG.

再び図3を参照すると、ステップS3において、処理部2は、ステップS2で追尾対象10が検知されたか否かを判定する。この判定は、前記追尾対象検知フラグが1であるか0であるかによって行う。追尾対象10が検知された場合(追尾対象検知フラグが1の場合)は、ステップS4へ移行する一方、追尾対象10が検知されなかった場合(追尾対象検知フラグが0の場合)は、ステップS2へ戻り、追尾対象検知処理(ステップS2)を繰り返す。   Referring to FIG. 3 again, in step S3, the processing unit 2 determines whether or not the tracking target 10 is detected in step S2. This determination is made depending on whether the tracking target detection flag is 1 or 0. When the tracking target 10 is detected (when the tracking target detection flag is 1), the process proceeds to step S4. On the other hand, when the tracking target 10 is not detected (when the tracking target detection flag is 0), step S2 is performed. Returning to Fig. 4, the tracking target detection process (step S2) is repeated.

ステップS4において、処理部2は、カメラ1により撮像された画像に基づいて追尾対象を追跡する追跡処理の予備処理として、モード選択処理を行う。このモード選択処理(ステップS4)において、処理部2は、カメラ1により撮像された画像に基づいて、追尾対象の追跡開始当初に(本実施の形態では、追尾対象検知処理(ステップS2)で追尾対象10が検知された直後に)、当該追尾対象10に応じた領域(本実施の形態では、外接矩形領域)である追尾対象領域の全体の領域から得た特徴量(本実施の形態では、ヒストグラム)であるシングルパート特徴量(本実施の形態では、シングルパートヒストグラム)を用いて追跡処理を行うシングルパートモードとするかそれとも前記追尾対象領域の分割された各領域(本実施の形態では、上下2分割された2つの領域)からそれぞれ得た特徴量(本実施の形態では、ヒストグラム)であるマルチパート特徴量(本実施の形態では、マルチパートヒストグラム)を用いて追跡処理を行うマルチパートモードとするかを選択する。   In step S4, the processing unit 2 performs a mode selection process as a preliminary process of the tracking process for tracking the tracking target based on the image captured by the camera 1. In this mode selection process (step S4), the processing unit 2 performs tracking in the tracking target detection process (step S2) in the beginning of tracking of the tracking target based on the image captured by the camera 1 (in this embodiment, tracking target detection processing (step S2)). Immediately after the target 10 is detected, the feature amount (in this embodiment, obtained from the entire area of the tracking target area that is the area corresponding to the tracking target 10 (the circumscribed rectangular area in this embodiment)) A single-part mode that performs tracking processing using a single-part feature quantity (in this embodiment, a single-part histogram) that is a histogram, or each of the areas to be tracked (in this embodiment, Multipart feature quantities (in this embodiment, multi-part feature quantities) in this embodiment (histograms in this embodiment) respectively obtained from two regions divided into upper and lower parts) Selecting either a multi-part mode for performing tracking processing using part histogram).

ここで、図5を参照して、モード選択処理(ステップS4)の一例について説明する。なお、図3中のモード選択処理(ステップS4)は、図5に示す例に限定されるものではない。本実施の形態では、特徴量として扱うヒストグラムは、CIE1976L色空間におけるヒストグラムを扱う。もっとも、本発明では、特徴量は、他の種々の色空間のヒストグラムでもよいし、必ずしもヒストグラムに限定されるものではない。 Here, an example of the mode selection process (step S4) will be described with reference to FIG. Note that the mode selection process (step S4) in FIG. 3 is not limited to the example shown in FIG. In the present embodiment, the histogram handled as the feature value is a histogram in the CIE1976L * u * v * color space. However, in the present invention, the feature amount may be a histogram of other various color spaces, and is not necessarily limited to the histogram.

モード選択処理(ステップS4)を開始すると、図5に示すように、処理部2は、まず、図3中の追尾対象検知処理(ステップS2)(特に、図4中のステップS110)で検知された追尾対象10に応じた領域である追尾対象領域(本実施の形態では、外接矩形領域)を上下に2分割する(ステップS201)。もっっとも、本発明では分割のパターンは必ずしもこれに限定されるものではなく、左右2分割など任意の分割方法を採用してもよい。また、その分割数も2分割に限定されるものではない。この点については後述する。   When the mode selection process (step S4) is started, as shown in FIG. 5, the processing unit 2 is first detected by the tracking target detection process (step S2) in FIG. 3 (particularly, step S110 in FIG. 4). The tracking target area (in this embodiment, a circumscribed rectangular area) that is an area corresponding to the tracking target 10 is divided into two vertically (step S201). In the present invention, the division pattern is not necessarily limited to this, and any division method such as right and left division may be employed. Further, the number of divisions is not limited to two. This point will be described later.

次に、処理部2は、ステップS201で分割された各分割領域に番号を割り当てるため、分割領域番号を意味するカウント値iを1にセットする(ステップS202)。   Next, the processing unit 2 sets a count value i indicating a divided region number to 1 in order to assign a number to each divided region divided in step S201 (step S202).

次いで、処理部2は、図4中のステップS102でサンプリングされた画像におけるi番目の分割領域について、CIE1976L色空間における階級数mの明度指数ヒストグラム(1次元ヒストグラム)を生成する(ステップS203)。 Next, the processing unit 2 generates a brightness index histogram (one-dimensional histogram) of the class number m L in the CIE 1976 L * u * v * color space for the i-th divided region in the image sampled in step S102 in FIG. (Step S203).

引き続いて、処理部2は、ステップS203で生成された明度指数ヒストグラムを、全ての階級の度数の合計が0.5となるように正規化する(ステップS204)。すなわち、ステップS203で生成された明度指数ヒストグラムの各階級の度数をそれぞれ、全ての階級の度数の合計で割った後に更に1/2にする。   Subsequently, the processing unit 2 normalizes the brightness index histogram generated in step S203 so that the sum of the frequencies of all classes is 0.5 (step S204). That is, the frequency of each class of the brightness index histogram generated in step S203 is divided by the sum of the frequencies of all classes, and further reduced to ½.

その後、処理部2は、図4中のステップS102でサンプリングされた画像におけるi番目の分割領域について、CIE1976L色空間における階級数m×mの知覚色度指数ヒストグラム(2次元ヒストグラム)を生成する(ステップS205)。 Thereafter, the processing unit 2 perceives the chromaticity index histogram (2) of the class number m u × m v in the CIE1976L * u * v * color space for the i-th divided region in the image sampled in step S102 in FIG. A dimension histogram is generated (step S205).

次に、処理部2は、ステップS205で生成された知覚色度指数ヒストグラムを、全ての階級の度数の合計が0.5となるように正規化する(ステップS206)。すなわち、ステップS205で生成された知覚色度指数ヒストグラムの各階級の度数をそれぞれ、全ての階級の度数の合計で割った後に更に1/2にする。   Next, the processing unit 2 normalizes the perceptual chromaticity index histogram generated in step S205 so that the sum of the frequencies of all classes becomes 0.5 (step S206). That is, the frequency of each class in the perceptual chromaticity index histogram generated in step S205 is divided by the sum of the frequencies of all classes, and is further halved.

次いで、処理部2は、下記の数1に従って、ステップS204で正規化された明度指数ヒストグラム及びステップS206で正規化された知覚色度指数ヒストグラム結合して、1次元化したヒストグラムpを生成する(ステップS207)。 Next, the processing unit 2 generates a one-dimensional histogram p i by combining the brightness index histogram normalized in step S204 and the perceptual chromaticity index histogram normalized in step S206 according to the following formula 1. (Step S207).

Figure 2009038777
Figure 2009038777

その後、処理部2は、現在の分割領域番号iが2であるか否かを判定することで、全ての分割領域(本実施の形態では、2つの分割領域)について、ヒストグラムpiの生成が終了したか否かを判定する(ステップS208)。終了していなければ、処理部2はiを2にセットし(ステップS209)、ステップS203へ戻る。一方、終了していれば、ステップS210へ移行する。   Thereafter, the processing unit 2 determines whether or not the current divided region number i is 2, so that the generation of the histogram pi is completed for all the divided regions (two divided regions in the present embodiment). It is determined whether or not (step S208). If not completed, the processing unit 2 sets i to 2 (step S209), and returns to step S203. On the other hand, if completed, the process proceeds to step S210.

ステップS210において、処理部2は、下記の数2に従って、ステップS207で2つの分割領域についてそれぞれ生成されたヒストグラムp,p同士の間のBhattacharyya距離dを算出する。 In step S210, the processing unit 2 calculates the Bhattacharyya distance d between the histograms p 1 and p 2 generated for the two divided regions in step S207 according to the following formula 2.

Figure 2009038777
Figure 2009038777

このBhattacharyya距離dは、ヒストグラムp,p同士の類似度を示す指標となり、その類似度が高いほど距離dの値は小さくなる一方、その類似度が低いほど距離dの値は大きくなる。なお、本発明では、ヒストグラムp,p同士の類似度を示す指標は、必ずしもBhattacharyya距離dに限定されるものではない。 The Bhattacharyya distance d is an index indicating the similarity between the histograms p 1 and p 2. The higher the similarity is, the smaller the value of the distance d is, while the lower the similarity is, the larger the value of the distance d is. In the present invention, the index indicating the similarity between the histograms p 1 and p 2 is not necessarily limited to the Bhattacharyya distance d.

次に、処理部2は、ステップS210で算出されたBhattacharyya距離dが予め設定した閾値Tより大きいか否かを判定することで、ヒストグラムp,p同士の類似度が所定以下に低いか所定以上に高いかを判定する(ステップS211)。処理部2は、閾値Tより大きければ(ヒストグラムp,p同士の類似度が所定以下に低ければ)、モードフラグを0(0は、マルチパートモードを選択したことを示す)にセットする(ステップS212)一方、閾値Tより小さければ(ヒストグラムp,p同士の類似度が所定以上に高ければ)、モードフラグを1(1は、シングルパートモードを選択したことを示す)にセットする(ステップS213)。ステップS212の後及びステップS213の後、モード選択処理(ステップS4)を終了して、図3中のステップS5へ移行する。 Next, the processing unit 2 determines whether the similarity between the histograms p 1 and p 2 is lower than a predetermined value by determining whether or not the Bhattacharyya distance d calculated in step S210 is greater than a preset threshold value T. It is determined whether it is higher than a predetermined value (step S211). If the processing unit 2 is larger than the threshold T (if the similarity between the histograms p 1 and p 2 is lower than a predetermined value), the processing unit 2 sets the mode flag to 0 (0 indicates that the multipart mode is selected). (Step S212) On the other hand, if it is smaller than the threshold value T (if the similarity between the histograms p 1 and p 2 is higher than a predetermined value), the mode flag is set to 1 (1 indicates that the single part mode is selected). (Step S213). After step S212 and after step S213, the mode selection process (step S4) is terminated, and the process proceeds to step S5 in FIG.

再び図3を参照すると、ステップS5において、処理部2は、モード選択処理(ステップS4)で選択されたモードで、カメラ1により撮像された画像に基づいて追尾対象を追跡する追跡処理の本処理を行う。本実施の形態では、追跡処理の本処理(ステップS5)において、処理部2は、カメラ1により撮像された画像に基づいて、追尾対象領域の位置及び大きさをパラメータとした複数のパーティクルによるパーティクルフィルタにより、追跡結果として追尾対象領域の位置及び大きさを推定する。前記パーティクルフィルタは、前記各パーティクルに関して、過去の追尾対象領域の特徴量(シングルパートモード時にはシングルパート特徴量としてのシングルパートヒストグラム、マルチパートモード時にはマルチパート特徴量としてのマルチパートヒストグラム)に基づく参照特徴量(本実施の形態では参照ヒストグラム)に対して当該パーティクルの特徴量(シングルパートモード時にはシングルパート特徴量としてのシングルパートヒストグラム、マルチパートモード時にはマルチパート特徴量としてのマルチパートヒストグラム)が相違する度合いを示す相違度d(n)によって算出した尤度π (n)を用いる。 Referring to FIG. 3 again, in step S5, the processing unit 2 performs the main process of the tracking process that tracks the tracking target based on the image captured by the camera 1 in the mode selected in the mode selection process (step S4). I do. In the present embodiment, in the main process (step S5) of the tracking process, the processing unit 2 uses a plurality of particles based on the image captured by the camera 1 as parameters for the position and size of the tracking target area. The position and size of the tracking target area are estimated as a tracking result by the filter. The particle filter refers to each particle based on a past feature amount of the tracking target region (single part histogram as a single part feature amount in the single part mode, multi part histogram as a multipart feature amount in the multipart mode). The feature quantity of the particle (single part histogram as a single part feature quantity in single part mode, multi part histogram as a multi part feature quantity in multipart mode) differs from the feature quantity (reference histogram in this embodiment) The likelihood π t (n) calculated based on the difference d (n) indicating the degree to be used is used.

ここで、図6及び図7を参照して、追跡処理の本処理(ステップS5)の一例について説明する。なお、図3中の追跡処理の本処理(ステップS5)は、図6及び図7に示す例に限定されるものではない。   Here, an example of the main process (step S5) of the tracking process will be described with reference to FIGS. 3 is not limited to the examples shown in FIGS. 6 and 7.

追跡処理の本処理(ステップS5)を開始すると、図6に示すように、処理部2は、まず、1枚の画像をサンプリングする(ステップS300)。   When the main process (step S5) of the tracking process is started, as shown in FIG. 6, the processing unit 2 first samples one image (step S300).

次に、処理部2は、図12に示すように、画像内の予め設定した所定の幅で所定の高さを有する領域Rを追尾対象10の探索範囲として、領域R内に、追尾対象領域(本実施の形態では、矩形)の位置(例えば、重心)及び大きさ(例えば、縦又は横寸法)をパラメータとしたN個のサンプル(パーティクル)PS1〜PS5,…,PSn,…,PSNをばら撒く(ステップS301)。各サンプルの位置は、領域R内であれば任意であり、当初はランダムにばら撒かれる。各サンプルの縦横比は、元の追尾対象領域(図4中のステップS110で検知された追尾対象10に応じた領域である追尾対象領域(本実施の形態では、外接矩形領域))と縦横比が同じとされる。各サンプルの大きさは任意であり、当初はランダムに設定される。なお、図3中の追尾対象検知処理(ステップS2)後の最初に行われる本処理(ステップS5)におけるステップS301の処理では、サンプルをN個ばら撒くが、2回目以降の本処理(ステップS5)におけるステップS301の処理では、N個から前回の本処理(ステップS5)で残ったサンプルの数を引いた不足分を追加してばら撒く。   Next, as illustrated in FIG. 12, the processing unit 2 sets a tracking target region in the region R as a search range of the tracking target 10 using a region R having a predetermined width and a predetermined height in the image. (In this embodiment, N samples (particles) PS1 to PS5,..., PSn,..., PSN with the position (for example, the center of gravity) and the size (for example, the vertical or horizontal dimension) of the parameters as parameters. Disperse (step S301). The position of each sample is arbitrary as long as it is within the region R, and is initially randomly distributed. The aspect ratio of each sample is the original tracking target area (the tracking target area (the circumscribed rectangular area in the present embodiment) corresponding to the tracking target 10 detected in step S110 in FIG. 4) and the aspect ratio. Are the same. The size of each sample is arbitrary and is initially set at random. In the process of step S301 in the main process (step S5) performed first after the tracking target detection process (step S2) in FIG. 3, N samples are dispersed, but the second and subsequent main processes (step S5). In step S301 in step S301, an insufficient amount obtained by subtracting the number of samples remaining in the previous main process (step S5) from N pieces is added.

なお、図12は、追尾対象10の探索範囲をなす領域Rとサンプルの分布状態の例を、模式的に示す図である。なお、図12において、ハッチングを付した矩形領域ESは、後述するステップS316により推定された追尾対象領域の例を示している。   FIG. 12 is a diagram schematically illustrating an example of the distribution state of the sample and the region R that forms the search range of the tracking target 10. In FIG. 12, a hatched rectangular area ES indicates an example of the tracking target area estimated in step S316 described later.

次に、処理部2は、N個のサンプルに番号を割り当てるため、サンプル番号を意味するカウント値nを1にセットする(ステップS302)。   Next, the processing unit 2 sets a count value n indicating a sample number to 1 in order to assign a number to N samples (step S302).

次いで、処理部2は、図3中のモード選択処理(ステップS4)で最新に設定されたモードフラグが0であるか否かを判定することで、現在選択されているモードがマルチパートモードであるかシングルパートモードであるかを判定する(ステップS303)。マルチパートモードが選択されていれば(モードフラグが0であれば)、処理部2は、n番目のサンプルの領域を、図5中のステップS201と同様に分割(本実施の形態では、上下に2分割)した(ステップS304)後に、ステップS305へ移行する。一方、シングルパートモードが選択されていれば(モードフラグが1であれば)、ステップS304を経ることなくステップS305へ移行する。   Next, the processing unit 2 determines whether or not the mode flag set to the latest in the mode selection process (step S4) in FIG. 3 is 0, so that the currently selected mode is the multipart mode. It is determined whether there is a single part mode or not (step S303). If the multi-part mode is selected (if the mode flag is 0), the processing unit 2 divides the n-th sample area in the same manner as in step S201 in FIG. 2) (step S304), the process proceeds to step S305. On the other hand, if the single part mode is selected (if the mode flag is 1), the process proceeds to step S305 without passing through step S304.

ステップS305において、処理部2は、領域番号を意味するカウント値iを1にセットする。マルチパートモード時にはサンプルの領域は2分割されているのでiは1,2となるが、シングルパートモード時にはサンプルの領域は分割されないのでiは1にしかならない。   In step S305, the processing unit 2 sets a count value i indicating an area number to 1. In the multi-part mode, the sample area is divided into two, so i becomes 1, 2, but in the single-part mode, the sample area is not divided, so i is only 1.

次に、処理部2は、ステップS300で最新にサンプリングされた画像におけるn番目のサンプルのi番目の領域について、ステップS203〜S207と同様の処理を行うことで、CIE1976L色空間における明度指数ヒストグラム及び知覚色度指数ヒストグラムをそれぞれ正規化したものを結合して1次元化して得たヒストグラムq(数1で示すヒストグラムpに相当するサンプルのi番目の領域のヒストグラム)を生成する。 Next, the processing unit 2 performs the same processing as in steps S203 to S207 on the i-th region of the n-th sample in the image sampled most recently in step S300, so that the CIE 1976 L * u * v * color space. Histogram q i obtained by combining the normalized lightness index histogram and perceptual chromaticity index histogram in FIG. 1 to obtain a one-dimensional histogram (i-th region histogram of the sample corresponding to the histogram p i shown in Equation 1) Generate.

次いで、処理部2は、下記の数3に従って、参照領域のヒストグラムpとサンプルの領域のヒストグラムqとの間の、Bhattacharyya距離d (n)を算出する(ステップS307)。ここで、参照領域のヒストグラムpは、参照ヒストグラムpあるいは参照データと呼ぶ場合があり、図3中の追尾対象検知処理(ステップS2)後の最初に行われる本処理(ステップS5)におけるステップS307の処理では、図5中のS207で生成されたヒストグラムpであるが、2回目以降の本処理(ステップS5)におけるステップS307の処理では、前回の本処理(ステップS5)におけるステップS317で更新されたヒストグラムp(ただし、当該i番目の領域に関するもの)である。 Then, the processing unit 2 in accordance with the number 3, below, between the histogram q i of the histogram p i and the sample of the reference region area, calculates the Bhattacharyya distance d i (n) (step S307). Here, the histogram p i of the reference region may be referred to as reference histogram p i or reference data, and is a step in the main process (step S5) performed first after the tracking target detection process (step S2) in FIG. in the process of S307 is a histogram p i generated in S207 in FIG. 5, in the processing in step S307 in the second or subsequent the process (step S5), at step S317 in the previous present process (step S5) updated histogram p t (provided that relates the i-th region) is.

Figure 2009038777
Figure 2009038777

引き続いて、処理部2は、ステップS303と同様に、現在選択されているモードがマルチパートモードであるかシングルパートモードであるかを判定する(ステップS308)。マルチパートモードが選択されていれば(モードフラグが0であれば)ステップS309へ移行し、シングルパートモードが選択されていれば(モードフラグが1であれば)ステップS312へ移行する。   Subsequently, similarly to step S303, the processing unit 2 determines whether the currently selected mode is the multipart mode or the single part mode (step S308). If the multi-part mode is selected (if the mode flag is 0), the process proceeds to step S309. If the single-part mode is selected (if the mode flag is 1), the process proceeds to step S312.

ステップS309において、処理部2は、現在の領域番号iが2であるか否かを判定することで、全ての領域(本実施の形態では、2つの分割領域)について、Bhattacharyya距離d (n)の算出が終了したか否かを判定する。終了していなければ、処理部2はiを2にセットし(ステップS310)、ステップS306へ戻る。一方、終了していれば、ステップS311へ移行する。 In step S309, the processing unit 2 determines whether or not the current area number i is 2, so that the Bhattacharyya distance d i (n ) for all areas (two divided areas in the present embodiment). calculation of) determines whether or not it is completed. If not completed, the processing unit 2 sets i to 2 (step S310) and returns to step S306. On the other hand, if completed, the process proceeds to step S311.

ステップS311において、処理部2は、下記の数4に従って、n番目のサンプルの相違度d(n)を、ステップS307で順次算出された各分割領域のBhattacharyya距離d (n)の平均値として算出し、ステップS313へ移行する。 In step S311, the processing unit 2 calculates the difference d (n) of the n-th sample as an average value of the Bhattacharyya distances d i (n) of the respective divided regions sequentially calculated in step S307 according to the following equation 4. Calculate and move to step S313.

Figure 2009038777
Figure 2009038777

一方、シングルパートモード時には、ステップS312において、処理部2は、ステップS307で求めたBhattacharyya距離d (n)を、そのままn番目のサンプルの相違度d(n)とし、ステップS313へ移行する。 On the other hand, in the single part mode, in step S312, the processing unit 2 sets the Bhattacharyya distance d i (n) obtained in step S307 as the difference d (n) of the nth sample as it is, and proceeds to step S313.

ステップS313において、処理部2は、下記数5に従って、ステップS311又はS312で得られた相違度d(n)によって尤度π (n)を算出する。ここで、尤度はガウス分布に従うものと仮定している。 In step S313, the processing unit 2 calculates the likelihood π t (n) from the difference d (n) obtained in step S311 or S312 according to the following formula 5. Here, the likelihood is assumed to follow a Gaussian distribution.

Figure 2009038777
Figure 2009038777

数5において、Nはパーティクルの個数(サンプル数)である。また、数5において、σは通常はガウス分布の分散となるが、ここでの計算においては予め設定しておいた値とする。 In Equation 5, N is the number of particles (number of samples). In Equation 5, σ 2 is normally a variance of Gaussian distribution, but in this calculation, it is a value set in advance.

その後、処理部2は、現在のサンプル番号nがNであるか否かを判定することで、全てのサンプルについて、尤度π (n)の算出が終了したか否かを判定する(ステップS314)。終了していなければ、処理部2はサンプル番号nを1だけインクリメントし(ステップS315)、ステップS303へ戻る。一方、終了していれば、ステップS316へ移行する。 Thereafter, the processing unit 2, by current sample number n is determined whether the N, for all samples, it is determined whether the calculation of the likelihood [pi t (n) has been completed (step S314). If not completed, the processing unit 2 increments the sample number n by 1 (step S315) and returns to step S303. On the other hand, if completed, the process proceeds to step S316.

ステップS316において、処理部2は、ステップS313で算出した尤度π (n)と各サンプルの位置(重心位置)及び大きさから、下記の数6に従って、状態の推定結果である追尾対象領域の位置及び大きさの推定結果(すなわち、追跡結果)として、重み付け平均値E[S]を求める。重み付け平均値E[S]で表される追尾対象領域の位置及び大きさが、追跡結果となる追尾対象領域の位置及び大きさである。 In step S316, the processing unit 2, the calculated likelihood [pi t (n) and from each sample position (gravity center position) and size at step S313, in accordance with the number 6 below, tracking target area is a result of estimation of the state A weighted average value E [S t ] is obtained as an estimation result (that is, a tracking result) of the position and size. The position and size of the tracking target area represented by the weighted average value E [S t ] is the position and size of the tracking target area that is the tracking result.

Figure 2009038777
Figure 2009038777

その後、処理部2は、ステップS316で得た推定結果に基づいて、下記数7に従って、参照データを更新する(ステップS317)。数7において、ヒストグラムpt−1は、時刻t−1の推定された追尾対象領域に関するヒストグラムを示し、ステップS300で最新にサンプリングされた画像における、ステップS315(数6)で推定結果として得られた追尾対象領域について、ステップS203〜S207と同様の処理を行うことで、CIE1976L色空間における明度指数ヒストグラム及び知覚色度指数ヒストグラムをそれぞれ正規化したものを結合して1次元化して得たヒストグラムである。また、数7において、qt−1は時刻t−1の推定前の追尾対象領域に関するヒストグラムを示す。 Thereafter, the processing unit 2 updates the reference data according to the following equation 7 based on the estimation result obtained in step S316 (step S317). In Equation 7, a histogram pt-1 indicates a histogram related to the tracking target region estimated at time t-1, and is obtained as an estimation result in Step S315 (Equation 6) in the image sampled most recently in Step S300. The tracking target area is processed in the same manner as steps S203 to S207 to combine the normalized brightness index histogram and perceptual chromaticity index histogram in the CIE1976L * u * v * color space to make one dimension. This is a histogram obtained. In Expression 7, q t−1 represents a histogram related to the tracking target region before estimation at time t−1.

Figure 2009038777
Figure 2009038777

次に、処理部2は、ステップS313で算出された全てのサンプルの尤度π (n)を、その値の大きい順にソートする(ステップS318)。 Next, the processing unit 2 sorts the likelihoods π t (n) of all the samples calculated in step S313 in descending order of the values (step S318).

次いで、処理部2は、ステップS318で尤度の値をソートした結果として得た尤度の最大値が、予め設定した閾値Vよりも大きいか否かを判定する(ステップS319)。閾値Vよりも大きければ、追跡が成功したものと判断して、追跡結果フラグを1に設定し(S320)、ステップS322へ移行する。一方、閾値Vよりも小さければ、追跡が失敗したものと判断して、追跡結果フラグを0に設定し(S321)、ステップS322へ移行する。   Next, the processing unit 2 determines whether or not the maximum likelihood value obtained as a result of sorting the likelihood values in step S318 is greater than a preset threshold value V (step S319). If it is larger than the threshold value V, it is determined that the tracking is successful, the tracking result flag is set to 1 (S320), and the process proceeds to step S322. On the other hand, if it is smaller than the threshold value V, it is determined that the tracking has failed, the tracking result flag is set to 0 (S321), and the process proceeds to step S322.

処理部2は、各サンプルについて、ステップS322〜S324の処理を繰り返し、全てのサンプルについてステップS322〜S324の処理が終了すると(ステップS325でYES)、ステップS326へ移行する。ステップS322において、処理部2は、当該サンプルの尤度π (n)が予め設定していた閾値Πよりも大きいか否かを判定する。閾値Πよりも大きければS323へ移行し、小さければS324に移行する。ステップS323において、処理部2は、当該サンプルは、パーティクルフィルタの公知の手法に従って、次回における(すなわち、次のフレームにおける)サンプルを構成するため分裂を行う。ステップS324において、処理部2は、当該サンプルを次回における(すなわち、次のフレームにおける)サンプルを構成しないために消滅させる。 The processing unit 2 repeats the processes of steps S322 to S324 for each sample, and when the processes of steps S322 to S324 are completed for all samples (YES in step S325), the process proceeds to step S326. In step S322, the processing unit 2 determines whether the likelihood π t (n) of the sample is larger than a preset threshold value Π. If it is larger than the threshold value Π, the process proceeds to S323, and if it is smaller, the process proceeds to S324. In step S323, the processing unit 2 divides the sample to form a sample for the next time (that is, in the next frame) in accordance with a known method of a particle filter. In step S324, the processing unit 2 causes the sample to disappear so as not to constitute the next sample (that is, in the next frame).

ステップS326において、処理部2は、各サンプルについてステップS323の分裂又はステップS324の消滅を行った結果、残ったサンプルがN個以下であるか否かを判定する。N個以下であれば、追跡処理の本処理(ステップS5)を終了して、図3中のステップS6へ移行する。一方、N個よりも多い場合は、処理部2は、尤度π (n)が小さいものから順に分裂したものを含めて消滅させる(ステップS327)。その結果、残ったサンプルはN個またはN−1個となる。ステップS327の後、追跡処理の本処理(ステップS5)を終了して、図3中のステップS6へ移行する。 In step S326, the processing unit 2 determines whether or not the number of samples remaining as a result of the division in step S323 or the disappearance of step S324 is N or less for each sample. If the number is N or less, the tracking process is terminated (step S5), and the process proceeds to step S6 in FIG. On the other hand, when there are more than N, the processing unit 2 eliminates the ones that are split in order from the one with the smallest likelihood π t (n) (step S327). As a result, the number of remaining samples is N or N-1. After step S327, the tracking process is terminated (step S5), and the process proceeds to step S6 in FIG.

再び図3を参照すると、ステップS6において、処理部2は、現在の追跡結果フラグが1であるか否かを判定することで、ステップS5の本処理による追跡が成功したか否かを判定する。追跡が成功であれば(追跡結果フラグが1であれば)、ステップS7へ移行する。一方、追跡が失敗であれば(追跡結果フラグが0であれば)、ステップS8へ移行する。ステップS8において、処理部2は、追追跡の失敗の状態が一定時間継続しているか否かを判定する。一定時間継続していない場合は、追跡処理の本処理(ステップS5)に戻に戻り、その処理を繰り返す。一定時間継続している場合は、追跡処理が成功する見込みがないものとみなして、ステップS1(プリセット状態)に戻る。   Referring to FIG. 3 again, in step S6, the processing unit 2 determines whether the current tracking result flag in step S5 is successful by determining whether the current tracking result flag is 1 or not. . If the tracking is successful (if the tracking result flag is 1), the process proceeds to step S7. On the other hand, if tracking fails (if the tracking result flag is 0), the process proceeds to step S8. In step S8, the processing unit 2 determines whether or not the follow-up failure state continues for a certain period of time. If it does not continue for a certain time, the process returns to the main process (step S5) of the tracking process, and the process is repeated. If it continues for a certain period of time, it is considered that the tracking process is unlikely to succeed, and the process returns to step S1 (preset state).

ステップS6において追跡が成功である(追跡結果フラグが1である)と判定されると、処理部2は、追跡処理の本処理(ステップS5)で得た追跡結果、すなわち、図6中のステップS316で推定された追尾対象領域の位置及び大きさに応じて、カメラ1が追尾対象を追尾するように、カメラ1のパン、チルト及びズームを制御するカメラ制御処理を行う。このカメラ制御処理において、処理部2は、前記追跡結果に基づいて現在から所定時間経過後(nフレーム後)の追尾対象領域の位置及び大きさを予測し、その予測結果に応じて、カメラ1に対する現在のパン、チルト及びズームの制御状態を修正してカメラ1のパン、チルト及びズームを制御する。ここで、本実施の形態では、追尾対象領域の位置及び大きさを予測は、カルマンフィルタにより行う。 If it is determined in step S6 that the tracking is successful (the tracking result flag is 1), the processing unit 2 determines the tracking result obtained in the main processing (step S5) of the tracking processing, that is, the step in FIG. Camera control processing for controlling pan, tilt, and zoom of the camera 1 is performed so that the camera 1 tracks the tracking target according to the position and size of the tracking target region estimated in S316. In this camera control process, the processing unit 2 predicts the position and size of the tracking target area after the elapse of a predetermined time (after n f frames) based on the tracking result, and in accordance with the prediction result, the camera 2 The current pan / tilt / zoom control state for 1 is corrected to control the pan / tilt / zoom of the camera 1. Here, in the present embodiment, the position and size of the tracking target region are predicted by a Kalman filter.

ここで、図8乃至図11を参照して、カメラ制御処理(ステップS7)の一例について説明する。なお、図3中のカメラ制御処理(ステップS7)は、図8乃至図11に示す例に限定されるものではない。   Here, an example of the camera control process (step S7) will be described with reference to FIGS. Note that the camera control process (step S7) in FIG. 3 is not limited to the examples shown in FIGS.

カメラ制御処理(ステップS7)を開始すると、図8に示すように、処理部2は、まず、処理部2は、カメラ制御処理において用いる情報として、追跡処理の結果(図6中のステップS316で得た重み付け平均値E[S]、すなわち、ステップS316で推定された追尾対象領域の位置及び大きさ)を取得する(ステップS501)。なお、この追跡結果は処理部2がそもそも有しているので、本来はその取得動作は不要であるが、ここでは理解を容易にするため、このステップS501を挿入している。 When the camera control process (step S7) is started, as shown in FIG. 8, the processing unit 2 first obtains the result of the tracking process (step S316 in FIG. 6) as information used in the camera control process. The obtained weighted average value E [S t ], that is, the position and size of the tracking target area estimated in step S316 is acquired (step S501). Since the tracking result is originally possessed by the processing unit 2, the acquisition operation is originally unnecessary, but step S 501 is inserted here for easy understanding.

次に、処理部2は、現在のカメラ1のパン、チルト、ズームのそれぞれの制御状態を示す情報として、パン制御フラグ、チルト制御フラグ、ズーム制御フラグを取得する(ステップS502)。本実施の形態では、カメラ1は、パン、チルト、ズームのそれぞれについて、処理部2から制御指令受けてからその制御動作を行ってその制御動作が完了すると制御完了信号を処理部2に返すようになっている。処理部2は、カメラ1にパン制御指令を与えるときにパン制御フラグを1にセットし、カメラ1からパン制御完了信号を受けたときに割り込み処理でパン制御フラグを0にリセットする。また、処理部2は、カメラ1にチルト制御指令を与えるときにチルト制御フラグを1にセットし、カメラ1からチルト制御完了信号を受けたときに割り込み処理でチルト制御フラグを0にリセットする。さらに、処理部2は、カメラ1にズーム制御指令を与えるときにズーム制御フラグを1にセットし、カメラ1からズーム制御完了信号を受けたときに割り込み処理でズーム制御フラグを0にリセットする。このように、パン、チルト、ズームのそれぞれの制御フラグは、1であれば対応する動作が制御中であることを示し、0であれば対応する動作が停止中であることを示す。以上の説明からわかるように、パン制御フラグ、チルト制御フラグ、ズーム制御フラグは処理部2がそもそも有しているので、本来はその取得動作は不要であるが、ここでは理解を容易にするため、このステップS502を挿入している。   Next, the processing unit 2 acquires a pan control flag, a tilt control flag, and a zoom control flag as information indicating the respective pan, tilt, and zoom control states of the camera 1 (step S502). In the present embodiment, the camera 1 performs control operations after receiving control commands from the processing unit 2 for each of pan, tilt, and zoom, and returns a control completion signal to the processing unit 2 when the control operations are completed. It has become. The processing unit 2 sets a pan control flag to 1 when a pan control command is given to the camera 1, and resets the pan control flag to 0 by an interrupt process when a pan control completion signal is received from the camera 1. Further, the processing unit 2 sets the tilt control flag to 1 when giving a tilt control command to the camera 1, and resets the tilt control flag to 0 by interruption processing when receiving a tilt control completion signal from the camera 1. Further, the processing unit 2 sets the zoom control flag to 1 when giving a zoom control command to the camera 1, and resets the zoom control flag to 0 by interrupt processing when receiving a zoom control completion signal from the camera 1. As described above, when each control flag of pan, tilt, and zoom is 1, it indicates that the corresponding operation is being controlled, and when it is 0, it indicates that the corresponding operation is being stopped. As can be understood from the above description, since the processing unit 2 originally has the pan control flag, the tilt control flag, and the zoom control flag, the acquisition operation is originally unnecessary, but here, for easy understanding. This step S502 is inserted.

次に、処理部2は、全ての制御フラグ(パン制御フラグ、チルト制御フラグ、ズーム制御フラグ)が0であるか否かを判定し(ステップS503)、全ての制御フラグが0であればステップS519へ移行し、いずれか1つ以上の制御フラグが1であればステップS504へ移行する。   Next, the processing unit 2 determines whether all control flags (pan control flag, tilt control flag, zoom control flag) are 0 (step S503). The process proceeds to S519, and if any one or more control flags is 1, the process proceeds to Step S504.

ステップS504において、処理部2は、ステップS501で取得した追跡結果(特に、追尾対象領域の位置)が、前のフレームで取得した追跡結果(特に、追尾対象領域の位置)に比較して、画像中央から遠ざかっているかどうかを判定する。遠ざかっている場合はステップS506へ移行し、近づいている場合はステップS505へ移行する。   In step S504, the processing unit 2 compares the tracking result (particularly the position of the tracking target area) acquired in step S501 with the tracking result (particularly the position of the tracking target area) acquired in the previous frame. Determine if you are away from the center. If it is away, the process proceeds to step S506, and if it is approaching, the process proceeds to step S505.

画像中央から遠ざかっている場合は、前のフレームからの制御が適していないと判断し、処理部2は、ステップS506においてパン、チルト、ズームいずれの制御フラグも0にリセットし、さらに、カメラ制御を停止させる(ステップS507)。   If it is away from the center of the image, it is determined that the control from the previous frame is not suitable, and the processing unit 2 resets the pan, tilt, and zoom control flags to 0 in step S506, and further performs camera control. Is stopped (step S507).

ステップS505において、処理部2は、ステップS501で取得した追跡結果に基づいて、それまでの追尾対象の進行方向や大きさの変化の方向(だんだん拡大していくのか、だんだん縮小していくのか)が変わってしまったかどうかを判定する。進行方向及び大きさの変化共に変化がなければステップS508へ移行し、いずれかが変化している場合はステップS506へ移行する。   In step S505, based on the tracking result acquired in step S501, the processing unit 2 changes the direction of travel and the size of the tracking target up to that point (whether it gradually increases or decreases) Determine if has changed. If there is no change in both the traveling direction and the size, the process proceeds to step S508, and if either has changed, the process proceeds to step S506.

ステップS508において、処理部2は、ズーム制御フラグが1であるか否かを判定することで、現在、ズーム制御の途中であるか否かを判定する。ズーム制御中であればステップS509へ移行し、ズーム制御中でなければステップS511に移行する。   In step S508, the processing unit 2 determines whether or not the zoom control flag is 1, thereby determining whether or not zoom control is currently in progress. If zoom control is being performed, the process proceeds to step S509. If zoom control is not being performed, the process proceeds to step S511.

ステップS509において、処理部2は、ステップS501で取得した追跡結果が、既に予め設定しておいた目標とする大きさの範囲に達しているかどうかを判定する。達している場合はS510へ移行し、達していない場合はステップS511へ移行する。   In step S509, the processing unit 2 determines whether the tracking result acquired in step S501 has reached a target size range that has already been set in advance. If it has reached, the process proceeds to S510, and if not, the process proceeds to Step S511.

ステップS510において、処理部2は、ズームの制御フラグを0にする。これは、予め設定しておいた目標とする大きさの範囲に達しているため、その時点でズーム制御をストップさせることが好ましいためである。   In step S510, the processing unit 2 sets the zoom control flag to 0. This is because the zoom control is preferably stopped at that time because the target size range set in advance has been reached.

ステップS511において、処理部2は、パン制御フラグが1であるか否かを判定することで、現在、パン制御の途中であるか否かを判定する。パン制御中であればステップS512へ移行し、パン制御中でなければステップS514へ移行する。   In step S511, the processing unit 2 determines whether or not the pan control flag is 1, thereby determining whether or not the pan control is currently in progress. If pan control is being performed, the process proceeds to step S512, and if pan control is not being performed, the process proceeds to step S514.

ステップS512において、処理部2は、ステップS501で取得した追跡結果が、既に予め設定しておいた目標とする水平方向の位置の範囲に達しているか否かを判定する。達している場合はステップS513へ移行し、達していない場合はS514へ移行する。   In step S512, the processing unit 2 determines whether or not the tracking result acquired in step S501 has reached the target horizontal position range that has been set in advance. If it has reached, the process proceeds to step S513, and if not, the process proceeds to S514.

ステップS513において、処理部2は、パンの制御フラグを0にする。これは、予め設定しておいた目標とする水平方向の位置の範囲に達しているため、その時点でパン制御をストップさせることが好ましいためである。   In step S513, the processing unit 2 sets the pan control flag to 0. This is because it is preferable to stop the pan control at that time point because the target horizontal position range set in advance has been reached.

ステップS514において、チルト制御フラグが1であるか否かを判定することで、現在、チルト制御の途中であるか否かを判定する。チルト制御中であればステップS515へ移行し、チルト制御中でなければS517へ移行する。   In step S514, it is determined whether or not the tilt control flag is 1, thereby determining whether or not the tilt control is currently in progress. If the tilt control is being performed, the process proceeds to step S515, and if the tilt control is not being performed, the process proceeds to S517.

ステップS515において、処理部2は、S501で取得した追跡結果が、既に予め設定しておいた目標とする垂直方向の位置の範囲に達しているか否かを判定する。達している場合はS516へ移行し、達していない場合はS517へ移行する。   In step S515, the processing unit 2 determines whether or not the tracking result acquired in S501 has reached the target vertical position range that has been set in advance. If it has reached, the process proceeds to S516, and if not, the process proceeds to S517.

ステップS516において、処理部2は、チルトの制御フラグを0にする。これは、予め設定しておいた目標とする垂直方向の位置の範囲に達しているため、その時点でチルト制御をストップさせることが好ましいためである。   In step S516, the processing unit 2 sets the tilt control flag to 0. This is because the tilt control is preferably stopped at that time because the target vertical position range has been set in advance.

ステップS517において、処理部2は、パン制御フラグ、チルト制御フラグ、ズーム制御フラグのいずれかに変更があったか否かを判定する。ステップS510、S513、S516のいずれかを行った場合はS518へ移行し、いずれも行わなかった場合はそのまま制御を続行させるためS519へ移行する。   In step S517, the processing unit 2 determines whether any of the pan control flag, the tilt control flag, and the zoom control flag has been changed. If any one of steps S510, S513, and S516 is performed, the process proceeds to S518. If none is performed, the process proceeds to S519 in order to continue the control.

ステップS518において、処理部2は、制御を変更する。これは、ステップS518に到達するということは、その前の予測によるカメラ1のパン、チルト、ズームの制御と実際の追尾対象の動きに違いが生じていることを示すことになるためである。   In step S518, the processing unit 2 changes the control. This is because reaching step S518 indicates that there is a difference between the control of the pan, tilt and zoom of the camera 1 based on the previous prediction and the actual movement of the tracking target.

ステップS519において、処理部2は、カメラ1から、現在のカメラ1の姿勢(パン、チルト、ズームの位置)を取得する。   In step S <b> 519, the processing unit 2 acquires the current posture of the camera 1 (pan, tilt, zoom position) from the camera 1.

次に、処理部2は、ステップS501で取得した追跡結果と、その前の追跡処理の結果から、nフレーム後の追尾対象領域の位置と大きさを予測する(ステップS520)。nフレーム後とは、例えば、NTSCの信号の場合、(n/30)秒後に相当する。 Then, the processing unit 2, a tracking result obtained in step S501, from the results of the previous tracking process to predict the position and size of the tracking target area after n f frame (step S520). For example, in the case of an NTSC signal, “after n f frames” corresponds to (n f / 30) seconds later.

ここでは、nフレーム後の追尾対象領域の位置と大きさを予測するため、カルマンフィルタを用いる。 Here, a Kalman filter is used to predict the position and size of the tracking target region after n f frames.

ここでは、追尾対象の位置及び大きさの変化が等速であり、かつその変化が滑らかであると仮定して、カルマンフィルタを構成する。カルマンフィルタでは、追尾対象の状態の変化が設定したモデルに厳密に当てはまらないとしても、誤差項があるので近似的に適用できる場合が多い。   Here, the Kalman filter is configured on the assumption that the change in the position and size of the tracking target is constant and the change is smooth. In the Kalman filter, even if the change in the state of the tracking target is not strictly applied to the set model, there are many cases where it can be applied approximately because there is an error term.

時刻kの状態変数ベクトルxを下記の数8のように定義する。 The state variable vector x k at time k is defined as in the following formula 8.

Figure 2009038777
Figure 2009038777

ここで、xと上にドットを付したxは画像における対象矩形の中心の水平座標と速度、yと上にドットを付したyは垂直座標と速度、sと上にドットを付したsは大きさ(矩形の横幅と縦幅の積)とその変化を表す。 Here, y k is the vertical coordinate and velocity, s k and top to dot x k marked with dots on the x k is denoted by the dot target rectangle center horizontal coordinates and velocity of the upper and y k in the image Sk with a represents a size (product of a horizontal width and a vertical width of a rectangle) and its change.

この状態ベクトルとカメラ1の制御、誤差を考慮したシステム方程式は、下記の数9で定義される。   A system equation in consideration of the control of the state vector, the camera 1, and the error is defined by the following equation (9).

Figure 2009038777
Figure 2009038777

数9において、Aは下記の数10に示す定数行列である。   In Equation 9, A is a constant matrix shown in Equation 10 below.

Figure 2009038777
Figure 2009038777

入力画像の横幅をWsrc、縦幅をHsrc、時刻kにおける水平画角をθ、垂直画角をφ、カメラのパン角速度を上にドットを付したP、チルト角速度を上のドットを付したTとすると、各時刻でパン・チルト制御による画素の水平・垂直方向の変化量は下記の数11及び数12でそれぞれで表される。 The horizontal width of the input image is W src , the vertical width is H src , the horizontal angle of view at time k is θ k , the vertical angle of view is φ k , the pan angle speed of the camera is P k , and the tilt angular speed is up When T k marked with dots, horizontal and vertical variation of the pixel by the pan-tilt control at each time it is represented by the respective by the number 11 and number 12 below.

Figure 2009038777
Figure 2009038777

Figure 2009038777
Figure 2009038777

なお、ズーム操作による画角の変化をλとすると、λは下記の数13で表すことができる。   If the change in the angle of view by the zoom operation is λ, λ can be expressed by the following equation (13).

Figure 2009038777
Figure 2009038777

以上の要素から、制御ベクトルuは下記の数14で与えられる。uはカメラ制御による画像の変動を表す制御ベクトルである。 From the above elements, the control vector u k is given by the number 14 below. u k is a control vector which represents the variation of the image by the camera control.

Figure 2009038777
Figure 2009038777

はシステム誤差であり、下記の数15で示すように、共分散行列Qかつ平均0の正規白色過程に従う。 w k is a system error, and follows a normal white process with a covariance matrix Q k and an average of 0, as shown in Equation 15 below.

Figure 2009038777
Figure 2009038777

ここでは、先に述べた追跡処理から得た、追尾対象を囲む矩形の位置と大きさを観測値とし、時刻kの観測ベクトルを下記の数16のように定義する。   Here, the position and size of the rectangle surrounding the tracking target obtained from the tracking process described above are taken as observation values, and the observation vector at time k is defined as in the following equation (16).

Figure 2009038777
Figure 2009038777

観測方程式は、下記の数17で表される。   The observation equation is expressed by the following Expression 17.

Figure 2009038777
Figure 2009038777

ここでHは下記の数18に示す定数行列である。また、数19で示すように、観測誤差vは共分散行列Rかつ平均0の正規白色過程に従う。 Here, H is a constant matrix shown in Equation 18 below. Further, as shown in Equation 19, the observation error v k follows a normal white process having a covariance matrix R k and an average of 0.

Figure 2009038777
Figure 2009038777

Figure 2009038777
Figure 2009038777

カルマンフィルタでは、現在時刻の観測量と1期前の状態量を用いて、現在時刻の推定量を推定する。システムの現在時刻kの状態は下記の数20で示す2つの変数で表される。なお、本明細書において、記号の上に付した符号^は、推定値を意味している。   In the Kalman filter, the estimated amount of the current time is estimated using the observed amount of the current time and the state amount of the previous period. The state of the current time k of the system is represented by two variables represented by the following equation (20). In addition, in this specification, the code | symbol ^ attached | subjected on the symbol means the estimated value.

Figure 2009038777
Figure 2009038777

カルマンフィルタは、時間ステップをひとつ進めるために予測と更新の二つの手続きを行う。予測の手続きでは、前の時刻の推定状態から、現在時刻の推定状態を計算する。更新では、今の時刻の観測を用い、推定値を補正することで、より正確な状態を推定する。   The Kalman filter performs two procedures, prediction and update, to advance one time step. In the prediction procedure, the estimated state of the current time is calculated from the estimated state of the previous time. In the update, a more accurate state is estimated by using the observation at the current time and correcting the estimated value.

予測に関し、現在時刻の推定値は下記の数21で表され、現在時刻の誤差の共分散行列は下記の数22で表される。   Regarding the prediction, the estimated value of the current time is expressed by the following formula 21, and the covariance matrix of the error of the current time is expressed by the following formula 22.

Figure 2009038777
Figure 2009038777

Figure 2009038777
Figure 2009038777

更新に関し、カルマンフィルタは、更新後の誤差の推定値を最小にするカルマンゲインを下記の数23〜数27により計算し、状態を更新していく。   Regarding the update, the Kalman filter calculates a Kalman gain that minimizes the estimated value of the error after the update using the following equations 23 to 27, and updates the state.

Figure 2009038777
Figure 2009038777

Figure 2009038777
Figure 2009038777

Figure 2009038777
Figure 2009038777

Figure 2009038777
Figure 2009038777

Figure 2009038777
Figure 2009038777

以上の計算により、誤差を考慮した現在時刻の状態量を推定することができる。   With the above calculation, it is possible to estimate the state quantity at the current time in consideration of the error.

ここで、カルマンフィルタの初期条件の設定について説明する。追跡開始の際の追尾対象矩形の中心座標を(x,y)、大きさをsとすると、状態の初期値は下記の数28のようになる。ここで、速度は0としている。 Here, setting of initial conditions of the Kalman filter will be described. Assuming that the center coordinates of the tracking target rectangle at the start of tracking are (x 0 , y 0 ) and the size is s 0 , the initial value of the state is as shown in Equation 28 below. Here, the speed is zero.

Figure 2009038777
Figure 2009038777

初期条件に誤差があるなら、誤差の共分散行列を下記の数29のように与える。   If there is an error in the initial conditions, an error covariance matrix is given as in Equation 29 below.

Figure 2009038777
Figure 2009038777

フィルタの特性はシステム誤差と観測誤差の分散比であり、この分散比が大きいほどフィルタ処理後の推定値は元の観測値に忠実となるが誤差に敏感となり、小さいほど平滑化されるがデータに対する追従性が落ちる。本実施の形態では、対象人物の移動方向の変化、立ち止まりなどに迅速に対応できるが、追跡結果に含まれる誤差には影響を受けにくい程度の分散比を経験的に用いる。   The characteristic of the filter is the variance ratio between the system error and the observation error. The larger the variance ratio, the more accurate the estimated value after filtering is, but the more sensitive the error is. Follow-up performance against is reduced. In the present embodiment, it is possible to quickly cope with a change in the moving direction of the target person, a stoppage, and the like, but a dispersion ratio that is not easily affected by an error included in the tracking result is empirically used.

以上、図9中のステップS520の処理で用いるカルマンフィルタについて説明した。   The Kalman filter used in the process of step S520 in FIG. 9 has been described above.

ステップS520の後に、処理部2は、ステップS520の予測によって得られたnフレーム後の追尾対象の大きさと目標とすべき追尾対象の大きさsから、nフレーム後の水平画角または垂直画角を算出する(ステップS521)。ただし、下記の数30は水平画角を算出するものである。 After step S520, the processing unit 2 calculates the horizontal angle of view after n f frames from the size of the tracking target after n f frames obtained by the prediction at step S520 and the size of the tracking target to be targeted s i. A vertical angle of view is calculated (step S521). However, the following Equation 30 is used to calculate the horizontal angle of view.

Figure 2009038777
Figure 2009038777

次に、処理部2は、ステップS521で算出された水平画角がズームの限界に達しているか否かを判定する(ステップS522)。ズームの限界に達している場合はステップS549へ移行する。ただし、ズームアウトで限界に達している場合はステップS523へ移行する。ズームイン、ズームアウトのいずれも限界に達していない場合はステップS523へ移行する。   Next, the processing unit 2 determines whether or not the horizontal angle of view calculated in step S521 has reached the zoom limit (step S522). If the zoom limit has been reached, the process proceeds to step S549. However, when the limit is reached in zooming out, the process proceeds to step S523. If neither zoom-in nor zoom-out has reached the limit, the process proceeds to step S523.

ステップS523において、処理部2は、S521で得られた結果から現在の水平画角と比較し、ズームの制御量は所定値より小さいか否かを判定する。小さければS524へ移行し、大きければS526へ移行する。   In step S523, the processing unit 2 compares the current horizontal angle of view from the result obtained in S521, and determines whether or not the zoom control amount is smaller than a predetermined value. If it is smaller, the process proceeds to S524, and if it is larger, the process proceeds to S526.

ステップS524において、処理部2は、ズーム制御速度を0にセットする。引き続いて、処理部2は、ズーム制御フラグを0にセットし(ステップS525)、ステップS530へ移行する。これらにより、ズームの制御を行わない。このように、ズームの制御量が小さい場合は、ズームの制御を行わない。ズームの制御量が小さい場合、ズームの制御を行うと、細かい動きをすることになるので、表示部5を監視する監視者に不快感を与える可能性があるためである。   In step S524, the processing unit 2 sets the zoom control speed to zero. Subsequently, the processing unit 2 sets the zoom control flag to 0 (step S525), and proceeds to step S530. Thus, zoom control is not performed. Thus, when the control amount of zoom is small, zoom control is not performed. This is because when the zoom control amount is small, if the zoom control is performed, a fine movement is caused, which may cause discomfort to the monitor who monitors the display unit 5.

ステップS526において、ズームの制御速度Zspeedを下記の数31により算出する。ここで、fはフレームレート(NTSCの場合はf=30)を示す。また、Zptは水平画角が時刻tのときのズームポジションである。 In step S526, the zoom control speed Z speed is calculated by the following equation (31). Here, f r indicates a frame rate (in the case of NTSC, f r = 30). Z pt is the zoom position when the horizontal angle of view is time t.

Figure 2009038777
Figure 2009038777

その後、処理部2は、ステップS526で算出されたズームの制御速度Zspeedと現在制御中の速度との間の差が所定値より大きいか否かを判定する(ステップS527)。差が大きければステップS528へ移行し、差が小さければステップS529へ移行する。ここでも、差が一定値以上大きくなければズームの制御速度の変更を行わないのは、表示部5を目視監視する監視者にとってズームの制御速度が頻繁に変化することは不快感につながる可能性があるので、これを回避するためである。また、追尾対象は画像中の真ん中近くにあればよく、画像中心と全くずれがない状態を維持することが目的ではない。 Thereafter, the processing unit 2 determines whether or not the difference between the zoom control speed Z speed calculated in step S526 and the speed currently being controlled is greater than a predetermined value (step S527). If the difference is large, the process proceeds to step S528, and if the difference is small, the process proceeds to step S529. Again, if the difference is not greater than a certain value, the zoom control speed is not changed because the frequent change of the zoom control speed may cause discomfort for the observer who visually monitors the display unit 5. This is to avoid this. In addition, the tracking target only needs to be near the center of the image, and the purpose is not to maintain a state in which there is no deviation from the center of the image.

ステップS528において、処理部2は、ステップS526で算出されたズームの制御速度の値に変更する。その後、ステップS529へ移行する。   In step S528, the processing unit 2 changes the zoom control speed value calculated in step S526. Thereafter, the process proceeds to step S529.

ステップS529において、処理部2は、ズーム制御フラグを1に設定する。その後、ステップS530へ移行する。   In step S529, the processing unit 2 sets the zoom control flag to 1. Thereafter, the process proceeds to step S530.

ステップS530において、処理部2は、ステップS520の予測で得られた結果から、パンの制御量は所定値より小さいか否かを判定する。小さければステップS531へ移行し、大きければステップS533へ移行する。   In step S530, the processing unit 2 determines whether or not the pan control amount is smaller than a predetermined value from the result obtained by the prediction in step S520. If so, the process proceeds to step S531, and if greater, the process proceeds to step S533.

ステップS531において、処理部2は、パンの制御速度を0にセットする。引き続いて、処理部2は、パン制御フラグを0にセットし(ステップS532)、ステップS538へ移行する。これらにより、パンの制御を行わない。このように、パンの制御量が小さい場合は、パンの制御を行わない。パンの制御量が小さい場合、パンの制御を行うと、細かい動きをすることになるので、表示部5を監視する監視者に不快感を与える可能性があるためである。   In step S531, the processing unit 2 sets the pan control speed to zero. Subsequently, the processing unit 2 sets the pan control flag to 0 (step S532), and proceeds to step S538. Thus, pan control is not performed. Thus, when the pan control amount is small, pan control is not performed. This is because if the pan control amount is small, if the pan control is performed, a fine movement occurs, which may cause discomfort to the monitor who monitors the display unit 5.

ステップS533において、処理部2は、パンの制御速度Pspeedを下記の数32により算出する。ここでWsrcは入力画像の横幅である。 In step S <b> 533, the processing unit 2 calculates the pan control speed P speed by the following equation 32. Here, W src is the horizontal width of the input image.

Figure 2009038777
Figure 2009038777

その後、処理部2は、ステップS533で算出されたパンの制御速度Pspeedでパンを制御した仮定した場合において、nフレーム分時間が経過したとき(n/f秒後)のパンの位置を計算し、その値がパンの限界に達するか又はパンの限界を超えた値となるか否かを判定する(ステップS534)。その値がパンの限界に達するか又はパンの限界を超えた値となる場合は、ステップS549へ移行し、そうではない場合はステップS535へ移行する。 Thereafter, the processing unit 2 assumes that the pan is controlled at the pan control speed P speed calculated in step S533, and when the time corresponding to n f frames has elapsed (after n f / f r seconds), The position is calculated, and it is determined whether or not the value reaches the panning limit or exceeds the panning limit (step S534). If the value reaches the panning limit or exceeds the panning limit, the process proceeds to step S549, and if not, the process proceeds to step S535.

ステップS535において、処理部2は、ステップS533で算出されたパンの制御速度Pspeedと現在制御中の速度との差が所定値より大きいか否かを判定する。差が大きければステップS536へ移行し、差が小さければステップS537へ移行する。 In step S535, the processing unit 2 determines whether or not the difference between the pan control speed P speed calculated in step S533 and the speed currently being controlled is greater than a predetermined value. If the difference is large, the process proceeds to step S536, and if the difference is small, the process proceeds to step S537.

ステップS536において、処理部2は、ステップS536で算出されたパンの制御速度の値に変更する。その後ステップS537へ移行する。   In step S536, the processing unit 2 changes the pan control speed value calculated in step S536. Thereafter, the process proceeds to step S537.

ステップS537において、処理部2は、パン制御フラグを1に設定する。その後、ステップS538へ移行する。   In step S537, the processing unit 2 sets the pan control flag to 1. Thereafter, the process proceeds to step S538.

ステップS538において、処理部2は、ステップS520の予測で得られた結果から、チルトの制御量は所定値より小さいかどうかを判定する。小さければステップS539へ移行し、大きければステップS541へ移行する。   In step S538, the processing unit 2 determines whether the tilt control amount is smaller than a predetermined value from the result obtained in the prediction in step S520. If it is smaller, the process proceeds to step S539, and if it is larger, the process proceeds to step S541.

ステップS539において、処理部2は、チルトの制御速度を0にセットする。引き続いて、処理部2は、チルト制御フラグを0にセットし(ステップS540)、ステップS546へ移行する。これらにより、チルトの制御を行わない。このように、チルトの制御量が小さい場合は、チルトの制御を行わない。チルトの制御量が小さい場合、チルトの制御を行うと、細かい動きをすることになるため表示部5を監視する監視者に不快感を与える可能性があるためである。   In step S539, the processing unit 2 sets the tilt control speed to zero. Subsequently, the processing unit 2 sets the tilt control flag to 0 (step S540), and proceeds to step S546. Thus, tilt control is not performed. Thus, when the amount of tilt control is small, tilt control is not performed. This is because when the tilt control amount is small, if the tilt control is performed, a fine movement is caused, which may cause discomfort to the monitor who monitors the display unit 5.

ステップS541において、処理部2は、チルトの制御速度Tspeedを下記の数33により算出する。ここでHsrcは入力画像の高さ(縦方向の長さ)である。 In step S <b> 541, the processing unit 2 calculates the tilt control speed T speed by the following equation 33. Here, H src is the height (length in the vertical direction) of the input image.

Figure 2009038777
Figure 2009038777

その後、処理部2は、S541で算出されたチルトの制御速度Tspeedでチルトを制御したと仮定した場合において、nフレーム分時間が経過したとき(n/f秒後)のチルトの位置を計算し、その値がチルトの限界に達するか又はチルトの限界を超えた値となる否かを判定する(ステップS542)。その値がチルトの限界に達するか又はチルトの限界を超えた値となる場合は、ステップS549へ移行し、そうではない場合はステップS543へ移行する。 Thereafter, the processing unit 2 assumes that the tilt is controlled at the tilt control speed T speed calculated in S541, and when the time corresponding to n f frames has elapsed (after n f / f r seconds), The position is calculated, and it is determined whether or not the value reaches the tilt limit or exceeds the tilt limit (step S542). If the value reaches the tilt limit or exceeds the tilt limit, the process proceeds to step S549, and if not, the process proceeds to step S543.

ステップS543において、処理部2は、ステップS541で算出されたチルトの制御速度Tspeedと現在制御中の速度との差が所定値より大きいか否かを判定する。差が大きければS544へ移行し、差が小さければS545へ移行する。 In step S543, the processing unit 2, the difference between the control speed T speed of the calculated tilt as the speed of the current control in Step S541 is equal to or greater than a predetermined value. If the difference is large, the process proceeds to S544, and if the difference is small, the process proceeds to S545.

ステップS544において、処理部2は、ステップS541で算出されたチルトの制御速度の値に変更する。その後ステップS545へ移行する。   In step S544, the processing unit 2 changes the value of the tilt control speed calculated in step S541. Thereafter, the process proceeds to step S545.

ステップS545において、処理部2は、チルト制御フラグを1に設定する。その後、ステップS546へ移行する。   In step S545, the processing unit 2 sets the tilt control flag to 1. Thereafter, the process proceeds to step S546.

ステップS546において、処理部2は、全ての制御フラグ(パン制御フラグ、チルト制御フラグ、ズーム制御フラグ)が0であるか否かを判定する。全ての制御フラグが0であれば、制御しないことになるため、ステップS547を経ることなくステップS548へ移行する。いずれか1つ以上の制御フラグが1であれば、ステップS547へ移行する。   In step S546, the processing unit 2 determines whether or not all control flags (pan control flag, tilt control flag, zoom control flag) are zero. If all the control flags are 0, control is not performed, and the process proceeds to step S548 without passing through step S547. If any one or more control flags are 1, it will transfer to step S547.

ステップS547において、処理部2は、1になっている制御フラグ及びこれに対応する制御速度に応じた制御を行うようにカメラ1に制御指令を与える。その制御は、その速度に応じてn/f秒間行うが、このループを出てステップS548へ移行するのは制御が完了するのを待たないでよい。なお、本実施の形態では、制御フラグ自体によって制御指令がカメラ1に与えられるわけではなく、ステップS547のような動作によって制御フラグ及び制御速度に応じた制御指令がカメラ1に与えられるようになっている。 In step S547, the processing unit 2 gives a control command to the camera 1 so as to perform control according to the control flag that is 1 and the control speed corresponding thereto. Its control is performed n f / f r seconds depending on the speed, may no wait for the control to complete the process proceeds to step S548 exits this loop. In the present embodiment, a control command is not given to the camera 1 by the control flag itself, but a control command according to the control flag and the control speed is given to the camera 1 by the operation as in step S547. ing.

ステップS548において、処理部2は、追尾限界フラグを0(0は、パン、チルト、ズームのいずれもが限界に達する可能性がないことを示す)にする。これは、パン、チルト、ズームのいずれもが限界に達する可能性がない場合に、ステップS548に到達するためである。ステップS548の後、カメラ制御処理(ステップS7)を終了して、図3中のステップS9へ移行する。   In step S548, the processing unit 2 sets the tracking limit flag to 0 (0 indicates that none of pan, tilt, and zoom can reach the limit). This is because step S548 is reached when none of pan, tilt, and zoom can reach the limit. After step S548, the camera control process (step S7) is terminated, and the process proceeds to step S9 in FIG.

ステップS549において、処理部2は、追尾限界フラグを1(1は、パン、チルト、ズームのいずれかが限界に達する可能性があることを示す)にする。これは、パン、チルト、ズームの少なくともひとつが限界に達する可能性がある場合に、ステップS549に到達するためである。ステップS549の後、ステップS550において、処理部2は、カメラ1の姿勢制御中であれば、その制御を停止する。ステップS550の後、カメラ制御処理(ステップS7)を終了して、図3中のステップS9へ移行する。   In step S549, the processing unit 2 sets the tracking limit flag to 1 (1 indicates that any of pan, tilt, and zoom may reach the limit). This is because step S549 is reached when there is a possibility that at least one of pan, tilt, and zoom may reach the limit. After step S549, in step S550, the processing unit 2 stops the control if the posture control of the camera 1 is being performed. After step S550, the camera control process (step S7) is terminated, and the process proceeds to step S9 in FIG.

再び図3を参照すると、ステップS9において、処理部2は、追尾限界フラグが1であるか否かを判定する。追尾限界フラグが1であれば、追尾対象の追尾の継続が困難であると判断し、ステップS1(プリセット状態)に戻る。追尾限界フラグが0であれば、追尾対象の追尾の継続が可能であるので、ステップS5へ戻って、追尾対象の追尾を継続する。   Referring to FIG. 3 again, in step S9, the processing unit 2 determines whether or not the tracking limit flag is 1. If the tracking limit flag is 1, it is determined that it is difficult to continue tracking of the tracking target, and the process returns to step S1 (preset state). If the tracking limit flag is 0, it is possible to continue tracking the tracking target, so the process returns to step S5 to continue tracking the tracking target.

本実施の形態によれば、カメラ1により撮像された画像に基づいてシングルパートモードとマルチパートモードのいずれかが選択され、選択されたモードで追跡処理が行われるので、常にシングルパートモードを行う場合に比べて、より多くの情報に基づいて追跡処理が行われるので、例えば人物同士の区別や人物と背景の区別が困難な追尾対象に対してもより精度良く追跡処理を行うことができ、ひいては、追尾対象をより精度良く追尾して撮像することができる。   According to the present embodiment, either the single-part mode or the multi-part mode is selected based on the image captured by the camera 1, and the tracking process is performed in the selected mode. Therefore, the single-part mode is always performed. Compared to the case, since tracking processing is performed based on more information, for example, it is possible to perform tracking processing with higher accuracy even for tracking targets where it is difficult to distinguish between people or between a person and the background, As a result, the tracking target can be tracked with higher accuracy and imaged.

本発明者は、本実施の形態による自動追尾装置を試作した。また、第1の比較例に係る自動追尾装置として、本実施の形態による自動追尾装置を常にシングルパートモードのみを行うように改変した自動追尾装置を試作した。さらに、第2の比較例に係る自動追尾装置として、本実施の形態による自動追尾装置を常にマルチパートヒストグラムのみを行うように改変した自動追尾装置を試作した。そして、これらの自動追尾装置で同一の映像について追尾対象の追跡が成功したフレーム数を得た。そして、その映像の種類を種々に変更した。その結果、第1の比較例と第2の比較例とでは、映像の種類によって、第1の比較例の方が第2の比較例よりも追尾対象の追跡が成功したフレーム数が多くなったり、第2の比較例の方が第1の比較例よりも追尾対象の追跡が成功したフレーム数が多くなったりした。これに対し、本実施の形態による自動追尾装置に相当する試作装置で追跡が成功したフレーム数は、いずれの種類の映像についても、第1の比較例と第2の比較例のうち追跡が成功したフレーム数が多い方の比較例で追跡が成功したフレーム数と、ほぼ同数であった。したがって、本実施の形態による自動追尾装置に相当する試作装置では、前記第1及び第2の比較例のいずれよりも、より精度良く追尾対象を追尾することができることが確認された。   The inventor made a prototype of the automatic tracking device according to the present embodiment. In addition, as an automatic tracking device according to the first comparative example, an automatic tracking device in which the automatic tracking device according to the present embodiment is modified so as to always perform only the single part mode was prototyped. Furthermore, as an automatic tracking device according to the second comparative example, an automatic tracking device in which the automatic tracking device according to the present embodiment is modified so as to always perform only the multipart histogram is experimentally manufactured. Then, the number of frames in which tracking of the tracking target was successfully performed for the same video with these automatic tracking devices was obtained. And the kind of the image was changed variously. As a result, in the first comparative example and the second comparative example, depending on the type of video, the first comparative example may have more successfully tracked tracking targets than the second comparative example. The number of frames in which the tracking target was successfully tracked in the second comparative example was larger than that in the first comparative example. On the other hand, the number of frames successfully tracked by the prototype device corresponding to the automatic tracking device according to this embodiment is tracked successfully in the first comparative example and the second comparative example for any type of video. The number of frames that were successfully tracked in the comparative example with the larger number of frames was almost the same. Therefore, it was confirmed that the prototype device corresponding to the automatic tracking device according to the present embodiment can track the tracking target with higher accuracy than any of the first and second comparative examples.

また、本実施の形態では、特徴量としてヒストグラムが採用されているので、追尾対象の大きさや形状の変化に強くなり、カメラ1の制御による画像変動に影響を受け難くなる。   Further, in the present embodiment, since a histogram is adopted as the feature amount, the histogram is resistant to changes in the size and shape of the tracking target, and is less susceptible to image fluctuations caused by control of the camera 1.

さらに、本実施の形態によれば、パーティクルフィルタにより追跡結果として追尾対象領域の位置及び大きさを推定するので、複数の解の候補(複数のパーティクル)を持つので追跡失敗から回復する可能性が高くなり、オクルージョンや複雑な背景などに対して強く、より精度良く追跡処理を行うことができ、ひいては、追尾対象をより精度良く追尾して撮像することができる。さらにまた、本実施の形態によれば、追尾対象領域の位置及び大きさをパラメータとしたパーティクル(サンプル)が用いられているので、追尾対象の大きさも同時に決定することが可能となり、パン、チルト、ズームが制御された画像であっても安定した追尾が可能となる。   Furthermore, according to the present embodiment, since the position and size of the tracking target region are estimated as a tracking result by the particle filter, there is a possibility of recovery from the tracking failure because there are a plurality of solution candidates (a plurality of particles). It becomes high and is strong against occlusion and complicated background, and can perform tracking processing with higher accuracy. As a result, the tracking target can be tracked with higher accuracy and imaged. Furthermore, according to the present embodiment, since particles (samples) using the position and size of the tracking target region as parameters are used, the size of the tracking target can be determined at the same time, and pan, tilt Thus, stable tracking is possible even for an image whose zoom is controlled.

また、本実施の形態によれば、カメラ制御処理において予測制御が導入されているので、例えば、カメラ1が制御指令に対して応答してその指令状態になるまでの動作時間が画像処理時間に比べて長い場合であっても、追尾対象の急な動きの変化などにも対応することができ、追尾対象をより精度良く追尾して撮像することができる。なお、カメラのパン、チルト、ズームの制御速度があまりに速過ぎると、追尾対象を監視者が目で追う際に、カメラのパン、チルト、ズームの変化があまりに急激になってしまい、監視者に不快感を与えてしまい監視に適さなくなってしまうが、カメラ1として制御速度が比較的遅いものを使用することができるので、カメラ1のパン、チルト、ズームの変化をスムーズにして監視により適した追尾を実現することができる。   Further, according to the present embodiment, since predictive control is introduced in the camera control process, for example, the operation time until the camera 1 responds to the control command and enters the command state is the image processing time. Even if it is longer than this, it is possible to cope with a sudden change in the tracking target, and it is possible to track and image the tracking target with higher accuracy. Note that if the camera pan, tilt, and zoom control speeds are too fast, the camera pan, tilt, and zoom will change too rapidly when the observer follows the tracking target. Although it is uncomfortable and not suitable for monitoring, a camera with a relatively slow control speed can be used as the camera 1, so that the panning, tilting and zooming changes of the camera 1 are smoothed and more suitable for monitoring. Tracking can be realized.

さらに、本実施の形態によれば、このような予測にカルマンフィルタが用いられているので、追尾対象領域の位置及び大きさを精度良く予測することができ、ひいては、追尾対象をより精度良く追尾して撮像することができる。   Furthermore, according to the present embodiment, since the Kalman filter is used for such prediction, the position and size of the tracking target region can be predicted with high accuracy, and thus the tracking target can be tracked with higher accuracy. Can be taken.

なお、本実施の形態では、CIE1976L色空間における明度指数ヒストグラム及び知覚色度指数ヒストグラムをそれぞれ正規化したものを結合して1次元化して得たヒストグラムが、特徴量として常に用いられている。しかしながら、本発明では、例えば、特徴量として、環境や時間帯(昼間と夜間など)等に応じて、明度指数ヒストグラムのみ(このとき、知覚色度指数ヒストグラムの階級数が減る分、明度指数ヒストグラムの階級数を増加させてもよい。)と、明度指数ヒストグラム(1次元)と知覚色度指数ヒストグラム(2次元)の組み合わせとを、自動的に選択的に使用するようにしてもよい。 In the present embodiment, a histogram obtained by combining the normalized values of the lightness index histogram and the perceptual chromaticity index histogram in the CIE1976L * u * v * color space and making them one-dimensional is always used as the feature amount. It has been. However, in the present invention, for example, as a feature quantity, only the brightness index histogram (in this case, the brightness index histogram corresponding to the decrease in the number of classes of the perceptual chromaticity index histogram, depending on the environment, time zone (daytime, nighttime, etc.), etc. The combination of the brightness index histogram (one-dimensional) and the perceptual chromaticity index histogram (two-dimensional) may be automatically and selectively used.

ところで、本実施の形態では、追尾対象領域を上下に2分割していたが、前述したように、その分割数等も2分割に限定されるものではない。例えば、必要に応じて、更に2分割するなどしても構わない。例えば、図13に示すような分割の仕方を予め与えておく。まずは、領域pを領域p11,p12に分割し、これらの領域p11,p12についてBhattacharyya距離を算出する。この分割が適当であると判断された場合、p11はp21とp22に、p12はp31とp32に分割をし、同様にBhattacharyya距離を算出する。p21とp22はこれ以上分割しないと予め決まっている場合は、ここで止めればよい。p32を更に分割してp41,p42に分割できたとしても、p31はBhattacharyya距離の値からこれ以上分割できないと判断されれば、p32だけを分割しても良い。このようにして、予め決めておいた分割方法でその都度分割方法を変えても良い。なお、図13は、領域の分割パターンの例を模式的に示す図である。 By the way, in the present embodiment, the tracking target area is vertically divided into two, but as described above, the number of divisions and the like is not limited to two. For example, it may be further divided into two as required. For example, a division method as shown in FIG. 13 is given in advance. First, divide the area p 0 in the region p 11, p 12, and calculates the Bhattacharyya distance for these areas p 11, p 12. If this division is determined to be appropriate, p 11 to p 21 and p 22, p 12 is divided into p 31 and p 32, likewise calculates the Bhattacharyya distance. If p 21 and p 22 are determined in advance not to be divided any more, they can be stopped here. Even if p 32 can be further divided into p 41 and p 42 , if it is determined that p 31 cannot be further divided from the value of the Bhattacharyya distance, only p 32 may be divided. In this way, the division method may be changed each time using a predetermined division method. FIG. 13 is a diagram schematically illustrating an example of the division pattern of the region.

本実施の形態では、前述したように、シングルパートモードと分割数を2としたマルチパートヒストグラムとを選択して用いていたが、例えば先に示した図13の場合は、前述したフローチャートの一部(特に、図6中の一部)が図14のようになり、相違度計算は以下の通りとなる。   In the present embodiment, as described above, the single part mode and the multipart histogram with the number of divisions of 2 are selected and used. For example, in the case of FIG. The part (particularly, part of FIG. 6) is as shown in FIG. 14, and the difference calculation is as follows.

参照領域pを構成する領域は、図13からp21,p22,p31,p41,p42の5つの領域で構成されていることになる。各領域のBhattacharyya距離をd (n),d (n),・・・,d (n)とすると、下記数34に示す通りとなる。 The region constituting the reference region p 0 is composed of five regions p 21 , p 22 , p 31 , p 41 , and p 42 from FIG. If the Bhattacharyya distance of each region is d 1 (n) , d 2 (n) ,..., D 5 (n) , the following equation 34 is obtained.

Figure 2009038777
Figure 2009038777

相違度d(n)は、数34に示す5つのBhattacharyya距離から、下記数35で与えられる。 The degree of difference d (n) is given by the following formula 35 from the five Bhattacharyya distances shown in formula 34.

Figure 2009038777
Figure 2009038777

[第2の実施の形態]   [Second Embodiment]

図15乃至図17は、本発明の第2の実施の形態による自動追尾装置の処理部2が行う図3中の追跡処理の本処理(ステップS5)を詳細に示すフローチャートである。   FIGS. 15 to 17 are flowcharts showing in detail the main process (step S5) of the tracking process in FIG. 3 performed by the processing unit 2 of the automatic tracking device according to the second embodiment of the present invention.

本実施の形態が前記第1の実施の形態と異なる所は、処理部2が、図3中の追跡処理の本処理(ステップS5)として、図6及び図7に示す処理を行う代わりに、図15乃至図17に示す処理を行う点のみである。   This embodiment differs from the first embodiment in that the processing unit 2 performs the processing shown in FIGS. 6 and 7 as the main processing (step S5) of the tracking processing in FIG. Only the processing shown in FIGS. 15 to 17 is performed.

図6及び図7に示す処理では、領域の縦横比は一定であるものの、位置と大きさを任意としてパーティクル(サンプル)をばら撒いている。この場合、位置をkパターン、各位置に対して大きさをjパターンとした場合、パーティクルの数はk×jとなる。もし、計算機の処理能力などの関係上、図6及び図7のようなフローチャートが必ずしも適切でない場合は、図15乃至図17のフローチャートのように、位置をkパターンのパーティクルで推定し、その後に大きさjパターンのパーティクルで推定するという処理でも、図3中の追跡処理の本処理(ステップS5)の実現は可能である。このとき、パーティクルの数は合計k+jとなり、計算量を低減して処理時間を短縮することができる。   In the processing shown in FIGS. 6 and 7, the aspect ratio of the region is constant, but the particles (samples) are dispersed at any position and size. In this case, if the position is k pattern and the size is j pattern for each position, the number of particles is k × j. If the flowcharts shown in FIGS. 6 and 7 are not always appropriate due to the processing capacity of the computer, etc., the position is estimated with k pattern particles as shown in the flowcharts of FIGS. Even in the process of estimating with particles having a size j pattern, the main process (step S5) of the tracking process in FIG. 3 can be realized. At this time, the total number of particles is k + j, and the amount of calculation can be reduced to shorten the processing time.

本実施の形態のように2段階に分けて追尾対象領域の位置及び大きさを推定する方式は、処理時間が早くなるメリットはあるが、前記第1の実施の形態に比べると、追跡処理の精度が低下する可能性がある。よって、本実施の形態は、追尾対象の動きがそれほど早くなく、画面上での追尾対象の移動量が少ないと想定される場合に特に有効である。移動量が大きいと、大きさの変化も大きくなる可能性があるため、図15乃至図17のような2段階に分けた処理は適していない。   Although the method of estimating the position and size of the tracking target area in two stages as in the present embodiment has the advantage of shortening the processing time, the tracking process is more efficient than in the first embodiment. Accuracy may be reduced. Therefore, this embodiment is particularly effective when the movement of the tracking target is not so fast and the movement amount of the tracking target on the screen is assumed to be small. If the amount of movement is large, there is a possibility that the change in size may become large, and therefore, the processing divided into two stages as shown in FIGS. 15 to 17 is not suitable.

以下、図15乃至図17に示す処理について説明する。   The processing shown in FIGS. 15 to 17 will be described below.

追跡処理の本処理(ステップS5)を開始すると、図15に示すように、処理部2は、まず、1枚の画像をサンプリングする(ステップS400)。   When the tracking process is started (step S5), as shown in FIG. 15, the processing unit 2 first samples one image (step S400).

次に、処理部2は、画像内の予め設定した所定の幅で所定の高さを有する領域Rを追尾対象10の探索範囲として、領域R内に、追尾対象領域(本実施の形態では、矩形)の位置(例えば、重心)をパラメータとしたN個のサンプル(パーティクル)をばら撒く(ステップS401)。各サンプルの位置は、領域R内であれば任意であり、当初はランダムにばら撒かれる。各サンプルの大きさは参照領域と同じ大きさとする。ここで、参照領域は、図3中の追尾対象検知処理(ステップS2)後の最初に行われる本処理(ステップS5)におけるステップS307の処理では、図4中のステップS110で検知された追尾対象10に応じた領域である追尾対象領域(本実施の形態では、外接矩形領域)である。また、2回目以降の本処理(ステップS5)におけるステップS401の処理では、参照領域は、前回の本処理(ステップS5)におけるステップS442で推定された追尾対象領域である。なお、図3中の追尾対象検知処理(ステップS2)後の最初に行われる本処理(ステップS5)におけるステップS401の処理では、サンプルをN個ばら撒くが、2回目以降の本処理(ステップS5)におけるステップS401の処理では、N個から前回の本処理(ステップS5)で残ったサンプルの数を引いた不足分を追加してばら撒く。 Next, the processing unit 2 uses a region R having a predetermined height and a predetermined height in the image as a search range of the tracking target 10, and includes the tracking target region (in this embodiment, in the present embodiment). position of the rectangle) (e.g., the N p samples that the center of gravity) as parameters (particle) rose seeded (step S401). The position of each sample is arbitrary as long as it is within the region R, and is initially randomly distributed. The size of each sample is the same as the reference area. Here, the reference region is the tracking target detected in step S110 in FIG. 4 in the process of step S307 in the main process (step S5) performed first after the tracking target detection process (step S2) in FIG. 10 is a tracking target area (in the present embodiment, a circumscribed rectangular area). In the process of step S401 in the second and subsequent main processes (step S5), the reference area is the tracking target area estimated in step S442 in the previous main process (step S5). Incidentally, a tracking target detecting process in FIG. 3 in the process of step S401 in (step S2) initially present process performed after (step S5), and sample N p number rose sow but second and subsequent of the present process (step in the process of step S401 is in S5), dusted rose by adding the shortage minus the number of remaining samples in the previous present process from N p pieces (step S5).

次に、処理部2は、N個のサンプルに番号を割り当てるため、サンプル番号を意味するカウント値kを1にセットする(ステップS402)。 Next, processing unit 2, to assign a number to N p samples, sets the count value k, which means sample number to 1 (step S402).

次いで、処理部2は、図3中のモード選択処理(ステップS4)で最新に設定されたモードフラグが0であるか否かを判定することで、現在選択されているモードがマルチパートモードであるかシングルパートモードであるかを判定する(ステップS403)。マルチパートモードが選択されていれば(モードフラグが0であれば)、処理部2は、k番目のサンプルの領域を、図5中のステップS201と同様に分割(本実施の形態では、上下に2分割)した(ステップS404)後に、ステップS405へ移行する。一方、シングルパートモードが選択されていれば(モードフラグが1であれば)、ステップS404を経ることなくステップS405へ移行する。   Next, the processing unit 2 determines whether or not the mode flag set to the latest in the mode selection process (step S4) in FIG. 3 is 0, so that the currently selected mode is the multipart mode. It is determined whether there is a single part mode or not (step S403). If the multi-part mode is selected (if the mode flag is 0), the processing unit 2 divides the k-th sample area in the same manner as in step S201 in FIG. 2) (step S404), the process proceeds to step S405. On the other hand, if the single part mode is selected (if the mode flag is 1), the process proceeds to step S405 without passing through step S404.

ステップS405において、処理部2は、領域番号を意味するカウント値iを1にセットする。マルチパートモード時にはサンプルの領域は2分割されているのでiは1,2となるが、シングルパートモード時にはサンプルの領域は分割されないのでiは1にしかならない。   In step S405, the processing unit 2 sets a count value i indicating an area number to 1. In the multi-part mode, the sample area is divided into two, so i becomes 1, 2, but in the single-part mode, the sample area is not divided, so i is only 1.

次に、処理部2は、ステップS400で最新にサンプリングされた画像におけるk番目のサンプルのi番目の領域について、ステップS203〜S207と同様の処理を行うことで、CIE1976L色空間における明度指数ヒストグラム及び知覚色度指数ヒストグラムをそれぞれ正規化したものを結合して1次元化して得たヒストグラムqpi(数1で示すヒストグラムpに相当するサンプルのi番目の領域のヒストグラム)を生成する(ステップS406)。 Then, the processing unit 2, for the i-th region of the k-th sample in the sampled image to date in step S400, by performing the same processes as in steps S203~S207, CIE1976L * u * v * color space the (histogram of the i-th area of the sample corresponding to the histogram p i indicated by the number 1) histogram q pi that lightness index histogram and sensory chromaticity index histograms respectively obtained by one-dimensional by combining those normalized in Generate (step S406).

次いで、処理部2は、下記の数36に従って、参照領域のヒストグラムpとサンプルの領域のヒストグラムqpiとの間の、Bhattacharyya距離dpi (k)を算出する(ステップS407)。ここで、参照領域のヒストグラムpは、参照ヒストグラムpあるいは参照データと呼ぶ場合があり、図3中の追尾対象検知処理(ステップS2)後の最初に行われる本処理(ステップS5)におけるステップS407の処理では、図5中のS207で生成されたヒストグラムpであるが、2回目以降の本処理(ステップS5)におけるステップS407の処理では、前回の本処理(ステップS5)におけるステップS443で更新されたヒストグラムp(ただし、当該i番目の領域に関するもの)である。 Next, the processing unit 2 calculates a Bhattacharyya distance d pi (k) between the histogram p i of the reference region and the histogram q pi of the sample region according to the following Expression 36 (step S407). Here, the histogram p i of the reference region may be referred to as reference histogram p i or reference data, and is a step in the main process (step S5) performed first after the tracking target detection process (step S2) in FIG. in the process of S407 is a histogram p i generated in S207 in FIG. 5, in the processing in step S407 in the second or subsequent the process (step S5), at step S443 in the previous present process (step S5) The updated histogram p t (however, relating to the i-th region).

Figure 2009038777
Figure 2009038777

引き続いて、処理部2は、ステップS403と同様に、現在選択されているモードがマルチパートモードであるかシングルパートモードであるかを判定する(ステップS408)。マルチパートモードが選択されていれば(モードフラグが0であれば)ステップS409へ移行し、シングルパートモードが選択されていれば(モードフラグが1であれば)ステップS412へ移行する。   Subsequently, as in step S403, the processing unit 2 determines whether the currently selected mode is the multipart mode or the single part mode (step S408). If the multipart mode is selected (if the mode flag is 0), the process proceeds to step S409. If the single part mode is selected (if the mode flag is 1), the process proceeds to step S412.

ステップS409において、処理部2は、現在の領域番号iが2であるか否かを判定することで、全ての領域(本実施の形態では、2つの分割領域)について、Bhattacharyya距離dpi (k)の算出が終了したか否かを判定する。終了していなければ、処理部2はiを2にセットし(ステップS410)、ステップS406へ戻る。一方、終了していれば、ステップS411へ移行する。 In step S409, the processing unit 2 determines whether or not the current area number i is 2, so that the Bhattacharyya distance d pi (k ) for all areas (in this embodiment, two divided areas). ) Is determined. If not completed, the processing unit 2 sets i to 2 (step S410), and returns to step S406. On the other hand, if completed, the process proceeds to step S411.

ステップS411において、処理部2は、下記の数37に従って、k番目のサンプルの相違度d (k)を、ステップS407で順次算出された各分割領域のBhattacharyya距離dpi (k)の平均値として算出し、ステップS413へ移行する。 In step S411, the processing unit 2 calculates the dissimilarity d p (k) of the k-th sample according to the following formula 37, and the average value of the Bhattacharyya distance d pi (k) of each divided region sequentially calculated in step S407. And the process proceeds to step S413.

Figure 2009038777
Figure 2009038777

一方、シングルパートモード時には、ステップS412において、処理部2は、ステップS407で求めたBhattacharyya距離dpi (k)を、そのままk番目のサンプルの相違度d (k)とし、ステップS413へ移行する。 On the other hand, in the single part mode, in step S412, the processing unit 2 sets the Bhattacharyya distance d pi (k) obtained in step S407 as the difference d p (k) of the kth sample as it is, and proceeds to step S413. .

ステップS413において、処理部2は、下記数38に従って、ステップS411又はS412で得られた相違度d (k)によって尤度πpt (k)を算出する。ここで、尤度はガウス分布に従うものと仮定している。 In step S413, the processing unit 2 calculates the likelihood π pt (k) from the difference d p (k) obtained in step S411 or S412 according to the following equation (38 ) . Here, the likelihood is assumed to follow a Gaussian distribution.

Figure 2009038777
Figure 2009038777

数38において、Nはパーティクルの個数(サンプル数)である。また、数38において、σは通常はガウス分布の分散となるが、ここでの計算においては予め設定しておいた値とする。 In Equation 38, the N p is the number of particles (number of samples). Further, in the equation 38, the sigma 2 is usually composed of a dispersion of the Gaussian distribution, a value preset in the calculations here.

その後、処理部2は、現在のサンプル番号kがNであるか否かを判定することで、全てのサンプルについて、尤度πpt (k)の算出が終了したか否かを判定する(ステップS414)。終了していなければ、処理部2はサンプル番号kを1だけインクリメントし(ステップS415)、ステップS403へ戻る。一方、終了していれば、ステップS416へ移行する。 Thereafter, the processing unit 2 determines whether or not the calculation of the likelihood π pt (k) has been completed for all the samples by determining whether or not the current sample number k is N p ( Step S414). If not completed, the processing unit 2 increments the sample number k by 1 (step S415) and returns to step S403. On the other hand, if completed, the process proceeds to step S416.

ステップS416において、処理部2は、ステップS413で算出した尤度πpt (k)と各サンプルの位置(重心位置)から、下記の数39に従って、状態の推定結果である追尾対象領域の位置の推定結果(すなわち、追跡結果の一部)として、重み付け平均値E[S]を求める。重み付け平均値E[S]で表される追尾対象領域の位置が、追跡結果の一部となる追尾対象領域の位置である。 In step S416, the processing unit 2 uses the likelihood π pt (k) calculated in step S413 and the position (center of gravity position) of each sample according to the following equation 39 to determine the position of the tracking target region as a state estimation result. As an estimation result (that is, a part of the tracking result), a weighted average value E p [S t ] is obtained. The position of the tracking target area represented by the weighted average value E p [S t ] is the position of the tracking target area that is a part of the tracking result.

Figure 2009038777
Figure 2009038777

次に、処理部2は、ステップS413で算出された全てのサンプルの尤度πpt (k)を、その値の大きい順にソートする(ステップS417)。 Next, the processing unit 2 sorts the likelihoods π pt (k) of all the samples calculated in step S413 in descending order of the values (step S417).

次いで、処理部2は、ステップS417で尤度の値をソートした結果として得た尤度の最大値が、予め設定した閾値Vよりも大きいか否かを判定する(ステップS418)。閾値Vよりも大きければ、ここまでの追跡が成功したものと判断して、追跡結果フラグを1に設定し(ステップS419)、ステップS421へ移行する。一方、閾値Vよりも小さければ、追跡が失敗したものと判断して、追跡結果フラグを0に設定し(ステップS420)、ステップS421へ移行する。 Then, the processing unit 2, the maximum value of the likelihood obtained as a result of sorting the values of the likelihood at step S417 determines whether greater than a threshold value V p set in advance (step S418). Greater than the threshold value V p, it is determined that the tracking of the far succeeded, to set the tracking result flag to 1 (step S419), the process proceeds to step S421. On the other hand, is smaller than the threshold value V p, it is determined that the tracking fails, set the tracking result flag to 0 (step S420), the process proceeds to step S421.

処理部2は、各サンプルについて、ステップS421〜S423の処理を繰り返し、全てのサンプルについてステップS421〜S423の処理が終了すると(ステップS424でYES)、ステップS425へ移行する。ステップS421において、処理部2は、当該サンプルの尤度πpt (k)が予め設定していた閾値Πよりも大きいか否かを判定する。閾値Πよりも大きければS422へ移行し、小さければS423に移行する。ステップS422において、処理部2は、当該サンプルは、パーティクルフィルタの公知の手法に従って、次回における(すなわち、次のフレームにおける)サンプルを構成するため分裂を行う。ステップS423において、処理部2は、当該サンプルを次回における(すなわち、次のフレームにおける)サンプルを構成しないために消滅させる。 The processing unit 2 repeats the processes of steps S421 to S423 for each sample, and when the processes of steps S421 to S423 are completed for all the samples (YES in step S424), the process proceeds to step S425. In step S421, the processing unit 2 determines whether or not the likelihood π pt (k) of the sample is larger than a preset threshold value p p . It is greater than the threshold value Π p proceeds to S422, the process proceeds to S423 is smaller. In step S422, the processing unit 2 divides the sample to form a sample for the next time (that is, in the next frame) according to a known method of a particle filter. In step S423, the processing unit 2 causes the sample to disappear so as not to constitute the next sample (that is, in the next frame).

ステップS425において、処理部2は、各サンプルについてステップS422の分裂又はステップS423の消滅を行った結果、残ったサンプルがN個以下であるか否かを判定する。N個以下であれば、ステップS427へ移行する。一方、N個よりも多い場合は、処理部2は、尤度πpt (k)が小さいものから順に分裂したものを含めて消滅させる(ステップS426)。その結果、残ったサンプルはN個またはN−1個となる。ステップS426の後、ステップS427へ移行する。 In step S425, the processing unit 2, extinguished the result of the division or step S423 in step S422 for each sample, the remaining sample is equal to or N p or less. If N p or less, the process proceeds to step S427. On the other hand, when there are more than N p , the processing unit 2 extinguishes including those that are split in order from the one with the smallest likelihood π pt (k) (step S426). As a result, the remaining sample becomes -1 N p pieces or N p. After step S426, the process proceeds to step S427.

ステップS427において、処理部2は、画像内の予め設定した所定の幅で所定の高さを有する領域Rを追尾対象10の探索範囲として、領域R内に、追尾対象領域(本実施の形態では、矩形)の大きさをパラメータとしたN個のサンプル(パーティクル)を新たにばら撒く。各サンプルの位置は、ステップS416で推定した位置とする。各サンプルの大きさは任意であり、当初はランダムにばら撒かれる。各サンプルの縦横比は、元の追尾対象領域(図4中のステップS110で検知された追尾対象10に応じた領域である追尾対象領域(本実施の形態では、外接矩形領域))と縦横比が同じとされる。。なお、図3中の追尾対象検知処理(ステップS2)後の最初に行われる本処理(ステップS5)におけるステップS427の処理では、サンプルをN個ばら撒くが、2回目以降の本処理(ステップS5)におけるステップS427の処理では、N個から前回の本処理(ステップS5)で残ったサンプルの数を引いた不足分を追加してばら撒く。 In step S427, the processing unit 2 uses a region R having a predetermined height and a predetermined height in the image as a search range of the tracking target 10, and includes the tracking target region (in this embodiment, in the present embodiment). , a new rectangle) size parameter and the N s samples (particles) rose sow. The position of each sample is the position estimated in step S416. The size of each sample is arbitrary and is initially randomly distributed. The aspect ratio of each sample is the original tracking target area (the tracking target area (the circumscribed rectangular area in the present embodiment) corresponding to the tracking target 10 detected in step S110 in FIG. 4) and the aspect ratio. Are the same. . Incidentally, a tracking target detecting process in FIG. 3 in the process of step S427 in (step S2) initially present process performed after (step S5), and sample N s number rose sow but second and subsequent of the present process (step in the process of step S427 is in S5), dusted rose by adding the shortage minus the number of remaining samples in the previous present process from N s number (step S5).

次に、処理部2は、N個のサンプルに番号を割り当てるため、サンプル番号を意味するカウント値jを1にセットする(ステップS428)。 Next, the processing unit 2 sets a count value j indicating a sample number to 1 in order to assign a number to N s samples (step S428).

次いで、処理部2は、図3中のモード選択処理(ステップS4)で最新に設定されたモードフラグが0であるか否かを判定することで、現在選択されているモードがマルチパートモードであるかシングルパートモードであるかを判定する(ステップS429)。マルチパートモードが選択されていれば(モードフラグが0であれば)、処理部2は、j番目のサンプルの領域を、図5中のステップS201と同様に分割(本実施の形態では、上下に2分割)した(ステップS430)後に、ステップS431へ移行する。一方、シングルパートモードが選択されていれば(モードフラグが1であれば)、ステップS430を経ることなくステップS431へ移行する。   Next, the processing unit 2 determines whether or not the mode flag set to the latest in the mode selection process (step S4) in FIG. 3 is 0, so that the currently selected mode is the multipart mode. It is determined whether there is a single part mode or not (step S429). If the multi-part mode is selected (if the mode flag is 0), the processing unit 2 divides the j-th sample area in the same manner as in step S201 in FIG. 2) (step S430), the process proceeds to step S431. On the other hand, if the single part mode is selected (if the mode flag is 1), the process proceeds to step S431 without passing through step S430.

ステップS431において、処理部2は、領域番号を意味するカウント値iを1にセットする。マルチパートモード時にはサンプルの領域は2分割されているのでiは1,2となるが、シングルパートモード時にはサンプルの領域は分割されないのでiは1にしかならない。   In step S431, the processing unit 2 sets a count value i indicating an area number to 1. In the multi-part mode, the sample area is divided into two, so i becomes 1, 2, but in the single-part mode, the sample area is not divided, so i is only 1.

次に、処理部2は、ステップS400で最新にサンプリングされた画像におけるj番目のサンプルのi番目の領域について、ステップS203〜S207と同様の処理を行うことで、CIE1976L色空間における明度指数ヒストグラム及び知覚色度指数ヒストグラムをそれぞれ正規化したものを結合して1次元化して得たヒストグラムqsi(数1で示すヒストグラムpに相当するサンプルのi番目の領域のヒストグラム)を生成する(ステップS432)。 Next, the processing unit 2 performs the same processing as in steps S203 to S207 on the i-th region of the j-th sample in the image sampled most recently in step S400, so that the CIE 1976 L * u * v * color space. the (histogram of the i-th area of the sample corresponding to the histogram p i indicated by the number 1) histogram q si that lightness index histogram and sensory chromaticity index histograms respectively obtained by one-dimensional by combining those normalized in Generate (step S432).

次いで、処理部2は、下記の数40に従って、参照領域のヒストグラムpとサンプルの領域のヒストグラムqsiとの間の、Bhattacharyya距離dsi (j)を算出する(ステップS433)。ここで、参照領域のヒストグラムpは、参照ヒストグラムpあるいは参照データと呼ぶ場合があり、図3中の追尾対象検知処理(ステップS2)後の最初に行われる本処理(ステップS5)におけるステップS433の処理では、図5中のS207で生成されたヒストグラムpであるが、2回目以降の本処理(ステップS5)におけるステップS433の処理では、前回の本処理(ステップS5)におけるステップS443で更新されたヒストグラムp(ただし、当該i番目の領域に関するもの)である。 Next, the processing unit 2 calculates a Bhattacharyya distance d si (j) between the histogram p i of the reference region and the histogram q si of the sample region according to the following formula 40 (step S433). Here, the histogram p i of the reference region may be referred to as reference histogram p i or reference data, and is a step in the main process (step S5) performed first after the tracking target detection process (step S2) in FIG. in the process of S433 is a histogram p i generated in S207 in FIG. 5, in the processing in step S433 in the second or subsequent the process (step S5), at step S443 in the previous present process (step S5) The updated histogram p t (however, relating to the i-th region).

Figure 2009038777
Figure 2009038777

引き続いて、処理部2は、ステップS429と同様に、現在選択されているモードがマルチパートモードであるかシングルパートモードであるかを判定する(ステップS434)。マルチパートモードが選択されていれば(モードフラグが0であれば)ステップS435へ移行し、シングルパートモードが選択されていれば(モードフラグが1であれば)ステップS438へ移行する。   Subsequently, similarly to step S429, the processing unit 2 determines whether the currently selected mode is the multi-part mode or the single-part mode (step S434). If the multi-part mode is selected (if the mode flag is 0), the process proceeds to step S435. If the single-part mode is selected (if the mode flag is 1), the process proceeds to step S438.

ステップS435において、処理部2は、現在の領域番号iが2であるか否かを判定することで、全ての領域(本実施の形態では、2つの分割領域)について、Bhattacharyya距離dsi (j)の算出が終了したか否かを判定する。終了していなければ、処理部2はiを2にセットし(ステップS436)、ステップS432へ戻る。一方、終了していれば、ステップS437へ移行する。 In step S435, the processing unit 2 determines whether the current region number i is 2 or not, so that the Bhattacharyya distance d si (j ) for all regions (in this embodiment, two divided regions). ) Is determined. If not completed, the processing unit 2 sets i to 2 (step S436), and returns to step S432. On the other hand, if completed, the process proceeds to step S437.

ステップS437において、処理部2は、下記の数41に従って、j番目のサンプルの相違度d (j)を、ステップS433で順次算出された各分割領域のBhattacharyya距離dsi (j)の平均値として算出し、ステップS439へ移行する。 In step S437, the processing unit 2 calculates the difference d s (j) of the j-th sample according to the following formula 41, and the average value of the Bhattacharyya distances d si (j) of the respective divided regions sequentially calculated in step S433. And the process proceeds to step S439.

Figure 2009038777
Figure 2009038777

一方、シングルパートモード時には、ステップS438において、処理部2は、ステップS433で求めたBhattacharyya距離dsi (j)を、そのままj番目のサンプルの相違度d (j)とし、ステップS439へ移行する。 On the other hand, in the single part mode, in step S438, the processing unit 2 sets the Bhattacharyya distance d si (j) obtained in step S433 as the j-th sample dissimilarity d s (j) as it is, and proceeds to step S439. .

ステップS439において、処理部2は、下記数42に従って、ステップS437又はS438で得られた相違度d (j)を観測値として用いて、尤度πst (j)を算出する。ここで、尤度はガウス分布に従うものと仮定している。 In step S439, the processing unit 2, according to the following numbers 42, using as observed values and the resulting dissimilarity d s (j) in step S437 or S438, and calculates the likelihood π st (j). Here, the likelihood is assumed to follow a Gaussian distribution.

Figure 2009038777
Figure 2009038777

数42において、Nはパーティクルの個数(サンプル数)である。また、数41において、σは通常はガウス分布の分散となるが、ここでの計算においては予め設定しておいた値とする。 In Equation 42, the N s is the number of particles (number of samples). In Equation 41, σ 2 is usually a Gaussian distribution, but is assumed to be a value set in advance in this calculation.

その後、処理部2は、現在のサンプル番号jがNであるか否かを判定することで、全てのサンプルについて、尤度πst (j)の算出が終了したか否かを判定する(ステップS440)。終了していなければ、処理部2はサンプル番号jを1だけインクリメントし(ステップS441)、ステップS429へ戻る。一方、終了していれば、ステップS442へ移行する。 Thereafter, the processing unit 2, by current sample number j to determine whether the N s, for all samples, it is determined whether the calculation of the likelihood [pi st (j) is completed ( Step S440). If not completed, the processing unit 2 increments the sample number j by 1 (step S441), and returns to step S429. On the other hand, if completed, the process proceeds to step S442.

ステップS442において、処理部2は、ステップS439で算出した尤度πst (j)と各サンプルの大きさから、下記の数43に従って、状態の推定結果である追尾対象領域の大きさの推定結果(すなわち、追跡結果の他の一部)として、重み付け平均値E[S]を求める。重み付け平均値E[S]で表される追尾対象領域の大きさが、追跡結果の他の一部となる追尾対象領域の大きさである。 In step S442, the processing unit 2 estimates the size of the tracking target region, which is the state estimation result, according to the following equation 43 from the likelihood π st (j) calculated in step S439 and the size of each sample. The weighted average value E s [S t ] is obtained as (that is, another part of the tracking result). The size of the tracking target area represented by the weighted average value E s [S t ] is the size of the tracking target area that is another part of the tracking result.

Figure 2009038777
Figure 2009038777

その後、処理部2は、ステップS442で得た推定結果に基づいて、下記数44に従って、参照データを更新する(ステップS443)。数44において、ヒストグラムpt−1は、時刻t−1の推定された追尾対象領域に関するヒストグラムを示し、ステップS400で最新にサンプリングされた画像における、ステップS442で推定結果として得られた追尾対象領域について、ステップS203〜S207と同様の処理を行うことで、CIE1976L色空間における明度指数ヒストグラム及び知覚色度指数ヒストグラムをそれぞれ正規化したものを結合して1次元化して得たヒストグラムである。また、数44において、qt−1は時刻t−1の推定前の追尾対象領域に関するヒストグラムを示す。 Thereafter, the processing unit 2 updates the reference data according to the following equation 44 based on the estimation result obtained in step S442 (step S443). In Equation 44, the histogram pt-1 indicates a histogram related to the tracking target region estimated at time t-1, and the tracking target region obtained as the estimation result in step S442 in the image sampled latest in step S400. Histogram obtained by combining the normalized values of the lightness index histogram and the perceptual chromaticity index histogram in the CIE 1976L * u * v * color space by performing the same processing as in steps S203 to S207 . It is. In Expression 44, q t−1 represents a histogram related to the tracking target region before estimation at time t−1.

Figure 2009038777
Figure 2009038777

次に、処理部2は、ステップS439で算出された全てのサンプルの尤度πst (j)を、その値の大きい順にソートする(ステップS444)。 Next, the processing unit 2 sorts the likelihoods π st (j) of all the samples calculated in step S439 in descending order of the values (step S444).

次いで、処理部2は、ステップS444で尤度の値をソートした結果として得た尤度の最大値が、予め設定した閾値Vよりも大きいか否かを判定する(ステップS445)。閾値Vよりも大きければ、ステップS447へ移行する。一方、閾値Vよりも小さければ、追跡が失敗したものと判断して、追跡結果フラグを0に設定し(ステップS446)、ステップS447へ移行する。 Then, the processing unit 2, the maximum value of the likelihood obtained as a result of sorting the values of the likelihood at step S444 determines whether greater than a threshold value V s which is set in advance (step S445). Is greater than the threshold value V p, the process proceeds to step S447. On the other hand, is smaller than the threshold value V s, it is determined that the tracking fails, set the tracking result flag to 0 (step S446), the process proceeds to step S447.

処理部2は、各サンプルについて、ステップS447〜S449の処理を繰り返し、全てのサンプルについてステップS427〜S429の処理が終了すると(ステップS450でYES)、ステップS451へ移行する。ステップS447において、処理部2は、当該サンプルの尤度πst (j)が予め設定していた閾値Πよりも大きいか否かを判定する。閾値Πよりも大きければS448へ移行し、小さければS449に移行する。ステップS448において、処理部2は、当該サンプルは、パーティクルフィルタの公知の手法に従って、次回における(すなわち、次のフレームにおける)サンプルを構成するため分裂を行う。ステップS449において、処理部2は、当該サンプルを次回における(すなわち、次のフレームにおける)サンプルを構成しないために消滅させる。 The processing unit 2 repeats the processes of steps S447 to S449 for each sample, and when the processes of steps S427 to S429 are completed for all the samples (YES in step S450), the process proceeds to step S451. In step S447, the processing unit 2 determines whether the sample of the likelihood [pi st (j) is greater than the threshold value [pi s that was set in advance. Is greater than the threshold value Π s proceeds to S448, the process proceeds to S449 is smaller. In step S <b> 448, the processing unit 2 performs division to form the next sample (that is, in the next frame) according to a known method of the particle filter. In step S449, the processing unit 2 causes the sample to disappear so as not to constitute the next sample (that is, in the next frame).

ステップS451において、処理部2は、各サンプルについてステップS448の分裂又はステップS449の消滅を行った結果、残ったサンプルがN個以下であるか否かを判定する。N個以下であれば、追跡処理の本処理(ステップS5)を終了して、図3中のステップS6へ移行する。一方、N個よりも多い場合は、処理部2は、尤度πst (j)が小さいものから順に分裂したものを含めて消滅させる(ステップS452)。その結果、残ったサンプルはN個またはN−1個となる。ステップS452の後、追跡処理の本処理(ステップS5)を終了して、図3中のステップS6へ移行する。 In step S451, the processing unit 2, extinguished the result of the division or step S449 in step S448 for each sample, the remaining sample is equal to or N s or less. If N s or less, the tracking process is terminated (step S5), and the process proceeds to step S6 in FIG. On the other hand, when there are more than N s , the processing unit 2 extinguishes including those split in order from the smallest likelihood π st (j) (step S452). As a result, the number of remaining samples is N s or N s −1. After step S452, the tracking process is terminated (step S5), and the process proceeds to step S6 in FIG.

本実施の形態によっても前記第1の実施の形態と同様の利点が得られるが、前述したように、本実施の形態によれば、前記第1の実施の形態と比べれば追跡処理の精度が低下するものの、前記第1の実施の形態と比べて計算量を低減して処理時間を短縮することができるという利点が得られる。   The present embodiment can provide the same advantages as the first embodiment. However, as described above, according to the present embodiment, the tracking processing accuracy is higher than that of the first embodiment. Although reduced, there is an advantage that the amount of calculation can be reduced and the processing time can be shortened as compared with the first embodiment.

以上、本発明の各実施の形態及びその変形例について説明したが、本発明はこれらに限定されるものではない。   As mentioned above, although each embodiment of this invention and its modification were demonstrated, this invention is not limited to these.

本発明の第1の実施の形態による自動追尾装置を模式的に示すブロック図である。1 is a block diagram schematically showing an automatic tracking device according to a first embodiment of the present invention. カメラによる追尾対象の追尾の様子の例を模式的に示す図である。It is a figure which shows typically the example of the mode of the tracking of the tracking target by a camera. 図1中の処理部の動作の一例を示す概略フローチャートである。It is a schematic flowchart which shows an example of operation | movement of the process part in FIG. 図3中の追尾対象検知処理(ステップS2)を詳細に示すフローチャートである。It is a flowchart which shows the tracking object detection process (step S2) in FIG. 3 in detail. 図3中のモード選択処理(ステップS4)を詳細に示すフローチャートである。It is a flowchart which shows the mode selection process (step S4) in FIG. 3 in detail. 図3中の追跡処理の本処理(ステップS5)を詳細に示すフローチャートである。It is a flowchart which shows this process (step S5) of the tracking process in FIG. 3 in detail. 図6に引き続くフローチャートである。It is a flowchart following FIG. 図3中のカメラ制御処理(ステップ7)を詳細に示すフローチャートである。It is a flowchart which shows the camera control process (step 7) in FIG. 3 in detail. 図8に引き続くフローチャートである。It is a flowchart following FIG. 図9に引き続くフローチャートである。10 is a flowchart subsequent to FIG. 9. 図10に引き続くフローチャートである。It is a flowchart following FIG. 追尾対象の探索範囲をなす領域とサンプルの分布状態の例を、模式的に示す図である。It is a figure which shows typically the example of the area | region which comprises the search range of a tracking object, and the distribution state of a sample. 領域の分割パターンの例を模式的に示す図である。It is a figure which shows the example of the division pattern of an area | region typically. 図6中の一部を変形した例を示すフローチャートである。It is a flowchart which shows the example which deform | transformed a part in FIG. 本発明の第2の実施の形態による自動追尾装置の処理部が行う追跡処理の本処理を詳細に示すフローチャートである。It is a flowchart which shows in detail this process of the tracking process which the process part of the automatic tracking apparatus by the 2nd Embodiment of this invention performs. 図15に引き続くフローチャートである。It is a flowchart following FIG. 図16に引き続くフローチャートである。It is a flowchart following FIG.

符号の説明Explanation of symbols

1 カメラ
1a カメラ本体
1b ズームレンズ
1c 回転台
2 制御部
DESCRIPTION OF SYMBOLS 1 Camera 1a Camera body 1b Zoom lens 1c Turntable 2 Control part

Claims (12)

パン、チルト及びズームの制御が可能なカメラと、
前記カメラにより撮像された画像を処理して、前記カメラが追尾対象を自動追尾して撮像するように前記カメラを制御する処理手段と、
を備え、
前記処理手段は、前記カメラにより撮像された画像に基づいて追尾対象を追跡する追跡処理を行う追跡処理手段と、該追跡処理手段による前記追跡処理の結果に応じて前記カメラが前記追尾対象を追尾するように、前記カメラのパン、チルト及びズームを制御する制御手段と、を含み、
前記追跡処理手段は、前記カメラにより撮像された画像に基づいて、前記追尾対象の追跡開始当初に、前記追尾対象に応じた領域である追尾対象領域の全体の領域から得た特徴量であるシングルパート特徴量を用いて追跡処理を行うシングルパートモードとするかそれとも前記追尾対象領域の分割された各領域からそれぞれ得た特徴量であるマルチパート特徴量を用いて追跡処理を行うマルチパートモードとするかを選択する予備処理手段と、前記予備処理手段により選択されたモードで追跡処理を行う本処理手段とを含む、
ことを特徴とする自動追尾装置。
A camera capable of controlling pan, tilt and zoom;
Processing means for processing the image captured by the camera and controlling the camera so that the camera automatically tracks and captures a tracking target;
With
The processing means performs tracking processing for tracking a tracking target based on an image captured by the camera, and the camera tracks the tracking target according to a result of the tracking processing by the tracking processing means. Control means for controlling pan, tilt and zoom of the camera, and
The tracking processing means is a single feature amount obtained from an entire area of the tracking target area, which is an area corresponding to the tracking target, at the beginning of tracking of the tracking target based on an image captured by the camera. A single part mode for performing tracking processing using part feature amounts, or a multi-part mode for performing tracking processing using multi-part feature amounts, which are feature amounts respectively obtained from the divided regions of the tracking target region, and Preprocessing means for selecting whether to perform, and main processing means for performing tracking processing in the mode selected by the preprocessing means,
An automatic tracking device characterized by that.
前記特徴量がヒストグラムであることを特徴とする請求項1記載の自動追尾装置。   The automatic tracking device according to claim 1, wherein the feature amount is a histogram. 前記特徴量は、所定色空間におけるヒストグラムに基づくヒストグラムであることを特徴とする請求項1記載の自動追尾装置。   The automatic tracking device according to claim 1, wherein the feature amount is a histogram based on a histogram in a predetermined color space. 前記特徴量は、CIE1976L色空間における明度指数ヒストグラム及び知覚色度指数ヒストグラムをそれぞれ正規化したものを結合して1次元化して得たヒストグラムであることを特徴とする請求項3記載の自動追尾装置。 4. The feature quantity is a histogram obtained by combining one-dimensional combination of normalized brightness index histograms and perceptual chromaticity index histograms in a CIE 1976 L * u * v * color space. The automatic tracking device described. 前記予備処理手段は、前記カメラにより撮像された画像に基づいて、前記追尾対象の追跡開始当初の前記追尾対象領域の前記分割された前記各領域の前記特徴量同士の類似度を示す指標に従って、前記各領域の前記特徴量同士の類似度が所定以上に高い場合には前記シングルパートモードを選択し、前記各領域の前記特徴量同士の類似度が所定以下に低い場合には前記マルチパートモードを選択する、ことを特徴とする請求項1乃至4のいずれかに記載の自動追尾装置。   The preliminary processing means is based on an image indicating the similarity between the feature quantities of the divided areas of the tracking target area at the beginning of tracking of the tracking target, based on an image captured by the camera. The single-part mode is selected when the similarity between the feature values in each region is higher than a predetermined value, and the multi-part mode is selected when the similarity between the feature values in each region is lower than a predetermined value. The automatic tracking device according to claim 1, wherein the automatic tracking device is selected. 前記指標は、前記分割された前記各領域の前記特徴量同士の間のBhattacharyya距離であることを特徴とする請求項5記載の自動追尾装置。   6. The automatic tracking device according to claim 5, wherein the index is a Bhattacharyya distance between the feature quantities of the divided areas. 前記本処理手段は、前記カメラにより撮像された画像に基づいて、追尾対象領域の位置及び大きさをパラメータとした複数のパーティクルによるパーティクルフィルタにより、追跡結果として追尾対象領域の位置及び大きさを推定し、
前記パーティクルフィルタは、前記各パーティクルに関して、過去の追尾対象領域の特徴量(シングルパートモード時にはシングルパート特徴量、マルチパートモード時にはマルチパート特徴量)に基づく参照特徴量に対して当該パーティクルの特徴量(シングルパートモード時にはシングルパート特徴量、マルチパートモード時にはマルチパート特徴量)が相違する度合いを示す相違度によって算出した尤度を用いるものである、
ことを特徴とする請求項1乃至6のいずれかに記載の自動追尾装置。
The processing means estimates the position and size of the tracking target region as a tracking result by a particle filter using a plurality of particles using the position and size of the tracking target region as parameters based on an image captured by the camera. And
For each of the particles, the particle filter has a feature amount of the particle with respect to a reference feature amount based on a feature amount of a past tracking target region (single part feature amount in single-part mode, multi-part feature amount in multi-part mode). The likelihood calculated by the degree of difference indicating the degree of difference (single part feature amount in single part mode, multi part feature amount in multi part mode) is used.
The automatic tracking device according to any one of claims 1 to 6, wherein
前記各パーティクルの前記相違度は、シングルパートモード時には前記参照特徴量と当該パーティクルの前記シングルパート特徴量との間のBhattacharyya距離であるとともに、マルチパートモード時には前記参照特徴量と当該パーティクルの前記マルチパート特徴量との各間のBhattacharyya距離の平均値である、ことを特徴とする請求項7記載の自動追尾装置。   The degree of difference of each particle is a Bhattacharyya distance between the reference feature quantity and the single part feature quantity of the particle in the single-part mode, and the reference feature quantity and the multi-value of the particle in the multi-part mode. 8. The automatic tracking device according to claim 7, wherein the automatic tracking device is an average value of Bhattacharyya distances between each of the part feature amounts. 前記本処理手段は、前記カメラにより撮像された画像に基づいて、追尾対象領域の位置をパラメータとした複数の第1のパーティクルによる第1のパーティクルフィルタにより、追跡結果の一部として追尾対象領域の位置を推定し、追尾対象領域の大きさをパラメータとしかつ前記第1のパーティクルフィルタにより推定された追尾対象の位置を持つ複数の第2のパーティクルによる第2のパーティクルフィルタにより、追跡結果の他の一部として追尾対象領域の大きさを推定し、
前記第1のパーティクルフィルタは、前記各第1のパーティクルに関して、過去の追尾対象領域の特徴量(シングルパートモード時にはシングルパート特徴量、マルチパートモード時にはマルチパート特徴量)に基づく参照特徴量に対して当該第1のパーティクルの特徴量(シングルパートモード時にはシングルパート特徴量、マルチパートモード時にはマルチパート特徴量)が相違する度合いを示す第1の相違度によって算出した尤度を用いるものであり、
前記第2のパーティクルフィルタは、前記各第2のパーティクルに関して、過去の追尾対象領域の特徴量(シングルパートモード時にはシングルパート特徴量、マルチパートモード時にはマルチパート特徴量)に基づく参照特徴量に対して当該第2のパーティクルの特徴量(シングルパートモード時にはシングルパート特徴量、マルチパートモード時にはマルチパート特徴量)が相違する度合いを示す第2の相違度によって算出した尤度を用いるものである、
ことを特徴とする請求項1乃至6のいずれかに記載の自動追尾装置。
The processing means uses a first particle filter based on a plurality of first particles using the position of the tracking target region as a parameter based on an image captured by the camera, and sets the tracking target region as a part of the tracking result. A second particle filter based on a plurality of second particles having a tracking target position estimated by the first particle filter using the size of the tracking target region as a parameter, Estimate the size of the tracking target area as a part,
The first particle filter, with respect to each first particle, with respect to a reference feature amount based on a past feature amount of a tracking target region (single part feature amount in single part mode, multi part feature amount in multi part mode). Using the likelihood calculated by the first degree of difference indicating the degree of difference in the feature amount of the first particle (single part feature amount in single part mode, multipart feature amount in multipart mode),
The second particle filter performs a reference feature amount based on a feature amount of a past tracking target region (single part feature amount in single part mode, multipart feature amount in multipart mode) with respect to each second particle. The likelihood calculated by the second degree of difference indicating the degree of difference between the feature quantities of the second particles (single part feature quantity in the single part mode and multipart feature quantity in the multipart mode) is used.
The automatic tracking device according to any one of claims 1 to 6, wherein
前記各第1のパーティクルの前記第1の相違度は、シングルパートモード時には前記参照特徴量と当該第1のパーティクルの前記シングルパート特徴量との間のBhattacharyya距離であるとともに、マルチパートモード時には前記参照特徴量と当該第1のパーティクルの前記マルチパート特徴量との各間のBhattacharyya距離の平均値であり、
前記各第2のパーティクルの前記第2の相違度は、シングルパートモード時には前記参照特徴量と当該第2のパーティクルの前記シングルパート特徴量との間のBhattacharyya距離であるとともに、マルチパートモード時には前記参照特徴量と当該第2のパーティクルの前記マルチパート特徴量との各間のBhattacharyya距離の平均値である、
ことを特徴とする請求項9記載の自動追尾装置。
The first difference degree of each first particle is a Bhattacharyya distance between the reference feature amount and the single part feature amount of the first particle in the single part mode, and in the multipart mode, An average Bhattacharyya distance between each of the reference feature and the multipart feature of the first particle;
The second dissimilarity of each second particle is a Bhattacharyya distance between the reference feature quantity and the single part feature quantity of the second particle in the single-part mode, and in the multi-part mode, An average value of the Bhattacharyya distance between each of the reference feature quantity and the multipart feature quantity of the second particle;
The automatic tracking device according to claim 9.
前記制御手段は、前記追跡処理手段による前記追跡処理の結果に基づいて現在から所定時間経過後の追尾対象領域の位置及び大きさを予測する予測手段を含み、
前記制御手段は、前記予測手段による予測結果に応じて、前記カメラに対する現在のパン、チルト及びズームの制御状態を修正して前記カメラのパン、チルト及びズームを制御する、
ことを特徴とする請求項1乃至10のいずれかに記載の自動追尾装置。
The control means includes prediction means for predicting the position and size of the tracking target area after a predetermined time has elapsed from the present based on the result of the tracking process by the tracking processing means,
The control means controls the pan, tilt and zoom of the camera by correcting a current pan, tilt and zoom control state for the camera according to a prediction result by the prediction means.
The automatic tracking device according to any one of claims 1 to 10, wherein
前記予測手段は、カルマンフィルタにより、現在から所定時間経過後の追尾対象領域の位置及び大きさを予測することを特徴とする請求項11記載の自動追尾装置。   12. The automatic tracking device according to claim 11, wherein the predicting unit predicts the position and size of the tracking target region after a predetermined time has elapsed from the present time by a Kalman filter.
JP2007203718A 2007-08-06 2007-08-06 Automatic tracking device Active JP5018321B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007203718A JP5018321B2 (en) 2007-08-06 2007-08-06 Automatic tracking device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007203718A JP5018321B2 (en) 2007-08-06 2007-08-06 Automatic tracking device

Publications (2)

Publication Number Publication Date
JP2009038777A true JP2009038777A (en) 2009-02-19
JP5018321B2 JP5018321B2 (en) 2012-09-05

Family

ID=40440289

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007203718A Active JP5018321B2 (en) 2007-08-06 2007-08-06 Automatic tracking device

Country Status (1)

Country Link
JP (1) JP5018321B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100214444A1 (en) * 2009-02-23 2010-08-26 Casio Computer Co., Ltd. Image capturing apparatus, angle-of-view adjusting method and recording medium
JP2010197968A (en) * 2009-02-27 2010-09-09 Nikon Corp Focus evaluation apparatus, camera and program
JP2010219934A (en) * 2009-03-17 2010-09-30 Victor Co Of Japan Ltd Target tracking device
JP2010237169A (en) * 2009-03-31 2010-10-21 Topcon Corp Automatic tracking method and surveying device
US9121919B2 (en) 2011-02-25 2015-09-01 Kabushiki Kaisha Toshiba Target tracking device and target tracking method
US9128186B2 (en) 2011-02-25 2015-09-08 Kabushiki Kaisha Toshiba Target tracking device and target tracking method
JP2020014210A (en) * 2013-04-16 2020-01-23 日本電気株式会社 Information processing system, information processing method, and program

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0546771A (en) * 1991-08-16 1993-02-26 Toshiba Corp Motive object detector
JPH11136664A (en) * 1997-10-29 1999-05-21 Matsushita Electric Ind Co Ltd Automatic moving object tracking system
JP2001076156A (en) * 1999-09-03 2001-03-23 Mitsubishi Electric Corp Device for monitoring image
JP2001189889A (en) * 1999-12-28 2001-07-10 Canon Inc Device and method for processing picture, device and method for controlling photographing device and storage medium
JP2003219225A (en) * 2002-01-25 2003-07-31 Nippon Micro Systems Kk Device for monitoring moving object image
JP2004282535A (en) * 2003-03-18 2004-10-07 Mitsubishi Electric Corp Device for adjusting angle of field
JP2005274300A (en) * 2004-03-24 2005-10-06 Mitsubishi Electric Corp Target tracking device
WO2007053484A2 (en) * 2005-10-28 2007-05-10 Honda Motor Co., Ltd. Monocular tracking of 3d human motion with a coordinated mixture of factor analyzers

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0546771A (en) * 1991-08-16 1993-02-26 Toshiba Corp Motive object detector
JPH11136664A (en) * 1997-10-29 1999-05-21 Matsushita Electric Ind Co Ltd Automatic moving object tracking system
JP2001076156A (en) * 1999-09-03 2001-03-23 Mitsubishi Electric Corp Device for monitoring image
JP2001189889A (en) * 1999-12-28 2001-07-10 Canon Inc Device and method for processing picture, device and method for controlling photographing device and storage medium
JP2003219225A (en) * 2002-01-25 2003-07-31 Nippon Micro Systems Kk Device for monitoring moving object image
JP2004282535A (en) * 2003-03-18 2004-10-07 Mitsubishi Electric Corp Device for adjusting angle of field
JP2005274300A (en) * 2004-03-24 2005-10-06 Mitsubishi Electric Corp Target tracking device
WO2007053484A2 (en) * 2005-10-28 2007-05-10 Honda Motor Co., Ltd. Monocular tracking of 3d human motion with a coordinated mixture of factor analyzers

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100214444A1 (en) * 2009-02-23 2010-08-26 Casio Computer Co., Ltd. Image capturing apparatus, angle-of-view adjusting method and recording medium
JP2010199694A (en) * 2009-02-23 2010-09-09 Casio Computer Co Ltd Image capturing apparatus, angle-of-view adjusting method, and program
US8189056B2 (en) 2009-02-23 2012-05-29 Casio Computer Co., Ltd. Image capturing apparatus, angle-of-view adjusting method and recording medium
JP2010197968A (en) * 2009-02-27 2010-09-09 Nikon Corp Focus evaluation apparatus, camera and program
JP2010219934A (en) * 2009-03-17 2010-09-30 Victor Co Of Japan Ltd Target tracking device
JP2010237169A (en) * 2009-03-31 2010-10-21 Topcon Corp Automatic tracking method and surveying device
US9121919B2 (en) 2011-02-25 2015-09-01 Kabushiki Kaisha Toshiba Target tracking device and target tracking method
US9128186B2 (en) 2011-02-25 2015-09-08 Kabushiki Kaisha Toshiba Target tracking device and target tracking method
JP2020014210A (en) * 2013-04-16 2020-01-23 日本電気株式会社 Information processing system, information processing method, and program
US11483521B2 (en) 2013-04-16 2022-10-25 Nec Corporation Information processing system, information processing method, and program

Also Published As

Publication number Publication date
JP5018321B2 (en) 2012-09-05

Similar Documents

Publication Publication Date Title
JP5018321B2 (en) Automatic tracking device
JP5925068B2 (en) Video processing apparatus, video processing method, and program
CN112217998B (en) Imaging device, information processing device, control method thereof, and storage medium
JP5116605B2 (en) Automatic tracking device
KR101337060B1 (en) Imaging processing device and imaging processing method
US7173650B2 (en) Method for assisting an automated video tracking system in reaquiring a target
US7336297B2 (en) Camera-linked surveillance system
JP4992618B2 (en) Gesture recognition device and gesture recognition method
US20010035907A1 (en) Method and apparatus for object tracking and detection
EP2367139A1 (en) Matching device, digital image processing system, matching device control program, computer-readable recording medium, and matching device control method
CN101888479A (en) Method and device for detecting and tracking target image
JP2009048428A (en) Moving object tracking device
CN102073851A (en) Method and system for automatically identifying urban traffic accident
WO2007088856A1 (en) Automatic tracking device and automatic tracking method
JP2007334623A (en) Face authentication device, face authentication method, and access control device
JP6381313B2 (en) Control device, control method, and program
JP2014204375A (en) Image processing system, image processing apparatus, control method therefor, and program
EP2031865A2 (en) Image input apparatus, and image input method
JP4777196B2 (en) Driving assistance device
JP2012150837A (en) Gesture recognition device, gesture recognition method and program therefor
JP4578864B2 (en) Automatic tracking device and automatic tracking method
JP2010130383A (en) Mobile object tracking device
JP7125843B2 (en) Fault detection system
JP6206405B2 (en) Information processing apparatus, information processing method, program, and surveillance camera system
JP4777195B2 (en) Driving support device, vehicle, and driving support method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100804

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120307

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120528

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5018321

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150622

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250