JP2007272731A - Image processing apparatus and method, and program - Google Patents

Image processing apparatus and method, and program Download PDF

Info

Publication number
JP2007272731A
JP2007272731A JP2006099828A JP2006099828A JP2007272731A JP 2007272731 A JP2007272731 A JP 2007272731A JP 2006099828 A JP2006099828 A JP 2006099828A JP 2006099828 A JP2006099828 A JP 2006099828A JP 2007272731 A JP2007272731 A JP 2007272731A
Authority
JP
Japan
Prior art keywords
tracking
unit
tracking point
image processing
user
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.)
Withdrawn
Application number
JP2006099828A
Other languages
Japanese (ja)
Inventor
Tetsujiro Kondo
哲二郎 近藤
Kenji Takahashi
健治 高橋
Tomoyuki Otsuki
知之 大月
Gakuho Fukushi
岳歩 福士
Masaki Handa
正樹 半田
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.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to JP2006099828A priority Critical patent/JP2007272731A/en
Publication of JP2007272731A publication Critical patent/JP2007272731A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To easily designate an object as the object of tracking, and to estimate the tracking position of a designated object. <P>SOLUTION: A detection object region generation part 172 acquires offset quantity for area designation for the current tracking point or cursor position in a picked-up image, and generates a detection object region with predetermined size in a user designation direction on the basis of the offset quantity. A feature value calculation part 173 uses the pixels of a predetermined pixel interval as sample points in the detection object region, and calculates the feature values of the sample points. A region estimation part 174 extracts pixels satisfying predetermined conditions among the feature values of respective sample points in the detection object region, generates a region configured of the pixel groups, and calculates the center of gravity position of the generated region. The calculated center of gravity position is estimated as a tracking point intended by the user. This invention can be applied to a monitor camera system. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、画像処理装置および方法、並びにプログラムに関し、特に、追尾対象となるオブジェクトを容易に指定することができるようにするとともに、指定されたオブジェクトの追尾位置を推定することができるようにした画像処理装置および方法、並びにプログラムに関する。   The present invention relates to an image processing apparatus, method, and program, and in particular, allows an object to be tracked to be easily specified and allows the tracking position of the specified object to be estimated. The present invention relates to an image processing apparatus and method, and a program.

従来、画像から動きベクトルを求めて抽出したオブジェクト、または、指定したオブジェクトを追尾する方法が、例えば、特許文献1乃至特許文献5などに多く提案されている。   Conventionally, many methods for tracking an object extracted by obtaining a motion vector from an image or a designated object have been proposed in Patent Documents 1 to 5, for example.

また画像中のオブジェクトを抽出する方法としては、例えば、特許文献6や特許文献7に提案されているように、隣接フレーム間の差分をとり、差分の絶対値が大きい部分を動きのあるオブジェクトとして抽出したり、同一フレームにおいて同じような色の部分をオブジェクトとして抽出する方法、あるいは、周辺を複数点指定してオブジェクトを抽出する方法等がある。
特開2005−165791号公報 特開2005−165929号公報 特開2004−46647号公報 特開2000−105835号公報 特開平6−89342号公報 特開2002−74375号公報 特開2002−352248公報
In addition, as a method for extracting an object in an image, for example, as proposed in Patent Document 6 and Patent Document 7, a difference between adjacent frames is taken, and a portion having a large absolute value of the difference is set as a moving object. There are a method of extracting, a method of extracting a similar color portion as an object in the same frame, a method of extracting an object by designating a plurality of surroundings, and the like.
JP 2005-165791 A JP 2005-165929 A JP 2004-46647 A JP 2000-105835 A JP-A-6-89342 JP 2002-74375 A JP 2002-352248 A

ところで、隣接フレーム間の差分をとる方法では、動きのないオブジェクトや画像全体が動いているような場合にはオブジェクトを抽出することが困難である。また、同一フレームにおいて同じような色の部分をオブジェクトとして抽出する方法では、異なる複数の色を有しているオブジェクト等をまとまりとして抽出することは困難である。さらに、周辺を複数点指定してオブジェクトを抽出する方法では、対象オブジェクトが動いている場合に抽出することが困難となる。   By the way, in the method of calculating the difference between adjacent frames, it is difficult to extract an object when there is no moving object or the entire image is moving. Also, in the method of extracting similar color portions as objects in the same frame, it is difficult to extract objects having a plurality of different colors as a group. Furthermore, in the method of extracting an object by specifying a plurality of points around the periphery, it is difficult to extract when the target object is moving.

以上のように、追尾対象を指定する際や対象オブジェクトが動いている場合には、追尾点を指定することが難しかった。また蓄積した画像であれば、一時停止してから追尾点を指定することもできるが、動きベクトルの誤検出により追尾が外れてしまった場合にその都度一時停止して追尾点の修正を行うのは手間がかかる。さらにリアルタイム画像における追尾では、追尾点の指定や修正の難しさが、画像内のオブジェクト追尾というアプリケーションの価値を損なう恐れがあった。   As described above, it is difficult to specify the tracking point when specifying the tracking target or when the target object is moving. In the case of accumulated images, the tracking point can be specified after pausing, but if tracking is lost due to erroneous detection of a motion vector, the tracking point is paused and the tracking point is corrected each time. Takes time. Furthermore, in tracking in a real-time image, the difficulty in specifying and correcting the tracking point may impair the value of an application called object tracking in the image.

本発明はこのような状況に鑑みてなされたものであり、追尾対象となるオブジェクトを容易に指定することができるようにするとともに、指定されたオブジェクトの追尾位置を推定することができるようにするものである。   The present invention has been made in view of such circumstances, and makes it possible to easily specify an object to be tracked and to estimate the tracking position of the specified object. Is.

本発明の一側面の画像処理装置は、移動するオブジェクトを追尾する画像処理装置において、画像の中の前記オブジェクト上の現在の追尾点またはカーソル位置に対し、ユーザが指定する方向に基づいて、検出対象領域を生成する生成手段と、前記生成手段により生成された前記検出対象領域内に含まれる画素の特徴量を算出する算出手段と、前記算出手段により算出された前記特徴量に基づいて、所定の画素を抽出する抽出手段と、前記抽出手段により抽出された前記所定の画素で構成される領域の重心位置を前記ユーザが意図する追尾点と推定する推定手段とを備える。   An image processing apparatus according to an aspect of the present invention is an image processing apparatus that tracks a moving object, and detects a current tracking point or a cursor position on the object in an image based on a direction specified by a user. A generating unit that generates a target region; a calculating unit that calculates a feature amount of a pixel included in the detection target region generated by the generating unit; and a predetermined amount based on the feature amount calculated by the calculating unit Extraction means for extracting the pixels, and estimation means for estimating the position of the center of gravity of the region constituted by the predetermined pixels extracted by the extraction means as the tracking point intended by the user.

前記推定手段により推定された前記追尾点を前記オブジェクトの重心位置になるように微調整する微調整手段をさらに設けるようにすることができる。   Fine adjustment means for finely adjusting the tracking point estimated by the estimation means so as to be located at the center of gravity of the object may be further provided.

前記生成手段には、前記ユーザが指定するオフセット量に応じた検出対象領域を生成させることができる。   The generation means can generate a detection target area corresponding to an offset amount designated by the user.

前記生成手段には、前記オブジェクト上の現在の追尾点またはカーソル位置を中心とした検出対象領域を生成させることができる。   The generation means can generate a detection target region centered on a current tracking point or cursor position on the object.

前記抽出手段により前記所定の画素を抽出することができなかった場合、前記生成手段には、前記検出対象領域を拡大した新たな検出対象領域を生成させることができる。   When the predetermined pixel cannot be extracted by the extraction unit, the generation unit can generate a new detection target region in which the detection target region is enlarged.

前記抽出手段には、前記現在の追尾点またはカーソル位置の特徴量と異なる特徴量を有する画素を抽出させることができる。   The extraction means can extract pixels having a feature quantity different from the feature quantity at the current tracking point or cursor position.

前記抽出手段には、背景の特徴量と異なる特徴量を有する画素を抽出させることができる。   The extraction means can extract pixels having a feature quantity different from the background feature quantity.

前記抽出手段には、前記ユーザにより指定された特徴量を有する画素を抽出させることができる。   The extraction unit can extract pixels having a feature amount designated by the user.

前記抽出手段には、算出された前記特徴量の頻度から、前記ユーザにより指定された順位の頻度の特徴量を有する画素を抽出させることができる。   The extraction means can extract pixels having the feature quantity of the rank frequency designated by the user from the calculated feature quantity frequency.

前記抽出手段には、前記現在の追尾点またはカーソル位置の特徴量と異なる特徴量の頻度から、前記ユーザにより指定された順位の頻度の特徴量を有する画素を抽出させることができる。   The extraction means can extract pixels having a feature quantity with a frequency of the rank specified by the user from the frequency of feature quantities different from the feature quantity at the current tracking point or cursor position.

前記推定手段には、抽出された前記所定の画素のうち、所定の閾値以上の信頼度がある特徴量を有する画素で構成される領域の重心位置を、前記ユーザが意図する追尾点と推定させることができる。   The estimating means estimates a center of gravity position of an area composed of pixels having a feature amount having a reliability equal to or higher than a predetermined threshold among the extracted predetermined pixels as a tracking point intended by the user. be able to.

前記特徴量は、動きベクトル、色、または輝度であるものとすることができる。   The feature amount may be a motion vector, color, or luminance.

本発明の一側面の画像処理方法は、移動するオブジェクトを追尾する画像処理装置の画像処理方法において、画像の中の前記オブジェクト上の現在の追尾点またはカーソル位置に対し、ユーザが指定する方向に基づいて、検出対象領域を生成し、生成された前記検出対象領域内に含まれる画素の特徴量を算出し、算出された前記特徴量に基づいて、所定の画素を抽出し、抽出された前記所定の画素で構成される領域の重心位置を前記ユーザが意図する追尾点と推定するステップを含む。   An image processing method according to an aspect of the present invention is an image processing method of an image processing apparatus that tracks a moving object, in a direction specified by a user with respect to a current tracking point or cursor position on the object in the image. And generating a detection target region, calculating a feature amount of a pixel included in the generated detection target region, extracting a predetermined pixel based on the calculated feature amount, and extracting the extracted pixel Including a step of estimating a centroid position of an area composed of predetermined pixels as a tracking point intended by the user.

本発明の一側面のプログラムは、移動するオブジェクトを追尾する画像処理装置の画像処理をコンピュータに実行させるプログラムにおいて、画像の中の前記オブジェクト上の現在の追尾点またはカーソル位置に対し、ユーザが指定する方向に基づいて、検出対象領域を生成し、生成された前記検出対象領域内に含まれる画素の特徴量を算出し、算出された前記特徴量に基づいて、所定の画素を抽出し、抽出された前記所定の画素で構成される領域の重心位置を前記ユーザが意図する追尾点と推定するステップを含む。   The program according to one aspect of the present invention is a program that causes a computer to execute image processing of an image processing apparatus that tracks a moving object, and that is specified by a user with respect to a current tracking point or cursor position on the object in the image. A detection target region is generated based on the direction in which the detection target region is generated, a feature amount of a pixel included in the generated detection target region is calculated, and a predetermined pixel is extracted and extracted based on the calculated feature amount And a step of estimating a center of gravity position of an area formed by the predetermined pixels as a tracking point intended by the user.

本発明の一側面においては、オブジェクト上の現在の追尾点またはカーソル位置に対し、ユーザが指定する方向に基づいて検出対象領域が生成され、生成された検出対象領域内に含まれる画素の特徴量が算出され、算出された特徴量に基づいて所定の画素が抽出され、抽出された所定の画素で構成される領域の重心位置がユーザが意図する追尾点と推定される。   In one aspect of the present invention, a detection target region is generated based on a direction specified by a user with respect to a current tracking point or cursor position on an object, and a feature amount of a pixel included in the generated detection target region Is calculated, a predetermined pixel is extracted based on the calculated feature amount, and the barycentric position of an area composed of the extracted predetermined pixel is estimated as the tracking point intended by the user.

本発明によれば、追尾対象となるオブジェクトを容易に指定することができるようにするとともに、指定されたオブジェクトの追尾位置を推定することができる。   According to the present invention, it is possible to easily specify an object to be tracked and estimate a tracking position of the specified object.

以下に本発明の実施の形態を説明するが、本発明の構成要件と、明細書又は図面に記載の実施の形態との対応関係を例示すると、次のようになる。この記載は、本発明をサポートする実施の形態が、明細書又は図面に記載されていることを確認するためのものである。従って、明細書又は図面中には記載されているが、本発明の構成要件に対応する実施の形態として、ここには記載されていない実施の形態があったとしても、そのことは、その実施の形態が、その構成要件に対応するものではないことを意味するものではない。逆に、実施の形態が発明に対応するものとしてここに記載されていたとしても、そのことは、その実施の形態が、その構成要件以外には対応しないものであることを意味するものでもない。   Embodiments of the present invention will be described below. Correspondences between the constituent elements of the present invention and the embodiments described in the specification or the drawings are exemplified as follows. This description is intended to confirm that the embodiments supporting the present invention are described in the specification or the drawings. Therefore, even if there is an embodiment which is described in the specification or the drawings but is not described here as an embodiment corresponding to the constituent elements of the present invention, that is not the case. It does not mean that the form does not correspond to the constituent requirements. On the contrary, even if an embodiment is described herein as corresponding to the invention, this does not mean that the embodiment does not correspond to other than the configuration requirements. .

本発明の一側面の画像処理装置(例えば、図1の監視カメラシステム1)は、移動するオブジェクトを追尾する画像処理装置において、画像の中の前記オブジェクト上の現在の追尾点またはカーソル位置に対し、ユーザが指定する方向に基づいて、検出対象領域を生成する生成手段(例えば、図27の検出対象領域生成部172)と、前記生成手段により生成された前記検出対象領域内に含まれる画素の特徴量を算出する算出手段(例えば、図27の特徴量算出部173)と、前記算出手段により算出された前記特徴量に基づいて、所定の画素を抽出する抽出手段(例えば、図27の領域推定部174)と、前記抽出手段により抽出された前記所定の画素で構成される領域の重心位置を前記ユーザが意図する追尾点と推定する推定手段(例えば、図27の領域推定部174)とを備える。   An image processing apparatus according to one aspect of the present invention (for example, the monitoring camera system 1 in FIG. 1) is an image processing apparatus that tracks a moving object, and the current tracking point or cursor position on the object in the image. Based on the direction designated by the user, a generation unit (for example, a detection target region generation unit 172 in FIG. 27) that generates a detection target region, and pixels included in the detection target region generated by the generation unit A calculation unit (for example, a feature amount calculation unit 173 in FIG. 27) that calculates a feature amount, and an extraction unit (for example, an area in FIG. 27) that extracts a predetermined pixel based on the feature amount calculated by the calculation unit. An estimation unit 174) and an estimation unit (e.g., estimating a center of gravity position of an area composed of the predetermined pixels extracted by the extraction unit as a tracking point intended by the user) , And a region estimating unit 174 of FIG. 27).

この画像処理装置には、前記推定手段により推定された前記追尾点を前記オブジェクトの重心位置になるように微調整する微調整手段(例えば、図1の追尾位置補正部24)をさらに備えることができる。   The image processing apparatus further includes fine adjustment means (for example, the tracking position correction unit 24 in FIG. 1) for finely adjusting the tracking point estimated by the estimating means so as to be the center of gravity position of the object. it can.

本発明の一側面の送信方法およびプログラムは、移動するオブジェクトを追尾する画像処理装置の画像処理方法、またはその画像処理をコンピュータに実行させるプログラムにおいて、画像の中の前記オブジェクト上の現在の追尾点またはカーソル位置に対し、ユーザが指定する方向に基づいて、検出対象領域を生成し(例えば、図38のステップS134)、生成された前記検出対象領域内に含まれる画素の特徴量を算出し(例えば、図38のステップS135)、算出された前記特徴量に基づいて、所定の画素を抽出し(例えば、図38のステップS138)、抽出された前記所定の画素で構成される領域の重心位置を前記ユーザが意図する追尾点と推定するステップ(例えば、図38のステップS140)を含む。   A transmission method and a program according to one aspect of the present invention include an image processing method of an image processing apparatus that tracks a moving object, or a program that causes a computer to execute the image processing, and a current tracking point on the object in an image. Alternatively, a detection target area is generated with respect to the cursor position based on the direction specified by the user (for example, step S134 in FIG. 38), and the feature amount of the pixel included in the generated detection target area is calculated ( For example, in step S135 in FIG. 38, a predetermined pixel is extracted based on the calculated feature amount (for example, step S138 in FIG. 38), and the barycentric position of the region constituted by the extracted predetermined pixel Is estimated as the tracking point intended by the user (for example, step S140 in FIG. 38).

以下、本発明の実施の形態について図を参照して説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明を監視カメラシステムに適用した場合の構成例を表している。   FIG. 1 shows a configuration example when the present invention is applied to a surveillance camera system.

撮像部21は、例えば、CCD(Charge Coupled Device)ビデオカメラ等よりなり、撮像した画像を画像ディスプレイ25に表示させる。オブジェクト位置推定部22は、撮像部21より入力された画像から追尾対象を検出し、その検出結果をオブジェクト追尾部23に出力する。またオブジェクト位置推定部22は、ユーザにより指示入力部29を介して所定の方向が指定されるか、あるいは、追尾させたいオブジェクトが存在する方向にカーソルが移動されたとき、そのカーソル位置やオフセット位置を取得し、ユーザが意図する追尾位置を推定し、その推定結果をオブジェクト追尾部23に出力する。   The imaging unit 21 includes, for example, a CCD (Charge Coupled Device) video camera or the like, and displays the captured image on the image display 25. The object position estimation unit 22 detects a tracking target from the image input from the imaging unit 21 and outputs the detection result to the object tracking unit 23. Further, the object position estimating unit 22 is configured such that when a predetermined direction is designated by the user via the instruction input unit 29 or the cursor is moved in a direction in which the object to be tracked exists, the cursor position and the offset position , The tracking position intended by the user is estimated, and the estimation result is output to the object tracking unit 23.

オブジェクト追尾部23は、撮像部21より供給された画像中の、オブジェクト位置推定部22により検出または推定された追尾点を追尾するように動作する。またオブジェクト追尾部23は、追尾結果をオブジェクト位置推定部22に出力するとともに、追尾結果としての追尾位置を表す位置情報を追尾位置補正部24に出力する。さらにオブジェクト追尾部23は、追尾結果に基づいて、移動したオブジェクトを撮像できるようにカメラ駆動部26を制御する。追尾位置補正部24は、オブジェクト追尾部23から供給された追尾位置を表す位置情報を、その追尾点が属するオブジェクトの重心位置になるように微調整し、その補正結果を画像ディスプレイ25に出力するとともに、オブジェクト追尾部23に補正結果を供給する。これにより、オブジェクト追尾部23は、補正された追尾点を次のフレームから追尾するように動作することができる。カメラ駆動部26は、オブジェクト追尾部23からの制御に基づいて、撮像部21が追尾点を中心とする画像を撮影するように撮像部21を駆動する。   The object tracking unit 23 operates to track the tracking point detected or estimated by the object position estimation unit 22 in the image supplied from the imaging unit 21. The object tracking unit 23 outputs the tracking result to the object position estimating unit 22 and outputs position information representing the tracking position as the tracking result to the tracking position correcting unit 24. Furthermore, the object tracking unit 23 controls the camera driving unit 26 so that the moved object can be imaged based on the tracking result. The tracking position correction unit 24 finely adjusts the position information representing the tracking position supplied from the object tracking unit 23 so that it becomes the barycentric position of the object to which the tracking point belongs, and outputs the correction result to the image display 25. At the same time, the correction result is supplied to the object tracking unit 23. As a result, the object tracking unit 23 can operate to track the corrected tracking point from the next frame. Based on the control from the object tracking unit 23, the camera driving unit 26 drives the imaging unit 21 so that the imaging unit 21 captures an image centered on the tracking point.

制御部27は、例えば、マイクロコンピュータなどにより構成され、各部を制御する。また制御部27には、半導体メモリ、磁気ディスク、光ディスク、または光磁気ディスクなどにより構成されるリムーバブルメディア28が必要に応じて接続され、プログラム、その他各種のデータが必要に応じて供給される。指示入力部29は、各種のボタン、スイッチ、あるいは赤外線や電波を用いたリモートコントローラなどにより構成され、ユーザからの指示に対応する信号を制御部27に出力する。   The control unit 27 is configured by, for example, a microcomputer and controls each unit. The control unit 27 is connected to a removable medium 28 formed of a semiconductor memory, a magnetic disk, an optical disk, a magneto-optical disk, or the like as needed, and a program and other various data are supplied as needed. The instruction input unit 29 includes various buttons, switches, a remote controller using infrared rays or radio waves, and outputs a signal corresponding to an instruction from the user to the control unit 27.

次に、図2のフローチャートを参照して、図1に示した監視カメラシステムが実行する監視処理について説明する。この処理は、監視システム1の電源がオンされているとき、撮像部21により監視する領域が撮像され、その撮像して得られた画像がオブジェクト位置推定部22およびオブジェクト追尾部23を介して画像ディスプレイ25に出力されて開始される。   Next, monitoring processing executed by the monitoring camera system shown in FIG. 1 will be described with reference to the flowchart of FIG. In this process, when the power of the monitoring system 1 is turned on, an area to be monitored is imaged by the imaging unit 21, and an image obtained by imaging is imaged via the object position estimating unit 22 and the object tracking unit 23. It is output to the display 25 and started.

ステップS1において、オブジェクト位置推定部22は、撮像部21から入力された画像から追尾対象を検出する処理を実行する。例えば、入力画像に動く物体が存在する場合、オブジェクト位置推定部22は、その動く物体を追尾対象として検出するとともに、追尾対象の中から、最も輝度の高い点あるいは追尾対象の中心の点などを追尾点として検出する。またオブジェクト位置推定部22は、ユーザにより指示入力部29を介して所定の方向が指定されたとき、その指定する方向に基づいて、ユーザが意図する追尾位置を推定し、推定結果をオブジェクト追尾部23に出力する。追尾位置を推定する処理の詳細は、図26以降で説明する。   In step S <b> 1, the object position estimation unit 22 executes a process of detecting a tracking target from the image input from the imaging unit 21. For example, when there is a moving object in the input image, the object position estimation unit 22 detects the moving object as a tracking target, and selects a point with the highest luminance or a center point of the tracking target from the tracking target. Detect as tracking point. In addition, when a predetermined direction is designated by the user via the instruction input unit 29, the object position estimation unit 22 estimates a tracking position intended by the user based on the designated direction, and the estimation result is obtained from the object tracking unit. To 23. Details of the processing for estimating the tracking position will be described with reference to FIG.

ステップS2において、オブジェクト追尾部23は、ステップS1の処理で検出された追尾点を追尾する追尾処理を実行する。追尾処理の詳細については、図5を参照して後述するが、この処理により、撮像部21により撮像された画像の中の追尾対象となるオブジェクト(例えば、人、動物など)の中の追尾点(例えば、目、頭の中心)が追尾され、追尾結果が制御部27に出力されるとともに、追尾位置を表す位置情報が追尾位置補正部24に出力される。   In step S2, the object tracking unit 23 executes a tracking process for tracking the tracking point detected in the process of step S1. The details of the tracking process will be described later with reference to FIG. 5. With this process, a tracking point in an object (for example, a person, an animal, etc.) to be tracked in an image captured by the imaging unit 21 is obtained. (For example, the center of the eyes and head) is tracked, the tracking result is output to the control unit 27, and the position information indicating the tracking position is output to the tracking position correcting unit 24.

ステップS3において、制御部27は、ステップS2の処理による追尾結果に基づいて、画像ディスプレイ25に、撮像部21により撮像された画像に追尾位置を表すマークなどを重畳して表示させる。   In step S3, the control unit 27 causes the image display 25 to superimpose and display a mark representing the tracking position on the image captured by the imaging unit 21, based on the tracking result obtained in step S2.

ステップS4において、オブジェクト追尾部23は、ステップS2の処理による追尾結果に基づいて、オブジェクトの移動を検出し、移動したオブジェクトを撮像できるようにカメラを駆動させるカメラ駆動信号を生成し、カメラ駆動部26に出力する。ステップS5において、カメラ駆動部26は、オブジェクト追尾部23からのカメラ駆動信号に基づいて撮像部21を駆動する。これにより撮像部21は、追尾点が画面から外れてしまうことがないようにカメラをパンまたはチルトする。   In step S4, the object tracking unit 23 detects the movement of the object based on the tracking result in the process of step S2, generates a camera driving signal for driving the camera so that the moved object can be imaged, and the camera driving unit. 26. In step S <b> 5, the camera drive unit 26 drives the imaging unit 21 based on the camera drive signal from the object tracking unit 23. Thereby, the imaging unit 21 pans or tilts the camera so that the tracking point does not deviate from the screen.

ステップS6において、制御部27は、指示入力部29を介したユーザからの指示に基づいて監視処理を終了するか否かを判定し、ユーザから終了が指示されていない場合には、ステップS1に戻り、それ以降の処理を繰り返し実行する。そして、ステップS6において、ユーザから監視処理の終了が指示されたと判定された場合、制御部27は監視処理を終了する。   In step S6, the control unit 27 determines whether or not to end the monitoring process based on an instruction from the user via the instruction input unit 29. If the end is not instructed by the user, the control unit 27 proceeds to step S1. Return and repeat the subsequent processing. If it is determined in step S6 that the user has instructed the end of the monitoring process, the control unit 27 ends the monitoring process.

図3A乃至図3Cは、このとき画像ディスプレイ25に表示される画像の例を、時系列に示した図である。図3Aは、撮像部21により、追尾対象となるオブジェクト41が撮像された画像の例であり、この例では、図中左方向に走って移動する人が、オブジェクト41として撮像されている。図3Bでは、オブジェクト41が、図3Aの位置から図中左に移動しており、図3Cでは、オブジェクト41が、図3Bの位置からさらに左に移動している。   3A to 3C are diagrams showing examples of images displayed on the image display 25 at this time in time series. FIG. 3A is an example of an image in which an object 41 to be tracked is imaged by the imaging unit 21. In this example, a person who moves in the left direction in the figure is imaged as the object 41. In FIG. 3B, the object 41 has moved to the left in the figure from the position of FIG. 3A, and in FIG. 3C, the object 41 has moved further to the left from the position of FIG. 3B.

オブジェクト位置推定部22は、図2のステップS1で、オブジェクト41を検出し、このオブジェクト41である人の目を、追尾点41Aとしてオブジェクト追尾部23に出力する。ステップS2ではオブジェクト追尾部23により追尾処理が行われる。   The object position estimation unit 22 detects the object 41 in step S1 of FIG. 2, and outputs the human eye that is the object 41 to the object tracking unit 23 as the tracking point 41A. In step S2, the object tracking unit 23 performs a tracking process.

次に、図1のオブジェクト追尾部23の詳細な構成例と、その動作について説明する。   Next, a detailed configuration example and operation of the object tracking unit 23 in FIG. 1 will be described.

図4は、オブジェクト追尾部23の機能的構成例を示すブロック図である。図4に示されるように、オブジェクト追尾部23は、テンプレートマッチング部51、動き推定部52、シーンチェンジ検出部53、背景動き推定部54、領域推定関連処理部55、乗り換え候補保持部56、追尾点決定部57、テンプレート保持部58、および制御部59により構成されている。   FIG. 4 is a block diagram illustrating a functional configuration example of the object tracking unit 23. As shown in FIG. 4, the object tracking unit 23 includes a template matching unit 51, a motion estimation unit 52, a scene change detection unit 53, a background motion estimation unit 54, a region estimation related processing unit 55, a transfer candidate holding unit 56, and a tracking. The point determination unit 57, the template holding unit 58, and the control unit 59 are configured.

テンプレートマッチング部51は、入力画像と、テンプレート保持部58に保持されているテンプレート画像のマッチング処理を行う。動き推定部52は、入力画像の動きを推定し、推定の結果得られた動きベクトルと、その動きベクトルの確度を、シーンチェンジ検出部53、背景動き推定部54、領域推定関連処理部55、および追尾点決定部57に出力する。シーンチェンジ検出部53は、動き推定部52より供給された動きベクトルとその動きベクトルの確度に基づいて、シーンチェンジを検出する。   The template matching unit 51 performs a matching process between the input image and the template image held in the template holding unit 58. The motion estimation unit 52 estimates the motion of the input image, and obtains the motion vector obtained as a result of the estimation and the accuracy of the motion vector, the scene change detection unit 53, the background motion estimation unit 54, the region estimation related processing unit 55, And output to the tracking point determination unit 57. The scene change detection unit 53 detects a scene change based on the motion vector supplied from the motion estimation unit 52 and the accuracy of the motion vector.

背景動き推定部54は、動き推定部52より供給された動きベクトルとその動きベクトルの確度に基づいて背景動きを推定する処理を実行し、推定結果を領域推定関連処理部55に供給する。領域推定関連処理部55は、動き推定部52より供給された動きベクトルとその動きベクトルの確度、背景動き推定部54より供給された背景動き、並びに追尾点決定部57より供給された追尾点情報に基づいて、領域推定処理を行う。また領域推定関連処理部55は、入力された情報に基づいて乗り換え候補を生成し、乗り換え候補保持部56へ供給し、保持させる。さらに領域推定関連処理部55は、入力画像に基づいてテンプレートを作成し、テンプレート保持部58に供給し、保持させる。   The background motion estimation unit 54 executes processing for estimating the background motion based on the motion vector supplied from the motion estimation unit 52 and the accuracy of the motion vector, and supplies the estimation result to the region estimation related processing unit 55. The area estimation related processing unit 55 includes the motion vector supplied from the motion estimation unit 52 and the accuracy of the motion vector, the background motion supplied from the background motion estimation unit 54, and the tracking point information supplied from the tracking point determination unit 57. Based on the above, region estimation processing is performed. The region estimation related processing unit 55 generates a transfer candidate based on the input information, supplies the transfer candidate to the transfer candidate holding unit 56, and holds it. Further, the region estimation related processing unit 55 creates a template based on the input image, supplies the template to the template holding unit 58, and holds it.

追尾点決定部57は、動き推定部52より供給された動きベクトルとその動きベクトルの確度、および乗り換え候補保持部56より供給された乗り換え候補に基づいて、追尾点を決定し、決定された追尾点に関する情報を領域推定関連処理部55に出力する。   The tracking point determination unit 57 determines the tracking point based on the motion vector supplied from the motion estimation unit 52, the accuracy of the motion vector, and the transfer candidate supplied from the transfer candidate holding unit 56. Information about the points is output to the region estimation related processing unit 55.

制御部59は、オブジェクト位置推定部22から出力された追尾点の情報に基づいて、テンプレートマッチング部51乃至テンプレート保持部58の各部を制御して、検出された追尾対象を追尾させるとともに、画像ディスプレイ25に表示される画面の中に、追尾点が表示されるようにカメラ駆動部26に制御信号を出力し、撮像部21の駆動を制御する。これにより、追尾点が画面の外に出ないように制御される。また制御部59は、追尾点の画面上での位置の情報などの追尾結果を、追尾位置補正部24および制御部27などに出力する。   The control unit 59 controls each part of the template matching unit 51 to the template holding unit 58 based on the tracking point information output from the object position estimation unit 22 to track the detected tracking target and to display an image display. A control signal is output to the camera drive unit 26 so that the tracking point is displayed in the screen displayed on the screen 25, and the drive of the imaging unit 21 is controlled. Thereby, the tracking point is controlled so as not to go out of the screen. Further, the control unit 59 outputs a tracking result such as information on the position of the tracking point on the screen to the tracking position correction unit 24 and the control unit 27.

次に、オブジェクト追尾部23の動作について説明する。   Next, the operation of the object tracking unit 23 will be described.

図5は、図2のステップS2におけるオブジェクト追尾部23が実行する追尾処理の詳細を説明するフローチャートである。   FIG. 5 is a flowchart illustrating details of the tracking process executed by the object tracking unit 23 in step S2 of FIG.

図5に示されるように、オブジェクト追尾部23は、基本的に通常処理と例外処理を実行する。すなわち、ステップS11で通常処理が行われる。この通常処理の詳細は、図9のフローチャートを参照して後述するが、この処理によりオブジェクト位置推定部22により検出または推定された追尾点を追尾する処理が実行される。   As shown in FIG. 5, the object tracking unit 23 basically executes normal processing and exception processing. That is, normal processing is performed in step S11. The details of this normal process will be described later with reference to the flowchart of FIG. 9, and the process of tracking the tracking point detected or estimated by the object position estimation unit 22 is executed by this process.

ステップS11の通常処理において追尾点の追尾ができなくなったとき、ステップS12において、例外処理が実行される。この例外処理の詳細は、図12のフローチャートを参照して後述するが、この例外処理により、追尾点が画像から見えなくなったとき、テンプレートマッチングにより通常処理への復帰処理が実行される。例外処理によって追尾処理を継続することができなくなった、すなわち、通常処理へ復帰することができなくなったと判定された場合には処理が終了されるが、テンプレートマッチングによる復帰処理の結果、通常処理への復帰が可能と判定された場合には、処理は再びステップS11に戻る。このようにして、ステップS11の通常処理とステップS12の例外処理が、各フレーム毎に順次繰り返し実行される。   When the tracking point cannot be tracked in the normal process of step S11, an exception process is executed in step S12. Details of this exception processing will be described later with reference to the flowchart of FIG. 12. When the tracking point is not visible from the image by this exception processing, a return processing to the normal processing is executed by template matching. If it is determined that the tracking process cannot be continued due to the exception process, that is, the process cannot be returned to the normal process, the process is terminated. If it is determined that it is possible to return, the process returns to step S11 again. In this manner, the normal process in step S11 and the exception process in step S12 are repeatedly executed sequentially for each frame.

本実施の形態においては、この通常処理と例外処理により、図6乃至図8に示されるように、追尾対象が回転したり、オクルージョンが発生したり、シーンチェンジが発生する等、追尾点が一時的に見えなくなった場合においても、追尾が可能となる。   In the present embodiment, as shown in FIGS. 6 to 8, the tracking point is temporarily changed by the normal process and the exception process, such as the tracking target rotating, the occlusion occurring, the scene changing, etc. Tracking is possible even if it becomes invisible.

図6の例では、フレームn−1において、追尾対象としての人の顔74が表示されており、この人の顔74は、右目72と左目73を有している。ユーザが、このうちの、例えば右目72(正確には、その中の1つの画素)を追尾点71として指定したとする。図6の例においては、次のフレームnにおいて、追尾対象としての人が図中左方向に移動しており、さらに次のフレームn+1においては、人の顔74が時計方向に回動している。その結果、今まで見えていた右目72が表示されなくなり、追尾ができなくなる。そこで、上述した図5のステップS11の通常処理においては、右目72と同一の対象物としての顔74上の左目73が新たな追尾点として選択され、追尾点が左目73に乗り換えられる。これにより追尾が可能となる。   In the example of FIG. 6, a person's face 74 as a tracking target is displayed in the frame n−1, and this person's face 74 has a right eye 72 and a left eye 73. It is assumed that the user designates, for example, the right eye 72 (exactly one pixel therein) as the tracking point 71 among them. In the example of FIG. 6, in the next frame n, the person to be tracked moves in the left direction in the figure, and in the next frame n + 1, the person's face 74 rotates in the clockwise direction. . As a result, the right eye 72 that has been visible until now is not displayed, and tracking cannot be performed. Therefore, in the above-described normal processing in step S <b> 11 of FIG. 5, the left eye 73 on the face 74 as the same object as the right eye 72 is selected as a new tracking point, and the tracking point is switched to the left eye 73. This enables tracking.

図7の例では、フレームn−1において、追尾対象としての人の顔74の図中左側からボール81が移動してきており、次のフレームnにおいて、ボール81がちょうど顔74を覆う状態となっている。この状態においては、追尾点71として指定されていた右目72を含む顔74が表示されていない。このようなオクルージョンが起きると、対象物としての顔74が表示されていないので、追尾点71に代えて追尾する乗り換え点もなくなり、以後、追尾点を追尾することが困難になる。そこで本実施の形態においては、追尾点71としての右目72を含むフレームn−1(実際には時間的にもっと前のフレーム)の画像がテンプレートとして予め保存され、ボール81がさらに右側に移動し、フレームn+1において、追尾点71として指定された右目72が再び現れると、上述した図5のステップS12の例外処理により、追尾点71としての右目72が再び表示されたことがテンプレートに基づいて確認され、右目72が再び追尾点71として追尾されることになる。   In the example of FIG. 7, the ball 81 has moved from the left side of the figure of the human face 74 as the tracking target in the frame n−1, and the ball 81 just covers the face 74 in the next frame n. ing. In this state, the face 74 including the right eye 72 designated as the tracking point 71 is not displayed. When such an occlusion occurs, the face 74 as the object is not displayed, so there is no transfer point to be tracked instead of the tracking point 71, and it becomes difficult to track the tracking point thereafter. Therefore, in the present embodiment, an image of frame n−1 (actually a previous frame in time) including the right eye 72 as the tracking point 71 is stored in advance as a template, and the ball 81 moves further to the right. When the right eye 72 designated as the tracking point 71 appears again in the frame n + 1, it is confirmed based on the template that the right eye 72 as the tracking point 71 is displayed again by the exception processing in step S12 of FIG. Thus, the right eye 72 is tracked again as the tracking point 71.

図8の例では、フレームn−1において、追尾対象としての人の顔74が表示されているが、次のフレームnにおいて、自動車91が人の顔74を含む全体を覆い隠している。すなわち、この場合、シーンチェンジが起きたことになる。そこで本実施の形態においては、このようにシーンチェンジが起きて追尾点71が画像から存在しなくなっても、自動車91が移動して、フレームn+1において再び右目72が表示されると、上述した図5のステップS12の例外処理により、追尾点71としての右目72が再び出現したことがテンプレートに基づいて確認され、この右目72を再び追尾点71として追尾することが可能となる。   In the example of FIG. 8, the person's face 74 as a tracking target is displayed in the frame n−1. However, in the next frame n, the automobile 91 covers the entire face including the person's face 74. That is, in this case, a scene change has occurred. Therefore, in the present embodiment, even when the scene change occurs and the tracking point 71 no longer exists in the image, the vehicle 91 moves and the right eye 72 is displayed again in the frame n + 1. 5, it is confirmed based on the template that the right eye 72 as the tracking point 71 has reappeared, and the right eye 72 can be tracked again as the tracking point 71.

次に、図9のフローチャートを参照して、図5のステップS11の通常処理の詳細について説明する。   Next, the details of the normal processing in step S11 in FIG. 5 will be described with reference to the flowchart in FIG.

ステップS21において、追尾点決定部57は、通常処理の初期化処理を実行する。その詳細は、図10のフローチャートを参照して後述するが、この処理によりユーザから追尾するように指定された追尾点を基準とする領域推定範囲が設定される。この領域推定範囲は、ユーザにより指定された追尾点と同一の対象物(例えば、追尾点が人の目である場合、目と同様の動きをする剛体としての人の顔、または人の体など)に属する点の範囲を推定する際に参照する範囲である。乗り換え点は、この領域推定範囲の中の点から選択される。   In step S21, the tracking point determination unit 57 executes an initialization process of a normal process. The details will be described later with reference to the flowchart of FIG. 10, but an area estimation range based on the tracking point designated to be tracked by the user is set by this processing. This area estimation range is the same object as the tracking point specified by the user (for example, when the tracking point is a human eye, a human face as a rigid body that moves like the eye, a human body, or the like) ) Is a range to be referred to when estimating the range of points belonging to. A transfer point is selected from points in the region estimation range.

