Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7770855B2 - Control device, imaging device, control method, and program - Google Patents
[go: Go Back, main page]

JP7770855B2 - Control device, imaging device, control method, and program - Google Patents

Control device, imaging device, control method, and program

Info

Publication number
JP7770855B2
JP7770855B2 JP2021167692A JP2021167692A JP7770855B2 JP 7770855 B2 JP7770855 B2 JP 7770855B2 JP 2021167692 A JP2021167692 A JP 2021167692A JP 2021167692 A JP2021167692 A JP 2021167692A JP 7770855 B2 JP7770855 B2 JP 7770855B2
Authority
JP
Japan
Prior art keywords
main subject
subject
control area
control
image stabilization
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
JP2021167692A
Other languages
Japanese (ja)
Other versions
JP2023057932A (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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2021167692A priority Critical patent/JP7770855B2/en
Publication of JP2023057932A publication Critical patent/JP2023057932A/en
Priority to JP2025183668A priority patent/JP2026009250A/en
Application granted granted Critical
Publication of JP7770855B2 publication Critical patent/JP7770855B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Automatic Focus Adjustment (AREA)
  • Adjustment Of Camera Lenses (AREA)
  • Studio Devices (AREA)

Description

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

撮像された画像の被写体に生じるブレ(被写体ブレ)には、手ブレのような撮像装置の動きによって生じるものと、被写体の動きによって生じるものがある。被写体ブレを補正して撮影者の意図した被写体(主被写体)を追尾して安定した構図を提供するには、背景など他の被写体の動きと分離された主被写体の動きを検出して、主被写体が画面のほぼ同じ位置に捉え続けるように補正することが必要である。 Shake that occurs in the subject of a captured image (subject blur) can be caused by movement of the imaging device, such as camera shake, or by the movement of the subject. To correct subject blur and track the subject intended by the photographer (main subject) to provide a stable composition, it is necessary to detect the movement of the main subject separately from the movement of other subjects such as the background, and correct the movement so that the main subject remains captured in approximately the same position on the screen.

特許文献1には、撮像装置に加わる振れを示す振れ検出信号と被写体の動きベクトルとに基づいて、撮像画像に生じる像ブレを補正するため補正部を駆動することで、流し撮りを容易に行う方法が開示されている。特許文献2には、AF枠の描画位置と焦点検出領域の位置を異なる特性で変更することで、AF枠を移動させる際のチラツキ感を抑える方法が開示されている。 Patent Document 1 discloses a method for easily performing panning by driving a correction unit to correct image blur that occurs in a captured image based on a shake detection signal that indicates shake applied to the imaging device and the motion vector of the subject. Patent Document 2 discloses a method for reducing the flickering sensation that occurs when the AF frame is moved by changing the drawing position of the AF frame and the position of the focus detection area with different characteristics.

特開2018-36366号公報Japanese Patent Application Laid-Open No. 2018-36366 特開2010-204585号公報Japanese Patent Application Laid-Open No. 2010-204585 特許第3143173号公報Patent No. 3143173

特許文献1の方法では、合焦位置に応じて動きベクトルの検出領域の位置を設定するため、補正対象の追尾が困難になった場合に、ブレ補正動作で対象にすべき被写体(領域)としては適さないものを対象として決めてしまう可能性がある。特許文献2の方法では、実際に制御対象とすべき領域と変更された領域とが一致しない場合がある。このため、特許文献1および特許文献2の方法では、複数の被写体が存在するシーンにおいて、滑らかで品位の良い画像を取得することができない。 In the method of Patent Document 1, the position of the motion vector detection area is set according to the focus position, so if it becomes difficult to track the correction target, there is a possibility that an inappropriate subject (area) will be selected as the target for image stabilization operation. In the method of Patent Document 2, the area that should actually be controlled may not match the changed area. As a result, the methods of Patent Documents 1 and 2 are unable to capture smooth, high-quality images in scenes with multiple subjects.

そこで本発明は、複数の被写体が存在するシーンにおいて、滑らかで品位の良い画像を取得することが可能な制御装置、撮像装置、制御方法、およびプログラムを提供することを目的とする。 The present invention aims to provide a control device, imaging device, control method, and program that can capture smooth, high-quality images in scenes with multiple subjects.

本発明の一側面としての制御装置は、主被写体情報を検出する被写体検出手段と、画像における動きベクトル情報を検出する動きベクトル検出手段と、慣性センサを用いてブレ情報を検出するブレ検出手段と、前記主被写体情報と前記ブレ情報と前記動きベクトル情報とに基づいて、ブレ補正制御領域を合焦制御領域と異ならせるか否か判定する制御手段と、を有する。
A control device according to one aspect of the present invention includes a subject detection means for detecting main subject information, a motion vector detection means for detecting motion vector information in an image, a blur detection means for detecting blur information using an inertial sensor , and a control means for determining whether or not to make a blur correction control area different from a focus control area based on the main subject information, the blur information, and the motion vector information.

本発明の他の目的及び特徴は、以下の実施形態において説明される。 Other objects and features of the present invention are described in the following embodiments.

本発明によれば、複数の被写体が存在するシーンにおいて、滑らかで品位の良い画像を取得することが可能な制御装置、撮像装置、制御方法、およびプログラムを提供することができる。 The present invention provides a control device, imaging device, control method, and program that can capture smooth, high-quality images in scenes containing multiple subjects.

各実施形態における撮像システムのブロック図である。FIG. 2 is a block diagram of an imaging system according to each embodiment. 各実施形態における主被写体検出処理のフローチャートである。10 is a flowchart of a main subject detection process in each embodiment. 各実施形態における撮影処理のフローチャートである。10 is a flowchart of a photographing process in each embodiment. 第1の実施形態におけるブレ補正処理のフローチャートである。4 is a flowchart of a shake correction process according to the first embodiment. 第1の実施形態におけるベクトル検出枠の設定に関する説明図である。FIG. 4 is an explanatory diagram relating to setting of a vector detection frame in the first embodiment. 第2の実施形態におけるブレ補正処理のフローチャートである。10 is a flowchart of a shake correction process according to a second embodiment.

以下、本発明の実施形態について、図面を参照しながら詳細に説明する。 Embodiments of the present invention will be described in detail below with reference to the drawings.

(第1の実施形態)
まず、図1を参照して、本発明の第1の実施形態における撮像装置について説明する。図1は、撮像システム100のブロック図である。撮像システム100は、撮像装置(カメラ本体)1と、撮像装置1に対して着脱可能な交換レンズ(レンズ装置)31とを備えて構成される。
(First embodiment)
First, an image capturing apparatus according to a first embodiment of the present invention will be described with reference to Fig. 1. Fig. 1 is a block diagram of an image capturing system 100. The image capturing system 100 includes an image capturing apparatus (camera body) 1 and an interchangeable lens (lens device) 31 that is detachable from the image capturing apparatus 1.

2は交換レンズ31を装着するレンズマウント、3は撮像光学系を通過した被写体像(光学像)を光電変換するセンサ(撮像素子)である。4はセンサ3により光電変換された電気信号に対して各種の画像処理を施すことにより所定の画像信号を生成する撮像回路、5は撮像回路6により生成されたアナログ画像信号をデジタル画像信号に変化するA/D変換回路である。6はA/D変換回路7から出力されたデジタル画像信号を一時的に記憶するバッファメモリ等のVRAM(メモリ)、7はVRAM6に記憶された画像信号を読み出してアナログ信号に変換するとともに再生出力に適した画像信号に変換するD/A変換回路である。8はD/A変換回路7から出力された画像信号を表示するLCD(液晶表示装置等の画像表示装置、10は半導体メモリ等からなる画像データを記憶する記憶用メモリである。9は圧縮回路と伸長回路とを有する圧縮/伸長回路である。圧縮回路は、VRAM6に一時記憶された画像信号を読み出して記憶用メモリ10に対する記憶に適した形態にするために画像データの圧縮処理や符号化処理を施す。伸長回路は、記憶用メモリ10に記憶された画像データを再生表示などするのに最適な形態とするための復号化処理や伸長処理等を施す。 Reference numeral 2 denotes a lens mount for mounting an interchangeable lens 31, 3 a sensor (image sensor) that photoelectrically converts the subject image (optical image) that passes through the imaging optical system, 4 an imaging circuit that generates a predetermined image signal by performing various image processing on the electrical signal photoelectrically converted by sensor 3, 5 an A/D conversion circuit that converts the analog image signal generated by imaging circuit 6 into a digital image signal, 6 a VRAM (memory) such as a buffer memory that temporarily stores the digital image signal output from A/D conversion circuit 7, and 7 a D/A conversion circuit that reads the image signal stored in VRAM 6, converts it into an analog signal, and converts it into an image signal suitable for playback output. Reference numeral 8 denotes an image display device such as an LCD (liquid crystal display device) that displays the image signal output from the D/A conversion circuit 7, and 10 denotes a storage memory made up of a semiconductor memory or the like that stores image data. 9 denotes a compression/expansion circuit having a compression circuit and an expansion circuit. The compression circuit reads the image signal temporarily stored in the VRAM 6 and performs compression and encoding processes on the image data to make it in a format suitable for storage in the storage memory 10. The expansion circuit performs decoding and expansion processes on the image data stored in the storage memory 10 to make it in an optimal format for playback and display, etc.

11は、A/D変換回路7からの出力信号に対して自動露出(AE)処理を行うAE処理回路である。12は、A/D変換回路5からの出力信号に対して自動焦点調節(AF)処理を行うためのAF評価値を生成やデフォーカス量情報を検出するAF処理回路である。14は、手ブレなど撮像装置1の動きを検出するブレ検出センサであり、ジャイロセンサや加速度計などの慣性センサで構成され、複数の慣性センサを用いることで多軸のブレを検出する。13は、ブレ検出センサ14からの信号を処理するブレ検出回路である。 Reference numeral 11 denotes an AE processing circuit that performs automatic exposure (AE) processing on the output signal from the A/D conversion circuit 7. Reference numeral 12 denotes an AF processing circuit that generates an AF evaluation value and detects defocus amount information for performing automatic focus adjustment (AF) processing on the output signal from the A/D conversion circuit 5. Reference numeral 14 denotes a shake detection sensor that detects movement of the imaging device 1, such as camera shake, and is composed of inertial sensors such as a gyro sensor and an accelerometer, and detects multi-axial shake by using multiple inertial sensors. Reference numeral 13 denotes a shake detection circuit that processes the signal from the shake detection sensor 14.

15は撮像装置1を制御する演算用のメモリを内蔵したCPU(制御手段)、16は所定のタイミング信号を発生するTG(タイミングジェネレータ)、17はセンサドライバー、18は各種のスイッチ群からなる操作スイッチ(操作SW)である。19は、各種制御等を行うプログラムや各種動作を行わせるために使用するデータ等が予め記憶されている電気的に書き換え可能な読み出し専用メモリであるEEPROMである。20は電池、21は交換レンズ31と通信を行うための通信ドライバー、22は警告表示などを行うLED(表示素子)である。25はセンサ3を水平垂直回転方向に移動させるためのセンサ移動モータ、24はセンサ移動モータ25の移動を制御するためのセンサ移動制御回路である。27は、A/D変換回路7からの出力信号を用いて被写体の動きベクトルを検出する処理を行う動きベクトル検出回路である。26は、動きベクトル検出回路27、A/D変換回路7、およびCPU15からの出力信号を用いて主被写体検出処理を行う主被写体検出回路である。28は、画像の回転拡縮やトリミング(切出し)などの画像処理を行う画像変形切出し回路である。23は、各種の報知や警告などを行うためのスピーカーである。 Reference numeral 15 denotes a CPU (control means) with built-in memory for calculations that controls the imaging device 1; 16 denotes a TG (timing generator) that generates predetermined timing signals; 17 denotes a sensor driver; and 18 denotes an operation switch (operation SW) consisting of various switch groups. Reference numeral 19 denotes an EEPROM, an electrically rewritable read-only memory that pre-stores programs for various controls and data used to perform various operations. Reference numeral 20 denotes a battery; 21 denotes a communication driver for communicating with the interchangeable lens 31; and 22 denotes an LED (display element) that displays warnings and other information. Reference numeral 25 denotes a sensor movement motor for moving the sensor 3 in the horizontal and vertical directions; and 24 denotes a sensor movement control circuit for controlling the movement of the sensor movement motor 25. Reference numeral 27 denotes a motion vector detection circuit that uses output signals from the A/D conversion circuit 7 to detect the motion vector of the subject. Reference numeral 26 denotes a main subject detection circuit that uses output signals from the motion vector detection circuit 27, the A/D conversion circuit 7, and the CPU 15 to perform main subject detection. Reference numeral 28 denotes an image transformation and clipping circuit that performs image processing such as rotating, enlarging, or trimming (cutting) the image. Reference numeral 23 denotes a speaker for issuing various notifications and warnings.

32はブレ補正レンズ、33はフォーカスレンズ、34はブレ補正レンズ、34はフォーカスレンズ33等からなる撮像光学系を透過する光束の量を制御する絞り(光量調節手段)、35は撮像装置1と通信を行うための通信ドライバーである。36は、絞り34を駆動する不図示の絞り駆動モータ、フォーカスレンズ33を駆動する不図示のフォーカス駆動モータ、およびブレ補正レンズ32を駆動する不図示のブレ補正レンズ駆動モータを制御する制御回路である。37は、各種動作を行わせるために使用するデータ等が予め記憶されている電気的に書き換え可能な読み出し専用メモリであるEEPROMである。交換レンズ31は、ブレ補正レンズ32、フォーカスレンズ33、および絞り34を含む撮像光学系を有するとともに、交換レンズ31の焦点距離を変更する不図示のズームリング、およびフォーカス調節を行うマニュアルフォーカスリング等を備える。 Reference numeral 32 denotes a motion compensation lens, 33 denotes a focus lens, 34 denotes a diaphragm (light intensity adjustment means) that controls the amount of light passing through the imaging optical system consisting of the motion compensation lens, focus lens 33, etc., and 35 denotes a communication driver for communicating with the imaging device 1. 36 denotes a control circuit that controls an diaphragm drive motor (not shown) that drives the diaphragm 34, a focus drive motor (not shown) that drives the focus lens 33, and a motion compensation lens drive motor (not shown) that drives the motion compensation lens 32. 37 denotes an EEPROM, an electrically rewritable read-only memory that pre-stores data used to perform various operations. The interchangeable lens 31 has an imaging optical system including the motion compensation lens 32, focus lens 33, and diaphragm 34, and is equipped with a zoom ring (not shown) that changes the focal length of the interchangeable lens 31, a manual focus ring that adjusts the focus, etc.

なお、画像データ等の記憶媒体である記憶用メモリは、フラッシュメモリ等の固定型の半導体メモリや、カード形状やスティック形状からなり装置に対して着脱自在に形成されるカード型フラッシュメモリ等の半導体メモリに限定されるものではない。例えば、ハードディスクやフロッピィーディスク等の磁気記憶媒体等、様々な形態のものが適用可能である。 Note that the storage memory, which is a storage medium for image data, etc., is not limited to fixed semiconductor memory such as flash memory, or semiconductor memory such as card-shaped or stick-shaped card-type flash memory that is detachable from the device. Various types of storage media, such as hard disks and floppy disks, can also be used.

操作スイッチ18は、撮像装置1を起動させ電源供給を行う主電源スイッチ、動画撮影動作(記録動作)等を開始させるレリーズスイッチ、再生動作を開始させる再生スイッチ、露出補正量変更ダイヤル、露光時間変更ダイヤル、絞り値変更ダイヤル等を含む。レリーズスイッチは、撮影動作に先立ち行われるAE処理、AF処理を開始させる指示信号を発生する第一ストローク(SW1)と、実際の露光動作を開始させる指示信号を発生する第ニストローク(SW2)との二段スイッチにより構成される。 The operation switches 18 include a main power switch that starts up the imaging device 1 and supplies power, a release switch that starts video shooting (recording) operations, a playback switch that starts playback operations, an exposure compensation amount adjustment dial, an exposure time adjustment dial, and an aperture value adjustment dial. The release switch is a two-stage switch with a first stroke (SW1) that generates a command signal to start AE processing and AF processing, which are performed prior to shooting, and a second stroke (SW2) that generates a command signal to start the actual exposure operation.

次に、撮像システム100の動作を説明する。まず、光量が調整された交換レンズ31を透過した被写体光束(被写体像)はセンサ3の受光面に結像される。被写体像は、センサ3による光電変換処理により電気的な信号に変換され撮像回路4に出力される。撮像回路4は、入力した信号に対して各種の信号処理を施し、所定の画像信号を生成する。この画像信号はA/D変換回路5に出力されてデジタル信号(画像データ)に変換された後、VRAM6に一時的に格納される。VRAM6に格納された画像データは、D/A変換回路7へ出力されてアナログ信号に変換され、表示に適した形態の画像信号に変換された後、LCD8に画像として表示される。一方、VRAM6に格納された画像データは、圧縮/伸長回路9にも出力される。圧縮/伸長回路9における圧縮回路によって圧縮処理が行われた後、記憶に適した形態の画像データに変換され、記憶用メモリ10に記憶される。 Next, the operation of the imaging system 100 will be described. First, a subject light beam (subject image) passing through the interchangeable lens 31, the light intensity of which has been adjusted, is focused on the light-receiving surface of the sensor 3. The subject image is converted into an electrical signal by photoelectric conversion processing by the sensor 3 and output to the imaging circuit 4. The imaging circuit 4 performs various signal processing on the input signal to generate a predetermined image signal. This image signal is output to the A/D conversion circuit 5 and converted into a digital signal (image data), which is then temporarily stored in the VRAM 6. The image data stored in the VRAM 6 is output to the D/A conversion circuit 7 and converted into an analog signal, which is then converted into an image signal in a format suitable for display, and then displayed as an image on the LCD 8. Meanwhile, the image data stored in the VRAM 6 is also output to the compression/expansion circuit 9. After compression processing by the compression circuit in the compression/expansion circuit 9, the image data is converted into image data in a format suitable for storage and stored in the storage memory 10.

また。例えば操作スイッチ18のうち不図示の再生スイッチが操作されオン状態になると、再生動作が開始される。このとき、記憶用メモリ10に圧縮された形で記憶された画像データは圧縮/伸長回路9に出力され、伸長回路において復号化処理や伸長処理等が施された後、VRAM6に出力され一時的に記憶される。更に、この画像データは、D/A変換回路7へ出力されアナログ信号に変換され、表示に適した形態の画像信号に変換された後、LCD8に画像として表示される。 Furthermore, for example, when a playback switch (not shown) among the operation switches 18 is operated and turned on, playback operation begins. At this time, the image data stored in compressed form in the storage memory 10 is output to the compression/expansion circuit 9, where it is subjected to decoding and expansion processes, etc., before being output to the VRAM 6 and temporarily stored. Furthermore, this image data is output to the D/A conversion circuit 7 and converted into an analog signal, which is then converted into an image signal in a form suitable for display, and then displayed as an image on the LCD 8.

一方、TG16からは所定のタイミング信号がCPU15、撮像回路4、センサドライバー17へ出力されており、CPU15はこのタイミング信号に同期させて各種の制御を行う。また撮像回路4は、TG16からのタイミング信号を受け、これに同期させて色信号の分離等の各種画像処理を行う。さらにセンサドライバー17は、TG16のタイミング信号を受けこれに同期してセンサ3を駆動する。 Meanwhile, TG 16 outputs a predetermined timing signal to CPU 15, imaging circuit 4, and sensor driver 17, and CPU 15 performs various controls in synchronization with this timing signal. Furthermore, imaging circuit 4 receives the timing signal from TG 16 and performs various image processing such as color signal separation in synchronization with this. Furthermore, sensor driver 17 receives the timing signal from TG 16 and drives sensor 3 in synchronization with this.

他方、A/D変換回路5によってデジタル化された画像データは、VRAM6とは別に、AE処理回路11、AF処理回路12、動きベクトル検出回路27、主被写体検出回路26、および画像変形切出し回路28に対しても出力される。 On the other hand, the image data digitized by the A/D conversion circuit 5 is also output to the AE processing circuit 11, AF processing circuit 12, motion vector detection circuit 27, main subject detection circuit 26, and image transformation and cutting circuit 28, in addition to the VRAM 6.

AE処理回路11は、入力されたデジタル画像信号を受けて、被写体の明るさに応じたAE評価値を算出し、AE評価値をCPU15に出力する。CPU15は、AE評価値に基づいて、センサ3の露光時間や絞り34の開口値を算出し、通信ドライバー21を介して交換レンズ31へ送信する。交換レンズ31において、制御回路36は、絞り駆動処理などを行い、絞り34の絞り量が適正になるように調整する。 The AE processing circuit 11 receives the input digital image signal, calculates an AE evaluation value according to the brightness of the subject, and outputs the AE evaluation value to the CPU 15. Based on the AE evaluation value, the CPU 15 calculates the exposure time of the sensor 3 and the aperture value of the diaphragm 34, and sends these to the interchangeable lens 31 via the communication driver 21. In the interchangeable lens 31, the control circuit 36 performs diaphragm drive processing and adjusts the aperture value of the diaphragm 34 so that it is appropriate.

AF処理回路(デフォーカス量検出手段)12は、焦点調整のための撮像画素を有するセンサ3により取得される画像信号の像修正と、修正された像信号の相関演算を行い、デフォーカス量情報を検出する。CPU15は、フォーカスレンズ33の駆動量と駆動方向を求め、通信ドライバー21を介して交換レンズ31へ送信する。交換レンズ側でフォーカスレンズ33の駆動処理が行われ合焦状態を得るAF制御が可能になる。 The AF processing circuit (defocus amount detection means) 12 performs image correction on the image signal acquired by the sensor 3, which has imaging pixels for focus adjustment, and performs correlation calculations on the corrected image signal to detect defocus amount information. The CPU 15 determines the amount and direction of drive of the focus lens 33 and sends this to the interchangeable lens 31 via the communication driver 21. The interchangeable lens performs drive processing on the focus lens 33, enabling AF control to achieve a focused state.

動きベクトル検出回路27は、入力されたデジタル画像信号(基準画像)に基づいて、CPU15からの指示により分割された領域に従い、1フレーム前のデジタル画像信号(参照画像)との相関演算を行うことにより、被写体の動きベクトルを求める。すなわち、水平垂直方向に参照画像を所定画素ずらしながら基準画像と参照画像の差分演算を行い、最も高い相関度(最少の差分量)を得た画素ずらし量をその領域における被写体の動き量とし、その際の水平垂直方向の画素ずらし方向を動き方向とする。これにより、フレーム間の領域内の被写体の動きベクトルが求められる。なお、詳細に関しては特許文献3などに記載されているため、その説明を省略する。 The motion vector detection circuit 27 calculates the motion vector of the subject based on the input digital image signal (base image) and the digital image signal of the previous frame (reference image) in accordance with the regions divided by instructions from the CPU 15. That is, it calculates the difference between the base image and the reference image while shifting the reference image by a specified number of pixels in the horizontal and vertical directions, and determines the pixel shift amount that produces the highest degree of correlation (smallest difference amount) as the motion amount of the subject in that region, and the direction of the horizontal and vertical pixel shift at that time as the direction of motion. In this way, the motion vector of the subject within the region between frames is calculated. Details are described in Patent Document 3, etc., so further explanation is omitted here.

そして主被写体検出回路26は、主被写体検出手段の役割を担い、以下のようにして主被写体の画面内の位置(主被写体情報)を検出する。まず、主被写体検出回路26は、撮影者によって主被写体領域が指定されたかを判定する。例えば撮影者によってAF点が指定された領域や、LCD8にタッチパネルが装着されている場合に撮影者によって所定時間タッチ操作が行われた領域を主被写体領域と判定する。 The main subject detection circuit 26 acts as a main subject detection means and detects the position of the main subject within the screen (main subject information) as follows. First, the main subject detection circuit 26 determines whether the main subject area has been specified by the photographer. For example, it determines that the main subject area is an area where the AF point has been specified by the photographer, or an area where the photographer has touched the LCD 8 for a predetermined period of time if the LCD 8 is equipped with a touch panel.

また主被写体検出回路26は、A/D変換回路5からの出力信号に基づいて、瞳、眉などの顔を特徴付ける部分を画像上で探索する。そして主被写体検出回路26は、その位置関係から、人物の顔の画像上での位置を検出し、更に顔の大きさや傾きなどを、顔を特徴付ける部分の間隔などの位置関係から求める。 The main subject detection circuit 26 also searches the image for features that characterize the face, such as the pupils and eyebrows, based on the output signal from the A/D conversion circuit 5. From this positional relationship, the main subject detection circuit 26 then detects the position of the person's face in the image, and further determines the size and tilt of the face from the positional relationship, such as the spacing between the features that characterize the face.

また主被写体検出回路26は、A/D変換回路5からの出力信号に基づいて、頭部や胴体など人物を特徴付ける部分に相当する形状を持つ部位を画像上で探索しそれらの位置関係を評価することで、画面内に存在する人物の位置を検出する。例えば、円形に近い形状を検出しその下部に第一の長方形の形状が存在し第一の長方形より短辺が短い第二の長方形は存在し、互いが隣接するような場合に人物が存在すると判定すれば良い。 The main subject detection circuit 26 also detects the position of a person on the screen by searching the image for areas with shapes that characterize a person, such as the head or torso, based on the output signal from the A/D conversion circuit 5, and evaluating their positional relationships. For example, if a shape close to a circle is detected, and a first rectangular shape exists below it, and a second rectangle with a shorter side than the first rectangle exists, and the two are adjacent to each other, it can be determined that a person is present.

また主被写体検出回路26は、A/D変換回路5からの出力信号に基づいて、色や輝度が類似した集合体を検出しその大きさや画面上の位置を検出し、その結果から主被写体である度合いを推測する。例えば、画面中央に近い位置に所定以上の大きさで色と輝度が類似した集合体が存在すれば主被写体らしいと判定する。そして大きさや画面上の位置が所定条件を満たすものの中から画面中央を原点とした重心座標や集合体の大きさから求めた主被写体度合いが最も高い領域を主被写体領域とする。 The main subject detection circuit 26 also detects clusters of similar color and brightness based on the output signal from the A/D conversion circuit 5, detects their size and position on the screen, and estimates the likelihood that they are the main subject from the results. For example, if a cluster of similar color and brightness with a size equal to or larger than a predetermined size is present near the center of the screen, it is determined to be likely to be the main subject. Then, from among those whose size and position on the screen meet predetermined conditions, the area with the highest likelihood of being the main subject, calculated from the center of gravity coordinates with the center of the screen as the origin and the size of the cluster, is determined to be the main subject area.

また主被写体検出回路26は、AF処理回路12の処理結果から画面内のAF点毎の距離またはデフォーカス量を取得する。そして、動きベクトル検出回路27の処理結果およびブレ検出回路13の結果を用いて、撮影者が画面内に捉えようとしている実空間上で移動している被写体を検出する。
また主被写体検出回路26は、CPU15から、AE処理回路11の処理結果、LCD画面をタッチして設定したものも含めて撮影者によって設定されたAF点情報、撮影モード、シャッター速度、および絞り値(F値)などの情報を取得する。主被写体検出回路26は、このようにして得られた検出結果から総合的に主被写体領域を複数個検出し、それに順位を付けた結果をCPUに送信する。
Furthermore, main subject detection circuit 26 acquires the distance or defocus amount for each AF point within the screen from the processing result of AF processing circuit 12. Then, using the processing result of motion vector detection circuit 27 and the result of blur detection circuit 13, it detects a subject that is moving in real space and that the photographer is trying to capture within the screen.
Main subject detection circuit 26 also obtains information such as the processing results of AE processing circuit 11, AF point information set by the photographer including that set by touching the LCD screen, shooting mode, shutter speed, and aperture value (F-number) from CPU 15. Main subject detection circuit 26 comprehensively detects multiple main subject areas from the detection results obtained in this manner, and transmits the ranking results to the CPU.

本実施形態において、主被写体検出回路26で検出された主被写体の検出時の信頼性が高い場合などはその主被写体をブレ補正の制御対象とする。そして、その主被写体の動きベクトルを動きベクトル検出回路27で検出した後、検出した動きベクトルを用いて主被写体に生じるブレを補正する。複数の主被写体が検出された場合は、最も順位が高い主被写体を主被写体とし、同様にブレ補正を行う。逆に、同順位に複数の被写体が存在し主被写体が決められない場合や一時的に主被写体が検出されなかった場合などは、主被写体検出回路26で検出された主被写体をブレ補正の制御対象とせず、背景など別の被写体を制御対象としブレ補正を行う。 In this embodiment, if the main subject detected by the main subject detection circuit 26 is highly reliable, that main subject is selected as the target for shake correction control. The motion vector of that main subject is then detected by the motion vector detection circuit 27, and the detected motion vector is used to correct any shake that occurs in the main subject. If multiple main subjects are detected, the main subject with the highest rank is selected as the main subject, and shake correction is performed in the same way. Conversely, if there are multiple subjects with the same rank and the main subject cannot be determined, or if the main subject is temporarily not detected, the main subject detected by the main subject detection circuit 26 is not selected as the target for shake correction control, and instead another subject, such as the background, is selected as the target for shake correction.

次に、図2を参照して、本実施形態における主被写体検出処理を説明する。図2は、主被写体検出処理のフローチャートである。図2の各ステップは、主に、CPU15の指令に基づいて主被写体検出回路26により実行される。この処理において、より先に検出が行われた主被写体ほど主被写体の優先順位が高いものとなる。 Next, the main subject detection process in this embodiment will be described with reference to FIG. 2. FIG. 2 is a flowchart of the main subject detection process. Each step in FIG. 2 is executed primarily by the main subject detection circuit 26 based on instructions from the CPU 15. In this process, the earlier a main subject is detected, the higher the priority of that main subject.

処理が開始されるとまず全ての主被写体検出フラグをオフにする。その後、ステップS201において、主被写体検出回路26は、撮影者によって主被写体領域(AF測距点)が指定されているかを判定する。これは、CPU15から送られたAF点情報を調べ撮影者により任意のAF点がメニューやLCD画面のタッチ動作などによって指定されているかを調べることで実行される。主被写体領域が指定されている場合、ステップS202に進む。ステップS202において、主被写体検出回路26は、操作スイッチ18の操作で指定されたAF点、またはLCD画面をタッチすることで撮影者により選択された主被写体領域およびその近傍で類似性のある被写体の存在する領域を、主被写体領域とする。 When processing begins, all main subject detection flags are first turned off. Then, in step S201, the main subject detection circuit 26 determines whether a main subject area (AF focus point) has been specified by the photographer. This is done by examining the AF point information sent from the CPU 15 and checking whether an AF point has been specified by the photographer via a menu or touch on the LCD screen. If a main subject area has been specified, the process proceeds to step S202. In step S202, the main subject detection circuit 26 determines the AF point specified by operating the operation switch 18 or the main subject area selected by the photographer by touching the LCD screen, as well as an area nearby where a similar subject exists, as the main subject area.

一方、主被写体領域が指定されていない場合、ステップS203に進む。ステップS203において、主被写体検出回路26は、顔が検出されているかを判定する。顔が検出されている場合、顔検出フラグをオンした後、ステップS221で検出された顔が前フレームまで主被写体としていたものと同一被写体とみなせるかを判定する。同一被写体とみなせる場合、ステップS204に進み、検出された顔領域を主被写体領域とする。一方、同一被写体とみなせない場合、ステップS205へ進む。なお、同一被写体とみなせるか否かの判定は、主被写体検出回路26の同一と推定される被写体を追尾する機能を用いて行うことができる。 On the other hand, if a main subject area has not been specified, the process proceeds to step S203. In step S203, the main subject detection circuit 26 determines whether a face has been detected. If a face has been detected, the face detection flag is turned on, and then in step S221 it is determined whether the detected face can be considered to be the same subject as the main subject up to the previous frame. If it can be considered to be the same subject, the process proceeds to step S204, and the detected face area is designated as the main subject area. On the other hand, if it cannot be considered to be the same subject, the process proceeds to step S205. Note that the determination of whether it can be considered to be the same subject can be made using the function of the main subject detection circuit 26 to track subjects that are presumed to be the same.

ステップS205において、主被写体検出回路26は、人物が検出がされているかを判定する。人物が検出されている場合、人物検出フラグをオンした後、ステップS222で検出された人物が前フレームまで主被写体としていたものと同一被写体とみなせるかを判定する。同一被写体とみなせる場合、ステップS206に進み、検出された人物領域を主被写体領域とする。一方、同一被写体とみなせない場合、ステップS207へ進む。 In step S205, the main subject detection circuit 26 determines whether a person has been detected. If a person has been detected, the person detection flag is turned on, and then in step S222 it is determined whether the detected person can be considered the same subject as the person that was the main subject up until the previous frame. If the person can be considered the same subject, the process proceeds to step S206, where the detected person area is set as the main subject area. On the other hand, if the person cannot be considered the same subject, the process proceeds to step S207.

ステップS207において、主被写体検出回路26は、動体(撮影者が画面内に捉えようとしている実空間上で移動している被写体)が存在するか(動体が検出されたか)を判定する。動体が存在する場合、動体検出フラグをオンした後、ステップS222で検出された動体が前フレームまで主被写体としていたものと同一被写体とみなせるかを判定する。同一被写体とみなせる場合、テップS208に進み、その動体を主被写体領域とする。一方、同一被写体とみなせない場合、ステップS209へ進む。動体が存在するか否かの判定は、ブレ検出回路13、動きベクトル検出回路27、およびAF処理回路12の出力信号を用いて行われる。 In step S207, the main subject detection circuit 26 determines whether a moving object (a subject moving in real space that the photographer is trying to capture within the frame) is present (whether a moving object has been detected). If a moving object is present, the moving object detection flag is turned on, and then in step S222 it is determined whether the detected moving object can be considered the same subject as the main subject up to the previous frame. If it can be considered the same subject, proceed to step S208, and the moving object is designated as the main subject area. On the other hand, if it cannot be considered the same subject, proceed to step S209. The determination of whether a moving object is present is made using the output signals of the shake detection circuit 13, motion vector detection circuit 27, and AF processing circuit 12.

ブレ検出回路13の出力信号が小さい場合(複数の軸の検出値がいずれも所定値未満の場合)、すなわち撮影者が意図的に撮像装置1を動かしていない場合、動きベクトル検出回路27で検出された動きベクトルの動き量が所定値以上の領域があるかを判定する。動きベクトルの動き量が所定値以上の領域がある場合、その領域を主被写体領域とする。 If the output signal from the shake detection circuit 13 is small (if all detection values for multiple axes are below a predetermined value), i.e., if the photographer is not intentionally moving the imaging device 1, the motion vector detection circuit 27 determines whether there is an area where the amount of movement of the motion vector detected is greater than or equal to a predetermined value. If there is an area where the amount of movement of the motion vector is greater than or equal to the predetermined value, that area is determined to be the main subject area.

一方、ブレ検出回路13の出力信号が大きい場合(複数の軸の検出値がいずれかが所定値以上の場合)、すなわち撮影者が意図的に撮像装置1を動かしている場合、この意図的な動きと等しい動きをしている領域を主被写体領域とする。すなわち、動きベクトル検出回路27で検出された動きベクトルの動き量が所定値以下の領域がある場合、その領域を主被写体領域とする。 On the other hand, if the output signal from the shake detection circuit 13 is large (if any of the detection values for multiple axes is equal to or greater than a predetermined value), i.e., if the photographer is intentionally moving the imaging device 1, the area exhibiting movement equivalent to this intentional movement is determined to be the main subject area. In other words, if there is an area where the amount of movement of the motion vector detected by the motion vector detection circuit 27 is equal to or less than a predetermined value, that area is determined to be the main subject area.

動きベクトル検出回路27の出力信号を用いた処理で動体が検出できなかった場合、距離方向(光軸方向)に移動する動体が存在するかを判定する。これは、AF処理回路12から得た距離またはデフォーカス量から時系列的に同一方向にその量が変化しているAF点(例えば5フレーム連続して距離が近づいているAF点)が存在するかを調べることで行うことができる。AF処理回路12から得られた全てのAF点に関してフレーム毎の距離またはデフォーカス量の変化を調べ、所定フレーム以上に渡り所定量同一方向に変化しているAF点を抽出し、そのAF点を動体がある領域とし、隣接していれば合体させる。所定フレーム以上に渡り所定量同一方向に変化しているAF点領域が複数存在する場合は、画面中央に近い測拠点領域を選択する。 If a moving object cannot be detected using processing using the output signal of the motion vector detection circuit 27, a determination is made as to whether there is a moving object moving in the distance direction (optical axis direction). This can be done by checking whether there are any AF points whose distance or defocus amount obtained from the AF processing circuit 12 changes in the same direction over time (for example, AF points whose distance decreases over five consecutive frames). The changes in distance or defocus amount for each frame are checked for all AF points obtained from the AF processing circuit 12, and AF points whose distance changes in the same direction by a specified amount over a specified number of frames or more are extracted. These AF points are considered to be areas containing moving objects, and are merged if adjacent. If there are multiple AF point areas whose distance changes in the same direction by a specified amount over a specified number of frames or more, the measurement base area closest to the center of the screen is selected.

ステップS209において、主被写体検出回路26は、色や輝度が類似した集合体の中で主被写体度合いが高い主被写体領域と見なせる領域が存在しないかを判定する。主被写体領域とみなせる領域が存在する場合、主被写体検出フラグをオンした後、ステップS224で検出された主被写体領域の主被写体が前フレームまで主被写体としていたものと同一被写体とみなせるかを判定する。同一被写体とみなせる場合、ステップS210へ進み、その領域を主被写体領域とする。主被写体度合いは、色や輝度が類似した集合体の画面上の位置と大きさによって判定する。検出された集合体が画面四辺のうちの二辺に接していないものを選択し、その中で所定以上の大きさのものを主被写体度合いが高い集合体とみなす。該当するものが複数存在する場合は、集合体の重心位置が画面の中心に近いものを選択する。 In step S209, the main subject detection circuit 26 determines whether there is any area that can be considered a main subject area with a high degree of main subject likelihood among the clusters of similar color and brightness. If there is an area that can be considered a main subject area, the main subject detection flag is turned on, and then in step S224 it is determined whether the main subject in the detected main subject area can be considered the same subject as the main subject up until the previous frame. If it can be considered the same subject, proceed to step S210 and designate that area as the main subject area. The degree of main subject likelihood is determined based on the position and size on the screen of clusters of similar color and brightness. Detected clusters that do not touch two of the four sides of the screen are selected, and of these, those that are a predetermined size or larger are considered to be clusters with a high degree of main subject likelihood. If there are multiple such clusters, the one with the center of gravity closest to the center of the screen is selected.

前フレームまで主被写体としていたものと同一とみなせない場合、ステップS225へ進む。ステップS225において、それまでの処理において主被写体候補が検出されているかを、検出フラグをチェックすることにより行う。いずれかの検出フラグがオンされている場合、主被写体検出回路26は主被写体候補が検出されていると判定し、ステップS226へ進む。 If the subject cannot be considered to be the same as the main subject up to the previous frame, proceed to step S225. In step S225, a detection flag is checked to determine whether a main subject candidate has been detected in the processing up to that point. If any detection flag is on, the main subject detection circuit 26 determines that a main subject candidate has been detected, and proceeds to step S226.

ステップS226において、主被写体検出回路26は、検出フラグがオンになっている検出領域の中で優先順位が最も高いものを選択し、その領域を主被写体領域とする。顔検出がされていれば顔検出領域を、顔検出がされず人物検出がさえていれば人物検出領域を、顔検出も人物検出もされずに動体が検出されていれば動体領域を、いずれも検出されていなければ主被写体度合いが高いと判定された検出領域を、主被写体領域とする。 In step S226, the main subject detection circuit 26 selects the detection area with the highest priority among those whose detection flags are on, and designates that area as the main subject area. If a face has been detected, the face detection area is selected; if a face has not been detected but a person has been detected, the person detection area is selected; if a moving object has been detected without a face or person being detected, the moving object area is selected; and if neither a face nor person has been detected, the detection area determined to have a high likelihood of being the main subject is selected as the main subject area.

検出フラグがオンされていない場合、それまでの処理で主被写体候補が検出されていないため、ステップS211へ進む。ステップS211において、主被写体検出回路26は、AF処理回路12の処理結果からAF可能な画面内のAF点数の割合が高く、かつ距離差のある被写体が存在するか調べる。条件を満たす場合、ステップS212へ進み、複数のAF点のうち最至近のAF結果を示したAF点を主被写体領域とする。この場合、風景撮影などの画面全体が被写体ではなく、風景を背景とした記念撮影などと考えられるため、最至近の被写体を主被写体領域とする。一方、条件を満たさない場合、ステップS213において、CPU15から取得したAE処理結果、撮影モード、シャッター速度、絞り値、撮影者によるストロボONOFF情報からAFを行う領域を決定する。 If the detection flag is not on, no main subject candidate has been detected in the processing up to that point, and processing proceeds to step S211. In step S211, the main subject detection circuit 26 checks the processing results of the AF processing circuit 12 to see if there is a subject with a high proportion of AF points within the screen that are AF-enabled and at a different distance. If the condition is met, processing proceeds to step S212, and the AF point that shows the closest AF result among the multiple AF points is determined to be the main subject area. In this case, since the entire screen is not the subject, as in landscape photography, and it is likely to be a commemorative photo with the landscape as the background, the closest subject is determined to be the main subject area. On the other hand, if the condition is not met, in step S213, the area to perform AF is determined based on the AE processing results, shooting mode, shutter speed, aperture value, and flash ON/OFF information obtained from the CPU 15.

まず、撮影モードに基づき、以下の表1のようにして、AFを行う領域を決定する。 First, based on the shooting mode, the area to perform AF is determined as shown in Table 1 below.

上記の条件に当てはまらない場合、以下の表2のようにして、主被写体領域を決定する。 If the above conditions are not met, the main subject area is determined as shown in Table 2 below.

なお、顔・人物・動体が複数検出された場合は、その検出位置と大きさ(顔)、または検出位置(人物・動体)によって主被写体領域を決める。また異なる優先順位の主被写体が検出される場合もあり、優先順位に従って主被写体領域が決定される。初めはこのように主被写体領域が決定されるが、次フレーム以降は同一被写体であることが優先される。 If multiple faces, people, or moving objects are detected, the main subject area is determined based on their detected position and size (faces) or their detected position (people/moving objects). Main subjects with different priorities may also be detected, and the main subject area is determined according to the priorities. Initially, the main subject area is determined in this way, but from the next frame onwards, priority is given to the same subject.

主被写体検出回路26は、前フレームで主被写体として検出された被写体と同一と推定される被写体を追尾する機能を持つ。この機能により、上記の手順で主被写体として検出された被写体が、前フレームまでの主被写体と同一であると推定された場合は、その被写体を最高順位の主被写体とする。上記の手順においてより先に検出が行われた主被写体があっても、同一であると推定される主被写体が優先される。よってこの同一と推定された主被写体に対するブレ補正が行われる。なおこの機能は、任意のAF点が指定された場合など(図2中のステップS204、S206、S208、S210)にのみ行われる。最至近の被写体を主被写体領域としたなどの場合(図2中のステップS212、S213)、被写体と同一と推定される被写体かの判定は行わない。 The main subject detection circuit 26 has the function of tracking a subject that is estimated to be the same as the subject detected as the main subject in the previous frame. With this function, if the subject detected as the main subject in the above procedure is estimated to be the same as the main subject up to the previous frame, that subject is set as the main subject with the highest priority. Even if there is a main subject that was detected earlier in the above procedure, the main subject that is estimated to be the same is given priority. Therefore, blur correction is performed on this main subject that is estimated to be the same. Note that this function is only performed when an arbitrary AF point is specified (steps S204, S206, S208, S210 in Figure 2). If the closest subject is set as the main subject area (steps S212, S213 in Figure 2), no determination is made as to whether the subject is estimated to be the same as the subject.

また、撮影者が明示的に主被写体を指定するために、メニューなどでAF点が指定した場合は指定されたAF点の被写体を主被写体とする。よって、新たな主被写体が検出されたと判定されるのは、撮影者が明示的に主被写体を指定した場合(ステップS202)、および、同一被写体と推定されなくなり同時に順位の高い主被写体が検出された場合(ステップS212)である。ここで、同一被写体と推定されなくなり同時に順位の高い主被写体が検出された場合とは、それまで主被写体が大きく動いたときに撮影者が意図的にその被写体を追うことをせずに画面上の位置が大きく変わる場合などである。 Furthermore, if the photographer explicitly specifies an AF point using a menu or the like to specify a main subject, the subject at the specified AF point will be considered the main subject. Therefore, a new main subject is determined to have been detected when the photographer explicitly specifies a main subject (step S202), or when a main subject that is no longer estimated to be the same subject and a higher-ranked main subject is detected at the same time (step S212). Here, a case where a main subject is no longer estimated to be the same subject and a higher-ranked main subject is detected at the same time would occur if the main subject had moved significantly up until then and its position on the screen changed significantly without the photographer intentionally tracking that subject.

その後、画像変形切出し回路28は、主被写体検出回路26や動きベクトル検出回路27の出力信号を用いて、CPU15が算出した主被写体の画像上の上下左右の動きや撮像装置1の回転に関する情報に応じてその変化を補正する。このため、画像回転などの変形や、画像の一部分を切出すなどの画像処理を行う。例えば、主被写体として検出された人物の顔が人物の移動や撮影者の手ブレによって画面上の位置が大きく変化することや、主被写体が斜め方向に移動することがある。動画のフレーム間にこのようなブレや画面の水平方向垂直や斜め方向に主被写体の移動が生じると、撮影者が希望する画面上の位置に主被写体が存在しない状況や、不自然な移動が生じる。このような現象がフレーム間で頻繁に発生する記録された動画像は非常に見づらいものとなる。 The image transformation and cropping circuit 28 then uses the output signals from the main subject detection circuit 26 and motion vector detection circuit 27 to correct the changes in accordance with the up/down/left/right movement of the main subject on the image calculated by the CPU 15 and information about the rotation of the imaging device 1. To achieve this, image processing such as transformations such as image rotation and cropping of portions of the image is performed. For example, the position of the face of a person detected as the main subject on the screen may change significantly due to the person's movement or the photographer's camera shake, or the main subject may move diagonally. If such shaking or movement of the main subject in the horizontal, vertical, or diagonal directions occurs between frames of a video, the main subject may not be in the position on the screen desired by the photographer, or unnatural movement may occur. If such phenomena occur frequently between frames, recorded video images will be very difficult to watch.

そこで、フレーム間の主被写体の水平方向垂直方向の移動を表す動きベクトルを動きベクトル検出回路27で検出し、CPU15で動きベクトルから画像を補正する情報を算出する。そして、算出された補正量に応じて画像を画像変形切出し回路28で変形補正し、生成された画像をVRAM6の所定の領域に記録する。 The motion vector representing the horizontal and vertical movement of the main subject between frames is detected by the motion vector detection circuit 27, and the CPU 15 calculates information for correcting the image from the motion vector. The image is then transformed and corrected by the image transformation and cutout circuit 28 according to the calculated amount of correction, and the generated image is recorded in a specified area of the VRAM 6.

次に、図3を参照して、撮像装置1の撮影処理を説明する。図3は、撮影処理のフローチャートである。図3の各ステップは、主にCPU15の指令に基づいて撮像装置1の各部により実行される。撮像装置1の主電源スイッチがオン状態であり、かつ撮像装置1の動作モードが撮影(録画)モードにある場合、撮影処理シーケンスが実行される。 Next, the shooting process of the imaging device 1 will be described with reference to Figure 3. Figure 3 is a flowchart of the shooting process. Each step in Figure 3 is executed by each section of the imaging device 1 based mainly on commands from the CPU 15. When the main power switch of the imaging device 1 is on and the operating mode of the imaging device 1 is in shooting (recording) mode, the shooting process sequence is executed.

まず、ステップS301において、CPU15は、処理で用いる変数の初期化や駆動部材を初期位置へ移動する等の初期化処理を行った後、交換レンズ31が装着されているか否かを判定する。交換レンズ31が装着されている場合、CPU15は、ブレ補正レンズ32、フォーカスレンズ33、絞り34、焦点距離などに関する情報を取得する。一方、交換レンズ31が装着されていない場合、交換レンズ情報の取得の処理は行わずにステップS302へ進む。 First, in step S301, the CPU 15 performs initialization processing, such as initializing variables used in processing and moving drive members to their initial positions, and then determines whether an interchangeable lens 31 is attached. If an interchangeable lens 31 is attached, the CPU 15 acquires information about the image stabilization lens 32, focus lens 33, aperture 34, focal length, etc. On the other hand, if an interchangeable lens 31 is not attached, the process proceeds to step S302 without acquiring interchangeable lens information.

ステップS302において、CPU15は、交換レンズ31を透過しセンサ3上に結像した像をLCDに画像として表示する。すなわちセンサ3上に結像した被写体像は、センサ3による光電変換処理され電気的な信号に変換された後、撮像回路4に出力される。そこで入力した信号に対して各種の信号処理が施され、所定の画像信号が生成された後、A/D変換回路5に出力されデジタル信号(画像データ)に変換されVRAM6に一時的に格納される。VRAM6に格納された画像データはD/A変換回路7へ出力されアナログ信号に変換され表示するのに適した形態の画像信号に変換された後、LCD8に画像として表示される。なお、動画記録モードに設定され、かつブレ補正設定がONになって場合は、ブレ補正処理(ブレ補正制御)を行った画像をLCD8に表示しても構わない。 In step S302, the CPU 15 displays the image that has passed through the interchangeable lens 31 and formed on the sensor 3 as an image on the LCD. That is, the subject image formed on the sensor 3 is photoelectrically converted by the sensor 3 into an electrical signal, which is then output to the imaging circuit 4. The input signal undergoes various signal processing to generate a predetermined image signal, which is then output to the A/D conversion circuit 5, converted into a digital signal (image data), and temporarily stored in the VRAM 6. The image data stored in the VRAM 6 is output to the D/A conversion circuit 7, converted into an analog signal, and converted into an image signal in a form suitable for display, which is then displayed as an image on the LCD 8. Note that if the video recording mode is selected and the image stabilization setting is ON, an image that has undergone image stabilization processing (image stabilization control) may also be displayed on the LCD 8.

続いてステップS303において、CPU15は、動画記録モードか静止画撮影モードのどちらに設定されているかを判定する。動画記録モードに設定されている場合、ステップS304へ進む。一方、静止画撮影モードに設定されている場合、ステップS321へ進む。 Next, in step S303, the CPU 15 determines whether the camera is set to video recording mode or still image capture mode. If the camera is set to video recording mode, the process proceeds to step S304. On the other hand, if the camera is set to still image capture mode, the process proceeds to step S321.

ステップS321において、CPU15は、レリーズスイッチの状態を確認する。撮影者によってレリーズスイッチが操作され、SW1(レリーズスイッチの第一ストローク)がオン状態になったことをCPU15が確認した場合、ステップS322に進む。撮影者によってブレ補正処理を行う設定がされていた場合、CPU15はブレ振れ補正処理を行う。この処理は、例えば特許文献2に記載された従来の静止画撮影におけるブレ補正処理などを適用すれば良いため、処理の詳細の説明は省略する。 In step S321, the CPU 15 checks the state of the release switch. If the photographer operates the release switch and the CPU 15 checks that SW1 (the first stroke of the release switch) is in the ON state, the process proceeds to step S322. If the photographer has set the camera to perform shake correction processing, the CPU 15 performs shake correction processing. This processing can be performed using the shake correction processing used in conventional still image shooting, as described in Patent Document 2, for example, and therefore a detailed description of the processing will be omitted.

続いてステップS323において、CPU15は、AF処理とAE処理を実行し、フォーカスレンズ33を合焦位置への駆動を行うとともに、静止画撮影時の絞り値や露光時間など決定する。続いてステップS324において、CPU15は、センサ3上に結像した像にAE処理結果(高輝度・低輝度警告など)やAF処理結果(AF成功または失敗など)を重畳してLCDに画像として表示する。またLED22の点灯点滅やスピーカーから合焦音や非合焦音の発するなどしてAEやAF処理結果を撮影者に知らせるようにしてもよい。 Next, in step S323, the CPU 15 executes AF and AE processing, drives the focus lens 33 to the in-focus position, and determines the aperture value, exposure time, etc. for still image capture. Next, in step S324, the CPU 15 superimposes the AE processing results (high brightness/low brightness warnings, etc.) and AF processing results (AF success/failure, etc.) on the image formed on the sensor 3 and displays them as an image on the LCD. The AE and AF processing results may also be notified to the photographer by flashing the LED 22 or by emitting a focus or out-of-focus sound from the speaker.

続いてステップS325において、CPU15はSW2(レリーズスイッチの第ニストローク)を確認する。SW2がオンになっている場合、ステップS326に進み、CPU15は露光処理を実行する。露光処理の際にも撮影者によってブレ補正設定がされている場合、CPU15は、ステップS322と同様にブレ補正処理を行う。露光処理終了後、ステップS310へ進む。 Next, in step S325, the CPU 15 checks SW2 (the first stroke of the release switch). If SW2 is on, the process proceeds to step S326, where the CPU 15 executes exposure processing. If the photographer has also set image stabilization during exposure processing, the CPU 15 executes image stabilization processing in the same manner as in step S322. After exposure processing is complete, the process proceeds to step S310.

一方、ステップS303にて動画記録モードに設定されていた場合、ステップS304へ進み、CPU15はAF処理とAE処理を実行する。CPU15は、フォーカスレンズ33を合焦位置への駆動を行うとともに、絞り値や露光時間など決定し、絞り34の駆動およびセンサ3の露光時間(蓄積時間)の制御を行う。 On the other hand, if video recording mode was selected in step S303, the process proceeds to step S304, where the CPU 15 executes AF and AE processing. The CPU 15 drives the focus lens 33 to the in-focus position, determines the aperture value and exposure time, and controls the drive of the aperture 34 and the exposure time (accumulation time) of the sensor 3.

続いてステップS305において、CPU15は、撮影者によってブレ補正処理が設定されているかを判定する。ブレ補正処理が設定されている場合(ISオンの場合)、CPU15は、ステップS306にてブレ補正処理を行う。一方、ブレ補正処理が設定されていない場合(ISオフの場合)、ステップS307へ進む。なお、ステップS306での処理の詳細は後述する。 Next, in step S305, the CPU 15 determines whether the photographer has set up shake correction processing. If shake correction processing has been set up (IS is on), the CPU 15 performs shake correction processing in step S306. On the other hand, if shake correction processing has not been set up (IS is off), the process proceeds to step S307. Details of the processing in step S306 will be described later.

ステップS307において、CPU15は、AE処理結果(高輝度・低輝度警告など)やAF処理結果(AF成功または失敗など)を重畳して画像をLCD8に表示する。この画像は、ブレ補正処理が設定されていた場合にはステップS306での処理で作成させたブレ補正がされた画像であり、ブレ補正処理が設定されていない場合にはステップS302にて読み出された画像である。 In step S307, the CPU 15 displays the image on the LCD 8 with the AE processing results (high brightness/low brightness warning, etc.) and AF processing results (AF success/failure, etc.) superimposed. If image stabilization processing has been set, this image is the image that has been subjected to image stabilization processing created in step S306; if image stabilization processing has not been set, this is the image that was read out in step S302.

続いてステップS308において、CPU15は、動画記録指示が撮影者によってされているかを判定する。動画記録指示がされている場合、ステップS309に進み、CPU15は動画記録処理を実行した後、ステップS310へ進む。この動画記録処理は、ブレ補正処理が設定されていた場合、ステップS306での処理で作成させたブレ補正がされた画像を記録することで行われる。一方、ブレ補正処理が設定されていない場合、ステップS307における表示を行う際の画像(ステップS302にて読み出された画像)を記録することで行われる。 Next, in step S308, the CPU 15 determines whether a video recording instruction has been issued by the photographer. If a video recording instruction has been issued, the process proceeds to step S309, where the CPU 15 executes video recording processing, and then proceeds to step S310. This video recording processing is performed by recording the image with the shake correction processing created in the processing of step S306, if shake correction processing has been set. On the other hand, if shake correction processing has not been set, the image to be displayed in step S307 (the image read out in step S302) is recorded.

動画記録指示がされていない場合、ステップS310へ進む。ステップS310において、CPU15は、主電源スイッチや再生スイッチの状態変化やレンズが交換されたかを判定する。各スイッチの状態変化やレンズの交換があった場合、処理を終了する。それ以外の場合、ステップS302へ戻る。 If a video recording instruction has not been issued, proceed to step S310. In step S310, the CPU 15 determines whether the state of the main power switch or playback switch has changed, or whether the lens has been replaced. If the state of any switch has changed, or the lens has been replaced, the process ends. Otherwise, return to step S302.

ここで、図4および図5を参照して、ステップS306のブレ補正処理に関して説明する。図4は、本実施形態におけるブレ補正処理のフローチャートである。図5は、ベクトル検出枠の設定に関する説明図である。図4の各ステップは、主に、CPU15により、またはCPU15の指令に基づいて主被写体検出回路26や動きベクトル検出回路27などの各部により実行される。 The shake correction process of step S306 will now be described with reference to Figures 4 and 5. Figure 4 is a flowchart of the shake correction process in this embodiment. Figure 5 is an explanatory diagram related to setting the vector detection frame. The steps in Figure 4 are mainly executed by the CPU 15, or by various components such as the main subject detection circuit 26 and motion vector detection circuit 27 based on instructions from the CPU 15.

まず、ステップS401において、主被写体検出回路26は、それまで主被写体として検出されたものと同一と推定される被写体が検出されたか否かを判定する。同一と推定される被写体が検出されていない場合、ステップS402へ進む。一方、同一と推定される被写体が検出されている場合、すなわち、いわゆる追尾状態であると判定された場合、ステップS421へ進む。この判定は、主被写体検出回路26の持つ前フレームで主被写体として検出された被写体と同一と推定される被写体を追尾する機能を利用して行われる。すなわち、図2のステップS204、S206、S208、S210で主被写体領域を決めた場合、それまで主被写体として検出されたものと同一と推定される被写体が検出されたと判定される。それ以外、すなわち図2のステップS202、S226、S212、S213で主被写体領域を決めた場合、検出されていないと判定される。 First, in step S401, main subject detection circuit 26 determines whether a subject presumed to be the same as the subject previously detected as the main subject has been detected. If a subject presumed to be the same as the subject previously detected as the main subject has not been detected, processing proceeds to step S402. On the other hand, if a subject presumed to be the same as the subject detected as the main subject in the previous frame has been detected, that is, if it is determined that a tracking state is occurring, processing proceeds to step S421. This determination is made using the function of main subject detection circuit 26 to track a subject presumed to be the same as the subject detected as the main subject in the previous frame. That is, if a main subject area is determined in steps S204, S206, S208, or S210 of FIG. 2, it is determined that a subject presumed to be the same as the subject previously detected as the main subject has been detected. Otherwise, that is, if a main subject area is determined in steps S202, S226, S212, or S213 of FIG. 2, it is determined that no main subject has been detected.

ステップS402において、主被写体検出回路26は、新たな主被写体が検出されたかを判定する。図2のステップS202、S226で主被写体領域を決めた場合、新たな主被写体が検出されたと判定し、ステップS403へ進む。一方、図2のステップS212、S213で主被写体領域を決めた場合、新たな主被写体が検出されていないと判定し、ステップS422へ進む。 In step S402, the main subject detection circuit 26 determines whether a new main subject has been detected. If a main subject area has been determined in steps S202 and S226 of FIG. 2, it determines that a new main subject has been detected, and proceeds to step S403. On the other hand, if a main subject area has been determined in steps S212 and S213 of FIG. 2, it determines that a new main subject has not been detected, and proceeds to step S422.

ステップS403において、主被写体検出回路26は、合焦制御の対象の被写体(合焦制御領域)が撮影者によって指定されたかを判定する。図2のステップS202で主被写体領域を決めた場合、撮影者による指定がされたと判定し、ステップS421へ進む。図2のそれ以外のステップで主被写体領域を決めた場合、撮影者による指定がされていないと判定し、ステップS404へ進む。 In step S403, the main subject detection circuit 26 determines whether the subject (focus control area) targeted for focus control has been designated by the photographer. If the main subject area was determined in step S202 of FIG. 2, it is determined that the photographer has designated it, and the process proceeds to step S421. If the main subject area was determined in any other step of FIG. 2, it is determined that the photographer has not designated it, and the process proceeds to step S404.

ステップS404において、主被写体検出回路26は、撮影者がパンニングなどを行うことで被写体を自ら追尾しているかを判定する。追尾している場合、ステップS421へ進む。一方、追尾していない場合、ステップS405へ進む。被写体を自ら追尾しているかの判定は、ブレ検出回路13の出力信号と動きベクトル検出回路27の出力信号とを用いて行われる。すなわちブレ検出回路13の出力信号が大きく、かつ動きベクトル検出回路27から算出されるセンサ3上の主被写体の動きが小さい場合、撮像装置1を撮影者が動かし所望する主被写体がセンサ3上では動かないように撮影者が被写体を追っていると判定する。 In step S404, the main subject detection circuit 26 determines whether the photographer is tracking the subject by panning or the like. If the subject is being tracked, proceed to step S421. On the other hand, if the subject is not being tracked, proceed to step S405. The determination of whether the subject is being tracked is made using the output signal of the shake detection circuit 13 and the output signal of the motion vector detection circuit 27. That is, if the output signal of the shake detection circuit 13 is large and the movement of the main subject on the sensor 3 calculated by the motion vector detection circuit 27 is small, it is determined that the photographer is moving the imaging device 1 so that the desired main subject does not move on the sensor 3 and is tracking the subject.

ステップS405において、主被写体検出回路26は、顔認証機能を用いて新たに検出された人物が同一人物かを判定する。同一の人物と判定された場合、ステップS421へ進む。一方、同一の人物でないと判定された場合、ステップS406へ進む。 In step S405, the main subject detection circuit 26 uses the face recognition function to determine whether the newly detected person is the same person. If it is determined that the person is the same person, the process proceeds to step S421. On the other hand, if it is determined that the person is not the same person, the process proceeds to step S406.

ステップS406において、主被写体検出回路26は、複数の被写体が存在して主被写体が決めることができないかを判定する。主被写体を決めることができない場合、ステップS422へ進む。一方、主被写体を決めることができる場合、ステップS407へ進む。この判定は、主被写体検出回路26で検出された被写体の領域の大きさと数を用いて行われる。主被写体検出回路26は、人物の顔や人物自体や動体などの被写体を検出するが、複数の被写体を検出することがある。同じ優先順位で複数の被写体が検出された場合、その検出位置と大きさ(顔)、または検出位置(人物・動体)によって主被写体領域を決める。この際に、検出位置と大きさに明確な差が無い場合、複数の被写体から主被写体を明確に決めることができない。 In step S406, the main subject detection circuit 26 determines whether multiple subjects exist and the main subject cannot be determined. If the main subject cannot be determined, proceed to step S422. On the other hand, if the main subject can be determined, proceed to step S407. This determination is made using the size and number of subject areas detected by the main subject detection circuit 26. The main subject detection circuit 26 detects subjects such as human faces, people themselves, and moving objects, and may detect multiple subjects. If multiple subjects are detected with the same priority, the main subject area is determined based on the detected position and size (faces) or the detected position (people/moving objects). In this case, if there is no clear difference in the detected position and size, the main subject cannot be clearly determined from the multiple subjects.

よって、検出された顔の大きさの差が所定の割合より小さい場合、すなわち1位の顔の大きさに対して2位の顔の大きさが所定割合(Cr1)以上の場合(複数の被写体の大きさの割合が第一の所定割合以上の場合)、主被写体を明確に決めることができない。この場合、複数の被写体が存在して主被写体を決めることができないと判定される。 Therefore, if the difference in size of the detected faces is smaller than a predetermined ratio, i.e., if the size of the second-place face relative to the size of the first-place face is equal to or greater than a predetermined ratio (Cr1) (if the ratio of the sizes of multiple subjects is equal to or greater than a first predetermined ratio), the main subject cannot be clearly determined. In this case, it is determined that multiple subjects exist and the main subject cannot be determined.

同様に、2位の顔の大きさが所定割合(Cr2:Cr2<Cr1)以上で、かつ1位の顔のセンサ中心位置と2位の顔の位置の差が所定値(Cd1)より小さい場合、主被写体を明確に決めることができない。すなわち、複数の被写体の大きさの割合が第二の所定割合以上であり、かつ複数の被写体の位置の差が第一の所定値よりも小さい場合、主被写体を明確に決めることができないと判定される。 Similarly, if the size of the second-placed face is equal to or greater than a predetermined ratio (Cr2: Cr2 < Cr1) and the difference between the sensor center position of the first-placed face and the position of the second-placed face is smaller than a predetermined value (Cd1), the main subject cannot be clearly determined. In other words, if the ratio of the sizes of multiple subjects is equal to or greater than a second predetermined ratio and the difference in the positions of the multiple subjects is smaller than a first predetermined value, it is determined that the main subject cannot be clearly determined.

同様に、検出された1位の被写体(人物や動体)のセンサ中心を原点とした位置と2位の被写体の位置の差が所定値(Cd2)より小さい場合(複数の被写体の位置の差が第二の所定値よりも小さい場合)、主被写体を明確に決めることができない。この場合にも、複数の被写体が存在して主被写体を決めることができないと判定される。 Similarly, if the difference between the position of the first detected subject (person or moving object) with the sensor center as the origin and the position of the second detected subject is smaller than a predetermined value (Cd2) (if the difference in position between multiple subjects is smaller than a second predetermined value), the main subject cannot be clearly determined. In this case, too, it is determined that multiple subjects exist and the main subject cannot be determined.

ステップS407において、動きベクトル検出回路27は、センサ3上での動きが異なる被写体がそれまでの主被写体(旧被写体)と交差したかを判定する。被写体が交差した場合、ステップS422へ進む。一方、被写体が交差していない場合、ステップS408へ進む。この判定は、動きベクトル検出回路27の検出結果を用いて行う。動きベクトル検出回路27は、主被写体検出回路26で検出された複数の被写体に対して、動きベクトルすなわちセンサ3上での動き量を検出する。複数の被写体が検出された場合、順位に従って複数の被写体に対して動きベクトルが検出される。 In step S407, the motion vector detection circuit 27 determines whether a subject with different movement on the sensor 3 has intersected with the previous main subject (old subject). If the subject has intersected, proceed to step S422. On the other hand, if the subject has not intersected, proceed to step S408. This determination is made using the detection results of the motion vector detection circuit 27. The motion vector detection circuit 27 detects motion vectors, i.e., the amount of movement on the sensor 3, for the multiple subjects detected by the main subject detection circuit 26. If multiple subjects are detected, motion vectors are detected for the multiple subjects in order of rank.

そこで、複数の被写体の数フレーム前から現在のフレームまでの間の各被写体の動きベクトルとその位置を記録しておく。そして複数の被写体のうちの二つの位置の差が所定値(Cd3)より小さく、かつその被写体の直前のフレーム間での動きベクトルの差が所定値(Cv1)以上の場合、センサ3上での動きが異なる被写体がそれまでの主被写体と交差したと判定される。すなわち、複数の被写体の位置の差が第三の所定値よりも小さく、かつ動きベクトルの差が第一の所定ベクトル差以上の場合、被写体が交差したと判定される。 Therefore, the motion vectors and positions of each of the multiple subjects from several frames before to the current frame are recorded. If the difference in the positions of two of the multiple subjects is smaller than a predetermined value (Cd3) and the difference in the motion vectors of those subjects between the frames immediately before is greater than a predetermined value (Cv1), it is determined that a subject with different movement on sensor 3 has intersected with the previous main subject. In other words, if the difference in the positions of the multiple subjects is smaller than a third predetermined value and the difference in motion vectors is greater than a first predetermined vector difference, it is determined that the subjects have intersected.

ステップS408において、主被写体検出回路26は、検出された主被写体のセンサ3上での位置が端位置にあるか(センサ3の中心から一定範囲外であるか)を判定する。主被写体の位置がセンサ3の中心から一定範囲外である場合、ステップS422へ進む。一方、主被写体の位置がセンサ3の中心から一定範囲内にある場合、ステップS409進む。この判定は、主被写体のセンサ3上での位置がセンサ3の中心位置から所定値(Cp1)以上離れていれば一定範囲外と判定され、ステップS422へ進む。すなわち、最新の検出された主被写体の位置が中心位置から第一の所定範囲外の場合、ステップS422へ進む。 In step S408, the main subject detection circuit 26 determines whether the position of the detected main subject on sensor 3 is at an edge position (outside a certain range from the center of sensor 3). If the position of the main subject is outside the certain range from the center of sensor 3, proceed to step S422. On the other hand, if the position of the main subject is within the certain range from the center of sensor 3, proceed to step S409. This determination is made if the position of the main subject on sensor 3 is away from the center position of sensor 3 by more than a predetermined value (Cp1), it is determined to be outside the certain range, and proceed to step S422. In other words, if the position of the most recently detected main subject is outside a first predetermined range from the center position, proceed to step S422.

ステップS409において、主被写体検出回路26は、それまでの主被写体が一時的に検出されなくなったかを判定する。それまでの主被写体の検出位置近傍で主被写体検出されず、主被写体検出回路26が新な主被写体を検出したが、その位置が離れ、主被写体領域の大きさが大きく異なる場合、一時的に検出されなくなったと判定され、ステップS423へ進む。一方、主被写体が検出されている場合、ステップS410進む。この判定は、それまでの主被写体が他の被写体に一旦隠れたことにより、一時的にそれまでの主被写体が検出されない場合を想定している。 In step S409, main subject detection circuit 26 determines whether the previous main subject is temporarily no longer detected. If a main subject is not detected near the previous detection position of the main subject, and main subject detection circuit 26 detects a new main subject, but that new subject is now further away and the size of the main subject area is significantly different, it is determined that the main subject is temporarily no longer detected, and processing proceeds to step S423. On the other hand, if a main subject is detected, processing proceeds to step S410. This determination assumes that the previous main subject is temporarily no longer detected because it has been temporarily hidden by another subject.

主被写体検出回路26で顔が他の被写体に隠れた場合などに顔の検出に失敗することがある。その対策として主被写体検出回路26で顔の検出がされない場合も数フレームは前回の顔検出位置に顔があるものとしてCPU15は主被写体を決定する。それまでの主被写体がまだ隠れているこの処理中に、新たな顔(他人の顔)が検出されると主被写体検出回路26はその他人の顔を主被写体としてCPU15に通知する。 The main subject detection circuit 26 may fail to detect a face if the face is hidden by another subject. As a countermeasure, even if the main subject detection circuit 26 does not detect a face, the CPU 15 will determine the main subject by assuming that the face is present at the previous face detection position for several frames. If a new face (someone else's face) is detected during this process while the previous main subject is still hidden, the main subject detection circuit 26 will notify the CPU 15 that the other person's face is the main subject.

そこで、新たな主被写体が通知された場合、それまで検出されていた顔と新たに検出された顔の大きさと検出位置を比較する。顔の大きさの比(Rf=それまでの顔の大きさ/新たに検出された顔の大きさ)が所定の範囲(Crf1<Rf<Crf2)外の場合、一時的に検出されなくなったと判定される。または、それまで検出されていた顔と新たに検出された顔の検出位置の差Dfが所定値(Cd4)よりも大きい場合、一時的に検出されなくなったと判定される。すなわち、複数の被写体の大きさの比が第一の比較値以下もしくは第二の比較値以上の場合、または、複数の被写体の位置の差が第四の所定値よりも大きい場合、主被写体が一時的に検出されなくなったと判定され、ステップS423へ進む。人物などの場合も同様である。なお、数フレームの暫定期間が終了した後は、この条件を満たさないと判定し、ステップS410へ進む。 Therefore, when a new main subject is notified, the size and detection position of the face detected up to that point are compared with those of the newly detected face. If the face size ratio (Rf = previous face size / newly detected face size) is outside a predetermined range (Crf1 < Rf < Crf2), it is determined that the face has temporarily stopped being detected. Alternatively, if the difference Df between the detection positions of the previously detected face and the newly detected face is greater than a predetermined value (Cd4), it is determined that the face has temporarily stopped being detected. In other words, if the size ratio of multiple subjects is less than or equal to the first comparison value or greater than the second comparison value, or if the difference in position between multiple subjects is greater than a fourth predetermined value, it is determined that the main subject has temporarily stopped being detected, and the process proceeds to step S423. The same applies to people, etc. Note that after a provisional period of several frames has elapsed, it is determined that this condition is not met, and the process proceeds to step S410.

ステップS410において、主被写体検出回路26は、検出された複数の被写体の全てが所定のデフォーカス範囲内か(複数の被写体のデフォーカス量の差が所定値以下か)を判定する。複数の被写体の全てが所定のデフォーカス範囲内である場合、ステップS423へ進む。一方、複数の被写体の全てが所定のデフォーカス範囲内でない場合(複数の被写体が第一の所定デフォーカス範囲内または第一の距離範囲内の場合)、ステップS423へ進む。この判定は、AF処理回路12から得られた距離またはデフォーカス量を用いて行われる。 In step S410, the main subject detection circuit 26 determines whether all of the detected multiple subjects are within a predetermined defocus range (whether the difference in defocus amount between the multiple subjects is less than a predetermined value). If all of the multiple subjects are within the predetermined defocus range, the process proceeds to step S423. On the other hand, if all of the multiple subjects are not within the predetermined defocus range (if the multiple subjects are within a first predetermined defocus range or a first distance range), the process proceeds to step S423. This determination is made using the distance or defocus amount obtained from the AF processing circuit 12.

主被写体検出回路26で検出された複数の被写体に対して、その被写体が存在する領域の距離またはデフォーカス量をAF処理回路12から取得する。その値を用いて全ての主被写体領域が所定範囲内に入っている場合、所定デフォーカス範囲内と判定され、ステップS423へ進む。一方、いずれかの領域が所定範囲内に入っていない場合、ステップS421へ進む。これは、最も近側と最も遠側の領域のデフォーカス量(または距離)を求め、その差を所定範囲(距離範囲)と比較すれば良い。なお所定範囲は深度を基準に定める。 For multiple subjects detected by the main subject detection circuit 26, the distance or defocus amount of the area where the subject is located is obtained from the AF processing circuit 12. If all main subject areas are found to be within the predetermined range using this value, they are determined to be within the predetermined defocus range, and processing proceeds to step S423. On the other hand, if any area is not within the predetermined range, processing proceeds to step S421. This can be done by finding the defocus amount (or distance) of the nearest and farthest areas and comparing the difference with the predetermined range (distance range). The predetermined range is determined based on depth.

ステップS421において、CPU15は、主被写体検出回路26で検出された主被写体領域をブレ補正の対象領域(ブレ補正制御領域)として、動きベクトル検出回路27におけるベクトル検出枠を設定する。例えば、図5(A)に示されるように、全体を9×7の領域に分割し、その中の主被写体領域に含まれる領域と一部が重複する領域(図5(A)中の灰色の部分)を、被写体ブレを補正するためにベクトルを検出するための検出枠とする。続いて、各領域のベクトル検出枠においてベクトルを検出する。そして、ベクトルのクラスタリングを行い、主被写体枠内のベクトル検出枠のベクトルを被写体の移動に起因するものとそれ以外のものを分離し、被写体の移動に起因する動きベクトルを検出することで、発生している被写体ブレ量を検出する。 In step S421, the CPU 15 sets a vector detection frame in the motion vector detection circuit 27, using the main subject region detected by the main subject detection circuit 26 as the target region for blur correction (blur correction control region). For example, as shown in FIG. 5(A), the entire image is divided into 9x7 regions, and the regions that partially overlap with the region included in the main subject region (the gray areas in FIG. 5(A)) are set as detection frames for detecting vectors to correct subject blur. Vectors are then detected in the vector detection frames of each region. The vectors are then clustered to separate the vectors in the vector detection frames within the main subject frame into those caused by subject movement and those that are not, and the amount of subject blur that has occurred is detected by detecting motion vectors caused by subject movement.

ステップS422において、背景をブレ補正の対象領域(ブレ補正制御領域)として、主被写体検出回路26で検出された主被写体領域を除く領域に動きベクトル検出回路27におけるベクトル検出枠を設定する。例えば、図5(A)に示されるように、全体を9×7の領域に分割し灰色の部分を除く領域を、ブレを補正するためにベクトルを検出するための検出枠とする。続いて、各領域のベクトル検出枠においてベクトルを検出する。そして、ベクトルのクラスタリングを行い、主被写体枠を除くベクトル検出枠のベクトルを、手ブレに起因する背景のブレとそれ以外のものを分離し、手ブレ起因する背景の動きベクトルを検出することで、発生している背景のブレ量を検出する。 In step S422, the background is set as the target area for blur correction (blur correction control area), and a vector detection frame in the motion vector detection circuit 27 is set in the area excluding the main subject area detected by the main subject detection circuit 26. For example, as shown in Figure 5(A), the entire image is divided into 9x7 areas, and the area excluding the gray parts is set as the detection frame for detecting vectors to correct blur. Vectors are then detected in the vector detection frame of each area. Vector clustering is then performed to separate the vectors in the vector detection frame excluding the main subject frame into background blur caused by camera shake and other vectors, and the amount of background blur caused by camera shake is detected by detecting the background motion vectors.

ステップS423において、以前の主被写体(旧主被写体)が存在してした領域をブレ補正の対象領域として、動きベクトル検出回路27におけるベクトル検出枠を設定する。ただし、主被写体検出回路26で、それまでの主被写体が一時的に検出されていないか、または他の被写体が主被写体として検出されている状態であるため、背景や他の被写体の動きベクトルも検出する必要がある。このとき、例えば、複数の被写体、複数の被写体と背景、以前に検出された被写体(旧被写体)、または旧被写体と背景を、ブレ補正制御領域とする。そこで、画面全体に動きベクトル検出回路27におけるベクトル検出枠を設定する。そして、主被写体検出回路26から得られたそれまでの被写体(旧被写体)を含む領域、新たに検出された被写体(新被写体)を含む領域、それを除く領域の3つ領域を設け、それぞれに動きベクトル検出回路27におけるベクトル検出枠を設定する。 In step S423, a vector detection frame is set in the motion vector detection circuit 27, with the area where the previous main subject (old main subject) was present as the target area for blur correction. However, because the main subject detection circuit 26 is temporarily not detecting the previous main subject or has detected another subject as the main subject, it is also necessary to detect the motion vectors of the background and other subjects. In this case, for example, multiple subjects, multiple subjects and the background, the previously detected subject (old subject), or the old subject and the background are set as the blur correction control area. Therefore, a vector detection frame in the motion vector detection circuit 27 is set to cover the entire screen. Three areas are then set: an area including the previous subject (old subject) obtained from the main subject detection circuit 26, an area including the newly detected subject (new subject), and an area excluding these, and a vector detection frame in the motion vector detection circuit 27 is set for each of them.

例えば図5(B)に示されるように、全体を9×7の領域に分割する。旧主被写体領域に含まれる領域と一部が重複する領域(図5(B)の灰色部分)、新主被写体領域に含まれる領域と一部が重複する領域(図5(B)の白色部分)、両者を除く領域の3つの領域を設け、ブレ補正のためにベクトルを検出する検出枠とする。続いて、各領域のベクトル検出枠を検出する。そして、ベクトルのクラスタリングを行い、それまで主被写体領域枠内と新な主被写体領域枠内のベクトル検出枠のベクトルを、被写体の移動に起因するものとそれ以外のものを分離し、被写体の移動に起因する動きベクトルを検出する。これにより、発生している被写体ブレ量を検出する。また2つの被写体枠内を除くベクトル検出枠のベクトルを、手ブレに起因する背景のブレとそれ以外のものを分離し、手ブレ起因する背景の動きベクトルを検出することで、発生している背景のブレ量を検出する。 For example, as shown in Figure 5(B), the entire image is divided into 9x7 regions. Three regions are defined: a region that partially overlaps with the region included in the old main subject region (the gray region in Figure 5(B)), a region that partially overlaps with the region included in the new main subject region (the white region in Figure 5(B)), and a region excluding both. These serve as detection frames for detecting vectors for blur correction. Next, vector detection frames are detected for each region. Vector clustering is then performed to separate the vectors in the vector detection frames within the previous and new main subject region frames into those caused by subject movement and those not, and motion vectors caused by subject movement are detected. This detects the amount of subject blur that has occurred. Furthermore, the vectors in the vector detection frames excluding the two subject frames are separated into those caused by background blur due to camera shake and those not, and the amount of background blur that has occurred is detected.

その後、求められた3つのブレ量から補正すべきブレ量次の手順で算出する。
(1)求められた3つのブレ量の差が所定値(Cb1)以内であれば、3つのブレ量の平均を算出し補正すべきブレ量とする。
(2)それまで主被写体のブレ量と背景のブレ量の差が所定値(Cb1)以内であれば、2つのブレ量の平均を算出し補正すべきブレ量とする。
(3)それまで主被写体のブレ量と新たな主被写体のブレ量の差が所定値(Cb1)以内であれば、2つのブレ量の平均を算出し補正すべきブレ量とする。
(4)それまで主被写体のブレ量が所定値(Cs1)より大きければ、それまで主被写体のブレ量を補正すべきブレ量とする。
(5)背景のブレ量が所定値(Cs1)より大きければ、背景のブレ量を補正すべきブレ量とする。
(6)それ以外の場合はそれまで主被写体のブレ量を補正すべきブレ量とする。
Thereafter, the amount of blur to be corrected is calculated from the three amounts of blur thus obtained in the following manner.
(1) If the difference between the three obtained amounts of blur is within a predetermined value (Cb1), the average of the three amounts of blur is calculated and set as the amount of blur to be corrected.
(2) If the difference between the amount of blur of the main subject and the amount of blur of the background is within a predetermined value (Cb1), the average of the two amounts of blur is calculated and set as the amount of blur to be corrected.
(3) If the difference between the amount of blur of the main subject up to that point and the amount of blur of the new main subject is within a predetermined value (Cb1), the average of the two amounts of blur is calculated and set as the amount of blur to be corrected.
(4) If the amount of blur of the main subject up to that point is greater than a predetermined value (Cs1), the amount of blur of the main subject up to that point is set as the amount of blur to be corrected.
(5) If the amount of blur in the background is greater than a predetermined value (Cs1), the amount of blur in the background is set as the amount of blur to be corrected.
(6) In all other cases, the amount of blur of the main subject up to that point is set as the amount of blur to be corrected.

そしてステップS424において、CPU15は、ブレ補正処理を行う。まず、ステップS421~S423で求められた補正すべきブレ量から撮像された画像に生じるブレを補正するための補正量(ブレ補正量)を算出する。その後、画像変形切出し回路28を用いて、算出された補正量に基づいて画像切出しを行うことで、ブレ補正画像を生成する。 Then, in step S424, the CPU 15 performs shake correction processing. First, the CPU 15 calculates the correction amount (shake correction amount) for correcting the shake occurring in the captured image from the amount of shake to be corrected calculated in steps S421 to S423. Then, the image transformation and cropping circuit 28 is used to crop the image based on the calculated correction amount, thereby generating a shake-corrected image.

本実施形態において、主被写体検出回路26は、主被写体の存在する位置(主被写体情報)を検出する主被写体検出手段の役割を担う。動きベクトル検出回路27は、被写体の動き(動きベクトル情報)を検出する動きベクトル検出手段の役割を担う。ブレ検出センサ14およびブレ検出回路13は、撮像装置1の動き(ブレ情報)を検出するブレ検出手段の役割を担う。CPU15は、撮像された画像の被写体に生じるブレを補正する補正量を算出する算出手段の機能を担う。操作スイッチ18とタッチパネルが装着されているLCD8とCPU15は、合焦制御の対象領域(合焦制御領域)を指定する手段の役割を担う。 In this embodiment, main subject detection circuit 26 functions as a main subject detection means that detects the position of the main subject (main subject information). Motion vector detection circuit 27 functions as a motion vector detection means that detects the movement of the subject (motion vector information). Shake detection sensor 14 and shake detection circuit 13 function as a shake detection means that detects the movement of the imaging device 1 (shake information). CPU 15 functions as a calculation means that calculates the amount of correction used to correct shake that occurs in the subject of the captured image. Operation switch 18, touch panel-equipped LCD 8, and CPU 15 function as a means for specifying the target area for focus control (focus control area).

またCPU15は、主被写体情報とブレ情報と動きベクトル情報とに基づいて、ブレ補正制御領域を合焦制御領域と異ならせるか否か判定する判定手段(制御手段)の役割を担う。またCPU15は、判定手段の判定結果に応じてブレ補正制御の対象領域を決定する機能を有する。これにより、被写体検出の結果や各領域のデフォーカス量や被写体の動きに基づき、ブレ補正制御対象とする被写体(画面上の領域)を、合焦制御の対象とは別の被写体とするかを判定し、その結果に基づいてブレ補正の制御対象を決める。 The CPU 15 also functions as a determination means (control means) that determines whether or not to make the shake correction control area different from the focus control area based on main subject information, blur information, and motion vector information. The CPU 15 also has the function of determining the target area for shake correction control based on the determination result of the determination means. This determines whether or not the subject (area on the screen) to be targeted for shake correction control should be a separate subject from the target for focus control based on the subject detection results, the defocus amount of each area, and the subject movement, and determines the target for shake correction control based on the result.

それまでの被写体を追尾している場合、継続してその被写体を制御対象にする。新たな主被写体が検出された場合、ブレ補正の制御対象を合焦制御の対象と同一の被写体とするのは、合焦制御の対象の被写体が撮影者によって指定された場合である。または、ブレ検出手段の出力信号が大きく、かつ動きベクトル検出手段とブレ検出手段から算出される被写体の動きが小さい場合(すなわち撮像装置を撮影者が動かしセンサ上では動かないように、撮影者が被写体を追っていると判定できる場合)である。すなわち、ブレ検出手段の出力信号が第一の出力信号よりも大きく、かつ動きベクトル情報が第一の動きベクトルよりも小さい場合である。または、顔認証機能などに新たなに検出された主被写体がそれまでの主被写体と同一とみなせる場合である。これにより、ブレ補正制御の対象を合焦制御の対象と同じ被写体とし、ピントが合い被写体ブレが少ない良好な画像が得られる。 If the previous subject was being tracked, that subject will continue to be the control target. When a new main subject is detected, the subject that is the target of focus control will be the same subject that is the target of shake correction control if the subject that is the target of focus control has been specified by the photographer. Alternatively, the output signal from the shake detection means is large and the movement of the subject calculated from the motion vector detection means and shake detection means is small (i.e., when it can be determined that the photographer is tracking the subject by moving the imaging device so that it does not move on the sensor). In other words, this is the case when the output signal from the shake detection means is larger than the first output signal and the motion vector information is smaller than the first motion vector. Alternatively, this is the case when a newly detected main subject, such as a face recognition function, can be considered the same as the previous main subject. This causes the same subject to be the target of shake correction control as the target of focus control, resulting in a good image that is in focus and has little subject blur.

新たな主被写体が検出された場合にブレ補正の制御対象を合焦制御の対象と同一の被写体としないとは、例えば、以下の(1)~(5)の場合である。
(1)複数の被写体から主被写体を決めることができない場合。
(2)動きベクトル検出手段とブレ検出手段から算出される被写体の動きから違う動きのものが交差したと判定できる場合。
(3)画面の端位置付近に主被写体が検出された場合。
(4)一時的に主被写体領域検出手段で被写体の検出がされなかった場合。
(5)検出された複数の被写体のデフォーカス量の差が所定値以下の場合。
When a new main subject is detected, the subject of image stabilization control is not the same as the subject of focus control, for example, in the following cases (1) to (5).
(1) When it is not possible to determine the main subject from multiple subjects.
(2) When it can be determined that a different motion has intersected from the motion of the subject calculated by the motion vector detection means and the blur detection means.
(3) When the main subject is detected near the edge of the screen.
(4) When the main subject area detection means temporarily fails to detect the subject.
(5) When the difference in defocus amount between the detected multiple subjects is equal to or less than a predetermined value.

合焦制御は必ず行う必要があるため制御対象を一つに決めなければならないが、ブレ補正制御においては、制御対象の被写体を定めず、背景のブレ補正処理(手ブレ補正)を行っても構わない。そこで、主被写体として検出された被写体が撮影者にとって被写体ブレを補正したい被写体ではない場合、ブレ補正制御対象とする被写体を、合焦制御の対象とは別の被写体とする。これにより、複数の被写体が混在するようなシーンにおいても、滑らかで品位の良い映像を提供することが可能である。 Since focus control is always required, a single control target must be determined. However, with image stabilization control, it is possible to perform image stabilization processing (camera stabilization) on the background without determining a specific subject to control. Therefore, if the subject detected as the main subject is not one for which the photographer wants to correct subject shake, the subject to image stabilization control can be set to a different subject from the subject to focus control. This makes it possible to provide smooth, high-quality images even in scenes with multiple mixed subjects.

(第2の実施形態)
次に、図6を参照して、本発明の第2の実施形態について説明する。本実施形態は、図4のステップS423の処理が異なる以外は、第1の実施形態と共通である。図6は、本実施形態におけるブレ補正処理のフローチャートである。図6の各ステップは、主に、CPU15、またはCPU15の指令に基づいて主被写体検出回路26などの各部により実行される。
Second Embodiment
Next, a second embodiment of the present invention will be described with reference to Fig. 6. This embodiment is the same as the first embodiment except for the processing in step S423 in Fig. 4. Fig. 6 is a flowchart of the image stabilization processing in this embodiment. The steps in Fig. 6 are mainly executed by the CPU 15 or by various components such as the main subject detection circuit 26 based on instructions from the CPU 15.

まずステップS601において、CPU15は、旧主被写体と新たな主被写体が動画記録時の絞り値において深度内であるかを判定する。新旧の主被写体が深度内である場合、ステップS608へ進み、旧主被写体の存在する領域をブレ補正制御の対象領域とする。一方、新旧の主被写体が深度外である場合、ステップS602に進む。すなわちCPU15は、主被写体検出回路26で検出された旧主被写体が存在している領域と、主被写体検出回路26で検出された新な主被写体が存在している領域のデフォーカス量をAF処理回路12から取得する。そしてCPU15は、その値の差が深度内か否かを判定する。深度は、通信ドライバー21を介して交換レンズ31と通信を行って得られた絞り値(絞り値情報)と、予め定められた許容錯乱円形との積で求められる。 First, in step S601, the CPU 15 determines whether the old and new main subjects are within the depth of field for the aperture value used during video recording. If the old and new main subjects are within the depth of field, the process proceeds to step S608, where the area where the old main subject is present is designated as the target area for image stabilization control. On the other hand, if the old and new main subjects are outside the depth of field, the process proceeds to step S602. That is, the CPU 15 obtains from the AF processing circuit 12 the defocus amounts for the area where the old main subject, detected by the main subject detection circuit 26, is present and the area where the new main subject, detected by the main subject detection circuit 26, is present. The CPU 15 then determines whether the difference between these values is within the depth of field. The depth of field is calculated by multiplying the aperture value (aperture value information) obtained by communicating with the interchangeable lens 31 via the communication driver 21 by a predetermined allowable circle of confusion.

ステップS602において、CPU15は、新たな主被写体への合焦動作(フォーカスレンズ33の駆動)が開始されたかを判定する。新たな主被写体への合焦動作が開始された場合、ステップS603へ進む。一方、新たな主被写体への合焦動作が開始されていない場合、ステップS608へ進む。 In step S602, the CPU 15 determines whether a focusing operation (driving the focus lens 33) on a new main subject has started. If a focusing operation on a new main subject has started, the process proceeds to step S603. On the other hand, if a focusing operation on a new main subject has not started, the process proceeds to step S608.

ステップS603において、CPU15は、通信ドライバー21を介して交換レンズ31と通信を行い得られたフォーカスレンズ33の駆動位置から、旧主被写体が存在している領域がまだ深度内にあるかを判定する。旧主被写体が存在している領域が深度内にある場合、ステップS608へ進む。一方、旧主被写体が存在している領域が深度外である場合、ステップS604へ進む。 In step S603, the CPU 15 communicates with the interchangeable lens 31 via the communication driver 21 and determines, from the drive position of the focus lens 33 obtained, whether the area in which the old main subject existed is still within the depth of field. If the area in which the old main subject existed is within the depth of field, the process proceeds to step S608. On the other hand, if the area in which the old main subject existed is outside the depth of field, the process proceeds to step S604.

ステップS604において、CPU15は、新たな主被写体への合焦動作が終了したかを判定する。新たな主被写体への合焦動作が終了した場合、ステップS605へ進む。一方、新たな主被写体への合焦動作が終了していない場合、ステップS608へ進む。まだ新たな主被写体にもピントが合っていない場合、新たな主被写体の存在する領域をブレ補正制御の対象領域としても、ピントが合い被写体ブレが少ない良好な画像が得ることはできない。そこで、旧主被写体の存在する領域をブレ補正制御の対象領域とすることで、継続性のある映像を提供する。 In step S604, the CPU 15 determines whether the focusing operation on the new main subject has finished. If the focusing operation on the new main subject has finished, the process proceeds to step S605. On the other hand, if the focusing operation on the new main subject has not finished, the process proceeds to step S608. If the new main subject is not yet in focus, even if the area where the new main subject exists is set as the target area for image stabilization control, it will not be possible to obtain a good image that is in focus and has little subject blur. Therefore, by setting the area where the previous main subject exists as the target area for image stabilization control, a continuity of image is provided.

ステップS605において、CPU15は、交換レンズ31の絞り値が変更可能かを判定する。絞り値が変更可能である場合、ステップS606へ進む。ステップS606において、CPU15は、交換レンズ31の絞り34を絞る。続いてステップS607において、CPU15は、絞り34を絞ったことで、旧主被写体を深度内にすることが可能かを判定する。旧主被写体を深度内にすることが可能である場合、ステップS608へ進む。一方、旧主被写体を深度内にすることが不可能である場合、ステップS609へ進む。ステップS609において、CPU15は、新たな主被写体の存在する領域をブレ補正制御の対象領域とする。なお、ステップS605にて交換レンズ31の絞り値を変更することが不可能な場合、ステップS609へ進み、新たな主被写体の存在する領域をブレ補正制御の対象領域とする。 In step S605, the CPU 15 determines whether the aperture value of the interchangeable lens 31 can be changed. If the aperture value can be changed, the process proceeds to step S606. In step S606, the CPU 15 narrows the aperture 34 of the interchangeable lens 31. Next, in step S607, the CPU 15 determines whether narrowing the aperture 34 makes it possible to bring the old main subject within the depth of field. If it is possible to bring the old main subject within the depth of field, the process proceeds to step S608. On the other hand, if it is not possible to bring the old main subject within the depth of field, the process proceeds to step S609. In step S609, the CPU 15 designates the area where the new main subject exists as the target area for image stabilization control. Note that if it is not possible to change the aperture value of the interchangeable lens 31 in step S605, the process proceeds to step S609, and designates the area where the new main subject exists as the target area for image stabilization control.

本実施形態において、主被写体検出回路26は、主被写体の存在する位置(主被写体情報)を検出する主被写体検出手段の役割を担う。CPU15は、判定手段の判定結果に応じてブレ補正制御領域を決定する機能を有する。これにより、主被写体として検出されたものが撮影者にとって被写体ブレを補正したい被写体とは限らない可能性がある場合、または、それまでの主被写体が深度内にある場合、ブレ補正制御対象とする被写体を合焦制御の対象とは別の被写体とする。このため、複数の被写体が混在するようなシーンにおいても、滑らかで品位の良い映像を提供することが可能である。 In this embodiment, the main subject detection circuit 26 serves as the main subject detection means for detecting the position of the main subject (main subject information). The CPU 15 has the function of determining the shake correction control area according to the determination result of the determination means. As a result, if there is a possibility that the subject detected as the main subject is not necessarily the subject for which the photographer wants to correct subject shake, or if the previous main subject is within the depth, the subject targeted for shake correction control is set to be different from the subject targeted for focus control. This makes it possible to provide smooth, high-quality images even in scenes with a mixture of multiple subjects.

なお各実施形態では、レンズ交換式の撮像装置を例に説明したが、デジタルビデオカメラやレンズ一体型のデジタルカメラなどのブレ補正にも適用可能である。各実施形態では、補正量を算出する算出手段、合焦制御の対象領域を指定する手段、ブレ補正制御領域を合焦制御領域と異ならせるか否か判定する判定手段の役割、判定手段の判定結果に応じてブレ補正制御領域を決定する機能をCPUに担わせた。ただし、これらの役割を担う専用回路を設けても良い。 In each embodiment, an interchangeable lens imaging device has been described as an example, but the invention can also be applied to image stabilization in digital video cameras and integrated lens digital cameras. In each embodiment, the CPU is responsible for the functions of the calculation means for calculating the correction amount, the means for designating the target area for focus control, the determination means for determining whether the image stabilization control area should be different from the focus control area, and the function for determining the image stabilization control area in accordance with the determination result of the determination means. However, dedicated circuits for performing these functions may also be provided.

(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention can also be realized by supplying a program that realizes one or more of the functions of the above-described embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program.The present invention can also be realized by a circuit (e.g., an ASIC) that realizes one or more of the functions.

各実施形態において、ブレ補正制御対象とする被写体(画面上の領域)を、所定の条件に基づいて、合焦制御の対象と同じ被写体もしくは別の被写体と切り替える。このため各実施形態によれば、複数の被写体が存在するシーンにおいて、滑らかで品位の良い画像を取得することが可能な制御装置、撮像装置、制御方法、およびプログラムを提供することができる。 In each embodiment, the subject (area on the screen) targeted for image stabilization control is switched between the same subject as the subject targeted for focus control or a different subject based on predetermined conditions. Therefore, each embodiment can provide a control device, imaging device, control method, and program that can capture smooth, high-quality images in scenes with multiple subjects.

以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。 The above describes preferred embodiments of the present invention, but the present invention is not limited to these embodiments, and various modifications and variations are possible within the scope of the invention.

各実施形態のブレ補正処理は、電子防振(トリミングによる防振)による処理であるが、これに限定されるものではない。例えば、撮像光学系の補正レンズ(防振レンズ)を光軸と直交する方向に移動させることや、センサ3を光軸と直交する方向に移動させることなどの光学防振による処理を行ってブレ補正処理を行うこともできる。 The shake correction process in each embodiment is electronic image stabilization (image stabilization by trimming), but is not limited to this. For example, shake correction can also be performed by optical image stabilization, such as by moving the correction lens (image stabilization lens) of the imaging optical system in a direction perpendicular to the optical axis, or by moving the sensor 3 in a direction perpendicular to the optical axis.

1 撮像装置(制御装置)
13 ブレ検出回路(ブレ検出手段)
14 ブレ検出センサ(ブレ検出手段)
15 CPU(制御手段)
26 主被写体検出回路(主被写体検出手段)
27 動きベクトル検出回路(動きベクトル検出手段)
1. Imaging device (control device)
13 Shake detection circuit (shake detection means)
14 Shake detection sensor (shake detection means)
15 CPU (control means)
26 Main subject detection circuit (main subject detection means)
27 Motion vector detection circuit (motion vector detection means)

Claims (18)

主被写体情報を検出する被写体検出手段と、
画像における動きベクトル情報を検出する動きベクトル検出手段と、
慣性センサを用いてブレ情報を検出するブレ検出手段と、
前記主被写体情報と前記ブレ情報と前記動きベクトル情報とに基づいて、ブレ補正制御領域を合焦制御領域と異ならせるか否か判定する制御手段と、を有することを特徴とする制御装置。
a subject detection means for detecting main subject information;
a motion vector detection means for detecting motion vector information in an image;
a shake detection means for detecting shake information using an inertial sensor ;
and control means for determining whether or not to make a blur correction control area different from a focus control area based on the main subject information, the blur information, and the motion vector information.
前記制御手段は、前記主被写体情報と前記ブレ情報と前記動きベクトル情報とに基づいて、前記ブレ補正制御領域を決定することを特徴とする請求項1に記載の制御装置。 The control device described in claim 1, characterized in that the control means determines the blur correction control area based on the main subject information, the blur information, and the motion vector information. 前記制御手段は、第1の被写体に対する第2の被写体の大きさの割合が第一の所定割合以上の場合、前記ブレ補正制御領域を前記合焦制御領域と異ならせることを特徴とする請求項1または2に記載の制御装置。 3. The control device according to claim 1, wherein the control means makes the image stabilization control area different from the focus control area when a ratio of the size of the second object to the size of the first object is equal to or greater than a first predetermined ratio. 前記制御手段は、第1の被写体に対する第2の被写体の大きさの割合が第二の所定割合以上であり、かつ前記第1の被写体に対する第2の被写体の位置の差が第一の所定値よりも小さい場合、前記ブレ補正制御領域を前記合焦制御領域と異ならせることを特徴とする請求項1または2に記載の制御装置。 3. The control device according to claim 1 , wherein the control means makes the image stabilization control area different from the focus control area when a ratio of a size of the second subject to a size of the first subject is equal to or greater than a second predetermined ratio and a difference in position of the second subject to the first subject is smaller than a first predetermined value. 前記制御手段は、第1の被写体に対する第2の被写体の位置の差が第二の所定値よりも小さい場合、前記ブレ補正制御領域を前記合焦制御領域と異ならせることを特徴とする請求項1または2に記載の制御装置。 3. The control device according to claim 1, wherein the control means makes the image stabilization control area different from the focus control area when a difference in position of the second object relative to the first object is smaller than a second predetermined value. 前記制御手段は、第1の被写体に対する第2の被写体の位置の差が第三の所定値よりも小さく、かつ動きベクトルの差が第一の所定ベクトル差以上の場合、前記ブレ補正制御領域を前記合焦制御領域と異ならせることを特徴とする請求項1または2に記載の制御装置。 3. The control device according to claim 1, wherein the control means makes the image stabilization control area different from the focus control area when a difference in position of the second object relative to the first object is smaller than a third predetermined value and a difference in motion vector is equal to or greater than a first predetermined vector difference. 前記制御手段は、最新の検出された主被写体の位置が中心位置から第一の所定範囲外の場合、前記ブレ補正制御領域を前記合焦制御領域と異ならせることを特徴とする請求項1または2に記載の制御装置。 A control device according to claim 1 or 2, characterized in that the control means differentiates the image stabilization control area from the focus control area when the position of the most recently detected main subject is outside a first predetermined range from the center position. 前記制御手段は、第1の被写体に対する第2の被写体の大きさの比が第一の比較値以下もしくは第二の比較値以上の場合、または複数の被写体の位置の差が第四の所定値よりも大きい場合、前記ブレ補正制御領域を前記合焦制御領域と異ならせることを特徴とする請求項1または2に記載の制御装置。 3. The control device according to claim 1, wherein the control means makes the image stabilization control area different from the focus control area when a ratio of the size of the second object to the size of the first object is equal to or smaller than a first comparison value or equal to or larger than a second comparison value, or when a difference in position of the plurality of objects is larger than a fourth predetermined value. デフォーカス量情報を検出するデフォーカス量検出手段を更に有し、
前記制御手段は、複数の被写体が第一の所定デフォーカス範囲内または第一の距離範囲内の場合、前記ブレ補正制御領域を前記合焦制御領域と異ならせることを特徴とする請求項1または2に記載の制御装置。
Further, the apparatus includes a defocus amount detection means for detecting defocus amount information,
3. The control device according to claim 1, wherein the control means makes the image stabilization control area different from the focus control area when a plurality of subjects are within a first predetermined defocus range or a first distance range.
前記制御手段は、前記ブレ補正制御領域を前記合焦制御領域と異ならせると判定した場合、背景を前記ブレ補正制御領域とすることを特徴とする請求項1乃至9のいずれか一項に記載の制御装置。 A control device according to any one of claims 1 to 9, characterized in that the control means, when determining that the image stabilization control area should be different from the focus control area, sets the background as the image stabilization control area. 前記制御手段は、前記ブレ補正制御領域を前記合焦制御領域と異ならせると判定した場合、複数の被写体、前記複数の被写体と背景、以前に検出された被写体、または以前に検出された被写体と前記背景を、前記ブレ補正制御領域とすることを特徴とする請求項1乃至10のいずれか一項に記載の制御装置。 A control device according to any one of claims 1 to 10, characterized in that, when the control means determines that the image stabilization control area should be different from the focus control area, the control means sets the image stabilization control area to multiple subjects, the multiple subjects and the background, a previously detected subject, or a previously detected subject and the background. 前記制御手段は、撮影者により被写体が指定された場合、前記ブレ補正制御領域を前記合焦制御領域と同一にすることを特徴とする請求項1乃至11のいずれか一項に記載の制御装置。 A control device according to any one of claims 1 to 11, characterized in that the control means, when a subject is specified by the photographer, makes the image stabilization control area the same as the focus control area. 前記制御手段は、前記ブレ検出手段の出力信号が第一の出力信号よりも大きく、かつ前記動きベクトル情報が第一の動きベクトルよりも小さい場合、前記ブレ補正制御領域を前記合焦制御領域と同一にすることを特徴とする請求項1乃至12のいずれか一項に記載の制御装置。 A control device according to any one of claims 1 to 12, characterized in that the control means makes the image stabilization control area the same as the focus control area when the output signal of the shake detection means is greater than the first output signal and the motion vector information is smaller than the first motion vector. デフォーカス量情報を検出するデフォーカス量検出手段を更に有し、
前記制御手段は、前記主被写体情報と前記デフォーカス量情報と絞り値情報とに基づいて、前記ブレ補正制御領域を前記合焦制御領域と異ならせるか否かを判定することを特徴とする請求項1乃至13のいずれか一項に記載の制御装置。
Further, the apparatus includes a defocus amount detection means for detecting defocus amount information,
14. The control device according to claim 1, wherein the control means determines whether to make the image stabilization control area different from the focus control area based on the main subject information, the defocus amount information, and the aperture value information.
前記制御手段は、
前記ブレ情報に基づいてブレ補正量を算出し、
前記ブレ補正量に基づいて、電子防振または光学防振により前記ブレ補正制御領域におけるブレ補正制御を行うことを特徴とする請求項1乃至14のいずれか一項に記載の制御装置。
The control means
calculating a shake correction amount based on the shake information;
15. The control device according to claim 1, wherein the image stabilization control in the image stabilization control region is performed by electronic image stabilization or optical image stabilization based on the image stabilization amount.
撮像素子と、
請求項1乃至15のいずれか一項に記載の制御装置と、を有することを特徴とする撮像装置。
An imaging element;
An imaging device comprising: the control device according to claim 1 .
主被写体情報を検出するステップと、
画像における動きベクトル情報を検出するステップと、
慣性センサを用いてブレ情報を検出するステップと、
前記主被写体情報と前記ブレ情報と前記動きベクトル情報とに基づいて、ブレ補正制御領域を合焦制御領域と異ならせるか否か判定するステップと、を有することを特徴とする制御方法。
detecting main subject information;
Detecting motion vector information in the image;
detecting shake information using an inertial sensor ;
and determining whether or not to make a blur correction control area different from a focus control area based on the main subject information, the blur information, and the motion vector information.
請求項17に記載の制御方法をコンピュータに実行させることを特徴とするプログラム。 A program causing a computer to execute the control method described in claim 17.
JP2021167692A 2021-10-12 2021-10-12 Control device, imaging device, control method, and program Active JP7770855B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2021167692A JP7770855B2 (en) 2021-10-12 2021-10-12 Control device, imaging device, control method, and program
JP2025183668A JP2026009250A (en) 2021-10-12 2025-10-30 Control device, imaging device, control method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021167692A JP7770855B2 (en) 2021-10-12 2021-10-12 Control device, imaging device, control method, and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2025183668A Division JP2026009250A (en) 2021-10-12 2025-10-30 Control device, imaging device, control method, and program

Publications (2)

Publication Number Publication Date
JP2023057932A JP2023057932A (en) 2023-04-24
JP7770855B2 true JP7770855B2 (en) 2025-11-17

Family

ID=86054546

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2021167692A Active JP7770855B2 (en) 2021-10-12 2021-10-12 Control device, imaging device, control method, and program
JP2025183668A Pending JP2026009250A (en) 2021-10-12 2025-10-30 Control device, imaging device, control method, and program

Family Applications After (1)

Application Number Title Priority Date Filing Date
JP2025183668A Pending JP2026009250A (en) 2021-10-12 2025-10-30 Control device, imaging device, control method, and program

Country Status (1)

Country Link
JP (2) JP7770855B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4405940A (en) 1977-05-31 1983-09-20 Westinghouse Electric Corp. Apparatus and method for preprocessing video frame signals
JP2008141437A (en) 2006-11-30 2008-06-19 Sony Corp Imaging apparatus, image processing apparatus, image processing method therefor, and program causing computer to execute the method
JP2012227936A (en) 2012-06-11 2012-11-15 Panasonic Corp Imaging apparatus
JP2017097218A (en) 2015-11-26 2017-06-01 キヤノン株式会社 Image blur correction apparatus, image blur correction method, imaging apparatus, and program
JP2021103244A (en) 2019-12-25 2021-07-15 キヤノン株式会社 Image shake correction device and method for controlling the same, program, and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6661493B2 (en) * 2016-08-30 2020-03-11 キヤノン株式会社 Image blur control device, imaging device, and control method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4405940A (en) 1977-05-31 1983-09-20 Westinghouse Electric Corp. Apparatus and method for preprocessing video frame signals
JP2008141437A (en) 2006-11-30 2008-06-19 Sony Corp Imaging apparatus, image processing apparatus, image processing method therefor, and program causing computer to execute the method
JP2012227936A (en) 2012-06-11 2012-11-15 Panasonic Corp Imaging apparatus
JP2017097218A (en) 2015-11-26 2017-06-01 キヤノン株式会社 Image blur correction apparatus, image blur correction method, imaging apparatus, and program
JP2021103244A (en) 2019-12-25 2021-07-15 キヤノン株式会社 Image shake correction device and method for controlling the same, program, and storage medium

Also Published As

Publication number Publication date
JP2026009250A (en) 2026-01-19
JP2023057932A (en) 2023-04-24

Similar Documents

Publication Publication Date Title
US8780200B2 (en) Imaging apparatus and image capturing method which combine a first image with a second image having a wider view
US8810673B2 (en) Composition determination device, composition determination method, and program
EP2424226B1 (en) Image-processing apparatus and method, and program
US8355048B2 (en) Subject tracking computer program product, subject tracking device and camera
JP7477969B2 (en) Image blur correction device, control method thereof, program, and storage medium
JP5912062B2 (en) Imaging apparatus and moving image data recording method
CN106464793B (en) Camera device and camera assistance method
JP7695276B2 (en) Subject tracking device
TW200845733A (en) Camera apparatus, recording medium in which camera apparatus control program is recorded, and method for controlling camera apparatus
JP2007074031A (en) Imaging apparatus, and image processing apparatus and method
JP2005051472A (en) Automatic shooting control device, automatic shooting program, camera
JP2010147715A (en) Imager
JP2023005846A (en) Image shake correction device and imaging apparatus
JP2021124669A (en) Electronics
JP2021021857A (en) Imaging apparatus and control method thereof
US20230308613A1 (en) Display device and method for controlling display device
JP2015031726A (en) Imaging device, control method of imaging device, control program of imaging device, and recording medium
JP4807582B2 (en) Image processing apparatus, imaging apparatus, and program thereof
JP2017143354A (en) Image processing apparatus and image processing method
JP2007251429A (en) Movie shooting apparatus and zoom adjustment method
JP7770855B2 (en) Control device, imaging device, control method, and program
JP2023058322A (en) Video processing apparatus, method for controlling the same, and program
WO2012099174A1 (en) Autofocus system
JP6836306B2 (en) Imaging control device, its control method, program and recording medium
US20260095652A1 (en) Capture control apparatus and capture control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20241004

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20250527

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20250603

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20250801

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20251105

R150 Certificate of patent or registration of utility model

Ref document number: 7770855

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150