JP2020057302A - Imaging device and control method of the same, and program - Google Patents

Imaging device and control method of the same, and program Download PDF

Info

Publication number
JP2020057302A
JP2020057302A JP2018188925A JP2018188925A JP2020057302A JP 2020057302 A JP2020057302 A JP 2020057302A JP 2018188925 A JP2018188925 A JP 2018188925A JP 2018188925 A JP2018188925 A JP 2018188925A JP 2020057302 A JP2020057302 A JP 2020057302A
Authority
JP
Japan
Prior art keywords
feature amount
subject
image
area
imaging device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018188925A
Other languages
Japanese (ja)
Other versions
JP7278737B2 (en
Inventor
勇太 川村
Yuta Kawamura
勇太 川村
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2018188925A priority Critical patent/JP7278737B2/en
Publication of JP2020057302A publication Critical patent/JP2020057302A/en
Application granted granted Critical
Publication of JP7278737B2 publication Critical patent/JP7278737B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

To provide an imaging device that can always obtain high tracking performance irrespective of the tracking status by determining a size of a feature amount area based on image information.SOLUTION: An imaging device can obtain a first image and a second image in a time-series manner. The imaging device comprises: subject detection means for detecting a subject serving as a tracking subject from the first image; feature amount area registration means for registering a feature amount area including the subject based on the first image; feature amount area update means for updating the size of the feature amount area registered by the feature amount area registration means based on the information related to the first and second images; and subject tracking means for tracking the subject by searching an image area corresponding to the feature amount area updated by the feature amount area update means from the second image.SELECTED DRAWING: Figure 2

Description

本発明は、撮像装置及びその制御方法、並びにプログラムに関する。   The present invention relates to an imaging device, a control method thereof, and a program.

デジタルカメラにおいて、得られた画像データから画像の特定領域(特徴量領域)の特徴量をもとに、被写体を追尾し、その被写体に対してピント、明るさ、色などの撮影条件を好適な状態に合わせて撮影することが一般的になっている。このとき、特許文献1のように、特徴量領域のサイズを広めに設定すると、被写体の追尾において、当該特徴量領域に対応する画像領域の探索に用いる情報が多くなるため、追尾性能が向上すると期待される。   In a digital camera, a subject is tracked based on a feature amount of a specific region (feature amount region) of an image based on obtained image data, and shooting conditions such as focus, brightness, and color for the subject are preferably adjusted. It is common to take pictures according to the state. At this time, if the size of the feature amount region is set to be large as in Patent Document 1, information used for searching for an image region corresponding to the feature amount region in tracking the subject increases, so that tracking performance is improved. Be expected.

特開平8−329110号公報JP-A-8-329110

しかし、特許文献1の技術は、画像を探索する際に、画像情報に基づき特徴量領域のサイズを変更するものではない。従って、仮に、特許文献1に係る技術を被写体の追尾における特徴量領域の探索に適用して、追尾性能の向上のために特徴量領域のサイズを大きくしたとすると、逆に、追尾が失敗してしまうことがある。   However, the technique of Patent Document 1 does not change the size of the feature amount area based on image information when searching for an image. Therefore, if the technology according to Patent Literature 1 is applied to search for a feature amount region in tracking a subject, and the size of the feature amount region is increased in order to improve tracking performance, conversely, tracking will fail. Sometimes.

例えば、特徴量領域が被写体領域よりも大きくなると、特徴量領域は、被写体の背景も含むことになる。この場合、被写体の追尾中に、例えば、カメラが大きく動く、被写体がそもそも動体であるなどといった状況が発生すると、特徴量領域内の背景情報が時間の経過に伴い変化することとなる。即ち、被写体(追尾対象)と背景との位置関係が大きく変わってしまい、同一特徴量が存在しなくなり、結果として、追尾が失敗してしまう。   For example, when the feature amount region is larger than the subject region, the feature amount region also includes the background of the subject. In this case, if, for example, a situation occurs in which the camera largely moves or the subject is originally a moving object during the tracking of the subject, the background information in the feature amount area changes over time. That is, the positional relationship between the subject (tracking target) and the background greatly changes, and the same feature amount does not exist. As a result, tracking fails.

本発明は、画像情報に基づき特徴量領域のサイズを決定することで、追尾状況によらず常に高い追尾性能を得ることが可能な撮像装置を提供することを目的とする。   An object of the present invention is to provide an imaging apparatus that can always obtain high tracking performance regardless of a tracking state by determining a size of a feature amount area based on image information.

本発明の例に係る撮像装置は、第1の画像及び第2の画像を時系列で取得可能な撮像装置であって、前記第1の画像から追尾対象としての被写体を検出する被写体検出手段と、前記第1の画像に基づき前記被写体を含む特徴量領域を登録する特徴量領域登録手段と、前記第1及び第2の画像に係る情報に基づき、前記特徴量領域登録手段に登録された前記特徴量領域のサイズの更新を行う特徴量領域更新手段と、前記第2の画像から、前記特徴量領域更新手段で更新された前記特徴量領域に対応する画像領域の探索を行うことで、前記被写体の追尾を行う被写体追尾手段と、を備える。   An imaging device according to an example of the present invention is an imaging device capable of acquiring a first image and a second image in a time series, and a subject detection unit that detects a subject as a tracking target from the first image. A feature amount region registration unit that registers a feature amount region including the subject based on the first image, and the feature amount region registration unit that is registered in the feature amount region registration unit based on information related to the first and second images. A feature amount region updating unit that updates the size of the feature amount region; and, from the second image, a search for an image region corresponding to the feature amount region updated by the feature amount region updating unit. Subject tracking means for tracking the subject.

本発明によれば、画像情報に基づき特徴量領域のサイズを決定することで、追尾状況によらず常に高い追尾性能を得ることが可能な撮像装置を提供できる。   According to the present invention, it is possible to provide an imaging apparatus that can always obtain high tracking performance regardless of a tracking state by determining the size of a feature amount area based on image information.

撮像装置の構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration example of an imaging device. 被写体認識部の構成例を示すブロック図である。FIG. 3 is a block diagram illustrating a configuration example of a subject recognition unit. 撮像装置の動作例を示すフローチャートである。6 is a flowchart illustrating an operation example of the imaging device. 被写体認識処理の例を示すフローチャートである。9 is a flowchart illustrating an example of a subject recognition process. 被写体検出処理の例を示すフローチャートである。9 is a flowchart illustrating an example of subject detection processing. 被写体検出処理での評価画素及び推定領域の例を示す図である。FIG. 9 is a diagram illustrating an example of an evaluation pixel and an estimation area in subject detection processing. 被写体検出処理での評価領域の例を示す図である。FIG. 9 is a diagram illustrating an example of an evaluation area in subject detection processing. 背景動き量の取得処理の例を示すフローチャートである。13 is a flowchart illustrating an example of a background motion amount acquisition process. 特徴量領域の更新処理の例を示すフローチャートである。9 is a flowchart illustrating an example of a feature amount area update process. 特徴量領域のサイズと動き量の差との関係を示す図である。FIG. 7 is a diagram illustrating a relationship between a size of a feature amount region and a difference in a motion amount. 特徴量領域のサイズの変更例を示す図である。FIG. 9 is a diagram illustrating an example of changing the size of a feature amount area. テンプレートマッチングの例を示す図である。FIG. 9 is a diagram illustrating an example of template matching.

以下、本発明の実施形態について、図面を参照して詳細に説明する。
本発明は、被写体に対して特徴量領域を設定し、かつ当該特徴量領域に基づき、被写体を追尾すると共に当該被写体に対してピント、明るさ、色などの撮影条件を好適な状態に合わせる機能を有する撮像装置に関する。以下に説明する撮像装置は、ビデオカメラ、デジタルスチルカメラ、それらに使用可能な交換レンズなどの光学機器に適用される。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
The present invention provides a function of setting a feature amount region for a subject, tracking the subject based on the feature amount region, and adjusting shooting conditions such as focus, brightness, and color to the subject in a suitable state. The present invention relates to an imaging device having: The imaging device described below is applied to an optical device such as a video camera, a digital still camera, and an interchangeable lens that can be used for them.

<撮像装置>
図1は、撮像装置の構成例を示す。
撮像装置100は、動画、静止画などの画像の撮影及び記録が可能である。撮像装置100内の各機能ブロックは、互いに通信可能な状態となるように、バス160により接続される。撮像装置100の各機能は、主制御部151がプログラムを実行して各機能ブロックを制御することにより実現される。
<Imaging device>
FIG. 1 illustrates a configuration example of an imaging device.
The imaging device 100 can capture and record images such as moving images and still images. The functional blocks in the imaging device 100 are connected by the bus 160 so that they can communicate with each other. Each function of the imaging device 100 is realized by the main control unit 151 executing a program and controlling each functional block.

撮像装置100は、画像を解析し、かつその解析結果から特定の被写体領域を推定する被写体認識部161を備える。本実施形態は、被写体認識部161を用いて、画像情報(撮影時に得られる画像の情報)に基づき特徴量領域のサイズを変更可能とする点を特徴の一つとする。   The imaging device 100 includes a subject recognition unit 161 that analyzes an image and estimates a specific subject area from the analysis result. One of the features of the present embodiment is that the size of the feature amount area can be changed based on image information (information of an image obtained at the time of shooting) using the subject recognition unit 161.

ここで、画像情報は、撮影レンズ(レンズユニット)101、及び撮像素子141により、時系列で取得可能な複数の画像(複数のフレーム)に係る情報のことである。画像情報は、例えば、画面の平均輝度、WB(ホワイトバランス)、GPS機能による位置情報などを含む。また、画像情報は、後述するように、当該複数の画像から得られる情報、例えば、被写体の動き量、背景の動き量、さらには、それらから取得される被写体(追尾対象)と背景との位置関係の変化量なども含む。   Here, the image information refers to information relating to a plurality of images (a plurality of frames) that can be acquired in time series by the imaging lens (lens unit) 101 and the image sensor 141. The image information includes, for example, average luminance of the screen, WB (white balance), position information by a GPS function, and the like. Further, the image information is information obtained from the plurality of images, for example, the amount of movement of the subject, the amount of movement of the background, and the position of the subject (tracking target) and the background obtained from them, as described later. It also includes the amount of change in the relationship.

このように、本実施形態では、被写体認識部161により特徴量領域のサイズを変更可能とすることで、追尾状況によらず常に高い追尾性能を得ることが可能な撮像装置を実現するものである。そのため、被写体認識部161は、被写体検出機能と、特徴量領域登録機能と、背景の動き量取得機能と、特徴量領域更新機能と、被写体追尾機能と、を有する。これらの機能の詳細については、後述する。   As described above, in the present embodiment, by making the size of the feature amount area changeable by the subject recognizing unit 161, an imaging apparatus capable of always obtaining high tracking performance regardless of the tracking situation is realized. . Therefore, the subject recognizing unit 161 has a subject detection function, a feature amount area registration function, a background motion amount acquisition function, a feature amount area update function, and a subject tracking function. Details of these functions will be described later.

撮影レンズ101は、固定1群レンズ102と、ズームレンズ111と、絞り103と、固定3群レンズ121と、フォーカスレンズ131と、ズームモータ112と、絞りモータ104と、フォーカスモータ132と、を備える。固定1群レンズ102、ズームレンズ111、絞り103、固定3群レンズ121、及びフォーカスレンズ131は、撮影光学系を構成する。   The taking lens 101 includes a fixed first group lens 102, a zoom lens 111, an aperture 103, a fixed third group lens 121, a focus lens 131, a zoom motor 112, an aperture motor 104, and a focus motor 132. . The fixed first group lens 102, the zoom lens 111, the aperture 103, the fixed third group lens 121, and the focus lens 131 constitute a photographic optical system.

尚、同図において、各レンズ102、111、121、131は、便宜上、1枚のレンズとして示しているが、複数のレンズの組み合わせから構成されてもよい。また、撮像装置100がカメラシステムを構成する場合、撮影レンズ101は、カメラ本体と一体化されてもよいし、又はカメラ本体から着脱可能なように構成されてもよい。   Although each of the lenses 102, 111, 121, and 131 is shown as a single lens for convenience in the drawing, the lenses 102, 111, 121, and 131 may be configured by combining a plurality of lenses. When the imaging device 100 forms a camera system, the imaging lens 101 may be integrated with the camera body or may be configured to be detachable from the camera body.

絞り制御部105は、絞り103を駆動する絞りモータ104の動作を制御する。即ち、絞り制御部105は、絞り103の開口径を変更する。ズーム制御部113は、ズームレンズ111を駆動するズームモータ112の動作を制御する。即ち、ズーム制御部113は、撮影レンズ101の焦点距離(画角)を変更する。   The aperture control unit 105 controls the operation of an aperture motor 104 that drives the aperture 103. That is, the aperture control unit 105 changes the aperture diameter of the aperture 103. The zoom control unit 113 controls the operation of a zoom motor 112 that drives the zoom lens 111. That is, the zoom control unit 113 changes the focal length (angle of view) of the photographing lens 101.

フォーカス制御部133は、撮像素子141から得られる1対の焦点検出用信号(A像及びB像)の位相差に基づき、撮影レンズ101のデフォーカス量及びデフォーカス方向を取得する。そして、フォーカス制御部133は、デフォーカス量及びデフォーカス方向をフォーカスモータ132の駆動量及び駆動方向に変換する。この駆動量及び駆動方向に基づき、フォーカス制御部133は、フォーカスモータ132の動作を制御し、フォーカスレンズ131を駆動することで、撮影レンズ101の焦点状態を制御する。   The focus control unit 133 acquires a defocus amount and a defocus direction of the imaging lens 101 based on a phase difference between a pair of focus detection signals (A image and B image) obtained from the image sensor 141. Then, the focus control unit 133 converts the defocus amount and the defocus direction into the drive amount and the drive direction of the focus motor 132. Based on the driving amount and the driving direction, the focus control unit 133 controls the operation of the focus motor 132 and drives the focus lens 131 to control the focus state of the photographing lens 101.

このように、フォーカス制御部133は、位相差検出方式の自動焦点検出(AF)を実施する。但し、フォーカス制御部133は、位相差検出方式によるAFに代えて、画像信号から得られるコントラスト評価値に基づくコントラスト検出方式を用いて、AFを実行してもよい。   As described above, the focus control unit 133 performs the automatic focus detection (AF) based on the phase difference detection method. However, the focus control unit 133 may execute the AF using a contrast detection method based on a contrast evaluation value obtained from an image signal, instead of the AF using the phase difference detection method.

撮影レンズ101によって撮像素子141の結像面に形成される被写体像は、撮像素子141内に配置された複数の画素のそれぞれが有する光電変換素子により電気信号(画像信号)に変換される。撮像素子141は、例えば、CCD、CMOSイメージセンサなどであり、水平方向m画素、及び垂直方向n画素の画素アレイを備える。但し、n及びmは、それぞれ2以上の自然数である。各画素は、2つの光電変換素子(光電変換領域)を有する。撮像制御部143は、主制御部151からの指示に基づき、撮像素子141からの画像信号の読み出しを制御する。   A subject image formed on the imaging surface of the image sensor 141 by the imaging lens 101 is converted into an electric signal (image signal) by a photoelectric conversion element of each of a plurality of pixels arranged in the image sensor 141. The imaging element 141 is, for example, a CCD or CMOS image sensor, and includes a pixel array of m pixels in the horizontal direction and n pixels in the vertical direction. Here, n and m are each a natural number of 2 or more. Each pixel has two photoelectric conversion elements (photoelectric conversion regions). The imaging control unit 143 controls reading of an image signal from the imaging element 141 based on an instruction from the main control unit 151.

撮像素子141から読み出された画像信号は、画像信号処理部142に供給される。画像信号処理部142は、ノイズ低減処理、A/D変換処理、自動利得制御処理などの信号処理を画像信号に適用し、かつ当該信号処理が適用された画像信号を撮像制御部143に出力する。撮像制御部143は、画像信号処理部142から受信した画像信号をRAM(ランダム・アクセス・メモリ)154に保存する。   The image signal read from the image sensor 141 is supplied to the image signal processing unit 142. The image signal processing unit 142 applies signal processing such as noise reduction processing, A / D conversion processing, and automatic gain control processing to the image signal, and outputs the image signal to which the signal processing has been applied to the imaging control unit 143. . The imaging control unit 143 stores the image signal received from the image signal processing unit 142 in a RAM (random access memory) 154.

画像処理部152は、RAM154に記憶された画像信号に対して、予め定められた画像処理を適用する。画像処理部152が適用する画像処理は、例えば、ホワイトバランス調整処理、色補間(デモザイク)処理、ガンマ補正処理などのいわゆる現像処理を含む。また、当該画像処理は、信号形式変換処理、スケーリング処理などを含んでもよい。当該画像処理の例としては、これらに限定されず、上述以外の処理を行っても構わない。   The image processing unit 152 applies a predetermined image processing to the image signal stored in the RAM 154. The image processing applied by the image processing unit 152 includes, for example, so-called development processing such as white balance adjustment processing, color interpolation (demosaic) processing, and gamma correction processing. The image processing may include a signal format conversion process, a scaling process, and the like. Examples of the image processing are not limited to these, and processing other than the above may be performed.

画像処理部152は、自動露出制御(AE)に用いるための、被写体輝度に関する情報などを生成することもできる。特定の被写体領域に関する情報は、被写体認識部161から画像処理部152に供給され、例えば、ホワイトバランス調整処理に利用される。尚、コントラスト検出方式によるAFを行う場合、画像処理部152は、AF評価値を生成することも可能である。画像処理部152は、処理済の画像信号をRAM154に保存する。   The image processing unit 152 can also generate information on subject brightness and the like for use in automatic exposure control (AE). Information about a specific subject area is supplied from the subject recognition unit 161 to the image processing unit 152, and is used for, for example, white balance adjustment processing. When performing the AF by the contrast detection method, the image processing unit 152 can also generate an AF evaluation value. The image processing unit 152 stores the processed image signal in the RAM 154.

主制御部151は、RAM154に一時的に保存された画像信号に所定のヘッダを追加することで、所定の記録形式のデータファイルを生成する。この時、画像圧縮解凍部153は、主制御部151からの指示に基づき、当該データファイルを符号化し、画像信号に関する情報量を圧縮してもよい。そして、主制御部151は、生成されたデータファイルを、例えば、メモリカードのような記録媒体157に記録する。   The main control unit 151 generates a data file of a predetermined recording format by adding a predetermined header to the image signal temporarily stored in the RAM 154. At this time, the image compression / decompression unit 153 may encode the data file based on an instruction from the main control unit 151 and compress the information amount regarding the image signal. Then, the main control unit 151 records the generated data file on a recording medium 157 such as a memory card.

また、RAM154に保存された画像信号を表示する場合、主制御部151は、モニタディスプレイなどの表示部150の表示サイズに適合するように、画像処理部152に対して画像信号のスケーリング処理を指示する。この後、主制御部151は、スケーリング処理された画像信号を、表示画像データとしてRAM154のビデオメモリ領域(VRAM領域)に書き込む。表示部150は、RAM154のVRAM領域から表示画像データを読み出し、例えば、LCD、有機ELディスプレイなどの表示装置に表示する。   When displaying the image signal stored in the RAM 154, the main control unit 151 instructs the image processing unit 152 to perform a scaling process on the image signal so as to match the display size of the display unit 150 such as a monitor display. I do. Thereafter, the main control unit 151 writes the scaled image signal in the video memory area (VRAM area) of the RAM 154 as display image data. The display unit 150 reads display image data from the VRAM area of the RAM 154 and displays the read image data on a display device such as an LCD and an organic EL display.

本実施形態の撮像装置100は、動画撮影時(撮影スタンバイ状態、又は動画記録中)において、撮影された動画を表示部150に即時表示することで、表示部150を電子ビューファインダー(EVF)として機能させる。表示部150をEVFとして機能させる際に表示される動画像及びそのフレーム画像は、ライブビュー画像、又はスルー画像と呼ばれる。また、撮像装置100は、静止画撮影を行った場合にユーザが撮影結果を確認できるように、撮影した静止画を表示部150に一定時間表示する。これらの表示動作についても、主制御部151の制御によって実現される。   The image capturing apparatus 100 according to the present embodiment displays the captured moving image on the display unit 150 immediately when capturing a moving image (in a shooting standby state or during recording of a moving image), so that the display unit 150 is used as an electronic viewfinder (EVF). Let it work. A moving image and its frame image displayed when the display unit 150 functions as an EVF are called a live view image or a through image. Further, the imaging device 100 displays the photographed still image on the display unit 150 for a certain period of time so that the user can confirm the photographing result when the photographing is performed. These display operations are also realized by the control of the main control unit 151.

操作部156は、ユーザが撮像装置100に指示を入力するためのスイッチ、ボタン、キー、タッチパネルなどを備える。操作部156による入力は、バス160を経由して、主制御部151に転送される。主制御部151は、操作部156による入力に応じた動作を実現するために各部を制御する。   The operation unit 156 includes switches, buttons, keys, a touch panel, and the like for a user to input an instruction to the imaging device 100. The input from the operation unit 156 is transferred to the main control unit 151 via the bus 160. The main control unit 151 controls each unit to realize an operation according to an input from the operation unit 156.

主制御部151は、CPU、MPUなどのプログラマブルプロセッサを1つ以上有する。主制御部151は、フラッシュメモリなどの記憶部155に記憶されたプログラムをRAM154に読み出し、かつ当該プログラムを実行することで、各部を制御し、撮像装置100の各機能又は各処理を実現する。また、主制御部151は、被写体輝度の情報に基づき、露出条件(シャッタースピード、蓄積時間、絞り値、感度など)を自動的に決定するAE処理を実行する。被写体輝度の情報は、例えば、画像処理部152から取得できる。主制御部151は、人物の顔などの被写体領域を基準として露出条件を決定することもできる。   The main control unit 151 has one or more programmable processors such as a CPU and an MPU. The main control unit 151 reads out a program stored in a storage unit 155 such as a flash memory into the RAM 154 and executes the program to control each unit and realize each function or each process of the imaging device 100. In addition, the main control unit 151 executes an AE process for automatically determining an exposure condition (shutter speed, accumulation time, aperture value, sensitivity, and the like) based on information on a subject luminance. The information on the subject brightness can be acquired from the image processing unit 152, for example. The main control section 151 can also determine the exposure condition based on a subject area such as a person's face.

主制御部151は、動画撮影時において、例えば、絞りを固定とし、電子シャッタスピード(蓄積時間)及びゲインの大きさを決定する。主制御部151は、この決定された露出条件(蓄積時間及びゲインの大きさ)を撮像制御部143に通知する。撮像制御部143は、主制御部151から通知された露出条件に従った撮影が行われるように、撮像素子141の動作を制御する。   The main control unit 151 determines the electronic shutter speed (accumulation time) and the magnitude of the gain, for example, with the aperture fixed at the time of capturing a moving image. The main control unit 151 notifies the imaging control unit 143 of the determined exposure condition (the storage time and the magnitude of the gain). The imaging control unit 143 controls the operation of the imaging element 141 so that imaging is performed according to the exposure condition notified from the main control unit 151.

被写体認識部161の結果は、例えば、焦点検出領域の自動設定に用いることができる。この場合、特定の被写体領域に対する追尾AF機能を実現できる。また、焦点検出領域の輝度情報に基づきAE処理を行ったり、焦点検出領域の画素値に基づき画像処理(例えば、ガンマ補正処理、ホワイトバランス調整処理など)を行ったりすることもできる。尚、主制御部151は、現在の被写体領域の位置を表す指標(例えば、当該被写体領域を囲む矩形枠)を表示画像に重畳表示させてもよい。   The result of the object recognition unit 161 can be used, for example, for automatically setting a focus detection area. In this case, a tracking AF function for a specific subject area can be realized. In addition, AE processing can be performed based on luminance information of the focus detection area, and image processing (eg, gamma correction processing, white balance adjustment processing, and the like) can be performed based on pixel values of the focus detection area. Note that the main control unit 151 may superimpose an index indicating the current position of the subject area (for example, a rectangular frame surrounding the subject area) on the display image.

バッテリ159は、電源管理部158により管理され、撮像装置100の全体に電源を供給する。記憶部155は、主制御部151が実行するプログラム、プログラムの実行に必要な設定値、GUIデータ、ユーザ設定値などを記憶する。例えば、操作部156の操作により電源オフ状態から電源オン状態への移行が指示されると、記憶部155に記憶されたプログラムがRAM154に読み込まれ、かつ主制御部151が当該プログラムを実行する。   The battery 159 is managed by the power management unit 158, and supplies power to the entire imaging device 100. The storage unit 155 stores a program to be executed by the main control unit 151, setting values required for executing the program, GUI data, user setting values, and the like. For example, when a transition from the power-off state to the power-on state is instructed by operating the operation unit 156, a program stored in the storage unit 155 is read into the RAM 154, and the main control unit 151 executes the program.

<被写体認識部>
図2は、被写体認識部の構成例を示す。
被写体認識部161は、被写体検出部201と、特徴量領域登録部202と、背景の動き量取得部203と、特徴量領域更新部204と、被写体追尾部205と、を備える。
<Subject recognition unit>
FIG. 2 illustrates a configuration example of the subject recognition unit.
The subject recognition unit 161 includes a subject detection unit 201, a feature amount area registration unit 202, a background motion amount acquisition unit 203, a feature amount area update unit 204, and a subject tracking unit 205.

被写体検出部201は、撮像素子141により取得され、かつ画像処理部152で処理された画像に基づき、被写体(追尾対象)の位置及びサイズを検出する。例えば、被写体検出部201は、画像処理部152から時系列で画像(フレーム)を取得し、各画像に含まれる追尾対象としての被写体を検出する。また、被写体検出部201は、被写体の位置及びサイズから、各画像内において被写体が占める領域、即ち、被写体領域を求めると共に、当該被写体領域の信頼性に関する情報を生成する。   The subject detection unit 201 detects the position and size of a subject (tracking target) based on the image acquired by the imaging element 141 and processed by the image processing unit 152. For example, the subject detection unit 201 acquires images (frames) in time series from the image processing unit 152, and detects a subject as a tracking target included in each image. In addition, the subject detection unit 201 obtains a region occupied by the subject in each image, that is, a subject region, from the position and size of the subject, and generates information on the reliability of the subject region.

特徴量領域登録部202は、被写体検出部201によって検出された被写体領域に基づき被写体を含む特徴量領域を決定し、かつ当該特徴量領域を登録する。ここで、特徴量領域とは、追尾対象としての被写体を追尾するに当たって、nフレーム(第1の画像)で設定される被写体を含む画像領域のことである。但し、nは、自然数(1、2、3、…)であり、nが大きくなるほど、時間が後であることを意味する。そして、被写体の追尾は、後述するように、nフレームよりも後のフレーム、例えば、(n+1)フレーム(第2の画像)において、特徴量領域に対応する画像領域を探索することにより行う。   The feature amount area registration unit 202 determines a feature amount area including a subject based on the subject area detected by the subject detection unit 201, and registers the feature amount area. Here, the feature amount region refers to an image region including a subject set in n frames (first image) when tracking a subject as a tracking target. Here, n is a natural number (1, 2, 3,...), And the larger the value of n, the later the time. The tracking of the subject is performed by searching for an image area corresponding to the feature amount area in a frame later than the n-th frame, for example, an (n + 1) -th frame (second image), as described later.

特徴量領域登録部202は、被写体検出部201によって第1の画像から検出された被写体領域に基づき特徴量領域を登録する場合、当該特徴領域のサイズをデフォルト値(初期値)に設定する。デフォルト値は、予め決定されている。但し、デフォルト値は、ユーザが操作部156などを介して自由に変更できるように構成してもよいし、又はプログラムが自動的に最適値を設定できるように構成してもよい。   When registering a feature amount region based on the subject region detected from the first image by the subject detection unit 201, the feature amount region registration unit 202 sets the size of the feature region to a default value (initial value). The default value is predetermined. However, the default value may be configured so that the user can freely change it via the operation unit 156 or the like, or may be configured so that the program can automatically set the optimum value.

尚、後述する被写体追尾部205が特徴量領域に対応する画像領域を見つけ出して、追尾が成功となる場合には、特徴量領域登録部202は、既に登録されている特徴量領域に代えて、当該画像領域を新たな特徴量領域として登録する。一方、後述する被写体追尾部205が特徴量領域に対応する画像領域を見つけ出せず、追尾が不成功となる場合には、特徴量領域登録部202は、既に登録されている特徴量領域を引き続き登録する。   Note that, when the subject tracking unit 205 described later finds an image region corresponding to the feature amount region and the tracking is successful, the feature amount region registration unit 202 replaces the already registered feature amount region with The image area is registered as a new feature amount area. On the other hand, when the subject tracking unit 205 described later cannot find an image region corresponding to the feature amount region and the tracking is unsuccessful, the feature amount region registration unit 202 continues to register the already registered feature amount region. I do.

背景の動き量取得部203は、時系列で逐次供給される複数の画像に基づき、背景の動き量を取得する。背景の動き量取得部203は、例えば、当該複数の画像から背景を推定し、かつ推定された背景に基づき、複数の画像間の動きベクトルを検出する。これにより、背景の動き量取得部203は、当該動きベクトルに基づき、背景の動き量を取得できる。   The background motion amount acquisition unit 203 acquires a background motion amount based on a plurality of images sequentially supplied in time series. For example, the background motion amount acquisition unit 203 estimates a background from the plurality of images, and detects a motion vector between the plurality of images based on the estimated background. Thereby, the background motion amount acquisition unit 203 can acquire the background motion amount based on the motion vector.

また、背景の動き量取得部203は、ジャイロセンサ及び加速度センサのうちの少なくとも1つを用いて撮像装置100の動きを検出し、かつ撮像装置100の動きに基づき、背景の動き量を取得することもできる。尚、背景の動き量取得部203の動作の詳細については、後述する。   Further, the background motion amount acquisition unit 203 detects the motion of the imaging device 100 using at least one of the gyro sensor and the acceleration sensor, and acquires the background motion amount based on the motion of the imaging device 100. You can also. The operation of the background motion amount acquisition unit 203 will be described later in detail.

特徴量領域更新部204は、時系列で逐次供給される複数の画像に係る情報に基づき、特徴量領域登録部202に登録された特徴量領域のサイズの更新を行う。例えば、特徴量領域更新部204は、背景の動き量取得部203によって取得された背景の動き量と、後述する被写体追尾部205によって取得された被写体の動き量とに基づき、被写体と背景との位置関係の変化量を取得する。そして、特徴量領域更新部204は、当該変化量に基づき、特徴量領域登録部202に登録された特徴量領域のサイズの更新を行う。   The feature amount area update unit 204 updates the size of the feature amount area registered in the feature amount area registration unit 202 based on information about a plurality of images sequentially supplied in time series. For example, the feature amount area update unit 204 compares the background of the subject with the background based on the background motion acquired by the background motion acquisition unit 203 and the subject motion acquired by the subject tracking unit 205 described below. Acquires the amount of change in the positional relationship. Then, the feature amount area update unit 204 updates the size of the feature amount area registered in the feature amount area registration unit 202 based on the change amount.

ここで、特徴量領域登録部202が最初に登録する特徴量領域のサイズ(デフォルト値)は、過去に最も多く発生した被写体と背景との位置関係の変化量を基準値Δrefとした場合に、当該基準値Δrefに対応するサイズとするのが望ましい。基準値Δrefとデフォルト値との関係については、後述する。   Here, the size (default value) of the feature amount area registered first by the feature amount area registration unit 202 is such that when the amount of change in the positional relationship between the subject and the background that occurred most frequently in the past is the reference value Δref. It is desirable to set the size to the reference value Δref. The relationship between the reference value Δref and the default value will be described later.

そして、特徴量領域更新部204は、被写体と背景との変化量が基準値Δrefよりも大きい場合に、特徴量領域のサイズをデフォルト値よりも小さくする。また、特徴量領域更新部204は、当該変化量が基準値Δrefよりも小さい場合に、特徴量領域のサイズをデフォルト値よりも大きくする。さらに、特徴量領域更新部204は、当該変化量が大きくなるに従い特徴量領域のサイズを小さくし、かつ当該変化量が小さくなるに従い特徴量領域のサイズを大きくする。但し、特徴量領域更新部204は、当該変化量が閾値よりも大きい場合には、特徴量領域のサイズを一定とする。   Then, when the amount of change between the subject and the background is greater than the reference value Δref, the feature amount area update unit 204 reduces the size of the feature amount area to a value smaller than the default value. In addition, when the change amount is smaller than the reference value Δref, the feature amount area update unit 204 sets the size of the feature amount area to be larger than the default value. Further, the feature amount area updating unit 204 reduces the size of the feature amount area as the change amount increases, and increases the size of the feature amount area as the change amount decreases. However, when the change amount is larger than the threshold value, the feature amount area update unit 204 keeps the size of the feature amount area constant.

被写体追尾部205は、時系列で逐次供給される複数の画像から、特徴量領域更新部204で更新された特徴量領域に対応する画像領域の探索を行うことで、被写体の追尾を行う。例えば、被写体追尾部205は、特徴量領域更新部204で更新された特徴量領域と類似度が最も高い画像領域を当該特徴量領域に対応する画像領域とし、当該画像領域に基づき被写体の追尾を行う。   The subject tracking unit 205 performs tracking of a subject by searching for an image area corresponding to the feature amount area updated by the feature amount area updating unit 204 from a plurality of images sequentially supplied in time series. For example, the subject tracking unit 205 sets an image region having the highest similarity to the feature amount region updated by the feature amount region updating unit 204 as an image region corresponding to the feature amount region, and performs tracking of the subject based on the image region. Do.

ここで、類似度は、例えば、所定の関数で規定される評価値により判断し、被写体追尾部205は、当該評価値が最も低い領域を類似度が最も高い領域として決定する。また、被写体追尾部205は、評価値の最小値が閾値よりも大きい場合には、特徴量領域に対応する画像領域が見つけ出せなかったと結論付けることもできる。尚、探索結果は、画像内における被写体領域、信頼性、被写体の動き量などの情報を備え、主制御部151での各種処理に利用される。   Here, the similarity is determined based on, for example, an evaluation value defined by a predetermined function, and the subject tracking unit 205 determines a region with the lowest evaluation value as a region with the highest similarity. When the minimum value of the evaluation value is larger than the threshold value, the subject tracking unit 205 can also conclude that the image area corresponding to the feature amount area cannot be found. The search result includes information such as a subject area in the image, reliability, and the amount of movement of the subject, and is used for various processes in the main control unit 151.

<撮像装置の動作例>
図3は、撮像装置の動作例を示す。
本実施形態では、被写体検出処理、被写体追尾処理、並びに、被写体及び背景の動き量を検出する動き量検出処理を伴う動画撮影動作に関して説明する。動画撮影動作は、撮影スタンバイ時又は動画記録時に実行される。
<Operation example of imaging device>
FIG. 3 shows an operation example of the imaging apparatus.
In the present embodiment, a moving image shooting operation including a subject detection process, a subject tracking process, and a motion amount detection process for detecting a motion amount of a subject and a background will be described. The moving image shooting operation is executed at the time of shooting standby or at the time of moving image recording.

尚、撮影スタンバイ時と動画記録時とでは、取り扱う画像(フレーム)の解像度など、細部において異なるが、被写体検出処理、被写体追尾処理、並びに、被写体及び背景の動き量を検出する動き量検出処理に係る内容は、基本的に同じである。従って、以下では、特に、撮影スタンバイ時と動画記録時とを区別することなく、説明する。   Although details such as resolution of an image (frame) to be handled are different between the shooting standby mode and the moving image recording mode, the processing is performed in the subject detection processing, the subject tracking processing, and the motion detection processing for detecting the motion of the subject and the background. Such contents are basically the same. Therefore, the following description will be made without distinguishing between the shooting standby mode and the moving image recording mode.

まず、S301において、主制御部151は、撮像装置100の電源スイッチがオンであるか否かを判定する。電源スイッチがオフであれば、本フローを終了し、電源スイッチがオンであれば、本フローをS302に進める。   First, in S301, the main control unit 151 determines whether the power switch of the imaging device 100 is on. If the power switch is off, the present flow ends, and if the power switch is on, the present flow proceeds to S302.

次に、S302において、主制御部151は、各部を制御して、1フレーム分の撮像処理を実行した後、本フローをS303に進める。本実施形態では、撮像処理として、1対の視差画像と、1画面分の撮像画像とを取得し、これらをRAM154に保存する。また、S303において、主制御部151は、被写体認識処理を実行するように、被写体認識部161に指示を出す。ここで、被写体認識処理は、被写体検出処理、被写体追尾処理、並びに、被写体及び背景の動き量を検出する動き量検出処理を含む。被写体認識部161での被写体認識処理の詳細については、後述する。   Next, in S302, the main control unit 151 controls each unit to execute the imaging process for one frame, and then proceeds to S303. In the present embodiment, a pair of parallax images and a captured image for one screen are acquired as an imaging process, and are stored in the RAM 154. In S303, the main control unit 151 issues an instruction to the subject recognition unit 161 to execute the subject recognition processing. Here, the subject recognition process includes a subject detection process, a subject tracking process, and a motion amount detection process for detecting a motion amount of the subject and the background. Details of the subject recognition processing in the subject recognition unit 161 will be described later.

この後、被写体領域の位置、サイズ、及び動き量が被写体認識部161から主制御部151に通知され、かつRAM154に保存される。主制御部151は、通知された被写体領域に基づき、焦点検出領域を設定する。   Thereafter, the position, size, and amount of movement of the subject area are notified from the subject recognition unit 161 to the main control unit 151, and are stored in the RAM 154. The main controller 151 sets a focus detection area based on the notified subject area.

次に、S304において、主制御部151は、フォーカス制御部133に焦点検出処理を実行させる。フォーカス制御部133は、1対の視差画像の焦点検出領域に含まれる複数の画素のうち、同一行に配置された複数の画素から得られる複数のA信号を繋ぎ合わせてA像を生成し、かつ複数のB信号を繋ぎ合わせてB像を生成する。そして、フォーカス制御部133は、A像とB像との相対的な位置をずらしながらA像とB像の相関量を演算し、A像とB像との類似度が最も高くなる相対位置をA像とB像との位相差(ずれ量)として求める。さらに、フォーカス制御部133は、当該位相差をデフォーカス量及びデフォーカス方向に変換する。   Next, in S304, the main control unit 151 causes the focus control unit 133 to execute focus detection processing. The focus control unit 133 generates an A image by connecting a plurality of A signals obtained from a plurality of pixels arranged in the same row among a plurality of pixels included in a focus detection region of a pair of parallax images, In addition, a B image is generated by connecting a plurality of B signals. Then, the focus control unit 133 calculates the amount of correlation between the A image and the B image while shifting the relative position between the A image and the B image, and determines the relative position at which the similarity between the A image and the B image is highest. It is obtained as a phase difference (shift amount) between the A image and the B image. Further, the focus control unit 133 converts the phase difference into a defocus amount and a defocus direction.

次に、S305において、フォーカス制御部133は、S304で求めたデフォーカス量及びデフォーカス方向に対応するレンズ駆動量及び駆動方向に従ってフォーカスモータ132を駆動し、フォーカスレンズ131を移動させる。また、レンズ駆動処理が終了すると、主制御部151は、本フローをS301に戻す。   Next, in S305, the focus control unit 133 drives the focus motor 132 in accordance with the defocus amount and the lens driving amount and driving direction corresponding to the defocus direction obtained in S304, and moves the focus lens 131. When the lens driving process ends, the main control unit 151 returns the flow to S301.

以後、S301で電源スイッチがオフと判定されるまで、S302〜S305の処理が繰り返し実行される。これにより、時系列で逐次供給される複数の画像(フレーム)に対して追尾対象としての被写体の探索が行われ、被写体追尾機能が実現される。尚、図3では被写体追尾処理を逐次供給されるフレーム毎に実行するが、主制御部151の処理負荷及び消費電力の軽減を目的として、被写体追尾処理を数フレーム毎に行ってもよい。   Thereafter, the processing of S302 to S305 is repeatedly executed until it is determined in S301 that the power switch is turned off. Thus, a plurality of images (frames) sequentially supplied in time series are searched for a subject as a tracking target, and a subject tracking function is realized. In FIG. 3, the subject tracking process is performed for each sequentially supplied frame. However, the subject tracking process may be performed for every several frames for the purpose of reducing the processing load and power consumption of the main control unit 151.

<被写体認識処理>
図4は、被写体認識処理の例を示す。
このフローチャートは、図3のS303のサブルーチンである。
<Subject recognition processing>
FIG. 4 shows an example of subject recognition processing.
This flowchart is a subroutine of S303 in FIG.

まず、S401において、被写体認識部161は、撮像制御部143から画像(フレーム)を取得する。この後、S402において、被写体検出部201は、撮像制御部143からの画像に対して、中心位置及びサイズが異なる複数の評価領域を設定し、かつ各評価領域から被写体を検出する。被写体を検出する処理の詳細については、後述する。   First, in S401, the subject recognition unit 161 acquires an image (frame) from the imaging control unit 143. Thereafter, in S402, the subject detection unit 201 sets a plurality of evaluation areas having different center positions and sizes for the image from the imaging control unit 143, and detects a subject from each evaluation area. The details of the process of detecting a subject will be described later.

次に、S403において、特徴量領域登録部202は、被写体検出部201によって検出された被写体領域、又は被写体追尾部206によって検出された前フレームの特徴量領域に対応する画像領域に基づき、特徴量領域を登録する。本実施形態では、特徴量領域の登録は、最初の1フレームでは、被写体検出部201の結果に基づき行われ、それ以降のフレームでは、被写体追尾部206の結果に基づき行われる。   Next, in S403, the feature amount area registration unit 202 determines the feature amount based on the subject area detected by the subject detection unit 201 or the image area corresponding to the feature amount area of the previous frame detected by the subject tracking unit 206. Register an area. In the present embodiment, the registration of the feature amount area is performed based on the result of the subject detection unit 201 in the first one frame, and is performed based on the result of the subject tracking unit 206 in the subsequent frames.

次に、S404において、背景の動き量取得部203は、時系列で逐次供給される複数の画像に基づき、背景の動き量を取得する。背景の動き量を取得する処理の詳細については、後述する。この後、S405において、特徴量領域更新部204は、S404によって取得された背景の動き量と、後述するS406によって取得される前フレームの被写体の動き量とに基づき、特徴量領域のサイズの更新を行う。特徴量領域のサイズを更新する処理の詳細については、後述する。   Next, in S404, the background motion amount acquisition unit 203 acquires the background motion amount based on a plurality of images sequentially supplied in time series. The details of the process of acquiring the background motion amount will be described later. Thereafter, in S405, the feature amount area update unit 204 updates the size of the feature amount area based on the background motion amount acquired in S404 and the subject motion amount of the previous frame acquired in S406 described later. I do. Details of the process of updating the size of the feature amount area will be described later.

次に、S406において、被写体追尾部205は、時系列で逐次供給される複数の画像から、S405で更新された特徴量領域に対応する画像領域を探索する。例えば、被写体追尾部205は、当該特徴量領域と類似度が最も高い領域を当該特徴量領域に対応する画像領域とし、当該画像領域に基づき被写体の追尾を行う。被写体を追尾する処理の詳細については、後述する。   Next, in step S <b> 406, the subject tracking unit 205 searches for an image area corresponding to the feature amount area updated in step S <b> 405 from a plurality of images sequentially supplied in time series. For example, the subject tracking unit 205 sets a region having the highest similarity to the feature amount region as an image region corresponding to the feature amount region, and performs tracking of the subject based on the image region. The details of the processing for tracking the subject will be described later.

<被写体検出処理>
図5は、被写体検出処理の例を示す。
このフローチャートは、図4のS402のサブルーチンである。
<Subject detection processing>
FIG. 5 shows an example of the subject detection processing.
This flowchart is a subroutine of S402 in FIG.

まず、S501において、被写体検出部201は、画像の評価を行う評価領域を決定する。例えば、図6において、601は、入力画像であり、602は、評価画素であり、603は、評価領域候補である。図6(A)、図6(B)、及び図6(C)に示すように、各評価領域候補603は、互いに異なるサイズに設定される。評価画素602は、入力画像601の全画素からラスタ処理で順次選択される。   First, in step S501, the subject detection unit 201 determines an evaluation area in which an image is evaluated. For example, in FIG. 6, 601 is an input image, 602 is an evaluation pixel, and 603 is an evaluation area candidate. As shown in FIGS. 6A, 6B, and 6C, the evaluation region candidates 603 are set to different sizes. The evaluation pixels 602 are sequentially selected from all the pixels of the input image 601 by raster processing.

次に、S502において、被写体検出部201は、評価領域に対する外側評価領域を決定する。例えば、図7において、701は、入力画像であり、702は、評価画素であり、703は、評価領域であり、704は、外側評価領域である。図7に示すように、外側評価領域704の中心位置は、評価領域703の中心位置と同一である。また、外側評価領域704の中心位置から外枠までのサイズは、評価領域703の中心位置から外枠までのサイズよりも大きい。即ち、外側評価領域704は、評価領域703に対応する領域を除いたリング状の領域である。尚、外側評価領域704の中心位置から外枠までのサイズと、評価領域703の中心位置から外枠までのサイズとの差は、入力画像701のサイズに基づき決定し、例えば、入力画像701の水平サイズの10%とする。   Next, in S502, the subject detection unit 201 determines an outer evaluation area with respect to the evaluation area. For example, in FIG. 7, reference numeral 701 denotes an input image, 702 denotes an evaluation pixel, 703 denotes an evaluation area, and 704 denotes an outer evaluation area. As shown in FIG. 7, the center position of the outer evaluation area 704 is the same as the center position of the evaluation area 703. Further, the size from the center position of the outer evaluation area 704 to the outer frame is larger than the size from the center position of the evaluation area 703 to the outer frame. That is, the outer evaluation area 704 is a ring-shaped area excluding the area corresponding to the evaluation area 703. Note that the difference between the size from the center position of the outer evaluation area 704 to the outer frame and the size from the center position of the evaluation area 703 to the outer frame is determined based on the size of the input image 701. 10% of the horizontal size.

次に、S503において、被写体検出部201は、評価領域と外側評価領域に対応する画像信号の相違度を評価値として算出する。   Next, in step S <b> 503, the subject detection unit 201 calculates the difference between the image signals corresponding to the evaluation area and the outer evaluation area as an evaluation value.

評価値Dは、以下の式により算出される。

Figure 2020057302
The evaluation value D is calculated by the following equation.
Figure 2020057302

但し、dは、評価領域及び外側評価領域の色相情報から算出された相違度であり、pHiは、評価領域の色相情報がiである画素の数を表し、qHiは、外側評価領域のうち、色相情報がiである画素の数を表す。d、pSi、qSiは、それぞれ、彩度情報に関する値であり、d、pVi、qViは、輝度情報に関する値である。また、mは、色相情報、彩度情報、輝度情報が取り得る最大値である。 Here, d H is the difference calculated from the hue information of the evaluation area and the outer evaluation area, p Hi represents the number of pixels whose hue information of the evaluation area is i, and q Hi is the outer evaluation area. Represents the number of pixels whose hue information is i. d S , p Si , and q Si are values relating to chroma information, respectively, and d V , p Vi , and q Vi are values relating to luminance information. M is the maximum value that can be taken by hue information, saturation information, and luminance information.

次に、S504において、被写体検出部201は、未処理の評価領域があるか否か判定を行う。未処理の評価領域があれば、被写体検出部201は、本フローをS501に戻し、一連の処理を繰り返す。また、未処理の評価領域がなければ、被写体検出部201は、本フローをS505に進める。   Next, in S504, the subject detection unit 201 determines whether there is an unprocessed evaluation area. If there is an unprocessed evaluation area, the subject detection unit 201 returns the flow to S501, and repeats a series of processing. If there is no unprocessed evaluation area, the subject detection unit 201 advances the flow to S505.

次に、S505において、被写体検出部201は、被写体を決定する。即ち、被写体検出部201は、S503において算出した評価値のうち、最も高い評価値を有する領域を被写体として決定する。
尚、ここで説明した方法は、一例であり、被写体は、図5のフロー以外の方法により決定することも可能である。例えば、図5のフローにおいて、画像の奥行情報を加味して被写体を決定することも可能である。
Next, in S505, the subject detection unit 201 determines a subject. That is, the subject detection unit 201 determines the region having the highest evaluation value among the evaluation values calculated in S503 as the subject.
Note that the method described here is an example, and the subject can be determined by a method other than the flow in FIG. For example, in the flow of FIG. 5, it is also possible to determine a subject in consideration of depth information of an image.

<背景の動き量の取得処理>
図8は、背景動き量の取得処理の例を示す。
このフローチャートは、図4のS404のサブルーチンである。
<Process of acquiring the amount of background motion>
FIG. 8 illustrates an example of a process of acquiring a background motion amount.
This flowchart is a subroutine of S404 in FIG.

図8(A)は、推定された背景から、背景の動き量を取得する例である。
まず、S8011において、背景の動き量取得部202は、S401で逐次取得される複数の画像に基づいて、背景の推定を行う。例えば、背景の動き量取得部202は、S402の被写体検出処理により被写体が検出された場合に、当該被写体以外の画像領域を背景と推定することができる。
FIG. 8A is an example in which the amount of motion of the background is obtained from the estimated background.
First, in step S8011, the background motion amount acquisition unit 202 estimates a background based on a plurality of images sequentially acquired in step S401. For example, when a subject is detected by the subject detection processing in S402, the background motion amount acquisition unit 202 can estimate an image area other than the subject as the background.

次に、S8012において、背景の動き量取得部202は、S401で逐次取得される複数の画像のうち、現フレームに係る画像と、それよりも1フレーム前のフレームに係る画像とを使用し、推定された背景(画像)から背景の動きベクトルを算出する。   Next, in step S8012, the background motion amount acquisition unit 202 uses the image related to the current frame and the image related to the frame one frame earlier than the plurality of images sequentially acquired in step S401, A motion vector of the background is calculated from the estimated background (image).

最後に、S8013において、背景の動き量取得部202は、背景の動きベクトルに基づき、背景の動き量を取得する。   Finally, in step S8013, the background motion amount acquisition unit 202 acquires the background motion amount based on the background motion vector.

図8(B)は、特徴点マッチングにより複数の動きベクトルを算出し、これらから背景の動きベクトルを選択することで、背景の動き量を取得する例である。
まず、S8021において、背景の動き量取得部202は、S401で取得される画像内に複数の特徴点を均一に分布させ、これら均一に分布させた複数の特徴点から、特徴点毎に動きベクトルを算出する。
FIG. 8B is an example in which a plurality of motion vectors are calculated by feature point matching, and a background motion vector is selected from these to obtain a background motion amount.
First, in S8021, the background motion amount acquisition unit 202 uniformly distributes a plurality of feature points in the image acquired in S401, and calculates a motion vector for each feature point from the plurality of uniformly distributed feature points. Is calculated.

次に、S8022において、背景の動き量取得部202は、算出された複数の動きベクトルから背景の動きベクトルを選択する。背景の動きベクトルを選択する方法は、公知の手法を用いることができる。例えば、背景の動き量取得部202は、S8021で算出された複数の動きベクトルをヒストグラム化し、最大個数のビンに係る動きベクトルを背景の動きベクトルとして決定する。   Next, in S8022, the background motion amount acquisition unit 202 selects a background motion vector from the plurality of calculated motion vectors. As a method of selecting a background motion vector, a known method can be used. For example, the background motion amount acquisition unit 202 converts the plurality of motion vectors calculated in S8021 into a histogram, and determines the motion vector related to the maximum number of bins as the background motion vector.

最後に、S8023において、背景の動き量取得部202は、背景の動きベクトルに基づき、背景の動き量を取得する。   Finally, in S8023, the background motion amount acquisition unit 202 acquires the background motion amount based on the background motion vector.

尚、背景の動きベクトルを算出するに当たり、現フレームに係る画像の1フレーム前のフレームに係る画像から当該動きベクトルの始点を検出し、かつ現フレームに係る画像から当該動きベクトルの終点を検出するのが望ましい。但し、背景の動きベクトルから取得される背景の動き量の時間に対する方向が、後述する被写体の動き量の時間に対する方向と同じであれば、当該動きベクトルの始点と終点を逆にしてもよい。   In calculating the background motion vector, the start point of the motion vector is detected from the image of the frame immediately before the image of the current frame, and the end point of the motion vector is detected from the image of the current frame. It is desirable. However, if the direction of the amount of motion of the background obtained from the motion vector of the background with respect to time is the same as the direction of the amount of motion of the subject described later with respect to time, the start point and the end point of the motion vector may be reversed.

また、本実施形態では、背景の動き量を取得するに当たり、画像から算出される動きベクトルを使用したが、これに代えて、ジャイロセンサ、加速度センサなどで撮像装置の動きを検出し、当該撮像装置の動きに基づき背景の動き量を決定してもよい。   Further, in the present embodiment, the motion vector calculated from the image is used to obtain the amount of movement of the background. Alternatively, the motion of the imaging device is detected by a gyro sensor, an acceleration sensor, or the like, and The amount of movement of the background may be determined based on the movement of the device.

<特徴量領域の更新処理>
図9は、特徴量領域の更新処理の例を示す。
このフローチャートは、図4のS405のサブルーチンである。
<Feature amount area update processing>
FIG. 9 illustrates an example of a process of updating a feature amount area.
This flowchart is a subroutine of S405 in FIG.

まず、S901において、特徴量領域更新部204は、S8013又はS8023で取得した背景の動き量と、被写体の動き量との差を算出する。この差は、被写体と背景との位置関係の変化量に相当する。ここで、被写体の動き量は、被写体追尾部205が現フレームよりも前のフレームに係る画像から既に取得済みであり、例えば、RAM154に記憶されている。   First, in step S901, the feature amount area update unit 204 calculates a difference between the background motion amount acquired in step S8013 or S8023 and the subject motion amount. This difference corresponds to the amount of change in the positional relationship between the subject and the background. Here, the movement amount of the subject has already been acquired by the subject tracking unit 205 from an image related to a frame earlier than the current frame, and is stored in the RAM 154, for example.

被写体の動き量と背景の動き量との差に関しては、特徴量領域更新部204は、画像の水平方向での差の絶対値と、画像の垂直方向での差の絶対値とを算出し、それらの一方、又はそれらを足し合わせた値を、被写体の動き量と背景の動き量との差とする。例えば、特徴量領域更新部204は、水平方向における差の絶対値、及び垂直方向における差の絶対値うち、大きな値を有するほうを、被写体の動き量と背景の動き量との差として決定する。   Regarding the difference between the amount of movement of the subject and the amount of movement of the background, the feature amount area update unit 204 calculates the absolute value of the difference in the horizontal direction of the image and the absolute value of the difference in the vertical direction of the image, One of them or a value obtained by adding them is defined as a difference between the motion amount of the subject and the motion amount of the background. For example, the feature amount area update unit 204 determines the one having the larger value among the absolute value of the difference in the horizontal direction and the absolute value of the difference in the vertical direction as the difference between the motion amount of the subject and the motion amount of the background.

次に、S902において、特徴量領域更新部204は、被写体の動き量と背景の動き量との差に基づき、特徴量領域登録部202に登録された特徴量領域のサイズの更新を行い、本フローを終了する。   Next, in step S902, the feature amount area update unit 204 updates the size of the feature amount area registered in the feature amount area registration unit 202 based on the difference between the movement amount of the subject and the movement amount of the background. End the flow.

ここで、S902において、特徴量領域のサイズの更新を行う場合、特徴量領域更新部204は、被写体の動き量と背景の動き量との差、即ち、被写体と背景との位置関係の変化量が大きくなるに従い、特徴量領域のサイズを小さくする。また、特徴量領域更新部204は、被写体の動き量と背景の動き量との差が小さくなるに従い、特徴量領域のサイズを大きくする。   Here, in S902, when updating the size of the feature amount area, the feature amount area update unit 204 determines the difference between the movement amount of the subject and the movement amount of the background, that is, the change amount of the positional relationship between the subject and the background. Becomes larger, the size of the feature amount area is reduced. In addition, the feature amount area updating unit 204 increases the size of the feature amount area as the difference between the movement amount of the subject and the movement amount of the background decreases.

図10は、特徴量領域のサイズと、被写体と背景との動き量の差との関係を示す。
デフォルト値(初期値)は、特徴量領域登録部202に最初に登録される特徴量領域のサイズである。デフォルト値に対応する動き量の差は、基準値Δrefである。
FIG. 10 shows the relationship between the size of the feature amount area and the difference in the amount of movement between the subject and the background.
The default value (initial value) is the size of the feature amount area registered first in the feature amount area registration unit 202. The difference in the amount of motion corresponding to the default value is the reference value Δref.

同図によれば、動き量の差が基準値Δrefよりも大きい場合(ΔH)には、特徴量領域のサイズは、デフォルト値からそれよりも小さい値に変化する(矢印A)。また、動き量の差が基準値Δrefよりも小さい場合(ΔL)には、特徴量領域のサイズは、デフォルト値からそれよりも大きい値に変化する(矢印B)。即ち、動き量の差が大きくなるに従い、特徴量領域のサイズは、小さくなり、動き量の差が小さくなるに従い、特徴量領域のサイズは、大きくなる。但し、動き量の差が閾値Δthよりも大きい場合には、特徴量領域のサイズは、一定となる。   According to the figure, when the difference in the amount of motion is larger than the reference value Δref (ΔH), the size of the feature amount area changes from the default value to a value smaller than that (arrow A). When the difference between the motion amounts is smaller than the reference value Δref (ΔL), the size of the feature amount region changes from the default value to a larger value (arrow B). That is, as the difference in the amount of motion increases, the size of the feature amount region decreases, and as the difference in the amount of motion decreases, the size of the feature amount region increases. However, when the difference between the motion amounts is larger than the threshold value Δth, the size of the feature amount region is constant.

図11は、特徴量領域のサイズと動き量の差との関係を模式的に示す。
同図(A)は、nフレームに係る画像であり、S403で登録された特徴量領域1101を示す。特徴量領域1101のサイズは、例えば、デフォルト値を有するものとする。同図(B)は、(n+1)フレームに係る画像であり、同図(A)の画像に対して、動き量の差が無いか、又はほとんど無い場合である。同図(D)は、(n+1)フレームに係る画像であり、同図(A)の画像に対して、動き量の差が大きい場合である。
FIG. 11 schematically shows the relationship between the size of the feature amount area and the difference in the amount of motion.
FIG. 7A shows an image related to n frames, and shows the feature amount area 1101 registered in S403. The size of the feature amount area 1101 has, for example, a default value. FIG. 7B is an image relating to the (n + 1) frame, and is a case where there is no or almost no difference in the amount of motion from the image of FIG. FIG. 11D shows an image relating to the (n + 1) frame, and shows a case where the difference in the amount of motion is larger than the image shown in FIG.

同図(B)の場合、S405において、特徴量領域更新部204は、動き量の差が基準値Δrefよりも小さいと判断する。従って、同図(C)に示すように、特徴量領域更新部204は、特徴量領域1102のサイズを、同図(A)に示す特徴量領域1101のサイズよりも大きい値に更新する。   In the case of FIG. 11B, in S405, the feature amount area update unit 204 determines that the difference in the amount of motion is smaller than the reference value Δref. Therefore, as shown in FIG. 10C, the feature amount area updating unit 204 updates the size of the feature amount area 1102 to a value larger than the size of the feature amount area 1101 shown in FIG.

この場合、特徴量領域1102は、被写体領域よりも大きくなり、被写体と背景の情報を含むことになる。即ち、(n+2)フレームに係る画像において、特徴量領域1102に対応する画像領域を探索する際に、探索に用いる情報が多くなり、追尾性能を向上させることができる。しかも、特徴量領域1102に含まれる背景情報は、変化しないか、又はほとんど変化しないため、背景情報の変化により追尾が失敗するといった事態も発生しない。   In this case, the feature amount area 1102 is larger than the subject area and includes information on the subject and the background. That is, when searching for an image area corresponding to the feature amount area 1102 in an image related to the (n + 2) frame, information used for the search increases, and tracking performance can be improved. In addition, since the background information included in the feature amount area 1102 does not change or hardly changes, a situation in which tracking fails due to a change in the background information does not occur.

また、同図(D)の場合、S405において、特徴量領域更新部204は、動き量の差が基準値Δrefよりも大きいと判断する。従って、同図(E)に示すように、特徴量領域更新部204は、特徴量領域1103のサイズを、同図(A)に示す特徴量領域1101のサイズよりも小さい値に更新する。   In the case of FIG. 11D, in S405, the feature amount area update unit 204 determines that the difference in the amount of motion is larger than the reference value Δref. Accordingly, as shown in FIG. 10E, the feature amount area updating unit 204 updates the size of the feature amount area 1103 to a value smaller than the size of the feature amount area 1101 shown in FIG.

この場合、特徴量領域1103は、被写体領域とほぼ同じサイズとなり、背景を全く含まないか、又はほとんど含まなくなる。即ち、(n+2)フレームに係る画像において、特徴量領域1103に対応する画像領域を探索する際に、特徴量領域1103の背景情報の変化により、追尾が失敗してしまうといった事態が発生することはない。   In this case, the feature amount area 1103 has substantially the same size as the subject area, and does not include or hardly includes the background. That is, when searching for an image region corresponding to the feature amount region 1103 in an image related to the (n + 2) frame, a situation in which tracking fails due to a change in background information of the feature amount region 1103 does not occur. Absent.

<被写体追尾処理>
次に、図12を参照して、S405における被写体追尾処理について説明する。
被写体追尾部205は、S404で更新された特徴量領域に対応する画像領域を探索する。探索結果は、被写体追尾部205の出力情報として出力される。
<Subject tracking processing>
Next, the subject tracking processing in S405 will be described with reference to FIG.
The subject tracking unit 205 searches for an image area corresponding to the feature amount area updated in S404. The search result is output as output information of the subject tracking unit 205.

図12は、テンプレートマッチングの例を示す。
特徴量領域に対応する画像領域の探索は、テンプレートマッチングにより行うことが可能である。テンプレートマッチングは、画素パターンをテンプレートとして設定し、テンプレートとの類似度が最も高い領域を画像内で探索する技術である。テンプレートと画像領域との類似度としては、対応画素間の差分絶対値和のような相関量を用いることができる。
FIG. 12 shows an example of template matching.
The search for the image area corresponding to the feature amount area can be performed by template matching. The template matching is a technique of setting a pixel pattern as a template and searching for an area having the highest similarity with the template in the image. As the similarity between the template and the image area, a correlation amount such as a sum of absolute differences between corresponding pixels can be used.

図12(A)は、テンプレート1201と、その構成例1202と、を模式的に示す。テンプレートマッチングを行う場合、テンプレート1201の画素パターンが予め設定される。本実施形態では、テンプレート1201は、水平画素数W、及び垂直画素数Hのサイズを有する。そして、テンプレートマッチングは、テンプレート1201に含まれる画素の輝度値を用いて実行される。   FIG. 12A schematically shows a template 1201 and a configuration example 1202 thereof. When performing template matching, the pixel pattern of the template 1201 is set in advance. In the present embodiment, the template 1201 has a size of the number of horizontal pixels W and the number of vertical pixels H. Then, the template matching is performed using the luminance values of the pixels included in the template 1201.

テンプレート1201の特徴量T(i,j)は、図12(A)に示すような座標系を設定した場合、以下の式で表わされる。

Figure 2020057302
The characteristic amount T (i, j) of the template 1201 is represented by the following equation when a coordinate system as shown in FIG.
Figure 2020057302

図12(B)は、探索領域1203内の画像領域1204と、その構成例1205と、を模式的に示す。探索領域1203は、被写体の追尾を行う後フレームに係る画像においてパターンマッチングを行う範囲を表す。探索領域1203は、当該画像の全体であってもよいし、又は一部であってよい。   FIG. 12B schematically shows an image area 1204 in the search area 1203 and a configuration example 1205 thereof. A search area 1203 indicates a range in which pattern matching is performed in an image of a subsequent frame in which tracking of a subject is performed. The search area 1203 may be the whole or a part of the image.

探索領域1203内の座標は、(x,y)で表すものとする。画像領域1204は、探索領域1203から、テンプレート1201に対して最も類似度が高い画像領域を探索するためのもので、探索領域1203内をシフトする。このため、探索領域1203のサイズは、テンプレート1201のサイズ(水平画素数W、垂直画素数H)と同じに設定する。   The coordinates in the search area 1203 are represented by (x, y). The image area 1204 is for searching the search area 1203 for an image area having the highest similarity to the template 1201, and shifts within the search area 1203. For this reason, the size of the search area 1203 is set to be the same as the size of the template 1201 (the number of horizontal pixels W, the number of vertical pixels H).

被写体追尾部205は、画像領域1204をシフトさせる度に、画像領域1204に含まれる各画素の輝度値と、テンプレート1201に含まれる各画素の輝度値との類似度を算出する(パターンマッチング)。ここで、画像領域1204の特徴量S(i,j)は、図12(B)に示すような座標系を設定した場合、以下の式で表わされる。

Figure 2020057302
Every time the image area 1204 is shifted, the subject tracking unit 205 calculates the similarity between the luminance value of each pixel included in the image area 1204 and the luminance value of each pixel included in the template 1201 (pattern matching). Here, the characteristic amount S (i, j) of the image area 1204 is represented by the following equation when a coordinate system as shown in FIG. 12B is set.
Figure 2020057302

また、テンプレート1201と画像領域1204との類似性を表す評価値をV(x,y)とすると、V(x,y)は、以下の式に示す差分絶対和(SAD:Sum of Absolute Difference)で表される。

Figure 2020057302
但し、V(x,y)は、画像領域1204の左上頂点の座標(x,y)における評価値として表す。 Also, assuming that an evaluation value indicating the similarity between the template 1201 and the image area 1204 is V (x, y), V (x, y) is a sum of absolute difference (SAD) represented by the following equation. It is represented by
Figure 2020057302
Here, V (x, y) is represented as an evaluation value at the coordinates (x, y) of the upper left vertex of the image area 1204.

そして、被写体追尾部205は、画像領域1204を、探索領域1203の左上(x=0、y=0)から右方向(x方向)に1画素ずつシフトさせ、各位置において評価値V(x,y)を算出する。また、被写体追尾部205は、画像領域1204が探索領域1203の右端(x=X−W)に達すると、次に、画像領域1204を、左端(x=0)に戻し、かつ下方向(y方向)に1画素シフトさせる(y=1)。そして、被写体追尾部205は、再び、探索領域1203の左端(x=0、y=1)から右方向(x方向)に1画素ずつシフトさせ、各位置において評価値V(x,y)を算出する。   Then, the subject tracking unit 205 shifts the image area 1204 one pixel at a time from the upper left (x = 0, y = 0) of the search area 1203 to the right (x direction), and evaluates the evaluation value V (x, y) is calculated. Further, when the image area 1204 reaches the right end (x = X−W) of the search area 1203, the subject tracking unit 205 returns the image area 1204 to the left end (x = 0) and then moves down (y). 1) (y = 1). Then, the subject tracking unit 205 shifts one pixel at a time from the left end (x = 0, y = 1) of the search area 1203 to the right (x direction) again, and changes the evaluation value V (x, y) at each position. calculate.

被写体追尾部205は、以上の動作を、探索領域1203が探索領域1203の右下(x=X−W、y=Y−H)に達するまで、繰り返す。但し、Xは、探索領域1203の水平画素数(x方向の画素数)であり、Yは、探索領域1203の垂直画素数(y方向の画素数)である。また、被写体追尾部205は、各位置において算出された各評価値V(x,y)のうち、最も低い評価値を有する位置V(x,y)での画像領域1204が、テンプレート1201に対して類似度が最も高い画像領域であると判断する。   The subject tracking unit 205 repeats the above operation until the search area 1203 reaches the lower right of the search area 1203 (x = X−W, y = Y−H). Here, X is the number of horizontal pixels in the search area 1203 (the number of pixels in the x direction), and Y is the number of vertical pixels in the search area 1203 (the number of pixels in the y direction). Further, the subject tracking unit 205 determines that the image area 1204 at the position V (x, y) having the lowest evaluation value among the evaluation values V (x, y) calculated at each position is different from the template 1201. It is determined that the image area has the highest similarity.

このように、被写体追尾部205は、評価値V(x,y)が最小値を示す画素領域1204の位置を、特徴量領域に対応する画素領域の位置、即ち、被写体(追尾対象)の位置として決定する。尚、被写体追尾部205は、探索結果の信頼性が低い場合、例えば、評価値V(x,y)の最小値が閾値よりも大きい場合には、特徴量領域に対応する画像領域が見つけ出せなかったと決定してもよい。   As described above, the subject tracking unit 205 determines the position of the pixel region 1204 where the evaluation value V (x, y) indicates the minimum value, the position of the pixel region corresponding to the feature amount region, that is, the position of the subject (tracking target). To be determined. When the reliability of the search result is low, for example, when the minimum value of the evaluation value V (x, y) is larger than the threshold, the subject tracking unit 205 cannot find an image region corresponding to the feature amount region. May be determined.

本実施形態では、パターンマッチングにおいて、特徴量として輝度値を用いる例を説明したが、輝度値以外の要素(明度、色相、彩度など)を用いてもよい。また、パターンマッチングにおける評価値V(x,y)は、複数の要素(輝度値、明度、色相、彩度など)を考慮して決定してもよい。さらに、評価値V(x,y)は、SADに代えて、正規化相互相関(NCC: Normalized Cross−Correlation)、ZNCCなどにより表すことも可能である。   In the present embodiment, an example in which a luminance value is used as a feature amount in pattern matching has been described. However, elements (lightness, hue, saturation, and the like) other than the luminance value may be used. Further, the evaluation value V (x, y) in pattern matching may be determined in consideration of a plurality of elements (such as luminance value, lightness, hue, and saturation). Further, the evaluation value V (x, y) can be represented by a normalized cross-correlation (NCC), a ZNCC, or the like instead of the SAD.

<その他の実施形態>
上述の実施形態の各機能又は各処理を実現するプログラムは、予め撮像装置100内のフラッシュメモリ155、又はこれに代えてROM(図示せず)にインストールしておくことが可能である。また、上述の実施形態の1以上の機能又は処理を実現するプログラムは、ネットワーク又は記憶媒体を介して撮像装置100に供給することも可能である。この場合、撮像装置100内の主制御部151、又はこれに代えて少なくとも1つのプロセッサ(図示せず)が当該供給されたプログラムを実行することで、上述の実施形態の各機能又は各処理が実現される。
<Other embodiments>
A program for realizing each function or each process of the above-described embodiment can be installed in advance in the flash memory 155 in the imaging device 100 or in a ROM (not shown) instead of the flash memory 155. In addition, a program that implements one or more functions or processes of the above-described embodiment can be supplied to the imaging device 100 via a network or a storage medium. In this case, the main control unit 151 in the imaging device 100 or at least one processor (not shown) instead of the main control unit 151 executes the supplied program, so that each function or each process of the above-described embodiment is performed. Is achieved.

