JP2019015818A - Control device, imaging device, control method, program, and storage medium - Google Patents

Control device, imaging device, control method, program, and storage medium Download PDF

Info

Publication number
JP2019015818A
JP2019015818A JP2017132164A JP2017132164A JP2019015818A JP 2019015818 A JP2019015818 A JP 2019015818A JP 2017132164 A JP2017132164 A JP 2017132164A JP 2017132164 A JP2017132164 A JP 2017132164A JP 2019015818 A JP2019015818 A JP 2019015818A
Authority
JP
Japan
Prior art keywords
image
evaluation value
focus
amount
change amount
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.)
Pending
Application number
JP2017132164A
Other languages
Japanese (ja)
Inventor
小西 一樹
Kazuki Konishi
一樹 小西
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 JP2017132164A priority Critical patent/JP2019015818A/en
Publication of JP2019015818A publication Critical patent/JP2019015818A/en
Pending legal-status Critical Current

Links

Abstract

To provide a control device capable of achieving faster AF operation while suppressing a decrease in display image quality.SOLUTION: A control device comprises: image generation means (15a) for generating a first image containing a first frequency component and a second image containing a second frequency component lower than the first frequency component; evaluation value generation means (14) for generating a first evaluation value from the first image and a second evaluation value from the second image; amount-of-change calculation means (15b) for calculating an amount of evaluation value change from the first evaluation value to the second evaluation value; and determination means (15c) for determining a focusing degree of the image on the basis of the amount of change.SELECTED DRAWING: Figure 5

Description

本発明は、自動焦点調整を行うことが可能な撮像装置に関する。   The present invention relates to an imaging apparatus capable of performing automatic focus adjustment.

従来の自動焦点調整動作(AF動作)において、合焦後に焦点調整を行うために用いられる評価値が変化した場合の焦点調整動作の再起動の判定やその焦点調整動作に関する文献には以下の記載がある。   In the conventional automatic focus adjustment operation (AF operation), when the evaluation value used for performing focus adjustment after focusing is changed, the determination regarding restart of the focus adjustment operation and the literature relating to the focus adjustment operation are described below. There is.

特許文献1には、コントラスト法により合焦動作を行うカメラにおいて、再起動時の焦点評価値とほぼ等しい焦点評価値に対応するレンズ位置と最大の焦点評価値に対応するレンズ位置との間の距離を再起動時の撮影レンズの移動量に設定することが開示されている。このような構成により、合焦に要する時間を短縮することができ、素早い合焦が可能となる。   Patent Document 1 discloses that in a camera that performs a focusing operation using a contrast method, a lens position between a lens position corresponding to a focus evaluation value approximately equal to a focus evaluation value at the time of restart and a lens position corresponding to a maximum focus evaluation value. It is disclosed that the distance is set to the moving amount of the photographing lens at the time of restart. With such a configuration, the time required for focusing can be reduced, and quick focusing can be achieved.

特開2003−107329号公報JP 2003-107329 A

しかしながら、特許文献1に開示されたカメラは、合焦探索制御を行った後に焦点調整に用いた評価値が変化した場合、範囲を限定して合焦探索制御を再び行う。すなわち、特許文献1に開示されたカメラは、合焦位置に到達した後にその状態が維持されているか否かを判定しない。このため、特許文献1に開示されたカメラでは、合焦状態が維持されていても合焦探索制御を行うため、撮影動作への移行の遅延や表示画像の品位の低下が生じることがある。   However, when the evaluation value used for focus adjustment changes after performing focus search control, the camera disclosed in Patent Literature 1 performs focus search control again with a limited range. That is, the camera disclosed in Patent Document 1 does not determine whether or not the state is maintained after reaching the in-focus position. For this reason, since the camera disclosed in Patent Document 1 performs the focus search control even when the in-focus state is maintained, there may be a delay in shifting to the photographing operation and a deterioration in the quality of the display image.

そこで本発明は、表示画像の品位の低下を抑制しつつAF動作の高速化を実現することが可能な制御装置、撮像装置、制御方法、プログラム、および、記憶媒体を提供することを目的とする。   Therefore, an object of the present invention is to provide a control device, an imaging device, a control method, a program, and a storage medium capable of realizing a high-speed AF operation while suppressing deterioration in display image quality. .

本発明の一側面としての制御装置は、第1の周波数成分を含む第1の画像、および、前記第1の周波数成分よりも低い第2の周波数成分を含む第2の画像を生成する画像生成手段と、前記第1の画像から第1の評価値を生成し、前記第2の画像から第2の評価値を生成する評価値生成手段と、前記第1の評価値から前記第2の評価値への評価値の変化量を算出する変化量算出手段と、前記変化量に基づいて画像の合焦度合いを判定する判定手段とを有する。   The control device according to one aspect of the present invention generates an image that generates a first image that includes a first frequency component and a second image that includes a second frequency component that is lower than the first frequency component. Means for generating a first evaluation value from the first image and generating a second evaluation value from the second image; and the second evaluation from the first evaluation value. A change amount calculation unit that calculates a change amount of the evaluation value to the value; and a determination unit that determines the degree of focus of the image based on the change amount.

本発明の他の側面としての撮像装置は、撮像光学系を介して形成された光学像を光電変換する撮像素子と、前記制御装置とを有する。   An imaging device as another aspect of the present invention includes an imaging device that photoelectrically converts an optical image formed through an imaging optical system, and the control device.

本発明の他の側面としての制御方法は、第1の周波数成分を含む第1の画像、および、前記第1の周波数成分よりも低い第2の周波数成分を含む第2の画像を生成するステップと、前記第1の画像から第1の評価値を生成し、前記第2の画像から第2の評価値を生成するステップと、前記第1の評価値から前記第2の評価値への評価値の変化量を算出するステップと、前記変化量に基づいて画像の合焦度合いを判定するステップと、を有する。   According to another aspect of the present invention, there is provided a control method for generating a first image including a first frequency component and a second image including a second frequency component lower than the first frequency component. Generating a first evaluation value from the first image, generating a second evaluation value from the second image, and evaluating from the first evaluation value to the second evaluation value Calculating a change amount of the value; and determining a focus degree of the image based on the change amount.

本発明の他の側面としてのプログラムは、前記制御方法をコンピュータに実行させる。   A program according to another aspect of the present invention causes a computer to execute the control method.

本発明の他の側面としての記憶媒体は、前記プログラムを記憶している。   A storage medium according to another aspect of the present invention stores the program.

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

本発明によれば、表示画像の品位の低下を抑制しつつAF動作の高速化を実現することが可能な制御装置、撮像装置、制御方法、プログラム、および、記憶媒体を提供することができる。   According to the present invention, it is possible to provide a control device, an imaging device, a control method, a program, and a storage medium that can realize a high-speed AF operation while suppressing deterioration in quality of a display image.

各実施例における撮像装置のブロック図である。It is a block diagram of the imaging device in each embodiment. 実施例1における撮像装置の動作を示すフローチャートである。3 is a flowchart illustrating an operation of the imaging apparatus according to the first exemplary embodiment. 実施例1におけるボケ量判定の動作を示すフローチャートである。6 is a flowchart illustrating an operation for determining a blur amount according to the first exemplary embodiment. 実施例1におけるスキャンAF動作の説明図である。6 is an explanatory diagram of a scan AF operation in Embodiment 1. FIG. 実施例1における合焦維持判定の動作を示すフローチャートである。3 is a flowchart illustrating an operation for maintaining focus in Embodiment 1. 実施例2における撮像素子の構成図である。FIG. 5 is a configuration diagram of an image sensor in Example 2. 実施例2における撮像装置の動作を示すフローチャートである。6 is a flowchart illustrating the operation of the imaging apparatus according to the second embodiment. 実施例2における合焦維持判定の動作を示すフローチャートである。12 is a flowchart illustrating an operation for maintaining focus in Embodiment 2. 実施例2における撮像面位相差AFの動作を示すフローチャートである。6 is a flowchart illustrating an operation of imaging surface phase difference AF in Embodiment 2.

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

まず、図1を参照して、本発明の実施例1における撮像装置について説明する。図1は、撮像装置1のブロック図である。撮像装置1において、2はズームレンズ群、3はフォーカスレンズ群である。4は、ズームレンズ群2およびフォーカスレンズ群3などを含む撮像光学系を透過する光束の量を制御する光量調節手段(露出手段)としての絞りである。31は、ズームレンズ群2、フォーカスレンズ群3、および、絞り4などを備えたレンズ鏡筒である。レンズ鏡筒31(撮像光学系)は、撮像装置本体に対して一体的に構成されている。ただし本実施形態は、これに限定されるものではなく、撮像装置は、撮像装置本体と、撮像装置本体に着脱可能なレンズ鏡筒(撮像光学系)とを備えて構成されてもよい。   First, with reference to FIG. 1, an imaging apparatus according to Embodiment 1 of the present invention will be described. FIG. 1 is a block diagram of the imaging apparatus 1. In the imaging apparatus 1, 2 is a zoom lens group, and 3 is a focus lens group. Reference numeral 4 denotes a stop as a light amount adjusting means (exposure means) for controlling the amount of light beam transmitted through the imaging optical system including the zoom lens group 2 and the focus lens group 3. A lens barrel 31 includes a zoom lens group 2, a focus lens group 3, a diaphragm 4, and the like. The lens barrel 31 (imaging optical system) is configured integrally with the imaging apparatus main body. However, the present embodiment is not limited to this, and the imaging apparatus may include an imaging apparatus body and a lens barrel (imaging optical system) that can be attached to and detached from the imaging apparatus body.

5は、CMOSセンサまたはCCDセンサなどを含み、撮像光学系を介して形成された被写体像(光学像)を光電変換して電気信号(画像データ)を出力する撮像センサ(固体撮像素子)である。6は、撮像センサ5によって光電変換された電気信号を受けて各種の画像処理を施すことにより所定の画像信号を生成する撮像回路である。7は、撮像回路6により生成されたアナログ画像信号をデジタル画像信号に変換するA/D変換回路である。8は、A/D変換回路7の出力を受けて画像信号を一時的に記憶するバッファメモリなどのメモリ(VRAM)である。   Reference numeral 5 denotes an image sensor (solid-state image sensor) that includes a CMOS sensor, a CCD sensor, or the like, and photoelectrically converts a subject image (optical image) formed via an imaging optical system and outputs an electrical signal (image data). . Reference numeral 6 denotes an imaging circuit that generates a predetermined image signal by receiving the electrical signal photoelectrically converted by the imaging sensor 5 and performing various image processing. Reference numeral 7 denotes an A / D conversion circuit that converts an analog image signal generated by the imaging circuit 6 into a digital image signal. Reference numeral 8 denotes a memory (VRAM) such as a buffer memory that receives the output of the A / D conversion circuit 7 and temporarily stores an image signal.

9は、VRAM8に記憶された画像信号を読み出してアナログ信号に変換するとともに、再生出力に適する形態の画像信号に変換するD/A変換回路である。10は、D/A変換回路9から出力された画像信号を表示する液晶表示装置などの画像表示装置(LCD)である。12は、画像データを記憶する記憶用メモリ(半導体メモリ)である。11は、圧縮回路および伸長回路を含む圧縮/伸長回路である。圧縮/伸長回路11は、VRAM8に一時記憶された画像信号を読み出して記憶用メモリ12に対する記憶に適した形態にするために画像データの圧縮処理や符号化処理を行う。また圧縮/伸長回路11は、記憶用メモリ12に記憶された画像データを再生表示などに適した形態とするための復号化処理や伸長処理を行う。   Reference numeral 9 denotes a D / A conversion circuit that reads an image signal stored in the VRAM 8 and converts it into an analog signal, and converts it into an image signal in a form suitable for reproduction output. Reference numeral 10 denotes an image display device (LCD) such as a liquid crystal display device that displays an image signal output from the D / A conversion circuit 9. A storage memory (semiconductor memory) 12 stores image data. Reference numeral 11 denotes a compression / decompression circuit including a compression circuit and an expansion circuit. The compression / decompression circuit 11 reads the image signal temporarily stored in the VRAM 8 and performs a compression process and an encoding process on the image data in order to make it suitable for storage in the storage memory 12. The compression / decompression circuit 11 performs a decoding process and an expansion process for making the image data stored in the storage memory 12 into a form suitable for reproduction and display.

13は、A/D変換回路7からの出力を受けて自動露出(AE)処理のために評価値の算出を行うAE処理回路である。14は、A/D変換回路7からの出力を受けてAF評価値を生成する自動焦点調節(AF)処理のために評価値の算出を行うスキャンAF処理回路(評価値生成手段)である。15は、撮像装置1の制御を行う演算用のメモリを内蔵したCPU(制御装置)である。   Reference numeral 13 denotes an AE processing circuit that receives an output from the A / D conversion circuit 7 and calculates an evaluation value for automatic exposure (AE) processing. Reference numeral 14 denotes a scan AF processing circuit (evaluation value generation means) that calculates an evaluation value for an automatic focus adjustment (AF) process that receives an output from the A / D conversion circuit 7 and generates an AF evaluation value. Reference numeral 15 denotes a CPU (control device) having a built-in memory for controlling the imaging device 1.

CPU15は、画像生成手段15a、変化量算出手段15b、および、判定手段15cを有する。画像生成手段15aは、第1の周波数成分を含む第1の画像、および、前記第1の周波数成分よりも低い第2の周波数成分を含む第2の画像を生成する。画像生成手段15aは、特定の周波数帯域の信号を抽出するフィルタを用いて第1の画像および第2の画像を生成する。そしてスキャンAF処理回路14(評価値生成手段)は、第1の画像から第1の評価値を生成し、第2の画像から第2の評価値を生成する。変化量算出手段15bは、第1の評価値から第2の評価値への評価値の変化量を算出する。判定手段15cは、変化量に基づいて画像の合焦度合いを判定する。本実施例において、CPU15およびスキャンAF処理回路14により制御装置が構成される。   The CPU 15 includes an image generation unit 15a, a change amount calculation unit 15b, and a determination unit 15c. The image generation unit 15a generates a first image including a first frequency component and a second image including a second frequency component lower than the first frequency component. The image generation unit 15a generates a first image and a second image using a filter that extracts a signal in a specific frequency band. Then, the scan AF processing circuit 14 (evaluation value generation means) generates a first evaluation value from the first image and generates a second evaluation value from the second image. The change amount calculation means 15b calculates the change amount of the evaluation value from the first evaluation value to the second evaluation value. The determination unit 15c determines the degree of focus of the image based on the change amount. In this embodiment, the CPU 15 and the scan AF processing circuit 14 constitute a control device.

16は、所定のタイミング信号を発生するタイミングジェネレータ(TG)である。17は、撮像センサ5を駆動するドライバ(駆動部)である。21は、絞り4を駆動する絞り駆動モータである。18は、絞り駆動モータ21を駆動制御する第一モータ駆動回路である。22は、フォーカスレンズ群3を駆動するフォーカス駆動モータである。19は、フォーカス駆動モータ22を駆動制御する第二モータ駆動回路である。23は、ズームスレンズ群2を駆動するズーム駆動モータである。20は、ズーム駆動モータ23を駆動制御する第三モータ駆動回路である。   Reference numeral 16 denotes a timing generator (TG) that generates a predetermined timing signal. Reference numeral 17 denotes a driver (drive unit) that drives the image sensor 5. Reference numeral 21 denotes an aperture drive motor that drives the aperture 4. Reference numeral 18 denotes a first motor drive circuit that drives and controls the aperture drive motor 21. A focus drive motor 22 drives the focus lens group 3. Reference numeral 19 denotes a second motor drive circuit that drives and controls the focus drive motor 22. A zoom drive motor 23 drives the zoom lens group 2. Reference numeral 20 denotes a third motor drive circuit that drives and controls the zoom drive motor 23.

24は、各種のスイッチ群からなる操作スイッチ(操作SW)である。25は、各種制御などを行うプログラムや各種動作を行わせるために使用するデータなどを予め記憶した、電気的に書き換え可能な読み出し専用メモリであるEEPROMである。26は電池である。28は、ストロボ発光部である。27は、ストロボ発光部28の閃光発光を制御するスイッチング回路である。29は、警告表示などを行う表示素子(LED)である。   An operation switch (operation SW) 24 includes various switch groups. Reference numeral 25 denotes an EEPROM which is an electrically rewritable read-only memory in which programs for performing various controls and data used for performing various operations are stored in advance. 26 is a battery. Reference numeral 28 denotes a strobe light emitting unit. Reference numeral 27 denotes a switching circuit that controls the flash emission of the strobe light emitting unit 28. Reference numeral 29 denotes a display element (LED) that performs warning display or the like.

