[go: up one dir, main page]

JP2015087511A - Focus detector, control method for the same, control program and imaging apparatus - Google Patents

Focus detector, control method for the same, control program and imaging apparatus Download PDF

Info

Publication number
JP2015087511A
JP2015087511A JP2013225211A JP2013225211A JP2015087511A JP 2015087511 A JP2015087511 A JP 2015087511A JP 2013225211 A JP2013225211 A JP 2013225211A JP 2013225211 A JP2013225211 A JP 2013225211A JP 2015087511 A JP2015087511 A JP 2015087511A
Authority
JP
Japan
Prior art keywords
shift amount
image
image signal
image shift
focus detection
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
JP2013225211A
Other languages
Japanese (ja)
Inventor
直幸 大原
Naoyuki Ohara
直幸 大原
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 JP2013225211A priority Critical patent/JP2015087511A/en
Publication of JP2015087511A publication Critical patent/JP2015087511A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To precisely execute focus detection by suppressing erroneous detection of an image shift quantity when executing the focus detection through phase difference detection.SOLUTION: A phase difference AF processing unit 135 applies first filter processing to a first image signal and a second image signal with a prescribed first frequency band, and applies second filer processing with a second frequency band higher than the first frequency band. The phase difference AF processing unit obtains each first image shift quantity in the first and second image signals after the application of the first filer processing, obtains each second image shift quantity showing each image shift quantity in the first and second image signals after the application of the second filer processing, selects either one of the first image shift quantity and the second image shift quantity according to whether or not the first image shift quantity is equal to or higher than a reference image shift quantity determined in accordance with a photographing condition, and then calculates a defocus quantity in accordance with the selected image shift quantity.

Description

本発明は、焦点検出装置、その制御方法、および制御プログラム、並びに撮像装置に関し、特に、位相差検出方式を用いた焦点検出装置に関する。   The present invention relates to a focus detection apparatus, a control method thereof, a control program, and an imaging apparatus, and more particularly to a focus detection apparatus using a phase difference detection method.

従来、デジタルカメラ又はビデオカメラなどの撮像装置において用いられるオートフォーカス(AF)の一つとして、所謂位相差検出方式(以下位相差AFという)が知られている。位相差AFにおいては、撮影レンズの射出瞳を通過した光束を2分割して、当該2分割した光束を一組の焦点検出用センサによってそれぞれ受光する。   Conventionally, a so-called phase difference detection method (hereinafter referred to as phase difference AF) is known as one of autofocus (AF) used in an imaging apparatus such as a digital camera or a video camera. In the phase difference AF, the light beam that has passed through the exit pupil of the photographing lens is divided into two, and the two divided light beams are received by a set of focus detection sensors.

そして、その受光量に応じて出力される検出信号のずれ量、つまり、光束の分割方向における相対的位置のずれ量(以下像ずれ量という)を検出することによって撮影レンズのピント方向におけるずれ量(以下デフォーカス量という)を求めている。   Then, by detecting the shift amount of the detection signal output according to the received light amount, that is, the shift amount of the relative position in the beam splitting direction (hereinafter referred to as the image shift amount), the shift amount in the focusing direction of the photographing lens. (Hereinafter referred to as defocus amount).

ところで、上述のような位相差検出部を撮像素子に備えることによって、専用の焦点検出用センサを不要として、高速で位相差AFを行うようにした焦点検出装置が知られている(特許文献1参照)。   By the way, there is known a focus detection device that performs phase difference AF at high speed without providing a dedicated focus detection sensor by providing the image sensor with the above-described phase difference detection unit (Patent Document 1). reference).

特許文献1においては、撮像素子の画素に備えられた光電変換部を2分割することによって瞳分割を行い、当該2分割された光電変換部の出力を個別に処理することによって焦点検出を行う。さらに、2分割された光電変換部の出力を合算して画像信号としている。   In Patent Document 1, pupil division is performed by dividing a photoelectric conversion unit provided in a pixel of an image sensor into two, and focus detection is performed by individually processing the output of the divided photoelectric conversion unit. Furthermore, the output of the photoelectric conversion unit divided into two is added to form an image signal.

さらに、光電変換部の出力に対して所定のフィルタ処理を施して得られたデフォーカス量と光電変換部の出力に対してフィルタ処理を施すことなく得られたデフォーカス量とを選択的に用いる焦点検出装置が知られている(特許文献2参照)。   Further, a defocus amount obtained by performing a predetermined filter process on the output of the photoelectric conversion unit and a defocus amount obtained without performing a filter process on the output of the photoelectric conversion unit are selectively used. A focus detection apparatus is known (see Patent Document 2).

特開2001−305415号公報JP 2001-305415 A 特開平2−244020号公報JP-A-2-244020

ところが、特許文献1に記載の焦点検出装置では、焦点検出を行う際に光電変換部の出力に対してフィルタ処理を行うか否かを選択しておらず、この結果、被写体の位置によっては像ずれ量が誤検出されることがある。   However, the focus detection apparatus described in Patent Document 1 does not select whether or not to perform filtering on the output of the photoelectric conversion unit when performing focus detection. As a result, depending on the position of the subject, the image is not selected. The amount of deviation may be erroneously detected.

また、特許文献2に記載の焦点検出装置においては、光電変換部の出力に対してフィルタ処理を行うか否かを選択して、焦点検出精度を向上するようにしている。しかし、撮影条件、被写体種別およびその位置などの被写体条件に応じてフィルタ処理を行うか否かを判定することは行っていない。このため、撮影条件および被写体条件によっては精度よく焦点検出を行えないことがある。   Moreover, in the focus detection apparatus described in Patent Document 2, it is selected whether or not to perform filter processing on the output of the photoelectric conversion unit, thereby improving the focus detection accuracy. However, it is not determined whether or not to perform filter processing according to subject conditions such as shooting conditions, subject types, and positions thereof. For this reason, focus detection may not be performed accurately depending on the shooting conditions and subject conditions.

そこで、本発明の目的は、位相差検出によって焦点検出を行う際、像ずれ量の誤検出を抑えて精度よく焦点検出を行うことのできる焦点検出装置、その制御方法、および制御プログラム、並びに撮像装置を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to provide a focus detection apparatus, a control method thereof, a control program, and an imaging device capable of accurately performing focus detection while suppressing erroneous detection of an image shift amount when performing focus detection by phase difference detection. To provide an apparatus.

上記の目的を達成するため、本発明による焦点検出装置は、少なくともフォーカスレンズを備える撮影レンズにおける互いに異なる瞳領域を通過した一対の光束を受光する複数の焦点検出画素を備える撮像素子から得られる第1の像信号および第2の像信号の位相差に応じて焦点検出を行う焦点検出装置であって、前記第1の像信号および前記第2の像信号に対して所定の第1の周波数帯域で第1のフィルタ処理を行う第1のフィルタ手段と、前記第1の像信号および前記第2の像信号に対して前記第1の周波数帯域よりも高い第2の周波数帯域で第2のフィルタ処理を行う第2のフィルタ手段と、前記第1のフィルタ処理が行われた第1の像信号および第2の像信号における像ずれ量を示す第1の像ずれ量を求めるとともに、前記第2のフィルタ処理が行われた第1の像信号および第2の像信号における像ずれ量を示す第2の像ずれ量を求める像ずれ量算出手段と、前記第1の像ずれ量が撮影条件に応じて定められた基準像ずれ量以上であるか否かを判定して、当該判定結果に応じて前記第1の像ずれ量および前記第2の像ずれ量のいずれか一方を選択像ずれ量として選択する選択手段と、
前記選択像ずれ量に応じて前記フォーカスレンズの焦点ずれを示すデフォーカス量を算出するデフォーカス量算出手段と、を有することを特徴とする。
In order to achieve the above object, a focus detection apparatus according to the present invention is obtained from an image pickup device including a plurality of focus detection pixels that receive a pair of light beams that have passed through different pupil regions in a photographic lens including at least a focus lens. A focus detection device that performs focus detection in accordance with a phase difference between one image signal and a second image signal, and a predetermined first frequency band for the first image signal and the second image signal And a second filter in a second frequency band higher than the first frequency band with respect to the first image signal and the second image signal. A second filter means for performing processing, a first image signal subjected to the first filter processing and a first image displacement amount indicating an image displacement amount in the second image signal, and the second image signal. No fu An image shift amount calculating means for obtaining a second image shift amount indicating an image shift amount in the first image signal and the second image signal subjected to the filter processing, and the first image shift amount according to a photographing condition. Whether or not it is equal to or greater than a predetermined reference image displacement amount, and either one of the first image displacement amount and the second image displacement amount is selected as the selected image displacement amount according to the determination result. A selection means to select;
Defocus amount calculating means for calculating a defocus amount indicating a defocus amount of the focus lens in accordance with the selected image shift amount.

本発明による撮像装置は、少なくともフォーカスレンズを備える撮影レンズにおける互いに異なる瞳領域を通過した一対の光束を受光する複数の焦点検出画素を備える撮像素子と、請求項1〜8のいずれか1項に記載の焦点検出装置と、前記焦点検出装置で得られたデフォーカス量に応じて前記フォーカスレンズを前記撮影レンズの光軸に沿って駆動して合焦状態とする制御手段と、を有することを特徴とする。   An imaging device according to the present invention includes: an imaging device including a plurality of focus detection pixels that receive a pair of light beams that have passed through mutually different pupil regions in a photographing lens including at least a focus lens; and And a control means for driving the focus lens along the optical axis of the photographing lens according to the defocus amount obtained by the focus detection device to bring it into a focused state. Features.

本発明による制御方法は、少なくともフォーカスレンズを備える撮影レンズにおける互いに異なる瞳領域を通過した一対の光束を受光する複数の焦点検出画素を備える撮像素子から得られる第1の像信号および第2の像信号の位相差に応じて焦点検出を行う焦点検出装置の制御方法であって、前記第1の像信号および前記第2の像信号に対して所定の第1の周波数帯域で第1のフィルタ処理を行う第1のフィルタ処理ステップと、前記第1の像信号および前記第2の像信号に対して前記第1の周波数帯域よりも高い第2の周波数帯域で第2のフィルタ処理を行う第2のフィルタ処理ステップと、前記第1のフィルタ処理が行われた第1の像信号および第2の像信号における像ずれ量を示す第1の像ずれ量を求めるとともに、前記第2のフィルタ処理が行われた第1の像信号および第2の像信号における像ずれ量を示す第2の像ずれ量を求める像ずれ量算出ステップと、前記第1の像ずれ量が撮影条件に応じて定められた基準像ずれ量以上であるか否かを判定して、当該判定結果に応じて前記第1の像ずれ量および前記第2の像ずれ量のいずれか一方を選択像ずれ量として選択する選択ステップと、前記選択像ずれ量に応じて前記フォーカスレンズの焦点ずれを示すデフォーカス量を算出するデフォーカス量算出ステップと、を有することを特徴とする。   According to the control method of the present invention, a first image signal and a second image obtained from an imaging device including a plurality of focus detection pixels that receive a pair of light beams that have passed through different pupil regions in a photographing lens including at least a focus lens. A focus detection apparatus control method for performing focus detection according to a signal phase difference, wherein the first filter processing is performed in a predetermined first frequency band with respect to the first image signal and the second image signal. A first filtering process step for performing a second filtering process on a second frequency band higher than the first frequency band for the first image signal and the second image signal. A first image shift amount indicating an image shift amount in the first image signal and the second image signal subjected to the first filter processing, and the second filter. An image shift amount calculating step for obtaining a second image shift amount indicating an image shift amount in the processed first image signal and second image signal, and the first image shift amount according to the shooting condition. It is determined whether or not a predetermined reference image shift amount or more, and one of the first image shift amount and the second image shift amount is selected as a selected image shift amount according to the determination result. And a defocus amount calculating step of calculating a defocus amount indicating a defocus amount of the focus lens in accordance with the selected image shift amount.

本発明による制御プログラムは、少なくともフォーカスレンズを備える撮影レンズにおける互いに異なる瞳領域を通過した一対の光束を受光する複数の焦点検出画素を備える撮像素子から得られる第1の像信号および第2の像信号の位相差に応じて焦点検出を行う焦点検出装置で用いられる制御プログラムであって、前記焦点検出装置が備えるコンピュータに、前記第1の像信号および前記第2の像信号に対して所定の第1の周波数帯域で第1のフィルタ処理を行う第1のフィルタ処理ステップと、前記第1の像信号および前記第2の像信号に対して前記第1の周波数帯域よりも高い第2の周波数帯域で第2のフィルタ処理を行う第2のフィルタ処理ステップと、前記第1のフィルタ処理が行われた第1の像信号および第2の像信号における像ずれ量を示す第1の像ずれ量を求めるとともに、前記第2のフィルタ処理が行われた第1の像信号および第2の像信号における像ずれ量を示す第2の像ずれ量を求める像ずれ量算出ステップと、前記第1の像ずれ量が撮影条件に応じて定められた基準像ずれ量以上であるか否かを判定して、当該判定結果に応じて前記第1の像ずれ量および前記第2の像ずれ量のいずれか一方を選択像ずれ量として選択する選択ステップと、前記選択像ずれ量に応じて前記フォーカスレンズの焦点ずれを示すデフォーカス量を算出するデフォーカス量算出ステップと、を実行させることを特徴とする。   A control program according to the present invention includes a first image signal and a second image obtained from an imaging device including a plurality of focus detection pixels that receive a pair of light beams that have passed through different pupil regions in a photographing lens including at least a focus lens. A control program used in a focus detection device that performs focus detection according to a phase difference between signals, wherein a computer included in the focus detection device has a predetermined program for the first image signal and the second image signal. A first filtering step for performing a first filtering process in a first frequency band; and a second frequency higher than the first frequency band for the first image signal and the second image signal. A second filter processing step for performing a second filter processing in a band, and a first image signal and a second image signal on which the first filter processing has been performed. An image for determining a first image shift amount indicating a shift amount and a second image shift amount indicating an image shift amount in the first image signal and the second image signal subjected to the second filter processing. A shift amount calculating step; determining whether the first image shift amount is equal to or greater than a reference image shift amount determined according to a shooting condition; and determining the first image shift amount according to the determination result. And a selection step of selecting one of the second image shift amounts as a selected image shift amount, and a defocus amount calculation for calculating a defocus amount indicating a focus shift of the focus lens according to the selected image shift amount And executing the step.

本発明によれば、第1の像ずれ量が撮影条件に応じて定められた基準像ずれ量以上であるか否かを判定して、当該判定結果に応じて第1の像ずれ量および第2の像ずれ量のいずれか一方を選択像ずれ量として選択し、この選択像ずれ量に応じてフォーカスレンズの焦点ずれを示すデフォーカス量を算出する。これによって、像ずれ量の誤検出を抑えて、しかも撮影条件および被写体条件に応じて精度よく焦点検出を行うことができる。   According to the present invention, it is determined whether or not the first image shift amount is greater than or equal to the reference image shift amount determined according to the shooting condition, and the first image shift amount and the first image shift amount are determined according to the determination result. One of the two image shift amounts is selected as the selected image shift amount, and a defocus amount indicating the focus shift of the focus lens is calculated according to the selected image shift amount. Accordingly, erroneous detection of the image shift amount can be suppressed, and the focus detection can be accurately performed according to the photographing condition and the subject condition.

本発明の第1の実施形態による焦点検出装置を備える撮像装置の一例についてその構成を示すブロック図である。It is a block diagram which shows the structure about an example of an imaging device provided with the focus detection apparatus by the 1st Embodiment of this invention. 図1に示すカメラで行われる撮影動作の一例を説明するためのフローチャートである。3 is a flowchart for explaining an example of a photographing operation performed by the camera shown in FIG. 図1に示す撮像素子の構成の一例を説明するための図であり、(a)は撮像素子に備えられた画素の断面を示す図、(b)は撮像素子における画素配列の一部を示す平面図、(c)は(b)に示すA−A線に沿った断面図である。2A and 2B are diagrams for explaining an example of the configuration of the image sensor illustrated in FIG. 1, in which FIG. A top view and (c) are sectional views which followed an AA line shown in (b). 図3に示す撮像素子から撮影レンズの方向を見た際の撮影レンズの瞳を示す図である。It is a figure which shows the pupil of a photographic lens at the time of seeing the direction of a photographic lens from the image pick-up element shown in FIG. 図1に示す撮像信号処理部で得られた第1および第2の画像データが示す画像に設定される焦点検出領域を示す図である。It is a figure which shows the focus detection area | region set to the image which the 1st and 2nd image data obtained by the imaging signal process part shown in FIG. 1 show. 図3(b)に示す画素配列において、焦点検出に用いる画像信号の生成の他の例を説明するための図である。FIG. 10 is a diagram for explaining another example of generation of an image signal used for focus detection in the pixel array shown in FIG. 図1に示す位相差AF処理部で生成されるA像信号およびB像信号の一例を示す図である。It is a figure which shows an example of the A image signal and B image signal which are produced | generated by the phase difference AF process part shown in FIG. 図1に示す位相差AF処理部135で行われる像ずれ量からデフォーカス量への変換を説明するための図である。It is a figure for demonstrating the conversion from the image shift amount performed to the defocus amount by the phase difference AF process part 135 shown in FIG. 図1に示すフォーカスレンズがデフォーカス状態にある際にA像信号およびB像信号に対してBPF処理を行った後の状態を示す図である。It is a figure which shows the state after performing a BPF process with respect to A image signal and B image signal, when the focus lens shown in FIG. 1 is in a defocus state. 図1に示す位相差AF処理部で行われる第1および第2の像ずれ量の選択を説明するための図である。FIG. 6 is a diagram for explaining selection of first and second image shift amounts performed by a phase difference AF processing unit shown in FIG. 1. 図2に示す焦点検出処理を説明するためのフローチャートである。It is a flowchart for demonstrating the focus detection process shown in FIG. 相関演算に適しない被写体を撮影した際のA像信号およびB像信号の一例を説明するための図であり、(a)は繰り返し性を有するA像信号およびB像信号の一例を示す図、(b)は繰り返し性を有する被写体であるか否かの判定を示す図である。It is a figure for demonstrating an example of A image signal and B image signal at the time of image | photographing the object which is not suitable for correlation calculation, (a) is a figure which shows an example of A image signal and B image signal which have repeatability, (B) is a diagram showing determination of whether or not the subject has repeatability. 図2に示す焦点制御処理の一例を説明するためのフローチャートである。3 is a flowchart for explaining an example of a focus control process shown in FIG. 2. 本発明の第2の実施形態による焦点検出装置を備えるカメラにおいて撮影されたエッジのみを有する被写体に係るA像信号およびB像信号を説明するための図であり、(a)はエッジのみを有する被写体の一例を示す図、(b)は(a)に示す被写体に係るA像信号およびB像信号について第1のフィルタ処理を行った例を示す図、(c)は(a)に示す被写体に係るA像信号およびB像信号について第2のフィルタ処理を行った例を示す図である。It is a figure for demonstrating the A image signal and B image signal which concern on the object which has only the edge image | photographed with the camera provided with the focus detection apparatus by the 2nd Embodiment of this invention, (a) has only an edge. The figure which shows an example of a to-be-photographed object, (b) is a figure which shows the example which performed the 1st filter process about the A image signal and B image signal which concern on the to-be-photographed object shown to (a), (c) is the object shown to (a) It is a figure which shows the example which performed the 2nd filter process about the A image signal and B image signal which concern on. 本発明の第2の実施形態による焦点検出装置を備えるカメラで行われる焦点検出を説明するためのフローチャートである(その1)。It is a flowchart for demonstrating the focus detection performed with the camera provided with the focus detection apparatus by the 2nd Embodiment of this invention (the 1). 本発明の第2の実施形態による焦点検出装置を備えるカメラで行われる焦点検出を説明するためのフローチャートである(その2)。It is a flowchart for demonstrating the focus detection performed with the camera provided with the focus detection apparatus by the 2nd Embodiment of this invention (the 2).

以下、本発明の実施の形態による焦点検出装置を備える撮像装置の一例について図面を参照して説明する。   Hereinafter, an example of an imaging apparatus including a focus detection apparatus according to an embodiment of the present invention will be described with reference to the drawings.

[第1の実施形態]
図1は、本発明の第1の実施形態による焦点検出装置を備える撮像装置の一例についてその構成を示すブロック図である。
[First Embodiment]
FIG. 1 is a block diagram showing a configuration of an example of an imaging apparatus including a focus detection apparatus according to the first embodiment of the present invention.

図示の撮像装置は、例えば、デジタルカメラ(以下単にカメラと呼ぶ)であり、カメラ100は被写体を撮影して、動画又は静止画データをテープ、固体メモリ、光ディスク、又は磁気ディスクなどの記録メディアに記録する。カメラ100に備えられた各ユニットはバス160を介して互いに接続されており、これらユニットはメインCPU(以下単にCPUと呼ぶ)151(中央演算処理装置)によって制御される。   The illustrated imaging device is, for example, a digital camera (hereinafter simply referred to as a camera), and the camera 100 captures a subject and records moving images or still image data on a recording medium such as a tape, a solid-state memory, an optical disk, or a magnetic disk. Record. The units included in the camera 100 are connected to each other via a bus 160, and these units are controlled by a main CPU (hereinafter simply referred to as CPU) 151 (central processing unit).

カメラ100は、1つのマイクロレンズを共有する複数の光電変換素子(例えば、第1の光電変換素子および第2の光電変換素子)を備える撮像素子141を有しており、カメラ100に備えられた焦点検出装置は、撮像素子141の出力に応じて位相差検出方式によって焦点検出を行う。   The camera 100 includes an imaging device 141 including a plurality of photoelectric conversion elements (for example, a first photoelectric conversion element and a second photoelectric conversion element) that share one microlens. The focus detection device performs focus detection by a phase difference detection method in accordance with the output of the image sensor 141.

カメラ100は、撮影レンズユニット(以下単に撮影レンズと呼ぶ)101を有しており、撮影レンズ101は、固定1群レンズ102、ズームレンズ111、絞り機構(単に絞りともいう)103、固定3群レンズ121、およびフォーカスレンズ131を備えている。絞り制御部105はCPU151の制御下で、絞りモータ(AM)104を駆動制御して絞り103を駆動する。   The camera 100 includes a photographing lens unit (hereinafter simply referred to as a photographing lens) 101. The photographing lens 101 includes a fixed first group lens 102, a zoom lens 111, a diaphragm mechanism (also simply referred to as a diaphragm) 103, and a fixed third group. A lens 121 and a focus lens 131 are provided. The aperture control unit 105 drives and controls the aperture motor (AM) 104 by controlling the aperture motor (AM) 104 under the control of the CPU 151.

これによって、絞り103の開口径が調整されて撮影の際の光量調節が行われる。ズーム制御部113はCPU151の制御下で、ズームモータ(ZM)112を駆動制御してズームレンズ111を駆動し焦点距離を変更する。   As a result, the aperture diameter of the diaphragm 103 is adjusted, and the amount of light at the time of shooting is adjusted. Under the control of the CPU 151, the zoom control unit 113 drives and controls the zoom motor (ZM) 112 to drive the zoom lens 111 and change the focal length.

フォーカス制御部133はCPU151の制御下で、フォーカスモータ(FM)132を駆動制御して、焦点調節用レンズであるフォーカスレンズ131を駆動し焦点調節を行う。なお、図1においては、フォーカスレンズ131は単レンズで簡略的に示されているが、通常複数のレンズで構成される。   The focus control unit 133 drives and controls a focus motor (FM) 132 under the control of the CPU 151 to drive a focus lens 131 that is a focus adjustment lens to perform focus adjustment. In FIG. 1, the focus lens 131 is simply shown as a single lens, but is usually composed of a plurality of lenses.

撮影レンズ101を介して入射した光学像(被写体像ともいう)は撮像素子141に結像する。そして、撮像素子141は光学像に応じた電気信号(アナログ信号)を出力する。撮像素子141は、2次元マトリックス状に配列された複数の画素を有している。例えば、撮像素子141は横方向(行方向)にm画素、縦方向(列方向)にn画素(mおよびnの各々は2以上の整数)が配列され、各画素には、後述するように2つの光電変換素子(受光領域)が備えられている。   An optical image (also referred to as a subject image) incident through the taking lens 101 is formed on the image sensor 141. The image sensor 141 outputs an electrical signal (analog signal) corresponding to the optical image. The image sensor 141 has a plurality of pixels arranged in a two-dimensional matrix. For example, the image sensor 141 has m pixels arranged in the horizontal direction (row direction) and n pixels (m and n are each an integer of 2 or more) arranged in the vertical direction (column direction). Two photoelectric conversion elements (light receiving regions) are provided.

撮像素子141の出力であるアナログ信号(画像信号又は撮像信号)は撮像信号処理部142に与えられる。撮像信号処理部142は、画像信号をA/D変換した後、所定の信号処理を行って画像データを生成する。この際、撮像信号処理部142は、2つの光電変換素子に対応する第1および第2の画像データを出力するとともに、第1および第2の画像データを合成した(つまり、加算した)合成画像データを生成する。   An analog signal (an image signal or an imaging signal) that is an output of the imaging element 141 is given to the imaging signal processing unit 142. The imaging signal processing unit 142 performs A / D conversion on the image signal, and then performs predetermined signal processing to generate image data. At this time, the imaging signal processing unit 142 outputs the first and second image data corresponding to the two photoelectric conversion elements and combines (that is, adds) the first and second image data. Generate data.

位相差AF処理部135は、2つの光電変換素子(つまり、第1および第2の光電変換素子)に対応する画像データに応じて、つまり、被写体からの光を分割して得られた像に応じて分割方向における像ずれ量を検出する。即ち、位相差AF処理部135は第1および第2の光電変換素子から得られた信号値を用いて相関演算を行って像ずれ量を算出する。   The phase difference AF processing unit 135 corresponds to image data corresponding to two photoelectric conversion elements (that is, the first and second photoelectric conversion elements), that is, an image obtained by dividing light from a subject. Accordingly, the image shift amount in the division direction is detected. That is, the phase difference AF processing unit 135 performs correlation calculation using the signal values obtained from the first and second photoelectric conversion elements to calculate the image shift amount.

さらに、位相差AF処理部135は像ずれ量に基づいて撮影レンズ101のピント方向のずれ量(デフォーカス量)を算出する。このデフォーカス量は、像ずれ量に所定の係数(換算係数)を乗算することによって求められる。なお、像ずれ量およびデフォーカス量の算出は、CPU151の制御下で行われる。また、像ずれ量およびデフォーカス量の算出の少なくとも一部をCPU151又はフォーカス制御部133で行うようにしてもよい。   Further, the phase difference AF processing unit 135 calculates a shift amount (defocus amount) in the focus direction of the photographing lens 101 based on the image shift amount. This defocus amount is obtained by multiplying the image shift amount by a predetermined coefficient (conversion coefficient). Note that the image shift amount and the defocus amount are calculated under the control of the CPU 151. Further, at least part of the calculation of the image shift amount and the defocus amount may be performed by the CPU 151 or the focus control unit 133.

位相差AF処理部135で求められたずれ量(つまり、デフォーカス量)はフォーカス制御部133に送られる。フォーカス制御部133は、当該ずれ量、つまり、撮影レンズ101のピント方向のずれ量に基づいてフォーカスモータ132を駆動する駆動量を決定する。そして、フォーカス制御部133は当該駆動量に応じてフォーカスモータ132を駆動制御して、フォーカスレンズ131を撮影レンズ101の光軸に沿って移動させてAF制御を行う。   The shift amount (that is, the defocus amount) obtained by the phase difference AF processing unit 135 is sent to the focus control unit 133. The focus control unit 133 determines a drive amount for driving the focus motor 132 based on the shift amount, that is, the shift amount of the photographing lens 101 in the focus direction. The focus control unit 133 drives and controls the focus motor 132 according to the drive amount, and performs AF control by moving the focus lens 131 along the optical axis of the photographing lens 101.

撮像信号処理部142は前述の合成画像データを撮像制御部143に送る。そして、撮像制御部143は合成画像データを一時的にRAM(ランダム・アクセス・メモリ)154に保存する。画像圧縮解凍部153は、RAM154に保存された合成画像データを圧縮して画像記録媒体157に記録する。   The imaging signal processing unit 142 sends the above-described composite image data to the imaging control unit 143. Then, the imaging control unit 143 temporarily stores the composite image data in a RAM (Random Access Memory) 154. The image compression / decompression unit 153 compresses the composite image data stored in the RAM 154 and records it on the image recording medium 157.

なお、撮像制御部143はCPU151の制御下で、撮像素子141の読み出し制御を行う。   Note that the imaging control unit 143 performs readout control of the imaging element 141 under the control of the CPU 151.

また、RAM154に保存された合成画像データは画像処理部152に送られる。画像処理部152は、合成画像データに対して所定の画像処理を行って、処理済み画像データとする。例えば、画像処理部152は、合成画像データに縮小・拡大処理を施して最適なサイズに変換する。そして、画像処理部152は、最適なサイズに処理された画像データをモニタディスプレイ150に画像として表示する。これによって、ユーザである操作者はリアルタイムで撮影の際に画像を観察することができる。   The composite image data stored in the RAM 154 is sent to the image processing unit 152. The image processing unit 152 performs predetermined image processing on the composite image data to obtain processed image data. For example, the image processing unit 152 performs a reduction / enlargement process on the composite image data to convert it to an optimal size. Then, the image processing unit 152 displays the image data processed to the optimum size on the monitor display 150 as an image. Thereby, the operator who is a user can observe an image at the time of imaging | photography in real time.

なお、画像の撮影の直後においては、モニタディスプレイ150に所定の時間だけ画像を表示される。   Immediately after the image is taken, the image is displayed on the monitor display 150 for a predetermined time.

操作部156(操作スイッチともいう)は、操作者がカメラ100(つまり、CPU151)に対して各種指示を行う際に用いられる。そして、操作部156から入力された操作指示はバス160を介してCPU151に送られる。   The operation unit 156 (also referred to as an operation switch) is used when an operator gives various instructions to the camera 100 (that is, the CPU 151). An operation instruction input from the operation unit 156 is sent to the CPU 151 via the bus 160.

撮像制御部143は、CPU151の制御下で撮像素子141の制御を行う。この際、CPU151は、操作部156から入力された操作者からの操作指示又はRAM154に保存された合成画像データにおける画素信号のサイズに基づいて、撮像素子141における電荷蓄積時間を決定する。   The imaging control unit 143 controls the imaging element 141 under the control of the CPU 151. At this time, the CPU 151 determines the charge accumulation time in the image sensor 141 based on the operation instruction from the operator input from the operation unit 156 or the size of the pixel signal in the composite image data stored in the RAM 154.

さらに、CPU151は、撮像素子141から撮像信号処理部142に画像信号を読み出す際のゲインの設定値を決定する。そして、撮像制御部143は、CPU151で決定された蓄積時間およびゲインの設定値に応じて撮像素子141を制御する。   Further, the CPU 151 determines a gain setting value for reading an image signal from the image sensor 141 to the image signal processing unit 142. Then, the imaging control unit 143 controls the imaging element 141 according to the accumulation time and gain setting values determined by the CPU 151.

バッテリ159は、電源管理部158によって管理され、カメラ100の全体に安定して電源供給を行う。フラッシュメモリ155には、カメラ100の動作に必要な制御プログラムが記憶されている。   The battery 159 is managed by the power management unit 158 and stably supplies power to the entire camera 100. The flash memory 155 stores a control program necessary for the operation of the camera 100.

操作者の操作によってカメラ100が起動すると(つまり、電源オフの状態から電源オンの状態に移行すると)、フラッシュメモリ155に格納された制御プログラムがRAM154の所定の領域に読み込まれる(ロードされる)。CPU151は、RAM154にロードされた制御プログラムに応じてカメラ100を制御する。   When the camera 100 is activated by the operation of the operator (that is, when the power is turned off to shift to the power on state), the control program stored in the flash memory 155 is read (loaded) into a predetermined area of the RAM 154. . The CPU 151 controls the camera 100 according to the control program loaded in the RAM 154.

図2は、図1に示すカメラ100で行われる撮影動作の一例を説明するためのフローチャートである。なお、図示のフローチャートに係る処理はCPU151の制御下で行われる。   FIG. 2 is a flowchart for explaining an example of the photographing operation performed by the camera 100 shown in FIG. The process according to the flowchart shown in the figure is performed under the control of the CPU 151.

カメラ100の電源がオンとされると、CPU151は演算(制御)を開始する。そして、CPU151はカメラ100に設定された各種フラグおよび制御変数などを初期化する(ステップS202)。続いて、CPU151は、フォーカス制御部133などを制御してフォーカスレンズ131などの撮影光学部材を予め定められた初期位置に移動させる(ステップS203)。   When the power of the camera 100 is turned on, the CPU 151 starts calculation (control). Then, the CPU 151 initializes various flags and control variables set in the camera 100 (step S202). Subsequently, the CPU 151 controls the focus control unit 133 and the like to move the photographing optical member such as the focus lens 131 to a predetermined initial position (step S203).

次に、CPU151は操作者によって電源オフ操作が行われたか否かを検出する(ステップS204)。電源オフ操作を検出すると(ステップS204において、YES)、CPU151は、カメラ100の電源をオフとするため、各種フラグおよび制御変数のクリアなどの後処理を行う(ステップS205)。そして、CPU151は撮影動作を終了する。   Next, the CPU 151 detects whether or not a power off operation has been performed by the operator (step S204). When the power-off operation is detected (YES in step S204), the CPU 151 performs post-processing such as clearing various flags and control variables in order to turn off the power of the camera 100 (step S205). Then, the CPU 151 ends the shooting operation.

一方、電源オフ操作を検出しないと(ステップS204において、NO)、CPU151は、後述する焦点検出処理を行う(ステップS207)。そして、CPU151の制御下で、後述するようにして、フォーカス制御部133は焦点検出処理で得られた駆動方向、駆動速度、および駆動位置(つまり、デフォーカス量)に応じてフォーカスレンズ131を光軸に沿って駆動して、フォーカスレンズ131を合焦位置に移動させる(ステップS208:焦点制御)。   On the other hand, when the power-off operation is not detected (NO in step S204), the CPU 151 performs a focus detection process described later (step S207). Then, under the control of the CPU 151, as will be described later, the focus control unit 133 illuminates the focus lens 131 according to the driving direction, the driving speed, and the driving position (that is, the defocus amount) obtained by the focus detection process. Driving along the axis moves the focus lens 131 to the in-focus position (step S208: focus control).

続いて、撮像制御部143は、CPU151の制御下で撮像素子141を制御して被写体像を光電変換する(ステップS209)。そして、撮像信号処理部142は、撮像素子141の出力である画像信号に所定の信号処理を施して画像データを得る。   Subsequently, the imaging control unit 143 controls the imaging element 141 under the control of the CPU 151 to photoelectrically convert the subject image (step S209). Then, the imaging signal processing unit 142 performs predetermined signal processing on the image signal that is the output of the imaging element 141 to obtain image data.

次に、CPU151は、操作者が操作部156において記録ボタン(図示せず)を押下げたか否かを検出して記録中であるかを確認する(ステップS210)。記録中でない場合には(ステップS210において、NO)、CPU151はステップS204の処理に戻る。   Next, the CPU 151 detects whether the operator has pressed a recording button (not shown) in the operation unit 156 and confirms whether recording is in progress (step S210). If recording is not in progress (NO in step S210), CPU 151 returns to the process in step S204.

一方、記録中である場合には(ステップS210において、YES)、CPU151は撮像制御部143によって、撮像信号処理部142の出力である画像データ(合成画像データ)を画像圧縮解凍部153に送る。そして、画像圧縮解凍部153は画像データを圧縮処理して画像記録媒体157に記録する。その後、CPU151はステップS204の処理に戻る。   On the other hand, when recording is in progress (YES in step S <b> 210), the CPU 151 causes the imaging control unit 143 to send image data (synthesized image data) output from the imaging signal processing unit 142 to the image compression / decompression unit 153. Then, the image compression / decompression unit 153 compresses the image data and records it on the image recording medium 157. Thereafter, the CPU 151 returns to the process of step S204.

図3は、図1に示す撮像素子141の構成の一例を説明するための図である。そして、図3(a)は撮像素子141に備えられた画素の断面を示す図であり、図3(b)は撮像素子141における画素配列の一部を示す平面図である。また、図3(c)は図3(b)に示すA−A線に沿った断面図である。   FIG. 3 is a diagram for explaining an example of the configuration of the image sensor 141 shown in FIG. 3A is a diagram showing a cross section of the pixels provided in the image sensor 141, and FIG. 3B is a plan view showing a part of the pixel array in the image sensor 141. FIG. FIG. 3C is a cross-sectional view along the line AA shown in FIG.

図3(a)において、画素の各々には、光学像を光電変換して画素信号を得る光電変換部30が備えられている。光電変換部30は第1の光電変換素子30−1および第2の光電変換素子30−2に分割されている。マイクロレンズ(オンチップマイクロレンズ)31は第1および第2の光電変換素子30−1および30−2の境界にその光軸が合致するように配置され、光電変換部30に光を集光する。さらに、画素内には平坦化膜32、カラーフィルタ33、配線34、および層間絶縁膜35が配設されている。   In FIG. 3A, each pixel includes a photoelectric conversion unit 30 that photoelectrically converts an optical image to obtain a pixel signal. The photoelectric conversion unit 30 is divided into a first photoelectric conversion element 30-1 and a second photoelectric conversion element 30-2. The microlens (on-chip microlens) 31 is disposed so that the optical axis thereof is aligned with the boundary between the first and second photoelectric conversion elements 30-1 and 30-2, and condenses the light on the photoelectric conversion unit 30. . Further, a planarizing film 32, a color filter 33, a wiring 34, and an interlayer insulating film 35 are disposed in the pixel.

図3(b)に示すように、撮像素子141においては、図3(a)に示す画素が複数2次元マトリックス状に配列されている。これら画素にはR(赤色)、G(緑色)、およびB(青色)のカラーフィルタ33が交互に配置され、4つの画素によってそれぞれ一組の画素ブロック40、41、および42が構成されて、所謂ベイヤー配列とされる。   As shown in FIG. 3B, in the image sensor 141, a plurality of pixels shown in FIG. 3A are arranged in a two-dimensional matrix. In these pixels, R (red), G (green), and B (blue) color filters 33 are alternately arranged, and a set of pixel blocks 40, 41, and 42 is constituted by four pixels, This is a so-called Bayer array.

なお、図3(b)において、R、G、およびBの添え字である「1」および「2」は、それぞれ第1および第2の光電変換素子30−1および30−2の添え字を示している。   In FIG. 3B, subscripts “1” and “2” of R, G, and B are subscripts of the first and second photoelectric conversion elements 30-1 and 30-2, respectively. Show.

図3(c)において、撮像素子141は、撮影レンズ101を介して入射する光(光束)が結像する結像面に配置される。マイクロレンズ31によって、第1および第2の光電変換素子30−1および30−2はそれぞれ撮影レンズ101の瞳領域(射出瞳)の異なる位置(領域)を通過した一対の光束をそれぞれ受光する。   In FIG. 3C, the image sensor 141 is disposed on an image formation plane on which light (light flux) incident through the photographing lens 101 forms an image. By the microlens 31, the first and second photoelectric conversion elements 30-1 and 30-2 respectively receive a pair of light beams that have passed through different positions (regions) of the pupil region (exit pupil) of the photographing lens 101.

図示の例では、第1の光電変換素子30−1は、撮影レンズ101の瞳領域(単に瞳ともいう)のうち右側に位置する領域を通過する光束を受光する。一方、第2の光電変換素子30−2は、撮影レンズ101の瞳のうち左側に位置する領域を通過する光束を受光する。これによって、画素(つまり、光電変換部30)において瞳50が瞳分割されることになる。   In the illustrated example, the first photoelectric conversion element 30-1 receives a light beam that passes through a region located on the right side of a pupil region (also simply referred to as a pupil) of the photographing lens 101. On the other hand, the second photoelectric conversion element 30-2 receives a light beam passing through a region located on the left side of the pupil of the photographing lens 101. Thereby, the pupil 50 is divided into pupils in the pixel (that is, the photoelectric conversion unit 30).

図4は、図3に示す撮像素子141から撮影レンズ101の方向を見た際の撮影レンズ101の瞳50を示す図である。   FIG. 4 is a diagram illustrating the pupil 50 of the photographing lens 101 when the direction of the photographing lens 101 is viewed from the image sensor 141 illustrated in FIG. 3.

図4において、瞳50は感度領域51−1および51−2を有しており、感度領域51−1は第1の光電変換素子30−1の感度領域(以下A像瞳という)であり、感度領域51−2は第2の光電変換素子30−2の感度領域(以下B像瞳という)である。そして、重心位置52−1および52−2は、それぞれA像瞳およびB像瞳の重心位置である。   In FIG. 4, the pupil 50 has sensitivity regions 51-1 and 51-2, and the sensitivity region 51-1 is a sensitivity region (hereinafter referred to as an A image pupil) of the first photoelectric conversion element 30-1. The sensitivity region 51-2 is a sensitivity region (hereinafter referred to as a B image pupil) of the second photoelectric conversion element 30-2. The gravity center positions 52-1 and 52-2 are the gravity center positions of the A image pupil and the B image pupil, respectively.

