JP5871462B2 - Focus detection apparatus and control method thereof - Google Patents

Focus detection apparatus and control method thereof Download PDF

Info

Publication number
JP5871462B2
JP5871462B2 JP2010288552A JP2010288552A JP5871462B2 JP 5871462 B2 JP5871462 B2 JP 5871462B2 JP 2010288552 A JP2010288552 A JP 2010288552A JP 2010288552 A JP2010288552 A JP 2010288552A JP 5871462 B2 JP5871462 B2 JP 5871462B2
Authority
JP
Japan
Prior art keywords
pair
image signals
value
phase difference
image signal
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.)
Expired - Fee Related
Application number
JP2010288552A
Other languages
Japanese (ja)
Other versions
JP2012137547A (en
Inventor
健悟 竹内
健悟 竹内
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 JP2010288552A priority Critical patent/JP5871462B2/en
Publication of JP2012137547A publication Critical patent/JP2012137547A/en
Application granted granted Critical
Publication of JP5871462B2 publication Critical patent/JP5871462B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は焦点検出装置およびその制御方法に関し、特には自動焦点検出を行う焦点検出装置及びその制御方法に関する。   The present invention relates to a focus detection apparatus and a control method thereof, and more particularly to a focus detection apparatus that performs automatic focus detection and a control method thereof.

現在、一般的なスチルカメラ、ビデオカメラ等の撮像装置は自動焦点検出(AF)機能を有している。また、自動焦点検出方式としてコントラスト検出方式及び位相差検出方式が広く用いられている。このうち位相差検出方式は、一対のラインセンサから得られる信号の位相差から、三角測量の原理を用いて被写体までの距離(あるいはデフォーカス量)を検出する。この検出結果に基づいて、撮像レンズが有するフォーカスレンズの位置を制御することにより、被写体に撮像レンズの焦点を合わせることができる。   Currently, general imaging devices such as a still camera and a video camera have an automatic focus detection (AF) function. In addition, a contrast detection method and a phase difference detection method are widely used as automatic focus detection methods. Of these, the phase difference detection method detects the distance (or defocus amount) to the subject using the principle of triangulation from the phase difference of signals obtained from a pair of line sensors. By controlling the position of the focus lens included in the imaging lens based on the detection result, the imaging lens can be focused on the subject.

位相差検出方式を実現するための具体的な構成として、撮像レンズに入射した光をラインセンサで受光するいわゆるTTL方式と、撮像レンズ以外の経路で入射した光をラインセンサで受光するいわゆる外測AF方式の2種類が知られている。前者はラインセンサの出力信号の位相差に基づいてデフォーカス量が検出でき、後者は被写体距離を検出可能である。   As a specific configuration for realizing the phase difference detection method, a so-called TTL method in which light incident on an imaging lens is received by a line sensor, and a so-called external measurement in which light incident on a path other than the imaging lens is received by a line sensor. Two types of AF methods are known. The former can detect the defocus amount based on the phase difference of the output signal of the line sensor, and the latter can detect the subject distance.

特開平10−122855号公報JP-A-10-122855

一方、外測AFセンサが有する一対のラインセンサで得られる信号の位相差は、被写体との距離が近いほど大きく、遠いほど少ない。これは、ラインセンサで得られる像信号のうち、同じ被写体像に対応する信号区間が、被写体との距離が近くなるほど少なくなることを意味する。TTL方式の場合でも、大デフォーカス時には像信号の位相ずれが大きくなるため、同様の問題が発生する。 On the other hand, the phase difference between signals obtained by the pair of line sensors included in the external measurement AF sensor is larger as the distance from the subject is closer, and is smaller as the distance is farther. This means that the signal interval corresponding to the same subject image among the image signals obtained by the line sensor decreases as the distance from the subject decreases. Even in the case of the TTL method, the same problem occurs because the phase shift of the image signal becomes large at the time of large defocus.

異なる被写体像に対応する信号区間を多く含んだ像信号を比較して位相差を検出することは、位相差検出精度を低下させることになるため、被写体との距離に応じて適切な信号区間を用いて位相差検出を行う必要がある。しかし、従来はこのような位相差検出を行うことについて提案されていない。   Comparing image signals that contain many signal sections corresponding to different subject images and detecting the phase difference will reduce the phase difference detection accuracy, so an appropriate signal section is selected according to the distance to the subject. Therefore, it is necessary to detect the phase difference. However, there has been no proposal for performing such phase difference detection.

また、位相差検出方式の合焦精度はラインセンサから得られる信号の質に依存するが、一対の信号を生成する光学系およびラインセンサは別個のものであるため、信号はそれらの特性のばらつきによる影響をうける。具体的には、ラインセンサの特性(例えば画素の感度)の相違や、結像する光学系(たとえばレンズ)の特性の相違などである。また、製造誤差以外の要因によって、一対の信号のうち片方のみに影響が生じるようなことも起こりうる。   The focusing accuracy of the phase difference detection method depends on the quality of the signal obtained from the line sensor, but since the optical system and the line sensor that generate a pair of signals are separate, the signal varies in their characteristics. Affected by. Specifically, there are differences in characteristics of line sensors (for example, sensitivity of pixels) and differences in characteristics of optical systems (for example, lenses) that form an image. Further, it may happen that only one of the pair of signals is affected by factors other than manufacturing errors.

位相差検出方式の合焦精度を高めるには、一対の信号間で質が異なる場合であっても、検出される位相差の誤差を少なくする必要がある。そのため、得られた像信号を補正するための提案がなされている。特許文献1では、迷光による像信号のノイズを像信号の平均値を基に補正することや、勾配をもった迷光によるノイズを補正するための提案がなされている。
しかしながら、被写体距離に応じて位相差検出に用いる像信号の区間を制御する場合に、像信号にどのような補正を行うかについては、従来提案されていなかった。
In order to increase the focusing accuracy of the phase difference detection method, it is necessary to reduce the error of the detected phase difference even when the quality is different between a pair of signals. Therefore, proposals for correcting the obtained image signal have been made. In Patent Document 1, there are proposals for correcting noise of an image signal due to stray light based on an average value of the image signal and correcting noise due to stray light having a gradient.
However, there has been no proposal in the past regarding how to correct an image signal when controlling a section of an image signal used for phase difference detection according to the subject distance.

このように、本発明は、位相差検出方式の焦点検出装置及びその制御方法において、像信号の位相差が大きくなる場合であっても精度のよい自動焦点検出を実現することを目的とする。   As described above, an object of the present invention is to realize a highly accurate automatic focus detection even when the phase difference of an image signal is large in a phase difference detection type focus detection apparatus and its control method.

上述の目的を達成するため、本発明に係る焦点検出装置は、一対のセンサから得られる一対の像信号の位相差を検出することによって被写体距離又はデフォーカス量を検出する焦点検出装置であって、一対の像信号を微分し、一対の微分像信号を生成する微分手段と、一対の微分像信号の位相差を検出する第1の検出手段と、第1の検出手段によって検出された位相差を用いて、一対の像信号のうち、同一被写体に対応する区間を抽出する抽出手段と、一対の像信号のうち抽出手段が抽出した区間の信号を用いて、一対の像信号のオフセット及びゲインの差を補正するための補正値を算出する算出手段と、補正値を用いてオフセット及びゲインの差が補正された一対の像信号を用いて、被写体距離又はデフォーカス量を検出するための一対の像信号の位相差を検出する第2の検出手段と、を有することを特徴とする。 In order to achieve the above object, a focus detection device according to the present invention is a focus detection device that detects a subject distance or a defocus amount by detecting a phase difference between a pair of image signals obtained from a pair of sensors. A differential means for differentiating a pair of image signals to generate a pair of differential image signals, a first detection means for detecting a phase difference between the pair of differential image signals, and a phase difference detected by the first detection means Using the extraction means for extracting the section corresponding to the same subject from the pair of image signals, and the offset between the pair of image signals using the signal of the section extracted by the extraction means from the pair of image signals, and using a calculation means for calculating a correction value of the order to correct the difference in gain, a pair of image signals different offset and gain corrected using the correction value, to detect the object distance or the defocus amount Pair for And having second detection means for detecting a phase difference between an image signal.

このような構成により、本発明によれば、位相差検出方式の焦点検出装置及びその制御方法において、像信号の位相差が大きくなる場合であっても精度のよい自動焦点検出を実現することができる。   With such a configuration, according to the present invention, in the focus detection apparatus of the phase difference detection method and the control method therefor, it is possible to realize accurate automatic focus detection even when the phase difference of the image signal becomes large. it can.

本発明の実施形態に係る焦点検出装置を適用可能な撮像装置の例としてのビデオカメラの構成例を示すブロック図。1 is a block diagram illustrating a configuration example of a video camera as an example of an imaging apparatus to which a focus detection apparatus according to an embodiment of the present invention is applicable. 図1の外測AFセンサユニットの構成例を示す図。The figure which shows the structural example of the external measurement AF sensor unit of FIG. (a)は被写体輝度の一例を、(b)は(a)の被写体輝度から外測AFユニット130で得られる理想的な像信号の一例を、(c)は(a)の被写体輝度から外測AFユニット130で得られる実際の像信号の一例をそれぞれ示す図。(A) is an example of subject brightness, (b) is an example of an ideal image signal obtained by the external measurement AF unit 130 from the subject brightness of (a), and (c) is outside the subject brightness of (a). FIG. 6 is a diagram illustrating an example of an actual image signal obtained by the AF unit 130. 本発明の実施形態に係るビデオカメラにおける焦点検出処理を説明するためのフローチャート。6 is a flowchart for explaining focus detection processing in the video camera according to the embodiment of the present invention. 図4のS407における補正量算出処理の詳細を説明するためのフローチャート。5 is a flowchart for explaining details of a correction amount calculation process in S407 of FIG. (a)は像信号の一例を、(b)は(a)の像信号の微分信号の一例をそれぞれ示す図。(A) is an example of an image signal, (b) is a figure which shows an example of the differential signal of the image signal of (a), respectively. S406で算出した簡易位相差Wnと微分像信号との関係を示す図。The figure which shows the relationship between the simple phase difference Wn calculated by S406, and a differential image signal. 本発明の実施形態における、像信号と補正値の算出に用いられる区間との関係、並びに像信号と第1補正量との関係を示す図。The figure which shows the relationship between the image signal and the area used for calculation of a correction value, and the relationship between an image signal and the 1st correction amount in embodiment of this invention. 本発明の第1の実施形態における、像信号と第2補正量との関係を示す図。The figure which shows the relationship between the image signal and 2nd correction amount in the 1st Embodiment of this invention. 本発明の第1の実施形態における、補正前後の像信号の関係を示す図。The figure which shows the relationship of the image signal before and behind correction | amendment in the 1st Embodiment of this invention. 本発明の第1の実施形態の効果を説明するための図。第2の実施形態における補正量算出のフローチャートThe figure for demonstrating the effect of the 1st Embodiment of this invention. Flowchart of correction amount calculation in the second embodiment 本発明の第2の実施形態における補正量算出処理の詳細を説明するためのフローチャート。The flowchart for demonstrating the detail of the correction amount calculation process in the 2nd Embodiment of this invention. 本発明の第3の実施形態における補正量算出処理の詳細を説明するためのフローチャート。The flowchart for demonstrating the detail of the correction amount calculation process in the 3rd Embodiment of this invention.

以下、図面を参照して本発明の例示的な実施形態について説明する。図1は、本発明の実施形態に係る外測AF方式の焦点検出装置を適用した撮像装置の一例としてのデジタルビデオカメラ10の構成例を示すブロック図である。   Hereinafter, exemplary embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration example of a digital video camera 10 as an example of an imaging apparatus to which an external measurement AF type focus detection apparatus according to an embodiment of the present invention is applied.

レンズユニット100は撮像光学系を構成し、被写体側(光側)から順に、固定レンズ101、変倍レンズ102、絞り103、固定レンズ104及びフォーカスレンズ105が配置されている。なお、これらの個々のレンズは、図では1枚のレンズとして記載しているが、複数のレンズから構成されていてもよい。
位置エンコーダ108は、変倍レンズ102の倍率、絞り103の大きさ(絞り値)、及びフォーカスレンズ105の位置を検出する。
The lens unit 100 constitutes an imaging optical system, and a fixed lens 101, a variable power lens 102, a diaphragm 103, a fixed lens 104, and a focus lens 105 are arranged in this order from the subject side (light side). These individual lenses are shown as one lens in the figure, but may be composed of a plurality of lenses.
The position encoder 108 detects the magnification of the zoom lens 102, the size of the diaphragm 103 (aperture value), and the position of the focus lens 105.

変倍レンズ102はズームモータ(ZM)106により光軸方向に駆動され、フォーカスレンズ105はフォーカスモータ(FM)107により光軸方向に駆動される。これらズームモータ106及びフォーカスモータ107はそれぞれ、ズーム駆動回路120及びフォーカス駆動回路121からの駆動信号を受けて動作する。   The zoom lens 102 is driven in the optical axis direction by a zoom motor (ZM) 106, and the focus lens 105 is driven in the optical axis direction by a focus motor (FM) 107. The zoom motor 106 and the focus motor 107 operate by receiving drive signals from the zoom drive circuit 120 and the focus drive circuit 121, respectively.

撮像素子109は例えばCCDイメージセンサやCMOSイメージセンサである。撮像素子109は、レンズユニット100に入射した光によって形成された、撮像範囲内の被写体像を複数の光電変換素子によって画素ごとの電気信号に変換する。信号処理回路119は、撮像素子109が出力する電気信号に対して、A/D変換処理、増幅処理、ホワイトバランス処理、色補間処理、ガンマ補正処理、等の各種信号処理を施し、所定フォーマットの画像データを生成する。画像データは表示装置114に出力されたり、半導体メモリ、光ディスク、ハードディスク等の記録メディア115に記録されたりする。   The image sensor 109 is, for example, a CCD image sensor or a CMOS image sensor. The image sensor 109 converts a subject image within the imaging range formed by light incident on the lens unit 100 into an electrical signal for each pixel by a plurality of photoelectric conversion elements. The signal processing circuit 119 performs various signal processing such as A / D conversion processing, amplification processing, white balance processing, color interpolation processing, and gamma correction processing on the electrical signal output from the image sensor 109 to obtain a predetermined format. Generate image data. The image data is output to the display device 114 or recorded on a recording medium 115 such as a semiconductor memory, an optical disk, or a hard disk.

操作スイッチ群111には、電源スイッチや、録画動作や再生動作を開始及び停止させるスイッチ、動作モードを選択するためのスイッチ、レンズユニット100のズーム倍率(画角)を変化させるズームスイッチ等が設けられている。電源スイッチが操作されると、不揮発性メモリ113に格納されているプログラムの一部がRAM112にロードされ、CPU110がRAM112にロードされたプログラムを実行することにより、ビデオカメラの各部の動作を制御する。本実施形態のビデオカメラは外測AFの他に、撮像素子109で撮像された画像の一部(焦点検出エリア)の画像データのコントラストがピークとなる位置を探索することによって焦点検出するコントラストAFが可能であるとする。コントラストAFでは、撮像と焦点検出エリアの画像データからのコントラスト検出とをフォーカスレンズを微少量ずつ移動させながら繰り返し実行しながらコントラストが最高となる合焦ピークを探索する、いわゆる山登り制御によって合焦位置の探索が行われる。   The operation switch group 111 includes a power switch, a switch for starting and stopping a recording operation and a reproduction operation, a switch for selecting an operation mode, a zoom switch for changing the zoom magnification (view angle) of the lens unit 100, and the like. It has been. When the power switch is operated, a part of the program stored in the nonvolatile memory 113 is loaded into the RAM 112, and the CPU 110 executes the program loaded into the RAM 112, thereby controlling the operation of each part of the video camera. . The video camera according to the present embodiment, in addition to the external measurement AF, performs contrast detection for focus detection by searching for a position where the contrast of image data of a part of the image (focus detection area) captured by the image sensor 109 reaches a peak. Is possible. In contrast AF, the focus position is determined by so-called hill-climbing control that searches for a focus peak that maximizes contrast while repeatedly performing imaging and contrast detection from image data in the focus detection area while moving the focus lens in small increments. Search is performed.

デジタルビデオカメラ10には、レンズユニット100(撮像光学系)と光軸が重複しないように配置される焦点検出光学系を有する外測AFセンサユニット130が設けられている。外測AFセンサユニット130は、光軸が平行な一対の結像レンズ131(焦点検出光学系)と、一対のラインセンサ132とを有している。ラインセンサ132は、複数の受光素子(画素)が一列に並べられて構成されており、その詳細については図2を参照して後述する。ラインセンサ132には、固定焦点距離fの結像レンズ131を通って(すなわち撮像光学系であるレンズユニット100を通らずに)被写体光が入射する。被写体像はラインセンサ132において光電変換された後、て、図示しないA/D変換器によってデジタルデータに変換される。ラインセンサ132を構成する一対のラインセンサから得られる一対のデジタルデータと周知な手法とを用いて、CPU110は被写体距離、相関量、信頼度などを算出する。CPU110はこれらの算出結果に基づき、フォーカス駆動回路121に対してフォーカスレンズ105を移動すべき位置を与え、フォーカスレンズ105の位置を制御することで、外測AFを実現している。   The digital video camera 10 is provided with an external AF sensor unit 130 having a focus detection optical system arranged so that the optical axis does not overlap with the lens unit 100 (imaging optical system). The external measurement AF sensor unit 130 has a pair of imaging lenses 131 (focus detection optical system) whose optical axes are parallel and a pair of line sensors 132. The line sensor 132 includes a plurality of light receiving elements (pixels) arranged in a line, and details thereof will be described later with reference to FIG. Subject light is incident on the line sensor 132 through the imaging lens 131 having a fixed focal length f (that is, without passing through the lens unit 100 which is an imaging optical system). The subject image is photoelectrically converted by the line sensor 132 and then converted into digital data by an A / D converter (not shown). Using a pair of digital data obtained from a pair of line sensors constituting the line sensor 132 and a known method, the CPU 110 calculates a subject distance, a correlation amount, a reliability, and the like. Based on these calculation results, the CPU 110 gives a position where the focus lens 105 is to be moved to the focus drive circuit 121 and controls the position of the focus lens 105 to realize external measurement AF.

次に、図2を用いて外測AFセンサユニット130の構成例について説明する。
図2(a)において、被写体201は、撮影範囲(被写界)に含まれる被写体のうち、焦点検出を行う被写体である。結像レンズ131は、光軸が平行な第1及び第2の結像レンズ202Aおよび202Bが一体形成された構成を有する。また、ラインセンサ132は、第1及び第2のラインセンサ203A及び203Bとを有している。
Next, a configuration example of the external measurement AF sensor unit 130 will be described with reference to FIG.
In FIG. 2A, a subject 201 is a subject that performs focus detection among subjects included in the shooting range (field of view). The imaging lens 131 has a configuration in which first and second imaging lenses 202A and 202B having parallel optical axes are integrally formed. The line sensor 132 includes first and second line sensors 203A and 203B.

第1の結像レンズ202Aによる被写界像が一対のラインセンサの一方である第1のラインセンサ203Aで、第2の結像レンズ202Bによる被写界像が一対のラインセンサの他方である第2のラインセンサ203Bでそれぞれ検出される。第1及び第2のラインセンサ203A及び203Bは個々の被写界像を光電変換し、被写界像の輝度に対応した電気信号を出力する。第1のラインセンサ203Aが出力する電気信号をA像信号、第2のラインセンサ203Bが出力する電気信号をB像信号と呼ぶ。   The object scene image by the first imaging lens 202A is the first line sensor 203A that is one of the pair of line sensors, and the object scene image by the second imaging lens 202B is the other of the pair of line sensors. Each is detected by the second line sensor 203B. The first and second line sensors 203A and 203B photoelectrically convert each object scene image and output an electric signal corresponding to the luminance of the object scene image. The electrical signal output from the first line sensor 203A is referred to as an A image signal, and the electrical signal output from the second line sensor 203B is referred to as a B image signal.

第1及び第2の結像レンズ202Aと202B、第1及び第2のラインセンサ203Aと203Bは、それぞれ予め定められた基線長Bだけ互いに離れて設置されている。そのため、第1及び第2のラインセンサ203A及び203Bから得られるA像信号及びB像信号を用い、三角測量の原理に基づいて被写体距離Lを測定することができる。   The first and second imaging lenses 202A and 202B and the first and second line sensors 203A and 203B are disposed apart from each other by a predetermined base line length B, respectively. Therefore, the subject distance L can be measured based on the principle of triangulation using the A and B image signals obtained from the first and second line sensors 203A and 203B.

図2(b)は、第1のラインセンサ203Aをさらに詳細に示したものである。第1のラインセンサ203Aは、40個の長方画素が画素ピッチpで隣接配置された構成を有する。第1のラインセンサ203Aはさらに、電荷蓄積を制御するためのディジタル回路(不図示)を有し、一つの画素での蓄積電荷量が所定値に達すると他の画素の蓄積動作も停止するように構成されている。また、40個の画素のうちどの画素で電荷蓄積を行うかをCPU110から設定することが可能である。この設定方法に特に制限はないが、有効とする画素には「1」を、無効とする画素には「0」を対応付けた40ビットのデータを用い、各ビットを入力の1つとする40個の論理ゲートを用いて各画素の有効無効を制御することができる。なお、第2のラインセンサ203Bの構成は、第1のラインセンサ203Aと同等であるため説明を省略する。以下の説明では、第1のラインセンサ203Aの画素1〜40をSA1〜SA40、第2のラインセンサ203Bの画素1〜40をSB1〜SB40と表記する。   FIG. 2B shows the first line sensor 203A in more detail. The first line sensor 203A has a configuration in which 40 rectangular pixels are adjacently arranged at a pixel pitch p. The first line sensor 203A further includes a digital circuit (not shown) for controlling charge accumulation, and when the amount of accumulated charge in one pixel reaches a predetermined value, the accumulation operation of other pixels is stopped. It is configured. In addition, the CPU 110 can set which of the 40 pixels performs charge accumulation. This setting method is not particularly limited, but 40-bit data in which “1” is associated with valid pixels and “0” is associated with invalid pixels is used, and each bit is an input 40 The validity / invalidity of each pixel can be controlled by using one logic gate. Note that the configuration of the second line sensor 203B is the same as that of the first line sensor 203A, and a description thereof will be omitted. In the following description, the pixels 1 to 40 of the first line sensor 203A are referred to as SA1 to SA40, and the pixels 1 to 40 of the second line sensor 203B are referred to as SB1 to SB40.

図3(a)は被写体輝度の一例を、図3(b)は図3(a)の被写体輝度から外測AFセンサユニット130で得られるA像信号及びB像信号の一例を示す。
図3(a)には、近距離被写体の被写体輝度301と、第1のラインセンサ203Aの視野(A像視野)と、第2のラインセンサ203Bの視野(B像視野)をそれぞれ示している。また、図3(b)には、図3(a)の被写体輝度に対する理想的なA像信号301A及びB像信号301Bを示している。
FIG. 3A shows an example of the subject brightness, and FIG. 3B shows an example of the A image signal and the B image signal obtained by the external measurement AF sensor unit 130 from the subject brightness of FIG.
FIG. 3A shows the subject brightness 301 of a short-distance subject, the field of view of the first line sensor 203A (A image field of view), and the field of view of the second line sensor 203B (B image field of view). . FIG. 3B shows an ideal A image signal 301A and B image signal 301B with respect to the subject brightness shown in FIG.

ここでは説明のため、被写体距離は既知であり、A像信号301AとB像信号301Bは、20.1画素相当シフトすると共通視野区間の信号が完全に一致するものとする(すなわち、位相差=20.1画素相当)。つまり、図3の例では、A像信号301AとB像信号301Bとで共通した被写体像に対応する信号区間は約20画素分であり、残りの約20画素分はそれぞれ異なる被写体像に対応した像信号である。実際には、A像信号301AとB像信号301Bの位相差(20.1画素相当分)を、相関演算によって算出する必要がある。   Here, for the purpose of explanation, it is assumed that the subject distance is known, and the signals in the common visual field section completely match when the A image signal 301A and the B image signal 301B are shifted by 20.1 pixels (that is, the phase difference = 20.1 pixel equivalent). That is, in the example of FIG. 3, the signal interval corresponding to the subject image common to the A image signal 301A and the B image signal 301B is about 20 pixels, and the remaining about 20 pixels correspond to different subject images. It is an image signal. Actually, it is necessary to calculate the phase difference (corresponding to 20.1 pixels) between the A image signal 301A and the B image signal 301B by correlation calculation.

図3(b)に示したA像信号301AとB像信号301Bは理想的な信号である。被写体像がラインセンサに結像するまでの過程には様々な変動要因が存在するため、実際にはこのような理想的な像信号は得られない。例えば、被写体像をラインセンサに結像する第1及び第2の結像レンズ202Aと202Bの収差や、レンズに付着したほこりやごみ、ラインセンサ203A及び203Bが有する画素間の感度差、オフセット差、ゲイン差などの影響が像信号に影響する。以下の説明では、図3(c)に示すように、やや感度が低下したようなA像信号301A’と、理想的なB像信号301Bが得られたものとする。   The A image signal 301A and the B image signal 301B shown in FIG. 3B are ideal signals. Since there are various fluctuation factors in the process until the subject image is formed on the line sensor, such an ideal image signal cannot actually be obtained. For example, aberrations of the first and second imaging lenses 202A and 202B that form a subject image on a line sensor, dust and dirt adhering to the lenses, sensitivity differences between pixels included in the line sensors 203A and 203B, and offset differences The influence of the gain difference affects the image signal. In the following description, as shown in FIG. 3C, it is assumed that an A image signal 301A ′ and an ideal B image signal 301B with slightly lowered sensitivity are obtained.

次に、本実施形態における外測AFセンサユニット130による焦点検出動作を、図4のフローチャートを用いて説明する。
S401で例えば操作スイッチ群111に含まれる特定のボタン操作などにより焦点検出開始指示が発生すると、CPU110はS402において外測AFセンサユニット130に対して蓄積開始を指示する。ラインセンサ203A及び203Bのいずれかの画素における蓄積電荷量(電圧)が所定値に達すると、外測AFセンサユニット130が有する制御回路により全画素の電荷蓄積動作が自動的に終了される。
Next, the focus detection operation by the external measurement AF sensor unit 130 in this embodiment will be described with reference to the flowchart of FIG.
When a focus detection start instruction is generated, for example, by a specific button operation included in the operation switch group 111 in S401, the CPU 110 instructs the external measurement AF sensor unit 130 to start accumulation in S402. When the accumulated charge amount (voltage) in any of the pixels of the line sensors 203A and 203B reaches a predetermined value, the charge accumulation operation of all the pixels is automatically terminated by the control circuit of the external measurement AF sensor unit 130.

S403でCPU110は、ラインセンサ203A及び203Bが有するアンプ(図示せず)で増幅された各画素の電荷量をA/D変換することにより、被写体輝度に応じたA像信号およびB像信号を得る。ここでCPU110は、第1のラインセンサ203AのSA1〜SA40と、第2のラインセンサ203BのSB1〜SB40のそれぞれ蓄積された電荷を読み出してA像信号およびB像信号を得る。得られた像信号を図6(a)に示す。図6(a)は図3(c)と同一である。   In S403, the CPU 110 performs A / D conversion on the charge amount of each pixel amplified by an amplifier (not shown) included in the line sensors 203A and 203B, thereby obtaining an A image signal and a B image signal corresponding to the subject luminance. . Here, the CPU 110 reads the charges accumulated in SA1 to SA40 of the first line sensor 203A and SB1 to SB40 of the second line sensor 203B to obtain an A image signal and a B image signal. The obtained image signal is shown in FIG. FIG. 6A is the same as FIG.

S404でCPU110は、第1及び第2の結像レンズ202A及び202Bの収差や、第1及び第2のラインセンサ203A及び203Bの画素の感度差など、静的な要因が像信号に与える影響を除去するため、予め画素毎に用意した補正値で像信号を補正する。   In S404, the CPU 110 affects the influence of static factors on the image signal, such as the aberration of the first and second imaging lenses 202A and 202B, and the sensitivity difference between the pixels of the first and second line sensors 203A and 203B. In order to remove the image signal, the image signal is corrected with a correction value prepared for each pixel in advance.

S405でCPU110はS404において得られた補正された像信号の画素方向における微分信号を生成する。ここで、画素方向における微分信号とは、隣接する2画素の中間位置に画素を補間した信号である。例えば、A像信号であれば、SA1とSA2の間に、SA1.5を演算によって追加する。なお、微分信号は様々な方法で求めることができるため、特定の方法には限定されないが、一例を挙げれば、SA2.5をSA1〜SA4の4画素値から算出する微分演算として、
SA2.5=2×SA1+SA2−SA3−2×SA4
を用いることができる。この演算式は、微分に加え、ローパスフィルタとしての演算も含んでいる。この演算式を図6(a)の像信号に適用して得られた微分A像信号601A、微分B像信号601Bを図6(b)に示す。この演算により、例えば何らかの外的要因によってA像信号のみ感度が低いといった場合に生じる像信号間のオフセットの影響を排除することができる。
In S405, the CPU 110 generates a differential signal in the pixel direction of the corrected image signal obtained in S404. Here, the differential signal in the pixel direction is a signal obtained by interpolating a pixel at an intermediate position between two adjacent pixels. For example, in the case of an A image signal, SA1.5 is added by calculation between SA1 and SA2. Since the differential signal can be obtained by various methods, it is not limited to a specific method. For example, as a differential operation for calculating SA2.5 from four pixel values of SA1 to SA4,
SA2.5 = 2 × SA1 + SA2-SA3-2 × SA4
Can be used. This arithmetic expression includes a calculation as a low-pass filter in addition to the differentiation. FIG. 6B shows a differential A image signal 601A and a differential B image signal 601B obtained by applying this arithmetic expression to the image signal of FIG. By this calculation, it is possible to eliminate the influence of the offset between the image signals that occurs when, for example, the sensitivity of only the A image signal is low due to some external factor.

S406で、第1の検出手段としてのCPU110は、S405で得られた微分A像信号601Aと微分B像信号601Bの位相差(ずれ量)Wnを算出する。ここでは、画素単位の半分の精度で位相差Wnを算出できればよく、本例では20画素相当というずれ量が得られれば十分である。実際にフォーカスレンズ位置を決定するための位相差を算出する場合には、さらに分解能をあげて1画素間をより細かく補間した精度でずれ量を算出するが、ここでは像信号の補正値を算出する区間を検出するための位相差であるため、1/2画素程度の精度でよい。そのため、S406で得る位相差を簡易位相差Wnと呼ぶ。   In S406, the CPU 110 as the first detection unit calculates the phase difference (deviation amount) Wn between the differential A image signal 601A and the differential B image signal 601B obtained in S405. Here, it suffices if the phase difference Wn can be calculated with half the accuracy of a pixel unit, and in this example, it is sufficient if a shift amount equivalent to 20 pixels is obtained. When calculating the phase difference for actually determining the focus lens position, the amount of deviation is calculated with the accuracy of further increasing the resolution and finely interpolating between one pixel, but here the correction value of the image signal is calculated. This is a phase difference for detecting an interval to be performed, and therefore, an accuracy of about ½ pixel is sufficient. Therefore, the phase difference obtained in S406 is referred to as simple phase difference Wn.

図7に、S405で得られた簡易位相差Wnと微分像信号との関係を示す。S405で得られた微分A像信号601Aを白丸で、微分B像信号601Bを黒三角でプロットしている。また、信号701はS406における簡易位相差Wnの演算の過程において、微分B像信号601Bを20画素シフトした信号を白三角でプロットしている。図7からわかる通り、微分B像信号を20画素シフトすればおおむね微分A像信号601Aと一致する範囲と、一致しない範囲がある。   FIG. 7 shows the relationship between the simplified phase difference Wn obtained in S405 and the differential image signal. The differential A image signal 601A obtained in S405 is plotted with a white circle, and the differential B image signal 601B is plotted with a black triangle. The signal 701 plots a signal obtained by shifting the differential B image signal 601B by 20 pixels in the process of calculating the simple phase difference Wn in S406 as a white triangle. As can be seen from FIG. 7, when the differential B image signal is shifted by 20 pixels, there is a range that roughly matches the differential A image signal 601 </ b> A and a range that does not match.

S407でCPU110は、補正量の算出処理を行う。この補正量算出処理について、図5のフローチャートを用いて詳細に説明する。
S502においてCPU110は、元のA像信号301A’とB像信号301Bから、同一被写体に対応する区間を抽出する。具体的には、CPU110は、S405で補正した像信号を用い、A像信号301A’とB像信号301Bの全区間のうち、同一被写体像に対応する、共通区間の画素データを、S406で求めた簡易位相差Wnをもとに抽出する。
In S407, the CPU 110 performs a correction amount calculation process. The correction amount calculation process will be described in detail with reference to the flowchart of FIG.
In S502, the CPU 110 extracts a section corresponding to the same subject from the original A image signal 301A ′ and the B image signal 301B. Specifically, the CPU 110 uses the image signal corrected in S405 to obtain pixel data in a common section corresponding to the same subject image among all sections of the A image signal 301A ′ and the B image signal 301B in S406. Extracted based on the simple phase difference Wn.

上述の通り、本例ではS406で簡易位相差Wn=20画素と求まっているので、B像信号301BはSB1〜SB20のデータが、A像信号301A’はSA21〜SA40のデータが共通区間のデータとしてそれぞれ抽出される。図8に、A像信号301A’とB像信号301Bのうち、S502で抽出される区間をそれぞれ枠806および807で示す。   As described above, in this example, since the simple phase difference Wn = 20 pixels is obtained in S406, the B image signal 301B is data of SB1 to SB20, and the A image signal 301A ′ is data of the common section of SA21 to SA40. Respectively. In FIG. 8, sections extracted in S502 of the A image signal 301A ′ and the B image signal 301B are indicated by frames 806 and 807, respectively.

S503でCPU110は、A像信号301A’とB像信号301Bの抽出区間の先頭(画素番号の若い方)から平坦点の探索を開始する。ここでいう平坦点とは、信号の変化がなだらかな点を意味する。具体的にはCPU110は、直前もしくは直後の画素データとの値の差が所定の閾値範囲内(条件1)であるか、直前の画素データとの間に変極点が存在する(条件2)画素を、平坦点としてSA21〜SA40及びSB1〜SB20の区間で順次探索する。ここでは、n番目に検出された平坦点を第n平坦点と呼ぶ。   In step S503, the CPU 110 starts searching for a flat point from the beginning of the extraction interval of the A image signal 301A ′ and the B image signal 301B (the one with the smaller pixel number). Here, the flat point means a point where the signal changes gently. Specifically, the CPU 110 determines whether the difference in value from the immediately preceding or immediately following pixel data is within a predetermined threshold range (condition 1), or an inflection point exists between the immediately preceding pixel data (condition 2). Are sequentially searched in the sections of SA21 to SA40 and SB1 to SB20 as flat points. Here, the nth detected flat point is referred to as the nth flat point.

図8の例では、A像信号301A’の画素データ801は上述の条件2を、画素データ802は条件1を満たすため、平坦点として検出される。同様に、B像信号301Bにおいて、画素データ803及び804が平坦点として検出される。
平坦点探索の結果、A像信号301A’で平坦点が1つも検出できない場合(S504,Y)および平坦点が1つしか検出できない場合(S506,Y)は補正量の算出ができない場合として異常終了する(S511)。
In the example of FIG. 8, since the pixel data 801 of the A image signal 301A ′ satisfies the above-described condition 2 and the pixel data 802 satisfies the condition 1, it is detected as a flat point. Similarly, pixel data 803 and 804 are detected as flat points in the B image signal 301B.
As a result of the flat point search, when no flat point can be detected in the A image signal 301A ′ (S504, Y) and when only one flat point can be detected (S506, Y), the correction amount cannot be calculated. The process ends (S511).

本実施形態では、図8に示したように、A像信号301A’において第1平坦点(画素データ801)および第2平坦点(画素データ802)が検出されたものとする。
S507でCPU110は、検出されたA像信号301A’の第1平坦点および第2平坦点に対応する平坦点がB像信号301Bで検出されているか調べる。本実施形態では、図8に示したように、B像信号301Bにおいて、A像信号301A’の第1平坦点と第2平坦点に対応する第1平坦点(画素データ803)および第2平坦点(画素データ804)が検出されているものとする。B像信号301BにおいてA像信号301A’の第1及び第2の平坦点に対応する平坦点が検出されていない場合(S507,Y)には、補正量の算出ができない場合として異常終了する(S511)。
In this embodiment, as shown in FIG. 8, it is assumed that the first flat point (pixel data 801) and the second flat point (pixel data 802) are detected in the A image signal 301A ′.
In S507, the CPU 110 checks whether the B image signal 301B has detected the flat points corresponding to the first flat point and the second flat point of the detected A image signal 301A ′. In the present embodiment, as shown in FIG. 8, in the B image signal 301B, the first flat point (pixel data 803) and the second flat point corresponding to the first flat point and the second flat point of the A image signal 301A ′. It is assumed that a point (pixel data 804) has been detected. If the flat points corresponding to the first and second flat points of the A image signal 301A ′ are not detected in the B image signal 301B (S507, Y), the process ends abnormally as a case where the correction amount cannot be calculated ( S511).

なお、ここで、「対応する平坦点」とは、例えば、抽出区間内におけるほぼ同じ位置において検出されている平坦点であってよい。さらに、平坦点として満たしている条件(例えば上述の条件1、条件2)が共通であることを要件として加えてもよい。   Here, the “corresponding flat point” may be, for example, a flat point detected at substantially the same position in the extraction section. Furthermore, it may be added as a requirement that conditions satisfying as a flat point (for example, the above-described condition 1 and condition 2) are common.

図8に示すように、B像信号301Bに、A像信号301A’の第1および第2平坦点に対応する平坦点が検出されている(S507,N)場合、CPU110はS508で第1補正量(オフセット補正量)を算出する。具体的にはCPU110は、図8に示す通り、検出された第1及び第2の平坦点のうち、値の低い平坦点(ここでは第2平坦点)についての、A像信号301A’とB像信号301Bの差を第1補正量として算出する。   As shown in FIG. 8, when a flat point corresponding to the first and second flat points of the A image signal 301A ′ is detected in the B image signal 301B (S507, N), the CPU 110 performs the first correction in S508. The amount (offset correction amount) is calculated. Specifically, as shown in FIG. 8, the CPU 110 performs A image signals 301 </ b> A ′ and B for a low-value flat point (here, the second flat point) among the detected first and second flat points. The difference between the image signals 301B is calculated as the first correction amount.

S509においてCPU110は、S508で算出した第1補正量を用いて第2補正量を算出する。具体的にはCPU110は、図9に示すY1とY2の比(Y1/Y2)を第2補正量として算出する。より詳細に説明すると、CPU110は、第1補正量に等しいオフセットをA像信号301A’とB像信号301Bの一方に加算又は減算し、第2平坦点の値が等しくなるように補正する。ここでは、A像信号301Aに第1補正量を加算してA像信号301A”としたものとする。   In S509, the CPU 110 calculates the second correction amount using the first correction amount calculated in S508. Specifically, the CPU 110 calculates the ratio (Y1 / Y2) of Y1 and Y2 shown in FIG. 9 as the second correction amount. More specifically, the CPU 110 adds or subtracts an offset equal to the first correction amount to one of the A image signal 301A ′ and the B image signal 301B to correct the second flat point value to be equal. Here, it is assumed that the A image signal 301A ″ is obtained by adding the first correction amount to the A image signal 301A.

そして、CPU110は、第2平坦点802,804の値を揃えたA像信号301A”とB像信号301Bにおける第2平坦点の値と第1平坦点の値の差Y1,Y2を求め、その比Y1/Y2を第2補正量(ゲイン補正量)として算出する。なお、Y2/Y1を第2補正量として求めてもよい。ここでは、Y1<Y2であることから、A像信号301A’を増幅するためにY2/Y1を第2補正量として算出するものとする。第2補正量を算出すると、補正量が正しく算出できたとしてCPU110は補正量算出処理を正常終了する(S510)。   Then, the CPU 110 obtains the difference Y1, Y2 between the value of the second flat point and the value of the first flat point in the A image signal 301A ″ and the B image signal 301B in which the values of the second flat points 802, 804 are aligned, The ratio Y1 / Y2 is calculated as the second correction amount (gain correction amount), and Y2 / Y1 may be calculated as the second correction amount, where Y1 <Y2, so that the A image signal 301A ′ Assuming that Y2 / Y1 is calculated as the second correction amount, the CPU 110 normally ends the correction amount calculation process assuming that the correction amount is correctly calculated (S510).

図4に戻って、S408でCPU110はS407における補正量算出処理が異常終了していれば(S408,N)、S409における像補正は行わずに相関演算を行うために処理をS410へ移行させる。一方、補正量算出処理が正常終了した場合、CPU110はS409で像信号を再度補正する。   Returning to FIG. 4, if the correction amount calculation process in S <b> 407 has ended abnormally in S <b> 408 (S <b> 408, N), the CPU 110 shifts the process to S <b> 410 to perform correlation calculation without performing image correction in S <b> 409. On the other hand, when the correction amount calculation process is normally completed, the CPU 110 corrects the image signal again in S409.

S409における像信号の補正は、予めわかっているセンサ感度のばらつきやレンズ収差などの静的要因による固定的な像信号への影響を除去するためにS404で行った補正とは異なり、動的な外的要因による像信号への影響を除去するための補正である。   The correction of the image signal in S409 is different from the correction performed in S404 in order to remove the influence on static image signals due to static factors such as sensor sensitivity variations and lens aberrations that are known in advance. This is correction for removing the influence on the image signal due to external factors.

CPU110は、A像信号301A’とB像信号301Bの一方について、全区間に対して第1補正量を適用して、図9に示したように第2平坦点の値が一致するようにオフセット補正を行う。ここでは、上述したように感度がやや低いA像信号301A’が検出されているため、A像信号301A’に第1補正量を加算するオフセット補正を行い、A像信号301A”を得たものとする。さらにCPU110は、第2補正量として算出したY2/Y1をオフセット補正後のA像信号301A”を構成する各画素データに対して適用することによってゲイン補正を行い、第1平坦点の値もB像信号301Bとほぼ一致するA像信号301A’’’を得る。図10に補正前後のA像信号およびB像信号を示した。このように像信号の補正を行った上で、第2の検出手段としてのCPU110はS410で焦点検出用の(高精度な)位相差を算出する。   The CPU 110 applies the first correction amount to all the sections for one of the A image signal 301A ′ and the B image signal 301B, and offsets so that the values of the second flat points coincide as shown in FIG. Make corrections. Here, since the A image signal 301A ′ having a slightly low sensitivity is detected as described above, offset correction is performed by adding the first correction amount to the A image signal 301A ′ to obtain the A image signal 301A ″. Further, the CPU 110 performs gain correction by applying Y2 / Y1 calculated as the second correction amount to each pixel data constituting the A image signal 301A ″ after the offset correction, so that the first flat point is corrected. An A image signal 301A ′ ″ whose value substantially coincides with the B image signal 301B is obtained. FIG. 10 shows the A and B image signals before and after correction. After correcting the image signal in this way, the CPU 110 as the second detection unit calculates a (high-precision) phase difference for focus detection in S410.

S410における位相差の算出は、信号間の位相差を検出する任意の方法を用いて実行可能であるが、例えばMin法(and法)を用いることができる。Min法はB像信号をずらしてA像信号に重ね合わせたときに、A像信号とB像信号の対応する位置における差分値を画素方向に積分して、像信号が重ならない部分の面積を求め、その面積が最小となる位相差を算出する方式である。なお、上述の通り、S410での位相差(ずれ量)の検出は、例えば0.1画素単位のように、簡易位相差Wnの算出時よりも高分解能で行う。   The calculation of the phase difference in S410 can be executed using any method for detecting the phase difference between signals, but for example, the Min method (and method) can be used. In the Min method, when the B image signal is shifted and superimposed on the A image signal, the difference value at the corresponding position of the A image signal and the B image signal is integrated in the pixel direction, and the area of the portion where the image signals do not overlap is calculated. This is a method for calculating and calculating the phase difference that minimizes the area. As described above, the detection of the phase difference (deviation amount) in S410 is performed with higher resolution than when calculating the simple phase difference Wn, for example, in units of 0.1 pixel.

S410で位相差の算出が終わると、1回の焦点検出シーケンスが終了する。次のS411で焦点検出終了指示が検出されるまで、CPU110は処理をS402に戻して焦点検出シーケンスを繰り返す。S411で焦点検出終了指示が検出されれば、CPU110は焦点検出処理を終了する。   When the calculation of the phase difference is finished in S410, one focus detection sequence is finished. Until the focus detection end instruction is detected in the next S411, the CPU 110 returns the process to S402 and repeats the focus detection sequence. If a focus detection end instruction is detected in S411, the CPU 110 ends the focus detection process.

本実施形態による像信号の補正が焦点検出精度に与える影響について図11を用いて説明する。本実施形態で説明した例では、算出すべき位相差は20.1画素(ピッチ)相当である。しかしながら、一方の像信号のみにオフセットやゲイン差のようなノイズ成分が混入した場合、像信号の補正を行わないと、位相差検出の精度は(a)で示す範囲のようなほぼ画素単位まで低下する。これは一方の像信号にのみノイズ成分が混入すると、相関演算に使用すべき像信号の区間が正しく検出できず、その結果、像信号間で異なる画素位置の値を比較して相関演算が行われて、相関演算結果のピークが不明確になるからである。一方、本実施形態のように、微分像波形を用いることにより、相関演算に用いる像信号の区間をノイズ成分の影響を排除した状態で検出できる。そのため、像信号間の画素位置の一致度が高い状態で相関演算を行うことができ、相関演算結果のピークが明確になり、例えば(b)に示すような範囲での精度で位相差が検出できる。   The influence of the correction of the image signal according to the present embodiment on the focus detection accuracy will be described with reference to FIG. In the example described in the present embodiment, the phase difference to be calculated is equivalent to 20.1 pixels (pitch). However, when a noise component such as an offset or a gain difference is mixed in only one image signal, the accuracy of the phase difference detection is almost the pixel unit as in the range shown in (a) unless the image signal is corrected. descend. This is because if a noise component is mixed in only one image signal, the interval of the image signal to be used for the correlation calculation cannot be detected correctly, and as a result, the correlation calculation is performed by comparing the values of different pixel positions between the image signals. This is because the peak of the correlation calculation result becomes unclear. On the other hand, by using the differential image waveform as in the present embodiment, the section of the image signal used for the correlation calculation can be detected in a state where the influence of the noise component is eliminated. Therefore, correlation calculation can be performed in a state where the degree of coincidence of the pixel positions between the image signals is high, and the peak of the correlation calculation result becomes clear, for example, the phase difference is detected with accuracy within the range shown in (b). it can.

以上説明したように、本実施形態では、像信号のオフセット及びゲイン補正を行うための補正値を、像信号の全区間を用いて算出せず、同一被写体に対応する区間(視野が共通な区間)を用いて算出する。そのため、例えば近距離被写体に対して外測AFセンサで得られるような位相差の大きな像信号となっても、異なる被写体に対応する像信号の影響を大幅に抑制することができ、精度のよい焦点検出が実現できる。   As described above, in this embodiment, the correction values for performing the offset and gain correction of the image signal are not calculated using all the sections of the image signal, and the section corresponding to the same subject (the section having a common field of view). ) To calculate. Therefore, for example, even when an image signal with a large phase difference is obtained for a short-distance subject using an external measurement AF sensor, the influence of the image signal corresponding to a different subject can be greatly suppressed, and the accuracy is high. Focus detection can be realized.

さらに、補正値を算出するために用いる像信号の区間を、微分した像信号の位相差によって決定することで、一方の像信号にのみノイズ成分が混入した場合であっても、ノイズ成分の影響を受けずに適切な区間を抽出でき、精度のよい補正量を得ることができる。そのため、結果として焦点検出精度を向上させることができる。   Furthermore, by determining the interval of the image signal used to calculate the correction value based on the phase difference of the differentiated image signal, the influence of the noise component is affected even when the noise component is mixed in only one image signal. Therefore, it is possible to extract an appropriate section without receiving a correction and obtain a highly accurate correction amount. As a result, focus detection accuracy can be improved.

(第2の実施形態)
次に、第1の実施形態において図5を用いて説明した補正量算出処理の別の例を説明する。他の処理は第1の実施形態と同等であってよいため、説明を省略する。
図12は、本実施形態に係る補正量算出処理を説明するためのフローチャートである。まず、S1202でCPU110は、S502と同様に、元のA像信号301A’とB像信号301Bから、同一被写体に対応する区間を抽出する。
(Second Embodiment)
Next, another example of the correction amount calculation process described with reference to FIG. 5 in the first embodiment will be described. Since other processes may be the same as those in the first embodiment, description thereof is omitted.
FIG. 12 is a flowchart for explaining the correction amount calculation processing according to the present embodiment. First, in S1202, the CPU 110 extracts a section corresponding to the same subject from the original A image signal 301A ′ and the B image signal 301B as in S502.

S1203においてCPU110は、A像信号301A’の抽出区間SA21からSA40の最大値および最小値をそれぞれAmin,Amaxとして検出する。また、S1204においてCPU110は、B像信号301Bの抽出区間SB1からSB20の最大値および最小値をそれぞれBmin,Bmaxとして検出する。
S1205でCPU110は、第1補正量としてBmin-Aminを算出し、S1206では第2補正量として(Bmax - Bmin) / (Amax - Amin)を算出する。
In S1203, the CPU 110 detects the maximum value and the minimum value of the extraction interval SA21 to SA40 of the A image signal 301A ′ as Amin and Amax, respectively. In S1204, the CPU 110 detects the maximum value and the minimum value of the extraction interval SB1 to SB20 of the B image signal 301B as Bmin and Bmax, respectively.
In S1205, the CPU 110 calculates Bmin−Amin as the first correction amount, and calculates (Bmax−Bmin) / (Amax−Amin) as the second correction amount in S1206.

(第3の実施形態)
次に、第1の実施形態において図5を用いて説明した補正量算出処理のさらに別の例を説明する。他の処理は第1の実施形態と同等であってよいため、説明を省略する。
図13は、本実施形態に係る補正量算出処理を説明するためのフローチャートである。まず、S1302でCPU110は、S502と同様に、元のA像信号301A’とB像信号301Bから、同一被写体に対応する区間を抽出する。
(Third embodiment)
Next, still another example of the correction amount calculation process described with reference to FIG. 5 in the first embodiment will be described. Since other processes may be the same as those in the first embodiment, description thereof is omitted.
FIG. 13 is a flowchart for explaining the correction amount calculation processing according to the present embodiment. First, in S1302, the CPU 110 extracts a section corresponding to the same subject from the original A image signal 301A ′ and the B image signal 301B, as in S502.

S1303においてCPU110は、A像信号301A’の抽出区間SA21からSA40の平均値と最小値をそれぞれAave,Aminとして検出する。また、S1304においてCPU110は、B像信号301Bの抽出区間SB1からSB20の平均値と最小値をそれぞれBave,Bminとして検出する。
S1305でCPU110は、第1補正量としてBmin-Aminを算出し、S1306では第2補正量として、(Bave- Bmin) / (Aave - Amin)を算出する。
なお、最小値の代わりに最大値を用いてもよく、この場合第2の補正量は(Bmax - Bave) / (Amax - Aave)とする。
In S1303, the CPU 110 detects the average value and the minimum value of the extraction interval SA21 to SA40 of the A image signal 301A ′ as Aave and Amin, respectively. In S1304, the CPU 110 detects the average value and the minimum value of the extraction interval SB1 to SB20 of the B image signal 301B as Bave and Bmin, respectively.
In S1305, the CPU 110 calculates Bmin-Amin as the first correction amount, and in S1306 calculates (Bave-Bmin) / (Aave-Amin) as the second correction amount.
The maximum value may be used instead of the minimum value. In this case, the second correction amount is (Bmax−Bave) / (Amax−Aave).

第2及び第3の実施形態によっても、第1の実施形態と同様の効果を得ることができる。   According to the second and third embodiments, the same effect as that of the first embodiment can be obtained.

(その他の実施形態)
なお、上述の実施形態において、S410で焦点検出用の位相差算出に微分像信号を用いてもよい。これにより、より高精度な検出が可能となる。なお、ここでの微分処理は、S405における微分処理よりもより強く(高次に)してもよい。また、上述の実施形態は位相差検出AF方式のうち、被写体距離を検出する外測AF方式を前提に説明したが、デフォーカス量を検出するTTL方式はもちろん、ラインセンサ以外を用いて一対の像信号を得る方式に対しても同様に適用可能である。ラインセンサを用いない方式としては、例えば、撮像素子に設けた複数の位相差検出用画素から得られる像信号の位相差を検出する方式がある。
(Other embodiments)
In the above-described embodiment, the differential image signal may be used for calculating the phase difference for focus detection in S410. Thereby, detection with higher accuracy becomes possible. The differentiation process here may be made stronger (higher order) than the differentiation process in S405. The above embodiment has been described on the premise of the external measurement AF method for detecting the subject distance among the phase difference detection AF methods. However, the TTL method for detecting the defocus amount is used as well as a pair of sensors other than the line sensor. The present invention can be similarly applied to a method for obtaining an image signal. As a system that does not use a line sensor, for example, there is a system that detects a phase difference of image signals obtained from a plurality of phase difference detection pixels provided in an image sensor.

