JP2010078681A - Automatic focus adjustment device and method, and program - Google Patents

Automatic focus adjustment device and method, and program Download PDF

Info

Publication number
JP2010078681A
JP2010078681A JP2008244319A JP2008244319A JP2010078681A JP 2010078681 A JP2010078681 A JP 2010078681A JP 2008244319 A JP2008244319 A JP 2008244319A JP 2008244319 A JP2008244319 A JP 2008244319A JP 2010078681 A JP2010078681 A JP 2010078681A
Authority
JP
Japan
Prior art keywords
focus adjustment
evaluation value
focus
calculated
frequency
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
JP2008244319A
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 JP2008244319A priority Critical patent/JP2010078681A/en
Publication of JP2010078681A publication Critical patent/JP2010078681A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an automatic focus adjustment device which estimates a focus lens position where an AF evaluated value becomes the maximum by spatial frequency in a high pass of an object which is not directly obtained by reason of addition readout of an imaging device. <P>SOLUTION: In an imaging apparatus, the AF evaluated value is calculated by a plurality of BPFs from a low pass to a high pass, to determine the focus lens position where the AF evaluated value becomes the maximum out of the respective AF evaluated values and simultaneously evaluate reliability of each of them. Then, the focus lens position where the AF evaluated value becomes the maximum in the spatial frequency of the object in the high pass lost by the addition readout of the imaging device is estimated from the focus lens position where the AF evaluated value becomes the maximum out of the plurality of AF evaluated values determined by the BPFs, whose reliability is equal to or above a prescribed value, and the estimated position is set as a focusing position. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、自動焦点調整装置および方法、並びにプログラムに関し、特に、撮影光学系により結像される被写体像を光電変換する撮像素子により取得される画像信号を使用して、焦点調整を行う自動焦点調整装置および方法、並びにプログラムに関するものである。   The present invention relates to an automatic focus adjustment apparatus, method, and program, and in particular, an automatic focus for performing focus adjustment using an image signal acquired by an image sensor that photoelectrically converts a subject image formed by a photographing optical system. The present invention relates to an adjustment apparatus and method, and a program.

従来、光学系の諸収差による自動焦点調整への影響を解決する手段として、例えば、被写体の持つ最適な測距方法をフィードバック可能な系で行えるようにして、合焦精度の向上を実現した自動合焦装置が提案されている(特許文献1参照)。この特許文献1には、色情報検出手段の検出情報及び/又はフォーカスレンズの特性情報により決まる所定の量だけずらした位置に、フォーカスレンズを駆動するようにフォーカスレンズ駆動手段を制御する点が記載されている。   Conventionally, as a means to solve the influence of various aberrations of the optical system on the automatic focus adjustment, for example, an automatic focusing system that has improved the focusing accuracy by enabling the optimum distance measurement method of the subject to be fed back. A focusing device has been proposed (see Patent Document 1). This patent document 1 describes that the focus lens driving unit is controlled to drive the focus lens to a position shifted by a predetermined amount determined by detection information of the color information detection unit and / or characteristic information of the focus lens. Has been.

また、低周波パターンを有する被写体や微細なパターンを有する高周波被写体に対しても焦点検出を可能とすると共に、検出精度も向上させるカメラの焦点検出装置が提案されている(特許文献2参照)。この特許文献2には、被写体像信号の空間周波数を所定値と比較し、その結果に基づいてサンプルピッチを選択し、サンプルピッチが選択された後の被写体像信号に基づいて、被写体像の焦点状態を検出することが記載されている。   In addition, a focus detection device for a camera has been proposed that enables focus detection even for a subject having a low frequency pattern or a high frequency subject having a fine pattern and improves detection accuracy (see Patent Document 2). This patent document 2 compares the spatial frequency of a subject image signal with a predetermined value, selects a sample pitch based on the result, and focuses the subject image on the basis of the subject image signal after the sample pitch is selected. Detecting the condition is described.

さらに、複数のフィルターを使い分けることにより、被写体に含まれる空間周波数成分に関わらず精度良く焦点調整が行える撮像装置が提案されている(特許文献3参照)。この特許文献3には、撮像素子で撮像された画像データから高周波成分を抽出して、その高周波成分に基づいて画像のコントラスト情報である焦点評価値を複数算出し、それらの焦点評価値に基づいて合焦レンズ位置を演算する点が記載されている。そして、粗サーチで取得された焦点評価値の最大値が所定値以上であった場合、粗サーチで用いたハイパスフィルターF1よりもカット周波数の高いハイパスフィルターF2を用いて高周波成分の抽出を行う点が記載されている。
特開2004−347665号公報 特開平11−14900号公報 特開2004−325517号公報
Furthermore, there has been proposed an imaging apparatus that can perform focus adjustment with high accuracy regardless of the spatial frequency component included in the subject by using a plurality of filters (see Patent Document 3). In Patent Document 3, a high-frequency component is extracted from image data captured by an image sensor, a plurality of focus evaluation values, which are contrast information of an image, are calculated based on the high-frequency component, and based on the focus evaluation values. The point of calculating the focusing lens position is described. When the maximum focus evaluation value acquired in the coarse search is equal to or greater than a predetermined value, high-frequency components are extracted using the high-pass filter F2 having a higher cut frequency than the high-pass filter F1 used in the coarse search. Is described.
JP 2004-347665 A Japanese Patent Laid-Open No. 11-14900 JP 2004-325517 A

上記特許文献1では、色情報検出手段の検出情報やフォーカスレンズの特性情報により決まる所定の量だけずらした位置にフォーカスレンズを駆動するように制御するので、この所定のずらし量の個体による違いや撮影環境による違いを吸収することができない。この違いを吸収するためには、後述するように、なるべく高域の空間周波数を持つ被写体に対して焦点調節を行うことが有効であるが、撮像素子の加算読み出しなどの理由により被写体の持つ高域の空間周波数のフォーカスレンズ位置特性を取得できない場合がある。この場合、異なる特性を持ち、複数の被写体の高域の空間周波数を抽出するフィルターを用い、その結果から得られる比較的低域の被写体の空間周波数のフォーカスレンズ位置特性から、被写体の空間周波数のフォーカスレンズ位置特性を推測することが有効である。   In the above-mentioned Patent Document 1, control is performed so that the focus lens is driven to a position shifted by a predetermined amount determined by the detection information of the color information detection means and the characteristic information of the focus lens. Cannot absorb differences due to shooting environment. In order to absorb this difference, as will be described later, it is effective to perform focus adjustment on a subject having a spatial frequency as high as possible. In some cases, it is not possible to acquire the focus lens position characteristic of the spatial frequency of the region. In this case, a filter that has different characteristics and extracts high spatial frequencies of a plurality of subjects is used, and the spatial frequency of the subject's spatial frequency is obtained from the focus lens position characteristics of the spatial frequency of the relatively low frequency subject obtained from the result. It is effective to estimate the focus lens position characteristics.

上記特許文献2には、被写体像を標本化するサンプルピッチが初期状態を含めて複数通りに選択できることが記載され、特許文献3には、複数のフィルターを使い分けることが記載されている。しかしながら、そのことを用いた上記所定のずらし量に関する問題点の解決に関しては一切に触れていない。   Patent Document 2 describes that a sample pitch for sampling a subject image can be selected in a plurality of ways including the initial state, and Patent Document 3 describes that a plurality of filters are used properly. However, no mention is made regarding the solution of the problem relating to the predetermined shift amount using this.

本発明は、撮像素子の加算読み出しなどの理由により、直接求めることができない被写体の持つ高域の空間周波数によるAF評価値が最大となるフォーカスレンズ位置を推測することができる自動焦点調整装置および方法、プログラムを提供することを目的とする。   The present invention relates to an automatic focus adjustment apparatus and method capable of estimating a focus lens position at which an AF evaluation value based on a high spatial frequency of a subject that cannot be obtained directly due to reasons such as addition reading of an image sensor is maximized. The purpose is to provide a program.

上記目的を達成するために、請求項1記載の自動焦点調整装置は、撮影光学系により結像される被写体像を光電変換して画像信号を得る撮像手段と、前記撮像手段に光電変換される被写体像の焦点を調整する焦点調整手段と、異なる特性を持ち、複数の被写体の高域の空間周波数を抽出する複数のフィルターを有し、前記焦点調整手段を駆動しながら前記撮像手段によって得られた画像信号から合焦位置を検出する合焦位置検出手段とを有する自動焦点調整装置において、前記合焦位置検出手段は、前記複数のフィルターでAF評価値を算出し、算出された各AF評価値からその信頼性を計算し、計算された信頼性が所定値以上のもののうち最も高域のフィルターを選択し、選択されたフィルターで算出されたAF評価値が最大となる焦点調整手段の駆動位置を算出する算出手段と、前記算出された焦点調整手段の駆動位置から、前記被写体の高域の空間周波数におけるAF評価値が最大となる焦点調整手段の駆動位置を推測し、当該駆動位置に前記焦点調整手段を駆動するように制御する制御手段とを備えることを特徴とする。   In order to achieve the above object, an automatic focus adjustment apparatus according to claim 1 is an image pickup unit that photoelectrically converts an object image formed by a shooting optical system to obtain an image signal, and is photoelectrically converted by the image pickup unit. Focus adjustment means for adjusting the focus of the subject image, and a plurality of filters having different characteristics and extracting high-frequency spatial frequencies of a plurality of subjects, and obtained by the imaging means while driving the focus adjustment means. And an in-focus position detecting means for detecting an in-focus position from the image signal. The in-focus position detecting means calculates an AF evaluation value with the plurality of filters, and calculates each AF evaluation value. The reliability is calculated from the value, and the highest-frequency filter is selected from among those whose calculated reliability is equal to or greater than a predetermined value, and the AF evaluation value calculated by the selected filter is maximized. From the calculation means for calculating the drive position of the means and the calculated drive position of the focus adjustment means, the drive position of the focus adjustment means that maximizes the AF evaluation value at the spatial frequency in the high frequency range of the subject is estimated. And a control means for controlling the focus adjusting means to drive at the driving position.

上記目的を達成するために、請求項11記載の自動焦点調整方法は、撮影光学系により結像される被写体像を光電変換して画像信号を得る撮像手段と、前記撮像手段に光電変換される被写体像の焦点を調整する焦点調整手段と、異なる特性を持ち、複数の被写体の高域の空間周波数を抽出する複数のフィルターを有し、前記焦点調整手段を駆動しながら前記撮像手段によって得られた画像信号から合焦位置を検出する合焦位置検出手段とを有する自動焦点調整装置の自動焦点調整方法において、前記複数のフィルターでAF評価値を算出し、算出された各AF評価値からその信頼性を計算し、計算された信頼性が所定値以上のもののうち最も高域のフィルターを選択し、選択されたフィルターで算出されたAF評価値が最大となる焦点調整手段の駆動位置を算出する算出ステップと、前記算出された焦点調整手段の駆動位置から、前記被写体の高域の空間周波数におけるAF評価値が最大となる焦点調整手段の駆動位置を推測し、当該駆動位置に前記焦点調整手段を駆動するように制御する制御ステップとを備えることを特徴とする。   In order to achieve the above object, an automatic focus adjustment method according to an eleventh aspect of the present invention is an image pickup means for obtaining an image signal by photoelectrically converting a subject image formed by a photographing optical system, and photoelectric conversion by the image pickup means. Focus adjustment means for adjusting the focus of the subject image, and a plurality of filters having different characteristics and extracting high-frequency spatial frequencies of a plurality of subjects, and obtained by the imaging means while driving the focus adjustment means. In the automatic focus adjustment method of the automatic focus adjustment apparatus having a focus position detection means for detecting a focus position from the obtained image signal, an AF evaluation value is calculated by the plurality of filters, and the AF evaluation value is calculated from the calculated AF evaluation values. The focus is adjusted by calculating the reliability, selecting the highest frequency filter among those with the calculated reliability equal to or higher than the predetermined value, and maximizing the AF evaluation value calculated by the selected filter. A driving position of the focus adjusting unit that maximizes an AF evaluation value at a spatial frequency in the high frequency range of the subject is estimated from the calculating step of calculating the driving position of the focus adjusting unit, and the calculated driving position of the focus adjusting unit, And a control step for controlling the focus adjusting means to drive the position.

本発明によれば、複数のフィルターで算出された各AF評価値からその信頼性を計算し、該信頼性が所定値以上のもののうち最も高域のフィルターを選択し、選択されたフィルターで算出されたAF評価値が最大となる焦点調整手段の駆動位置を算出する。算出された焦点調整手段の駆動位置から、被写体の高域の空間周波数におけるAF評価値が最大となる焦点調整手段の駆動位置を推測し、当該駆動位置に前記焦点調整手段を駆動するように制御する。これにより、撮像素子の加算読み出しなどの理由により、直接求めることができない被写体の持つ高域の空間周波数によるAF評価値が最大となるフォーカスレンズ位置を推測することができる。   According to the present invention, the reliability is calculated from each AF evaluation value calculated by a plurality of filters, the highest-frequency filter is selected from those having a reliability equal to or higher than a predetermined value, and the calculation is performed by the selected filter. The driving position of the focus adjusting means that maximizes the AF evaluation value is calculated. From the calculated drive position of the focus adjustment means, the drive position of the focus adjustment means that maximizes the AF evaluation value at the high spatial frequency of the subject is estimated, and control is performed so that the focus adjustment means is driven to the drive position. To do. As a result, it is possible to estimate the focus lens position at which the AF evaluation value by the high spatial frequency of the subject that cannot be directly obtained due to the addition reading of the image sensor or the like is maximized.

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

[第1の実施形態]
図1は、本発明の第1の実施形態に係る撮像装置の内部構成を示すブロック図である。
[First Embodiment]
FIG. 1 is a block diagram showing an internal configuration of the imaging apparatus according to the first embodiment of the present invention.

1は撮像装置、2はズームレンズ群、3は焦点調整手段としてのフォーカスレンズ群である。4はズームレンズ群2、フォーカスレンズ群3等からなる撮影光学系を透過する光束の量を制御する光量調節手段であって、露出手段としての絞りである。31は、ズームレンズ群2、フォーカスレンズ群3、絞り4等からなる撮影レンズ鏡筒であり、先端部に焦点距離を変換するためのコンバージョンレンズを取り付けるための部材を有している。   Reference numeral 1 denotes an image pickup apparatus, 2 denotes a zoom lens group, and 3 denotes a focus lens group as a focus adjusting unit. Reference numeral 4 denotes a light amount adjusting means for controlling the amount of the light beam transmitted through the photographing optical system including the zoom lens group 2, the focus lens group 3, and the like, and is a stop as an exposure means. A photographing lens barrel 31 includes a zoom lens group 2, a focus lens group 3, a diaphragm 4, and the like, and has a member for attaching a conversion lens for converting a focal length at a tip portion.

5は撮影光学系を透過した被写体像が結像し、これを光電変換して画像信号を出力する撮像手段としての固体撮像素子(以下「CCD」とよぶ。)である。6はCCD5によって光電変換された電気信号を受けて各種の画像処理を施すことにより所定の画像信号を生成する撮像回路である。7は撮像回路6により生成されたアナログ画像信号をデジタル画像信号に変換するA/D変換回路である。   Reference numeral 5 denotes a solid-state imaging device (hereinafter referred to as “CCD”) as imaging means for forming a subject image that has passed through the photographing optical system and photoelectrically converting the image to output an image signal. An imaging circuit 6 generates a predetermined image signal by receiving an electrical signal photoelectrically converted by the CCD 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.

8はA/D変換回路7からの出力を受けて画像信号を一時的に記憶するバッファメモリ等のメモリ(VRAM)である。9は、VRAM8に記憶された画像信号を読み出してアナログ信号に変換すると共に、再生出力に適する形態の画像信号に変換するD/A変換回路である。   Reference numeral 8 denotes a memory (VRAM) such as a buffer memory that receives an output from the A / D conversion circuit 7 and temporarily stores an image signal. Reference numeral 9 denotes a D / A conversion circuit that reads out 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.

10はこの画像信号を表示する液晶表示装置(LCD)等の画像表示装置(以下、「LCD」と呼ぶ。)である。12は半導体メモリ等からなる画像データを記憶する記憶用メモリである。11は圧縮回路と伸張回路とから成る圧縮伸長回路である。この圧縮回路は、VRAM8に一時格納された画像信号を読み出して記憶用メモリ12への記憶に適した形態にするための画像データの圧縮処理や符号化処理を施す。伸張回路は、記憶用メモリ12に記憶された画像データを再生表示するのに最適な形態とするための復号化処理や伸長処理等を施す。   Reference numeral 10 denotes an image display device (hereinafter referred to as “LCD”) such as a liquid crystal display device (LCD) for displaying the image signal. Reference numeral 12 denotes a storage memory that stores image data including a semiconductor memory or the like. A compression / decompression circuit 11 includes a compression circuit and an expansion circuit. This compression circuit reads the image signal temporarily stored in the VRAM 8 and performs a compression process and an encoding process on the image data to make it suitable for storage in the storage memory 12. The decompression circuit performs a decoding process, a decompression process, and the like for making the image data stored in the storage memory 12 optimal for reproducing and displaying.

13はA/D変換回路7からの出力を受けて自動露出(AE)処理を行うAE処理回路である。14はA/D変換回路7からの出力を受けて自動焦点調整(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 performs automatic exposure (AE) processing. A scan AF processing circuit 14 receives an output from the A / D conversion circuit 7 and performs an automatic focus adjustment (AF) process. Reference numeral 15 denotes a CPU with a built-in memory for controlling the image pickup apparatus 1.

16は所定のタイミング信号を発生するタイミングジェネレータ(TG)である。17はCCDドライバーである。21は絞り4を駆動する絞り駆動モータである。18は絞り駆動モータ21を駆動制御する第一モータ駆動回路である。22はフォーカスレンズ群3を駆動するフォーカス駆動モータである。19はフォーカス駆動モータ22を駆動制御する第二モータ駆動回路である。23はズームスレンズ群2を駆動するズーム駆動モータである。20はズーム駆動モータ23を駆動制御する第三モータ駆動回路である。24は各種のスイッチ群からなる操作スイッチである。   Reference numeral 16 denotes a timing generator (TG) that generates a predetermined timing signal. Reference numeral 17 denotes a CCD driver. 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. An operation switch 24 includes various switch groups.

25は各種制御等を行うプログラムや各種動作を行わせるために使用するデータ等が予め記憶されている電気的に書き換え可能な読み出し専用メモリであるEEPROMである。26は電池である。28はストロボ発光部である。27はストロボ発光部28の閃光発光を制御するスイッチング回路である。29は警告表示などを行うLEDなどの表示素子である。30は音声によるガイダンスや警告などを行うためのスピーカーである。33はLEDなどの光源で構成されるAF補助光である。33はAF補助光32を駆動するためのAF補助光駆動回路である。34はコンバージョンレンズ取付け検出スイッチである。   An EEPROM 25 is an electrically rewritable read-only memory in which programs for performing various controls, data used for performing various operations, and the like are stored in advance. 26 is a battery. Reference numeral 28 denotes a strobe light emitting unit. Reference numeral 27 denotes a switching circuit for controlling the flash emission of the strobe light emitting unit 28. Reference numeral 29 denotes a display element such as an LED for displaying a warning. Reference numeral 30 denotes a speaker for voice guidance and warning. Reference numeral 33 denotes AF auxiliary light composed of a light source such as an LED. Reference numeral 33 denotes an AF auxiliary light driving circuit for driving the AF auxiliary light 32. Reference numeral 34 denotes a conversion lens mounting detection switch.

なお、画像データ等の記憶用メモリは、フラッシュメモリ等の固定型の半導体メモリやカード形状やスティック形状から成り、装置に対して着脱自在に形成されるカード型フラッシュメモリ等の半導体メモリであってもよい。また、ハードディスクやフロッピィ−ディスク等の磁気記憶媒体等であってもよく、様々な形態のものが適用される。   The memory for storing image data or the like is a fixed type semiconductor memory such as a flash memory or a semiconductor memory such as a card type flash memory which is formed in a card shape or stick shape and is detachable from the apparatus. Also good. Further, it may be a magnetic storage medium such as a hard disk or a floppy disk, and various forms are applied.

操作スイッチ24には、装置本体を起動させ電源供給を行うための主電源スイッチや撮影動作(記憶動作)等を開始させるレリーズスイッチ、再生動作を開始させる再生スイッチ、撮影光学系のズームレンズ群2を移動させズームを行わせるズームスイッチ等がある。そして、レリーズスイッチは、撮影動作に先立ち行われるAE処理、AF処理を開始させる指示信号を発生する第一ストローク(SW1)と実際の露光動作を開始させる指示信号を発生する第二ストローク(SW2)との二段スイッチにより構成される。   The operation switch 24 includes a main power switch for starting the apparatus main body and supplying power, a release switch for starting a photographing operation (storage operation), a reproducing switch for starting a reproducing operation, and a zoom lens group 2 of the photographing optical system. There is a zoom switch for moving the zoom and zooming. The release switch then performs a first stroke (SW1) for generating an instruction signal for starting an AE process and an AF process performed prior to the photographing operation, and a second stroke (SW2) for generating an instruction signal for starting an actual exposure operation. And a two-stage switch.

次に、撮像装置1における基本的な撮像動作を説明する。   Next, a basic imaging operation in the imaging apparatus 1 will be described.

まず、撮像装置1の撮影レンズ鏡筒31を透過した被写体光束は、絞り部4によってその光量が調整された後、CCD5の受光面に結像される。この被写体像は、CCD5による光電変換処理により電気的な信号に変換され、撮像回路6に出力される。撮像回路6では、入力した信号に対して各種の信号処理が施され、所定の画像信号が生成される。この画像信号は、A/D変換回路7に出力され、デジタル信号(画像データ)に変換された後、VRAM8に一時的に格納される。   First, the light flux of the subject that has passed through the photographing lens barrel 31 of the image pickup apparatus 1 is adjusted on the light amount by the diaphragm 4 and then imaged on the light receiving surface of the CCD 5. This subject image is converted into an electrical signal by photoelectric conversion processing by the CCD 5 and output to the imaging circuit 6. In the imaging circuit 6, various signal processing is performed on the input signal, and a predetermined image signal is generated. This image signal is output to the A / D conversion circuit 7, converted into a digital signal (image data), and then temporarily stored in the VRAM 8.

VRAM8に格納された画像データは、D/A変換回路9へ出力され、アナログ信号に変換され、表示するのに適した形態の画像信号に変換された後、LCD10に画像として表示される。一方、VRAM8に格納された画像データは、圧縮伸長回路11にも出力される。この圧縮伸長回路11における圧縮回路によって圧縮処理が行われた後、記憶に適した形態の画像データに変換され、記憶用メモリ12に記憶される。   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. On the other hand, the image data stored in the VRAM 8 is also output to the compression / decompression circuit 11. After compression processing is performed by the compression circuit in the compression / decompression circuit 11, it is converted into image data in a form suitable for storage and stored in the storage memory 12.

例えば、操作スイッチ24のうち不図示の再生スイッチが操作されてオン状態になると、再生動作が開始される。すると、記憶用メモリ12に圧縮された形で記憶された画像データは、圧縮伸長回路11に出力され、伸長回路において復号化処理や伸長処理等が施された後、VRAM8に出力され一時的に記憶される。さらに、この画像データは、D/A変換回路9へ出力され、アナログ信号に変換され、表示するのに適した形態の画像信号に変換された後、LCD10に画像として表示される。他方、A/D変換回路7によってデジタル化された画像データは、上述のVRAM8とは別にAE処理回路13及びスキャンAF処理回路14に対しても出力される。   For example, when a reproduction switch (not shown) of the operation switches 24 is operated and turned on, the reproduction operation is started. Then, the image data stored in a compressed form in the storage memory 12 is output to the compression / expansion circuit 11, subjected to decoding processing, expansion processing, and the like in the expansion circuit, and then output to the VRAM 8 and temporarily. Remembered. Further, this image data 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 as an image on the LCD 10. On the other hand, the image data digitized by the A / D conversion circuit 7 is output to the AE processing circuit 13 and the scan AF processing circuit 14 separately from the VRAM 8 described above.

AE処理回路13においては、入力されたデジタル画像信号を受けて、一画面分の画像データの輝度値に対して累積加算等の演算処理が行われる。これにより、被写体の明るさに応じたAE評価値が算出される。このAE評価値はCPU15に出力される。   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は、入力されたデジタル画像信号を受けて、画像データの高周波成分をハイパスフィルター(HPF)等により抽出し、さらに累積加算等の演算処理を行い、高域側の輪郭成分量等に対応するAF評価値を算出する。具体的には、スキャンAF処理回路14は、合焦位置検出手段として、AF領域として指定された画面の一部分の領域に相当する画像データの高周波成分をハイパスフィルター(HPF)等を用いて抽出し、さらに累積加算等の演算処理を行う。これにより、高域側の輪郭成分量等に対応するAF評価値が算出される。このAF領域は、中央部分の一箇所である場合や中央部分とそれに隣接する複数箇所である場合、離散的に分布する複数箇所である場合などがある。   The scan AF processing circuit 14 receives the input digital image signal, extracts a high-frequency component of the image data by a high-pass filter (HPF) or the like, and further performs arithmetic processing such as cumulative addition, and the contour component amount on the high frequency side An AF evaluation value corresponding to the above is calculated. Specifically, the scan AF processing circuit 14 uses a high-pass filter (HPF) or the like to extract high-frequency components of image data corresponding to a partial area of the screen designated as the AF area as a focus position detection unit. Further, arithmetic processing such as cumulative addition is performed. Thereby, an AF evaluation value corresponding to the contour component amount on the high frequency side is calculated. The AF area may be a single location in the central portion, a central portion and a plurality of locations adjacent thereto, or a plurality of locations distributed discretely.

CCDや回路系で重畳されるノイズ成分をキャンセルするために、高域側の輪郭成分量等を抽出するハイパスフィルター(HPF)の前にローパスフィルターを通すことが一般的である。従って、スキャンAF処理回路14は、実際には、高域側の輪郭成分量等に対応するAF評価値を算出するバンドパスフィルター(BPF)として構成されている。このようにスキャンAF処理回路14は、AF処理を行う過程において、CCD5によって生成された画像信号から所定の高周波成分を検出する高周波成分検出手段の役割を担っている。スキャンAF処理回路14は、フォーカスレンズの特性により決まる所定の補正量(ベストピント補正量:BP補正量と略す)の個体による違いや撮影環境による違いを吸収すべく、異なる特性を持ち、複数の被写体の高域の空間周波数を抽出するBPFを有する。   In order to cancel a noise component superimposed on a CCD or a circuit system, a low-pass filter is generally passed before a high-pass filter (HPF) that extracts a contour component amount on the high frequency side. Accordingly, the scan AF processing circuit 14 is actually configured as a band pass filter (BPF) that calculates an AF evaluation value corresponding to the contour component amount on the high frequency side. As described above, the scan AF processing circuit 14 plays a role of high-frequency component detection means for detecting a predetermined high-frequency component from the image signal generated by the CCD 5 in the process of performing the AF processing. The scan AF processing circuit 14 has different characteristics so as to absorb a difference between individuals and a predetermined correction amount (best focus correction amount: abbreviated as BP correction amount) determined by the characteristics of the focus lens, and a difference depending on the shooting environment. It has a BPF that extracts the high frequency of the subject.

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

CPU15は、第一モータ駆動回路18、第二モータ駆動回路19、及び第三モータ駆動回路20をそれぞれ制御する。これにより、絞り駆動モータ21、フォーカス駆動モータ22、及びズーム駆動モータ23を介して、絞り4、フォーカスレンズ群3、及びズームスレンズ群2を駆動制御する。すなわち、CPU15は、AE処理回路13において算出されたAE評価値等に基づき第一モータ駆動回路18を制御して絞り駆動モータ21を駆動し、絞り4の絞り量を適正になるように調整するAE制御を行う。   The CPU 15 controls the first motor drive circuit 18, the second motor drive circuit 19, and the third motor drive circuit 20, respectively. Accordingly, the diaphragm 4, the focus lens group 3, and the zoom lens group 2 are driven and controlled 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 and adjust the aperture amount of the aperture 4 so as to be appropriate. AE control is performed.

また、CPU15は、スキャンAF処理回路14において算出されるAF評価値に基づき第二モータ駆動回路19を制御してフォーカス駆動モータ22を駆動し、フォーカスレンズ群3を合焦位置に移動させるAF制御を行う。また、マニュアルフォーカスに設定されているときは、操作スイッチ24のうち不図示のフォーカス駆動指示部材が操作された際に、その操作量に応じて第二モータ駆動回路19を制御してフォーカス駆動モータ22を駆動し、フォーカスレンズ群3を移動させる。また、操作スイッチ24のうち不図示のズームスイッチが操作された場合は、これを受けてCPU15は、第三モータ駆動回路20を制御してズーム駆動モータ23を駆動制御することによりズームレンズ群2を移動させ、撮影光学系の変倍動作(ズーム動作)を行う。   Further, the CPU 15 controls the second motor drive circuit 19 based on the AF evaluation value calculated by the scan AF processing circuit 14 to drive the focus drive motor 22 to move the focus lens group 3 to the in-focus position. I do. When manual focus is set, when a focus drive instruction member (not shown) of the operation switch 24 is operated, the second motor drive circuit 19 is controlled in accordance with the operation amount to control the focus drive motor. 22 is driven to move the focus lens group 3. When a zoom switch (not shown) among the operation switches 24 is operated, the CPU 15 receives this and controls the third motor drive circuit 20 to drive the zoom drive motor 23, thereby controlling the zoom lens group 2. Is moved to perform a zooming operation of the photographing optical system.

次に、撮像装置1における撮影動作の流れを図2を参照して説明する。   Next, the flow of the photographing operation in the imaging apparatus 1 will be described with reference to FIG.

図2は、撮像装置1における撮影動作の流れを示すフローチャートである。   FIG. 2 is a flowchart showing the flow of the shooting operation in the imaging apparatus 1.

撮像装置1の主電源スイッチがオン状態であり、かつ撮像装置の動作モードが撮影(録画)モードにあるときは、図示の撮影処理シーケンスが実行される。   When the main power switch of the imaging apparatus 1 is in the on state and the operation mode of the imaging apparatus is in the imaging (recording) mode, the imaging process sequence shown in the drawing is executed.

まず、ステップS1において、CPU15は、撮影レンズ鏡筒31を透過してCCD5上に結像した被写体像をLCD10に画像として表示する。すなわち、CCD5上に結像した被写体像は、CCD5により光電変換処理され電気的な信号に変換された後、撮像回路6に出力される。そこで入力した信号に対して各種の信号処理が施され、所定の画像信号が生成された後、A/D変換回路7に出力されデジタル信号(画像データ)に変換されVRAM8に一時的に格納される。VRAM8に格納された画像データは、D/A変換回路9へ出力されアナログ信号に変換され、表示するのに適した形態の画像信号に変換された後、LCDに画像として表示される。   First, in step S <b> 1, the CPU 15 displays the subject image formed on the CCD 5 through the photographing lens barrel 31 as an image on the LCD 10. That is, the subject image formed on the CCD 5 is photoelectrically converted by the CCD 5 and converted into an electrical signal, and then output to the imaging circuit 6. Therefore, various signal processing is performed on the input signal to generate a predetermined image signal, which is then output to the A / D conversion circuit 7 to be converted into a digital signal (image data) and temporarily stored in the VRAM 8. The 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 as an image on the LCD.

次に、ステップS2において、CPU15は、レリーズスイッチの状態を確認する。撮影者によってレリーズスイッチが操作され、SW1がオン状態になったことをCPU15が確認すると、次のステップS3に進み、通常のAE処理が実行される。続いて、ステップS4においてスキャンAF処理が行われる。   Next, in step S2, the CPU 15 confirms the state of the release switch. When the release switch is operated by the photographer and the CPU 15 confirms that the SW1 is turned on, the process proceeds to the next step S3, and normal AE processing is executed. Subsequently, a scan AF process is performed in step S4.

ステップS4では、CPU15は、設定された特性の異なる複数のBPFにより、フォーカスレンズ群3の位置ごとのAF評価値を算出し、その値からそれぞれのBPFにおけるAF評価値がピークとなるフォーカスレンズ群3の位置を求める。同時に、各BPFで得られたAF評価値の信頼性を計算する。その信頼性が所定値以上のBPFにより求めたフォーカスレンズ群3のピーク位置から、撮像素子の加算読み出し等により失われた高域の被写体の空間周波数におけるAF評価値がピークとなるフォーカスレンズ群3の位置を推測し、その位置を合焦位置とする。但し、信頼性が所定値以上のAF評価値が得られたBPFが1つの場合は推測を行わない。   In step S4, the CPU 15 calculates an AF evaluation value for each position of the focus lens group 3 using a plurality of BPFs having different set characteristics, and the focus lens group in which the AF evaluation value at each BPF peaks from the calculated value. The position of 3 is obtained. At the same time, the reliability of the AF evaluation value obtained with each BPF is calculated. The focus lens group 3 in which the AF evaluation value at the spatial frequency of the high frequency object lost by the addition reading of the image sensor or the like becomes a peak from the peak position of the focus lens group 3 obtained by the BPF whose reliability is a predetermined value or more. The position is estimated, and the position is set as the in-focus position. However, when there is one BPF for which an AF evaluation value with reliability equal to or higher than a predetermined value is obtained, no estimation is performed.

信頼性が所定値以上のAF評価値が得られたBPFにおけるAF評価値がピークとなる位置に、後述する方法でBP補正量を求め、それを加味した位置にフォーカスレンズ群3を駆動する。いずれかのBPFにおける信頼性が十分であれば、CPU15は、ステップS5においてAFOK表示を行う。これは表示素子29を点灯することなどにより行うと同時にLCD上に緑の枠を表示するなどの処理を行う。   A BP correction amount is obtained by a method to be described later at a position where the AF evaluation value in the BPF at which the AF evaluation value having a reliability equal to or higher than a predetermined value is obtained, and the focus lens group 3 is driven to a position that takes this into consideration. If the reliability of any BPF is sufficient, the CPU 15 performs AFOK display in step S5. This is performed by turning on the display element 29 or the like, and at the same time, processing such as displaying a green frame on the LCD.

また、ステップS4において、全てのBPFで得られたAF評価値の信頼性が低い場合には、CPU15は、AF評価値が最大値となる点を求める処理は行わず、ステップS5に進み、AFNG表示を行う。これは表示素子29を点滅表示することなどにより行うと同時にLCD上に黄色の枠を表示するなどの処理を行う。   If the reliability of the AF evaluation values obtained for all BPFs is low in step S4, the CPU 15 proceeds to step S5 without performing processing for obtaining a point at which the AF evaluation value is the maximum value, and AFNG Display. This is performed by, for example, blinking the display element 29, and simultaneously performing processing such as displaying a yellow frame on the LCD.

ステップS6において、CPU15は、SW2(レリーズスイッチの第二ストローク)の確認を行い、SW2がオンになっていたならば、ステップS7に進み、実際の露光処理を実行する。   In step S6, the CPU 15 confirms SW2 (second stroke of the release switch). If SW2 is on, the CPU 15 proceeds to step S7 and executes actual exposure processing.

次に、ステップS4における合焦位置を検出するためのスキャンAF処理の概略を図3を用いて説明する。   Next, an outline of the scan AF process for detecting the in-focus position in step S4 will be described with reference to FIG.

図3は、画像信号から検出される高周波成分とフォーカスレンズ群3の関係の一例を示す図である。   FIG. 3 is a diagram illustrating an example of the relationship between the high-frequency component detected from the image signal and the focus lens group 3.

スキャンAF処理は、CCD5によって生成された画像信号から検出される高周波成分がそれぞれのBPFにおいて最も多くなるフォーカスレンズ群3の位置を求めることにより行われる。実際には、一度のフォーカスレンズ群3の移動で複数のBPFにおけるデータが取得されて処理が行われるが、図3では、図を見やすくするため一つのBPFに関する出力波形のみを示すこととする。   The scan AF process is performed by obtaining the position of the focus lens group 3 where the high frequency component detected from the image signal generated by the CCD 5 is the largest in each BPF. Actually, data in a plurality of BPFs are acquired and processed by a single movement of the focus lens group 3, but in FIG. 3, only the output waveform relating to one BPF is shown for the sake of clarity.

CPU15は、フォーカス駆動モータ22を駆動制御する第二モータ駆動回路19を介してフォーカス駆動モータ22を制御する。そして、フォーカスレンズ群3を無限遠に相当する位置(図3における「A」)から各々の撮影モードにおいて設定される至近距離に相当する位置(図3における「B」)まで駆動する。駆動しながらスキャンAF処理回路14の出力(AF評価値)を設定された複数のBPFごとに取得し、フォーカスレンズ群3の駆動が終了した時点で取得したAF評価値から、複数のBPFごとにそれが最大になる位置(図3における「C」)を求める。このスキャンAF処理回路14の出力の取得は、スキャンAFの高速化のために、全てのフォーカスレンズ群3の停止位置については行わず、所定にステップごとに行う。このとき、図3に示す点a1,a2,a3においてAF評価値を取得することがありうる。このような場合は、AF評価値が最大値となった点とその前後の点から合焦位置Cを計算にて求めている。   The CPU 15 controls the focus drive motor 22 via the second motor drive circuit 19 that controls the drive of the focus drive motor 22. Then, the focus lens group 3 is driven from a position corresponding to infinity (“A” in FIG. 3) to a position corresponding to the closest distance set in each photographing mode (“B” in FIG. 3). While driving, the output (AF evaluation value) of the scan AF processing circuit 14 is acquired for each of a plurality of set BPFs, and from the AF evaluation value acquired when the driving of the focus lens group 3 is completed, for each of a plurality of BPFs. The position where it becomes the maximum (“C” in FIG. 3) is obtained. The acquisition of the output of the scan AF processing circuit 14 is performed for each predetermined step without performing the stop positions of all the focus lens groups 3 in order to increase the speed of the scan AF. At this time, AF evaluation values may be obtained at points a1, a2, and a3 shown in FIG. In such a case, the in-focus position C is obtained by calculation from the point where the AF evaluation value becomes the maximum value and the points before and after the AF evaluation value.

次に、本実施形態における、合焦位置(CCD5の読み出し時に画素加算処理が行われることなどにより失われた被写体の高域成分がピークとなるフォーカスレンズ群3の位置)を推測する方法について説明する。   Next, a method for estimating the in-focus position (the position of the focus lens group 3 at which the high frequency component of the subject lost due to the pixel addition process being performed when the CCD 5 is read) in the present embodiment will be described. To do.

一般に光学系の球面収差などが生じると、被写体の周波数に応じたピント位置が異なる。よって、異なる特性を持ち、複数の被写体の高域の空間周波数を抽出するフィルターを用いて、フォーカスレンズ群3を駆動しながらAF評価値を算出すると、例えば、図4に示すようになる。   In general, when spherical aberration or the like of the optical system occurs, the focus position differs according to the frequency of the subject. Therefore, when the AF evaluation value is calculated while driving the focus lens group 3 using a filter having different characteristics and extracting high-frequency spatial frequencies of a plurality of subjects, for example, as shown in FIG.

図4には、ナイキスト周波数の6.7%、13.3%、16.7%、26.7%、50%、80%でフィルターの透過率が最大となるような特性を持つBPFにおけるフォーカス位置とベストピント位置(合焦位置)の関係を示す。   FIG. 4 shows a focus in a BPF having such characteristics that the transmittance of the filter becomes maximum at 6.7%, 13.3%, 16.7%, 26.7%, 50%, and 80% of the Nyquist frequency. The relationship between the position and the best focus position (focus position) is shown.

図4に示すように、フィルターの周波数特性が異なると、AF評価値が最大となる位置が異なり、BPFの透過率が最大となる周波数が高くなるほど、左側(すなわちピントとしては近いものにピントを合わせる側)にAF評価値が最大になる位置が分布している。この分布の仕方はフォーカスレンズ群3を含む撮影レンズ鏡筒31の特性によるものであるため、必ず図4のようになるとは限らない。逆の特性になる場合もあれば、その差が小さくほとんど同じ位置にAF評価値が最大になる位置が分布する場合もある。また、その量は、撮影レンズ鏡筒31の変倍に伴う焦点距離や撮影距離などによっても異なることがある。   As shown in FIG. 4, when the frequency characteristics of the filter are different, the position where the AF evaluation value is maximized is different, and the higher the frequency at which the BPF transmittance is maximized, the more the focus is on the left side (that is, the closer to the focus). The position where the AF evaluation value is maximized is distributed on the matching side. This distribution is due to the characteristics of the photographic lens barrel 31 including the focus lens group 3, and therefore is not always as shown in FIG. In some cases, the characteristics are reversed, and in other cases, the positions where the difference is small and the AF evaluation value is maximized are distributed at almost the same position. In addition, the amount may vary depending on the focal length, the shooting distance, and the like accompanying the zooming of the taking lens barrel 31.

従って、我々が自動焦点調整動作を行う場合は、なるべく高い周波数においてフィルターの透過率が最大となるものを用いる。そのAF評価値が最大になる位置へフォーカスレンズ群3を駆動すれば、撮影者が見た目でベストのピント位置と感じるフォーカスレンズ群3の位置を得ることが可能になる。これは空間周波数の高い被写体と低い被写体が混在する被写体を撮影した場合、空間周波数の低い被写体は多少ベストピント位置からずれていても像がボケていると感じないが、空間周波数の高い被写体の場合は僅かなずれでも像がボケていると感じやすいからである。   Therefore, when we perform the automatic focus adjustment operation, the one that maximizes the transmittance of the filter at the highest possible frequency is used. If the focus lens group 3 is driven to a position where the AF evaluation value is maximized, it is possible to obtain the position of the focus lens group 3 that the photographer feels as the best focus position. This is because when shooting a subject with a mixture of high and low spatial frequencies, the subject with low spatial frequency will not feel blurred even if the subject is slightly out of the best focus position. This is because in some cases it is easy to feel that the image is blurred even with a slight shift.

しかし、高い周波数においてフィルターの透過率が最大となるBPFを用いた場合、得られるAF評価値の信頼性が十分でない場合が多い。その理由の一例として下記が挙げられる。   However, when a BPF that maximizes the transmittance of the filter at a high frequency is used, the obtained AF evaluation value is often not sufficiently reliable. The following is mentioned as an example of the reason.

1.高域の信号にはCCDや回路系において重畳されるノイズが含まれているため、偽の信号を発生させることがある。特に低照度では、この傾向が顕著になる。   1. Since the high-frequency signal includes noise superimposed on the CCD and the circuit system, a false signal may be generated. This tendency is particularly noticeable at low illuminance.

2.撮影者の手振れや被写体が動くことにより被写体の高い周波数成分が失われることがある。   2. High frequency components of the subject may be lost due to camera shake of the photographer or movement of the subject.

3.被写体の端部があれば必ず低い空間周波数成分は存在するが、被写体に細かいパターンが存在しない場合などは高い周波数成分自体が存在しないこともある。   3. A low spatial frequency component always exists if there is an edge of the subject, but a high frequency component itself may not exist if there is no fine pattern in the subject.

4.CCDから高速で信号を読み出すために読み出し時に画素加算を行い、実際の画素数より読み出し画素数を減らすことにより、加算を行わない際に存在する被写体の高い周波数成分が失われる。   4). In order to read out signals from the CCD at high speed, pixel addition is performed at the time of reading, and the number of read pixels is reduced from the actual number of pixels, so that the high frequency component of the subject existing when the addition is not performed is lost.

上記1〜3の要件が撮影時の状況によっては生じない可能性があるが、4.はAFに要する時間を短縮するために必須の要件であるため必ず生じてしまう。   Although the above requirements 1 to 3 may not occur depending on the situation at the time of shooting, This is an indispensable requirement for shortening the time required for AF, so it always occurs.

近年のCCDなどの撮像素子においては水平・垂直方向にそれぞれ3画素加算を行って読み出すものが主流のため、AF時に得られる高域成分は、撮影時のナイキスト周波数の33.3%以下のものしか得られない。よってベストピント位置(合焦位置)として撮影時のナイキスト周波数の50%〜80%のピント位置を要求されるため、このままではピントを合わせることができない。そのため、特許文献1のように、比較的低い周波数でフィルターの透過率が最大となるものを用い、そのAF評価値が最大になる位置からフォーカスレンズの特性情報により決まる所定の量だけずらした位置に、フォーカスレンズ群3を駆動する方法が採用されてきた。   In recent years, image sensors such as CCDs read out by adding three pixels in the horizontal and vertical directions respectively, so the high frequency component obtained during AF is less than 33.3% of the Nyquist frequency during shooting. Can only be obtained. Therefore, since a focus position of 50% to 80% of the Nyquist frequency at the time of shooting is required as the best focus position (focus position), it is not possible to focus as it is. Therefore, as in Patent Document 1, a filter with the maximum transmittance at a relatively low frequency is used, and a position shifted by a predetermined amount determined by the characteristic information of the focus lens from the position at which the AF evaluation value is maximized. In addition, a method of driving the focus lens group 3 has been adopted.

しかし、この方法には、フォーカスレンズの特性情報により決まる所定の量に個体差・被写体依存・光源依存などの誤差成分が存在する。従って、この誤差成分が大きな場合は十分な合焦精度を得ることができなかった。   However, in this method, error components such as individual differences, subject dependency, and light source dependency exist in a predetermined amount determined by the characteristic information of the focus lens. Therefore, when this error component is large, sufficient focusing accuracy cannot be obtained.

本実施形態では、低域から高域まで複数のBPFでAF評価値の算出を行い、各々のAF評価値からその値が最大となるフォーカスレンズ位置(焦点調整手段の駆動位置)を求めると同時に各々の信頼性を評価する。そして、信頼性が所定値以上のBPFのよって求められた複数個のAF評価値が最大となるフォーカスレンズ位置から、撮像素子の加算読み出しなどにより失われた高域の被写体の空間周波数におけるAF評価値が最大となるフォーカスレンズ位置を推測する。そして、その位置を合焦位置とする。   In the present embodiment, the AF evaluation value is calculated by a plurality of BPFs from the low range to the high range, and the focus lens position (drive position of the focus adjusting unit) at which the value is maximized is obtained from each AF evaluation value at the same time. Evaluate the reliability of each. Then, the AF evaluation at the spatial frequency of the high frequency object lost by the addition reading of the image sensor or the like from the focus lens position where the plurality of AF evaluation values obtained by the BPF having the reliability of the predetermined value or more becomes the maximum. The focus lens position where the value is maximum is estimated. Then, the position is set as a focus position.

次に、本実施形態におけるスキャンAF処理の流れを図5を参照して説明する。   Next, the flow of scan AF processing in the present embodiment will be described with reference to FIG.

図5は、図2のステップS4におけるスキャンAF処理の詳細を示すフローチャートである。   FIG. 5 is a flowchart showing details of the scan AF process in step S4 of FIG.

まず、ステップS501にて、AF評価値を算出するための異なる特性を持つ複数のBPFを設定する。例えば、CCD5のより実際にAFを行う際に読み出される画素数により決定されるナイキスト周波数の80%、50%、40%、20%にてフィルターの透過率が最大となるような特性を持つBPFを設定する。AF時の読み出しにおいて3画素加算が行われる場合は撮影画像のナイキスト周波数に対しては26.7%、16.7%、13.3%、6.7%にてフィルターの透過率が最大となるような特性を持つBPFを設定することになる。   First, in step S501, a plurality of BPFs having different characteristics for calculating an AF evaluation value are set. For example, the BPF has such a characteristic that the transmittance of the filter becomes maximum at 80%, 50%, 40%, and 20% of the Nyquist frequency determined by the number of pixels read out when the AF is actually performed by the CCD 5. Set. When 3-pixel addition is performed during readout during AF, the filter transmittance is maximum at 26.7%, 16.7%, 13.3%, and 6.7% with respect to the Nyquist frequency of the captured image. A BPF having such characteristics is set.

次に、ステップS502では、フォーカスレンズ群3をスキャン開始位置にスキャン動作中の速度より速い速度で移動する。スキャン開始位置は、本実施形態においては、設定されたスキャン範囲の一端に設定される。   In step S502, the focus lens group 3 is moved to a scan start position at a speed faster than the speed during the scan operation. In this embodiment, the scan start position is set at one end of the set scan range.

ステップS503では、撮影領域内に設定されるAF領域に対応する領域の各BPFにおいて求められるAF評価値とフォーカスレンズ群3の位置をCPU15に内蔵される図示しない演算メモリに記憶する。   In step S503, the AF evaluation value obtained in each BPF in the area corresponding to the AF area set in the imaging area and the position of the focus lens group 3 are stored in a calculation memory (not shown) built in the CPU 15.

ステップS504では、レンズ位置がスキャン終了位置にあるかどうかを調べ、終了位置にあればステップS506へ移行し、そうでなければステップS505へ進む。スキャン終了位置は、設定されたスキャン範囲の他端に設定される。ステップS505では、フォーカスレンズ群3を駆動して所定の方向へ所定量移動する。   In step S504, it is checked whether or not the lens position is at the scan end position. If it is in the end position, the process proceeds to step S506, and if not, the process proceeds to step S505. The scan end position is set at the other end of the set scan range. In step S505, the focus lens group 3 is driven and moved in a predetermined direction by a predetermined amount.

ステップS506では、各々のBPFで算出されたAF評価値からその信頼性を計算する。その詳細については後述する。ステップS506で算出された全てのBPFで得られたAF評価値の信頼性が低い場合(所定値に満たない場合)は、ステップS507からステップS513へ進む。ステップS513では、定点と呼ばれる予め定められた自動焦点調整が不能な場合に駆動する位置へフォーカスレンズ群3を駆動する。この場合は、上述のように図2のステップS5にてAFNG表示が行われる。   In step S506, the reliability is calculated from the AF evaluation value calculated by each BPF. Details thereof will be described later. When the reliability of the AF evaluation values obtained for all the BPFs calculated in step S506 is low (when it is less than the predetermined value), the process proceeds from step S507 to step S513. In step S513, the focus lens group 3 is driven to a position to be driven when a predetermined automatic focus adjustment called a fixed point is impossible. In this case, as described above, AFNG display is performed in step S5 of FIG.

いずれかのBPFで得られたAF評価値の信頼性が所定値以上である場合は(ステップS507でNO)、ステップS508に進み、その個数が2つ以上あるか否かをチェックする。2つ以上無い場合、すなわち信頼性が所定値以上のものが1つの場合は、ステップS511へ進み、信頼性が所定値以上のBPFに関してステップS503で記憶したAF評価値とそのレンズ位置から、AF評価値が最大となるフォーカスレンズ群3の位置を計算する。それと共に、そのBPFに対応するBP補正量を求め、両者を加算することでフォーカスレンズ群3の駆動位置を求める。このBP補正量は、図4に示すように、BPFの透過率が最大となる周波数が異なると異なることが一般的であり、また撮影レンズ鏡筒31の焦点距離や撮影距離などによっても異なることがある。そこで使用するBPFごとに以下のようにBP補正量をデータとして不図示のメモリに記録している。距離に関しては、例えば、無限遠、2m、50cmの3つの距離における補正量を記録している。中間の距離はその両側の距離の値より補間する。50cmと2mの間の距離L1の補正量H1は、2mと50cmの補正量を用いた以下の式で求められる。   If the reliability of the AF evaluation value obtained by any BPF is equal to or higher than the predetermined value (NO in step S507), the process proceeds to step S508, and it is checked whether there are two or more. If there are not two or more, that is, if the reliability is one or more than the predetermined value, the process proceeds to step S511, and the AF evaluation value stored in step S503 and the lens position of the BPF having the reliability of the predetermined value or more are used as the AF. The position of the focus lens group 3 that maximizes the evaluation value is calculated. At the same time, a BP correction amount corresponding to the BPF is obtained, and the drive position of the focus lens group 3 is obtained by adding both. As shown in FIG. 4, the BP correction amount is generally different when the frequency at which the BPF transmittance is maximized is different, and also differs depending on the focal length, the photographing distance, and the like of the photographing lens barrel 31. There is. Therefore, for each BPF used, the BP correction amount is recorded as data in a memory (not shown) as follows. Regarding the distance, for example, correction amounts at three distances of infinity, 2 m, and 50 cm are recorded. The intermediate distance is interpolated from the distance values on both sides. The correction amount H1 of the distance L1 between 50 cm and 2 m can be obtained by the following equation using the correction amounts of 2 m and 50 cm.

H1=LnLm(Hn−Hm)/(Lm−Ln)(1/L1)+Hn−Lm(Hn−Hm)/(Lm−Ln)
但し、Lnは50cm、Lmは2m、Hnは50cmの補正量、Hmは2mでの補正量である。
H1 = LnLm (Hn−Hm) / (Lm−Ln) (1 / L1) + Hn−Lm (Hn−Hm) / (Lm−Ln)
However, Ln is a correction amount of 50 cm, Lm is 2 m, Hn is a correction amount of 50 cm, and Hm is a correction amount of 2 m.

また、2mと無限遠の間の距離H2は、以下の式で求められる。   Moreover, the distance H2 between 2 m and infinity is calculated | required with the following formula | equation.

H2=Lm(Hm−Hi)(1/L2)+Hi
但し、Lmは2m、Hiは無限遠の補正量、Hmは2mでの補正量である。この計算で使用される距離は自動焦点調整の結果から逆算される。
H2 = Lm (Hm-Hi) (1 / L2) + Hi
However, Lm is 2 m, Hi is a correction amount at infinity, and Hm is a correction amount at 2 m. The distance used in this calculation is calculated backward from the result of the automatic focus adjustment.

焦点距離に関しては停止可能な全てのポジションにおける補正量を記録する。但し、その停止するポジションがあまりにも多い場合は、その量を考慮していくつかのズームポジションをまとめて一つの値を持つことがある。例えば、0〜128のズームポジションに停止可能な場合は0〜8、9〜16、・・・、121〜128のように分割し、分割した単位ごとに補正量を持つことにする。この補正量は、レンズ設計値から各焦点距離・各距離について計算して求める場合や、実際に複数の個体の補正量を各焦点距離・各距離について測定してその平均値を用いる場合、個別に測定したその個体特有の値を用いる場合などがある。どの方法を採るかは、撮影レンズ鏡筒31の設計がある程度終了した段階で、補正量の各個体ごとの補正量がどの程度ばらつくのかを検討して決定する。その後、ステップS512に進み、ステップS511で求められたフォーカスレンズ群3の駆動位置へレンズを駆動する。   Regarding the focal length, the correction amount at all positions where the stop can be performed is recorded. However, if there are too many positions to stop, some zoom positions may be combined into one value in consideration of the amount. For example, when the zoom position can be stopped at 0 to 128, it is divided into 0 to 8, 9 to 16,..., 121 to 128, and a correction amount is provided for each divided unit. This correction amount is calculated by calculating each focal length and each distance from the lens design value, or when actually measuring the correction amount of each individual for each focal length and each distance and using the average value individually In some cases, a value peculiar to the individual measured in is used. Which method is to be used is determined by examining how much the correction amount of each individual correction amount varies after the design of the taking lens barrel 31 is completed to some extent. Thereafter, the process proceeds to step S512, and the lens is driven to the driving position of the focus lens group 3 obtained in step S511.

ステップS508では、信頼性が所定値以上のAF評価値を得られるBPFが2つ以上ある場合はステップS509へ進む。ステップS509では、信頼性が所定値以上のBPFに関してステップS503で記憶したAF評価値とそのレンズ位置から、AF評価値が最大となるフォーカスレンズ群3の位置を計算する。   In step S508, if there are two or more BPFs that can obtain an AF evaluation value having a reliability equal to or higher than a predetermined value, the process proceeds to step S509. In step S509, the position of the focus lens group 3 at which the AF evaluation value is maximized is calculated from the AF evaluation value stored in step S503 and the lens position of the BPF having a reliability equal to or higher than a predetermined value.

ステップS510では、ステップS509で求めたAF評価値が最大となるフォーカスレンズ群3の位置から、撮像素子の加算読み出しなどにより失われた高域の被写体の空間周波数におけるAF評価値が最大となるフォーカスレンズ位置を推測する。そして、その位置を合焦位置とする。その後、ステップS512に進み、ステップS510で求められた合焦位置へレンズを駆動する。   In step S510, the focus at which the AF evaluation value at the spatial frequency of the high frequency object lost by the addition reading of the image sensor is maximized from the position of the focus lens group 3 where the AF evaluation value obtained in step S509 is maximized. Estimate the lens position. Then, the position is set as a focus position. Thereafter, the process proceeds to step S512, and the lens is driven to the in-focus position obtained in step S510.

ここで、ステップS510にて行われる、失われた高域の被写体の空間周波数におけるAF評価値が最大となるフォーカスレンズ位置を推測する方法について説明する。   Here, a method of estimating the focus lens position at which the AF evaluation value at the spatial frequency of the lost high-frequency subject, which is performed in step S510, is maximized will be described.

AF時の読み出し時に3画素加算が行われ、CCD5により実際にAFを行う際に読み出される画素数で決定されるナイキスト周波数の80%、50%、40%、20%でフィルターの透過率が最大となる特性を持つBPFを設定されているものとして説明を行う。よって、AF時の読み出しにおいては撮影画像のナイキスト周波数に対しては26.7%、16.7%、13.3%、6.7%にてフィルターの透過率が最大となるような特性を持つBPFが設定されているものとする。これらの数値はあくまで一例であり、本発明の内容・効果を限定するものではない。同様に、以下に示す撮影レンズ鏡筒31の製造公差を考慮した被写体周波数によるピント位置差も一例を示すものであり、本発明の内容・効果を限定するものではない。   3-pixel addition is performed at the time of readout during AF, and the transmittance of the filter is maximum at 80%, 50%, 40%, and 20% of the Nyquist frequency determined by the number of pixels read out by the CCD 5 when actually performing AF. In the following description, it is assumed that a BPF having the following characteristics is set. Therefore, in the readout at the time of AF, the filter has a maximum transmittance at 26.7%, 16.7%, 13.3%, and 6.7% with respect to the Nyquist frequency of the photographed image. It is assumed that the BPF that has is set. These numerical values are merely examples, and do not limit the contents and effects of the present invention. Similarly, the focus position difference depending on the subject frequency in consideration of the manufacturing tolerance of the photographic lens barrel 31 shown below is an example, and does not limit the contents and effects of the present invention.

失われた高域の被写体の空間周波数におけるAF評価値が最大となるフォーカスレンズ位置の推測は、実際のAF時に求められた各BPFでのAF評価値のピーク位置の一致度が高い予め記録された推測式を求めることで行われる。この推測式は、撮影レンズ鏡筒31の製造公差を考慮した設計値から作成することができる。被写体周波数によるピント位置差は球面収差から生じるわけであるが、この球面収差は撮影レンズ鏡筒31を構成するレンズの厚み、曲率、CCDとレンズ間隔などによってその量が変わる。そこで、レンズの厚み、曲率、CCDとレンズ間隔を公差の範囲内で振り、球面収差の量、さらには、その量から被写体の周波数によるピント位置のズレを計算する。その結果、被写体の周波数によるピント位置のズレに関する多数の関係式が求められる。   The estimation of the focus lens position at which the AF evaluation value at the spatial frequency of the lost high-frequency subject is maximized is recorded in advance so that the degree of coincidence of the peak positions of the AF evaluation values at each BPF obtained during actual AF is high. This is done by obtaining a guess equation. This inference formula can be created from design values that take into account manufacturing tolerances of the taking lens barrel 31. The focus position difference due to the subject frequency is caused by spherical aberration. The amount of this spherical aberration varies depending on the thickness of the lens constituting the taking lens barrel 31, the curvature, the CCD and the lens interval, and the like. Therefore, the lens thickness, curvature, CCD and lens interval are shaken within the tolerance range, and the amount of spherical aberration, and further, the deviation of the focus position due to the frequency of the subject is calculated from the amount. As a result, a large number of relational expressions regarding the shift of the focus position due to the frequency of the subject are obtained.

よって、AF時に得られる被写体の各周波数におけるピント位置の関係から、多数の関係式のどれに当てはまるのかが判れば、AF時には加算読み出しにより得ることのできない撮影画像のナイキスト周波数の50%、80%に対するピント位置を知ることができる。   Therefore, if it is known from the relationship of the focus position at each frequency of the subject obtained at the time of AF, which of the many relational expressions is applicable, 50% and 80% of the Nyquist frequency of the captured image that cannot be obtained by addition reading at the time of AF. The focus position with respect to can be known.

実際の推測式の記録には、式そのものを記録するのではなく、AF時に使用するBPFにおける値とベストピント位置の値を記録しておく。本実施形態では、AF時の読み出しにおいては撮影画像のナイキスト周波数に対しては26.7%、16.7%、13.3%、6.7%にてフィルターの透過率が最大となるBPFにおける値とベストピント位置が記録されている。例えば、図11〜図14に示すような被写体の周波数によるピント位置のズレに関する関係がある。   In the actual recording of the guess formula, the formula itself is not recorded, but the value in the BPF used during AF and the value of the best focus position are recorded. In the present embodiment, in the readout at the time of AF, the BPF that maximizes the transmittance of the filter at 26.7%, 16.7%, 13.3%, and 6.7% with respect to the Nyquist frequency of the photographed image. The value at and the best focus position are recorded. For example, as shown in FIGS. 11 to 14, there is a relationship related to the shift of the focus position depending on the frequency of the subject.

図11は、撮影レンズ鏡筒31を構成するレンズの厚みが変化した場合の被写体周波数とピント位置(フォーカス位置)の関係を示す図である。図12は、撮影レンズ鏡筒31を構成するレンズの曲率が変化した場合の被写体周波数とピント位置(フォーカス位置)の関係を示す図である。図13は、撮影レンズ鏡筒31を構成するレンズとCCDの間隔が変化した場合の被写体周波数とピント位置(フォーカス位置)の関係を示す図である。図14は、上記の3つの要素を総合した場合の被写体周波数とピント位置(フォーカス位置)の関係を示す図である。   FIG. 11 is a diagram showing the relationship between the subject frequency and the focus position (focus position) when the thickness of the lens constituting the photographic lens barrel 31 changes. FIG. 12 is a diagram showing the relationship between the subject frequency and the focus position (focus position) when the curvature of the lens constituting the photographic lens barrel 31 changes. FIG. 13 is a diagram showing the relationship between the subject frequency and the focus position (focus position) when the distance between the lens constituting the taking lens barrel 31 and the CCD changes. FIG. 14 is a diagram showing the relationship between the subject frequency and the focus position (focus position) when the above three elements are combined.

図11〜図14に示すグラフは、その縦軸がフォーカス位置、横軸が被写体の周波数を表す。図11〜図14において、他より太い線で示したものが設計値における被写体の周波数によるピント位置のズレを表している。なお、図示例では、記録する全ての曲線を描画されているわけではなく、その一部のみが描画されている。   In the graphs shown in FIGS. 11 to 14, the vertical axis represents the focus position, and the horizontal axis represents the frequency of the subject. In FIG. 11 to FIG. 14, a thicker line represents the shift of the focus position due to the object frequency in the design value. In the illustrated example, not all the curves to be recorded are drawn, but only a part thereof is drawn.

図14に示す撮影画像のナイキスト周波数に対しては26.7%、16.7%、13.3%、6.7%におけるフォーカス値と、ベストピント位置のフォーカス値を推定式ごとに記録している。図14から2つのBPFにおけるAF評価値のピーク位置の関係がわかれば、大抵は失われた高域の被写体の空間周波数におけるAF評価値が最大となるフォーカスレンズ位置を推測できる。しかしながら、3つ以上のBPFにおけるAF評価値のピーク位置の関係を必要とする場合もある。   For the Nyquist frequency of the photographed image shown in FIG. 14, the focus values at 26.7%, 16.7%, 13.3%, and 6.7% and the focus value at the best focus position are recorded for each estimation formula. ing. If the relationship between the peak positions of the AF evaluation values in the two BPFs is known from FIG. 14, the focus lens position at which the AF evaluation value at the spatial frequency of the lost high frequency object is usually maximized can be estimated. However, there are cases where the relationship between the peak positions of AF evaluation values in three or more BPFs is required.

図10は、ステップS510における動作の詳細な流れを示すフローチャートである。   FIG. 10 is a flowchart showing a detailed flow of the operation in step S510.

まず、ステップS1001において、全ての信頼性が所定値以上のBPFに関して調べたかをチェックする。ここで全ての信頼性が所定値以上のBPFについてプロットできるか調べ終えている場合は(ステップS1001でYES)、推測式の曲線状にプロットできるものがないということなので、ステップS1020へ進む。   First, in step S1001, it is checked whether or not all the BPFs whose reliability is a predetermined value or more are checked. Here, when it is checked whether or not all the BPFs whose reliability is greater than or equal to the predetermined value can be plotted (YES in step S1001), there is nothing that can be plotted in the form of a guess equation, so the process proceeds to step S1020.

ステップS1020では、BPFから求めたAF評価値の信頼性が所定値以上のもののうち最も高域のBPFを選択し、それにそのBPFにおけるBP補正量を加えたものを合焦位置とする。詳細は図5のステップS511と同様である。若しくは信頼性の最も高いものを選択し、それにそのBPFにおけるBP補正量を加えたものを合焦位置としてもよい。   In step S1020, the highest BPF is selected from the AF evaluation values obtained from the BPF whose reliability is equal to or higher than a predetermined value, and the sum of the BPF correction amount in the BPF is set as the in-focus position. Details are the same as step S511 in FIG. Alternatively, it is possible to select the one having the highest reliability and add the BP correction amount in the BPF to the in-focus position.

ステップS1002以降で予め記録された推測式の曲線のどれに一致するか、若しくは最も近いか調べるわけであるが、上述の理由1〜3等の理由により低い周波数にピークのあるBPFで求めたAF評価値の方が信頼性の高い場合が多い。そこで、信頼性が所定値以上のAF評価値のうち最も低域のBPFで得られたものピント位置が図14のどの推測式の曲線上にプロットできるかを調べる。なお、記録されたピント位置との差が所定値以内の場合プロット可能と判断し、記録されたピント位置との差が最も小さい曲線上にプロットされるものとする。   In step S1002 and subsequent steps, it is checked which of the presumed pre-recorded curves matches or is the closest, but the AF obtained by the BPF having a peak at a low frequency for the reasons 1 to 3 described above. The evaluation value is often more reliable. Therefore, it is investigated which guess formula curve of FIG. 14 can be used to plot the focus position obtained by the lowest BPF among the AF evaluation values having reliability of a predetermined value or more. It should be noted that if the difference from the recorded focus position is within a predetermined value, it is determined that plotting is possible, and it is plotted on a curve having the smallest difference from the recorded focus position.

ステップS1002では、推測式の曲線にプロットできるか調べるBPFを選択する。記録されている推測式の曲線の値が撮影画像のナイキスト周波数に対しては26.7%、16.7%、13.3%、6.7%におけるピント位置が記録されている。そのため、まず、6.7%のピークを持つBPFで得られたAF評価値の信頼性が所定値以上かをステップS1002で調べる。6.7%のBPFより得られたAF評価値の信頼性が所定値未満であれば、13.3%のBPFでより得られたAF評価値の信頼性が所定値以上であるか調べる。以下同様である。   In step S1002, the BPF to be examined to see if it can be plotted on the speculative curve is selected. The focus position at which the value of the recorded curve of the estimated expression is 26.7%, 16.7%, 13.3%, and 6.7% with respect to the Nyquist frequency of the photographed image is recorded. Therefore, first, in step S1002, it is checked whether the reliability of the AF evaluation value obtained with the BPF having a peak of 6.7% is equal to or higher than a predetermined value. If the reliability of the AF evaluation value obtained from the 6.7% BPF is less than the predetermined value, it is checked whether the reliability of the AF evaluation value obtained from the 13.3% BPF is equal to or higher than the predetermined value. The same applies hereinafter.

ステップS1003では、選択されたBPFで求められたAF評価値のピーク位置をメモリからロードする。次に、ステップS1004では、選択されたBPFで求められたAF評価値のピーク位置が推測式の曲線上にプロットできるか否かをチェックする。具体的には、記録されているピント位置との差を調べ、その差が所定値以内なら記録値が最も近い曲線にそのピーク位置をプロットとする。プロットが可能な場合は(ステップS1004でYES)、ステップS1005に進む。一方、プロットが不可能な場合はステップS1001に戻り、同様の動作を行う。すなわち、全てのBPFに関してチェックが終了したか否かを判定し、終了していなければ次の信頼性が所定値以上のBPFから得られたAF評価値のピーク位置が推測式の曲線上にプロット可能か調べる。終了していれば、ステップS1020へ進む。   In step S1003, the peak position of the AF evaluation value obtained by the selected BPF is loaded from the memory. Next, in step S1004, it is checked whether or not the peak position of the AF evaluation value obtained with the selected BPF can be plotted on the estimation equation curve. Specifically, the difference from the recorded focus position is examined, and if the difference is within a predetermined value, the peak position is plotted on the curve with the closest recorded value. If plotting is possible (YES in step S1004), the process proceeds to step S1005. On the other hand, if plotting is impossible, the process returns to step S1001 and the same operation is performed. That is, it is determined whether or not the check has been completed for all the BPFs. If the check has not been completed, the peak position of the AF evaluation value obtained from the BPF whose reliability is equal to or higher than the predetermined value is plotted on the curve of the estimation formula. Find out if it is possible. If completed, the process proceeds to step S1020.

ステップS1005では、全ての信頼性が所定値以上のBPFに関して調べたかをチェックする。ここで全ての信頼性が所定値以上のBPFについてプロットできるか調べ終えている場合は(ステップS1005でYES)、推測式の曲線状にプロットできるものが1つということなので、ステップS1030へ進む。   In step S1005, it is checked whether or not all the BPFs whose reliability is equal to or higher than a predetermined value have been checked. If it has been checked whether or not all the BPFs whose reliability is equal to or greater than the predetermined value can be plotted (YES in step S1005), the number of items that can be plotted in the form of a speculative curve is one, and the process advances to step S1030.

ステップS1030では、プロット可能なBPFで得られたAF評価値のピーク位置にそのBPFにおけるBP補正量を加えたものを合焦位置とする。詳細は図5のステップS511と同様である。調べ終えていない場合はステップS1006へ進む。   In step S1030, the in-focus position is obtained by adding the BP correction amount in the BPF to the peak position of the AF evaluation value obtained by the BPF that can be plotted. Details are the same as step S511 in FIG. If not checked, the process proceeds to step S1006.

ステップS1006では、推測式の曲線にプロットできる2つ目があるか調べる。残されたものの中で信頼性が所定値以上のもののうちBPFの透過率が最も低域のものを選択する。そして、ステップS1007では、選択されたBPFで求められたAF評価値のピーク位置をメモリからロードする。続いて、ステップS1004で選択されたBPFで求められたAF評価値のピーク位置が、ステップS1004でプロット可能と判断された推測式の曲線上にプロットできるか否かをチェックする(ステップS1008)。具体的には、ステップS1004でプロット可能と判断された推測式の記録されているピント位置との差を調べ、その差が所定値以内ならその推測式の曲線にピーク位置がプロット可能と判断する。プロットが可能な場合はステップS1009に進む。一方、プロットが不可能な場合はステップS1005に戻り、同様の動作を行う。すなわち、全てのBPFに関してチェックが終了したか否かを判定し、終了していなければ次の信頼性が所定値以上のBPFから得られたAF評価値のピーク位置が推測式の曲線上にプロット可能か調べる。終了していれば、ステップS1030へ進む。   In step S1006, a check is made to see if there is a second one that can be plotted on the guess curve. Among the remaining ones, the one having the lowest BPF transmittance is selected from among those having reliability equal to or higher than a predetermined value. In step S1007, the peak position of the AF evaluation value obtained by the selected BPF is loaded from the memory. Subsequently, it is checked whether or not the peak position of the AF evaluation value obtained by the BPF selected in step S1004 can be plotted on the estimated equation curve determined to be plottable in step S1004 (step S1008). Specifically, the difference from the focus position where the estimated expression determined to be plottable in step S1004 is recorded is checked. If the difference is within a predetermined value, it is determined that the peak position can be plotted on the estimated expression curve. . If plotting is possible, the process proceeds to step S1009. On the other hand, if plotting is impossible, the process returns to step S1005 and the same operation is performed. That is, it is determined whether or not the check has been completed for all the BPFs. If the check has not been completed, the peak position of the AF evaluation value obtained from the BPF whose reliability is equal to or higher than the predetermined value is plotted on the curve of the estimation formula. Find out if it is possible. If completed, the process proceeds to step S1030.

ステップS1009では、これまでの動作で推測式が一つに限定されたか否かを調べる。一つに限定されていれば(ステップS1009でYES)、ステップS1040へ進み、その推定式からから合焦位置を推定する。一方、一つに限定できない場合は(ステップS1009でNO)、ステップS1010に進み、全ての信頼性が所定値以上のBPFに関して調べたかをチェックする。ここで全ての信頼性が所定値以上のBPFについてプロットできるか調べ終えている場合は、まだ複数の推測式が存在することになる。そこで、存在する複数の推測式に関して最小二乗誤差を求め、それが最小のものを選択し、選択された推測式から合焦位置を推定する(ステップS1050)。最小二乗誤差は記録されている推測式の値と各々のBPFで得られたAF評価値のピーク値との差の二乗和である。次式に表す。   In step S1009, it is checked whether or not the estimation formula is limited to one in the above operation. If it is limited to one (YES in step S1009), the process proceeds to step S1040, and the in-focus position is estimated from the estimation formula. On the other hand, if it cannot be limited to one (NO in step S1009), the process proceeds to step S1010, and it is checked whether or not all the BPFs whose reliability is a predetermined value or more are checked. Here, if all the reliability has been checked to see if the BPF having a predetermined value or higher can be plotted, there are still a plurality of inference formulas. Therefore, the least square error is obtained for a plurality of existing estimation formulas, the one with the smallest one is selected, and the in-focus position is estimated from the selected estimation formula (step S1050). The least square error is the sum of squares of the difference between the recorded value of the estimated expression and the peak value of the AF evaluation value obtained by each BPF. It is expressed by the following formula.

最小二乗誤差E=Σ(Pi−Qi)
但し、Piは記録されている推測式のピント位置、QiはBPFで得られたAF評価値のピーク位置である。
Least square error E = Σ (Pi−Qi) 2
However, Pi is the focus position of the presumed formula recorded, and Qi is the peak position of the AF evaluation value obtained by BPF.

ステップS1010において、全ての信頼性が所定値以上のBPFについてプロットできるか調べ終えていない場合はステップS1011へ進む。ステップS1011では、推測式の曲線にプロットできる3つ目のものがあるか調べる。残されたものの中で信頼性が所定値以上のもののうちBPFの透過率が最も低域のものを選択する。そして、選択されたBPFで求められたAF評価値のピーク値をメモリからロードする(ステップS1012)。   If it is determined in step S1010 that it is not possible to plot all the BPFs whose reliability is greater than or equal to the predetermined value, the process proceeds to step S1011. In step S1011, a check is made to see if there is a third one that can be plotted on the guess curve. Among the remaining ones, the one having the lowest BPF transmittance is selected from among those having reliability equal to or higher than a predetermined value. Then, the peak value of the AF evaluation value obtained with the selected BPF is loaded from the memory (step S1012).

次に、ステップS1013では、選択されたBPFで求められたAF評価値のピーク値が、ステップS1004,S1008でプロット可能と判断された推測式の曲線上にプロットできるか否かをチェックする。具体的には、ステップS1004,S1008でプロット可能と判断された推測式の記録されているピント位置との差を調べ、その差が所定値以内ならその推測式の曲線にピーク位置がプロット可能と判断する。プロットが可能な場合はステップS1009に戻り、上記と同様の処理を行う。プロットが不可能な場合はステップS1010に戻り、同様の処理を行う。   Next, in step S1013, it is checked whether or not the peak value of the AF evaluation value obtained by the selected BPF can be plotted on the curve of the estimation formula determined to be plotable in steps S1004 and S1008. More specifically, the difference between the estimated expression determined to be plottable in steps S1004 and S1008 and the focus position recorded is checked, and if the difference is within a predetermined value, the peak position can be plotted on the estimated expression curve. to decide. If plotting is possible, the process returns to step S1009 and the same processing as described above is performed. If plotting is impossible, the process returns to step S1010 and the same processing is performed.

ここで推測式の値の持ち方、特に距離に関する持ち方について説明する。   Here, how to hold the value of the estimation formula, particularly how to hold the distance, will be described.

撮影距離によってピント位置ズレの関係は異なることが一般的である。そこで距離に関しては、例えば、無限遠、2m、50cmの3つの距離における関係を記録している。撮影距離が記録されている50cm、2m、∞のときは、その距離における失われた高域の被写体の空間周波数におけるAF評価値が最大となるフォーカスレンズ位置を推測する。   In general, the relationship of the focus position deviation differs depending on the shooting distance. Therefore, regarding the distance, for example, the relationship at three distances of infinity, 2 m, and 50 cm is recorded. When the shooting distance is recorded at 50 cm, 2 m, and ∞, the focus lens position at which the AF evaluation value at the spatial frequency of the lost high frequency object at the distance is maximized is estimated.

一方、撮影距離が50cmと2mの間のときは50cmと2m、撮影距離が2mと∞の間のときは2mと∞の失われた高域の被写体の空間周波数におけるAF評価値が最大となるフォーカスレンズ位置をそれぞれ推測する。そして、その2つの値から線形補間によりその距離における失われた高域の被写体の空間周波数におけるAF評価値が最大となるフォーカスレンズ位置を推測する。   On the other hand, when the shooting distance is between 50 cm and 2 m, the AF evaluation value at the spatial frequency of the lost high frequency object of 50 cm and 2 m is maximum, and when the shooting distance is between 2 m and ∞, the AF evaluation value at the spatial frequency is maximized. Each focus lens position is estimated. Then, the focus lens position at which the AF evaluation value at the spatial frequency of the lost high frequency object at the distance is maximized from the two values by linear interpolation.

50cmと2mの間の距離L1の推定値P1は、2mと50cmの補正量を用いた以下の式で求められる。   The estimated value P1 of the distance L1 between 50 cm and 2 m is obtained by the following equation using correction amounts of 2 m and 50 cm.

P1=LnLm(Pn−Pm)/(Lm−Ln)(1/L1)+Pn−Lm(Pn−Pm)/(Lm−Ln)
但し、Lnは50cm、Lmは2m、Pnは50cmの推定値、Pmは2mでの推定値である。
P1 = LnLm (Pn-Pm) / (Lm-Ln) (1 / L1) + Pn-Lm (Pn-Pm) / (Lm-Ln)
However, Ln is 50 cm, Lm is 2 m, Pn is an estimated value of 50 cm, and Pm is an estimated value at 2 m.

また、2mと無限遠の間の距離P2は下式により求められる。   Further, the distance P2 between 2 m and infinity is obtained by the following equation.

P2=Lm(Pm−Pi)(1/L2)+Pi
但し、Lmは2m、Piは無限遠の推定値、Pmは2mでの推定値である。この計算で使用される距離は自動焦点調整の結果から逆算される。
P2 = Lm (Pm-Pi) (1 / L2) + Pi
However, Lm is an estimated value at 2 m, Pi is an estimated value at infinity, and Pm is an estimated value at 2 m. The distance used in this calculation is calculated backward from the result of the automatic focus adjustment.

焦点距離に関しては、停止可能な全てのポジションにおける関係式を記録する。但し、その停止するポジションがあまりにも多い場合は、その量を考慮していくつかのズームポジションをまとめて一つの値を持つことがある。例えば、0〜128のズームポジションに停止可能な場合は0〜8、9〜16、・・・、121〜128のように分割し、分割した単位ごとに関係式を持つことにする。   Regarding the focal length, the relational expressions at all positions where the stop can be performed are recorded. However, if there are too many positions to stop, some zoom positions may be combined into one value in consideration of the amount. For example, when the zoom position can be stopped at 0 to 128, it is divided into 0 to 8, 9 to 16,..., 121 to 128, and a relational expression is provided for each divided unit.

次に、ステップS506にて行われる各々のBPFで算出されたAF評価値からその信頼性を計算する処理について説明する。   Next, a process for calculating the reliability from the AF evaluation value calculated in each BPF performed in step S506 will be described.

図6は、AF評価値とフォーカスレンズ位置との関係を示す図である。   FIG. 6 is a diagram illustrating the relationship between the AF evaluation value and the focus lens position.

AF評価値信号は、遠近競合の特殊な場合を除けば、横軸にフォーカスレンズ位置、縦軸にAF評価値をとると、その形は図6に示すような山状になる。そこで、本実施形態では、AF評価値信号が山状になっているか否かをAF評価値の最大値と最小値の差、一定値以上の傾きで傾斜している部分の長さ、傾斜している部分の勾配から判断することによりAF評価値の信頼性を判断している。   The AF evaluation value signal has a mountain shape as shown in FIG. 6 when the horizontal axis represents the focus lens position and the vertical axis represents the AF evaluation value, except for a special case of distance competition. Therefore, in the present embodiment, whether or not the AF evaluation value signal is mountain-shaped is determined by the difference between the maximum and minimum values of the AF evaluation value, the length of the portion inclined by a gradient greater than a certain value, and the gradient. The reliability of the AF evaluation value is determined by determining from the gradient of the portion that is present.

本実施形態では、図6に示すように、山の頂上(A点)から傾斜していると認められるD点、E点を求め、D点とE点の幅を山の幅L、A点とD点のAF評価値の差SL1とA点とE点のAF評価値の差SL2の和SL1+SL2を山の勾配SLとする。   In this embodiment, as shown in FIG. 6, the points D and E that are recognized as being inclined from the top of the mountain (point A) are obtained, and the widths of the points D and E are set to the width L and point A of the mountain. The sum SL1 + SL2 of the difference SL1 between the AF evaluation values at points D and D and the difference SL2 between the AF evaluation values at points A and E is defined as the mountain slope SL.

図7は、ステップS506における信頼性計算処理の詳細を示すフローチャートである。   FIG. 7 is a flowchart showing details of the reliability calculation processing in step S506.

まず、ステップS701において、スキャンAF処理回路14から出力されるAF評価値の最大値(max)と最小値(min)、及び最大値を与えるスキャンポイントioを求める。次に、ステップS702において、AF評価値の山の幅を表す変数L、山の勾配を表す変数SLを共に零に初期化する。   First, in step S701, the maximum value (max) and minimum value (min) of the AF evaluation value output from the scan AF processing circuit 14 and the scan point io that gives the maximum value are obtained. Next, in step S702, both the variable L representing the mountain width and the variable SL representing the mountain slope of the AF evaluation value are initialized to zero.

次に、ステップS703では、最大値を与えるスキャンポイントioが無限遠に相当する位置か否かを調べ、無限遠に相当する位置でないならば(ステップS703でNO)、ステップS704に進み、無限遠に相当する位置方向への単調減少を調べる。一方、無限遠に相当する位置であったならば(ステップS703でYES)、この処理をスキップし、ステップS705に進む。ここでステップS704における無限遠に相当する位置方向への単調減少を調べる処理について説明する。   Next, in step S703, it is checked whether or not the scan point io giving the maximum value is a position corresponding to infinity. If it is not a position corresponding to infinity (NO in step S703), the process proceeds to step S704, where The monotonic decrease toward the position corresponding to is examined. On the other hand, if the position corresponds to infinity (YES in step S703), this process is skipped and the process proceeds to step S705. Here, the processing for examining the monotonic decrease in the position direction corresponding to infinity in step S704 will be described.

図8は、ステップS704における無限遠に相当する位置方向への単調減少を調べる処理の詳細を示すフローチャートである。   FIG. 8 is a flowchart showing details of the processing for checking the monotonic decrease in the position direction corresponding to infinity in step S704.

まず、ステップS801において、カウンター変数iをioに初期化する。次に、ステップS802では、iにおけるAF評価値の値d[i]と、iより1スキャンポイント分無限遠寄りのスキャンポイントi−1におけるAF評価値の値d[i−1]とを比較する。d[i]がd[i−1]より大きければ(ステップS802でYES)、無限遠方向への単調減少が生じていると判断し、ステップS803に進み、AF評価値の山の幅を表す変数L、山の勾配を表す変数SLを以下の式に従って更新する。   First, in step S801, a counter variable i is initialized to io. In step S802, the AF evaluation value d [i] at i is compared with the AF evaluation value d [i-1] at the scan point i-1 that is one scan point closer to infinity than i. To do. If d [i] is larger than d [i-1] (YES in step S802), it is determined that a monotonous decrease in the infinity direction has occurred, and the process proceeds to step S803 to represent the width of the peak of the AF evaluation value. The variable L and the variable SL representing the mountain slope are updated according to the following formula.

L=L+1
SL=SL+(d[i]−d[i−1])
一方、ステップS802において、d[i]>d[i−1]でなければ(ステップS802でNO)、無限遠方向への単調減少は生じていないと判断し、無限遠方向の単調減少をチェックする処理を終了し、図7のステップS705にリターンする。処理を継続する場合はステップS804に進み、i=i−1として、検出をする点を1スキャンポイント無限遠側に移す。
L = L + 1
SL = SL + (d [i] -d [i-1])
On the other hand, if d [i]> d [i−1] is not satisfied in step S802 (NO in step S802), it is determined that no monotonic decrease in the infinity direction has occurred, and the monotonic decrease in the infinity direction is checked. Is finished, and the process returns to step S705 in FIG. When the process is continued, the process proceeds to step S804, and i = i-1 is set, and the point to be detected is moved to the one scan point infinity side.

ステップS805では、カウンターiが無限遠相当の値(=0)になったかどうかを判定する。カウンターの値が0、すなわち単調減少を検出する開始点が無限遠相当の位置に達したならば、無限遠方向の単調減少をチェックする処理を終了し、図7のステップS705にリターンする。このように、i=ioから無限遠方向への単調減少をチェックする。   In step S805, it is determined whether the counter i has reached a value corresponding to infinity (= 0). If the value of the counter is 0, that is, if the starting point for detecting the monotonic decrease reaches a position corresponding to infinity, the process of checking the monotonic decrease in the infinity direction is terminated, and the process returns to step S705 in FIG. Thus, a monotonic decrease from i = io to infinity is checked.

図7に戻り、ステップS705では、最大値を与えるスキャンポイントioがスキャンAFを行う至近端に相当する位置か否かを判定する(ステップS705)。この判定の結果、至近端に相当する位置でないならば(ステップS705でNO)、ステップS706に進み、至近端に相当する位置方向への単調減少を調べる。一方、至近端に相当する位置であったならば(ステップS705でYES)、ステップS707に進む。ここでステップS706における至近端に相当する位置方向への単調減少を調べる処理について説明する。   Returning to FIG. 7, in step S705, it is determined whether or not the scan point io giving the maximum value is a position corresponding to the closest end where the scan AF is performed (step S705). If the result of this determination is that the position does not correspond to the close end (NO in step S705), the process proceeds to step S706 to check for a monotonic decrease in the position direction corresponding to the close end. On the other hand, if it is the position corresponding to the closest end (YES in step S705), the process proceeds to step S707. Here, the processing for checking the monotonic decrease in the position direction corresponding to the closest end in step S706 will be described.

図9は、ステップS706における至近端に相当する位置方向への単調減少を調べる処理の詳細を示すフローチャートである。   FIG. 9 is a flowchart showing details of the processing for checking the monotonic decrease in the position direction corresponding to the closest end in step S706.

まず、ステップS901において、カウンター変数iをioに初期化する。次に、ステップS902では、iにおけるAF評価値の値d[i]と、iより1スキャンポイント分至近端寄りのスキャンポイントi+1におけるAF評価値の値d[i+1]とを比較する。d[i]がd[i+1]より大きければ(ステップS902でYES)、至近端方向への単調減少が生じていると判断し、ステップS903に進み、AF評価値の山の幅を表す変数L、山の勾配を表す変数SLを以下の式に従って更新する。   First, in step S901, the counter variable i is initialized to io. In step S902, the AF evaluation value d [i] at i is compared with the AF evaluation value d [i + 1] at the scan point i + 1 that is closer to the closest end by one scan point than i. If d [i] is larger than d [i + 1] (YES in step S902), it is determined that a monotonous decrease in the near end direction has occurred, and the process proceeds to step S903, where a variable representing the width of the peak of the AF evaluation value L, variable SL representing the slope of the mountain is updated according to the following equation.

