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

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

Info

Publication number
JP7357596B2
JP7357596B2 JP2020162404A JP2020162404A JP7357596B2 JP 7357596 B2 JP7357596 B2 JP 7357596B2 JP 2020162404 A JP2020162404 A JP 2020162404A JP 2020162404 A JP2020162404 A JP 2020162404A JP 7357596 B2 JP7357596 B2 JP 7357596B2
Authority
JP
Japan
Prior art keywords
amount
imaging device
image processing
tracking target
specific period
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.)
Active
Application number
JP2020162404A
Other languages
Japanese (ja)
Other versions
JP2022055043A (en
Inventor
陽太 赤石
俊輝 小林
友也 平川
優太 渡邉
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)

Description

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

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

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

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

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

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

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

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

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

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

(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 imaging device when capturing the moving image.

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

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

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

(12)プロセッサは、撮像装置の動き量が基準値を超える場合、特定期間を第1特定期間に設定し、撮像装置の動き量が基準値以下の場合、特定期間を第1特定期間よりも短い第2特定期間に設定する、(11)の画像処理装置。 (12) If the amount of movement of the imaging device exceeds the reference value, the processor sets the specific period to the first specific period, and if the amount of movement of the imaging device is less than or equal to the reference value, the processor sets the specific period to be less than the first specific period. The image processing device according to (11), which is set to 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 motion of the imaging device based on the moving image.

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

(15)(1)から(14)のいずれか一の画像処理装置と、推定した追尾対象に焦点を合わせるようにフォーカスレンズを移動させて焦点調節を行う焦点調節部と、を備えた撮像装置。 (15) An imaging device comprising the image processing device according to any one of (1) to (14) and a focus adjustment unit that adjusts the focus by moving a 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, which includes the steps of calculating a motion vector from the moving image in a chronological order within a specific period, and calculating an amount of change in the motion vector in a chronological order. and estimating a tracking target based on the amount of change in a motion vector.

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

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

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

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

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

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

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

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

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

撮像光学系駆動部14は、フォーカスレンズ12Aを駆動するフォーカスレンズ駆動部14A、及び、絞り12Bを駆動する絞り駆動部14Bを有する。フォーカスレンズ駆動部14Aは、フォーカスレンズ12Aを駆動するアクチュエータ及びその駆動回路を有する。絞り駆動部14Bは、絞り12Bを駆動するアクチュエータ及びその駆動回路を有する。 The imaging 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 that drives the focus lens 12A and a drive circuit thereof. The aperture drive unit 14B includes an actuator that drives the aperture 12B and its drive circuit.

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

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

また、本実施の形態の撮像装置10では、撮像素子16Aとして、位相差画素が組み込まれた撮像素子が用いられる。位相差画素が組み込まれた撮像素子を用いることで、画面内の被写体の位相差の情報を取得できる。また、取得した位相差の情報から画面内の被写体の焦点のズレの方向及び焦点のズレ量(デフォーカス量)を検出できる。位相差画素が組み込まれた撮像素子、及び、その撮像素子を用いた位相差の検出方法は公知である。したがって、その詳細についての説明は省略する。 Further, in the imaging device 10 of the present embodiment, an imaging element incorporating a phase difference pixel is used as the imaging element 16A. By using an image sensor incorporating phase difference pixels, information on the phase difference of a subject within the screen can be acquired. Furthermore, the direction and amount of focus shift (defocus amount) of the subject within the screen can be detected from the acquired phase difference information. 2. Description of the Related Art An image sensor incorporating a phase difference pixel and a method for detecting a phase difference using the image sensor are well known. Therefore, detailed explanation thereof 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 configured with a display such as an LCD (Liquid Crystal Display) or an organic EL display (Organic Light Emitting Diode display, OLED display). Moreover, a touch panel display equipped with a touch panel can also be used as the display constituting the display section 18. The display section 18 also includes one in the form of an EVF (Electronic View Finder). However, when the display section 18 is configured with an EVF, the display section 18 is not equipped 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 to store captured image data as well as various data. The storage unit 20 includes, for example, EEPROM (Electrically Erasable Programmable Read-only Memory) including Flash Memory, SSD (Solid State Drive), and Flash Memory. It is composed of non-volatile semiconductor memory such as. The storage unit 20 may be integrally provided in the device body (in the form of a so-called built-in memory), or may be removable (in the 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 the communication standard, for example, HDMI (High-Definition Multimedia Interface) 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 imaging device 10. The operation device includes various operation buttons such as a power button, a shutter button, and a recording button. Further, when the display forming the display unit 18 is a touch panel display, the touch panel is also included in the operation device. The imaging apparatus 10 of this embodiment includes a tracking AF switch that turns tracking AF on and off as an operating device. Note that tracking AF can also be turned on and off on a setting screen.

CPU26は、プロセッサの一例である。CPU26は、所定のプログラムを実行することにより、撮像装置10の制御部及び画像処理部等として機能する。CPU26は、制御部として、AE制御(AE:Automatic Exposure)、AF制御等の撮像制御、表示部18への表示制御、記憶部20への記録制御等の処理を行う。また、CPU26は、画像処理部として、表示用の画像データの生成、記録用の画像データの生成等の処理を行う。表示用の画像データ及び記録用の画像データは、RAWデータ(撮像部16から出力された未加工の動画像データ)に対し所定の画像処理(いわゆる現像処理)を施して生成する。ここでの画像処理には、オフセット処理、ガンマ補正処理、デモザイク処理、RGB/YCrCb変換処理、ホワイトバランス処理等が含まれる。これらは公知の処理であるので、その詳細についての説明は省略する。また、CPU26は、画像処理部として、追尾AFを行う際に、追尾対象の設定処理を行う。この点については、後述する。 CPU26 is an example of a processor. The CPU 26 functions as a control unit, an image processing unit, etc. of the imaging device 10 by executing a predetermined program. As a control unit, the CPU 26 performs processing such as automatic exposure (AE) control, imaging control such as AF control, display control on the display unit 18, and recording control on the storage unit 20. Further, the CPU 26 acts as an image processing unit and performs processing such as generation of image data for display and generation of image data for recording. Image data for display and image data for recording are generated by performing predetermined image processing (so-called development processing) on RAW data (unprocessed moving image data output from the imaging unit 16). 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, detailed explanation 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 discussed later.

CPU26が行う上記の各処理については、その一部又は全部をCPU26の内部に設けたハードウェアで行う構成とすることもできる。 The above-mentioned 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 programs executed by the CPU 26 and various data necessary for control and the like. Note that the memory constituting the ROM 28 includes an EEPROM including 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 diagram showing an example of the functions 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, etc. Realize.

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

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

フォーカスエリア設定部112は、追尾対象検出部110の検出結果に基づいて、フォーカスエリアを設定する。具体的には、追尾対象検出部110で検出された追尾対象を含む矩形の領域をフォーカスエリアに設定する。 The focus area setting unit 112 sets a 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 detection unit 114 detects the phase difference of the subject within the focus area set by the focus area setting unit 112. The phase difference detection unit 114 detects the phase difference of the subject within the focus area based on the image data obtained from the imaging unit 16. More specifically, the phase difference of the subject within 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 section 116 controls the drive of the focus lens drive section 14A based on the detection result of the phase difference by the phase difference detection section 114. Specifically, the drive amount of the focus lens 12A required to focus on the subject within the focus area is calculated based on the phase difference detection result, and the focus lens drive unit 14A is driven with the calculated drive amount. .

本実施の形態の撮像装置10において、追尾対象検出部110、フォーカスエリア設定部112、位相差検出部114及びフォーカスレンズ駆動制御部116は、推定した追尾対象に焦点を合わせるようにフォーカスレンズを移動させて焦点調節を行う焦点調節部として機能する。 In the imaging device 10 of this 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 section that adjusts the focus by adjusting the focus.

[追尾対象設定部]
上記のように、追尾対象設定部100は、撮像部16から逐次出力される画像データ(動画像における各フレームの画像データ)から主要被写体を推定し、追尾対象に設定する。本実施の形態の撮像装置10において、追尾対象設定部100は、画像処理装置の一例である。
[Tracking target setting section]
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 imaging device 10 of this embodiment, the tracking target setting unit 100 is an example of an image processing device.

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

同図に示すように、追尾対象設定部100は、動きベクトル算出部100A、追尾対象候補抽出部100B、変化量算出部100C及び追尾対象推定部100Dの機能を有する。追尾対象推定部100Dで推定された被写体が追尾対象に設定される。CPU24は、所定のプログラム(画像処理プログラム)を実行することにより、各機能を実現する。 As shown in the figure, the tracking target setting unit 100 has the functions of a motion vector calculation unit 100A, a tracking target candidate extraction unit 100B, a change amount calculation unit 100C, and a tracking target estimation unit 100D. The subject estimated by the tracking target estimation unit 100D is set as the tracking target. The CPU 24 implements 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 image data (image data of each frame in a moving image) sequentially output from the imaging unit 16, and calculates a motion vector within the image. By sequentially processing image data sequentially output from the imaging unit 16, motion vectors are calculated in chronological order. In the imaging device 10 of this embodiment, the screen is divided into M×N blocks (M and N are integers of 2 or more), and a motion vector is calculated for each block. The motion vector calculation method will be outlined below.

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

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

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

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

図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. 4. The figure shows the normalized motion vectors of each block.

同図において、斜線で示す領域は、nフレーム目の画像において、動体である人物O1及び人物O2が存在する領域である。動体である人物O1及び人物O2が存在する領域のブロックは、背景のブロックと異なる動きベクトルを示す。また、動体である人物O1及び人物O2も、その動きが異なることから、異なる動きベクトルを示す。 In the figure, the area indicated by diagonal lines is the area where the moving objects, the person O1 and the person O2, exist in the n-th frame image. The blocks in the area where the moving objects, the persons O1 and O2, exist exhibit motion vectors different from the blocks in the background. Furthermore, the moving objects, the person O1 and the person O2, exhibit 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 motion vector calculation results. As shown in FIG. 6, substantially the same motion vector is calculated for blocks to which the same subject belongs. Therefore, tracking target candidates can be extracted by extracting blocks with almost the same motion vector as a block. The tracking target candidate extraction unit 100B extracts tracking target candidates by, for example, combining blocks in which the difference in motion vector between adjacent blocks is equal to or less than a threshold value. Alternatively, clustering processing is performed to extract tracking target candidates. In 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 amount of change in the motion vector of each tracking target candidate. The amount of change is calculated as the difference between the previous and subsequent motion vectors. That is, if the motion vector of the n-th frame is Vn and the motion vector of the n-1 frame is Vn-1, the amount of change ΔV is calculated as ΔV=[Vn]-[Vn-1]. Since the motion vectors are calculated sequentially, the amount of change is also calculated sequentially. Note that the motion vector of each tracking target candidate is calculated as, for example, the average of the motion vectors of blocks extracted as tracking target candidates.

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

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

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

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

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

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

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

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

上記のように、追尾対象は、動きベクトルの変化量が、凡そマイナスの値で推移して収束する。この場合、複数フレーム間での平均を取ると、その値はマイナスの値を示す。本実施の形態の撮像装置10では、各追尾対象候補について、特定期間における動きベクトルの変化量の平均を算出し、算出した平均値に基づいて、追尾対象を推定する。具体的には、算出した平均値と閾値とを比較し、マイナス方向において閾値を超える被写体を追尾対象と推定する。なお、マイナス方向において閾値を超える被写体を追尾対象と推定するので、閾値はマイナスの値に設定される。特定期間は、あらかじめ定められた期間である。特定期間は、たとえば、あらかじめ定められたフレーム数分の撮像期間として設定される。 As described above, the amount of change in the motion vector of the tracking target changes to approximately a negative value and converges. In this case, the average value over multiple frames shows a negative value. In the imaging device 10 of the present embodiment, the average amount of change in motion vector during 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 a threshold value, and a subject that exceeds the threshold value in the negative direction is estimated to be a tracking target. Note that since a subject exceeding the threshold in the negative direction is estimated to be a tracking target, the threshold 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 estimating unit 100D calculates the average value of the amount of change in the motion vector of each tracking target candidate calculated by the change amount calculating unit 100C, and estimates the tracking target based on 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 it with a threshold value is performed, and a process of extracting tracking target candidates exceeding the threshold value in the negative direction is performed. The extracted tracking target candidate is estimated to be the tracking target. If the tracking target cannot be extracted from the average value calculation result for the first specific period, the average value calculation process is performed again, and the tracking target extraction process is performed based on the calculation result. That is, the process is repeated until the tracking target is extracted.

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

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

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

次に、算出した動きベクトルの変化量に関して、特定期間での平均値を算出する(ステップS4)。そして、算出した平均値に基づいて、追尾対象を抽出する(ステップS5)。具体的には、各追尾対象候補の動きベクトルの変化量の平均値と閾値とを比較し、マイナス方向において閾値を超える追尾対象候補を抽出し、追尾対象とする。この処理の結果、追尾対象を抽出できたか否かを判定する(ステップS6)。追尾対象が抽出できた場合は、抽出した被写体を追尾対象に設定する(ステップS7)。一方、追尾対象を抽出できなかった場合は、ステップS1に戻り、次の特定期間で、再度、追尾対象の抽出を行う。 Next, regarding the calculated amount of change in the motion vector, an average value over a specific period is calculated (step S4). Then, a tracking target is extracted based on the calculated average value (step S5). Specifically, the average value of the amount of change in the motion vector of each tracking target candidate is compared with a threshold value, and tracking target candidates exceeding the threshold value in the negative direction are extracted and set as tracking targets. As a result of this process, it is determined whether the tracking target has been extracted (step S6). If the tracking target has been 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つに絞られるまで繰り返し追尾対象の推定処理が行われる。なお、この場合は、先の特定期間で追尾対象として抽出された追尾対象候補に限定して、追尾対象の推定処理を行う構成としてもよい。 Note that if a plurality of tracking target candidates exceeding the threshold in the negative direction are extracted, it is determined that the tracking target cannot be extracted. That is, if the tracking target could not 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 process of estimating the tracking target is repeatedly performed until the number of tracking targets is finally narrowed down to one. Note that in this case, a configuration may be adopted in which the tracking target estimation process is performed only for tracking target candidates extracted as tracking targets in the previous specific period.

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

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

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

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

したがって、追尾対象とする被写体の動きの速さによって特定期間及び閾値を設定することで、より高精度に追尾対象を推定できる。具体的には、追尾対象とする被写体の動きが速くなるほど特定期間を長い期間に設定する。あるいは、閾値をよりマイナス方向に大きな値に設定する。 Therefore, by setting the specific period and the threshold value according to the speed of movement of the subject to be tracked, the subject to be tracked 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 imaging device at the beginning of shooting. That is, a fast-moving subject causes the imaging device to move greatly in a short period of time in accordance with the subject's movement, so the amount of movement of the imaging device at the beginning of shooting becomes large. Therefore, the speed of movement of the subject to be tracked can be estimated from the amount of movement of the imaging device.

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

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

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

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

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

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

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

図11に示すように、本例の追尾対象設定部100は、動き量算出部100E及び閾値設定部100Fの機能を更に有する。 As shown in FIG. 11, the tracking target setting section 100 of this example further has the functions of a motion amount calculation section 100E and a threshold value setting section 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 amount of motion of the imaging device 10 based on the motion vector calculated by the motion vector calculation unit 100A. In this example, the average motion vector of the entire screen for a plurality of frames from the beginning of shooting is calculated, and its magnitude is taken as the amount of motion of the imaging 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 taken as the amount of motion of the imaging 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 in one frame is (x1, y1), the value of the motion vector V2 of the entire screen in two frames is (x2, y2), and the value of the motion vector V3 of the entire screen in three frames is (x2, y2). Suppose that it is (x3, y3). Note that x1, x2, and x3 are the x-direction components of the motion vectors V1, V2, and V3, respectively, and y1, y2, and y3 are the 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 for the entire screen is calculated as [(x1+x2+x3) 2 +(y1+y2+y3) 2 ] 1/2 /3. For example, the value of the motion vector V1 of the entire screen in one frame is (0,0), the value of the motion vector V2 of the entire screen in the second frame is (10,0), and the value of the motion vector V3 of the entire screen in the third frame is (0,0). In the case of (15,0), it is calculated as [(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 a threshold value based on the value of the amount of movement of the imaging device 10 calculated by the amount of movement calculation unit 100E. In this example, when the amount of motion exceeds the reference value, the threshold is set to the first threshold. On the other hand, if the amount of motion is less than or equal to the reference value, the threshold is set to the second threshold. The second threshold is set to a value smaller in the negative direction than the first threshold (a value closer to zero).

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

なお、本例では、閾値を最適化する例で説明したが、特定期間についても同様の手法で最適化できる。 In this example, an example in which the threshold value is optimized has been described, but a specific period can also be optimized using a similar method.

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

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

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

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

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

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

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

このように、本体の動き量を検出するセンサが撮像装置に備えられている場合には、そのセンサを利用して、撮像装置の動き量の情報を取得し、閾値を最適化できる。 In this way, when the imaging device is equipped with a sensor that detects the amount of movement of the main body, the sensor can be used to obtain information about the amount of movement of the imaging device and optimize the threshold value.

なお、本例では、閾値を最適化する例で説明したが、特定期間についても同様の手法で最適化できる。 In this example, an example in which the threshold value is optimized has been described, but a specific period can also be optimized using a similar method.

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

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

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

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

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

追尾対象推定部100Dは、開始判定部100Hが、追尾対象の推定処理を開始するタイミングと判定した場合に、推定処理を開始する。すなわち、特定期間を開始し、各追尾対象候補の動きベクトルの変化量の平均値を算出して、追尾対象を推定する。 The tracking target estimating unit 100D starts the estimation process when the start determining 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 illustrating a processing procedure when starting tracking target setting processing based on the amount of movement of the imaging device.

まず、追尾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). If the tracking AF function is turned on (“Yes” in step S11), detection of the amount of movement of the imaging device 10 is started (step S12). Then, it is determined whether the detected amount of motion is greater than or equal to a specified value (step S13). If the amount of motion is equal to or greater than the specified value, tracking target estimation processing is started (step S14). That is, it is determined that the user has started an operation to capture the tracking target, and the tracking target estimation process is started. On the other hand, if the amount of movement is less than the specified value, it is determined whether 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 imaging device 10 is detected again (step S12). On the other hand, if the tracking AF function is turned off, the process ends.

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

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

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

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

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

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

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

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

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

[撮像装置]
本発明の撮像装置には、いわゆるデジタルカメラ、ビデオカメラ等の他、撮像以外の機能を有する装置に一体的に組み込まれた撮像装置も含まれる。たとえば、スマートフォン、パーソナルコンピュータ等に組み込まれた撮像装置も含まれる。
[Imaging device]
The imaging device of the present invention includes not only a so-called digital camera, a video camera, etc., but also an imaging device integrated into a device having functions other than imaging. For example, it also includes imaging devices built into smartphones, personal computers, and the like.

[プロセッサ]
画像処理装置(上記実施の形態では、追尾対象設定部が画像処理装置に相当)の各機能を実現するプロセッサには、汎用的なプロセッサである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 section corresponds to the image processing device) includes a CPU (Central Processing Unit), which is a general-purpose processor, and a FPGA (Field Programmable Gate Array). ), which are processors whose circuit configurations can be changed after manufacturing, and ASICs (Application Specific Integrated Circuits), which are processors with circuit configurations specifically designed to perform specific processes. This includes dedicated electrical circuits such as processors with

画像処理装置の各機能は、これら各種のプロセッサのうちの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, multiple FPGAs or a combination of a CPU and FPGA). 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 a 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 of doing so. Second, there is a form of using a processor that realizes the functions of the entire signal processing device with one IC (Integrated Circuit) chip, as typified by a system on chip (SoC).

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

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

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 section 14A Focus lens drive section 14B Aperture drive section 16 Imaging section 16A Imaging element 18 Display section 20 Storage section 22 Connection section 24 Operation section 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 Shake 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 Shake detection sensor O1 Person O2 Person O3 Trees S1 to S7 Tracking target setting processing steps S11 to S15 Setting the tracking target based on the amount of movement of the imaging device Processing steps when starting processing

Claims (14)

撮像装置で撮像された動画像を処理する画像処理装置であって、
プロセッサを備え、
前記プロセッサは、
特定期間内で前記動画像から動きベクトルを時系列順に算出する処理と、
前記動きベクトルの変化量を時系列順に算出する処理と、
前記特定期間内における前記動きベクトルの変化量の平均値を算出する処理と、
前記動きベクトルの変化量の平均値が、マイナス方向において閾値を超える被写体を追尾対象推定する処理と、
を行う、
画像処理装置。
An image processing device that processes moving images captured by an imaging device,
Equipped with a processor,
The processor includes:
a process of calculating motion vectors from the video images in chronological order within a specific period;
a process of calculating the amount of change in the motion vector in chronological order;
a process of calculating an average value of the amount of change in the motion vector within the specific period;
A process of estimating a subject whose average value of the amount of change in the motion vector exceeds a threshold value in a negative direction as a tracking target;
I do,
Image processing device.
前記プロセッサは、前記動画像を撮像した際の前記撮像装置の動き量に基づいて、前記閾値を設定する処理を更に行う、
請求項に記載の画像処理装置。
The processor further performs a process of setting the threshold value based on the amount of movement of the imaging device when capturing the moving image.
The image processing device according to claim 1 .
前記プロセッサは、前記撮像装置の動き量が大きくなるほど前記閾値をマイナス方向に大きく設定する、
請求項に記載の画像処理装置。
The processor sets the threshold value to a larger value in a negative direction as the amount of movement of the imaging device increases.
The image processing device according to claim 2 .
前記プロセッサは、前記撮像装置の動き量が基準値を超える場合、前記閾値を第1閾値に設定し、前記撮像装置の動き量が前記基準値以下の場合、前記閾値を前記第1閾値よりもマイナス方向において小さい第2閾値に設定する、
請求項に記載の画像処理装置。
The processor sets the threshold to a first threshold when the amount of motion of the imaging device exceeds a reference value, and sets the threshold to be less than the first threshold when the amount of motion of the imaging device is less than or equal to the reference value. Set to a smaller second threshold in the negative direction,
The image processing device according to claim 3 .
前記プロセッサは、前記撮像装置の動き量に基づいて、前記特定期間を開始する、
請求項1から4のいずれか1項に記載の画像処理装置。
The processor starts the specific period based on the amount of movement of the imaging device.
The image processing device according to any one of claims 1 to 4.
撮像装置で撮像された動画像を処理する画像処理装置であって、
プロセッサを備え、
前記プロセッサは、
特定期間内で前記動画像から動きベクトルを時系列順に算出する処理と、
前記動きベクトルの変化量を時系列順に算出する処理と、
前記動きベクトルの変化量に基づいて、追尾対象を推定する処理と、
前記動画像を撮像した際の前記撮像装置の動き量に基づいて、前記特定期間を設定する処理であって、前記撮像装置の動き量が大きくなるほど前記特定期間を長く設定する処理と、
を行う、
画像処理装置。
An image processing device that processes moving images captured by an imaging device,
Equipped with a processor,
The processor includes:
a process of calculating motion vectors from the video images in chronological order within a specific period;
a process of calculating the amount of change in the motion vector in chronological order;
a process of estimating a tracking target based on the amount of change in the motion vector;
a process of setting the specific period based on the amount of movement of the imaging device when capturing the moving image, the process of setting the specific period to be longer as the amount of movement of the imaging device increases;
I do,
Image processing device.
前記プロセッサは、前記撮像装置の動き量が基準値を超える場合、前記特定期間を第1特定期間に設定し、前記撮像装置の動き量が前記基準値以下の場合、前記特定期間を前記第1特定期間よりも短い第2特定期間に設定する、
請求項に記載の画像処理装置。
The processor sets the specific period to the first specific period when the amount of motion of the imaging device exceeds the reference value, and sets the specific period to the first specific period when the amount of motion of the imaging device is equal to or less than the reference value. Set to a second specific period that is shorter than the specific period,
The image processing device according to claim 6 .
前記プロセッサは、前記動画像に基づいて、前記撮像装置の動き量を算出する処理を更に行う、
請求項1からのいずれか1項に記載の画像処理装置。
The processor further performs a process of calculating a motion amount of the imaging device based on the moving image.
The image processing device according to any one of claims 1 to 7 .
前記撮像装置は、本体の動き量を検出するセンサを備え、
前記プロセッサは、前記センサから前記撮像装置の動き量の情報を取得する処理を更に行う、
請求項1からのいずれか1項に記載の画像処理装置。
The imaging 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 imaging device from the sensor.
The image processing device according to any one of claims 1 to 8 .
請求項1からのいずれか1項に記載の画像処理装置と、
推定した追尾対象に焦点を合わせるようにフォーカスレンズを移動させて焦点調節を行う焦点調節部と、
を備えた撮像装置。
An image processing device according to any one of claims 1 to 9 ,
a focus adjustment unit that adjusts the focus by moving a focus lens so as to focus on the estimated tracking target;
An imaging device equipped with
撮像装置で撮像された動画像を処理する画像処理方法であって、
特定期間内で前記動画像から動きベクトルを時系列順に算出するステップと、
前記動きベクトルの変化量を時系列順に算出するステップと、
前記特定期間内における前記動きベクトルの変化量の平均値を算出するステップと、
前記動きベクトルの変化量の平均値が、マイナス方向において閾値を超える被写体を追尾対象推定するステップと、
を含む、
画像処理方法。
An image processing method for processing a moving image captured by an imaging device, the method comprising:
calculating motion vectors from the video images in chronological order within a specific period;
calculating the amount of change in the motion vector in chronological order;
calculating an average value of the amount of change in the motion vector within the specific period;
estimating a subject whose average value of the amount of change in the motion vector exceeds a threshold in the negative direction as a tracking target;
including,
Image processing method.
撮像装置で撮像された動画像を処理する画像処理方法であって、
特定期間内で前記動画像から動きベクトルを時系列順に算出するステップと、
前記動きベクトルの変化量を時系列順に算出するステップと、
前記動きベクトルの変化量に基づいて、追尾対象を推定するステップと、
前記動画像を撮像した際の前記撮像装置の動き量に基づいて、前記特定期間を設定するステップであって、前記撮像装置の動き量が大きくなるほど前記特定期間を長く設定するステップと、
を含む、
画像処理方法。
An image processing method for processing a moving image captured by an imaging device, the method comprising:
calculating motion vectors from the video images in chronological order within a specific period;
calculating the amount of change in the motion vector in chronological order;
estimating a tracking target based on the amount of change in the motion vector;
setting the specific period based on the amount of movement of the imaging device when capturing the moving image, and setting the specific period to be longer as the amount of movement of the imaging device increases;
including,
Image processing method.
撮像装置で撮像された動画像を処理する画像処理プログラムであって、
特定期間内で前記動画像から動きベクトルを時系列順に算出する機能と、
前記動きベクトルの変化量を時系列順に算出する機能と、
前記特定期間内における前記動きベクトルの変化量の平均値を算出する機能と、
前記動きベクトルの変化量の平均値が、マイナス方向において閾値を超える被写体を追尾対象推定する機能と、
をコンピュータに実現させる画像処理プログラム。
An image processing program that processes moving images captured by an imaging device,
a function of calculating motion vectors from the video images in chronological order within a specific period;
a function of calculating the amount of change in the motion vector in chronological order;
a function of calculating an average value of the amount of change in the motion vector within the specific period;
a function of estimating a subject whose average value of the amount of change in the motion vector exceeds a threshold value in a negative direction as a tracking target;
An image processing program that allows computers to realize this.
撮像装置で撮像された動画像を処理する画像処理プログラムであって、
特定期間内で前記動画像から動きベクトルを時系列順に算出する機能と、
前記動きベクトルの変化量を時系列順に算出する機能と、
前記動きベクトルの変化量に基づいて、追尾対象を推定する機能と、
前記動画像を撮像した際の前記撮像装置の動き量に基づいて、前記特定期間を設定する機能であって、前記撮像装置の動き量が大きくなるほど前記特定期間を長く設定する機能と、
をコンピュータに実現させる画像処理プログラム。
An image processing program that processes moving images captured by an imaging device,
a function of calculating motion vectors from the video images in chronological order within a specific period;
a function of calculating the amount of change in the motion vector in chronological order;
a function of estimating a tracking target based on the amount of change in the motion vector;
a function of setting the specific period based on the amount of movement of the imaging device when capturing the moving image, and a function of setting the specific period to be longer as the amount of movement of the imaging device increases;
An image processing program that allows computers to realize this.
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 JP2022055043A (en) 2022-04-07
JP7357596B2 true 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
JP2022055043A (en) 2022-04-07

Similar Documents

Publication Publication Date Title
JP6106921B2 (en) Imaging apparatus, imaging method, and imaging program
US8212896B2 (en) Image capturing apparatus and method for controlling the same
US8692888B2 (en) Image pickup apparatus
US9258481B2 (en) Object area tracking apparatus, control method, and program of the same
US20160379075A1 (en) Image recognition device and image recognition method
CN107850753B (en) Detection apparatus, detection method, detection program, and imaging apparatus
US10013632B2 (en) Object tracking apparatus, control method therefor and storage medium
JP6742173B2 (en) Focus adjusting device and method, and imaging device
US20210256713A1 (en) Image processing apparatus and image processing method
JP5189913B2 (en) Image processing device
JP7357596B2 (en) Image processing device, image processing method, image processing program, and imaging device
JP6172973B2 (en) Image processing device
JP6099973B2 (en) Subject area tracking device, control method thereof, and program
EP2690859B1 (en) Digital photographing apparatus and method of controlling same
JP6024135B2 (en) Subject tracking display control device, subject tracking display control method and program
JP2018022128A (en) Focus adjustment device and method and imaging apparatus
CN110024373B (en) Image pickup apparatus, image pickup method, and storage medium
US20230300460A1 (en) Imaging apparatus, imaging control method, and imaging control program
US20240080554A1 (en) Focusing apparatus, image pickup apparatus, focusing method, and storage medium
WO2023106103A1 (en) Image processing device and control method for same
JP7278737B2 (en) IMAGING DEVICE, CONTROL METHOD THEREOF, AND PROGRAM
US20220270264A1 (en) Image processing device, control method thereof, imaging device, and recording medium
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
JP2023086274A (en) Image processing device and control method for the same
JP2020088748A (en) Imaging apparatus

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