撮像処理の際には、同一の画素において同一色のカラーフィルタが配置された2つの光電変換素子の出力を加算することによって画像信号が生成される。   In the imaging process, an image signal is generated by adding the outputs of two photoelectric conversion elements in which color filters of the same color are arranged in the same pixel.

一方、焦点検出処理の際には、1つの画素ブロックにおける第1の光電変換素子30−1の出力を積算することによって焦点検出信号(第1の焦点検出信号)が得られる。そして、この第1の焦点検出信号を画素ブロック40、41、および42について、つまり、横方向に配列された画素ブロックについて連続して取得することによってA像信号(第1の像信号)が生成される。   On the other hand, in the focus detection process, a focus detection signal (first focus detection signal) is obtained by integrating the outputs of the first photoelectric conversion elements 30-1 in one pixel block. An A image signal (first image signal) is generated by continuously acquiring the first focus detection signal for the pixel blocks 40, 41, and 42, that is, for the pixel blocks arranged in the horizontal direction. Is done.

同様にして、1つの画素ブロックにおける第2の光電変換素子30−2の出力を積算することによって焦点検出信号(第2の焦点検出信号)が得られる。そして、この第2の焦点検出信号を横方向に配列された画素ブロックについて連続して取得することによってB像信号(第2の像信号)が生成される。そして、A像信号およびB像信号が位相差検出用信号となる。   Similarly, a focus detection signal (second focus detection signal) is obtained by integrating the outputs of the second photoelectric conversion elements 30-2 in one pixel block. A B image signal (second image signal) is generated by continuously obtaining the second focus detection signals for the pixel blocks arranged in the horizontal direction. Then, the A image signal and the B image signal become phase difference detection signals.

図5は、図1に示す撮像信号処理部142で得られた第1および第2の画像データが示す画像に設定される焦点検出領域を示す図である。   FIG. 5 is a diagram showing a focus detection area set in an image indicated by the first and second image data obtained by the imaging signal processing unit 142 shown in FIG.

図5において、例えば、撮像画角60に応じて所定の位置に焦点検出領域(つまり、焦点検出画素)61が設定される。位相差AF処理部135は、第1および第2の画像データについて設定された焦点検出領域61において、上述のA像信号およびB像信号を生成して、これらA像信号およびB像信号を位相差検出用信号とする。そして、位相差AF処理部135は位相差検出用信号に応じて、被写体に対する焦点検出を行う。   In FIG. 5, for example, a focus detection region (that is, focus detection pixel) 61 is set at a predetermined position according to the imaging angle of view 60. The phase difference AF processing unit 135 generates the above-described A image signal and B image signal in the focus detection area 61 set for the first and second image data, and converts these A image signal and B image signal. It is a phase difference detection signal. Then, the phase difference AF processing unit 135 performs focus detection on the subject according to the phase difference detection signal.

なお、撮像画角60において、複数の焦点検出領域を設定するようにしてもよい。また、ここでは、撮像素子141の全画素についてそれぞれ2つの光電変換素子を設けて焦点検出領域において位相差検出用信号を生成するようにしたが、例えば、焦点検出領域に対応する画素を、図3(a)に示す画素とするようにしてもよい。   Note that a plurality of focus detection areas may be set in the imaging angle of view 60. Here, two photoelectric conversion elements are provided for all the pixels of the image sensor 141 to generate the phase difference detection signal in the focus detection area. For example, the pixels corresponding to the focus detection area are shown in FIG. You may make it be the pixel shown to 3 (a).

図6は、図3(b)に示す画素配列において、焦点検出に用いる画像信号の生成の他の例を説明するための図である。   FIG. 6 is a diagram for explaining another example of generation of an image signal used for focus detection in the pixel array shown in FIG.

図示の例では、予め定められた範囲で縦方向に画素をライン加算する。つまり、縦方向において、ベイヤー配列における2画素ブロック分を加算平均することによって焦点検出に用いる画像信号を生成する。なお、ライン加算数は、任意に設定可能であり、ライン加算数が多い程、焦点検出領域61は画角に対して縦方向に大きくなる。   In the illustrated example, pixels are line-added in the vertical direction within a predetermined range. That is, an image signal used for focus detection is generated by averaging the two pixel blocks in the Bayer array in the vertical direction. Note that the number of line additions can be arbitrarily set, and the focus detection area 61 increases in the vertical direction with respect to the angle of view as the number of line additions increases.

図7は、図1に示す位相差AF処理部135で生成されるA像信号およびB像信号の一例を示す図である。   FIG. 7 is a diagram illustrating an example of an A image signal and a B image signal generated by the phase difference AF processing unit 135 illustrated in FIG.

図7において、横軸は画素の位置を示し、縦軸は像信号(A像信号およびB像信号)の信号レベルを示す。位相差検出用信号における像ずれ量Xは撮影レンズ101の結像状態(例えば、合焦状態、前ピン状態、又は後ピン状態)に応じて変化する。   In FIG. 7, the horizontal axis indicates the position of the pixel, and the vertical axis indicates the signal level of the image signal (A image signal and B image signal). The image shift amount X in the phase difference detection signal changes according to the imaging state of the taking lens 101 (for example, in-focus state, front pin state, or rear pin state).

撮影レンズ101が合焦状態であると、A像信号およびB像信号の像ずれ量はなくなる。一方、撮影レンズ101が前ピン状態又は後ピン状態であると、互いに異なる方向に像ずれ量Xが生じる。また、像ずれ量Xは、撮影レンズ101によって被写体像が結像する位置とマイクロレンズ上面との距離、つまり、デフォーカス量と一定の関係がある。   When the photographic lens 101 is in focus, the amount of image shift between the A image signal and the B image signal is eliminated. On the other hand, when the photographing lens 101 is in the front pin state or the rear pin state, the image shift amount X is generated in different directions. The image shift amount X has a certain relationship with the distance between the position where the subject image is formed by the photographing lens 101 and the top surface of the microlens, that is, the defocus amount.

位相差AF処理部135は、CPU151の制御下でA像信号およびB像信号について相関演算を行って像ずれ量Xを求める。この相関演算においては、位相差AF処理部135は画素位置をシフトさせつつ、A像信号およびB像信号の相関値を演算して、この相関値が最大になる位置の差を像ずれ量とする。そして、位相差AF処理部135は、像ずれ量Xに基づいて撮影レンズ101のデフォーカス量を求めて、撮影レンズ101が合焦状態となるフォーカスレンズ131のレンズ駆動量を算出する。   The phase difference AF processing unit 135 performs a correlation operation on the A image signal and the B image signal under the control of the CPU 151 to obtain the image shift amount X. In this correlation calculation, the phase difference AF processing unit 135 calculates a correlation value between the A image signal and the B image signal while shifting the pixel position, and the difference between the positions where the correlation value is maximized is determined as an image shift amount. To do. Then, the phase difference AF processing unit 135 obtains the defocus amount of the photographing lens 101 based on the image shift amount X, and calculates the lens driving amount of the focus lens 131 in which the photographing lens 101 is in focus.

図8は、図1に示す位相差AF処理部135で行われる像ずれ量からデフォーカス量への変換を説明するための図である。   FIG. 8 is a diagram for explaining the conversion from the image shift amount to the defocus amount performed by the phase difference AF processing unit 135 shown in FIG.

図8においては、撮影レンズ101および撮像素子141を含む光学系が示されており、被写体70に関する予定結像面の位置p0に係る光軸上に焦点検出面の位置p1が存在する。像ずれ量とデフォーカス量との関係は光学系に応じて決定される。デフォーカス量は像ずれ量Xに所定の係数K(換算係数)を乗算して得られる。   In FIG. 8, an optical system including the photographing lens 101 and the image sensor 141 is shown, and the position p1 of the focus detection surface exists on the optical axis related to the position p0 of the planned imaging surface with respect to the subject 70. The relationship between the image shift amount and the defocus amount is determined according to the optical system. The defocus amount is obtained by multiplying the image shift amount X by a predetermined coefficient K (conversion coefficient).

当該係数Kは、A像瞳とB像瞳との重心位置に基づいて算出される。焦点検出面の位置p1が位置p2に移動した場合、位置p0、q2、およびq3で規定される三角形と位置p0、q2’、およびq3’で規定される三角形との相似に応じて像ずれ量が変化する。よって、当該ずれ量に応じて焦点検出面の位置p2におけるデフォーカス量を算出することができる。   The coefficient K is calculated based on the barycentric positions of the A image pupil and the B image pupil. When the position p1 of the focus detection surface is moved to the position p2, the amount of image shift according to the similarity between the triangle defined by the positions p0, q2, and q3 and the triangle defined by the positions p0, q2 ′, and q3 ′ Changes. Therefore, the defocus amount at the position p2 on the focus detection surface can be calculated according to the shift amount.

CPU151の制御下で、位相差AF処理部135はデフォーカス量に基づいて被写体に対して合焦状態とするためのフォーカスレンズ131の位置を算出する。   Under the control of the CPU 151, the phase difference AF processing unit 135 calculates the position of the focus lens 131 for bringing the subject into focus based on the defocus amount.

ところで、上述の相関演算の前に、位相差AF処理部135は、A像信号およびB像信号に対してフィルタ処理を行う。このフィルタ処理によって、A像信号およびB像信号におけるエッジを強調して焦点検出精度を向上する。   By the way, before the above-described correlation calculation, the phase difference AF processing unit 135 performs a filtering process on the A image signal and the B image signal. This filtering process enhances the focus detection accuracy by emphasizing edges in the A image signal and the B image signal.

また、A像信号およびB像信号のダイナミックレンジレベルを合わせる補正を行った場合には、当該補正による誤差であるDC成分をカットすることによって、検出精度が向上するとともに、像ずれ量の誤検出を抑えることができる。   In addition, when correction for matching the dynamic range levels of the A image signal and the B image signal is performed, the DC component, which is an error due to the correction, is cut, thereby improving detection accuracy and erroneous detection of an image shift amount. Can be suppressed.

図3に示す例において、フォーカスレンズ131が被写体に対して合焦付近に位置する際には、A像信号およびB像信号はほぼ一致している。このため、エッジを強調するためのバンドパスフィルタ(以下BPFという)処理をA像信号およびB像信号に対して行えば、焦点検出精度が向上する。   In the example shown in FIG. 3, when the focus lens 131 is positioned in the vicinity of the in-focus with respect to the subject, the A image signal and the B image signal are substantially the same. For this reason, if band-pass filter (hereinafter referred to as BPF) processing for enhancing edges is performed on the A image signal and the B image signal, focus detection accuracy is improved.

一方、図7に示す状態、つまり、フォーカスレンズ131が被写体に対してデフォーカス状態であると、撮影レンズ101によるケラレの影響、そして、2つの光電変換素子に入射する光の分割が100%とはならずその一部が混合する影響によって、A像信号およびB像信号が示す像が崩れてしまう。   On the other hand, in the state shown in FIG. 7, that is, when the focus lens 131 is in a defocused state with respect to the subject, the influence of vignetting by the photographing lens 101 and the division of light incident on the two photoelectric conversion elements are 100%. The image indicated by the A image signal and the B image signal is destroyed due to the influence of the partial mixing.

図9は、図1に示すフォーカスレンズ131がデフォーカス状態にある際にA像信号およびB像信号に対してBPF処理を行った後の状態を示す図である。   FIG. 9 is a diagram illustrating a state after the BPF processing is performed on the A image signal and the B image signal when the focus lens 131 illustrated in FIG. 1 is in the defocused state.

図示のように、フォーカスレンズ131がデフォーカス状態にある際にA像信号およびB像信号に対してBPF処理を行うと、A像信号およびB像信号ともにその波形が崩れた状態が強調されてしまう。このようなA像信号およびB像信号を用いて像ずれ量を検出しようとすると、像ずれの位置がずれて検出されてしまうことになって、精度よくデフォーカス量を求めることができない。   As shown in the figure, when the BPF processing is performed on the A image signal and the B image signal while the focus lens 131 is in the defocused state, the state in which the waveforms of both the A image signal and the B image signal are broken is emphasized. End up. If an attempt is made to detect an image shift amount using such A and B image signals, the position of the image shift will be detected and the defocus amount cannot be obtained with high accuracy.

ここで、BPF処理を伴わない第1のフィルタ処理を行ったA像信号およびB像信号に応じて得られた像ずれ量をX1とし、BPFを伴う第2のフィルタ処理を行ったA像信号およびB像信号に応じて得られた像ずれ量をX2とする。そして、位相差AF処理部135はCPU151の制御下で、像ずれ量X1(第1の像ずれ量)と撮影レンズ101のF値とに応じて像ずれ量X1および像ずれ量X2(第2像ずれ量)のいずれを最終的な像ずれ量(選択像ずれ量ともいう)とするかを選択する。   Here, the image shift amount obtained in accordance with the A image signal and the B image signal subjected to the first filter processing without the BPF processing is X1, and the A image signal subjected to the second filter processing with the BPF. The image shift amount obtained according to the B image signal is X2. Then, under the control of the CPU 151, the phase difference AF processing unit 135 controls the image shift amount X1 and the image shift amount X2 (second image shift amount) according to the image shift amount X1 (first image shift amount) and the F value of the photographing lens 101. One of the image shift amounts) is selected as the final image shift amount (also referred to as a selected image shift amount).

ここで、第1のフィルタ処理は、例えば、A像信号およびB像信号に対してローパスフィルタ(LPF)処理を行って、A像信号およびB像信号に含まれるノイズの低減する処理である。つまり、第1のフィルタ処理では、A像信号およびB像信号に対して所定の第1の周波数帯域でフィルタ処理が行われる。   Here, the first filter process is a process of reducing noise included in the A image signal and the B image signal by performing a low pass filter (LPF) process on the A image signal and the B image signal, for example. That is, in the first filter processing, filter processing is performed on the A image signal and the B image signal in a predetermined first frequency band.

第2のフィルタ処理は、例えば、上述のようにエッジ強調のためのBPF処理である。つまり、第2のフィルタ処理では、A像信号およびB像信号に対して第1の周波数帯域よりも高い第2の周波数帯域でフィルタ処理が行われる。   The second filter processing is, for example, BPF processing for edge enhancement as described above. That is, in the second filtering process, the filtering process is performed on the A image signal and the B image signal in the second frequency band higher than the first frequency band.

図10は、図1に示す位相差AF処理部135で行われる第1および第2の像ずれ量の選択を説明するための図である。   FIG. 10 is a diagram for explaining selection of the first and second image shift amounts performed by the phase difference AF processing unit 135 shown in FIG.

図10において、横軸は撮影レンズ101のF値を示し、縦軸は基準像ずれ量(つまり、像ずれ量X1の範囲:基準値)を示す。いま、第1のフィルタ処理を行った結果得られた像ずれ量X1が、当該像ずれ量X1が得られた撮影条件であるF値に対応する基準像ずれ量よりも小さいと、位相差AF処理部135は最終的な像ずれ量(選択像ずれ量)として像ずれ量X2を選択する。   In FIG. 10, the horizontal axis indicates the F value of the photographing lens 101, and the vertical axis indicates the reference image shift amount (that is, the range of the image shift amount X1: reference value). If the image shift amount X1 obtained as a result of the first filter processing is smaller than the reference image shift amount corresponding to the F value that is the photographing condition for obtaining the image shift amount X1, the phase difference AF is obtained. The processing unit 135 selects the image shift amount X2 as the final image shift amount (selected image shift amount).

一方、第1のフィルタ処理を行った結果得られた像ずれ量X1が、当該像ずれ量X1が得られた撮影条件であるF値に対応する基準像ずれ量以上であると、位相差AF処理部135は最終的な像ずれ量(選択像ずれ量)として像ずれ量X1を選択する。   On the other hand, if the image shift amount X1 obtained as a result of the first filter processing is equal to or larger than the reference image shift amount corresponding to the F value that is the photographing condition for obtaining the image shift amount X1, the phase difference AF. The processing unit 135 selects the image shift amount X1 as the final image shift amount (selected image shift amount).

つまり、位相差AF処理部135は、像ずれ量X1に基づいてフォーカスレンズ131が被写体に関して合焦付近に位置するか又はデフォーカス状態であるかを判定するする。そして、位相差AF処理部135は、当該判定結果に応じてA像信号およびB像信号に対して第2のフィルタ処理を行うことが有効であるか否かを判定することになる。   That is, the phase difference AF processing unit 135 determines whether the focus lens 131 is located near the in-focus position or in the defocused state with respect to the subject based on the image shift amount X1. Then, the phase difference AF processing unit 135 determines whether it is effective to perform the second filter processing on the A image signal and the B image signal according to the determination result.

なお、基準像ずれ量はF値が小さくなるにつれて大きくなるように設定され、F値が大きくなるにつれて小さくなるように設定される。図10に示す例では、基準像ずれ量(像ずれ量X1の範囲)はF値に対して反比例に設定される。像ずれ量からデフォーカス量を算出するための所定の係数K(換算係数)はF値に対しておおよそ2乗の関数で表わされる。   Note that the reference image shift amount is set to increase as the F value decreases, and is set to decrease as the F value increases. In the example shown in FIG. 10, the reference image shift amount (the range of the image shift amount X1) is set in inverse proportion to the F value. A predetermined coefficient K (conversion coefficient) for calculating the defocus amount from the image shift amount is expressed by a function of approximately square with respect to the F value.

このため、基準像ずれ量をF値に対して反比例に設定すれば、像ずれ量に所定の係数Kを乗算した結果得られるデフォーカス量の範囲はF値に比例することになる。つまり、各F値において焦点深度が所定の範囲内であれば、位相差AF処理部135は像ずれ量X2を選択し、焦点深度が所定の範囲外であれば像ずれ量X1を選択する。   For this reason, if the reference image shift amount is set in inverse proportion to the F value, the range of the defocus amount obtained as a result of multiplying the image shift amount by the predetermined coefficient K is proportional to the F value. That is, the phase difference AF processing unit 135 selects the image shift amount X2 if the depth of focus is within a predetermined range at each F value, and selects the image shift amount X1 if the depth of focus is outside the predetermined range.

図11は、図2に示す焦点検出処理を説明するためのフローチャートである。なお、図示のフローチャートに係る処理はCPU151の制御下で、撮像部制御部143および位相差AF処理部135によって行われる。   FIG. 11 is a flowchart for explaining the focus detection process shown in FIG. Note that the processing according to the illustrated flowchart is performed by the imaging unit control unit 143 and the phase difference AF processing unit 135 under the control of the CPU 151.

焦点検出を開始すると、撮像部制御部143は撮像素子141による電荷の蓄積を行う(ステップS1102:センサ蓄積)。そして、CPU151の制御下で、撮像部制御部143は撮像素子141による電荷の蓄積が完了したか否かを判定する(ステップS1103)。つまり、撮像部制御部143は電荷蓄積終了時間に達したか否かを判定することになる。   When focus detection is started, the imaging unit control unit 143 accumulates electric charges by the imaging element 141 (step S1102: sensor accumulation). Then, under the control of the CPU 151, the imaging unit control unit 143 determines whether or not charge accumulation by the imaging element 141 is completed (step S1103). That is, the imaging unit control unit 143 determines whether or not the charge accumulation end time has been reached.

電荷蓄積終了時間に達していないと(ステップS1103において、NO)、撮像部制御部143はステップS1102の処理に戻って、撮像素子141における電荷の蓄積を継続する。一方、電荷蓄積終了時間に達すると(ステップS1103において、YES)、撮像部制御部143は予め設定された焦点検出領域における画素値の読み出しを行う(ステップS1104)。   If the charge accumulation end time has not been reached (NO in step S1103), the imaging unit control unit 143 returns to the process in step S1102 and continues to accumulate charges in the imaging element 141. On the other hand, when the charge accumulation end time is reached (YES in step S1103), the imaging unit control unit 143 reads pixel values in a preset focus detection region (step S1104).

続いて、CPU151の制御下で、撮像部制御部143は焦点検出領域に存在する所定の画素数分の読み出しが完了したか否かを判定する(ステップS1105)。所定の画素数分の読み出しが完了していないと(ステップS1105において、NO)、撮像部制御部143はステップS1104の処理に戻って、所定の画素数分の読み出しが終了するまでステップS1104〜S1105の処理を繰り返す。   Subsequently, under the control of the CPU 151, the imaging unit control unit 143 determines whether or not reading for a predetermined number of pixels existing in the focus detection area is completed (step S1105). If the reading for the predetermined number of pixels has not been completed (NO in step S1105), the imaging unit control unit 143 returns to the process of step S1104 and steps S1104 to S1105 until the reading for the predetermined number of pixels is completed. Repeat the process.

所定の画素数分の読み出しが完了すると(ステップS1105において、YES)、前述したようにして、位相差AF処理部135は、撮像信号処理部142の出力である画像データに応じてA像信号およびB像信号を生成する。そして、位相差AF処理部135は、A像信号およびB像信号に対して前述の第1のフィルタ処理を行う(ステップS1106)。なお、この第1のフィルタ処理には、A像信号およびB像信号の補正処理と平均化フィルタ処理とが含まれる。   When the reading for the predetermined number of pixels is completed (YES in step S1105), as described above, the phase difference AF processing unit 135 determines the A image signal and the A image signal according to the image data output from the imaging signal processing unit 142. A B image signal is generated. Then, the phase difference AF processing unit 135 performs the above-described first filter processing on the A image signal and the B image signal (step S1106). Note that the first filter processing includes correction processing for the A image signal and B image signal and averaging filter processing.

次に、CPU151の制御下で、位相差AF処理部135は、第1のフィルタ処理後のA像信号およびB像信号について前述の相関演算を行って像ずれ量X1(第1の像ずれ量)を算出する(ステップS1107)。この相関演算においては、前述のように、焦点検出領域におけるA像信号およびB像信号の画素をシフトさせつつ相関値を求めて、当該相関値が最大となる位置の差が像ずれ量とされる。相関値を求める際には、A像信号およびB像信号を重ねて比較して、累積値が小さい方を相関値とする。   Next, under the control of the CPU 151, the phase difference AF processing unit 135 performs the above-described correlation calculation on the A image signal and the B image signal after the first filter processing, and the image shift amount X1 (the first image shift amount). ) Is calculated (step S1107). In this correlation calculation, as described above, the correlation value is obtained while shifting the pixels of the A image signal and the B image signal in the focus detection region, and the difference between the positions where the correlation value is maximized is used as the image shift amount. The When obtaining the correlation value, the A image signal and the B image signal are overlapped and compared, and the smaller accumulated value is used as the correlation value.

なお、累積値が大きい方を相関値としてもよい。さらには、累積値の差分を相関値とするようにしてもよい。累積値は相関値を示す指標であり、小さい方の累積値を相関値とした際には、当該累積値が最も大きいときが相関の高いときである。また、大きい方の累積値を相関値とした際又は差分を相関値とした際には、当該累積値又は差分が最も小さいときが相関の高いときとなる。   Note that the larger accumulated value may be used as the correlation value. Further, a difference between accumulated values may be used as a correlation value. The cumulative value is an index indicating the correlation value. When the smaller cumulative value is used as the correlation value, the cumulative value is the largest when the correlation is high. When the larger cumulative value is used as the correlation value or when the difference is used as the correlation value, the time when the cumulative value or the difference is the smallest is the time when the correlation is high.

続いて、位相差AF処理部135は、A像信号およびB像信号に対して第2のフィルタ処理を行う(ステップS1108)。この第2のフィルタ処理には、第1のフィルタ処理と同様の補正処理と平均化フィルタ処理とが含まれるとともに、エッジ強調などの処理が含まれる。そして、CPU151の制御下で、位相差AF処理部135は、第2のフィルタ処理後のA像信号およびB像信号について前述の相関演算を行って像ずれ量X2(第2の像ずれ量)を求める(ステップS1109)。   Subsequently, the phase difference AF processing unit 135 performs second filter processing on the A image signal and the B image signal (step S1108). The second filter processing includes correction processing and averaging filter processing similar to those of the first filter processing, and processing such as edge enhancement. Then, under the control of the CPU 151, the phase difference AF processing unit 135 performs the above-described correlation calculation on the A image signal and the B image signal after the second filter processing, and the image shift amount X2 (second image shift amount). Is obtained (step S1109).

次に、位相差AF処理部135は、像ずれ量X1の絶対値が、図10で説明した基準像ずれ量(所定の基準値)以上であるか否かを判定する(ステップS1110)。像ずれ量X1の絶対値が所定の基準値以上であることを示す判定結果であると(ステップS1110において、YES)、位相差AF処理部135は像ずれ量X1を最終の像ずれ量(選択像ずれ量)として選択する(ステップS1111)。一方、像ずれ量X1の絶対値が所定の基準値未満であることを示す判定結果であると(ステップS1110において、NO)、位相差AF処理部135は像ずれ量X2を選択像ずれ量として選択する(ステップS1112)。   Next, the phase difference AF processing unit 135 determines whether or not the absolute value of the image shift amount X1 is greater than or equal to the reference image shift amount (predetermined reference value) described with reference to FIG. 10 (step S1110). If the determination result indicates that the absolute value of the image shift amount X1 is equal to or greater than a predetermined reference value (YES in step S1110), the phase difference AF processing unit 135 uses the image shift amount X1 as the final image shift amount (selection). (Image shift amount) is selected (step S1111). On the other hand, if the determination result indicates that the absolute value of the image shift amount X1 is less than the predetermined reference value (NO in step S1110), the phase difference AF processing unit 135 sets the image shift amount X2 as the selected image shift amount. Select (step S1112).

ステップS1111又はS1112の処理に続いて、CPU151は、選択像ずれ量の信頼性を評価する(ステップS1113)。信頼性の評価を行う際には、CPU151はA像信号およびB像信号のコントラストとA像信号およびB像信号の一致度とに基づいて信頼性の評価を行う。   Subsequent to step S1111 or S1112, the CPU 151 evaluates the reliability of the selected image shift amount (step S1113). When evaluating the reliability, the CPU 151 evaluates the reliability based on the contrast of the A image signal and the B image signal and the degree of coincidence of the A image signal and the B image signal.

続いて、CPU151は、ステップS1113における信頼性評価の結果に応じて、選択像ずれ量が信頼できるか否かを判定する(ステップS1114)。ステップS1114の処理においては、CPU151は信頼性評価の結果が所定の閾値よりも大きいか否かを判定する。そして、信頼性評価の結果が所定の閾値よりも大きいと、CPU151は選択像ずれ量が信頼できると判定する。   Subsequently, the CPU 151 determines whether or not the selected image shift amount is reliable according to the result of the reliability evaluation in step S1113 (step S1114). In the process of step S1114, the CPU 151 determines whether or not the reliability evaluation result is larger than a predetermined threshold value. When the reliability evaluation result is larger than a predetermined threshold, the CPU 151 determines that the selected image shift amount is reliable.

一方、信頼性評価の結果が所定の閾値以下であると、CPU151は選択像ずれ量が信頼できないと判定する。なお、ステップS1114においては、CPU151は被写体が相関演算に適する被写体であるか否かも判定する。   On the other hand, if the result of the reliability evaluation is equal to or less than the predetermined threshold, the CPU 151 determines that the selected image shift amount is not reliable. In step S1114, the CPU 151 also determines whether or not the subject is a subject suitable for correlation calculation.

図12は、相関演算に適しない被写体を撮影した際のA像信号およびB像信号の一例を説明するための図である。そして、図12(a)は繰り返し性を有するA像信号およびB像信号の一例を示す図であり、図12(b)は繰り返し性を有する被写体であるか否かの判定を示す図である。   FIG. 12 is a diagram for explaining an example of an A image signal and a B image signal when a subject that is not suitable for correlation calculation is photographed. FIG. 12A is a diagram illustrating an example of an A image signal and a B image signal having repeatability, and FIG. 12B is a diagram illustrating determination of whether or not the subject has repeatability. .

相関演算において、A像信号とB像信号とをシフトしつつ相関値を求める際、図12(a)に示すように、A像信号およびB像信号が繰り返し性を有すると、繰り返しがずれた位置において一致したと判定することがある。   In the correlation calculation, when obtaining the correlation value while shifting the A image signal and the B image signal, if the A image signal and the B image signal have repeatability as shown in FIG. It may be determined that the positions match.

このような誤判定を防止するため、例えば、図12(b)に示すように、A像信号とB像信号とをシフトしたシフト量を横軸とし、相関値を縦軸とする相関値波形において、相関値の隣接差分の2乗和を指標として、CPU151は繰り返しを有する被写体、つまり、相関演算に適さない被写体であるか否かを判定する。   In order to prevent such a misjudgment, for example, as shown in FIG. 12B, a correlation value waveform in which the horizontal axis represents the shift amount obtained by shifting the A image signal and the B image signal and the vertical axis represents the correlation value. The CPU 151 determines whether or not the subject has repetition, that is, the subject not suitable for the correlation calculation, using the square sum of the adjacent difference of the correlation value as an index.

選択像ずれ量が信頼できると判定すると(ステップS1114において、YES)、CPU151の制御下で、位相差AF処理部135は選択像ずれ量に所定の係数Kを乗算して(つまり、Def=K×X(Xは選択像ずれ量))、デフォーカス量Defを算出する(ステップS1115)。そして、後述するようにして、フォーカス制御部133はデフォーカス量Defに基づいてフォーカスモータ132を駆動制御してフォーカスレンズ131を光軸に沿って移動させる。その後、CPU151は焦点検出処理を終了する。   If it is determined that the selected image shift amount is reliable (YES in step S1114), under the control of the CPU 151, the phase difference AF processing unit 135 multiplies the selected image shift amount by a predetermined coefficient K (that is, Def = K XX (X is the selected image deviation amount)) and defocus amount Def are calculated (step S1115). Then, as will be described later, the focus control unit 133 drives and controls the focus motor 132 based on the defocus amount Def to move the focus lens 131 along the optical axis. Thereafter, the CPU 151 ends the focus detection process.

一方、選択像ずれ量が信頼できないと判定すると(ステップS1114において、NO)、CPU151は焦点検出がNGであるとして焦点検出を行うことなく(ステップS1116)、焦点検出処理を終了する。   On the other hand, if it is determined that the selected image shift amount is not reliable (NO in step S1114), the CPU 151 ends focus detection processing without performing focus detection assuming that focus detection is NG (step S1116).

図13は、図2に示す焦点制御処理の一例を説明するためのフローチャートである。図13は、本実施例における焦点制御方法を示すフローチャートである。なお、図示のフローチャートに係る処理はCPU151の制御下で、フォーカス制御部133によって行われる。   FIG. 13 is a flowchart for explaining an example of the focus control process shown in FIG. FIG. 13 is a flowchart showing the focus control method in the present embodiment. Note that the processing according to the illustrated flowchart is performed by the focus control unit 133 under the control of the CPU 151.

焦点制御処理を開始すると、CPU151の制御下で、フォーカス制御部133は位相差AF処理部135からデフォーカス量Defを得る(ステップS1302)。そして、フォーカス制御部133は、当該デフォーカス量Defに基づいてフォーカスレンズ131の駆動量(レンズ駆動量)を算出する(ステップS1303)。この際、フォーカス制御部133は、レンズ駆動方向および駆動速度をデフォーカス量Defに応じて算出する。   When the focus control process is started, the focus control unit 133 obtains the defocus amount Def from the phase difference AF processing unit 135 under the control of the CPU 151 (step S1302). Then, the focus control unit 133 calculates a drive amount (lens drive amount) of the focus lens 131 based on the defocus amount Def (step S1303). At this time, the focus control unit 133 calculates the lens driving direction and the driving speed according to the defocus amount Def.

続いて、フォーカス制御部133は、デフォーカス量の絶対値が所定のデフォーカス閾値以下であるか否かを判定する(ステップS1304)。デフォーカス量の絶対値がデフォーカス閾値を超えると(ステップS1304において、NO)、フォーカス制御部133はフォーカスレンズ131の位置が合焦位置(合焦点)でないとして、レンズ駆動量(および駆動方向と駆動速度)に応じてフォーカスレンズモータ132を駆動制御してフォーカスレンズ131を光軸に沿って移動させる(ステップS1305)。そして、フォーカス制御部133は焦点制御処理を終了する。   Subsequently, the focus control unit 133 determines whether or not the absolute value of the defocus amount is equal to or less than a predetermined defocus threshold (step S1304). When the absolute value of the defocus amount exceeds the defocus threshold (NO in step S1304), the focus control unit 133 assumes that the position of the focus lens 131 is not the in-focus position (in-focus), and the lens drive amount (and the drive direction). The focus lens motor 132 is driven and controlled according to the drive speed) to move the focus lens 131 along the optical axis (step S1305). Then, the focus control unit 133 ends the focus control process.

一方、デフォーカス量の絶対値がデフォーカス閾値以下であると(ステップS1304において、YES)、フォーカス制御部133はフォーカスレンズ位置が合焦点にあるとして、フォーカスレンズモータ132を制御してフォーカスレンズ131の移動を停止する(ステップS1306)。そして、フォーカス制御部133は焦点制御処理を終了する。   On the other hand, if the absolute value of the defocus amount is equal to or smaller than the defocus threshold (YES in step S1304), the focus control unit 133 assumes that the focus lens position is in focus and controls the focus lens motor 132 to focus lens 131. Is stopped (step S1306). Then, the focus control unit 133 ends the focus control process.

なお、カメラ100では、図2で説明したように、電源がオフとされるまでの間、被写体に合焦するまで複数回の焦点検出を行うことになる。   In the camera 100, as described with reference to FIG. 2, the focus detection is performed a plurality of times until the subject is focused until the power is turned off.

このように、本発明の第1の実施形態では、BPFを伴わない第1のフィルタ処理を施したA像信号およびB像信号に応じて第1の像ずれ量を求めるとともに、BPFを伴う第2のフィルタ処理を施したA像信号およびB像信号に応じて第2の像ずれ量を求める。そして、第1の像ずれ量が撮影レンズのF値(つまり、撮影条件)によって定まる所定の範囲内にあるか否かに応じて、第1の像ずれ量および第2の像ずれ量のいずれかを選択する。つまり、第1の像ずれ量が撮影レンズのF値によって定まる所定の範囲内にあるか否かに応じて、第1のフィルタ処理および第2のフィルタ処理のいずれかを適用することになる。   As described above, in the first embodiment of the present invention, the first image shift amount is obtained according to the A image signal and the B image signal subjected to the first filter processing without BPF, and the first image with BPF is used. The second image shift amount is obtained in accordance with the A image signal and the B image signal subjected to the filtering process 2. Then, either the first image displacement amount or the second image displacement amount is determined depending on whether or not the first image displacement amount is within a predetermined range determined by the F value (that is, the photographing condition) of the photographing lens. Choose. That is, one of the first filter processing and the second filter processing is applied depending on whether or not the first image shift amount is within a predetermined range determined by the F value of the photographing lens.

これによって、フォーカスレンズ131が被写体に対して合焦の近傍に位置する際には、第2のフィルタ処理によってエッジを強調することができる。一方、デフォーカス状態の場合には、第1のフィルタ処理によって像崩れを抑えることができ、その結果、焦点検出の精度を向上させることができる。   Thus, when the focus lens 131 is positioned in the vicinity of the focus with respect to the subject, the edge can be emphasized by the second filter processing. On the other hand, in the defocused state, image collapse can be suppressed by the first filter processing, and as a result, the accuracy of focus detection can be improved.

[第2の実施形態]
次に、本発明の第2の実施形態による焦点検出装置を備えるカメラの一例について説明する。なお、第2の実施形態に係るカメラの構成は、図1に示すカメラと同様であるので、ここでは説明を省略する。
[Second Embodiment]
Next, an example of a camera provided with the focus detection apparatus according to the second embodiment of the present invention will be described. The configuration of the camera according to the second embodiment is the same as that of the camera shown in FIG.

前述の第1の実施形態においては、第1の像ずれ量が撮影レンズのF値によって定まる所定の範囲内にあるか否かに応じて第1の像ずれ量および第2の像ずれ量のいずれかを選択像ずれ量として選択して、当該選択像ずれ量に応じてデフォーカス量を求めた。つまり、第1の像ずれ量に応じて第1のフィルタ処理又は第2のフィルタ処理を選択した。   In the first embodiment described above, the first image shift amount and the second image shift amount are determined depending on whether or not the first image shift amount is within a predetermined range determined by the F value of the photographing lens. Either one was selected as the selected image shift amount, and the defocus amount was determined according to the selected image shift amount. That is, the first filter process or the second filter process is selected according to the first image shift amount.

一方、第2の実施形態においては、被写体のコントラスト評価値に基づいて第1のフィルタ処理又は第2のフィルタ処理を選択する。   On the other hand, in the second embodiment, the first filter process or the second filter process is selected based on the contrast evaluation value of the subject.

図14は、本発明の第2の実施形態による焦点検出装置を備えるカメラにおいて撮影されたエッジのみを有する被写体に係るA像信号およびB像信号を説明するための図である。そして、図14(a)はエッジのみを有する被写体の一例を示す図であり、図14(b)は図14(a)に示す被写体に係るA像信号およびB像信号について第1のフィルタ処理を行った例を示す図である。また、図14(c)は図14(a)に示す被写体に係るA像信号およびB像信号について第2のフィルタ処理を行った例を示す図である。   FIG. 14 is a diagram for explaining an A image signal and a B image signal related to a subject having only an edge photographed by a camera including a focus detection apparatus according to the second embodiment of the present invention. FIG. 14A is a diagram showing an example of a subject having only an edge, and FIG. 14B is a first filter process for the A image signal and the B image signal related to the subject shown in FIG. It is a figure which shows the example which performed. FIG. 14C is a diagram illustrating an example in which the second filter processing is performed on the A image signal and the B image signal related to the subject illustrated in FIG.

第2の実施形態では、図14(a)に示すエッジのみを有する被写体1401においては、常にA像信号およびB像信号についてBPFを伴う第2のフィルタ処理を施す。つまり、BPFを伴わない第1のフィルタ処理で得られた第1の像ずれ量が撮影レンズのF値によって定まる所定の範囲内にあるか否かに拘わらず、位相差AF処理部135は第2のフィルタ処理で得られた第2の像ずれ量を選択像ずれ量として選択する。   In the second embodiment, in the subject 1401 having only the edge shown in FIG. 14A, the second filter processing with BPF is always performed on the A image signal and the B image signal. That is, regardless of whether or not the first image shift amount obtained by the first filter processing without BPF is within a predetermined range determined by the F value of the photographic lens, the phase difference AF processing unit 135 is the first one. The second image shift amount obtained by the filter process 2 is selected as the selected image shift amount.

図14(b)に示すように、第1のフィルタ処理を行った後のA像信号およびB像信号においては像が崩れた部分のみが見られるのに対して、図14(c)に示すように第2のフィルタ処理によってA像信号およびB像信号の重心を強調すると、A像信号およびB像信号との像ずれがはっきりとする。これによって、像ずれ量に応じて精度よく焦点検出を行うことができる。   As shown in FIG. 14B, only the part where the image is broken is seen in the A image signal and the B image signal after the first filter processing, whereas FIG. As described above, when the centroids of the A image signal and the B image signal are emphasized by the second filter processing, the image shift from the A image signal and the B image signal becomes clear. Thereby, focus detection can be accurately performed according to the image shift amount.

図14(a)に示す被写体1401を検出する際には、例えば、位相差AF処理部135はA像信号およびB像信号の隣接差分の絶対値の総和を、A像信号およびB像信号の最大値と最小値の差で除算して、被写体1401を検出する。   When the subject 1401 shown in FIG. 14A is detected, for example, the phase difference AF processing unit 135 calculates the sum of the absolute values of the adjacent differences between the A image signal and the B image signal as the A image signal and the B image signal. The subject 1401 is detected by dividing by the difference between the maximum value and the minimum value.

図15Aおよび図15Bは、本発明の第2の実施形態による焦点検出装置を備えるカメラで行われる焦点検出を説明するためのフローチャートである。   15A and 15B are flowcharts for explaining focus detection performed by a camera including a focus detection apparatus according to the second embodiment of the present invention.

なお、図示のフローチャートに係る処理はCPU151の制御下で、撮像部制御部143および位相差AF処理部135によって行われる。また、図15Aおよび図15Bに示すフローチャートにおいて、図11に示すフローチャートにおけるステップと同一のステップについては同一の参照符号を付して説明を省略する。   Note that the processing according to the illustrated flowchart is performed by the imaging unit control unit 143 and the phase difference AF processing unit 135 under the control of the CPU 151. Also, in the flowcharts shown in FIGS. 15A and 15B, the same steps as those in the flowchart shown in FIG.

ステップS1105において、所定の画素数分の読み出しが完了すると、位相差AF処理部135は、撮像信号処理部142の出力である画像データに応じてA像信号およびB像信号を生成する。   In step S <b> 1105, when readout for a predetermined number of pixels is completed, the phase difference AF processing unit 135 generates an A image signal and a B image signal according to the image data that is the output of the imaging signal processing unit 142.

CPU151の制御下で、位相差AF処理部135はA像信号およびB像信号の隣接差分の絶対値を求めて、当該絶対値について画素数分の総和αを求める(ステップS1506)。そして、位相差AF処理部135は、当該総和αをコントラストαとする。   Under the control of the CPU 151, the phase difference AF processing unit 135 obtains the absolute value of the adjacent difference between the A image signal and the B image signal, and obtains the sum α for the number of pixels for the absolute value (step S1506). Then, the phase difference AF processing unit 135 sets the total α as the contrast α.

なお、絶対値を加算する画素数は、必ずしも読み出した画素数分である必要はなく、任意に設定した範囲において総和を算出するようにしてもよい。   Note that the number of pixels to which the absolute value is added is not necessarily the number of read pixels, and the sum may be calculated in an arbitrarily set range.

続いて、位相差AF処理部135はステップ1506の処理で用いた範囲と同一のA像信号およびB像信号についてそれぞれその最大値および最小値を求める。そして、位相差AF処理部135は最大値と最小値との差分を求めて、当該差分をコントラストβとする(ステップS1507)。   Subsequently, the phase difference AF processing unit 135 obtains the maximum value and the minimum value of the same A image signal and B image signal in the range used in the processing of step 1506, respectively. Then, the phase difference AF processing unit 135 calculates the difference between the maximum value and the minimum value, and sets the difference as the contrast β (step S1507).

続いて、位相差AF処理部135は、図11で説明したステップS1106〜S1109の処理を行って、第1の像ずれ量X1および第2の像ずれ量X2を求める。そして、位相差AF処理部135はコントラストαをコントラストβで除算して(α/β)、コントラスト評価値であるα/βが所定のコントラスト閾値よりも小さいか否かを判定する(ステップS1512)。   Subsequently, the phase difference AF processing unit 135 performs the processes of steps S1106 to S1109 described with reference to FIG. 11 to obtain the first image shift amount X1 and the second image shift amount X2. Then, the phase difference AF processing unit 135 divides the contrast α by the contrast β (α / β), and determines whether α / β, which is a contrast evaluation value, is smaller than a predetermined contrast threshold (step S1512). .

なお、コントラスト評価値であるα/βは、被写体に存在する見込みのエッジの数であって、例えば、図14に示す例ではおよそ1となるので、コントラスト閾値は1から2の間に設定される。   Note that α / β, which is a contrast evaluation value, is the number of probable edges existing in the subject, and is about 1 in the example shown in FIG. 14, for example, so the contrast threshold is set between 1 and 2. The

コントラスト評価値であるα/βがコントラスト閾値未満であると(ステップS1512において、YES)、位相差AF処理部135は第2の像ずれ量X2を選択像ずれ量Xとして選択する(ステップS1513)。   If the contrast evaluation value α / β is less than the contrast threshold (YES in step S1512), the phase difference AF processing unit 135 selects the second image shift amount X2 as the selected image shift amount X (step S1513). .

一方、コントラスト評価値であるα/βがコントラスト閾値以上であると(ステップS1512において、NO)、位相差AF処理部135は、第1の像ずれ量X1の絶対値が図10に示す基準像ずれ量(つまり、基準値)以上であるか否かを判定する(ステップS1514)。   On the other hand, if the contrast evaluation value α / β is equal to or greater than the contrast threshold value (NO in step S1512), the phase difference AF processing unit 135 determines that the absolute value of the first image shift amount X1 is the reference image shown in FIG. It is determined whether or not the deviation amount (that is, the reference value) is greater than or equal to (step S1514).

第1の像ずれ量X1の絶対値が基準像ずれ量以上であると(ステップS1514において、YES)、位相差AF処理部135は第1の像ずれ量X1を選択像ずれ量として選択する(ステップS1515)。   If the absolute value of the first image shift amount X1 is equal to or larger than the reference image shift amount (YES in step S1514), the phase difference AF processing unit 135 selects the first image shift amount X1 as the selected image shift amount ( Step S1515).

一方、第1の像ずれ量X1の絶対値が基準像ずれ量未満(つまり、基準閾値未満)であると(ステップS1514において、NO)、位相差AF処理部135は第2の像ずれ量X2を選択像ずれ量として選択する(ステップS1516)。   On the other hand, when the absolute value of the first image shift amount X1 is less than the reference image shift amount (that is, less than the reference threshold value) (NO in step S1514), the phase difference AF processing unit 135 causes the second image shift amount X2 to be smaller. Is selected as the selected image shift amount (step S1516).

ステップS1513、S1515、又はS1516の処理の後、図11で説明したステップS1113〜S1116の処理が行われる。   After the processing of step S1513, S1515, or S1516, the processing of steps S1113 to S1116 described in FIG. 11 is performed.

このように、本発明の第2の実施形態では、被写体のコントラスト評価値に基づいて第2のフィルタ処理を選択する。そして、コントラスト評価値に基づいて第2のフィルタ処理が選択されないと、第1の像ずれ量が撮影レンズのF値によって定まる所定の範囲内か否かに応じて第1のフィルタ処理および第2のフィルタ処理のいずれかを選択する。   As described above, in the second embodiment of the present invention, the second filter processing is selected based on the contrast evaluation value of the subject. If the second filter process is not selected based on the contrast evaluation value, the first filter process and the second filter process are performed according to whether the first image shift amount is within a predetermined range determined by the F value of the photographing lens. Select one of the filtering processes.

この結果、被写体に応じてエッジの強調を行う第2のフィルタ処理と像崩れを抑える第1のフィルタ処理とのいずれかが選択されて、常に焦点検出の精度を向上させることができる。   As a result, either the second filter process for enhancing the edge according to the subject or the first filter process for suppressing the image collapse is selected, and the focus detection accuracy can always be improved.

なお、上述の第1および第2の実施形態では、撮影レンズのF値に応じて像ずれ量と比較する所定の範囲(つまり、基準像ずれ量)を求めるようにしたが、さらに絞り羽根形状又は射出瞳距離に応じてこの所定の範囲を変更するようにしてもよい。   In the first and second embodiments described above, a predetermined range to be compared with the image shift amount (that is, the reference image shift amount) is obtained according to the F value of the photographing lens. Alternatively, the predetermined range may be changed according to the exit pupil distance.

例えば、絞り羽根形状については、絞り開口が真円に近い程、像崩れの影響が小さくなるので、羽根枚数に応じて絞り開口真円に近ければ、図10に示す所定の範囲(つまり、基準像ずれ量)を大きくする。一方、射出瞳距離についは、その距離が極端に短い場合には像崩れの影響が大きくなるので、射出瞳距離が短く程、図10に示す所定の範囲を小さくするようにする。   For example, with respect to the shape of the aperture blade, the closer the aperture aperture is to a perfect circle, the smaller the influence of image distortion. (Image shift amount) is increased. On the other hand, as for the exit pupil distance, when the distance is extremely short, the influence of image collapse becomes large. Therefore, as the exit pupil distance is shortened, the predetermined range shown in FIG. 10 is reduced.

さらに、上述の第1および第2の実施形態では、フィルタ処理を2種類準備して、第1の像ずれ量に応じてフィルタ処理を選択するようにしたが、フィルタ処理の種類は3種類以上であってもよい。また、撮影レンズの設定情報に応じて、フィルタ処理における周波数帯域を変更するようにしてもよい。   Furthermore, in the first and second embodiments described above, two types of filter processing are prepared, and the filter processing is selected according to the first image shift amount, but there are three or more types of filter processing. It may be. Further, the frequency band in the filter processing may be changed according to the setting information of the photographing lens.

以上のように、本発明の実施の形態では、撮影条件又は被写体に応じて、BPFを伴う第2のフィルタ処理とBPFを伴わない第1のフィルタ処理とのいずれかを選択するようにしたので、エッジ強調が有効な場合と像崩れを抑えること有効な場合とを使い分けて、焦点検出の精度を向上させることができる。   As described above, in the embodiment of the present invention, either the second filter process with BPF or the first filter process without BPF is selected according to the photographing condition or the subject. The focus detection accuracy can be improved by properly using the case where the edge enhancement is effective and the case where it is effective to suppress the image collapse.

上述の説明から明らかなように、図1に示す例においては、撮像信号処理部142、位相差AF処理部135、およびCPU151が第1のフィルタ手段、第2のフィルタ手段、像ずれ量算出手段、選択手段、デフォーカス量算出手段、およびコントラスト判定手段として機能する。さらに、CPU151、フォーカス制御部133、およびフォーカスモータ132は制御手段として機能する。   As is clear from the above description, in the example shown in FIG. 1, the imaging signal processing unit 142, the phase difference AF processing unit 135, and the CPU 151 include a first filter unit, a second filter unit, and an image shift amount calculation unit. , Function as selection means, defocus amount calculation means, and contrast determination means. Further, the CPU 151, the focus control unit 133, and the focus motor 132 function as control means.

なお、図1に示す例では、少なくともCPU151、撮像信号処理部142、および位相差AF処理部135が焦点検出装置を構成する。   In the example illustrated in FIG. 1, at least the CPU 151, the imaging signal processing unit 142, and the phase difference AF processing unit 135 constitute a focus detection device.

以上、本発明について実施の形態に基づいて説明したが、本発明は、これらの実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。   As mentioned above, although this invention was demonstrated based on embodiment, this invention is not limited to these embodiment, Various forms of the range which does not deviate from the summary of this invention are also contained in this invention. .

例えば、上記の実施の形態の機能を制御方法として、この制御方法を焦点検出装置に実行させるようにすればよい。また、上述の実施の形態の機能を有するプログラムを制御プログラムとして、当該制御プログラムを焦点検出装置が備えるコンピュータに実行させるようにしてもよい。なお、制御プログラムは、例えば、コンピュータに読み取り可能な記録媒体に記録される。   For example, the function of the above embodiment may be used as a control method, and this control method may be executed by the focus detection apparatus. Further, a program having the functions of the above-described embodiments may be used as a control program, and the control program may be executed by a computer included in the focus detection apparatus. The control program is recorded on a computer-readable recording medium, for example.

上記の制御方法および制御プログラムの各々は、少なくとも第1のフィルタ処理ステップ、第2のフィルタ処理ステップ、像ずれ量算出ステップ、選択ステップ、およびデフォーカス量算出ステップを有している。   Each of the control method and the control program has at least a first filter processing step, a second filter processing step, an image shift amount calculation step, a selection step, and a defocus amount calculation step.

また、本発明は、以下の処理を実行することによっても実現される。つまり、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種の記録媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPUなど)がプログラムを読み出して実行する処理である。   The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various recording media, and the computer (or CPU, MPU, etc.) of the system or apparatus reads the program. To be executed.

30 光電変換部
31 マイクロレンズ
101 撮影レンズ
103 絞り
131 フォーカスレンズ
133 フォーカス制御部
135 位相差AF処理部
141 撮像素子
143 撮像部制御部
151 CPU
DESCRIPTION OF SYMBOLS 30 Photoelectric conversion part 31 Micro lens 101 Shooting lens 103 Aperture 131 Focus lens 133 Focus control part 135 Phase difference AF process part 141 Image pick-up element 143 Image pick-up part control part 151 CPU

Claims (12)

少なくともフォーカスレンズを備える撮影レンズにおける互いに異なる瞳領域を通過した一対の光束を受光する複数の焦点検出画素を備える撮像素子から得られる第1の像信号および第2の像信号の位相差に応じて焦点検出を行う焦点検出装置であって、
前記第1の像信号および前記第2の像信号に対して所定の第1の周波数帯域で第1のフィルタ処理を行う第1のフィルタ手段と、
前記第1の像信号および前記第2の像信号に対して前記第1の周波数帯域よりも高い第2の周波数帯域で第2のフィルタ処理を行う第2のフィルタ手段と、
前記第1のフィルタ処理が行われた第1の像信号および第2の像信号における像ずれ量を示す第1の像ずれ量を求めるとともに、前記第2のフィルタ処理が行われた第1の像信号および第2の像信号における像ずれ量を示す第2の像ずれ量を求める像ずれ量算出手段と、
前記第1の像ずれ量が撮影条件に応じて定められた基準像ずれ量以上であるか否かを判定して、当該判定結果に応じて前記第1の像ずれ量および前記第2の像ずれ量のいずれか一方を選択像ずれ量として選択する選択手段と、
前記選択像ずれ量に応じて前記フォーカスレンズの焦点ずれを示すデフォーカス量を算出するデフォーカス量算出手段と、
を有することを特徴とする焦点検出装置。
At least according to the phase difference between the first image signal and the second image signal obtained from an imaging device including a plurality of focus detection pixels that receive a pair of light beams that have passed through different pupil regions in a photographing lens including a focus lens. A focus detection device that performs focus detection,
First filter means for performing a first filtering process on the first image signal and the second image signal in a predetermined first frequency band;
Second filter means for performing a second filter process on the first image signal and the second image signal in a second frequency band higher than the first frequency band;
A first image shift amount indicating an image shift amount in the first image signal and the second image signal on which the first filter processing has been performed is obtained, and the first image processing on which the second filter processing has been performed is obtained. An image shift amount calculating means for obtaining a second image shift amount indicating an image shift amount in the image signal and the second image signal;
It is determined whether or not the first image shift amount is greater than or equal to a reference image shift amount determined according to a shooting condition, and the first image shift amount and the second image are determined according to the determination result. Selecting means for selecting either one of the shift amounts as the selected image shift amount;
Defocus amount calculation means for calculating a defocus amount indicating a defocus of the focus lens according to the selected image shift amount;
A focus detection apparatus comprising:
前記選択手段は、前記第1の像ずれ量が前記基準像ずれ量以上であると、前記第1の像ずれ量を前記選択像ずれ量として選択し、前記第1の像ずれ量が前記基準像ずれ量未満であると、前記第2の像ずれ量を前記選択像ずれ量として選択することを特徴とする請求項1に記載の焦点検出装置。   The selection unit selects the first image shift amount as the selected image shift amount when the first image shift amount is equal to or greater than the reference image shift amount, and the first image shift amount is the reference image shift amount. The focus detection apparatus according to claim 1, wherein the second image shift amount is selected as the selected image shift amount when the image shift amount is less than the image shift amount. 前記撮影条件は、前記撮影レンズの設定情報であるF値であることを特徴とする請求項1又は2に記載の焦点検出装置。   The focus detection apparatus according to claim 1, wherein the photographing condition is an F value that is setting information of the photographing lens. 前記基準像ずれ量は前記F値が小さくなるにつれて大きくなることを特徴とする請求項3に記載の焦点検出装置。   The focus detection apparatus according to claim 3, wherein the reference image shift amount increases as the F value decreases. 前記基準像ずれ量は前記F値に反比例することを特徴とする請求項3又は4に記載の焦点検出装置。   The focus detection apparatus according to claim 3, wherein the reference image shift amount is inversely proportional to the F value. 前記撮影レンズには絞り羽根を有する絞り機構が備えられており、
前記基準像ずれ量は前記絞り羽根の駆動による絞り開口又は射出瞳距離に応じて変更されることを特徴とする請求項3〜5のいずれか1項に記載の焦点検出装置。
The photographing lens is provided with a diaphragm mechanism having diaphragm blades,
6. The focus detection apparatus according to claim 3, wherein the reference image shift amount is changed in accordance with a diaphragm aperture or an exit pupil distance driven by the diaphragm blades.
前記第1の像信号および前記第2の像信号に応じて被写体のコントラストを示すコントラスト評価値を得て、前記コントラスト評価値が予め設定された閾値以上であるか否かを判定するコントラスト判定手段を有し、
前記選択手段は、前記コントラスト判定手段によって前記コントラスト評価値が予め設定された閾値未満であると判定されると、前記判定結果に拘わらず前記第2の像ずれ量を前記選択像ずれ量として選択することを特徴とする請求項1〜6のいずれか1項に記載の焦点検出装置。
A contrast determination unit that obtains a contrast evaluation value indicating the contrast of a subject according to the first image signal and the second image signal and determines whether the contrast evaluation value is equal to or greater than a preset threshold value. Have
When the contrast determination unit determines that the contrast evaluation value is less than a preset threshold, the selection unit selects the second image shift amount as the selected image shift amount regardless of the determination result. The focus detection apparatus according to claim 1, wherein
前記選択手段は、前記コントラスト判定手段によって前記コントラスト評価値が予め設定された閾値以上であると判定されると、前記判定結果に応じて前記第1の像ずれ量および前記第2の像ずれ量のいずれか一方を選択像ずれ量として選択することを特徴とする請求項7に記載の焦点検出装置。   When the contrast determination unit determines that the contrast evaluation value is greater than or equal to a preset threshold value, the selection unit determines the first image shift amount and the second image shift amount according to the determination result. The focus detection apparatus according to claim 7, wherein one of the two is selected as a selected image shift amount. 前記コントラスト判定手段は、前記第1の像信号および前記第2の像信号の隣接差分の絶対値の総和を求めるとともに、前記第1の像信号および前記第2の像信号についてそれぞれその最大値および最小値の差分を求め、前記総和と前記差分の比を前記コントラスト評価値とすることを特徴とする請求項7又は8に記載の焦点検出装置。   The contrast determination means obtains a sum of absolute values of adjacent differences between the first image signal and the second image signal, and sets the maximum value and the second value for the first image signal and the second image signal, respectively. The focus detection apparatus according to claim 7 or 8, wherein a difference between minimum values is obtained, and a ratio between the sum and the difference is used as the contrast evaluation value. 少なくともフォーカスレンズを備える撮影レンズにおける互いに異なる瞳領域を通過した一対の光束を受光する複数の焦点検出画素を備える撮像素子と、
請求項1〜9のいずれか1項に記載の焦点検出装置と、
前記焦点検出装置で得られたデフォーカス量に応じて前記フォーカスレンズを前記撮影レンズの光軸に沿って駆動して合焦状態とする制御手段と、
を有することを特徴とする撮像装置。
An imaging device including a plurality of focus detection pixels that receive a pair of light beams that have passed through different pupil regions in a photographing lens including at least a focus lens;
The focus detection device according to any one of claims 1 to 9,
Control means for driving the focus lens along the optical axis of the photographing lens in accordance with the defocus amount obtained by the focus detection device, and bringing the focus lens into a focused state;
An imaging device comprising:
少なくともフォーカスレンズを備える撮影レンズにおける互いに異なる瞳領域を通過した一対の光束を受光する複数の焦点検出画素を備える撮像素子から得られる第1の像信号および第2の像信号の位相差に応じて焦点検出を行う焦点検出装置の制御方法であって、
前記第1の像信号および前記第2の像信号に対して所定の第1の周波数帯域で第1のフィルタ処理を行う第1のフィルタ処理ステップと、
前記第1の像信号および前記第2の像信号に対して前記第1の周波数帯域よりも高い第2の周波数帯域で第2のフィルタ処理を行う第2のフィルタ処理ステップと、
前記第1のフィルタ処理が行われた第1の像信号および第2の像信号における像ずれ量を示す第1の像ずれ量を求めるとともに、前記第2のフィルタ処理が行われた第1の像信号および第2の像信号における像ずれ量を示す第2の像ずれ量を求める像ずれ量算出ステップと、
前記第1の像ずれ量が撮影条件に応じて定められた基準像ずれ量以上であるか否かを判定して、当該判定結果に応じて前記第1の像ずれ量および前記第2の像ずれ量のいずれか一方を選択像ずれ量として選択する選択ステップと、
前記選択像ずれ量に応じて前記フォーカスレンズの焦点ずれを示すデフォーカス量を算出するデフォーカス量算出ステップと、
を有することを特徴とする制御方法。
At least according to the phase difference between the first image signal and the second image signal obtained from an imaging device including a plurality of focus detection pixels that receive a pair of light beams that have passed through different pupil regions in a photographing lens including a focus lens. A method for controlling a focus detection apparatus that performs focus detection,
A first filter processing step of performing a first filter process on the first image signal and the second image signal in a predetermined first frequency band;
A second filter processing step of performing a second filter processing on the first image signal and the second image signal in a second frequency band higher than the first frequency band;
A first image shift amount indicating an image shift amount in the first image signal and the second image signal on which the first filter processing has been performed is obtained, and the first image processing on which the second filter processing has been performed is obtained. An image shift amount calculating step for obtaining a second image shift amount indicating an image shift amount in the image signal and the second image signal;
It is determined whether or not the first image shift amount is greater than or equal to a reference image shift amount determined according to a shooting condition, and the first image shift amount and the second image are determined according to the determination result. A selection step of selecting either one of the shift amounts as the selected image shift amount;
A defocus amount calculating step of calculating a defocus amount indicating a defocus of the focus lens according to the selected image shift amount;
A control method characterized by comprising:
少なくともフォーカスレンズを備える撮影レンズにおける互いに異なる瞳領域を通過した一対の光束を受光する複数の焦点検出画素を備える撮像素子から得られる第1の像信号および第2の像信号の位相差に応じて焦点検出を行う焦点検出装置で用いられる制御プログラムであって、
前記焦点検出装置が備えるコンピュータに、
前記第1の像信号および前記第2の像信号に対して所定の第1の周波数帯域で第1のフィルタ処理を行う第1のフィルタ処理ステップと、
前記第1の像信号および前記第2の像信号に対して前記第1の周波数帯域よりも高い第2の周波数帯域で第2のフィルタ処理を行う第2のフィルタ処理ステップと、
前記第1のフィルタ処理が行われた第1の像信号および第2の像信号における像ずれ量を示す第1の像ずれ量を求めるとともに、前記第2のフィルタ処理が行われた第1の像信号および第2の像信号における像ずれ量を示す第2の像ずれ量を求める像ずれ量算出ステップと、
前記第1の像ずれ量が撮影条件に応じて定められた基準像ずれ量以上であるか否かを判定して、当該判定結果に応じて前記第1の像ずれ量および前記第2の像ずれ量のいずれか一方を選択像ずれ量として選択する選択ステップと、
前記選択像ずれ量に応じて前記フォーカスレンズの焦点ずれを示すデフォーカス量を算出するデフォーカス量算出ステップと、
を実行させることを特徴とする制御プログラム。
At least according to the phase difference between the first image signal and the second image signal obtained from an imaging device including a plurality of focus detection pixels that receive a pair of light beams that have passed through different pupil regions in a photographing lens including a focus lens. A control program used in a focus detection device that performs focus detection,
A computer included in the focus detection device,
A first filter processing step of performing a first filter process on the first image signal and the second image signal in a predetermined first frequency band;
A second filter processing step of performing a second filter processing on the first image signal and the second image signal in a second frequency band higher than the first frequency band;
A first image shift amount indicating an image shift amount in the first image signal and the second image signal on which the first filter processing has been performed is obtained, and the first image processing on which the second filter processing has been performed is obtained. An image shift amount calculating step for obtaining a second image shift amount indicating an image shift amount in the image signal and the second image signal;
It is determined whether or not the first image shift amount is greater than or equal to a reference image shift amount determined according to a shooting condition, and the first image shift amount and the second image are determined according to the determination result. A selection step of selecting either one of the shift amounts as the selected image shift amount;
A defocus amount calculating step of calculating a defocus amount indicating a defocus of the focus lens according to the selected image shift amount;
A control program characterized by causing
JP2013225211A 2013-10-30 2013-10-30 Focus detector, control method for the same, control program and imaging apparatus Pending JP2015087511A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013225211A JP2015087511A (en) 2013-10-30 2013-10-30 Focus detector, control method for the same, control program and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013225211A JP2015087511A (en) 2013-10-30 2013-10-30 Focus detector, control method for the same, control program and imaging apparatus

Publications (1)

Publication Number Publication Date
JP2015087511A true JP2015087511A (en) 2015-05-07

Family

ID=53050374

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013225211A Pending JP2015087511A (en) 2013-10-30 2013-10-30 Focus detector, control method for the same, control program and imaging apparatus

Country Status (1)

Country Link
JP (1) JP2015087511A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017032874A (en) * 2015-08-04 2017-02-09 キヤノン株式会社 Focus detection device and method, and imaging apparatus
WO2017057071A1 (en) * 2015-09-30 2017-04-06 富士フイルム株式会社 Focus control device, focus control method, focus control program, lens device, imaging device
CN106842496A (en) * 2017-01-24 2017-06-13 青岛大学 Method for automatically adjusting focus based on frequency domain comparison method
JP2018028654A (en) * 2016-08-10 2018-02-22 キヤノン株式会社 Control device, image capturing device, control method, program, and storage medium
JP2018046336A (en) * 2016-09-12 2018-03-22 キヤノン株式会社 Imager and imaging apparatus

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017032874A (en) * 2015-08-04 2017-02-09 キヤノン株式会社 Focus detection device and method, and imaging apparatus
WO2017057071A1 (en) * 2015-09-30 2017-04-06 富士フイルム株式会社 Focus control device, focus control method, focus control program, lens device, imaging device
JPWO2017057071A1 (en) * 2015-09-30 2017-12-28 富士フイルム株式会社 Focus control device, focus control method, focus control program, lens device, imaging device
CN108027496A (en) * 2015-09-30 2018-05-11 富士胶片株式会社 Focusing control apparatus, focusing control method, focusing control program, lens devices, camera device
US10564390B2 (en) 2015-09-30 2020-02-18 Fujifilm Corporation Focusing control device, focusing control method, focusing control program, lens device, and imaging device
JP2018028654A (en) * 2016-08-10 2018-02-22 キヤノン株式会社 Control device, image capturing device, control method, program, and storage medium
JP2018046336A (en) * 2016-09-12 2018-03-22 キヤノン株式会社 Imager and imaging apparatus
CN106842496A (en) * 2017-01-24 2017-06-13 青岛大学 Method for automatically adjusting focus based on frequency domain comparison method
CN106842496B (en) * 2017-01-24 2019-03-19 青岛大学 Method for automatically adjusting focus based on frequency domain comparison method

Similar Documents

Publication Publication Date Title
JP6033038B2 (en) FOCUS DETECTION DEVICE, IMAGING DEVICE, IMAGING SYSTEM, AND FOCUS DETECTION METHOD
US9137436B2 (en) Imaging apparatus and method with focus detection and adjustment
JP5421829B2 (en) Imaging device
US10511781B2 (en) Image pickup apparatus, control method for image pickup apparatus
JP5871989B2 (en) Imaging apparatus, imaging method, and program
CN104052920B (en) Focus detection device and its control method and camera device
JP6465562B2 (en) Imaging apparatus and imaging method
US11010030B2 (en) Electronic apparatus capable of performing display control based on display mode, control method thereof, and non-transitory computer readable medium
US10313577B2 (en) Focus detection apparatus, focus detection method, and image capturing apparatus
CN103039066A (en) Imaging device, image processing device, and image processing method
US9554054B2 (en) Imaging apparatus and its control method and program
JP2015087511A (en) Focus detector, control method for the same, control program and imaging apparatus
JPWO2013047217A1 (en) Imaging apparatus, imaging method, and program
US9591202B2 (en) Image processing apparatus and image processing method for generating recomposed images
JP7034585B2 (en) Focus control device, image pickup device, focus control method and focus control program
US20180048805A1 (en) Control apparatus for performing focus detection, image capturing apparatus, control method, and non-transitory computer-readable storage medium
JP6347581B2 (en) Focus detection apparatus and control method thereof
JP6395621B2 (en) Focus adjustment device, imaging device using the same, and focus adjustment method
JP2011242652A (en) Focus detector and control method thereof
JP6859388B2 (en) Imaging device, focus adjustment device, and its control method
JP6740019B2 (en) Imaging device and control method thereof
JP6914988B2 (en) Imaging device and its control method
JP6929140B2 (en) Control device, image pickup device, control method, program, and storage medium
JP2015043044A (en) Focus detection unit and control method therefor
JP2014063190A (en) Imaging apparatus