JP2014123050A - Focus detection device, focus detection method, program and imaging device - Google Patents

Focus detection device, focus detection method, program and imaging device Download PDF

Info

Publication number
JP2014123050A
JP2014123050A JP2012279667A JP2012279667A JP2014123050A JP 2014123050 A JP2014123050 A JP 2014123050A JP 2012279667 A JP2012279667 A JP 2012279667A JP 2012279667 A JP2012279667 A JP 2012279667A JP 2014123050 A JP2014123050 A JP 2014123050A
Authority
JP
Japan
Prior art keywords
focus
focus detection
phase difference
imaging
subject
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.)
Granted
Application number
JP2012279667A
Other languages
Japanese (ja)
Other versions
JP2014123050A5 (en
JP6196772B2 (en
Inventor
Hideyuki Hamano
英之 浜野
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 JP2012279667A priority Critical patent/JP6196772B2/en
Publication of JP2014123050A publication Critical patent/JP2014123050A/en
Publication of JP2014123050A5 publication Critical patent/JP2014123050A5/ja
Application granted granted Critical
Publication of JP6196772B2 publication Critical patent/JP6196772B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To enable appropriate setting of a phase difference focus evaluation area even if a subject is displaced in an imaging picture as a focus lens is moved during phase difference focus control.SOLUTION: A focus detection device includes: driving means for an imaging optical system including a focus lens for forming an optical image of a subject; and obtaining means for obtaining an imaging signal obtained by photo-electrically converting the optical image by imaging means. The focus detection device sets a focus detection area in an imaging picture based on the imaging signal, performs focus adjustment by driving the focus lens by the driving means in accordance with at least a phase difference detection method, determines the amount of driving of the focus lens on the basis of an optical image corresponding to an imaging signal corresponding to the set focus detection area, and controls focus detection means in accordance with the determined amount of driving. If the position of the subject in the imaging picture is displaced due to the driving of the focus lens in accordance with the phase difference detection method, the position of the focus detection area is changed in accordance with the amount of displacement of the subject.

Description

本発明は、焦点検出装置、特に位相差検出方式のオートフォーカスを行う焦点検出装置および前記焦点検出装置を有する撮像装置に関する。   The present invention relates to a focus detection apparatus, and more particularly to a focus detection apparatus that performs autofocusing using a phase difference detection method and an imaging apparatus having the focus detection apparatus.

デジタルスチルカメラやビデオカメラ等の撮像装置のAF方式として、位相差検出方式によるAF(位相差AF)とコントラスト検出方式によるAF(コントラストAF)と、これらを組み合わせたハイブリッドAFがある。位相差AFでは、撮像光学系を通過した光束を受光する撮像素子上に焦点検出用の画素を配し、位相差検出方式によるAF(撮像面位相差AF)を行うものがある。また、ハイブリッドAFでは、位相差AFを行ってフォーカスレンズを合焦近傍位置まで移動させ、さらにコントラストAFによりフォーカスレンズを合焦位置に移動させる。このようなハイブリッドAFにおいて、位相差AFの結果に応じてコントラストAFにおいてコントラスト評価値を生成する領域(以下、コントラスト評価領域という)を設定するものがある。特に、撮像面位相差AFとコントラストAFのハイブリッドAFは、いずれのAFも撮像素子から得られるデータから焦点検出を行うため、データ取得の同時性、評価範囲の一致度などの観点から高精度で、高速なハイブリッドAF実現の可能性がある。   As an AF method of an imaging apparatus such as a digital still camera or a video camera, there are an AF based on a phase difference detection method (phase difference AF), an AF based on a contrast detection method (contrast AF), and a hybrid AF combining these. In some phase difference AFs, focus detection pixels are arranged on an image sensor that receives a light beam that has passed through an imaging optical system, and AF (imaging surface phase difference AF) is performed using a phase difference detection method. In the hybrid AF, the phase difference AF is performed to move the focus lens to a position near the focus, and the focus lens is moved to the focus position by contrast AF. In such a hybrid AF, there is a type in which a region for generating a contrast evaluation value in contrast AF (hereinafter referred to as a contrast evaluation region) is set according to the result of phase difference AF. In particular, the hybrid AF of the imaging surface phase difference AF and contrast AF performs focus detection from the data obtained from the imaging device, so it is highly accurate from the viewpoint of data acquisition simultaneity, evaluation range coincidence, etc. There is a possibility of realizing high-speed hybrid AF.

特許文献1に開示されたハイブリッドAFでは、位相差AFを行うことが可能な複数の焦点検出領域のうちいずれかを選択して位相差AFを行い、該選択された2以上の焦点検出領域での合焦近傍位置にフォーカスレンズを駆動する。そして、それら合焦近傍位置に対応する焦点検出領域を内包するようにコントラスト評価領域を設定する。   In the hybrid AF disclosed in Patent Document 1, the phase difference AF is performed by selecting any one of a plurality of focus detection areas capable of performing the phase difference AF, and the two or more selected focus detection areas are selected. The focus lens is driven to a position near the in-focus position. Then, the contrast evaluation area is set so as to include the focus detection area corresponding to the in-focus vicinity position.

また、特許文献2には、位相差AFを行うことが可能な焦点検出領域とコントラスト評価領域とが重複していたり近接していたりする場合に、その焦点検出領域での位相差AFの結果を用いてコントラストAFを行うハイブリッドAFが開示されている。   Patent Document 2 discloses the result of phase difference AF in the focus detection area when the focus detection area capable of performing phase difference AF and the contrast evaluation area overlap or are close to each other. A hybrid AF that performs contrast AF using the same is disclosed.

また、撮像光学系のディストーションによる光学像の歪みの影響を排除したコントラスト評価領域を設定するものがある。
特許文献3には、歪み補正を行った画像データ内に設定されたフォーカス枠に応じて、歪み補正前の画像データ内のコントラスト評価領域を設定するコントラストAFが開示されている。
In addition, there is a method for setting a contrast evaluation region in which the influence of distortion of an optical image due to distortion of an imaging optical system is eliminated.
Patent Document 3 discloses contrast AF that sets a contrast evaluation area in image data before distortion correction in accordance with a focus frame set in image data that has been subjected to distortion correction.

特開2006−350188号公報JP 2006-350188 A 特開2007−179029号公報JP 2007-179029 A 特開2008−118387号公報JP 2008-118387 A

しかしながら、上記特許文献1,2に開示されたハイブリッドAFのように、位相差AFを行った焦点検出領域を包含するようにコントラスト評価領域を設定するだけでは、以下のような問題が生じる。すなわち、フォーカスレンズを移動させることで、撮影画面内の像倍率が変化する。このため、位相差AF前の焦点検出領域に含まれていた合焦対象の被写体が、フォーカスレンズの移動による像倍率の変化によって撮影画面内で変位し、位相差AF前の焦点検出領域に含まれなくなる場合がある。この場合、位相差AF前の焦点検出領域を含むようにコントラスト評価領域を設定しても、そのコントラスト評価領域に合焦対象の被写体が含まれないおそれがある。このことは、ハイブリッドAFの構成だけではなく、位相差AFのみで焦点検出、フォーカスレンズ駆動を繰り返し行いながら、合焦させるような場合にも、同様に課題となる。   However, just setting the contrast evaluation area so as to include the focus detection area where the phase difference AF is performed as in the hybrid AF disclosed in Patent Documents 1 and 2 causes the following problems. That is, by moving the focus lens, the image magnification in the shooting screen changes. For this reason, the subject to be focused included in the focus detection area before the phase difference AF is displaced in the photographing screen due to a change in the image magnification due to the movement of the focus lens, and is included in the focus detection area before the phase difference AF. It may not be possible. In this case, even if the contrast evaluation area is set so as to include the focus detection area before the phase difference AF, there is a possibility that the subject to be focused on is not included in the contrast evaluation area. This is a problem not only in the configuration of the hybrid AF but also in the case where focusing is performed while repeatedly performing focus detection and focus lens driving only with the phase difference AF.

また、上記特許文献3に開示されたコントラストAFにおける撮像光学系のディストーションの影響をコントラスト評価領域の変更により排除する処理を撮像面位相差AFに適用した場合、以下のような問題が生じる。すなわち、位相差AFは、撮像光学系の異なる瞳領域を通過した光束が形成する光学像のずれ量を検出する。一方で、撮像光学系のディストーションは、糸巻型歪み、樽型歪みと呼ばれ、被写体の水平垂直方向に対して傾きを持った光学像を形成する。そのため、撮像面位相差AFでは、光学像のずれる方向とディストーションの影響を排除した評価領域が非平行になる可能性があり、それによる焦点検出の精度悪化を引き起こす恐れがある。   Further, when the processing for eliminating the influence of the distortion of the imaging optical system in the contrast AF disclosed in Patent Document 3 by changing the contrast evaluation area is applied to the imaging plane phase difference AF, the following problems occur. That is, the phase difference AF detects the shift amount of the optical image formed by the light beam that has passed through different pupil regions of the imaging optical system. On the other hand, distortion of the imaging optical system is called pincushion distortion and barrel distortion, and forms an optical image having an inclination with respect to the horizontal and vertical directions of the subject. Therefore, in the imaging plane phase difference AF, there is a possibility that the direction in which the optical image is shifted and the evaluation area excluding the influence of distortion become non-parallel, which may cause deterioration in focus detection accuracy.

本発明は、位相差AFによるフォーカスレンズの移動に伴う像倍率の変化や撮像光学系のディストーションによって撮影画面内で被写体が変位した場合でも、焦点検出領域を適切に設定して高精度な焦点検出を可能にする焦点検出装置の提供を目的とする。   The present invention provides high-precision focus detection by appropriately setting a focus detection area even when a subject is displaced in a shooting screen due to a change in image magnification caused by movement of a focus lens due to phase difference AF or distortion of an imaging optical system. It is an object of the present invention to provide a focus detection device that enables the above.

本発明によれば、被写体の光学像を形成するためのフォーカスレンズを含む撮影光学系の駆動手段と撮像手段により前記光学像を光電変換して得られる撮像信号を取得する取得手段を有する焦点検出装置は、撮像信号に基づく撮影画面に焦点検出領域を設定する設定手段と、少なくとも位相差検出方式に従ってフォーカスレンズを駆動手段により駆動する焦点調節を行う焦点検出手段と、設定された焦点検出領域に対応する撮像信号に対応する光学像に基づいてフォーカスレンズの駆動量を決定し、決定された駆動量に従って焦点検出手段を制御する制御手段を備え、制御手段は設定手段を制御し、位相差検出方式に従ったフォーカスレンズの駆動により撮影画面内の被写体の位置が変位した場合は、被写体の変位量に従って焦点検出領域の位置を変更する。   According to the present invention, focus detection includes an imaging optical system driving unit including a focus lens for forming an optical image of a subject and an acquisition unit that acquires an imaging signal obtained by photoelectrically converting the optical image by the imaging unit. The apparatus includes: a setting unit that sets a focus detection area on a shooting screen based on an imaging signal; a focus detection unit that performs focus adjustment by driving a focus lens according to at least a phase difference detection method; and a focus detection area that is set The control unit includes a control unit that determines a driving amount of the focus lens based on an optical image corresponding to a corresponding imaging signal, and controls the focus detection unit according to the determined driving amount. The control unit controls the setting unit and detects the phase difference. If the position of the subject in the shooting screen is displaced by driving the focus lens according to the method, the focus detection area To change the location.

本発明によれば、位相差フォーカス制御によるフォーカスレンズの移動(像倍率の変化)やディストーションにより撮影画面内で被写体が変位しても、以後のフォーカス制御を行う焦点検出領域を該変位後の被写体を含むように設定することができる。したがって、より高精度なAF制御が可能となる。   According to the present invention, even if the subject is displaced in the shooting screen due to the movement of the focus lens (change in image magnification) or distortion by phase difference focus control, the focus detection area for the subsequent focus control is set as the subject after the displacement. Can be set to include. Therefore, more accurate AF control is possible.

本発明の第1の実施例に係る焦点検出装置を適用した撮像装置の構成を示すブロック図。1 is a block diagram showing a configuration of an imaging apparatus to which a focus detection apparatus according to a first embodiment of the present invention is applied. 図1の撮像装置で用いられる撮像素子が有する撮像用画素の平面図と断面図。The top view and sectional drawing of the pixel for an imaging which the image pick-up element used with the imaging device of FIG. 1 has. 図2の撮像素子が有する焦点検出用画素の平面図と断面図。FIG. 3 is a plan view and a cross-sectional view of focus detection pixels included in the image sensor of FIG. 2. 図3の焦点検出用画素による瞳分割を説明するための図。The figure for demonstrating the pupil division by the pixel for focus detection of FIG. 本発明の第1の実施例に係る撮像装置のAF動作のフローチャートを示す図。FIG. 4 is a diagram illustrating a flowchart of an AF operation of the imaging apparatus according to the first embodiment of the present invention. 本発明の第1の実施例に係る焦点検出装置を適用した撮像装置のAF動作におけるディストーション補正前後の位相差検出領域を示す図。FIG. 3 is a diagram illustrating a phase difference detection region before and after distortion correction in an AF operation of the imaging apparatus to which the focus detection apparatus according to the first embodiment of the present invention is applied. 本発明の第1の実施例に係る焦点検出装置を適用した撮像装置のAF動作におけるフォーカスレンズ駆動後の位相差検出領域の設定例を示す図。FIG. 6 is a diagram illustrating a setting example of a phase difference detection area after driving a focus lens in an AF operation of the imaging apparatus to which the focus detection apparatus according to the first embodiment of the present invention is applied. 本発明の第1の実施例に係る焦点検出装置を適用した撮像装置のAF動作における位相差検出領域に対するコントラスト評価領域の設定例を示す図。FIG. 6 is a diagram illustrating a setting example of a contrast evaluation region for a phase difference detection region in an AF operation of the imaging apparatus to which the focus detection apparatus according to the first embodiment of the present invention is applied. 本発明の第2の実施例に係る焦点検出装置を適用した撮像装置におけるAF動作のフローチャートを示す図。The figure which shows the flowchart of AF operation | movement in the imaging device to which the focus detection apparatus which concerns on 2nd Example of this invention is applied. 本発明の第2の実施例に係る焦点検出装置を適用した撮像装置のAF動作における位相差検出領域に対するコントラスト評価領域の設定例を示す図。FIG. 10 is a diagram illustrating a setting example of a contrast evaluation area for a phase difference detection area in an AF operation of an imaging apparatus to which a focus detection apparatus according to a second embodiment of the present invention is applied.

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

図1には、本発明の第1の実施例に係る焦点検出装置を有する撮像装置の例として、デジタルカメラ本体138と該デジタルカメラ本体に対して取り外し可能に装着される交換レンズ137とにより構成される撮像システムの構成を示している。   FIG. 1 shows a digital camera body 138 and an interchangeable lens 137 that is detachably attached to the digital camera body as an example of an imaging apparatus having a focus detection apparatus according to the first embodiment of the present invention. 1 shows a configuration of an imaging system to be used.

まず、交換レンズ137の構成について説明する。101は撮影光学系(結像光学系)のうち最も被写体側に配置され、光軸方向に移動可能な第1レンズ群である。102は絞りであり、その開口径を変化させて(絞り値を可変として)光量調節を行う。103は第2レンズ群である。絞り102は、第2レンズ群103と一体となって光軸方向に移動する。第1レンズ群101と第2レンズ群102とが光軸方向に移動することで、変倍(ズーム)が行われる。   First, the configuration of the interchangeable lens 137 will be described. Reference numeral 101 denotes a first lens group which is disposed closest to the subject in the photographing optical system (imaging optical system) and is movable in the optical axis direction. Reference numeral 102 denotes an aperture, which adjusts the amount of light by changing the aperture diameter (with the aperture value being variable). Reference numeral 103 denotes a second lens group. The diaphragm 102 moves integrally with the second lens group 103 in the optical axis direction. Zooming is performed by moving the first lens group 101 and the second lens group 102 in the optical axis direction.

105はフォーカスレンズとしての第3レンズ群であり、光軸方向に移動して焦点調節を行う。111はズームアクチュエータであり、不図示のカム筒を光軸周りで回転させることで、第1レンズ群101および第2レンズ群102を光軸方向に移動させ、変倍を行なう。   Reference numeral 105 denotes a third lens group serving as a focus lens, which moves in the optical axis direction to adjust the focus. Reference numeral 111 denotes a zoom actuator that rotates a cam cylinder (not shown) around the optical axis, thereby moving the first lens group 101 and the second lens group 102 in the optical axis direction to perform zooming.

112は絞りアクチュエータであり、光量調節のために絞り102の開口径を変化させるよう駆動する。114はフォーカスアクチュエータであり、第3レンズ群105を光軸方向に移動させてフォーカシングを行う。   A diaphragm actuator 112 is driven to change the aperture diameter of the diaphragm 102 to adjust the light amount. Reference numeral 114 denotes a focus actuator, which performs focusing by moving the third lens group 105 in the optical axis direction.

136はカメラ通信回路であり、レンズに関する情報をカメラに送信したり、カメラに関する情報を受信したりする。レンズに関する情報には、ズーム状態、絞り状態、フォーカス状態およびレンズ枠情報等が含まれる。カメラ通信回路136は、カメラ側に設けられたレンズ通信回路135にこれらの情報を送信する。   Reference numeral 136 denotes a camera communication circuit that transmits information about the lens to the camera and receives information about the camera. The information regarding the lens includes a zoom state, a diaphragm state, a focus state, lens frame information, and the like. The camera communication circuit 136 transmits these pieces of information to the lens communication circuit 135 provided on the camera side.

次に、カメラ本体138の構成について説明する。106は光学的ローパスフィルタであり、撮影画像の偽色やモアレを軽減するための光学素子である。107はCMOSセンサとその周辺回路で構成された撮像素子である。該撮像素子107は、水平方向にm個、垂直方向にn個の画素(光電変換素子)を有し、これらの画素に対してベイヤー配列の原色カラーモザイクフィルタが配置されて2次元単板カラーセンサが構成されている。   Next, the configuration of the camera body 138 will be described. Reference numeral 106 denotes an optical low-pass filter, which is an optical element for reducing false colors and moire in a captured image. Reference numeral 107 denotes an image sensor composed of a CMOS sensor and its peripheral circuits. The image sensor 107 has m pixels in the horizontal direction and n pixels (photoelectric conversion elements) in the vertical direction, and a Bayer array primary color mosaic filter is arranged for these pixels to form a two-dimensional single-plate color. A sensor is configured.

139はシャッタユニットであり、静止画撮影時の露光時間制御を行う。140はシャッタ139を動作させるシャッタアクチュエータである。   Reference numeral 139 denotes a shutter unit that controls exposure time during still image shooting. Reference numeral 140 denotes a shutter actuator that operates the shutter 139.

115は電子フラッシュであり、キセノン管やLEDを光源として有する。116はAF補助光発光部であり、所定の開口パターンを有したマスクの像を、投光レンズを介して被写体に投影する。これにより、暗い被写体あるいは低コントラストの被写体に対するAF性能を向上させることができる。   An electronic flash 115 has a xenon tube or LED as a light source. Reference numeral 116 denotes an AF auxiliary light emitting unit that projects an image of a mask having a predetermined opening pattern onto a subject through a light projection lens. Thereby, the AF performance for a dark subject or a low-contrast subject can be improved.

121はコントローラとしてのカメラCPUであり、カメラの種々の動作の制御を司る。カメラCPU121は、演算部、ROM、RAM、A/Dコンバータ、D/Aコンバータおよび通信インターフェイス回路等を有する。カメラCPU121は、ROMに記憶されたコンピュータプログラムに従ってカメラ内の各部の動作を制御し、撮影光学系の焦点状態の検出(焦点検出)を含むAF、撮像、画像処理および記録等の一連の撮影動作を実行させる。   Reference numeral 121 denotes a camera CPU as a controller, which controls various operations of the camera. The camera CPU 121 includes a calculation unit, a ROM, a RAM, an A / D converter, a D / A converter, a communication interface circuit, and the like. The camera CPU 121 controls the operation of each part in the camera according to a computer program stored in the ROM, and a series of shooting operations such as AF, imaging, image processing, and recording including detection of the focus state of the imaging optical system (focus detection). Is executed.

122は電子フラッシュ制御回路であり、電子フラッシュ115の点灯制御を行う。123は補助光駆動回路であり、AF補助光発光部116の点灯制御を行う。124は撮像素子駆動回路であり、撮像素子107の動作を制御するとともに、該撮像素子107から出力された画素信号(撮像信号)をA/D変換してカメラCPU121に送信する。125は画像処理回路であり、A/D変換された撮像信号に対してγ変換やカラー補間等の画像処理を行って画像信号を生成し、さらに画像信号に対してJPEG圧縮等の処理を行う。   Reference numeral 122 denotes an electronic flash control circuit that controls the lighting of the electronic flash 115. Reference numeral 123 denotes an auxiliary light driving circuit that performs lighting control of the AF auxiliary light emitting unit 116. An image sensor driving circuit 124 controls the operation of the image sensor 107, and A / D converts a pixel signal (image signal) output from the image sensor 107 and transmits it to the camera CPU 121. An image processing circuit 125 generates an image signal by performing image processing such as γ conversion and color interpolation on the A / D converted imaging signal, and further performs processing such as JPEG compression on the image signal. .

126はフォーカス駆動回路であり、焦点検出結果に基づいてフォーカスアクチュエータ114を駆動し、第3レンズ群105を光軸方向に移動させて焦点調節を行う。128は絞り駆動回路であり、絞りアクチュエータ112を駆動して絞り102を動作させる。129はズーム駆動回路で、撮影者のズーム操作に応じてズームアクチュエータ111を駆動する。   A focus driving circuit 126 drives the focus actuator 114 based on the focus detection result, and moves the third lens group 105 in the optical axis direction to perform focus adjustment. Reference numeral 128 denotes an aperture driving circuit that drives the aperture actuator 112 to operate the aperture 102. Reference numeral 129 denotes a zoom drive circuit that drives the zoom actuator 111 in accordance with the zoom operation of the photographer.

135は前述したレンズ通信回路であり、交換レンズ137内のカメラ通信回路136と通信を行う。145はシャッタ駆動回路であり、シャッタアクチュエータ140を駆動する。   Reference numeral 135 denotes the lens communication circuit described above, which communicates with the camera communication circuit 136 in the interchangeable lens 137. A shutter driving circuit 145 drives the shutter actuator 140.

131はLCD等の表示器であり、カメラの撮影モードに関する情報、撮影前のプレビュー画像、撮影後の確認用画像および焦点検出時の合焦状態等を表示する。撮影前のプレビュー画像表示を行う際には、撮影光学系の収差補正を行った補正後の画像に対して、焦点検出領域の表示枠を重ねて表示される。132は操作スイッチ群であり、電源スイッチ、レリーズ(撮影トリガ)スイッチ、ズーム操作スイッチ、撮影モード選択スイッチ等で構成される。133は着脱可能なフラッシュメモリで、撮影済み画像を記録する。144はカメラ内メモリであり、カメラCPU121で行う処理や演算に必要な各種データが保存されている。   Reference numeral 131 denotes a display such as an LCD, which displays information related to the shooting mode of the camera, a preview image before shooting, a confirmation image after shooting, a focus state at the time of focus detection, and the like. When displaying a preview image before photographing, the display frame of the focus detection area is displayed so as to overlap the corrected image obtained by performing aberration correction of the photographing optical system. An operation switch group 132 includes a power switch, a release (shooting trigger) switch, a zoom operation switch, a shooting mode selection switch, and the like. Reference numeral 133 denotes a detachable flash memory that records a photographed image. Reference numeral 144 denotes an in-camera memory in which various data necessary for processing and calculation performed by the camera CPU 121 are stored.

カメラCPU(制御手段)121は、撮像素子107に設けられた複数の焦点検出画素からの取得された撮像信号を用いた位相差検出方式によるオートフォーカス(位相差フォーカス制御)を行う。さらに、複数の撮像用画素からの出力を用いたコントラスト検出方式によるオートフォーカス(コントラストフォーカス制御)も行う。この撮像素子107を用いた位相差検出方式によるオートフォーカス(AF)を、以下、撮像面位相差AFといい、コントラスト検出方式によるAFを、以下、コントラストAFという。   A camera CPU (control unit) 121 performs autofocus (phase difference focus control) by a phase difference detection method using image signals acquired from a plurality of focus detection pixels provided in the image sensor 107. Furthermore, autofocus (contrast focus control) is also performed by a contrast detection method using outputs from a plurality of imaging pixels. The autofocus (AF) based on the phase difference detection method using the image sensor 107 is hereinafter referred to as an imaging surface phase difference AF, and the AF based on the contrast detection method is hereinafter referred to as contrast AF.

撮像面位相差AFでは、カメラCPU121は、複数の焦点検出画素からの出力により生成された一対の撮像信号に対して相関演算を行い、それらの相対的な位置ずれを示す位相差を算出する。そして、カメラCPU121は、該位相差に基づいて交換レンズ1(撮影光学系)の焦点状態(デフォーカス量)を算出(検出)する。さらに、カメラCPU121は、該デフォーカス量に基づいて、合焦に近い状態を得るために第3レンズ群105を移動させるべき位置(合焦近傍位置)までの駆動量を算出する。カメラCPU121は、算出した駆動量だけ第3レンズ群105を移動させるようフォーカス駆動回路126を通じてフォーカスアクチュエータ114を制御する。   In the imaging plane phase difference AF, the camera CPU 121 performs a correlation operation on a pair of imaging signals generated by outputs from a plurality of focus detection pixels, and calculates a phase difference indicating their relative positional deviation. Then, the camera CPU 121 calculates (detects) the focus state (defocus amount) of the interchangeable lens 1 (imaging optical system) based on the phase difference. Furthermore, the camera CPU 121 calculates a drive amount to a position (near focus position) to move the third lens group 105 in order to obtain a state close to focus based on the defocus amount. The camera CPU 121 controls the focus actuator 114 through the focus drive circuit 126 so as to move the third lens group 105 by the calculated drive amount.

コントラスト方式のAFでは、カメラCPU121は、フォーカスアクチュエータ114を制御して第3レンズ群105を移動させながら、所定の周期で、複数の撮像用画素からの出力により生成された画像信号の高周波成分を抽出し、コントラスト評価値を算出する。そして、カメラCPU121は、コントラスト評価値が最大となる位置(合焦位置)に第3レンズ群105を移動させる。   In contrast AF, the camera CPU 121 controls the focus actuator 114 to move the third lens group 105 and outputs high-frequency components of image signals generated by outputs from a plurality of imaging pixels at a predetermined cycle. Extract and calculate a contrast evaluation value. Then, the camera CPU 121 moves the third lens group 105 to a position (focus position) where the contrast evaluation value is maximized.

次に、図2および図3を用いて、撮像素子107上に配置された撮像用画素と焦点検出用画素の構造について説明する。本実施例の撮像素子107は、2行×2列の4画素における対角2箇所にG(緑色)の分光感度を有する画素を配置し、他の2箇所にR(赤色)とB(青色)の分光感度を有する画素をそれぞれ1個ずつ配置したベイヤー配列を採用する。そして、このようなベイヤー配列により配置された複数の撮像用画素の中に、複数の焦点検出用画素が分散配置されている。   Next, the structure of the imaging pixels and focus detection pixels arranged on the imaging element 107 will be described with reference to FIGS. 2 and 3. In the image sensor 107 of this embodiment, pixels having G (green) spectral sensitivity are arranged at two diagonal positions in four pixels of 2 rows × 2 columns, and R (red) and B (blue) are arranged at the other two locations. A Bayer array in which one pixel having a spectral sensitivity of 1) is arranged. A plurality of focus detection pixels are dispersedly arranged among the plurality of imaging pixels arranged in such a Bayer array.

図2には、撮像用画素の平面図と断面図を示す。同図(a)は撮像素子107の中央に位置する2行×2列の撮像用画素の平面図である。前述したように、対角2箇所に2つのG画素が配置され、他の2箇所にR画素とB画素が配置されている。   FIG. 2 shows a plan view and a cross-sectional view of the imaging pixel. FIG. 2A is a plan view of 2 × 2 imaging pixels located in the center of the image sensor 107. As described above, two G pixels are arranged at two diagonal positions, and an R pixel and a B pixel are arranged at the other two positions.

図2(a)の断面A−Aを同図(b)に示す。MLは各画素の最前面に配置されたオンチップマイクロレンズであり、CFはR(Red)のカラーフィルタである。CFはG(Green)のカラーフィルタである。PDは図1で説明したCMOSセンサの光電変換部を模式的に示したものである。CLはCMOSセンサ内の各種信号を伝達する信号線を形成するための配線層である。TLは撮影光学系を模式的に示したものである。 FIG. 2B shows a cross section AA of FIG. ML is an on-chip microlens arranged in front of each pixel, CF R denotes a color filter of R (Red). CF G is a color filter of G (Green). PD schematically shows the photoelectric conversion unit of the CMOS sensor described in FIG. CL is a wiring layer for forming signal lines for transmitting various signals in the CMOS sensor. TL schematically shows the photographing optical system.

ここで、撮像用画素のオンチップマイクロレンズMLと光電変換部PDは、撮影光学系TLを通過した光束を可能な限り有効に取り込むように構成されている。換言すると、撮影光学系TLの射出瞳EPと光電変換部PDとがマイクロレンズMLによって共役関係に配置され、さらに光電変換部PDの有効面積が大きく設定されている。なお、図2(b)では、R画素の構造を示しているが、G画素およびB(Blue)画素も同一の構造を有する。したがって、撮像用のRGB画素に対応した射出瞳EPは大きな径を有し、被写体からの光束を効率良く取り込んで、画像信号のS/Nを向上させる。   Here, the on-chip microlens ML and the photoelectric conversion unit PD of the imaging pixel are configured to capture the light flux that has passed through the photographing optical system TL as effectively as possible. In other words, the exit pupil EP of the photographing optical system TL and the photoelectric conversion unit PD are arranged in a conjugate relationship by the microlens ML, and the effective area of the photoelectric conversion unit PD is set to be large. FIG. 2B shows the structure of the R pixel, but the G pixel and the B (Blue) pixel also have the same structure. Therefore, the exit pupil EP corresponding to the RGB pixels for imaging has a large diameter, and efficiently takes in the light flux from the subject to improve the S / N of the image signal.

図3には、撮影光学系の瞳をx方向に分割するための焦点検出用画素の平面図と断面図を示す。同図(a)は、撮像素子107の中央に位置する焦点検出用画素を含む2行×2列の4画素の平面図である。   FIG. 3 shows a plan view and a cross-sectional view of focus detection pixels for dividing the pupil of the photographing optical system in the x direction. FIG. 4A is a plan view of 4 pixels of 2 rows × 2 columns including a focus detection pixel located at the center of the image sensor 107.

撮像信号を得る場合に、G画素からの出力は輝度情報の主成分をなす。人間の画像認識特性は輝度情報に敏感であるため、G画素が欠損すると、画質劣化が認められやすい。一方、R画素もしくはB画素は、色情報を取得する画素であるが、人間は色情報には鈍感であるため、色情報を取得する画素は多少の欠損が生じても画質劣化に気づきにくい。そこで、本実施例では、2行×2列の4画素のうち、2つのG画素は撮像用画素として残し、R画素とB画素の位置に、ある割合で焦点検出用画素を配置している。同図(a)において、焦点検出用画素をSHA,SHBで示す。 When obtaining an imaging signal, the output from the G pixel is the main component of the luminance information. Since human image recognition characteristics are sensitive to luminance information, if G pixels are lost, image quality degradation is likely to be recognized. On the other hand, the R pixel or the B pixel is a pixel that acquires color information. However, since humans are insensitive to color information, pixels that acquire color information are less likely to notice deterioration in image quality even if some loss occurs. Therefore, in this embodiment, two G pixels out of four pixels of 2 rows × 2 columns are left as imaging pixels, and focus detection pixels are arranged at a certain ratio at positions of R pixels and B pixels. . In FIG. 5A, focus detection pixels are denoted by S HA and S HB .

このように撮像素子107に分散配置された複数の焦点検出用画素SHAが第1の画素群に相当し、複数の焦点検出用画素SHBが第2の画素群に相当する。複数の焦点検出用画素SHA,SHBをまとめてと焦点検出画素群ともいう。 In this way, the plurality of focus detection pixels S HA dispersedly arranged in the image sensor 107 correspond to the first pixel group, and the plurality of focus detection pixels SHB correspond to the second pixel group. The plurality of focus detection pixels S HA and S HB are collectively referred to as a focus detection pixel group.

図3(a)の断面B−Bを同図(b)に示す。マイクロレンズMLと光電変換部PDは、図2(b)に示した撮像用画素と同一の構造を有する。   Section (B) of FIG. 3 (a) is shown in FIG. The microlens ML and the photoelectric conversion unit PD have the same structure as the imaging pixel shown in FIG.

本実施例においては、焦点検出用画素の信号は画像生成には用いられないため、色分離用カラーフィルタの代わりに透明膜(白色膜)CFが配置される。 In this embodiment, signals from the focus detection pixel is not used for image generation, a transparent film (white film) CF W instead of a color separation color filter is disposed.

また、x方向の瞳分割を行うため、配線層CLの開口部はマイクロレンズMLの中心線に対してx方向に偏っている。具体的には、焦点検出用画素SHAの開口部OPHAは−x方向に偏っているため、焦点検出用画素SHAの光電変換部PDは、撮影光学系TLの左側(+x側)の射出瞳領域(第1の瞳領域)EPHAを通過した光束を受光する。また、焦点検出用画素SHBの開口部OPHBは+x方向に偏っているため、焦点検出用画素SHBの光電変換部PDは、撮影光学系TLの右側(−x側)の射出瞳領域(第2の瞳領域)EPHBを通過した光束を受光する。 Further, in order to perform pupil division in the x direction, the opening of the wiring layer CL is biased in the x direction with respect to the center line of the microlens ML. Specifically, the opening OP HA of focus detection pixels S HA for biased towards the -x direction, the photoelectric conversion unit PD of the focus detection pixels S HA is the photographic optical system TL left (+ x side) The light beam that has passed through the exit pupil region (first pupil region) EP HA is received. Further, since the biased opening OP HB of the focus detection pixels S HB is in the + x direction, the photoelectric conversion unit PD of the focus detection pixels S HB is an exit pupil area of the right imaging optical system TL (-x side) (Second pupil region) The light beam that has passed through the EP HB is received.

x方向に規則的に配列された複数の焦点検出用画素SHA(第1の画素群)による光電変換で取得した被写体像をA像(第1の像)とする。また、x方向に規則的に配列された複数の焦点検出用画素SHB(第2の画素群)で取得した被写体像をB像(第2の像)とする。そして、A像とB像の相対位置ずれ量(位相差)を検出することで、該位相差に基づいて被写体に対する撮影光学系TLのデフォーカス量を演算することができる。 A subject image acquired by photoelectric conversion by a plurality of focus detection pixels S HA (first pixel group) regularly arranged in the x direction is defined as an A image (first image). A subject image acquired by a plurality of focus detection pixels S HB (second pixel group) regularly arranged in the x direction is defined as a B image (second image). Then, by detecting the relative positional deviation amount (phase difference) between the A image and the B image, the defocus amount of the photographing optical system TL with respect to the subject can be calculated based on the phase difference.

図4は、本実施例における撮像素子107の瞳分割の様子を示す。TLは撮影光学系、107は図1に示す撮像素子、OBJは被写体、IMGは被写体像である。   FIG. 4 shows a state of pupil division of the image sensor 107 in the present embodiment. TL is a photographing optical system, 107 is an image sensor shown in FIG. 1, OBJ is a subject, and IMG is a subject image.

撮像用画素は、図2に示したように、撮影光学系TLの射出瞳EPの全域を通過した光束を受光する。一方、焦点検出用画素のうち図3に示した焦点検出用画素SHAは、射出瞳EPのうち+x側の瞳領域EPHAを通過した光束を受光する。同様に、焦点検出用画素SHBは、射出瞳領域EPHBを通過した光束を受光する。そして、焦点検出用画素を、撮像素子107の全領域にわたって分布させることで、有効撮像エリアの全域で焦点検出が可能となる。 As shown in FIG. 2, the imaging pixel receives the light beam that has passed through the entire exit pupil EP of the imaging optical system TL. On the other hand, the focus detection pixel S HA shown in FIG. 3 among the focus detection pixels receives the light beam that has passed through the pupil region EP HA on the + x side of the exit pupil EP. Similarly, the focus detection pixel S HB receives the light beam that has passed through the exit pupil region EP HB . Then, by distributing the focus detection pixels over the entire area of the image sensor 107, focus detection can be performed over the entire effective image pickup area.

ただし、実際の撮像面位相差AFは、撮像素子107の有効撮像エリアに対応する撮影画面内に複数設けられた焦点検出領域のうち、撮影者により又はカメラCPU121が所定のアルゴリズムに従って選択された1又は2以上の焦点検出領域でのみ行われる。   However, the actual imaging plane phase difference AF is 1 selected by the photographer or by the camera CPU 121 in accordance with a predetermined algorithm from among a plurality of focus detection areas provided in the imaging screen corresponding to the effective imaging area of the imaging device 107. Alternatively, it is performed only in two or more focus detection areas.

また、焦点検出用画素SHA,SHBによって撮影画面のx方向に輝度分布を有した被写体、例えばy方向の伸びる線に対しては焦点検出が可能であるが、y方向に輝度分布を有する被写体、例えばx方向に伸びる線に対しては焦点検出不能である。本実施例では、図示はしないが、後者についても焦点検出できるように、撮影光学系TLのy方向にも瞳分割を行う複数の焦点検出用画素も備えている。 Further, focus detection is possible for a subject having a luminance distribution in the x direction of the photographing screen, for example, a line extending in the y direction, by the focus detection pixels S HA and S HB , but the luminance distribution is in the y direction. Focus detection is impossible for a subject, for example, a line extending in the x direction. In this embodiment, although not shown, a plurality of focus detection pixels that perform pupil division are also provided in the y direction of the photographing optical system TL so that focus detection can be performed for the latter.

さらに、コントラストAFについても、撮影範囲の一部に選択的に設定された領域(後述するコントラスト評価領域)において行われる。
なお、本実施例では焦点検出画素を撮影用の撮像素子に配した構成を例にしているが、焦点検出用の撮像素子を別途設けた構成としてもよい。その場合は、焦点検出用画素の構成は、図3に示す構成に限らず、一つのマイクロレンズに複数の光電変換素子を対応させる瞳分割構成であってもよい。
Further, the contrast AF is also performed in an area (contrast evaluation area described later) that is selectively set to a part of the shooting range.
In this embodiment, the configuration in which the focus detection pixels are arranged in the imaging device for photographing is taken as an example, but a configuration in which an imaging device for focus detection is separately provided may be used. In that case, the configuration of the focus detection pixels is not limited to the configuration illustrated in FIG. 3, and may be a pupil division configuration in which a plurality of photoelectric conversion elements are associated with one microlens.

図5のフローチャートには、本実施例において、カメラCPU121がコンピュータプログラムに従って実行するAF動作の流れを示している。撮影者がカメラ本体の電源スイッチをオン操作すると、カメラCPU121は、カメラ138本体内のアクチュエータ(シャッタアクチュエータ140等)や撮像素子107の動作確認を行う。さらに、カメラCPU121は、メモリ内容や実行プログラムの初期化を行い、撮像面位相差AFが行われる焦点検出領域として選択されている焦点検出領域等、AFに必要な情報を読み出す。撮像面位相差AFが行われる焦点検出領域を、以下、位相差検出領域という。   The flowchart of FIG. 5 shows the flow of the AF operation that the camera CPU 121 executes according to the computer program in this embodiment. When the photographer turns on the power switch of the camera body, the camera CPU 121 confirms the operation of the actuator (such as the shutter actuator 140) and the image sensor 107 in the camera 138 body. Further, the camera CPU 121 initializes the memory contents and the execution program, and reads information necessary for AF, such as a focus detection area selected as a focus detection area where the imaging plane phase difference AF is performed. The focus detection area where the imaging plane phase difference AF is performed is hereinafter referred to as a phase difference detection area.

ステップS501では、カメラCPU121は、レンズ通信回路135を介して交換レンズ137内のカメラ通信回路136と通信を行う。カメラCPU121は、この通信によって交換レンズ137の動作確認を行い、交換レンズ137内のメモリ内容や実行プログラムの初期化を行う。また、カメラCPU121は、AFや撮影に必要な交換レンズ137の諸特性データを取得し、カメラ内メモリ144に保存する。そして、ステップS502へと進む。   In step S <b> 501, the camera CPU 121 communicates with the camera communication circuit 136 in the interchangeable lens 137 via the lens communication circuit 135. The camera CPU 121 confirms the operation of the interchangeable lens 137 through this communication, and initializes the memory contents in the interchangeable lens 137 and the execution program. Further, the camera CPU 121 acquires various characteristic data of the interchangeable lens 137 necessary for AF and photographing, and stores it in the in-camera memory 144. Then, the process proceeds to step S502.

ステップS502では、カメラCPU121は、撮影者によって不図示の撮像準備スイッチ(S1)がオンされたか否かを判別し、オンされていなければステップS502にて撮像待機状態を維持する。一方、撮像準備スイッチがオンされた場合、ステップS503に進む。   In step S502, the camera CPU 121 determines whether or not an imaging preparation switch (S1) (not shown) has been turned on by the photographer. If not, the camera CPU 121 maintains the imaging standby state in step S502. On the other hand, when the imaging preparation switch is turned on, the process proceeds to step S503.

ステップS503では、カメラCPU121は、シャッタアクチュエータ140を駆動してシャッタ139を開放し、撮像素子107による光電変換動作を開始させる。   In step S503, the camera CPU 121 drives the shutter actuator 140 to open the shutter 139, and starts the photoelectric conversion operation by the image sensor 107.

次にステップS504では、カメラCPU121は、位相差検出領域の設定を行う。撮影者の設定により、1つ、もしくは、複数の位相差検出領域が設定される。   In step S504, the camera CPU 121 sets a phase difference detection area. One or a plurality of phase difference detection areas are set according to the setting of the photographer.

本発明では、撮影者が設定した位相差検出領域と、ステップS501で得たレンズ情報から算出されるディストーション情報から、焦点検出用画素の領域サイズ(画素数)およびその位置の設定を行う。   In the present invention, the region size (number of pixels) and the position of the focus detection pixel are set from the phase difference detection region set by the photographer and the distortion information calculated from the lens information obtained in step S501.

図6(a)には、撮影者が設定した位相差検出領域の例を示している。図6(b)には、ディストーションの影響により、位相差検出領域の位置やサイズ(画素数)などを変更した場合の例を示している。   FIG. 6A shows an example of the phase difference detection area set by the photographer. FIG. 6B shows an example in which the position or size (number of pixels) of the phase difference detection region is changed due to the influence of distortion.

図6(a)のArea101〜105は、撮影者が設定したは位相差検出領域である。撮影者は、表示器131に表示された撮影光学系の各種収差が補正された画像に重畳した検出領域の表示枠を選択する。図6(a)では、Aera101〜105を水平方向に長い長方形で示しているが、これは、被写体の水平方向の位相差を検出できる位相差検出領域を示したもので、表示器131で表示する表示枠と、必ずしも一致しない。本実施例では、水平方向、垂直方向共に被写体の位相差を検出できる構成であるので、両方の位相差検出領域の交点を中心とした表示を行えばよい。ここでは、5か所の位相差検出領域を設定し、位相差検出AFを行う。図6(b)のArea101h〜105hは、レンズ情報から算出されるディストーション情報と、撮影者が設定した位相差検出領域Area101〜105の位置とサイズの情報から、算出される撮像素子107上の位相差検出領域(焦点検出用が画素の読み出し範囲)である。   Areas 101 to 105 in FIG. 6A are phase difference detection areas set by the photographer. The photographer selects the display frame of the detection area superimposed on the image in which various aberrations of the photographing optical system displayed on the display 131 are corrected. In FIG. 6A, Aera 101 to 105 are indicated by rectangles that are long in the horizontal direction, but this indicates a phase difference detection area that can detect the phase difference in the horizontal direction of the subject, and is displayed on the display 131. Does not necessarily match the display frame to be displayed. In this embodiment, since the phase difference of the subject can be detected both in the horizontal direction and in the vertical direction, display centering on the intersection of both phase difference detection areas may be performed. Here, five phase difference detection areas are set, and phase difference detection AF is performed. Areas 101h to 105h in FIG. 6B are the positions on the image sensor 107 calculated from the distortion information calculated from the lens information and the position and size information of the phase difference detection areas Area101 to 105 set by the photographer. This is a phase difference detection area (focus detection is a pixel readout range).

図6(b)に示すように、撮影画面の中央部分の位相差検出領域Area103は、ディストーションの影響をほとんど受ない。他方、像高の高い位置に配置された位相差検出領域Area101,102,104,105は、ディストーションの影響を受け、サイズや位置、傾きが変更されている。この情報に基づき、カメラCPU(フォーカス制御手段)121は、撮像素子107上の焦点検出画素のうち、位相差検出領域Area101h〜105hと重なる部分の画素の出力を用いた位相差フォーカス制御を行う。   As shown in FIG. 6B, the phase difference detection area Area103 at the center of the shooting screen is hardly affected by the distortion. On the other hand, the phase difference detection areas Area101, 102, 104, and 105 arranged at high image height positions are changed in size, position, and inclination under the influence of distortion. Based on this information, the camera CPU (focus control means) 121 performs phase difference focus control using the output of the pixels of the focus detection pixels on the image sensor 107 that overlap the phase difference detection areas Area101h to 105h.

位相差フォーカス制御の際に行う検出されたデフォーカス量とレンズ駆動量の換算は下記の式を用いて行う。
L=K×cosθ×Def (式1)
ここで、Lはレンズ駆動量、Defは検出されたデフォーカス量、Kはデフォーカス量とレンズ駆動量の換算係数を示している。また、θは、焦点検出用画素の瞳分割方向(図6の水平方向)とディストーション補正後の位相差検出領域(Area101h〜105h)の形成する角度(鋭角)を示す。これは、撮影光学系により形成される光学像の焦点検出用画素出力の重心は、デフォーカスにより焦点検出画素の瞳分割方向に移動する一方、焦点検出に用いる画素群が、水平に対して、傾いて配置されているため、その移動量は大きく算出される。例えば、瞳分割方向が水平の画素群が、45度傾いた位相差検出領域を形成した場合には、デフォーカスによる光学像の移動は、√2倍されて検出される。そのため、本実施例では、ディストーション補正後の位相差検出領域の傾きを鑑みて、デフォーカス量とレンズ駆動量の換算係数を補正する。これにより、より高精度な位相差フォーカス制御を実現することができる。
Conversion of the detected defocus amount and lens driving amount performed in the phase difference focus control is performed using the following equation.
L = K × cos θ × Def (Formula 1)
Here, L represents a lens driving amount, Def represents a detected defocus amount, and K represents a conversion coefficient between the defocus amount and the lens driving amount. Further, θ represents the angle (acute angle) formed by the pupil division direction (horizontal direction in FIG. 6) of the focus detection pixels and the phase difference detection areas (Area 101h to 105h) after distortion correction. This is because the center of gravity of the focus detection pixel output of the optical image formed by the photographing optical system moves in the pupil division direction of the focus detection pixel by defocusing, while the pixel group used for focus detection is horizontal, Since they are arranged at an inclination, the amount of movement is largely calculated. For example, when a pixel group whose pupil division direction is horizontal forms a phase difference detection region inclined by 45 degrees, the movement of the optical image due to defocusing is detected by multiplying by √2. Therefore, in this embodiment, the conversion factor between the defocus amount and the lens driving amount is corrected in consideration of the inclination of the phase difference detection region after distortion correction. Thereby, more accurate phase difference focus control can be realized.

次に、ステップS505では、カメラCPU121は、選択されている位相差検出領域内に含まれる被写体(以下、合焦対象の被写体という)に対して撮像面位相差AFを行う。すなわち、位相差検出領域内の焦点検出画素群から出力を用いて得られる一対の像信号の位相差からデフォーカス量を算出する。選択されている位相差検出領域が複数ある場合は、算出されたデフォーカス量から、より至近側の被写体を示す位相差検出領域を選択し、該デフォーカス量から合焦近傍位置までの第3レンズ群105の駆動量を算出する。   Next, in step S505, the camera CPU 121 performs imaging plane phase difference AF on a subject included in the selected phase difference detection region (hereinafter referred to as a subject to be focused). That is, the defocus amount is calculated from the phase difference between a pair of image signals obtained using the output from the focus detection pixel group in the phase difference detection region. When there are a plurality of selected phase difference detection areas, a phase difference detection area indicating a closer subject is selected from the calculated defocus amount, and the third difference from the defocus amount to the near focus position is selected. The driving amount of the lens group 105 is calculated.

そして、ステップS507では、カメラCPU121は、ステップS506にて算出したデフォーカス量が、合焦近傍状態に対応する所定値である閾値より小さいか否かを判定する。すなわち、AF方式を、撮像面位相差AFからコントラストAFに切り替えるか否かを判定する。デフォーカス量が閾値よりも小さい場合は、コントラストAFに切り替えるためにステップS508に進む。一方、デフォーカス量が閾値よりも大きい(又は以上の)場合は、ステップS506に進み、カメラCPU121は、ステップS505で算出した駆動量だけ第3レンズ群105を移動させるようフォーカスアクチュエータ114を駆動する。その後、再び、ステップS503に戻り、撮像面位相差AF制御を繰り返す。   In step S507, the camera CPU 121 determines whether the defocus amount calculated in step S506 is smaller than a threshold that is a predetermined value corresponding to the in-focus vicinity state. That is, it is determined whether or not the AF method is switched from the imaging surface phase difference AF to the contrast AF. If the defocus amount is smaller than the threshold, the process proceeds to step S508 to switch to contrast AF. On the other hand, if the defocus amount is larger (or more) than the threshold value, the process proceeds to step S506, and the camera CPU 121 drives the focus actuator 114 to move the third lens group 105 by the drive amount calculated in step S505. . Thereafter, the process returns to step S503 again, and the imaging surface phase difference AF control is repeated.

本実施例では、ステップS504で行う位相差検出領域を再度設定する際には、事前の撮像面位相差AF及びレンズ駆動の状況を鑑みた位相差検出領域の設定を行う。この位相差検出領域の設定方法について、図7を用いて説明する。   In the present embodiment, when the phase difference detection area set in step S504 is set again, the phase difference detection area is set in consideration of the imaging surface phase difference AF and the lens driving situation in advance. A method for setting the phase difference detection area will be described with reference to FIG.

図7(a)には、位相差検出領域の位置やサイズを変更しない場合の例を示している。図7(b)には、ステップS104にて位相差検出領域の位置やサイズを変更する場合の例を示している。   FIG. 7A shows an example in which the position and size of the phase difference detection area are not changed. FIG. 7B shows an example in which the position and size of the phase difference detection area are changed in step S104.

Area201h,Area202h,Area202zは撮像素子107上の位相差検出領域である。Area202hはデフォーカス量が大きい位相差出領域を、Area202zはデフォーカス量が小さい位相差検出領域を示している。   Area 201h, Area 202h, and Area 202z are phase difference detection areas on the image sensor 107. Area 202h represents a phase difference detection area with a large defocus amount, and Area 202z represents a phase difference detection area with a small defocus amount.

図7(a)に示すように撮影画面の中央部分で焦点検出を行う場合、位相差検出領域Area201hはデフォーカス量が変わっても、つまりデフォーカス量に応じた第3レンズ群105の移動(以下、フォーカスレンズ駆動という)で像倍率が変化しても変化しない。言い換えれば、フォーカスレンズ駆動によって像倍率が変化しても、撮影画面の中央に存在する被写体は撮影画面の中央部分から変位しない。このため、カメラCPU121は、再度、位相差検出領域を設定する際に、Area201hと同じ位置に同じサイズの位相差検出領域を設定する。   As shown in FIG. 7A, when focus detection is performed at the center portion of the shooting screen, even if the defocus amount changes in the phase difference detection area Area 201h, that is, the movement of the third lens group 105 according to the defocus amount ( Hereinafter, it does not change even if the image magnification is changed by driving the focus lens). In other words, even if the image magnification is changed by driving the focus lens, the subject existing at the center of the shooting screen is not displaced from the center portion of the shooting screen. For this reason, when the camera CPU 121 sets the phase difference detection area again, it sets the phase difference detection area of the same size at the same position as the Area 201h.

一方、図7(b)に示すように撮影画面の周辺部分で焦点検出を行う場合、位相差検出領域Area202hは、デフォーカス量が大きく変化するような大きなフォーカスレンズ駆動による像倍率の変化によって位相差検出領域Area202zに移動する。言い換えれば、フォーカスレンズ駆動によって像倍率が変化することで、撮影画面の周辺に存在した被写体は撮影画面の中央寄りに変位する。このため、カメラCPU121は、ステップS504を実行するたびに設定されている位相差検出領域の位置と像倍率の変化量に基づいて被写体の変位量を決定する。そして、決定した変位量および現在の焦点領域の位置に基づいて位相差検出領域の位置を変更するかどうかを判断し、その結果に従って再設定を行なう。   On the other hand, as shown in FIG. 7B, when focus detection is performed in the peripheral portion of the shooting screen, the phase difference detection area Area202h is positioned by the change in the image magnification caused by the large focus lens drive that greatly changes the defocus amount. It moves to the phase difference detection area Area202z. In other words, when the image magnification is changed by driving the focus lens, the subject existing around the shooting screen is displaced toward the center of the shooting screen. For this reason, the camera CPU 121 determines the amount of displacement of the subject based on the position of the phase difference detection area and the amount of change in image magnification each time step S504 is executed. Then, it is determined whether to change the position of the phase difference detection area based on the determined displacement amount and the current position of the focal area, and resetting is performed according to the result.

ステップS508では、カメラCPU121は、ステップS505で算出した駆動量から、コントラストAFへの切り替えポイントまで、第3レンズ群105を移動させるようフォーカスアクチュエータ114を駆動する。ここでは、コントラストAFへの切り替えを行うため、算出されたデフォーカス量よりも、少ない駆動量で駆動を行うことにより、合焦地点を通り過ぎることのないスムーズな切り替えを実現できる。   In step S508, the camera CPU 121 drives the focus actuator 114 to move the third lens group 105 from the drive amount calculated in step S505 to the switching point to contrast AF. Here, since switching to contrast AF is performed, smooth switching without passing through the in-focus point can be realized by driving with a driving amount smaller than the calculated defocus amount.

次に、ステップS509では、カメラCPU121は、コントラストAFを開始する直前のステップS505にて算出したデフォーカス量から、コントラストAFにおけるコントラスト評価値を取得する領域(以下、コントラスト評価領域という)の位置やサイズを変更するか否かを判定する。すなわち、コントラストAFを開始する直前のステップS505で算出したデフォーカス量が所定の閾値より大きい場合は、ステップS508での第3レンズ群105の移動や、その後のコントラストAFを行う際の第3レンズ群105の駆動に伴う像倍率の変化によって撮影画面内で合焦対象の被写体が変位し、ステップS504での位相差検出領域から外れるとみなす。この場合は、コントラスト評価領域の位置やサイズを変更すると判定する。一方、デフォーカス量が上記閾値より小さい場合は、像倍率が変化しても撮影画面内で合焦対象の被写体がほとんど変位せず、ステップS504での位相差検出領域に存在するとみなす。この場合は、コントラスト評価領域の位置やサイズを変更しないと判定する。   Next, in step S509, the camera CPU 121 determines the position of an area (hereinafter referred to as a contrast evaluation area) for acquiring a contrast evaluation value in contrast AF from the defocus amount calculated in step S505 immediately before starting contrast AF. Determine whether to change the size. That is, when the defocus amount calculated in step S505 immediately before the start of contrast AF is larger than the predetermined threshold, the third lens 105 is moved when the third lens group 105 is moved in step S508 or the subsequent contrast AF is performed. It is considered that the subject to be focused is displaced in the shooting screen due to the change in image magnification accompanying the driving of the group 105 and is out of the phase difference detection area in step S504. In this case, it is determined that the position or size of the contrast evaluation area is changed. On the other hand, when the defocus amount is smaller than the threshold value, it is considered that the subject to be focused is hardly displaced in the shooting screen even if the image magnification is changed, and is present in the phase difference detection region in step S504. In this case, it is determined that the position and size of the contrast evaluation area are not changed.

コントラスト評価領域の位置やサイズを変更しないと判定した場合は、カメラCPU121は、コントラスト評価領域の位置をステップS504での位相差検出領域と同じ位置に設定し、サイズも予め定められた標準サイズ(所定のサイズ)に設定する。その後、ステップS110に移行する。   If it is determined that the position or size of the contrast evaluation area is not changed, the camera CPU 121 sets the position of the contrast evaluation area to the same position as the phase difference detection area in step S504, and the size is also a predetermined standard size ( Set to a predetermined size). Thereafter, the process proceeds to step S110.

一方、コントラスト評価領域の位置やサイズを変更すると判定した場合は、カメラCPU121は、ステップS511に進む。ステップS511では、カメラCPU121は、ステップS505で得られたデフォーカス量とステップS501で得られたレンズ情報とから、像倍率の変化によって変位した合焦対象の被写体の変位量を算出する。そして、その算出結果に基づいてコントラスト評価領域の位置やサイズを変更(設定)する。   On the other hand, if it is determined that the position or size of the contrast evaluation area is to be changed, the camera CPU 121 proceeds to step S511. In step S511, the camera CPU 121 calculates the displacement amount of the subject to be focused that has been displaced by the change in the image magnification, from the defocus amount obtained in step S505 and the lens information obtained in step S501. Then, the position and size of the contrast evaluation area are changed (set) based on the calculation result.

図8(a)には、コントラスト評価領域の位置やサイズを変更しない場合の例を示している。図8(b)には、ステップS511にてコントラスト評価領域の位置やサイズを変更する場合の例を示している。   FIG. 8A shows an example in which the position and size of the contrast evaluation area are not changed. FIG. 8B shows an example in which the position and size of the contrast evaluation area are changed in step S511.

Area01,Area11,Area11’は位相差検出領域である。本実施例では、水平垂直の両方向に位相差検出可能なため、Area01,Area11,Area11’は、水平垂直の両方向の位相差検出領域の交点近傍の領域を示している。Area11はデフォーカス量が大きい位相差出領域を、Area11’はデフォーカス量が小さい位相差検出領域を示している。Area02,Area12は、コントラストAFでの標準サイズのコントラスト評価領域である。   Area01, Area11, and Area11 'are phase difference detection areas. In this embodiment, the phase difference can be detected in both the horizontal and vertical directions, so Area 01, Area 11, and Area 11 ′ indicate areas near the intersection of the phase difference detection areas in both the horizontal and vertical directions. Area 11 indicates a phase difference area with a large defocus amount, and Area 11 ′ indicates a phase difference detection area with a small defocus amount. Area02 and Area12 are standard size contrast evaluation areas in contrast AF.

図8(a)に示すように撮影画面の中央部分で焦点検出を行う場合、位相差検出領域Area01はデフォーカス量が変わっても、つまりデフォーカス量に応じた第3レンズ群105の移動(以下、フォーカスレンズ駆動という)で像倍率が変化しても変化しない。言い換えれば、フォーカスレンズ駆動によって像倍率が変化しても、撮影画面の中央に存在する被写体は撮影画面の中央部分から変位しない。このため、カメラCPU121は、AF方式を撮像面位相差AFからコントラストAFに切り替えたときのコントラスト評価領域を、位相差検出領域Aerea01と同じ位置のコントラスト評価領域Area02に設定する。すなわち、位相差検出領域Aerea01を包含するようにコントラスト評価領域Area02に設定する。   As shown in FIG. 8A, when focus detection is performed at the center portion of the shooting screen, even if the defocus amount changes in the phase difference detection area Area01, that is, the movement of the third lens group 105 according to the defocus amount ( Hereinafter, it does not change even if the image magnification is changed by driving the focus lens). In other words, even if the image magnification is changed by driving the focus lens, the subject existing at the center of the shooting screen is not displaced from the center portion of the shooting screen. Therefore, the camera CPU 121 sets the contrast evaluation area when the AF method is switched from the imaging surface phase difference AF to the contrast AF to the contrast evaluation area Area02 at the same position as the phase difference detection area Aerea01. That is, the contrast evaluation area Area02 is set so as to include the phase difference detection area Areaa01.

一方、図8(b)に示すように撮影画面の周辺部分で焦点検出を行う場合、位相差検出領域Area11は、デフォーカス量が大きく変化するような大きなフォーカスレンズ駆動による大きな像倍率の変化によって位相差検出領域Area11’に移動する。言い換えれば、フォーカスレンズ駆動によって像倍率が変化することで、撮影画面の周辺に存在した被写体は撮影画面の中央寄りに変位する。このため、カメラCPU121は、AF方式を撮像面位相差AFからコントラストAFに切り替えたときのコントラスト評価領域を撮像面位相差AF後の位相差検出領域Area11’を包含するコントラスト評価領域Area12に設定する。   On the other hand, when focus detection is performed in the peripheral portion of the shooting screen as shown in FIG. 8B, the phase difference detection area Area11 is caused by a large change in image magnification due to a large focus lens drive that greatly changes the defocus amount. Move to the phase difference detection area Area11 ′. In other words, when the image magnification is changed by driving the focus lens, the subject existing around the shooting screen is displaced toward the center of the shooting screen. For this reason, the camera CPU 121 sets the contrast evaluation area when the AF method is switched from the imaging plane phase difference AF to the contrast AF to the contrast evaluation area Area12 including the phase difference detection area Area11 ′ after the imaging plane phase difference AF. .

なお、ここにいう「包含」は、位相差検出領域の一部がコントラスト評価領域からはみ出さず、位相差検出領域の全体がコントラスト評価領域内に完全に含まれている状態をいう。さらに、この場合において、位相差検出領域の中心とコントラスト評価領域の中心とが一致するとより好ましい。   Note that “inclusion” here means a state in which a part of the phase difference detection region does not protrude from the contrast evaluation region, and the entire phase difference detection region is completely included in the contrast evaluation region. Furthermore, in this case, it is more preferable that the center of the phase difference detection region and the center of the contrast evaluation region coincide.

図5のステップS510では、カメラCPU121は、ステップS509又はステップS511で設定されたコントラスト評価領域内においてコントラストAFを行う。そして、コントラストAFによって合焦状態が得られると、一連のAF処理を完了し、不図示の撮像開始スイッチがオンされることに応じて、記録用画像を生成し、これを記録したり表示したりする。   In step S510 of FIG. 5, the camera CPU 121 performs contrast AF within the contrast evaluation area set in step S509 or step S511. When the in-focus state is obtained by contrast AF, a series of AF processing is completed, and a recording image is generated in response to turning on an imaging start switch (not shown), and this is recorded or displayed. Or

以上説明したように、本実施例によれば、撮像面位相差AFによって合焦対象の被写体に対応する位相差検出領域が移動しても、再度、焦点検出を行う際に該移動後の位相差検出領域を包含するように焦点検出領域を設定することができる。したがって、より高精度なAF制御が可能となる。   As described above, according to the present embodiment, even when the phase difference detection area corresponding to the subject to be focused is moved by the imaging surface phase difference AF, the position after the movement is again performed when focus detection is performed again. The focus detection area can be set so as to include the phase difference detection area. Therefore, more accurate AF control is possible.

また、撮影光学系のディストーションの影響を、位相差検出領域の設定、デフォーカス量とレンズ駆動量の換算係数の補正を行うことで排除することにより、より高精度なAF制御が可能となる。   Further, by eliminating the influence of the distortion of the photographing optical system by setting the phase difference detection area and correcting the conversion coefficient between the defocus amount and the lens driving amount, more accurate AF control can be performed.

本発明の第2の実施例について説明する。本実施例の焦点検出装置を適用した撮像装置の構成は第1の実施例と同様であるので、ここでの説明は省略する。本実施例では、顔検出を用いて位相差検出領域を設定し、この設定領域に対して撮像面位相差AFを繰り返し行い、撮像面位相差AFからコントラストAFに切り替えを行なう。   A second embodiment of the present invention will be described. Since the configuration of the imaging apparatus to which the focus detection apparatus of the present embodiment is applied is the same as that of the first embodiment, description thereof is omitted here. In this embodiment, a phase difference detection area is set using face detection, imaging surface phase difference AF is repeatedly performed on the setting area, and switching from imaging surface phase difference AF to contrast AF is performed.

図9のフローチャートには、本実施例に係る焦点検出装置を適用した撮像装置において、カメラCPU121がコンピュータプログラムに従って実行するAF動作の流れを示している。   The flowchart in FIG. 9 shows the flow of the AF operation that the camera CPU 121 executes according to the computer program in the imaging apparatus to which the focus detection apparatus according to the present embodiment is applied.

ステップS901からステップS903までの処理は、第1の実施例(図5)のステップS501からステップS503までの処理と同様であるので、ここでの説明を省略する。   Since the processing from step S901 to step S903 is the same as the processing from step S501 to step S503 in the first embodiment (FIG. 5), description thereof is omitted here.

ステップS904では、カメラCPU121は、被写体検出手段として、撮影画面内に存在する特定被写体としての人物の顔を検出する顔検出処理を行う。顔検出処理の方法は、従来様々な方法が提案されており、本実施例ではいずれの方法を採用してもよい。また、特定被写体は、人物の顔に限られない。   In step S904, the camera CPU 121 performs face detection processing for detecting a human face as a specific subject existing in the shooting screen as subject detection means. Various methods of face detection processing have been proposed in the past, and any method may be adopted in this embodiment. The specific subject is not limited to a person's face.

次にステップS905では、カメラCPU121は、ステップS904で検出した顔の位置情報を用いて、撮像面位相差AFの検出領域の設定を行う。すなわち、ディストーション補正後の顔の位置に対応する位相差検出領域に含まれる焦点検出画素群を設定する。次に、ステップS906では、設定した画素群からの出力を用いて得られる一対の像信号の位相差からデフォーカス量を算出し、該デフォーカス量から合焦近傍位置までの第3レンズ群105の駆動量を算出する。そして、ステップS908に進む。   In step S905, the camera CPU 121 sets a detection area for the imaging plane phase difference AF using the face position information detected in step S904. That is, the focus detection pixel group included in the phase difference detection area corresponding to the face position after distortion correction is set. Next, in step S906, a defocus amount is calculated from a phase difference between a pair of image signals obtained using the output from the set pixel group, and the third lens group 105 from the defocus amount to a position near the in-focus position. Is calculated. Then, the process proceeds to step S908.

そして、ステップS908では、実施例1のステップS507と同様に、AF方式を、撮像面位相差AFからコントラストAFに切り替えるか否かを判定する。デフォーカス量が閾値よりも小さい場合は、コントラストAFに切り替えるためにステップS910に進む。一方、デフォーカス量が閾値よりも大きい(又は以上の)場合は、ステップS907に進み、カメラCPU121は、ステップS906で算出した駆動量だけ第3レンズ群105を移動させるようフォーカスアクチュエータ114を駆動する。その後、再び、ステップS903に戻り、撮像面位相差AF制御を繰り返す。この繰り返しにおける位相差検出領域を再設定するかどうかの判断は第1の実施例と同様であるので、ここでの説明は省略する。   In step S908, as in step S507 of the first embodiment, it is determined whether or not the AF method is switched from the imaging surface phase difference AF to the contrast AF. If the defocus amount is smaller than the threshold value, the process proceeds to step S910 to switch to contrast AF. On the other hand, if the defocus amount is larger (or more) than the threshold value, the process advances to step S907, and the camera CPU 121 drives the focus actuator 114 so as to move the third lens group 105 by the drive amount calculated in step S906. . Thereafter, the process returns to step S903 again, and the imaging surface phase difference AF control is repeated. The determination of whether or not to reset the phase difference detection area in this repetition is the same as in the first embodiment, and thus the description thereof is omitted here.

ここで、本実施例での顔検出からステップS905で行う位相差検出領域を再度設定する際や、顔検出からコントラストAFにおけるコントラスト評価領域の設定する際の概略を図10を用いて説明する。図10には、評価領域の位置やサイズを変更しない場合の例を示している。   Here, an outline of setting the phase difference detection area performed in step S905 from the face detection in this embodiment again or setting the contrast evaluation area in the contrast AF from the face detection will be described with reference to FIG. FIG. 10 shows an example in which the position and size of the evaluation area are not changed.

Area21,Area21’は撮像面位相差AFの焦点検出領域(位相差検出領域)である。Area22は、再度設定する際の撮像面位相差AFの位相差検出領域、もしくは、切り替え後のコントラストAFのコントラスト評価領域である。Area21はデフォーカス量が大きい位相差検出領域を、Area21’はデフォーカス量が小さい位相差検出領域を示している。   Area 21 and Area 21 'are focus detection areas (phase difference detection areas) of the imaging plane phase difference AF. Area 22 is a phase difference detection area of imaging plane phase difference AF when setting again, or a contrast evaluation area of contrast AF after switching. Area 21 indicates a phase difference detection region with a large defocus amount, and Area 21 ′ indicates a phase difference detection region with a small defocus amount.

図10に点線で示したように、撮影画面の周辺部に特定被写体である顔がある場合には、フォーカスレンズ駆動による像倍率の変化によって顔が撮影画面の中央寄りに変位するため、顔の位置に対応する位相差検出領域は、Area21からArea21’に移動する。本実施例では、このような場合、再度設定する際の撮像面位相差AFの位相差検出領域やコントラスト評価領域Area22を位相差検出領域Area21とArea21’とをともに包含するように設定される。これにより、特定被写体の位置の変位があっても、焦点検出精度を維持すること可能となる。   As shown by the dotted line in FIG. 10, when there is a face that is a specific subject in the periphery of the shooting screen, the face is displaced closer to the center of the shooting screen due to the change in image magnification caused by the focus lens drive. The phase difference detection area corresponding to the position moves from Area 21 to Area 21 ′. In this embodiment, in such a case, the phase difference detection area of the imaging plane phase difference AF and the contrast evaluation area Area22 when set again are set so as to include both the phase difference detection areas Area21 and Area21 '. This makes it possible to maintain focus detection accuracy even when the position of the specific subject is displaced.

ステップS909からステップS912までの処理は、実施例1のステップS508からステップS511までの処理と同様であるので、ここで説明は省略する。そして、ステップS911にてコントラストAFによって合焦状態が得られると、一連の撮影動作を完了し、不図示の撮像開始スイッチがオンされることに応じて、記録用画像を生成し、これを記録したり表示したりする。   Since the processing from step S909 to step S912 is the same as the processing from step S508 to step S511 of the first embodiment, description thereof is omitted here. When the in-focus state is obtained by contrast AF in step S911, a series of shooting operations is completed, and a recording image is generated and recorded in response to turning on an imaging start switch (not shown). And display.

以上説明したように、本実施例によれば、撮像面位相差AFによって合焦対象の顔に対応する位相差検出領域が移動しても、その後の撮像面位相差AFの際に該移動前後の位相差検出領域を包含するように、撮像面位相差AFの位相差検出領域を設定する。したがって、より高精度な位相差AFやAF制御が可能となる。   As described above, according to the present embodiment, even if the phase difference detection area corresponding to the face to be focused is moved by the imaging plane phase difference AF, before and after the movement in the subsequent imaging plane phase difference AF. The phase difference detection area of the imaging plane phase difference AF is set so as to include the phase difference detection area of the imaging plane. Therefore, more accurate phase difference AF and AF control are possible.

なお、システム制御回路1の制御は1つのハードウェアが行ってもよいし、複数のハードウェアが処理を分担することで、装置全体の制御を行ってもよい。   The control of the system control circuit 1 may be performed by one hardware, or the entire apparatus may be controlled by a plurality of hardware sharing the processing.

また、上述した実施形態においては、本発明をデジタルカメラに適用した場合を例にして説明したが、これはこの例に限定されない。すなわち、本発明は、ビデオカメラ等の撮像装置や、焦点検出機能を添えた撮像装置とコンピュータからなるシステムといった機器に適用してもよい。   Further, in the above-described embodiment, the case where the present invention is applied to a digital camera has been described as an example, but this is not limited to this example. That is, the present invention may be applied to devices such as an imaging device such as a video camera, or a system including an imaging device with a focus detection function and a computer.

前述した本発明の実施形態における記録装置を構成する各手段、並びに記録方法の各工程は、コンピュータのRAMやROMなどに記憶されたプログラムが動作することによって実現できる。このプログラム及び前記プログラムを記憶したコンピュータ読み取り可能な記憶媒体は本発明に含まれる。   Each means constituting the recording apparatus and each step of the recording method in the embodiment of the present invention described above can be realized by operating a program stored in a RAM or ROM of a computer. This program and a computer-readable storage medium storing the program are included in the present invention.

また、本発明は、例えば、システム、装置、方法、プログラムもしくは記憶媒体等としての実施形態も可能であり、具体的には、複数の機器から構成されるシステムに適用してもよいし、また、一つの機器からなる装置に適用してもよい。   In addition, the present invention can be implemented as, for example, a system, apparatus, method, program, storage medium, or the like. Specifically, the present invention may be applied to a system including a plurality of devices. The present invention may be applied to an apparatus composed of a single device.

なお、本発明は、前述した実施形態の機能を実現するソフトウェアのプログラム(実施形態では図5及び図9に示すフローチャートに対応したプログラム)を、システムまたは装置に直接、または遠隔から供給する場合も含む。そして、そのシステムまたは装置のコンピュータが前記供給されたプログラムコードを読み出して実行することによっても達成される場合を含む。   In the present invention, a software program for realizing the functions of the above-described embodiments (in the embodiment, a program corresponding to the flowcharts shown in FIGS. 5 and 9) may be supplied directly or remotely to the system or apparatus. Including. This includes the case where the system or the computer of the apparatus is also achieved by reading and executing the supplied program code.

したがって、本発明の機能処理をコンピュータで実現するために、前記コンピュータにインストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明は、本発明の機能処理を実現するためのコンピュータプログラム自体も含まれる。その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等の形態であってもよい。   Accordingly, since the functions of the present invention are implemented by computer, the program code installed in the computer also implements the present invention. In other words, the present invention includes a computer program itself for realizing the functional processing of the present invention. In that case, as long as it has the function of a program, it may be in the form of object code, a program executed by an interpreter, script data supplied to the OS, and the like.

プログラムを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスクなどがある。さらに、MO、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード、ROM、DVD(DVD−ROM、DVD−R)などもある。   Examples of the storage medium for supplying the program include a flexible disk, a hard disk, an optical disk, and a magneto-optical disk. Further, there are MO, CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, DVD (DVD-ROM, DVD-R) and the like.

その他、プログラムの供給方法としては、クライアントコンピュータのブラウザを用いてインターネットのホームページに接続する方法がある。そして、前記ホームページから本発明のコンピュータプログラムそのもの、もしくは圧縮され自動インストール機能を含むファイルをハードディスク等の記憶媒体にダウンロードすることによっても供給できる。   As another program supply method, there is a method of connecting to a homepage on the Internet using a browser of a client computer. It can also be supplied by downloading the computer program itself of the present invention or a compressed file including an automatic installation function from a homepage to a storage medium such as a hard disk.

また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバも、本発明に含まれるものである。   It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different homepage. That is, a WWW server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer is also included in the present invention.

また、その他の方法として、本発明のプログラムを暗号化してCD−ROM等の記憶媒体に格納してユーザに配布し、所定の条件をクリアしたユーザに対し、インターネットを介してホームページから暗号化を解く鍵情報をダウンロードさせる。そして、その鍵情報を使用することにより暗号化されたプログラムを実行してコンピュータにインストールさせて実現することも可能である。   As another method, the program of the present invention is encrypted, stored in a storage medium such as a CD-ROM, distributed to users, and encrypted from a homepage via the Internet to users who have cleared predetermined conditions. Download the key information to be solved. It is also possible to execute the encrypted program by using the key information and install the program on a computer.

また、コンピュータが、読み出したプログラムを実行することによって、前述した実施形態の機能が実現される。さらに、そのプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行い、その処理によっても前述した実施形態の機能が実現され得る。   Further, the functions of the above-described embodiments are realized by the computer executing the read program. Furthermore, based on the instructions of the program, an OS or the like running on the computer performs part or all of the actual processing, and the functions of the above-described embodiments can be realized by the processing.

さらに、その他の方法として、まず記憶媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれる。そして、そのプログラムの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によっても前述した実施形態の機能が実現される。   As another method, a program read from a storage medium is first written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. Then, based on the instructions of the program, the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are also realized by the processing.

以上説明した各実施例は代表的な例にすぎず、本発明の実施に際しては、各実施例に対して種々の変形や変更が可能である。   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.

Claims (13)

被写体の光学像を形成するためのフォーカスレンズを含む撮影光学系の駆動手段と撮像手段により前記光学像を光電変換して得られる撮像信号を取得する取得手段を有する焦点検出装置において、
前記撮像信号に基づく撮影画面に焦点検出領域を設定する設定手段と、
少なくとも位相差検出方式に従って前記フォーカスレンズを前記駆動手段により駆動する焦点調節を行う焦点検出手段と、
前記設定された焦点検出領域に対応する前記撮像信号に対応する光学像に基づいて前記フォーカスレンズの駆動量を決定し、前記決定された駆動量に従って前記焦点検出手段を制御する制御手段とを備え、
前記制御手段は前記設定手段を制御し、前記位相差検出方式に従った前記フォーカスレンズの駆動により前記撮影画面内の前記被写体の位置が変位した場合は、前記被写体の変位量に従って前記焦点検出領域の位置を変更することを特徴とする焦点検出装置。
In a focus detection apparatus having an imaging optical system driving means including a focus lens for forming an optical image of a subject and an acquisition means for acquiring an imaging signal obtained by photoelectrically converting the optical image by the imaging means.
Setting means for setting a focus detection area on a shooting screen based on the imaging signal;
Focus detection means for performing focus adjustment for driving the focus lens by the drive means according to at least a phase difference detection method;
Control means for determining a drive amount of the focus lens based on an optical image corresponding to the imaging signal corresponding to the set focus detection area, and controlling the focus detection means according to the determined drive amount. ,
The control means controls the setting means, and when the position of the subject in the shooting screen is displaced by driving the focus lens according to the phase difference detection method, the focus detection area according to the amount of displacement of the subject. A focus detection device characterized by changing the position of the lens.
前記制御手段は、前記駆動手段によるフォーカスレンズの駆動による前記被写体の像倍率の変化に基づいて前記被写体の変位量を決定し、前記決定した変位量および現在の焦点検出領域の位置に基づいて前記焦点検出領域の位置を変更するかどうかを決定することを特徴とする請求項1に記載の焦点検出装置。   The control means determines a displacement amount of the subject based on a change in image magnification of the subject by driving a focus lens by the driving means, and based on the determined displacement amount and a current focus detection region position, The focus detection apparatus according to claim 1, wherein it is determined whether to change a position of the focus detection area. 前記撮影画面に含まれる特定の被写体を検出する検出手段を備え、
前記制御手段は、前記設定手段を制御して、前記検出手段が検出した特定の被写体の位置に従って前記焦点検出領域を設定し、前記駆動手段によるフォーカスレンズの駆動による前記特定の被写体の像倍率の変化に基づいて前記特定の被写体の変位量を決定し、前記決定した変位量および現在の焦点検出領域の位置に基づいて前記焦点検出領域の位置を変更するかどうかを決定することを特徴とする請求項1に記載の焦点検出装置。
Detecting means for detecting a specific subject included in the shooting screen;
The control means controls the setting means to set the focus detection area according to the position of the specific subject detected by the detection means, and sets the image magnification of the specific subject by driving the focus lens by the driving means. A displacement amount of the specific subject is determined based on a change, and whether to change the position of the focus detection region is determined based on the determined displacement amount and the current position of the focus detection region. The focus detection apparatus according to claim 1.
前記撮像手段は複数の焦点検出用の画素を有し、前記制御手段は、前記設定手段で設定された焦点検出領域の位置に基づいて、前記焦点検出用の画素の位置および画素数を設定し、前記取得手段は、前記設定された焦点検出用の画素から得られる撮像信号を取得することを特徴とする請求項1乃至3のいずれか一項に記載の焦点検出装置。   The imaging unit has a plurality of focus detection pixels, and the control unit sets the position and the number of pixels for the focus detection based on the position of the focus detection region set by the setting unit. The focus detection apparatus according to claim 1, wherein the acquisition unit acquires an imaging signal obtained from the set focus detection pixels. 前記撮影画面は前記撮影光学系による光学像のディストーションを補正した画面であり、前記制御手段は、前記設定手段で設定された焦点検出領域および前記ディストーションの補正に基づいて、前記焦点検出用の画素の位置および画素数を設定することを特徴とする請求項4に記載の焦点検出装置。   The photographing screen is a screen in which distortion of an optical image by the photographing optical system is corrected, and the control unit is configured to detect the focus detection pixel based on the focus detection region set by the setting unit and the correction of the distortion. The focus detection apparatus according to claim 4, wherein the position and the number of pixels are set. 前記制御手段は、前記設定手段により設定された焦点検出領域での前記光学像の像ずれ量および像ずれの方向と前記ディストーションに基づいて設定された焦点検出領域の方向との角度に基づいて、前記フォーカスレンズの駆動量を決定することを特徴とする請求項5に記載の焦点検出装置。   The control means is based on the angle between the image shift amount and the image shift direction of the optical image in the focus detection area set by the setting means and the direction of the focus detection area set based on the distortion, 6. The focus detection apparatus according to claim 5, wherein a driving amount of the focus lens is determined. 前記焦点検手段はさらに、コントラスト方式に従って前記フォーカスレンズを前記駆動手段により駆動する焦点調節を行い、前記制御手段は、前記位相差検出方式に従った焦点調節において決定した前記駆動量に従って、前記位相差検出方式に従った焦点調節を前記コントラスト方式に従った焦点調節に切り替えるかどうかを決定し、前記コントラスト方式に従った焦点調節への切り替えを決定した時は、前記設定手段を制御して、前記コントラスト方式に従った焦点調節の焦点検出領域を、前記駆動量に従って設定することを特徴とする請求項1乃至6のいずれか一項に記載の焦点検出装置。   The focus detection unit further performs focus adjustment for driving the focus lens by the drive unit according to a contrast method, and the control unit performs the position adjustment according to the drive amount determined in the focus adjustment according to the phase difference detection method. Decide whether to switch focus adjustment according to the phase difference detection method to focus adjustment according to the contrast method, and when switching to focus adjustment according to the contrast method is determined, control the setting means, The focus detection apparatus according to claim 1, wherein a focus detection area for focus adjustment according to the contrast method is set according to the drive amount. 被写体の光学像を形成するためのフォーカスレンズを含む撮影光学系の駆動手段と撮像手段により前記光学像を光電変換して得られる撮像信号を取得する取得手段を有する焦点検出装置における焦点検出方法おいて、
前記撮像信号に基づく撮影画面に焦点検出領域を設定する設定ステップと、
少なくとも位相差検出方式に従って前記フォーカスレンズを前記駆動手段により駆動する焦点調節を行う焦点検出ステップと、
前記設定された焦点検出領域に対応する前記撮像信号に対応する光学像に基づいて前記フォーカスレンズの駆動量を決定し、前記決定された駆動量に従って前記焦点検出手段を制御する制御ステップとを備え、
前記制御ステップは前記設定ステップを制御し、前記位相差検出方式に従った前記フォーカスレンズの駆動により前記撮影画面内の前記被写体の位置が変位した場合に、前記被写体の変位量に従って前記焦点検出領域の位置を変更するステップを有することを特徴とする焦点検出方法。
A focus detection method in a focus detection apparatus having an imaging optical system driving means including a focus lens for forming an optical image of a subject and an acquisition means for acquiring an imaging signal obtained by photoelectrically converting the optical image by the imaging means. And
A setting step of setting a focus detection area on a shooting screen based on the imaging signal;
A focus detection step for performing focus adjustment for driving the focus lens by the driving means according to at least a phase difference detection method;
A control step of determining a drive amount of the focus lens based on an optical image corresponding to the imaging signal corresponding to the set focus detection region and controlling the focus detection unit according to the determined drive amount. ,
The control step controls the setting step, and when the position of the subject in the photographing screen is displaced by driving the focus lens according to the phase difference detection method, the focus detection area according to the amount of displacement of the subject. A focus detection method comprising the step of changing the position of the focus.
被写体の光学像を形成するためのフォーカスレンズを含む撮影光学系の駆動手段と撮像手段により前記光学像を光電変換して得られる撮像信号を取得する取得手段を有する焦点検出装置を制御するためのプログラムであり、
コンピュータを、
前記撮像信号に基づく撮影画面に焦点検出領域を設定する設定手段、
少なくとも位相差検出方式に従って前記フォーカスレンズを前記駆動手段により駆動する焦点調節を行う焦点検出手段、
前記設定された焦点検出領域に対応する前記撮像信号に対応する光学像に基づいて前記フォーカスレンズの駆動量を決定し、前記決定された駆動量に従って前記焦点検出手段を制御し、前記位相差検出方式に従った前記フォーカスレンズの駆動により前記撮影画面内の前記被写体の位置が変位した場合は、前記設定手段を制御して、前記被写体の変位量に従って前記焦点検出領域の位置を変更する制御手段として機能させるプログラム。
For controlling a focus detection apparatus having an imaging optical system driving means including a focus lens for forming an optical image of a subject and an acquisition means for acquiring an imaging signal obtained by photoelectrically converting the optical image by the imaging means. Program,
Computer
Setting means for setting a focus detection area on a shooting screen based on the imaging signal;
Focus detection means for performing focus adjustment for driving the focus lens by the drive means according to at least a phase difference detection method;
The focus lens drive amount is determined based on an optical image corresponding to the imaging signal corresponding to the set focus detection region, the focus detection unit is controlled according to the determined drive amount, and the phase difference detection is performed. Control means for controlling the setting means and changing the position of the focus detection area according to the amount of displacement of the subject when the position of the subject in the photographing screen is displaced by driving the focus lens according to a method Program to function as.
請求項9のプログラムを記録したコンピュータが読み取り可能な記憶媒体。   A computer-readable storage medium storing the program according to claim 9. コンピュータを、請求項1乃至7のいずれか一項に記載された焦点検出装置の各手段として機能させるプログラム。   The program which makes a computer function as each means of the focus detection apparatus as described in any one of Claims 1 thru | or 7. コンピュータを、請求項1乃至7のいずれか一項に記載された焦点検出装置の各手段として機能させるプログラムを格納した記憶媒体。   A storage medium storing a program for causing a computer to function as each unit of the focus detection apparatus according to any one of claims 1 to 7. 被写体の光学像を形成するためのフォーカスレンズを含む撮影光学系と、
前記光学像を光電変換して撮像信号を得る撮像手段と、
請求項1乃至7のいずれか一項に記載の焦点検出装置とを備え、
前記制御手段は、前記撮像手段による前記光学像の光電変換を制御することを特徴とする撮像装置。
A photographing optical system including a focus lens for forming an optical image of a subject;
Imaging means for photoelectrically converting the optical image to obtain an imaging signal;
A focus detection device according to any one of claims 1 to 7,
The said control means controls the photoelectric conversion of the said optical image by the said imaging means, The imaging device characterized by the above-mentioned.
JP2012279667A 2012-12-21 2012-12-21 FOCUS DETECTION DEVICE, FOCUS DETECTION METHOD AND PROGRAM, AND IMAGING DEVICE Expired - Fee Related JP6196772B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012279667A JP6196772B2 (en) 2012-12-21 2012-12-21 FOCUS DETECTION DEVICE, FOCUS DETECTION METHOD AND PROGRAM, AND IMAGING DEVICE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012279667A JP6196772B2 (en) 2012-12-21 2012-12-21 FOCUS DETECTION DEVICE, FOCUS DETECTION METHOD AND PROGRAM, AND IMAGING DEVICE

Publications (3)

Publication Number Publication Date
JP2014123050A true JP2014123050A (en) 2014-07-03
JP2014123050A5 JP2014123050A5 (en) 2016-02-18
JP6196772B2 JP6196772B2 (en) 2017-09-13

Family

ID=51403570

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012279667A Expired - Fee Related JP6196772B2 (en) 2012-12-21 2012-12-21 FOCUS DETECTION DEVICE, FOCUS DETECTION METHOD AND PROGRAM, AND IMAGING DEVICE

Country Status (1)

Country Link
JP (1) JP6196772B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019146164A1 (en) * 2018-01-25 2019-08-01 富士フイルム株式会社 Imaging device, imaging method, and program
CN110738628A (en) * 2019-10-15 2020-01-31 湖北工业大学 self-adaptive focus detection multi-focus image fusion method based on WIML comparison graph
JP2020154037A (en) * 2019-03-18 2020-09-24 キヤノン株式会社 Imaging device, and focus detection method

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007133265A (en) * 2005-11-11 2007-05-31 Canon Inc Imaging apparatus and imaging method
JP2008118387A (en) * 2006-11-02 2008-05-22 Canon Inc Imaging device
JP2008116663A (en) * 2006-11-02 2008-05-22 Canon Inc Imaging apparatus
JP2008152150A (en) * 2006-12-19 2008-07-03 Canon Inc Imaging apparatus, its control method and program, and storage medium
JP2009096921A (en) * 2007-10-18 2009-05-07 Teijin Ltd Highly insulating film
JP2011090196A (en) * 2009-10-23 2011-05-06 Nikon Corp Focus detecting device, and imaging apparatus
JP2011164370A (en) * 2010-02-10 2011-08-25 Nikon Corp Focus detection device
JP2011176457A (en) * 2010-02-23 2011-09-08 Nikon Corp Electronic camera
JP2012008424A (en) * 2010-06-28 2012-01-12 Olympus Corp Imaging system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007133265A (en) * 2005-11-11 2007-05-31 Canon Inc Imaging apparatus and imaging method
JP2008118387A (en) * 2006-11-02 2008-05-22 Canon Inc Imaging device
JP2008116663A (en) * 2006-11-02 2008-05-22 Canon Inc Imaging apparatus
JP2008152150A (en) * 2006-12-19 2008-07-03 Canon Inc Imaging apparatus, its control method and program, and storage medium
JP2009096921A (en) * 2007-10-18 2009-05-07 Teijin Ltd Highly insulating film
JP2011090196A (en) * 2009-10-23 2011-05-06 Nikon Corp Focus detecting device, and imaging apparatus
JP2011164370A (en) * 2010-02-10 2011-08-25 Nikon Corp Focus detection device
JP2011176457A (en) * 2010-02-23 2011-09-08 Nikon Corp Electronic camera
JP2012008424A (en) * 2010-06-28 2012-01-12 Olympus Corp Imaging system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019146164A1 (en) * 2018-01-25 2019-08-01 富士フイルム株式会社 Imaging device, imaging method, and program
JPWO2019146164A1 (en) * 2018-01-25 2020-11-19 富士フイルム株式会社 Imaging device, imaging method, and program
US11294145B2 (en) 2018-01-25 2022-04-05 Fujifilm Corporation Imaging device, imaging method, and program capable of suppressing decrease in autofocusing accuracy
JP2020154037A (en) * 2019-03-18 2020-09-24 キヤノン株式会社 Imaging device, and focus detection method
JP7292909B2 (en) 2019-03-18 2023-06-19 キヤノン株式会社 Imaging device and focus detection method
CN110738628A (en) * 2019-10-15 2020-01-31 湖北工业大学 self-adaptive focus detection multi-focus image fusion method based on WIML comparison graph
CN110738628B (en) * 2019-10-15 2023-09-05 湖北工业大学 Adaptive focus detection multi-focus image fusion method based on WIML comparison graph

Also Published As

Publication number Publication date
JP6196772B2 (en) 2017-09-13

Similar Documents

Publication Publication Date Title
JP5388544B2 (en) Imaging apparatus and focus control method thereof
US20170018060A1 (en) Image processing apparatus and image processing method
JP5563283B2 (en) Image processing device
JP6429546B2 (en) Imaging apparatus, control method, program, and storage medium
CN103152520B (en) Image capture device and method
JP5947601B2 (en) FOCUS DETECTION DEVICE, ITS CONTROL METHOD, AND IMAGING DEVICE
JP6555857B2 (en) Imaging apparatus and control method thereof
JP5243666B2 (en) Imaging apparatus, imaging apparatus main body, and shading correction method
JP5753371B2 (en) Imaging apparatus and control method thereof
JP2011081271A (en) Image capturing apparatus
JP2011022386A (en) Imaging apparatus and control method therefor
JP5954933B2 (en) Imaging device and lens device
JP6041871B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2017107204A (en) Information processing apparatus and information processing method
JPWO2013031349A1 (en) Imaging apparatus, imaging method, and program
JP6238578B2 (en) Imaging apparatus and control method thereof
JP6196772B2 (en) FOCUS DETECTION DEVICE, FOCUS DETECTION METHOD AND PROGRAM, AND IMAGING DEVICE
JP2013113857A (en) Imaging device, and control method therefor
JP5858683B2 (en) Focus detection apparatus and imaging apparatus
JP6561437B2 (en) Focus adjustment device and imaging device
JP2014130231A (en) Imaging apparatus, method for controlling the same, and control program
JP2017223760A (en) Imaging device and focus adjustment method
JP6188536B2 (en) IMAGING DEVICE, IMAGING SYSTEM, IMAGING DEVICE CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2016057402A (en) Imaging device and method for controlling the same
JP2016071275A (en) Image-capturing device and focus control program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151221

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20151221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160809

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160825

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161017

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170110

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170509

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170706

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170720

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170821

R151 Written notification of patent or utility model registration

Ref document number: 6196772

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees