JP2022055043A - Image processing device, image processing method, image processing program, and imaging apparatus - Google Patents

Image processing device, image processing method, image processing program, and imaging apparatus Download PDF

Info

Publication number
JP2022055043A
JP2022055043A JP2020162404A JP2020162404A JP2022055043A JP 2022055043 A JP2022055043 A JP 2022055043A JP 2020162404 A JP2020162404 A JP 2020162404A JP 2020162404 A JP2020162404 A JP 2020162404A JP 2022055043 A JP2022055043 A JP 2022055043A
Authority
JP
Japan
Prior art keywords
amount
tracking target
image processing
image pickup
image
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
JP2020162404A
Other languages
Japanese (ja)
Other versions
JP7357596B2 (en
Inventor
陽太 赤石
Yota Akashi
俊輝 小林
Toshiteru Kobayashi
友也 平川
Tomoya Hirakawa
優太 渡邉
Yuta Watanabe
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.)
Fujifilm Corp
Original Assignee
Fujifilm 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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2020162404A priority Critical patent/JP7357596B2/en
Publication of JP2022055043A publication Critical patent/JP2022055043A/en
Application granted granted Critical
Publication of JP7357596B2 publication Critical patent/JP7357596B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

To provide an image processing device, an image processing method, an image processing program, and an imaging apparatus that can estimate a tracking target in a short time.SOLUTION: An image processing device processes a moving image captured by an imaging apparatus. The image processing device includes a processor. The processor performs a process for calculating motion vectors from moving images in chronological order within a specified period of time, a process for calculating the amount of change in motion vectors in chronological order, and a process for estimating a tracking target on the basis of the amount of change in motion vectors, and estimates a subject with a decreasing trend in the amount of change in the motion vector as a tracking target.SELECTED DRAWING: Figure 9

Description

本発明は、画像処理装置、画像処理方法及び画像処理プログラム並びに撮像装置に係り、特に撮像装置で撮像された動画像を処理する画像処理装置、画像処理方法及び画像処理プログラム並びに撮像装置に関する。 The present invention relates to an image processing device, an image processing method and an image processing program, and an image pickup device, and more particularly to an image processing device, an image processing method and an image processing program, and an image pickup device for processing a moving image captured by the image pickup device.

動画像におけるフレーム間の動きベクトルに基づいて、画面内の主要被写体を推定する技術が知られている(たとえば、特許文献1-4等)。 A technique for estimating a main subject in a screen based on a motion vector between frames in a moving image is known (for example, Patent Documents 1-4 and the like).

特開2012-160780号公報Japanese Unexamined Patent Publication No. 2012-160780 特開2020-95673号公報Japanese Unexamined Patent Publication No. 2020-95673 特開2009-65573号公報Japanese Unexamined Patent Publication No. 2009-65573 特開2010-272953号公報Japanese Unexamined Patent Publication No. 2010-272953

本開示の技術に係る1つの実施形態は、追尾対象を短時間で推定できる画像処理装置、画像処理方法及び画像処理プログラム並びに撮像装置を提供する。 One embodiment according to the technique of the present disclosure provides an image processing device, an image processing method, an image processing program, and an image pickup device capable of estimating a tracking target in a short time.

(1)撮像装置で撮像された動画像を処理する画像処理装置であって、プロセッサを備え、プロセッサは、特定期間内で動画像から動きベクトルを時系列順に算出する処理と、動きベクトルの変化量を時系列順に算出する処理と、動きベクトルの変化量に基づいて、追尾対象を推定する処理と、を行う、画像処理装置。 (1) An image processing device that processes a moving image captured by an image pickup device, the processor includes a processor, which calculates a motion vector from the moving image in chronological order within a specific period, and changes in the motion vector. An image processing device that performs a process of calculating quantities in chronological order and a process of estimating a tracking target based on the amount of change in a motion vector.

(2)プロセッサは、動きベクトルの変化量の変化傾向に基づいて、追尾対象を推定する、(1)の画像処理装置。 (2) The processor is an image processing device according to (1), which estimates a tracking target based on a change tendency of a change amount of a motion vector.

(3)プロセッサは、動きベクトルの変化量が減少傾向にある被写体を追尾対象と推定する、(2)の画像処理装置。 (3) The processor is an image processing device according to (2), which estimates a subject whose motion vector change amount is decreasing as a tracking target.

(4)プロセッサは、動きベクトルの変化量が複数フレームに亘り減少している被写体を追尾対象と推定する、(3)の画像処理装置。 (4) The processor is an image processing device according to (3), which estimates a subject whose motion vector change amount is reduced over a plurality of frames as a tracking target.

(5)プロセッサは、撮像装置の動き量に基づいて、特定期間を開始する、(1)から(4)のいずれか一の画像処理装置。 (5) The processor is an image processing device according to any one of (1) to (4), which starts a specific period based on the amount of movement of the image pickup device.

(6)プロセッサは、特定期間内における動きベクトルの変化量の平均値を算出する処理を更に行い、プロセッサは、動きベクトルの変化量の平均値が、マイナス方向において閾値を超える被写体を追尾対象と推定する、(1)から(5)のいずれか一の画像処理装置。 (6) The processor further performs a process of calculating the average value of the change amount of the motion vector within a specific period, and the processor targets a subject whose average value of the change amount of the motion vector exceeds the threshold value in the negative direction. The image processing unit according to any one of (1) to (5) to be estimated.

(7)プロセッサは、動画像を撮像した際の撮像装置の動き量に基づいて、閾値を設定する処理を更に行う、(6)の画像処理装置。 (7) The image processing device according to (6), wherein the processor further performs a process of setting a threshold value based on the amount of movement of the image pickup device when a moving image is captured.

(8)プロセッサは、撮像装置の動き量が大きくなるほど閾値をマイナス方向に大きく設定する、(7)の画像処理装置。 (8) The processor is an image processing device according to (7), which sets a larger threshold value in the negative direction as the amount of movement of the image pickup device increases.

(9)プロセッサは、撮像装置の動き量が基準値を超える場合、閾値を第1閾値に設定し、撮像装置の動き量が基準値以下の場合、閾値を第1閾値よりもマイナス方向において小さい第2閾値に設定する、(8)の画像処理装置。 (9) The processor sets the threshold value to the first threshold value when the movement amount of the image pickup device exceeds the reference value, and when the movement amount of the image pickup device is equal to or less than the reference value, the threshold value is smaller in the negative direction than the first threshold value. The image processing device of (8), which is set to the second threshold value.

(10)プロセッサは、動画像を撮像した際の撮像装置の動き量に基づいて、特定期間を設定する処理を更に行う、(1)から(9)のいずれか一の画像処理装置。 (10) The image processing device according to any one of (1) to (9), wherein the processor further performs a process of setting a specific period based on the amount of movement of the image pickup device when a moving image is captured.

(11)プロセッサは、撮像装置の動き量が大きくなるほど特定期間を長く設定する、(10)の画像処理装置。 (11) The processor is an image processing device according to (10), which sets a specific period longer as the amount of movement of the image pickup device increases.

(12)プロセッサは、撮像装置の動き量が基準値を超える場合、特定期間を第1特定期間に設定し、撮像装置の動き量が基準値以下の場合、特定期間を第1特定期間よりも短い第2特定期間に設定する、(11)の画像処理装置。 (12) The processor sets the specific period to the first specific period when the movement amount of the image pickup device exceeds the reference value, and sets the specific period to the first specific period when the movement amount of the image pickup device is equal to or less than the reference value. The image processing device of (11) set in a short second specific period.

(13)プロセッサは、動画像に基づいて、撮像装置の動き量を算出する処理を更に行う、(1)から(12)のいずれか一の画像処理装置。 (13) The image processing device according to any one of (1) to (12), wherein the processor further performs a process of calculating the amount of movement of the image pickup device based on the moving image.

(14)撮像装置は、本体の動き量を検出するセンサを備え、プロセッサは、センサから撮像装置の動き量の情報を取得する処理を更に行う、(1)から(12)のいずれか一の画像処理装置。 (14) The image pickup device includes a sensor for detecting the movement amount of the main body, and the processor further performs a process of acquiring information on the movement amount of the image pickup device from the sensor, which is one of (1) to (12). Image processing device.

(15)(1)から(14)のいずれか一の画像処理装置と、推定した追尾対象に焦点を合わせるようにフォーカスレンズを移動させて焦点調節を行う焦点調節部と、を備えた撮像装置。 (15) An image pickup device including any one of the image processing devices (1) to (14) and a focus adjustment unit that adjusts the focus by moving the focus lens so as to focus on the estimated tracking target. ..

(16)撮像装置で撮像された動画像を処理する画像処理方法であって、特定期間内で動画像から動きベクトルを時系列順に算出するステップと、動きベクトルの変化量を時系列順に算出するステップと、動きベクトルの変化量に基づいて、追尾対象を推定するステップと、を含む、画像処理方法。 (16) An image processing method for processing a moving image captured by an imaging device, in which a step of calculating a motion vector from a moving image in chronological order within a specific period and a step of calculating a change amount of the motion vector in chronological order are calculated. An image processing method including a step and a step of estimating a tracking target based on a change amount of a motion vector.

(17)撮像装置で撮像された動画像を処理する画像処理プログラムであって、特定期間内で動画像から動きベクトルを時系列順に算出する機能と、動きベクトルの変化量を時系列順に算出する機能と、動きベクトルの変化量に基づいて、追尾対象を推定する機能と、をコンピュータに実現させる画像処理プログラム。 (17) An image processing program that processes a moving image captured by an image pickup device, which has a function of calculating a motion vector from a moving image in chronological order within a specific period and a function of calculating a change amount of the motion vector in chronological order. An image processing program that enables a computer to realize a function and a function to estimate the tracking target based on the amount of change in the motion vector.

撮像装置のハードウェア構成の一例を示すブロック図Block diagram showing an example of the hardware configuration of the image pickup device 追尾AFを行う際にCPUが実現する機能の一例を示すブロックA block showing an example of the functions realized by the CPU when performing tracking AF 追尾対象設定部が有する機能のブロック図Block diagram of the function of the tracking target setting unit 撮像により得られる時系列の画像の一例を示す図The figure which shows an example of the time series image obtained by the imaging. 図4に示した時系列順の2つの画像を重畳して表示した画像An image displayed by superimposing two images in chronological order shown in FIG. 図4に示した時系列順の2つの画像から得られる動きベクトルの分布の一例を示す図A diagram showing an example of the distribution of motion vectors obtained from the two images in chronological order shown in FIG. 追尾対象の動きベクトルの変化量の推移の一例を示すグラフA graph showing an example of changes in the amount of change in the motion vector to be tracked. 背景の動きベクトルの変化量の推移の一例を示すグラフA graph showing an example of changes in the amount of change in the background motion vector 追尾対象の設定処理の手順を示すフローチャートFlowchart showing the procedure of tracking target setting process 追尾対象の動きベクトルの変化量の推移の他の一例を示すグラフA graph showing another example of changes in the amount of change in the motion vector to be tracked. 追尾対象設定部が有する機能のブロック図Block diagram of the function of the tracking target setting unit ブレ検出センサが備えられている場合に追尾対象設定部が有する機能のブロック図Block diagram of the function of the tracking target setting unit when a blur detection sensor is provided 追尾対象の推定処理を自動で開始する場合に追尾対象設定部が有する機能のブロック図Block diagram of the function of the tracking target setting unit when the tracking target estimation process is automatically started. 撮像装置の動き量に基づいて追尾対象の設定処理を開始する場合の処理の手順を示すフローチャートA flowchart showing a processing procedure when starting a tracking target setting process based on the amount of movement of the image pickup device.

以下、添付図面に従って本発明の好ましい実施の形態について詳説する。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