また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(または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 storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (10)

一対のセンサから得られる一対の像信号の位相差を検出することによって被写体距離又はデフォーカス量を検出する焦点検出装置であって、
前記一対の像信号を微分し、一対の微分像信号を生成する微分手段と、
前記一対の微分像信号の位相差を検出する第1の検出手段と、
前記第1の検出手段によって検出された位相差を用いて、前記一対の像信号のうち、同一被写体に対応する区間を抽出する抽出手段と、
前記一対の像信号のうち前記抽出手段が抽出した区間の信号を用いて、前記一対の像信号のオフセット及びゲインの差を補正するための補正値を算出する算出手段と、
前記補正値を用いて前記オフセット及びゲインの差が補正された前記一対の像信号を用いて、前記被写体距離又はデフォーカス量を検出するための前記一対の像信号の位相差を検出する第2の検出手段と、を有することを特徴とする焦点検出装置。
A focus detection device that detects a subject distance or a defocus amount by detecting a phase difference between a pair of image signals obtained from a pair of sensors,
Differentiating means for differentiating the pair of image signals and generating a pair of differential image signals;
First detection means for detecting a phase difference between the pair of differential image signals;
Extraction means for extracting a section corresponding to the same subject from the pair of image signals using the phase difference detected by the first detection means;
A calculating means for calculating the extraction means with the signal of the extracted interval, the correction value of the order to correct the difference between the offset and gain between the pair of image signals of the pair of image signals,
A phase difference between the pair of image signals for detecting the subject distance or the defocus amount is detected using the pair of image signals in which the difference between the offset and the gain is corrected using the correction value. And a focus detection device.
前記算出手段は、前記一対の像信号の前記抽出手段が抽出した区間の各々において一対の平坦点を検出し、前記一対の像信号の一方の前記区間で検出した一対の平坦点の値と、前記一対の像信号の他方の前記区間で検出した一対の平坦点の値とを合わせるための補正値を算出することを特徴とする請求項1に記載の焦点検出装置。 Said calculation means, said extracting means detects a pair of flat points in each of the extracted interval, the value of one pair of flat points detected by the section of the pair of image signals of said pair of image signals, The focus detection apparatus according to claim 1, wherein a correction value for adjusting a value of a pair of flat points detected in the other section of the pair of image signals is calculated. 前記算出手段は、前記一対の像信号の前記抽出手段が抽出した区間の各々において最大値と最小値を検出し、前記一対の像信号の一方の前記区間で検出した最大値と最小値と、前記一対の像信号の他方の前記区間で検出した最大値と最小値とを合わせるための補正値を算出することを特徴とする請求項1に記載の焦点検出装置。 Said calculation means, said extracting means detects a maximum value and a minimum value in each of the extracted interval, the maximum value and the minimum value detected by one the section of said pair of image signals of said pair of image signals, The focus detection apparatus according to claim 1, wherein a correction value for adjusting the maximum value and the minimum value detected in the other section of the pair of image signals is calculated. 前記算出手段は、前記一対の像信号の前記抽出手段が抽出した区間の各々において、平均値と最大値、または、平均値と最小値を検出し、前記一対の像信号の一方の前記区間で検出した平均値と最大値、または、平均値と最小値と、前記一対の像信号の他方の前記区間で検出した平均値と最大値、または、平均値と最小値とを合わせるための補正値を算出することを特徴とする請求項1に記載の焦点検出装置。 Said calculation means in each of the section the extraction means of said pair of image signals is extracted, the average and maximum values, or to detect the average value and the minimum value, whereas the section of said pair of image signals The detected average value and maximum value, or the average value and minimum value, and the correction value for matching the average value and maximum value detected in the other section of the pair of image signals, or the average value and minimum value. The focus detection apparatus according to claim 1, wherein: 前記補正値は、前記一対の像信号間のオフセットの差を補正するための第1の補正値と、前記一対の像信号間のゲインの差を補正するための第2の補正値とを含み、The correction value includes a first correction value for correcting a difference in offset between the pair of image signals and a second correction value for correcting a gain difference between the pair of image signals. ,
前記算出手段は、前記一対の像信号の前記区間の各々から一対の特徴点を検出し、前記一対の特徴点の一方の値に基づいて前記第1の補正値を算出し、前記第1の補正値で補正した前記一対の特徴点の値に基づいて前記第2の補正値を算出することを特徴とする請求項1に記載の焦点検出装置。  The calculating means detects a pair of feature points from each of the sections of the pair of image signals, calculates the first correction value based on one value of the pair of feature points, and The focus detection apparatus according to claim 1, wherein the second correction value is calculated based on the value of the pair of feature points corrected by a correction value.
前記特徴点が一対の平坦点、最大値と最小値、平均値と最大値、または、平均値と最小値であることを特徴とする請求項5に記載の焦点検出装置。The focus detection apparatus according to claim 5, wherein the feature points are a pair of flat points, a maximum value and a minimum value, an average value and a maximum value, or an average value and a minimum value. 前記第1の検出手段よりも前記第2の検出手段が高い分解能で位相差を検出することを特徴とする請求項1乃至請求項のいずれか1項に記載の焦点検出装置。 Focus detecting apparatus according to any one of claims 1 to 6, characterized in that to detect a phase difference with high resolution the second detecting means than the first detecting means. 前記第2の検出手段が、前記微分像信号よりも高次に微分された一対の像信号を用いて前記位相差を検出することを特徴とする請求項1乃至請求項のいずれか1項に記載の焦点検出装置。 The said 2nd detection means detects the said phase difference using a pair of image signal differentiated higher-order than the said differential image signal, The any one of Claim 1 thru | or 7 characterized by the above-mentioned. The focus detection apparatus described in 1. 前記一対のセンサが、撮像素子に設けられた複数の位相差検出用画素であることを特徴とする請求項1乃至請求項のいずれか1項に記載の焦点検出装置。 Said pair of sensor focus detection apparatus according to any one of claims 1 to 8, characterized in that a plurality of phase difference detection pixels provided in the image pickup device. 一対のセンサから得られる一対の像信号の位相差を検出することによって被写体距離又はデフォーカス量を検出する焦点検出装置の制御方法であって、
微分手段が前記一対の像信号を微分し、一対の微分像信号を生成する微分工程と、
第1の検出手段が前記一対の微分像信号の位相差を検出する第1の検出工程と、
抽出手段が、前記第1の検出手段によって検出された位相差を用いて、前記一対の像信号のうち、同一被写体に対応する区間を抽出する抽出工程と、
算出手段が、前記一対の像信号のうち前記抽出工程で抽出された区間の信号を用いて、前記一対の像信号のオフセット及びゲインの差を補正するための補正値を算出する算出工程と、
第2の検出手段が、前記補正値を用いて前記オフセット及びゲインの差が補正された前記一対の像信号を用いて、前記被写体距離又はデフォーカス量を検出するための前記一対の像信号の位相差を検出する第2の検出工程と、を有することを特徴とする焦点検出装置の制御方法。
A method for controlling a focus detection apparatus that detects a subject distance or a defocus amount by detecting a phase difference between a pair of image signals obtained from a pair of sensors,
Differentiating means for differentiating the pair of image signals and generating a pair of differential image signals;
A first detection step in which a first detection means detects a phase difference between the pair of differential image signals;
An extracting step in which an extracting unit extracts a section corresponding to the same subject from the pair of image signals using the phase difference detected by the first detecting unit;
Calculation step calculating means, by using the period signal extracted by the extraction step of the pair of image signals, calculates a correction value of the order to correct the difference between the offset and gain between the pair of image signals When,
The pair of image signals for detecting the subject distance or the defocus amount using the pair of image signals in which the difference between the offset and the gain is corrected using the correction value. And a second detection step of detecting a phase difference between the focus detection apparatus and the focus detection apparatus.
JP2010288552A 2010-12-24 2010-12-24 Focus detection apparatus and control method thereof Expired - Fee Related JP5871462B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010288552A JP5871462B2 (en) 2010-12-24 2010-12-24 Focus detection apparatus and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010288552A JP5871462B2 (en) 2010-12-24 2010-12-24 Focus detection apparatus and control method thereof

Publications (2)

Publication Number Publication Date
JP2012137547A JP2012137547A (en) 2012-07-19
JP5871462B2 true JP5871462B2 (en) 2016-03-01

Family

ID=46675026

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010288552A Expired - Fee Related JP5871462B2 (en) 2010-12-24 2010-12-24 Focus detection apparatus and control method thereof

Country Status (1)

Country Link
JP (1) JP5871462B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016080161A1 (en) 2014-11-18 2016-05-26 富士フイルム株式会社 Focus control device, focus control method, focus control program, lens device, and imaging device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2540801B2 (en) * 1986-03-14 1996-10-09 ミノルタ株式会社 Automatic focus adjustment device
JP2850336B2 (en) * 1988-11-01 1999-01-27 株式会社ニコン Focus detection device
JP2002014277A (en) * 2000-06-29 2002-01-18 Canon Inc Focus detecting device, image pickup device, focus detecting method, and medium presenting processing program
EP1713258B1 (en) * 2005-04-11 2012-11-07 Canon Kabushiki Kaisha Focus detection
JP5157084B2 (en) * 2006-05-17 2013-03-06 株式会社ニコン Correlation calculation device, focus detection device, and imaging device
JP4968010B2 (en) * 2007-11-16 2012-07-04 株式会社ニコン Correlation calculation method, correlation calculation device, focus detection device, and imaging device

Also Published As

Publication number Publication date
JP2012137547A (en) 2012-07-19

Similar Documents

Publication Publication Date Title
JP5094068B2 (en) Imaging apparatus and focus control method
KR101847392B1 (en) Image processing apparatus and method for controlling the same
US11095806B2 (en) Display control apparatus, display control method, and image capturing apparatus
JP5789098B2 (en) Focus detection apparatus and control method thereof
JP4946337B2 (en) Autofocus device and camera
US20180182075A1 (en) Image processing apparatus, image capturing apparatus, method of image processing, and storage medium
US11010030B2 (en) Electronic apparatus capable of performing display control based on display mode, control method thereof, and non-transitory computer readable medium
US9307168B2 (en) Image capture apparatus and method for controlling image capture apparatus in which defective pixels are indicated
WO2016080153A1 (en) Focus control device, focus control method, focus control program, lens device, and imaging device
US10200589B2 (en) Autofocus apparatus and optical apparatus
JP2016197231A (en) Display control device and method, and imaging device
US10630882B2 (en) Image pickup apparatus having function of correcting defocusing and method for controlling the same
JP2015069180A (en) Camera system and correction method of focus detection pixels
JP2013097154A (en) Distance measurement device, imaging apparatus, and distance measurement method
WO2016080157A1 (en) Focus control device, focus control method, focus control program, lens device, and imaging device
JP5164493B2 (en) Imaging device
US20200092489A1 (en) Optical apparatus, control method, and non-transitory computer-readable storage medium
JP5871462B2 (en) Focus detection apparatus and control method thereof
CN106993110B (en) Image pickup apparatus and control method thereof
JPWO2019202984A1 (en) Imaging device and distance measurement method, distance measurement program and recording medium
JP2009239460A (en) Focus control method, distance measuring equipment, imaging device
JP6395621B2 (en) Focus adjustment device, imaging device using the same, and focus adjustment method
JP2017116738A (en) Image correction device, method for controlling image correction device, and program
JP6645690B2 (en) Automatic focus adjustment device, imaging device, and automatic focus adjustment method
JP5454546B2 (en) Autofocus device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131224

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141017

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141027

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141224

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150525

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20151214

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160112

R151 Written notification of patent or utility model registration

Ref document number: 5871462

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees