JP2011090488A - Object tracking device, object tracking program, and camera - Google Patents

Object tracking device, object tracking program, and camera Download PDF

Info

Publication number
JP2011090488A
JP2011090488A JP2009243332A JP2009243332A JP2011090488A JP 2011090488 A JP2011090488 A JP 2011090488A JP 2009243332 A JP2009243332 A JP 2009243332A JP 2009243332 A JP2009243332 A JP 2009243332A JP 2011090488 A JP2011090488 A JP 2011090488A
Authority
JP
Japan
Prior art keywords
subject
similarity
transition destination
template
specifying
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.)
Pending
Application number
JP2009243332A
Other languages
Japanese (ja)
Inventor
Yuichi Ito
悠一 伊藤
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.)
Nikon Corp
Original Assignee
Nikon 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 Nikon Corp filed Critical Nikon Corp
Priority to JP2009243332A priority Critical patent/JP2011090488A/en
Publication of JP2011090488A publication Critical patent/JP2011090488A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an object tracking device for tracking an object between frames, and for specifying the position of the object with high accuracy. <P>SOLUTION: A controller 104 specifies a transition destination of an object based on time-sequentially input inter-frame information by motion estimation, and calculates first similarity between each pixel in the frame and a template for tracking an object by template matching, calculates second similarity by weighting the first similarity of each pixel according to a distance from the transition destination of the object specified by motion estimation, and specifies the position of the object in the frame based on the second similarity. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、被写体追尾装置、被写体追尾プログラム、およびカメラに関する。   The present invention relates to a subject tracking device, a subject tracking program, and a camera.

次のような追跡装置が知られている。この追跡装置は、過去の被写体の動き情報等から、次フレームの被写体位置を予測して被写体を追跡する(例えば、特許文献1)。   The following tracking devices are known. The tracking device tracks the subject by predicting the subject position of the next frame from the motion information of the subject in the past (for example, Patent Document 1).

特開2007−42072号公報JP 2007-42072 A

しかしながら、従来の追跡装置では、低フレームレートで隣接フレーム間の相関が乏しい場合には、被写体位置の予測精度が低下して、追跡性能が低下する可能性があった。   However, in the conventional tracking device, when the correlation between adjacent frames is poor at a low frame rate, the prediction accuracy of the subject position is lowered, and the tracking performance may be lowered.

本発明による被写体追尾装置は、時系列で入力されるフレーム間の情報に基づいて、被写体の遷移先を特定する遷移先特定手段と、テンプレートマッチングを行って、フレーム内の各画素と被写体追尾用のテンプレートとの第1の類似度を算出する第1の類似度算出手段と、遷移先特定手段により特定された被写体の遷移先からの距離に応じて、第1の類似度算出手段によって算出された各画素の第1の類似度に対して重み付けを行って、第2の類似度を算出する第2の類似度算出手段と、第2の類似度算出手段によって算出された第2の類似度に基づいて、フレーム内における被写体位置を特定する被写体位置特定手段とを備えることを特徴とする。
本発明では、遷移先特定手段は、フレーム間での被写体の動きを示す動きベクトルを算出することによって、被写体の遷移先を特定するようにしてもよい。
被写体位置特定手段によって特定された被写体位置近傍領域内の画像を用いて動きベクトルを算出するための動き探索用のテンプレートを更新するテンプレート更新手段をさらに備えるようにしてもよい。
遷移先特定手段は、同一フレームに基づいて異なる解像度の複数枚の画像を生成し、低解像度の画像から順番に動き探索用のテンプレートを用いたテンプレートマッチング処理を行って動きベクトルを算出するようにしてもよい。
本発明による被写体追尾プログラムは、コンピュータに、時系列で入力されるフレーム間の情報に基づいて、被写体の遷移先を特定する遷移先特定手順と、テンプレートマッチングを行って、フレーム内の各画素と被写体追尾用のテンプレートとの第1の類似度を算出する第1の類似度算出手順と、遷移先特定手順で特定した被写体の遷移先からの距離に応じて、第1の類似度算出手順で算出した各画素の前記第1の類似度に対して重み付けを行って、第2の類似度を算出する第2の類似度算出手順と、第2の類似度算出手順で算出した第2の類似度に基づいて、フレーム内における被写体位置を特定する被写体位置特定手順とを実行させることを特徴とする。
本発明によるカメラは、上記いずれかの被写体追尾装置を備えることを特徴とする。
The subject tracking device according to the present invention performs transition matching with a transition destination specifying unit that specifies a transition destination of a subject based on information between frames input in time series, and performs pixel matching for each pixel in the frame and subject tracking Calculated by the first similarity calculating means according to the distance from the transition destination of the subject specified by the transition destination specifying means and the first similarity calculating means for calculating the first similarity with the template. A second similarity calculation unit that calculates the second similarity by weighting the first similarity of each pixel, and the second similarity calculated by the second similarity calculation unit And a subject position specifying means for specifying the subject position in the frame.
In the present invention, the transition destination specifying means may specify the transition destination of the subject by calculating a motion vector indicating the motion of the subject between frames.
You may make it further provide the template update part which updates the template for a motion search for calculating a motion vector using the image in the to-be-photographed object position vicinity area | region specified by the object position specifying means.
The transition destination specifying means generates a plurality of images with different resolutions based on the same frame, and performs a template matching process using a motion search template in order from the low resolution images to calculate a motion vector. May be.
The subject tracking program according to the present invention performs a transition destination identification procedure for identifying a transition destination of a subject on the basis of information between frames input in time series to a computer, performs template matching, and sets each pixel in the frame. In accordance with the first similarity calculation procedure for calculating the first similarity with the template for tracking the subject and the distance from the transition destination of the subject specified in the transition destination specification procedure, the first similarity calculation procedure A second similarity calculation procedure for calculating a second similarity by weighting the first similarity of each calculated pixel, and a second similarity calculated by the second similarity calculation procedure And a subject position specifying procedure for specifying a subject position in the frame based on the degree.
A camera according to the present invention includes any one of the subject tracking devices described above.

本発明によれば、高精度に被写体位置を特定することができる。   According to the present invention, the subject position can be specified with high accuracy.

カメラ100の一実施の形態の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an embodiment of a camera 100. FIG. 被写体追尾処理の流れを示すフローチャート図である。It is a flowchart figure which shows the flow of a subject tracking process. 動きベクトルの検出例を示す図である。It is a figure which shows the example of a detection of a motion vector. 動き探索処理の方法を模式的に示した図である。It is the figure which showed the method of the motion search process typically. 動き探索処理から第2類似度の算出までのイメージを示した図である。It is the figure which showed the image from a motion search process to calculation of a 2nd similarity.

図1は、本実施の形態におけるカメラの一実施の形態の構成を示すブロック図である。カメラ100は、操作部材101と、レンズ102と、撮像素子103と、制御装置104と、メモリカードスロット105と、モニタ106とを備えている。操作部材101は、使用者によって操作される種々の入力部材、例えば電源ボタン、レリーズボタン、ズームボタン、十字キー、決定ボタン、再生ボタン、削除ボタンなどを含んでいる。   FIG. 1 is a block diagram illustrating a configuration of an embodiment of a camera according to the present embodiment. The camera 100 includes an operation member 101, a lens 102, an image sensor 103, a control device 104, a memory card slot 105, and a monitor 106. The operation member 101 includes various input members operated by the user, such as a power button, a release button, a zoom button, a cross key, an enter button, a play button, and a delete button.

レンズ102は、複数の光学レンズから構成されるが、図1では代表して1枚のレンズで表している。撮像素子103は、例えばCCDやCMOSなどのイメージセンサーであり、レンズ102により結像した被写体像を撮像する。そして、撮像によって得られた画像信号を制御装置104へ出力する。   The lens 102 is composed of a plurality of optical lenses, but is representatively represented by one lens in FIG. The image sensor 103 is an image sensor such as a CCD or a CMOS, for example, and captures a subject image formed by the lens 102. Then, an image signal obtained by imaging is output to the control device 104.

制御装置104は、CPU、メモリ、およびその他の周辺回路により構成され、カメラ100を制御する。なお、制御装置104を構成するメモリには、SDRAMやフラッシュメモリが含まれる。SDRAMは、揮発性のメモリであって、CPUがプログラム実行時にプログラムを展開するためのワークメモリとして使用されたり、データを一時的に記録するためのバッファメモリとして使用される。また、フラッシュメモリは、不揮発性のメモリであって、制御装置104が実行するプログラムのデータや、プログラム実行時に読み込まれる種々のパラメータなどが記録されている。   The control device 104 includes a CPU, a memory, and other peripheral circuits, and controls the camera 100. Note that the memory constituting the control device 104 includes SDRAM and flash memory. The SDRAM is a volatile memory, and is used as a work memory for the CPU to develop a program when the program is executed or as a buffer memory for temporarily recording data. The flash memory is a non-volatile memory in which data of a program executed by the control device 104, various parameters read during program execution, and the like are recorded.

この制御装置104は、撮像素子103から入力された画像信号に基づいて所定の画像形式、例えばJPEG形式の画像データ(以下、「本画像データ」と呼ぶ)を生成する。また、制御装置104は、生成した本画像データに基づいて、表示用画像データ、例えばサムネイル画像データを生成する。制御装置104は、生成した本画像データとサムネイル画像データとを含み、さらにヘッダ情報を付加した画像ファイルを生成してメモリカードスロット105へ出力する。   The control device 104 generates image data in a predetermined image format, for example, JPEG format (hereinafter referred to as “main image data”) based on the image signal input from the image sensor 103. Further, the control device 104 generates display image data, for example, thumbnail image data, based on the generated main image data. The control device 104 generates an image file that includes the generated main image data and thumbnail image data, and further includes header information, and outputs the image file to the memory card slot 105.

メモリカードスロット105は、記憶媒体としてのメモリカードを挿入するためのスロットであり、制御装置104から出力された画像ファイルをメモリカードに書き込んで記録する。また、メモリカードスロット105は、制御装置104からの指示に基づいて、メモリカード内に記憶されている画像ファイルを読み込む。   The memory card slot 105 is a slot for inserting a memory card as a storage medium, and the image file output from the control device 104 is written and recorded on the memory card. The memory card slot 105 reads an image file stored in the memory card based on an instruction from the control device 104.