L=L+1
SL=SL+(d[i]−d[i+1])
一方、ステップS902において、d[i]>d[i+1]でなければ(ステップS902でNO)、至近端方向への単調減少は生じていないと判断し、至近端方向の単調減少をチェックする処理を終了し、図7のステップS707にリターンする。処理を継続する場合は、ステップS904に進み、i=i+1として、検出をする点を1スキャンポイント至近端側に移す。
L = L + 1
SL = SL + (d [i] -d [i + 1])
On the other hand, if d [i]> d [i + 1] is not satisfied in step S902 (NO in step S902), it is determined that no monotonic decrease in the near end direction has occurred, and a monotonic decrease in the near end direction is checked. Is finished, and the process returns to step S707 in FIG. When the process is continued, the process proceeds to step S904, and i = i + 1 is set, and the point to be detected is moved to the one scan point closest side.

ステップS905では、カウンターiが至近端相当の値(=N)になったかどうかを判定する。カウンターの値がN、すなわち単調減少を検出する開始点が至近端相当の位置に達したならば、至近端方向の単調減少をチェックする処理を終了し、図7のステップS707にリターンする。このように、i=ioから至近端方向への単調減少をチェックする。   In step S905, it is determined whether the counter i has reached a value equivalent to the near end (= N). If the value of the counter is N, that is, if the starting point for detecting the monotonic decrease has reached a position corresponding to the near end, the processing for checking the monotonic decrease in the near end direction is terminated, and the process returns to step S707 in FIG. . In this way, a monotonic decrease from i = io toward the closest end is checked.

無限遠方向、至近端方向への単調減少のチェックが終了したならば、AF評価値の信頼性を判定するための諸係数をそれぞれのしきい値と比較し、全ての条件を満たしたならばAF評価値の信頼性があると判定する。   After checking the monotonic decrease in the infinity direction and the near-end direction, compare the coefficients for determining the reliability of the AF evaluation value with the respective threshold values, and if all conditions are satisfied For example, it is determined that the AF evaluation value is reliable.

図7に戻り、ステップS707では、AF評価値の最大値maxと最小値minの差をその所定値と比較し、所定値より小さい場合は(ステップS707でNO)、信頼性がないと判断し、ステップS711へ進む。一方、所定値以上の場合は(ステップS707でYES)、ステップS708へ進む。   Returning to FIG. 7, in step S707, the difference between the maximum value max and the minimum value min of the AF evaluation value is compared with the predetermined value. If the difference is smaller than the predetermined value (NO in step S707), it is determined that there is no reliability. The process proceeds to step S711. On the other hand, if the value is equal to or greater than the predetermined value (YES in step S707), the process proceeds to step S708.

ステップS708では、一定値以上の傾きで傾斜している部分の長さLをその所定値Loと比較し、所定値より小さい場合は(ステップS708でNO)、信頼性がないと判断し、ステップS711へ進む。一方、所定値以上の場合は(ステップS708でYES)、ステップS709へ進む。   In step S708, the length L of the portion inclined at an inclination equal to or greater than a certain value is compared with the predetermined value Lo. If the length L is smaller than the predetermined value (NO in step S708), it is determined that there is no reliability. The process proceeds to S711. On the other hand, if the value is equal to or greater than the predetermined value (YES in step S708), the process proceeds to step S709.

ステップS709では、傾斜している部分の傾斜の平均値SL/Lをその所定値SLo/Lo比較し、所定値より小さい場合は(ステップS709でNO)、信頼性がないと判断し、ステップS711へ進む。一方、所定値以上の場合は(ステップS709でYES)、ステップS710へ進む。   In step S709, the average value SL / L of the inclined portion is compared with the predetermined value SLo / Lo. If the average value SL / L is smaller than the predetermined value (NO in step S709), it is determined that there is no reliability, and step S711 is performed. Proceed to On the other hand, if the value is equal to or greater than the predetermined value (YES in step S709), the process proceeds to step S710.

このように、ステップS707,S708,S709の3つの条件を満たした場合はAF評価値の信頼性があると判定し、ステップS710へ進む。一方、ステップS707,S708,S709の少なくとも1つの条件を満たしていない場合は、AF評価値の信頼性がないと判断し、ステップS711へ進み、信頼性=0とする。   Thus, when the three conditions of steps S707, S708, and S709 are satisfied, it is determined that the AF evaluation value is reliable, and the process proceeds to step S710. On the other hand, if at least one condition of steps S707, S708, and S709 is not satisfied, it is determined that the AF evaluation value is not reliable, and the process proceeds to step S711, where reliability = 0.

AF評価値の最大値と最小値の差def_MaxMinを所定値def_MaxMin0、一定値以上の傾きで傾斜している部分の長さLを所定値Lo、傾斜している部分の傾斜の平均値SL/Lを所定値SLo/Loとして以下の式により信頼性の数値を求める。   The difference def_MaxMin between the maximum value and the minimum value of the AF evaluation value is a predetermined value def_MaxMin0, the length L of a portion inclined at a certain inclination or more is a predetermined value Lo, and the average value SL / L of the inclination of the inclined portion Is a predetermined value SLo / Lo, and a numerical value of reliability is obtained by the following equation.

信頼性=(def_MaxMin/def_MaxMin0)(L/Lo){SL/L}/(SLo/Lo)}
=(def_MaxMin/def_MaxMin0)(SL/SLo)
なお、この信頼性を計算する場合に使用する所定値def_MaxMin0、Lo、SLo/Loは規定条件での測定値によって定める。規定条件は所定の距離・照度において、所定のコントラストで複数の異なる所定の線幅を有するチャートを用いた測定である。上記の条件は合焦すべき最低条件であり、この条件において各BPFでAF評価値を算出し、その結果から信頼性を計算する場合に使用する所定値を求める。
Reliability = (def_MaxMin / def_MaxMin0) (L / Lo) {SL / L} / (SLo / Lo)}
= (Def_MaxMin / def_MaxMin0) (SL / SLo)
Note that the predetermined values def_MaxMin0, Lo, SLo / Lo used when calculating the reliability are determined by the measured values under the specified conditions. The prescribed condition is measurement using a chart having a plurality of different predetermined line widths with a predetermined contrast at a predetermined distance and illuminance. The above condition is the minimum condition to be focused on, and under this condition, an AF evaluation value is calculated by each BPF, and a predetermined value used when calculating reliability is obtained from the result.

上記第1の実施形態によれば、低域から高域まで複数のBPFでAF評価値の算出を行い、各々のAF評価値からその値が最大となるフォーカスレンズ位置を求めると同時に各々の信頼性を評価する。そして、信頼性が所定値以上のBPFで求めた複数のAF評価値のうち最大となるフォーカスレンズ位置から、撮像素子の加算読み出しなどにより失われた高域の被写体の空間周波数におけるAF評価値が最大となるフォーカスレンズ位置を推測する。そして、その位置を合焦位置とする。これにより、撮像素子の加算読み出しなどの理由により、直接求めることができない被写体の持つ高域の空間周波数によるAF評価値が最大となるフォーカスレンズ位置を推測することができる。   According to the first embodiment, the AF evaluation value is calculated using a plurality of BPFs from the low range to the high range, and the focus lens position at which the value is maximized is obtained from each AF evaluation value, and at the same time, the respective reliability. Assess sex. Then, the AF evaluation value at the spatial frequency of the high frequency object lost by the addition reading of the image sensor or the like from the focus lens position where the reliability is maximized among the plurality of AF evaluation values obtained by the BPF having the reliability of the predetermined value or more is obtained. Estimate the maximum focus lens position. Then, the position is set as a focus position. As a result, it is possible to estimate the focus lens position at which the AF evaluation value by the high spatial frequency of the subject that cannot be directly obtained due to the addition reading of the image sensor or the like is maximized.

[第2の実施形態]
本第2の実施形態は、上記第1の実施形態に対して、信頼性が所定値以上のBPFで得られたAF評価値のピーク位置から最小二乗法で推測式を作成し、その推測式からベストピント位置を求める点で異なる。ここでいうベストピント位置は、失われた高域の被写体の空間周波数におけるAF評価値が最大となるフォーカスレンズ位置である。
[Second Embodiment]
Compared to the first embodiment, the second embodiment creates an estimation formula by the least square method from the peak position of the AF evaluation value obtained with the BPF having a reliability equal to or higher than a predetermined value, and the estimation formula The difference is that the best focus position is obtained from The best focus position here is the focus lens position where the AF evaluation value at the spatial frequency of the lost high-frequency subject is maximized.

具体的には、図5のステップS510における失われた高域のピーク位置の推測方法が上記第1の実施形態とは異なり、その点について説明する。なお、ステップS510以外の処理については図5と同一であるので、その説明は割愛する。   Specifically, the method for estimating the lost high frequency peak position in step S510 of FIG. 5 is different from that of the first embodiment, and this point will be described. Since the processing other than step S510 is the same as that in FIG. 5, the description thereof is omitted.

BPFで得られたAF評価値の信頼性が所定値以上のものが2つの場合は、信頼性が所定値以上のもののうち高域のBPFを選択し、それにそのBPFにおけるBP補正量を加えたものを合焦位置とする。   When there are two AF evaluation values obtained with BPF having a reliability equal to or higher than a predetermined value, a high-frequency BPF is selected from those having a reliability equal to or higher than a predetermined value, and a BP correction amount in the BPF is added thereto. The object is the in-focus position.

BPFで得られたAF評価値の信頼性が所定値以上のものが3つ以上の場合、AF評価値のピーク位置とその撮影画像のナイキスト周波数に対する割合を用いて、最小二乗法により推測式を二次関数近似(高次関数近似)で求め、ベストピント位置を求める。   When the reliability of the AF evaluation value obtained by BPF is three or more, the estimation formula is calculated by the least square method using the peak position of the AF evaluation value and the ratio of the captured image to the Nyquist frequency. Obtained by quadratic function approximation (high-order function approximation) to obtain the best focus position.

ナイキスト周波数に対する割合をXi、そのBPFにおけるAF評価値のピーク位置Yi、ベストピント位置を撮影画像のナイキスト周波数の50%と80%の位置の平均値とした場合、ベストピント位置Pbpは次式(式1)となる。   When the ratio to the Nyquist frequency is Xi, the peak position Yi of the AF evaluation value in the BPF, and the best focus position is the average value of the positions of 50% and 80% of the Nyquist frequency of the photographed image, the best focus position Pbp is Equation 1).

Pbp=ax+bx+c (式1)
但し、a=A1/A2
A1=ΣXi・ΣYi・Xi―ΣYi・Xi・Σxi−[(ΣXiΣYi+(ΣXiΣYi・Xi−ΣXi・ΣYi・Σxi−ΣYi・Xi・Σxi・Σxi]/N
A2=ΣXi・ΣXi−(ΣXi−[(ΣXi+(Σxi)・(Σxi)−2Σxi・Σxi・Σxi]/N
b=B1/B2
B1=ΣYi・Xi−ΣXi・ΣYi/N−a・(Σxi−ΣXi・Σxi/N)
B2=Σxi−(ΣXi)/N
c=[ΣYi−a・Σxi−b・Σxi]/N
x=0.675
N:サンプル数(信頼性が所定値以上のBPFから求めたAF評価値のピークの数)
また、撮影画像のナイキスト周波数に対するフィルターの透過率が最大となる周波数の割合は100%を1として表すものとする。
Pbp = ax 2 + bx + c (Formula 1)
However, a = A1 / A2
A1 = ΣXi 2 · ΣYi · Xi 2 −ΣYi · Xi · Σxi 3 − [(ΣXi 2 ) 2 ΣYi + (ΣXi 2 ) 2 ΣYi · Xi 2 −ΣXi · ΣYi · Σxi 3 −ΣYi · Xi · Σxi 2 · Σxi] / N
A2 = ΣXi 4 · ΣXi 2 − (ΣXi 3 ) 2 − [(ΣXi 2 ) 3 + (Σxi 4 ) · (Σxi 2 ) −2Σxi 3 · Σxi 2 · Σxi] / N
b = B1 / B2
B1 = ΣYi · Xi−ΣXi · ΣYi / N−a · (Σxi 3 −ΣXi · Σxi 2 / N)
B2 = Σxi 2 − (ΣXi) 2 / N
c = [ΣYi−a · Σxi 2 −b · Σxi] / N
x = 0.675
N: Number of samples (number of AF evaluation value peaks obtained from BPF with reliability of a predetermined value or more)
Further, the ratio of the frequency at which the transmittance of the filter is the maximum with respect to the Nyquist frequency of the photographed image is represented as 100%.

上記第2の実施形態によれば、BPFで得られたAF評価値のピーク位置から最小二乗法により推測式を高次関数近似で求めて、その推測式から被写体の高域の空間周波数におけるAF評価値が最大となるベストピント位置を求める。これにより、上記第1の実施形態による効果をさらに奏することができる。   According to the second embodiment, an estimation formula is obtained by high-order function approximation from the peak position of the AF evaluation value obtained by the BPF by a least square method, and AF at a spatial frequency in the high frequency range of the subject is obtained from the estimation formula. The best focus position where the evaluation value is maximized is obtained. Thereby, the effect by the said 1st Embodiment can further be show | played.

[第3の実施形態]
本発明の第3の実施形態は、上記第1及び第2の実施形態に対して、撮像素子の加算読み出しなどにより失われた高域の被写体の空間周波数におけるAF評価値が最大となるフォーカスレンズ位置を推測する式を、製造工程時にカメラ個別に求める点で異なる。
[Third Embodiment]
The third embodiment of the present invention is a focus lens in which the AF evaluation value at the spatial frequency of the high frequency object lost due to the addition reading of the image sensor or the like is maximized as compared with the first and second embodiments. The expression for estimating the position is different in that it is obtained for each camera during the manufacturing process.

製造工程における推測式の算出方法について説明する。   A method for calculating the estimation formula in the manufacturing process will be described.

AF時の読み出し時に3画素加算が行われ、CCD5により実際にAFを行う際に読み出される画素数により決定されるナイキスト周波数の80%、50%、40%、20%でフィルターの透過率が最大となる特性を持つBPFを設定されているものとして説明する。よって、AF時の読み出しにおいては撮影画像のナイキスト周波数に対しては26.7%、16.7%、13.3%、6.7%にてフィルターの透過率が最大となるような特性を持つBPFが設定されているものとする。   Three-pixel addition is performed at the time of readout during AF, and the transmittance of the filter is maximum at 80%, 50%, 40%, and 20% of the Nyquist frequency determined by the number of pixels read out by the CCD 5 when actually performing AF. A description will be given assuming that a BPF having the following characteristics is set. Therefore, in the readout at the time of AF, the filter has the maximum transmittance at 26.7%, 16.7%, 13.3%, and 6.7% with respect to the Nyquist frequency of the photographed image. It is assumed that the BPF that has is set.

製造工程においては撮像素子を非加算のモードで読み出し、読み出しによって高域の被写体の空間周波数が失われないようにする。その上で、AF評価値を算出するBPFの設定を撮影画像のナイキスト周波数に対して80%、50%、26.7%、16.7%、13.3%、6.7%に設定する。そして、設定された各BPFでAF評価値を求め、そのピークを計算する。さらに、その計算されたAF評価値がピークとなる位置から第2の実施形態と同様にして推測式を求める(推測式算出)。推測式は以下のようになる。   In the manufacturing process, the image sensor is read in a non-addition mode so that the spatial frequency of the high frequency object is not lost by the reading. In addition, the BPF for calculating the AF evaluation value is set to 80%, 50%, 26.7%, 16.7%, 13.3%, and 6.7% with respect to the Nyquist frequency of the captured image. . And AF evaluation value is calculated | required with each set BPF, and the peak is calculated. Further, an estimation formula is obtained from the position where the calculated AF evaluation value becomes a peak as in the second embodiment (estimation formula calculation). The guess formula is as follows.

Pbp’=ax+bx+c (式2)
但し、a=A1/A2
A1=ΣXi・ΣYi・Xi−ΣYi・Xi・Σxi−[(ΣXiΣYi+(ΣXiΣYi・Xi−ΣXi・ΣYi・Σxi−ΣYi・Xi・Σxi・Σxi]/N
A2=ΣXi・ΣXi−(ΣXi−[(ΣXi+(Σxi)・(Σxi)−2Σxi・Σxi・Σxi]/N
b=B1/B2
B1=ΣYi・Xi−ΣXi・ΣYi/N−a・(Σxi−ΣXi・Σxi/N)
B2=Σxi−(ΣXi)/N
c=[ΣYi−a・Σxi−b・Σxi]/N
x=0.675
N:サンプル数(信頼性が所定値以上のBPFから求めたAF評価値のピークの数)
また、撮影画像のナイキスト周波数に対するフィルターの透過率が最大となる周波数の割合は100%を1として表すものとする。
Pbp ′ = ax 2 + bx + c (Formula 2)
However, a = A1 / A2
A1 = ΣXi 2 · ΣYi · Xi 2 −ΣYi · Xi · Σxi 3 − [(ΣXi 2 ) 2 ΣYi + (ΣXi 2 ) 2 ΣYi · Xi 2 −ΣXi · ΣYi · Σxi 3 −ΣYi · Xi · Σxi 2 · Σxi] / N
A2 = ΣXi 4 · ΣXi 2 − (ΣXi 3 ) 2 − [(ΣXi 2 ) 3 + (Σxi 4 ) · (Σxi 2 ) −2Σxi 3 · Σxi 2 · Σxi] / N
b = B1 / B2
B1 = ΣYi · Xi−ΣXi · ΣYi / N−a · (Σxi 3 −ΣXi · Σxi 2 / N)
B2 = Σxi 2 − (ΣXi) 2 / N
c = [ΣYi−a · Σxi 2 −b · Σxi] / N
x = 0.675
N: Number of samples (number of AF evaluation value peaks obtained from BPF with reliability of a predetermined value or more)
Further, the ratio of the frequency at which the transmittance of the filter is the maximum with respect to the Nyquist frequency of the photographed image is represented as 100%.

また、上記推測式は、撮影距離・光源によって変化するので、その分に関しては設計値から差分を計算し、補正項を持つことにする。よって、上式は次式(式3)となる。   In addition, since the above estimation formula changes depending on the photographing distance and the light source, the difference is calculated from the design value and the correction term is included. Therefore, the above formula becomes the following formula (Formula 3).

Pbp=ax+bx+c+距離に関する補正項+光源に関する補正項 (式3)
距離に関する補正項は、製造工程での測定距離と実際の撮影距離での曲線の傾きの差に起因するベストピント位置での差分が計算される。同様に、光源に関する補正項は、製造工程での測定光源と実際の撮影時の光源での曲線の傾きの差に起因するベストピント位置での差分が計算される。
Pbp = ax 2 + bx + c + correction term for distance + correction term for light source (Formula 3)
As the correction term for the distance, the difference at the best focus position resulting from the difference in the slope of the curve between the measurement distance in the manufacturing process and the actual shooting distance is calculated. Similarly, as the correction term for the light source, the difference at the best focus position due to the difference in the slope of the curve between the measurement light source in the manufacturing process and the light source during actual photographing is calculated.

実際のAFの際の動作を図15a、図15bを用いて説明する。なお、図5と同一の動作を行う処理については同じ番号を付けている。また、その処理に関しての説明は省略する。   The actual AF operation will be described with reference to FIGS. 15a and 15b. In addition, the same number is attached | subjected about the process which performs the same operation | movement as FIG. Further, the description regarding the processing is omitted.

図15aに示すように、上記第1の実施形態の図5と同一の動作をステップS501からステップS507まで行う。ステップS506で算出された全てのBPFで得られたAF評価値の信頼性が低い場合(所定値に満たない場合)は、図5と同様に、ステップS507からステップS513へ進む。そして、定点と呼ばれる予め定められた自動焦点調整が不能な場合に駆動する位置へフォーカスレンズ群3を駆動する(ステップS513)。この場合は、上述のように図2のステップS5にてAFNG表示が行われる。   As shown in FIG. 15a, the same operation as in FIG. 5 of the first embodiment is performed from step S501 to step S507. If the reliability of the AF evaluation values obtained for all the BPFs calculated in step S506 is low (less than the predetermined value), the process proceeds from step S507 to step S513 as in FIG. Then, the focus lens group 3 is driven to a position to be driven when a predetermined automatic focus adjustment called a fixed point is impossible (step S513). In this case, as described above, AFNG display is performed in step S5 of FIG.

ステップS507において、信頼性が所定値以上のBPFがあると判断された場合は(ステップS507でNO)、図15bのステップS1501へ進む。   If it is determined in step S507 that there is a BPF having a reliability equal to or higher than the predetermined value (NO in step S507), the process proceeds to step S1501 in FIG.

ステップS1501では、AF評価値の信頼性が所定値以上のBPFのうちフィルターの透過率が最大となる被写体の周波数の低いBPFにより求めたAF評価値のピークの値と、製造工程で求められた推測式のそのBPFに対応する周波数の値との差分を求める。   In step S1501, the peak value of the AF evaluation value obtained by the BPF having a low subject frequency at which the filter transmittance is the maximum among the BPFs having the reliability of the AF evaluation value equal to or higher than the predetermined value and the manufacturing process are obtained. The difference with the value of the frequency corresponding to the BPF of the estimation formula is obtained.

次に、ステップS1502,S1503において、次のフィルターの透過率が最大となる被写体の周波数の低いBPFの信頼性を調べ、その信頼性が低い場合は、その次のフィルターの透過率が最大となる被写体の周波数の低いBPFの信頼性を調べる。信頼性が所定値以上の場合は(ステップS1503でYES)、そのBPFにおけるAF評価値のピーク位置を求めた(ステップS1504)後、ステップS1501で求めた差分を加算し、ピーク値をシフトする(ステップS1505)。   Next, in steps S1502 and S1503, the reliability of the BPF having the lowest subject frequency at which the transmittance of the next filter is maximized is checked. If the reliability is low, the transmittance of the next filter is maximized. The reliability of a BPF with a low subject frequency is examined. If the reliability is equal to or higher than the predetermined value (YES in step S1503), the peak position of the AF evaluation value in the BPF is obtained (step S1504), and then the difference obtained in step S1501 is added to shift the peak value ( Step S1505).

信頼性が低い場合は(ステップS1503でNO)、そのBPFに関する処理は行わず、ステップS1502に戻り、次のBPFに関して同様の動作を行う。   If the reliability is low (NO in step S1503), the process related to the BPF is not performed, the process returns to step S1502, and the same operation is performed for the next BPF.

全てのBPFに関する処理が終了したならば、ステップS1506からステップS1507へ進み、製造工程で求めた推測式とステップS1505で各BPFのAF評価値から求めたピーク値をシフトした値の最小二乗誤差を求める(ステップS1507)。そして、最小二乗誤差が所定値未満の場合は(ステップS1508でYES)、ステップS1509へ進み、製造工程で求めた推測式に基づき合焦位置を求める。すなわち、製造工程で求められた推測式Pbp=ax+bx+c+距離に関する補正項+光源に関する補正項にステップS1501で求めた差分を加えた値を合焦位置とする。ここで距離に関する補正項は、AFの結果から逆算した撮影距離により予め不図示のメモリに記録された値を参照することで求める。同様に、光源に関する補正項はAF時に求められるホワイトバランス係数(WB係数)から予め不図示のメモリに記録された値を参照することで求める。 When processing for all the BPFs is completed, the process proceeds from step S1506 to step S1507, and the least square error of the value obtained by shifting the estimation formula obtained in the manufacturing process and the peak value obtained from the AF evaluation value of each BPF in step S1505 is calculated. Obtained (step S1507). If the least square error is less than the predetermined value (YES in step S1508), the process advances to step S1509 to obtain the in-focus position based on the estimation formula obtained in the manufacturing process. In other words, a value obtained by adding the difference obtained in step S1501 to the correction term related to the estimation formula Pbp = ax 2 + bx + c + distance + correction term related to the light source obtained in the manufacturing process is set as the in-focus position. Here, the correction term relating to the distance is obtained by referring to a value recorded in advance in a memory (not shown) based on the shooting distance calculated backward from the AF result. Similarly, a correction term relating to the light source is obtained by referring to a value recorded in advance in a memory (not shown) from a white balance coefficient (WB coefficient) obtained during AF.

一方、最小二乗誤差が所定値以上の場合は(ステップS1508でNO)、ステップS1510へ進み、信頼性が所定値以上のAF評価値を与えるBPFが3つ以上あるか否かを調べる。BPFで得られたAF評価値の信頼性が所定値以上のものが3つ以上の場合は(ステップS1510でYES)、ステップS1511へ進む。   On the other hand, if the least square error is greater than or equal to the predetermined value (NO in step S1508), the process proceeds to step S1510 to check whether there are three or more BPFs that provide AF evaluation values with reliability greater than or equal to the predetermined value. If the reliability of the AF evaluation value obtained by BPF is three or more (YES in step S1510), the process proceeds to step S1511.

ステップS1511では、上記第2の実施形態と同様に、得られたAF評価値のピーク位置とその撮影画像のナイキスト周波数に対する割合を用いて、最小二乗法を用いて推測式を二次関数近似で求め、ベストピント位置を求める。   In step S1511, similarly to the second embodiment, the estimation formula is approximated by a quadratic function using the least square method using the peak position of the obtained AF evaluation value and the ratio of the captured image to the Nyquist frequency. Find the best focus position.

一方、3つ以上ない場合は(ステップS1510でNO)、ステップS1509に進み、製造工程で求めた推測式に基づき合焦位置を求める。   On the other hand, if there are not three or more (NO in step S1510), the process proceeds to step S1509, and the in-focus position is obtained based on the estimation formula obtained in the manufacturing process.

以上の動作の一例を図16を用いて説明する。   An example of the above operation will be described with reference to FIG.

図16は、第3の実施形態における高域の被写体の空間周波数におけるAF評価値が最大となるフォーカスレンズ位置を推測する方法の動作の一例を説明する図である。図示例では、横軸に被写体周波数、縦軸にフォーカス位置を表し、太線が製造工程で求められた推測式である。また、黒丸の部分がこの撮影レンズ鏡筒31における製造工程で測定した時点のベストピント位置であり、被写体周波数は撮影時のナイキスト周波数の50%と80%の平均値、縦軸にはその時点のフォーカス位置が示されている。   FIG. 16 is a diagram for explaining an example of the operation of the method of estimating the focus lens position at which the AF evaluation value at the spatial frequency of the high frequency subject in the third embodiment is maximized. In the illustrated example, the horizontal axis represents the subject frequency, the vertical axis represents the focus position, and the bold line represents the estimation formula obtained in the manufacturing process. The black circles indicate the best focus position at the time of measurement in the manufacturing process of the photographing lens barrel 31. The subject frequency is an average value of 50% and 80% of the Nyquist frequency at the time of photographing. The focus position is shown.

実際のAF時にQ1,Q2,Q3,Q4の4つのフォーカス位置が得られたとする。これは、それぞれ撮影画像のナイキスト周波数に対しては26.7%、16.7%、13.3%、6.7%にてフィルターの透過率が最大となるような特性を持つBPFにて得られたAF評価値がピークとなる位置である。AF時にこのようなデータが得られた場合、得られたデータの信頼性をチェックするが、ここでは、全てのデータの信頼性が高い(所定値以上)と仮定する。信頼性が所定値以上のBPFのうちフィルターの透過率が最大となる被写体の周波数の低いBPFにより求めたAF評価値のピークの値Q1と製造工程で求められた推測式のそのBPFに対応する周波数の値q1との差分を求める(図15bのステップS1501)。   Assume that four focus positions Q1, Q2, Q3, and Q4 are obtained during actual AF. This is due to the BPF having such characteristics that the transmittance of the filter is maximum at 26.7%, 16.7%, 13.3%, and 6.7% with respect to the Nyquist frequency of the captured image, respectively. The obtained AF evaluation value is a peak. When such data is obtained during AF, the reliability of the obtained data is checked. Here, it is assumed that the reliability of all data is high (a predetermined value or more). Corresponding to the peak value Q1 of the AF evaluation value obtained by the BPF having the lowest subject frequency where the transmittance of the filter is the maximum among the BPFs having the reliability equal to or higher than the predetermined value, and the BPF of the estimation formula obtained in the manufacturing process. The difference from the frequency value q1 is obtained (step S1501 in FIG. 15b).

次に、各BPFで得られたAF評価値からそのピーク値Q2,Q3,Q4を求め(図15bのステップS1504)、その後、q2,q3,q4を以下の式に従い求める(図15bのステップS1505)。   Next, peak values Q2, Q3, and Q4 are obtained from the AF evaluation values obtained by each BPF (step S1504 in FIG. 15b), and then q2, q3, and q4 are obtained according to the following equations (step S1505 in FIG. 15b). ).

q2=Q2+(q1−Q1)
q3=Q3+(q1−Q1)
q4=Q4+(q1−Q1)
そして、製造工程で求めた推測式と最小二乗誤差Eを次式で求める(図15bのステップS1507)。
q2 = Q2 + (q1-Q1)
q3 = Q3 + (q1-Q1)
q4 = Q4 + (q1-Q1)
Then, the estimation formula obtained in the manufacturing process and the least square error E are obtained by the following formula (step S1507 in FIG. 15b).

E=(p2−q2)+(p3−q3)+(p4−q4)
但し、p2,p3,p4は推測式における各被写体周波数のフォーカス位置である。そして、この求めた値が所定値未満の場合は、製造工程で求めた推測式に基づき合焦位置を求める(図15bのステップS1509)。これは、上記Pbpに、信頼性が所定値以上のBPFのうちフィルターの透過率が最大となる被写体の周波数の低いBPFにより求めたAF評価値のピークの値Q1と製造工程で求められた推測式のそのBPFに対応する周波数の値q1との差分を引いたものとなる。すなわち、合焦位置は次式となる。
E = (p2-q2) 2 + (p3-q3) 2 + (p4-q4) 2
Here, p2, p3, and p4 are focus positions of the subject frequencies in the estimation formula. If the obtained value is less than the predetermined value, the in-focus position is obtained based on the estimation equation obtained in the manufacturing process (step S1509 in FIG. 15b). This is because the peak value Q1 of the AF evaluation value obtained from the BPF having the lowest filter frequency among the BPFs whose reliability is equal to or higher than the predetermined value PPF, and the estimation obtained in the manufacturing process. The difference from the frequency value q1 corresponding to the BPF in the equation is subtracted. That is, the in-focus position is as follows.

合焦位置=ax+bx+c+距離に関する補正項+光源に関する補正項−(q1−Q1)
最小二乗誤差Eが所定値以上の場合は、信頼性が所定値以上のものが3つ以上あるか調べ(図15bのステップS1510)、3つ以上の場合は最小二乗法を用いて推測式を二次関数近似(高次関数近似)で求め、ベストピント位置を求める。式は、上記第2の実施形態における(式1)で示した通りである。ちなみに、この例とは異なり信頼性が所定値以上のものが2つ以下の場合は、製造工程で求めた推測式に基づき合焦位置を求める(図15bのステップS1509)。
In-focus position = ax 2 + bx + c + correction term for distance + correction term for light source- (q1-Q1)
If the least square error E is greater than or equal to a predetermined value, it is checked whether there are three or more reliability having a reliability greater than or equal to the predetermined value (step S1510 in FIG. 15b). Obtained by quadratic function approximation (high-order function approximation) to obtain the best focus position. The formula is as shown in (Formula 1) in the second embodiment. Incidentally, unlike this example, when the reliability is two or less than the predetermined value, the in-focus position is obtained based on the estimation formula obtained in the manufacturing process (step S1509 in FIG. 15b).

上記第3の実施形態によれば、製造工程で求めた推測式と撮影時に信頼性が所定値以上のものうち最も低域のフィルターで算出されたAF評価値の最大値から差分をシフトした値の最小二乗誤差を求める。そして、その値が所定値以上の場合は、選択されたフィルターで算出されたAF評価値の最大値から最小二乗法により推測式を高次関数近似で求めて、その推測式から被写体の高域の空間周波数におけるAF評価値が最大となる焦点調整手段の駆動位置を求める。これにより、上記第1の実施形態による効果をさらに奏することができる。   According to the third embodiment, a value obtained by shifting the difference from the maximum value of the AF evaluation value calculated by the lowest filter among the estimation formula obtained in the manufacturing process and the reliability having a predetermined value or more at the time of shooting. Find the least square error of. If the value is equal to or greater than a predetermined value, an estimation formula is obtained by high-order function approximation from the maximum value of the AF evaluation value calculated by the selected filter by the least square method, and the high frequency of the subject is calculated from the estimation formula. The driving position of the focus adjusting means that maximizes the AF evaluation value at the spatial frequency of is obtained. Thereby, the effect by the said 1st Embodiment can further be show | played.

上記第1、第2、及び第3の実施形態では、コンパクトタイプのデジタルカメラを例に説明したが、デジタルビデオカメラやデジタルSLRにも適用可能である。   In the first, second, and third embodiments, the compact type digital camera has been described as an example, but the present invention can also be applied to a digital video camera and a digital SLR.

また、本発明の目的は、以下の処理を実行することによっても達成される。即ち、上述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)が記憶媒体に格納されたプログラムコードを読み出す処理である。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施の形態の機能を実現することになり、そのプログラムコード及び該プログラムコードを記憶した記憶媒体は本発明を構成することになる。   The object of the present invention can also be achieved by executing the following processing. That is, a storage medium in which a program code of software that realizes the functions of the above-described embodiments is supplied to a system or apparatus, and a computer (or CPU or MPU) of the system or apparatus is stored in the storage medium. This is the process of reading the code. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the program code and the storage medium storing the program code constitute the present invention.

また、プログラムコードを供給するための記憶媒体としては、次のものを用いることができる。例えば、フロッピー(登録商標)ディスク、ハードディスク、光磁気ディスク、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−RAM、DVD−RW、DVD+RW、磁気テープ、不揮発性のメモリカード、ROM等である。または、プログラムコードをネットワークを介してダウンロードしてもよい。   Moreover, the following can be used as a storage medium for supplying the program code. For example, floppy (registered trademark) disk, hard disk, magneto-optical disk, CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW, magnetic tape, nonvolatile memory card, ROM or the like. Alternatively, the program code may be downloaded via a network.

また、コンピュータが読み出したプログラムコードを実行することにより、上記実施の形態の機能が実現される場合も本発明に含まれる。加えて、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれる。   Further, the present invention includes a case where the function of the above embodiment is realized by executing the program code read by the computer. In addition, an OS (operating system) running on the computer performs part or all of the actual processing based on an instruction of the program code, and the functions of the above-described embodiments are realized by the processing. Is also included.

さらに、前述した実施形態の機能が以下の処理によって実現される場合も本発明に含まれる。即ち、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれる。その後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行う場合である。   Furthermore, a case where the functions of the above-described embodiment are realized by the following processing is also included in the present invention. That is, the program code read from the storage medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. Thereafter, based on the instruction of the program code, the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing.

本発明の第1の実施形態に係る自動焦点調整装置を備える撮像装置の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of an imaging device provided with the automatic focus adjustment apparatus which concerns on the 1st Embodiment of this invention. 撮像装置における撮影動作の流れを示すフローチャートである。It is a flowchart which shows the flow of the imaging | photography operation | movement in an imaging device. 画像信号から検出される高周波成分とフォーカスレンズ群の関係の一例を示す図である。It is a figure which shows an example of the relationship between the high frequency component detected from an image signal, and a focus lens group. 被写体の空間周波数とピント位置の関係の一例を示す図である。It is a figure which shows an example of the relationship between the to-be-photographed object's spatial frequency and a focus position. 図2のステップS4におけるスキャンAF処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the scan AF process in step S4 of FIG. AF評価値とフォーカスレンズ位置との関係を示す図である。It is a figure which shows the relationship between AF evaluation value and a focus lens position. ステップS506における信頼性計算処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the reliability calculation process in step S506. ステップS704における無限遠に相当する位置方向への単調減少を調べる処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the process which investigates the monotone decrease to the position direction equivalent to infinity in step S704. ステップS706における至近端に相当する位置方向への単調減少を調べる処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the process which investigates the monotone decrease to the position direction equivalent to the near end in step S706. ステップS510における動作の詳細な流れを示すフローチャートである。It is a flowchart which shows the detailed flow of operation | movement in step S510. 撮影レンズ鏡筒を構成するレンズの厚みが変化した場合の被写体周波数とピント位置の関係を示す図である。It is a figure which shows the relationship between a to-be-photographed object frequency and a focus position when the thickness of the lens which comprises a photographic lens barrel changes. 撮影レンズ鏡筒を構成するレンズの曲率が変化した場合の被写体周波数とピント位置の関係を示す図である。It is a figure which shows the relationship between a to-be-photographed object frequency and a focus position when the curvature of the lens which comprises a photographic lens barrel changes. 撮影レンズ鏡筒を構成するレンズとCCDの間隔が変化した場合の被写体周波数とピント位置の関係を示す図である。It is a figure which shows the relationship between a to-be-photographed object frequency and a focus position when the space | interval of the lens and CCD which comprises a photographic lens barrel changes. レンズの厚み、曲率、CCDの間隔の3つの要素が変化した場合の被写体周波数とピント位置の関係を示す図である。It is a figure which shows the relationship between a to-be-photographed object frequency and a focus position when three elements, such as a lens thickness, a curvature, and the space | interval of CCD, change. 第3の実施形態におけるスキャンAF処理の詳細を示すフローチャートである(その1)。12 is a flowchart showing details of a scan AF process in the third embodiment (No. 1). 第3の実施形態におけるスキャンAF処理の詳細を示すフローチャートである(その2)。12 is a flowchart showing details of a scan AF process in the third embodiment (No. 2). 第3の実施形態における高域の被写体の空間周波数におけるAF評価値が最大となるフォーカスレンズ位置を推測する方法の動作の一例を説明する図である。It is a figure explaining an example of operation | movement of the method of estimating the focus lens position in which AF evaluation value in the spatial frequency of the high frequency subject in 3rd Embodiment becomes the maximum.

符号の説明Explanation of symbols

1 撮像装置
2 ズームレンズ群
3 フォーカスレンズ群
4 絞り
5 撮像素子
6 撮像回路
10 LCD
13 AE処理回路
14 スキャンAF処理回路
15 CPU
31 撮影レンズ鏡筒
DESCRIPTION OF SYMBOLS 1 Imaging device 2 Zoom lens group 3 Focus lens group 4 Aperture 5 Imaging element 6 Imaging circuit 10 LCD
13 AE processing circuit 14 Scan AF processing circuit 15 CPU
31 Shooting lens barrel

Claims (12)

撮影光学系により結像される被写体像を光電変換して画像信号を得る撮像手段と、前記撮像手段に光電変換される被写体像の焦点を調整する焦点調整手段と、異なる特性を持ち、複数の被写体の高域の空間周波数を抽出する複数のフィルターを有し、前記焦点調整手段を駆動しながら前記撮像手段によって得られた画像信号から合焦位置を検出する合焦位置検出手段とを有する自動焦点調整装置において、
前記合焦位置検出手段は、
前記複数のフィルターでAF評価値を算出し、算出された各AF評価値からその信頼性を計算し、計算された信頼性が所定値以上のもののうち最も高域のフィルターを選択し、選択されたフィルターで算出されたAF評価値が最大となる焦点調整手段の駆動位置を算出する算出手段と、
前記算出された焦点調整手段の駆動位置から、前記被写体の高域の空間周波数におけるAF評価値が最大となる焦点調整手段の駆動位置を推測し、当該駆動位置に前記焦点調整手段を駆動するように制御する制御手段とを備えることを特徴とする自動焦点調整装置。
An imaging unit that photoelectrically converts a subject image formed by the imaging optical system to obtain an image signal, and a focus adjustment unit that adjusts the focus of the subject image photoelectrically converted by the imaging unit have different characteristics, and a plurality of An automatic focus position detection unit that includes a plurality of filters that extract a spatial frequency of a high frequency range of a subject and that detects a focus position from an image signal obtained by the imaging unit while driving the focus adjustment unit; In the focus adjustment device,
The in-focus position detecting means includes
The AF evaluation value is calculated by the plurality of filters, the reliability is calculated from each calculated AF evaluation value, and the highest-frequency filter is selected from among those having the calculated reliability equal to or higher than a predetermined value. Calculating means for calculating the driving position of the focus adjusting means that maximizes the AF evaluation value calculated by the filter;
From the calculated drive position of the focus adjustment means, the drive position of the focus adjustment means that maximizes the AF evaluation value at a high spatial frequency of the subject is estimated, and the focus adjustment means is driven to the drive position. And an automatic focus adjustment device.
前記撮影光学系の製造公差を考慮して作成された、AF時に得る被写体周波数と前記焦点調整手段の駆動位置との関係を表す曲線を予め記録する記録手段を備え、
前記制御手段は、前記選択されたフィルターで算出されたAF評価値の最大値が前記曲線にプロット可能か否かに応じて前記焦点調整手段の駆動位置を推測することを特徴とする請求項1記載の自動焦点調整装置。
A recording unit that preliminarily records a curve representing a relationship between a subject frequency obtained during AF and a driving position of the focus adjustment unit, which is created in consideration of manufacturing tolerances of the imaging optical system;
The control unit estimates the driving position of the focus adjustment unit according to whether or not the maximum value of the AF evaluation value calculated by the selected filter can be plotted on the curve. The automatic focusing device as described.
前記制御手段は、前記選択されたフィルターで算出されたAF評価値の最大値が前記曲線にプロットできない場合は、前記選択されたフィルターで算出されたAF評価値の最大値となる前記焦点調整手段の駆動位置から前記焦点調整手段の特性により決まる所定の補正量だけずらした位置に、前記焦点調整手段を駆動するように焦点調整手段を制御することを特徴とする請求項2記載の自動焦点調整装置。   When the maximum AF evaluation value calculated by the selected filter cannot be plotted on the curve, the control means becomes the focus adjustment means that becomes the maximum AF evaluation value calculated by the selected filter. 3. The automatic focus adjustment according to claim 2, wherein the focus adjustment unit is controlled so as to drive the focus adjustment unit to a position shifted by a predetermined correction amount determined by a characteristic of the focus adjustment unit from the driving position. apparatus. 前記制御手段は、前記選択されたフィルターで算出されたAF評価値の最大値が前記複数の曲線にプロットできた場合は、当該複数の曲線に関して最小二乗誤差を求め、最小の曲線を選択することを特徴とする請求項2記載の自動焦点調整装置。   When the maximum value of the AF evaluation value calculated by the selected filter can be plotted on the plurality of curves, the control means obtains a least square error with respect to the plurality of curves and selects the minimum curve. The automatic focus adjustment apparatus according to claim 2. 前記制御手段は、前記選択されたフィルターで算出されたAF評価値の最大値から最小二乗法により推測式を高次関数近似で求めて、その推測式から前記被写体の高域の空間周波数におけるAF評価値が最大となる焦点調整手段の駆動位置を求めることを特徴とする請求項1記載の自動焦点調整装置。   The control means obtains an estimation formula by high-order function approximation from the maximum value of the AF evaluation values calculated by the selected filter by a least-squares method, and AF at a spatial frequency in the high frequency range of the subject from the estimation formula 2. The automatic focus adjustment apparatus according to claim 1, wherein the drive position of the focus adjustment means that maximizes the evaluation value is obtained. 前記制御手段は、前記選択されたフィルターで算出されたAF評価値の信頼性が所定値以上のものが3つある場合は、当該AF評価値の最大値とその撮影画像のナイキスト周波数に対する割合を用いて、前記最小二乗法により推測式を高次関数近似で求めることを特徴とする請求項5記載の自動焦点調整装置。   When the reliability of the AF evaluation value calculated by the selected filter is three or more, the control means determines the maximum value of the AF evaluation value and the ratio of the captured image to the Nyquist frequency. 6. The automatic focus adjustment apparatus according to claim 5, wherein the estimation formula is obtained by high-order function approximation by the least square method. 製造工程時に、前記撮像手段により実際にAFを行う際に行われる読み出しとは異なる方法で読み出しを行って、前記選択されたフィルターで算出されたAF評価値の最大値から最小二乗法により推測式を高次関数近似で求める推測式算出手段と、
撮影時に前記選択されたフィルターで算出されたAF評価値が最大となる焦点調整手段の駆動位置と、製造工程時に前記選択されたフィルターで算出されたAF評価値が最大となる焦点調整手段の駆動位置の関係を表す曲線を作成する作成手段とをさらに備えることを特徴とする請求項1記載の自動焦点調整装置。
In the manufacturing process, the readout is performed by a method different from the readout performed when the AF is actually performed by the imaging unit, and the estimation formula is calculated by the least square method from the maximum value of the AF evaluation value calculated by the selected filter. An inference formula calculating means for obtaining a high-order function approximation,
Driving position of the focus adjustment unit that maximizes the AF evaluation value calculated by the selected filter at the time of photographing, and driving of the focus adjustment unit that maximizes the AF evaluation value calculated by the selected filter during the manufacturing process 2. The automatic focus adjustment apparatus according to claim 1, further comprising creation means for creating a curve representing a positional relationship.
前記制御手段は、前記信頼性が所定値以上のものうち最も低域のフィルターで算出されたAF評価値の最大値と、前記推測式の当該フィルターに対応する周波数の値との差分だけ前記焦点調整手段の駆動位置をシフトすることにより、前記焦点調整手段の駆動位置を推測することを特徴とする請求項6記載の自動焦点調整装置。   The control means is configured to reduce the focus by a difference between a maximum value of the AF evaluation value calculated by the lowest-frequency filter having a reliability equal to or higher than a predetermined value and a frequency value corresponding to the filter of the inference formula. 7. The automatic focus adjustment apparatus according to claim 6, wherein the drive position of the focus adjustment means is estimated by shifting the drive position of the adjustment means. 製造工程で求めた推測式と撮影時に前記信頼性が所定値以上のものうち最も低域のフィルターで算出されたAF評価値の最大値から前記差分をシフトした値の最小二乗誤差を求め、その値が所定値以上の場合は、前記選択されたフィルターで算出されたAF評価値の最大値から最小二乗法により推測式を高次関数近似で求めて、その推測式から前記被写体の高域の空間周波数におけるAF評価値が最大となる焦点調整手段の駆動位置を求めることを特徴とする請求項8記載の自動焦点調整装置。   Finding the least square error of the value obtained by shifting the difference from the maximum value of the AF evaluation value calculated by the filter of the lowest frequency out of the estimation formula obtained in the manufacturing process and the reliability at the time of shooting more than a predetermined value, If the value is greater than or equal to a predetermined value, a high-order function approximation is obtained from the maximum value of the AF evaluation value calculated by the selected filter by high-order function approximation using the least square method, and the high frequency of the subject is calculated from the prediction expression. 9. The automatic focus adjustment apparatus according to claim 8, wherein the drive position of the focus adjustment means that maximizes the AF evaluation value at the spatial frequency is obtained. 前記制御手段は、前記選択されたフィルターで算出されたAF評価値の最大値が前記曲線にプロットできない場合は、前記信頼性が所定値以上のものうち前記フィルターの透過率が最大となるフィルターを選択し、選択されたフィルターに対応するピント補正量だけ、前記選択されたフィルターで算出されたAF評価値が最大となる焦点調整手段の駆動位置からずらした位置に、前記焦点調整手段を駆動するように焦点調整手段を制御することを特徴とする請求項2記載の自動焦点調整装置。   When the maximum AF evaluation value calculated by the selected filter cannot be plotted on the curve, the control means determines a filter having the maximum transmittance of the filter out of those having a reliability equal to or higher than a predetermined value. Select and drive the focus adjustment means to a position shifted from the drive position of the focus adjustment means that maximizes the AF evaluation value calculated by the selected filter by the focus correction amount corresponding to the selected filter. 3. The automatic focus adjusting apparatus according to claim 2, wherein the focus adjusting means is controlled as described above. 撮影光学系により結像される被写体像を光電変換して画像信号を得る撮像手段と、前記撮像手段に光電変換される被写体像の焦点を調整する焦点調整手段と、異なる特性を持ち、複数の被写体の高域の空間周波数を抽出する複数のフィルターを有し、前記焦点調整手段を駆動しながら前記撮像手段によって得られた画像信号から合焦位置を検出する合焦位置検出手段とを有する自動焦点調整装置の自動焦点調整方法において、
前記複数のフィルターでAF評価値を算出し、算出された各AF評価値からその信頼性を計算し、計算された信頼性が所定値以上のもののうち最も高域のフィルターを選択し、選択されたフィルターで算出されたAF評価値が最大となる焦点調整手段の駆動位置を算出する算出ステップと、
前記算出された焦点調整手段の駆動位置から、前記被写体の高域の空間周波数におけるAF評価値が最大となる焦点調整手段の駆動位置を推測し、当該駆動位置に前記焦点調整手段を駆動するように制御する制御ステップとを備えることを特徴とする自動焦点調整方法。
An imaging unit that photoelectrically converts a subject image formed by the imaging optical system to obtain an image signal, and a focus adjustment unit that adjusts the focus of the subject image photoelectrically converted by the imaging unit have different characteristics, and a plurality of An automatic focus position detection unit that includes a plurality of filters that extract a spatial frequency of a high frequency range of a subject and that detects a focus position from an image signal obtained by the imaging unit while driving the focus adjustment unit; In the automatic focus adjustment method of the focus adjustment device,
The AF evaluation value is calculated by the plurality of filters, the reliability is calculated from each calculated AF evaluation value, and the highest-frequency filter is selected from among those having the calculated reliability equal to or higher than a predetermined value. A calculation step for calculating a driving position of the focus adjustment unit that maximizes the AF evaluation value calculated by the filter;
From the calculated drive position of the focus adjustment means, the drive position of the focus adjustment means that maximizes the AF evaluation value at a high spatial frequency of the subject is estimated, and the focus adjustment means is driven to the drive position. And a control step for controlling the automatic focus adjustment.
請求項11記載の自動焦点調整方法をコンピュータに実行させるためのコンピュータに読み取り可能なプログラム。   A computer-readable program for causing a computer to execute the automatic focus adjustment method according to claim 11.
JP2008244319A 2008-09-24 2008-09-24 Automatic focus adjustment device and method, and program Pending JP2010078681A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008244319A JP2010078681A (en) 2008-09-24 2008-09-24 Automatic focus adjustment device and method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008244319A JP2010078681A (en) 2008-09-24 2008-09-24 Automatic focus adjustment device and method, and program

Publications (1)

Publication Number Publication Date
JP2010078681A true JP2010078681A (en) 2010-04-08

Family

ID=42209253

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008244319A Pending JP2010078681A (en) 2008-09-24 2008-09-24 Automatic focus adjustment device and method, and program

Country Status (1)

Country Link
JP (1) JP2010078681A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012159798A (en) * 2011-02-02 2012-08-23 Canon Inc Image pickup apparatus, method for adjusting focus, and program
JP2015034732A (en) * 2013-08-08 2015-02-19 キヤノン株式会社 Distance calculation device, imaging apparatus, and distance calculation method
JP2016014839A (en) * 2014-07-03 2016-01-28 キヤノン株式会社 Imaging device and control method of the same

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012159798A (en) * 2011-02-02 2012-08-23 Canon Inc Image pickup apparatus, method for adjusting focus, and program
JP2015034732A (en) * 2013-08-08 2015-02-19 キヤノン株式会社 Distance calculation device, imaging apparatus, and distance calculation method
JP2016014839A (en) * 2014-07-03 2016-01-28 キヤノン株式会社 Imaging device and control method of the same

Similar Documents

Publication Publication Date Title
US8416338B2 (en) Imaging device and imaging method
JP5609270B2 (en) IMAGING DEVICE, IMAGING SYSTEM, IMAGING DEVICE CONTROL METHOD, AND PROGRAM
US9723208B2 (en) Image processing apparatus, method for controlling the same, and storage medium
JP6116277B2 (en) Imaging apparatus and control method thereof
JP2007019973A (en) Imaging device and imaging method
JP6045254B2 (en) Image processing apparatus, control method thereof, and control program
JP5106143B2 (en) Automatic focus adjustment device and automatic focus adjustment method thereof
JP6041871B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP5936358B2 (en) Image display device, image display method, imaging device and control method thereof, program, and storage medium storing the same
JP2019133026A (en) Imaging apparatus and focus adjustment method thereof, and program
JP5787634B2 (en) Imaging device
JP4235422B2 (en) FOCUS DETECTION METHOD, FOCUS DETECTION DEVICE, AND IMAGING DEVICE
JP2010078681A (en) Automatic focus adjustment device and method, and program
JP5780752B2 (en) Automatic focus adjustment device and automatic focus adjustment method
JP5371474B2 (en) Imaging apparatus, control method, and program
JP5402242B2 (en) Image reproduction apparatus, imaging apparatus, image reproduction method, and image reproduction program
JP2005141068A (en) Automatic focusing device, automatic focusing method, and control program readable by computer
JP2020148980A (en) Imaging device and focus adjustment method
JP2014102290A (en) Automatic focusing apparatus
JP5106146B2 (en) Automatic focus adjustment device
JP2009198975A (en) Focus adjustment device and focus adjustment method therefor
JP6351310B2 (en) Imaging apparatus, control method therefor, program, and storage medium
JP2009049457A (en) Imaging device and program
JP3977406B2 (en) Autofocus device, autofocus method, imaging device, program, storage medium
JP5069076B2 (en) Imaging apparatus and continuous imaging method