[go: up one dir, main page]

JP2009111716A - Imaging apparatus, program, and template generation method - Google Patents

Imaging apparatus, program, and template generation method Download PDF

Info

Publication number
JP2009111716A
JP2009111716A JP2007281885A JP2007281885A JP2009111716A JP 2009111716 A JP2009111716 A JP 2009111716A JP 2007281885 A JP2007281885 A JP 2007281885A JP 2007281885 A JP2007281885 A JP 2007281885A JP 2009111716 A JP2009111716 A JP 2009111716A
Authority
JP
Japan
Prior art keywords
subject
template
image
tracking
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2007281885A
Other languages
Japanese (ja)
Inventor
Maki Suzuki
真樹 鈴木
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 JP2007281885A priority Critical patent/JP2009111716A/en
Publication of JP2009111716A publication Critical patent/JP2009111716A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

【課題】 より被写体追尾の処理に適したテンプレートを生成するための手段を提供する。
【解決手段】 撮像装置は、撮像部と、テンプレート生成部と、被写体追尾部とを備える。撮像部は、被写体を撮像して画像のデータを生成する。テンプレート生成部は、画像内に設定された候補領域の内側から追尾対象となる被写体の特徴を示す特徴領域を特定し、特徴領域の画像のデータを用いてテンプレートを生成する。被写体追尾部は、テンプレートを用いて、追尾対象の被写体を入力画像から継続的に検出する。
【選択図】 図1
PROBLEM TO BE SOLVED: To provide a means for generating a template more suitable for subject tracking processing.
An imaging apparatus includes an imaging unit, a template generation unit, and a subject tracking unit. The imaging unit captures a subject and generates image data. The template generation unit identifies a feature region indicating the characteristics of the subject to be tracked from the inside of the candidate region set in the image, and generates a template using the image data of the feature region. The subject tracking unit continuously detects the subject to be tracked from the input image using the template.
[Selection] Figure 1

Description

本発明は、被写体の追尾機能を備える撮像装置およびその周辺技術に関する。   The present invention relates to an imaging apparatus having a subject tracking function and its peripheral technology.

従来から、動きのある主要被写体に追従してフォーカス調整や露光条件の演算などを行うために、被写体追尾機能を備えた撮像装置が種々提案されている。一例として、特許文献1には、入力画像に対してテンプレートマッチング処理を施して被写体追尾を行う撮像装置が開示されている。
特開2004−112550号公報
Conventionally, various imaging apparatuses having a subject tracking function have been proposed in order to perform focus adjustment, calculation of exposure conditions, and the like following a moving main subject. As an example, Patent Document 1 discloses an imaging apparatus that performs subject tracking by performing template matching processing on an input image.
JP 2004-112550 A

ところで、撮像装置に被写体追尾の処理を行なわせる場合には、追尾対象の被写体の特徴が反映されたテンプレートを初期状態で如何に生成できるかが重要になる。しかしながら、ユーザーの指定した位置で生成された初期のテンプレートは撮像装置が被写体追尾の処理を行う上で不適当な場合も多く、被写体追尾機能の性能が十分発揮できない点でなお改善の余地があった。   By the way, when subjecting the imaging device to subject tracking processing, it is important how a template reflecting the characteristics of the subject to be tracked can be generated in the initial state. However, the initial template generated at the position specified by the user is often inappropriate for the imaging device to perform subject tracking processing, and there is still room for improvement in that the performance of the subject tracking function cannot be fully demonstrated. It was.

本発明は上記従来技術の課題を解決するためのものである。本発明の目的は、より被写体追尾の処理に適したテンプレートを生成するための手段を提供することである。   The present invention is to solve the above-mentioned problems of the prior art. An object of the present invention is to provide a means for generating a template more suitable for subject tracking processing.

第1の発明に係る撮像装置は、撮像部と、テンプレート生成部と、被写体追尾部とを備える。撮像部は、被写体を撮像して画像のデータを生成する。テンプレート生成部は、画像内に設定された候補領域の内側から追尾対象となる被写体の特徴を示す特徴領域を特定し、特徴領域の画像のデータを用いてテンプレートを生成する。被写体追尾部は、テンプレートを用いて、追尾対象の被写体を入力画像から継続的に検出する。   An imaging apparatus according to a first aspect includes an imaging unit, a template generation unit, and a subject tracking unit. The imaging unit captures a subject and generates image data. The template generation unit identifies a feature region indicating the characteristics of the subject to be tracked from the inside of the candidate region set in the image, and generates a template using the image data of the feature region. The subject tracking unit continuously detects the subject to be tracked from the input image using the template.

第2の発明は、第1の発明において、テンプレート生成部は、候補領域内での特徴領域の位置を特定する。   In a second aspect based on the first aspect, the template generation unit specifies the position of the feature region within the candidate region.

第3の発明は、第1または第2の発明において、テンプレート生成部は、特徴領域のサイズを特定する。   In a third aspect based on the first aspect or the second aspect, the template generation unit specifies the size of the feature region.

第4の発明は、第2の発明において、テンプレート生成部は、候補領域内で主要被写体を抽出する抽出処理を行う。そして、テンプレート生成部は、主要被写体の重心位置に基づいて特徴領域の位置を特定する。   In a fourth aspect based on the second aspect, the template generation unit performs an extraction process for extracting a main subject within the candidate area. Then, the template generation unit specifies the position of the feature region based on the position of the center of gravity of the main subject.

第5の発明は、第3の発明において、テンプレート生成部は、候補領域内で主要被写体を抽出する抽出処理を行う。そして、テンプレート生成部は、主要被写体の大きさに基づいて特徴領域のサイズを特定する。   In a fifth aspect based on the third aspect, the template generation unit performs an extraction process for extracting a main subject in the candidate area. Then, the template generation unit specifies the size of the feature region based on the size of the main subject.

第6の発明は、第2または第3の発明において、追尾履歴データを記憶するメモリを撮像装置がさらに備える。この追尾履歴データは、被写体追尾部による被写体追尾の結果と、該被写体追尾で適用されたテンプレートの生成条件との対応関係を示す。そして、テンプレート生成部は、被写体追尾の結果に応じて追尾履歴データから抽出された生成条件を参照して特徴領域を特定する。   In a sixth aspect based on the second or third aspect, the imaging apparatus further includes a memory for storing tracking history data. This tracking history data indicates the correspondence between the result of subject tracking by the subject tracking unit and the template generation conditions applied in the subject tracking. Then, the template generation unit specifies the feature region with reference to the generation condition extracted from the tracking history data according to the subject tracking result.

第7の発明は、第2または第3の発明において、画像に対応する撮影画面の複数箇所で被写体距離をそれぞれ検出する測距部を撮像装置がさらに備える。そして、テンプレート生成部は、候補領域内における被写体距離を参照して特徴領域を特定する。   In a seventh aspect based on the second or third aspect, the imaging apparatus further includes a distance measuring unit that detects subject distances at a plurality of locations on the photographing screen corresponding to the image. Then, the template generation unit identifies the feature region with reference to the subject distance in the candidate region.

第8の発明は、第1の発明において、判定処理部と、候補領域変更部とを撮像装置がさらに備える。判定処理部は、候補領域の内側から被写体の特徴を示す部分を検出できるか否かを判定する。候補領域変更部は、上記の特徴を示す部分を検出できないと判定処理部が判定したときに、候補領域のサイズを拡大する。   In an eighth aspect based on the first aspect, the imaging apparatus further includes a determination processing unit and a candidate area changing unit. The determination processing unit determines whether or not a portion indicating the characteristics of the subject can be detected from the inside of the candidate area. The candidate area changing unit enlarges the size of the candidate area when the determination processing unit determines that the portion indicating the above feature cannot be detected.

第9の発明は、第8の発明において、テンプレート生成部は、拡大された後の候補領域の内側から特徴領域を特定する。   In a ninth aspect based on the eighth aspect, the template generation unit specifies a feature region from the inside of the candidate region after being enlarged.

第10の発明は、第8の発明において、テンプレート生成部は、拡大された後の候補領域を特徴領域として特定する。   In a tenth aspect based on the eighth aspect, the template generation unit specifies the candidate area after being enlarged as the characteristic area.

なお、上記の撮像装置の構成を、コンピュータにテンプレートを生成させるためのプログラムや、上記のプログラムを記憶した記憶媒体や、コンピュータにテンプレートを生成させるテンプレート生成方法や、テンプレートを生成させるための画像処理装置などの形式に変換して表現したものも本発明の具体的態様として有効である。   Note that the configuration of the imaging apparatus described above includes a program for causing a computer to generate a template, a storage medium storing the above-described program, a template generation method for causing the computer to generate a template, and image processing for generating a template. What is expressed by being converted into a format such as a device is also effective as a specific aspect of the present invention.

本発明では、追尾対象となる被写体の特徴を示す特徴領域を候補領域の内側から特定することで、より被写体追尾の処理に適したテンプレートを生成できる。   In the present invention, a template that is more suitable for subject tracking processing can be generated by specifying a feature region indicating the feature of the subject to be tracked from the inside of the candidate region.

<電子カメラの構成の説明>
図1は本実施形態の電子カメラの構成を説明するブロック図である。本実施形態の電子カメラは、被写体認識に基づく被写体追尾機能を備えている。
<Description of the configuration of the electronic camera>
FIG. 1 is a block diagram illustrating the configuration of the electronic camera of this embodiment. The electronic camera of the present embodiment has a subject tracking function based on subject recognition.

電子カメラは、撮像光学系11およびレンズ駆動部12と、撮像素子13と、AFE14と、画像処理部15と、第1メモリ16と、記録I/F17と、モニタ18と、操作部材19と、レリーズ釦20と、CPU21と、第2メモリ22およびバス23とを有している。ここで、画像処理部15、第1メモリ16、記録I/F17、モニタ18、CPU21および第2メモリ22は、バス23を介してそれぞれ接続されている。また、レンズ駆動部12、操作部材19、レリーズ釦20はそれぞれCPU21に接続されている。   The electronic camera includes an imaging optical system 11, a lens driving unit 12, an imaging element 13, an AFE 14, an image processing unit 15, a first memory 16, a recording I / F 17, a monitor 18, an operation member 19, A release button 20, a CPU 21, a second memory 22 and a bus 23 are provided. Here, the image processing unit 15, the first memory 16, the recording I / F 17, the monitor 18, the CPU 21, and the second memory 22 are connected via a bus 23. The lens driving unit 12, the operation member 19, and the release button 20 are each connected to the CPU 21.

撮像光学系11は、ズームレンズやフォーカシングレンズを含む複数のレンズ群で構成されている。撮像光学系11のフォーカシングレンズのレンズ位置は、レンズ駆動部12によって光軸方向に調整される。なお、簡単のため、図1では撮像光学系11を1枚のレンズとして図示する。   The imaging optical system 11 includes a plurality of lens groups including a zoom lens and a focusing lens. The lens position of the focusing lens of the imaging optical system 11 is adjusted in the optical axis direction by the lens driving unit 12. For simplicity, the imaging optical system 11 is illustrated as a single lens in FIG.

撮像素子13は、撮像光学系11の像空間側に配置されており、その受光面には受光素子が2次元配列されている。そして、撮像素子13は、撮像光学系11を通過した光束による撮影画面の被写体像を光電変換してアナログの画像信号を生成する。なお、撮像素子13の出力はAFE14に接続されている。   The image pickup device 13 is disposed on the image space side of the image pickup optical system 11, and the light receiving devices are two-dimensionally arranged on the light receiving surface thereof. Then, the image sensor 13 photoelectrically converts the subject image on the shooting screen by the light beam that has passed through the imaging optical system 11 to generate an analog image signal. Note that the output of the image sensor 13 is connected to the AFE 14.

また、本実施形態の撮像素子13には、画像のデータを生成するための受光素子とは別に、瞳分割式の位相差AFを行うための測距画素が複数設けられている。この測距画素は、撮像素子13の撮像面の全面に一定間隔をあけて配置されている。そのため、本実施形態のCPU21は、撮像素子13の測距画素の出力によって、撮影画面上の任意の部分の被写体距離を求めることができる。なお、測距画素を有する撮像素子については、例えば、特開2000−156823号公報などの公知の構成のものを適用することができる。   In addition to the light receiving element for generating image data, the imaging element 13 of the present embodiment is provided with a plurality of distance measuring pixels for performing pupil division type phase difference AF. The distance measuring pixels are arranged at regular intervals on the entire imaging surface of the imaging element 13. Therefore, the CPU 21 of the present embodiment can obtain the subject distance of an arbitrary part on the shooting screen based on the output of the ranging pixels of the image sensor 13. In addition, about an image pick-up element which has a ranging pixel, the thing of well-known structures, such as Unexamined-Japanese-Patent No. 2000-156823, for example is applicable.

ここで、電子カメラの動作モードの一つである撮影モードにおいて、撮像素子13はレリーズ釦20の全押し操作に応答して記録画像(本画像)を撮像する。また、撮影モードでの撮像素子13は、撮影待機時にも所定間隔毎にスルー画像を撮像する。このスルー画像のデータは撮像素子13から間引き読み出しされて、モニタ18での画像表示やCPU21による各種の演算処理に使用される。   Here, in a shooting mode which is one of the operation modes of the electronic camera, the image sensor 13 captures a recorded image (main image) in response to a full press operation of the release button 20. Further, the imaging element 13 in the shooting mode captures a through image at predetermined intervals even during standby for shooting. The through image data is thinned and read out from the image sensor 13 and used for image display on the monitor 18 and various arithmetic processes by the CPU 21.

AFE14は、撮像素子13の出力に対してアナログ信号処理を施すアナログフロントエンド回路である。このAFE14は、相関二重サンプリングや、画像信号のゲインの調整や、画像信号のA/D変換を行う。なお、AFE14の出力は画像処理部15に接続されている。   The AFE 14 is an analog front end circuit that performs analog signal processing on the output of the image sensor 13. The AFE 14 performs correlated double sampling, image signal gain adjustment, and A / D conversion of the image signal. The output of the AFE 14 is connected to the image processing unit 15.

画像処理部15は、1フレーム分のデジタル画像信号に対して、各種の画像処理(色補間処理、階調変換処理、輪郭強調処理、ホワイトバランス調整など)を施す。また、画像処理部15は、画像の解像度変換処理や、本画像のデータの圧縮伸長処理も実行する。なお、画像処理部15は、撮影モードでの撮影待機時において、スルー画像からモニタ表示用のビュー画像を生成して出力する。   The image processing unit 15 performs various types of image processing (color interpolation processing, gradation conversion processing, contour enhancement processing, white balance adjustment, etc.) on the digital image signal for one frame. The image processing unit 15 also executes image resolution conversion processing and main image data compression / decompression processing. Note that the image processing unit 15 generates and outputs a monitor display view image from the through image during shooting standby in the shooting mode.

第1メモリ16は、画像処理部15による画像処理の前工程や後工程で画像のデータを一時的に記憶するバッファメモリである。この第1メモリは揮発性の記憶媒体であるSDRAMにより構成される。   The first memory 16 is a buffer memory that temporarily stores image data in the pre-process and post-process of image processing by the image processing unit 15. The first memory is constituted by an SDRAM which is a volatile storage medium.

記録I/F17には、不揮発性の記憶媒体である記憶媒体24を接続するためのコネクタが形成されている。そして、記録I/F17は、コネクタに接続された記憶媒体24に対してデータの書き込み/読み込みを実行する。上記の記憶媒体24は、ハードディスクや、半導体メモリを内蔵したメモリカードなどで構成される。なお、図1では記憶媒体24の一例としてメモリカードを図示する。   The recording I / F 17 is formed with a connector for connecting a storage medium 24 that is a nonvolatile storage medium. The recording I / F 17 writes / reads data to / from the storage medium 24 connected to the connector. The storage medium 24 is composed of a hard disk, a memory card incorporating a semiconductor memory, or the like. In FIG. 1, a memory card is illustrated as an example of the storage medium 24.

モニタ18は、CPU21の指示に応じて各種画像を表示する。なお、本実施形態でのモニタ18は、接眼部を有する電子ファインダや、カメラ筐体の背面などに設けられる液晶表示パネルのいずれで構成されていてもよい。このモニタ18には、撮影モードでの撮影待機時において、CPU21の制御により上記のビュー画像が動画表示される。このとき、CPU21は、撮影に必要となる各種情報をモニタ18のビュー画像上にオーバーレイ表示させることもできる。また、CPU21は、各種の設定項目の入力が可能なメニュー画面をモニタ18に表示させることもできる。   The monitor 18 displays various images according to instructions from the CPU 21. Note that the monitor 18 in the present embodiment may be configured with any of an electronic viewfinder having an eyepiece and a liquid crystal display panel provided on the back surface of the camera housing. On the monitor 18, the view image is displayed as a moving image under the control of the CPU 21 during shooting standby in the shooting mode. At this time, the CPU 21 can also display various information necessary for photographing on the view image of the monitor 18 in an overlay manner. The CPU 21 can also display a menu screen on which various setting items can be input on the monitor 18.

操作部材19は、例えば、コマンドダイヤル、十字状のカーソルキー、決定釦などで構成される。そして、操作部材19は電子カメラへの各種入力をユーザーから受け付ける。例えば、操作部材19は、上記のメニュー画面での入力操作や、電子カメラの動作モードの切替操作などに用いられる。   The operation member 19 includes, for example, a command dial, a cross-shaped cursor key, a determination button, and the like. The operation member 19 receives various inputs to the electronic camera from the user. For example, the operation member 19 is used for an input operation on the above menu screen, an operation for switching the operation mode of the electronic camera, and the like.

レリーズ釦20は、半押し操作による撮影前のオートフォーカス(AF)動作開始の指示入力と、全押し操作による撮像動作開始の指示入力とをユーザーから受け付ける。なお、本実施形態でのレリーズ釦20は、後述のテンプレート生成処理の開始指示をユーザーが行うときにも使用される。   The release button 20 receives from the user an instruction input for starting an autofocus (AF) operation before shooting by a half-press operation and an instruction input for starting an imaging operation by a full-press operation. Note that the release button 20 in the present embodiment is also used when the user gives an instruction to start template generation processing described later.

CPU21は、電子カメラの動作を統括的に制御するプロセッサである。一例として、CPU21は、撮影モードにおいてスルー画像のデータを用いてコントラスト検出方式によるAFを実行する。また、CPU21は、スルー画像のデータを用いて撮影画面内の被写体輝度を求め、この被写体輝度に基づいてAE演算を実行する。   The CPU 21 is a processor that comprehensively controls the operation of the electronic camera. As an example, the CPU 21 executes AF using a contrast detection method using through image data in the shooting mode. Further, the CPU 21 obtains the subject brightness in the shooting screen using the through image data, and executes the AE calculation based on the subject brightness.

また、CPU21は後述の第2メモリ22に格納されたプログラムの実行により、テンプレート生成部25および被写体追尾部26として機能する。   The CPU 21 functions as a template generation unit 25 and a subject tracking unit 26 by executing a program stored in a second memory 22 described later.

テンプレート生成部25は、入力された画像から追尾対象の物体を識別するためのテンプレートのデータを生成する。本実施形態の電子カメラでは、人間、動物、建築物、乗物などを含むあらゆる物体を追尾対象としてテンプレートのデータを生成することが可能である。   The template generation unit 25 generates template data for identifying the tracking target object from the input image. In the electronic camera of this embodiment, it is possible to generate template data for any object including a human, an animal, a building, a vehicle, and the like as a tracking target.

一例として、本実施形態のテンプレート生成部25は、撮影画面内に設定された候補領域の内側から追尾対象となる被写体の特徴を示す特徴領域を特定する。そして、テンプレート生成部25は、特定された特徴領域のスルー画像からテンプレートのデータを生成する。なお、上記のテンプレートのデータは、YCbCrの各チャンネルのデータをいずれも含んでいる。   As an example, the template generation unit 25 according to the present embodiment specifies a feature region indicating the characteristics of the subject to be tracked from the inside of the candidate region set in the shooting screen. Then, the template generation unit 25 generates template data from the through image of the specified feature region. Note that the template data includes all of the YCbCr channel data.

また、テンプレート生成部25は、候補領域の内側から被写体の特徴を示す部分を検出できるか否かを判定する判定処理を実行する。そして、テンプレート生成部25は、特徴を示す部分を検出できないと判定処理部が判定したときに、候補領域のサイズを拡大する処理を行う。   In addition, the template generation unit 25 performs a determination process for determining whether or not a portion indicating the characteristics of the subject can be detected from the inside of the candidate area. And the template production | generation part 25 performs the process which expands the size of a candidate area | region, when a determination process part determines that the part which shows the characteristic cannot be detected.

被写体追尾部26は、上記のテンプレートを用いて撮影画面内における追尾対象の被写体の位置を継続的に検出する。これにより、CPU21は、テンプレートに対応する被写体の動きに追従してAF制御およびスポット測光のAE演算を行うことができる。また、CPU21は、テンプレートに対応する被写体の位置を示すマークをモニタ18のビュー画像上に重畳表示させることもできる。   The subject tracking unit 26 continuously detects the position of the subject to be tracked in the shooting screen using the template. Thereby, the CPU 21 can perform AF control and AE calculation of spot metering following the movement of the subject corresponding to the template. The CPU 21 can also superimpose and display a mark indicating the position of the subject corresponding to the template on the view image of the monitor 18.

また、被写体追尾部26は、被写体追尾の結果と、被写体追尾で適用したテンプレートの生成条件との対応関係を示す追尾履歴データを生成する。なお、追尾履歴データは、テンプレートを生成するときにテンプレート生成部25によって参照される。   In addition, the subject tracking unit 26 generates tracking history data indicating a correspondence relationship between a result of subject tracking and a template generation condition applied in subject tracking. The tracking history data is referred to by the template generation unit 25 when generating a template.

第2メモリ22は、フラッシュメモリ等の不揮発性の記憶媒体である。この第2メモリ22には、上記のテンプレートのデータや、被写体追尾部26が生成した追尾履歴データがそれぞれ記憶される。さらに、第2メモリ22には、後述の候補領域の拡大回数を示すカウンタが記憶されている。また、第2メモリ22には、CPU21により実行されるプログラムが記憶されている。プログラムの例は図3、図5に示されるが、これらについては後で詳述する。   The second memory 22 is a non-volatile storage medium such as a flash memory. The second memory 22 stores the template data and the tracking history data generated by the subject tracking unit 26. Further, the second memory 22 stores a counter indicating the number of times of expansion of a candidate area, which will be described later. The second memory 22 stores a program executed by the CPU 21. Examples of programs are shown in FIGS. 3 and 5, which will be described in detail later.

ここで、追尾履歴データの内容を詳細に説明する。本実施形態での追尾履歴データは、第1追尾履歴テーブルと、第2追尾履歴テーブルとを有している。そして、被写体追尾処理の成否に応じて、被写体追尾の結果とテンプレートの生成条件との組み合わせからなる追尾履歴がそれぞれ別々のテーブルに登録される。なお、上記のテンプレートの生成条件には、(1)テンプレートのサイズ、(2)テンプレートの生成に用いるテンプレート生成チャンネルの種類(YCbCrのいずれか)、(3)テンプレートを生成したときのAE情報、(4)テンプレートを生成したときの被写体距離情報(AF情報)、が含まれる。   Here, the contents of the tracking history data will be described in detail. The tracking history data in the present embodiment has a first tracking history table and a second tracking history table. Then, depending on the success or failure of the subject tracking process, tracking histories composed of combinations of the subject tracking results and the template generation conditions are registered in separate tables. The template generation conditions include (1) the size of the template, (2) the type of template generation channel used to generate the template (any of YCbCr), (3) AE information when the template is generated, (4) Object distance information (AF information) when the template is generated is included.

図2(a)は被写体の追尾が成功した場合を示す第1追尾履歴テーブルを模式的に示す図である。第1追尾履歴テーブルには、(イ)「被写体追尾後に本画像を撮像した場合の追尾履歴」、(ロ)「ユーザーのキャンセル操作または被写体のロストで被写体追尾が終了したものであって、被写体追尾の継続時間が長い場合の追尾履歴」がCPU21によって記録される。これらの場合には、ユーザーの意図する被写体を追尾できていたとみなすことができるからである。   FIG. 2A is a diagram schematically showing a first tracking history table showing a case where tracking of a subject is successful. In the first tracking history table, (a) “tracking history when the main image is captured after subject tracking”, (b) “subject tracking is completed by user's cancel operation or subject loss, The tracking history when the tracking duration time is long is recorded by the CPU 21. In these cases, it can be considered that the subject intended by the user has been tracked.

また、第1追尾履歴テーブルに登録される追尾履歴は優先順位に応じてCPU21がソートする。一例として、第1追尾履歴テーブルでは、上記(イ)の追尾履歴の方が上記(ロ)の追尾履歴よりも優先順位が高く設定される。また、上記(イ)の追尾履歴は本画像の撮影時が新しいほど優先順位が高くなる。一方、上記(ロ)の追尾履歴は、被写体追尾の継続時間が長いほど優先順位が高くなる。そして、第1追尾履歴テーブルには、上記(イ)、(ロ)の要件を満たす追尾履歴のうち、優先順位の高い順に所定数の追尾履歴のみが保存される。なお、図2(a)では、上側から優先順位の高い順(H1〜H5)に5件分の追尾履歴が保存された第1追尾履歴テーブルの例を示している。   The tracking history registered in the first tracking history table is sorted by the CPU 21 according to the priority order. As an example, in the first tracking history table, the tracking history of (A) is set higher in priority than the tracking history of (B). In addition, the tracking history of (a) has a higher priority as the photographing time of the main image is newer. On the other hand, the tracking history of (b) has a higher priority as the duration of subject tracking is longer. In the first tracking history table, only a predetermined number of tracking histories are stored in descending order of priority among the tracking histories satisfying the requirements (a) and (b). FIG. 2A shows an example of a first tracking history table in which five tracking histories are stored in descending order of priority (H1 to H5) from the top.

図2(b)は被写体の追尾が失敗した場合を示す第2追尾履歴テーブルを模式的に示す図である。第2追尾履歴テーブルには、(ハ)「ユーザーのキャンセル操作または被写体のロストで被写体追尾が終了したものであって、被写体追尾の継続時間が短い場合の追尾履歴」がCPU21によって記録される。この場合には、ユーザーの意図する被写体の追尾が行われていないとみなすことができるからである。   FIG. 2B is a diagram schematically showing a second tracking history table showing a case where subject tracking has failed. In the second tracking history table, the CPU 21 records (c) “tracking history when subject tracking is completed by user cancel operation or subject lost and subject tracking duration is short”. In this case, it can be considered that the tracking of the subject intended by the user is not performed.

また、第2追尾履歴テーブルに登録される追尾履歴も優先順位に応じてCPU21がソートする。一例として、第2追尾履歴テーブルでは、被写体追尾の継続時間が短いほど優先順位が低く設定される。そして、第2追尾履歴テーブルには、上記(ハ)の要件を満たす追尾履歴のうち、優先順位の低い順に所定数の追尾履歴のみが保存される。なお、図2(b)では、上側から優先順位の低い順(L1〜L5)に5件分の追尾履歴が保存された第2追尾履歴テーブルの例を示している。   The tracking history registered in the second tracking history table is also sorted by the CPU 21 according to the priority order. As an example, in the second tracking history table, the priority is set lower as the subject tracking duration is shorter. In the second tracking history table, only a predetermined number of tracking histories are stored in order of increasing priority among the tracking histories satisfying the requirement (c). FIG. 2B shows an example of a second tracking history table in which five tracking histories are stored in descending order of priority (L1 to L5) from the upper side.

<電子カメラの動作説明>
次に、図3の流れ図を参照しつつ、本実施形態における電子カメラの撮影モードでの動作例を説明する。なお、以下の動作例では、被写体追尾機能がオンに設定されている状態を前提として説明を行う。
<Description of electronic camera operation>
Next, an operation example in the shooting mode of the electronic camera in the present embodiment will be described with reference to the flowchart of FIG. In the following operation example, description will be made on the assumption that the subject tracking function is set to ON.

ステップS101:CPU21は、撮像素子13を駆動させてスルー画像の撮像を開始する。その後、スルー画像は所定間隔ごとに逐次生成されることとなる。また、CPU21は、スルー画像から生成されたビュー画像をモニタ18に動画表示させる。したがって、ユーザーは、モニタ18のビュー画像を参照して、撮影構図を決定するためのフレーミングを行うことができる。   Step S101: The CPU 21 drives the imaging device 13 to start capturing a through image. Thereafter, the through images are sequentially generated at predetermined intervals. Further, the CPU 21 displays the view image generated from the through image on the monitor 18 as a moving image. Therefore, the user can perform framing for determining the shooting composition with reference to the view image on the monitor 18.

また、被写体追尾機能がオンの状態のときには、CPU21は、追尾対象の被写体の登録位置を示すガイドマーク(矩形の緑色の枠表示)をビュー画像に重畳させる(図4参照)。上記の枠表示は、CPU21の制御によってモニタ18の中央部に点滅状態で表示される。なお、ユーザーは、上記の枠表示の中に追尾対象の被写体を収めた状態でレリーズ釦20を半押し操作することで、電子カメラに追尾対象の被写体のテンプレートを生成させて、所望の被写体を追尾することができる。   When the subject tracking function is on, the CPU 21 superimposes a guide mark (rectangular green frame display) indicating the registered position of the subject to be tracked on the view image (see FIG. 4). The frame display is displayed in a blinking state at the center of the monitor 18 under the control of the CPU 21. It should be noted that the user operates the release button 20 half-pressed in a state where the subject to be tracked is contained in the frame display described above, thereby causing the electronic camera to generate a template for the subject to be tracked and a desired subject to be selected. Can be tracked.

ステップS102:CPU21は、レリーズ釦20が半押しされたか否かを判定する。レリーズ釦20が半押しされた場合(YES側)にはS103に移行する。一方、レリーズ釦20が半押しされていない場合(NO側)には、CPU21はレリーズ釦20の半押しを待機する。   Step S102: The CPU 21 determines whether or not the release button 20 is half-pressed. If the release button 20 is pressed halfway (YES side), the process proceeds to S103. On the other hand, when the release button 20 is not half-pressed (NO side), the CPU 21 waits for half-pressing of the release button 20.

ステップS103:CPU21は、半押し操作に応じて後述のテンプレート生成処理を実行する。これにより、追尾対象のテンプレートのデータがスルー画像から生成される。   Step S103: The CPU 21 executes a template generation process to be described later in response to the half-press operation. As a result, the tracking target template data is generated from the through image.

なお、追尾対象のテンプレートが生成された場合には、CPU21は、被写体追尾の実行状態を示す表示(被写体追尾マーク)をモニタ18に出力する。具体的には、CPU21は、ガイドマークの枠表示(S101)を点滅状態から点灯状態に変更する。これにより、ユーザーはテンプレートの生成完了と、被写体追尾が開始されたこととをモニタ18で確認できる(なお、被写体追尾マークの表示画面は図4とほぼ同様であるため図示を省略する)。   When the tracking target template is generated, the CPU 21 outputs a display (subject tracking mark) indicating the subject tracking execution state to the monitor 18. Specifically, the CPU 21 changes the guide mark frame display (S101) from the blinking state to the lighting state. As a result, the user can confirm the completion of template generation and the start of subject tracking on the monitor 18 (note that the subject tracking mark display screen is substantially the same as in FIG. 4 and is not shown).

ステップS104:CPU21は、レリーズ釦20の半押しが解除されたか否かを判定する。レリーズ釦20の半押しが解除されたとき(YES側)はS105に移行する。一方、レリーズ釦20の半押しが継続しているとき(NO側)にはS107に移行する。   Step S104: The CPU 21 determines whether or not the half-press of the release button 20 has been released. When the half-press of the release button 20 is released (YES side), the process proceeds to S105. On the other hand, when the half-press of the release button 20 is continued (NO side), the process proceeds to S107.

ステップS105:この場合には、ユーザーの操作によって、CPU21は被写体追尾の処理をキャンセルする。そして、CPU21は、被写体追尾マークの枠表示を点灯状態から点滅状態(ガイドマークの状態)に切り替える。   Step S105: In this case, the CPU 21 cancels the subject tracking process by a user operation. Then, the CPU 21 switches the frame display of the subject tracking mark from the lighting state to the blinking state (guide mark state).

ステップS106:CPU21の被写体追尾部26は、第2メモリ22の追尾履歴データの更新処理を行う。これにより、今回の被写体追尾処理の結果が第1追尾履歴テーブルまたは第2追尾履歴テーブルに反映されうる。その後、CPU21はS102に戻って上記動作を繰り返す。   Step S106: The subject tracking unit 26 of the CPU 21 performs a process of updating the tracking history data in the second memory 22. As a result, the result of the current subject tracking process can be reflected in the first tracking history table or the second tracking history table. Thereafter, the CPU 21 returns to S102 and repeats the above operation.

ステップS107:CPU21は、スルー画像のうちで被写体追尾の判定を行う判定フレームが撮像されたか否かを判定する。判定フレームが撮像された場合(YES側)にはS108に移行する。一方、判定フレームが撮像されていない場合には、CPU21は判定フレームの撮像を待機する。なお、スルー画像から被写体追尾処理を行う間隔(判定フレームのフレームレート)は、ユーザーの設定操作に応じてCPU21が調整できるようにしてもよい。   Step S107: The CPU 21 determines whether or not a determination frame for determining subject tracking is captured in the through image. When the determination frame is captured (YES side), the process proceeds to S108. On the other hand, when the determination frame is not captured, the CPU 21 waits for the determination frame to be captured. Note that the CPU 21 may be configured to adjust the interval for performing the subject tracking process from the through image (the frame rate of the determination frame) according to the user's setting operation.

ステップS108:CPU21は、スルー画像の判定フレームから追尾対象の被写体を探索する。具体的には、CPU21の被写体追尾部26は、テンプレートと判定フレームの被写体との類似度を求めるマッチング処理を実行する。そして、被写体追尾部26は、判定フレームのうちで類似度が閾値以上でかつ類似度の値が最も高い部分を、追尾対象の被写体の位置と判定する。一方、被写体追尾部26は、テンプレートと判定フレーム内の被写体との類似度がいずれも閾値未満の場合には、追尾対象の被写体をロストしたものと判定する。   Step S108: The CPU 21 searches for the subject to be tracked from the determination frame of the through image. Specifically, the subject tracking unit 26 of the CPU 21 executes a matching process for obtaining the similarity between the template and the subject of the determination frame. Then, the subject tracking unit 26 determines the portion of the determination frame where the similarity is equal to or higher than the threshold and the highest similarity value is the position of the subject to be tracked. On the other hand, the subject tracking unit 26 determines that the subject to be tracked is lost when both the similarity between the template and the subject in the determination frame is less than the threshold.

ステップS109:CPU21は、S107において撮影画面内から追尾対象を検出できたか否かを判定する。追尾対象を検出できた場合(YES側)にはS111に移行する。一方、追尾対象を検出できずにロストした場合(NO側)にはS110に移行する。   Step S109: The CPU 21 determines whether or not the tracking target has been detected from the shooting screen in S107. When the tracking target is detected (YES side), the process proceeds to S111. On the other hand, when the tracking target cannot be detected and lost (NO side), the process proceeds to S110.

ステップS110:CPU21の被写体追尾部26は、被写体追尾マークの表示を停止するとともに、ロスト表示(被写体追尾ができずにロスト状態にあることを示す表示)をビュー画像に重畳させて出力する。例えば、被写体追尾部26は、ビュー画像に重畳された上記の枠表示を点灯状態から再び点滅状態に変更にしてロスト表示を行う。これにより、ユーザーは追尾対象の被写体をロストしたことをモニタ18で確認できる。その後、CPU21はS106の処理に移行する。   Step S110: The subject tracking unit 26 of the CPU 21 stops the display of the subject tracking mark and superimposes and outputs a lost display (display indicating that the subject cannot be tracked and is in a lost state) on the view image. For example, the subject tracking unit 26 performs the lost display by changing the frame display superimposed on the view image from the lighting state to the blinking state again. Thereby, the user can confirm on the monitor 18 that the subject to be tracked has been lost. Thereafter, the CPU 21 proceeds to the process of S106.

ステップS111:CPU21の被写体追尾部26は、追尾対象の被写体の位置(S108)に基づいて、ビュー画像に重畳する被写体追尾マークの位置を更新する。その結果、モニタ18上での枠表示の位置は、追尾対象の被写体の動きに合わせてシフトすることとなる。これにより、ユーザーは被写体追尾の状態をモニタ18で確認できる。   Step S111: The subject tracking unit 26 of the CPU 21 updates the position of the subject tracking mark to be superimposed on the view image based on the position of the subject to be tracked (S108). As a result, the position of the frame display on the monitor 18 is shifted in accordance with the movement of the subject to be tracked. As a result, the user can check the subject tracking state on the monitor 18.

ステップS112:CPU21の被写体追尾部26は、追尾対象の被写体の位置(S108)を焦点検出エリアとしてAFを実行するとともに、公知のAE演算を実行する。なお、CPU21は、追尾対象の被写体の位置(S108)を基準としてスポット測光によるAE演算を実行してもよい。   Step S112: The subject tracking unit 26 of the CPU 21 executes AF using the position of the subject to be tracked (S108) as a focus detection area, and executes a known AE calculation. Note that the CPU 21 may execute AE calculation by spot metering based on the position of the subject to be tracked (S108).

ステップS113:CPU21は、レリーズ釦20が全押しされたか否かを判定する。レリーズ釦20が全押しされた場合(YES側)にはS114に移行する。一方、レリーズ釦20が全押しされていない場合(NO側)には、CPU21はS104に戻って上記動作を繰り返す。これにより、被写体追尾部26は、撮影画面内における追尾対象の被写体の位置変化を継続的に検出することができる。   Step S113: The CPU 21 determines whether or not the release button 20 has been fully pressed. When the release button 20 is fully pressed (YES side), the process proceeds to S114. On the other hand, when the release button 20 is not fully pressed (NO side), the CPU 21 returns to S104 and repeats the above operation. Thereby, the subject tracking unit 26 can continuously detect a change in the position of the subject to be tracked in the shooting screen.

ステップS114:CPU21は、撮像素子13を駆動させて本画像の撮像処理を実行する。本画像のデータは、AFE14および画像処理部15で所定の処理が施された後に、記録I/F17を介して記憶媒体24に記録される。   Step S114: The CPU 21 drives the image pickup device 13 to execute a main image pickup process. The data of the main image is recorded in the storage medium 24 via the recording I / F 17 after predetermined processing is performed by the AFE 14 and the image processing unit 15.

ステップS115:CPU21の被写体追尾部26は、第2メモリ22の追尾履歴データの更新処理を行う。これにより、今回の被写体追尾処理の結果が第1追尾履歴テーブルに反映されうる。以上で、図3の流れ図の説明を終了する。   Step S115: The subject tracking unit 26 of the CPU 21 performs a process of updating the tracking history data in the second memory 22. As a result, the result of the current subject tracking process can be reflected in the first tracking history table. Above, description of the flowchart of FIG. 3 is complete | finished.

次に、図5の流れ図を参照しつつ、図3のテンプレート生成処理(S103)のサブルーチンを説明する。   Next, the subroutine of the template generation process (S103) of FIG. 3 will be described with reference to the flowchart of FIG.

ステップS201:CPU21のテンプレート生成部25は、候補領域のサイズを初期化する。ここで、候補領域は、テンプレート生成部25が追尾対象の被写体の特徴を探索する範囲を示すものである。そして、テンプレートのデータは、候補領域の一部または全部の画像から生成されうる。   Step S201: The template generation unit 25 of the CPU 21 initializes the size of the candidate area. Here, a candidate area | region shows the range which the template production | generation part 25 searches the characteristic of the to-be-tracked subject. The template data can be generated from some or all of the images of the candidate area.

図6に、スルー画像と候補領域との位置関係の一例を示す。S201での候補領域は、ガイドマークの枠の位置を中心として、ガイドマークの枠のサイズよりも大きな矩形領域に設定されている。なお、モニタ18のビュー画像上では、候補領域の範囲を示す表示は省略される。   FIG. 6 shows an example of the positional relationship between the through image and the candidate area. The candidate area in S201 is set to a rectangular area that is larger than the guide mark frame size, centered on the position of the guide mark frame. In addition, on the view image of the monitor 18, the display which shows the range of a candidate area | region is abbreviate | omitted.

ステップS202:テンプレート生成部25は、YCbCrの各チャンネルごとに、候補領域(S201)におけるスルー画像のデータをそれぞれ取得する。これにより、テンプレート生成部25によって、候補領域内のスルー画像のYCbCrの各チャンネルのデータが生成される。   Step S202: The template generation unit 25 acquires through image data in the candidate area (S201) for each channel of YCbCr. Thereby, the template generation unit 25 generates data of each channel of YCbCr of the through image in the candidate area.

ステップS203:テンプレート生成部25は、候補領域におけるスルー画像のYチャンネルの階調の平均値を求める。そして、テンプレート生成部25は、Yチャンネルの階調の平均値が閾値を超えているか否かを判定する。上記要件を満たす場合(YES側)にはS204に移行する。一方、上記要件を満たさない場合(NO側)には、現在の候補領域内の画像は輝度が低く、追尾対象の被写体の特徴を検出できない可能性が高いと考えられる。そのため、CPU21はS206に処理を移行する。   Step S203: The template generation unit 25 obtains the average value of the Y channel gradation of the through image in the candidate area. Then, the template generation unit 25 determines whether or not the average value of the Y channel gradation exceeds the threshold value. If the above requirement is satisfied (YES side), the process proceeds to S204. On the other hand, if the above requirement is not satisfied (NO side), the image in the current candidate region has a low luminance, and it is likely that the feature of the subject to be tracked cannot be detected. Therefore, the CPU 21 shifts the process to S206.

ステップS204:テンプレート生成部25は、YCbCrの各チャンネルごとに、候補領域におけるスルー画像の階調の分散値をそれぞれ演算する。   Step S204: The template generation unit 25 calculates the dispersion value of the gradation of the through image in the candidate area for each channel of YCbCr.

ステップS205:テンプレート生成部25は、候補領域における各チャンネルの分散値(S204でそれぞれ求めたもの)がいずれも閾値を超えているか否かを判定する。上記要件を満たす場合(YES側)にはS208に移行する。一方、上記要件を満たさない場合(NO側)には、現在の候補領域内の画像は絵柄がほぼ一様であって、追尾対象の被写体の特徴を検出できない可能性が高いと考えられる。そのため、CPU21はS206に処理を移行する。   Step S205: The template generation unit 25 determines whether or not the variance values of the respective channels in the candidate area (each obtained in S204) exceed the threshold value. If the above requirement is satisfied (YES side), the process proceeds to S208. On the other hand, when the above requirement is not satisfied (NO side), the image in the current candidate region has a substantially uniform pattern, and it is highly likely that the feature of the subject to be tracked cannot be detected. Therefore, the CPU 21 shifts the process to S206.

ステップS206:テンプレート生成部25は、第2メモリ22を参照して、候補領域の範囲を拡大した回数が閾値以下(例えば2回以下)であるか否かを判定する。拡大回数が閾値以下の場合(YES側)にはS207に移行する。一方、拡大回数が閾値を超える場合(NO側)には、CPU21は候補領域を拡大する処理を打ち切ってS208に処理を移行する。   Step S206: The template generation unit 25 refers to the second memory 22 and determines whether or not the number of times the range of the candidate area has been expanded is equal to or less than a threshold (for example, twice or less). If the number of times of expansion is less than or equal to the threshold (YES side), the process proceeds to S207. On the other hand, if the number of enlargements exceeds the threshold (NO side), the CPU 21 terminates the process of enlarging the candidate area and proceeds to S208.

ステップS207:テンプレート生成部25は、現在設定されている候補領域の範囲を拡大する。そして、テンプレート生成部25は、第2メモリ22で記憶している候補領域の範囲の拡大回数をインクリメントする。その後、CPU21はS202に戻って上記動作を繰り返す。したがって、追尾対象の被写体の特徴を候補領域内で検出できない可能性が高い場合には、上記のループによって前回よりも広い候補領域に基づいてテンプレートが生成されることとなる。   Step S207: The template generation unit 25 expands the range of the currently set candidate area. Then, the template generation unit 25 increments the number of expansions of the candidate area range stored in the second memory 22. Thereafter, the CPU 21 returns to S202 and repeats the above operation. Therefore, when there is a high possibility that the characteristics of the subject to be tracked cannot be detected in the candidate area, the template is generated based on the candidate area wider than the previous one by the above loop.

ステップS208:テンプレート生成部25は、YCbCrの各チャンネルごとに、候補領域内のスルー画像の階調を中央値でそれぞれ二値化する。これにより、テンプレート生成部25によって、YCbCrの各チャンネルごとに候補領域の二値化画像がそれぞれ生成される。   Step S208: The template generation unit 25 binarizes the gradation of the through image in the candidate area with a median value for each channel of YCbCr. Thereby, the template generation unit 25 generates a binarized image of the candidate area for each channel of YCbCr.

ステップS209:テンプレート生成部25は、YCbCrの各チャンネルの二値化画像をそれぞれ対象として、画像中心への高域成分の集中度合いを求める。   Step S209: The template generation unit 25 obtains the degree of concentration of the high frequency component at the center of the image for each binary image of each channel of YCbCr.

以下、S209における演算処理の内容を詳述する。ここで、YCbCrの各二値化画像についての演算処理の内容はいずれも共通する。したがって、簡単のため、以下の例ではYチャンネルの二値化画像の例のみを説明し、CbCrチャンネルの二値化画像の例については説明を省略する。   Hereinafter, the contents of the arithmetic processing in S209 will be described in detail. Here, the contents of the arithmetic processing for each binary image of YCbCr are common. Therefore, for the sake of simplicity, in the following example, only an example of a binarized image of the Y channel will be described, and description of an example of the binarized image of the CbCr channel will be omitted.

(1)まず、テンプレート生成部25は、Yチャンネルの二値化画像の各画素について、二値化画像での画素値と画像中心からの距離とを乗算して画素ごとのスコアをそれぞれ求める。ここで、二値化される前の画像でYの階調値が中央値以上の場合、二値化画像での画素値は「1」となる。また、二値化される前の画像でYの階調値が中央値未満の場合、二値化画像での画素値は「0」となる。また、画像中心からの距離の値は、候補領域の中心画素を「1」として、中心画素から1画素離れるにつれて値が1ずつ大きくなるものとする。   (1) First, the template generation unit 25 obtains a score for each pixel by multiplying each pixel of the binary image of the Y channel by the pixel value in the binarized image and the distance from the image center. Here, when the Y gradation value is equal to or higher than the median value in the image before binarization, the pixel value in the binarized image is “1”. Further, when the gradation value of Y is less than the median value in the image before binarization, the pixel value in the binarized image is “0”. Further, the value of the distance from the center of the image is assumed to be “1” as the center pixel of the candidate area, and the value increases by 1 as the distance from the center pixel increases by one pixel.

そのため、二値化画像で画素値「0」の部分は、画素のスコアがいずれも0値となる。また、二値化画像で画素値「1」の部分は、候補領域の中心画素から離れるにつれて画素のスコアの値が大きくなる。例えば、中心画素の画素値が「1」の場合には画素のスコアが「1」となる。一方、中心画素から5画素離れた画素の画素値が「1」の場合には画素のスコアが「5」となる。   Therefore, the pixel score “0” in the binarized image has a pixel score of 0. Further, the pixel score “1” in the binarized image has a higher pixel score as the distance from the center pixel of the candidate area increases. For example, when the pixel value of the central pixel is “1”, the pixel score is “1”. On the other hand, when the pixel value of the pixel 5 pixels away from the center pixel is “1”, the score of the pixel is “5”.

(2)次に、テンプレート生成部25は、上記(1)で求めた画素のスコアを積算して合計値(SY)を求める。ここで、Yチャンネルの二値化画像において画素値が「1」の画素が候補領域の周縁に多く分布すれば、上記の合計値SYは大きな値となる。一方、Yチャンネルの二値化画像において画素値が「1」の画素が候補領域の中心にかたまって分布すれば、画素値「1」の画素数が上記のケースと同じであっても合計値SYは小さな値となる。したがって、テンプレート生成部25は、上記の合計値SYの小ささによって、Yチャンネルの二値化画像について画像中心への高域成分の集中度合いを評価できる。 (2) Next, the template generation unit 25 obtains a total value (S Y ) by accumulating the pixel scores obtained in (1) above. Here, if many pixels having a pixel value “1” are distributed around the periphery of the candidate area in the binary image of the Y channel, the total value S Y is a large value. On the other hand, if the pixels with the pixel value “1” are distributed in the center of the candidate area in the binary image of the Y channel, the total value is obtained even if the number of pixels with the pixel value “1” is the same as in the above case. S Y is a small value. Therefore, the template generation unit 25 can evaluate the degree of concentration of the high frequency component at the image center of the binary image of the Y channel based on the small value of the total value S Y.

ステップS210:テンプレート生成部25は、S209で求めたYCbCrチャンネルの合計値(SY,SCr,SCb)に基づいて、テンプレート生成チャンネル(YCbCrのいずれか)を決定する。具体的には、テンプレート生成部25は、合計値SY,SCr,SCbのうちから最小値を求める。そして、テンプレート生成部25は、合計値が最小値となった二値化画像に対応するチャンネルをテンプレート生成チャンネルに決定する。 Step S210: The template generation unit 25 determines a template generation channel (any one of YCbCr) based on the total value (S Y , S Cr , S Cb ) of the YCbCr channels obtained in S209. Specifically, the template generation unit 25 obtains the minimum value from the total values S Y , S Cr , and S Cb . Then, the template generation unit 25 determines a channel corresponding to the binarized image whose total value is the minimum value as a template generation channel.

ここで、合計値SY,SCr,SCbのうち最小値となるものが2つ以上ある場合、テンプレート生成部25は、第2メモリ22の追尾履歴データを参照する。そして、テンプレート生成部25は、テンプレート生成チャンネルを以下の(1)および(2)の少なくとも一方の要領で決定する。 Here, when there are two or more minimum values among the total values S Y , S Cr , and S Cb , the template generation unit 25 refers to the tracking history data in the second memory 22. Then, the template generation unit 25 determines a template generation channel according to at least one of the following (1) and (2).

(1)テンプレート生成部25は、第1追尾履歴テーブルを参照して、被写体の追尾が成功したときのテンプレート生成チャンネルを優先する。具体的には、テンプレート生成部25は、第1追尾履歴テーブルの追尾履歴のうち、AE情報および被写体距離情報の組み合わせを優先順位の高い順(H1〜H5の順)に参照していく。そして、テンプレート生成部25は、スルー画像から求めたAE演算結果および被写体距離に基づいて、第1追尾履歴テーブルの追尾履歴が現在の撮影条件に対応するか否かを順次判定する。現在の撮影条件に対応する追尾履歴があった場合、テンプレート生成部25は、その追尾履歴が示すチャンネル種別をテンプレート生成チャンネルとする。これにより、過去の被写体追尾の結果に基づいて、より被写体追尾の処理に適したテンプレート生成チャンネルが選択されることとなる。   (1) The template generation unit 25 refers to the first tracking history table and prioritizes the template generation channel when the tracking of the subject is successful. Specifically, the template generation unit 25 refers to the combination of AE information and subject distance information in the tracking history of the first tracking history table in descending order of priority (in order of H1 to H5). Then, the template generation unit 25 sequentially determines whether or not the tracking history in the first tracking history table corresponds to the current shooting condition based on the AE calculation result and the subject distance obtained from the through image. When there is a tracking history corresponding to the current shooting condition, the template generation unit 25 sets the channel type indicated by the tracking history as a template generation channel. As a result, a template generation channel more suitable for subject tracking processing is selected based on the past subject tracking results.

(2)テンプレート生成部25は、第2追尾履歴テーブルを参照して、被写体の追尾が失敗したときのテンプレート生成チャンネルを除外する。具体的には、テンプレート生成部25は、第2追尾履歴テーブルの追尾履歴のうち、AE情報および被写体距離情報の組み合わせを優先順位の低い順(L1〜L5の順)に参照していく。そして、テンプレート生成部25は、スルー画像から求めたAE演算結果および被写体距離に基づいて、第2追尾履歴テーブルの追尾履歴が現在の撮影条件に対応するか否かを順次判定する。現在の撮影条件に対応する追尾履歴があった場合、テンプレート生成部25は、その追尾履歴が示すチャンネル種別を除外してテンプレート生成チャンネルを決定する。これにより、過去の被写体追尾の結果に基づいて、より被写体追尾の処理に適したテンプレート生成チャンネルが選択されることとなる。   (2) The template generation unit 25 refers to the second tracking history table and excludes a template generation channel when tracking of the subject has failed. Specifically, the template generation unit 25 refers to the combination of the AE information and the subject distance information in the tracking history of the second tracking history table in ascending order of priority (in the order of L1 to L5). Then, the template generation unit 25 sequentially determines whether or not the tracking history in the second tracking history table corresponds to the current shooting condition based on the AE calculation result and the subject distance obtained from the through image. When there is a tracking history corresponding to the current shooting condition, the template generation unit 25 determines a template generation channel by excluding the channel type indicated by the tracking history. As a result, a template generation channel more suitable for subject tracking processing is selected based on the past subject tracking results.

ステップS211:テンプレート生成部25は、テンプレート生成チャンネル(S210)の二値化画像を対象として、公知の重心演算のアルゴリズムによって高域成分のかたまり(画素値「1」の部分)の重心位置を求める。なお、テンプレート生成チャンネルの二値化画像に複数の高域成分のかたまりがある場合には、テンプレート生成部25は一番大きなかたまりの重心位置を求めるものとする。   Step S211: The template generation unit 25 obtains the barycentric position of the high-frequency component cluster (pixel value “1” portion) by using a known barycentric calculation algorithm for the binarized image of the template generation channel (S210). . When the binarized image of the template generation channel includes a plurality of high-frequency component clusters, the template generation unit 25 determines the center of gravity position of the largest cluster.

ステップS212:テンプレート生成部25は、S211で求めた重心位置を基準として、追尾対象となる被写体の特徴を示す特徴領域の仮サイズを決定する。   Step S212: The template generation unit 25 determines the provisional size of the feature region indicating the characteristics of the subject to be tracked with reference to the position of the center of gravity obtained in S211.

一例として、テンプレート生成部25は、テンプレート生成チャンネルの二値化画像において、重心位置を起点にして縦方向または横方向に向けて1ライン毎の画素値をそれぞれ確認してゆく。このとき、テンプレート生成部25は、画素値が「1」となる画素数が閾値以下となったラインを特徴領域の端部とする。そして、テンプレート生成部25は、上記工程を上下左右の4方向にそれぞれ行うことで、高域部分のかたまりの大きさに応じて特徴領域の仮サイズを決定する。この場合、特徴領域の仮サイズは、上記のラインで四方を囲まれた範囲となる(図7参照)。   As an example, in the binarized image of the template generation channel, the template generation unit 25 confirms the pixel value for each line in the vertical direction or the horizontal direction starting from the position of the center of gravity. At this time, the template generation unit 25 sets the line where the number of pixels with the pixel value “1” is equal to or less than the threshold as the end of the feature region. And the template production | generation part 25 determines the temporary size of a characteristic area | region according to the magnitude | size of the cluster of a high region part by performing the said process in four directions of up and down, right and left, respectively. In this case, the provisional size of the feature area is a range surrounded by the above-described line (see FIG. 7).

ステップS213:テンプレート生成部25は、特徴領域の仮サイズ(S212で決定したもの)が所定のデフォルトサイズよりも小さいか否かを判定する。上記要件を満たす場合(YES側)にはS214に移行する。一方、上記要件を満たさない場合(NO側)にはS215に移行する。   Step S213: The template generation unit 25 determines whether or not the temporary size of the feature area (determined in S212) is smaller than a predetermined default size. If the above requirement is satisfied (YES side), the process proceeds to S214. On the other hand, if the above requirement is not satisfied (NO side), the process proceeds to S215.

ステップS214:テンプレート生成部25は、特徴領域の仮サイズを予め設定されたデフォルトサイズに置き換えて拡大する。なお、S210で第1追尾履歴テーブルの追尾履歴を参照してテンプレート生成チャンネルを決定した場合には、テンプレート生成部25は、追尾履歴の示すテンプレートサイズをデフォルトサイズとして、S212で決定した特徴領域の仮サイズと置き換えてもよい。   Step S214: The template generation unit 25 replaces the temporary size of the feature area with a preset default size and enlarges it. When the template generation channel is determined with reference to the tracking history in the first tracking history table in S210, the template generation unit 25 sets the template size indicated by the tracking history as the default size and the feature area determined in S212. It may be replaced with a temporary size.

ステップS215:テンプレート生成部25は、撮影画面の被写体距離に基づいて特徴領域の範囲を修正する。   Step S215: The template generation unit 25 corrects the range of the feature region based on the subject distance on the shooting screen.

具体的には、テンプレート生成部25は、撮像素子13の測距画素の出力に基づいて候補領域内での被写体距離の分布を示す距離画像を生成する。次に、テンプレート生成部25は、上記の特徴領域と距離画像とを重ね合わせて、特徴領域内で被写体距離に閾値以上の差が生じる部分があるか否かを判定する。   Specifically, the template generation unit 25 generates a distance image indicating the distribution of the subject distance in the candidate area based on the output of the ranging pixels of the image sensor 13. Next, the template generation unit 25 superimposes the above-described feature area and the distance image, and determines whether or not there is a portion in which a difference equal to or greater than a threshold value occurs in the subject distance within the feature area.

そして、特徴領域内で被写体距離に閾値以上の差が生じる場合、テンプレート生成部25は、被写体距離の差が閾値以上となる部分を除外して最終的な特徴領域の範囲を決定する。これにより、追尾対象の被写体のものと異なる可能性の高い部分が特徴領域から除かれるので、被写体追尾の精度をより向上させることが可能となる。   When a difference equal to or greater than the threshold value is generated in the subject distance within the feature region, the template generation unit 25 determines a final feature region range by excluding a portion where the subject distance difference is equal to or greater than the threshold value. As a result, a portion that is likely to be different from that of the subject to be tracked is excluded from the feature region, so that the accuracy of subject tracking can be further improved.

ステップS216:テンプレート生成部25は、スルー画像のうちでS215で決定した特徴領域の範囲内からテンプレートのデータを生成する。本実施形態では、テンプレート生成部25は、特徴領域の全範囲のスルー画像に基づいてテンプレートのデータを生成するものとする。もっとも、テンプレート生成部25は、特徴領域の一部に基づいてテンプレートのデータを生成してもよい。例えば、テンプレート生成部25は、特徴領域の外周が非線形であるときに特徴領域に内接する長方形を設定し、この長方形の範囲のスルー画像からテンプレートのデータを生成するようにしてもよい(この場合の図示は省略する)。   Step S216: The template generation unit 25 generates template data from the range of the feature region determined in S215 in the through image. In the present embodiment, it is assumed that the template generation unit 25 generates template data based on the through image of the entire range of the feature region. But the template production | generation part 25 may produce | generate the data of a template based on a part of feature area. For example, the template generation unit 25 may set a rectangle inscribed in the feature region when the outer periphery of the feature region is nonlinear, and may generate template data from a through image in the range of the rectangle (in this case) Is omitted).

なお、S216でのテンプレート生成部25は、被写体追尾の精度を高めるために、テンプレート生成チャンネルのみならず、YCbCrのすべてのチャンネルを用いてテンプレートのデータを生成する。ここで、Yチャンネルだけでテンプレートを生成した場合とYCbCrのすべてのチャンネルを用いてテンプレートを生成した場合を考える。そして、撮影画面内に追尾対象と同輝度の被写体が含まれるシーンで被写体追尾を行うと、前者では被写体追尾部26が追尾対象を誤認識する可能性が高くなる。一方、後者ではCbチャンネルまたはCrチャンネルのデータを用いることで、被写体追尾部26が追尾対象の被写体を正しく追尾できる可能性が高まる。以上で、図5のサブルーチンの説明を終了する。   Note that the template generation unit 25 in S216 generates template data using not only the template generation channel but all YCbCr channels in order to improve subject tracking accuracy. Here, consider a case where a template is generated using only the Y channel and a case where a template is generated using all channels of YCbCr. If subject tracking is performed in a scene in which a subject having the same luminance as the tracking target is included in the shooting screen, the possibility that the subject tracking unit 26 erroneously recognizes the tracking target in the former increases. On the other hand, in the latter case, using the Cb channel or Cr channel data increases the possibility that the subject tracking unit 26 can correctly track the subject to be tracked. This is the end of the description of the subroutine of FIG.

以下、本実施形態の作用効果を述べる。本実施形態の電子カメラは、被写体追尾処理において初期状態のテンプレートを生成するときに、スルー画像の候補領域の内側から追尾対象となる被写体の特徴を示す特徴領域の位置およびサイズを特定する。そして、電子カメラは、上記の特徴領域のスルー画像のデータを用いてテンプレートを生成する。これにより、被写体追尾処理に適したテンプレートが電子カメラによって自動的に生成されるので、被写体追尾の精度をより向上させることが可能となる。   Hereinafter, the operational effects of this embodiment will be described. The electronic camera according to the present embodiment specifies the position and size of the feature region indicating the characteristics of the subject to be tracked from the inside of the through image candidate region when generating the initial template in the subject tracking process. And an electronic camera produces | generates a template using the data of the through image of said characteristic area. As a result, a template suitable for subject tracking processing is automatically generated by the electronic camera, so that the accuracy of subject tracking can be further improved.

<実施形態の補足事項>
(1)上記実施形態の電子カメラでは、位相差AFモジュールを撮像素子13とは別に設け、コントラスト方式のAF動作に加えてさらに公知の瞳分割による位相差AF動作を行うようにしてもよい。また、上記実施形態では、撮像素子13の出力に基づいてAE演算を行う例を説明したが、撮像素子13とは別にAE演算用の測光素子を設けてもよい。
<Supplementary items of the embodiment>
(1) In the electronic camera of the above-described embodiment, a phase difference AF module may be provided separately from the imaging device 13 and a phase difference AF operation by a known pupil division may be performed in addition to a contrast type AF operation. In the above-described embodiment, an example in which AE calculation is performed based on the output of the image sensor 13 has been described. However, a photometric element for AE calculation may be provided separately from the image sensor 13.

(2)上記実施形態において、テンプレートのデータや追尾履歴データを、第1メモリ16に保持させるようにしてもよい。また、上記実施形態において、CPU21は電源オンの間だけ電子カメラ内に追尾履歴データを保持させて、撮影モードの切替や電源オフの操作に応じて追尾履歴データを初期化するようにしてもよい。   (2) In the above embodiment, template data and tracking history data may be held in the first memory 16. In the above-described embodiment, the CPU 21 may hold tracking history data in the electronic camera only while the power is on, and initialize the tracking history data in accordance with a shooting mode switch or a power-off operation. .

(3)上記実施形態では、テンプレート生成部25、被写体追尾部26などの機能をプログラムによってソフトウエア的に実現する例を説明したが、これらの構成をASICを用いてハードウエア的に実現しても勿論かまわない。   (3) In the above embodiment, an example has been described in which functions such as the template generation unit 25 and the subject tracking unit 26 are realized by software using a program. However, these configurations are realized by hardware using an ASIC. Of course it doesn't matter.

(4)上記実施形態では電子カメラのCPU21がスルー画像を用いてテンプレートの生成を行う例を説明した。しかし、本発明は上記実施形態に限定されず、例えば、電子カメラが記録画像(本画像など)を用いてテンプレートを生成する形態であってもよい。   (4) In the above embodiment, the example in which the CPU 21 of the electronic camera generates a template using the through image has been described. However, the present invention is not limited to the above-described embodiment, and, for example, an electronic camera may generate a template using a recorded image (main image or the like).

また、電子カメラで被写体追尾を行うときに適用するテンプレートのデータを、電子カメラと接続された外部装置(パーソナルコンピュータなど)によって記録画像から生成してもよい。このとき、上記実施形態に示すテンプレート生成処理を外部装置にプログラムで実行させてもよい。さらに、上記実施形態で電子カメラのCPU21が実行する処理の一部を外部装置に負担させて、電子カメラと外部装置とを協働させて上記実施形態のアルゴリズムを実現してもよい。   Further, template data to be applied when subject tracking with an electronic camera may be generated from a recorded image by an external device (such as a personal computer) connected to the electronic camera. At this time, the template generation process shown in the above embodiment may be executed by a program on an external device. Furthermore, the algorithm of the above embodiment may be realized by causing the external device to share a part of the processing executed by the CPU 21 of the electronic camera in the above embodiment and causing the electronic camera and the external device to cooperate.

(5)上記実施形態では、YCbCrのチャンネルからテンプレート生成チャンネルを選択する例を説明した。しかし、本発明においてRGBの画像のデータを適用する場合にはRGBのチャンネルのうちからテンプレート生成チャンネルを選択してもよい。   (5) In the above embodiment, the example in which the template generation channel is selected from the YCbCr channels has been described. However, when applying RGB image data in the present invention, a template generation channel may be selected from among the RGB channels.

(6)上記実施形態でのテンプレート生成部25は、輝度値および分散値に基づいて候補領域を拡大するか否かを判定している(S203,S205)。しかし、本発明の構成は上記実施形態の例に限定されるものではない。例えば、テンプレート生成部25は、候補領域の輪郭画像(エッジ成分の有無を示す二値化画像)を生成して縦横方向に画素値を合算する。そして、輪郭画像から求めた合算値が閾値未満である場合には、現在の候補領域内の画像は絵柄がほぼ一様であるとして、テンプレート生成部25に候補領域を拡大させてもよい。勿論、テンプレート生成部25は、輝度値または分散値に基づく候補領域の拡大の判定と、輪郭画像に基づく候補領域の拡大の判定とを適宜組み合わせて実行してもよい。   (6) The template generation unit 25 in the above embodiment determines whether or not to enlarge the candidate area based on the luminance value and the variance value (S203, S205). However, the configuration of the present invention is not limited to the example of the above embodiment. For example, the template generation unit 25 generates a contour image (binarized image indicating the presence / absence of an edge component) of the candidate region, and adds the pixel values in the vertical and horizontal directions. When the sum value obtained from the contour image is less than the threshold value, the template generation unit 25 may enlarge the candidate region on the assumption that the image in the current candidate region has a substantially uniform pattern. Of course, the template generation unit 25 may execute a combination of determination of candidate area expansion based on the luminance value or variance value and candidate area expansion determination based on the contour image as appropriate.

(7)上記実施形態のS203では、テンプレート生成部25はCb、Crチャンネルの階調の平均値が閾値を超えているか否かをさらに判定してもよい。また、上記実施形態のS205では、テンプレート生成部25は、候補領域におけるスルー画像のYCbCrの分散値のいずれかが閾値を超える場合には、被写体の特徴を検出しうるとみなしてYES側の判定をしてもよい。   (7) In S203 of the above embodiment, the template generation unit 25 may further determine whether or not the average value of the gradation of the Cb and Cr channels exceeds the threshold value. In S205 of the above embodiment, the template generation unit 25 determines that the feature of the subject can be detected if any of the YCbCr variance values of the through image in the candidate region exceeds the threshold value, and determines on the YES side. You may do.

(8)上記実施形態でのテンプレート生成部25は、S206の処理で拡大された後の候補領域をそのまま特徴領域として特定し、テンプレートのデータを生成してもよい。また、上記実施形態でのテンプレート生成部25は、Yチャンネルの階調の平均値が閾値未満の場合(S203のNO側)や、各チャンネルの分散値のいずれかが閾値未満の場合(S205のNO側)にはテンプレートの生成処理を打ち切って、モニタ18にエラー表示を行うようにしてもよい。   (8) The template generation unit 25 in the above embodiment may specify the candidate area after being enlarged in the process of S206 as a feature area as it is, and generate template data. Further, the template generation unit 25 in the above embodiment, when the average value of the Y channel gradation is less than the threshold value (NO side of S203), or when one of the variance values of each channel is less than the threshold value (S205). On the NO side), the template generation process may be terminated and an error display may be displayed on the monitor 18.

(9)上記実施形態でのテンプレート生成部25は、測距画素で求めた候補領域内の被写体距離が所定範囲外となる場合(被写体距離が極端に短い場合または極端に長い場合)には、テンプレートの生成処理を打ち切って、モニタ18にエラー表示を行うようにしてもよい。   (9) The template generation unit 25 in the above embodiment, when the subject distance in the candidate area obtained by the ranging pixel is out of the predetermined range (when the subject distance is extremely short or extremely long), The template generation process may be terminated and an error display may be displayed on the monitor 18.

(10)上記実施形態における特徴領域の形状およびテンプレートの形状は、正方形や長方形に限定されることなく、例えば自由曲線で囲まれた形状などであってもよい。   (10) The shape of the feature region and the shape of the template in the above embodiment are not limited to a square or a rectangle, and may be, for example, a shape surrounded by a free curve.

(11)上記実施形態のS212では、テンプレート生成部25は、重心位置を起点とする上下左右の特徴領域の端部までの距離をそれぞれ求め、この求めた距離の最大値を適用して特徴領域の仮サイズを決定してもよい。この場合には、特徴領域の仮サイズの形状は正方形となる。また、上記実施形態のS215の処理は、S202の処理後であれば実行順序を適宜組み替えてもかまわない。   (11) In S212 of the above embodiment, the template generation unit 25 obtains the distances from the center of gravity to the ends of the top, bottom, left, and right feature regions, and applies the maximum value of the obtained distances to the feature region. The provisional size may be determined. In this case, the temporary size shape of the feature region is a square. In addition, the processing order of S215 in the above embodiment may be appropriately rearranged as long as it is after the processing of S202.

(12)上述の実施形態および変形例の構成はあくまで一例にすぎない。そのため、本発明の撮像装置、プログラムおよびテンプレート生成方法を実施するときには、上述の実施形態および変形例に示す構成やその処理の順序についてあらゆる組み合わせをとることができる。   (12) The configurations of the above-described embodiments and modifications are merely examples. Therefore, when implementing the imaging device, the program, and the template generation method of the present invention, all combinations of the configurations shown in the above-described embodiments and modifications and the order of the processes can be taken.

なお、本発明は、その精神またはその主要な特徴から逸脱することなく他の様々な形で実施することができる。そのため、上述した実施形態はあらゆる点で単なる例示に過ぎず、限定的に解釈してはならない。本発明は、特許請求の範囲によって示されるものであって、本発明は明細書本文にはなんら拘束されない。さらに、特許請求の範囲の均等範囲に属する変形や変更は、全て本発明の範囲内である。   It should be noted that the present invention can be implemented in various other forms without departing from the spirit or main features thereof. Therefore, the above-described embodiment is merely an example in all respects and should not be interpreted in a limited manner. The present invention is defined by the claims, and the present invention is not limited to the text of the specification. Further, all modifications and changes belonging to the equivalent scope of the claims are within the scope of the present invention.

本実施形態の電子カメラの構成を説明するブロック図A block diagram for explaining a configuration of an electronic camera of the present embodiment (a)第1追尾履歴テーブルを示す図、(b)第2追尾履歴テーブルを示す図(A) The figure which shows the 1st tracking history table, (b) The figure which shows the 2nd tracking history table 電子カメラの撮影モードでの動作例を説明する流れ図Flow chart explaining an operation example in the shooting mode of the electronic camera ガイドマークの重畳されたビュー画像の表示例を示す図The figure which shows the example of a display of the view image on which the guide mark was superimposed 図3のテンプレート生成処理(S103)のサブルーチンを説明する流れ図FIG. 3 is a flowchart for explaining a subroutine of the template generation process (S103). スルー画像と候補領域との位置関係の一例を示す図The figure which shows an example of the positional relationship of a through image and a candidate area | region テンプレートの仮サイズの決定方法を示す説明図Explanatory drawing which shows the determination method of the temporary size of a template

符号の説明Explanation of symbols

13…撮像素子、15…画像処理部、21…CPU、22…第2メモリ、25…テンプレート生成部、26…被写体追尾部

DESCRIPTION OF SYMBOLS 13 ... Image sensor, 15 ... Image processing part, 21 ... CPU, 22 ... 2nd memory, 25 ... Template production | generation part, 26 ... Subject tracking part

Claims (12)

被写体を撮像して画像のデータを生成する撮像部と、
前記画像内に設定された候補領域の内側から追尾対象となる被写体の特徴を示す特徴領域を特定し、前記特徴領域の画像のデータを用いてテンプレートを生成するテンプレート生成部と、
前記テンプレートを用いて、前記追尾対象の被写体を入力画像から継続的に検出する被写体追尾部と、
を備えることを特徴とする撮像装置。
An imaging unit that images a subject and generates image data;
A template generation unit that identifies a feature region indicating a feature of a subject to be tracked from inside a candidate region set in the image, and generates a template using image data of the feature region;
A subject tracking unit that continuously detects the subject to be tracked from an input image using the template;
An imaging apparatus comprising:
請求項1に記載の撮像装置において、
前記テンプレート生成部は、前記候補領域内での前記特徴領域の位置を特定することを特徴とする撮像装置。
The imaging device according to claim 1,
The said template production | generation part specifies the position of the said characteristic area within the said candidate area | region, The imaging device characterized by the above-mentioned.
請求項1または請求項2に記載の撮像装置において、
前記テンプレート生成部は、前記特徴領域のサイズを特定することを特徴とする撮像装置。
In the imaging device according to claim 1 or 2,
The template generation unit specifies the size of the feature region.
請求項2に記載の撮像装置において、
前記テンプレート生成部は、前記候補領域内で主要被写体を抽出する抽出処理を行うとともに、前記主要被写体の重心位置に基づいて前記特徴領域の位置を特定することを特徴とする撮像装置。
The imaging device according to claim 2,
The template generating unit performs an extraction process of extracting a main subject in the candidate region, and specifies the position of the feature region based on the position of the center of gravity of the main subject.
請求項3に記載の撮像装置において、
前記テンプレート生成部は、前記候補領域内で主要被写体を抽出する抽出処理を行うとともに、前記主要被写体の大きさに基づいて前記特徴領域のサイズを特定することを特徴とする撮像装置。
The imaging device according to claim 3.
The template generation unit performs an extraction process of extracting a main subject in the candidate region, and specifies the size of the feature region based on the size of the main subject.
請求項2または請求項3に記載の撮像装置において、
前記被写体追尾部による被写体追尾の結果と、該被写体追尾で適用されたテンプレートの生成条件との対応関係を示す追尾履歴データを記憶するメモリをさらに備え、
前記テンプレート生成部は、前記被写体追尾の結果に応じて前記追尾履歴データから抽出された前記生成条件を参照して前記特徴領域を特定することを特徴とする撮像装置。
In the imaging device according to claim 2 or 3,
A memory for storing tracking history data indicating a correspondence relationship between a result of subject tracking by the subject tracking unit and a generation condition of a template applied in the subject tracking;
The template generation unit identifies the feature region with reference to the generation condition extracted from the tracking history data in accordance with the subject tracking result.
請求項2または請求項3に記載の撮像装置において、
前記画像に対応する撮影画面の複数箇所で被写体距離をそれぞれ検出する測距部をさらに備え、
前記テンプレート生成部は、前記候補領域内における被写体距離を参照して前記特徴領域を特定することを特徴とする撮像装置。
In the imaging device according to claim 2 or 3,
A distance measuring unit for detecting subject distances at a plurality of locations on the shooting screen corresponding to the image;
The imaging apparatus, wherein the template generation unit specifies the feature region with reference to a subject distance in the candidate region.
請求項1に記載の撮像装置において、
前記候補領域の内側から前記被写体の特徴を示す部分を検出できるか否かを判定する判定処理部と、
前記特徴を示す部分を検出できないと前記判定処理部が判定したときに、前記候補領域のサイズを拡大する候補領域変更部と、
をさらに備えることを特徴とする撮像装置。
The imaging device according to claim 1,
A determination processing unit that determines whether or not a portion indicating the characteristics of the subject can be detected from the inside of the candidate region;
A candidate area changing unit for enlarging the size of the candidate area when the determination processing unit determines that the portion indicating the feature cannot be detected;
An image pickup apparatus further comprising:
請求項8に記載の撮像装置において、
前記テンプレート生成部は、拡大された後の前記候補領域の内側から前記特徴領域を特定することを特徴とする撮像装置。
The imaging device according to claim 8,
The said template production | generation part specifies the said feature area from the inside of the said candidate area | region after being expanded, The imaging device characterized by the above-mentioned.
請求項8に記載の撮像装置において、
前記テンプレート生成部は、拡大された後の前記候補領域を前記特徴領域として特定することを特徴とする撮像装置。
The imaging device according to claim 8,
The said template production | generation part specifies the said candidate area | region after being expanded as said characteristic area, The imaging device characterized by the above-mentioned.
画像のデータを読み込むデータ読込部と、演算部とを有するとともに、追尾対象の被写体を入力画像から継続的に検出するためのテンプレートを生成するコンピュータに対して、
前記画像のデータを前記データ読込部によって前記演算部に読み込む画像入力ステップと、
前記画像内に設定された候補領域の内側から追尾対象となる被写体の特徴を示す特徴領域を特定し、前記特徴領域の画像のデータを用いて前記テンプレートを生成するテンプレート生成ステップと、
を前記演算部に実行させることを特徴とするプログラム。
For a computer having a data reading unit for reading image data and a calculation unit and generating a template for continuously detecting a subject to be tracked from an input image,
An image input step of reading the image data into the calculation unit by the data reading unit;
A template generation step of identifying a feature region indicating the characteristics of a subject to be tracked from inside a candidate region set in the image, and generating the template using image data of the feature region;
Is executed by the calculation unit.
少なくとも1以上のコンピュータを用いて、追尾対象の被写体を入力画像から継続的に検出するためのテンプレートを生成するテンプレート生成方法であって、
画像のデータを前記コンピュータに読み込む画像入力ステップと、
前記画像内に設定された候補領域の内側から追尾対象となる被写体の特徴を示す特徴領域を前記コンピュータが特定する特徴領域特定ステップと、
前記特徴領域の画像のデータを用いて前記テンプレートを前記コンピュータが生成するテンプレート生成ステップと、
を備えることを特徴とするテンプレート生成方法。
A template generation method for generating a template for continuously detecting an object to be tracked from an input image using at least one computer,
An image input step of reading image data into the computer;
A feature region specifying step in which the computer specifies a feature region indicating a feature of a subject to be tracked from inside a candidate region set in the image;
A template generating step in which the computer generates the template using image data of the feature region;
A template generation method comprising:
JP2007281885A 2007-10-30 2007-10-30 Imaging apparatus, program, and template generation method Withdrawn JP2009111716A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007281885A JP2009111716A (en) 2007-10-30 2007-10-30 Imaging apparatus, program, and template generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007281885A JP2009111716A (en) 2007-10-30 2007-10-30 Imaging apparatus, program, and template generation method

Publications (1)

Publication Number Publication Date
JP2009111716A true JP2009111716A (en) 2009-05-21

Family

ID=40779732

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007281885A Withdrawn JP2009111716A (en) 2007-10-30 2007-10-30 Imaging apparatus, program, and template generation method

Country Status (1)

Country Link
JP (1) JP2009111716A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011039112A (en) * 2009-08-06 2011-02-24 Canon Inc Imaging device
JP2011109502A (en) * 2009-11-19 2011-06-02 Nikon Corp Image tracking device, imaging apparatus, and, image tracking method
CN102263898A (en) * 2010-05-25 2011-11-30 三洋电机株式会社 Electronic camera
JP2012003030A (en) * 2010-06-17 2012-01-05 Canon Inc Focus detector and focus detection method
JP2012138845A (en) * 2010-12-27 2012-07-19 Canon Inc Image processing device and control method therefor
JP2013041117A (en) * 2011-08-16 2013-02-28 Pentax Ricoh Imaging Co Ltd Imaging apparatus and distance information acquisition method
WO2013047066A1 (en) * 2011-09-30 2013-04-04 富士フイルム株式会社 Tracking frame initial position setting device and operation control method for same
JP2013254386A (en) * 2012-06-07 2013-12-19 Nikon Corp Subject tracking device, electronic camera and subject tracking program
WO2014083721A1 (en) * 2012-11-27 2014-06-05 株式会社ソニー・コンピュータエンタテインメント Information processing device and information processing method

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011039112A (en) * 2009-08-06 2011-02-24 Canon Inc Imaging device
JP2011109502A (en) * 2009-11-19 2011-06-02 Nikon Corp Image tracking device, imaging apparatus, and, image tracking method
CN102263898A (en) * 2010-05-25 2011-11-30 三洋电机株式会社 Electronic camera
JP2011247970A (en) * 2010-05-25 2011-12-08 Sanyo Electric Co Ltd Electronic camera
JP2012003030A (en) * 2010-06-17 2012-01-05 Canon Inc Focus detector and focus detection method
JP2012138845A (en) * 2010-12-27 2012-07-19 Canon Inc Image processing device and control method therefor
JP2013041117A (en) * 2011-08-16 2013-02-28 Pentax Ricoh Imaging Co Ltd Imaging apparatus and distance information acquisition method
WO2013047066A1 (en) * 2011-09-30 2013-04-04 富士フイルム株式会社 Tracking frame initial position setting device and operation control method for same
CN104041005A (en) * 2011-09-30 2014-09-10 富士胶片株式会社 Tracking-frame initial-position setting device and method of controlling operation of same
JP5612774B2 (en) * 2011-09-30 2014-10-22 富士フイルム株式会社 Tracking frame initial position setting device and operation control method thereof
US8879794B2 (en) 2011-09-30 2014-11-04 Fujifilm Corporation Tracking-frame initial-position setting device and method of controlling operation of same
CN104041005B (en) * 2011-09-30 2015-12-23 富士胶片株式会社 Follow the trail of frame initial position setting equipment and method of controlling operation thereof thereof
JP2013254386A (en) * 2012-06-07 2013-12-19 Nikon Corp Subject tracking device, electronic camera and subject tracking program
WO2014083721A1 (en) * 2012-11-27 2014-06-05 株式会社ソニー・コンピュータエンタテインメント Information processing device and information processing method
US9460337B2 (en) 2012-11-27 2016-10-04 Sony Corporation Information processor and information processing method

Similar Documents

Publication Publication Date Title
US8629915B2 (en) Digital photographing apparatus, method of controlling the same, and computer readable storage medium
US7791668B2 (en) Digital camera
JP5115210B2 (en) Imaging device
JP5720275B2 (en) Imaging apparatus and imaging method
JP2009111716A (en) Imaging apparatus, program, and template generation method
JP5441670B2 (en) Image processing apparatus and control method thereof
JP2014168227A (en) Image processing apparatus, imaging apparatus, and image processing method
JP2014081420A (en) Tracking device and method thereof
JP5851206B2 (en) TRACKING DEVICE AND TRACKING METHOD
JP4807582B2 (en) Image processing apparatus, imaging apparatus, and program thereof
JP5949559B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP5499531B2 (en) Electronic camera
JP5217451B2 (en) Imaging device
JP2007074394A (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
US10565712B2 (en) Image processing apparatus and method for controlling the same
JP6172973B2 (en) Image processing device
JP2012231520A (en) Imaging apparatus, control apparatus, and control method therefor
JP5509621B2 (en) Image processing apparatus, camera, and program
JP2010041607A (en) Image capturing apparatus, method of controlling the same and program
JP2008211506A (en) Image processing apparatus, imaging apparatus, and program thereof
US10237469B2 (en) Information processing apparatus, information processing method, and storage medium
JP5965653B2 (en) TRACKING DEVICE AND TRACKING METHOD
JP2018061292A (en) Image processing apparatus, image processing method, and program
JP5146223B2 (en) Program, camera, image processing apparatus, and image contour extraction method
JP4807623B2 (en) Imaging apparatus, imaging method, and imaging program

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110104