モニタ106は、カメラ100の背面に搭載された液晶モニタ(背面モニタ)であり、当該モニタ106には、メモリカードに記憶されている画像やカメラ100を設定するための設定メニューなどが表示される。また、制御装置104は、使用者によってカメラ100のモードが撮影モードに設定されると、撮像素子103から時系列で取得した画像信号に基づいて生成した表示用画像データをモニタ106に出力する。これによってモニタ106にはスルー画が表示される。   The monitor 106 is a liquid crystal monitor (rear monitor) mounted on the back surface of the camera 100, and the monitor 106 displays an image stored in a memory card, a setting menu for setting the camera 100, and the like. . Further, when the user sets the mode of the camera 100 to the shooting mode, the control device 104 outputs the display image data generated based on the image signal acquired in time series from the image sensor 103 to the monitor 106. As a result, a through image is displayed on the monitor 106.

本実施の形態におけるカメラ100では、制御装置104は、撮像素子103から入力されるスルー画の各フレーム(フレーム画像)に対して、あらかじめ用意したテンプレート画像を用いたテンプレートマッチング処理を行うことによって、フレーム内からテンプレート画像と類似する画像領域を特定する。そして、制御装置104は、特定した領域をフレーム間で追跡することによって、被写体追尾を行う。   In the camera 100 according to the present embodiment, the control device 104 performs a template matching process using a template image prepared in advance for each frame (frame image) of a through image input from the image sensor 103. An image region similar to the template image is specified from within the frame. Then, the control device 104 performs subject tracking by tracking the specified region between frames.

本実施の形態では、制御装置104は、テンプレートマッチングを行うに当たって、被写体のフレーム間での動きを探索する動き探索用のテンプレートと、被写体追尾用のテンプレートとの2つのテンプレートを用いて、被写体追尾を行う。以下、本実施の形態における被写体追尾処理の詳細を図2に示すフローチャートを用いて説明する。なお、図2に示す処理は、撮像素子103から画像信号の入力が開始されると起動するプログラムとして、制御装置104によって実行される。   In the present embodiment, when performing template matching, the control device 104 uses two templates, a motion search template for searching for a motion between frames of a subject and a subject tracking template, to perform subject tracking. I do. The details of the subject tracking process in the present embodiment will be described below with reference to the flowchart shown in FIG. 2 is executed by the control device 104 as a program that is activated when input of an image signal from the image sensor 103 is started.

ステップS1において、制御装置104は、撮像素子103から入力されるフレーム画像を取り込んで、ステップS2へ進む。ステップS2では、制御装置104は、ステップS1で取り込んだフレーム画像内から、所定範囲内の画像を動き探索用のテンプレート、および被写体追尾用のテンプレートを取得する。なお、動き探索用のテンプレート、および被写体追尾用のテンプレートは、ステップS1で取り込んだフレーム画像内において、使用者によって指定された範囲内の画像を切り出すことによって取得される。また、ステップS2で取得される初期の動き探索用のテンプレート、および被写体追尾用のテンプレートは、同じ画像であってもよいし、異なる画像であってもよい。   In step S1, the control device 104 takes in a frame image input from the image sensor 103, and proceeds to step S2. In step S2, the control device 104 acquires a template for motion search and a template for subject tracking from the frame image captured in step S1 for an image within a predetermined range. Note that the motion search template and the subject tracking template are obtained by cutting out an image within the range specified by the user in the frame image captured in step S1. Further, the initial motion search template and the subject tracking template acquired in step S2 may be the same image or different images.

その後、ステップS3へ進み、制御装置104は、ステップS1で取りこんだフレーム画像を対象として、ステップS2で取得した動き探索用のテンプレートを用いた動き探索処理を行う。例えば、制御装置104は、時系列で入力されるフレーム間の情報に基づいて、被写体の遷移先を特定する。具体的には、フレーム画像を対象として、テンプレートマッチング(ブロックマッチング)や勾配法等の方法により、動き探索用のテンプレートを用いた動き探索処理を行う。   Thereafter, the process proceeds to step S3, and the control device 104 performs a motion search process using the motion search template acquired in step S2 for the frame image captured in step S1. For example, the control device 104 specifies the transition destination of the subject based on information between frames input in time series. Specifically, motion search processing using a template for motion search is performed on a frame image by a method such as template matching (block matching) or gradient method.

この動き探索処理によって、フレーム間での被写体の遷移を示す動きベクトルが検出される。例えば、図3(a)に示すiフレーム目のフレーム画像における被写体2aが、図3(b)に示すi+1フレーム目のフレーム画像に示す位置に移動した場合には、動き探索処理によってフレーム間での被写体の動きを示す動きベクトル2bが検出される。   By this motion search process, a motion vector indicating the transition of the subject between frames is detected. For example, when the subject 2a in the frame image of the i-th frame shown in FIG. 3A moves to the position shown in the frame image of the i + 1-th frame shown in FIG. A motion vector 2b indicating the motion of the subject is detected.

なお、本実施の形態における動き探索処理では、制御装置104は、図4に示すように、階層的なテンプレートマッチング処理によって動きベクトルを検出することにより、動き探索処理を行う。具体的には、制御装置104は、任意の隣接フレーム、例えばiフレームとi+1フレームにおいて、図4に示すような階層構造の画像を作成する。この階層は2つ以上であり、図4に示す例では、iフレームが階層4a〜4c、i+1フレームが階層4d〜4fとそれぞれ3階層になっている。また、高解像側(4c側、4f側)からN番目の階層画像の1辺のサイズ比は1/2となる。 In the motion search process according to the present embodiment, as shown in FIG. 4, the control device 104 performs the motion search process by detecting a motion vector through a hierarchical template matching process. Specifically, the control device 104 creates an image having a hierarchical structure as shown in FIG. 4 in arbitrary adjacent frames, for example, i frame and i + 1 frame. There are two or more hierarchies. In the example shown in FIG. 4, the i frame has hierarchies 4a to 4c and the i + 1 frame has hierarchies 4d to 4f. Further, the size ratio of one side of the Nth hierarchical image from the high resolution side (4c side, 4f side) is 1 / 2N .

この場合、テンプレートはiフレームから抽出するものとし、具体的には、iフレームにおいて、点線の枠で示したように各階層でテンプレートが抽出される。このそれぞれのテンプレートを用いて、最も低解像な階層の画像、すなわちi+1フレームにおける画像4fから順番にテンプレートマッチング処理を行う。ここで、L−1階層でマッチングした座標値を2倍した座標をL階層の探索初期値にする。これは、マッチング座標をXend、探索初期座標をXiniとすると、次式(1)により表すことができる。

Figure 2011090488
In this case, it is assumed that the template is extracted from the i frame. Specifically, in the i frame, the template is extracted at each layer as indicated by the dotted frame. Using each of these templates, template matching processing is performed in order from the lowest resolution image, that is, the image 4f in the i + 1 frame. Here, the coordinate obtained by doubling the coordinate value matched in the L-1 hierarchy is set as the search initial value in the L hierarchy. This can be expressed by the following equation (1), where Xend is the matching coordinate and Xini is the initial search coordinate.
Figure 2011090488

このような階層的なテンプレートマッチングを行うことにより、各階層で探索エリアを小さくしても、被写体の大きな動きを正確かつ高速に検出することができる。その後、ステップS4へ進む。   By performing such hierarchical template matching, even if the search area is reduced in each hierarchy, a large movement of the subject can be detected accurately and at high speed. Then, it progresses to step S4.

ステップS4では、制御装置104は、被写体追尾用のテンプレートを用いて、フレーム画像を対象としたテンプレートマッチングを行い、フレーム画像の各画素に対して被写体追尾用のテンプレートとの類似度を算出する。本実施の形態では、このステップS4で各画素について算出される類似度を第1類似度と呼ぶ。なお、被写体追尾用のテンプレートを用いたテンプレートマッチングの方法は公知であるため詳細な説明は省略するが、一般的には、SAD(Sum of Absolute Difference)やSSD(Sum of Squared Difference)等の方法が用いられる。   In step S <b> 4, the control device 104 performs template matching for the frame image using the subject tracking template, and calculates the similarity between the pixel of the frame image and the subject tracking template. In the present embodiment, the similarity calculated for each pixel in step S4 is referred to as a first similarity. Note that a template matching method using a subject tracking template is well known and will not be described in detail. Generally, a method such as SAD (Sum of Absolute Difference) or SSD (Sum of Squared Difference) is used. Is used.

その後、ステップS5へ進み、制御装置104は、ステップS3における動き探索処理によって得られた主要被写体の遷移先からの距離に応じて、各画素の第1類似度の重み付けを行うことにより、第2類似度を算出する。具体的には、制御装置104は、次式(2)によって第2類似度を算出する。
第2類似度 = 第1類似度×距離情報による重み ・・・(2)
Thereafter, the process proceeds to step S5, where the control device 104 performs the second weighting by weighting the first similarity of each pixel according to the distance from the transition destination of the main subject obtained by the motion search process in step S3. Calculate similarity. Specifically, the control device 104 calculates the second similarity by the following equation (2).
2nd similarity = 1st similarity x weight based on distance information (2)

なお、式(2)において、距離情報による重み付けとしては、次式(3)に示すガウシアン関数や、次式(4)に示す線形関数を用いた重み付けが挙げられる。

Figure 2011090488
Figure 2011090488
In Expression (2), weighting by distance information includes weighting using a Gaussian function represented by the following Expression (3) and a linear function represented by the following Expression (4).
Figure 2011090488
Figure 2011090488

ここで、ステップS3における動き探索処理からステップS5における第2類似度の算出までのイメージを図5を用いて説明する。図5(a)に示すように、ステップS3における動き探索処理によって、追尾対象である被写体5aの動きベクトル5bが算出される。なお、図5(a)に示す例では、被写体5aのiフレームにおける被写体位置が点線で示す枠内であったのに対して、i+1フレームでは実線で示す枠内に移動したことにより、動きベクトル5bが算出されている。   Here, an image from the motion search process in step S3 to the calculation of the second similarity in step S5 will be described with reference to FIG. As shown in FIG. 5A, the motion vector 5b of the subject 5a to be tracked is calculated by the motion search process in step S3. In the example shown in FIG. 5A, the subject position of the subject 5a in the i frame is within the frame indicated by the dotted line, whereas in the i + 1 frame, the motion vector is moved into the frame indicated by the solid line. 5b is calculated.

図5(b)は、ステップS5で、ステップS3における動き探索処理によって得られた主要被写体の遷移先5cからの距離に応じて、各画素の第1類似度の重み付けを行う場合の重み付けイメージを示す図である。この図5(b)に示す主要被写体の遷移先5cは、図5(a)に示したi+1フレームにおける被写体5aの位置に相当し、この遷移先5cを中心に近い画素ほど重みを高くし、中心から遠ざかるに従って重みを低くする。すなわち、図5(b)に示す例では、色が濃いほど重みが高く、色が薄くなるに従って重みが低くなっている。   FIG. 5B shows a weighted image when weighting the first similarity of each pixel according to the distance from the transition destination 5c of the main subject obtained by the motion search process in step S3 in step S5. FIG. The transition destination 5c of the main subject shown in FIG. 5B corresponds to the position of the subject 5a in the i + 1 frame shown in FIG. 5A, and the pixel closer to the center of the transition destination 5c has a higher weight. The weight is lowered as the distance from the center increases. That is, in the example shown in FIG. 5B, the darker the color, the higher the weight, and the lower the color, the lower the weight.

図5(c)は、ステップS4で算出される第1類似度のイメージを示した図である。この例では、図5(a)における追尾対象の被写体5aに対応する第1類似度成分5eに加えて、他の被写体5cに対応する第1類似度成分5fや被写体5dに対応する第1類似度成分5gが算出されている。   FIG. 5C is a diagram showing an image of the first similarity calculated in step S4. In this example, in addition to the first similarity component 5e corresponding to the subject 5a to be tracked in FIG. 5A, the first similarity component 5f corresponding to the other subject 5c and the first similarity corresponding to the subject 5d. The degree component 5g is calculated.

図5(d)は、ステップS5において、第1類似度成分を動き探索処理によって得られた主要被写体の遷移先からの距離に応じて重み付けを行うことによって算出される第2類似度のイメージを示した図である。この図5(d)に示す例では、図5(b)に示した重み付けに基づいて、主要被写体の遷移先5cからの距離が近い、追尾対象の被写体5aに対応する第1類似度成分5eに対して大きな重み付けがなされた結果、被写体5aに対応する第2類似度成分5hが算出されている。   FIG. 5D shows an image of the second similarity calculated by weighting the first similarity component according to the distance from the transition destination of the main subject obtained by the motion search process in step S5. FIG. In the example shown in FIG. 5D, the first similarity component 5e corresponding to the tracking target subject 5a whose distance from the transition destination 5c of the main subject is close based on the weighting shown in FIG. 5B. As a result, a second similarity component 5h corresponding to the subject 5a is calculated.

その後、ステップS6へ進み、制御装置104は、フレーム画像内でステップS5で算出した第2類似度の値が最小となる位置、すなわち第2類似度が最も高い位置を特定して抽出する。制御装置104は、ここで抽出した位置をフレーム画像内における追尾対象の被写体位置として特定することにより、フレーム間での被写体追尾を行う。その後、ステップS7へ進む。   Thereafter, the process proceeds to step S6, and the control device 104 identifies and extracts the position where the second similarity value calculated in step S5 is minimum in the frame image, that is, the position where the second similarity is the highest. The control device 104 performs subject tracking between frames by specifying the extracted position as the subject position to be tracked in the frame image. Thereafter, the process proceeds to step S7.

ステップS7では、制御装置104は、次のフレーム画像に対する動き探索処理のために、ステップS6で抽出した第2類似度が最も高い位置の近傍領域から新たな動き探索用テンプレートを取得して、動き探索用のテンプレートの更新を行なって、ステップS8へ進む。   In step S7, the control device 104 acquires a new motion search template from the vicinity region of the position having the highest second similarity extracted in step S6 for the motion search process for the next frame image, and moves the motion. The search template is updated, and the process proceeds to step S8.

ステップS8では、制御装置104は、ステップS6で特定した最も高い第2類似度、すなわち最良類似度があらかじめ定められた所定の閾値より大きいか否かを判断する。ステップS8で肯定判断した場合には、ステップS9へ進み、制御装置104は、次のフレーム画像に対するテンプレートマッチング処理のために、ステップS6で抽出した第2類似度が最も高い位置の近傍領域から新たな被写体追尾用のテンプレートを取得して、被写体追尾用のテンプレートの更新を行なって、ステップS10へ進む。これに対して、ステップS8で否定判断した場合には、そのままステップS10へ進む。   In step S8, the control device 104 determines whether or not the highest second similarity specified in step S6, that is, the best similarity is greater than a predetermined threshold value. When an affirmative determination is made in step S8, the process proceeds to step S9, and the control device 104 newly starts from the neighboring region of the position having the highest second similarity extracted in step S6 for the template matching process for the next frame image. The subject tracking template is acquired, the subject tracking template is updated, and the process proceeds to step S10. On the other hand, if a negative determination is made in step S8, the process proceeds directly to step S10.

このように、本実施の形態では、動き探索用のテンプレートは毎フレーム更新を行なうのに対して、被写体追尾用のテンプレートは、毎フレーム更新を行なうとは限らず、ステップS8の条件を満たしたときのみ更新を行なうこととする。これによって、動き探索用のテンプレートは、常に最新の被写体の形状を反映させたテンプレートとすることができるため、最新の被写体の形状を捉えて動きベクトルを算出できる。一方、被写体追尾用のテンプレートは、類似度が高い場合にのみ更新を行うため、誤マッチングの場合にテンプレートが更新されるのを防ぐことができ、高い精度でテンプレートマッチングを継続することができる。   As described above, in this embodiment, the motion search template is updated every frame, whereas the subject tracking template is not always updated every frame, and satisfies the condition of step S8. Update only when As a result, the motion search template can always be a template that reflects the latest shape of the subject, so that the motion vector can be calculated by capturing the latest shape of the subject. On the other hand, since the subject tracking template is updated only when the similarity is high, the template can be prevented from being updated in the case of incorrect matching, and the template matching can be continued with high accuracy.

ステップS10では、制御装置104は、処理を終了するか否かを判断する。例えば、制御装置104は、撮像素子103からのフレーム画像の入力が停止したときに、処理を終了すると判断する。ステップS10で否定判断した場合には、ステップS3へ戻って処理を繰り返す。これに対して、ステップS10で肯定判断した場合には、処理を終了する。   In step S10, the control device 104 determines whether or not to end the process. For example, the control device 104 determines to end the process when the input of the frame image from the image sensor 103 is stopped. If a negative determination is made in step S10, the process returns to step S3 and is repeated. On the other hand, if an affirmative determination is made in step S10, the process ends.

以上説明した本実施の形態によれば、以下のような作用効果を得ることができる。
(1)制御装置104は、動き探索処理を行なって、時系列で入力されるフレーム間の情報に基づいて被写体の遷移先を特定し、テンプレートマッチングを行って、フレーム内の各画素と被写体追尾用のテンプレートとの第1の類似度を算出する。そして、動き探索処理によって特定された被写体の遷移先からの距離に応じて、各画素の第1の類似度に対して重み付けを行って第2の類似度を算出し、第2の類似度に基づいて、フレーム内における被写体位置を特定するようにした。このように、被写体の遷移先からの距離に応じて第1の類似度を重み付けして得た第2の類似度に基づいて被写体位置を特定することにより、精度高く被写体位置を特定することができる。
According to the present embodiment described above, the following operational effects can be obtained.
(1) The control device 104 performs a motion search process, specifies a subject transition destination based on information between frames input in time series, performs template matching, and tracks each pixel in the frame and subject tracking A first similarity with the template is calculated. Then, according to the distance from the transition destination of the subject specified by the motion search process, the first similarity of each pixel is weighted to calculate the second similarity, and the second similarity is calculated. Based on this, the subject position in the frame is specified. Thus, the subject position can be specified with high accuracy by specifying the subject position based on the second similarity obtained by weighting the first similarity according to the distance of the subject from the transition destination. it can.

(2)制御装置104は、フレーム間での被写体の動きを示す動きベクトルを算出することによって被写体の遷移先を特定するようにした。これによって、被写体の遷移先を精度高く特定することができる。 (2) The control device 104 specifies the transition destination of the subject by calculating a motion vector indicating the motion of the subject between frames. Thereby, the transition destination of the subject can be specified with high accuracy.

(3)制御装置104は、第2類似度が最も高い位置の近傍領域から新たな動き探索用テンプレートを取得して、動き探索用のテンプレートの更新を行なうようにした。これによって、動き探索用のテンプレートは、常に最新の被写体の形状を反映させたテンプレートとすることができるため、最新の被写体の形状を捉えて動きベクトルを算出できる。 (3) The control device 104 obtains a new motion search template from the vicinity region of the position having the highest second similarity, and updates the template for motion search. As a result, the motion search template can always be a template that reflects the latest shape of the subject, so that the motion vector can be calculated by capturing the latest shape of the subject.

(4)制御装置104は、動き探索処理では、階層的なテンプレートマッチング処理によって動きベクトルを検出することにより、動き探索処理を行うようにした。これによって、各階層で探索エリアを小さくしても、被写体の大きな動きを正確かつ高速に検出することができる。 (4) In the motion search process, the control device 104 performs the motion search process by detecting a motion vector by a hierarchical template matching process. Thereby, even if the search area is reduced in each hierarchy, a large movement of the subject can be detected accurately and at high speed.

―変形例―
なお、上述した実施の形態のカメラは、以下のように変形することもできる。
(1)上述した実施の形態では、制御装置104は、スルー画を対象として被写体追尾を行う例について説明した。しかしながら、カメラ100が動画撮影機能を備えている場合には、制御装置104は、スルー画ではなく、撮影済みの動画のフレーム間で被写体追尾を行うようにしてもよい。
-Modification-
The camera of the above-described embodiment can be modified as follows.
(1) In the above-described embodiment, the control device 104 has described an example in which subject tracking is performed on a through image. However, when the camera 100 has a moving image shooting function, the control device 104 may perform subject tracking between frames of a captured moving image instead of the through image.

(2)上述し実施の形態では、カメラ100が供える制御装置104がテンプレートマッチング処理を行って被写体追尾を行う例について説明した。しかしながら、テンプレートマッチング処理を実行するためのプログラムをパソコンなどその他の端末に記録して、それらの端末上で処理を実行することも可能である。この場合、カメラで撮影した動画像データを被写体追尾装置として機能する端末側に取り込んで、これを対象に処理を行うようにすれば、動画のフレーム間で被写体追尾を行うことが可能となる。また、本発明はカメラ付き携帯電話などに適用することも可能である。 (2) In the above-described embodiment, the example in which the control device 104 provided by the camera 100 performs template matching processing to perform subject tracking has been described. However, it is also possible to record a program for executing the template matching process in another terminal such as a personal computer and execute the process on those terminals. In this case, if moving image data captured by a camera is taken into a terminal functioning as a subject tracking device and processing is performed on the terminal, subject tracking can be performed between frames of a moving image. The present invention can also be applied to a camera-equipped mobile phone.

なお、本発明の特徴的な機能を損なわない限り、本発明は、上述した実施の形態における構成に何ら限定されない。また、上述の実施の形態と複数の変形例を組み合わせた構成としてもよい。   Note that the present invention is not limited to the configurations in the above-described embodiments as long as the characteristic functions of the present invention are not impaired. Moreover, it is good also as a structure which combined the above-mentioned embodiment and a some modification.

100 カメラ、101 操作部材、102 レンズ、103 撮像素子、104 制御装置、105 メモリカードスロット、106 モニタ 100 Camera, 101 Operation member, 102 Lens, 103 Image sensor, 104 Control device, 105 Memory card slot, 106 Monitor

Claims (6)

時系列で入力されるフレーム間の情報に基づいて、被写体の遷移先を特定する遷移先特定手段と、
テンプレートマッチングを行って、フレーム内の各画素と被写体追尾用のテンプレートとの第1の類似度を算出する第1の類似度算出手段と、
前記遷移先特定手段により特定された前記被写体の遷移先からの距離に応じて、前記第1の類似度算出手段によって算出された各画素の前記第1の類似度に対して重み付けを行って、第2の類似度を算出する第2の類似度算出手段と、
前記第2の類似度算出手段によって算出された前記第2の類似度に基づいて、フレーム内における被写体位置を特定する被写体位置特定手段とを備えることを特徴とする被写体追尾装置。
A transition destination specifying means for specifying a transition destination of a subject based on information between frames input in time series;
First similarity calculation means for performing template matching to calculate a first similarity between each pixel in the frame and a template for subject tracking;
According to the distance from the transition destination of the subject specified by the transition destination specifying means, weighting is performed on the first similarity of each pixel calculated by the first similarity calculation means, A second similarity calculating means for calculating a second similarity;
A subject tracking device comprising: subject position specifying means for specifying a subject position in a frame based on the second similarity calculated by the second similarity calculating means.
請求項1に記載の被写体追尾装置において、
前記遷移先特定手段は、フレーム間での被写体の動きを示す動きベクトルを算出することによって、前記被写体の遷移先を特定することを特徴とする被写体追尾装置。
The subject tracking device according to claim 1,
The subject tracking device characterized in that the transition destination specifying means specifies a transition destination of the subject by calculating a motion vector indicating the motion of the subject between frames.
請求項2に記載の被写体追尾装置において、
前記被写体位置特定手段によって特定された被写体位置近傍領域内の画像を用いて前記動きベクトルを算出するための動き探索用のテンプレートを更新するテンプレート更新手段をさらに備えることを特徴とする被写体追尾装置。
The subject tracking device according to claim 2,
A subject tracking apparatus, further comprising a template update unit that updates a motion search template for calculating the motion vector using an image in a region near the subject position specified by the subject position specifying unit.
請求項3に記載の被写体追尾装置において、
前記遷移先特定手段は、同一フレームに基づいて異なる解像度の複数枚の画像を生成し、低解像度の画像から順番に前記動き探索用のテンプレートを用いたテンプレートマッチング処理を行って前記動きベクトルを算出することを特徴とする被写体追尾装置。
The subject tracking device according to claim 3,
The transition destination specifying unit generates a plurality of images with different resolutions based on the same frame, and performs the template matching process using the motion search template in order from the low resolution images to calculate the motion vector. An object tracking device characterized by:
コンピュータに、
時系列で入力されるフレーム間の情報に基づいて、被写体の遷移先を特定する遷移先特定手順と、
テンプレートマッチングを行って、フレーム内の各画素と被写体追尾用のテンプレートとの第1の類似度を算出する第1の類似度算出手順と、
前記遷移先特定手順で特定した前記被写体の遷移先からの距離に応じて、前記第1の類似度算出手順で算出した各画素の前記第1の類似度に対して重み付けを行って、第2の類似度を算出する第2の類似度算出手順と、
前記第2の類似度算出手順で算出した前記第2の類似度に基づいて、フレーム内における被写体位置を特定する被写体位置特定手順とを実行させるための被写体追尾プログラム。
On the computer,
Based on information between frames input in time series, a transition destination specifying procedure for specifying a transition destination of a subject,
A first similarity calculation procedure for performing a template matching to calculate a first similarity between each pixel in the frame and a subject tracking template;
The first similarity of each pixel calculated in the first similarity calculation procedure is weighted according to the distance from the transition destination of the subject specified in the transition destination specification procedure, and a second A second similarity calculation procedure for calculating the similarity of
A subject tracking program for executing a subject position specifying procedure for specifying a subject position in a frame based on the second similarity calculated in the second similarity calculation procedure.
請求項1〜4のいずれか一項に記載の被写体追尾装置を備えたカメラ。   A camera comprising the subject tracking device according to claim 1.
JP2009243332A 2009-10-22 2009-10-22 Object tracking device, object tracking program, and camera Pending JP2011090488A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009243332A JP2011090488A (en) 2009-10-22 2009-10-22 Object tracking device, object tracking program, and camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009243332A JP2011090488A (en) 2009-10-22 2009-10-22 Object tracking device, object tracking program, and camera

Publications (1)

Publication Number Publication Date
JP2011090488A true JP2011090488A (en) 2011-05-06

Family

ID=44108686

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009243332A Pending JP2011090488A (en) 2009-10-22 2009-10-22 Object tracking device, object tracking program, and camera

Country Status (1)

Country Link
JP (1) JP2011090488A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014141964A1 (en) * 2013-03-14 2014-09-18 ソニー株式会社 Image processing device and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06230454A (en) * 1993-02-02 1994-08-19 Nikon Corp Camera provided with object tracking function
JPH08335268A (en) * 1995-06-07 1996-12-17 Sony Corp Area extracting method
JPH1186004A (en) * 1997-09-11 1999-03-30 Fujitsu Ltd Moving body tracking device
JP2008287648A (en) * 2007-05-21 2008-11-27 Fujifilm Corp Mobile body detection method and device, and monitoring device
US20090116692A1 (en) * 1998-08-10 2009-05-07 Paul George V Realtime object tracking system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06230454A (en) * 1993-02-02 1994-08-19 Nikon Corp Camera provided with object tracking function
JPH08335268A (en) * 1995-06-07 1996-12-17 Sony Corp Area extracting method
JPH1186004A (en) * 1997-09-11 1999-03-30 Fujitsu Ltd Moving body tracking device
US6031568A (en) * 1997-09-11 2000-02-29 Fujitsu Limited Moving-target tracking apparatus
US20090116692A1 (en) * 1998-08-10 2009-05-07 Paul George V Realtime object tracking system
JP2008287648A (en) * 2007-05-21 2008-11-27 Fujifilm Corp Mobile body detection method and device, and monitoring device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014141964A1 (en) * 2013-03-14 2014-09-18 ソニー株式会社 Image processing device and method

Similar Documents

Publication Publication Date Title
JP6106921B2 (en) Imaging apparatus, imaging method, and imaging program
JP4429241B2 (en) Image processing apparatus and method
JP5159515B2 (en) Image processing apparatus and control method thereof
JP4735742B2 (en) Imaging apparatus, strobe image generation method, and program
US8818046B2 (en) Image processing device, image processing method, and program
JP4586709B2 (en) Imaging device
JP5699432B2 (en) Image processing device
JP4798259B2 (en) Subject tracking device and camera
JP2008141437A (en) Imaging apparatus, image processor, image processing method for them, and program to make computer execute its method
JP2009231967A (en) Image recording method, image recording device, and image recording program
JP2011040993A (en) Subject homing program and camera
JP2009141475A (en) Camera
JP2016123044A (en) Subject tracking device, and control method and program therefor
JP5024116B2 (en) Subject tracking program and subject tracking device
JP4807582B2 (en) Image processing apparatus, imaging apparatus, and program thereof
WO2012014946A1 (en) Image processing device and image processing program
JP2010074315A (en) Object tracking method and imaging device
JP5390871B2 (en) Imaging apparatus and control method thereof
JP5365327B2 (en) Subject tracking device and camera
JP5451364B2 (en) Subject tracking device and control method thereof
JP5484129B2 (en) Imaging device
JP2010157792A (en) Photographed object tracing device
JP2011090488A (en) Object tracking device, object tracking program, and camera
JP5380833B2 (en) Imaging apparatus, subject detection method and program
JP2014216830A (en) Image tracking device, image tracking method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121012

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130613

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130618

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130819

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130826

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20131008