また、上述の実施形態の各機能又は各処理は、上述のように、コンピュータにインストールされたプログラム(ソフトウェア)により実現可能であると共に、ハードウェア(回路)によっても実現可能である。例えば、上述の実施形態の1以上の機能又は処理は、ASIC(Application Specific IC)、FPGA(Field Programmable Gate Array)などの回路でも実現可能である。   Further, as described above, each function or each process of the above-described embodiment can be realized by a program (software) installed in a computer and also by hardware (circuit). For example, one or more functions or processes of the above-described embodiment can be realized by a circuit such as an ASIC (Application Specific IC) or an FPGA (Field Programmable Gate Array).

<むすび>
以上、本発明によれば、画像情報に基づき特徴量領域のサイズを決定することで、追尾状況によらず常に高い追尾性能を得ることが可能な撮像装置を提供できる。例えば、被写体と背景の位置関係が大きく変化する条件下での追尾においては、特徴量領域を被写体領域とほぼ同じサイズとし、被写体と背景の位置関係がほとんど変化しない条件下での追尾においては、特徴量領域を被写体領域よりも大きくする。これにより、追尾状況によらず常に高い追尾性能を得ることが可能となる。
<Conclusion>
As described above, according to the present invention, it is possible to provide an imaging apparatus that can always obtain high tracking performance regardless of a tracking situation by determining the size of a feature amount area based on image information. For example, in tracking under conditions in which the positional relationship between the subject and the background changes significantly, the feature amount region is set to be approximately the same size as the subject region, and in tracking under conditions in which the positional relationship between the subject and the background hardly changes, The feature amount area is made larger than the subject area. This makes it possible to always obtain high tracking performance regardless of the tracking situation.

161: 被写体認識部
201: 被写体検出部
202: 特徴量領域登録部
203: 背景の動き量取得部
204: 特徴量領域更新部
205: 被写体追尾部
161: subject recognition unit 201: subject detection unit 202: feature amount region registration unit 203: background motion amount acquisition unit 204: feature amount region update unit 205: subject tracking unit

Claims (15)

第1の画像及び第2の画像を時系列で取得可能な撮像装置であって、
前記第1の画像から追尾対象としての被写体を検出する被写体検出手段と、
前記第1の画像に基づき前記被写体を含む特徴量領域を登録する特徴量領域登録手段と、
前記第1及び第2の画像に係る情報に基づき、前記特徴量領域登録手段に登録された前記特徴量領域のサイズの更新を行う特徴量領域更新手段と、
前記第2の画像から、前記特徴量領域更新手段で更新された前記特徴量領域に対応する画像領域の探索を行うことで、前記被写体の追尾を行う被写体追尾手段と、を備える、
ことを特徴とする撮像装置。
An imaging device capable of acquiring a first image and a second image in time series,
Subject detection means for detecting a subject as a tracking target from the first image;
Feature amount region registration means for registering a feature amount region including the subject based on the first image;
A feature amount area update unit that updates a size of the feature amount area registered in the feature amount area registration unit based on information related to the first and second images;
Subject tracking means for tracking the subject by performing a search for an image area corresponding to the feature quantity area updated by the feature quantity area updating means from the second image.
An imaging device characterized by the above-mentioned.
前記特徴量領域登録手段は、前記第1の画像に基づき登録する前記特徴量領域のサイズを初期値とする、
ことを特徴とする請求項1に記載の撮像装置。
The feature amount area registration unit sets a size of the feature amount area to be registered based on the first image as an initial value.
The imaging device according to claim 1, wherein:
前記特徴量領域更新手段は、前記被写体とその背景との位置関係の変化量が基準値よりも大きい場合に、前記特徴量領域のサイズを前記初期値よりも小さくし、かつ前記変化量が前記基準値よりも小さい場合に、前記特徴量領域のサイズを前記初期値よりも大きくする、
ことを特徴とする請求項2に記載の撮像装置。
The feature amount area update unit, when the amount of change in the positional relationship between the subject and its background is larger than a reference value, makes the size of the feature amount area smaller than the initial value, and the amount of change is smaller than the initial value. When smaller than a reference value, the size of the feature amount region is larger than the initial value,
The imaging device according to claim 2, wherein:
前記特徴量領域更新手段は、前記変化量が大きくなるに従い前記特徴量領域のサイズを小さくし、かつ前記変化量が小さくなるに従い前記特徴量領域のサイズを大きくする、
ことを特徴とする請求項3に記載の撮像装置。
The feature amount area update unit reduces the size of the feature amount area as the change amount increases, and increases the size of the feature amount area as the change amount decreases.
The imaging device according to claim 3, wherein:
前記特徴量領域更新手段は、前記変化量が閾値よりも大きい場合に、前記特徴量領域のサイズを一定にする、
ことを特徴とする請求項4に記載の撮像装置。
The feature amount area update unit, when the change amount is larger than a threshold, makes the size of the feature amount area constant,
The imaging device according to claim 4, wherein:
前記被写体追尾手段による前記探索が行われ、かつ前記追尾が成功の場合に、前記特徴量領域登録手段は、既に登録されている前記特徴量領域に代えて、前記探索に用いた前記特徴量領域を新たに登録する、
ことを特徴とする請求項1乃至5のいずれか1項に記載の撮像装置。
When the search by the subject tracking unit is performed and the tracking is successful, the feature amount region registration unit replaces the already registered feature amount region with the feature amount region used in the search. Register a new,
The imaging device according to claim 1, wherein:
前記情報は、画面の平均輝度、ホワイトバランス、及びGPS機能による位置情報のうちの少なくとも1つを含む、
ことを特徴とする請求項1乃至6のいずれか1項に記載の撮像装置。
The information includes at least one of an average brightness of a screen, a white balance, and positional information based on a GPS function.
The imaging device according to claim 1, wherein:
前記情報は、前記被写体の動き量と、前記被写体の背景の動き量とを含む、
ことを特徴とする請求項1乃至6のいずれか1項に記載の撮像装置。
The information includes a motion amount of the subject and a motion amount of a background of the subject.
The imaging device according to claim 1, wherein:
前記第1及び第2の画像から前記背景の動き量を取得する背景の動き量取得手段をさらに備え、
前記被写体追尾手段は、前記第1及び第2の画像から前記被写体の動き量を取得し、
前記特徴量領域更新手段は、前記被写体の動き量及び前記背景の動き量に基づき前記特徴量領域のサイズの更新を行う、
ことを特徴とする請求項8に記載の撮像装置。
The image processing apparatus further includes a background motion amount acquisition unit that acquires the background motion amount from the first and second images,
The subject tracking means acquires a motion amount of the subject from the first and second images,
The feature amount region update unit updates the size of the feature amount region based on the amount of movement of the subject and the amount of movement of the background.
The imaging device according to claim 8, wherein:
前記背景の動き量取得手段は、
前記第1及び第2の画像から前記背景を推定し、
前記推定された背景に基づき、前記第1及び第2の画像間の動きベクトルを検出し、
前記動きベクトルに基づき、前記背景の動き量を取得する、
ことを特徴とする請求項9に記載の撮像装置。
The background motion amount obtaining means includes:
Estimating the background from the first and second images;
Detecting a motion vector between the first and second images based on the estimated background;
Obtaining the amount of motion of the background based on the motion vector;
The imaging device according to claim 9, wherein:
前記背景の動き量取得手段は、
ジャイロセンサ及び加速度センサの少なくとも1つにより前記撮像装置の動きを検出し、
前記撮像装置の動きに基づき、前記背景の動き量を取得する、
ことを特徴とする請求項9に記載の撮像装置。
The background motion amount obtaining means includes:
Detecting the movement of the imaging device by at least one of a gyro sensor and an acceleration sensor,
Acquiring the amount of movement of the background based on the movement of the imaging device;
The imaging device according to claim 9, wherein:
前記被写体の追尾に基づき前記被写体に対する撮影条件を制御する制御手段をさらに備える、
ことを特徴とする請求項1乃至11のいずれか1項に記載の撮像装置。
The apparatus further includes control means for controlling a shooting condition for the subject based on tracking of the subject.
The imaging device according to claim 1, wherein:
第1の画像及び第2の画像を時系列で撮像する撮像素子と、
前記第1の画像及び前記第2の画像を処理する少なくとも1つのプロセッサと、を備え、
前記少なくとも1つのプロセッサは、
前記第1の画像から追尾対象としての被写体を検出する被写体検出手段と、
前記第1の画像に基づき前記被写体を含む特徴量領域を登録する特徴量領域登録手段と、
前記第1及び第2の画像に係る情報に基づき、前記特徴量領域登録手段に登録された前記特徴量領域のサイズの更新を行う特徴量領域更新手段と、
前記第2の画像から、前記特徴量領域更新手段で更新された前記特徴量領域に対応する画像領域の探索を行うことで、前記被写体の追尾を行う被写体追尾手段と、を備える、
ことを特徴とする撮像装置。
An image sensor that captures the first image and the second image in time series;
At least one processor for processing the first image and the second image,
The at least one processor comprises:
Subject detection means for detecting a subject as a tracking target from the first image;
Feature amount region registration means for registering a feature amount region including the subject based on the first image;
A feature amount area update unit that updates a size of the feature amount area registered in the feature amount area registration unit based on information related to the first and second images;
Subject tracking means for tracking the subject by performing a search for an image area corresponding to the feature quantity area updated by the feature quantity area updating means from the second image.
An imaging device characterized by the above-mentioned.
第1の画像及び第2の画像を時系列で取得可能な撮像装置の制御方法であって、
前記第1の画像から追尾対象としての被写体を検出する被写体検出工程と、
前記第1の画像に基づき前記被写体を含む特徴量領域を登録する特徴量領域登録工程と、
前記第1及び第2の画像に係る情報に基づき、前記特徴量領域登録手段に登録された前記特徴量領域のサイズの更新を行う特徴量領域更新工程と、
前記第2の画像から、前記特徴量領域更新手段で更新された前記特徴量領域に対応する画像領域の探索を行うことで、前記被写体の追尾を行う被写体追尾工程と、を備える、
ことを特徴とする制御方法。
A control method of an imaging device capable of acquiring a first image and a second image in time series,
A subject detection step of detecting a subject as a tracking target from the first image;
A feature amount region registration step of registering a feature amount region including the subject based on the first image;
A feature amount region updating step of updating the size of the feature amount region registered in the feature amount region registration unit based on information on the first and second images;
A subject tracking step of performing tracking of the subject by performing a search for an image area corresponding to the feature amount area updated by the feature amount area updating unit from the second image.
A control method characterized in that:
請求項1乃至13のいずれか1項に記載の撮像装置の各手段としてコンピュータを機能させるためのプログラム。   A program for causing a computer to function as each unit of the imaging apparatus according to claim 1.
JP2018188925A 2018-10-04 2018-10-04 IMAGING DEVICE, CONTROL METHOD THEREOF, AND PROGRAM Active JP7278737B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018188925A JP7278737B2 (en) 2018-10-04 2018-10-04 IMAGING DEVICE, CONTROL METHOD THEREOF, AND PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018188925A JP7278737B2 (en) 2018-10-04 2018-10-04 IMAGING DEVICE, CONTROL METHOD THEREOF, AND PROGRAM

Publications (2)

Publication Number Publication Date
JP2020057302A true JP2020057302A (en) 2020-04-09
JP7278737B2 JP7278737B2 (en) 2023-05-22

Family

ID=70107384

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018188925A Active JP7278737B2 (en) 2018-10-04 2018-10-04 IMAGING DEVICE, CONTROL METHOD THEREOF, AND PROGRAM

Country Status (1)

Country Link
JP (1) JP7278737B2 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004206320A (en) * 2002-12-25 2004-07-22 Matsushita Electric Ind Co Ltd Image recognition device and method
JP2005346425A (en) * 2004-06-03 2005-12-15 Matsushita Electric Ind Co Ltd Automatic tracking system and automatic tracking method
JP2007068008A (en) * 2005-09-01 2007-03-15 Matsushita Electric Ind Co Ltd Automatic tracking apparatus
JP2008011497A (en) * 2006-06-01 2008-01-17 Canon Inc Camera apparatus
JP2012073997A (en) * 2010-09-01 2012-04-12 Ricoh Co Ltd Object tracking device, object tracking method, and program thereof
JP2017151535A (en) * 2016-02-22 2017-08-31 株式会社リコー Image processing device, object recognition device, equipment control system, image processing method, and program
JP2017215525A (en) * 2016-06-01 2017-12-07 キヤノン株式会社 Imaging device and method for controlling the same, program, and storage medium
JP2018018393A (en) * 2016-07-29 2018-02-01 オムロン株式会社 Image processing device and image processing method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004206320A (en) * 2002-12-25 2004-07-22 Matsushita Electric Ind Co Ltd Image recognition device and method
JP2005346425A (en) * 2004-06-03 2005-12-15 Matsushita Electric Ind Co Ltd Automatic tracking system and automatic tracking method
JP2007068008A (en) * 2005-09-01 2007-03-15 Matsushita Electric Ind Co Ltd Automatic tracking apparatus
JP2008011497A (en) * 2006-06-01 2008-01-17 Canon Inc Camera apparatus
JP2012073997A (en) * 2010-09-01 2012-04-12 Ricoh Co Ltd Object tracking device, object tracking method, and program thereof
JP2017151535A (en) * 2016-02-22 2017-08-31 株式会社リコー Image processing device, object recognition device, equipment control system, image processing method, and program
JP2017215525A (en) * 2016-06-01 2017-12-07 キヤノン株式会社 Imaging device and method for controlling the same, program, and storage medium
JP2018018393A (en) * 2016-07-29 2018-02-01 オムロン株式会社 Image processing device and image processing method

Also Published As

Publication number Publication date
JP7278737B2 (en) 2023-05-22

Similar Documents

Publication Publication Date Title
JP6106921B2 (en) Imaging apparatus, imaging method, and imaging program
JP4914045B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
US10013632B2 (en) Object tracking apparatus, control method therefor and storage medium
JP7223079B2 (en) IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND IMAGING APPARATUS
JP6656035B2 (en) Image processing apparatus, imaging apparatus, and control method for image processing apparatus
JP2009213114A (en) Imaging device and program
KR102592745B1 (en) Posture estimating apparatus, posture estimating method and computer program stored in recording medium
JP2019101996A (en) Image processing apparatus and image processing method reducing noise by composing plural captured images
JP6564284B2 (en) Image processing apparatus and image processing method
JP2012120152A (en) Imaging apparatus and control method of the same
US20210256713A1 (en) Image processing apparatus and image processing method
JP4807582B2 (en) Image processing apparatus, imaging apparatus, and program thereof
JP6178646B2 (en) Imaging apparatus and image shake correction processing method
JP5067047B2 (en) Imaging device
JP7278737B2 (en) IMAGING DEVICE, CONTROL METHOD THEREOF, AND PROGRAM
JP5451364B2 (en) Subject tracking device and control method thereof
JP6218520B2 (en) Image processing apparatus, image processing method, and program
JP7458723B2 (en) Image processing device, imaging device, control method, and program
US12008773B2 (en) Object tracking apparatus and control method thereof using weight map based on motion vectors
JP2020043544A (en) Imaging device, control method therefor, program, and storage medium
JP6493746B2 (en) Image tracking device and image tracking method
JP6381212B2 (en) Imaging apparatus and control method thereof
US20220270264A1 (en) Image processing device, control method thereof, imaging device, and recording medium
JP7170452B2 (en) Imaging device and its control method
JP2018072941A (en) Image processing device, image processing method, program, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211004

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221017

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221227

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230411

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230510

R151 Written notification of patent or utility model registration

Ref document number: 7278737

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151