JP5871462B2 - Focus detection apparatus and control method thereof - Google Patents
Focus detection apparatus and control method thereof Download PDFInfo
- 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
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.
一方、外測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は、本発明の実施形態に係る外測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
レンズユニット100は撮像光学系を構成し、被写体側(光側)から順に、固定レンズ101、変倍レンズ102、絞り103、固定レンズ104及びフォーカスレンズ105が配置されている。なお、これらの個々のレンズは、図では1枚のレンズとして記載しているが、複数のレンズから構成されていてもよい。
位置エンコーダ108は、変倍レンズ102の倍率、絞り103の大きさ(絞り値)、及びフォーカスレンズ105の位置を検出する。
The
The position encoder 108 detects the magnification of the
変倍レンズ102はズームモータ(ZM)106により光軸方向に駆動され、フォーカスレンズ105はフォーカスモータ(FM)107により光軸方向に駆動される。これらズームモータ106及びフォーカスモータ107はそれぞれ、ズーム駆動回路120及びフォーカス駆動回路121からの駆動信号を受けて動作する。
The
撮像素子109は例えばCCDイメージセンサやCMOSイメージセンサである。撮像素子109は、レンズユニット100に入射した光によって形成された、撮像範囲内の被写体像を複数の光電変換素子によって画素ごとの電気信号に変換する。信号処理回路119は、撮像素子109が出力する電気信号に対して、A/D変換処理、増幅処理、ホワイトバランス処理、色補間処理、ガンマ補正処理、等の各種信号処理を施し、所定フォーマットの画像データを生成する。画像データは表示装置114に出力されたり、半導体メモリ、光ディスク、ハードディスク等の記録メディア115に記録されたりする。
The
操作スイッチ群111には、電源スイッチや、録画動作や再生動作を開始及び停止させるスイッチ、動作モードを選択するためのスイッチ、レンズユニット100のズーム倍率(画角)を変化させるズームスイッチ等が設けられている。電源スイッチが操作されると、不揮発性メモリ113に格納されているプログラムの一部がRAM112にロードされ、CPU110がRAM112にロードされたプログラムを実行することにより、ビデオカメラの各部の動作を制御する。本実施形態のビデオカメラは外測AFの他に、撮像素子109で撮像された画像の一部(焦点検出エリア)の画像データのコントラストがピークとなる位置を探索することによって焦点検出するコントラストAFが可能であるとする。コントラストAFでは、撮像と焦点検出エリアの画像データからのコントラスト検出とをフォーカスレンズを微少量ずつ移動させながら繰り返し実行しながらコントラストが最高となる合焦ピークを探索する、いわゆる山登り制御によって合焦位置の探索が行われる。
The
デジタルビデオカメラ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
次に、図2を用いて外測AFセンサユニット130の構成例について説明する。
図2(a)において、被写体201は、撮影範囲(被写界)に含まれる被写体のうち、焦点検出を行う被写体である。結像レンズ131は、光軸が平行な第1及び第2の結像レンズ202Aおよび202Bが一体形成された構成を有する。また、ラインセンサ132は、第1及び第2のラインセンサ203A及び203Bとを有している。
Next, a configuration example of the external measurement
In FIG. 2A, a subject 201 is a subject that performs focus detection among subjects included in the shooting range (field of view). The
第1の結像レンズ202Aによる被写界像が一対のラインセンサの一方である第1のラインセンサ203Aで、第2の結像レンズ202Bによる被写界像が一対のラインセンサの他方である第2のラインセンサ203Bでそれぞれ検出される。第1及び第2のラインセンサ203A及び203Bは個々の被写界像を光電変換し、被写界像の輝度に対応した電気信号を出力する。第1のラインセンサ203Aが出力する電気信号をA像信号、第2のラインセンサ203Bが出力する電気信号をB像信号と呼ぶ。
The object scene image by the
第1及び第2の結像レンズ202Aと202B、第1及び第2のラインセンサ203Aと203Bは、それぞれ予め定められた基線長Bだけ互いに離れて設置されている。そのため、第1及び第2のラインセンサ203A及び203Bから得られるA像信号及びB像信号を用い、三角測量の原理に基づいて被写体距離Lを測定することができる。
The first and
図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
図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
FIG. 3A shows the
ここでは説明のため、被写体距離は既知であり、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
図3(b)に示したA像信号301AとB像信号301Bは理想的な信号である。被写体像がラインセンサに結像するまでの過程には様々な変動要因が存在するため、実際にはこのような理想的な像信号は得られない。例えば、被写体像をラインセンサに結像する第1及び第2の結像レンズ202Aと202Bの収差や、レンズに付着したほこりやごみ、ラインセンサ203A及び203Bが有する画素間の感度差、オフセット差、ゲイン差などの影響が像信号に影響する。以下の説明では、図3(c)に示すように、やや感度が低下したようなA像信号301A’と、理想的なB像信号301Bが得られたものとする。
The
次に、本実施形態における外測AFセンサユニット130による焦点検出動作を、図4のフローチャートを用いて説明する。
S401で例えば操作スイッチ群111に含まれる特定のボタン操作などにより焦点検出開始指示が発生すると、CPU110はS402において外測AFセンサユニット130に対して蓄積開始を指示する。ラインセンサ203A及び203Bのいずれかの画素における蓄積電荷量(電圧)が所定値に達すると、外測AFセンサユニット130が有する制御回路により全画素の電荷蓄積動作が自動的に終了される。
Next, the focus detection operation by the external measurement
When a focus detection start instruction is generated, for example, by a specific button operation included in the
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
S404でCPU110は、第1及び第2の結像レンズ202A及び202Bの収差や、第1及び第2のラインセンサ203A及び203Bの画素の感度差など、静的な要因が像信号に与える影響を除去するため、予め画素毎に用意した補正値で像信号を補正する。
In S404, the
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
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
S406で、第1の検出手段としてのCPU110は、S405で得られた微分A像信号601Aと微分B像信号601Bの位相差(ずれ量)Wnを算出する。ここでは、画素単位の半分の精度で位相差Wnを算出できればよく、本例では20画素相当というずれ量が得られれば十分である。実際にフォーカスレンズ位置を決定するための位相差を算出する場合には、さらに分解能をあげて1画素間をより細かく補間した精度でずれ量を算出するが、ここでは像信号の補正値を算出する区間を検出するための位相差であるため、1/2画素程度の精度でよい。そのため、S406で得る位相差を簡易位相差Wnと呼ぶ。
In S406, the
図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
S407でCPU110は、補正量の算出処理を行う。この補正量算出処理について、図5のフローチャートを用いて詳細に説明する。
S502においてCPU110は、元のA像信号301A’とB像信号301Bから、同一被写体に対応する区間を抽出する。具体的には、CPU110は、S405で補正した像信号を用い、A像信号301A’とB像信号301Bの全区間のうち、同一被写体像に対応する、共通区間の画素データを、S406で求めた簡易位相差Wnをもとに抽出する。
In S407, the
In S502, the
上述の通り、本例では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
S503でCPU110は、A像信号301A’とB像信号301Bの抽出区間の先頭(画素番号の若い方)から平坦点の探索を開始する。ここでいう平坦点とは、信号の変化がなだらかな点を意味する。具体的にはCPU110は、直前もしくは直後の画素データとの値の差が所定の閾値範囲内(条件1)であるか、直前の画素データとの間に変極点が存在する(条件2)画素を、平坦点としてSA21〜SA40及びSB1〜SB20の区間で順次探索する。ここでは、n番目に検出された平坦点を第n平坦点と呼ぶ。
In step S503, the
図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
As a result of the flat point search, when no flat point can be detected in the
本実施形態では、図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
In S507, the
なお、ここで、「対応する平坦点」とは、例えば、抽出区間内におけるほぼ同じ位置において検出されている平坦点であってよい。さらに、平坦点として満たしている条件(例えば上述の条件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
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
そして、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
図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
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
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
本実施形態による像信号の補正が焦点検出精度に与える影響について図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
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
In S1205, the
(第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
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
In S1305, the
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の補正値を算出し、前記第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.
微分手段が前記一対の像信号を微分し、一対の微分像信号を生成する微分工程と、
第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.
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)
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)
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 |
-
2010
- 2010-12-24 JP JP2010288552A patent/JP5871462B2/en not_active Expired - Fee Related
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 |