JP2016206441A - Control device, imaging device, control method, program, and recording medium - Google Patents

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

Info

Publication number
JP2016206441A
JP2016206441A JP2015088366A JP2015088366A JP2016206441A JP 2016206441 A JP2016206441 A JP 2016206441A JP 2015088366 A JP2015088366 A JP 2015088366A JP 2015088366 A JP2015088366 A JP 2015088366A JP 2016206441 A JP2016206441 A JP 2016206441A
Authority
JP
Japan
Prior art keywords
image
signal
value
pixel
phase difference
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
JP2015088366A
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 JP2015088366A priority Critical patent/JP2016206441A/en
Publication of JP2016206441A publication Critical patent/JP2016206441A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To realize high-speed focus control while speeding up display update of a display device.SOLUTION: The control device comprises: acquisition means for acquiring a first image signal for forming a photographic image, which is output by adding a signal from a plurality of photoelectric conversion units in each of a plurality of first pixels included in a first image region, and acquiring a second image signal which is output mutually independently of the plurality of photoelectric conversion units in each of a plurality of second pixels included in a second image region; first computation means for performing correlation operation using a phase difference system on the basis of a second pixel signal and determining correlation data; second computation means for performing shift addition of adding the second pixel signal while performing shift for the plurality of photoelectric conversion units corresponding to the respective second pixels between the second pixels and determining addition data; and control means for performing focus control on the basis of the correlation data and the addition data.SELECTED DRAWING: Figure 1

Description

本発明は、撮像装置に装着された交換レンズのフォーカス制御を行う制御装置に関する。   The present invention relates to a control device that performs focus control of an interchangeable lens mounted on an imaging device.

レンズ交換タイプのデジタルカメラ等の撮像装置には交換レンズのフォーカス制御(オートフォーカス:AF)を行うフォーカス制御装置が搭載されるが、交換レンズ固有の諸収差がフォーカス制御の精度、つまりは合焦精度に影響を及ぼす場合がある。   An imaging device such as an interchangeable lens digital camera is equipped with a focus control device that performs focus control (autofocus: AF) of the interchangeable lens, but various aberrations inherent to the interchangeable lens are related to the accuracy of focus control, that is, focusing. May affect accuracy.

特許文献1には、撮像素子の各画素の信号を間引いて読み出す場合と間引かないで読み出す場合とで、複数の撮像用画素の間に離散的に配置された焦点検出用画素の組み合わせを切り替える撮像装置が開示されている。これにより、全画素の信号を間引くことによって読み出された画像データに焦点検出用の画素が含まれず、位相差方式による焦点検出ができないという弊害を解決できる。   In Patent Document 1, a combination of focus detection pixels that are discretely arranged between a plurality of imaging pixels is switched between a case where signals of each pixel of an imaging element are read out and a case where reading is performed without thinning out. An imaging device is disclosed. As a result, the image data read out by thinning out the signals of all the pixels does not include the focus detection pixels, and the adverse effect that the focus detection by the phase difference method cannot be performed can be solved.

また、特許文献2には、複数の撮像用画素の間に離散的に配置された焦点検出用画素の読み出しについて、異なる間引き率または異なる間引き位相で信号を読み出すモードを有する自動所定検出装置が開示されている。この装置では、撮像装置の状態に応じてモードを切り替えることで最適な露出を実現し、画質の劣化を抑制している。   Patent Document 2 discloses an automatic predetermined detection apparatus having a mode for reading signals at different thinning rates or different thinning phases for reading out focus detection pixels discretely arranged between a plurality of imaging pixels. Has been. In this apparatus, optimum exposure is realized by switching modes according to the state of the imaging apparatus, and deterioration of image quality is suppressed.

特開2004−347665号公報JP 2004-347665 A 特開2010−181751号公報JP 2010-181751 A 特開2012−252280号公報JP 2012-252280 A 特許第4235422号公報Japanese Patent No. 4235422 特許第4185741号公報Japanese Patent No. 4185541

しかしながら、特許文献1および2は、1の画素に複数の光電変換部を有する撮像素子においてライブビュー表示を高速にすることや、主に撮影レンズの光学特性が原因で発生するピントずれの補正について開示していない。また、特許文献2における自動焦点検出装置では、モードの切り替え及び切り替えに伴う露出の変更に時間を要する。   However, Patent Documents 1 and 2 are related to increasing the speed of live view display in an image sensor having a plurality of photoelectric conversion units in one pixel and correcting a focus shift mainly caused by optical characteristics of a photographing lens. Not disclosed. Moreover, in the automatic focus detection apparatus in Patent Document 2, it takes time to change modes and change the exposure associated with the switching.

本発明の一側面としての制御装置は、1つの画素に対して複数の光電変換部を有し当該画素が二次元状に配列された撮像素子からの信号を用いてフォーカス制御を行う。当該制御装置は、第1の画素領域に含まれる複数の第1の画素のそれぞれにおいて複数の光電変換部からの信号を加算して出力された、撮影画像を形成するための第1の画像信号を取得し、第2の画素領域に含まれる複数の第2の画素のそれぞれにおいて複数の光電変換部から互いに独立して出力された第2の画像信号を取得する取得手段と、第2の画素信号に基づいて位相差方式による相関演算を行い、相関データを決定する第1の演算手段と、複数の第2の画素の間で該複数の第2の画素のそれぞれに対応する複数の光電変換部について互いにシフトしながら第2の画素信号を加算するシフト加算を行い、加算データを決定する第2の演算手段と、相関データと加算データとに基づいて、フォーカス制御を行う制御手段と、を有することを特徴とする。   A control device according to one aspect of the present invention performs focus control using a signal from an imaging device that includes a plurality of photoelectric conversion units for one pixel and the pixels are two-dimensionally arranged. The control device adds a signal from a plurality of photoelectric conversion units to each of a plurality of first pixels included in the first pixel region, and outputs the first image signal for forming a captured image. Acquisition means for acquiring second image signals output independently from each other from the plurality of photoelectric conversion units in each of the plurality of second pixels included in the second pixel region, and the second pixel A plurality of photoelectric conversions corresponding to each of the plurality of second pixels between a plurality of second pixels and a first calculation means for performing correlation calculation by a phase difference method based on the signal and determining correlation data; Shift addition for adding the second pixel signals while shifting each other with respect to each other, and a second calculation means for determining the addition data, and a control means for performing focus control based on the correlation data and the addition data. Having And features.

本発明の別側面としての制御方法は、1つの画素に対して複数の光電変換部を有し当該画素が二次元状に配列された撮像素子からの信号を用いてフォーカス制御を行う。当該制御方法は、第1の画素領域に含まれる複数の第1の画素のそれぞれにおいて複数の光電変換部からの信号を加算して出力された、撮影画像を形成するための第1の画像信号と、第2の画素領域に含まれる複数の第2の画素のそれぞれにおいて複数の光電変換部から互いに独立して出力された第2の画像信号とを取得するステップと、第2の画素信号に基づいて位相差方式による相関演算を行い、相関データを決定するステップと、複数の第2の画素の間で該複数の第2の画素のそれぞれに対応する複数の光電変換部について互いにシフトしながら第2の画素信号を加算するシフト加算を行い、加算データを決定するステップと、相関データと加算データとに基づいてフォーカス制御を行うステップと、
を有することを特徴とする。
A control method according to another aspect of the present invention performs focus control using a signal from an image sensor that has a plurality of photoelectric conversion units for one pixel and the pixels are arranged two-dimensionally. In the control method, a first image signal for forming a captured image output by adding signals from a plurality of photoelectric conversion units in each of a plurality of first pixels included in a first pixel region. And obtaining a second image signal output independently from each other from the plurality of photoelectric conversion units in each of the plurality of second pixels included in the second pixel region, And performing correlation calculation using a phase difference method to determine correlation data, and shifting between the plurality of second pixels with respect to the plurality of photoelectric conversion units corresponding to each of the plurality of second pixels. Performing shift addition for adding the second pixel signal to determine addition data; performing focus control based on the correlation data and the addition data;
It is characterized by having.

本発明では、1つの画素に複数の光電変換部を有する撮像素子において、表示装置における表示の更新を高速にしつつ、高速なフォーカス制御を実現する。   In the present invention, in an image sensor having a plurality of photoelectric conversion units in one pixel, high-speed focus control is realized while updating the display in the display device at high speed.

本発明の実施例1および2における撮像装置のブロック図である。It is a block diagram of the imaging device in Example 1 and 2 of this invention. 実施例1および2における、撮像素子により取得されたA像信号およびB像信号による1次元方向のリフォーカス処理の説明図である。FIG. 6 is an explanatory diagram of a one-dimensional refocus process using an A image signal and a B image signal acquired by an image sensor in Examples 1 and 2. 実施例1および2における撮像装置に含まれる撮像素子の概略図である。FIG. 3 is a schematic diagram of an image sensor included in the imaging device according to the first and second embodiments. 実施例1および2における撮像素子を構成する各画素の構造を示す概略図である。FIG. 3 is a schematic diagram illustrating a structure of each pixel constituting the image sensor in Examples 1 and 2. 実施例1および2における通常動作時の垂直走査回路の動作を示すタイミングチャートである。6 is a timing chart showing the operation of the vertical scanning circuit during normal operation in Examples 1 and 2. 実施例1における動作を示すフローチャートである。3 is a flowchart illustrating an operation in the first embodiment. 実施例1における位相差AFを行う際の垂直走査回路の動作を示すタイミングチャートである。3 is a timing chart illustrating an operation of a vertical scanning circuit when performing phase difference AF in Embodiment 1. 実施例1におけるスキャンAFを行う際の垂直走査回路の動作を示すタイミングチャートである。3 is a timing chart illustrating an operation of a vertical scanning circuit when performing scan AF in Embodiment 1. 実施例1における位相差AF処理の動作を示すフローチャートである。6 is a flowchart illustrating an operation of phase difference AF processing in the first embodiment. 実施例1におけるコントラストAFを説明する図である。It is a figure explaining contrast AF in Example 1. FIG. 実施例1におけるRFAF処理の動作を示すフローチャートである。6 is a flowchart illustrating an operation of RFAF processing in the first embodiment. 実施例1におけるBP補正値補間係数算出の動作を示すフローチャート図である。FIG. 6 is a flowchart illustrating an operation of calculating a BP correction value interpolation coefficient in the first embodiment. 実施例1におけるBP補正値を取得する位置を示す図である。It is a figure which shows the position which acquires BP correction value in Example 1. FIG. 実施例1におけるBP補正値を判定する動作を示すフローチャートである。6 is a flowchart illustrating an operation for determining a BP correction value in the first embodiment. 実施例2における動作を示すフローチャートである。10 is a flowchart illustrating an operation in the second embodiment. 実施例2における撮像素子の構造を示す図である。FIG. 6 is a diagram illustrating the structure of an image sensor in Example 2. 実施例2における位相差AF処理とRFAF処理とレンズ駆動の動作を示すフローチャートである。10 is a flowchart illustrating operations of phase difference AF processing, RFAF processing, and lens driving in the second embodiment.

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

図1には、本発明の実施例である撮像装置としてのデジタルカメラ(以下、単にカメラという)1の構成を示している。   FIG. 1 shows a configuration of a digital camera (hereinafter simply referred to as a camera) 1 as an imaging apparatus according to an embodiment of the present invention.

カメラ1には、ズームレンズ群2、フォーカスレンズ群3、絞り4を含む撮影レンズ鏡筒100が設けられている。5は撮影レンズ鏡筒100内の撮像光学系により集光された光を電気信号に変換する固体撮像素子(以下、イメージセンサーという)である。6は、イメージセンサー5から出力された電気信号に対して各種信号処理を行ってアナログ画像信号を生成する撮像回路(取得手段)である。7は撮像回路6により生成されたアナログ画像信号をデジタル画像信号に変化するA/D変換回路であり、8はA/D変換回路7から出力されたデジタル画像信号を一時的に記憶するバッファメモリ等のVRAMである。9は、VRAM8に記憶されたデジタル画像信号を読み出してこれをアナログ変換するとともに表示に適した形態の表示用画像信号に変換するD/A変換回路である。10は、D/A変換回路9からの表示用画像信号をライブビュー画像として表示する液晶表示素子等により構成される画像表示部(以下、LCDという)である。   The camera 1 is provided with a photographic lens barrel 100 including a zoom lens group 2, a focus lens group 3, and a diaphragm 4. Reference numeral 5 denotes a solid-state imaging device (hereinafter referred to as an image sensor) that converts light collected by the imaging optical system in the taking lens barrel 100 into an electrical signal. Reference numeral 6 denotes an imaging circuit (acquisition means) that performs various signal processing on the electrical signal output from the image sensor 5 to generate an analog image signal. Reference numeral 7 denotes an A / D conversion circuit that converts an analog image signal generated by the imaging circuit 6 into a digital image signal. Reference numeral 8 denotes a buffer memory that temporarily stores the digital image signal output from the A / D conversion circuit 7. Or the like. Reference numeral 9 denotes a D / A conversion circuit that reads out a digital image signal stored in the VRAM 8 and converts it into an analog signal and converts it into a display image signal in a form suitable for display. Reference numeral 10 denotes an image display unit (hereinafter referred to as LCD) configured by a liquid crystal display element or the like that displays a display image signal from the D / A conversion circuit 9 as a live view image.

12は、半導体メモリ等により構成され、画像データを記憶する画像メモリである。11は、圧縮伸長回路であり、VRAM8に一時的に記憶された画像信号を読み出して画像メモリ12への記憶に適した形態の記録用画像データに変換するための圧縮処理や符号化処理を行う。また、圧縮伸長回路11は、画像メモリ12に記憶された記録用画像データを再生表示するのに適した形態の再生用画像信号に変換するための復号化処理や伸長処理を行う。なお、画像メモリ12としては、固定型の半導体メモリだけでなく、カメラ1に対して着脱自在なカ−ド型またはスティック型の半導体メモリや、光ディスク、ハードディスクその他の各種記憶媒体を用いることができる。   An image memory 12 includes a semiconductor memory and stores image data. Reference numeral 11 denotes a compression / decompression circuit that performs compression processing and encoding processing for reading an image signal temporarily stored in the VRAM 8 and converting it into recording image data in a form suitable for storage in the image memory 12. . The compression / decompression circuit 11 performs a decoding process and an expansion process for converting the recording image data stored in the image memory 12 into a reproduction image signal in a form suitable for reproduction and display. As the image memory 12, not only a fixed type semiconductor memory but also a card type or stick type semiconductor memory that is detachable from the camera 1, an optical disk, a hard disk, and other various storage media can be used. .

13は、A/D変換回路7から出力されたデジタル画像信号を用いて自動露出(AE)処理を行うAE処理回路である。14は、A/D変換回路7からの出力されたデジタル画像信号を用いてスキャンAF処理(コントラスト方式のAF)を行うためのAF評価値を生成するスキャンAF処理回路である。   Reference numeral 13 denotes an AE processing circuit that performs automatic exposure (AE) processing using the digital image signal output from the A / D conversion circuit 7. A scan AF processing circuit 14 generates an AF evaluation value for performing a scan AF process (contrast AF) using the digital image signal output from the A / D conversion circuit 7.

15は、カメラ1の全体の制御を行うCPU(制御手段)であり、演算用のメモリを内蔵している。また、CPU15は、スキャンAF処理回路14・位相差AF処理回路37およびRFAF処理回路31とともに焦点検出手段を構成する。   Reference numeral 15 denotes a CPU (control means) that controls the entire camera 1 and incorporates a memory for calculation. The CPU 15 constitutes a focus detection unit together with the scan AF processing circuit 14, the phase difference AF processing circuit 37 and the RFAF processing circuit 31.

16はタイミング信号を発生するタイミングジェネレータ(以下、TGという)であり、17はイメージセンサー5を駆動するセンサードライバーである。   Reference numeral 16 denotes a timing generator (hereinafter referred to as TG) that generates a timing signal, and reference numeral 17 denotes a sensor driver that drives the image sensor 5.

21は絞り4を駆動する絞り駆動モータであり、18は絞り駆動モータ21を駆動制御する第一モータ駆動回路である。22はフォーカスレンズ群3を駆動するフォーカス駆動モータであり、19はフォーカス駆動モータ22を駆動制御する第二モータ駆動回路である。23はズームレンズ群2を駆動するズーム駆動モータであり、20はズーム駆動モータ23を駆動制御する第三モータ駆動回路である。   Reference numeral 21 denotes an aperture drive motor that drives the aperture 4, and reference numeral 18 denotes a first motor drive circuit that drives and controls the aperture drive motor 21. Reference numeral 22 denotes a focus drive motor that drives the focus lens group 3, and reference numeral 19 denotes a second motor drive circuit that drives and controls the focus drive motor 22. Reference numeral 23 denotes a zoom drive motor that drives the zoom lens group 2, and reference numeral 20 denotes a third motor drive circuit that drives and controls the zoom drive motor 23.

24は、操作スイッチ部であり、カメラ1の電源をオン/オフするためのメインスイッチや、AE/AF処理や撮影記録処理を開始させる操作スイッチ部や、撮影画像の再生動作を開始させる再生スイッチ等を含む。AE/AF処理や撮影記録処理を開始させる操作スイッチ部は、第1ストロークスイッチ(以下SW1という)と、第2ストロークスイッチ(以下SW2という)との二段スイッチにより構成される。第1ストロークスイッチは、AE/AF処理を開始する指示信号を発生させるものであり、第2ストロークスイッチは、撮影記録動作を開始する指示信号(記録指示)を発生させるものであり。   An operation switch unit 24 is a main switch for turning on / off the power of the camera 1, an operation switch unit for starting AE / AF processing and shooting / recording processing, and a playback switch for starting playback operation of a shot image. Etc. The operation switch unit for starting the AE / AF process and the photographing / recording process includes a two-stage switch including a first stroke switch (hereinafter referred to as SW1) and a second stroke switch (hereinafter referred to as SW2). The first stroke switch generates an instruction signal for starting the AE / AF processing, and the second stroke switch generates an instruction signal (recording instruction) for starting the photographing / recording operation.

25は、各種制御用のコンピュータプログラムや各種動作用のデータ等を書き換え可能に記憶するカメラEEPROMである。26は電池である。   A camera EEPROM 25 stores various control computer programs, various operation data, and the like in a rewritable manner. 26 is a battery.

28は、ストロボ発光部である。27はストロボ発光部28の閃光発光を制御するスイッチング回路であり、29は警告表示等を行うためのLED等により構成される表示素子である。30は、音声によるガイダンスや警告等を行うためのスピ−カである。   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, and reference numeral 29 denotes a display element constituted by an LED or the like for performing a warning display. Reference numeral 30 denotes a speaker for voice guidance and warning.

31は、基準信号(後述するA像信号)に対して参照信号(後述するB像信号)を相対的にシフトしながら両者の和を演算(シフト加算)し、その相対シフト量と両者の和の信号を記録するRFAF処理回路である。   31 calculates the sum (shift addition) of both while relatively shifting the reference signal (B image signal described later) with respect to the reference signal (A image signal described later), and calculates the relative shift amount and the sum of the two. This is an RFAF processing circuit for recording the signal.

33はAF評価値を取得する際に被写体の全部又は一部を照明するLEDなどの光源で構成されるAF補助光であり、32はAF補助光33を駆動するためのAF補助光駆動回路である。   Reference numeral 33 denotes an AF auxiliary light composed of a light source such as an LED that illuminates all or a part of the subject when obtaining an AF evaluation value, and reference numeral 32 denotes an AF auxiliary light driving circuit for driving the AF auxiliary light 33. is there.

35は手振れなどを検出する振れ検出センサーであり、34は振れ検出センサー35の信号を処理する振れ検出回路である。36は、A/D変換回路7からのデジタル画像信号から人物の顔の位置や大きさ等を検出する顔検出回路である。   Reference numeral 35 denotes a shake detection sensor that detects camera shake and the like. Reference numeral 34 denotes a shake detection circuit that processes a signal from the shake detection sensor 35. Reference numeral 36 denotes a face detection circuit that detects the position and size of a human face from the digital image signal from the A / D conversion circuit 7.

37は、A/D変換回路7から出力されたデジタル画像信号を用いて位相差AF処理を行うための基準信号(A像信号)および参照信号(B像信号)を生成し、これらA像信号およびB像信号に対する相関演算を行う位相差AF処理回路である。   37 generates a reference signal (A image signal) and a reference signal (B image signal) for performing phase difference AF processing using the digital image signal output from the A / D conversion circuit 7, and these A image signals And a phase difference AF processing circuit for performing a correlation operation on the B image signal.

38は、カメラ1の外周に設置され、周囲の温度を計測する第一の温度計である。39は、撮影レンズ鏡筒100の内部に設置され、撮影レンズ鏡筒100の内部の温度を計測する第二の温度計である。   Reference numeral 38 denotes a first thermometer that is installed on the outer periphery of the camera 1 and measures the ambient temperature. Reference numeral 39 denotes a second thermometer that is installed inside the photographing lens barrel 100 and measures the temperature inside the photographing lens barrel 100.

以上のように構成されたカメラ1および撮影レンズ鏡筒100の動作を以下に説明する。   The operations of the camera 1 and the photographic lens barrel 100 configured as described above will be described below.

被写体からの光束が撮影レンズ鏡筒100の撮像光学系に入射すると、撮像光学系は該光束に被写体像を形成させる。イメージセンサー5は、その受光面上に形成される被写体像を光電変換することで生成した電気信号を撮像回路6に出力する。撮像回路6は、上述したように入力された電気信号に対して各種信号処理を行ってアナログ画像信号を生成する。A/D変換回路7は、このアナログ画像信号をデジタル画像信号に変換した後、VRAM8に一時的に格納する。VRAM8に格納された画像信号は、D/A変換回路9に出力されてアナログ画像信号に変換され、さらに表示用画像信号に変換されてLCD10にてライブビュー画像として表示される。   When the light flux from the subject enters the imaging optical system of the taking lens barrel 100, the imaging optical system forms a subject image on the light flux. The image sensor 5 outputs an electrical signal generated by photoelectrically converting a subject image formed on the light receiving surface to the imaging circuit 6. The imaging circuit 6 performs various signal processing on the input electrical signal as described above to generate an analog image signal. The A / D conversion circuit 7 converts the analog image signal into a digital image signal, and then temporarily stores it in the VRAM 8. The image signal stored in the VRAM 8 is output to the D / A conversion circuit 9 and converted into an analog image signal, further converted into a display image signal, and displayed on the LCD 10 as a live view image.

一方、VRAM8に格納された画像信号は、圧縮伸長回路11にも出力される。圧縮伸長回路11は、圧縮処理と符号化処理によって画像信号を記録用画像データに変換し、画像メモリ12に記憶させる。操作スイッチ部24に設けられた再生スイッチがオン操作されると、画像メモリ12に圧縮状態で記憶された記録用画像データが圧縮伸長回路11に出力され、復号化処理や伸長処理を経てVRAM8に一時的に記録される。さらに、この画像データは、D/A変換回路9へ出力されて再生用画像信号に変換され、LCD10に再生画像として表示される。   On the other hand, the image signal stored in the VRAM 8 is also output to the compression / decompression circuit 11. The compression / decompression circuit 11 converts the image signal into image data for recording through compression processing and encoding processing, and stores the image signal in the image memory 12. When the reproduction switch provided in the operation switch unit 24 is turned on, the recording image data stored in the compressed state in the image memory 12 is output to the compression / decompression circuit 11, and is decoded and decompressed to the VRAM 8. Recorded temporarily. Further, this image data is output to the D / A conversion circuit 9, converted into a reproduction image signal, and displayed on the LCD 10 as a reproduction image.

また、A/D変換回路7によってデジタル化された画像信号は、VRAM8とは別に、AE処理回路13、スキャンAF処理回路14および位相差AF処理回路37、RFAF(リフォーカスAF)処理回路31、顔検出回路36にも出力される。AE処理回路13は、入力されたデジタル画像信号から輝度成分を抽出して1フレーム分の累積加算を行い、被写体の明るさを示すAE評価値信号を生成するAE処理を行う。AE評価値信号は、CPU15に出力される。   In addition to the VRAM 8, the image signal digitized by the A / D conversion circuit 7 includes an AE processing circuit 13, a scan AF processing circuit 14, a phase difference AF processing circuit 37, an RFAF (refocus AF) processing circuit 31, Also output to the face detection circuit 36. The AE processing circuit 13 extracts luminance components from the input digital image signal, performs cumulative addition for one frame, and performs AE processing for generating an AE evaluation value signal indicating the brightness of the subject. The AE evaluation value signal is output to the CPU 15.

スキャンAF処理回路14は、入力されたデジタル画像信号のうち選択されたAF領域の高周波成分を、ハイパスフィルタ(HPF)を用いて抽出し、1フレーム分の累積加算を行う。それにより、該AF領域内の被写体像のコントラストを示すAF評価値信号を生成する。被写体像のコントラストは、撮像光学系の焦点状態に対応するので、AF評価値信号の生成は焦点状態を検出することに相当する。したがって、AF評価値信号(またはその値であるAF評価値)は、撮像光学系の焦点状態の検出により得られた情報である。AF領域は、撮影画面のうち任意の部分の1つの領域であってもよいし、任意の部分とその周囲の領域を含む複数の領域であってもよい。   The scan AF processing circuit 14 extracts a high-frequency component of the selected AF area from the input digital image signal using a high-pass filter (HPF), and performs cumulative addition for one frame. Thereby, an AF evaluation value signal indicating the contrast of the subject image in the AF area is generated. Since the contrast of the subject image corresponds to the focus state of the imaging optical system, generation of the AF evaluation value signal corresponds to detection of the focus state. Therefore, the AF evaluation value signal (or the AF evaluation value that is the value) is information obtained by detecting the focus state of the imaging optical system. The AF area may be one area of an arbitrary part of the shooting screen, or may be a plurality of areas including an arbitrary part and its surrounding area.

位相差AF処理回路37は、入力されたデジタル画像信号からAF領域に含まれる一対の被写体像のA像およびB像に対応した一対の像信号であるA像信号およびB像信号を抽出する。そして、基準画像信号(A像信号)と参照画像信号(B像信号)の相関演算を行って、A像およびB像の像ずれ量(位相差)を算出する。   The phase difference AF processing circuit 37 extracts an A image signal and a B image signal, which are a pair of image signals corresponding to the A image and the B image of the pair of subject images included in the AF area, from the input digital image signal. Then, a correlation calculation between the standard image signal (A image signal) and the reference image signal (B image signal) is performed to calculate an image shift amount (phase difference) between the A image and the B image.

本実施例では、イメージセンサー5の撮像面に位相差AF用の画素を配置している。そのため、2次結像光学系を用いて位相差検出を行う場合のように、像高に起因して生じる像の歪みを修正するフィールドレンズや、位相差AF用センサーへ入射する光束に対する絞り、不要な光束を遮断するマスクを用いることができない。このため、位相差AF用の信号は画素毎にシェーディング・オフセットが異なるため、その補正が必要となる。そこで、位相差AF処理回路37は、像修正機能と相関演算により像ずれ量を求める機能とを備える。   In this embodiment, pixels for phase difference AF are arranged on the imaging surface of the image sensor 5. Therefore, as in the case of performing phase difference detection using a secondary imaging optical system, a field lens that corrects image distortion caused by image height, a diaphragm for a light beam incident on a phase difference AF sensor, A mask that blocks unnecessary light flux cannot be used. For this reason, the signal for phase difference AF needs to be corrected because the shading offset differs for each pixel. Therefore, the phase difference AF processing circuit 37 has an image correction function and a function for obtaining an image shift amount by correlation calculation.

CPU15は、位相差AF処理回路37で算出された像ずれ量から、撮像光学系のデフォーカス量およびフォーカスレンズ群3の駆動量を求めることで、位相差AFを行う。   The CPU 15 performs the phase difference AF by obtaining the defocus amount of the imaging optical system and the driving amount of the focus lens group 3 from the image shift amount calculated by the phase difference AF processing circuit 37.

ここで、図2を参照して、RFAF処理回路31とCPU15によるリフォーカス方式を用いたデフォーカス量の算出について説明する。   Here, the calculation of the defocus amount using the refocus method by the RFAF processing circuit 31 and the CPU 15 will be described with reference to FIG.

図2は、本実施例のイメージセンサー5により取得された基準画像信号(A像信号)および参照画像信号(B像信号)による1次元方向(行方向、水平方向)のリフォーカス処理の説明図である。図2において、iを整数として、撮像面800に配置されたイメージセンサー5の行方向i番目の画素のA像信号をAi、B像信号をBiとして模式的に表している。A像信号Aiは、主光線角度θaでi番目の画素に入射した光束の受光信号である。B像信号Biは、主光線角度θbでi番目の画素に入射した光束の受光信号である。   FIG. 2 is an explanatory diagram of a refocusing process in a one-dimensional direction (row direction, horizontal direction) using a reference image signal (A image signal) and a reference image signal (B image signal) acquired by the image sensor 5 of the present embodiment. It is. In FIG. 2, i is an integer, and the A image signal of the i-th pixel in the row direction of the image sensor 5 disposed on the imaging surface 800 is schematically represented as Ai, and the B image signal is represented as Bi. The A image signal Ai is a light reception signal of a light beam incident on the i-th pixel at the principal ray angle θa. The B image signal Bi is a light reception signal of a light beam incident on the i-th pixel at the principal ray angle θb.

A像信号AiおよびB像信号Biは、光強度分布情報だけでなく、入射角度情報も含む。そのため、A像信号Aiを角度θaに沿って仮想結像面810まで平行移動させ、B像信号Biを角度θbに沿って仮想結像面810まで平行移動させ、これらを加算することにより、仮想結像面810でのリフォーカス信号を生成できる。A像信号Aiを角度θaに沿って仮想結像面810まで平行移動させることは、行方向に+0.5画素シフトに対応し、B像信号Biを角度θbに沿って仮想結像面810まで平行移動させることは、行方向に−0.5画素シフトに対応する。したがって、A像信号AiとB像信号Biを相対的に+1画素シフトさせ、A像信号AiとB像信号(Bi+1)とを対応させて加算することにより、仮想結像面810でのリフォーカス信号を生成できる。   The A image signal Ai and the B image signal Bi include not only light intensity distribution information but also incident angle information. Therefore, the A image signal Ai is translated along the angle θa to the virtual imaging plane 810, the B image signal Bi is translated along the angle θb to the virtual imaging plane 810, and these are added to obtain a virtual A refocus signal at the image plane 810 can be generated. Translating the A image signal Ai along the angle θa to the virtual imaging plane 810 corresponds to a +0.5 pixel shift in the row direction, and the B image signal Bi along the angle θb to the virtual imaging plane 810. Translating corresponds to a -0.5 pixel shift in the row direction. Accordingly, the A image signal Ai and the B image signal Bi are relatively shifted by +1 pixel, and the A image signal Ai and the B image signal (Bi + 1) are added in correspondence with each other, thereby refocusing on the virtual image plane 810. A signal can be generated.

同様に、A像信号AiとB像信号Biとを画素整数個分シフトさせて加算することにより、整数シフト量に応じた各仮想結像面でのシフト加算信号(和信号列)を生成できる。   Similarly, by shifting the A image signal Ai and the B image signal Bi by an integer number of pixels and adding them, it is possible to generate a shift addition signal (sum signal sequence) on each virtual imaging plane according to the integer shift amount. .

RFAF処理回路31は、上記方法により和信号列を作成し、その和信号列と相対的シフト量を回路内の記録領域に記録する。スキャンAF処理回路14又は位相差AF処理回路37に対応するイメージセンサー5上の信号取得領域に関して和信号列の作成と記録が終了すると、その和信号列がスキャンAF処理回路14に入力されAF評価値信号が生成される。そして、取得されたAF評価値信号は、相対的シフト量と関連付けられ、RFAF処理回路内の記録領域に記録される。   The RFAF processing circuit 31 creates a sum signal sequence by the above method, and records the sum signal sequence and the relative shift amount in a recording area in the circuit. When the generation and recording of the sum signal sequence is completed for the signal acquisition region on the image sensor 5 corresponding to the scan AF processing circuit 14 or the phase difference AF processing circuit 37, the sum signal sequence is input to the scan AF processing circuit 14 and AF evaluation is performed. A value signal is generated. The acquired AF evaluation value signal is associated with the relative shift amount and recorded in a recording area in the RFAF processing circuit.

CPU15は、和信号のAF評価値信号が極大値となる相対的シフト量を求め、その値を利用してピント補正位置を求める。ピント補正位置とは、最終的に得る合焦位置であり、主に撮影レンズの光学特性が原因で発生するフォーカスレンズ群3の位置の誤差を補正した位置である。例えば、スキャンAF処理によるAF評価値が極大となるフォーカスレンズ群3の位置や位相差AF処理によるデフォーカス量が零となるフォーカスレンズ群3の位置が、記録される画像の解像度が最大となるフォーカスレンズ群3の位置と異なる場合がある。以下、ピント補正位置を求める際の補正値をBP補正値という。   The CPU 15 obtains a relative shift amount at which the AF evaluation value signal of the sum signal becomes a maximum value, and obtains a focus correction position using the value. The focus correction position is a focus position finally obtained, and is a position in which an error in the position of the focus lens group 3 caused mainly by the optical characteristics of the photographing lens is corrected. For example, the position of the focus lens group 3 at which the AF evaluation value by the scan AF process is maximized or the position of the focus lens group 3 at which the defocus amount by the phase difference AF process is zero maximizes the resolution of the recorded image. It may be different from the position of the focus lens group 3. Hereinafter, the correction value for obtaining the focus correction position is referred to as a BP correction value.

換言すれば、スキャンAF処理によって求められたAF評価値が極大となるフォーカスレンズ群3の位置と、記録される画像の解像度が最大となるフォーカスレンズ群3の位置の差分がスキャンAFにおけるBP補正値である。また、位相差AF処理によって求められたデフォーカス量が零となるフォーカスレンズ群3の位置と、記録される画像の解像度が最大となるフォーカスレンズ群3の位置の差分が位相差AFにおけるBP補正値である。   In other words, the difference between the position of the focus lens group 3 at which the AF evaluation value obtained by the scan AF process is maximized and the position of the focus lens group 3 at which the resolution of the recorded image is maximized is BP correction in scan AF. Value. Further, the difference between the position of the focus lens group 3 where the defocus amount obtained by the phase difference AF process is zero and the position of the focus lens group 3 where the resolution of the recorded image is maximum is the BP correction in the phase difference AF. Value.

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

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

またCPU15は、第一モータ駆動回路18、第二モータ駆動回路19、第三モータ駆動回路20に指示を送り、絞り駆動モータ21、フォーカス駆動モータ22、ズーム駆動モータ23によって、絞り4、フォーカスレンズ群3、ズームレンズ群2を駆動させる。具体的には、CPU15は、AE処理回路13によって算出されたAE評価値等に基づき、適正な露光量になる露光時間と絞り値を求め、第一モータ駆動回路18によって絞り駆動モータ21を駆動することで、絞り4の絞り量が適正になるように調整する。   The CPU 15 sends instructions to the first motor drive circuit 18, the second motor drive circuit 19, and the third motor drive circuit 20, and the diaphragm drive motor 21, the focus drive motor 22, and the zoom drive motor 23 cause the diaphragm 4 and the focus lens to move. The group 3 and the zoom lens group 2 are driven. Specifically, the CPU 15 obtains an exposure time and an aperture value at which an appropriate exposure amount is obtained based on the AE evaluation value calculated by the AE processing circuit 13 and drives the aperture drive motor 21 by the first motor drive circuit 18. By doing so, the aperture amount of the aperture 4 is adjusted to be appropriate.

またCPU15は、AF制御として、スキャンAF処理回路14、位相差AF処理回路37、RFAF処理回路31の処理結果に基づき、第二モータ駆動回路19によってフォーカス駆動モータ22を駆動することで、フォーカスレンズ群3を合焦位置に移動させる。   Further, as the AF control, the CPU 15 drives the focus driving motor 22 by the second motor driving circuit 19 based on the processing results of the scan AF processing circuit 14, the phase difference AF processing circuit 37, and the RFAF processing circuit 31. Move group 3 to the in-focus position.

操作スイッチ部24のうち不図示のズームスイッチが操作された場合は、CPU15は、第三モータ駆動回路20によってズーム駆動モータ23を駆動することで、ズームレンズ群2を移動し、撮像光学系の変倍動作(ズーム動作)を行う。   When a zoom switch (not shown) in the operation switch unit 24 is operated, the CPU 15 moves the zoom lens group 2 by driving the zoom drive motor 23 by the third motor drive circuit 20, and the imaging optical system. Performs zooming operation.

次に、図1のイメージセンサー5に含まれる画素の構成について、図3を用いて説明する。   Next, the configuration of the pixels included in the image sensor 5 of FIG. 1 will be described with reference to FIG.

201は、入射した撮影レンズ鏡筒100からの光を光電変換して電気信号として出力する受光画素である。受光画素201は、フォトダイオード202、転送トランジスタ203、信号増幅アンプ204、および信号のリセット用トランジスタ205を1単位(画素)として構成されている。転送トランジスタ203およびリセット用トランジスタ205は、各画素に接続された駆動用回路206からの信号によって動作する。ここで、駆動用回路206は、シフトレジスタや、転送トランジスタ203等の各画素を駆動させる信号生成回路等を含む。そして、駆動用回路206は、TG16によって生成されたタイミング信号(TX1〜4、RS1〜4等)によって、転送トランジスタ203およびリセット用トランジスタ205を制御することで、フォトダイオードの電荷のリセットおよび読み出しを行う。これにより、露光時間を制御できる。   A light receiving pixel 201 photoelectrically converts incident light from the taking lens barrel 100 and outputs it as an electrical signal. The light receiving pixel 201 includes a photodiode 202, a transfer transistor 203, a signal amplification amplifier 204, and a signal resetting transistor 205 as one unit (pixel). The transfer transistor 203 and the reset transistor 205 operate in accordance with a signal from the driving circuit 206 connected to each pixel. Here, the driving circuit 206 includes a shift register, a signal generation circuit that drives each pixel such as the transfer transistor 203, and the like. Then, the drive circuit 206 controls the transfer transistor 203 and the reset transistor 205 in accordance with the timing signals (TX1 to 4, RS1 to 4 and the like) generated by the TG 16, thereby resetting and reading the charge of the photodiode. Do. Thereby, the exposure time can be controlled.

上記機能を持った受光画素201は、図4(B)に示すようにイメージセンサー5に二次元状に配列され、撮像用画素と位相差AF用画素の機能を果たす。図4(A)はイメージセンサー5の断面図であり、ひとつのマイクロレンズ212に対して長方形の2つのフォトダイオード202が配置される。一方のフォトダイオードが基準画素用であり、他方が参照画素用である。   The light receiving pixels 201 having the above functions are two-dimensionally arranged on the image sensor 5 as shown in FIG. 4B, and serve as imaging pixels and phase difference AF pixels. FIG. 4A is a cross-sectional view of the image sensor 5, and two rectangular photodiodes 202 are arranged for one microlens 212. One photodiode is for the reference pixel and the other is for the reference pixel.

イメージセンサー5には、位相差AF用画素の行(第2の画素領域)とLCD表示に用いるための表示用画素(撮像用画素)の行(第1の画素領域)が2行毎に設定されている。LCD表示または通常の撮像を行う場合、イメージセンサー5は、この一対のフォトダイオードの出力を加算して読み出す。表示するLCDの表示可能画素数と表示画像の画素数を合わせるために、水平方向において同色のカラーフィルターを有する複数の画素群を加算することも可能である。また、垂直方向においては同じカラーフィルター配置の行の信号を加算することや行を間引くことも可能である。   In the image sensor 5, a row of phase difference AF pixels (second pixel region) and a row of display pixels (imaging pixels) for use in LCD display (first pixel region) are set every two rows. Has been. When performing LCD display or normal imaging, the image sensor 5 adds and reads the outputs of the pair of photodiodes. In order to match the number of displayable pixels of the LCD to be displayed and the number of pixels of the display image, it is also possible to add a plurality of pixel groups having the same color filter in the horizontal direction. Further, in the vertical direction, it is possible to add signals of rows having the same color filter arrangement or to thin out rows.

位相差AFを行う場合は、基準画素用フォトダイオードと参照画素用フォトダイオードを別々に読み出す。垂直方向に関しては同じカラーフィルター配置の行の信号を加算することや行を間引くことも可能である。   When performing the phase difference AF, the reference pixel photodiode and the reference pixel photodiode are read out separately. With respect to the vertical direction, it is also possible to add the signals of the rows having the same color filter arrangement and to thin out the rows.

209は水平走査回路であり、シフトレジスタ、列アンプ回路210、信号出力選択スイッチ211および外部への出力回路(不図示)を含む。水平走査回路209は、列アンプ回路210の設定をセンサードライバー17からの信号によって変化させることで、画素から読みだされた信号を増幅できる。   A horizontal scanning circuit 209 includes a shift register, a column amplifier circuit 210, a signal output selection switch 211, and an output circuit (not shown) to the outside. The horizontal scanning circuit 209 can amplify the signal read from the pixel by changing the setting of the column amplifier circuit 210 according to the signal from the sensor driver 17.

次に、カメラ1において画像の信号を取得する方法について説明する。   Next, a method for acquiring an image signal in the camera 1 will be described.

図5は、通常画像を取得する際に駆動用回路206から生成される信号のタイミングチャートである。イメージセンサー5は、センサードライバー17が生成する垂直同期信号にしたがって露光および信号の読み出しを行う。このとき、TX信号およびRS信号の立ち上がりによって、フォトダイオード202の電荷がリセットされ露光が開始される。この動作は、TG16によって設定された条件に従って順番に行われる。TX信号は、立ち下りから露光時間の経過後に再度立ち上がり、フォトダイオード202の電荷を信号増幅アンプ204に読み出す。信号増幅アンプ204からの信号から映像信号を生成し、水平走査回路209を通して出力される。この動作も、TG16によって設定された条件で行われる。   FIG. 5 is a timing chart of signals generated from the driving circuit 206 when a normal image is acquired. The image sensor 5 performs exposure and signal reading in accordance with a vertical synchronization signal generated by the sensor driver 17. At this time, the charge of the photodiode 202 is reset and the exposure is started by the rise of the TX signal and the RS signal. This operation is performed in order according to the conditions set by the TG 16. The TX signal rises again after the exposure time elapses from the fall, and reads the charge of the photodiode 202 to the signal amplification amplifier 204. A video signal is generated from the signal from the signal amplification amplifier 204 and output through the horizontal scanning circuit 209. This operation is also performed under the conditions set by the TG 16.

本実施例のカメラ1に搭載されているイメージセンサー5は、CMOS型の撮像素子である。イメージセンサー5は、駆動用回路206のシフトレジスタの設定よってどの行の転送トランジスタ203をどのような順序で駆動させるか選択することができ、同一行を繰り返し選択して信号を読み出すこともできる。また、イメージセンサー5は、水平走査回路209のシフトレジスタの設定によってどの列の選択スイッチ211を動作させるかによって、同一行の信号においてどの列の信号から出力するかを選択できる。これによって、画面内のどの画素からどの順番で読みだすかを指定できる。   The image sensor 5 mounted on the camera 1 of the present embodiment is a CMOS image sensor. The image sensor 5 can select which row of the transfer transistors 203 is driven in what order by setting the shift register of the driving circuit 206, and can repeatedly select the same row and read the signal. Further, the image sensor 5 can select which column signal is output from the same row signal depending on which column selection switch 211 is operated by setting the shift register of the horizontal scanning circuit 209. In this way, it is possible to specify from which pixel in the screen and in what order.

次に、カメラ1の本実施例における撮影動作を図6および図7を用いて説明する。   Next, the photographing operation of the camera 1 in this embodiment will be described with reference to FIGS.

カメラ1の主電源スイッチがオン状態であり、かつ、撮像装置の動作モードが撮影(録画)モードにあるときは、撮影処理シーケンスが実行され、イメージセンサー5等に電源を供給される。   When the main power switch of the camera 1 is on and the operation mode of the imaging apparatus is in the shooting (recording) mode, a shooting process sequence is executed and power is supplied to the image sensor 5 and the like.

図6に示されるステップS1において、CPU15は、LCD10に表示する画像の取得と位相差AFを行うために、イメージセンサー5の駆動モードを設定する。   In step S <b> 1 shown in FIG. 6, the CPU 15 sets the drive mode of the image sensor 5 in order to acquire an image to be displayed on the LCD 10 and perform phase difference AF.

本実施例の駆動モードにおいて、イメージセンサー5は、LCD10に表示する画像の信号の読み出しについては基準画素と参照画素の信号を加算し、位相差AFについては画素加算を行わない。そのため、図7に示すようにLCD10に表示する画像を得るための露光時間より、位相差AF動作を行うための露光時間が長くなる。そして、その分、位相差AF動作に関する画素信号について読み出し期間が長くなり、読み出しレートが低くなる。また、LCD10に表示する画像を取得するために読み出す水平方向の画素数は、水平方向の隣接画素の加算および同色のカラーフィルターを有する複数の画素群の加算を行うため、位相差AF動作を行うために加算せず読み出される読み出す画素数より少ない。   In the drive mode of the present embodiment, the image sensor 5 adds the signals of the reference pixel and the reference pixel for reading the signal of the image displayed on the LCD 10 and does not add the pixel for the phase difference AF. Therefore, the exposure time for performing the phase difference AF operation is longer than the exposure time for obtaining an image to be displayed on the LCD 10 as shown in FIG. Accordingly, the readout period for the pixel signal related to the phase difference AF operation is lengthened, and the readout rate is lowered. Further, the number of pixels in the horizontal direction to be read for obtaining an image to be displayed on the LCD 10 is obtained by performing phase difference AF operation in order to perform addition of adjacent pixels in the horizontal direction and addition of a plurality of pixel groups having the same color filter. Therefore, it is smaller than the number of pixels to be read without adding.

図7は、露光時間が読み出し時間に対して十分短く、LCD10の画像表示のための読み出しで水平方向の同色のカラーフィルターを有する複数の画素の加算は行わず、水平方向の隣接画素の加算のみ行った場合を示している。図7では位相差AF動作のための読み出し時間が、LCD10の画像表示のための読み出し時間の2倍となっている。実際の読み出し期間は、露光時間と読み出し画素数の掛け算となり、画像表示と位相差AF動作の読み出し時間の差は図7に示す例よりも大きくなることがある。画像表示用の信号に関しては、省電力化のために、1画面分の信号を出力する期間の前半部分で信号を取得し、後半部分はイメージセンサー5の駆動波形を停止しても良い。この場合はLCD10に表示する画像信号の読み出しレートは、位相差AF動作のための信号の読み出しレートと同じになる。   FIG. 7 shows that the exposure time is sufficiently shorter than the readout time, and the addition of a plurality of pixels having the same color filter in the horizontal direction is not performed in the readout for image display of the LCD 10, but only the addition of adjacent pixels in the horizontal direction is performed. The case where it went is shown. In FIG. 7, the readout time for the phase difference AF operation is twice the readout time for image display on the LCD 10. The actual readout period is a product of the exposure time and the number of readout pixels, and the difference between the readout time of the image display and the phase difference AF operation may be larger than the example shown in FIG. As for the signal for image display, in order to save power, the signal may be acquired in the first half of the period for outputting the signal for one screen, and the drive waveform of the image sensor 5 may be stopped in the second half. In this case, the readout rate of the image signal displayed on the LCD 10 is the same as the readout rate of the signal for the phase difference AF operation.

ステップS2において、CPU15は、露光条件をAE処理によって設定する。LCD10の画像表示については、撮影者による被写体の視認に最適な露光量や、パンニングまたは被写体の移動に対する追従性等を考慮して露光条件(主に露光時間)が設定される。位相差AF動作ついては、位相差AFに最適な露光量、AF時間、AF時間内の被写体の移動、手振れによるAFへの影響等を考慮して露光条件(主に露光時間)が設定される。   In step S2, the CPU 15 sets exposure conditions by AE processing. For the image display on the LCD 10, exposure conditions (mainly exposure time) are set in consideration of the optimal exposure amount for the subject to view the subject, panning or followability to movement of the subject, and the like. For the phase difference AF operation, exposure conditions (mainly exposure time) are set in consideration of the exposure amount optimal for phase difference AF, the AF time, the movement of the subject within the AF time, the influence on AF due to camera shake, and the like.

上述のように、撮影用画素と位相差AF用画素には、画素を加算するか否かの違いがある。またイメージセンサー5の中心から離れた位置では撮影レンズ鏡筒100の射出瞳から入射する光束が斜めになるので入射光量が減少する。そのため、位相差AF用画素は撮像用画素に比べて加算画素数の比以上の露光量とすることが望ましい。   As described above, there is a difference in whether or not pixels are added between the imaging pixel and the phase difference AF pixel. Further, at a position away from the center of the image sensor 5, the light beam incident from the exit pupil of the taking lens barrel 100 becomes oblique, so that the amount of incident light decreases. Therefore, it is desirable that the phase difference AF pixel has an exposure amount that is equal to or greater than the ratio of the number of added pixels as compared with the imaging pixel.

露光条件(露光時間)を設定したら、TX信号およびRS信号を図7のように制御する。図7は、ステップ1で設定された駆動モードにおいて、駆動回路が生成するLCD10の画像表示または位相差AF動作のための信号のタイミングチャートである。   When the exposure condition (exposure time) is set, the TX signal and the RS signal are controlled as shown in FIG. FIG. 7 is a timing chart of signals for image display or phase difference AF operation of the LCD 10 generated by the drive circuit in the drive mode set in step 1.

図7のタイミングチャートに示す信号によりイメージセンサー5を駆動することで、LCD10に表示する画像の信号と位相差AF動作のための信号は異なる露光条件で取得される。具体的には、LCD10に表示する画像の信号とAF動作用の信号の露出条件をそれぞれ2行毎に設定し、イメージセンサー5の電荷のリセットおよび出力転送のタイミングを異ならせる。   By driving the image sensor 5 with a signal shown in the timing chart of FIG. 7, an image signal displayed on the LCD 10 and a signal for phase difference AF operation are acquired under different exposure conditions. Specifically, the exposure conditions of the image signal and AF operation signal displayed on the LCD 10 are set for every two rows, and the timing of charge reset and output transfer of the image sensor 5 is made different.

すなわち、LCD10に表示する画像の信号と位相差AF動作のための信号は、TX信号およびRS信号の立ち上がりによって、イメージセンサー5に各画素のフォトダイオード202の電荷をリセットさせ、露光を開始させる。この動作は、TG16によって設定された順番で行われる。   That is, the image signal displayed on the LCD 10 and the signal for the phase difference AF operation cause the image sensor 5 to reset the charge of the photodiode 202 of each pixel and start exposure by the rise of the TX signal and the RS signal. This operation is performed in the order set by the TG 16.

LCD10の画像表示用の行においては、TX1信号およびTX2信号が、各々の立ち下りから露光時間の経過後に順次立ち上がる。それによって、フォトダイオード202の電荷が信号増幅アンプ204を介して水平走査回路209によって撮像回路6へ出力される。その後、RX1信号およびRX2信号が順次立ち上がり、LCD10の画像表示用の行をリセットする。このようにして、LCD10に表示される画像の信号を撮像回路6へ出力する動作を繰り返す。そして、位相差AF動作に関して、TX3信号およびTX4信号が、各々の立ち下りから露光時間の経過後に順次立ち上がる。それによって、フォトダイオード201の電荷が、信号増幅アンプ204を介して、水平走査回路209によって撮像回路6へ出力され、位相差AF動作用の画像が取得される。   In the image display row of the LCD 10, the TX1 signal and the TX2 signal sequentially rise after the exposure time elapses from each fall. As a result, the charge of the photodiode 202 is output to the imaging circuit 6 by the horizontal scanning circuit 209 via the signal amplification amplifier 204. Thereafter, the RX1 signal and the RX2 signal sequentially rise, and the image display row of the LCD 10 is reset. In this way, the operation of outputting the image signal displayed on the LCD 10 to the imaging circuit 6 is repeated. With regard to the phase difference AF operation, the TX3 signal and the TX4 signal sequentially rise after the exposure time has elapsed from their respective fall. Thereby, the charge of the photodiode 201 is output to the imaging circuit 6 by the horizontal scanning circuit 209 via the signal amplification amplifier 204, and an image for phase difference AF operation is acquired.

ステップS3において、CPU15は、イメージセンサー5により取得した像をLCD10に表示させる。   In step S <b> 3, the CPU 15 displays an image acquired by the image sensor 5 on the LCD 10.

次にステップS4において、CPU15は、操作スイッチ部24のSW1がオン操作(オンオフ)されたか否かを判定し、オン操作された場合はステップS5に進み、オン操作されていない場合は本ステップでの判定を繰り返す。   Next, in step S4, the CPU 15 determines whether or not the SW1 of the operation switch unit 24 has been turned on (on / off), and if it has been turned on, the process proceeds to step S5. Repeat the determination.

ステップS5において、CPU15は、位相差AF処理回路37に位相差AF処理を行わせる。   In step S5, the CPU 15 causes the phase difference AF processing circuit 37 to perform phase difference AF processing.

次に、ステップS6において、CPU15は、位相差AF処理の結果を判定し、位相差AFのみで合焦可能と判定した場合はステップS21へ進む。また、合焦のためにスキャンAF処理が必要と判定した場合はステップS8に進み、合焦不能と判定した場合はステップS7に進む。   Next, in step S6, the CPU 15 determines the result of the phase difference AF process, and if it is determined that focusing is possible only with the phase difference AF, the process proceeds to step S21. If it is determined that the scan AF process is necessary for focusing, the process proceeds to step S8. If it is determined that focusing is impossible, the process proceeds to step S7.

ステップS21において、CPU15は、既にその撮影環境におけるBP補正値が算出されているか否かを判定する。この判定方法に関しては後述する。   In step S21, the CPU 15 determines whether or not a BP correction value in the shooting environment has already been calculated. This determination method will be described later.

BP補正値が算出されていると判定された場合はステップS22へ進み、BP補正値が算出されていないと判定された場合はステップS13へ進む。ステップS22では、CPU15は、第二モータ駆動回路19にフォーカスレンズ群3を駆動させる。具体的には、CPU15は、位相差AF処理で求められたデフォーカス量が零となる位置に位相差AFのBP補正値を加えた位置へ、フォーカスレンズ群3を駆動し、その後、ステップS16へ進む。ステップS16では、CPU15は、表示素子29の点灯と同時にLCD上に緑の枠を表示するなどの処理によりAFが完了したことをユーザに示す。ステップS16の処理が終了すると、ステップS17に進む。   If it is determined that the BP correction value has been calculated, the process proceeds to step S22. If it is determined that the BP correction value has not been calculated, the process proceeds to step S13. In step S22, the CPU 15 causes the second motor driving circuit 19 to drive the focus lens group 3. Specifically, the CPU 15 drives the focus lens group 3 to a position obtained by adding the BP correction value of the phase difference AF to the position where the defocus amount obtained by the phase difference AF process becomes zero, and then, step S16. Proceed to In step S <b> 16, the CPU 15 indicates to the user that AF has been completed by a process such as displaying a green frame on the LCD simultaneously with the lighting of the display element 29. When the process of step S16 ends, the process proceeds to step S17.

ステップS6で合焦不能と判定されステップS7に進むと、CPU15は、イメージセンサー5の駆動モードを図8に示すスキャンAF処理用の高速な読み出しが可能な駆動モードに変更し、イメージセンサー5の駆動タイミングを変更する。このとき、絞りは変更しない。スキャンAF処理高速化のためフレームレートを速くすれば、露光時間が短くなる。そのため、その分増幅率を大きくして信号のレベルを確保する。しかし、増幅率が大きすぎると良好なスキャンAFが期待できないため、増幅率の上限を定めることで露光時間を調整して適正な露光量を確保する。この場合も、図7に比べて露光時間は短い。   If it is determined in step S6 that focusing cannot be performed and the process proceeds to step S7, the CPU 15 changes the drive mode of the image sensor 5 to a drive mode capable of high-speed reading for scan AF processing shown in FIG. Change the drive timing. At this time, the aperture is not changed. If the frame rate is increased to speed up the scan AF process, the exposure time is shortened. For this reason, the signal level is secured by increasing the amplification factor accordingly. However, if the amplification factor is too large, good scan AF cannot be expected. Therefore, by setting the upper limit of the amplification factor, the exposure time is adjusted to ensure an appropriate exposure amount. Also in this case, the exposure time is shorter than that in FIG.

例えば、増幅率の上限が5段である場合に、LCD10に表示する画像に最適な露光時間を30分の1秒とし増幅率を0とすると、スキャンAF用の露光時間が120分の1秒、増幅率が2段となる。しかし、低照度になりLCD10に表示する画像に最適な露光時間を30分の1秒とし増幅率を4段とすれば、スキャンAF用の露光時間が60分の1秒、増幅率が5段となる。   For example, when the upper limit of the amplification factor is five steps, if the optimal exposure time for an image displayed on the LCD 10 is 1/30 second and the amplification factor is 0, the exposure time for scan AF is 1/120 second The amplification factor becomes two stages. However, if the exposure time is low and the optimum exposure time for an image displayed on the LCD 10 is 1/30 second and the amplification factor is four, the exposure time for scan AF is 1/60 second and the amplification factor is five. It becomes.

一方、スキャンAF処理のための信号は、マイクロレンズを共有する水平方向の隣接画素の加算及び同色のカラーフィルターを有する複数の画素群の加算を行えば、垂直方向に行を間引くことも可能である。この加算と間引きにより、高速なフレームレートが実現できる。   On the other hand, the signal for scan AF processing can be thinned out in the vertical direction by adding adjacent pixels in the horizontal direction sharing the microlens and adding a plurality of pixel groups having the same color filter. is there. By this addition and thinning, a high frame rate can be realized.

なお、スキャンAF処理中は、スキャンAF用の信号としてLCD10の表示用の画像信号を用いる。CPU15は、ステップS7の駆動モードおよび駆動タイミングの変更後に、ステップS9に進む。   During the scan AF process, an image signal for display on the LCD 10 is used as a scan AF signal. After changing the drive mode and drive timing in step S7, the CPU 15 proceeds to step S9.

ステップS6で高精度な合焦のためにスキャンAF処理が必要と判定されステップS8に進むと、CPU15は、第二モータ駆動回路19に、スキャンAFの開始位置へフォーカスレンズ群3を駆動させる。スキャンAFの開始位置とは、ステップS5の位相差AF処理で求めたデフォーカス量が零となるフォーカスレンズ群3の位置より、スキャンAFによってAF評価値を取得する範囲の半分だけ現在の位置に近い位置である。この場合は、ステップS7のようなイメージセンサー5の駆動タイミングや駆動モードの変更を行わない。AF評価値を取得する範囲が位相差AF処理で得られた略合焦位置付近に限定されるため、AF評価値を取得する回数が少なくスキャンAF処理に要する時間が短い。結果として、イメージセンサー5の駆動モードを変更せずにスキャンAF処理を開始した方がスキャンAF処理時間を短くできる。CPU15は、ステップS8のフォーカスレンズ群3の駆動後に、ステップS9に進む。   When it is determined in step S6 that the scan AF process is necessary for high-precision focusing and the process proceeds to step S8, the CPU 15 causes the second motor drive circuit 19 to drive the focus lens group 3 to the scan AF start position. The start position of the scan AF is set to the current position by a half of the range in which the AF evaluation value is acquired by the scan AF from the position of the focus lens group 3 where the defocus amount obtained by the phase difference AF process in step S5 becomes zero. Close position. In this case, the drive timing and drive mode of the image sensor 5 are not changed as in step S7. Since the range for acquiring the AF evaluation value is limited to the vicinity of the substantially in-focus position obtained by the phase difference AF process, the number of times of acquiring the AF evaluation value is small and the time required for the scan AF process is short. As a result, the scan AF processing time can be shortened by starting the scan AF process without changing the drive mode of the image sensor 5. After driving the focus lens group 3 in step S8, the CPU 15 proceeds to step S9.

ステップS9において、CPU15は、スキャンAF処理を行いステップS10に進む。この処理については後述する。   In step S9, the CPU 15 performs a scan AF process and proceeds to step S10. This process will be described later.

ステップS10において、CPU15は、ステップS7によりスキャンAF処理においてイメージセンサー5の駆動タイミングおよび駆動モードを変更していた場合は、元の駆動タイミングおよび駆動モードに戻す。ステップS10の処理が終了したら、ステップS11に進む。   In step S10, if the drive timing and drive mode of the image sensor 5 have been changed in the scan AF process in step S7, the CPU 15 returns to the original drive timing and drive mode. When the process of step S10 is completed, the process proceeds to step S11.

ステップS11では、CPU15は、スキャンAF処理の結果を評価し、合焦不能と判定された場合にはステップS15に進み、合焦可能と判定された場合にはステップ12に進む。ステップS15では、CPU15は、第二モータ駆動回路にフォーカスレンズ群3を予め定められた位置(定点)へ駆動させ、ステップS16に進む。ステップS16では、CPU15は、表示素子29の点滅と同時にLCD10上に黄色の枠を表示するなどの処理を行い、AFが完了していないことをユーザに示す。   In step S11, the CPU 15 evaluates the result of the scan AF process. If it is determined that focusing is impossible, the process proceeds to step S15. If it is determined that focusing is possible, the process proceeds to step 12. In step S15, the CPU 15 causes the second motor driving circuit to drive the focus lens group 3 to a predetermined position (fixed point), and proceeds to step S16. In step S16, the CPU 15 performs processing such as displaying a yellow frame on the LCD 10 simultaneously with the blinking of the display element 29, and indicates to the user that AF has not been completed.

ステップS11において合焦可能と判定されステップS12へ進むと、CPU15は、既にその撮影環境におけるBP補正値が算出されているか否かを判定する。この判定方法はステップS21と同じであり、内容は後述する。   When it is determined in step S11 that focusing is possible and the process proceeds to step S12, the CPU 15 determines whether or not a BP correction value in the shooting environment has already been calculated. This determination method is the same as step S21, and the contents will be described later.

BP補正値が算出されていると判定された場合はステップS14へ進み、BP補正値が算出されていないと判定された場合はステップS13へ進む。ステップS14では、CPU15は、第二モータ駆動回路19にフォーカスレンズ群3を駆動させる。具体的には、CPU15は、スキャンAF処理でAF評価値が極大となる位置にBP補正値を加えた位置へ、フォーカスレンズ群3を駆動し、その後、ステップS16へ進む。ステップS16では、CPU15は、表示素子29の点灯と同時にLCD10上に緑の枠を表示するなどの処理によりAFが完了したことをユーザに示す。ステップS16の処理が終了すると、ステップS17に進む。   If it is determined that the BP correction value has been calculated, the process proceeds to step S14. If it is determined that the BP correction value has not been calculated, the process proceeds to step S13. In step S <b> 14, the CPU 15 causes the second motor driving circuit 19 to drive the focus lens group 3. Specifically, the CPU 15 drives the focus lens group 3 to a position where the BP correction value is added to the position where the AF evaluation value becomes a maximum in the scan AF process, and then proceeds to step S16. In step S <b> 16, the CPU 15 indicates to the user that AF has been completed by a process such as displaying a green frame on the LCD 10 simultaneously with the lighting of the display element 29. When the process of step S16 ends, the process proceeds to step S17.

ステップS13では、CPU15は、上述のRFAF処理を行う。   In step S13, the CPU 15 performs the above-described RFAF processing.

RFAF処理回路31は、基準画像信号(A像信号)に対して参照画像信号(B像信号)の画素位置をシフトしながら両信号の和を求めて和信号列を作成し、その信号列と相対的シフト量を回路内の記録領域に記録する。そして、CPU15は、その和信号列をスキャンAF処理回路14に入力してAF評価値信号を取得し、AF評価値が最大となる相対的シフト量を求め、求められた相対的シフト量に対応する位置を合焦位置とする。また、CPU15は、合焦位置とスキャンAF処理の結果もしくは位相差AF処理の結果との差分値をBP補正値とし、その値をズームポジション(焦点距離)および絞り値などの撮影案環境とともに記憶する。CPU15は、また撮影環境以外の環境におけるBP補正値の算出が可能な場合は、そのBP補正値の算出を行う。ステップS13の処理が終了すると、ステップS14に進む。   The RFAF processing circuit 31 calculates the sum of both signals while shifting the pixel position of the reference image signal (B image signal) with respect to the standard image signal (A image signal), creates a sum signal sequence, The relative shift amount is recorded in a recording area in the circuit. Then, the CPU 15 inputs the sum signal sequence to the scan AF processing circuit 14 to obtain an AF evaluation value signal, obtains a relative shift amount that maximizes the AF evaluation value, and corresponds to the obtained relative shift amount. The position to be used is the in-focus position. Further, the CPU 15 sets a difference value between the focus position and the result of the scan AF process or the result of the phase difference AF process as a BP correction value, and stores the value together with a shooting plan environment such as a zoom position (focal length) and an aperture value. To do. If the BP correction value can be calculated in an environment other than the shooting environment, the CPU 15 calculates the BP correction value. When the process of step S13 ends, the process proceeds to step S14.

ステップS14では、CPU15は、第二モータ駆動回路19にフォーカスレンズ群3を上述のように駆動させ、ステップS16へ進む。ステップS16では、CPU15は、表示素子29の点灯と同時にLCD10上に緑の枠を表示するなどの処理によりAFが完了したことをユーザに示す。ステップS16の処理が終了すると、ステップS17に進む。   In step S14, the CPU 15 causes the second motor driving circuit 19 to drive the focus lens group 3 as described above, and proceeds to step S16. In step S <b> 16, the CPU 15 indicates to the user that AF has been completed by a process such as displaying a green frame on the LCD 10 simultaneously with the lighting of the display element 29. When the process of step S16 ends, the process proceeds to step S17.

次に、ステップS17において、CPU15は、操作スイッチ部24のSW2がオン操作されたか否かを判定し、オン操作された場合はステップS18に進み、オン操作されていない場合は本ステップでの判定を繰り返す。   Next, in step S17, the CPU 15 determines whether or not the SW2 of the operation switch unit 24 is turned on. If the switch 15 is turned on, the process proceeds to step S18. If the switch is not turned on, the determination in this step is performed. repeat.

CPU15は、ステップS18においてステップS2におけるAE処理で設定された露光条件により露光処理を実行し、カメラ1の実際の撮影動作を終了する。   In step S18, the CPU 15 executes an exposure process according to the exposure conditions set in the AE process in step S2, and ends the actual photographing operation of the camera 1.

次に、ステップS5における位相差AF処理について、図9を用いて詳細に説明する。   Next, the phase difference AF process in step S5 will be described in detail with reference to FIG.

LCD10に表示する画像信号と位相差AF動作を行うための信号は、イメージセンサー5により異なる露光条件および異なる読み出しレートで取得される。そのため、LCD10の画像表示用の信号とAF動作用の信号についてのそれぞれ露出条件を2行毎に設定し、イメージセンサー5のリセットおよび出力転送のタイミングを異ならせる。これにより、LCD10の画像表示用の信号も位相差AF用の信号を取得している間に得られので、CPU15は位相差AF処理中もその間に取得された画像をLCD10に表示させる。位相差AF処理に用いる信号は、イメージセンサー5の位相差AF用の画素の行から得られる画素加算を行わず独立して出力される信号である。   The image signal to be displayed on the LCD 10 and the signal for performing the phase difference AF operation are acquired by the image sensor 5 under different exposure conditions and different readout rates. Therefore, the exposure conditions for the image display signal and the AF operation signal of the LCD 10 are set for every two lines, and the reset timing and output transfer timing of the image sensor 5 are made different. As a result, the image display signal of the LCD 10 is also obtained while the phase difference AF signal is being acquired, so the CPU 15 displays the image acquired during the phase difference AF process on the LCD 10. The signal used for the phase difference AF process is a signal output independently without performing pixel addition obtained from the row of pixels for phase difference AF of the image sensor 5.

まず、ステップS901において、位相差AF処理回路37は、A/D変換回路7より出力される位相差AF用の画像信号を回路内の記録領域(不図示)に記録する。   First, in step S901, the phase difference AF processing circuit 37 records the image signal for phase difference AF output from the A / D conversion circuit 7 in a recording area (not shown) in the circuit.

次にステップS902において、位相差AF処理回路37は、記録された像の修正を行う。本実施例では、イメージセンサー5の撮像面に位相差AF用の画素を配置している。そのため、2次結像光学系で再結像させる場合のように像高に起因して生じる像の歪みを修正するフィールドレンズや、位相差AF用センサーへ入射する光束に対する絞りや、不要な光束を遮断するマスクを、結像面とイメージセンサー5の間に配置できない。そこで、位相差AF用の信号は画素毎にシェーディング・オフセットが異なり、その補正が必要となる。このシェーディングは、光軸中心からの画素の位置(像高)、並びに撮影レンズの射出瞳位置および絞りによって異なる。位相差AF処理回路37は、これらのそれぞれの要因に対する像修正量を用いて、位相差AF用の画素毎に画素像の修正を行う。   In step S902, the phase difference AF processing circuit 37 corrects the recorded image. In this embodiment, pixels for phase difference AF are arranged on the imaging surface of the image sensor 5. Therefore, a field lens that corrects image distortion caused by the image height as in the case of re-imaging with the secondary imaging optical system, a diaphragm for the light beam incident on the phase difference AF sensor, and an unnecessary light beam. A mask for blocking the image cannot be disposed between the imaging surface and the image sensor 5. Therefore, the signal for phase difference AF has a different shading offset for each pixel and needs to be corrected. This shading differs depending on the pixel position (image height) from the center of the optical axis, the exit pupil position of the photographing lens, and the stop. The phase difference AF processing circuit 37 corrects the pixel image for each pixel for phase difference AF using the image correction amount for each of these factors.

また、オフセットは、位相差AF用の信号の増幅率および各画素の列アンプの特性によって異なる。位相差AF処理回路37は、これらのそれぞれの要因に対する像修正量を用いて、位相差AF用の画素毎に画素像修正を行う。像修正方法の詳細については、特許文献3等で説明されている。   The offset differs depending on the amplification factor of the signal for phase difference AF and the characteristics of the column amplifier of each pixel. The phase difference AF processing circuit 37 performs pixel image correction for each pixel for phase difference AF using the image correction amount for each of these factors. Details of the image correction method are described in Patent Document 3 and the like.

次に、ステップS903において、位相差AF処理回路37は、像修正された位相差AF用の画素の並び替えを行い、基準画像と参照画像を生成する。   Next, in step S903, the phase difference AF processing circuit 37 rearranges the pixels for phase difference AF whose image has been corrected, and generates a reference image and a reference image.

イメージセンサー5には、ひとつのマイクロレンズに対して長方形の二つのフォトダイオード(光電変換部)が配置されており、一方のフォトダイオード202が基準画素用、他方が参照画素用となっている。その読み出し順序は「基準画素」→「参照画素」→「基準画素」→「参照画素」→・・・・・・・→「基準画素」→「参照画素」である。位相差AF処理回路37は、ステップS902での像修正後の基準画像と参照画像もそれに対応した順序で回路内の記録領域(不図示)に記録する。この際、位相差AF処理回路37は、基準画像を構成する画素だけを抽出し、抽出した順序に並べて基準画像の信号を記録する。同様に、位相差AF処理回路37は、参照画像を構成する画素だけを抽出し、抽出した順序に並べて参照画像の信号を記録する。   In the image sensor 5, two rectangular photodiodes (photoelectric conversion units) are arranged for one microlens, and one photodiode 202 is for a reference pixel and the other is for a reference pixel. The reading order is “reference pixel” → “reference pixel” → “reference pixel” → “reference pixel” →... → “reference pixel” → “reference pixel”. The phase difference AF processing circuit 37 also records the standard image and the reference image after the image correction in step S902 in a recording area (not shown) in the circuit in an order corresponding to the reference image. At this time, the phase difference AF processing circuit 37 extracts only the pixels constituting the reference image, and records the signals of the reference image in the extracted order. Similarly, the phase difference AF processing circuit 37 extracts only the pixels constituting the reference image, and records the reference image signal in the extracted order.

その後ステップS904において、位相差AF処理回路37は、相関演算を行う際の初期値を設定する。ステップS905において、位相差AF処理回路37は、ステップS904で設定された初期値により式(1)に従い相関演算を行い基準画像と参照画像の相関値(相関データ)を求める。   Thereafter, in step S904, the phase difference AF processing circuit 37 sets an initial value for performing the correlation calculation. In step S905, the phase difference AF processing circuit 37 calculates a correlation value (correlation data) between the reference image and the reference image by performing a correlation calculation according to the equation (1) using the initial value set in step S904.

=Σmax(aj+1,bj+k)−Σmax(a,bj+k+1) (1)
ここで、aiおよびbiはそれぞれiを整数としてi番目の画素のA像およびB像の出力値を示す。max(a,b)はa,bのうち大きい方の値を意味する。また、kは相関演算を行う像ずらし量、jは相関演算を行う画素番号(位置)である。式(1)のΣは、jについて1から順に変化させた場合の総和を意味する。これらは、ステップS904で初期化されている。
U k = Σmax (a j + 1 , b j + k ) −Σmax (a j , b j + k + 1 ) (1)
Here, a i and b i represent output values of the A and B images of the i-th pixel, where i is an integer. max (a, b) means the larger value of a and b. Further, k is an image shift amount for performing correlation calculation, and j is a pixel number (position) for performing correlation calculation. Σ in equation (1) means the total sum when j is changed in order from 1. These are initialized in step S904.

そしてステップS906では、CPU15が、基準画像と参照画像の相関値を位相差AF処理回路37から取得する。   In step S <b> 906, the CPU 15 acquires the correlation value between the standard image and the reference image from the phase difference AF processing circuit 37.

そしてCPU15は、既に相関値が一時記録されている場合、取得した相関値と符号が等しいか判定し、取得した相関値を記録されていた相関値と差し替える。既に記録されていた相関値がない場合は取得した相関値を記録する。   If the correlation value is already temporarily recorded, the CPU 15 determines whether the acquired correlation value is equal to the sign, and replaces the acquired correlation value with the recorded correlation value. If there is no correlation value already recorded, the acquired correlation value is recorded.

ステップS907では、取得した相関値の符号が既に記録されていた相関値の符号に対して反転すると判定された場合又は取得された相関値が零である場合は、ステップS910へ進み、符号が等しい場合はステップS908へ進む。   In step S907, if it is determined that the sign of the acquired correlation value is inverted with respect to the code of the already recorded correlation value, or if the acquired correlation value is zero, the process proceeds to step S910, where the signs are equal. In this case, the process proceeds to step S908.

ステップS908では、CPU15は、ずらし量が相関値を求める演算の終端の値となったか否かを判定する。終端の値になっていなければステップS920へ進み、終端の値になっていたならばステップS909へ進む。   In step S908, the CPU 15 determines whether or not the shift amount has reached the end value of the calculation for obtaining the correlation value. If it is not the end value, the process proceeds to step S920, and if it is the end value, the process proceeds to step S909.

ステップS920では、CPU15は、ずらし量kをk←k+1と更新する。   In step S920, the CPU 15 updates the shift amount k to k ← k + 1.

ステップS909では、CPU15は、位相差AFが不可能である(NG)と判定し、処理を終了する。   In step S909, the CPU 15 determines that phase difference AF is not possible (NG), and ends the process.

ステップS910では、CPU15は、相関量が零になる像ずらし量を演算する。相関値の演算は1画素ずつずらして行われているため、位相差AF処理回路37において演算された相関量が零になることは稀である。そこで、CPU15は、符号が異なるふたつの相関量と、その相関量を与えるずらし量とから、相関量が零となる像ずらす量を求める。   In step S910, the CPU 15 calculates an image shift amount that causes the correlation amount to be zero. Since the correlation value is calculated by shifting one pixel at a time, the correlation amount calculated in the phase difference AF processing circuit 37 is rarely zero. Therefore, the CPU 15 obtains an image shift amount for which the correlation amount becomes zero from the two correlation amounts having different signs and the shift amount that gives the correlation amount.

式(1)で相関量を計算した結果、K=lとK=l+1の間で相関量Uの符号が反転したとすると、直線補間により相関量が零となる像ずらし量δは下記式により求まる。
δ=l + |U|÷[|U|+|Ul+1|]
ただし、|z|は、zの絶対値を意味する。
As a result of calculating the correlation amount by the equation (1), if the sign of the correlation amount U k is inverted between K = 1 and K = 1 + 1, the image shift amount δ at which the correlation amount becomes zero by linear interpolation is expressed by the following equation: It is obtained by.
δ = l + | U l | ÷ [| U l | + | U l + 1 |]
However, | z | means the absolute value of z.

次に、ステップS911において、CPU15は、プレディクション量Pを像ずれ量δから、下記式により求める。
P=δ―Δ
Δは、合焦時の像ずれ量を意味する。
Next, in step S911, the CPU 15 obtains the prediction amount P from the image shift amount δ by the following equation.
P = δ−Δ
Δ means an image shift amount at the time of focusing.

そして、CPU15は、撮影レンズ鏡筒100の特性から決まる基線長を用いることで、プレディクション量Pからデフォーカス量d(フォーカスレンズ群の移動量と方向)を下記式により求め、処理を終了する。
d = K・P
Kは、フォーカスに関する敏感度であり、撮影レンズ鏡筒100の焦点距離、絞り4の値、像高等に依存する値である。そのため、EEPROM25内にこれらをパラメータとするテーブルを用意しておき、そのテーブルを参照して値を求める。
Then, the CPU 15 obtains the defocus amount d (the moving amount and direction of the focus lens group) from the prediction amount P by using the base line length determined from the characteristics of the photographing lens barrel 100, and ends the processing. .
d = K · P
K is a sensitivity related to the focus, and is a value depending on the focal length of the photographing lens barrel 100, the value of the diaphragm 4, the image height, and the like. Therefore, a table using these as parameters is prepared in the EEPROM 25, and values are obtained by referring to the table.

次に、スキャンAF処理について図8を用いて説明する。   Next, the scan AF process will be described with reference to FIG.

なお、以降の説明においては、フォーカスレンズ群3を所定の位置に駆動しながらAF評価値を取得する動作をスキャン、AF評価値を取得するフォーカスレンズの位置の間隔をスキャン間隔という。また、AF評価値を取得する数をスキャンポイント数、AF評価値を取得する範囲をスキャン範囲、合焦位置を検出するための画像信号を取得する領域をAF枠という。   In the following description, the operation of acquiring the AF evaluation value while driving the focus lens group 3 to a predetermined position is referred to as scanning, and the interval of the position of the focus lens for acquiring the AF evaluation value is referred to as scanning interval. The number of AF evaluation values acquired is called the number of scan points, the range of acquiring AF evaluation values is called the scan range, and the area for acquiring the image signal for detecting the in-focus position is called the AF frame.

CPU15は、ステップS9においてAE処理回路13により定められた露光条件でスキャンAFを行い、焦点調整が可能な場合はステップS11からステップS14に従って、第二モータ駆動回路19に合焦位置へフォーカスレンズ群3を駆動させる。また、焦点調整が不可能な場合は、CPU15は、ステップS11とステップS15に従って、第二モータ駆動回路19に、過焦点位置と呼ばれる無限遠を被写界深度の遠側に含む最も近距離のフォーカスレンズ位置へフォーカスレンズ群3を駆動させる。   The CPU 15 performs scan AF under the exposure conditions determined by the AE processing circuit 13 in step S9, and when focus adjustment is possible, the focus lens group is moved to the in-focus position by the second motor drive circuit 19 according to steps S11 to S14. 3 is driven. If focus adjustment is impossible, the CPU 15 causes the second motor drive circuit 19 to follow the steps S11 and S15 in order to cause the second motor drive circuit 19 to include the infinity called the hyperfocal position on the far side of the depth of field. The focus lens group 3 is driven to the focus lens position.

ステップS7でイメージセンサー5の駆動モードを変更した場合、スキャンAF処理中のイメージセンサー5は、図8に示すタイミングチャートで駆動される。ここで、スキャンAF動作用の信号としてLCD10の表示用の画像信号が用いられる。LCD10の画像表示用の信号とスキャンAF動作用の信号は、同一の露光条件および同一の読み出しレートでイメージセンサー5から取得される。一方、位相差AF動作を行うための信号は、異なる露光条件で取得し異なる読み出しレートでイメージセンサー5から取得される。   When the drive mode of the image sensor 5 is changed in step S7, the image sensor 5 during the scan AF process is driven according to the timing chart shown in FIG. Here, an image signal for display on the LCD 10 is used as a signal for the scan AF operation. The image display signal and the scan AF operation signal of the LCD 10 are acquired from the image sensor 5 under the same exposure conditions and the same readout rate. On the other hand, signals for performing the phase difference AF operation are acquired under different exposure conditions and acquired from the image sensor 5 at different readout rates.

そのために、スキャンAF動作用およびLCD10の画像表示用の信号と位相差AF動作用の信号のそれぞれの露出条件を2行毎に設定し、イメージセンサー5のリセットおよび出力転送のタイミングを異ならせる。スキャンAF処理において、位相差AF動作を行うための信号は使用しない。   For this purpose, the exposure conditions of the scan AF operation and the image display signal of the LCD 10 and the signal for the phase difference AF operation are set for every two rows, and the reset timing and output transfer timing of the image sensor 5 are made different. In the scan AF process, a signal for performing the phase difference AF operation is not used.

スキャンAF動作用の露光時間ついては、32分の1秒を長秒時側の限度とし、センサーの性能等で決まる最小露光時間を短秒時側の限度とする。露光時間は、ステップS2のAE処理結果を参照して絞り4または列アンプ回路210の値を調節することで、適正な露光量が得られるように決定される。LCD表示においては、スキャンAF中の露光量が不適正となる可能性があるが、本処理においてはスキャンAF性能を優先する。   As for the exposure time for the scan AF operation, 1/32 second is set as the limit on the long time side, and the minimum exposure time determined by the performance of the sensor is set as the limit on the short time side. The exposure time is determined so as to obtain an appropriate exposure amount by adjusting the value of the diaphragm 4 or the column amplifier circuit 210 with reference to the AE processing result in step S2. In the LCD display, the exposure amount during the scan AF may become inappropriate, but the scan AF performance is prioritized in this process.

図8のタイミングチャートに従って処理することで、スキャンAF動作用の露光時間は位相差AF動作用の画像の露光時間より更に短くなり、読み出しレートも速くなる。例えば、スキャンAF動作用の露光時間を128分の1秒として、読み出しレートを128FPSとし、位相差AF動作用の画像の露光時間を8分の1秒として読み出しレートは8FPSとする。このとき、絞り4の値は、変更せずにそのまま維持する。   By performing processing according to the timing chart of FIG. 8, the exposure time for the scan AF operation is further shorter than the exposure time for the image for the phase difference AF operation, and the readout rate is also increased. For example, the exposure time for the scan AF operation is 1/128 second, the readout rate is 128 FPS, the exposure time for the image for the phase difference AF operation is 1/8 second, and the readout rate is 8 FPS. At this time, the value of the diaphragm 4 is maintained as it is without being changed.

ステップS6において合焦のためにスキャンAF処理をすることが必要(略合焦可能)と判定された場合、イメージセンサー5の駆動モードを変更していないため、図7のタイミングチャートに応じてスキャンAF処理が行われる。   If it is determined in step S6 that it is necessary to perform scan AF processing for focusing (substantially focusing is possible), the drive mode of the image sensor 5 has not been changed, and scanning is performed according to the timing chart of FIG. AF processing is performed.

TX信号およびRS信号は、決定した露光条件(露光時間)に応じて図8のように制御される。スキャンAF動作用信号および位相差AF動作用信号の取得において、TX信号およびRS信号が立ち上がりに応じて、各画素のフォトダイオード202の電荷がリセットされ、露光が開始される。この動作はTG16によって設定された条件で、受光画素201の所定の順番で順次行われる。   The TX signal and the RS signal are controlled as shown in FIG. 8 according to the determined exposure condition (exposure time). In acquiring the scan AF operation signal and the phase difference AF operation signal, the charge of the photodiode 202 of each pixel is reset and the exposure is started in response to the rise of the TX signal and the RS signal. This operation is sequentially performed in a predetermined order of the light receiving pixels 201 under the conditions set by the TG 16.

露光開始から所定の露光時間経過後にTX1およびTX2信号が順次立ち上がる。それに応じて、スキャンAF動作用の行におけるフォトダイオード202の電荷は、信号増幅アンプ204に読みだされ、水平走査回路209を通って出力される。次に、再度RX1およびRX2が順次立ち上がり、それに応じてスキャンAF動作信号用の行の電荷がリセットさせる。これらの動作を繰り返すことにより、スキャンAF動作用信号が取得される。   The TX1 and TX2 signals sequentially rise after a predetermined exposure time has elapsed from the start of exposure. In response to this, the charge of the photodiode 202 in the row for the scan AF operation is read by the signal amplification amplifier 204 and output through the horizontal scanning circuit 209. Next, RX1 and RX2 sequentially rise again, and the charge of the row for the scan AF operation signal is reset accordingly. By repeating these operations, a scan AF operation signal is acquired.

同様に、露光開始から露光時間の経過後にTX3およびTX4信号が順次立ち上がる。それに応じて、位相差AF動作用のフォトダイオード201の電荷が信号増幅アンプ204に読みだされ、水平走査回路209を通して出力される。次に、再度RX3およびRX4が順次立ち上がり、それに応じてスキャンAF動作信号用の行の電荷がリセットさせる。これらの動作を繰り返すことにより、位相差AF用の信号が取得される。   Similarly, the TX3 and TX4 signals sequentially rise after the exposure time has elapsed from the start of exposure. In response to this, the charge of the photodiode 201 for phase difference AF operation is read by the signal amplification amplifier 204 and output through the horizontal scanning circuit 209. Next, RX3 and RX4 sequentially rise again, and the charge of the row for the scan AF operation signal is reset accordingly. By repeating these operations, a signal for phase difference AF is acquired.

フォーカスレンズ群3を所定の位置へ駆動した後にこれらの動作を行うことで、スキャンAF動作用信号を取得しスキャンAF処理回路14でAF評価値を算出する。所望のAF評価値を取得したならば、次の所定の位置へフォーカスレンズ群3を駆動し、再び上記のスキャンAF動作用信号の取得動作を行いAF評価値の取得を繰り返す。   By performing these operations after the focus lens group 3 is driven to a predetermined position, a scan AF operation signal is acquired, and the scan AF processing circuit 14 calculates an AF evaluation value. When the desired AF evaluation value is acquired, the focus lens group 3 is driven to the next predetermined position, the above-described scan AF operation signal acquisition operation is performed again, and the AF evaluation value acquisition is repeated.

次に、図6のステップS6の位相差AF処理で合焦不可能と判定された場合のスキャンAF動作について図10を用いて説明する。   Next, the scan AF operation in the case where it is determined that focusing cannot be performed in the phase difference AF process in step S6 in FIG. 6 will be described with reference to FIG.

ステップS6で略合焦と判定された場合は、スキャン範囲が位相差AF処理の結果求められた略合焦位置近傍に限定される。この違いを除けばステップS6で合焦不能と判定された場合と同様の動作が行われる。   If it is determined in step S6 that the focus is substantially in focus, the scan range is limited to the vicinity of the substantially in-focus position obtained as a result of the phase difference AF process. Excluding this difference, the same operation as that performed when it is determined in step S6 that focusing cannot be performed is performed.

スキャンAFは上述のようにフォーカスレンズ群3の駆動とAF評価値の取得を繰り返して、イメージセンサー5によって生成された2行毎に設定されたスキャンAF動作用の信号から抽出される高周波成分が最も多くなるフォーカスレンズ群3の位置を求める。   In the scan AF, the driving of the focus lens group 3 and the acquisition of the AF evaluation value are repeated as described above, and the high frequency component extracted from the signal for the scan AF operation set for every two rows generated by the image sensor 5 is obtained. The position of the focus lens group 3 that is the largest is obtained.

まずCPU15は、フォーカスレンズ群3を無限遠に相当する位置(図10の「A」)から各々の撮影モードにおいて設定される至近距離に相当する位置(「B」)まで駆動するように、第二モータ駆動回路19を介してフォーカス駆動モータ22を制御する。CPU15は、この駆動を行いながらスキャンAF処理回路14の出力(AF評価値信号)を取得する。そして、フォーカスレンズ群3の駆動が終了した時点で、取得したAF評価値信号が最大になる位置(図10の「C」)を求め、その位置にフォーカスレンズ群3を駆動する。   First, the CPU 15 drives the focus lens group 3 from a position corresponding to infinity (“A” in FIG. 10) to a position corresponding to the closest distance set in each shooting mode (“B”). The focus drive motor 22 is controlled via the two-motor drive circuit 19. The CPU 15 acquires the output (AF evaluation value signal) of the scan AF processing circuit 14 while performing this driving. Then, when the driving of the focus lens group 3 is completed, a position (“C” in FIG. 10) where the acquired AF evaluation value signal is maximum is obtained, and the focus lens group 3 is driven to that position.

ステップS6の位相差AF処理で略合焦と判定された場合は、略合焦位置の近傍のみでAF評価値信号)を取得する。例えば、図10のPの位置で位相差AF処理を行い図10のC’の位置を略合焦位置と算出した場合は、C’の位置からPの位置の側へスキャン範囲の2分の1の位置(図10の「A’」)を求める。次に、A’の位置から反対側にスキャン範囲の2分の1の位置(図10の「B’」)までスキャンAF処理を行ってAF評価値信号を取得し、取得したAF評価値信号が最大になる位置(図10の「C」)を求める。そして、このAF評価値信号が最大になる位置にフォーカスレンズ群3を駆動する。   If it is determined that the in-focus state is substantially in focus in the phase difference AF process in step S6, an AF evaluation value signal) is acquired only in the vicinity of the in-focus position. For example, when the phase difference AF process is performed at the position P in FIG. 10 and the position C ′ in FIG. 10 is calculated as a substantially in-focus position, the scan range is divided by two from the position C ′ to the position P. 1 position ("A '" in FIG. 10) is obtained. Next, the AF evaluation value signal is acquired by performing the scan AF process from the position A ′ to the position half the scan range (“B ′” in FIG. 10) on the opposite side, and the acquired AF evaluation value signal Is determined to be the position ("C" in FIG. 10). Then, the focus lens group 3 is driven to a position where the AF evaluation value signal becomes maximum.

このAF評価値信号の取得は、スキャンAFの高速に行うために、全てのフォーカスレンズ群3の停止位置については行わず所定のステップ毎で行われてもよい。例えば、図11に示すa1、a2、a3の位置においてAF評価値信号を取得するようにしてもよい。このような場合は、AF評価値信号が最大値となった点とその前後の点のから合焦位置Cを計算によって取得する。   The acquisition of the AF evaluation value signal may be performed every predetermined step without performing the stop positions of all the focus lens groups 3 in order to perform the scan AF at high speed. For example, the AF evaluation value signal may be acquired at the positions 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 signal becomes the maximum value and the points before and after the point.

フォーカスレンズ群3の位置がX1(図10のa2)のときにAF評価値が最大値Y1となる。その前後の位置X2、X3で取得したAF評価値がY2、Y3(図10のa1、a3)のとき、合焦位置Cのフォーカスレンズ群3の位置X0は、以下の式によって求められる。   When the position of the focus lens group 3 is X1 (a2 in FIG. 10), the AF evaluation value becomes the maximum value Y1. When the AF evaluation values acquired at the front and rear positions X2 and X3 are Y2 and Y3 (a1 and a3 in FIG. 10), the position X0 of the focus lens group 3 at the in-focus position C is obtained by the following expression.

X0={(Y3−Y2)・X1+(Y3−Y1)・X2+(Y2−Y1)・X3}/{2・(Y3−Y1)}
ただし、Y1>Y3、Y1≧Y2である。
X0 = {(Y3-Y2) .X1 + (Y3-Y1) .X2 + (Y2-Y1) .X3} / {2. (Y3-Y1)}
However, Y1> Y3 and Y1 ≧ Y2.

また、このように補間計算を行いAF評価値信号が最大値となる点(図10の「C」)を求める前に、AF評価値信号の信頼性を評価してもよい。具体的な方法は特許文献4や特許文献5に記載されている。   Further, the reliability of the AF evaluation value signal may be evaluated before performing the interpolation calculation and obtaining the point (“C” in FIG. 10) where the AF evaluation value signal becomes the maximum value. Specific methods are described in Patent Document 4 and Patent Document 5.

次に、ステップS13にて行われるRFAF処理に関して、図11を用いて説明する。   Next, the RFAF process performed in step S13 will be described with reference to FIG.

RFAF処理は、主に撮影レンズの光学特性に起因して生じる、記録画像の解像度が最大となるフォーカスレンズ群3の位置とスキャンAF処理もしくは位相差AF処理の結果による位置との差分を補正するための処理である。この差分値をBP補正値とし、像高・ズームポジション・絞り値・撮影レンズ鏡筒100内の温度・カメラ1の温度・カメラの姿勢などの撮影環境とともにEEPROM25に記憶される。また撮影環境以外の環境においてBP補正値の算出が可能な場合は、その環境におけるBP補正値の算出を行い撮影環境とともに記憶する。このようなRFAF処理は、スキャンAF処理の結果得られるAF評価値が極大となるフォーカスレンズ群3の位置、もしくは位相差AF処理の結果得られるデフォーカス量が零となるフォーカスレンズ群3の位置の近傍でのみ行われる。またRFAF処理で用いる信号は、イメージセンサー5の位相差AF用画素行から得られた画素加算を行わず独立して出力される信号である。   The RFAF process corrects the difference between the position of the focus lens group 3 where the resolution of the recorded image is the maximum and the position resulting from the scan AF process or the phase difference AF process, which mainly occurs due to the optical characteristics of the photographing lens. Process. This difference value is used as a BP correction value and stored in the EEPROM 25 together with the shooting environment such as the image height, zoom position, aperture value, temperature in the taking lens barrel 100, temperature of the camera 1, and camera posture. If the BP correction value can be calculated in an environment other than the shooting environment, the BP correction value in that environment is calculated and stored together with the shooting environment. In such RFAF processing, the position of the focus lens group 3 where the AF evaluation value obtained as a result of the scan AF processing is maximized, or the position of the focus lens group 3 where the defocus amount obtained as a result of the phase difference AF processing is zero. Only in the vicinity of The signal used in the RFAF processing is a signal output independently without performing pixel addition obtained from the phase difference AF pixel row of the image sensor 5.

まず、図11のステップS1101において、CPU15は、フォーカスレンズ群3が位相差AF処理(ステップS5)またはスキャンAF処理(ステップS9)において求められた合焦位置に位置するか否かを判定する。合焦位置にあると判定された場合はステップS1102へ進み、CPU15は、位相差AF処理が既に行われているか判定する。   First, in step S1101 in FIG. 11, the CPU 15 determines whether or not the focus lens group 3 is located at the in-focus position obtained in the phase difference AF process (step S5) or the scan AF process (step S9). If it is determined that the current position is the in-focus position, the process advances to step S1102, and the CPU 15 determines whether the phase difference AF process has already been performed.

ここで、ステップS5で位相差AF処理を行った結果、ステップS6で合焦可能と判定され、かつ、その際のフォーカスレンズ群3の位置が合焦位置であったとする。この場合、その合焦位置における位相差AF用の画素の信号が取得され、位相差AFのために像修正や並び替えの処理が行われる。このとき、CPU15は、ステップS1102において位相差AF処理が既に行われたと判定し、ステップS1104へ進む。   Here, as a result of performing the phase difference AF process in step S5, it is determined in step S6 that focus is possible, and the position of the focus lens group 3 at that time is the focus position. In this case, a signal of a pixel for phase difference AF at the in-focus position is acquired, and image correction or rearrangement processing is performed for the phase difference AF. At this time, the CPU 15 determines that the phase difference AF processing has already been performed in step S1102, and proceeds to step S1104.

またステップS5で位相差AF処理を行った結果、ステップS6で略合焦可能または合焦不可能と判定され、ステップS9でスキャンAF処理が行われた結果、合焦位置としてフォーカスレンズ群3を移動した位置が、位相差AF処理を行った位置であったとする。この場合、その位置における位相差AF用の画素の信号が取得され、位相差AFのために像修正や並び替えの処理が行われる。このときも、CPU15は、位相差AF処理が既に行われたと判定し、ステップS1104へ進む。   Further, as a result of performing the phase difference AF processing in step S5, it is determined in step S6 that the in-focus state is substantially possible or impossible, and as a result of the scan AF processing being performed in step S9, the focus lens group 3 is set as the in-focus position. It is assumed that the moved position is a position where the phase difference AF processing is performed. In this case, a pixel signal for phase difference AF at that position is acquired, and image correction or rearrangement processing is performed for the phase difference AF. Also at this time, the CPU 15 determines that the phase difference AF process has already been performed, and proceeds to step S1104.

ステップS1104では、CPU15は、位相差AF処理回路37の所定の記録領域に記録された基準画像信号と参照画像信号を読み出し、その後ステップS1105へ進む。   In step S1104, the CPU 15 reads the standard image signal and the reference image signal recorded in the predetermined recording area of the phase difference AF processing circuit 37, and then proceeds to step S1105.

一方、ステップS1101で合焦位置にないと判定された場合はステップS1103に進み、CPU15は、フォーカスレンズ群3を合焦位置へ移動しステップS901へ進む。   On the other hand, if it is determined in step S1101 that it is not in the in-focus position, the process proceeds to step S1103, and the CPU 15 moves the focus lens group 3 to the in-focus position and proceeds to step S901.

ステップS901において、位相差AF処理回路37は、A/D変換回路7より出力される位相差AF用の画像信号を位相差AF処理回路37の所定の記録領域に記録し、ステップS902に進む。ステップS902において、位相差AF処理回路37は、記録された像の修正を行いステップS903に進む。   In step S901, the phase difference AF processing circuit 37 records the image signal for phase difference AF output from the A / D conversion circuit 7 in a predetermined recording area of the phase difference AF processing circuit 37, and proceeds to step S902. In step S902, the phase difference AF processing circuit 37 corrects the recorded image and proceeds to step S903.

ステップS903において、CPU15は、像修正された位相差AF用の画素の並び替えを行い、基準画像と参照画像を生成して位相差AF処理回路37の所定の記録領域に記録し、ステップS1105へ進む。これらの一連の動作は、ステップS5で行われる位相差AF処理と同じである。   In step S903, the CPU 15 rearranges the pixels for phase difference AF whose image has been corrected, generates a reference image and a reference image, and records them in a predetermined recording area of the phase difference AF processing circuit 37, and then proceeds to step S1105. move on. A series of these operations is the same as the phase difference AF process performed in step S5.

ステップS1105において、CPU15は、基準画像信号と参照画像信号の和信号を求める際の初期値をRFAF処理回路31に設定する。   In step S <b> 1105, the CPU 15 sets an initial value for obtaining the sum signal of the standard image signal and the reference image signal in the RFAF processing circuit 31.

初期値が設定されたRFAF処理回路31は、ステップS1106において、式(2)に従い和信号を求める。   In step S1106, the RFAF processing circuit 31 to which the initial value is set obtains a sum signal according to the equation (2).

Add(j,k)=aj+bj+k (2)
ここで、kは和信号を求める際の像ずらし量、jは相関演算を行う画素番号(位置)であり、ステップS1105で初期化されている。
Add (j, k) = aj + bj + k (2)
Here, k is an image shift amount when obtaining the sum signal, j is a pixel number (position) on which the correlation calculation is performed, and is initialized in step S1105.

例えば、k=κ(カッパ)として初期化が行われ、jの範囲が0〜Jの場合、Add(j,k)として、Add(0,κ)〜Add(j,κ)の信号が求められる。その値は、
Add(0,κ)=a0+b0+κ
Add(1,κ)=a1+b1+κ




Add(j,κ)=aJ+bJ+κ
となる。
For example, when initialization is performed with k = κ (kappa) and the range of j is 0 to J, signals of Add (0, κ) to Add (j, κ) are obtained as Add (j, k). It is done. Its value is
Add (0, κ) = a0 + b0 + κ
Add (1, κ) = a1 + b1 + κ




Add (j, κ) = aJ + bJ + κ
It becomes.

このように和信号を求めたら、CPU15は、ステップS1107へ進み、この和信号をスキャンAF処理回路14のAF評価値を求める回路に入力し、像ずらし量kにおけるAF評価値Tes(k)を求める。   After obtaining the sum signal in this way, the CPU 15 proceeds to step S1107, inputs this sum signal to the circuit for obtaining the AF evaluation value of the scan AF processing circuit 14, and obtains the AF evaluation value Tes (k) at the image shift amount k. Ask.

ステップS1108において、CPU15は、ステップS1107で求められたAF評価値Tes(k)を像ずらし量kとともに所定の記録領域に記録し、ステップS1109に進む。   In step S1108, the CPU 15 records the AF evaluation value Tes (k) obtained in step S1107 together with the image shift amount k in a predetermined recording area, and proceeds to step S1109.

ステップS1109において、CPU15は、像ずらし量kが和信号を求める演算の終端の値になったか否かを判定する。終端の値になっていなければ、CPU15は、ステップS1120へ進み、像ずらし量kをk←k+1と更新する。   In step S1109, the CPU 15 determines whether or not the image shift amount k has reached the end value of the calculation for obtaining the sum signal. If the end value is not reached, the CPU 15 proceeds to step S1120 and updates the image shift amount k to k ← k + 1.

そしてステップS1106において、RFAF処理回路31が、式(2)に従い和信号を求める。   In step S1106, the RFAF processing circuit 31 obtains a sum signal according to the equation (2).

上記のように、k=κ(カッパ)として初期化が行われ、jの範囲が0〜Jの場合、Add(j,k)として、Add(0,κ+1)〜Add(J,κ+1)の信号が求められる。その値は
Add(0,κ+1)=a0+b0+κ+1
Add(1,κ+1)=a1+b1+κ+1




Add(j,κ+1)=aJ+bJ+κ+1
となる。
As described above, initialization is performed with k = κ (kappa), and when j is in the range of 0 to J, Add (0, κ + 1) to Add (J, κ + 1) is added as Add (j, k). A signal is required. Its value is Add (0, κ + 1) = a0 + b0 + κ + 1
Add (1, κ + 1) = a1 + b1 + κ + 1




Add (j, κ + 1) = aJ + bJ + κ + 1
It becomes.

その後上述の様に、CPU15は、ステップS1107でこの和信号をスキャンAF処理回路14のAF評価値を求める回路に入力し、像ずらし量kにおけるAF評価値Tes(k)を求める。次に、ステップS1108において、CPU15は、ステップS1107で求められたAF評価値Tes(k)を像ずらし量kとともに所定の記録領域に記録する。そして、ステップS1109において、CPU15は、ずらし量が和信号を求める演算の終端の値になったか否かを判定する。   Thereafter, as described above, the CPU 15 inputs this sum signal to the circuit for obtaining the AF evaluation value of the scan AF processing circuit 14 in step S1107, and obtains the AF evaluation value Tes (k) at the image shift amount k. Next, in step S1108, the CPU 15 records the AF evaluation value Tes (k) obtained in step S1107 together with the image shift amount k in a predetermined recording area. In step S1109, the CPU 15 determines whether or not the shift amount has reached the end value of the calculation for obtaining the sum signal.

CPU15は、以上の動作をずらし量が終端の値に達するまで繰り返す。   The CPU 15 repeats the above operation until the shift amount reaches the end value.

CPU15は、終端の値に達したらステップS1110へ進み、RFAF処理により得られたAF評価値が最大となる、ずらし量及びBP補正値を求める。ここでは、AF評価値信号が最大値となる点とその前後の点からRFAF処理における合焦位置を計算によって求める。ずらし量KdのときにAF評価値が最大になり、そのAF評価値をTes(Kd)とする。その前後のずらし量で取得したAF評価値をTes(Kd−1)、Tes(Kd+1)とすれば、合焦位置を与えるずらし量Kδは以下の式によって表わされる。
Kδ=[{Tes(Kd+1)−Tes(Kd−1)}kd+{Tes(Kd+1)−Tes(Kd)}(kd−1) +{Tes(Kd−1)−Tes(Kd)}(kd+1) ]/2・{(Tes(Kd+1)−Tes(Kd))}
ただし、Tes(Kd)>Tes(Kd+1)、Tes(Kd)≧Tes(Kd−1)である。
When the CPU 15 reaches the end value, the CPU 15 proceeds to step S1110 and obtains a shift amount and a BP correction value that maximizes the AF evaluation value obtained by the RFAF processing. Here, the in-focus position in the RFAF processing is obtained by calculation from the point where the AF evaluation value signal becomes the maximum value and the points before and after that point. When the shift amount is Kd, the AF evaluation value becomes maximum, and the AF evaluation value is set to Tes (Kd). Assuming that the AF evaluation values acquired with the previous and subsequent shift amounts are Tes (Kd−1) and Tes (Kd + 1), the shift amount Kδ that gives the in-focus position is expressed by the following equation.
Kδ = [{Tes (Kd + 1) −Tes (Kd−1)} kd + {Tes (Kd + 1) −Tes (Kd)} (kd−1) + {Tes (Kd−1) −Tes (Kd)} (kd + 1) ] / 2 · {(Tes (Kd + 1) −Tes (Kd))}
However, Tes (Kd)> Tes (Kd + 1) and Tes (Kd) ≧ Tes (Kd−1).

このように、AF評価値信号が最大値となる点を求める前に補間計算を行い、AF評価値信号の信頼性を評価してもよい。この場合、その信頼性が十分であったときに、AF評価値信号が最大値となる点を求める。   As described above, interpolation calculation may be performed before obtaining the point at which the AF evaluation value signal has the maximum value, and the reliability of the AF evaluation value signal may be evaluated. In this case, when the reliability is sufficient, a point at which the AF evaluation value signal becomes the maximum value is obtained.

RFAF処理においては、イメージセンサー5の位相差AF用画素行から得られる画素加算を行わない信号を用いる。一方、スキャンAF処理においては、イメージセンサー5からの信号読み出しレートを速くするために画素加算を行い、読み出し画素数を減らすため、記録される画像に含まれる高域成分を含まないことがある。すると、撮影レンズの光学特性によって被写体の空間周波数ごとの結像位置が異なる場合に、記録される画像の信号とスキャンAF処理に用いる信号の結像位置が互いに異なるものとなる。そのため、スキャンAF処理で求めたAF評価値が極大となるフォーカスレンズ群3の位置において、記録される画像の解像度が最大とならないことがある。   In the RFAF processing, a signal that does not perform pixel addition obtained from the phase difference AF pixel row of the image sensor 5 is used. On the other hand, in the scan AF process, pixel addition is performed to increase the signal readout rate from the image sensor 5 and the number of readout pixels is reduced, so that the high frequency component included in the recorded image may not be included. Then, when the imaging position of the subject for each spatial frequency is different depending on the optical characteristics of the photographing lens, the imaging position of the recorded image signal and the signal used for the scan AF process are different from each other. Therefore, the resolution of the recorded image may not be maximized at the position of the focus lens group 3 where the AF evaluation value obtained by the scan AF process is maximized.

この点、RFAF処理においては、画素加算を行わない信号を用いるため、RFAF処理によって得られるAF評価値が最大となるフォーカスレンズ群3の位置で、記録される画像の解像度が最大となる。   In this regard, in the RFAF processing, since a signal that does not perform pixel addition is used, the resolution of the recorded image is maximized at the position of the focus lens group 3 where the AF evaluation value obtained by the RFAF processing is maximized.

位相差AF処理においては画素加算を行わない信号を用いているが、相関演算を行う際の演算エラーを回避するためにローパスフィルターによって高域の信号成分を抑えるため、記録される画像の信号と含まれる高域の空間周波数成分が異なる。その結果、位相差AF処理で求めたデフォーカス量が零となるフォーカスレンズ群3の位置において、記録される画像の解像度が最大とならないことがある。   In the phase difference AF processing, a signal that does not perform pixel addition is used, but in order to avoid a calculation error when performing a correlation calculation, a low-pass filter suppresses a high-frequency signal component, The high-frequency spatial frequency components included are different. As a result, the resolution of the recorded image may not be maximized at the position of the focus lens group 3 where the defocus amount obtained by the phase difference AF process is zero.

この点、RFAF処理においては、ローパスフィルターによる処理を行わないため、RFAF処理によって得られるフォーカスレンズ群3の位置で、記録される画像の解像度が最大となる。   In this regard, in the RFAF processing, since the processing by the low-pass filter is not performed, the resolution of the recorded image is maximized at the position of the focus lens group 3 obtained by the RFAF processing.

RFAF処理によって、得られるAF評価値が最大となるずらし量Kδが求まれば、そのずらし量Kδに基づいて、記録される画像の解像度が最大となるフォーカスレンズ群3の位置への移動量を式(3)に従って求める。
レンズ移動量(パルス)
=K・kδ÷フォーカス敏感度÷1パルスあたりの移動量 (3)
ただし、Kは撮像素子上での像ずれ量をデフォーカス量に変換する係数である。Kは、撮影レンズ鏡筒100の焦点距離、絞り4の値、像高等に依存する値なので、EEPROM25内にこれらをパラメータとするテーブルを予め用意し、そのテーブルを参照してKを取得する。
If the shift amount Kδ at which the obtained AF evaluation value is maximized is obtained by the RFAF processing, the amount of movement to the position of the focus lens group 3 at which the resolution of the recorded image is maximized is determined based on the shift amount Kδ. It calculates | requires according to Formula (3).
Lens movement (pulse)
= K · kδ ÷ Focus sensitivity ÷ Movement amount per pulse (3)
Here, K is a coefficient for converting the image shift amount on the image sensor into the defocus amount. Since K is a value that depends on the focal length of the taking lens barrel 100, the value of the diaphragm 4, the image height, and the like, a table using these as parameters in the EEPROM 25 is prepared in advance, and K is acquired by referring to the table.

このレンズ移動量が、主に撮影レンズの光学特性に起因するピント補正量(BP補正値)である。そして、この補正量で補正した位置がピント補正位置である。このピント補正位置を最終的な合焦位置とする。   This lens movement amount is a focus correction amount (BP correction value) mainly resulting from the optical characteristics of the photographing lens. The position corrected with this correction amount is the focus correction position. This focus correction position is taken as the final focus position.

このようにしてBP補正値を求め、最終的な合焦位置へフォーカスレンズ群3を移動する。   In this way, the BP correction value is obtained, and the focus lens group 3 is moved to the final focus position.

その後、ステップS1111において、ズームポジション、AF枠中心座標の像高、絞り値等の環境が異なる場合のBP補正値を計算するための補間係数を求める。この係数を求める動作の手順を、図12を用いて説明する。   Thereafter, in step S1111, an interpolation coefficient for calculating a BP correction value in a case where environments such as the zoom position, the image height of the AF frame center coordinates, and the aperture value are different is obtained. The procedure for obtaining this coefficient will be described with reference to FIG.

ステップS1201において、CPU15は、撮影環境を読み込む。ここでは、撮影前のAF処理を実行した際のズームポジション、AF枠中心座標の像高、絞り値、鏡筒温度、周囲温度、カメラの姿勢を撮影環境として読みこむ。   In step S1201, the CPU 15 reads the shooting environment. Here, the zoom position, the image height of the AF frame center coordinates, the aperture value, the lens barrel temperature, the ambient temperature, and the camera posture when the AF process before shooting is executed are read as the shooting environment.

次いでステップS1202において、CPU15は、ステップS1110までの処理で求められたBP補正値を、上記撮影環境におけるBP補正値として読みこむ。   Next, in step S1202, the CPU 15 reads the BP correction value obtained in the processing up to step S1110 as the BP correction value in the shooting environment.

そしてステップS1203において、CPU15は、今回読み込んだ撮影環境(現在の撮影環境)がEEPROM25からに記録された過去の撮影環境と略等しいかを判定する。この判定方法は、ステップS21と同じであり、詳細な内容に関しては後述する。   In step S1203, the CPU 15 determines whether the currently read shooting environment (current shooting environment) is substantially equal to the past shooting environment recorded from the EEPROM 25. This determination method is the same as step S21, and detailed contents will be described later.

現在の撮影環境が記録された撮影環境と略等しいと判定された場合はステップS1204へ進み、EEPROM25を参照してその環境に対応したBP補正値に更新する。   If it is determined that the current shooting environment is substantially equal to the recorded shooting environment, the process advances to step S1204 to update the BP correction value corresponding to the environment with reference to the EEPROM 25.

このBP補正値の設定方法は、上記の方法とは異なる方法であってもよい。例えば、記録されているBP補正値を数分の一にし、新たなBP補正値との加重平均値を求めその値に置き換えても良い。   This BP correction value setting method may be a method different from the above method. For example, the recorded BP correction value may be reduced to a fraction, and a weighted average value with a new BP correction value may be obtained and replaced with that value.

CPU15は、略等しい撮影環境でのBP補正値が記録されていないと判定された場合はステップS1205へ進み、BP補正値を撮影環境とともに記録する。   If it is determined that the BP correction value in the substantially equal shooting environment is not recorded, the CPU 15 proceeds to step S1205 and records the BP correction value together with the shooting environment.

その後ステップS1206において、CPU15は、像高方向のBP補正値の補間計算が可能か判定する。   Thereafter, in step S1206, the CPU 15 determines whether interpolation calculation of the BP correction value in the image height direction is possible.

これは略等しい撮影環境において、AF枠が設定される最も外側の位置画面中央の位置およびその中間の位置でBP補正値の算出が行われていれば補間計算が可能と判断する。すなわち、所定の撮影環境で図13(A)もしくは図13(B)に示すような9点のBP補正値が記録されていれば、像高方向のBP補正値の補間計算が可能と判断する。所定の撮影環境とは、例えば同じズームポジション、同じ絞り値、略等しい鏡筒温度(例えば常温に対して±10℃以内)、略等しい周囲温度(例えば常温に対して±10℃以内)、略等しいカメラの姿勢(例えば水平に対して±30°以内)である。これらの例示した数値は、撮影レンズ鏡筒100の特性等によって変化する。   This is determined to be that interpolation calculation is possible if the BP correction value is calculated at the center position of the outermost position screen where the AF frame is set and the intermediate position in an approximately equal shooting environment. That is, if nine BP correction values as shown in FIG. 13A or 13B are recorded in a predetermined shooting environment, it is determined that interpolation calculation of the BP correction values in the image height direction is possible. . The predetermined shooting environment includes, for example, the same zoom position, the same aperture value, substantially the same lens barrel temperature (for example, within ± 10 ° C. with respect to normal temperature), substantially the same ambient temperature (for example, within ± 10 ° C. with respect to normal temperature), and approximately Equal camera posture (for example, within ± 30 ° with respect to horizontal). These exemplified numerical values vary depending on characteristics of the taking lens barrel 100 and the like.

図13(A)および図13(B)において点線はAF枠設定可能範囲を表し、この範囲の内側でAF枠が自由に設定される。外周付近の十字で示した図形の中心は、標準的な大きさのAF枠を点線の範囲に接するように設定した場合のAF枠の中心座標を示している。   In FIG. 13A and FIG. 13B, the dotted line represents the AF frame setting range, and the AF frame is freely set within this range. The center of the figure indicated by a cross near the outer periphery indicates the center coordinates of the AF frame when an AF frame having a standard size is set to be in contact with the dotted line range.

中央の十字は画面中心のAF枠を表し、その交点が中心座標である。中間の座標に配された4つの十字は、像高方向のBP補正値の補間計算を行う際に使用するBP補正値を取得する座標を表している。   The center cross represents the AF frame at the center of the screen, and the intersection is the center coordinate. Four crosses arranged at intermediate coordinates represent coordinates for acquiring a BP correction value used when performing interpolation calculation of the BP correction value in the image height direction.

ステップS1206において像高方向のBP補正値の補間計算が可能と判定された場合、CPU15は、ステップS1207で補間計算を行ってBP補正値を計算するための係数を作成し記録する。以後は同じ撮影環境において、記録されている計算係数からBP補正値を算出し、RFAF処理を用いたBP補正値の算出は行わない。   If it is determined in step S1206 that interpolation calculation of the BP correction value in the image height direction is possible, the CPU 15 performs interpolation calculation in step S1207 to create and record a coefficient for calculating the BP correction value. Thereafter, in the same shooting environment, the BP correction value is calculated from the recorded calculation coefficient, and the BP correction value is not calculated using the RFAF process.

ステップS1207におけるBP補正値の補間計算は以下の様に行われる。   The interpolation calculation of the BP correction value in step S1207 is performed as follows.

図13(A)の示す9点でBP補正値が取得されている場合、CPU15は、水平方向に直線状に並ぶ5点を用いて、水平方向の像高に対するBP補正値を二次関数に近似する。同様に、CPU15は、垂直方向に直線状に並ぶ5点を用いて、垂直方向の像高に対するBP補正値を二次関数に近似する。そして、CPU15は、近似された二次関数の係数をEEPROM25の所定の領域に記録する。   When the BP correction values are acquired at the nine points shown in FIG. 13A, the CPU 15 uses the five points arranged in a line in the horizontal direction as a quadratic function for the BP correction value for the image height in the horizontal direction. Approximate. Similarly, the CPU 15 approximates the BP correction value for the image height in the vertical direction to a quadratic function using five points arranged in a straight line in the vertical direction. Then, the CPU 15 records the approximated quadratic function coefficient in a predetermined area of the EEPROM 25.

また、記録されているBP補正値の補間係数を参照してその像高におけるBP補正値を求める場合、CPU15は、まず水平方向のBP補正値を求めた後に垂直方向のBP補正値を求め、これら2つの近似された二次関数の値から像高方向のBP補正値を求める。   When obtaining the BP correction value at the image height with reference to the recorded interpolation coefficient of the BP correction value, the CPU 15 first obtains the horizontal BP correction value and then obtains the vertical BP correction value. A BP correction value in the image height direction is obtained from the values of these two approximated quadratic functions.

例えば、任意の像高(x,y)における水平方向のBP補正量BPhと垂直方向のBP補正量BPvが以下の二次関数で表される場合を考える。
BPh=ah・x + bh・x + ch
BPv=av・x + bv・x + cv
この場合、像高方向のBP補正値BPzは、以下のようになる。
BPz=√(BPh+BPv
ステップS1206において、CPU15は、像高方向のBP補正値の補間計算が不可能と判定された場合はステップS1212へ処理を進める。
For example, consider a case where a horizontal BP correction amount BPh and a vertical BP correction amount BPv at an arbitrary image height (x, y) are expressed by the following quadratic function.
BPh = ah · x 2 + bh · x + ch
BPv = av · x 2 + bv · x + cv
In this case, the BP correction value BPz in the image height direction is as follows.
BPz = √ (BPh 2 + BPv 2 )
If it is determined in step S1206 that interpolation calculation of the BP correction value in the image height direction is impossible, the CPU 15 advances the process to step S1212.

ステップS1208では、CPU15は、絞り値によるBP補正値の補間計算を行うことができるか判定する。例えば、絞り4の絞り値が開放の場合と絞り値がF8の場合とその中間絞りの場合の像高方向のBP補正値の補間計算の係数が求められていれば、絞り値による補間計算を行うことができると判定する。ただし、開放F値が5.6以上のレンズに関しては、絞り値が開放F値の場合と絞り値がF8の場合の像高方向のBP補正値の補間計算の係数が求められていれば、絞り値による補間計算を行うことができると判定する。開放F値がF8以上のレンズに関しては、絞り値が開放F値の場合の像高方向のBP補正値の補間計算の係数が求められていれば、絞り値による補間計算を行うことができると判定する。   In step S1208, the CPU 15 determines whether interpolation calculation of the BP correction value based on the aperture value can be performed. For example, if the coefficient for interpolation calculation of the BP correction value in the image height direction is obtained when the aperture value of the aperture 4 is full, when the aperture value is F8, and when the aperture value is an intermediate aperture, interpolation calculation based on the aperture value is performed. Determine that it can be done. However, for a lens with an open F value of 5.6 or more, if the coefficient for interpolation calculation of the BP correction value in the image height direction when the aperture value is the open F value and when the aperture value is F8 is obtained, It is determined that interpolation calculation based on the aperture value can be performed. For a lens with an open F value of F8 or more, if the coefficient for interpolation calculation of the BP correction value in the image height direction when the aperture value is the open F value is obtained, interpolation calculation by the aperture value can be performed. judge.

ステップS1208において絞り値によるBP補正値の補間計算が可能と判定された場合、CPU15は、ステップS1209で補間計算を行い、BP補正値を計算するための係数を作成し記録する。以後は同じ撮影環境において、記録されている計算係数からBP補正値を算出し、RFAF処理回路31を用いたBP補正値の算出は行わない。   If it is determined in step S1208 that interpolation calculation of the BP correction value based on the aperture value is possible, the CPU 15 performs interpolation calculation in step S1209, and creates and records a coefficient for calculating the BP correction value. Thereafter, in the same shooting environment, the BP correction value is calculated from the recorded calculation coefficient, and the BP correction value is not calculated using the RFAF processing circuit 31.

ステップS1208において絞り値のBP補正値の補間計算が不可能と判定された場合、CPU15はステップS1212へ処理を進める。   If it is determined in step S1208 that interpolation calculation of the BP correction value of the aperture value is impossible, the CPU 15 advances the process to step S1212.

ステップS1209におけるBP補正値の補間計算は以下の様に行われる。   The interpolation calculation of the BP correction value in step S1209 is performed as follows.

係数算出のために3つの絞り値でのBP補正値が必要な場合、その3つの値から近似する二次関数を求め、その二次関数の係数をEEPROM25の所定の領域に記録する。この係数は、二次ラグランジェ補間多項式を用いて求めることができる。この際、3つの絞り値でのBP補正値として、図13(A)および図13(B)に示す9つのAF枠位置の値の平均値を用いる。   When BP correction values at three aperture values are required for coefficient calculation, a quadratic function approximated from the three values is obtained, and the coefficient of the quadratic function is recorded in a predetermined area of the EEPROM 25. This coefficient can be obtained using a second order Lagrangian interpolation polynomial. At this time, the average value of the nine AF frame position values shown in FIGS. 13A and 13B is used as the BP correction value at the three aperture values.

例えば、開放F値がF2.8、F3.5、F4.0のレンズ場合は、開放F値、F5.6、F8.0でのBP補正値から二次関数の係数を求める。開放F値がF1.2やF1.4の場合は、開放F値、F2.8、F8.0でのBP補正値から、開放F値がF1.8やF2.0の場合は開放F値、F4.0、F8.0でのBP補正値から二次関数の係数を求める。   For example, in the case of a lens with an open F value of F2.8, F3.5, and F4.0, a coefficient of a quadratic function is obtained from the open F value, the BP correction value at F5.6, and F8.0. When the open F value is F1.2 or F1.4, from the open F value, the BP correction value at F2.8 or F8.0, and when the open F value is F1.8 or F2.0, the open F value , F4.0, and F8.0, the coefficient of the quadratic function is obtained from the BP correction value.

また、開放F値がF5.6以上F8.0未満の場合は開放F値およびF8.0でのBP補正値から一次関数の係数を求め、その一次関数の係数をEEPROM25の所定の領域に記録する。この係数は一次ラグランジェ補間多項式を用いて求めることができる。   If the open F value is F5.6 or more and less than F8.0, the coefficient of the linear function is obtained from the open F value and the BP correction value at F8.0, and the coefficient of the linear function is recorded in a predetermined area of the EEPROM 25. To do. This coefficient can be determined using a first order Lagrangian interpolation polynomial.

そして開放F値がF8.0以上の場合は、開放F値(F8.0)でのBP補正値を全ての絞り値におけるBP補正値としてEEPROM25の所定の領域に記録する。   When the open F value is F8.0 or more, the BP correction value at the open F value (F8.0) is recorded in a predetermined area of the EEPROM 25 as the BP correction value for all aperture values.

また、記録されているBP補正値の補間係数を参照して、その絞り値におけるBP補正値を以下の方法により求める。   Further, referring to the interpolation coefficient of the recorded BP correction value, the BP correction value at the aperture value is obtained by the following method.

BP補正値を求めようとする絞り値に最も近い絞り値のBP補正値BPzを、先に説明した方法で求める。そして、BP補正値を求めようとする絞り値(F値)をFz、BP補正値BPzを与える絞り値(F値)をFoとするとき、絞りで補間計算したBP補正値BPz(av adj)を、以下の式(4)で求める。
BPz(av adj)=BPz×{Fzおける計算値}÷{Foおける計算値} (4)
ただし、{Fzおける計算値}は、Fzについて、先に求められた絞りによってBP補正値を補間するための係数を用いて求められた二次式また一次式における計算値とする。{Foおける計算値}は、Foについて、先に求められた絞りによってBP補正値を補間するための係数を用いて求められた二次式また一次式における計算値とする。
The BP correction value BPz of the aperture value closest to the aperture value for which the BP correction value is to be obtained is obtained by the method described above. When the aperture value (F value) for which the BP correction value is to be obtained is Fz, and the aperture value (F value) that gives the BP correction value BPz is Fo, the BP correction value BPz (av adj) calculated by the aperture is calculated. Is obtained by the following equation (4).
BPz (av adj) = BPz × {calculated value in Fz} ÷ {calculated value in Fo} (4)
However, {calculated value in Fz} is a calculated value in a quadratic expression or a primary expression obtained by using a coefficient for interpolating a BP correction value with the previously obtained aperture for Fz. {Calculated value in Fo} is a calculated value in a quadratic or linear expression obtained using a coefficient for interpolating a BP correction value with the previously obtained aperture.

なお、求めようとする絞り値FzがF8.0以上の場合は絞り値F8.0の場合のBP補正値BPzをBPz(av adj)とする。   When the aperture value Fz to be obtained is F8.0 or more, the BP correction value BPz when the aperture value is F8.0 is set to BPz (av adj).

CPU15は、ステップS1209で補間計算を行ってBP補正値を計算するための係数を作成し記録すると、ステップS1210においてズームポジションによるBP補正値の補間計算が可能か判定する。   When the CPU 15 performs interpolation calculation in step S1209 to create and record a coefficient for calculating the BP correction value, the CPU 15 determines in step S1210 whether interpolation calculation of the BP correction value based on the zoom position is possible.

本実施例では、ズームポジションがWide端、中間のズームポジション、Tele端において、像高方向及び絞り値によるBP補正値の補間計算の係数が求められていれば、ズームポジションによる補間計算を行うことができると判定する。   In this embodiment, if the coefficient for interpolation calculation of the BP correction value by the image height direction and the aperture value is obtained at the zoom position at the Wide end, the intermediate zoom position, and the Tele end, the interpolation calculation by the zoom position is performed. It is determined that you can.

ステップS1210においてズームポジションによるBP補正値の補間計算が可能と判定された場合、CPU15は、ステップS1211で補間計算を行ってBP補正値を計算するための係数を作成し記録する。以後は同じ撮影環境においては、記録されている計算係数からBP補正値を算出し、RFAF処理を用いたBP補正値の算出は行わない。   If it is determined in step S1210 that interpolation calculation of the BP correction value based on the zoom position is possible, the CPU 15 performs interpolation calculation in step S1211 to create and record a coefficient for calculating the BP correction value. Thereafter, in the same shooting environment, the BP correction value is calculated from the recorded calculation coefficient, and the BP correction value is not calculated using the RFAF process.

ステップS1211におけるBP補正値の補間計算は以下の様に行われる。   The interpolation calculation of the BP correction value in step S1211 is performed as follows.

係数算出のためのWide端、中間のズームポジション、Tele端において、3つのBP補正値から近似する二次関数を求め、その二次関数の係数をEEPROM25の所定の領域に記録する。この係数は、二次ラグランジェ補間多項式を用いて求めることができる。この際、3つのズームポジションでのBP補正値として、それぞれのズームポジションにおける像高および絞り値全てでの平均値を用いる。像高に関しては図13(A)および図13(B)に示す9つのAF枠位置の値を、絞り値に関しては開放〜F8の値を(例えば、開放F値がF2.8、F3.5、F4.0のレンズ場合は、開放F値、F5.6、F8.0での値)を平均した値を用いる。   A quadratic function approximated from three BP correction values is obtained at the Wide end, intermediate zoom position, and Tele end for coefficient calculation, and the coefficient of the quadratic function is recorded in a predetermined area of the EEPROM 25. This coefficient can be obtained using a second order Lagrangian interpolation polynomial. At this time, as the BP correction values at the three zoom positions, the average values at all the image heights and aperture values at the respective zoom positions are used. For the image height, the values of the nine AF frame positions shown in FIGS. 13A and 13B, and for the aperture value, the values of the open to F8 are set (for example, the open F value is F2.8, F3.5). In the case of a lens of F4.0, the average value of the open F value, the values at F5.6, F8.0) is used.

また、そのズームポジションにおけるBP補正値は、記録されているBP補正値の補間係数を参照して以下のように求める。   The BP correction value at the zoom position is obtained as follows with reference to the interpolation coefficient of the recorded BP correction value.

BP補正値を求めようとするズームポジションの3つのうちで最も近いズームポジションにおいて、BP補正値を求めようとする絞り値に最も近い絞り値のBP補正値BPzを、先に説明した方法で求める。そして、最も近いズームポジションにおけるBP補正値を求めようとする絞り値(F値)FzのBP補正値BPz(av adj)を式(4)に従って求める。   The BP correction value BPz of the aperture value closest to the aperture value for which the BP correction value is to be obtained at the closest zoom position among the three zoom positions for which the BP correction value is to be obtained is obtained by the method described above. . Then, the BP correction value BPz (av adj) of the aperture value (F value) Fz for which the BP correction value at the closest zoom position is to be obtained is obtained according to the equation (4).

また、BP補正値を求めようとするズームポジションZzにおけるBP補正値BPz(av adj,zm adj)を以下の式により求める。   Further, the BP correction value BPz (av adj, zm adj) at the zoom position Zz for which the BP correction value is to be obtained is obtained by the following expression.

BPz(av adj,zm adj) =BPz(av adj,zm adj)×{Zzおける計算値}÷{Zoおける計算値}
ただし、{Zzおける計算値}は、BP補正値を求めようとするズームポジションZzについて、先に求められたズームポジションによってBP補正値を補間するための係数を用いて求められた二次式における計算値である。{Zoおける計算値}は、BP補正値BPzを与える絞り値(F値)FoFzについて、先に求められた絞りによってBP補正値を補間するための係数を用いて求められた二次式また一次式における計算値である。
BPz (av adj, zm adj) = BPz (av adj, zm adj) × {calculated value in Zz} ÷ {calculated value in Zo}
However, {calculated value in Zz} is a quadratic expression obtained using a coefficient for interpolating the BP correction value by the previously obtained zoom position for the zoom position Zz for which the BP correction value is to be obtained. It is a calculated value. {Calculated value in Zo} is a quadratic or linear expression obtained by using a coefficient for interpolating the BP correction value with the previously obtained diaphragm for the diaphragm value (F value) FoFz giving the BP correction value BPz. Calculated value in the formula.

このようにして、任意の像高、絞り値(F値)Fz、ズームポジションZzにおけるBP補正値BPz(av adj,zm adj)が求まる。   In this way, an arbitrary image height, aperture value (F value) Fz, and BP correction value BPz (av adj, zm adj) at the zoom position Zz are obtained.

CPU15は、ステップS1211で補間計算を行ってBP補正値を計算するための係数を作成し記録すると、ステップS1213において温度補正係数を算出できるか否かを判定する。ステップS1210において絞り値のBP補正値の補間計算が不可能と判定された場合も同様である。   When the CPU 15 performs interpolation calculation in step S1211, and creates and records a coefficient for calculating the BP correction value, the CPU 15 determines in step S1213 whether the temperature correction coefficient can be calculated. The same applies to the case where it is determined in step S1210 that interpolation calculation of the BP correction value of the aperture value is impossible.

温度補正係数は、周囲温度ごとおよびズームポジションごとに鏡筒温度をパラメータとしてBP補正量を二次関数によって補間するものである。そのため、鏡筒温度が常温範囲(例えば10℃〜50℃)において略等しい周囲温度(例えば±2℃以内)で適当な間隔(例えば10℃以上の間隔)をあけて、BP補正値の算出を行う場合に、そのズームポジションにおいてBP補正値の温度補間が可能と判断する。温度補間が可能と判断された場合、CPU15は、ステップS1213において温度補正係数の算出を行う。   The temperature correction coefficient interpolates the BP correction amount by a quadratic function with the lens barrel temperature as a parameter for each ambient temperature and each zoom position. For this reason, calculation of the BP correction value is performed with an appropriate interval (for example, an interval of 10 ° C. or more) at an ambient temperature (for example, within ± 2 ° C.) that is substantially equal in the normal temperature range (for example, 10 ° C. to 50 ° C.). When performing, it is determined that temperature interpolation of the BP correction value is possible at the zoom position. When it is determined that temperature interpolation is possible, the CPU 15 calculates a temperature correction coefficient in step S1213.

例えば、ズームポジションWideにおいて、周囲温度20℃で鏡筒温度23℃のときと、周囲温度18℃で鏡筒温度35℃のときと、周囲温度22℃で鏡筒温度45℃のときで、絞り値が開放であり、像高について中央のBP補正値が算出されていた場合を考える。これら3つの鏡筒温度におけるBP補正値から二次関数を求め、求められた二次関数を周囲温度20℃(周囲温度20℃、、18℃、22℃の平均)における補間関数とし、その二次関数の係数(補間係数)をEEPROM25の所定の領域に記録する。この係数は、二次ラグランジェ補間多項式を用いて求めることができる。   For example, in the zoom position Wide, when the ambient temperature is 20 ° C. and the lens barrel temperature is 23 ° C., the ambient temperature is 18 ° C. and the lens barrel temperature is 35 ° C., and the ambient temperature is 22 ° C. and the lens barrel temperature is 45 ° C. Consider a case where the value is open and the central BP correction value is calculated for the image height. A quadratic function is obtained from the BP correction values at these three lens barrel temperatures, and the obtained quadratic function is set as an interpolation function at an ambient temperature of 20 ° C. (average of ambient temperatures of 20 ° C., 18 ° C., and 22 ° C.). The coefficient of the next function (interpolation coefficient) is recorded in a predetermined area of the EEPROM 25. This coefficient can be obtained using a second order Lagrangian interpolation polynomial.

また、3つの鏡筒温度で同じ周辺像高のBP補正値が算出されていたならば、その平均値を用いて補間係数を求めても良い。   If the BP correction value for the same peripheral image height is calculated at three lens barrel temperatures, the interpolation coefficient may be obtained using the average value.

他の周囲温度に関しても同様にその補間係数を求め、求めていない周囲温度に関しては隣接する2つの周囲温度の係数から一次補間によって求める。   The interpolation coefficient is similarly obtained for other ambient temperatures, and the ambient temperature that is not obtained is obtained by linear interpolation from the coefficients of two adjacent ambient temperatures.

絞り値に関しても同様に絞り値ごとに補間係数を求め、求めていない絞り値に関しては隣接する二つの絞り値の係数から一次補間によって求める。ただし、小絞り側はF8.0以上ではF8.0の補正係数を用いる。   Similarly, with respect to the aperture value, an interpolation coefficient is obtained for each aperture value, and an aperture value that has not been obtained is obtained by linear interpolation from the coefficients of two adjacent aperture values. However, a correction coefficient of F8.0 is used on the small aperture side at F8.0 or more.

鏡筒温度が所定温度より高温又は低温の場合は、所定温度の補間係数をすることとしてもよいし、補間しないようにしても良い。   When the lens barrel temperature is higher or lower than the predetermined temperature, an interpolation coefficient for the predetermined temperature may be calculated or may not be interpolated.

このようにして求めた温度補間係数による補間は、像高補間、絞り値補間、ズーム補間によって求められたBP補正値に対して行う。   The interpolation using the temperature interpolation coefficient thus obtained is performed on the BP correction value obtained by image height interpolation, aperture value interpolation, and zoom interpolation.

CPU15は、ステップS1213で補間計算を行ってBP補正値を計算するための係数を作成し記録すると、ステップS1214において姿勢差補正係数を算出できるか否かを判定する。ステップS1212において温度補正係数が算出できないと判定された場合も同様である。姿勢差補正係数とは、姿勢差(例えば仰角)をパラメータとする補間係数を意味する。   When the CPU 15 performs interpolation calculation in step S1213 to create and record a coefficient for calculating the BP correction value, the CPU 15 determines whether or not the attitude difference correction coefficient can be calculated in step S1214. The same applies when it is determined in step S1212 that the temperature correction coefficient cannot be calculated. The attitude difference correction coefficient means an interpolation coefficient using an attitude difference (for example, an elevation angle) as a parameter.

ここで、所定の3つの仰角(例えば、仰角+45度、0度(水平)、−45度(俯角+45度))のBP補正量がその他の撮影環境が略等しい環境において算出されている場合に、姿勢差補正係数を算出可能と判断する。   Here, when the BP correction amounts of three predetermined elevation angles (for example, elevation angle +45 degrees, 0 degrees (horizontal), −45 degrees (decline angle +45 degrees)) are calculated in an environment where the other photographing environments are substantially equal. Then, it is determined that the attitude difference correction coefficient can be calculated.

姿勢差補正係数が算出可能と判断された場合、CPU15は、ステップS1215において上述の姿勢差補正係数の算出を行う。   If it is determined that the posture difference correction coefficient can be calculated, the CPU 15 calculates the posture difference correction coefficient described above in step S1215.

例えば、ズームポジションWideにおいて、3つの仰角に関して、絞り値が開放であり、像高について中央のBP補正値が算出されていた場合を考える。これら3つの仰角におけるBP補正値から二次関数を求め、求められた二次関数を補間関数とし、その二次関数の係数をEEPROM25の所定の領域に記録する。この係数は、二次ラグランジェ補間多項式を持ちれば求めることができる。所定の仰角より上向き、下向きより場合は、所定の仰角の補間係数を用いる。   For example, consider a case where the aperture value is open for three elevation angles and the central BP correction value is calculated for the image height at the zoom position Wide. A quadratic function is obtained from the BP correction values at these three elevation angles, the obtained quadratic function is used as an interpolation function, and the coefficient of the quadratic function is recorded in a predetermined area of the EEPROM 25. This coefficient can be obtained if it has a second order Lagrangian interpolation polynomial. In the case of upward and downward from a predetermined elevation angle, an interpolation coefficient for the predetermined elevation angle is used.

また、絞り値に関しても同様に絞り値ごとに補間係数を求め、求めていない絞り値に関しては隣接する二つの絞り値の係数から一次補間によって求める。ただし、小絞り側はF8.0以上ではF8.0の補正係数を用いる。   Similarly, for the aperture value, an interpolation coefficient is obtained for each aperture value, and for the aperture value that is not obtained, primary interpolation is obtained from the coefficients of two adjacent aperture values. However, a correction coefficient of F8.0 is used on the small aperture side at F8.0 or more.

このようにして求められた姿勢差補正係数による補間は、像高補間、絞り値補間、ズーム補間によって求められたBP補正値に対して行う。仰角の検出精度が高くない場合などは±5度以内は仰角0度とする等、仰角検出精度に合わせて、分解能を粗くしても良い。   The interpolation using the posture difference correction coefficient obtained in this way is performed on the BP correction value obtained by image height interpolation, aperture value interpolation, and zoom interpolation. When the detection accuracy of the elevation angle is not high, the resolution may be coarsened according to the detection accuracy of the elevation angle, for example, the elevation angle is 0 degree within ± 5 degrees.

CPU15は、ステップS1215で補間計算を行ってBP補正値を計算するための係数を作成し記録すると、図12のフローを終了する。ステップS1214において姿勢差補正係数が算出できないと判定された場合も同様である。   When the CPU 15 performs interpolation calculation in step S1215 to create and record a coefficient for calculating the BP correction value, the flow of FIG. 12 ends. The same applies when it is determined in step S1214 that the attitude difference correction coefficient cannot be calculated.

補間によって求められた値を用いるのは、測定計算されていないパラメータ(像高、ズームポジション、絞り値)におけるもののみである。ステップS13のRFAF処理において求められたBP補正値が補間によって求められた値と異なる場合は、測定記録されたBP補正値を用いる。   The values obtained by interpolation are used only for parameters not measured and calculated (image height, zoom position, aperture value). If the BP correction value obtained in the RFAF process in step S13 is different from the value obtained by interpolation, the measured and recorded BP correction value is used.

また、BP補正値と撮影環境を記録する領域の容量が不足した場合は、古いものから順次消去していく。そして、BP補正値算出から一定期間(所定時間)が経過した場合は、再度RFAF処理を行ってBP補正値を求める。   When the capacity of the area for recording the BP correction value and the shooting environment is insufficient, the oldest one is deleted sequentially. When a certain period (predetermined time) has elapsed since the BP correction value calculation, the RFAF process is performed again to obtain the BP correction value.

次に、図14を用いて、BP補正値が算出済みか否かを判定する方法について説明する。   Next, a method for determining whether or not a BP correction value has been calculated will be described with reference to FIG.

まず、ステップS1401において、CPU15は、BP補正値を算出する際の撮影環境(現在の撮影環境)を読みこむ。次に、ステップS1402においてCPU15は、EEPROM25に記録されている過去のBP補正値算出時の撮影環境を読み込み、ステップS1403へ進む。   First, in step S1401, the CPU 15 reads a shooting environment (current shooting environment) for calculating a BP correction value. Next, in step S1402, the CPU 15 reads the shooting environment at the time of calculating the past BP correction value recorded in the EEPROM 25, and proceeds to step S1403.

ステップS1403において、CPU15は、BP補正値を算出した際のズームポジションと同じズームポジションで過去にBP補正値算出が行われたかを判定し、行われていたならばステップS1404へ、行われていなければステップS1410へ進む。   In step S1403, the CPU 15 determines whether the BP correction value has been calculated in the past at the same zoom position as the BP correction value, and if so, the process must proceed to step S1404. If yes, the process proceeds to step S1410.

ステップS1404において、CPU15は、BP補正値を算出した際の絞り値と略等しい絞り値で過去にBP補正値算出が行われたかを判定し、行われていたならばステップS1405へ、行われていなければステップS1410へ進む。   In step S1404, the CPU 15 determines whether BP correction value calculation has been performed in the past with an aperture value substantially equal to the aperture value at the time of calculating the BP correction value. If it has been performed, the process proceeds to step S1405. If not, the process proceeds to step S1410.

このとき、絞り値に差が所定値以内であれば略等しい絞りで過去にBP補正値算出が行われたと判定する。ここで、絞り値が小さく明るい絞り値ほど、絞り値の変化によるBP補正値の変化の度合いが大きい。そのため、BP補正値を算出した際の絞り値が小さいときは、略等しいと判定する所定値の範囲は小さくなる。例えば、F1.8以下で0.1段以内、F1.8超〜F2.8以下で0.2段以内、F2.8超〜F4.0以下で0.3段以内、F4.0超〜F5.6以下で0.5段以内、F8.0超で0.7段以内の範囲であれば、絞り値が過去のものと略等しいと判定する。   At this time, if the difference between the aperture values is within a predetermined value, it is determined that the BP correction value has been calculated in the past with substantially the same aperture. Here, the smaller the aperture value is, the brighter the aperture value, the greater the degree of change in the BP correction value due to the change in aperture value. For this reason, when the aperture value when the BP correction value is calculated is small, the range of the predetermined value that is determined to be substantially equal is small. For example, F1.8 or less, within 0.1 stage, F1.8 or more to F2.8 or less, within 0.2 stage, F2.8 or more and F4.0 or less, within 0.3 stage, F4.0 or more, If it is within the range of 0.5 or less at F5.6 or less and within 0.7 or more than F8.0, it is determined that the aperture value is substantially equal to the past value.

ステップS1405において、CPU15は、BP補正値を算出した際の像高と略等しい像高で過去にBP補正値算出が行われたかを判定し、行われていたならばステップS1406へ、行われていなければステップS1410へ進む。   In step S1405, the CPU 15 determines whether the BP correction value has been calculated in the past at an image height substantially equal to the image height at the time of calculating the BP correction value, and if it has been performed, the process proceeds to step S1406. If not, the process proceeds to step S1410.

このとき、AF枠の中心座標の差が所定値以内であれば略等しい像高で過去にBP補正値算出が行われたと判定する。中心から離れ、像高が高くなるほど、像高の変化によるBP補正値の変化の度合いが大きくなる。そのため、BP補正値を算出したAF枠の中心座標の像高が高いほど略等しいと判定するする所定値の範囲は小さくなる。例えば、像高が3割以下では対角方向のセンサー長の5%以内、像高が3割超5割以下では対角方向のセンサー長の3%以内の範囲であれば、像高が過去のものと略等しいと判定する。また、像高が5割超8割以下では対角方向のセンサー長の2%以内、像高が8割超では対角方向のセンサー長の1%以内の範囲であれば、像高が過去のものと略等しいと判定する。   At this time, if the difference between the center coordinates of the AF frames is within a predetermined value, it is determined that the BP correction value has been calculated in the past with a substantially equal image height. The further away from the center and the higher the image height, the greater the degree of change in the BP correction value due to the change in image height. For this reason, the higher the image height of the center coordinate of the AF frame for which the BP correction value is calculated, the smaller the range of predetermined values that are determined to be substantially equal. For example, if the image height is 30% or less, the image height is within 5% of the diagonal sensor length. If the image height is more than 30% and less than 50%, the image height is in the past within 3% of the diagonal sensor length. Judged to be approximately equal to Also, if the image height is more than 50% and less than 80%, it is within 2% of the diagonal sensor length. If the image height is more than 80%, it is within 1% of the diagonal sensor length. Judged to be approximately equal to

ステップS1406において、CPU15は、BP補正値を算出した際の周囲温度と略等しい周囲温度で過去にBP補正値算出が行われたかを判定し、行われていたならばステップS1407へ、行われていなければステップS1410へ進む。   In step S1406, the CPU 15 determines whether the BP correction value has been calculated in the past at an ambient temperature that is substantially equal to the ambient temperature when the BP correction value was calculated, and if it has been performed, the process proceeds to step S1407. If not, the process proceeds to step S1410.

このとき、周囲温度の差が所定温度以内(例えば±2℃以内)であれば略等しい周囲温度で過去にBP補正値算出が行われたと判定する。   At this time, if the difference in ambient temperature is within a predetermined temperature (for example, within ± 2 ° C.), it is determined that the BP correction value has been calculated in the past at substantially the same ambient temperature.

ステップS1407において、CPU15は、BP補正値を算出した際の鏡筒温度と略等しい鏡筒温度で過去にBP補正値算出が行われたかを判定し、行われていたならばステップS1408へ、行われていなければステップS1410へ進む。   In step S1407, the CPU 15 determines whether the BP correction value has been calculated in the past at the lens barrel temperature substantially equal to the lens barrel temperature at which the BP correction value was calculated, and if so, the process proceeds to step S1408. If not, the process proceeds to step S1410.

このとき、鏡筒温度の差が所定温度以内(例えば±5℃以内)であれば略等し鏡筒温度で過去にBP補正値算出が行われたと判定する。   At this time, if the difference in the lens barrel temperature is within a predetermined temperature (for example, within ± 5 ° C.), it is determined that the BP correction value has been calculated in the past at the lens barrel temperature.

ステップS1409において、CPU15は、BP補正値が算出された撮影環境と略等しい撮影環境で過去にBP補正値の算出が行われたと判定する。   In step S1409, the CPU 15 determines that the BP correction value has been calculated in the past in a shooting environment that is substantially equal to the shooting environment in which the BP correction value is calculated.

ステップS1410において、CPU15は、略等しい撮影環境で過去にBP補正値の算出が行われていないと判定する。   In step S1410, the CPU 15 determines that the BP correction value has not been calculated in the past in substantially the same shooting environment.

本実施例において位相差AF用・スキャンAF用・RFAF用の信号を生成する際に、各画素の上に形成されるカラーフィルターの色の違いによる感度差が問題になることがある。本実施例では、これを解決するために、色成分毎に各光源色温度の感度比の逆数に従って感度差を補正する。   In this embodiment, when signals for phase difference AF, scan AF, and RFAF are generated, a difference in sensitivity due to a difference in color of a color filter formed on each pixel may be a problem. In the present embodiment, in order to solve this, the sensitivity difference is corrected according to the reciprocal of the sensitivity ratio of each light source color temperature for each color component.

例えば、赤色のフィルターと青色のフィルターは色温度毎の緑色フィルターに対する補正係数を持つため、その係数を赤色のフィルターと青色のフィルターの画素の出力に掛けて感度差を補正する。この補正係数は、緑色フィルターに対する、赤色のフィルターと青色のフィルターの感度比の逆数となる。補正係数を持たない色温度の関しては、両側の色温度の補正係数から直線補間によってその補正係数を求める。   For example, since the red filter and the blue filter have correction coefficients for the green filter for each color temperature, the sensitivity difference is corrected by multiplying the coefficients of the red filter and the blue filter by the coefficients. This correction coefficient is the reciprocal of the sensitivity ratio of the red and blue filters to the green filter. For a color temperature having no correction coefficient, the correction coefficient is obtained by linear interpolation from the correction coefficients of the color temperatures on both sides.

本実施例では、一つのAF枠が設定されている場合を説明したが、複数のAF枠が設定された場合には、同様の処理をAF枠数分繰り返す。   In this embodiment, the case where one AF frame is set has been described. However, when a plurality of AF frames are set, the same processing is repeated for the number of AF frames.

本実施例ではSW1オン直後に読み出される信号を位相差AF処理に使用する場合を説明したが、ステップS3でLCD表示を行う際に取得した位相差AF用信号を常に記録しておき、SW1直前に取得した信号を位相差AF処理に使用しても良い。   In the present embodiment, the case where the signal read immediately after the switch SW1 is turned on is used for the phase difference AF processing. However, the phase difference AF signal acquired when performing the LCD display in step S3 is always recorded, and the signal immediately before SW1 is recorded. The signal acquired in step (2) may be used for the phase difference AF process.

撮影者により合焦位置検出を行うための画面上に位置(AF点)の選択が行われた場合など、位相差AFを行う領域が画面上の一部に限定されることもある。この場合は、その領域の信号のみを読み出し、位相差AFを行いうための信号の取得時間を短縮しても良いし、その領域の信号のみを読み出し、読み出し終了後に一定期間センサーの駆動を休止することで省電力化を図っても良い。   In some cases, for example, when the position (AF point) is selected on the screen for detecting the in-focus position by the photographer, the region where the phase difference AF is performed may be limited to a part on the screen. In this case, it is possible to read out only the signal in that region and shorten the acquisition time of the signal for performing phase difference AF, or read out only the signal in that region and stop driving the sensor for a certain period after the reading is completed. This may save power.

以上により、表示装置への表示更新レートの高速化による表示品位向上することができ、また、基準画素用と参照画素用のフォトダイオードからの読み出しとを別々に行う行数を減らすことで、読み出しレートを高めAFを高速で行うことができる。   As described above, the display quality can be improved by increasing the display update rate to the display device, and reading can be performed by reducing the number of rows for separately performing reading from the photodiode for the reference pixel and the reference pixel. The rate can be increased and AF can be performed at high speed.

また、本実施例では、表示装置への表示と同時に非加算読み出しされた信号によるAF処理を行い、主に撮影レンズの光学特性が原因で発生するピント補正量を撮影環境において求め記録する。これにより、温度や撮像装置の姿勢などの撮影環境が変化した場合でもその撮影環境に適応したピント補正量を用いることができる。そのため、撮影環境によらずにAFの精度を向上することができる。また、同様の撮影環境においては既に記録されたピント補正量を用いることができるため、AFの高速にすることができる。   Further, in this embodiment, AF processing is performed using a signal that has not been added and read simultaneously with display on the display device, and the focus correction amount that is mainly caused by the optical characteristics of the photographing lens is obtained and recorded in the photographing environment. Thereby, even when the shooting environment such as the temperature or the posture of the imaging apparatus changes, the focus correction amount adapted to the shooting environment can be used. Therefore, AF accuracy can be improved regardless of the shooting environment. Also, since the already recorded focus correction amount can be used in the same shooting environment, it is possible to increase the AF speed.

実施例2は、実施例1に対して、位相差AF処理及びRFAF処理を行うためのイメージセンサー5からの基準画像信号と参照画像信号の並び替えをイメージセンサー5の読み出し回路で行う点等で異なる。また、SW1前に位相差AF処理の結果を用いて略合焦の位置へフォーカスレンズ群3を制御した後に、像修正を行った信号でRFAF処理を行う点等で異なる。   The second embodiment is different from the first embodiment in that the reference image signal and the reference image signal from the image sensor 5 for performing the phase difference AF process and the RFAF process are rearranged by the readout circuit of the image sensor 5. Different. Another difference is that, after the focus lens group 3 is controlled to a substantially in-focus position using the result of the phase difference AF processing before SW1, RFAF processing is performed with a signal that has undergone image correction.

LCD10に表示する画像を得るためのイメージセンサー5からの信号を生成する行と、位相差AF動作を行うためのイメージセンサー5からの基準画像信号と参照画像信号の2組の信号を生成する行とを2行単位で設定する点は、実施例1と共通する。また、LCD10に表示する画像と位相差AF動作を行うための信号を、異なる露光条件で取得し異なる読み出しレートで得られるようにしている点についても実施例1とで共通する。以下の説明において、その他、実施例1と共通する部分については説明を省略する。   A line for generating a signal from the image sensor 5 for obtaining an image to be displayed on the LCD 10 and a line for generating two sets of signals of a reference image signal and a reference image signal from the image sensor 5 for performing a phase difference AF operation. And 2 are set in units of two lines in common with the first embodiment. Further, the embodiment 1 is also common in that the image displayed on the LCD 10 and a signal for performing the phase difference AF operation are obtained under different exposure conditions and obtained at different readout rates. In the following description, description of other parts common to the first embodiment is omitted.

以下、本実施例における動作手順について図15を用いて説明する。   Hereinafter, the operation procedure in the present embodiment will be described with reference to FIG.

まずステップS1501において、CPU15は、RFAF合焦フラグ等の処理に用いる変数の初期化とセンサーモード駆動モードの設定を行う。設定されるセンサー駆動モードは、実施例1のステップS1で設定したものと同じセンサー駆動モードである。   First, in step S1501, the CPU 15 initializes variables used for processing such as an RFAF focusing flag and sets a sensor mode drive mode. The sensor drive mode that is set is the same sensor drive mode that is set in step S1 of the first embodiment.

次にステップS1502において、CPU15は、AE処理を行いイメージセンサー5の露光条件を設定する。露光条件(露光時間)を設定したら、TX信号およびRS信号を図7のように制御する。   In step S1502, the CPU 15 performs AE processing and sets the exposure condition of the image sensor 5. When the exposure condition (exposure time) is set, the TX signal and the RS signal are controlled as shown in FIG.

ステップS1503において、CPU15は、イメージセンサー5により取得した像をLCDに表示する。   In step S1503, the CPU 15 displays the image acquired by the image sensor 5 on the LCD.

ステップS1504において、CPU15は、位相差AF処理を行い概ねの合焦位置を求める。この際、高速の処理を低消費電力で行うためにイメージセンサー5内の回路で基準画像信号と参照画像信号の並び替えを行った後に像補正をすることなく位相差AF処理を行ってデフォーカス量を求める。   In step S1504, the CPU 15 performs phase difference AF processing to obtain an approximate focus position. At this time, in order to perform high-speed processing with low power consumption, the circuit in the image sensor 5 rearranges the standard image signal and the reference image signal, and then performs phase difference AF processing without image correction and defocusing. Find the amount.

次に、ステップS1505において、CPU15は、位相差AFにより合焦されたか否かを判定する。合焦されていると判定した場合はステップS1511に進み、合焦されていないと判定した場合はステップS1506に進む。   Next, in step S1505, the CPU 15 determines whether or not the focus is achieved by the phase difference AF. If it is determined that the subject is in focus, the process proceeds to step S1511. If it is determined that the subject is not in focus, the process proceeds to step S1506.

ステップS1506において、CPU15は、位相差AF処理の結果得られたデフォーカス量Defが所定値NE・Fδ以下となっているか否かを判定する。デフォーカス量Defが、所定値NE・Fδ以下であればステップS1507へ進みRFAF処理を行い、所定値NE・Fδよりも大きければステップS1510へ進む。   In step S1506, the CPU 15 determines whether or not the defocus amount Def obtained as a result of the phase difference AF process is equal to or smaller than a predetermined value NE · Fδ. If the defocus amount Def is less than or equal to the predetermined value NE · Fδ, the process proceeds to step S1507, and RFAF processing is performed. If the defocus amount Def is greater than the predetermined value NE · Fδ, the process proceeds to step S1510.

ステップS1510において、CPU15は、フォーカスレンズ群3をステップS1504で求められたデフォーカス量に相当する分だけ駆動することでその時点での概ねのフォーカス位置(合焦位置)と思われる位置へ移動する。CPU15は、移動が終了するとステップS1511へ処理を進める。   In step S1510, the CPU 15 drives the focus lens group 3 by an amount corresponding to the defocus amount obtained in step S1504, thereby moving to a position that is considered to be the approximate focus position (focus position) at that time. . When the movement is finished, CPU 15 advances the process to step S1511.

ステップS1507において、CPU15は、イメージセンサー5内の回路で基準画像信号と参照画像信号の並び替えを行った信号を像修正した後に、RFAF処理を行ってフォーカス位置を求める。ステップS1508において、CPU15は、ステップS1507でRFAF処理によってフォーカス位置が求められたか否かを判定し、求められた判定した場合はステップS1509へ進み、求められなかったと判定した場合はステップS1511に進む。   In step S1507, the CPU 15 corrects the image obtained by rearranging the standard image signal and the reference image signal in a circuit in the image sensor 5, and then performs RFAF processing to obtain a focus position. In step S1508, the CPU 15 determines whether or not the focus position has been obtained by RFAF processing in step S1507. If it is determined, the process proceeds to step S1509. If it is determined that the focus position has not been determined, the process proceeds to step S1511.

ステップS1509において、CPU15は、求められた合焦位置へフォーカスレンズ群3を駆動した後に合焦フラグをオンにし、ステップS1511へ進む。   In step S1509, the CPU 15 drives the focus lens group 3 to the obtained in-focus position, turns on the in-focus flag, and proceeds to step S1511.

ステップS1511において、CPU15は、操作スイッチ部24の状態を確認する。撮影者によって操作スイッチ部24が操作され、SW1(操作スイッチ部24の第一ストローク)がオン状態になったことを確認するとステップS1512へ進み、SW1のオン状態が確認できなければステップS1502に戻る。   In step S <b> 1511, the CPU 15 confirms the state of the operation switch unit 24. If it is confirmed that the operation switch unit 24 has been operated by the photographer and SW1 (the first stroke of the operation switch unit 24) has been turned on, the process proceeds to step S1512. If the ON state of SW1 cannot be confirmed, the process returns to step S1502. .

ステップS1512において、CPU15は、合焦フラグがオンされているかを判定し、合焦フラグがオンであればステップS1514へ進み、合焦フラグがオフであればステップS1513へ進む。   In step S1512, the CPU 15 determines whether or not the focus flag is on. If the focus flag is on, the process proceeds to step S1514. If the focus flag is off, the process proceeds to step S1513.

ステップS1513において、CPU15は、位相差AF処理及びRFAF処理、及びその結果に基づいたレンズ駆動を行い、ステップS1514へ進む。ここで行われる位相差AF処理及びRFAF処理はイメージセンサー5内の回路で基準画像信号と参照画像信号の並び替えを行う。それ以外は、実施例1の処理と同じである。なお、スキャンAFは行わないためセンサー駆動モードの変更も行わない。   In step S1513, the CPU 15 performs phase difference AF processing, RFAF processing, and lens driving based on the result, and proceeds to step S1514. In the phase difference AF processing and RFAF processing performed here, the circuit in the image sensor 5 rearranges the standard image signal and the reference image signal. Other than that, the processing is the same as that of the first embodiment. Note that since the scan AF is not performed, the sensor drive mode is not changed.

ステップS1514において、CPU15は、位相差AF処理及びRFAF処理の結果として合焦可能と判定すると、AFが完了した旨の表示を行う。合焦可能と判定しない場合にはAFが完了していない旨の表示を行う。   In step S1514, when the CPU 15 determines that focusing is possible as a result of the phase difference AF process and the RFAF process, the CPU 15 displays that AF has been completed. If it is not determined that focusing is possible, a display indicating that AF has not been completed is displayed.

次にステップS1515において、CPU15は、操作スイッチ部24のSW2(第二ストローク)がオン操作されたか否かを判定し、オン操作された場合はステップS1516に進み、オン操作されていない場合はステップS1502へ戻る。   Next, in step S1515, the CPU 15 determines whether or not SW2 (second stroke) of the operation switch unit 24 is turned on. If the switch is turned on, the process proceeds to step S1516. The process returns to S1502.

ステップS1516において、CPU15は、ステップS1502におけるAE処理で設定された露光条件により露光処理を実行し、カメラ1の撮影動作を終了する。   In step S1516, the CPU 15 executes an exposure process under the exposure conditions set in the AE process in step S1502, and ends the photographing operation of the camera 1.

この処理と並行して、CPU15は、ステップS1520において撮影シーンが変化したか判定を行う。シーン変化がないと判定された場合はこの処理を繰り返し、シーン変化があったと判定された場合はステップS1501へ進む。ステップS1501において、CPU15は、それまでの演算結果を初期化し、図15に示す処理のやり直しを行う。   In parallel with this processing, the CPU 15 determines whether or not the shooting scene has changed in step S1520. If it is determined that there is no scene change, this process is repeated. If it is determined that there is a scene change, the process advances to step S1501. In step S1501, the CPU 15 initializes the calculation result so far and performs the processing shown in FIG. 15 again.

次に、ステップS1513で行われる処理のフローについて図17を用いて詳細に説明する。   Next, the flow of processing performed in step S1513 will be described in detail with reference to FIG.

ステップS1801において、CPU15は、位相差AF処理を行う。位相差AF処理は、現在のフォーカスレンズ位置で画像を取得した後に、イメージセンサー5内の回路で並び替えられた基準像信号(A像)と参照像信号(B像)の差分をとる。この際、参照像信号(B像)の画素位置をシフトしながらイメージセンサー5内の掛算器で像修正を行う。そして、A像とB像の差の絶対値から差信号列を作成し、その差信号の積算値が最小になるシフト量とフォーカスに関する敏感度(K値)とからデフォーカス量を演算する。これにより、概ねのフォーカス位置が求まる。ここで求められたデフォーカス量が所定値より大きい場合、CPU15は、再びステップS1801の位相差AF処理を行う。   In step S1801, the CPU 15 performs phase difference AF processing. In the phase difference AF process, after obtaining an image at the current focus lens position, the difference between the reference image signal (A image) and the reference image signal (B image) rearranged by the circuit in the image sensor 5 is obtained. At this time, image correction is performed by a multiplier in the image sensor 5 while shifting the pixel position of the reference image signal (B image). Then, a difference signal sequence is created from the absolute value of the difference between the A image and the B image, and the defocus amount is calculated from the shift amount that minimizes the integrated value of the difference signal and the sensitivity (K value) related to the focus. Thereby, an approximate focus position is obtained. If the defocus amount obtained here is larger than the predetermined value, the CPU 15 performs the phase difference AF process in step S1801 again.

ステップS1801において概ねのフォーカス位置が求まると、CPU15は、ステップS1802においてRFAF処理を開始する。このRFAF処理では、位相差AF処理で求められた合焦位置へフォーカスレンズ群3を移動した後に、そのフォーカスレンズ位置で画像を取得する。そしてイメージセンサー5内の回路で並び替えられた基準像信号(A像)に参照像信号(B像)を加算する。この際、参照像信号(B像)の画素位置をシフトしながらイメージセンサー5内の掛算器で像修正を行う。そして、A像とB像の和から和信号列(加算データ)を作成し、その信号列から合焦度合を示す信号を生成し、合焦度合を示す値が最大となる相対的シフト量を求め、その位置を最終的な合焦位置とする。   When the approximate focus position is obtained in step S1801, the CPU 15 starts RFAF processing in step S1802. In this RFAF process, after the focus lens group 3 is moved to the in-focus position obtained by the phase difference AF process, an image is acquired at the focus lens position. Then, the reference image signal (B image) is added to the reference image signal (A image) rearranged by the circuit in the image sensor 5. At this time, image correction is performed by a multiplier in the image sensor 5 while shifting the pixel position of the reference image signal (B image). Then, a sum signal sequence (addition data) is created from the sum of the A and B images, a signal indicating the focus level is generated from the signal sequence, and the relative shift amount at which the value indicating the focus level is maximized is determined. The position is determined as the final focus position.

このRFAF処理を行いながら、CPU15は、ステップS1803でSW2の状態を確認し、SW2がオン操作されていたならばステップS1804へ進み、SW2がオン操作されていなければステップS1806へ進む。   While performing this RFAF processing, the CPU 15 checks the state of SW2 in step S1803. If SW2 is turned on, the process proceeds to step S1804. If SW2 is not turned on, the process proceeds to step S1806.

ステップS1804において、CPU15は、略等しい撮影環境でBP補正値が算出されているかを判定する。その方法は実施例1と同じである。既に略等しい撮影環境でBP補正値が算出されている場合はステップS1805へ進み、算出されていなければステップS1806へ進む。   In step S1804, the CPU 15 determines whether the BP correction value is calculated in substantially the same shooting environment. The method is the same as in Example 1. If a BP correction value has already been calculated in substantially the same shooting environment, the process proceeds to step S1805, and if not, the process proceeds to step S1806.

ステップS1805において、CPU15は、RFAF処理を中断し、所定の記録領域に記録されている略等しい撮影環境におけるBP補正値を読み出し、ステップS1808へ進む。   In step S1805, the CPU 15 interrupts the RFAF process, reads out the BP correction value in the substantially equal shooting environment recorded in the predetermined recording area, and proceeds to step S1808.

ステップS1806において、CPU15は、そのままRFAF処理を継続する。   In step S1806, the CPU 15 continues the RFAF process as it is.

そしてステップS1807において、CPU15は、RFAF処理が終了したかを判定し、終了していると判定した場合はステップS1808へ進み、終了していないと判定した場合はステップS1803に戻る。   In step S1807, the CPU 15 determines whether or not the RFAF processing has ended. If it is determined that the RFAF processing has ended, the process proceeds to step S1808. If it is determined that the RFAF processing has not ended, the process returns to step S1803.

ステップS1808において、CPU15は、ステップS1805で読み出したBP補正値もしくは、RFAF処理で求められたBP補正値をステップS1801で求められた位相差AF処理の結果に加味した位置へ、フォーカスレンズ群3を駆動する。   In step S1808, the CPU 15 moves the focus lens group 3 to a position where the BP correction value read in step S1805 or the BP correction value obtained in the RFAF process is added to the result of the phase difference AF process obtained in step S1801. To drive.

これにより、SW1オン保持が継続されていればその撮影環境に応じたBP補正量を求め、精度の高い合焦動作が可能になる。また、SW1と同時にSW2がオンされたら場合は、現在の撮影環境と略等しい環境において過去に求められたBP補正値を使用して、高速な合焦動作を行って撮像を行うことができる。   As a result, if SW1 is kept on, the BP correction amount corresponding to the shooting environment is obtained, and a highly accurate focusing operation is possible. When SW2 is turned on simultaneously with SW1, imaging can be performed by performing a high-speed focusing operation using a BP correction value obtained in the past in an environment substantially equal to the current shooting environment.

次に、ステップS1504、ステップS1507、ステップS1513で行われる位相差AF処理およびRFAF処理について、図16(A)および図16(B)を用いてより詳細に説明する。   Next, the phase difference AF process and the RFAF process performed in step S1504, step S1507, and step S1513 will be described in more detail with reference to FIGS. 16 (A) and 16 (B).

AF処理は、イメージセンサー5内の演算回路をCPU15が制御することで行われる。図16(A)は、イメージセンサー5内の演算回路内部の概略図であり、図16(B)は図16(A)に示すバッファ回路/掛算器と演算回路&メモリの内部をより詳細に示した図である。   The AF process is performed by the CPU 15 controlling the arithmetic circuit in the image sensor 5. FIG. 16A is a schematic diagram of the inside of the arithmetic circuit in the image sensor 5, and FIG. 16B is a more detailed view of the inside of the buffer circuit / multiplier and the arithmetic circuit & memory shown in FIG. FIG.

マイクロレンズ1601を通過した被写体の光束は、フォトダイオード1602で光電変換される。図16(A)および図16(B)において「A」と示した画素が基準像信号(A像)を出力し、「B」と示した画素が参照像信号(B像)を出力する。各々の画素から出力された信号は、転送トランジスタ1603を介して、A像は第一転送路1604、B像は第二転送路1605へ伝送される。このように別々の転送路を用いるこことで、A像とB像の分離(並び替え)が容易になる。   The light flux of the subject that has passed through the microlens 1601 is photoelectrically converted by the photodiode 1602. In FIG. 16A and FIG. 16B, the pixel indicated as “A” outputs a reference image signal (A image), and the pixel indicated as “B” outputs a reference image signal (B image). A signal output from each pixel is transmitted to the first transfer path 1604 and the B image to the second transfer path 1605 via the transfer transistor 1603. In this way, using separate transfer paths, the separation (rearrangement) of the A and B images is facilitated.

その後、第一転送路のA像は第一バッファ回路1701へ、第二転送路のB像は第二バッファ回路1702へ出力され、一時的に記録される。   Thereafter, the A image of the first transfer path is output to the first buffer circuit 1701, and the B image of the second transfer path is output to the second buffer circuit 1702, and is temporarily recorded.

CPU15は、バッファ回路/掛算機1606,1607に信号を伝送し、所望の画素の演算を掛算器1703、加算回路1608、および減算回路1609で行う。   The CPU 15 transmits a signal to the buffer circuits / multipliers 1606 and 1607 and performs calculation of a desired pixel by the multiplier 1703, the addition circuit 1608, and the subtraction circuit 1609.

加算回路1608で加算された信号は、イメージセンサー5内の記録領域(メモリ)1707に記録される。記録領域1707に記録された信号は、BPF(帯域通過フィルター)1708に入力される。このBPFは入力信号(被写体像)の輪郭成分等の高周波成分を抽出するように設定されており、その出力は図1に示したスキャンAF処理回路14で得られるAF評価値と同じく、合焦度合を示す係数となる。   The signal added by the adding circuit 1608 is recorded in a recording area (memory) 1707 in the image sensor 5. The signal recorded in the recording area 1707 is input to a BPF (band pass filter) 1708. This BPF is set so as to extract a high frequency component such as a contour component of the input signal (subject image), and its output is in-focus as in the AF evaluation value obtained by the scan AF processing circuit 14 shown in FIG. A coefficient indicating the degree.

また、減算回路1609で減算された信号は、絶対値回路1610で絶対値に変換された後、イメージセンサー5内の記録領域1710に記録される。記録領域1710に記録された信号は、加算回路1711に出力し、加算回路1711の出力と記録領域1712に記録された値の和を求め、記録領域1712に記録する。すなわち、記録領域1712に記録する値をフィードバックしている。これにより絶対値回路1610の出力の積算値が、記録領域1712に記録される。   The signal subtracted by the subtracting circuit 1609 is converted into an absolute value by the absolute value circuit 1610 and then recorded in the recording area 1710 in the image sensor 5. The signal recorded in the recording area 1710 is output to the adding circuit 1711, and the sum of the output of the adding circuit 1711 and the value recorded in the recording area 1712 is obtained and recorded in the recording area 1712. That is, a value to be recorded in the recording area 1712 is fed back. As a result, the integrated value of the output of the absolute value circuit 1610 is recorded in the recording area 1712.

記録領域1709,1712に記録された値は、CPU15に、DMA転送により適宜転送される。   The values recorded in the recording areas 1709 and 1712 are appropriately transferred to the CPU 15 by DMA transfer.

ステップS1504で行われる位相差AF処理では、高速の処理を低消費電力で実施する必要があるため、イメージセンサー5内の回路で基準画像信号と参照画像信号の並び替えを行った後に像補正を行わずに演算処理を行う。すなわち、CPU15は、信号が掛算器1704および掛算器1705において処理されずに通過するように設定することができる。   In the phase difference AF processing performed in step S1504, it is necessary to perform high-speed processing with low power consumption. Therefore, image correction is performed after the standard image signal and the reference image signal are rearranged in the circuit in the image sensor 5. Arithmetic processing is performed without performing it. That is, the CPU 15 can be set so that the signal passes through the multiplier 1704 and the multiplier 1705 without being processed.

CPU15は、ステップS1504の位相差AF処理を開始すると、まず記録領域1712の値のクリア等初期化処理を行う。その後、CPU15は、イメージセンサー5から蓄積電荷を出力させ、その出力を第一転送路1604および第二転送路1605からバッファ回路1701,1702へ転送し、記録させる。そして、CPU15は、画像の中心部分の差分演算に用いる基準画像の部分を出力するようにバッファ回路1701を設定し、基準画像と同じ画素数の参照画像を出力するようにバッファ回路1702を設定する。   When starting the phase difference AF process in step S1504, the CPU 15 first performs an initialization process such as clearing the value of the recording area 1712. Thereafter, the CPU 15 outputs the accumulated charge from the image sensor 5 and transfers the output from the first transfer path 1604 and the second transfer path 1605 to the buffer circuits 1701 and 1702 for recording. Then, the CPU 15 sets the buffer circuit 1701 so as to output the base image portion used for the difference calculation of the central portion of the image, and sets the buffer circuit 1702 so as to output the reference image having the same number of pixels as the base image. .

この際、CPU15は、バッファ回路1701,1702に記録された画素の出力信号が先頭画素から順に減算回路1609へ出力されるように設定する。減算回路1609からの出力信号は、絶対値回路1610で絶対値に変換され、記録領域1710に記録される。記録領域1710に記録された信号は加算回路1711に出力され、記録領域1712に記録されている信号と加算され、記録領域1712に記録される。   At this time, the CPU 15 sets so that the output signals of the pixels recorded in the buffer circuits 1701 and 1702 are output to the subtraction circuit 1609 in order from the top pixel. The output signal from the subtraction circuit 1609 is converted into an absolute value by the absolute value circuit 1610 and recorded in the recording area 1710. The signal recorded in the recording area 1710 is output to the adding circuit 1711, added with the signal recorded in the recording area 1712, and recorded in the recording area 1712.

初期状態では記録領域1712の値はクリアされているため、記録領域1712には先頭画素同士の差分の絶対値が最初に記録される。次に、バッファ回路1701,1702が先頭画素の次に先頭画素の隣の画素の出力信号をそれぞれ減算回路1609へ出力するため、先頭画素の隣の画素同士の差の絶対値と先頭画素同士の差分の絶対値とが加算され、その結果が記録領域1712に記録される。この処理を繰り返し行い、所定画素分についてA像とB像の差の絶対値の積算値を記録領域1712に記録されると、DMA転送が行われる。   Since the value in the recording area 1712 is cleared in the initial state, the absolute value of the difference between the top pixels is recorded in the recording area 1712 first. Next, since the buffer circuits 1701 and 1702 output the output signals of the pixels next to the top pixel next to the top pixel to the subtraction circuit 1609, respectively, the absolute value of the difference between the pixels adjacent to the top pixel and between the top pixels The absolute value of the difference is added and the result is recorded in the recording area 1712. When this process is repeated and the integrated value of the absolute value of the difference between the A and B images for a predetermined pixel is recorded in the recording area 1712, DMA transfer is performed.