ここでは、追尾AF(AF:Auto Focus)の機能を備えた撮像装置において、追尾対象を自動設定する場合を例に説明する。 Here, a case where the tracking target is automatically set in the image pickup apparatus equipped with the tracking AF (AF: Auto Focus) function will be described as an example.

追尾AFとは、撮像装置のAF機能の一つであり、動く被写体を追いかけて焦点を合わせ続ける機能である。追尾AFでは、最初に追尾対象とする被写体を設定する必要がある。しかし、追尾対象とする被写体が最初から動いている場合、この設定をユーザが手動(ボタン操作等)で行うことは難しい。したがって、このような場合は、装置側で追尾対象とする被写体を自動で設定できることが望ましい。 Tracking AF is one of the AF functions of an image pickup device, and is a function of chasing a moving subject and keeping it in focus. In tracking AF, it is first necessary to set the subject to be tracked. However, when the subject to be tracked is moving from the beginning, it is difficult for the user to manually perform this setting (button operation, etc.). Therefore, in such a case, it is desirable that the device can automatically set the subject to be tracked.

本実施の形態では、追尾AFを備えた撮像装置において、追尾対象を自動設定できる撮像装置について説明する。 In this embodiment, an image pickup device equipped with tracking AF that can automatically set a tracking target will be described.

[撮像装置のハードウェア構成]
図1は、撮像装置のハードウェア構成の一例を示すブロック図である。
[Hardware configuration of image pickup device]
FIG. 1 is a block diagram showing an example of a hardware configuration of an image pickup apparatus.

本実施の形態の撮像装置10は、撮像光学系12、撮像光学系駆動部14、撮像部16、表示部18、記憶部20、接続部22、操作部24、CPU(Central Processing Unit)26、ROM(Read Only Memory)28、及び、RAM(Random Access Memory)30等を備える。 The image pickup apparatus 10 of the present embodiment includes an image pickup optical system 12, an image pickup optical system drive unit 14, an image pickup unit 16, a display unit 18, a storage unit 20, a connection unit 22, an operation unit 24, a CPU (Central Processing Unit) 26, and the like. A ROM (Read Only Memory) 28, a RAM (Random Access Memory) 30, and the like are provided.

撮像光学系12は、被写体像を撮像部16の撮像素子に結像させる複数のレンズ群、及び、光量を調節する絞り12B等を備える。撮像光学系12は、一部のレンズ群又は全体を光軸に沿って前後移動させることにより、焦点調節される。焦点調節用のレンズ群は、撮像光学系12におけるフォーカスレンズ12Aを構成する。 The image pickup optical system 12 includes a plurality of lens groups for forming a subject image on the image pickup element of the image pickup unit 16, a diaphragm 12B for adjusting the amount of light, and the like. The image pickup optical system 12 is focused by moving a part of the lens group or the whole lens group back and forth along the optical axis. The lens group for focus adjustment constitutes the focus lens 12A in the image pickup optical system 12.

撮像光学系駆動部14は、フォーカスレンズ12Aを駆動するフォーカスレンズ駆動部14A、及び、絞り12Bを駆動する絞り駆動部14Bを有する。フォーカスレンズ駆動部14Aは、フォーカスレンズ12Aを駆動するアクチュエータ及びその駆動回路を有する。絞り駆動部14Bは、絞り12Bを駆動するアクチュエータ及びその駆動回路を有する。 The image pickup optical system drive unit 14 includes a focus lens drive unit 14A that drives the focus lens 12A and an aperture drive unit 14B that drives the aperture 12B. The focus lens drive unit 14A includes an actuator for driving the focus lens 12A and a drive circuit thereof. The diaphragm drive unit 14B includes an actuator for driving the diaphragm 12B and a drive circuit thereof.

撮像部16は、光学像を電気信号に変換する撮像素子16Aを備える。撮像素子16Aには、たとえば、所定の配列(たとえば、ベイヤ配列等)のカラーフィルタを有するCMOS(Complementary Metal Oxide Semiconductor)型のイメージセンサ、CCD(Charged Coupled Device)型のイメージセンサが用いられる。なお、カラーフィルタについては、必ずしも備えている必要はない。この他、撮像素子16Aには、有機薄膜撮像素子等を用いることもできる。 The image pickup unit 16 includes an image pickup element 16A that converts an optical image into an electric signal. For the image sensor 16A, for example, a CMOS (Complementary Metal Oxide Semiconductor) type image sensor having a color filter having a predetermined arrangement (for example, a bayer arrangement or the like) and a CCD (Chaged Coupled Device) type image sensor are used. The color filter does not necessarily have to be provided. In addition, an organic thin film image sensor or the like can also be used for the image sensor 16A.

本実施の形態の撮像装置10では、撮像素子16Aとして、駆動部、ADC(Analog to Digital Converter)及び信号処理部等を備えたCMOS型のカラーイメージセンサが用いられる。この場合、撮像素子16Aは、内蔵する駆動部に駆動されて動作する。また、各画素の信号は、内蔵するADCによってデジタル信号に変換される。更に、各画素の信号には、内蔵する信号処理部によって、相関二重サンプリング処理、ゲイン処理、補正処理等の処理が必要に応じて施される。これらの信号処理は、各画素の信号をデジタル信号に変換する前に行う構成としてもよいし、また、デジタル信号に変換した後に行う構成としてもよい。 In the image pickup apparatus 10 of the present embodiment, a CMOS type color image sensor including a drive unit, an ADC (Analog to Digital Converter), a signal processing unit, and the like is used as the image pickup element 16A. In this case, the image sensor 16A is driven by the built-in drive unit to operate. Further, the signal of each pixel is converted into a digital signal by the built-in ADC. Further, the signal of each pixel is subjected to processing such as correlation double sampling processing, gain processing, correction processing and the like as necessary by the built-in signal processing unit. These signal processes may be configured to be performed before converting the signal of each pixel into a digital signal, or may be performed after converting to a digital signal.

また、本実施の形態の撮像装置10では、撮像素子16Aとして、位相差画素が組み込まれた撮像素子が用いられる。位相差画素が組み込まれた撮像素子を用いることで、画面内の被写体の位相差の情報を取得できる。また、取得した位相差の情報から画面内の被写体の焦点のズレの方向及び焦点のズレ量(デフォーカス量)を検出できる。位相差画素が組み込まれた撮像素子、及び、その撮像素子を用いた位相差の検出方法は公知である。したがって、その詳細についての説明は省略する。 Further, in the image pickup device 10 of the present embodiment, an image pickup device incorporating a phase difference pixel is used as the image pickup element 16A. By using an image sensor with a built-in phase difference pixel, it is possible to acquire information on the phase difference of the subject in the screen. In addition, the direction of the focus of the subject in the screen and the amount of the focus (defocus amount) can be detected from the acquired phase difference information. An image sensor incorporating a phase difference pixel and a method for detecting a phase difference using the image sensor are known. Therefore, the description of the details will be omitted.

表示部18は、LCD(Liquid Crystal Display)、有機ELディスプレイ(Organic Light Emitting Diode display,OLED display)などのディスプレイで構成される。また、表示部18を構成するディスプレイには、タッチパネルを備えたタッチパネルディスプレイを用いることもできる。表示部18には、EVF(Electronic View Finder)の形態のものも含まれる。ただし、表示部18がEVFで構成される場合、表示部18にタッチパネルが備えられることはない。 The display unit 18 is composed of a display such as an LCD (Liquid Crystal Display) and an organic EL display (Organic Light Emitting Display Display, OLED display). Further, a touch panel display provided with a touch panel can also be used as the display constituting the display unit 18. The display unit 18 also includes a display unit 18 in the form of an EVF (Electronic View Finder). However, when the display unit 18 is composed of an EVF, the display unit 18 is not provided with a touch panel.

記憶部20は、撮像された画像データの記憶に使用される他、各種データの記憶に使用される。記憶部20は、たとえば、Flash Memoryを含むEEPROM(Electrically Erasable Programmable Read-only Memory)、SSD(Solid State Drive)、フラッシュメモリ(Flash Memory)等の不揮発性を有する半導体メモリで構成される。記憶部20は、装置本体に一体的に備えられた構成(いわゆる内蔵メモリの形態)であってもよいし、着脱可能な構成(いわゆるメモリカードの形態)であってもよい。 The storage unit 20 is used for storing captured image data and also for storing various types of data. The storage unit 20 has, for example, a non-volatile memory such as an EEPROM (Electrically Erasable Programmable Read-only Memory) including a Flash Memory, an SSD (Solid State Drive), and a flash memory (Flash Memory). The storage unit 20 may have a configuration integrally provided in the main body of the device (a form of a so-called built-in memory) or a detachable configuration (a form of a so-called memory card).

接続部22は、外部機器(たとえば、外部表示装置、外部記録装置等)を接続する端子を備える。通信規格としては、たとえば、HDMI(High-Definition Multimedia Interface)等を採用できる(HDMIは登録商標)。 The connection unit 22 includes a terminal for connecting an external device (for example, an external display device, an external recording device, etc.). As a communication standard, for example, HDMI (High-Definition Multimedia Interface) or the like can be adopted (HDMI is a registered trademark).

操作部24は、撮像装置10を操作するための各種操作デバイスを備える。操作デバイスには、電源ボタン、シャッターボタン、録画ボタン等の各種操作ボタン類が含まれる。また、表示部18を構成するディスプレイがタッチパネルディスプレイで構成される場合には、タッチパネルも操作デバイスに含まれる。本実施の形態の撮像装置10には、操作デバイスとして、追尾AFのオン、オフを切り替える追尾AFスイッチが備えられる。なお、追尾AFのオン、オフは、この他、設定画面で行う構成とすることもできる。 The operation unit 24 includes various operation devices for operating the image pickup device 10. The operation device includes various operation buttons such as a power button, a shutter button, and a record button. When the display constituting the display unit 18 is composed of a touch panel display, the touch panel is also included in the operation device. The image pickup apparatus 10 of the present embodiment is provided with a tracking AF switch for switching on / off of tracking AF as an operation device. In addition, the tracking AF can be turned on and off on the setting screen.

CPU26は、プロセッサの一例である。CPU26は、所定のプログラムを実行することにより、撮像装置10の制御部及び画像処理部等として機能する。CPU26は、制御部として、AE制御(AE:Automatic Exposure)、AF制御等の撮像制御、表示部18への表示制御、記憶部20への記録制御等の処理を行う。また、CPU26は、画像処理部として、表示用の画像データの生成、記録用の画像データの生成等の処理を行う。表示用の画像データ及び記録用の画像データは、RAWデータ(撮像部16から出力された未加工の動画像データ)に対し所定の画像処理(いわゆる現像処理)を施して生成する。ここでの画像処理には、オフセット処理、ガンマ補正処理、デモザイク処理、RGB/YCrCb変換処理、ホワイトバランス処理等が含まれる。これらは公知の処理であるので、その詳細についての説明は省略する。また、CPU26は、画像処理部として、追尾AFを行う際に、追尾対象の設定処理を行う。この点については、後述する。 The CPU 26 is an example of a processor. The CPU 26 functions as a control unit, an image processing unit, and the like of the image pickup apparatus 10 by executing a predetermined program. As a control unit, the CPU 26 performs processing such as AE control (AE: Automatic Exposure), image pickup control such as AF control, display control on the display unit 18, and recording control on the storage unit 20. Further, the CPU 26, as an image processing unit, performs processing such as generation of image data for display and generation of image data for recording. The image data for display and the image data for recording are generated by subjecting RAW data (raw moving image data output from the imaging unit 16) to predetermined image processing (so-called development processing). The image processing here includes offset processing, gamma correction processing, demosaic processing, RGB / YCrCb conversion processing, white balance processing, and the like. Since these are known processes, the details thereof will be omitted. Further, the CPU 26, as an image processing unit, performs tracking target setting processing when performing tracking AF. This point will be described later.