ステップS22において、制御部59は、次のフレームの画像の入力を待機するように各部を制御する。ステップS23において、動き推定部52は、追尾点の動きを推定する。すなわち、ユーザにより指定された追尾点を含むフレーム(ここでは前フレームという)より時間的に後のフレーム(ここでは後フレームという)をステップS22の処理で取り込むことで、結局連続する2フレームの画像が得られたことになるので、ステップS23において、前フレームの追尾点に対応する後フレームの追尾点の位置を推定することで、追尾点の動きが推定される。   In step S22, the control unit 59 controls each unit so as to wait for input of an image of the next frame. In step S23, the motion estimation unit 52 estimates the tracking point motion. That is, by capturing a frame (hereinafter referred to as a subsequent frame) that is temporally later than a frame including a tracking point designated by the user (here, referred to as a previous frame) in the process of step S22, two consecutive frames are eventually obtained. Therefore, in step S23, the movement of the tracking point is estimated by estimating the position of the tracking point of the subsequent frame corresponding to the tracking point of the previous frame.

なお、時間的に前または後とは、入力の順番や処理の順番をいう。通常、撮像の順番に各フレームの画像が入力されるので、その場合、より時間的に前に撮像されたフレームが前フレームとなるが、時間的に後に撮像されたフレームが先に処理される場合には、時間的に後に撮像されたフレームが前フレームとなる。   Note that “before or after in time” means the order of input or the order of processing. Usually, since the images of each frame are input in the order of imaging, in that case, the frame captured earlier in time becomes the previous frame, but the frame captured later in time is processed first. In this case, a frame that is imaged later in time becomes the previous frame.

ステップS24において、動き推定部52は、ステップS23の処理の結果、追尾点が推定可能であったか否かを判定する。追尾点が推定可能であったか否かは、例えば、動き推定部52が生成、出力する動きベクトル(後述)の確度の値を、予め設定されている閾値と比較することで判定される。具体的には、動きベクトルの確度が閾値以上であれば推定が可能であり、閾値より小さければ推定が不可能であると判定される。すなわち、ここにおける可能性は比較的厳格に判定され、実際には推定が不可能ではなくても確度が低い場合には、不可能と判定される。これにより、より確実な追尾処理が可能となる。   In step S24, the motion estimation unit 52 determines whether the tracking point can be estimated as a result of the process in step S23. Whether or not the tracking point can be estimated is determined, for example, by comparing the accuracy value of a motion vector (described later) generated and output by the motion estimation unit 52 with a preset threshold value. Specifically, it is possible to estimate if the accuracy of the motion vector is equal to or greater than a threshold, and it is determined that estimation is impossible if the accuracy is smaller than the threshold. In other words, the possibility here is determined relatively strictly, and if the estimation is not actually impossible but the accuracy is low, it is determined as impossible. As a result, more reliable tracking processing can be performed.

なお、ステップS24では、追尾点での動き推定結果と追尾点の近傍の点での動き推定結果が、多数を占める動きと一致する場合には推定可能、一致しない場合には推定不可能と判定するようにすることも可能である。   In step S24, it is determined that the motion estimation result at the tracking point and the motion estimation result at a point in the vicinity of the tracking point can be estimated if the motion occupies a large number of motions. It is also possible to do so.

ステップS24において、追尾点の動きが推定可能であると判定された場合、つまり、追尾点が同一対象物上の対応する点上に正しく設定されている確率が比較的高い場合、ステップS25に進む。より具体的には、図6の例において右目72が追尾点71として指定された場合、右目72が正しく追尾されている確率が比較的高い場合には追尾点の動きが推定可能であると判定される。   If it is determined in step S24 that the movement of the tracking point can be estimated, that is, if the probability that the tracking point is correctly set on the corresponding point on the same object is relatively high, the process proceeds to step S25. . More specifically, when the right eye 72 is designated as the tracking point 71 in the example of FIG. 6, it is determined that the movement of the tracking point can be estimated when the probability that the right eye 72 is correctly tracked is relatively high. Is done.

ステップS25において、追尾点決定部57は、ステップS23の処理で得られた推定動き(いわゆる動きベクトル)の分だけ追尾点をシフトする。これにより、前フレームの追尾点の追尾後の後フレームにおける追尾の位置が決定されることになる。   In step S25, the tracking point determination unit 57 shifts the tracking point by the estimated motion (so-called motion vector) obtained in the process of step S23. As a result, the tracking position in the subsequent frame after the tracking of the tracking point in the previous frame is determined.

ステップS25の処理の後、ステップS26において、領域推定関連処理が実行される。この領域推定関連処理の詳細は、本出願人が先に提案している特開2005−303983号公報に開示されている。この処理により、ステップS21の通常処理の初期化処理で指定された領域推定範囲が更新される。また対象物体が回転するなどして、追尾点が表示されない状態になった場合に、追尾点を乗り換えるべき点としての乗り換え点としての候補(乗り換え候補)が、まだ追尾が可能な状態において予め抽出され、乗り換え候補保持部56で保持される。さらに乗り換え候補への乗り換えもできなくなった場合、追尾は一旦中断されるが、追尾点が再び出現することで再び追尾が可能になったことを確認するためのテンプレートが予め作成され、テンプレート保持部58で保持される。   After step S25, region estimation related processing is executed in step S26. Details of this region estimation related processing are disclosed in Japanese Patent Laid-Open No. 2005-303983 previously proposed by the present applicant. With this process, the area estimation range designated in the initialization process of the normal process in step S21 is updated. In addition, when the tracking point is not displayed due to rotation of the target object, candidates for transfer points (transfer candidates) as points to be transferred are previously extracted in a state where tracking is still possible. And is held by the transfer candidate holding unit 56. In addition, when the transfer to the transfer candidate becomes impossible, the tracking is temporarily interrupted, but a template for confirming that the tracking can be performed again when the tracking point appears again is created in advance, and the template holding unit 58.

ステップS26の領域推定関連処理が終了した後、処理は再びステップS22に戻り、それ以降の処理が繰り返し実行される。   After the region estimation related processing in step S26 is completed, the processing returns to step S22 again, and the subsequent processing is repeatedly executed.

このように、ユーザから指定された追尾点の動きが推定可能である限り、ステップS22乃至ステップS26の処理がフレーム毎に繰り返し実行され、追尾が行われることになる。   As described above, as long as the movement of the tracking point designated by the user can be estimated, the processing from step S22 to step S26 is repeatedly executed for each frame, and tracking is performed.

これに対して、ステップS24において、追尾点の動きが推定不可能であると判定された場合、すなわち、上述したように、例えば動きベクトルの確度が閾値以下であるような場合には、処理はステップS27に進む。   On the other hand, when it is determined in step S24 that the movement of the tracking point cannot be estimated, that is, as described above, for example, when the accuracy of the motion vector is equal to or less than the threshold value, the processing is performed. Proceed to step S27.

ステップS27において、追尾点決定部57は、ステップS26の領域推定関連処理で生成された乗り換え候補が乗り換え候補保持部56に保持されているので、その中から、元の追尾点に最も近い乗り換え候補を1つ選択する。追尾点決定部57は、ステップS28で乗り換え候補が選択できたか否かを判定し、乗り換え候補が選択できた場合には、ステップS29に進み、追尾点をステップS27の処理で選択した乗り換え候補に乗り換える(変更する)。これにより、乗り換え候補の点が新たな追尾点として設定される。   In step S27, the tracking point determination unit 57 holds the transfer candidate generated in the region estimation-related processing in step S26 in the transfer candidate holding unit 56, and therefore, the transfer candidate closest to the original tracking point is among them. Select one. The tracking point determination unit 57 determines whether or not a transfer candidate has been selected in step S28. If a transfer candidate has been selected, the tracking point determination unit 57 proceeds to step S29 and sets the tracking point as the transfer candidate selected in step S27. Change (change). Thereby, the transfer candidate point is set as a new tracking point.

ステップS29の処理の後、処理はステップS23に戻り、乗り換え候補の中から選ばれた追尾点の動きを推定する処理が実行される。そして、ステップS24において新たに設定された追尾点の動きが推定可能であるか否かが再び判定され、推定可能であれば、ステップS25において追尾点を推定動き分だけシフトする処理が行われ、ステップS26において領域推定関連処理が実行される。その後、処理は再びステップS22に戻り、それ以降の処理が繰り返し実行される。   After the process of step S29, the process returns to step S23, and the process of estimating the movement of the tracking point selected from the transfer candidates is executed. Then, it is determined again whether or not the motion of the newly set tracking point can be estimated in step S24. If it can be estimated, a process of shifting the tracking point by the estimated motion is performed in step S25. In step S26, region estimation related processing is executed. Thereafter, the process returns to step S22 again, and the subsequent processes are repeatedly executed.

ステップS24において、新たに設定された追尾点も推定不可能であると判定された場合には、再びステップS27に進み、乗り換え候補の中から、元の追尾点に次に最も近い乗り換え候補が選択され、ステップS29において、その乗り換え候補が新たな追尾点として設定される。その新たな追尾点について、再びステップS23以降の処理が繰り返される。   If it is determined in step S24 that the newly set tracking point cannot be estimated, the process proceeds again to step S27, and the next transfer candidate closest to the original tracking point is selected from the transfer candidates. In step S29, the transfer candidate is set as a new tracking point. The process after step S23 is repeated again for the new tracking point.

乗り換え候補保持部56で保持されているすべての乗り換え候補を新たな追尾点としても、追尾点の動きを推定することができなかった場合には、ステップS28において、乗り換え候補が選択できなかったと判定され、この通常処理は終了される。そして、図5のステップS12の例外処理に処理が進むことになる。   Even if all the transfer candidates held in the transfer candidate holding unit 56 are used as new tracking points, if it is not possible to estimate the movement of the tracking point, it is determined in step S28 that no transfer candidate has been selected. This normal processing is terminated. Then, the process proceeds to the exception process in step S12 of FIG.

次に、図10のフローチャートを参照して、図9のステップS21の通常処理の初期化処理の詳細について説明する。   Next, details of the initialization process of the normal process in step S21 of FIG. 9 will be described with reference to the flowchart of FIG.

ステップS41において、制御部59は、今の処理は例外処理からの復帰の処理であるか否かを判定する。すなわち、図5のステップS12の例外処理を終了した後、再びステップS11の通常処理に戻ってきたのか否かが判定される。最初のフレームの処理においては、まだステップS12の例外処理は実行されていないので、例外処理からの復帰ではないと判定され、処理はステップS42に進む。   In step S41, the control unit 59 determines whether or not the current process is a process for returning from the exception process. That is, after the exception process in step S12 in FIG. 5 is terminated, it is determined whether or not the process has returned to the normal process in step S11. In the process of the first frame, since the exception process in step S12 has not been executed yet, it is determined that the process has not returned from the exception process, and the process proceeds to step S42.

ステップS42において、追尾点決定部57は、追尾点を追尾点指示の位置に設定する処理を実行する。すなわち、入力画像の中で、例えば、最も輝度の高い点が追尾点として設定される。   In step S42, the tracking point determination unit 57 executes processing for setting the tracking point to the position of the tracking point instruction. That is, for example, the point with the highest luminance in the input image is set as the tracking point.

なお、追尾点は、ユーザによる指定など、他の方法により設定されるようにしてもよい。ユーザによる指定とは、例えば、ユーザが指示入力部29を操作することで、制御部59に対して、入力画像の中の所定の点を追尾点として指定することにより行われることである。追尾点決定部57は、設定した追尾点の情報を領域推定関連処理部55に供給する。   The tracking point may be set by other methods such as designation by the user. The designation by the user is, for example, performed by designating a predetermined point in the input image as a tracking point to the control unit 59 by operating the instruction input unit 29 by the user. The tracking point determination unit 57 supplies the set tracking point information to the region estimation related processing unit 55.

ステップS43において、領域推定関連処理部55は、ステップS42の処理で設定された追尾点の位置情報に基づき、領域推定範囲を設定する。この領域推定範囲は、追尾点と同じ剛体上の点を推定する際の参照範囲であり、予め追尾点と同じ剛体部分が領域推定範囲の大部分を占めるように、より具体的には、追尾点と同じ剛体部分に推定領域範囲の位置や大きさが追随するように設定することで、領域推定範囲の中で最も多数を占める動きを示す部分を追尾点と同じ剛体部分であると推定できるようにするためのものである。ステップS43では、初期値として、例えば、追尾点を中心とする予め設定された一定の範囲が領域推定範囲とされる。その後、処理は図9のステップS22に進むことになる。   In step S43, the region estimation related processing unit 55 sets a region estimation range based on the tracking point position information set in step S42. This region estimation range is a reference range when estimating a point on the same rigid body as the tracking point, and more specifically, tracking so that the same rigid body portion as the tracking point occupies most of the region estimation range in advance. By setting the position and size of the estimated area range to follow the same rigid body part as the point, the part that shows the most movement in the estimated area range can be estimated as the same rigid body part as the tracking point It is for doing so. In step S43, as a default value, for example, a predetermined fixed range centered on the tracking point is set as the region estimation range. Thereafter, the process proceeds to step S22 in FIG.

一方、ステップS41において、現在の処理が、図5のステップS12の例外処理からの復帰の処理であると判定された場合、ステップS44に進む。ステップS44において、追尾点決定部57は、図12のフローチャートを参照して後述する例外処理によるテンプレートにマッチした位置に基づき追尾点と領域推定範囲を設定する。例えば、テンプレート上の追尾点とマッチした現フレーム上の点が追尾点とされ、その点から予め設定されている一定の範囲が領域推定範囲とされる。その後、処理は図9のステップS22に進む。   On the other hand, if it is determined in step S41 that the current process is a return process from the exception process in step S12 of FIG. 5, the process proceeds to step S44. In step S44, the tracking point determination unit 57 sets a tracking point and a region estimation range based on a position that matches a template by exception processing described later with reference to the flowchart of FIG. For example, a point on the current frame that matches the tracking point on the template is set as the tracking point, and a certain range set in advance from the point is set as the region estimation range. Thereafter, the processing proceeds to step S22 in FIG.

以上の処理を、図11を参照して説明すると次のようになる。   The above process will be described with reference to FIG.

図10のステップS42において、例えば、図11に示されるように、フレームn−1の人の右目72が追尾点71として指定されると、ステップS43において、追尾点71を含む所定の領域が領域推定範囲101として指定される。図9のステップS24において、領域推定範囲101の範囲内のサンプル点が次のフレームにおいて推定可能であるか否かが判定される。図11の例の場合、フレームnの次のフレームn+1においては、領域推定範囲101のうち、右目72を含む図中左側半分の領域102がボール81で隠されているため、フレームnの追尾点71の動きを、次のフレームn+1において推定することができない。そこで、このような場合においては、時間的に前のフレームn−1で乗り換え候補として予め用意されていた領域指定範囲101内(右目72を含む剛体としての顔74内)の点の中から1つの点(例えば、顔74に含まれる左目73(正確には、その中の1つの画素))が選択され、その点がフレームn+1における、新たな追尾点とされる。   In step S42 of FIG. 10, for example, as shown in FIG. 11, when the right eye 72 of the person in the frame n-1 is designated as the tracking point 71, a predetermined region including the tracking point 71 is an area in step S43. Designated as the estimated range 101. In step S24 of FIG. 9, it is determined whether or not the sample points within the region estimation range 101 can be estimated in the next frame. In the case of the example in FIG. 11, in the frame n + 1 next to the frame n, the left half region 102 in the drawing including the right eye 72 in the region estimation range 101 is hidden by the ball 81. 71 motion cannot be estimated in the next frame n + 1. Therefore, in such a case, one of the points in the area designation range 101 (in the face 74 as a rigid body including the right eye 72) prepared in advance as a transfer candidate in the previous frame n-1 in time is selected. One point (for example, the left eye 73 included in the face 74 (exactly one pixel therein)) is selected, and that point is set as a new tracking point in the frame n + 1.

次に、図12のフローチャートを参照して、図5のステップS11の通常処理に続いて行われる、ステップS12の例外処理の詳細について説明する。この処理は、上述したように、図9のステップS24において追尾点の動きを推定することが不可能と判定され、さらにステップS28において追尾点を乗り換える乗り換え候補が選択できなかったと判定された場合に実行されることになる。   Next, with reference to the flowchart of FIG. 12, the details of the exception process of step S12 performed following the normal process of step S11 of FIG. 5 will be described. As described above, this process is performed when it is determined in step S24 in FIG. 9 that it is impossible to estimate the movement of the tracking point, and in step S28, it is determined that the transfer candidate for changing the tracking point cannot be selected. Will be executed.

ステップS51において、制御部59は、例外処理の初期化処理を実行する。ここで、図13のフローチャートを参照して、例外処理の初期化処理の詳細について説明する。   In step S51, the control unit 59 executes an exception process initialization process. Here, the details of the exception process initialization process will be described with reference to the flowchart of FIG.

ステップS61において、制御部59は、追尾点の動きを推定することが不可能で、かつ、追尾点を乗り換える乗り換え候補が選択できなかった際にシーンチェンジが起きていたか否かを判定する。シーンチェンジ検出部53は、動き推定部52の推定結果に基づいてシーンチェンジがあったか否かを常に監視しており、制御部59は、そのシーンチェンジ検出部53の検出結果に基づいて、ステップS61の判定処理を実行する。シーンチェンジ検出部53の具体的処理については、図24と図25を参照して後述する。   In step S61, the control unit 59 determines whether or not a scene change has occurred when the movement of the tracking point cannot be estimated and the transfer candidate for changing the tracking point cannot be selected. The scene change detection unit 53 constantly monitors whether or not a scene change has occurred based on the estimation result of the motion estimation unit 52, and the control unit 59 performs step S61 based on the detection result of the scene change detection unit 53. The determination process is executed. Specific processing of the scene change detection unit 53 will be described later with reference to FIGS.

シーンチェンジが起きている場合、制御部59は、追尾ができなくなった理由がシーンチェンジが発生したことによるものと推定して、ステップS62においてモードをシーンチェンジに設定する。これに対して、ステップS61においてシーンチェンジが発生していないと判定された場合には、制御部59は、ステップS63においてモードをその他のモードに設定する。   If a scene change has occurred, the control unit 59 estimates that the reason why tracking has become impossible is that a scene change has occurred, and sets the mode to scene change in step S62. On the other hand, when it is determined in step S61 that no scene change has occurred, the control unit 59 sets the mode to another mode in step S63.

ステップS62またはステップS63の処理の後、ステップS64においてテンプレートマッチング部51は、時間的に最も古いテンプレートを選択する処理を実行する。具体的には、図14に示されるように、例えばフレームnからフレームn+1に移行するとき、例外処理が実行されるものとすると、フレームn−m+1からフレームnに関して生成され、テンプレート保持部58に保持されているm個のフレームのテンプレートの中から、時間的に最も古いテンプレートであるフレームn−m+1に関して生成されたテンプレートが選択される。   After the process of step S62 or step S63, the template matching unit 51 executes a process of selecting the oldest template in time in step S64. Specifically, as shown in FIG. 14, for example, when transition from frame n to frame n + 1 is performed, if exception processing is to be executed, a frame n−m + 1 is generated for frame n and is stored in the template holding unit 58. A template generated with respect to the frame mn + 1, which is the oldest template in time, is selected from the held m-frame templates.

このように例外処理への移行直前のテンプレート(図14の例の場合フレームnに関して生成されたテンプレート)を用いずに、時間的に少し前のテンプレートを選択するのは、次のような理由からである。つまり、追尾対象のオクルージョンなどで例外処理への移行が発生した場合には、移行の直前には追尾対象が既にかなり隠れており、その時点のテンプレートでは、追尾対象を充分に大きく捉えることができない可能性が高いからである。従って、このように時間的に若干前のフレームにおけるテンプレートを選択することで、確実な追尾が可能となる。   In this way, the template immediately before the transition to exception processing (the template generated with respect to frame n in the case of the example in FIG. 14) is not used, and the template slightly before in time is selected for the following reason. It is. In other words, if a transition to exception processing occurs due to the tracking target occlusion, the tracking target is already quite hidden immediately before the transition, and the tracking target cannot be captured sufficiently large in the template at that time. This is because the possibility is high. Therefore, reliable tracking is possible by selecting a template in a frame slightly before in time.

図13の説明に戻る。ステップS65において、テンプレートマッチング部51は、テンプレート探索範囲を設定する処理を実行する。テンプレート探索範囲は、例えば、例外処理に移行する直前の追尾点の位置がテンプレート探索範囲の中心となるように設定される。   Returning to the description of FIG. In step S65, the template matching unit 51 executes a process for setting a template search range. For example, the template search range is set such that the position of the tracking point immediately before the transition to the exception process is the center of the template search range.

すなわち、図15に示されるように、フレームnにおいて被写体の顔74の右目72が追尾点71として指定されている場合において、図中左方向からボール81が飛んできて、フレームn+1において追尾点71を含む顔74が隠れ、フレームn+2において、再び追尾点71が現れる場合を想定する。この場合において、テンプレート範囲111に含まれる追尾点71を中心とする領域がテンプレート探索範囲112として設定される。   That is, as shown in FIG. 15, when the right eye 72 of the subject's face 74 is designated as the tracking point 71 in the frame n, the ball 81 flies from the left direction in the figure, and the tracking point 71 in the frame n + 1. Is assumed, and the tracking point 71 appears again in the frame n + 2. In this case, an area centered on the tracking point 71 included in the template range 111 is set as the template search range 112.

ステップS66において、テンプレートマッチング部51は、例外処理への移行後の経過フレーム数およびシーンチェンジ数を0にリセットする。このフレーム数とシーンチェンジ数は、後述する図12のステップS55における継続判定処理(図16のステップS71,S73,S75,S77)において使用される。   In step S66, the template matching unit 51 resets the number of elapsed frames and the number of scene changes after shifting to exception processing to zero. The number of frames and the number of scene changes are used in a continuation determination process (steps S71, S73, S75, and S77 in FIG. 16) in step S55 in FIG.

以上のようにして、例外処理の初期化処理が終了した後、図12のステップS52において、制御部59は次のフレームの画像の入力を待機する処理を実行する。ステップS53において、テンプレートマッチング部51は、テンプレート探索範囲内においてテンプレートマッチング処理を行う。   After the exception process initialization process is completed as described above, in step S52 of FIG. 12, the control unit 59 executes a process of waiting for an input of an image of the next frame. In step S53, the template matching unit 51 performs a template matching process within the template search range.

ステップS54においてテンプレートマッチング部51は、通常処理への復帰が可能であるか否かを判定する。すなわち、テンプレートマッチング処理により、数フレーム前のテンプレート(図15のテンプレート範囲111内の画素)と、テンプレート探索範囲内のマッチング対象の画素の差分の絶対値和が演算される。   In step S54, the template matching unit 51 determines whether it is possible to return to normal processing. That is, by the template matching process, an absolute value sum of differences between a template several frames before (a pixel in the template range 111 in FIG. 15) and a matching target pixel in the template search range is calculated.

より詳細には、テンプレート範囲111内の所定のブロックと、テンプレート探索範囲内の所定のブロックにおけるそれぞれの画素の差分の絶対値和が演算される。ブロックの位置がテンプレート範囲111内で順次移動され、各ブロックの差分の絶対値和が加算され、そのテンプレートの位置における値とされる。そして、テンプレートをテンプレート探索範囲内で順次移動させた場合における差分の絶対値和が最も小さくなる位置とその値が検索される。ステップS54において、検索された最小の差分の絶対値和が、予め設定されている所定の閾値と比較される。差分の絶対値和が閾値以下である場合には、テンプレートに含まれている追尾点を含む画像が再び出現したことになるので、通常処理への復帰が可能であると判定され、処理は図5のステップS11の通常処理に戻る。   More specifically, the absolute value sum of the difference between each pixel in the predetermined block in the template range 111 and the predetermined block in the template search range is calculated. The position of the block is sequentially moved within the template range 111, and the sum of absolute values of the differences of the respective blocks is added to obtain a value at the position of the template. Then, the position where the sum of absolute values of the differences becomes the smallest when the template is sequentially moved within the template search range and its value are searched. In step S54, the absolute sum of the searched minimum differences is compared with a predetermined threshold value set in advance. If the sum of the absolute values of the differences is equal to or less than the threshold value, the image including the tracking point included in the template has appeared again. Therefore, it is determined that the normal process can be restored, and the process is illustrated in FIG. The process returns to the normal process of step S11 in step 5.

そして、上述したように、図10のステップS41において、例外処理からの復帰であると判定され、ステップS44において、差分絶対値和が最小となる位置をテンプレートのマッチした位置として、このマッチした位置とテンプレートに対応して保持してあったテンプレート位置と追尾点領域推定範囲の位置関係から、追尾点と領域推定範囲の設定が行われる。   Then, as described above, in step S41 of FIG. 10, it is determined that the process returns from the exception process. In step S44, the position where the sum of absolute differences is minimum is set as the matched position of the template. The tracking point and the area estimation range are set based on the positional relationship between the template position held corresponding to the template and the tracking point area estimation range.

図12のステップS54における通常処理への復帰が可能であるか否かの判定は、最小の差分絶対値和をテンプレートのアクティビティで除算して得られる値を閾値と比較することで行うようにしてもよい。この場合におけるアクティビティは、後述する図17のアクティビティ算出部122により、図18のステップS93において算出された値を用いることができる。   In step S54 of FIG. 12, it is determined whether or not it is possible to return to normal processing by comparing the value obtained by dividing the minimum sum of absolute differences by the activity of the template with a threshold value. Also good. As the activity in this case, the value calculated in step S93 in FIG. 18 by the activity calculation unit 122 in FIG. 17 described later can be used.

あるいはまた、今回の最小の差分絶対値和を1フレーム前における最小の差分絶対値和で除算することで得られた値を所定の閾値と比較することで、通常処理への復帰が可能であるか否かを判定するようにしてもよい。この場合、アクティビティの計算が不要となる。すなわち、ステップS54では、テンプレートとテンプレート探索範囲の相関が演算され、相関値と閾値の比較に基づいて判定が行われる。   Alternatively, it is possible to return to the normal processing by comparing a value obtained by dividing the current minimum absolute difference sum by the minimum absolute difference sum one frame before with a predetermined threshold. It may be determined whether or not. In this case, it is not necessary to calculate the activity. That is, in step S54, the correlation between the template and the template search range is calculated, and determination is performed based on the comparison between the correlation value and the threshold value.

ステップS54において、通常処理への復帰が可能ではないと判定された場合、ステップS55に進み、継続判定処理が実行される。継続判定処理の詳細は、図16のフローチャートを参照して後述するが、この処理により、例外処理が継続可能であるか否かの判定が行われる。   If it is determined in step S54 that it is not possible to return to the normal process, the process proceeds to step S55, and the continuation determination process is executed. The details of the continuation determination process will be described later with reference to the flowchart of FIG. 16, and this process determines whether or not the exception process can be continued.

ステップS56において、制御部59は、ステップS55の継続判定処理による例外処理での追尾点の追尾が継続可能であるか否かの継続判定結果に基づいて(後述する図16のステップS76,S78で設定されたフラグに基づいて)判定する。例外処理での追尾点の追尾処理が継続可能であると判定された場合、処理はステップS52に戻り、それ以降の処理が繰り返し実行される。すなわち、追尾点が再び出現するまで待機する処理が繰り返し実行される。   In step S56, the control unit 59 determines whether or not tracking of the tracking point in the exception process by the continuation determination process in step S55 can be continued (in steps S76 and S78 of FIG. 16 described later). Determine based on the set flag). When it is determined that the tracking process of the tracking point in the exception process can be continued, the process returns to step S52, and the subsequent processes are repeatedly executed. That is, the process of waiting until the tracking point appears again is repeatedly executed.

これに対して、ステップS56において、例外処理での追尾点の追尾処理が継続可能ではないと判定された場合(後述する図16のステップS75の処理で追尾点が消失した後の経過フレーム数が閾値THfr以上と判定されるか、または、ステップS77の処理でシーンチェンジ数が閾値THsc以上と判定された場合)、もはや例外処理は不可能であるとして、追尾処理は終了される。なお、追尾処理を終了するのではなく、保持しておいた追尾点を用いて再度通常処理に戻るようにすることも考えられる。この場合の処理については、図43のフローチャートを参照して後述する。   On the other hand, when it is determined in step S56 that the tracking process of the tracking point in the exception process cannot be continued (the number of elapsed frames after the tracking point disappears in the process of step S75 in FIG. 16 described later). If it is determined that the threshold value THfr or more is determined or the number of scene changes is determined to be greater than or equal to the threshold value THsc in the process of step S77), it is determined that exception processing is no longer possible, and the tracking process is terminated. Instead of ending the tracking process, it may be possible to return to the normal process again using the tracking point that has been held. The processing in this case will be described later with reference to the flowchart of FIG.

次に、図16のフローチャートを参照して、図12のステップS55における継続判定処理の詳細について説明する。   Next, details of the continuation determination process in step S55 of FIG. 12 will be described with reference to the flowchart of FIG.

ステップS71において、制御部59は、変数としての経過フレーム数に1を加算する処理を実行する。経過フレーム数は、図12のステップS51の例外処理の初期化処理(図13のステップS66)において、予め0にリセットされている。   In step S71, the control unit 59 executes a process of adding 1 to the number of elapsed frames as a variable. The number of elapsed frames is previously reset to 0 in the exception process initialization process (step S66 in FIG. 13) in step S51 in FIG.

次にステップS72において、制御部59は、シーンチェンジがあるか否かを判定する。シーンチェンジがあるか否かは、シーンチェンジ検出部53が、常にその検出処理を実行しており、その検出結果に基づいて判定が可能である。シーンチェンジがあると判定された場合にはステップS73に進み、制御部59は、変数としてのシーンチェンジ数に1を加算する。このシーンチェンジ数も、図13のステップS66の初期化処理において0にリセットされている。通常処理から例外処理への移行時にシーンチェンジが発生していないと判定された場合には、ステップS73の処理はスキップされる。   Next, in step S72, the control unit 59 determines whether or not there is a scene change. Whether or not there is a scene change can be determined based on the detection result of the scene change detection unit 53 always executing the detection process. If it is determined that there is a scene change, the process proceeds to step S73, and the control unit 59 adds 1 to the number of scene changes as a variable. The number of scene changes is also reset to 0 in the initialization process of step S66 in FIG. If it is determined that no scene change has occurred during the transition from the normal process to the exception process, the process of step S73 is skipped.

次に、ステップS74において、制御部59は、現在設定されているモードがシーンチェンジであるか否かを判定する。このモードは、図13のステップS62またはS63において設定されたものである。現在設定されているモードがシーンチェンジであると判定された場合にはステップS77に進み、制御部59は、シーンチェンジ数が予め設定されている閾値THscより小さいか否かを判定する。制御部59は、ステップS77において、シーンチェンジ数が閾値THscより小さいと判定した場合にはステップS76に進み、継続可のフラグを設定し、シーンチェンジ数が閾値THsc以上であると判定した場合にはステップS78に進み、継続不可のフラグを設定する。   Next, in step S74, the control unit 59 determines whether or not the currently set mode is a scene change. This mode is set in step S62 or S63 of FIG. When it is determined that the currently set mode is a scene change, the process proceeds to step S77, and the control unit 59 determines whether or not the number of scene changes is smaller than a preset threshold value THsc. When the control unit 59 determines in step S77 that the number of scene changes is smaller than the threshold value THsc, the control unit 59 proceeds to step S76, sets a continuation flag, and determines that the number of scene changes is equal to or greater than the threshold value THsc. The process proceeds to step S78, and a flag that cannot be continued is set.

一方、ステップS74において、モードがシーンチェンジではないと判定された場合(モードがその他であると判定された場合)、ステップS75に進み、制御部59は、経過フレーム数が閾値THfrより小さいか否かを判定する。この経過フレーム数も、図13の例外処理の初期化処理のステップS66において、予め0にリセットされている。制御部59は、ステップS75において、経過フレーム数が閾値THfrより小さいと判定された場合にはステップS76に進み、継続可のフラグを設定し、経過フレーム数が閾値THfr以上であると判定された場合にはステップS78に進み、継続不可のフラグを設定する。   On the other hand, when it is determined in step S74 that the mode is not a scene change (when it is determined that the mode is other), the process proceeds to step S75, and the control unit 59 determines whether or not the number of elapsed frames is smaller than the threshold value THfr. Determine whether. This elapsed frame number is also reset to 0 in advance in step S66 of the exception process initialization process of FIG. When it is determined in step S75 that the number of elapsed frames is smaller than the threshold value THfr, the control unit 59 proceeds to step S76, sets a continuation flag, and is determined that the number of elapsed frames is equal to or greater than the threshold value THfr. In this case, the process proceeds to step S78, and a flag indicating that continuation is not possible is set.

このように、テンプレートマッチング処理時におけるシーンチェンジ数が閾値THsc以上になるか、または経過フレーム数が閾値THfr以上になった場合には、それ以上の例外処理は不可能とされる。   As described above, when the number of scene changes at the time of template matching processing is equal to or greater than the threshold value THsc, or when the number of elapsed frames is equal to or greater than the threshold value THfr, further exception processing is impossible.

なお、モードがその他である場合には、シーンチェンジ数が0であるという条件も加えて、継続が可能であるか否かを判定するようにしてもよい。   When the mode is other, a condition that the number of scene changes is 0 may be added to determine whether or not continuation is possible.

以上においては、画像のフレームを処理単位とし、すべてのフレームを用いることを前提としたが、フィールド単位で処理したり、すべてのフレームまたはフィールドを利用するのではなく、所定の間隔で間引いて抽出されたフレームまたはフィールドを用いるようにすることも可能である。   In the above, it is assumed that the frame of the image is used as a processing unit and all frames are used. However, processing is not performed in units of fields or using all frames or fields, but is extracted by thinning out at a predetermined interval. It is also possible to use a modified frame or field.

次に、図17を参照して、図4の動き推定部52の構成例について説明する。図17に示されるように、評価値算出部121、アクティビティ算出部122、および動きベクトル検出部123には、入力画像が供給されている。   Next, a configuration example of the motion estimation unit 52 in FIG. 4 will be described with reference to FIG. As shown in FIG. 17, an input image is supplied to the evaluation value calculation unit 121, the activity calculation unit 122, and the motion vector detection unit 123.

評価値算出部121は、動きベクトルにより対応付けられる両対象の一致度に関する評価値を算出し、正規化処理部125に供給する。アクティビティ算出部122は、入力画像のアクティビティを算出し、閾値判定部124と正規化処理部125に供給する。動きベクトル検出部123は、入力画像から動きベクトルを検出し、評価値算出部121と統合処理部126に供給する。   The evaluation value calculation unit 121 calculates an evaluation value related to the degree of coincidence between both objects associated by the motion vector, and supplies the evaluation value to the normalization processing unit 125. The activity calculation unit 122 calculates the activity of the input image and supplies it to the threshold value determination unit 124 and the normalization processing unit 125. The motion vector detection unit 123 detects a motion vector from the input image and supplies it to the evaluation value calculation unit 121 and the integration processing unit 126.

閾値判定部124は、アクティビティ算出部122より供給されたアクティビティを所定の閾値と比較し、その判定結果を統合処理部126に供給する。正規化処理部125は、評価値算出部121より供給された評価値を、アクティビティ算出部122より供給されたアクティビティに基づいて正規化し、得られた値を統合処理部126に供給する。   The threshold determination unit 124 compares the activity supplied from the activity calculation unit 122 with a predetermined threshold and supplies the determination result to the integration processing unit 126. The normalization processing unit 125 normalizes the evaluation value supplied from the evaluation value calculation unit 121 based on the activity supplied from the activity calculation unit 122, and supplies the obtained value to the integration processing unit 126.

統合処理部126は、正規化処理部125から供給された正規化情報と、閾値判定部124より供給された判定結果に基づいて、動きベクトルの確度を演算し、得られた確度を動きベクトル検出部123より供給された動きベクトルとともに出力する。   The integration processing unit 126 calculates the accuracy of the motion vector based on the normalization information supplied from the normalization processing unit 125 and the determination result supplied from the threshold determination unit 124, and uses the obtained accuracy to detect the motion vector. The motion vector supplied from the unit 123 is output.

次に、図18のフローチャートを参照して、動き推定部52が実行する動き推定処理について説明する。動きベクトルは、点に対するものとして求められているが、その確度は、動きベクトルにより対応付けられる2つの点の近傍の、例えば点を中心とする、小ブロックの画像データを用いて計算される。   Next, a motion estimation process executed by the motion estimation unit 52 will be described with reference to the flowchart of FIG. Although the motion vector is obtained for a point, the accuracy is calculated using image data of a small block in the vicinity of two points associated by the motion vector, for example, centering on the point.