CPU15に先頭画素から演算を行ったA像とB像の差の絶対値の積算値が転送されると、CPU15はその積算値と画素のシフト量(先頭画素からの場合は−N画素)をCPU15の不図示の記録領域に記録する。この処理は、DMA転送終了の割り込み信号に同期して行ってもよい。CPU15は、先頭画素の隣の画素から所定画素の出力信号についても同様に処理することで、積算値をシフト量(−N+1)画素と共に不図示の記録領域に記録する。CPU15は、この処理を繰り返し行うことで所定の範囲(画素シフト量−N画素〜N画素)での積算値をCPU15に記録し、その最小値を求める。   When the integrated value of the absolute value of the difference between the A image and the B image calculated from the top pixel is transferred to the CPU 15, the CPU 15 calculates the integrated value and the pixel shift amount (-N pixel from the top pixel). Recording is performed in a recording area (not shown) of the CPU 15. This processing may be performed in synchronization with an interrupt signal for completion of DMA transfer. The CPU 15 records the integrated value together with the shift amount (−N + 1) pixel in a recording area (not shown) by similarly processing the output signal of the predetermined pixel from the pixel adjacent to the top pixel. The CPU 15 repeats this process to record the integrated value in a predetermined range (pixel shift amount—N pixels to N pixels) in the CPU 15 and obtain the minimum value.

CPU15は、次に、最小値を与えたシフト量とフォーカスに関する敏感度(K値)及び合焦時の像ずれ量Δから、デフォーカス量d(フォーカスレンズ群の移動量と方向)を以下の式によって求める。そして、デフォーカス量dがゼロとなる位置を概ねのフォーカス位置とする。
d=K値×(δ―Δ)
ステップS1513における位相差AF処理では、掛算器1703を用いた像修正が上記処理に加わる。この像修正は、実施例1で説明したものと同様の処理であり、CPU15が実施例1で使用した像修正係数を掛算器1703の掛算係数設定部1706,1707に設定することで実行される。
Next, the CPU 15 calculates the defocus amount d (the amount and direction of movement of the focus lens group) from the shift amount giving the minimum value, the sensitivity (K value) concerning the focus, and the image shift amount Δ during focusing as follows. Obtained by the formula. A position where the defocus amount d is zero is set as a general focus position.
d = K value × (δ−Δ)
In the phase difference AF process in step S1513, image correction using the multiplier 1703 is added to the above process. This image correction is the same processing as described in the first embodiment, and is executed by the CPU 15 setting the image correction coefficient used in the first embodiment in the multiplication coefficient setting units 1706 and 1707 of the multiplier 1703. .

次に、ステップS1507およびステップS1513で行われるRFAF処理について詳細に説明する。   Next, the RFAF process performed in steps S1507 and S1513 will be described in detail.

CPU15は、ステップS1507やステップS1513のRFAF処理を開始すると、変数の処理化などの初期化処理を行う。その後、イメージセンサー5から蓄積電荷が出力され、その出力は、第一転送路1604および第二転送路1605からバッファ回路1701,1702へ転送され記録される。そして、CPU15は、画像の中心部分の加算演算に用いる基準画像の部分を出力するようにバッファ回路1701を設定し、基準画像と同じ画素数の参照画像を出力するようにバッファ回路1702を設定する。また、CPU15は、像修正を行うために、掛算器1703の掛算係数設定部1706,1707に補正係数を設定する。この像修正は、実施例1で説明したものと同様の処理であり、CPU15が実施例1で使用した像修正係数を掛算係数設定部1706,1707に設定することで行われる。また、CPU15は、バッファ回路1701,1702に記録された画素の出力信号が先頭画素から順に出力されるように設定を行う。   When the CPU 15 starts the RFAF processing in step S1507 or step S1513, the CPU 15 performs initialization processing such as variable processing. Thereafter, the accumulated charge is output from the image sensor 5, and the output is transferred from the first transfer path 1604 and the second transfer path 1605 to the buffer circuits 1701 and 1702 and recorded. Then, the CPU 15 sets the buffer circuit 1701 so as to output the base image portion used for the addition calculation of the central portion of the image, and sets the buffer circuit 1702 so as to output the reference image having the same number of pixels as the base image. . Further, the CPU 15 sets a correction coefficient in the multiplication coefficient setting units 1706 and 1707 of the multiplier 1703 in order to perform image correction. This image correction is the same processing as that described in the first embodiment, and is performed by the CPU 15 setting the image correction coefficient used in the first embodiment in the multiplication coefficient setting units 1706 and 1707. Further, the CPU 15 performs setting so that the output signals of the pixels recorded in the buffer circuits 1701 and 1702 are output in order from the top pixel.

ここで、バッファ回路1701から出力された基準画像信号は、掛算器1704で掛算係数設定部1706の補正係数と積算され、加算回路1608へ出力される。同様に、バッファ回路1702から出力された基準画像信号は、掛算器1705で掛算係数設定部1706の補正係数と積算され、加算回路1608へ出力される。加算回路1608では掛算器1704と掛算器1705の出力の加算を行い、加算結果は記録領域1707に記録される。記録領域1707からの出力は、BPF1708を介して記録領域1709に記録される。   Here, the reference image signal output from the buffer circuit 1701 is integrated with the correction coefficient of the multiplication coefficient setting unit 1706 by the multiplier 1704 and output to the addition circuit 1608. Similarly, the reference image signal output from the buffer circuit 1702 is integrated with the correction coefficient of the multiplication coefficient setting unit 1706 by the multiplier 1705 and output to the addition circuit 1608. The adder circuit 1608 adds the outputs of the multiplier 1704 and the multiplier 1705, and the addition result is recorded in the recording area 1707. The output from the recording area 1707 is recorded in the recording area 1709 via the BPF 1708.

BPF1708は、所定の画素数の信号について処理を行うため、先頭画素から所定画素数の信号が入力されてから最初の処理を行い、記録領域1709に出力する。次に、先頭画素の隣の画素から所定画素数の信号について処理を行い、記録領域1709に出力する。この処理を繰り返し行うことで所定画素分についてA像とB像の和信号列のBPF1708による処理結果を記録領域1709に記録すると、DMA転送が行われる。   Since the BPF 1708 performs processing on a signal having a predetermined number of pixels, the BPF 1708 performs first processing after a signal having a predetermined number of pixels is input from the top pixel, and outputs it to the recording area 1709. Next, processing is performed on a signal having a predetermined number of pixels from the pixel adjacent to the top pixel, and the result is output to the recording area 1709. By repeating this process and recording the processing result by the BPF 1708 of the sum signal sequence of the A and B images for a predetermined pixel in the recording area 1709, DMA transfer is performed.

CPU15に先頭画素からA像とB像の和信号列差のBPF1708における処理結果が転送されると、CPU15はその処理された信号列の中から最大値を検出する。そして、当該最大値と画素のシフト量(先頭画素からの場合は−N画素)をCPU15の不図示の記録領域に記録する。この処理は、DMA転送終了の割り込み信号に同期して行ってもよい。   When the processing result in the BPF 1708 of the sum signal sequence difference between the A and B images is transferred from the top pixel to the CPU 15, the CPU 15 detects the maximum value from the processed signal sequence. Then, the maximum value and the pixel shift amount (-N pixel in the case of the first pixel) are recorded in a recording area (not shown) of the CPU 15. This processing may be performed in synchronization with an interrupt signal for completion of DMA transfer.

次に、CPU15は、先頭画素の隣の画素から所定画素の出力信号についても同様に処理を行う。これにより、シフト量(−N+1)画素のBPF処理結果がCPU15に転送され、その最大値と画素のシフト量がCPU15の所定の記録領域に記録される。この処理を繰り返し行うことで所定の範囲(画素シフト量−N画素〜N画素)でのBPF処理結果がCPU15に転送される。画素シフト量ごとの最大値と画素のシフト量が記録されると、CPU15は、その中から記録した画素シフト量全体の最大値とそれを与える画素シフト量Kdを検出する。   Next, the CPU 15 performs the same process on the output signal of a predetermined pixel from the pixel adjacent to the top pixel. As a result, the BPF processing result of the shift amount (−N + 1) pixels is transferred to the CPU 15, and the maximum value and the pixel shift amount are recorded in a predetermined recording area of the CPU 15. By repeating this process, the BPF processing result in a predetermined range (pixel shift amount—N pixels to N pixels) is transferred to the CPU 15. When the maximum value and the pixel shift amount are recorded for each pixel shift amount, the CPU 15 detects the maximum value of the entire recorded pixel shift amount and the pixel shift amount Kd that gives it.

このRFAF処理によって得られるBPF処理結果が最大となる画素シフト量Kdが求まると、CPU15は、レンズ駆動量を以下の式により求める。
レンズ駆動量(パルス)=K・Kd÷フォーカス敏感度÷1パルスあたりの移動量 (3)
Kは、フォーカスに関する敏感度であり、撮影レンズ鏡筒100のズームポジション、絞り4の値、像高等に依存する値である。そのため、EEPROM25内にこれらをパラメータとするテーブルを予め用意しておき、そのテーブルを参照して値を求める。
When the pixel shift amount Kd that maximizes the BPF processing result obtained by the RFAF processing is obtained, the CPU 15 obtains the lens driving amount by the following equation.
Lens drive amount (pulse) = K · Kd ÷ Focus sensitivity ÷ Movement amount per pulse (3)
K is a sensitivity related to the focus, and is a value depending on the zoom position of the photographing lens barrel 100, the value of the diaphragm 4, the image height, and the like. Therefore, a table using these as parameters is prepared in the EEPROM 25 in advance, and values are obtained by referring to the table.

以上により、基準画素用と参照画素用のフォトダイオードからの読み出しとを別々に行う行数を減らすことで読み出しレートを高めることができ、表示装置の表示の更新レートを高速にすることで表示品位向上しつつAFを高速で行うことができる。   As described above, the readout rate can be increased by reducing the number of rows that are separately read from the photodiode for the reference pixel and the reference pixel, and the display quality can be improved by increasing the display update rate of the display device. AF can be performed at high speed while improving.

また、本実施例では、SW1オン保持が継続していれば、非加算読み出しで撮像される信号によるAF処理を行い、主に撮影レンズの光学特性が原因で発生するピント補正量を撮影環境に基づいて求める。これにより、温度や撮像装置の姿勢などの撮影環境が変化した場合でもその撮影環境に適応したピント補正量を用いることができる。そのため、撮影環境によらずにAFの精度を向上することができる。また、同様の撮影環境においては既に記録されたピント補正量を用いることができるため、AFの高速にすることができる。   In this embodiment, if SW1 is kept on, AF processing is performed using a signal imaged by non-addition readout, and a focus correction amount generated mainly due to optical characteristics of the photographing lens is set in the photographing environment. Ask based. Thereby, even when the shooting environment such as the temperature or the posture of the imaging apparatus changes, the focus correction amount adapted to the shooting environment can be used. Therefore, AF accuracy can be improved regardless of the shooting environment. Also, since the already recorded focus correction amount can be used in the same shooting environment, it is possible to increase the AF speed.

また、イメージセンサー5の内部にAF処理を行う回路を持たせることで常にAF処理が行うことができ、レリーズタイムラグを短縮できる。   Further, by providing a circuit for performing the AF process inside the image sensor 5, the AF process can always be performed, and the release time lag can be shortened.

なお、実施例1および実施例2において、コンパクトタイプのデジタルカメラを例に説明したが、本発明は、デジタルビデオカメラやデジタル一眼レフのライブビューや携帯端末のカメラ機能等のAFに適用可能である。   In the first and second embodiments, a compact digital camera has been described as an example. However, the present invention can be applied to AF such as a digital video camera, a live view of a digital single-lens reflex camera, and a camera function of a mobile terminal. .

以上説明した各実施例は代表的な例にすぎず、本発明の実施に際しては、各実施例に対して種々の変形や変更が可能である。   Each embodiment described above is only a representative example, and various modifications and changes can be made to each embodiment in carrying out the present invention.

5 固体撮像素子(センサー)
6 撮像回路
15 CPU
31 RFAF処理回路
37 位相差AF処理回路
5 Solid-state image sensor (sensor)
6 Imaging circuit 15 CPU
31 RFAF processing circuit 37 Phase difference AF processing circuit

Claims (18)

1つの画素に対して複数の光電変換部を有し当該画素が二次元状に配列された撮像素子からの信号を用いてフォーカス制御を行う制御装置であって、
第1の画素領域に含まれる複数の第1の画素のそれぞれにおいて複数の光電変換部からの信号を加算して出力された、撮影画像を形成するための第1の画像信号を取得し、第2の画素領域に含まれる複数の第2の画素のそれぞれにおいて複数の光電変換部から互いに独立して出力された第2の画像信号を取得する取得手段と、
前記第2の画素信号に基づいて位相差方式による相関演算を行い、相関データを決定する第1の演算手段と、
前記複数の第2の画素の間で該複数の第2の画素のそれぞれに対応する前記複数の光電変換部について互いにシフトしながら前記第2の画素信号を加算するシフト加算を行い、加算データを決定する第2の演算手段と、
前記相関データと前記加算データとに基づいて、前記フォーカス制御を行う制御手段と、を有することを特徴とする制御装置。
A control device that has a plurality of photoelectric conversion units for one pixel and performs focus control using a signal from an image sensor in which the pixels are arranged two-dimensionally.
Obtaining a first image signal for forming a captured image output by adding signals from a plurality of photoelectric conversion units in each of the plurality of first pixels included in the first pixel region; Obtaining means for obtaining second image signals output independently from each other from the plurality of photoelectric conversion units in each of the plurality of second pixels included in the two pixel regions;
First calculation means for performing correlation calculation by a phase difference method based on the second pixel signal and determining correlation data;
Shift addition is performed to add the second pixel signal while shifting the plurality of photoelectric conversion units corresponding to each of the plurality of second pixels between the plurality of second pixels. A second computing means for determining;
And a control unit that performs the focus control based on the correlation data and the addition data.
前記制御手段は、前記相関データから位相差方式によりフォーカス位置を求め、前記フォーカス位置における前記加算データの最大値を求めることで、前記フォーカス位置を補正することを特徴とする請求項1に記載の制御装置。   The said control means correct | amends the said focus position by calculating | requiring a focus position by the phase difference system from the said correlation data, and calculating | requiring the maximum value of the said addition data in the said focus position. Control device. 前記制御手段は、前記位相差方式によりフォーカス位置を求められるか否か判定し、
前記位相差方式によりフォーカス位置を求められると判定した場合は、前記相関データから位相差方式によりフォーカス位置を求め、前記フォーカス位置における前記加算データの最大値を求めることで、前記フォーカス位置を補正し、
前記位相差方式によりフォーカス位置を算出できないと判定した場合は、前記第1の画像信号に基づいてコントラスト方式でフォーカス位置を求め、前記フォーカス位置における前記加算データの最大値を求めることで、前記フォーカス位置を補正する
ことを特徴とする請求項2に記載の制御装置。
The control means determines whether or not a focus position can be obtained by the phase difference method,
If it is determined that the focus position can be obtained by the phase difference method, the focus position is obtained from the correlation data by the phase difference method, and the maximum value of the addition data at the focus position is obtained to correct the focus position. ,
When it is determined that the focus position cannot be calculated by the phase difference method, the focus position is obtained by the contrast method based on the first image signal, and the maximum value of the addition data at the focus position is obtained, whereby the focus The control device according to claim 2, wherein the position is corrected.
前記フォーカス位置を補正する補正量を記録する記録手段を更に有することを特徴とする請求項2又は3に記載の制御装置。   4. The control apparatus according to claim 2, further comprising recording means for recording a correction amount for correcting the focus position. 前記記録手段は、前記補正量を、前記フォーカス制御に用いた画像信号を取得したときの、像高、前記撮像素子の姿勢、該装置の温度、前記撮像素子に集光する撮像光学系の温度、前記撮像光学系の絞り値、および前記撮像光学系のズームポジションのうち少なくとも1つである撮影環境と関連付けて記録することを特徴とする請求項4に記載の制御装置。   The recording means uses the correction amount as the image height when the image signal used for the focus control is acquired, the attitude of the imaging device, the temperature of the device, and the temperature of the imaging optical system that focuses on the imaging device. 5. The control apparatus according to claim 4, wherein recording is performed in association with an imaging environment that is at least one of an aperture value of the imaging optical system and a zoom position of the imaging optical system. 前記制御手段は、前記記録手段を参照して現在の撮影環境に対応する前記補正量を取得し、前記記録手段から取得した該補正量に基づいて前記フォーカス位置を補正することを特徴とする請求項5に記載の制御装置。   The control means acquires the correction amount corresponding to a current photographing environment with reference to the recording means, and corrects the focus position based on the correction amount acquired from the recording means. Item 6. The control device according to Item 5. 前記制御手段は、前記記録手段から取得した前記補正量に基づいて前記フォーカス位置を補正する場合、前記加算データの最大値に基づく前記フォーカス位置の補正を行わないことを特徴とする請求項6に記載の制御装置。   7. The control unit according to claim 6, wherein when the focus position is corrected based on the correction amount acquired from the recording unit, the focus position is not corrected based on a maximum value of the addition data. The control device described. 前記制御手段は、前記撮影画像の記録指示を行うスイッチのオンオフを判定し、
前記スイッチがオフと判定された場合は、前記記録手段に記録された前記補正量を用いずに、前記加算データの最大値に基づいて前記フォーカス位置を補正することを特徴とする請求項6又は7に記載の制御装置。
The control means determines on / off of a switch for instructing recording of the captured image,
The focus position is corrected based on the maximum value of the added data without using the correction amount recorded in the recording unit when the switch is determined to be off. 8. The control device according to 7.
前記制御手段は、前記撮影画像の記録指示を行うスイッチのオンオフを判定し、
前記スイッチがオンと判定された場合は、前記加算データの最大値に基づく前記フォーカス位置の補正を行わずに、前記記録手段から前記補正量に基づいて前記フォーカス位置を補正することを特徴とする請求項4から8のうちいずれか1項に記載の制御装置。
The control means determines on / off of a switch for instructing recording of the captured image,
When it is determined that the switch is on, the focus position is corrected based on the correction amount from the recording unit without correcting the focus position based on the maximum value of the addition data. The control device according to any one of claims 4 to 8.
前記記録手段に前記補正量が記録されてから所定時間が経過した場合は、
前記制御手段は、前記記録手段に記録された前記補正量を用いずに、前記加算データの最大値に基づいて前記フォーカス位置を補正することを特徴とする請求項4から7のうちいずれか1項に記載の制御装置。
When a predetermined time has elapsed since the correction amount was recorded in the recording means,
8. The control unit according to claim 4, wherein the control unit corrects the focus position based on a maximum value of the addition data without using the correction amount recorded in the recording unit. The control device according to item.
前記制御手段は、撮影シーンが変化したかを判定し、
前記撮影シーンが変化したと判定された場合、
前記第1の演算手段、前記第2の演算手段、および前記制御手段は、演算結果を初期化し、前記撮影シーンが変化した後に取得された前記第2の画像信号に基づいて動作を開始することを特徴とする請求項1から10のうちいずれか1項に記載の制御装置。
The control means determines whether the shooting scene has changed,
If it is determined that the shooting scene has changed,
The first calculation unit, the second calculation unit, and the control unit initialize a calculation result and start an operation based on the second image signal acquired after the shooting scene changes. The control device according to claim 1, wherein:
前記第1の画素と前記第2の画素は、電荷を蓄積する時間が異なることを特徴とする請求項1から11のうちいずれか1項に記載の制御装置。   The control device according to claim 1, wherein the first pixel and the second pixel have different charge accumulation times. 1つの画素に対して複数の光電変換部を有し当該画素が二次元状に配列されている撮像素子と、
請求項1から12のうちいずれか1項に記載の制御装置と、を有することを特徴とする撮像装置。
An imaging device having a plurality of photoelectric conversion units for one pixel, and the pixels are arranged two-dimensionally;
An imaging device comprising: the control device according to claim 1.
前記撮像素子は、前記第2の画像信号の出力の順番を並び替える並び替え手段を含むことを特徴とする請求項13に記載の撮像装置。   The image pickup apparatus according to claim 13, wherein the image pickup device includes a rearranging unit that rearranges an output order of the second image signal. 1つの画素に対して複数の光電変換部を有し当該画素が二次元状に配列された撮像素子からの信号を用いてフォーカス制御を行う制御方法であって、
第1の画素領域に含まれる複数の第1の画素のそれぞれにおいて複数の光電変換部からの信号を加算して出力された、撮影画像を形成するための第1の画像信号と、第2の画素領域に含まれる複数の第2の画素のそれぞれにおいて複数の光電変換部から互いに独立して出力された第2の画像信号とを取得するステップと、
前記第2の画素信号に基づいて位相差方式による相関演算を行い、相関データを決定するステップと、
前記複数の第2の画素の間で該複数の第2の画素のそれぞれに対応する前記複数の光電変換部について互いにシフトしながら前記第2の画素信号を加算するシフト加算を行い、加算データを決定するステップと、
前記相関データと前記加算データとに基づいて、前記フォーカス制御を行うステップと、
を有することを特徴とする制御方法。
A control method in which focus control is performed using a signal from an image sensor in which a plurality of photoelectric conversion units are provided for one pixel and the pixels are two-dimensionally arranged.
A first image signal for forming a captured image output by adding signals from a plurality of photoelectric conversion units in each of the plurality of first pixels included in the first pixel region; Obtaining a second image signal output independently from each other from the plurality of photoelectric conversion units in each of the plurality of second pixels included in the pixel region;
Performing correlation calculation by a phase difference method based on the second pixel signal and determining correlation data;
Shift addition is performed to add the second pixel signal while shifting the plurality of photoelectric conversion units corresponding to each of the plurality of second pixels between the plurality of second pixels. A step to determine;
Performing the focus control based on the correlation data and the addition data;
A control method characterized by comprising:
前記フォーカス制御によりフォーカス位置を補正する補正量を記録するステップを更に有することを特徴とする請求項15に記載の制御方法。   The control method according to claim 15, further comprising a step of recording a correction amount for correcting a focus position by the focus control. コンピュータに、請求項15または16に記載の撮像装置の制御方法を実行させるように構成されていることを特徴とするプログラム。   A program configured to cause a computer to execute the control method of the imaging apparatus according to claim 15 or 16. 請求項17に記載のプログラムを記憶していることを特徴とする記憶媒体。   A storage medium storing the program according to claim 17.
JP2015088366A 2015-04-23 2015-04-23 Control device, imaging device, control method, program, and recording medium Pending JP2016206441A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015088366A JP2016206441A (en) 2015-04-23 2015-04-23 Control device, imaging device, control method, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015088366A JP2016206441A (en) 2015-04-23 2015-04-23 Control device, imaging device, control method, program, and recording medium

Publications (1)

Publication Number Publication Date
JP2016206441A true JP2016206441A (en) 2016-12-08

Family

ID=57489580

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015088366A Pending JP2016206441A (en) 2015-04-23 2015-04-23 Control device, imaging device, control method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP2016206441A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019056803A (en) * 2017-09-21 2019-04-11 キヤノン株式会社 Imaging apparatus and method of controlling the same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019056803A (en) * 2017-09-21 2019-04-11 キヤノン株式会社 Imaging apparatus and method of controlling the same
JP7086551B2 (en) 2017-09-21 2022-06-20 キヤノン株式会社 Imaging device and its control method

Similar Documents

Publication Publication Date Title
JP4969474B2 (en) Decoding method, decoding device, and decoding program
JP5854984B2 (en) Image processing apparatus, imaging apparatus, control method, and program
JP6257245B2 (en) Imaging apparatus and control method thereof
JP5388544B2 (en) Imaging apparatus and focus control method thereof
CN103098459B (en) Stereo photographic device and shadow correction method
JP6289017B2 (en) Imaging apparatus, control method therefor, program, and storage medium
JP5043730B2 (en) Imaging apparatus, control method therefor, image processing apparatus, and image processing method
US10574906B2 (en) Image processing apparatus and image processing method
JP6478534B2 (en) Focus control device, imaging device, interchangeable lens, focus control method, and focus control program
JP6595797B2 (en) Imaging apparatus and control method thereof
JP5100410B2 (en) Imaging apparatus and control method thereof
JP7142507B2 (en) Image processing device, image processing method, and imaging device
JP6917803B2 (en) Imaging equipment, control methods, and programs
JP2016206441A (en) Control device, imaging device, control method, program, and recording medium
JP2019168661A (en) Controller, imaging unit, method for control, program, and storage medium
US10027881B2 (en) Image processing apparatus, image processing method, and storage medium
US11310410B2 (en) Image capturing apparatus, method of controlling same, and storage medium
JP5963550B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2012124650A (en) Imaging apparatus, and imaging method
JP7134601B2 (en) Image processing device, image processing method, imaging device, and imaging device control method
JP6071748B2 (en) Imaging apparatus and control method thereof
JP6138222B2 (en) Image processing apparatus, imaging apparatus, control method, and program
JP2016100868A (en) Image processing apparatus, image processing method, and program, and imaging apparatus
JP2016134886A (en) Imaging apparatus and control method thereof
JP2015152830A (en) Imaging device and control method thereof, program, and storage medium