CPU26が行う上記の各処理については、その一部又は全部をCPU26の内部に設けたハードウェアで行う構成とすることもできる。 Each of the above processes performed by the CPU 26 may be partially or entirely performed by hardware provided inside the CPU 26.

ROM28には、CPU26が実行するプログラム、及び、制御等に必要な各種データが格納される。なお、ROM28を構成するメモリには、Flash Memoryを含むEEPROMが含まれる。 The ROM 28 stores a program executed by the CPU 26 and various data necessary for control and the like. The memory constituting the ROM 28 includes an EEPROM including a Flash Memory.

RAM30は、CPU26が各種処理を行う際の作業領域として使用される。 The RAM 30 is used as a work area when the CPU 26 performs various processes.

[追尾AFの機能]
図2は、追尾AFを行う際にCPUが実現する機能の一例を示すブロックである。
[Tracking AF function]
FIG. 2 is a block showing an example of a function realized by the CPU when performing tracking AF.

同図に示すように、CPU26は、追尾AFを行う際、追尾対象設定部100、追尾対象検出部110、フォーカスエリア設定部112、位相差検出部114及びフォーカスレンズ駆動制御部116等としての機能を実現する。 As shown in the figure, when performing tracking AF, the CPU 26 functions as a tracking target setting unit 100, a tracking target detection unit 110, a focus area setting unit 112, a phase difference detection unit 114, a focus lens drive control unit 116, and the like. To realize.

追尾対象設定部100は、追尾対象を設定する。本実施の形態の撮像装置10では、撮像部16から逐次出力される画像データ(動画像における各フレームの画像データ)に基づいて、主要被写体を推定し、追尾対象に設定する。追尾対象設定部100の詳細については後述する。 The tracking target setting unit 100 sets the tracking target. In the image pickup apparatus 10 of the present embodiment, the main subject is estimated and set as the tracking target based on the image data (image data of each frame in the moving image) sequentially output from the image pickup unit 16. The details of the tracking target setting unit 100 will be described later.

追尾対象検出部110は、撮像部16から逐次出力される画像データ(動画像における各フレームの画像データ)から追尾対象を逐次検出する。検出は、追尾対象設定部100で設定された被写体を対象に行われる。検出には、テンプレートマッチング等の公知の手法が採用される。 The tracking target detection unit 110 sequentially detects the tracking target from the image data (image data of each frame in the moving image) sequentially output from the imaging unit 16. The detection is performed on the subject set by the tracking target setting unit 100. A known method such as template matching is adopted for the detection.

フォーカスエリア設定部112は、追尾対象検出部110の検出結果に基づいて、フォーカスエリアを設定する。具体的には、追尾対象検出部110で検出された追尾対象を含む矩形の領域をフォーカスエリアに設定する。 The focus area setting unit 112 sets the focus area based on the detection result of the tracking target detection unit 110. Specifically, a rectangular area including the tracking target detected by the tracking target detection unit 110 is set as the focus area.

位相差検出部114は、フォーカスエリア設定部112で設定されたフォーカスエリア内の被写体の位相差を検出する。位相差検出部114は、撮像部16から得られる画像データに基づいて、フォーカスエリア内の被写体の位相差を検出する。より具体的には、画像データから得られる位相差画素の信号に基づいて、フォーカスエリア内の被写体の位相差を検出する。 The phase difference detecting unit 114 detects the phase difference of the subject in the focus area set by the focus area setting unit 112. The phase difference detection unit 114 detects the phase difference of the subject in the focus area based on the image data obtained from the image pickup unit 16. More specifically, the phase difference of the subject in the focus area is detected based on the signal of the phase difference pixel obtained from the image data.

フォーカスレンズ駆動制御部116は、位相差検出部114による位相差の検出結果に基づいて、フォーカスレンズ駆動部14Aの駆動を制御する。具体的には、位相差の検出結果に基づいて、フォーカスエリア内の被写体に焦点を合わせるのに必要なフォーカスレンズ12Aの駆動量を算出し、算出した駆動量でフォーカスレンズ駆動部14Aを駆動する。 The focus lens drive control unit 116 controls the drive of the focus lens drive unit 14A based on the phase difference detection result of the phase difference detection unit 114. Specifically, the drive amount of the focus lens 12A required to focus on the subject in the focus area is calculated based on the detection result of the phase difference, and the focus lens drive unit 14A is driven by the calculated drive amount. ..

本実施の形態の撮像装置10において、追尾対象検出部110、フォーカスエリア設定部112、位相差検出部114及びフォーカスレンズ駆動制御部116は、推定した追尾対象に焦点を合わせるようにフォーカスレンズを移動させて焦点調節を行う焦点調節部として機能する。 In the image pickup apparatus 10 of the present embodiment, the tracking target detection unit 110, the focus area setting unit 112, the phase difference detection unit 114, and the focus lens drive control unit 116 move the focus lens so as to focus on the estimated tracking target. It functions as a focus adjustment unit that adjusts the focus.

[追尾対象設定部]
上記のように、追尾対象設定部100は、撮像部16から逐次出力される画像データ(動画像における各フレームの画像データ)から主要被写体を推定し、追尾対象に設定する。本実施の形態の撮像装置10において、追尾対象設定部100は、画像処理装置の一例である。
[Tracking target setting unit]
As described above, the tracking target setting unit 100 estimates the main subject from the image data (image data of each frame in the moving image) sequentially output from the imaging unit 16 and sets it as the tracking target. In the image pickup apparatus 10 of the present embodiment, the tracking target setting unit 100 is an example of an image processing apparatus.

図3は、追尾対象設定部が有する機能のブロック図である。 FIG. 3 is a block diagram of the function of the tracking target setting unit.

同図に示すように、追尾対象設定部100は、動きベクトル算出部100A、追尾対象候補抽出部100B、変化量算出部100C及び追尾対象推定部100Dの機能を有する。追尾対象推定部100Dで推定された被写体が追尾対象に設定される。CPU24は、所定のプログラム(画像処理プログラム)を実行することにより、各機能を実現する。 As shown in the figure, the tracking target setting unit 100 has the functions of the motion vector calculation unit 100A, the tracking target candidate extraction unit 100B, the change amount calculation unit 100C, and the tracking target estimation unit 100D. The subject estimated by the tracking target estimation unit 100D is set as the tracking target. The CPU 24 realizes each function by executing a predetermined program (image processing program).

動きベクトル算出部100Aは、撮像部16から逐次出力される画像データ(動画像における各フレームの画像データ)を逐次処理し、画像内の動きベクトルを算出する。撮像部16から逐次出力される画像データを逐次処理することで、動きベクトルは時系列順に算出される。本実施の形態の撮像装置10では、画面をM×N(M、Nは2以上の整数)のブロックに分割し、ブロックごとに動きベクトルを算出する。以下、動きベクトルの算出方法について概説する。 The motion vector calculation unit 100A sequentially processes the image data (image data of each frame in the moving image) sequentially output from the image pickup unit 16 to calculate the motion vector in the image. The motion vector is calculated in chronological order by sequentially processing the image data sequentially output from the image pickup unit 16. In the image pickup apparatus 10 of the present embodiment, the screen is divided into blocks of M × N (M and N are integers of 2 or more), and a motion vector is calculated for each block. The method of calculating the motion vector will be outlined below.

図4は、撮像により得られる時系列の画像の一例を示す図である。同図において、(A)は、n-1フレーム目の画像、(B)は、nフレーム目の画像を表している。 FIG. 4 is a diagram showing an example of a time-series image obtained by imaging. In the figure, (A) represents an image of the n-1th frame, and (B) represents an image of the nth frame.

同図は、画面右方向に向かって進む人物O1を追って撮像した場合の例を示している。画面内には、人物O1の他に人物O2及び木O3が存在し、人物O2は、画面左方向に向かって進んでいる。木O3は、静止物としての背景を便宜的に表したものである。 The figure shows an example in which an image is taken by following a person O1 moving toward the right side of the screen. In addition to the person O1, there are a person O2 and a tree O3 in the screen, and the person O2 is moving toward the left side of the screen. The tree O3 is a convenient representation of the background as a stationary object.

図5は、図4に示した時系列順の2つの画像を重畳して表示した画像である。同図では、n-1フレーム目の画像を破線で表し、nフレーム目の画像を実線で表している。 FIG. 5 is an image in which two images in chronological order shown in FIG. 4 are superimposed and displayed. In the figure, the image of the n-1th frame is represented by a broken line, and the image of the nth frame is represented by a solid line.

2つの画像は、ブロック単位でブロックマッチングされ、各ブロックの相関関係から各ブロックの動きベクトルが算出される。すなわち、n-1フレーム目の画像の各ブロックが、nフレーム目の画像のどのブロックに移動したかを求めることで、各ブロックの動きベクトルが算出される。 The two images are block-matched in block units, and the motion vector of each block is calculated from the correlation of each block. That is, the motion vector of each block is calculated by determining to which block of the image of the nth frame each block of the image of the n-1th frame has moved.

図6は、図4に示した時系列順の2つの画像から得られる動きベクトルの分布の一例を示す図である。同図は、各ブロックの動きベクトルを規格化して表している。 FIG. 6 is a diagram showing an example of the distribution of motion vectors obtained from the two images in chronological order shown in FIG. The figure shows the standardized motion vector of each block.

同図において、斜線で示す領域は、nフレーム目の画像において、動体である人物O1及び人物O2が存在する領域である。動体である人物O1及び人物O2が存在する領域のブロックは、背景のブロックと異なる動きベクトルを示す。また、動体である人物O1及び人物O2も、その動きが異なることから、異なる動きベクトルを示す。 In the figure, the area shown by the diagonal line is the area where the moving objects O1 and O2 exist in the image of the nth frame. The block in the region where the moving objects O1 and O2 are present shows a motion vector different from that of the background block. Further, the person O1 and the person O2, which are moving objects, also show different motion vectors because their movements are different.

追尾対象候補抽出部100Bは、動きベクトルの算出結果に基づいて、追尾対象候補を抽出する。図6に示すように、同じ被写体が属するブロックは、ほぼ同じ動きベクトルが算出される。したがって、ほぼ同じ動きベクトルのブロックを一塊として抽出することで、追尾対象候補を抽出できる。追尾対象候補抽出部100Bは、たとえば、隣接するブロック間で動きベクトルの差分が閾値以下のブロックを組み合わせて、追尾対象候補を抽出する。あるいは、クラスタリング処理を行って、追尾対象候補を抽出する。図6に示す例の場合、人物O1と、人物O2と、木O3を含む背景と、が追尾対象候補として抽出される。 The tracking target candidate extraction unit 100B extracts tracking target candidates based on the calculation result of the motion vector. As shown in FIG. 6, blocks to which the same subject belongs are calculated with substantially the same motion vector. Therefore, by extracting blocks of almost the same motion vector as a block, tracking target candidates can be extracted. The tracking target candidate extraction unit 100B extracts tracking target candidates by combining blocks having a motion vector difference of less than or equal to a threshold value between adjacent blocks, for example. Alternatively, a clustering process is performed to extract tracking target candidates. In the case of the example shown in FIG. 6, the person O1, the person O2, and the background including the tree O3 are extracted as tracking target candidates.

変化量算出部100Cは、各追尾対象候補の動きベクトルの変化量を算出する。変化量は、前後の動きベクトルの差分として算出される。すなわち、nフレーム目の動きベクトルをVn、n-1フレーム目の動きベクトルをVn-1とすると、変化量ΔVは、ΔV=[Vn]-[Vn-1]で算出される。動きベクトルは、順次算出されるので、変化量も順次算出される。なお、各追尾対象候補の動きベクトルは、たとえば、追尾対象候補として抽出されたブロックの動きベクトルの平均として算出される。 The change amount calculation unit 100C calculates the change amount of the motion vector of each tracking target candidate. The amount of change is calculated as the difference between the front and back motion vectors. That is, assuming that the motion vector in the nth frame is Vn and the motion vector in the n-1th frame is Vn-1, the amount of change ΔV is calculated by ΔV = [Vn] − [Vn-1]. Since the motion vector is calculated sequentially, the amount of change is also calculated sequentially. The motion vector of each tracking target candidate is calculated as, for example, the average of the motion vectors of the blocks extracted as the tracking target candidate.

追尾対象推定部100Dは、変化量算出部100Cで算出された各追尾対象候補の動きベクトルの変化量に基づいて、追尾対象候補の中から追尾対象を推定する。具体的には、動きベクトルの変化量の変化傾向に基づいて、追尾対象を推定する。より具体的には、動きベクトルの変化量が減少傾向にある追尾対象候補を追尾対象と推定する。特に、動きベクトルの変化量が、複数フレームに亘り減少している追尾対象候補を追尾対象と推定する。 The tracking target estimation unit 100D estimates the tracking target from the tracking target candidates based on the change amount of the motion vector of each tracking target candidate calculated by the change amount calculation unit 100C. Specifically, the tracking target is estimated based on the change tendency of the change amount of the motion vector. More specifically, it is estimated that the tracking target candidate whose movement vector change amount is decreasing is the tracking target. In particular, it is estimated that the tracking target candidate whose motion vector change amount decreases over a plurality of frames is the tracking target.

ここで、動きベクトルの変化量が減少傾向にある被写体を追尾対象とする理由について説明する。 Here, the reason why the subject whose movement vector change amount tends to decrease is targeted for tracking will be described.

最初から動いている被写体を追尾して撮像する場合を考える。この場合、まず、ユーザは、追尾対象を画面内に捉える動作を行う。そして、追尾対象を画面内に捉えた後は、追尾対象の動きに合わせて撮像装置を動かす動作を行う。このような動作を行った場合、撮像される画像において、追尾対象の動きベクトルは漸次収束する。すなわち、追尾対象を捉えた後は、追尾対象の動きに追従して撮像装置を動かすので、相対的な動きは、ほぼなくなる。したがって、追尾対象の動きベクトルは漸次収束する。動きベクトルが漸次収束することから、追尾対象の動きベクトルの変化量は漸次減少する。したがって、動きベクトルの変化量が減少傾向にある被写体を抽出することで、追尾対象を推定できる。 Consider the case of tracking a moving subject from the beginning and taking an image. In this case, first, the user performs an operation of capturing the tracking target on the screen. Then, after capturing the tracking target on the screen, the image pickup device is moved according to the movement of the tracking target. When such an operation is performed, the motion vector to be tracked gradually converges in the captured image. That is, after capturing the tracking target, the image pickup device is moved following the movement of the tracking target, so that the relative movement is almost eliminated. Therefore, the motion vector to be tracked gradually converges. Since the motion vector gradually converges, the amount of change in the motion vector to be tracked gradually decreases. Therefore, the tracking target can be estimated by extracting the subject whose movement vector change amount tends to decrease.

図7は、追尾対象の動きベクトルの変化量の推移の一例を示すグラフである。同図において、縦軸は動きベクトルの変化量、横軸は時間である。 FIG. 7 is a graph showing an example of the transition of the amount of change in the motion vector to be tracked. In the figure, the vertical axis is the amount of change in the motion vector, and the horizontal axis is time.

同図は、比較的動きの速い被写体を追尾対象とした場合の撮り初めからの動きベクトルの変化量の推移を示している。同図に示すように、追尾対象の動きベクトルの変化量は、撮り初めから漸次減少する傾向にある。特に、追いかけて撮像することから、変化量は凡そマイナスの値で推移して収束する。 The figure shows the transition of the amount of change in the motion vector from the beginning of shooting when a subject with relatively fast movement is targeted for tracking. As shown in the figure, the amount of change in the motion vector to be tracked tends to gradually decrease from the beginning of shooting. In particular, since the image is taken after chasing, the amount of change changes at a negative value and converges.

図8は、背景の動きベクトルの変化量の推移の一例を示すグラフである。同図において、縦軸は動きベクトルの変化量、横軸は時間である。 FIG. 8 is a graph showing an example of the transition of the amount of change in the motion vector of the background. In the figure, the vertical axis is the amount of change in the motion vector, and the horizontal axis is time.

同図に示すように、背景も、その動きベクトルの変化量は漸次収束する。しかし、背景は静止物であるため、追尾対象を追って撮像した場合、その動きベクトルの変化量は、プラスの値で推移して収束する。 As shown in the figure, the amount of change in the motion vector of the background gradually converges. However, since the background is a stationary object, the amount of change in the motion vector changes at a positive value and converges when the tracking target is imaged.

このように、追尾対象と、それ以外とでは、動きベクトルの変化量の変動パターンが異なる。したがって、動きベクトルの変化量の変動パターンから追尾対象を推定できる。 In this way, the fluctuation pattern of the amount of change in the motion vector differs between the tracking target and the others. Therefore, the tracking target can be estimated from the fluctuation pattern of the change amount of the motion vector.

上記のように、追尾対象は、動きベクトルの変化量が、凡そマイナスの値で推移して収束する。この場合、複数フレーム間での平均を取ると、その値はマイナスの値を示す。本実施の形態の撮像装置10では、各追尾対象候補について、特定期間における動きベクトルの変化量の平均を算出し、算出した平均値に基づいて、追尾対象を推定する。具体的には、算出した平均値と閾値とを比較し、マイナス方向において閾値を超える被写体を追尾対象と推定する。なお、マイナス方向において閾値を超える被写体を追尾対象と推定するので、閾値はマイナスの値に設定される。特定期間は、あらかじめ定められた期間である。特定期間は、たとえば、あらかじめ定められたフレーム数分の撮像期間として設定される。 As described above, in the tracking target, the amount of change in the motion vector changes at a negative value and converges. In this case, if you take the average between multiple frames, the value will be a negative value. In the image pickup apparatus 10 of the present embodiment, the average of the amount of change in the motion vector in a specific period is calculated for each tracking target candidate, and the tracking target is estimated based on the calculated average value. Specifically, the calculated average value is compared with the threshold value, and a subject exceeding the threshold value in the negative direction is estimated as a tracking target. Since it is estimated that the subject exceeding the threshold value in the negative direction is the tracking target, the threshold value is set to a negative value. The specific period is a predetermined period. The specific period is set, for example, as an imaging period for a predetermined number of frames.

したがって、追尾対象推定部100Dは、変化量算出部100Cで算出された各追尾対象候補の動きベクトルの変化量の平均値を算出する処理、及び、算出した平均値に基づいて追尾対象を推定する処理を行う。平均値を算出する処理では、特定期間における平均値を算出する。算出した平均値に基づいて追尾対象を推定する処理では、閾値と比較する処理を行い、マイナス方向において閾値を超える追尾対象候補を抽出する処理を行う。抽出された追尾対象候補が追尾対象と推定される。最初の特定期間における平均値の算出結果から追尾対象を抽出できなかった場合、再度、平均値の算出処理が行われ、その算出結果に基づいて、追尾対象の抽出処理が行われる。すなわち、追尾対象が抽出されるまで、繰り返し処理が行われる。 Therefore, the tracking target estimation unit 100D estimates the tracking target based on the process of calculating the average value of the change amount of the motion vector of each tracking target candidate calculated by the change amount calculation unit 100C and the calculated average value. Perform processing. In the process of calculating the average value, the average value in a specific period is calculated. In the process of estimating the tracking target based on the calculated average value, a process of comparing with the threshold value is performed, and a process of extracting a tracking target candidate exceeding the threshold value in the negative direction is performed. The extracted tracking target candidates are presumed to be tracking targets. If the tracking target cannot be extracted from the calculation result of the average value in the first specific period, the calculation process of the average value is performed again, and the extraction process of the tracking target is performed based on the calculation result. That is, the processing is repeated until the tracking target is extracted.

図9は、追尾対象の設定処理の手順を示すフローチャートである。 FIG. 9 is a flowchart showing the procedure of the tracking target setting process.

まず、動きベクトルを算出する(ステップS1)。動きベクトルは、撮像部16から逐次出力される画像データを逐次処理して算出する。したがって、動きベクトルは時系列順に算出される。 First, the motion vector is calculated (step S1). The motion vector is calculated by sequentially processing the image data sequentially output from the image pickup unit 16. Therefore, the motion vectors are calculated in chronological order.

次に、算出された動きベクトルに基づいて、追尾対象候補の被写体を抽出する(ステップS2)。そして、算出した各追尾対象候補の動きベクトルの変化量を算出する(ステップS3)。上記のように、動きベクトルの変化量は、前後の動きベクトルの差分として算出される。 Next, the subject of the tracking target candidate is extracted based on the calculated motion vector (step S2). Then, the amount of change in the motion vector of each of the calculated tracking target candidates is calculated (step S3). As described above, the amount of change in the motion vector is calculated as the difference between the motion vectors before and after.

次に、算出した動きベクトルの変化量に関して、特定期間での平均値を算出する(ステップS4)。そして、算出した平均値に基づいて、追尾対象を抽出する(ステップS5)。具体的には、各追尾対象候補の動きベクトルの変化量の平均値と閾値とを比較し、マイナス方向において閾値を超える追尾対象候補を抽出し、追尾対象とする。この処理の結果、追尾対象を抽出できたか否かを判定する(ステップS6)。追尾対象が抽出できた場合は、抽出した被写体を追尾対象に設定する(ステップS7)。一方、追尾対象を抽出できなかった場合は、ステップS1に戻り、次の特定期間で、再度、追尾対象の抽出を行う。 Next, with respect to the calculated change amount of the motion vector, the average value in a specific period is calculated (step S4). Then, the tracking target is extracted based on the calculated average value (step S5). Specifically, the average value of the change amount of the motion vector of each tracking target candidate is compared with the threshold value, and the tracking target candidate exceeding the threshold value is extracted in the negative direction and used as the tracking target. As a result of this processing, it is determined whether or not the tracking target can be extracted (step S6). If the tracking target can be extracted, the extracted subject is set as the tracking target (step S7). On the other hand, if the tracking target cannot be extracted, the process returns to step S1 and the tracking target is extracted again in the next specific period.

なお、マイナス方向において閾値を超える追尾対象候補が複数抽出された場合は、追尾対象を抽出できなかったと判定される。すなわち、追尾対象を1つに絞れなかった場合は、追尾対象を抽出できなかったと判定される。したがって、この場合、次の特定期間で、再度、追尾対象の抽出が行われる。すなわち、最終的に1つに絞られるまで繰り返し追尾対象の推定処理が行われる。なお、この場合は、先の特定期間で追尾対象として抽出された追尾対象候補に限定して、追尾対象の推定処理を行う構成としてもよい。 If a plurality of tracking target candidates exceeding the threshold value are extracted in the negative direction, it is determined that the tracking target could not be extracted. That is, if the tracking target cannot be narrowed down to one, it is determined that the tracking target could not be extracted. Therefore, in this case, the tracking target is extracted again in the next specific period. That is, the estimation process of the tracking target is repeatedly performed until it is finally narrowed down to one. In this case, the tracking target candidate may be limited to the tracking target candidate extracted in the specific period, and the tracking target may be estimated.

このように、本実施の形態の撮像装置10では、追尾対象を設定する際、追尾対象候補の動きベクトルの変化量に基づいて、追尾対象を推定する。これにより、最初から動いている被写体を追尾対象とする場合であっても、撮り初めから短時間で追尾対象を推定できる。すなわち、従来手法では、主要被写体(追尾対象)を推定するために、動きベクトルが一定の値に収束するのを待つ必要があるが、本実施の形態の撮像装置10によれば、動きベクトルの収束を待たずに主要被写体(追尾対象)を推定できる。 As described above, in the image pickup apparatus 10 of the present embodiment, when the tracking target is set, the tracking target is estimated based on the amount of change in the motion vector of the tracking target candidate. As a result, even when a moving subject is targeted for tracking from the beginning, the tracking target can be estimated in a short time from the beginning of shooting. That is, in the conventional method, in order to estimate the main subject (tracking target), it is necessary to wait for the motion vector to converge to a constant value, but according to the image pickup apparatus 10 of the present embodiment, the motion vector The main subject (tracking target) can be estimated without waiting for convergence.

[変形例]
[被写体の特性に応じた閾値又は特定期間の設定]
動きベクトルの変化量の平均値を算出するための期間としての特定期間、及び、追尾対象を推定するための閾値については、追尾対象とする被写体の特性に応じて最適化することで、より精度よく追尾対象を推定できる。以下、この点について説明する。
[Modification example]
[Setting threshold value or specific period according to the characteristics of the subject]
The specific period for calculating the average value of the change amount of the motion vector and the threshold value for estimating the tracking target are more accurate by optimizing according to the characteristics of the subject to be tracked. The tracking target can be estimated well. This point will be described below.

図10は、追尾対象の動きベクトルの変化量の推移の他の一例を示すグラフである。同図において、縦軸は動きベクトルの変化量、横軸は時間である。 FIG. 10 is a graph showing another example of the transition of the amount of change in the motion vector to be tracked. In the figure, the vertical axis is the amount of change in the motion vector, and the horizontal axis is time.

同図は、比較的動きの遅い被写体を追尾対象とした場合の撮り初めからの動きベクトルの変化量の推移を示している。追尾対象の動きが遅い場合、容易に追尾対象を捉えることができる。よって、この場合、同図に示すように、比較的早期に変化量が収束する。ただし、この場合も変化量は凡そマイナスの値で推移して収束する。 The figure shows the transition of the amount of change in the motion vector from the beginning of shooting when a subject with relatively slow movement is targeted for tracking. When the tracking target moves slowly, the tracking target can be easily grasped. Therefore, in this case, as shown in the figure, the amount of change converges relatively early. However, in this case as well, the amount of change changes at a negative value and converges.

したがって、追尾対象とする被写体の動きの速さによって特定期間及び閾値を設定することで、より高精度に追尾対象を推定できる。具体的には、追尾対象とする被写体の動きが速くなるほど特定期間を長い期間に設定する。あるいは、閾値をよりマイナス方向に大きな値に設定する。 Therefore, by setting a specific period and a threshold value according to the speed of movement of the subject to be tracked, the tracking target can be estimated with higher accuracy. Specifically, the faster the movement of the subject to be tracked, the longer the specific period is set. Alternatively, the threshold value is set to a larger value in the negative direction.

追尾対象とする被写体の動きの速さは、撮り初めの撮像装置の動きから推定できる。すなわち、動きの速い被写体は、その動きに合わせて短時間で撮像装置を大きく動かすので、撮り初めの撮像装置の動き量は大きくなる。したがって、撮像装置の動き量から追尾対象とする被写体の動きの速さを推定できる。 The speed of movement of the subject to be tracked can be estimated from the movement of the image pickup device at the beginning of shooting. That is, for a fast-moving subject, the image pickup device is greatly moved in a short time according to the movement, so that the amount of movement of the image pickup device at the beginning of shooting is large. Therefore, the speed of movement of the subject to be tracked can be estimated from the amount of movement of the image pickup device.

撮像装置の動き量から追尾対象とする被写体の動きの速さを推定できるので、撮像装置の動き量から閾値又は特定期間を最適化できる。具体的には、撮像装置の動き量が大きくなるほど、閾値をマイナス方向に大きな値に設定する。あるいは、撮像装置の動き量が大きくなるほど、特定期間を長く設定する。すなわち、平均値を算出するための期間を長くする。 Since the speed of movement of the subject to be tracked can be estimated from the movement amount of the image pickup device, the threshold value or the specific period can be optimized from the movement amount of the image pickup device. Specifically, as the amount of movement of the image pickup apparatus increases, the threshold value is set to a larger value in the negative direction. Alternatively, the larger the amount of movement of the image pickup device, the longer the specific period is set. That is, the period for calculating the average value is lengthened.

たとえば、閾値については、閾値を2段階に設定し、撮像装置の動き量に応じて、使用する閾値を切り替える。具体的には、閾値として、第1閾値及び第2閾値を定める。第2閾値は、第1閾値よりもマイナス方向において小さな値に設定する。すなわち、よりゼロに近い値に設定する。撮像装置の動き量が基準値を超える場合、閾値を第1閾値に設定する。撮像装置の動き量が基準値を超える場合とは、撮像装置の動き量が比較的大きい場合である。そして、撮像装置の動き量が比較的大きい場合とは、追尾対象とする被写体の動きが比較的速い場合である。したがって、この場合は、より大きな閾値である第1閾値に設定する。一方、撮像装置の動き量が基準値以下の場合、閾値を第2閾値に設定する。撮像装置の動き量が基準値以下の場合とは、撮像装置の動き量が比較的小さい場合である。そして、撮像装置の動き量が比較的小さい場合とは、追尾対象とする被写体の動きが比較的遅い場合である。したがって、この場合は、より小さな閾値である第2閾値に設定する。これにより、追尾対象の特性(動きの速さ)に応じて、閾値を最適化できる。 For example, regarding the threshold value, the threshold value is set in two stages, and the threshold value to be used is switched according to the amount of movement of the image pickup device. Specifically, the first threshold value and the second threshold value are set as the threshold values. The second threshold value is set to a value smaller than the first threshold value in the negative direction. That is, it is set to a value closer to zero. When the movement amount of the image pickup device exceeds the reference value, the threshold value is set to the first threshold value. The case where the amount of movement of the image pickup device exceeds the reference value is the case where the amount of movement of the image pickup device is relatively large. The case where the amount of movement of the image pickup apparatus is relatively large is the case where the movement of the subject to be tracked is relatively fast. Therefore, in this case, the first threshold value, which is a larger threshold value, is set. On the other hand, when the movement amount of the image pickup device is equal to or less than the reference value, the threshold value is set to the second threshold value. The case where the amount of movement of the image pickup device is equal to or less than the reference value is the case where the amount of movement of the image pickup device is relatively small. The case where the amount of movement of the image pickup apparatus is relatively small is the case where the movement of the subject to be tracked is relatively slow. Therefore, in this case, the second threshold value, which is a smaller threshold value, is set. As a result, the threshold value can be optimized according to the characteristics (speed of movement) of the tracking target.

特定期間についても、たとえば、特定期間の値を2段階に設定し、撮像装置の動き量に応じて、使用する特定期間を切り替える。具体的には、特定期間として、第1特定期間及び第2特定期間を定める。第2特定期間は、第1期間よりも短い期間に設定する。撮像装置の動き量が基準値を超える場合、特定期間を第1特定期間に設定する。上記のように、撮像装置の動き量が基準値を超える場合とは、撮像装置の動き量が比較的大きい場合であり、追尾対象とする被写体の動きが比較的速い場合である。したがって、この場合は、より長い期間である第1特定期間に設定する。一方、撮像装置の動き量が基準値以下の場合、特定期間を第2特定期間に設定する。上記のように、撮像装置の動き量が基準値以下の場合とは、撮像装置の動き量が比較的小さい場合であり、追尾対象とする被写体の動きが比較的遅い場合である。したがって、この場合は、より短い期間である第2特定期間に設定する。これにより、追尾対象の特性(動きの速さ)に応じて、特定期間を最適化できる。 For the specific period, for example, the value of the specific period is set in two stages, and the specific period to be used is switched according to the amount of movement of the image pickup device. Specifically, the first specific period and the second specific period are defined as the specific period. The second specific period is set to a period shorter than the first period. When the amount of movement of the image pickup device exceeds the reference value, the specific period is set to the first specific period. As described above, the case where the amount of movement of the image pickup device exceeds the reference value is the case where the amount of movement of the image pickup device is relatively large, and the case where the movement of the subject to be tracked is relatively fast. Therefore, in this case, it is set to the first specific period, which is a longer period. On the other hand, when the amount of movement of the image pickup device is equal to or less than the reference value, the specific period is set to the second specific period. As described above, the case where the amount of movement of the image pickup device is equal to or less than the reference value is the case where the amount of movement of the image pickup device is relatively small, and the case where the movement of the subject to be tracked is relatively slow. Therefore, in this case, the second specific period, which is a shorter period, is set. This makes it possible to optimize a specific period according to the characteristics (speed of movement) of the tracking target.

[撮像装置の動き量の検出]
撮像装置の動き量に基づいて、使用する閾値又は特定期間を切り替える場合、撮像装置の動き量の情報を取得する必要がある。
[Detection of movement amount of image pickup device]
When switching the threshold value to be used or a specific period based on the amount of movement of the image pickup device, it is necessary to acquire information on the amount of movement of the image pickup device.

撮像装置の動き量は、たとえば、撮像により得られた画像データから求めることができる。また、たとえば、本体の動き量を検出するセンサが備えられている場合には、そのセンサから出力される情報を利用することもできる。たとえば、撮像装置に手ブレ補正機能が備えられている場合には、ブレ検出センサから出力される情報を利用することができる。 The amount of movement of the image pickup device can be obtained from, for example, the image data obtained by the image pickup. Further, for example, when a sensor for detecting the amount of movement of the main body is provided, the information output from the sensor can be used. For example, if the image pickup device is equipped with a camera shake correction function, the information output from the shake detection sensor can be used.

[画像データからの検出]
ここでは、撮像により得られた画像データ(動画像における各フレームの画像データ)から撮像装置の動き量を求める場合について説明する。撮像により得られた画像データから撮像装置の動き量を求める場合、画像データから求めた動きベクトルの情報を利用できる。
[Detection from image data]
Here, a case where the amount of movement of the image pickup apparatus is obtained from the image data (image data of each frame in the moving image) obtained by the image pickup will be described. When the amount of movement of the imaging device is obtained from the image data obtained by imaging, the motion vector information obtained from the image data can be used.

図11は、追尾対象設定部が有する機能のブロック図である。 FIG. 11 is a block diagram of the function of the tracking target setting unit.

同図は、動きベクトルを利用して撮像装置10の動き量を求め、求めた動き量に応じて閾値を最適化する場合の一例を示している。 The figure shows an example of a case where the motion amount of the image pickup apparatus 10 is obtained by using a motion vector and the threshold value is optimized according to the obtained motion amount.

図11に示すように、本例の追尾対象設定部100は、動き量算出部100E及び閾値設定部100Fの機能を更に有する。 As shown in FIG. 11, the tracking target setting unit 100 of this example further has the functions of the motion amount calculation unit 100E and the threshold value setting unit 100F.

動き量算出部100Eは、動きベクトル算出部100Aで算出された動きベクトルに基づいて、撮像装置10の動き量を算出する。本例では、撮り初めから複数フレーム分の画面全体の動きベクトルの平均を算出し、その大きさを撮像装置の動き量とする。たとえば、撮り初めから3フレーム分の画面全体の動きベクトルの平均を算出し、算出した動きベクトルの大きさを撮像装置の動き量とする。画面全体の動きベクトルは、全ブロックの動きベクトルの平均として算出される。たとえば、1フレームの画面全体の動きベクトルV1の値が(x1,y1)、2フレームの画面全体の動きベクトルV2の値が(x2,y2)、3フレームの画面全体の動きベクトルV3の値が(x3,y3)であったとする。なお、x1、x2、x3は、それぞれ動きベクトルV1、V2、V3のx方向成分であり、y1、y2、y3は、それぞれ動きベクトルV1、V2、V3のy方向成分である。x方向は、画面の横方向であり、y方向は、画面の縦方向である。この場合、画面全体の動きベクトルの大きさの平均は、[(x1+x2+x3)+(y1+y2+y3)1/2/3で算出される。たとえば、1フレームの画面全体の動きベクトルV1の値が(0,0)、2フレームの画面全体の動きベクトルV2の値が(10,0)、3フレームの画面全体の動きベクトルV3の値が(15,0)の場合、[(0+10+15)+(0+0+0)1/2/3=[(25)+(0)1/2/3≒8.3で算出される。 The motion amount calculation unit 100E calculates the motion amount of the image pickup apparatus 10 based on the motion vector calculated by the motion vector calculation unit 100A. In this example, the average of the motion vectors of the entire screen for a plurality of frames is calculated from the beginning of shooting, and the size is used as the motion amount of the image pickup device. For example, the average of the motion vectors of the entire screen for three frames from the beginning of shooting is calculated, and the magnitude of the calculated motion vector is used as the motion amount of the image pickup device. The motion vector of the entire screen is calculated as the average of the motion vectors of all blocks. For example, the value of the motion vector V1 of the entire screen of one frame is (x1, y1), the value of the motion vector V2 of the entire screen of two frames is (x2, y2), and the value of the motion vector V3 of the entire screen of three frames is (x2, y2). It is assumed that it was (x3, y3). Note that x1, x2, and x3 are x-direction components of the motion vectors V1, V2, and V3, respectively, and y1, y2, and y3 are y-direction components of the motion vectors V1, V2, and V3, respectively. The x direction is the horizontal direction of the screen, and the y direction is the vertical direction of the screen. In this case, the average size of the motion vector of the entire screen is calculated by [(x1 + x2 + x3) 2 + (y1 + y2 + y3) 2 ] 1/2/3 . For example, the value of the motion vector V1 of the entire screen of one frame is (0,0), the value of the motion vector V2 of the entire screen of two frames is (10,0), and the value of the motion vector V3 of the entire screen of three frames is (0,0). In the case of (15,0), it is calculated by [(0 + 10 + 15) 2 + (0 + 0 + 0) 2 ] 1/2/3 = [(25) 2 + (0) 2 ] 1/2/3 ≈8.3 .

閾値設定部100Fは、動き量算出部100Eで算出された撮像装置10の動き量の値に基づいて、閾値を設定する。本例では、動き量が基準値を超える場合、閾値を第1閾値に設定する。一方、動き量が基準値以下の場合、閾値を第2閾値に設定する。第2閾値は、第1閾値よりもマイナス方向において小さな値(よりゼロに近い値)に設定される。 The threshold value setting unit 100F sets the threshold value based on the value of the movement amount of the image pickup apparatus 10 calculated by the movement amount calculation unit 100E. In this example, when the movement amount exceeds the reference value, the threshold value is set to the first threshold value. On the other hand, when the amount of movement is equal to or less than the reference value, the threshold value is set to the second threshold value. The second threshold value is set to a smaller value (a value closer to zero) in the negative direction than the first threshold value.

このように、撮像により得られる画像データから撮像装置の動き量を求め、求めた動き量に応じて閾値を最適化できる。 In this way, the amount of movement of the imaging device can be obtained from the image data obtained by imaging, and the threshold value can be optimized according to the obtained amount of movement.

なお、本例では、閾値を最適化する例で説明したが、特定期間についても同様の手法で最適化できる。 In this example, although the example of optimizing the threshold value has been described, the specific period can be optimized by the same method.

[センサを利用する方法]
上記のように、本体の動き量を検出するセンサが撮像装置に備えられている場合には、そのセンサを利用して、撮像装置の動き量の情報を取得することもできる。
[How to use the sensor]
As described above, when the image pickup device is provided with a sensor for detecting the movement amount of the main body, the sensor can be used to acquire information on the movement amount of the image pickup device.

図12は、ブレ検出センサが備えられている場合に追尾対象設定部が有する機能のブロック図である。 FIG. 12 is a block diagram of the function of the tracking target setting unit when the blur detection sensor is provided.

撮像装置に手ブレ補正機能が備えられている場合、手ブレを検出するために、ブレ検出センサが備えられる。そして、このブレ検出センサが撮像装置に備えられている場合、ブレ検出センサの出力を利用して、撮像装置の動き量(ブレ量)を検出できる。 If the image pickup device is equipped with a camera shake correction function, a camera shake detection sensor is provided to detect camera shake. When this blur detection sensor is provided in the image pickup device, the movement amount (blur amount) of the image pickup device can be detected by using the output of the blur detection sensor.

図12に示すように、本例の追尾対象設定部100には、ブレ検出センサ200から出力される信号に基づいてブレ量を算出するブレ量算出部100G、及び、ブレ量算出部100Gで算出されたブレ量に基づいて閾値を設定する閾値設定部100Fが更に備えられる。 As shown in FIG. 12, the tracking target setting unit 100 of this example is calculated by the blur amount calculation unit 100G that calculates the blur amount based on the signal output from the blur detection sensor 200, and the blur amount calculation unit 100G. Further, a threshold value setting unit 100F for setting a threshold value based on the amount of blurring is provided.

ブレ検出センサ200は、本来の用途として、手ブレの検出に使用するものであるが、本例では、これを追尾対象の設定にも使用する。ブレ検出センサ200は、たとえば、ジャイロセンサで構成される。 The blur detection sensor 200 is originally used for detecting camera shake, but in this example, it is also used for setting a tracking target. The blur detection sensor 200 is composed of, for example, a gyro sensor.

ブレ量算出部100Gは、ブレ検出センサ200から出力される信号に基づいて、ブレ量を算出する。たとえば、ブレ検出センサ200がジャイロセンサで構成される場合、センサから出力される角速度信号を積分し、ブレ量(角度信号)を算出する。算出したブレ量が、撮像装置の動き量とされる。 The blur amount calculation unit 100G calculates the blur amount based on the signal output from the blur detection sensor 200. For example, when the blur detection sensor 200 is composed of a gyro sensor, the angular velocity signal output from the sensor is integrated to calculate the blur amount (angle signal). The calculated amount of blur is taken as the amount of movement of the image pickup device.

閾値設定部100Fは、撮り初めに算出されたブレ量(動き量)に基づいて、閾値を設定する。本例では、動き量が基準値を超える場合、閾値を第1閾値に設定する。一方、動き量が基準値以下の場合、閾値を第2閾値に設定する。第2閾値は、第1閾値よりもマイナス方向において小さな値(よりゼロに近い値)に設定される。 The threshold value setting unit 100F sets a threshold value based on the amount of blur (movement amount) calculated at the beginning of shooting. In this example, when the movement amount exceeds the reference value, the threshold value is set to the first threshold value. On the other hand, when the amount of movement is equal to or less than the reference value, the threshold value is set to the second threshold value. The second threshold value is set to a smaller value (a value closer to zero) in the negative direction than the first threshold value.

このように、本体の動き量を検出するセンサが撮像装置に備えられている場合には、そのセンサを利用して、撮像装置の動き量の情報を取得し、閾値を最適化できる。 As described above, when the image pickup device is provided with a sensor for detecting the movement amount of the main body, the sensor can be used to acquire information on the movement amount of the image pickup device and optimize the threshold value.

なお、本例では、閾値を最適化する例で説明したが、特定期間についても同様の手法で最適化できる。 In this example, although the example of optimizing the threshold value has been described, the specific period can be optimized by the same method.

また、本例では、ブレ検出センサを利用する場合を例に説明したが、本体の動き量を検出するセンサは、これに限定されるものではない。この他、たとえば、加速度センサを使用することもできる。 Further, in this example, the case of using the blur detection sensor has been described as an example, but the sensor for detecting the amount of movement of the main body is not limited to this. In addition, for example, an accelerometer can be used.

また、本例では、手ブレ補正用のブレ検出センサを流用する構成としているが、専用のセンサを設けてもよい。 Further, in this example, the camera shake detection sensor for camera shake correction is diverted, but a dedicated sensor may be provided.

[追尾対象の推定処理の開始タイミング]
上記のように、最初から動いている被写体を追尾して撮像する場合、ユーザは、まず、追尾対象を画面内に捉える動作を行う。この動作を行った際、撮像装置は大きく動かされる。すなわち、目的とする被写体を画面内に捉えるため、短時間で比較的大きく動かされる。したがって、撮像装置の動きをモニタすることで、追尾対象の推定処理を開始するタイミングを最適化できる。すなわち、適切なタイミングで追尾対象の推定処理を開始できる。具体的には、撮像装置の動き量をモニタし、規定値以上の動き量が検出された場合に、追尾対象の推定処理を開始する。
[Start timing of estimation processing for tracking target]
As described above, when tracking a moving subject from the beginning and taking an image, the user first performs an operation of capturing the tracked object on the screen. When this operation is performed, the image pickup device is greatly moved. That is, in order to capture the target subject on the screen, it is moved relatively large in a short time. Therefore, by monitoring the movement of the image pickup device, it is possible to optimize the timing at which the estimation process of the tracking target is started. That is, the estimation process of the tracking target can be started at an appropriate timing. Specifically, the movement amount of the image pickup apparatus is monitored, and when the movement amount exceeding the specified value is detected, the estimation process of the tracking target is started.

図13は、追尾対象の推定処理を自動で開始する場合に追尾対象設定部が有する機能のブロック図である。 FIG. 13 is a block diagram of a function of the tracking target setting unit when the tracking target estimation process is automatically started.

同図に示すように、開始判定部100Hの機能が更に備えられる。開始判定部100Hは、動き量算出部100Eで算出された撮像装置10の動き量の値に基づいて、追尾対象の推定処理を開始するタイミングを判定する。本例では、動き量が規定値を超えた場合に、追尾対象の推定処理を開始するタイミングであると判定する。なお、本例において、撮像装置10の動き量は、画像データから検出される。 As shown in the figure, the function of the start determination unit 100H is further provided. The start determination unit 100H determines the timing to start the estimation process of the tracking target based on the value of the motion amount of the image pickup apparatus 10 calculated by the motion amount calculation unit 100E. In this example, when the amount of movement exceeds the specified value, it is determined that it is the timing to start the estimation process of the tracking target. In this example, the amount of movement of the image pickup apparatus 10 is detected from the image data.

追尾対象推定部100Dは、開始判定部100Hが、追尾対象の推定処理を開始するタイミングと判定した場合に、推定処理を開始する。すなわち、特定期間を開始し、各追尾対象候補の動きベクトルの変化量の平均値を算出して、追尾対象を推定する。 The tracking target estimation unit 100D starts the estimation process when the start determination unit 100H determines that it is the timing to start the tracking target estimation process. That is, a specific period is started, the average value of the amount of change in the motion vector of each tracking target candidate is calculated, and the tracking target is estimated.

図14は、撮像装置の動き量に基づいて追尾対象の設定処理を開始する場合の処理の手順を示すフローチャートである。 FIG. 14 is a flowchart showing a processing procedure when starting a tracking target setting process based on the amount of movement of the image pickup apparatus.

まず、追尾AFの機能がオンされているかが判定される(ステップS11)。追尾AFの機能がオンされている場合(ステップS11が「Yes」の場合)、撮像装置10の動き量の検出が開始される(ステップS12)。そして、検出された動き量が規定値以上か否かが判定される(ステップS13)。動き量が規定値以上の場合、追尾対象の推定処理が開始される(ステップS14)。すなわち、追尾対象を捕捉する動作がユーザによって開始されたと判断されて、追尾対象の推定処理が開始される。一方、動き量が規定値未満の場合、追尾AFの機能がオフされたか否かが判定される(ステップS15)。追尾AFの機能がオフされていない場合は、ステップS12に戻り、再び撮像装置10の動き量が検出される(ステップS12)。一方、追尾AFの機能がオフされた場合は処理を終了する。 First, it is determined whether the tracking AF function is turned on (step S11). When the tracking AF function is turned on (when step S11 is “Yes”), detection of the amount of movement of the image pickup apparatus 10 is started (step S12). Then, it is determined whether or not the detected motion amount is equal to or greater than the specified value (step S13). When the amount of movement is equal to or greater than the specified value, the estimation process of the tracking target is started (step S14). That is, it is determined that the operation of capturing the tracking target has been started by the user, and the estimation process of the tracking target is started. On the other hand, when the amount of movement is less than the specified value, it is determined whether or not the tracking AF function is turned off (step S15). If the tracking AF function is not turned off, the process returns to step S12, and the amount of movement of the image pickup apparatus 10 is detected again (step S12). On the other hand, when the tracking AF function is turned off, the process ends.

このように、撮像装置10の動き量を検出し、規定値以上の動き量が検出された場合に、追尾対象の推定処理を開始する。これにより、処理負荷を低減できる。また、誤認識も防止できる。 In this way, the movement amount of the image pickup apparatus 10 is detected, and when the movement amount of the predetermined value or more is detected, the estimation process of the tracking target is started. As a result, the processing load can be reduced. In addition, erroneous recognition can be prevented.

なお、本例は、撮像により得られた画像データに基づいて撮像装置10の動き量を検出する場合を例に説明したが、装置本体の動き量を検出するセンサが備えられている場合には、当該センサを利用して、撮像装置10の動き量を検出する構成としてもよい。 In this example, the case where the movement amount of the image pickup apparatus 10 is detected based on the image data obtained by the imaging is described as an example, but when the sensor for detecting the movement amount of the apparatus main body is provided, the case is described. The sensor may be used to detect the amount of movement of the image pickup apparatus 10.

[手動による推定処理の開始指示及びキャンセル指示]
追尾対象の推定処理は、ユーザからの指示に応じて開始する構成とすることもできる。たとえば、ボタン操作によって、追尾対象の推定処理の開始を指示する構成にできる。この場合、たとえば、追尾対象の推定処理の開始を指示するボタンを装置本体に設ける。ユーザが、このボタンを押下すると、追尾対象の推定処理が開示される。
[Instruction to start and cancel manual estimation processing]
The estimation process of the tracking target may be configured to start in response to an instruction from the user. For example, it can be configured to instruct the start of the estimation process of the tracking target by operating a button. In this case, for example, a button instructing the start of the estimation process of the tracking target is provided on the main body of the apparatus. When the user presses this button, the estimation process of the tracking target is disclosed.

また、開始した追尾対象の推定処理は、ユーザからの指示に応じて強制的にキャンセルできる構成としてもよい。たとえば、ボタン操作によって、追尾対象の推定処理のキャンセルを指示する構成にできる。この場合、たとえば、追尾対象の推定処理のキャンセルを指示するボタンを装置本体に設ける。追尾対象の推定処理が開始された場合において、ユーザが、このボタンを押下すると、追尾対象の推定処理がキャンセルされる。 Further, the started estimation process of the tracking target may be forcibly canceled according to an instruction from the user. For example, it can be configured to instruct to cancel the estimation process of the tracking target by operating a button. In this case, for example, a button for instructing the cancellation of the estimation process of the tracking target is provided on the main body of the apparatus. When the user presses this button when the tracking target estimation process is started, the tracking target estimation process is canceled.

[画面表示]
表示部18にライブビューを表示する場合において、追尾AFを行う場合、追尾対象に設定された被写体を枠で囲って表示する構成とすることが好ましい。
[Screen display]
When the live view is displayed on the display unit 18, when tracking AF is performed, it is preferable that the subject set as the tracking target is surrounded by a frame and displayed.

また、追尾対象の推定処理を行う場合は、その処理過程で抽出された追尾対象候補の被写体を枠で囲って表示する構成とすることができる。この場合、最終的に追尾対象として設定された被写体を囲う枠と、追尾対象候補の被写体を囲う枠とを、異なる形態(色、明るさ、線種等)で表示することが好ましい。たとえば、追尾対象候補は白色の枠で囲い、追尾対象が確定した後は黄色の枠で囲う構成とすることができる。 Further, when the tracking target is estimated, the subject of the tracking target candidate extracted in the processing process can be displayed by surrounding it with a frame. In this case, it is preferable to display the frame surrounding the subject finally set as the tracking target and the frame surrounding the subject of the tracking target candidate in different forms (color, brightness, line type, etc.). For example, the tracking target candidate can be surrounded by a white frame, and after the tracking target is confirmed, it can be surrounded by a yellow frame.

[追尾対象候補の抽出]
上記実施の形態では、動きベクトルの検出結果に基づいて、追尾対象候補を抽出する構成としているが、追尾対象候補を抽出する構成は、これに限定されるものではない。公知の画像認識技術を利用して、追尾対象候補を抽出する構成とすることができる。たとえば、画像認識により動体を抽出する技術を利用し、抽出した動体を追尾対象候補とすることができる。また、たとえば、画像認識により、人物を抽出する技術(顔のみを抽出する場合を含む)を利用し、抽出した人物を追尾対象候補とすることができる。画像認識には、学習済みモデルを使用することができる。
[Extraction of tracking target candidates]
In the above embodiment, the tracking target candidate is extracted based on the detection result of the motion vector, but the configuration for extracting the tracking target candidate is not limited to this. A known image recognition technique can be used to extract tracking target candidates. For example, by using a technique for extracting a moving object by image recognition, the extracted moving object can be used as a tracking target candidate. Further, for example, by using a technique for extracting a person (including a case where only a face is extracted) by image recognition, the extracted person can be a candidate for tracking. A trained model can be used for image recognition.

[動きベクトルの算出]
上記実施の形態では、1画面を複数のブロックに分割し、ブロック単位で動きベクトルを算出する構成としているが、動きベクトルを算出する方法は、これに限定されるものではない。たとえば、上記のように、画像認識等を利用して追尾対象候補を抽出する場合、抽出した追尾対象候補の動きベクトルを直接算出する構成とすることもできる。
[Calculation of motion vector]
In the above embodiment, one screen is divided into a plurality of blocks and the motion vector is calculated for each block, but the method for calculating the motion vector is not limited to this. For example, as described above, when the tracking target candidate is extracted by using image recognition or the like, the motion vector of the extracted tracking target candidate may be directly calculated.

[焦点検出]
上記実施の形態では、位相差画素が組み込まれた撮像素子を用いて焦点検出(測距)する構成としているが、焦点検出の手段は、これに限定されるものではない。たとえば、専用の位相差AFセンサを用いて焦点検出する構成としてもよい。この他、いわゆるアクティブ方式のAFセンサ(赤外線センサ、超音波センサなど)を用いて焦点検出する構成としてもよい。また、コントラスト方式により焦点検出する構成としてもよい。
[Focus detection]
In the above embodiment, the focus detection (distance measurement) is performed using an image sensor incorporating a retardation pixel, but the means for focus detection is not limited to this. For example, the focus may be detected using a dedicated phase-difference AF sensor. In addition, a so-called active AF sensor (infrared sensor, ultrasonic sensor, etc.) may be used for focus detection. Further, the focus may be detected by the contrast method.

[撮像装置]
本発明の撮像装置には、いわゆるデジタルカメラ、ビデオカメラ等の他、撮像以外の機能を有する装置に一体的に組み込まれた撮像装置も含まれる。たとえば、スマートフォン、パーソナルコンピュータ等に組み込まれた撮像装置も含まれる。
[Image pickup device]
The image pickup device of the present invention includes a so-called digital camera, a video camera, and the like, as well as an image pickup device integrally incorporated in a device having a function other than image pickup. For example, an image pickup device incorporated in a smartphone, a personal computer, or the like is also included.

[プロセッサ]
画像処理装置(上記実施の形態では、追尾対象設定部が画像処理装置に相当)の各機能を実現するプロセッサには、汎用的なプロセッサであるCPU(Central Processing Unit)、FPGA(Field Programmable Gate Array)などの製造後に回路構成を変更可能なプロセッサであるプログラマブルロジックデバイス(Programmable Logic Device:PLD)、ASIC(Application Specific Integrated Circuit)などの特定の処理を実行させるために専用に設計された回路構成を有するプロセッサである専用電気回路などが含まれる。
[Processor]
The processor that realizes each function of the image processing device (in the above embodiment, the tracking target setting unit corresponds to the image processing device) includes a general-purpose processor such as a CPU (Central Processing Unit) and an FPGA (Field Programmable Gate Array). ), Which is a processor whose circuit configuration can be changed after manufacturing, such as Programmable Logic Device (PLD), ASIC (Application Specific Integrated Circuit), etc. It includes a dedicated electric circuit that is a processor to have.

画像処理装置の各機能は、これら各種のプロセッサのうちの1つで実現されていてもよいし、同種又は異種の2つ以上のプロセッサ(たとえば、複数のFPGA、あるいはCPUとFPGAの組み合わせ)で実現されてもよい。 Each function of the image processing device may be realized by one of these various processors, or by two or more processors of the same type or different types (for example, a plurality of FPGAs or a combination of a CPU and an FPGA). It may be realized.

また、画像処理装置の各機能を1つのプロセッサで実現してもよい。信号処理装置の各機能を1つのプロセッサで実現する例としては、第1に、1つ以上のCPUとソフトウェアの組合せで1つのプロセッサを構成し、このプロセッサが、信号処理装置の各機能を実現する形態がある。第2に、システムオンチップ(System On Chip:SoC)などに代表されるように、信号処理装置全体の機能を1つのIC(Integrated Circuit)チップで実現するプロセッサを使用する形態がある。 Further, each function of the image processing device may be realized by one processor. As an example of realizing each function of the signal processing device with one processor, first, one processor is configured by a combination of one or more CPUs and software, and this processor realizes each function of the signal processing device. There is a form to do. Secondly, as typified by a system-on-chip (System On Chip: SoC), there is a mode in which a processor that realizes the functions of the entire signal processing device with one IC (Integrated Circuit) chip is used.

このように、画像処理装置の各機能は、ハードウェア的な構造として、上記各種のプロセッサを1つ以上用いて実現される。 As described above, each function of the image processing device is realized by using one or more of the above-mentioned various processors as a hardware-like structure.

更に、これらの各種のプロセッサのハードウェア的な構造は、より具体的には、半導体素子などの回路素子を組み合わせた電気回路である。 Further, the hardware-like structure of these various processors is, more specifically, an electric circuit in which circuit elements such as semiconductor elements are combined.

10 撮像装置
12 撮像光学系
12A フォーカスレンズ
12B 絞り
14 撮像光学系駆動部
14A フォーカスレンズ駆動部
14B 絞り駆動部
16 撮像部
16A 撮像素子
18 表示部
20 記憶部
22 接続部
24 操作部
26 CPU
28 ROM
30 RAM
100 追尾対象設定部
100A 動きベクトル算出部
100B 追尾対象候補抽出部
100C 変化量算出部
100D 追尾対象推定部
100E 動き量算出部
100F 閾値設定部
100G ブレ量算出部
100H 開始判定部
110 追尾対象検出部
112 フォーカスエリア設定部
114 位相差検出部
116 フォーカスレンズ駆動制御部
200 ブレ検出センサ
O1 人物
O2 人物
O3 木
S1~S7 追尾対象の設定処理の手順
S11~S15 撮像装置の動き量に基づいて追尾対象の設定処理を開始する場合の処理の手順
10 Imaging device 12 Imaging optical system 12A Focus lens 12B Aperture 14 Imaging optical system drive unit 14A Focus lens drive unit 14B Aperture drive unit 16 Imaging unit 16A Image pickup element 18 Display unit 20 Storage unit 22 Connection unit 24 Operation unit 26 CPU
28 ROM
30 RAM
100 Tracking target setting unit 100A Motion vector calculation unit 100B Tracking target candidate extraction unit 100C Change amount calculation unit 100D Tracking target estimation unit 100E Motion amount calculation unit 100F Threshold setting unit 100G Blur amount calculation unit 100H Start determination unit 110 Tracking target detection unit 112 Focus area setting unit 114 Phase difference detection unit 116 Focus lens drive control unit 200 Blur detection sensor O1 Person O2 Person O3 Tree S1 to S7 Tracking target setting procedure S11 to S15 Tracking target setting based on the amount of movement of the image pickup device Processing procedure when starting processing

Claims (17)

撮像装置で撮像された動画像を処理する画像処理装置であって、
プロセッサを備え、
前記プロセッサは、
特定期間内で前記動画像から動きベクトルを時系列順に算出する処理と、
前記動きベクトルの変化量を時系列順に算出する処理と、
前記動きベクトルの変化量に基づいて、追尾対象を推定する処理と、
を行う、
画像処理装置。
An image processing device that processes moving images captured by an image pickup device.
Equipped with a processor
The processor
Processing to calculate motion vectors from the moving image in chronological order within a specific period,
The process of calculating the amount of change in the motion vector in chronological order, and
The process of estimating the tracking target based on the amount of change in the motion vector,
I do,
Image processing device.
前記プロセッサは、前記動きベクトルの変化量の変化傾向に基づいて、前記追尾対象を推定する、
請求項1に記載の画像処理装置。
The processor estimates the tracking target based on the change tendency of the change amount of the motion vector.
The image processing apparatus according to claim 1.
前記プロセッサは、前記動きベクトルの変化量が減少傾向にある被写体を前記追尾対象と推定する、
請求項2に記載の画像処理装置。
The processor estimates that a subject whose movement vector change amount tends to decrease is the tracking target.
The image processing apparatus according to claim 2.
前記プロセッサは、前記動きベクトルの変化量が複数フレームに亘り減少している被写体を前記追尾対象と推定する、
請求項3に記載の画像処理装置。
The processor estimates that a subject whose motion vector change amount is reduced over a plurality of frames is the tracking target.
The image processing apparatus according to claim 3.
前記プロセッサは、前記撮像装置の動き量に基づいて、前記特定期間を開始する、
請求項1から4のいずれか1項に記載の画像処理装置。
The processor starts the specific period based on the amount of movement of the image pickup device.
The image processing apparatus according to any one of claims 1 to 4.
前記プロセッサは、前記特定期間内における前記動きベクトルの変化量の平均値を算出する処理を更に行い、
前記プロセッサは、前記動きベクトルの変化量の平均値が、マイナス方向において閾値を超える被写体を前記追尾対象と推定する、
請求項1から5のいずれか1項に記載の画像処理装置。
The processor further performs a process of calculating the average value of the change amount of the motion vector within the specific period.
The processor estimates that a subject whose average value of changes in the motion vector exceeds a threshold value in the negative direction is the tracking target.
The image processing apparatus according to any one of claims 1 to 5.
前記プロセッサは、
前記動画像を撮像した際の前記撮像装置の動き量に基づいて、前記閾値を設定する処理を更に行う、
請求項6に記載の画像処理装置。
The processor
Further, a process of setting the threshold value is performed based on the amount of movement of the image pickup device when the moving image is imaged.
The image processing apparatus according to claim 6.
前記プロセッサは、前記撮像装置の動き量が大きくなるほど前記閾値をマイナス方向に大きく設定する、
請求項7に記載の画像処理装置。
The processor sets the threshold value in the negative direction as the amount of movement of the image pickup apparatus increases.
The image processing apparatus according to claim 7.
前記プロセッサは、前記撮像装置の動き量が基準値を超える場合、前記閾値を第1閾値に設定し、前記撮像装置の動き量が前記基準値以下の場合、前記閾値を前記第1閾値よりもマイナス方向において小さい第2閾値に設定する、
請求項8に記載の画像処理装置。
The processor sets the threshold value to the first threshold value when the movement amount of the image pickup device exceeds the reference value, and when the movement amount of the image pickup device is equal to or less than the reference value, the threshold value is set to be higher than the first threshold value. Set a small second threshold in the negative direction,
The image processing apparatus according to claim 8.
前記プロセッサは、前記動画像を撮像した際の前記撮像装置の動き量に基づいて、前記特定期間を設定する処理を更に行う、
請求項1から9のいずれか1項に記載の画像処理装置。
The processor further performs a process of setting the specific period based on the amount of movement of the image pickup device when the moving image is captured.
The image processing apparatus according to any one of claims 1 to 9.
前記プロセッサは、前記撮像装置の動き量が大きくなるほど前記特定期間を長く設定する、
請求項10に記載の画像処理装置。
The processor sets the specific period longer as the amount of movement of the image pickup apparatus increases.
The image processing apparatus according to claim 10.
前記プロセッサは、前記撮像装置の動き量が基準値を超える場合、前記特定期間を第1特定期間に設定し、前記撮像装置の動き量が前記基準値以下の場合、前記特定期間を前記第1特定期間よりも短い第2特定期間に設定する、
請求項11に記載の画像処理装置。
The processor sets the specific period to the first specific period when the movement amount of the image pickup device exceeds the reference value, and sets the specific period to the first specific period when the movement amount of the image pickup device is equal to or less than the reference value. Set to the second specific period, which is shorter than the specific period,
The image processing apparatus according to claim 11.
前記プロセッサは、前記動画像に基づいて、前記撮像装置の動き量を算出する処理を更に行う、
請求項1から12のいずれか1項に記載の画像処理装置。
The processor further performs a process of calculating the amount of movement of the image pickup apparatus based on the moving image.
The image processing apparatus according to any one of claims 1 to 12.
前記撮像装置は、本体の動き量を検出するセンサを備え、
前記プロセッサは、前記センサから前記撮像装置の動き量の情報を取得する処理を更に行う、
請求項1から12のいずれか1項に記載の画像処理装置。
The image pickup device includes a sensor that detects the amount of movement of the main body.
The processor further performs a process of acquiring information on the amount of movement of the image pickup apparatus from the sensor.
The image processing apparatus according to any one of claims 1 to 12.
請求項1から14のいずれか1項に記載の画像処理装置と、
推定した追尾対象に焦点を合わせるようにフォーカスレンズを移動させて焦点調節を行う焦点調節部と、
を備えた撮像装置。
The image processing apparatus according to any one of claims 1 to 14,
A focus adjustment unit that adjusts the focus by moving the focus lens so that it focuses on the estimated tracking target.
An image pickup device equipped with.
撮像装置で撮像された動画像を処理する画像処理方法であって、
特定期間内で前記動画像から動きベクトルを時系列順に算出するステップと、
前記動きベクトルの変化量を時系列順に算出するステップと、
前記動きベクトルの変化量に基づいて、追尾対象を推定するステップと、
を含む、
画像処理方法。
It is an image processing method that processes moving images captured by an image pickup device.
A step of calculating a motion vector from the moving image in chronological order within a specific period,
A step of calculating the amount of change in the motion vector in chronological order, and
A step of estimating the tracking target based on the amount of change in the motion vector, and
including,
Image processing method.
撮像装置で撮像された動画像を処理する画像処理プログラムであって、
特定期間内で前記動画像から動きベクトルを時系列順に算出する機能と、
前記動きベクトルの変化量を時系列順に算出する機能と、
前記動きベクトルの変化量に基づいて、追尾対象を推定する機能と、
をコンピュータに実現させる画像処理プログラム。
An image processing program that processes moving images captured by an image pickup device.
A function to calculate motion vectors from the moving image in chronological order within a specific period,
A function to calculate the amount of change in the motion vector in chronological order,
A function to estimate the tracking target based on the amount of change in the motion vector, and
An image processing program that makes a computer realize.
JP2020162404A 2020-09-28 2020-09-28 Image processing device, image processing method, image processing program, and imaging device Active JP7357596B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020162404A JP7357596B2 (en) 2020-09-28 2020-09-28 Image processing device, image processing method, image processing program, and imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020162404A JP7357596B2 (en) 2020-09-28 2020-09-28 Image processing device, image processing method, image processing program, and imaging device

Publications (2)

Publication Number Publication Date
JP2022055043A true JP2022055043A (en) 2022-04-07
JP7357596B2 JP7357596B2 (en) 2023-10-06

Family

ID=80998134

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020162404A Active JP7357596B2 (en) 2020-09-28 2020-09-28 Image processing device, image processing method, image processing program, and imaging device

Country Status (1)

Country Link
JP (1) JP7357596B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010193245A (en) * 2009-02-19 2010-09-02 Casio Computer Co Ltd Image capturing apparatus and method, and imaging program
JP2010250155A (en) * 2009-04-17 2010-11-04 Nikon Corp Electronic camera
JP2011040990A (en) * 2009-08-11 2011-02-24 Nikon Corp Imaging apparatus
JP2013197822A (en) * 2012-03-19 2013-09-30 Canon Inc Imaging device, method for controlling the same, and control program
JP2017163510A (en) * 2016-03-11 2017-09-14 富士通株式会社 Imaging control program, imaging control method and imaging control device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010193245A (en) * 2009-02-19 2010-09-02 Casio Computer Co Ltd Image capturing apparatus and method, and imaging program
JP2010250155A (en) * 2009-04-17 2010-11-04 Nikon Corp Electronic camera
JP2011040990A (en) * 2009-08-11 2011-02-24 Nikon Corp Imaging apparatus
JP2013197822A (en) * 2012-03-19 2013-09-30 Canon Inc Imaging device, method for controlling the same, and control program
JP2017163510A (en) * 2016-03-11 2017-09-14 富士通株式会社 Imaging control program, imaging control method and imaging control device

Also Published As

Publication number Publication date
JP7357596B2 (en) 2023-10-06

Similar Documents

Publication Publication Date Title
JP5159515B2 (en) Image processing apparatus and control method thereof
JP6106921B2 (en) Imaging apparatus, imaging method, and imaging program
US10270978B2 (en) Zoom control device with scene composition selection, and imaging apparatus, control method of zoom control device, and recording medium therewith
KR101431535B1 (en) Apparatus and method for picturing image using function of face drecognition
US10089548B2 (en) Image recognition device and image recognition method
JP5564987B2 (en) Subject tracking device and imaging device
US10013632B2 (en) Object tracking apparatus, control method therefor and storage medium
JP6742173B2 (en) Focus adjusting device and method, and imaging device
EP2088768B1 (en) Imaging apparatus, storage medium storing program and imaging method
US20210256713A1 (en) Image processing apparatus and image processing method
JP6463402B2 (en) Focus adjustment apparatus and method, and imaging apparatus
JP6172973B2 (en) Image processing device
JP7357596B2 (en) Image processing device, image processing method, image processing program, and imaging device
EP2690859B1 (en) Digital photographing apparatus and method of controlling same
JP6099973B2 (en) Subject area tracking device, control method thereof, and program
US11575841B2 (en) Information processing apparatus, imaging apparatus, method, and storage medium
US20220270264A1 (en) Image processing device, control method thereof, imaging device, and recording medium
US20240080554A1 (en) Focusing apparatus, image pickup apparatus, focusing method, and storage medium
CN106464783B (en) Image pickup control apparatus, image pickup apparatus, and image pickup control method
US12008773B2 (en) Object tracking apparatus and control method thereof using weight map based on motion vectors
JP7278737B2 (en) IMAGING DEVICE, CONTROL METHOD THEREOF, AND PROGRAM
US11616902B2 (en) Apparatus to perform alignment to images, image processing method to perform alignment to images, and computer readable non-transitory memory to perform alignment to images
JP2013162453A (en) Imaging apparatus
JP2020088748A (en) Imaging apparatus
JP2008263320A (en) Imaging device and control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220830

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230615

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230620

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230810

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230926

R150 Certificate of patent or registration of utility model

Ref document number: 7357596

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150