ステップS91において、動きベクトル検出部123は、入力画像から動きベクトルを検出する。この検出には、例えばブロックマッチング方式や勾配法が用いられる。検出された動きベクトルは、評価値算出部121と統合処理部126に供給される。   In step S91, the motion vector detection unit 123 detects a motion vector from the input image. For this detection, for example, a block matching method or a gradient method is used. The detected motion vector is supplied to the evaluation value calculation unit 121 and the integration processing unit 126.

ステップS92において、評価値算出部121は、ステップS91の処理で検出された動きベクトルにより対応付けられる両対象の一致度に関する評価値を算出する。具体的には、例えば、動きベクトルで対応付けられる2つの点を中心とする2つのブロックの画素値の差分絶対値和が算出される。すなわち、ステップS91の処理で動きベクトル検出部123により検出された動きベクトルV(vx,vy)と、それに基づく時間的に前のフレームの画像Fi上の点P(Xp,Yp)、並びに時間的に後のフレームの画像Fj上の点Q(Xq,Yq)の関係は次式(1)で表される。   In step S92, the evaluation value calculation unit 121 calculates an evaluation value related to the degree of coincidence of both objects associated with the motion vector detected in the process of step S91. Specifically, for example, the sum of absolute differences of pixel values of two blocks centered on two points associated with motion vectors is calculated. That is, the motion vector V (vx, vy) detected by the motion vector detection unit 123 in the process of step S91, the point P (Xp, Yp) on the image Fi of the previous frame in time based on the motion vector V (vx, vy) The relationship between the point Q (Xq, Yq) on the image Fj of the subsequent frame is expressed by the following equation (1).

Figure 2007272731
Figure 2007272731

評価値算出部121は点Pを中心とするブロックと、点Qを中心とするブロックについて、次式(2)に基づいて評価値Eval(P,Q,i,j)を演算する。   The evaluation value calculation unit 121 calculates an evaluation value Eval (P, Q, i, j) based on the following equation (2) for a block centered on the point P and a block centered on the point Q.

Figure 2007272731
Figure 2007272731

各ブロックは、1辺が2L+1画素の正方形とされている。上記式(2)における総和ΣΣは、xが−LからLについて、yが−LからLについて、対応する画素同士で行われる。従って、例えば、L=2である場合、9個の差分が得られ、その絶対値の総和が演算される。評価値は、その値が0に近づくほど、2つのブロックがよく一致していることを表している。   Each block is a square having 2L + 1 pixels on one side. The sum ΣΣ in the above equation (2) is performed between corresponding pixels when x is from −L to L and y is from −L to L. Therefore, for example, when L = 2, nine differences are obtained, and the sum of the absolute values is calculated. The evaluation value indicates that the two blocks match well as the value approaches zero.

評価値算出部121は、算出した評価値を正規化処理部125に供給する。   The evaluation value calculation unit 121 supplies the calculated evaluation value to the normalization processing unit 125.

ステップS93において、アクティビティ算出部122は、入力画像からアクティビティを算出する。アクティビティは、画像の複雑さを表す特徴量であり、図19に示されるように、各画素毎に注目画素Y(x,y)と、それに隣接する8画素Y(x+i,y+j)との差分絶対値和の平均値が、注目画素位置のアクティビティActivity(x,y)として次式(3)に基づいて演算される。   In step S93, the activity calculation unit 122 calculates an activity from the input image. The activity is a feature amount representing the complexity of the image, and as shown in FIG. 19, the difference between the target pixel Y (x, y) and the adjacent 8 pixels Y (x + i, y + j) for each pixel. The average value of the sum of absolute values is calculated based on the following equation (3) as activity Activity (x, y) at the target pixel position.

Figure 2007272731
Figure 2007272731

図19の例の場合、3×3画素のうち、中央に位置する注目画素Y(x,y)の値は110であり、それに隣接する8個の画素の値は、それぞれ80,70,75,100,100,100,80,80であるから、アクティビティActivity(x,y)は次式で表される。   In the case of the example in FIG. 19, the value of the pixel of interest Y (x, y) located in the center among 3 × 3 pixels is 110, and the values of eight pixels adjacent to it are 80, 70, and 75, respectively. , 100, 100, 100, 80, 80, the activity Activity (x, y) is expressed by the following equation.

Activity(x,y) ={|80−110|+|70−110|+|75−110|+|100−110|+|100−110|+|100−110|+|80−110|+|80−110|}/8 =24.375となる。   Activity (x, y) = {| 80-110 | + | 70-110 | + | 75-110 | + | 100-110 | + | 100-110 | + | 80-110 | + | 80−110 |} /8=24.375.

同様の処理が、そのフレームのすべての画素について実行される。   Similar processing is performed for all pixels in the frame.

ブロック単位で動きベクトル確度を算出するため、次式(4)で表されるブロック内の全画素のアクティビティの総和が、そのブロックのアクティビティ(ブロックアクティビティ)Blockactivity(i,j)と定義される。   In order to calculate the motion vector accuracy in units of blocks, the sum of the activities of all the pixels in the block expressed by the following equation (4) is defined as the activity (block activity) Blockactivity (i, j) of the block.

Figure 2007272731
Figure 2007272731

なお、アクティビティとしては、この他、分散値、ダイナミックレンジなどとすることも可能である。   In addition, the activity may be a variance value, a dynamic range, or the like.

ステップS94において、閾値判定部124は、ステップS93の処理で算出されたブロックアクティビティを予め設定されている所定の閾値と比較する。そして、入力されたブロックアクティビティが閾値より大きいか否かを表すフラグを統合処理部126に出力する。   In step S94, the threshold determination unit 124 compares the block activity calculated in the process of step S93 with a predetermined threshold set in advance. Then, a flag indicating whether or not the input block activity is larger than the threshold value is output to the integration processing unit 126.

具体的には、実験の結果、ブロックアクティビティと評価値は、動きベクトルをパラメータとして、図20に示される関係を有する。図20において、横軸はブロックアクティビティBlockactivity(i,j)を表し、縦軸は評価値Evalを表している。   Specifically, as a result of the experiment, the block activity and the evaluation value have the relationship shown in FIG. 20 with the motion vector as a parameter. In FIG. 20, the horizontal axis represents the block activity Blockactivity (i, j), and the vertical axis represents the evaluation value Eval.

動きが正しく検出されている場合(正しい動きベクトルが与えられている場合)、そのブロックアクティビティと評価値の値は、曲線131より図中下側の領域R1に分布する。これに対して誤った動き(不正解の動きベクトル)が与えられた場合、そのブロックアクティビティと評価値の値は、曲線132より、図中左側の領域R2に分布する。なお、曲線132より上側の領域R2以外の領域と曲線131より下側の領域R1以外の領域には殆ど分布がない。曲線131と曲線132は、点Pにおいて交差しており、この点Pにおけるブロックアクティビティの値が閾値THaとされる。閾値THaは、ブロックアクティビティの値がそれより小さい場合には、対応する動きベクトルが正しくない可能性があることを意味する(この点については後に詳述する)。閾値判定部124は、アクティビティ算出部122より入力されたブロックアクティビティの値が、この閾値THaより大きいか否かを表すフラグを統合処理部126に出力する。   When the motion is correctly detected (when the correct motion vector is given), the block activity and the value of the evaluation value are distributed in the region R1 below the curve 131 in the figure. On the other hand, when an incorrect motion (incorrect motion vector) is given, the block activity and the value of the evaluation value are distributed in a region R2 on the left side in the figure from the curve 132. Note that there is almost no distribution in the region other than the region R2 above the curve 132 and the region other than the region R1 below the curve 131. The curve 131 and the curve 132 intersect at the point P, and the value of the block activity at the point P is set as the threshold value THa. The threshold value THa means that if the value of the block activity is smaller than that, the corresponding motion vector may be incorrect (this will be described in detail later). The threshold value determination unit 124 outputs a flag indicating whether or not the value of the block activity input from the activity calculation unit 122 is greater than the threshold value THa to the integration processing unit 126.

ステップS95において、正規化処理部125は、ステップS92の処理で算出された評価値を、ステップS93の処理で算出されたアクティビティに基づいて正規化する。具体的には、正規化処理部125は、次式(5)に従って動きベクトル確度VCを演算する。   In step S95, the normalization processing unit 125 normalizes the evaluation value calculated in the process of step S92 based on the activity calculated in the process of step S93. Specifically, the normalization processing unit 125 calculates the motion vector accuracy VC according to the following equation (5).

Figure 2007272731
Figure 2007272731

但し、動きベクトル確度VCの値が0未満となる場合にはその値を0に置き換える。動きベクトル確度VCのうち、評価値をブロックアクティビティで割り算して得られた値は、その値によって規定される図20のグラフ上の位置が、原点Oと点Pを結ぶ傾きが1の直線133より、図中下側の領域内であるのか、図中上側の領域内であるのかを表す。すなわち、直線133の傾きは1であり、評価値をブロックアクティビティで割り算して得られた値が1より大きければ、その値に対応する点は、直線133の上側の領域に分布する点であることを意味する。そしてこの値を1から減算して得られる動きベクトル確度VCは、その値が小さい程、対応する点が領域R2に分布する可能性が高いことを意味する。   However, if the value of the motion vector accuracy VC is less than 0, the value is replaced with 0. Of the motion vector accuracy VC, the value obtained by dividing the evaluation value by the block activity is a straight line 133 whose position on the graph of FIG. Therefore, it indicates whether the region is in the lower region or the upper region in the figure. That is, if the slope of the straight line 133 is 1, and the value obtained by dividing the evaluation value by the block activity is larger than 1, the points corresponding to the value are points distributed in the area above the straight line 133. Means that. The motion vector accuracy VC obtained by subtracting this value from 1 means that the smaller the value, the higher the possibility that the corresponding points are distributed in the region R2.

これに対して、評価値をブロックアクティビティで割り算して得られた値が1より小さければ、その値に対応する点は、直線133の図中下側の領域に分布することを意味する。そして、そのときの動きベクトル確度VCは、その値が大きい程(0に近い程)、対応する点が領域R1に分布することを意味する。正規化処理部125は、このようにして演算して得られた動きベクトル確度VCを統合処理部126に出力する。   On the other hand, if the value obtained by dividing the evaluation value by the block activity is smaller than 1, it means that the points corresponding to the value are distributed in the lower region of the straight line 133 in the figure. The motion vector accuracy VC at that time means that the larger the value (closer to 0), the corresponding points are distributed in the region R1. The normalization processing unit 125 outputs the motion vector accuracy VC obtained by the calculation in this way to the integration processing unit 126.

ステップS96において、統合処理部126は、統合処理を実行する。この統合処理の詳細は、図21のフローチャートに示されている。   In step S96, the integration processing unit 126 executes integration processing. Details of this integration processing are shown in the flowchart of FIG.

ステップS101において、統合処理部126は、ブロックアクティビティが閾値THa 以下か否かを判定する。この判定は、閾値判定部124より供給されたフラグに基づいて行われる。統合処理部126は、ブロックアクティビティが閾値THa以下であると判定した場合、ステップS102において、正規化処理部125が算出した動きベクトル確度VCの値を0に設定する。ステップS101において、アクティビティの値が閾値THaより大きいと判定された場合には、ステップS102の処理はスキップされ、正規化処理部125で生成された動きベクトル確度VCの値が、そのまま動きベクトルとともに出力される。   In step S101, the integration processing unit 126 determines whether or not the block activity is equal to or less than a threshold value THa. This determination is performed based on the flag supplied from the threshold determination unit 124. When determining that the block activity is equal to or less than the threshold value THa, the integration processing unit 126 sets the value of the motion vector accuracy VC calculated by the normalization processing unit 125 to 0 in step S102. If it is determined in step S101 that the activity value is greater than the threshold value THa, the processing in step S102 is skipped, and the value of the motion vector accuracy VC generated by the normalization processing unit 125 is output as it is together with the motion vector. Is done.

これは、正規化処理部125において演算された動きベクトルの確度VCの値が正であったとしても、ブロックアクティビティの値が閾値THaより小さい場合には、正しい動きベクトルが得られていない可能性があるからである。すなわち、図20に示されるように、原点Oと点Pの間においては、曲線132が、曲線131より図中下側に(直線133より下側に)突出することになる。ブロックアクティビティの値が閾値Thaより小さい区間であって、曲線131と曲線132において囲まれる領域R3においては、評価値をブロックアクティビティで割り算して得られる値は、領域R1とR2の両方に分布し、正しい動きベクトルが得られていない可能性が高い。   This is because there is a possibility that a correct motion vector is not obtained if the block activity value is smaller than the threshold value THa even if the value of the motion vector accuracy VC calculated by the normalization processing unit 125 is positive. Because there is. That is, as shown in FIG. 20, between the origin O and the point P, the curve 132 protrudes downward from the curve 131 in the drawing (below the straight line 133). In a region R3 in which the value of the block activity is smaller than the threshold Tha and is surrounded by the curves 131 and 132, the value obtained by dividing the evaluation value by the block activity is distributed in both the regions R1 and R2. There is a high possibility that a correct motion vector is not obtained.

そこで、このような分布状態である場合には、動きベクトルの確度は低いものとして処理するようにする。このため、ステップS102において、動きベクトル確度VCは、その値が正であったとしても、閾値Thaより小さい場合には、0に設定される。このようにすることで、動きベクトル確度VCの値が正である場合には、正しい動きベクトルが得られている場合であることを確実に表すことが可能となる。しかも、動きベクトル確度VCの値が大きい程、正しい動きベクトルが得られている確率が高くなる(分布が領域R1に含まれる確率が高くなる)。   Therefore, in such a distribution state, processing is performed assuming that the accuracy of the motion vector is low. For this reason, in step S102, even if the motion vector accuracy VC is positive, it is set to 0 if it is smaller than the threshold value Tha. In this way, when the value of the motion vector accuracy VC is positive, it is possible to reliably represent that the correct motion vector is obtained. In addition, the larger the value of the motion vector accuracy VC, the higher the probability that a correct motion vector is obtained (the probability that the distribution is included in the region R1 increases).

このことは、一般的に、輝度変化が少ない領域(アクティビティが小さい領域)では信頼性が高い動きベクトルを検出することが困難であるとの経験上の法則とも一致する。   This coincides with an empirical rule that, in general, it is difficult to detect a motion vector with high reliability in a region where the luminance change is small (region where the activity is small).

次に、図22を参照して、図4の背景動き推定部54の構成例について説明する。図22に示されるように、背景動き推定部54は、頻度分布算出部141と背景動き決定部142により構成されている。   Next, a configuration example of the background motion estimation unit 54 in FIG. 4 will be described with reference to FIG. As illustrated in FIG. 22, the background motion estimation unit 54 includes a frequency distribution calculation unit 141 and a background motion determination unit 142.

頻度分布算出部141は、動きベクトルの頻度分布を算出する。ただし、この頻度には、図4の動き推定部52より供給される動きベクトル確度VC を用いることで、確からしい動きに重みが与えられるように、重み付けが行われる。背景動き決定部142は、頻度分布算出部141により算出された頻度分布に基づいて、頻度が最大となる動きを背景動きとして決定する処理を行い、図4の領域推定関連処理部55へ出力する。   The frequency distribution calculation unit 141 calculates a frequency distribution of motion vectors. However, this frequency is weighted so that a probable motion is weighted by using the motion vector accuracy VC supplied from the motion estimation unit 52 of FIG. Based on the frequency distribution calculated by the frequency distribution calculation unit 141, the background motion determination unit 142 performs a process of determining a motion with the maximum frequency as a background motion, and outputs the background motion to the region estimation related processing unit 55 in FIG. .

図23のフローチャートを参照して、背景動き推定部54が実行する背景動き推定処理について説明する。   The background motion estimation process executed by the background motion estimation unit 54 will be described with reference to the flowchart of FIG.

ステップS111において、頻度分布算出部141は、動き頻度分布を算出する。具体的には、頻度分布算出部141は、背景動きの候補としての動きベクトルのx座標とy座標がそれぞれ基準点から±16画素分の範囲で表されるとすると、1089個(=16×2+1)×(16×2+1))の箱、すなわち動きベクトルがとり得る値に対応する座標分の箱を用意し、動きベクトルが発生した場合、その動きベクトルに対応する座標に1を加算する。このようにすることで、動きベクトルの頻度分布を算出することができる。   In step S111, the frequency distribution calculation unit 141 calculates a motion frequency distribution. Specifically, the frequency distribution calculation unit 141 assumes that the x and y coordinates of a motion vector as a background motion candidate are expressed in a range of ± 16 pixels from the reference point, respectively (1089 (= 16 × 2 + 1) × (16 × 2 + 1)), that is, a box for coordinates corresponding to possible values of a motion vector, and when a motion vector is generated, 1 is added to the coordinates corresponding to the motion vector. In this way, the motion vector frequency distribution can be calculated.

ただし、1個の動きベクトルが発生した場合、1を加算していくと、確度が低い動きベクトルの発生頻度が多い場合、その確実性が低い動きベクトルが背景動きとして決定されてしまう恐れがある。そこで、頻度分布算出部141は、動きベクトルが発生した場合、その動きベクトルに対応する箱(座標)に、値1を加算するのではなく、値1に動きベクトル確度VC を乗算した値(=動きベクトル確度VC の値)を加算する。動きベクトル確度VC の値は、0から1の間の値として正規化されており、その値が1に近いほど確度が高い値である。従って、このようにして得られた頻度分布は、動きベクトルをその確度に基づいて重み付けした頻度分布となる。これにより、確度の低い動きが背景動きとして決定される恐れが少なくなる。   However, when one motion vector is generated, if 1 is added, if the frequency of occurrence of a motion vector with low accuracy is high, a motion vector with low certainty may be determined as the background motion. . Therefore, when a motion vector occurs, the frequency distribution calculation unit 141 does not add the value 1 to the box (coordinates) corresponding to the motion vector, but instead of adding the value 1 to the motion vector accuracy VC (= Motion vector accuracy VC). The value of the motion vector accuracy VC is normalized as a value between 0 and 1, and the closer the value is to 1, the higher the accuracy. Therefore, the frequency distribution obtained in this way is a frequency distribution obtained by weighting motion vectors based on their accuracy. This reduces the risk that a motion with low accuracy is determined as the background motion.

次に、ステップS112において、頻度分布算出部141は、動き頻度分布を算出する処理を全ブロックについて終了したか否かを判定する。まだ処理していないブロックが存在すると判定された場合、ステップS111に戻り、次のブロックについて動き頻度分布が算出される。   Next, in step S112, the frequency distribution calculation unit 141 determines whether or not the process of calculating the motion frequency distribution has been completed for all blocks. When it is determined that there is an unprocessed block, the process returns to step S111, and the motion frequency distribution is calculated for the next block.

以上のようにして、全画面に対して動き頻度分布算出処理が行われ、ステップS112において、全ブロックの処理が終了したと判定された場合、ステップS113に進み、背景動き決定部142は、頻度分布の最大値を検索する処理を実行する。すなわち、背景動き決定部142は、頻度分布算出部141により算出された頻度の中から最大の頻度のものを選択し、その頻度に対応する動きベクトルを背景動きの動きベクトルとして決定する。この背景動きの動きベクトルは、図4の領域推定関連処理部55に供給され、全画面動きと背景動きが一致するか否かの判定処理に用いられる。   As described above, the motion frequency distribution calculation processing is performed on the entire screen, and when it is determined in step S112 that the processing of all blocks has been completed, the process proceeds to step S113, where the background motion determination unit 142 A process for searching for the maximum value of the distribution is executed. That is, the background motion determination unit 142 selects a frequency having the maximum frequency from the frequencies calculated by the frequency distribution calculation unit 141, and determines a motion vector corresponding to the frequency as a motion vector of the background motion. The motion vector of the background motion is supplied to the region estimation related processing unit 55 in FIG. 4 and is used for the determination process of whether or not the full screen motion matches the background motion.

次に、図24を参照して、図4のシーンチェンジ検出部53の構成例について説明する。図24に示されるように、シーンチェンジ検出部53は、動きベクトル確度平均算出部151と閾値判定部152により構成されている。   Next, a configuration example of the scene change detection unit 53 in FIG. 4 will be described with reference to FIG. As illustrated in FIG. 24, the scene change detection unit 53 includes a motion vector accuracy average calculation unit 151 and a threshold determination unit 152.

動きベクトル確度平均算出部151は、図4の動き推定部52より供給された動きベクトル確度VC の全画面の平均値を算出し、閾値判定部152に出力する。閾値判定部152は、動きベクトル確度平均算出部151より供給された平均値を、予め定められている閾値と比較し、その比較結果に基づいて、シーンチェンジであるか否かを判定し、判定結果を図4の制御部59に出力する。   The motion vector accuracy average calculation unit 151 calculates the average value of the entire motion vector accuracy VC supplied from the motion estimation unit 52 in FIG. 4 and outputs the average value to the threshold determination unit 152. The threshold determination unit 152 compares the average value supplied from the motion vector accuracy average calculation unit 151 with a predetermined threshold, and determines whether or not the scene change is based on the comparison result. The result is output to the control unit 59 in FIG.

図25のフローチャートを参照して、シーンチェンジ検出部53が実行するシーンチェンジ検出処理について説明する。   The scene change detection process executed by the scene change detection unit 53 will be described with reference to the flowchart of FIG.

ステップS121において、動きベクトル確度平均算出部151は、ベクトル確度の総和を算出する。具体的には、動きベクトル確度平均算出部151は、動き推定部52の統合処理部126より出力された各ブロック毎に算出された動きベクトル確度VCの値を加算する処理を実行する。   In step S121, the motion vector accuracy average calculation unit 151 calculates the sum of vector accuracy. Specifically, the motion vector accuracy average calculation unit 151 executes a process of adding the value of the motion vector accuracy VC calculated for each block output from the integration processing unit 126 of the motion estimation unit 52.

ステップS122において、動きベクトル確度平均算出部151は、ベクトル確度VCの総和を算出する処理が全ブロックについて終了したか否かを判定し、まだ終了していない場合には、ステップS121の処理を繰り返す。この処理を繰り返すことで、1画面分の各ブロックの動きベクトル確度VCの総和が算出される。   In step S122, the motion vector accuracy average calculation unit 151 determines whether or not the processing for calculating the sum of the vector accuracy VC has been completed for all the blocks. If the processing has not yet been completed, the processing of step S121 is repeated. . By repeating this process, the sum of motion vector accuracy VC of each block for one screen is calculated.

ステップS122において、1画面全部についての動きベクトル確度VCの総和の算出処理が終了したと判定された場合、ステップS123に進み、動きベクトル確度平均算出部151は、ベクトル確度VCの平均値を算出する処理を実行する。具体的には、ステップS121の処理で算出された1画面分のベクトル確度VCの総和を、足し込まれたブロック数で除算して得られた値が平均値として算出される。   If it is determined in step S122 that the calculation of the sum of motion vector accuracy VC for one entire screen has been completed, the process proceeds to step S123, and the motion vector accuracy average calculation unit 151 calculates the average value of the vector accuracy VC. Execute the process. Specifically, a value obtained by dividing the sum of the vector accuracy VC for one screen calculated in the process of step S121 by the added number of blocks is calculated as an average value.

ステップS124において、閾値判定部152は、ステップS123の処理で動きベクトル確度平均算出部151により算出された動きベクトル確度VCの平均値を、予め設定されている閾値と比較し、閾値より小さいか否かを判定する。一般的に、動画中の時刻が異なる2フレーム間でシーンチェンジが発生すると、対応する画像が存在しないため、動きベクトルを算出しても、その動きベクトルは確からしくないことになる。そこで、閾値判定部152は、ベクトル確度VCの平均値が閾値より小さいと判定した場合にはステップS125に進み、シーンチェンジフラグをオンし、閾値以上であると判定した場合にはステップS126に進み、シーンチェンジフラグをオフにする。シーンチェンジフラグのオンは、シーンチェンジがあったことを表し、シーンチェンジフラグのオフは、シーンチェンジが無いことを表す。   In step S124, the threshold determination unit 152 compares the average value of the motion vector accuracy VC calculated by the motion vector accuracy average calculation unit 151 in the process of step S123 with a preset threshold value, and determines whether or not the threshold value is smaller than the threshold value. Determine whether. In general, when a scene change occurs between two frames having different times in a moving image, there is no corresponding image, so even if a motion vector is calculated, the motion vector is not certain. Therefore, the threshold determination unit 152 proceeds to step S125 when determining that the average value of the vector accuracy VC is smaller than the threshold, and turns on the scene change flag, and proceeds to step S126 when determined to be equal to or greater than the threshold. Turn off the scene change flag. When the scene change flag is turned on, it indicates that there is a scene change, and when the scene change flag is turned off, it indicates that there is no scene change.

このシーンチェンジフラグは、制御部59へ供給され、図13のステップS61におけるシーンチェンジの有無の判定、並びに図16のステップS72のシーンチェンジの有無の判定に利用される。   This scene change flag is supplied to the control unit 59, and is used for determining whether or not there is a scene change in step S61 in FIG. 13 and for determining whether or not there is a scene change in step S72 in FIG.

以上のように、図1のオブジェクト追尾部23を構成することにより、追尾すべきオブジェクト41(図3)が回転したり、オクルージョンが発生したり、あるいはシーンチェンジにより、オブジェクト41の追尾点41Aが一時的に表示されなくなるような場合でも、画像の中で移動するオブジェクト41の追尾点41Aを正確に追尾することができる。   As described above, by configuring the object tracking unit 23 in FIG. 1, the object 41 (FIG. 3) to be tracked rotates, occlusion occurs, or the tracking point 41A of the object 41 is changed due to a scene change. Even when the image is temporarily not displayed, it is possible to accurately track the tracking point 41A of the moving object 41 in the image.

ところで、オブジェクト追尾部23により追尾処理が行われたにもかかわらず所望の追尾結果が得られない場合、すなわち、例えば、図26に示されるように、追尾点161が追尾させたいオブジェクト162から外れている場合、ユーザは、指示入力部29を介して現在の追尾点161がある位置に対して所定の方向を指定するか、あるいは、追尾させたいオブジェクト162が存在する方向にカーソルを移動させることにより、その指示を受けたオブジェクト位置推定部22は、ユーザが意図する追尾位置を推定することができる。   By the way, when a desired tracking result is not obtained even though the tracking processing is performed by the object tracking unit 23, that is, for example, as shown in FIG. 26, the tracking point 161 is separated from the object 162 to be tracked. In this case, the user designates a predetermined direction with respect to the position where the current tracking point 161 is located via the instruction input unit 29, or moves the cursor in a direction where the object 162 to be tracked exists. Thus, the object position estimation unit 22 that has received the instruction can estimate the tracking position intended by the user.

図26の例では、オブジェクト162は追尾点161に対して左斜め上方向に存在しているため、ユーザは、指示入力部29を用いて、左斜め上方向を指定するか、あるいは、左斜め上方向にカーソルを移動させてカーソル軌跡163を指定することにより、その指示を受けたオブジェクト位置推定部22は、追尾点またはカーソル位置を基準として、ユーザ指定方向をオフセットにした所定の大きさの検出対象領域164を生成し、その領域内で所定の間隔の画素の特徴量を算出し、条件に見合う画素を抽出してユーザが意図する追尾位置を推定することができる。   In the example of FIG. 26, since the object 162 exists in the upper left direction with respect to the tracking point 161, the user designates the upper left direction using the instruction input unit 29, or By specifying the cursor locus 163 by moving the cursor upward, the object position estimation unit 22 that has received the instruction has a predetermined size with the tracking direction or the cursor position as a reference and the user specified direction as an offset. It is possible to generate a detection target region 164, calculate the feature amount of pixels at a predetermined interval in the region, extract pixels that meet the conditions, and estimate the tracking position intended by the user.

次に、図1のオブジェクト位置推定部22の詳細な構成例と、その動作について説明する。   Next, a detailed configuration example and operation of the object position estimation unit 22 in FIG. 1 will be described.

図27は、オブジェクト位置推定部22の機能的構成例を示すブロック図である。図27に示されるように、オブジェクト位置推定部22は、パラメータ制御部171、検出対象領域生成部172、特徴量算出部173、および領域推定部174により構成されている。   FIG. 27 is a block diagram illustrating a functional configuration example of the object position estimation unit 22. As shown in FIG. 27, the object position estimation unit 22 includes a parameter control unit 171, a detection target region generation unit 172, a feature amount calculation unit 173, and a region estimation unit 174.

パラメータ制御部171は、検出対象領域生成部172で生成される検出対象領域の大きさを表すパラメータ、特徴量算出部173で特徴量が算出される際のサンプル点の画素間隔を表すパラメータ、および領域推定部174で追尾位置が抽出される際の所定の条件を表すパラメータなどを制御する。   The parameter control unit 171 is a parameter that represents the size of the detection target region generated by the detection target region generation unit 172, a parameter that represents the pixel interval of sample points when the feature amount is calculated by the feature amount calculation unit 173, and A parameter representing a predetermined condition when the tracking position is extracted by the region estimation unit 174 is controlled.

検出対象領域生成部172は、ユーザにより現在の追尾点がある位置に対して指示入力部29を介して所定の方向が指定されるか、あるいは、追尾させたいオブジェクトが存在する方向にカーソルが移動されてカーソル軌跡が指定されたとき、その追尾点またはカーソル位置に対する領域指定用のオフセット量を取得し、そのオフセット量に基づいて、ユーザ指定方向の所定の大きさの検出対象領域を生成する。   The detection target area generation unit 172 specifies a predetermined direction via the instruction input unit 29 for the position where the current tracking point is located by the user, or moves the cursor in the direction where the object to be tracked exists. When the cursor trajectory is specified, an area designating offset amount with respect to the tracking point or the cursor position is acquired, and a detection target area having a predetermined size in the user designated direction is generated based on the offset amount.

より詳細には、例えば、図28に示されるように、追尾点181を含む基準点182を基準として、水平方向に所定の画素間隔(図28の例では16画素毎)で10のサンプル数、垂直方向に所定の画素間隔(図28の例では8画素毎)で10のサンプル数を有するような大きさの、ユーザ指定方向(いまの場合、左斜め上方向)をオフセットにした検出対象領域183が生成される。   More specifically, for example, as shown in FIG. 28, the number of samples is 10 at a predetermined pixel interval (every 16 pixels in the example of FIG. 28) in the horizontal direction with reference to a reference point 182 including the tracking point 181. Detection target area having a size such that the number of samples is 10 at a predetermined pixel interval (every 8 pixels in the example of FIG. 28) in the vertical direction and offset by the user-specified direction (in this case, diagonally upward to the left). 183 is generated.

ここで、追尾点181に対する検出対象領域183の位置は、パラメータ制御部171から取得されたオフセット量により制御され、例えば、図29に示されるように、追尾点181と基準点182が同じ位置に設定される場合や、図30に示されるように、追尾点181を中心として検出対象領域183が生成される場合などがある。また、後述する領域推定部174により、検出対象領域183内に抽出条件を満たす特徴量が存在しなかった場合には、例えば、図31に示されるように、基準点182−1を基準として生成された検出対象領域183−1の大きさを拡大し、新たな基準点182−2を基準として、水平方向に14のサンプル数、垂直方向に14のサンプル数を有する検出対象領域183−2を生成するようにすることも可能である。   Here, the position of the detection target region 183 with respect to the tracking point 181 is controlled by the offset amount acquired from the parameter control unit 171. For example, as shown in FIG. 29, the tracking point 181 and the reference point 182 are at the same position. In some cases, the detection target region 183 is generated around the tracking point 181 as shown in FIG. Further, when there is no feature amount satisfying the extraction condition in the detection target region 183 by the region estimation unit 174 to be described later, for example, as illustrated in FIG. 31, the reference point 182-1 is generated as a reference. The size of the detection target region 183-1 thus enlarged is enlarged, and a detection target region 183-2 having 14 samples in the horizontal direction and 14 samples in the vertical direction is defined with reference to the new reference point 182-2. It is also possible to generate it.

図27の説明に戻る。特徴量算出部173は、検出対象領域生成部172で生成された検出対象領域内で、所定の画素数ずつ離れた位置の画素をサンプル点とし、そのサンプル点の特徴量を算出する。特徴量としては、例えば、ブロックマッチング方式で算出される動きベクトルなどがある。   Returning to the description of FIG. The feature amount calculation unit 173 calculates a feature amount of the sample point by using a pixel at a position separated by a predetermined number of pixels in the detection target region generated by the detection target region generation unit 172 as a sample point. Examples of the feature amount include a motion vector calculated by a block matching method.

図28乃至図31の例においては、サンプル点が黒い丸で表されている。また、検出対象領域183内において、水平方向に16画素毎、垂直方向に8画素毎の間隔でサンプル点が設定されている。   In the example of FIGS. 28 to 31, the sample points are represented by black circles. In the detection target region 183, sample points are set at intervals of 16 pixels in the horizontal direction and every 8 pixels in the vertical direction.

図32は、特徴量算出部173で算出された検出対象領域183内における各サンプル点の動きベクトルを模式的に示している。図中、追尾対象の動きベクトルが黒い丸と矢印で表され、背景の動きベクトルが白い丸と矢印で表されている。ここで、背景の動きベクトルは、例えば、図33に示されるように、全画面に均等に配置される画素の動きベクトルの最頻値として算出される。すなわち、図33において白い丸と矢印で表されている動きベクトルが最も頻度の高い動きとされ、その動きベクトルを有する画素が、背景の動きとされる。これに対し、黒い丸と矢印で表されている動きベクトルを有する画素が、追尾対象の動きとされる。   FIG. 32 schematically shows a motion vector of each sample point in the detection target region 183 calculated by the feature amount calculation unit 173. In the figure, the tracking target motion vector is represented by black circles and arrows, and the background motion vector is represented by white circles and arrows. Here, for example, as shown in FIG. 33, the background motion vector is calculated as the mode value of the motion vectors of the pixels arranged uniformly on the entire screen. That is, the motion vector represented by white circles and arrows in FIG. 33 is the most frequent motion, and the pixel having the motion vector is the background motion. On the other hand, a pixel having a motion vector represented by a black circle and an arrow is a tracking target motion.

図27の説明に戻る。領域推定部174は、特徴量算出部173で算出された検出対象領域内における各サンプル点の特徴量としての動きベクトルのうち、所定の条件を満たす画素を抽出し、その画素で構成される領域を生成する。ここで所定の条件とは、背景動き以外の動きベクトルを有する画素である。   Returning to the description of FIG. The region estimation unit 174 extracts a pixel satisfying a predetermined condition from the motion vectors as the feature amount of each sample point in the detection target region calculated by the feature amount calculation unit 173, and is a region configured by the pixels Is generated. Here, the predetermined condition is a pixel having a motion vector other than the background motion.

図34は、領域推定部174で生成された背景動き以外の動きベクトルを有する画素群で構成される領域191を模式的に示している。図中、追尾対象の動きベクトルが黒い丸と矢印で表され、背景の動きベクトルが白い丸と矢印で表されている。このように、領域推定部174では、追尾対象の動きベクトルを有する画素群で構成される領域191が生成される。   FIG. 34 schematically shows a region 191 composed of a pixel group having a motion vector other than the background motion generated by the region estimation unit 174. In the figure, the tracking target motion vector is represented by black circles and arrows, and the background motion vector is represented by white circles and arrows. As described above, the region estimation unit 174 generates a region 191 composed of a pixel group having a motion vector to be tracked.

また、領域推定部174は、生成した領域の重心位置を算出する。これにより、例えば、図35に示されるように、領域191の重心位置201が算出される。さらに領域推定部174は、算出した重心位置201をユーザが意図する追尾点と推定し、推定結果としての追尾位置を表す位置情報をオブジェクト追尾部23に出力する。これにより、オブジェクト追尾部23により追尾処理が継続され、画像ディスプレイ25には、例えば、図36に示されるように、ユーザの意図する追尾点としての重心位置201を表すマーク重畳表示される。   Further, the region estimation unit 174 calculates the barycentric position of the generated region. Thereby, for example, as shown in FIG. 35, the barycentric position 201 of the region 191 is calculated. Furthermore, the region estimation unit 174 estimates the calculated center-of-gravity position 201 as a tracking point intended by the user, and outputs position information representing the tracking position as an estimation result to the object tracking unit 23. As a result, the tracking process is continued by the object tracking unit 23, and the image display 25 displays, as shown in FIG. 36, for example, a mark superimposed display representing the center of gravity position 201 as the tracking point intended by the user.

以上のように、動きベクトルの特徴量から、背景の動きベクトル以外の動きベクトルを有する画素、すなわち、追尾対象の動きベクトルを有する画素を抽出し、抽出した画素群で構成される領域の重心位置を求め、その重心位置を、ユーザが意図する追尾点として推定することが可能である。   As described above, the pixel having the motion vector other than the background motion vector, that is, the pixel having the motion vector to be tracked is extracted from the feature quantity of the motion vector, and the barycentric position of the region configured by the extracted pixel group And the center of gravity position can be estimated as the tracking point intended by the user.

なお、特徴量としては、動きベクトルのほかに、色や輝度などがある。また領域推定部174で抽出される条件としては、例えば、追尾点181が持つ特徴量と異なる特徴量を有する画素としたり、ユーザが任意に指定する特徴量を有する画素としたり、あるいは、特徴量の信頼度なるものを算出し、その信頼度が閾値を満たす画素などとすることができる。   In addition to the motion vector, the feature amount includes color, brightness, and the like. The condition extracted by the region estimation unit 174 is, for example, a pixel having a feature quantity different from the feature quantity of the tracking point 181, a pixel having a feature quantity arbitrarily designated by the user, or a feature quantity Can be used as a pixel or the like whose reliability satisfies a threshold value.

信頼度の例としては、注目する画素を中心とする周辺画素において、注目画素の特徴量と同じ特徴量を有する画素が何画素あるかで判断する。例えば、注目画素を中心とする周囲8画素のうち、5画素以上が同じ特徴量を有するものであった場合、その注目画素の特徴量は信頼度があると判断される。   As an example of the reliability, it is determined how many pixels have the same feature quantity as the feature quantity of the target pixel in the peripheral pixels centered on the target pixel. For example, if five or more pixels have the same feature amount among the eight surrounding pixels centered on the target pixel, it is determined that the feature amount of the target pixel is reliable.

さらに、抽出条件を満たすうちの最頻値や最頻値からn番目の特徴量を有する画素を抽出条件に設定することも可能である。例えば、図35において、背景動きを予め求めなくても、特徴量の頻度を求め、最頻値から2番目の特徴量を有する画素を抽出することで、やはり領域191の重心位置を算出することができる。図35の例では、最頻値の特徴量を有する画素が白い丸と矢印で表され、2番目の頻度の特徴量を有する画素が黒い丸と矢印で表され、最頻値の特徴量は背景の動きベクトルとされる。   Furthermore, it is possible to set the mode having the nth feature amount from the mode value and the mode value among the extraction conditions as the extraction condition. For example, in FIG. 35, it is possible to calculate the center of gravity of the region 191 by determining the frequency of the feature amount without extracting the background motion in advance and extracting the pixel having the second feature amount from the mode value. Can do. In the example of FIG. 35, the pixel having the mode feature value is represented by a white circle and an arrow, the pixel having the second frequency feature amount is represented by a black circle and an arrow, and the mode feature amount is The background motion vector is used.

また、図37に示されるように、2つのオブジェクト(図中、2台の自動車)が検出対象領域183に入っている場合、最頻値から3番目の特徴量を有する画素を抽出条件に設定することにより、小さいオブジェクトであっても、それを追尾対象として推定することができる。図37の例では、最頻値の特徴量を有する画素が白い丸で表され、2番目の頻度の特徴量を有する画素が黒い丸で表され、3番目の頻度の特徴量を有する画素が白い三角で表されている。   As shown in FIG. 37, when two objects (two cars in the figure) are in the detection target area 183, the pixel having the third feature amount from the mode value is set as the extraction condition. Thus, even a small object can be estimated as a tracking target. In the example of FIG. 37, the pixel having the mode value feature amount is represented by a white circle, the pixel having the second frequency feature amount is represented by a black circle, and the pixel having the third frequency feature amount is represented by It is represented by a white triangle.

次に、図38のフローチャートを参照して、オブジェクト位置推定部22が実行する追尾位置推定処理について説明する。この処理は、ユーザにより指示入力部29を介して所定の方向が指定されるか、あるいは、追尾させたいオブジェクトが存在する方向にカーソルが移動されてカーソル軌跡が指定されたとき開始される。   Next, tracking position estimation processing executed by the object position estimation unit 22 will be described with reference to the flowchart of FIG. This process is started when a predetermined direction is designated by the user via the instruction input unit 29 or when the cursor is moved in the direction in which the object to be tracked exists and the cursor locus is designated.

検出対象領域生成部172は、ステップS131において、追尾点またはユーザにより指定されたカーソル位置を取得し、ステップS132において、取得した追尾点またはカーソル位置に対する領域指定用のオフセット量を取得する。   In step S131, the detection target area generation unit 172 acquires a tracking point or a cursor position specified by the user, and in step S132, acquires an offset amount for area specification with respect to the acquired tracking point or cursor position.

ステップS133において、検出対象領域生成部172は、パラメータ制御部171から、検出対象領域の大きさを表すパラメータ、および検出対象領域内のサンプル点の画素間隔を表すパラメータを取得する。ステップS134において、検出対象領域生成部172は、ステップS133の処理で取得したパラメータに基づいて、検出対象領域を求める。例えば、図28に示したように、水平方向に16画素毎の間隔で10のサンプル数、垂直方向に8画素毎の間隔で10のサンプル数を有するような大きさの検出対象領域183が生成される。   In step S133, the detection target region generation unit 172 acquires from the parameter control unit 171 a parameter that represents the size of the detection target region and a parameter that represents the pixel interval of the sample points in the detection target region. In step S134, the detection target area generation unit 172 obtains a detection target area based on the parameter acquired in the process of step S133. For example, as shown in FIG. 28, a detection target region 183 having a size of 10 samples at intervals of 16 pixels in the horizontal direction and 10 samples at intervals of 8 pixels in the vertical direction is generated. Is done.

ステップS135において、特徴量算出部173は、ステップS134の処理で生成された検出対象領域183内のサンプル点の特徴量として動きベクトルを算出する。ステップS136において、特徴量算出部173は、検出対象領域183内の全てのサンプル点の特徴量を算出したか否かを判定し、まだ特徴量を算出していないサンプル点があると判定した場合、ステップS135に戻り、それ以降の処理を繰り返す。   In step S135, the feature amount calculation unit 173 calculates a motion vector as the feature amount of the sample point in the detection target region 183 generated in the process of step S134. In step S136, the feature amount calculation unit 173 determines whether or not the feature amount of all the sample points in the detection target region 183 has been calculated, and when it is determined that there is a sample point for which the feature amount has not yet been calculated. Returning to step S135, the subsequent processing is repeated.

ステップS136において、検出対象領域183内の全てのサンプル点の特徴量を算出したと判定された場合、ステップS137に進み、領域推定部174は、条件を満たす特徴量を求める。ここでは、背景動き以外の動きベクトルが抽出され、抽出数が保持される。   If it is determined in step S136 that the feature amounts of all the sample points in the detection target region 183 have been calculated, the process proceeds to step S137, and the region estimation unit 174 obtains feature amounts that satisfy the condition. Here, motion vectors other than the background motion are extracted and the number of extractions is held.

ステップS138において、領域推定部174は、条件を満たす特徴量を有する画素を抽出する。ここでは、背景動き以外の動きベクトルを有する画素が抽出される。   In step S138, the region estimation unit 174 extracts pixels having feature quantities that satisfy the conditions. Here, pixels having motion vectors other than the background motion are extracted.

ステップS139において、領域推定部174は、所定数調べたか否か、すなわち、ステップS137の処理で保持している抽出数だけ調べたか否か判定し、まだ所定数調べていないと判定した場合、ステップS138に戻り、それ以降の処理を繰り返す。   In step S139, the region estimation unit 174 determines whether or not the predetermined number has been checked, that is, whether or not only the number of extractions retained in the process of step S137 has been checked. Returning to S138, the subsequent processing is repeated.

ステップS139において、所定数調べたと判定された場合、ステップS140に進み、領域推定部174は、抽出した画素群で構成される領域を生成し、その領域の重心位置を算出する。例えば、図35に示したように、抽出した画素群で構成される領域191が生成され、その領域191の重心位置201が算出される。   If it is determined in step S139 that the predetermined number has been examined, the process proceeds to step S140, where the region estimation unit 174 generates a region composed of the extracted pixel group, and calculates the barycentric position of the region. For example, as shown in FIG. 35, a region 191 composed of the extracted pixel group is generated, and the barycentric position 201 of the region 191 is calculated.

ステップS141において、領域推定部174は、ステップS140の処理で算出した重心位置をユーザが意図する追尾点と推定し、推定結果としての追尾点をオブジェクト追尾部23に出力する。   In step S141, the region estimation unit 174 estimates the position of the center of gravity calculated in the process of step S140 as the tracking point intended by the user, and outputs the tracking point as the estimation result to the object tracking unit 23.

このように、追尾処理が行われたにもかかわらず所望の追尾結果が得られていない場合、ユーザによる指定に基づいて、ユーザが意図する追尾位置をリアルタイムに推定することができる。これにより、オブジェクト追尾部23は、オブジェクト位置推定部22により推定された追尾点の追尾処理を継続的に行うことができるため、追尾点の指定や修正時の負荷が軽減し、より好適な追尾結果を得ることが可能となる。   Thus, when a desired tracking result is not obtained despite the tracking process being performed, the tracking position intended by the user can be estimated in real time based on the designation by the user. As a result, the object tracking unit 23 can continuously perform the tracking process of the tracking point estimated by the object position estimating unit 22, thereby reducing the load at the time of specifying or correcting the tracking point and more suitable tracking. The result can be obtained.

また、オブジェクト追尾部23は、追尾結果としての追尾位置を表す位置情報を追尾位置補正部24に出力する。これにより追尾位置補正部24は、追尾位置を表す位置情報を、その追尾点が属するオブジェクトの重心位置になるように微調整することができる。   Further, the object tracking unit 23 outputs position information representing the tracking position as a tracking result to the tracking position correcting unit 24. As a result, the tracking position correction unit 24 can finely adjust the position information indicating the tracking position so that it becomes the barycentric position of the object to which the tracking point belongs.

次に、オブジェクト追尾部23から出力される追尾結果を追尾位置補正部24が微調整する例について説明する。   Next, an example in which the tracking position correction unit 24 finely adjusts the tracking result output from the object tracking unit 23 will be described.

例えば、図39に示されるように、位置x(t)から位置x'(t+1)へ、上述したようにしてユーザが意図する追尾点として推定された場合、推定後の位置x'(t+1)が属しているオブジェクトの範囲211が算出され、そのオブジェクトの重心x(t+1)へ追尾点が微調整される。その微調整結果が追尾位置補正部24からオブジェクト追尾部23に供給され、以後、微調整された追尾点x(t+1)の位置から追尾処理が継続される。   For example, as shown in FIG. 39, when the tracking point intended by the user is estimated from the position x (t) to the position x ′ (t + 1) as described above, the estimated position x ′ (t + 1) Is calculated, and the tracking point is finely adjusted to the center of gravity x (t + 1) of the object. The fine adjustment result is supplied from the tracking position correcting unit 24 to the object tracking unit 23, and thereafter the tracking process is continued from the position of the finely adjusted tracking point x (t + 1).

ここで、色という画素値(色情報)に基づいて追尾点が属するオブジェクトの範囲を求め、その重心を算出する方法について説明する。   Here, a method for obtaining the range of the object to which the tracking point belongs based on the pixel value (color information) called color and calculating the center of gravity will be described.

(1)まず、位置x'(t+1)のRGB色(r',g',b')を算出する。なお、表色系はRGBでなくてもよい。
(2)RGB色が算出された位置x'(t+1)の周辺画素について、位置x'(t+1)の色に近い色を持つ画素を同じオブジェクトに属していると判断する。例えば、次式(6)で表されるΔcが所定の値より小さい画素が位置x'(t+1)と同じオブジェクトに属していると判断される。r、g、bは各周辺画素の色である。
(1) First, the RGB color (r ′, g ′, b ′) at the position x ′ (t + 1) is calculated. The color system may not be RGB.
(2) Regarding the peripheral pixel at the position x ′ (t + 1) where the RGB color is calculated, it is determined that the pixel having a color close to the color at the position x ′ (t + 1) belongs to the same object. For example, it is determined that a pixel in which Δc expressed by the following equation (6) is smaller than a predetermined value belongs to the same object as the position x ′ (t + 1). r, g, and b are the colors of each peripheral pixel.

Figure 2007272731
(3)位置x'(t+1)と同じオブジェクトに属している画素の位置から、次式(7)に基づいて、オブジェクトの重心x(t+1)を算出する。Xiは、同じオブジェクトに属している各画素の位置であり、nは、同じオブジェクトに属している画素の総数である。
Figure 2007272731
(3) From the position of the pixel belonging to the same object as the position x ′ (t + 1), the center of gravity x (t + 1) of the object is calculated based on the following equation (7). Xi is the position of each pixel belonging to the same object, and n is the total number of pixels belonging to the same object.

Figure 2007272731
Figure 2007272731

以上のようにして、色情報を用いる方法で追尾点が属するオブジェクトの範囲を求め、その重心位置を算出することにより、追尾点を、追尾点が属するオブジェクトの重心位置に微調整することが可能である。   As described above, it is possible to fine-tune the tracking point to the center of gravity of the object to which the tracking point belongs by obtaining the range of the object to which the tracking point belongs by the method using the color information and calculating the center of gravity position thereof. It is.

なお、このように色情報を用いる方法に限らず、例えば、動きベクトルや輝度値などをもとにしてオブジェクトの範囲を求め、その重心位置を算出するようにしてもよい。例えば、動きベクトルを用いる場合、位置x'(t+1)の動きベクトルと同じまたは似ているベクトルを持つものを同じオブジェクトに属していると判断し、次のようにしてオブジェクトの範囲を求め、その重心を算出することができる。   Note that the present invention is not limited to the method using color information, and for example, a range of an object may be obtained based on a motion vector, a luminance value, or the like, and the center position may be calculated. For example, when a motion vector is used, it is determined that a vector having the same or similar vector as the motion vector at the position x ′ (t + 1) belongs to the same object, and the range of the object is obtained as follows. The center of gravity can be calculated.

(1)動きベクトル検出
図40に示されるように、追尾点221を中心とした領域222内で、サンプリング間隔(sx,sy)毎に動きベクトルを検出する。領域222の大きさは、サンプル数m,nとして、sx・m×sy・nとなる。動きベクトルの検出には、例えばブロックマッチング方式や勾配法が用いられる。
(2)動きベクトルの頻度分布算出
例えば、処理範囲内の動きの候補を−16<=vx<=16、−16<=vy<=16の整数値(vxは水平動き、vyは垂直動き)で表すとすると、33(=16×2+1)画素×33画素=1089個の箱、すなわち動きベクトルがとり得る値に対応する座標分の箱を用意し、あるサンプル点で(vx,vy)=(2,2)のとき、(2,2)の箱に1を加算する。この処理を処理範囲内の全サンプル点に対して行うことで、動きベクトルの頻度分布を算出することができる。
(3)追尾対象のサンプル点抽出
図41に示されるように、領域222内で多数を占める動き(図41の例においては、左斜め下方向の動き)と類似する動きを示すサンプル点を追尾対象上の点として抽出する。
(4)サンプル点の重心算出
領域222内において追尾対象上のサンプル点であるか否かを表すフラグをflag(i,j)(1<=i<=m,1<=j <=n)として設定する。(3)で追尾対象上のサンプル点として抽出された場合、1に設定され、(3)で追尾対象上のサンプル点として抽出されていない場合、0に設定される。そして、サンプル点の重心G(x,y)は、次式(8)に基づいて、サンプル点P(x,y)として算出される。
(1) Motion Vector Detection As shown in FIG. 40, a motion vector is detected at each sampling interval (sx, sy) within an area 222 centered on the tracking point 221. The size of the region 222 is sx · m × sy · n as the number of samples m and n. For the detection of the motion vector, for example, a block matching method or a gradient method is used.
(2) Motion vector frequency distribution calculation For example, motion candidates within the processing range are represented by integer values of −16 <= vx <= 16 and −16 <= vy <= 16 (vx is horizontal motion, vy is vertical motion) In this case, 33 (= 16 × 2 + 1) pixels × 33 pixels = 1089 boxes, that is, boxes corresponding to coordinates corresponding to possible values of the motion vector are prepared, and at a certain sample point (vx, vy) = When (2, 2), 1 is added to the box of (2, 2). By performing this processing on all sample points within the processing range, the frequency distribution of the motion vector can be calculated.
(3) Extraction of sample points to be tracked As shown in FIG. 41, sample points showing movement similar to the movement occupying a large number in the area 222 (in the example of FIG. 41, the movement in the diagonally downward left direction) are tracked. Extract as a point on the object.
(4) Gravity calculation of sample point Flag (i, j) (1 <= i <= m, 1 <= j <= n) indicating whether or not the sample point is a sample point on the tracking target in the region 222 Set as. If it is extracted as a sample point on the tracking target in (3), it is set to 1. If it is not extracted as a sample point on the tracking target in (3), it is set to 0. The center of gravity G (x, y) of the sample point is calculated as the sample point P (x, y) based on the following equation (8).

Figure 2007272731
Figure 2007272731

以上のようにして、動きベクトルを用いる方法で追尾点が属するオブジェクトの範囲を求め、その重心位置を算出することも可能である。ユーザが意図する追尾点の推定に加え、微調整された先の追尾点は、外乱に対してロバスト性の高い、つまり追尾処理しやすいことを特徴としている。   As described above, the range of the object to which the tracking point belongs can be obtained by the method using the motion vector, and the center of gravity position can be calculated. In addition to the estimation of the tracking point intended by the user, the finely adjusted previous tracking point is characterized by high robustness against disturbance, that is, easy tracking processing.

図42は、追尾位置補正部24により追尾点が微調整された後の画像ディスプレイ25に表示される画像の例を示す図である。図42においては、オブジェクト位置推定部22によりユーザが意図する追尾点として推定された位置221から、追尾位置補正部24により、その追尾点が属するオブジェクト(図42の例の場合、自動車)の範囲が求められ、その重心位置231が算出され、そこに微調整されていることを示している。   FIG. 42 is a diagram illustrating an example of an image displayed on the image display 25 after the tracking point has been finely adjusted by the tracking position correction unit 24. In FIG. 42, the range of the object (automobile in the example of FIG. 42) to which the tracking position correction unit 24 belongs from the position 221 estimated as the tracking point intended by the user by the object position estimation unit 22. It is shown that the center of gravity position 231 is calculated and finely adjusted there.

このように、追尾処理において、ユーザが意図する追尾点の推定に加え、追尾処理しやすい位置、つまり追尾対象の重心位置に微調整することができるため、より好適な追尾結果を得ることが可能となる。   In this way, in the tracking process, in addition to the estimation of the tracking point intended by the user, it can be finely adjusted to a position that is easy to perform the tracking process, that is, the position of the center of gravity of the tracking target, so that a more suitable tracking result can be obtained. It becomes.

次に、図43のフローチャートを参照して、図5のステップS11の通常処理に続いて行われる、ステップS12の例外処理の他の例について説明する。この処理は、基本的に、図12の処理と同様の処理であり、図9のステップS24において追尾点の動きを推定することが不可能と判定され、さらにステップS28において追尾点を乗り換える乗り換え候補が選択できなかったと判定された場合に実行される。   Next, another example of the exception process in step S12 performed following the normal process in step S11 of FIG. 5 will be described with reference to the flowchart of FIG. This process is basically the same as the process of FIG. 12, and it is determined in step S24 of FIG. 9 that it is impossible to estimate the movement of the tracking point, and further, the transfer candidate for changing the tracking point in step S28. This is executed when it is determined that cannot be selected.

ステップS151乃至S155の処理は、上述した図12のステップS51乃至S55の処理と同様であるため、その説明は簡略する。すなわち、ステップS151において、例外処理の初期化処理が実行され、ステップS152において、次のフレームの画像の入力が待機され、ステップS153において、テンプレート探索範囲内においてテンプレートマッチング処理が行われ、ステップS154において、通常処理への復帰が可能であるか否かが判定され、通常処理への復帰が可能であると判定された場合、図5のステップS11の通常処理に戻され、通常処理への復帰が可能ではないと判定された場合、ステップS155において、継続判定処理が実行される。   Since the processing of steps S151 to S155 is the same as the processing of steps S51 to S55 of FIG. 12 described above, the description thereof will be simplified. That is, in step S151, an exception process initialization process is executed. In step S152, an input of an image of the next frame is awaited. In step S153, a template matching process is performed within the template search range, and in step S154. When it is determined whether or not it is possible to return to the normal process, and when it is determined that the return to the normal process is possible, the process returns to the normal process of step S11 in FIG. If it is determined that it is not possible, a continuation determination process is executed in step S155.

そして、ステップS156において、制御部59は、ステップS155の継続判定処理による例外処理での追尾点の追尾が継続可能であるか否かの継続判定結果に基づいて(図16のステップS76,78で設定されたフラグに基づいて)判定する。追尾点の追尾処理が継続可能であると判定された場合、処理はステップS52に戻り、それ以降の処理が繰り返し実行される。すなわち、追尾点が再び出現するまで待機する処理が繰り返し実行される。   In step S156, the control unit 59 determines whether or not tracking of the tracking point in the exception process by the continuation determination process in step S155 can be continued (in steps S76 and 78 in FIG. 16). Determine based on the flag set. If it is determined that the tracking process of the tracking point can be continued, the process returns to step S52, and the subsequent processes are repeatedly executed. That is, the process of waiting until the tracking point appears again is repeatedly executed.

これに対して、ステップS156において、例外処理での追尾点の追尾処理が継続可能ではないと判定された場合(図16のステップS75の処理で追尾点が消失した後の経過フレーム数が閾値THfr以上と判定されるか、または、ステップS77の処理でシーンチェンジ数が閾値THsc以上と判定された場合)、ステップS157に進み、制御部59は、追尾点決定部57を制御し、保持しておいた追尾点を設定させる。その後、処理は図5のステップS11の通常処理に戻る。   On the other hand, when it is determined in step S156 that the tracking process of the tracking point in the exception process cannot be continued (the number of frames that have elapsed after the tracking point disappeared in the process of step S75 in FIG. 16 is the threshold THfr). If it is determined as above, or if the number of scene changes is determined to be greater than or equal to the threshold THsc in the process of step S77), the process proceeds to step S157, and the control unit 59 controls and holds the tracking point determination unit 57. Set the tracking point. Thereafter, the process returns to the normal process in step S11 of FIG.

このように、例外処理での追尾点の追尾が不可能になった場合には、保持しておいた追尾点を用いて再度通常処理に戻ることができるようにしたので、追尾処理を継続的に行うことが可能となる。   In this way, when tracking of the tracking point in exception processing becomes impossible, it is possible to return to normal processing again using the tracking point that has been held, so the tracking processing is continued. Can be performed.

以上においては、ユーザインターフェースには依存せず、例えば、追尾位置指定ボタンが押下されるか、あるいは、カーソル移動が止められたときに追尾位置の推定が行われるようにすることも可能である。   In the above, the tracking position can be estimated when the tracking position designation button is pressed or the cursor movement is stopped, without depending on the user interface.

また以上においては、監視カメラシステムに適用した場合の例について説明したが、これに限らず、例えば、テレビジョン受像機など各種の画像処理装置に適応することが可能である。   In the above description, an example in which the present invention is applied to a surveillance camera system has been described. However, the present invention is not limited thereto, and can be applied to various image processing apparatuses such as a television receiver.

さらに以上においては、画像の処理単位をフレームとしたが、フィールドを処理単位とすることももちろん可能である。   Further, in the above, the image processing unit is a frame, but it is of course possible to use a field as a processing unit.

上述した一連の処理は、ハードウエアにより実行させることもできるし、ソフトウエアにより実行させることもできる。一連の処理をソフトウエアにより実行させる場合には、そのソフトウエアを構成するプログラムが、専用のハードウエアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどに、プログラム記録媒体からインストールされる。   The series of processes described above can be executed by hardware or can be executed by software. When a series of processing is executed by software, a program constituting the software executes various functions by installing a computer incorporated in dedicated hardware or various programs. For example, it is installed from a program recording medium in a general-purpose personal computer or the like.

コンピュータにインストールされ、コンピュータによって実行可能な状態とされるプログラムを格納するプログラム記録媒体は、図1に示すように、磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD-ROM(Compact Disc-Read Only Memory),DVD(Digital Versatile Disc)を含む)、光磁気ディスク、もしくは半導体メモリなどよりなるパッケージメディアであるリムーバブルメディア28、または、プログラムが一時的もしくは永続的に格納されるハードディスクなどにより構成される。プログラム記録媒体へのプログラムの格納は、必要に応じてルータ、モデムなどのインタフェースを介して、ローカルエリアネットワーク、インターネット、デジタル衛星放送といった、有線または無線の通信媒体を利用して行われる。   As shown in FIG. 1, a program recording medium for storing a program that is installed in a computer and can be executed by the computer is a magnetic disk (including a flexible disk), an optical disk (CD-ROM (Compact Disc-Read Only). Memory), DVD (including Digital Versatile Disc), magneto-optical disc, or removable media 28, which is a package media composed of semiconductor memory, or a hard disk on which a program is temporarily or permanently stored . The program is stored in the program recording medium using a wired or wireless communication medium such as a local area network, the Internet, or digital satellite broadcasting via an interface such as a router or a modem as necessary.

なお、本明細書において、プログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。   In the present specification, the steps for describing a program are not only processes performed in time series in the order described, but also processes that are executed in parallel or individually even if they are not necessarily processed in time series. Is also included.

なお、本発明の実施の形態は、上述した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。   The embodiment of the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the gist of the present invention.

本発明を適用した監視カメラシステムの構成例を示すブロック図である。It is a block diagram which shows the structural example of the surveillance camera system to which this invention is applied. 監視処理を説明するフローチャートである。It is a flowchart explaining a monitoring process. 図1の監視カメラシステムにより表示される画像の例を示す図である。It is a figure which shows the example of the image displayed by the surveillance camera system of FIG. 図1のオブジェクト追尾部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the object tracking part of FIG. 追尾処理を説明するフローチャート図である。It is a flowchart figure explaining a tracking process. 追尾対象が回転する場合の追尾を説明する図である。It is a figure explaining tracking when a tracking object rotates. オクルージョンが起きる場合の追尾を説明する図である。It is a figure explaining the tracking when an occlusion occurs. シーンチェンジが起きる場合の追尾を説明する図である。It is a figure explaining the tracking when a scene change occurs. 通常処理を説明するフローチャートである。It is a flowchart explaining a normal process. 通常処理の初期化処理を説明するフローチャートである。It is a flowchart explaining the initialization process of a normal process. 通常処理の初期化処理を説明する図である。It is a figure explaining the initialization process of a normal process. 例外処理を説明するフローチャートである。It is a flowchart explaining exception processing. 例外処理の初期化処理を説明するフローチャートである。It is a flowchart explaining the initialization process of an exception process. テンプレートの選択を説明する図である。It is a figure explaining selection of a template. 探索範囲の設定を説明する図である。It is a figure explaining the setting of a search range. 継続判定処理を説明するフローチャートである。It is a flowchart explaining a continuation determination process. 動き推定部の構成例を示すブロック図である。It is a block diagram which shows the structural example of a motion estimation part. 動き推定処理を説明するフローチャートである。It is a flowchart explaining a motion estimation process. アクティビティの算出を説明する図である。It is a figure explaining calculation of activity. 評価値とアクティビティの関係を説明する図である。It is a figure explaining the relationship between an evaluation value and activity. 統合処理を説明するフローチャートである。It is a flowchart explaining an integration process. 背景動き推定部の構成例を示すブロック図である。It is a block diagram which shows the structural example of a background motion estimation part. 背景動き推定処理を説明するフローチャートである。It is a flowchart explaining a background motion estimation process. シーンチェンジ検出部の構成例を示すブロック図である。It is a block diagram which shows the structural example of a scene change detection part. シーンチェンジ検出処理を説明するフローチャートである。It is a flowchart explaining a scene change detection process. 追尾位置の推定を説明する図である。It is a figure explaining estimation of a tracking position. 図1のオブジェクト位置推定部の機能的構成例を示すブロック図である。It is a block diagram which shows the functional structural example of the object position estimation part of FIG. 検出対象領域の例を示す図である。It is a figure which shows the example of a detection object area | region. 検出対象領域の他の例を示す図である。It is a figure which shows the other example of a detection object area | region. 検出対象領域の他の例を示す図である。It is a figure which shows the other example of a detection object area | region. 検出対象領域の大きさを拡大した例を示す図である。It is a figure which shows the example which expanded the magnitude | size of the detection object area | region. 検出対象領域内の各サンプル点の動きベクトルを模式的に示す図である。It is a figure which shows typically the motion vector of each sample point in a detection object area | region. 背景の動きを説明する図である。It is a figure explaining the motion of a background. 背景動き以外の動きベクトルを有する画素で構成される領域を模式的に示す図である。It is a figure which shows typically the area | region comprised with the pixel which has a motion vector other than a background motion. 図34の領域の重心位置を算出する処理を説明する図である。It is a figure explaining the process which calculates the gravity center position of the area | region of FIG. 追尾処理後の出力画像の例を示す図である。It is a figure which shows the example of the output image after a tracking process. 領域の重心位置を算出する他の処理を説明する図である。It is a figure explaining the other process which calculates the gravity center position of an area | region. 追尾位置推定処理を説明するフローチャートである。It is a flowchart explaining a tracking position estimation process. 追尾点を微調整する例を説明する図である。It is a figure explaining the example which fine-tunes a tracking point. 動きベクトル検出処理を説明する図である。It is a figure explaining a motion vector detection process. 追尾対象のサンプル点抽出処理を説明する図である。It is a figure explaining the sample point extraction process of tracking object. 追尾点微調整処理を説明する図である。It is a figure explaining tracking point fine adjustment processing. 他の例の例外処理を説明するフローチャートである。It is a flowchart explaining the exception process of another example.

符号の説明Explanation of symbols

1 監視カメラシステム, 21 撮像部, 22 オブジェクト位置推定部, 23 オブジェクト追尾部, 24 追尾位置補正部, 51 テンプレートマッチング部, 52 動き推定部, 53 シーンチェンジ検出部, 54 背景動き推定部, 55 領域推定関連処理部, 56 乗り換え候補保持部, 57 追尾点決定部, 58 テンプレート保持部, 171 パラメータ制御部, 172 検出対象領域生成部, 173 特徴量算出部, 174 領域推定部   DESCRIPTION OF SYMBOLS 1 Surveillance camera system, 21 Image pick-up part, 22 Object position estimation part, 23 Object tracking part, 24 Tracking position correction part, 51 Template matching part, 52 Motion estimation part, 53 Scene change detection part, 54 Background motion estimation part, 55 area | region Estimation related processing unit, 56 transfer candidate holding unit, 57 tracking point determination unit, 58 template holding unit, 171 parameter control unit, 172 detection target region generation unit, 173 feature quantity calculation unit, 174 region estimation unit

Claims (14)

移動するオブジェクトを追尾する画像処理装置において、
画像の中の前記オブジェクト上の現在の追尾点またはカーソル位置に対し、ユーザが指定する方向に基づいて、検出対象領域を生成する生成手段と、
前記生成手段により生成された前記検出対象領域内に含まれる画素の特徴量を算出する算出手段と、
前記算出手段により算出された前記特徴量に基づいて、所定の画素を抽出する抽出手段と、
前記抽出手段により抽出された前記所定の画素で構成される領域の重心位置を前記ユーザが意図する追尾点と推定する推定手段と
を備える画像処理装置。
In an image processing apparatus that tracks a moving object,
Generating means for generating a detection target region based on a direction designated by a user with respect to a current tracking point or a cursor position on the object in an image;
A calculation unit that calculates a feature amount of a pixel included in the detection target region generated by the generation unit;
Extraction means for extracting predetermined pixels based on the feature amount calculated by the calculation means;
An image processing apparatus comprising: an estimation unit that estimates a center of gravity position of an area composed of the predetermined pixels extracted by the extraction unit as a tracking point intended by the user.
前記推定手段により推定された前記追尾点を前記オブジェクトの重心位置になるように微調整する微調整手段をさらに備える
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, further comprising a fine adjustment unit that finely adjusts the tracking point estimated by the estimation unit so that the tracking point becomes a center of gravity position of the object.
前記生成手段は、前記ユーザが指定するオフセット量に応じた検出対象領域を生成する
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the generation unit generates a detection target area according to an offset amount designated by the user.
前記生成手段は、前記オブジェクト上の現在の追尾点またはカーソル位置を中心とした検出対象領域を生成する
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the generation unit generates a detection target region centered on a current tracking point or a cursor position on the object.
前記抽出手段により前記所定の画素を抽出することができなかった場合、前記生成手段は、前記検出対象領域を拡大した新たな検出対象領域を生成する
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein when the predetermined pixel cannot be extracted by the extraction unit, the generation unit generates a new detection target region in which the detection target region is enlarged.
前記抽出手段は、前記現在の追尾点またはカーソル位置の特徴量と異なる特徴量を有する画素を抽出する
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the extraction unit extracts a pixel having a feature amount different from a feature amount of the current tracking point or cursor position.
前記抽出手段は、背景の特徴量と異なる特徴量を有する画素を抽出する
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the extraction unit extracts a pixel having a feature quantity different from a background feature quantity.
前記抽出手段は、前記ユーザにより指定された特徴量を有する画素を抽出する
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the extraction unit extracts a pixel having a feature amount designated by the user.
前記抽出手段は、算出された前記特徴量の頻度から、前記ユーザにより指定された順位の頻度の特徴量を有する画素を抽出する
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the extraction unit extracts a pixel having a feature quantity having a frequency with a rank specified by the user from the calculated frequency of the feature quantity.
前記抽出手段は、前記現在の追尾点またはカーソル位置の特徴量と異なる特徴量の頻度から、前記ユーザにより指定された順位の頻度の特徴量を有する画素を抽出する
請求項1に記載の画像処理装置。
2. The image processing according to claim 1, wherein the extraction unit extracts a pixel having a feature quantity having a frequency with a rank specified by the user from a feature quantity frequency different from the feature quantity of the current tracking point or cursor position. apparatus.
前記推定手段は、抽出された前記所定の画素のうち、所定の閾値以上の信頼度がある特徴量を有する画素で構成される領域の重心位置を、前記ユーザが意図する追尾点と推定する
請求項1に記載の画像処理装置。
The estimation means estimates a barycentric position of an area composed of pixels having a feature amount having a reliability greater than or equal to a predetermined threshold among the extracted predetermined pixels as a tracking point intended by the user. Item 8. The image processing apparatus according to Item 1.
前記特徴量は、動きベクトル、色、または輝度である
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the feature amount is a motion vector, a color, or luminance.
移動するオブジェクトを追尾する画像処理装置の画像処理方法において、
画像の中の前記オブジェクト上の現在の追尾点またはカーソル位置に対し、ユーザが指定する方向に基づいて、検出対象領域を生成し、
生成された前記検出対象領域内に含まれる画素の特徴量を算出し、
算出された前記特徴量に基づいて、所定の画素を抽出し、
抽出された前記所定の画素で構成される領域の重心位置を前記ユーザが意図する追尾点と推定する
ステップを含む画像処理方法。
In an image processing method of an image processing apparatus for tracking a moving object,
Based on the direction specified by the user for the current tracking point or cursor position on the object in the image,
Calculating a feature amount of a pixel included in the generated detection target region;
Based on the calculated feature value, a predetermined pixel is extracted,
An image processing method including a step of estimating a center of gravity position of an area composed of the extracted predetermined pixels as a tracking point intended by the user.
移動するオブジェクトを追尾する画像処理装置の画像処理をコンピュータに実行させるプログラムにおいて、
画像の中の前記オブジェクト上の現在の追尾点またはカーソル位置に対し、ユーザが指定する方向に基づいて、検出対象領域を生成し、
生成された前記検出対象領域内に含まれる画素の特徴量を算出し、
算出された前記特徴量に基づいて、所定の画素を抽出し、
抽出された前記所定の画素で構成される領域の重心位置を前記ユーザが意図する追尾点と推定する
ステップを含むプログラム。
In a program for causing a computer to execute image processing of an image processing apparatus that tracks a moving object,
Based on the direction specified by the user for the current tracking point or cursor position on the object in the image,
Calculating a feature amount of a pixel included in the generated detection target region;
Based on the calculated feature value, a predetermined pixel is extracted,
A program including a step of estimating a center of gravity position of an area composed of the extracted predetermined pixels as a tracking point intended by the user.
JP2006099828A 2006-03-31 2006-03-31 Image processing apparatus and method, and program Withdrawn JP2007272731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006099828A JP2007272731A (en) 2006-03-31 2006-03-31 Image processing apparatus and method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006099828A JP2007272731A (en) 2006-03-31 2006-03-31 Image processing apparatus and method, and program

Publications (1)

Publication Number Publication Date
JP2007272731A true JP2007272731A (en) 2007-10-18

Family

ID=38675450

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006099828A Withdrawn JP2007272731A (en) 2006-03-31 2006-03-31 Image processing apparatus and method, and program

Country Status (1)

Country Link
JP (1) JP2007272731A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2169945A3 (en) * 2008-09-26 2010-04-07 Canon Kabushiki Kaisha Image processing apparatus and method for detection and correction of camera shake
JP2011059733A (en) * 2009-09-04 2011-03-24 Canon Inc Image retrieval device and image retrieval method
JP2012133573A (en) * 2010-12-21 2012-07-12 Canon Inc Image recognition device, image recognition method and program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2169945A3 (en) * 2008-09-26 2010-04-07 Canon Kabushiki Kaisha Image processing apparatus and method for detection and correction of camera shake
EP2293540A1 (en) * 2008-09-26 2011-03-09 Canon Kabushiki Kaisha Image processing apparatus and method for detection and correction of camera shake
US8509481B2 (en) 2008-09-26 2013-08-13 Canon Kabushiki Kaisha Image processing apparatus, image processing method, imaging apparatus
JP2011059733A (en) * 2009-09-04 2011-03-24 Canon Inc Image retrieval device and image retrieval method
US9075827B2 (en) 2009-09-04 2015-07-07 Canon Kabushiki Kaisha Image retrieval apparatus, image retrieval method, and storage medium
JP2012133573A (en) * 2010-12-21 2012-07-12 Canon Inc Image recognition device, image recognition method and program

Similar Documents

Publication Publication Date Title
JP4797753B2 (en) Image processing apparatus and method, and program
EP2107524B1 (en) Image signal processing
US8289402B2 (en) Image processing apparatus, image pickup apparatus and image processing method including image stabilization
US7899208B2 (en) Image processing device and method, recording medium, and program for tracking a desired point in a moving image
EP2372654B1 (en) Object tracking apparatus, object tracking method, and control program
US8582822B2 (en) Moving object detection apparatus and moving object detection method
JP4826315B2 (en) Image processing apparatus and method, and program
US10769798B2 (en) Moving object detection apparatus, moving object detection method and program
KR101071352B1 (en) Apparatus and method for tracking object based on PTZ camera using coordinate map
JP4725105B2 (en) Image processing apparatus and method, program, and recording medium
US20100290672A1 (en) Moving object detecting device, moving object detecting method, and computer program
JP2012151796A (en) Image processing device, image processing method, and program
JP7334432B2 (en) Object tracking device, monitoring system and object tracking method
US10121251B2 (en) Method for controlling tracking using a color model, corresponding apparatus and non-transitory program storage device
JP2007274543A (en) Image processing apparatus and method, program, and recording medium
EP3629570A2 (en) Image capturing apparatus and image recording method
JP2009223722A (en) Image signal processing apparatus, image signal processing method, and program
JP2009010453A (en) Image processing apparatus and method, and program
CN110378183B (en) Image analysis device, image analysis method, and recording medium
JP4617883B2 (en) Image processing apparatus and method, program, and recording medium
JP2005346425A (en) Automatic tracking system and automatic tracking method
JP2007272731A (en) Image processing apparatus and method, and program
JP4826316B2 (en) Image processing apparatus and method, program, and recording medium
US20230177860A1 (en) Main object determination apparatus, image capturing apparatus, and method for controlling main object determination apparatus
JP2023124598A (en) Main object determination device, imaging apparatus, main object determination method, and program

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20090602