30は、位相差AF処理回路である。33はAF補助光部であり、AF評価値を取得する際に被写体の全部または一部を照明する照明手段(LEDなどの光源)を備えて構成される。32は、AF補助光部33を駆動するためのAF補助光部駆動回路である。35は、手振れなどを検出する振れ検出センサである。34は、振れ検出センサ35の信号を処理する振れ検出回路である。36は、A/D変換回路7からの出力を受けて画面上での顔位置や顔の大きさなどを検出する顔検出回路である。37は、取得時刻の異なる複数の画像信号から画像信号上での被写体の動き量を求める動きベクトル検出回路である。   Reference numeral 30 denotes a phase difference AF processing circuit. Reference numeral 33 denotes an AF auxiliary light unit, which includes an illuminating unit (light source such as an LED) that illuminates all or a part of the subject when an AF evaluation value is acquired. Reference numeral 32 denotes an AF auxiliary light unit driving circuit for driving the AF auxiliary light unit 33. Reference numeral 35 denotes a shake detection sensor that detects camera shake and the like. A shake detection circuit 34 processes a signal from the shake detection sensor 35. Reference numeral 36 denotes a face detection circuit that receives an output from the A / D conversion circuit 7 and detects a face position, a face size, and the like on the screen. Reference numeral 37 denotes a motion vector detection circuit for obtaining the amount of motion of the subject on the image signal from a plurality of image signals having different acquisition times.

なお、画像データなどの記憶媒体である記憶用メモリ12として、フラッシュメモリなどの固定型の半導体メモリや、カード形状やスティック形状の撮像装置1に対して着脱可能なフラッシュメモリなどの半導体メモリが適用可能である。それ以外にも、記憶用メモリ12として、ハードディスクやフロッピィーディスクなどの磁気記憶媒体など、様々な形態のメモリが適用可能である。   As the storage memory 12 that is a storage medium for image data and the like, a fixed semiconductor memory such as a flash memory or a semiconductor memory such as a flash memory that can be attached to and detached from the card-shaped or stick-shaped imaging device 1 is applied. Is possible. In addition, various types of memory such as a magnetic storage medium such as a hard disk or a floppy disk can be used as the storage memory 12.

操作スイッチ24は、撮像装置1を起動させ電源供給を行うための主電源スイッチや撮影動作(記憶動作)を開始させるレリーズスイッチ、再生動作を開始させる再生スイッチ、撮像光学系のズームレンズ群2を移動させズームを行わせるズームスイッチなどを含む。レリーズスイッチは、撮影動作に先立ち行われるAE処理、AF処理を開始させる指示信号を発生する第一ストローク(SW1)と実際の露光動作を開始させる指示信号を発生する第ニストローク(SW2)との二段スイッチにより構成される。   The operation switch 24 includes a main power switch for activating the imaging apparatus 1 to supply power, a release switch for starting a photographing operation (storage operation), a reproduction switch for starting a reproduction operation, and a zoom lens group 2 of the imaging optical system. It includes a zoom switch that moves and zooms. The release switch includes a first stroke (SW1) for generating an instruction signal for starting an AE process and an AF process performed prior to a shooting operation, and a second stroke (SW2) for generating an instruction signal for starting an actual exposure operation. Consists of a two-stage switch.

続いて、このように構成された撮像装置1の動作について説明する。まず、撮像装置1のレンズ鏡筒31を通過した被写体光束は、絞り4によってその光量が調整された後、撮像センサ5の受光面に結像される。この被写体像は、撮像センサ5による光電変換処理により電気的な信号に変換され撮像回路6に出力される。撮像回路6は、入力信号に対して各種の信号処理を施し、所定の画像信号を生成する。この画像信号は、A/D変換回路7に出力されてデジタル信号(画像データ)に変換された後、VRAM8に一時的に格納される。VRAM8に格納された画像データは、D/A変換回路9へ出力されてアナログ信号に変換され、表示するのに適した形態の画像信号に変換された後、画像としてLCD10に表示される。VRAM8に格納された画像データは、圧縮/伸長回路11にも出力される。圧縮/伸長回路11における圧縮回路は、画像データに対して圧縮処理を行って記憶に適した形態の画像データに変換し、変換後の画像データを記憶用メモリ12に記憶させる。   Subsequently, the operation of the imaging apparatus 1 configured as described above will be described. First, the light flux of the subject that has passed through the lens barrel 31 of the image pickup apparatus 1 is imaged on the light receiving surface of the image sensor 5 after the amount of light is adjusted by the diaphragm 4. This subject image is converted into an electrical signal by photoelectric conversion processing by the image sensor 5 and is output to the imaging circuit 6. The imaging circuit 6 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 7 and converted into a digital signal (image data), and then temporarily stored in the VRAM 8. The image data stored in the VRAM 8 is output to the D / A conversion circuit 9, converted into an analog signal, converted into an image signal in a form suitable for display, and then displayed on the LCD 10 as an image. The image data stored in the VRAM 8 is also output to the compression / decompression circuit 11. The compression circuit in the compression / decompression circuit 11 performs compression processing on the image data to convert it into image data in a form suitable for storage, and stores the converted image data in the storage memory 12.

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

一方、A/D変換回路7によりデジタル化された画像データは、前述のVRAM8とは別に、AE処理回路13、スキャンAF処理回路14、顔検出回路36、および、動きベクトル検出回路37に対しても出力される。AE処理回路13は、入力されたデジタル画像信号を受けて、一画面分の画像データの輝度値に対して累積加算などの演算処理を行う。これにより、被写体の明るさに応じたAE評価値が算出される。このAE評価値は、CPU15に出力される。   On the other hand, the image data digitized by the A / D conversion circuit 7 is sent to the AE processing circuit 13, the scan AF processing circuit 14, the face detection circuit 36, and the motion vector detection circuit 37 separately from the VRAM 8 described above. Is also output. The AE processing circuit 13 receives the input digital image signal and performs arithmetic processing such as cumulative addition on the luminance value of the image data for one screen. Thereby, the AE evaluation value corresponding to the brightness of the subject is calculated. This AE evaluation value is output to the CPU 15.

スキャンAF処理回路14は、入力されたデジタル画像信号を受けて、画像データの所定の周波数成分をバンドパスフィルタ(BPF)を介して抽出し、更に累積加算などの演算処理を行い、所定帯域の成分量などに対応するAF評価値信号を算出する。具体的には、AF領域として指定された画面の一部領域に相当する画像データの所定の周波数成分を複数(例えば4つ)のバンドパスフィルタ(BPF)、すなわち周波数特性の異なる複数のフィルタを介して抽出し、累積加算などの演算処理を行う。これにより、所定帯域の成分量などに対応するAF評価値信号(焦点状態を評価するための周波数帯域の異なる複数の評価値)が算出される。   The scan AF processing circuit 14 receives the input digital image signal, extracts a predetermined frequency component of the image data through a band-pass filter (BPF), and performs arithmetic processing such as cumulative addition to obtain a predetermined band. An AF evaluation value signal corresponding to the component amount is calculated. Specifically, a plurality of (for example, four) band-pass filters (BPF), that is, a plurality of filters having different frequency characteristics are used as predetermined frequency components of image data corresponding to a partial area of the screen designated as the AF area. And performing arithmetic processing such as cumulative addition. Thereby, an AF evaluation value signal (a plurality of evaluation values having different frequency bands for evaluating the focus state) corresponding to the component amount of the predetermined band is calculated.

またスキャンAF処理回路14は、複数のAF評価値信号の比を算出し、複数のAF評価値比信号(比信号)を生成する。例えば4つのバンドパスフィルタを介して4つのAF評価値信号が算出される場合について説明する。すなわち、最も低域の周波数特性を有するバンドパスフィルタを介して算出された第1のAF評価値信号で、他の3つのバンドパスフィルタを介して算出された3つのAF評価値信号(第2のAF評価値信号、第3のAF評価値信号、第4のAF評価値信号)を割る。これにより、3つのAF評価値比信号(第2のAF評価値信号/第1のAF評価値信号、第3のAF評価値信号/第1のAF評価値信号、第4のAF評価値信号/第1のAF評価値信号)が生成される。   The scan AF processing circuit 14 calculates a ratio of a plurality of AF evaluation value signals, and generates a plurality of AF evaluation value ratio signals (ratio signals). For example, a case where four AF evaluation value signals are calculated via four band pass filters will be described. That is, the first AF evaluation value signal calculated through the band-pass filter having the lowest frequency characteristic and the three AF evaluation value signals (second output) calculated through the other three band-pass filters. AF evaluation value signal, third AF evaluation value signal, and fourth AF evaluation value signal). As a result, three AF evaluation value ratio signals (second AF evaluation value signal / first AF evaluation value signal, third AF evaluation value signal / first AF evaluation value signal, and fourth AF evaluation value signal) / First AF evaluation value signal) is generated.

AF評価値及びAF評価値比信号(評価値の比)を算出する領域は、中央部分または画面上の任意の部分の一箇所である場合や、中央部分または画面上の任意の部分とそれに隣接する複数箇所である場合、離散的に分布する複数箇所である場合などである。   The area for calculating the AF evaluation value and the AF evaluation value ratio signal (evaluation value ratio) is a central part or one part of any part on the screen, or is adjacent to the central part or any part on the screen. For example, there are a plurality of locations that are distributed, and a plurality of locations that are discretely distributed.

また、バンドパスフィルタ(BPF)を介さずに得た信号の最大値と最小値との差分値で、バンドパスフィルタを介して算出された4つのAF評価値信号を割ってもよい。すなわち、4つのAF評価値比信号(第1のAF評価値信号/最大値と最小値との差分値、第2のAF評価値信号/最大値と最小値との差分値、第3のAF評価値信号/最大値と最小値との差分値)を生成することも可能である。このようにスキャンAF処理回路14は、AF処理を行う過程において、撮像センサ5によって生成された画像信号から所定の周波数成分を検出する所定周波数成分検出手段、および、検出された所定周波数成分の比を取る比信号算出手段の役割を担っている。なお本実施例において、4つのバンドパスフィルタを介して4つのAF評価値信号が算出している場合について説明しているが、これに限定されるものではない。本実施例は、少なくとも2つのAF評価値比信号が算出される場合にも適用可能である。つまり、3種類以上のバンドパスフィルタを介して、AF評価値信号を3つ以上算出すればよい。   Further, the four AF evaluation value signals calculated through the band pass filter may be divided by the difference value between the maximum value and the minimum value of the signal obtained without going through the band pass filter (BPF). That is, four AF evaluation value ratio signals (first AF evaluation value signal / difference value between maximum value and minimum value, second AF evaluation value signal / difference value between maximum value and minimum value, third AF) It is also possible to generate an evaluation value signal / a difference value between the maximum value and the minimum value). In this way, the scan AF processing circuit 14 detects the predetermined frequency component from the image signal generated by the imaging sensor 5 in the course of performing the AF process, and the ratio of the detected predetermined frequency component. It plays the role of the ratio signal calculation means. In the present embodiment, the case where four AF evaluation value signals are calculated via four band pass filters has been described, but the present invention is not limited to this. This embodiment can also be applied when at least two AF evaluation value ratio signals are calculated. That is, three or more AF evaluation value signals may be calculated via three or more types of bandpass filters.

顔検出回路36は、入力されたデジタル画像信号を受けて、目や眉などの顔を特徴付ける部分を画像上で探索し、人物の顔の画像上での位置を求める。また顔検出回路36は、顔の大きさや傾きなどを、顔を特徴付ける部分の間隔などの位置関係から求める。   The face detection circuit 36 receives the input digital image signal, searches the image for a part characterizing the face such as eyes and eyebrows, and obtains the position of the person's face on the image. Further, the face detection circuit 36 obtains the size and inclination of the face from the positional relationship such as the interval between the parts characterizing the face.

動きベクトル検出回路37は、動きベクトルを算出する領域の過去の画像信号が記録されている場合、その画像信号と今回取得された画像信号との相関演算を行い、動きベクトルを求めるとともに、過去の画像信号を今回取得された画像信号に置換する。なお過去の画像信号が記録されていない場合、動きベクトル検出回路37は、今回取得された画像信号を所定の領域に記録する。   When a past image signal of a region for calculating a motion vector is recorded, the motion vector detection circuit 37 calculates a correlation between the image signal and the image signal acquired this time and obtains a motion vector. The image signal is replaced with the image signal acquired this time. If no past image signal is recorded, the motion vector detection circuit 37 records the image signal acquired this time in a predetermined area.

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

CPU15は、第一モータ駆動回路18、第二モータ駆動回路19、および、第三モータ駆動回路20を制御する。これによりCPU15は、絞り駆動モータ21、フォーカス駆動モータ22、および、ズーム駆動モータ23を介して、絞り4、フォーカスレンズ群3、および、ズームスレンズ群2をそれぞれ駆動制御する。すなわちCPU15は、AE処理回路13にて算出されたAE評価値などに基づいて、第一モータ駆動回路18を制御して絞り駆動モータ21を駆動し、絞り4の絞り量を適正になるように調整するAE制御を行う。またCPU15は、スキャンAF処理回路14にて算出されるAF評価値信号またはAF評価値比信号に基づいて、第二モータ駆動回路19を制御してフォーカス駆動モータ22を駆動し、フォーカスレンズ群3を合焦位置に移動させるAF制御を行う。操作スイッチ24のうち不図示のズームスイッチが操作された場合、これを受けてCPU15は、第三モータ駆動回路20を制御してズーム駆動モータ23を駆動制御することによりズームレンズ群2を移動させ、撮像光学系の変倍動作(ズーム動作)を行う。   The CPU 15 controls the first motor drive circuit 18, the second motor drive circuit 19, and the third motor drive circuit 20. As a result, the CPU 15 drives and controls the diaphragm 4, the focus lens group 3, and the zoom lens group 2 via the diaphragm drive motor 21, the focus drive motor 22, and the zoom drive motor 23. That is, the CPU 15 controls the first motor drive circuit 18 based on the AE evaluation value calculated by the AE processing circuit 13 to drive the aperture drive motor 21 so that the aperture amount of the aperture 4 becomes appropriate. AE control to be adjusted is performed. Further, the CPU 15 controls the second motor drive circuit 19 based on the AF evaluation value signal or the AF evaluation value ratio signal calculated by the scan AF processing circuit 14 to drive the focus drive motor 22, and the focus lens group 3. AF control is performed to move to the in-focus position. When a zoom switch (not shown) among the operation switches 24 is operated, the CPU 15 moves the zoom lens group 2 by controlling the third motor drive circuit 20 and driving the zoom drive motor 23 in response to the operation. Then, a zooming operation of the imaging optical system is performed.

次に、図2を参照して、撮像装置1の撮影動作について説明する。図2は、撮像装置1の撮影動作を示すフローチャートである。図2の各ステップは、CPU15の指令に基づいて、撮像装置1の各部により実行される。   Next, the shooting operation of the imaging apparatus 1 will be described with reference to FIG. FIG. 2 is a flowchart showing the shooting operation of the imaging apparatus 1. Each step in FIG. 2 is executed by each unit of the imaging apparatus 1 based on a command from the CPU 15.

本実施例において、フォーカスレンズ群3を所定位置に駆動しながらAF評価値を取得する動作をスキャン、AF評価値を取得するフォーカスレンズ群3の位置の間隔をスキャン間隔、AF評価値を取得する数をスキャンポイント数という。また本実施例において、AF評価値を取得する範囲をスキャン範囲、合焦位置を検出するための画像信号を取得する領域をAF枠(AF領域)という。なおスキャン範囲は、スキャン間隔と(スキャンポイント数−1)との積により決定される。撮像装置1の主電源スイッチがオン状態であり、かつ撮像装置1の動作モードが撮影(録画)モードである場合、撮影処理シーケンスが実行され、撮像センサ5などに電源を供給することにより撮像(撮影動作)が可能となる。   In this embodiment, the operation of acquiring the AF evaluation value is scanned while driving the focus lens group 3 to a predetermined position, the interval of the position of the focus lens group 3 for acquiring the AF evaluation value is the scan interval, and the AF evaluation value is acquired. The number is called the number of scan points. In this embodiment, the range for acquiring the AF evaluation value is called a scan range, and the region for acquiring an image signal for detecting the in-focus position is called an AF frame (AF region). The scan range is determined by the product of the scan interval and (the number of scan points−1). When the main power switch of the imaging apparatus 1 is in the ON state and the operation mode of the imaging apparatus 1 is the imaging (recording) mode, the imaging process sequence is executed, and imaging is performed by supplying power to the imaging sensor 5 and the like ( Shooting operation).

まずステップS201において、CPU15は、レンズ鏡筒31を通過して撮像センサ5上に結像した像をLCD10に画像として表示する。すなわち撮像センサ5上に結像した被写体像は、撮像センサ5の光電変換処理により電気信号に変換された後、撮像回路6に出力される。撮像回路6は、入力信号に対して各種の信号処理を施し、所定の画像信号を生成する。所定の画像信号は、A/D変換回路7に出力されデジタル信号(画像データ)に変換されてVRAM8に一時的に格納される。VRAM8に格納された画像データは、D/A変換回路9へ出力されてアナログ信号に変換され、表示に適した形態の画像信号に変換された後、LCD10に画像として表示される。   First, in step S <b> 201, the CPU 15 displays an image formed on the image sensor 5 through the lens barrel 31 as an image on the LCD 10. In other words, the subject image formed on the image sensor 5 is converted into an electric signal by the photoelectric conversion process of the image sensor 5 and then output to the image pickup circuit 6. The imaging circuit 6 performs various signal processing on the input signal to generate a predetermined image signal. The predetermined image signal is output to the A / D conversion circuit 7, converted into a digital signal (image data), and temporarily stored in the VRAM 8. The image data stored in the VRAM 8 is output to the D / A conversion circuit 9, converted into an analog signal, converted into an image signal in a form suitable for display, and then displayed on the LCD 10 as an image.

続いてステップS202において、CPU15は、レリーズスイッチの状態を確認(SW1がオン状態か否かを判定)する。撮影者によりレリーズスイッチが操作され、SW1(レリーズスイッチの第一ストローク)がオン状態になったことをCPU15が確認すると、ステップS203に進み、初期化処理を行った後、AE処理回路13の出力を用いて通常のAE処理を実行する。   Subsequently, in step S202, the CPU 15 confirms the state of the release switch (determines whether SW1 is in the on state). When the photographer operates the release switch and the CPU 15 confirms that SW1 (first stroke of the release switch) is turned on, the process proceeds to step S203, and after initialization processing, the output of the AE processing circuit 13 is performed. A normal AE process is executed using.

続いてステップS204においてスキャンAF処理を行う。まず、スキャンAF処理回路14を用いて、取得画像にバンドパスフィルタを用いて解像度を意図的に低下させた(ぼかした)画像を作成する。そして元の画像と解像度を低下させた画像とに基づいて、周波数成分が互いに異なる複数のAF評価値(AF評価値信号)を求める。またCPU15(判定手段15c)は、複数のAF評価値信号に基づいてボケ量を判定する。次いでスキャンAF処理回路14は、設定されたAF枠、ボケ量の判定結果に基づいて設定されるスキャン範囲において、AF枠から取得した画像信号に基づいて複数のAF評価値と複数のAF評価値の比とを求める。そしてCPU15は、その結果に基づいて合焦位置を検出する。CPU15が合焦位置にフォーカスレンズ群3を停止させると、スキャンAF処理回路14は、その位置において複数のAF評価値とAF評価値の比とを求め、CPU15の所定の記録領域に記録する。なお、ステップS204の処理の詳細については後述する。   Subsequently, a scan AF process is performed in step S204. First, the scan AF processing circuit 14 is used to create an image obtained by intentionally reducing (blurred) the resolution using a bandpass filter on the acquired image. Then, a plurality of AF evaluation values (AF evaluation value signals) having different frequency components are obtained based on the original image and the image whose resolution is reduced. The CPU 15 (determination unit 15c) determines the amount of blur based on a plurality of AF evaluation value signals. Next, the scan AF processing circuit 14 has a plurality of AF evaluation values and a plurality of AF evaluation values based on the image signal acquired from the AF frame in the scan range set based on the set AF frame and the blur amount determination result. Find the ratio of. Then, the CPU 15 detects the in-focus position based on the result. When the CPU 15 stops the focus lens group 3 at the in-focus position, the scan AF processing circuit 14 obtains a plurality of AF evaluation values and a ratio of the AF evaluation values at that position, and records them in a predetermined recording area of the CPU 15. Details of the process in step S204 will be described later.

ステップS204にて合焦位置が得られると、ステップS205に進み、CPU15はAF表示(AFOK表示)を行う。具体的には、CPU15は、表示素子29を点灯することなどによりAFOF表示を行うと同時に、LCD10上に緑の枠を表示するなどの処理を行う。またステップS204にて合焦位置が得られない場合、ステップS205に進み、AFNG表示を行う。具体的には、CPU15は、表示素子29を点滅表示することなどによりAFNG表示を行うと同時に、LCD10上に黄色の枠を表示するなどの処理を行う。
なお、ステップS204のスキャンAF処理にて非合焦の場合であってSW1のオン状態が続いている場合、ステップS206へ進む。一方、非合焦の場合であってSW1がオフされた場合、ステップS201へ戻り、SW1がオンされたことを契機に再度AFを行う。
When the in-focus position is obtained in step S204, the process proceeds to step S205, and the CPU 15 performs AF display (AFOK display). Specifically, the CPU 15 performs processing such as displaying an AFOF display by turning on the display element 29 and simultaneously displaying a green frame on the LCD 10. If the in-focus position cannot be obtained in step S204, the process proceeds to step S205 and AFNG display is performed. Specifically, the CPU 15 performs processing such as displaying a yellow frame on the LCD 10 at the same time as performing AFNG display by blinking the display element 29 or the like.
Note that if the in-focus state is not in focus in the scan AF process in step S204 and the ON state of SW1 continues, the process proceeds to step S206. On the other hand, if SW1 is turned off in the case of out-of-focus, the process returns to step S201, and AF is performed again when SW1 is turned on.

ステップS206において、CPU15は、合焦状態が維持されているか否かを判定する。そしてステップS207において、被写体の距離方向への移動がなくかつフォーカスレンズ群3の意図しない移動等がなく、合焦状態が維持されている場合、ステップS208へ進み、SW2がオンになるのを待つ。一方、被写体の距離方向への移動等により合焦状態が維持されていない場合、その程度に応じて、ステップS201(再度AF)またはステップS210(微調整)へ進む。   In step S206, the CPU 15 determines whether or not the in-focus state is maintained. In step S207, if there is no movement of the subject in the distance direction and there is no unintentional movement of the focus lens group 3 and the in-focus state is maintained, the process proceeds to step S208 and waits for SW2 to be turned on. . On the other hand, if the in-focus state is not maintained due to movement of the subject in the distance direction, etc., the process proceeds to step S201 (AF again) or step S210 (fine adjustment) depending on the degree.

ステップS208において、CPU15は、レリーズスイッチの状態を確認(SW2がオン状態か否かを判定)する。SW2(レリーズスイッチの第ニストローク)がオン状態になったことをCPU15が確認すると、ステップS209に進み、CPU15は露光処理を実行する。   In step S208, the CPU 15 confirms the state of the release switch (determines whether SW2 is on). When the CPU 15 confirms that SW2 (second stroke of the release switch) is turned on, the process proceeds to step S209, and the CPU 15 executes an exposure process.

ステップS210において、スキャンAF処理回路14は、現在のフォーカスレンズ群3の近傍(例えば近傍の5つのスキャンポイント)で通常のスキャンと同じスキャン間隔でスキャンを行い、AF評価値を取得する(ピント微調整スキャン)。そしてステップS211において、CPU15は、ステップS210にてスキャンAF評価値のピークを検出したか否かを判定する。ピークが検出された場合、CPU15はピークに対応する位置にフォーカスレンズ群3を移動し、ステップS207へ戻る。一方、ピークを検出することができない場合、ステップS201へ戻り、CPU15は、SW1がオンされたことを契機に再度AFを行う。   In step S210, the scan AF processing circuit 14 scans in the vicinity of the current focus lens group 3 (for example, the five scan points in the vicinity) at the same scan interval as the normal scan, and acquires the AF evaluation value (focus fine Adjustment scan). In step S211, the CPU 15 determines whether or not the peak of the scan AF evaluation value is detected in step S210. When the peak is detected, the CPU 15 moves the focus lens group 3 to a position corresponding to the peak, and returns to step S207. On the other hand, if the peak cannot be detected, the process returns to step S201, and the CPU 15 performs AF again when the SW1 is turned on.

次に、図2のステップS206にて行われるボケ量判定(合焦維持判定)に関して説明する。まず、AF枠の設定方法について説明する。撮影者の指示がある場合はそれに従う。例えば、AF枠の大きさは画面の水平18%×垂直18%の大きさと水平10%×垂直10%を選択可能とし、その位置はAF枠の端部が画面からはみ出さない範囲で設定可能とする。   Next, the blur amount determination (focus maintenance determination) performed in step S206 of FIG. 2 will be described. First, an AF frame setting method will be described. Follow any instructions from the photographer. For example, the size of the AF frame can be selected from 18% horizontal by 18% vertical and 10% horizontal by 10% vertical, and the position can be set so that the end of the AF frame does not protrude from the screen. And

AF枠を自動で撮像装置1が設定する場合、主被写体が人物であれば顔検出回路36の出力を用いてAF枠の設定を行う。CPU15は、顔検出回路36から検出された顔の大きさ(例えば、水平垂直方向の画素数)と位置(例えば、中心座標)を受け取りその領域を含む様にAF枠を設定する。一方、主被写体が人物以外の場合(顔検出回路で顔が検出されなかった場合)、CPU15は、画像の色情報や輝度情報から特徴点を抽出して主被写体を検出し、その情報を用いてAF枠の設定を行う。CPU15は、色情報や輝度情報から色が同一と見なせる領域と輝度が同一と見なせる領域を抽出した場合、両者の重なる領域を検出し被写体領域候補する。その中で大きさが一定以上でかつ中心からの乖離が一定以下のものを主被写体とする。被写体が複数存在する場合、大きさが最大の被写体を選択する。上記の処理において顔も主被写体も検出されない場合、中央の一箇所の所定の大きさ(例えば、画面の水平18%×垂直18%)のAF枠を設定する。   When the imaging apparatus 1 automatically sets the AF frame, if the main subject is a person, the AF frame is set using the output of the face detection circuit 36. The CPU 15 receives the size (for example, the number of pixels in the horizontal and vertical directions) and the position (for example, center coordinates) detected from the face detection circuit 36, and sets the AF frame so as to include the area. On the other hand, when the main subject is other than a person (when no face is detected by the face detection circuit), the CPU 15 detects the main subject by extracting feature points from the color information and luminance information of the image, and uses the information. To set the AF frame. When the CPU 15 extracts a region that can be regarded as having the same color and a region that can be regarded as having the same luminance from the color information and the luminance information, the CPU 15 detects a region where both overlap and detects a subject region candidate. Among them, a subject whose size is equal to or larger than a certain level and whose deviation from the center is equal to or smaller than a certain level is set as a main subject. When there are a plurality of subjects, the subject with the largest size is selected. If neither the face nor the main subject is detected in the above processing, an AF frame having a predetermined size (for example, horizontal 18% × vertical 18% of the screen) is set at one central position.

次に、図3を参照して、ボケ量判定に関して説明する。図3は、ボケ量判定の動作を示すフローチャートである。図3の各ステップは、CPU15またはスキャンAF処理回路14により実行される。   Next, the blur amount determination will be described with reference to FIG. FIG. 3 is a flowchart showing an operation for determining the amount of blur. Each step in FIG. 3 is executed by the CPU 15 or the scan AF processing circuit 14.

まずステップS301において、CPU15(スキャンAF処理回路14)は、画像を取得し、AF評価値を求める。CPU15は、スキャンAF処理回路14を制御して、入力されたAF枠内のデジタル画像信号を受けて、複数(例えば4つ)の異なる周波数特性のバンドパスフィルタ(BPF)を介して、複数のAF評価値信号TesBef[n]を算出する。そして算出された評価値TesBef[n]を所定の領域に記録する。   First, in step S301, the CPU 15 (scan AF processing circuit 14) acquires an image and obtains an AF evaluation value. The CPU 15 controls the scan AF processing circuit 14 to receive the input digital image signal within the AF frame, and a plurality of (for example, four) bandpass filters (BPFs) having different frequency characteristics. An AF evaluation value signal TesBef [n] is calculated. Then, the calculated evaluation value TesBef [n] is recorded in a predetermined area.

続いてステップS302において、CPU15は、画像の解像度を低下させるぼかし処理を行う。すなわち、入力されたAF枠内のデジタル画像信号をスキャンAF処理回路14に入力し、スキャンAF処理回路14内の低周波帯域の周波数を抽出するバンドパスフィルタ(BPF)を介することで、入力されたデジタル画像信号の解像度を低下させる。続いてステップS303において、CPU15は、ステップS301と同様にしてぼかし処理を行った画像から複数のAF評価値信号TesAft[n]を算出し、所定の領域に記録する。続いてステップS304において、CPU15は、ぼかし処理前後の評価値の変化量に基づいてボケ量判定指数を算出し、ボケ量(合焦度合い)を判定する。   Subsequently, in step S302, the CPU 15 performs a blurring process for reducing the resolution of the image. In other words, the input digital image signal within the AF frame is input to the scan AF processing circuit 14, and is input via a band pass filter (BPF) that extracts the low frequency band frequency in the scan AF processing circuit 14. Reduce the resolution of the digital image signal. Subsequently, in step S303, the CPU 15 calculates a plurality of AF evaluation value signals TesAft [n] from the image subjected to the blurring process in the same manner as in step S301, and records it in a predetermined area. Subsequently, in step S304, the CPU 15 calculates a blur amount determination index based on the change amount of the evaluation value before and after the blurring process, and determines the blur amount (focus degree).

まずCPU15は、複数のAF評価値それぞれの変化率を求める。ぼかし処理前後でそれぞれ4つのAF評価値、TesBef[0]、TesBef[1]、TesBef[2]、TesBef[3]、TesAft[0]、TesAft[1]、TesAft[2]、TesAft[3]が求まっている場合を考える。このとき、それぞれのBPFにおけるAF評価値の変化率TesVari[0]、TesVari[1]、TesVari[2]、TesVari[3]を、以下のように求める。   First, the CPU 15 obtains a change rate of each of the plurality of AF evaluation values. Four AF evaluation values before and after the blur processing, TesBef [0], TesBef [1], TesBef [2], TesBef [3], TesAft [0], TesAft [1], TesAft [2], TesAft [3] Suppose that is required. At this time, the change rates TesVari [0], TesVari [1], TesVari [2], and TesVari [3] of the AF evaluation value in each BPF are obtained as follows.

TesVari[0]=(TesAft[0]−TesBef[0])/(TesAft[0]+TesBef[0])
TesVari[1]=(TesAft[1]−TesBef[1])/(TesAft[1]+TesBef[1])
TesVari[2]=(TesAft[2]−TesBef[2])/(TesAft[2]+TesBef[2])
TesVari[3]=(TesAft[3]−TesBef[3])/(TesAft[3]+TesBef[3])
そしてCPU15は、変化率の絶対値の和(Σabs(TesVari[i]))を取り、それをほけ量判定指数とする。
TesVari [0] = (TesAft [0] −TesBef [0]) / (TesAft [0] + TesBef [0])
TesVari [1] = (TesAft [1] −TesBef [1]) / (TesAft [1] + TesBef [1])
TesVari [2] = (TesAft [2] −TesBef [2]) / (TesAft [2] + TesBef [2])
TesVari [3] = (TesAft [3] −TesBef [3]) / (TesAft [3] + TesBef [3])
Then, the CPU 15 takes the sum of the absolute values of the rate of change (Σabs (TesVari [i])) and uses it as a blur amount determination index.

続いてステップS305において、CPU15は、ぼけ量判定指数を評価する。ぼけ量判定指数が第1所定値以上(例えば0.17以上)である場合、ボケ量は無い(合焦している)と判定し、ステップS306へ進む。一方、ぼけ量判定指数が第1所定値と第2所定値との間の所定範囲内(例えば0.11以上0.17未満)である場合、ボケ量は小さいと判定し、ステップS307へ進む。また、ぼけ量判定指数が第2所定値未満(例えば0.11未満)である場合、ボケ量は大きいと判定し、ステップS308へ進む。   Subsequently, in step S305, the CPU 15 evaluates the blur amount determination index. If the blur amount determination index is greater than or equal to the first predetermined value (for example, greater than or equal to 0.17), it is determined that there is no blur amount (in-focus), and the process proceeds to step S306. On the other hand, if the blur amount determination index is within a predetermined range between the first predetermined value and the second predetermined value (for example, not less than 0.11 and less than 0.17), it is determined that the amount of blur is small, and the process proceeds to step S307. . If the blur amount determination index is less than the second predetermined value (for example, less than 0.11), it is determined that the blur amount is large, and the process proceeds to step S308.

ステップS306、S307、S308において、CPU15は、判定されたボケ量に基づいて、ステップS204で行われるスキャンAF処理のスキャン範囲を設定する。ステップS306ではボケ量は無いと判定されているため、ステップS204にて行われるスキャンAF処理は合焦を確認する程度で良い。このため、スキャン範囲を極狭い範囲に設定する。現在のフォーカスレンズ群3の位置を中心にその近傍をスキャンするようにする。例えば、近傍の5ポイント、スキャン間隔は通常のスキャン間隔の半分の2.5深度相当間隔とする。ステップSS307ではボケ量は小さいと判定されているため、ステップS204にて行われるスキャンAF処理でのスキャン範囲は、ボケ量の程度に応じて設定される。   In steps S306, S307, and S308, the CPU 15 sets a scan range of the scan AF process performed in step S204 based on the determined blur amount. Since it is determined in step S306 that there is no blur amount, the scan AF process performed in step S204 only needs to confirm in-focus. For this reason, the scan range is set to an extremely narrow range. The vicinity of the current focus lens group 3 is scanned around the current position. For example, 5 points in the vicinity, and the scan interval is set to an interval equivalent to 2.5 depth, which is half of the normal scan interval. Since it is determined in step SS307 that the blur amount is small, the scan range in the scan AF process performed in step S204 is set according to the degree of the blur amount.

本実施例では、ほけ量判定指数が所定範囲の上限(ぼけ量がほぼ無いと見なせる)場合、現在のフォーカスレンズ群3の位置を中心とした狭い範囲をスキャン範囲とする。一方、ほけ量判定指数が所定範囲の下限(ぼけ量がある程度大きいと見なせる)場合に、現在のフォーカスレンズ群3の位置を中心とした広い範囲をスキャン範囲とする。実際には、指数の値が上限の場合のスキャンポイント数をMinP、指数の値が下限の場合のスキャンポイント数をMaxPとして、以下の式で求めた値を切り上げてスキャンポイント数を求める。   In this embodiment, when the blur amount determination index is the upper limit of the predetermined range (it can be considered that there is almost no blur amount), a narrow range centering on the current position of the focus lens group 3 is set as the scan range. On the other hand, when the blur amount determination index is the lower limit of the predetermined range (the amount of blur can be considered to be large to some extent), a wide range centering on the current position of the focus lens group 3 is set as the scan range. Actually, the number of scan points when the value of the exponent is the upper limit is MinP, and the number of scan points when the value of the exponent is the lower limit is MaxP.

MaxP−(MaxP−MinP)・(指標の値―下限値)/(上限値−下限値)
スキャン範囲は、スキャン間隔と(スキャンポイント数−1)の積で求められる。なお、スキャン間隔は従来と同じ間隔とする。例えば、MaxPは15ポイント、MinPは5ポイント、上限値は0.17、下限値は0.11程度の値、スキャン間隔は5深度相当の間隔とすれば良い。このようにした求めたスキャン範囲の半分を現在のフォーカスレンズ群3に位置から無限遠側と至近側にずらした位置がスキャン範囲の両端となる。スキャン間隔は、通常のスキャン間隔と同じ(例えば5深度相当間隔)とする。スキャン範囲の端がフォーカスレンズ群3の無限遠相当位置に余裕代を加えた位置、至近端相当位置に余裕代を加えた位置を超える場合、それぞれの余裕代を加えた位置をスキャン範囲の端位置とする。
MaxP- (MaxP-MinP) · (index value-lower limit value) / (upper limit value-lower limit value)
The scan range is obtained by the product of the scan interval and (number of scan points-1). The scan interval is the same as the conventional interval. For example, MaxP is 15 points, MinP is 5 points, the upper limit value is 0.17, the lower limit value is about 0.11, and the scan interval may be an interval corresponding to 5 depths. The positions obtained by shifting half of the obtained scan range from the position of the current focus lens group 3 to the infinity side and the close side are the opposite ends of the scan range. The scan interval is the same as the normal scan interval (for example, an interval corresponding to 5 depths). If the end of the scan range exceeds the position corresponding to infinity of the focus lens group 3 with an allowance, and the position equivalent to the closest end plus the allowance, the position with the respective allowance is added to the scan range. End position.

ステップS308では、ボケ量判定を行いない場合と同じ範囲をスキャン範囲とする。例えば、フォーカスレンズ群3の無限遠相当位置に余裕代を加えた位置からスキャンを開始し、AF評価値の極大値を検出するか、至近端相当位置に余裕代を加えた位置に到達するまでスキャンを行うようにする。   In step S308, the same range as when the blur amount determination is not performed is set as the scan range. For example, scanning is started from a position where a margin is added to the position corresponding to infinity of the focus lens group 3, and the maximum value of the AF evaluation value is detected, or the position where the margin is added to the position corresponding to the closest end is reached. Scan until.

次に、図4を参照して、ステップS204にて行われる合焦位置を検出するためのスキャンAF処理を説明する。図4は、スキャンAF動作の説明図である。前述のように、ステップS204のボケ量判定の結果から設定されるスキャン範囲において、以下の処理が行われる。   Next, the scan AF process for detecting the in-focus position performed in step S204 will be described with reference to FIG. FIG. 4 is an explanatory diagram of the scan AF operation. As described above, the following processing is performed in the scan range set from the result of the blur amount determination in step S204.

CPU15は、スキャン間隔に応じてスキャン速度を変更する。またCPU15は、センサの読み出し時間内に次のスキャンポイントにフォーカスレンズ群3が移動するように制御する。センサの読み出しレートが100fpsである場合、10msec後に次のスキャンポイントにフォーカスレンズ群3が到達する速度で駆動する。よって、スキャン範囲が狭くなりそれに応じてスキャン間隔が狭くなった場合、スキャン速度が遅くなる。その結果、スキャンAF前にフォーカスレンズ群3の位置が、合焦位置に近く場合はスキャン間隔が狭くスキャン速度も遅くなるため、LCD10の表示画像の変化も小さくなり、表示品位が向上する。   The CPU 15 changes the scan speed according to the scan interval. The CPU 15 also controls the focus lens group 3 to move to the next scan point within the sensor readout time. When the sensor reading rate is 100 fps, the sensor is driven at a speed at which the focus lens group 3 reaches the next scan point after 10 msec. Therefore, when the scan range is narrowed and the scan interval is narrowed accordingly, the scan speed is slowed down. As a result, when the position of the focus lens group 3 is close to the in-focus position before the scan AF, the scan interval is narrow and the scan speed is slow, so that the change in the display image on the LCD 10 is also small, and the display quality is improved.

スキャンAF処理回路14は、入力されたAF枠内のデジタル画像信号を受けて、複数(例えば4つ)の異なる周波数特性のバンドパスフィルタ(BPF)を介して、複数のAF評価値信号を算出する。このうち最も高域の特性を持つバンドパスフィルタ(BPF)を介して算出させた第1のAF評価値信号は、図4中の破線(TES3)で示されるグラフとなる。図4の横軸はフォーカスレンズ群3の位置であり、左側が遠方の被写体、右側が近側の被写体に合焦するフォーカスレンズ群3の位置を表す。スキャンAFにおいては、フォーカスレンズ群3を、ステップS204のボケ量判定の結果から設定される図4中の位置Aから位置Bに向けて駆動し、デジタル画像信号を取得しAF評価値信号を算出する。その値は合焦位置で最大となるため、図4中の位置Cを合焦位置とすると、図4に示されるような結果が得られる。位置A、Bは、ステップS204のボケ量判定の結果に基づいて設定される。   The scan AF processing circuit 14 receives the input digital image signal within the AF frame, and calculates a plurality of AF evaluation value signals via a plurality of (for example, four) band pass filters (BPF) having different frequency characteristics. To do. Among these, the first AF evaluation value signal calculated through the bandpass filter (BPF) having the highest frequency characteristic is a graph indicated by a broken line (TES3) in FIG. The horizontal axis in FIG. 4 is the position of the focus lens group 3, and the left side represents the position of the focus lens group 3 that focuses on a far object and the right side focuses on a near object. In scan AF, the focus lens group 3 is driven from position A to position B in FIG. 4 set based on the result of blur amount determination in step S204, a digital image signal is acquired, and an AF evaluation value signal is calculated. To do. Since the value becomes the maximum at the in-focus position, when the position C in FIG. 4 is set as the in-focus position, the result shown in FIG. 4 is obtained. The positions A and B are set based on the result of the blur amount determination in step S204.

スキャンAFの高速化のために全てのフォーカスレンズ群3の停止位置については行わず、所定のスキャン間隔(例えば5深度相当の間隔)毎に出力を取得する。この場合、図4中の3点a1、a2、a3においてAF評価値信号を取得することがありうる。このような場合、取得されたAF評価値信号が最大値となった点とその前後の点のから合焦位置C(AF評価値信号が最大となる位置)を計算にて求める。   In order to increase the speed of scan AF, the stop positions of all the focus lens groups 3 are not performed, and an output is acquired at every predetermined scan interval (for example, an interval corresponding to 5 depths). In this case, an AF evaluation value signal may be acquired at three points a1, a2, and a3 in FIG. In such a case, the in-focus position C (the position where the AF evaluation value signal is maximized) is obtained by calculation from the point where the acquired AF evaluation value signal has the maximum value and the points before and after that point.

フォーカスレンズ群3の位置X1のときにAF評価値が最大値Y1(図4中のa2)を示し、その前後の位置X2、X3のときにAF評価値がY2、Y3(図4中のa1、a3)を示すとする。このとき、合焦位置Cのフォーカスレンズ群3の位置X0は、以下の式(1)のように求められる。   The AF evaluation value indicates the maximum value Y1 (a2 in FIG. 4) when the focus lens group 3 is at the position X1, and the AF evaluation values are Y2 and Y3 (a1 in FIG. 4) at the positions X2 and X3 before and after that. , A3). At this time, the position X0 of the focus lens group 3 at the in-focus position C is obtained as in the following formula (1).

但し、式(1)において、Y1>Y3、Y1≧Y2である。 However, in the formula (1), Y1> Y3 and Y1 ≧ Y2.

従来はこのようにして合焦位置を求めていた。しかし、合焦位置をフォーカスレンズ群3が通り過ぎた後に求めるため、LCD10に表示される画像が一旦ボケるなどの表示品位における弊害や、フォーカスレンズ群3を合焦位置へ戻すための時間が必要になるなどの問題があった。   Conventionally, the in-focus position is obtained in this way. However, since the in-focus position is obtained after the focus lens group 3 has passed, there is an adverse effect on display quality such as once the image displayed on the LCD 10 is blurred, and time is required to return the focus lens group 3 to the in-focus position. There were problems such as becoming.

そこで本実施例では、更に複数のAF評価値信号の比を取り複数のAF評価値比信号を生成し、その比信号を用いて合焦位置を求めることで問題を解決している。例えば、4つのバンドパスフィルタを介して4つのAF評価値信号が算出している場合を説明する。この場合、最も低域の周波数特性を持つバンドパスフィルタを介して算出された第1のAF評価値信号TES0で、他の3つのバンドパスフィルタを介して算出された3つのAF評価値信号(第2〜第4のAF評価値信号TES1、TES2、TES3)を割る。これにより、3つのAF評価値比信号(第1のAF評価値比信号TES1/TES0、第2のAF評価値比信号TES2/TES0、第3のAF評価値比信号TES3/TES0が生成される。   Therefore, in this embodiment, the problem is solved by calculating a ratio of a plurality of AF evaluation value signals to generate a plurality of AF evaluation value ratio signals and obtaining the in-focus position using the ratio signals. For example, a case where four AF evaluation value signals are calculated via four band pass filters will be described. In this case, the first AF evaluation value signal TES0 calculated through the band-pass filter having the lowest frequency characteristic and the three AF evaluation value signals (via the other three band-pass filters) ( The second to fourth AF evaluation value signals TES1, TES2, and TES3) are divided. Thus, three AF evaluation value ratio signals (first AF evaluation value ratio signal TES1 / TES0, second AF evaluation value ratio signal TES2 / TES0, and third AF evaluation value ratio signal TES3 / TES0 are generated. .

この特性は、図4に示されるように、合焦位置から所定位置離れた位置で極小となる。この比信号の極小となる位置は、比をとるそれぞれの信号を出力するバンドパスフィルタの周波数特性によって定まる。分母となるバンドパスフィルタの周波数特性が高い程比信号が極小となる位置は合焦位置に近くなる。従って比信号が極小となる位置を求め、その位置にバンドパスフィルタの周波数特性から決まる所定値を加えることで合焦位置を求めることができる。図4では、TES0、TES1、TES2、TES3の順に周波数特性が高域の特性となるように設定されている。このため、TES1/TES0、TES2/TES0、TES3/TES0の順に合焦位置に近い位置にそれぞれのピーク位置が検出される。   As shown in FIG. 4, this characteristic is minimal at a position away from the in-focus position by a predetermined position. The position at which the ratio signal is minimized is determined by the frequency characteristics of the band-pass filter that outputs the respective signals having the ratio. The higher the frequency characteristics of the bandpass filter as the denominator, the closer the position where the ratio signal becomes minimum is closer to the in-focus position. Therefore, the in-focus position can be obtained by obtaining a position where the ratio signal is minimized and adding a predetermined value determined from the frequency characteristics of the bandpass filter to the position. In FIG. 4, the frequency characteristics are set so as to be high frequency characteristics in the order of TES0, TES1, TES2, and TES3. Therefore, the respective peak positions are detected at positions close to the in-focus position in the order of TES1 / TES0, TES2 / TES0, and TES3 / TES0.

但し、このように合焦位置から全てのバンドパスフィルタの周波数特性にマッチした周波数が被写体に含まれていることが前提である。特定の周波数しか存在しない場合や特定の周波数のみコントラストが強い場合などは、特定周波数以外の周波数特性を持つバンドパスフィルタの出力を用いた比信号は、極小位置を正確に検出できない。また、コントラストの強い周波数成分の影響を受け、その周波数特性のバンドパスフィルタで検出されるべき位置と異なる位置が極小位置となることがある。そのため、設定した周波数特性通りの順序でピーク位置を検出できない場合もある。   However, it is assumed that the subject includes a frequency that matches the frequency characteristics of all the bandpass filters from the in-focus position. When there is only a specific frequency or when the contrast is strong only at the specific frequency, the ratio signal using the output of the bandpass filter having frequency characteristics other than the specific frequency cannot accurately detect the minimum position. In addition, a position different from the position to be detected by the bandpass filter having the frequency characteristic may be a minimum position under the influence of a frequency component having a strong contrast. Therefore, the peak position may not be detected in the order according to the set frequency characteristics.

そこで本実施例では、異なる周波数特性を持つ複数の信号(第2のAF評価値〜第4のAF評価値など)を、他の全ての信号より低域の周波数特性を持つ信号(第1のAF評価値)で除算した複数の比信号を算出する。そして、複数の比信号の極小位置と比信号を算出する際の信号の周波数特性に基づいて、複数の合焦位置を求める。また、複数の比信号の信頼性をその比信号の検出された最大値から算出し、複数の比信号から求められた複数の合焦位置のうち、比信号の信頼性の高いもののみを用いて合焦位置を算出する。更に、比信号がピークを迎えたことを検出するまでに得られた最も高域の周波数特性を持つ信号TES3のピーク位置の信頼性が高いと判断される場合、このピーク位置も用いて合焦位置を算出する。   Therefore, in the present embodiment, a plurality of signals having different frequency characteristics (second AF evaluation value to fourth AF evaluation value, etc.) are converted into signals having a frequency characteristic lower than all other signals (the first AF evaluation value). A plurality of ratio signals divided by the AF evaluation value) are calculated. Then, a plurality of in-focus positions are obtained based on the minimum position of the plurality of ratio signals and the frequency characteristics of the signal when calculating the ratio signal. In addition, the reliability of a plurality of ratio signals is calculated from the detected maximum value of the ratio signal, and among the plurality of in-focus positions obtained from the plurality of ratio signals, only the one having a high ratio signal reliability is used. To calculate the in-focus position. Furthermore, when it is determined that the peak position of the signal TES3 having the highest frequency characteristic obtained until it is detected that the ratio signal has reached a peak is highly reliable, focusing is also performed using this peak position. Calculate the position.

例えば、図4において、TES3の信頼性が高くTES3とFESの比信号を用いて合焦位置を求める場合を考える。この場合、比信号(TES3/TES0)の検出された値が極小となるα2点とその両隣の点α1、α3のフォーカスレンズ群3の位置とAF評価値の比信号の値から、以下の式(2)を用いて極小位置を求める。フォーカスレンズ群3の位置X1のときにAF評価値が極小値Y1(図4中のα2)となり、その前後の位置X2、X3で取得したAF評価値Y2、Y3(図4中のα1、α3)を示すとする。このとき、合焦位置Cのフォーカスレンズ群3の位置X0は、以下の式(2)のように求められる。   For example, consider the case in FIG. 4 where the reliability of TES3 is high and the in-focus position is obtained using a ratio signal between TES3 and FES. In this case, from the α2 point where the detected value of the ratio signal (TES3 / TES0) is minimized, the position of the focus lens group 3 at the adjacent points α1, α3, and the ratio signal value of the AF evaluation value, the following equation The minimum position is obtained using (2). The AF evaluation value becomes the minimum value Y1 (α2 in FIG. 4) at the position X1 of the focus lens group 3, and the AF evaluation values Y2 and Y3 (α1, α3 in FIG. 4) acquired at the positions X2 and X3 before and after the AF evaluation value. ). At this time, the position X0 of the focus lens group 3 at the in-focus position C is obtained by the following equation (2).

但し、式(2)において、Y1<Y3、Y1≦Y2である。 However, in the formula (2), Y1 <Y3 and Y1 ≦ Y2.

このように、比信号の極小位置や最も高域の周波数特性を持つ信号(第1のAF評価値)のピーク位置を求める。そして、比信号の周波数特性から定まる所定値と比信号の極小位置から求まる合焦位置、および、最も高域の周波数特性を持つ信号(第4のAF評価値)から合焦位置Cを求め、その位置へフォーカスレンズ群3を駆動する。両者の位置は理論的には一致するが、実際にはそれぞれの算出の過程において誤差を含むため一致しないことが多い。そこで両者の平均値を求め、その位置を合焦位置Cとする。そして、CPU15が合焦位置においてフォーカスレンズ群3を停止させると、スキャンAF処理回路14は、その位置において複数のAF評価値とAF評価値の比を求め、CPU15の所定の記録領域に記録する。   Thus, the minimum position of the ratio signal and the peak position of the signal having the highest frequency characteristic (first AF evaluation value) are obtained. Then, the in-focus position C is obtained from the predetermined value determined from the frequency characteristic of the ratio signal and the in-focus position obtained from the minimum position of the ratio signal and the signal having the highest frequency characteristic (fourth AF evaluation value), The focus lens group 3 is driven to that position. Although the positions of the two coincide theoretically, in reality, they often do not coincide with each other because they include errors in the calculation process. Therefore, an average value of both is obtained, and the position is set as the in-focus position C. When the CPU 15 stops the focus lens group 3 at the in-focus position, the scan AF processing circuit 14 obtains a ratio of a plurality of AF evaluation values and AF evaluation values at the position, and records them in a predetermined recording area of the CPU 15. .

次に、図4を参照して、信頼性判定方法について説明する。AF評価信号の比信号は特殊な場合を除けば、横軸に距離、縦軸にAF評価値の比をとると、その形は極小位置付近では図4に示されるような谷状になる。そこでAF評価値の比がピーク付近で谷状になっているか否かを比信号の最大値と最小値の差、一定値以上の傾きで傾斜している部分の長さ、傾斜している部分の勾配から判断することによりその信頼性を判断している。但し、演算の対象とする範囲は極小位置付近の5〜9点程度の範囲とし、信頼性を判定するためのしきい値は、比信号用のものを用意し、その値も設定したバンドパスフィルタの周波数特性毎に異ならせている。   Next, the reliability determination method will be described with reference to FIG. Except for special cases, the ratio signal of the AF evaluation signal has a valley shape as shown in FIG. 4 in the vicinity of the minimum position when the horizontal axis indicates the distance and the vertical axis indicates the ratio of the AF evaluation values. Therefore, whether or not the ratio of the AF evaluation values is valley-like in the vicinity of the peak, the difference between the maximum value and the minimum value of the ratio signal, the length of the portion that is inclined at a certain value or more, the portion that is inclined The reliability is judged by judging from the gradient of. However, the range to be calculated is a range of about 5 to 9 points near the minimum position, and the threshold for determining reliability is prepared for a ratio signal, and the band pass for which the value is also set Different for each frequency characteristic of the filter.

図4に示されるように、極小位置(点α2)から傾斜していると認められるスキャンポイントを、隣接するAF評価値の比の値の差を調べることにより行われる。このチェックは点α2から開始し、無限遠側の隣接点(α1)との差を調べ、点α2の方が小さければ傾斜していると判定する。次いで、点α2と比較した点α1とその隣接点のAF評価値の比の差を調べ、点α1の値が小さくかつその差が所定値以上であれば、傾斜していると判定する。このチェックを範囲内において隣接する点の値の大小関係が逆転するか、差が所定値より小さくなるまで続ける。同様にして至近側を調べる。   As shown in FIG. 4, a scan point that is recognized as being inclined from the minimum position (point α <b> 2) is performed by examining the difference in the ratio of adjacent AF evaluation values. This check starts from the point α2, and the difference from the adjacent point (α1) on the infinity side is examined. If the point α2 is smaller, it is determined that the vehicle is inclined. Next, the difference in the ratio of the AF evaluation value between the point α1 and the adjacent point compared to the point α2 is examined. If the value of the point α1 is small and the difference is equal to or greater than a predetermined value, it is determined that the vehicle is inclined. This check is continued until the magnitude relationship between the values of adjacent points in the range is reversed or the difference is smaller than a predetermined value. In the same way, examine the near side.

そして傾斜していると認められる点までの幅を山の幅L、点α2と傾斜していると認められる無限遠側の点の値の差と、至近側の点の値の差の和を求め、それを山の勾配SLとしている。最大値と最小値は範囲内のAF評価値の比信号全体の最大値と最小値である。この様にして求めたAF評価値の比の信頼性を判定するための諸数値をそれぞれのしきい値と比較し、全ての条件を満たしたならばAF評価値の信頼性があると判定する。この信頼性の判定を、極小位置が検出された全てのAF評価値の比信号に対して行う。   Then, the width to the point recognized as being inclined is the sum of the difference between the value at the infinity side recognized as being inclined and the difference between the value at the closest point and the point α2 as the width L of the mountain. It is calculated and used as the mountain slope SL. The maximum value and the minimum value are the maximum value and the minimum value of the entire ratio signal of the AF evaluation values within the range. The numerical values for determining the reliability of the ratio of the AF evaluation values thus obtained are compared with respective threshold values, and if all the conditions are satisfied, it is determined that the AF evaluation value is reliable. . This reliability determination is performed on the ratio signals of all AF evaluation values from which the minimum position is detected.

AF評価値(TES3等)の信頼性は、AF評価値の形状が山状か否かで判定している。AF評価信号は遠近競合の特殊な場合を除けば、横軸に距離、縦軸にAF評価値をとるとその形は山状になる。そこでAF評価信号が山状になっているか否かをAF評価信号の最大値と最小値の差、一定値以上の傾きで傾斜している部分の長さ、傾斜している部分の勾配から判断することによりAF評価信号の信頼性を判断している。なお、この具体的な方法は、特許第4235422号や特許第4185741号に記載されている。   The reliability of the AF evaluation value (TES3 or the like) is determined by whether or not the shape of the AF evaluation value is a mountain shape. The AF evaluation signal has a mountain shape when the horizontal axis indicates the distance and the vertical axis indicates the AF evaluation value, except for the special case of near-far competition. Therefore, whether or not the AF evaluation signal has a mountain shape is determined from the difference between the maximum value and the minimum value of the AF evaluation signal, the length of the inclined portion with an inclination greater than a certain value, and the gradient of the inclined portion. Thus, the reliability of the AF evaluation signal is determined. This specific method is described in Japanese Patent No. 4235422 and Japanese Patent No. 4185541.

次に、図5を参照して、図2のステップS206にて行われる合焦維持判定に関して説明する。図5のステップS501〜S503では、図2のステップS204のボケ量判定(図3のステップS301〜S303)と同一の動作を行う。CPU15(スキャンAF処理回路14)は、ぼかし処理前の複数のAF評価値信号TesBef[n]、ぼかし処理後の複数のAF評価値信号TesAft[n]を算出し、所定の領域に記録する。   Next, with reference to FIG. 5, the focus maintenance determination performed in step S206 of FIG. 2 will be described. In steps S501 to S503 in FIG. 5, the same operation as the blur amount determination (steps S301 to S303 in FIG. 3) in step S204 in FIG. 2 is performed. The CPU 15 (scan AF processing circuit 14) calculates a plurality of AF evaluation value signals TesBef [n] before the blurring process and a plurality of AF evaluation value signals TesAft [n] after the blurring process, and records them in a predetermined area.

続いてステップS504において、CPU15は、ぼかし処理前後の評価値を比較して、評価値の変化量に基づいて変化量指数Sg_TesVariPiを算出して記録する。図3のステップS304と同様に、複数のAF評価値それぞれの変化率TesVari[1]、TesVari[2]、TesVari[3]、TesVari[4]は以下のように求められる。   Subsequently, in step S504, the CPU 15 compares the evaluation values before and after the blurring process, calculates and records a change amount index Sg_TesVariPi based on the change amount of the evaluation value. Similar to step S304 in FIG. 3, the change rates TesVari [1], TesVari [2], TesVari [3], and TesVari [4] of each of the plurality of AF evaluation values are obtained as follows.

TesVari[1]=(TesAft[1]−TesBef[1])/(TesAft[1]+TesBef[1])
TesVari[2]=(TesAft[2]−TesBef[2])/(TesAft[2]+TesBef[2])
TesVari[3]=(TesAft[3]−TesBef[3])/(TesAft[3]+TesBef[3])
TesVari[4]=(TesAft[4]−TesBef[4])/(TesAft[4]+TesBef[4])
ここで、TesBef[1]、TesBef[2]、TesBef[3]、TesBef[4]、TesAft[1]、TesAft[2]、TesAft[3]、TesAft[4]は、ぼかし処理前後でのAF評価値である。そしてCPU15は、変化率の絶対値の和(Σabs(TesVari[i] ))を取りそれを変化量指数Sg_TesVariPiとし、所定の領域に記録する。
TesVari [1] = (TesAft [1] −TesBef [1]) / (TesAft [1] + TesBef [1])
TesVari [2] = (TesAft [2] −TesBef [2]) / (TesAft [2] + TesBef [2])
TesVari [3] = (TesAft [3] −TesBef [3]) / (TesAft [3] + TesBef [3])
TesVari [4] = (TesAft [4] −TesBef [4]) / (TesAft [4] + TesBef [4])
Here, TesBef [1], TesBef [2], TesBef [3], TesBef [4], TesAft [1], TesAft [2], TesAft [3], and TesAft [4] are AF before and after the blurring process. It is an evaluation value. Then, the CPU 15 takes the sum of the absolute values of the change rates (Σabs (TesVari [i])) and sets it as a change index Sg_TesVariPi and records it in a predetermined area.

続いてステップS505において、CPU15は、合焦位置に停止したフォーカスレンズ群3を再度駆動するか否かを判定する再起動判定を行う。再起動判定は、スキャンAF処理回路14で算出されるAF評価値に加えて、振れ検出回路34やAE処理回路13の出力を用いて行われる。CPU15は、合焦してこの処理を開始したときに、その時点でのAF評価値、振れ検出回路34の出力、AE処理回路13の出力を所定の領域に記録しておき、再起動判定に新たに値を取得し記録された値と比較する。その結果、いずれかの値に所定値以上の変動があった場合、CPU15はフォーカスレンズ群3を再度駆動すると判定し、ステップS506へ進む。一方、全ての値の変動が所定値未満の場合、CPU15は再度駆動しないと判定し、ステップS512へ進む。なお非合焦の場合、CPU15は再起動しないと判定する。これにより、非合焦の状態でSW2がオンされた場合、フォーカスレンズ群3は固定したままステップS209へ進む。   Subsequently, in step S505, the CPU 15 performs a restart determination for determining whether to drive the focus lens group 3 stopped at the in-focus position again. The restart determination is performed using outputs from the shake detection circuit 34 and the AE processing circuit 13 in addition to the AF evaluation value calculated by the scan AF processing circuit 14. When the CPU 15 is in focus and starts this process, the AF evaluation value, the output of the shake detection circuit 34, and the output of the AE processing circuit 13 at that time are recorded in a predetermined area, and the restart determination is made. A new value is obtained and compared with the recorded value. As a result, if any of the values fluctuates by a predetermined value or more, the CPU 15 determines to drive the focus lens group 3 again, and the process proceeds to step S506. On the other hand, if the variation of all the values is less than the predetermined value, the CPU 15 determines not to drive again, and proceeds to step S512. In the case of out of focus, the CPU 15 determines not to restart. Thereby, when SW2 is turned on in an out-of-focus state, the process proceeds to step S209 while the focus lens group 3 is fixed.

ステップS506〜S509において、CPU15は、ステップS501〜S504と同様に、ぼかし処理前後でのAF評価値の変化量指数を求める。まずステップS506において、CPU15は、AF枠内の画像取得を行い、周波数特性の異なる複数のAF評価値信号TesBef[n]を算出し、所定の領域に記録する。続いてステップS507において、CPU15は、スキャンAF処理回路14内の低周波帯域の周波数を抽出するバンドパスフィルタ(BPF)を介することで画像の解像度を低下させるぼかし処理を行う。続いてステップS508において、CPU15は、ステップS506と同様に、ぼかし処理を行った画像から周波数特性の異なる複数のAF評価値信号TesAft[n]を算出し、所定の領域に記録する。   In steps S506 to S509, the CPU 15 obtains an AF evaluation value change index before and after the blurring process, similarly to steps S501 to S504. First, in step S506, the CPU 15 acquires an image within the AF frame, calculates a plurality of AF evaluation value signals TesBef [n] having different frequency characteristics, and records them in a predetermined area. Subsequently, in step S507, the CPU 15 performs a blurring process for reducing the resolution of the image through a band pass filter (BPF) that extracts a frequency in a low frequency band in the scan AF processing circuit 14. Subsequently, in step S508, as in step S506, the CPU 15 calculates a plurality of AF evaluation value signals TesAft [n] having different frequency characteristics from the blurred image and records them in a predetermined area.

続いてステップS509において、CPU15は、ぼかし処理前後の評価値の変化量に基づいて、変化量指数Sg_TesVariNwを算出する。変化量指数は、ステップS504と同じ計算式で求められ、
複数のAF評価値それぞれの変化率TesVari[1]、TesVari[2]、TesVari[3]、TesVari[4]の絶対値の和(Σabs(TesVari[i]))である。
Subsequently, in step S509, the CPU 15 calculates the change amount index Sg_TesVariNw based on the change amount of the evaluation value before and after the blurring process. The variation index is obtained by the same calculation formula as in step S504,
It is the sum of absolute values (Σabs (TesVari [i])) of the change rates TesVari [1], TesVari [2], TesVari [3], and TesVari [4] for each of the plurality of AF evaluation values.

続いてステップS510において、CPU15は、ステップS509にて算出された評価値変化量指数Sg_TesVariNwと、所定の領域に記録されているステップS504にて算出された合焦時の評価値変化量指数Sg_TesVariPiと比較する。これによりCPU15は、合焦状態が維持されているか否かを判定する。ステップS511にて両者の値が略等しいと見なせる場合、ステップS512へ進む。ステップS512において、CPU15は、フォーカスレンズ群3はその位置で固定のままにするように設定して、本処理を終了する。   Subsequently, in step S510, the CPU 15 calculates the evaluation value change amount index Sg_TesVariNw calculated in step S509 and the in-focus evaluation value change amount index Sg_TesVariPi calculated in step S504 recorded in a predetermined area. Compare. Thereby, the CPU 15 determines whether or not the in-focus state is maintained. When it can be considered that both values are substantially equal in step S511, the process proceeds to step S512. In step S512, the CPU 15 sets the focus lens group 3 to remain fixed at that position, and ends this process.

一方、両者の値が大きく異なる場合(変化が大きい場合)、ステップS513へ進む。ステップS513において、CPU15は、SW1に応答して再度ステップS204におけるスキャンAF処理を実行するように設定をして、本処理を終了する。   On the other hand, if the two values are significantly different (if the change is large), the process proceeds to step S513. In step S513, the CPU 15 sets to execute the scan AF process in step S204 again in response to SW1, and ends the present process.

両者の値が異なる場合(変化が小さい場合)、ステップS514へ進む。ステップS514において、CPU15は、ピント微調整スキャンをするように設定をして、本処理を終了する。   If the two values are different (if the change is small), the process proceeds to step S514. In step S514, the CPU 15 performs setting so as to perform the focus fine adjustment scan, and ends this processing.

二つの評価値変化量指数Sg_TesVariNwとSg_TesVariPiから、以下の式(3)のようにDef_Sg_TesVariを算出する。   Def_Sg_TesVari is calculated from the two evaluation value change index Sg_TesVariNw and Sg_TesVariPi as shown in the following equation (3).

Def_Sg_TesVari=2・abs(Sg_TesVariPi−Sg_TesVariNw)/(Sg_TesVariPi+Sg_TesVariNw) … (3)
上記の判定は、式(3)で表されるDef_Sg_TesVariと評価値変化量指数の合焦時からの変化を示す係数とを求め、その値を所定の閾値と比較することにより行われる。例えば、
両者の値が略等しいと見なせる閾値Thr1を用いて、Def_Sg_TesVari<Thr1を満たす場合、両者の値が略等しいと見なされる。両者の値が大きく異なるとみなされる閾値Thr2を用いて、Def_Sg_TesVari>Thr2を満たす場合、両者の値が大きく異なると見なされる。そして、Thr1≦Def_Sg_TesVari≦Thr2を満たす場合、両者の値が異なるとみなす。例えば、これらの閾値はThr1=0.05、Thr2=0.15程度の値とすれば良い。またこれらの閾値は、動画記録中とそれ以外で異なる値に設定することも可能である。動画記録中は誤判定でフォーカスレンズ群3が駆動された場合、記録された動画を鑑賞する際に不快感を与える頻度が高く、また記録される動画は滑らかにフォーカスの状態が変化する方が好ましいことが多い。このため、動画記録中はそれ以外の場合に比べて、閾値Thr1の値を大きくしてフォーカスレンズ群3を固定しておく頻度が高くなるようにしておく。
Def_Sg_TesVari = 2 · abs (Sg_TesVariPi−Sg_TesVariNw) / (Sg_TesVariPi + Sg_TesVariNw) (3)
Said determination is performed by calculating | requiring the coefficient which shows the change from the time of focusing of Def_Sg_TesVari represented by Formula (3), and an evaluation value change amount index | exponent, and comparing the value with a predetermined | prescribed threshold value. For example,
When Def_Sg_TesVari <Thr1 is satisfied using a threshold value Thr1 at which both values can be regarded as substantially equal, both values are regarded as substantially equal. When Def_Sg_TesVari> Thr2 is satisfied using a threshold value Thr2 that is considered to be largely different from each other, it is considered that the two values are greatly different from each other. When Thr1 ≦ Def_Sg_TesVari ≦ Thr2 is satisfied, the two values are considered to be different. For example, these threshold values may be about Thr1 = 0.05 and Thr2 = 0.15. Also, these threshold values can be set to different values during recording of a moving image and other than that. If the focus lens group 3 is driven due to a misjudgment during moving image recording, the frequency of giving discomfort is high when viewing the recorded moving image, and the recorded moving image is more likely to change the focus state smoothly. Often preferred. For this reason, during moving image recording, the value of the threshold Thr1 is increased to increase the frequency of fixing the focus lens group 3 as compared to other cases.

なお、ステップS501〜S504の処理は、合焦時のみに実行するようにしても良い。なお、煩雑さを避けるため図示していないが、SW1がオフになった場合にステップS201へ戻り、レリーズや撮影前準備のやり直し等、撮影者の意図を反映させることができる。   Note that the processing in steps S501 to S504 may be executed only during focusing. Although not shown in order to avoid complications, when SW1 is turned off, the process returns to step S201, and the photographer's intentions such as release and preparation before photographing can be reflected.

本実施例においては、撮像センサ5から得た第1の画像をスキャンAF処理回路14内の低周波帯域の周波数を抽出するバンドパスフィルタ(BPF)を介することで、第1の画像よりも低周波な第2の画像を生成している。ただし本実施例は、これに限定されるものではなく、撮像センサ5から第1の画像と低周波な第2の画像を取得する等、それ以外の方法で低周波な第2の画像を取得しても良い。例えば、撮像センサ5内の画素加算機能を用いて、第1の画像と、それより加算画素数の多い固体撮像素子の駆動モードで第1の画像よりも低周波な第2の画像を取得して、第1の評価値および第2の評価値を求めるようにする。   In the present embodiment, the first image obtained from the image sensor 5 is lower than the first image by passing through a band pass filter (BPF) that extracts the frequency of the low frequency band in the scan AF processing circuit 14. A high-frequency second image is generated. However, the present embodiment is not limited to this, and the low-frequency second image is acquired by other methods such as acquiring the first image and the low-frequency second image from the imaging sensor 5. You may do it. For example, the pixel addition function in the image sensor 5 is used to acquire a first image and a second image having a lower frequency than the first image in the driving mode of the solid-state imaging device having a larger number of added pixels. Thus, the first evaluation value and the second evaluation value are obtained.

このように本実施例において、制御装置は、画像生成手段15a、評価値生成手段(スキャンAF処理回路14)、変化量算出手段15b、および、判定手段15cを有する。画像生成手段15aは、第1の周波数成分を含む第1の画像、および、第1の周波数成分よりも低い第2の周波数成分を含む第2の画像を生成する。評価値生成手段(スキャンAF処理回路14)は、第1の画像から第1の評価値を生成し、第2の画像から第2の評価値を生成する。変化量算出手段15bは、第1の評価値および第2の評価値のそれぞれの変化量(変化を示す指数)を算出する。判定手段15cは、変化量に基づいて画像の合焦度合い(合焦状態が維持されているか否かなどの焦点状態)を判定(推定)する。   As described above, in this embodiment, the control device includes the image generation unit 15a, the evaluation value generation unit (scan AF processing circuit 14), the change amount calculation unit 15b, and the determination unit 15c. The image generation unit 15a generates a first image including a first frequency component and a second image including a second frequency component lower than the first frequency component. The evaluation value generation means (scan AF processing circuit 14) generates a first evaluation value from the first image, and generates a second evaluation value from the second image. The change amount calculation means 15b calculates the change amount (index indicating change) of each of the first evaluation value and the second evaluation value. The determination unit 15c determines (estimates) the degree of focus of the image (a focus state such as whether or not the focus state is maintained) based on the change amount.

好ましくは、変化量算出手段15bは、第1のタイミングで算出された第1の変化量(Sg_TesVariPi)と、第2のタイミングで算出された第2の変化量(Sg_TesVariNw)との差分を求める。そして判定手段15cは、第1の変化量と第2の変化量との差分に基づいて、合焦度合いを判定する。より好ましくは、第1のタイミングは合焦時であり、第2のタイミングは合焦維持判定時である。また好ましくは、判定手段15cは、第1の変化量と第2の変化量との差分が第1の量(閾値Thr1よりも大きい量)である場合、合焦度合いが低いと判定する。一方、判定手段15cは、第1の変化量と第2の変化量との差分が第1の量よりも小さい第2の量(閾値Thr1よりも小さい量)である場合、合焦度合いが高いと判定する。また好ましくは、判定手段15cは、第1の変化量と第2の変化量との差分が所定量(閾値Thr1)よりも小さい場合(第1の変化量と第2の変化量とが略等しい場合)、合焦状態が維持されていると判定する。一方、判定手段15cは、第1の変化量と第2の変化量との差分が所定量よりも大きい場合、合焦状態が維持されていないと判定する。より好ましくは、判定手段15cは、撮影時の被写界深度に応じて、合焦状態が維持されていると判定する所定量(判定閾値:閾値Thr1)を変更する。より好ましくは、判定手段15cは、被写界深度が第1の被写界深度である場合、前記所定量を第1の所定量に設定する。また判定手段15cは、被写界深度が第1の被写界深度よりも深い第2の被写界深度である場合、所定量を第1の所定量よりも大きい第2の所定量に設定する。   Preferably, the change amount calculation unit 15b obtains a difference between the first change amount calculated at the first timing (Sg_TesVariPi) and the second change amount calculated at the second timing (Sg_TesVariNw). The determination unit 15c determines the degree of focus based on the difference between the first change amount and the second change amount. More preferably, the first timing is an in-focus state, and the second timing is an in-focus maintenance determination time. Preferably, the determination unit 15c determines that the degree of focus is low when the difference between the first change amount and the second change amount is the first amount (an amount larger than the threshold value Thr1). On the other hand, when the difference between the first change amount and the second change amount is the second amount smaller than the first amount (an amount smaller than the threshold Thr1), the determination unit 15c has a high degree of focus. Is determined. Preferably, the determination unit 15c is configured such that the difference between the first change amount and the second change amount is smaller than a predetermined amount (threshold value Thr1) (the first change amount and the second change amount are substantially equal). ), It is determined that the in-focus state is maintained. On the other hand, when the difference between the first change amount and the second change amount is larger than the predetermined amount, the determination unit 15c determines that the in-focus state is not maintained. More preferably, the determination unit 15c changes a predetermined amount (determination threshold: threshold value Thr1) for determining that the in-focus state is maintained according to the depth of field at the time of shooting. More preferably, the determination unit 15c sets the predetermined amount to the first predetermined amount when the depth of field is the first depth of field. The determining unit 15c sets the predetermined amount to a second predetermined amount larger than the first predetermined amount when the depth of field is the second depth of field deeper than the first depth of field. To do.

好ましくは、画像生成手段15aは、焦点調整のために合焦状態の異なる複数の画像を生成し、判定手段15cにより判定された合焦度合いに応じて、複数の画像の数を変更する。より好ましくは、画像生成手段15aは、合焦度合いが第1の値である場合、焦点調整のために取得する画像の数を第1の数に設定する。一方、画像生成手段15aは、合焦度合いが第1の値よりも高い第2の値である場合、焦点調整のために取得する画像の数を、第1の数よりも少ない第2の数に設定する。   Preferably, the image generation unit 15a generates a plurality of images having different in-focus states for focus adjustment, and changes the number of the plurality of images according to the degree of focus determined by the determination unit 15c. More preferably, when the degree of focus is the first value, the image generation unit 15a sets the number of images acquired for focus adjustment to the first number. On the other hand, when the degree of focus is the second value higher than the first value, the image generation unit 15a sets the number of images acquired for focus adjustment to a second number smaller than the first number. Set to.

好ましくは、変化量算出手段15bは、変化量として、第1の評価値および第2の評価値のそれぞれの変化率の和(Σabs(TesVari[i]))を算出する。そして判定手段15cは、変化率の和に基づいて合焦度合いを判定する。より好ましくは、変化率は、第1の評価値と第2の評価値との差を、第1の評価値と第2の評価値との和で除算した値(TesVari[i])である。   Preferably, the change amount calculation unit 15b calculates the sum of change rates of each of the first evaluation value and the second evaluation value (Σabs (TesVari [i])) as the change amount. Then, the determination unit 15c determines the degree of focus based on the sum of the change rates. More preferably, the change rate is a value (TesVari [i]) obtained by dividing the difference between the first evaluation value and the second evaluation value by the sum of the first evaluation value and the second evaluation value. .

これにより、フォーカスレンズを動かさずに得た画像から合焦が維持されているか判定しその結果に応じてAF制御することで、表示画像の品位の向上とAF動作の高速化の両立を実現することができる。また評価値変化量指数は、処理前後の画像から求めたAF評価値の差分を和で割っているため、コントラスト、被写体の明るさやそれを判定するAE処理回路13の検出誤差等の影響を受けにくい。   As a result, it is determined whether or not the focus is maintained from the image obtained without moving the focus lens, and AF control is performed according to the result, thereby realizing both improvement in the quality of the display image and speeding up of the AF operation. be able to. Since the evaluation value change amount index is obtained by dividing the difference between the AF evaluation values obtained from the images before and after processing by the sum, it is affected by contrast, the brightness of the subject, and the detection error of the AE processing circuit 13 for determining the brightness. Hateful.

次に、本発明の実施例2について説明する。本実施例は、撮像センサ5が撮像面位相差AF機能を有し、合焦動作をこの機能単独、またはこの機能を併用して行っている点で、実施例1と異なる。   Next, a second embodiment of the present invention will be described. The present embodiment is different from the first embodiment in that the imaging sensor 5 has an imaging plane phase difference AF function and the focusing operation is performed alone or in combination with this function.

まず、図6を参照して、本発明の撮像センサ5の構成について説明する。図6は撮像センサ5の構成図であり、図6(a)は画素の断面図、図6(b)は画素の平面図をそれぞれ示している。二次元的に配置される画素には、通常の撮像用画素と位相差AF用の画素としての機能を持たせるために、図6に示されるような構造をしている。一つのマイクロレンズに対して長方形の二つのフォトダイオードが配置されている。一方のフォトダイオードは基準画素用画素、他方のフォトダイオードは参照画素用画素である。   First, the configuration of the image sensor 5 of the present invention will be described with reference to FIG. 6A and 6B are configuration diagrams of the image sensor 5, in which FIG. 6A shows a cross-sectional view of the pixel, and FIG. 6B shows a plan view of the pixel. The two-dimensionally arranged pixels have a structure as shown in FIG. 6 in order to provide functions as normal imaging pixels and phase difference AF pixels. Two rectangular photodiodes are arranged for one microlens. One photodiode is a reference pixel pixel, and the other photodiode is a reference pixel pixel.

位相差AFを行うための画素行(位相差AF用画素行)は間欠的に配置されており、この行のみ基準画像用画素の信号を独立で読み出すことが可能である。その他の画素行に関しては、一対のフォトダイオードの出力を加算して読み出す。また、画素から読み出された信号を増幅することができる。実際には、先頭の行から行ごとに読み出しを開始し、位相差AFを行うための行においては、一対のフォトダイオードの出力を加算した信号と基準画像用画素の信号が読み出され、その他の行においては一対のフォトダイオードの出力を加算した信号が読み出される。位相差演算を行う際には、加算した信号と基準画像用画素の信号からその差分をとることで、参照画像用画素の信号を生成する。この処理は、位相差AF処理回路30で行われる。加算した信号は、記憶用メモリへの記録や、画像表示装置への表示に用いられる。   Pixel rows for performing phase difference AF (phase difference AF pixel rows) are intermittently arranged, and the reference image pixel signals can be independently read out only in this row. The other pixel rows are read by adding the outputs of the pair of photodiodes. In addition, a signal read from the pixel can be amplified. Actually, reading is started for each row from the first row, and in the row for performing the phase difference AF, the signal obtained by adding the outputs of the pair of photodiodes and the signal of the reference image pixel are read. In this row, a signal obtained by adding the outputs of the pair of photodiodes is read out. When the phase difference calculation is performed, the difference between the added signal and the reference image pixel signal is taken to generate a reference image pixel signal. This processing is performed by the phase difference AF processing circuit 30. The added signal is used for recording in a storage memory and displaying on an image display device.

次に、図7を参照して、撮像装置1の撮影動作について説明する。図7は、撮像装置1の撮影動作を示すフローチャートである。図7の各ステップは、CPU15の指令に基づいて、撮像装置1の各部により実行される。図7のステップS701〜S703、S709〜S715は、図2のステップS201〜S203、S205、S208、S206、S207、S210、S211、S209とそれぞれ同様である。   Next, with reference to FIG. 7, the photographing operation of the imaging apparatus 1 will be described. FIG. 7 is a flowchart showing the shooting operation of the imaging apparatus 1. Each step in FIG. 7 is executed by each unit of the imaging apparatus 1 based on a command from the CPU 15. Steps S701 to S703 and S709 to S715 in FIG. 7 are the same as steps S201 to S203, S205, S208, S206, S207, S210, S211 and S209 in FIG.

まず、ステップS701〜S703において実施例1と同じ処理を行った後、ステップS704において、CPU15はAF枠を設定する。具体的な方法は実施例1と同じであり、撮影者の指示、顔検出回路36の出力、CPU15で行う画像の色情報や輝度情報から特徴点を抽出して行う主被写体を検出の結果を用いてAF枠を設定する。続いてステップS705において、CPU15は、撮像面位相AFが可能か否かを判定する。撮像面位相差AFが可能である場合、ステップS706へ進む。一方、撮像面位相差AFが不可能である場合、ステップS708へ進む。この判定は、撮像面位相差AF実行時の絞り値および間欠的に配置され位相差AFを行うための画素行とAF枠との関係に基づいて行われる。   First, after performing the same processing as in the first embodiment in steps S701 to S703, the CPU 15 sets an AF frame in step S704. The specific method is the same as that of the first embodiment, and the result of detection of the main subject is performed by extracting feature points from the photographer's instruction, the output of the face detection circuit 36, and the color information and luminance information of the image performed by the CPU 15. Use to set AF frame. Subsequently, in step S705, the CPU 15 determines whether or not the imaging surface phase AF is possible. If the imaging plane phase difference AF is possible, the process proceeds to step S706. On the other hand, if the imaging plane phase difference AF is not possible, the process proceeds to step S708. This determination is made on the basis of the aperture value at the time of execution of the imaging surface phase difference AF and the relationship between the intermittently arranged pixel row and the AF frame for performing the phase difference AF.

撮像面位相差AF実行時の絞り値(F値)が所定絞り(例えばF11)より絞っている場合、CPU15は撮像面位相差AFが不可能であると判定する。絞り値が所定絞りより開いている場合、AF枠内に含まれている位相差AFを行うための画素行数、位相差AFを行う信号のコントラスト値(位相差AFを行う際の信号の最大値と最小値の差)、増幅度を考慮して判定を行う。   When the aperture value (F value) at the time of executing the imaging surface phase difference AF is smaller than a predetermined aperture (for example, F11), the CPU 15 determines that the imaging surface phase difference AF is impossible. When the aperture value is larger than the predetermined aperture, the number of pixel rows included in the AF frame for performing the phase difference AF, the contrast value of the signal for performing the phase difference AF (the maximum signal when performing the phase difference AF) The difference between the value and the minimum value) is determined in consideration of the amplification degree.

位相差AF処理の信頼度Relは、以下の式で求めることができる。   The reliability Rel of the phase difference AF process can be obtained by the following equation.

Rel=Log2(√(AF枠内の行数))+Log2(コントラスト値)+Log2(1/増幅度)
この値が所定値以上あれば、CPU15は撮像面位相差AFが可能であると判定する。なお、Log2は底を2とする対数である。例えば、AF枠内の行数が4行以上、PB値が1.2以上、増幅度が8倍以下の条件で可能と判定される場合、所定値は―1.74となる。
Rel = Log2 (√ (number of rows in AF frame)) + Log2 (contrast value) + Log2 (1 / amplification degree)
If this value is greater than or equal to a predetermined value, the CPU 15 determines that imaging plane phase difference AF is possible. Log2 is a logarithm with a base of 2. For example, when it is determined that the number of lines in the AF frame is 4 or more, the PB value is 1.2 or more, and the amplification degree is 8 times or less, the predetermined value is −1.74.

撮像面位相AFが可能である場合、ステップS706において、CPU15は位相差AF処理回路30を用いて撮像面位相AF処理を行う。この処理に関しては後述する。撮像面位相AF処理の結果、合焦可能と判定された場合、ステップS709へ進む。一方、合焦可能と判定されない場合、ステップS708へ進む。ステップS708において、CPU15はスキャンAF処理回路14を用いてスキャンAF処理を行う。スキャンAF処理は、AF枠としてステップS704にて設定された情報を用いることを除いて、実施例1と同じ処理を行うため、その説明は割愛する。   If imaging surface phase AF is possible, the CPU 15 performs imaging surface phase AF processing using the phase difference AF processing circuit 30 in step S706. This process will be described later. If it is determined that focusing is possible as a result of the imaging surface phase AF process, the process advances to step S709. On the other hand, if it is not determined that focusing is possible, the process proceeds to step S708. In step S <b> 708, the CPU 15 performs scan AF processing using the scan AF processing circuit 14. Since the scan AF process performs the same process as in the first embodiment except that the information set in step S704 is used as the AF frame, the description thereof is omitted.

ステップS709にて実施例1と同じAFOKまたはAFNGの表示処理を行った後、ステップS710へ進む。ステップS710において、CPU15は、SW2(レリーズスイッチの第ニストローク)の確認を行う。SW2がオンである場合、ステップS715へ進み、実際の露光処理を実行する。一方、SW2がオンになっていない場合、ステップS711において、CPU15は合焦状態が維持されているかを判定する。その結果に従って、CPU15は、実施例1と同様にレンズ固定、ピント微調整、再AFのいずれかの処理を行う。   In step S709, the same AFOK or AFNG display processing as that in the first embodiment is performed, and then the process proceeds to step S710. In step S710, the CPU 15 confirms SW2 (second stroke of the release switch). If SW2 is on, the process proceeds to step S715 to execute actual exposure processing. On the other hand, if SW2 is not turned on, in step S711, the CPU 15 determines whether the in-focus state is maintained. In accordance with the result, the CPU 15 performs any of the lens fixing, focus fine adjustment, and re-AF processing as in the first embodiment.

次に、図8を参照して、図7のステップS711にて行われる合焦維持判定に関して説明する。なお、図5を参照して説明した実施例1と同様の部分に関する説明は省略する。   Next, with reference to FIG. 8, the focus maintenance determination performed in step S711 in FIG. 7 will be described. In addition, the description regarding the part similar to Example 1 demonstrated with reference to FIG. 5 is abbreviate | omitted.

ステップS801〜S805は、図5のステップS501〜S505と同様である。続いてステップS806において、CPU15は、ステップS707の撮像面位相差AFで最終的に合焦状態を得たか否かを判定する。撮像面位相差AFで最終的に合焦状態を得た場合、ステップS807へ進む。一方、撮像面位相差AFで最終的に合焦状態を得ていない、すなわちステップS708のスキャンAF処理で最終的に合焦状態を得た場合、ステップS810へ進む。   Steps S801 to S805 are the same as steps S501 to S505 in FIG. Subsequently, in step S806, the CPU 15 determines whether or not an in-focus state is finally obtained by the imaging plane phase difference AF in step S707. When the focused state is finally obtained by the imaging surface phase difference AF, the process proceeds to step S807. On the other hand, if the focus state is not finally obtained by the imaging plane phase difference AF, that is, if the focus state is finally obtained by the scan AF processing in step S708, the process proceeds to step S810.

ステップS807において、CPU15は撮像面位相差AFが可能か否かを判定する。撮像面位相差AFが可能である場合、ステップS808へ進む。一方、撮像面位相差AFが不可能である場合、ステップS810へ進む。この判定は、ステップS705と同様の処理であり、撮像面位相差AF実行時の絞り値および間欠的に配置され位相差AFを行うための画素行とAF枠との関係に基づいて行われる。   In step S807, the CPU 15 determines whether or not the imaging surface phase difference AF is possible. If the imaging surface phase difference AF is possible, the process proceeds to step S808. On the other hand, if the imaging surface phase difference AF is impossible, the process proceeds to step S810. This determination is the same processing as in step S705, and is performed based on the aperture value at the time of execution of the imaging plane phase difference AF and the relationship between the pixel rows and the AF frames that are intermittently arranged to perform the phase difference AF.

ステップS808において、CPU15は、ステップS706と同様に撮像面位相AF処理を行い、デフォーカス量を算出する。この処理に関しては後述する。ステップS809において、検出されたデフォーカス量が小さく合焦と見なせる場合、ステップS816へ進む。ステップS816において、CPU15は、合焦状態が維持されていると判定する。一方、合焦と見なせない場合、ステップS810へ進む。   In step S808, the CPU 15 performs imaging surface phase AF processing in the same manner as in step S706, and calculates the defocus amount. This process will be described later. In step S809, if the detected defocus amount is small and can be regarded as in-focus, the process proceeds to step S816. In step S816, the CPU 15 determines that the in-focus state is maintained. On the other hand, if it cannot be regarded as in-focus, the process proceeds to step S810.

ステップS810〜S818は、図5のステップS506〜S514とそれぞれ同様である。すなわちCPU15は、画像の解像度を低下させるぼかし処理前後で複数のAF評価値信号から評価値の変化量指数を算出し、変化量指数を比較することで合焦状態が維持されているか否かを判定する。そしてその判定結果に基づいて、CPU15は、フォーカスレンズ群3をその位置で固定、または、再度ステップS204におけるスキャンAF処理を実行する、または、ピント微調整スキャンをするように設定してもよい。   Steps S810 to S818 are the same as steps S506 to S514 in FIG. That is, the CPU 15 calculates an evaluation value change index from a plurality of AF evaluation value signals before and after the blurring process for reducing the resolution of the image, and compares the change index to determine whether or not the in-focus state is maintained. judge. Based on the determination result, the CPU 15 may set the focus lens group 3 to be fixed at that position, or to execute the scan AF process in step S204 again, or to perform a fine focus adjustment scan.

ここで、図9を参照して、ステップS706で行われる撮像面位相AF処理について説明する。まずステップS901において、CPU15は、A/D変換回路7より出力される位相差AF用の画像信号を位相差AF処理回路30の所定の記録領域に記録する。続いてステップS902において、CPU15は、基準画像と参照画像が加算されて出力された信号と基準画像信号の差分を取り参照画像信号を作成する。そして位相差AF用の画素の並び替えを行い、基準画像と参照画像とを生成する。   Here, with reference to FIG. 9, the imaging plane phase AF process performed in step S706 will be described. First, in step S <b> 901, the CPU 15 records the phase difference AF image signal output from the A / D conversion circuit 7 in a predetermined recording area of the phase difference AF processing circuit 30. Subsequently, in step S902, the CPU 15 creates a reference image signal by taking the difference between the signal output by adding the standard image and the reference image and the standard image signal. Then, the pixels for phase difference AF are rearranged to generate a standard image and a reference image.

本実施例の撮像センサ5には、一つのマイクロレンズに対して長方形の二つのフォトダイオードが配置されており、一方のフォトダイオードが基準画素用、他方が参照画素用となっている。よって、読み出し順序は「基準画素+参照画素」→「基準画素」→「基準画素+参照画素」→「基準画素」→・・・・・・・→「基準画素+参照画素」→「基準画素」となっており、位相差AF処理回路30の所定の記録領域に記録されている。そこで、基準画像を構成する画素のみを抽出し、抽出した順序に並べて基準画像信号とし、位相差AF処理回路30の所定の記録領域に記録する。また基準画像と参照画像とが加算されたデータと基準画素のデータとを抽出してその差分を求め、求めた順序に並べ参照画像信号とし、位相差AF処理回路30の所定の記録領域に記録する。   In the imaging sensor 5 of the present embodiment, two rectangular photodiodes are arranged for one microlens, one photodiode for the reference pixel and the other for the reference pixel. Therefore, the reading order is “reference pixel + reference pixel” → “reference pixel” → “reference pixel + reference pixel” → “reference pixel” →... → “reference pixel + reference pixel” → “reference pixel” Is recorded in a predetermined recording area of the phase difference AF processing circuit 30. Therefore, only the pixels constituting the reference image are extracted, arranged in the extracted order as a reference image signal, and recorded in a predetermined recording area of the phase difference AF processing circuit 30. Further, the data obtained by adding the standard image and the reference image and the data of the standard pixel are extracted and the difference is obtained, arranged in the obtained order and used as a reference image signal, and recorded in a predetermined recording area of the phase difference AF processing circuit 30. To do.

続いてステップS903において、CPU15は、記録された像を修正する。本実施例では、撮像面に位相差AFを行う画素を配置している。このため、二次結像光学系で再結像させる場合のように像高による光束の違いで生じる像の歪みを修正するフィールドレンズや、位相差AF用センサへ入射する光束の瞳位置を制限する絞り、不要光束を遮断するマスクを結像面とセンサとの間に配置できない。その結果、位相差AF用の信号は画素ごとにシェーディング・オフセットが異なるため、その補正が必要となる。このシェーディングは光軸中心からの画素の位置(像高)、撮影レンズの射出瞳位置、および、絞りに応じて異なる。このため、それぞれの要因に対応する像修正量を用いて、各要因に応じて位相差AF用の画素ごとに像を修正する。   In step S903, the CPU 15 corrects the recorded image. In this embodiment, pixels for performing phase difference AF are arranged on the imaging surface. For this reason, as in the case of re-imaging with the secondary imaging optical system, the pupil position of the light beam incident on the field lens for correcting the image distortion caused by the difference in the light beam due to the image height or the phase difference AF sensor is limited. Therefore, it is impossible to dispose the aperture and the mask for blocking unnecessary light flux between the imaging surface and the sensor. As a result, the signal for phase difference AF needs to be corrected because the shading offset differs for each pixel. This shading varies depending on the pixel position (image height) from the optical axis center, the exit pupil position of the photographing lens, and the stop. For this reason, the image correction amount corresponding to each factor is used to correct the image for each pixel for phase difference AF according to each factor.

また、オフセットは位相差AF用画像の増幅率等によって異なる。このため、それぞれの要因に対応する像修正量を用いて、各要因に応じて位相差AF用の画素ごと像を修正する。像修正方法の詳細は、例えば特開2012−252280で公知であるため、その説明は省略する。   The offset differs depending on the amplification factor of the phase difference AF image. Therefore, the image correction amount corresponding to each factor is used to correct the image for each pixel for phase difference AF according to each factor. Details of the image correction method are known, for example, in Japanese Patent Application Laid-Open No. 2012-252280, and thus description thereof is omitted.

続いてステップS904において、CPU15は、相関演算を行う際の初期値を設定する。初期値を設定された位相差AF処理回路30は、ステップS905において、以下の式(4)に従って相関演算を行い、基準画像aと参照画像bの相関値を求める。 Subsequently, in step S904, the CPU 15 sets an initial value for performing the correlation calculation. In step S905, the phase difference AF processing circuit 30 set with the initial value performs a correlation calculation according to the following equation (4) to obtain a correlation value between the reference image a i and the reference image b i .

=Σmax(aj+1,bj+k)−Σmax(a,bj+k+1) … (4)
式(4)において、max(a,b)はa,bのうち大きい方をとるという意味である、kは相関演算を行う像ずらし量、jは相関演算を行う画素数であり、ステップS904で初期化されている。
U k = Σmax (a j + 1 , b j + k ) −Σmax (a j , b j + k + 1 ) (4)
In equation (4), max (a, b) means the larger of a and b, k is the image shift amount for performing correlation calculation, j is the number of pixels for performing correlation calculation, and step S904. It has been initialized with.

続いてステップS906において、CPU15は、基準画像と参照画像の相関値を位相差AF処理回路30から取得し記録する。そして既に一時記録されている相関値がある場合、その相関値と符号が等しいか否かを判定する。一時記録された相関値がない場合、取得した相関値を一時記録する。   Subsequently, in step S906, the CPU 15 acquires and records the correlation value between the standard image and the reference image from the phase difference AF processing circuit 30. If there is a correlation value that has already been temporarily recorded, it is determined whether or not the sign of the correlation value is equal. If there is no temporarily recorded correlation value, the acquired correlation value is temporarily recorded.

その結果、ステップS907にて符号が反転した場合または取得された相関量が零であり、かつ位相差AF処理に使用した信号の信頼性があると判定された場合、ステップS908へ進む。この信頼性の判定には、PB値(信号の最大値と最小値の比)や基準画像と参照画像の類似性などが用いられる。   As a result, if the sign is inverted in step S907, or if it is determined that the acquired correlation amount is zero and the signal used for the phase difference AF process is reliable, the process proceeds to step S908. For this determination of reliability, the PB value (ratio between the maximum value and the minimum value of the signal), the similarity between the standard image and the reference image, and the like are used.

PB値は、位相差AFに使用する基準画像と参照画像の像修正前の信号、像修正後の信号、相関演算を行う際にローパスフィルタ処理を行う場合には像修正とローパス処理をともに行った後の信号の6つの信号から求めた比の平均値、または比の最小値を用いる。また、基準画像と参照画像の類似性は、相関値が最小になったずらし量Kにおける基準画像と参照画像の差分を以下の式(5)で求め、類似性の評価値とする。   The PB value is obtained by performing both image correction and low-pass processing when performing low-pass filter processing when performing correlation calculation on the signal before image correction of the reference image and reference image used for phase difference AF and the signal after image correction. Then, the average value of the ratio obtained from the six signals of the subsequent signals or the minimum value of the ratio is used. Also, the similarity between the standard image and the reference image is obtained by calculating the difference between the standard image and the reference image at the shift amount K at which the correlation value is minimized by the following equation (5) and using it as the similarity evaluation value.

類似性の評価値=Σabs(a−bj+k) … (5)
そしてCPU15は、PB値が所定値以上、類似性の評価値が所定値以下の場合に信頼性があると判定する。類似性の評価値は、上記の式(5)以外の式を用いても、両画像の類似性を評価するものであれば構わない。例えば、相関値が最小になったずらし量Kにおける両画像の重なり部分の基準画像または参照画像に対する比率を類似性の評価値としても良い。
Evaluation value of similarity = Σabs (a j −b j + k ) (5)
The CPU 15 determines that the reliability is reliable when the PB value is equal to or greater than a predetermined value and the similarity evaluation value is equal to or less than the predetermined value. The similarity evaluation value may be an expression other than the expression (5) described above, as long as it evaluates the similarity between both images. For example, the similarity evaluation value may be the ratio of the overlapping portion of both images to the standard image or reference image at the shift amount K at which the correlation value is minimized.

ステップS908において、CPU15は、相関量が零になる像ずらし量を演算する。相関値の演算は1画素ずつずらして行われているため、位相差AF処理回路30において演算された相関量が零になることは稀である。そこで、符号が異なる二つの相関量と、その相関量を与えるずらし量とに基づいて、相関量が零となる像ずらす量を求める。式(4)で相関量を計算した結果、K=lとK=l+1の間で相関量Uの符号が反転したとすると、直線補間により相関量が零となる像ずらす量δは、以下の式(6)のように求められる。 In step S908, the CPU 15 calculates an image shift amount that causes the correlation amount to be zero. Since the correlation value is calculated by shifting one pixel at a time, the correlation amount calculated by the phase difference AF processing circuit 30 is rarely zero. Therefore, an image shift amount for which the correlation amount becomes zero is obtained based on two correlation amounts having different signs and a shift amount that gives the correlation amount. As a result of calculating the correlation amount by the equation (4), if the sign of the correlation amount U k is inverted between K = 1 and K = 1 + 1, the image shift amount δ at which the correlation amount becomes zero by linear interpolation is It is calculated | required like Formula (6).

δ=l+|U|/[|U|+CUl+1|] … (6)
式(6)において、|z|はzの絶対値を意味する。
δ = l + | U l | / [| U l | + CU l + 1 |] (6)
In equation (6), | z | means the absolute value of z.

続いてステップS909において、CPU15は、以下の式(7)を用いて、像ずれ量δに基づいてプレディクション量Pを求める。   Subsequently, in step S909, the CPU 15 obtains a prediction amount P based on the image shift amount δ using the following equation (7).

P=δ―Δ … (7)
式(7)において、Δは合焦時の像ずれ量である。
P = δ−Δ (7)
In Expression (7), Δ is an image shift amount at the time of focusing.

そして、レンズ鏡筒31の特性に応じて決定される基線長を用いることにより、以下の式(8)で表されるように、プレディクション量Pを用いてデフォーカス量d(フォーカスレンズ群の移動量と方向)を算出する。   Then, by using the base line length determined according to the characteristics of the lens barrel 31, the defocus amount d (of the focus lens group) is used by using the predictive amount P as expressed by the following equation (8). (Movement amount and direction).

d=K・P … (8)
式(8)において、Kはプレディクション量をデフォーカス量に変換する係数である。この値は、レンズ鏡筒31の焦点距離、絞り4の値(絞り値)、および、像高等に依存する値である。このため、EEPROM25内にこれらをパラメータとするテーブルを用意しておき、そのテーブルを参照して値を求める。
d = K · P (8)
In Expression (8), K is a coefficient for converting the prediction amount into the defocus amount. This value depends on the focal length of the lens barrel 31, the value of the diaphragm 4 (aperture value), the image height, and the like. For this reason, a table having these as parameters is prepared in the EEPROM 25, and values are obtained by referring to the table.

ステップS907にて符号が反転していない場合等は、ステップS911へ進む。ステップS907において、CPU15は、相関値を求める演算の終端の値にずらし量がなったか(像ずらし位置が終端か)否かを判定する。像ずらし位置が終端でない場合、ステップS913へ進む。ステップS913において、CPU15は、取得した相関値を一時記録されていた相関値と差し替え、その後、像ずらし量kをk+1に更新する。一方、像ずらし位置が終端である場合、ステップS911へ進む。ステップS911において、CPU15は位相差AFがNGと判定し、本処理を終了する。   If the sign is not inverted in step S907, the process proceeds to step S911. In step S907, the CPU 15 determines whether or not the shift amount has been reached in the end value of the calculation for obtaining the correlation value (the image shift position is the end). If the image shift position is not the end, the process proceeds to step S913. In step S913, the CPU 15 replaces the acquired correlation value with the temporarily recorded correlation value, and then updates the image shift amount k to k + 1. On the other hand, if the image shift position is the end, the process proceeds to step S911. In step S911, the CPU 15 determines that the phase difference AF is NG, and ends this process.

本実施例においては、撮像センサ5の撮像面位相差AF画素が間欠的に配置されている場合、その機能を併用することで、より正確に合焦状態が維持されているかを判定することができる。また、一つのマイクロレンズに対して長方形の二つのフォトダイオードが配置された撮像センサを例に説明したが、位相差AFが可能な他の構造の撮像素子へも適用可能である。例えば、マイクロレンズの近傍に遮光幕を設けて射出瞳の一部の光束のみ光電変換部に入射する構造の撮像素子へも適用可能である。なお、各実施例ではコンパクトタイプのデジタルカメラを例に説明したが、各実施例はデジタルビデオカメラやデジタル一眼レフのライブビュー時のAFにも適用可能である。   In the present embodiment, when the imaging surface phase difference AF pixels of the imaging sensor 5 are intermittently arranged, it is possible to determine whether the in-focus state is more accurately maintained by using the function together. it can. Further, the image sensor in which two rectangular photodiodes are arranged for one microlens has been described as an example, but the present invention can also be applied to an image sensor having another structure capable of phase difference AF. For example, the present invention can also be applied to an image pickup device having a structure in which a light-shielding curtain is provided in the vicinity of a microlens so that only a part of a light beam of an exit pupil enters a photoelectric conversion unit. In each embodiment, a compact digital camera has been described as an example. However, each embodiment can also be applied to AF during a live view of a digital video camera or a digital single-lens reflex camera.

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

各実施例によれば、周波数特性の異なる画像のAF評価値の違いから合焦度合いを求めることにより、フォーカスレンズを移動せずに得られた画像に基づいて合焦が維持されているかを判定し、その判定結果に応じてAF制御を行う。このため各実施例によれば、表示画像の品位の低下を抑制しつつAF動作の高速化を実現することが可能な制御装置、撮像装置、制御方法、プログラム、および、記憶媒体を提供することができる。   According to each embodiment, by determining the degree of focus from the difference in AF evaluation values of images having different frequency characteristics, it is determined whether the focus is maintained based on the image obtained without moving the focus lens. Then, AF control is performed according to the determination result. Therefore, according to each embodiment, it is possible to provide a control device, an imaging device, a control method, a program, and a storage medium capable of realizing a high-speed AF operation while suppressing deterioration in display image quality. Can do.

以上、本発明の好ましい実施例について説明したが、本発明はこれらの実施例に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。   As mentioned above, although the preferable Example of this invention was described, this invention is not limited to these Examples, A various deformation | transformation and change are possible within the range of the summary.

14 スキャンAF処理回路(評価値生成手段)
15a 画像生成手段
15b 変化量算出手段
15c 判定手段
14 Scan AF processing circuit (evaluation value generating means)
15a Image generation means 15b Change amount calculation means 15c Determination means

Claims (16)

第1の周波数成分を含む第1の画像、および、前記第1の周波数成分よりも低い第2の周波数成分を含む第2の画像を生成する画像生成手段と、
前記第1の画像から第1の評価値を生成し、前記第2の画像から第2の評価値を生成する評価値生成手段と、
前記第1の評価値から前記第2の評価値への評価値の変化量を算出する変化量算出手段と、
前記変化量に基づいて画像の合焦度合いを判定する判定手段と、を有することを特徴とする制御装置。
Image generating means for generating a first image including a first frequency component and a second image including a second frequency component lower than the first frequency component;
Evaluation value generating means for generating a first evaluation value from the first image and generating a second evaluation value from the second image;
A change amount calculating means for calculating a change amount of the evaluation value from the first evaluation value to the second evaluation value;
Determining means for determining the degree of focus of the image based on the amount of change.
前記算出手段は、第1のタイミングで前記変化量として算出された第1の変化量と、第2のタイミングで前記変化量として算出された第2の変化量との差分を求め、
前記判定手段は、前記第1の変化量と前記第2の変化量との前記差分に基づいて、前記合焦度合いを判定することを特徴とする請求項1に記載の制御装置。
The calculating means obtains a difference between the first change amount calculated as the change amount at a first timing and the second change amount calculated as the change amount at a second timing;
The control device according to claim 1, wherein the determination unit determines the focus degree based on the difference between the first change amount and the second change amount.
前記第1のタイミングは合焦時であり、前記第2のタイミングは合焦維持判定時であることを特徴とする請求項2に記載の制御装置。   The control device according to claim 2, wherein the first timing is an in-focus time, and the second timing is an in-focus maintenance determination time. 前記判定手段は、
前記第1の変化量と前記第2の変化量との前記差分が第1の量である場合、前記合焦度合いが低いと判定し、
前記第1の変化量と前記第2の変化量との前記差分が前記第1の量よりも小さい第2の量である場合、前記合焦度合いが高いと判定することを特徴とする請求項2または3に記載の制御装置。
The determination means includes
When the difference between the first change amount and the second change amount is a first amount, it is determined that the degree of focus is low;
The focus degree is determined to be high when the difference between the first change amount and the second change amount is a second amount smaller than the first amount. The control device according to 2 or 3.
前記判定手段は、
前記第1の変化量と前記第2の変化量との前記差分が所定量よりも小さい場合、合焦状態が維持されていると判定し、
前記第1の変化量と前記第2の変化量との前記差分が前記所定量よりも大きい場合、前記合焦状態が維持されていないと判定することを特徴とする請求項2または3に記載の制御装置。
The determination means includes
When the difference between the first change amount and the second change amount is smaller than a predetermined amount, it is determined that the in-focus state is maintained,
The in-focus state is determined not to be maintained when the difference between the first change amount and the second change amount is greater than the predetermined amount. Control device.
前記判定手段は、撮影時の被写界深度に応じて、前記合焦状態が維持されていと判定する前記所定量を変更することを特徴とする請求項5に記載の制御装置。   The control device according to claim 5, wherein the determination unit changes the predetermined amount that determines that the in-focus state is maintained in accordance with a depth of field at the time of shooting. 前記判定手段は、
前記被写界深度が第1の被写界深度である場合、前記所定量を第1の所定量に設定し、
前記被写界深度が前記第1の被写界深度よりも深い第2の被写界深度である場合、前記所定量を前記第1の所定量よりも大きい第2の所定量に設定することを特徴とする請求項6に記載の制御装置。
The determination means includes
If the depth of field is a first depth of field, the predetermined amount is set to a first predetermined amount;
When the depth of field is a second depth of field that is deeper than the first depth of field, the predetermined amount is set to a second predetermined amount that is greater than the first predetermined amount. The control device according to claim 6.
前記画像生成手段は、
焦点調整のために合焦状態の異なる複数の画像を生成し、
前記判定手段により判定された前記合焦度合いに応じて、前記複数の画像の数を変更することを特徴とする請求項1乃至7のいずれか1項に記載の制御装置。
The image generating means includes
Generate multiple images with different focus states for focus adjustment,
The control device according to claim 1, wherein the number of the plurality of images is changed according to the degree of focus determined by the determination unit.
前記画像生成手段は、
前記合焦度合いが第1の値である場合、前記焦点調整のために取得する前記画像の数を第1の数に設定し、
前記合焦度合いが前記第1の値よりも高い第2の値である場合、前記焦点調整のために取得する前記画像の数を、前記第1の数よりも少ない第2の数に設定することを特徴とする請求項8に記載の制御装置。
The image generating means includes
When the degree of focus is the first value, the number of the images to be acquired for the focus adjustment is set to the first number,
When the degree of focus is a second value higher than the first value, the number of images to be acquired for the focus adjustment is set to a second number smaller than the first number. The control device according to claim 8.
前記変化量算出手段は、前記変化量として、前記第1の評価値および前記第2の評価値のそれぞれの変化率の和を算出し、
前記判定手段は、前記変化率の和に基づいて前記合焦度合いを判定することを特徴とする請求項1乃至9のいずれか1項に記載の制御装置。
The change amount calculating means calculates a sum of change rates of the first evaluation value and the second evaluation value as the change amount,
The control device according to claim 1, wherein the determination unit determines the degree of focus based on a sum of the change rates.
前記変化率は、前記第1の評価値と前記第2の評価値との差を、前記第1の評価値と前記第2の評価値との和で除算した値であることを特徴とする請求項10に記載の制御装置。   The rate of change is a value obtained by dividing the difference between the first evaluation value and the second evaluation value by the sum of the first evaluation value and the second evaluation value. The control device according to claim 10. 前記画像生成手段は、特定の周波数帯域の信号を抽出するフィルタを用いて第2の画像を生成することを特徴とする請求項1乃至11のいずれか1項に記載の制御装置。   The control device according to claim 1, wherein the image generation unit generates the second image using a filter that extracts a signal in a specific frequency band. 撮像光学系を介して形成された光学像を光電変換する撮像素子と、
前記撮像素子から出力された画像データに基づいて、第1の周波数成分を含む第1の画像、および、前記第1の周波数成分よりも低い第2の周波数成分を含む第2の画像を生成する画像生成手段と、
前記第1の画像から第1の評価値を生成し、前記第2の画像から第2の評価値を生成する評価値生成手段と、
前記第1の評価値から前記第2の評価値への評価値の変化量を算出する変化量算出手段と、
前記変化量に基づいて画像の合焦度合いを判定する判定手段と、を有することを特徴とする撮像装置。
An image sensor that photoelectrically converts an optical image formed via the imaging optical system;
Based on the image data output from the image sensor, a first image including a first frequency component and a second image including a second frequency component lower than the first frequency component are generated. Image generating means;
Evaluation value generating means for generating a first evaluation value from the first image and generating a second evaluation value from the second image;
A change amount calculating means for calculating a change amount of the evaluation value from the first evaluation value to the second evaluation value;
An image pickup apparatus comprising: a determination unit that determines an in-focus degree of an image based on the change amount.
第1の周波数成分を含む第1の画像、および、前記第1の周波数成分よりも低い第2の周波数成分を含む第2の画像を生成するステップと、
前記第1の画像から第1の評価値を生成し、前記第2の画像から第2の評価値を生成するステップと、
前記第1の評価値から前記第2の評価値への評価値の変化量を算出するステップと、
前記変化量に基づいて画像の合焦度合いを判定するステップと、を有することを特徴とする制御方法。
Generating a first image including a first frequency component and a second image including a second frequency component lower than the first frequency component;
Generating a first evaluation value from the first image and generating a second evaluation value from the second image;
Calculating a change amount of the evaluation value from the first evaluation value to the second evaluation value;
Determining the degree of focus of the image based on the amount of change.
第1の周波数成分を含む第1の画像、および、前記第1の周波数成分よりも低い第2の周波数成分を含む第2の画像を生成するステップと、
前記第1の画像から第1の評価値を生成し、前記第2の画像から第2の評価値を生成するステップと、
前記第1の評価値から前記第2の評価値への評価値の変化量を算出するステップと、
前記変化量に基づいて画像の合焦度合いを判定するステップと、をコンピュータに実行させることを特徴とするプログラム。
Generating a first image including a first frequency component and a second image including a second frequency component lower than the first frequency component;
Generating a first evaluation value from the first image and generating a second evaluation value from the second image;
Calculating a change amount of the evaluation value from the first evaluation value to the second evaluation value;
And causing the computer to execute a step of determining the degree of focus of the image based on the amount of change.
請求項15に記載のプログラムを記憶していることを特徴とする記憶媒体。
A storage medium storing the program according to claim 15.
JP2017132164A 2017-07-05 2017-07-05 Control device, imaging device, control method, program, and storage medium Pending JP2019015818A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017132164A JP2019015818A (en) 2017-07-05 2017-07-05 Control device, imaging device, control method, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017132164A JP2019015818A (en) 2017-07-05 2017-07-05 Control device, imaging device, control method, program, and storage medium

Publications (1)

Publication Number Publication Date
JP2019015818A true JP2019015818A (en) 2019-01-31

Family

ID=65358407

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017132164A Pending JP2019015818A (en) 2017-07-05 2017-07-05 Control device, imaging device, control method, program, and storage medium

Country Status (1)

Country Link
JP (1) JP2019015818A (en)

Similar Documents

Publication Publication Date Title
JP4674471B2 (en) Digital camera
JP4886210B2 (en) Imaging device
US8184192B2 (en) Imaging apparatus that performs an object region detection processing and method for controlling the imaging apparatus
JP5388544B2 (en) Imaging apparatus and focus control method thereof
JP6116277B2 (en) Imaging apparatus and control method thereof
US8823863B2 (en) Image capturing apparatus and control method therefor
JP4645413B2 (en) Imaging device
JP2010039284A (en) Image pick-up apparatus and control method therefor
JP5020643B2 (en) Imaging apparatus and control method thereof
US10015386B2 (en) Focus control apparatus, image capturing apparatus, interchangeable lens, focus control method, and storage medium storing focus control program
US9357124B2 (en) Focusing control device and controlling method of the same
JP6139960B2 (en) Imaging apparatus and control method thereof
JP2007133301A (en) Autofocus camera
JP6220144B2 (en) Focus adjustment apparatus and control method thereof
JP7289714B2 (en) FOCUS ADJUSTMENT DEVICE, IMAGING DEVICE, FOCUS ADJUSTMENT METHOD, AND PROGRAM
JP5780752B2 (en) Automatic focus adjustment device and automatic focus adjustment method
JP2019008005A (en) Control device, imaging apparatus, control method, program, and storage medium
JP2015152742A (en) Imaging device and control method thereof
JP2019015818A (en) Control device, imaging device, control method, program, and storage medium
JP6335503B2 (en) Imaging apparatus, control method therefor, program, and storage medium
JP2005208274A (en) Autofocusing camera
JP2009198975A (en) Focus adjustment device and focus adjustment method therefor
JP2015152830A (en) Imaging device and control method thereof, program, and storage medium
JP5106146B2 (en) Automatic focus adjustment device
JP6858022B2 (en) Focus detector, its control method and program, and imaging device