JP2014238452A - Automatic focus detection method and automatic focus detection device - Google Patents
Automatic focus detection method and automatic focus detection device Download PDFInfo
- Publication number
- JP2014238452A JP2014238452A JP2013120012A JP2013120012A JP2014238452A JP 2014238452 A JP2014238452 A JP 2014238452A JP 2013120012 A JP2013120012 A JP 2013120012A JP 2013120012 A JP2013120012 A JP 2013120012A JP 2014238452 A JP2014238452 A JP 2014238452A
- Authority
- JP
- Japan
- Prior art keywords
- correlation function
- square
- value
- focus detection
- minimum value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Focusing (AREA)
- Automatic Focus Adjustment (AREA)
- Studio Devices (AREA)
Abstract
Description
本発明は、一眼レフカメラ等において自動焦点調節制御を行うための自動焦点検出方法およびこの自動焦点検出方法を適用した自動焦点検出装置に関する。 The present invention relates to an automatic focus detection method for performing automatic focus adjustment control in a single-lens reflex camera or the like, and an automatic focus detection apparatus to which the automatic focus detection method is applied.
いわゆる位相差方式の自動焦点検出装置は、瞳分割された一対の被写体像をラインセンサ上に投影し、ラインセンサ上の一対の被写体像(ラインセンサから出力される一対の画像信号列)の像ずれ量(一対の画像信号列の波形の位相差)からデフォーカス量を求める構成である。従来の位相差検出方式では、前記一対の画像信号列に対していわゆる像ずらし法による相関演算を施して、該相関演算の結果に応じて、前記一対の画像信号列間の相対的な像ずれ量を求め、該像ずれ量に基づき撮影レンズの焦点状態(デフォーカス量)を検出している。 A so-called phase difference type automatic focus detection apparatus projects a pair of pupil-divided subject images onto a line sensor and images a pair of subject images (a pair of image signal sequences output from the line sensor) on the line sensor. In this configuration, the defocus amount is obtained from the shift amount (the phase difference between the waveforms of the pair of image signal sequences). In the conventional phase difference detection method, a correlation calculation is performed on the pair of image signal sequences by a so-called image shift method, and a relative image shift between the pair of image signal sequences is performed according to the result of the correlation calculation. The amount is obtained, and the focus state (defocus amount) of the photographing lens is detected based on the image shift amount.
従来、この像ずれ量の算出は、例えば特許文献1の段落[0096]〜[0100]に開示されているように、線形な3点内挿(補間)の方法(以下「線形内挿法」または「線形内挿演算」という)により、データサンプリングピッチ(ラインセンサの画素ピッチ)以下の精度で相関量が極大になる像ずれ量を求めている。また、3点内挿の別の方法として、2次関数で3点内挿(補間)する方法(以下「2次関数内挿法」または「2次関数内挿演算」という)が開示されている(特許文献1の段落[0101]〜[0104])。後者の2次関数内挿演算では、前者の線形内挿演算で行っている場合分け(図5)が不要となる。
Conventionally, this image shift amount is calculated by a linear three-point interpolation method (hereinafter referred to as “linear interpolation method”) as disclosed in, for example, paragraphs [0096] to [0100] of
しかしながら、相関関数として基準側出力と参照側出力の差信号値の絶対値の総和(線形相関関数値)を用いているため、比較的振幅の小さなノイズ成分も、比較的振幅の大きな信号成分と同じように相関関数に影響を及ぼすため、像ずれ量算出バラツキ(精度)に対するノイズ成分の影響が比較的大きかった。また、線形相関関数値を2次関数で3点内挿する方法は、適合性が良くない(焦点検出誤差、バラツキが大きくなる)ことがわかっている。 However, since the sum of absolute values of the difference signal values of the reference side output and the reference side output (linear correlation function value) is used as the correlation function, a noise component having a relatively small amplitude is also converted into a signal component having a relatively large amplitude. Similarly, since the correlation function is affected, the influence of the noise component on the image shift amount calculation variation (accuracy) is relatively large. Further, it has been found that the method of interpolating the linear correlation function value with a quadratic function at three points has poor adaptability (focus detection error and variation increase).
本発明は上記の問題点に鑑み、ノイズ成分が焦点検出精度に及ぼす影響を軽減することができる自動焦点検出方法及び自動焦点検出装置を提供することを目的とする。 In view of the above problems, an object of the present invention is to provide an automatic focus detection method and an automatic focus detection device that can reduce the influence of noise components on focus detection accuracy.
本発明は、2乗相関演算したときは2次関数内挿演算することにより焦点検出精度及び正確さが高くなることを見出して完成されたものである。 The present invention has been completed by finding that the accuracy and accuracy of focus detection are improved by performing quadratic function interpolation when square correlation is calculated.
すなわち、本発明は、撮影レンズの異なる瞳位置を通過した一対の被写体像を、対応する画素列を有する一対のラインセンサ上に投影し、該一対のラインセンサによる一対の画像信号列に係る画素信号値を相対的にシフトして相関量を算出し、該相関量が極値となるシフト位置に基づいて一対の画像信号列の位相差を求め、該位相差から前記撮影レンズのデフォーカス量を求める位相差方式の自動焦点検出方法において、前記一対のラインセンサの対応する画素信号値の一方と他方の差信号値を求めるステップと、前記差信号値の2乗の総和を求める2乗相関演算を実施して前記一対の画像信号列の2乗相関関数値を求めるステップと、該2乗相関関数値から一対の画像信号列の一致度が最も高い2乗相関シフト位置を求め、該2乗相関シフト位置から前記位相差を求めるステップと、を有することを特徴としている。 That is, according to the present invention, a pair of subject images that have passed through different pupil positions of a photographing lens are projected onto a pair of line sensors having corresponding pixel columns, and pixels related to a pair of image signal sequences by the pair of line sensors. The correlation value is calculated by relatively shifting the signal value, the phase difference between the pair of image signal sequences is obtained based on the shift position where the correlation value is an extreme value, and the defocus amount of the photographing lens is calculated from the phase difference. In the phase difference type automatic focus detection method for obtaining the difference, a step of obtaining one and the other of the corresponding pixel signal values of the pair of line sensors, and a square correlation for obtaining a sum of squares of the difference signal values Performing a calculation to obtain a square correlation function value of the pair of image signal sequences; obtaining a square correlation shift position having the highest degree of matching between the pair of image signal sequences from the square correlation function value; Multiplicative correlation shift It is characterized by having a step of obtaining the phase difference from the position.
自動焦点検出装置に係る本発明は、撮影レンズの異なる瞳位置を通過した一対の被写体像を、対応する画素列を有する一対のラインセンサ上に投影する焦点検出光学系と、該一対のラインセンサによる一対の画像信号列に係る画素信号値を相対的にシフトして相関量を算出し、該相関量が極値となるシフト位置に基づいて一対の画像信号列の位相差を求め、該位相差から前記撮影レンズのデフォーカス量を求める焦点検出演算手段と、を有する位相差方式の自動焦点検出装置において、前記焦点検出演算手段は、前記一対のラインセンサの対応する画素信号値の一方と他方の差信号値を求め、前記差信号値の2乗の総和を求める2乗相関演算を実施して前記一対の被写体画像信号列の2乗相関関数値を求め、該2乗相関関数値から一対の画像信号列の一致度が最も高い2乗相関シフト位置を求め、該2乗相関シフト位置から前記位相差を求めることを特徴としている。 The present invention relating to an automatic focus detection apparatus includes a focus detection optical system that projects a pair of subject images that have passed through different pupil positions of a photographing lens onto a pair of line sensors having corresponding pixel rows, and the pair of line sensors. To calculate a correlation amount by relatively shifting pixel signal values related to a pair of image signal sequences, and obtaining a phase difference between the pair of image signal sequences based on a shift position where the correlation amount is an extreme value. A focus detection calculation unit that obtains a defocus amount of the photographic lens from a phase difference, and a phase difference type automatic focus detection device, wherein the focus detection calculation unit includes one of the corresponding pixel signal values of the pair of line sensors. The other difference signal value is obtained, and a square correlation operation for obtaining the sum of the squares of the difference signal values is performed to obtain a square correlation function value of the pair of subject image signal sequences, and from the square correlation function value A pair of images No. obtains the highest square correlation shift position coincidence degree column is characterized by determining said phase difference from the square correlation shift position.
本発明の自動焦点検出方法において、前記2乗相関関数は、前記一対の画像信号列の一方と他方の差信号値の2乗の総和からなる2乗相関関数値を一対の画像信号列の一方に対して他方を初期位置から逐次シフトさせて複数のシフト位置で求める関数であって、2乗相関関数値が小さいほど前記一対の画像信号列の一致度が高いと判定することが実際的である。 In the automatic focus detection method of the present invention, the square correlation function may be a square correlation function value formed by a sum of squares of one of the pair of image signal sequences and the other difference signal value, and one of the pair of image signal sequences. It is practical to determine that the degree of coincidence between the pair of image signal sequences is higher as the square correlation function value is smaller. is there.
前記2乗相関シフト位置は、前記2乗相関関数値の極小値を含む複数の2乗相関関数値を用いて2次関数内挿演算を実施し、2乗相関関数値の真の極小値が得られるシフト位置によって求めることが好ましい。 The square correlation shift position is obtained by performing quadratic function interpolation using a plurality of square correlation function values including the minimum value of the square correlation function value, and the true minimum value of the square correlation function value is obtained. It is preferable to obtain the obtained shift position.
本発明の自動焦点検出方法にあっては、さらに、前記2乗相関関数値を求めるステップの前に、前記一対の画像信号列の一方と他方の差信号値の総和からなる線形相関関数値を一対の画像信号列の一方に対して他方を逐次シフトさせて複数のシフト位置で求める線形相関演算を実施するステップと、複数のシフト位置で求めた線形相関関数値の中から極小値を検出するステップとを含め、前記2乗相関演算するステップでは、前記極小値が得られたシフト位置を含む所定数のシフト位置において前記2乗相関演算を実施して2乗相関関数値を求めることが好ましい。 In the automatic focus detection method of the present invention, before the step of obtaining the square correlation function value, a linear correlation function value consisting of a sum of difference signal values of one of the pair of image signal sequences and the other is obtained. A step of performing linear correlation calculation obtained at a plurality of shift positions by sequentially shifting the other of one pair of image signal sequences and detecting a minimum value from linear correlation function values obtained at a plurality of shift positions In the step of calculating the square correlation including the step, it is preferable that the square correlation function value is obtained by performing the square correlation calculation at a predetermined number of shift positions including the shift position where the minimum value is obtained. .
前記2乗相関関数値を求めるステップは、前記一対の画像信号列の一方と他方の差信号値の総和からなる線形相関関数値を一対の画像信号列の一方に対して他方を逐次シフトさせて複数のシフト位置で求める線形相関演算を実施するステップであって、このステップの後、複数のシフト位置で求めた線形相関関数値の中から極小値を検出するステップと、前記線形相関演算により求めた線形相関関数値の極小値が得られたシフト位置で前記2乗相関関数値が極小値であるか否か判定するステップと、極小値であると判定した場合、前記2乗相関関数値の極小値が得られる2乗関数シフト位置を求めるステップと、極小値であると判定しなかった場合、前記線形相関関数値の極小値が得られたシフト位置を含む所定数のシフト位置について再度2乗相関演算を実施するステップと、この2乗相関関数値の極小値が得られる2乗関数シフト位置を求めるステップを有することが好ましい。 In the step of obtaining the square correlation function value, a linear correlation function value composed of the sum of one of the pair of image signal sequences and the other difference signal value is sequentially shifted with respect to one of the pair of image signal sequences. A step of performing a linear correlation calculation obtained at a plurality of shift positions, and after this step, a step of detecting a minimum value from the linear correlation function values obtained at a plurality of shift positions, and a calculation by the linear correlation calculation. Determining whether or not the square correlation function value is a minimum value at the shift position where the minimum value of the linear correlation function value is obtained, and determining that the square correlation function value is a minimum value, A step of obtaining a square function shift position at which a minimum value is obtained, and if it is not determined that the value is a minimum value, a predetermined number of shift positions including the shift position at which the minimum value of the linear correlation function value is obtained are again determined. It is preferred to have the steps of obtaining and performing a multiply-correlation calculation, the square function shift position minimum value is obtained for the square correlation function value.
前記検出した線形相関関数値の極小値が得られたシフト位置を含む所定数のシフト位置において2乗相関関数値を求める場合の所定数は、前記2次関数内挿演算または線形相関内挿演算に用いる複数のシフト位置の数より多数であることが好ましい。 The predetermined number when the square correlation function value is obtained at a predetermined number of shift positions including the shift position where the minimum value of the detected linear correlation function value is obtained is the quadratic function interpolation calculation or the linear correlation interpolation calculation. It is preferable that the number is larger than the number of the plurality of shift positions used in the above.
本発明の自動焦点検出方法はさらに、前記2乗相関関数値を求めるステップの後、前記2乗相関関数値の極小値を検出するステップと、前記検出した2乗相関関数値の極小値を含む所定数の2乗相関関数値を用いて2次関数内挿演算を実施し、2乗相関関数値の真の極小値が得られるシフト位置を求めるステップを含めることが好ましい。 The automatic focus detection method of the present invention further includes a step of detecting a minimum value of the square correlation function value after the step of obtaining the square correlation function value, and a minimum value of the detected square correlation function value. It is preferable to include a step of performing a quadratic function interpolation operation using a predetermined number of square correlation function values and obtaining a shift position at which a true minimum value of the square correlation function value is obtained.
本発明の自動焦点検出方法はさらに、前記2乗相関関数値を求めるステップの後、前記2乗相関演算により求めた2乗相関関数値の極小値を検出するステップと、極小値を検出できたか否か判定するステップと、極小値を検出できたと判定した場合、検出した2乗相関関数値の極小値を含む所定数の2乗相関関数値を用いて2次関数内挿演算を実施し、2乗相関関数値の真の極小値が得られるシフト位置を求めるステップと、2乗相関関数値の極小値を検出できなかったと判定した場合、前記線形相関関数値の極小値を含む所定数の線形相関関数値を用いて線形内挿演算を実施し、線形相関関数値の真の極小値が得られるシフト位置を求めるステップを含めてもよい。 The automatic focus detection method of the present invention further includes a step of detecting a minimum value of the square correlation function value obtained by the square correlation calculation after the step of obtaining the square correlation function value, and whether the minimum value has been detected. When determining whether or not the minimum value has been detected, performing a quadratic function interpolation operation using a predetermined number of square correlation function values including the minimum value of the detected square correlation function value, A step of obtaining a shift position at which a true minimum value of the square correlation function value is obtained, and when it is determined that the minimum value of the square correlation function value cannot be detected, a predetermined number including the minimum value of the linear correlation function value A step of performing a linear interpolation operation using the linear correlation function value to obtain a shift position where a true minimum value of the linear correlation function value is obtained may be included.
本発明の自動焦点検出装置において、前記焦点検出演算手段はさらに、前記2乗相関関数値を求める前に、前記一対の画像信号列の一方と他方の差信号値の総和からなる線形相関関数値を一対の画像信号列の一方に対して他方を逐次シフトさせて複数のシフト位置で求める線形相関演算を実施し、複数のシフト位置で求めた線形相関関数値の中から極小値を検出すること、及び前記2乗相関演算では、前記極小値が得られたシフト位置を含む所定数のシフト位置において前記2乗相関演算を実施して2乗相関関数値を求めることが好ましい。 In the automatic focus detection apparatus of the present invention, the focus detection calculation means further includes a linear correlation function value consisting of a sum of difference signal values of one of the pair of image signal sequences and the other before obtaining the square correlation function value. The linear correlation calculation is performed at a plurality of shift positions by sequentially shifting the other of the pair of image signal sequences with respect to the other, and the minimum value is detected from the linear correlation function values obtained at the plurality of shift positions. In the square correlation calculation, it is preferable that the square correlation function value is obtained by performing the square correlation calculation at a predetermined number of shift positions including the shift position where the minimum value is obtained.
本発明の自動焦点検出装置において、前記焦点検出演算手段はさらに、前記2乗相関関数値を求めるとともに、前記一対の画像信号列の一方と他方の差信号値の総和からなる線形相関関数値を一対の画像信号列の一方に対して他方を逐次シフトさせて複数のシフト位置で求める線形相関演算を実施し、この後、複数のシフト位置で求めた線形相関関数値の中から極小値を検出し、前記線形相関演算により求めた線形相関関数値の極小値が得られたシフト位置で前記2乗相関関数値が極小値である場合、前記2乗相関関数値の極小値が得られる2乗関数シフト位置を求め、極小値でなかった場合、前記線形相関関数値の極小値が得られたシフト位置を含む所定数のシフト位置について再度2乗相関演算を実施し、この2乗相関関数値の極小値が得られる2乗関数シフト位置を求めることが好ましい。 In the automatic focus detection apparatus of the present invention, the focus detection calculation means further obtains the square correlation function value and calculates a linear correlation function value consisting of a sum of difference signal values of one and the other of the pair of image signal sequences. A linear correlation operation is performed at multiple shift positions by sequentially shifting the other of a pair of image signal sequences, and then a minimum value is detected from the linear correlation function values obtained at the multiple shift positions. When the square correlation function value is the minimum value at the shift position where the minimum value of the linear correlation function value obtained by the linear correlation calculation is obtained, the square that can obtain the minimum value of the square correlation function value When the function shift position is obtained and the minimum value is not the minimum value, the square correlation calculation is performed again for a predetermined number of shift positions including the shift position at which the minimum value of the linear correlation function value is obtained. The local minimum of It is preferable to obtain the square function shift position is.
前記検出した線形相関関数値の極小値が得られたシフト位置を含む所定数のシフト位置において2乗相関関数値を求める場合の所定数は、前記2次関数内挿演算または線形相関内挿演算に用いる複数のシフト位置の数より多数であることが好ましい。 The predetermined number when the square correlation function value is obtained at a predetermined number of shift positions including the shift position where the minimum value of the detected linear correlation function value is obtained is the quadratic function interpolation calculation or the linear correlation interpolation calculation. It is preferable that the number is larger than the number of the plurality of shift positions used in the above.
本発明の自動焦点検出装置において、前記焦点検出演算手段はさらに、前記2乗相関関数値を求めた後、前記2乗相関関数値の極小値を検出し、該検出した2乗相関関数値の極小値を含む所定数の2乗相関関数値を用いて2次関数内挿演算を実施し、2乗相関関数値の真の極小値が得られるシフト位置を求めてることが好ましい。 In the automatic focus detection apparatus of the present invention, the focus detection calculation means further obtains the square correlation function value, detects a minimum value of the square correlation function value, and calculates the detected square correlation function value. It is preferable to perform a quadratic function interpolation operation using a predetermined number of square correlation function values including the minimum value, and to obtain a shift position where a true minimum value of the square correlation function value is obtained.
本発明の自動焦点検出装置において、前記焦点検出演算手段はさらに、前記2乗相関関数値を求めた後、前記2乗相関演算により求めた2乗相関関数値の極小値を検出できた場合、検出した2乗相関関数値の極小値を含む所定数の2乗相関関数値を用いて2次関数内挿演算を実施して2乗相関関数値の真の極小値が得られるシフト位置を求め、2乗相関関数値の極小値を検出できなかった場合、前記線形相関関数値の極小値を含む所定数の線形相関関数値を用いて線形内挿演算を実施し、線形相関関数値の真の極小値が得られるシフト位置を求めてもよい。 In the automatic focus detection apparatus of the present invention, when the focus detection calculation unit further detects the minimum value of the square correlation function value obtained by the square correlation calculation after obtaining the square correlation function value, A quadratic function interpolation is performed using a predetermined number of square correlation function values including the detected minimum value of the square correlation function value to obtain a shift position at which a true minimum value of the square correlation function value is obtained. When the minimum value of the square correlation function value cannot be detected, linear interpolation is performed using a predetermined number of linear correlation function values including the minimum value of the linear correlation function value, and the true value of the linear correlation function value is calculated. The shift position where the minimum value of can be obtained may be obtained.
本発明によれば、一対の画像信号列の画素信号値の差信号値を2乗することによって振幅の比較的小さいノイズ成分は抑圧され、振幅の大きい信号成分は強調されるので、ノイズによる焦点検出値のバラツキを低減することができる。
請求項4に係る本発明によれば、先に線形相関関数を用いて線形相関関数値の極小値を検出し、この極小値が得られたシフト位置を含む所定数のシフト位置で2乗相関演算するので、2乗相関演算の演算回数が少なく演算時間の短縮を図ることができる。
According to the present invention, the noise component having a relatively small amplitude is suppressed by squaring the difference signal value between the pixel signal values of the pair of image signal sequences, and the signal component having a large amplitude is emphasized. Variations in the detection value can be reduced.
According to the fourth aspect of the present invention, the minimum value of the linear correlation function value is first detected using the linear correlation function, and the square correlation is obtained at a predetermined number of shift positions including the shift position where the minimum value is obtained. Since the calculation is performed, the number of times of the square correlation calculation is small and the calculation time can be shortened.
図1は、本発明をAF一眼レフカメラの自動焦点検出装置に適用した実施形態であって、その主要構成をブロックで示した図である。このAF一眼レフカメラは、自動焦点検出装置としてAFモジュール(自動焦点検出モジュール)60を内蔵したカメラボディ11と、このカメラボディ11に着脱可能なAF対応の撮影レンズ51とを備えている。
FIG. 1 is an embodiment in which the present invention is applied to an automatic focus detection apparatus for an AF single-lens reflex camera, and its main configuration is a block diagram. This AF single-lens reflex camera includes a
カメラボディ11は、カメラボディ11及び撮影レンズ51を総括的に制御し、相関演算手段、繰り返しパターン判定手段、コントラスト検出手段及び選択手段としても動作するボディCPU31を備えている。
The
一方、撮影レンズ51は、レンズ機能を制御するレンズCPU57と、焦点調節用レンズ52を光軸方向に駆動するギヤブロック53と、撮影レンズ51のマウント部に設けられた、カメラボディ11のジョイント35と着脱自在に連結するジョイント55を備えている。レンズCPU57は、電気接点群56、36の接続を介してカメラボディ11の周辺制御回路21と接続されていて、この周辺制御回路21を介してボディCPU31との間で、開放、最大F値情報、焦点距離情報、レンズ位置(距離)情報などを通信する所定のデータ通信を行う。
On the other hand, the photographing
撮影レンズ51からカメラボディ11内に入射した被写体光束は、大部分がメインミラー13により、ファインダ光学系を構成するペンタプリズム17に向かって反射され、ペンタプリズム17で反射されてアイピースから射出する。ペンタプリズム17から射出された被写体光束の一部は測光IC18の受光素子に入射する。一方、メインミラー13の中央部に形成されたハーフミラー部14に入射した光束の一部はハーフミラー部14を透過し、メインミラー13の背面に設けられたサブミラー15により下方に反射され、AFモジュール60に入射する。
Most of the subject luminous flux that has entered the
測光IC18は、受光量に応じて光電変換した電気信号を、周辺制御回路21を介してボディCPU31に測光信号として出力する。ボディCPU31は、測光信号等に基づいて所定の露出演算を実施し、露出用の適正シャッタ速度及び絞り値を算出する。そして、撮影処理の際に周辺制御回路21は、ミラーモータドライバ24を介してミラーモータ25を駆動してメインミラー13をアップするとともに、絞り機構22を駆動して撮影レンズ51の絞り(図示せず)を算出した絞り値に設定し、算出したシャッタ速度に基づいて露光機構23を駆動して露光する。さらに露光終了後、周辺制御回路21は、ミラーモータドライバ24を介してミラーモータ25を駆動してメインミラー13をダウンする。
The
ボディCPU31は、制御プログラム等をメモリしたROM31a、演算用、制御用の所定のデータ、変数を一時的にメモリするRAM31b、計時用のタイマ31c、カウンタ31d、AFモジュール60から入力した出力VOUT信号(ビデオ信号)をA/D変換するA/D変換器31e、AFモジュール60の積分終了を設定するモニタ基準VMS信号をD/A変換してAFモジュール60へ出力するD/A変換器31fを内蔵している。
The
AFモジュール60は、いわゆる瞳分割位相差方式であって、CCDラインセンサと積分終了タイミングをモニタするモニタセンサを備えた焦点検出素子61と、図示していないが撮像面と等価な焦点検出面において、被写体像を形成する被写体光束を二分割に瞳分割して、対応するCCDラインセンサ上に投影するAF光学系とを備えている。
The
このAFモジュール60は、被写体の焦点状態を検出して画素単位のビデオ信号(一対の画像信号列)をボディCPU31に出力する。ボディCPU31は、AFモジュール60から入力したビデオ信号を内蔵A/D変換器31eでデジタル信号に変換し、焦点検出エリアに対応するデジタル信号に基づいて所定の演算を実施してデフォーカス量を算出する。さらにボディCPU35は、算出したデフォーカス量に基づいてAFモータ33の回転方向を決定し、回転数を、AFモータ33の回転数を検出するエンコーダ37が出力するAFパルス数として算出し、内蔵のカウンタ31dにセットする。そしてボディCPU31は、その回転方向及びパルス数に基づき、AFモータドライバ32を介してAFモータ33を駆動する。この駆動に際してボディCPU31は、AFモータ33の回転に連動してエンコーダ37が出力するパルスを内蔵のカウンタ31dでダウンカウントし、カウント値が0になったらAFモータ33を停止させる。AFモータ33の回転は、ギヤブロック34により減速され、カメラボディ11のマウント部に設けられたジョイント35と撮影レンズ51のマウント部に設けられたジョイント55との接続を介して撮影レンズ51のギヤブロック54に伝達され、ギヤブロック54を介して焦点調節用レンズ52を光軸方向に進退移動させる。
The
ボディCPU31には、フォーカスモードをマニュアルモード、AF(ワンショット/コンティニュアスAF)モードの間で切り換えるフォーカススイッチSWAF、図示しないマニュアルレリーズ釦の半押しでオンする測光スイッチSWS及び全押しでオンするレリーズスイッチSWR、周辺制御回路21等への電源をオン/オフするメインスイッチSWMが接続されている。
The
ボディCPU31には、設定されたAF、露出、撮影などのモード、シャッタ速度、絞り値などの各種撮影情報を表示する表示パネル39と、外部不揮発性メモリ手段としてカメラボディ11特有の各種定数などがメモリされたフラッシュメモリ38が接続されている。表示パネル39は、カメラボディ11の外面及びファインダ視野内の2ヶ所に設けられた表示器を含む。
The
カメラボディ11には、撮像手段としてのイメージセンサ45が設けられている。イメージセンサ45による撮像面とAFモジュール60による焦点検出面は等価に設定されている。イメージセンサ45の出力信号は、AFE(アナログフロントエンド)46でデジタル化され、DSP41でディスプレイ(LCD)42に表示可能なビデオ信号に加工される。DSP41は、ボディCPU31との間で撮影に関する情報を授受する。
The
図2は、焦点検出素子61の焦点検出エリアを説明する模式平面図である。焦点検出素子61は、瞳分割された一対の被写体像光が投影されるラインセンサIHを有するCCD焦点検出素子である。本実施形態では、撮影画面70内の中央に焦点検出エリアCCを設定し、この交差焦点検出エリアCC内の被写体像のうち、撮影レンズの異なる瞳位置を通過した一対の被写体像に瞳分割されて、それぞれ対応するラインセンサIHの異なる一方と他方の領域に投影される。
FIG. 2 is a schematic plan view for explaining a focus detection area of the
前記ラインセンサIHは、基準ラインセンサAと参照ラインセンサBの二つの領域に区分けされているが(図4参照)、図3は、ラインセンサIHの基準ラインセンサ領域に対応する基準ラインセンサAの一例を示している。ラインセンサIHは、総数N(Nは正の整数)個の光電変換素子を水平方向(図の左右、横方向)に配列したCCDラインセンサであって、図3に示すように左端から順に各画素に対して画素番号n=1〜Nを付してある。ラインセンサIHの参照ラインセンサBは、図2の基準ラインセンサAと同様の構成である。 The line sensor IH is divided into two areas of a reference line sensor A and a reference line sensor B (see FIG. 4). FIG. 3 shows a reference line sensor A corresponding to the reference line sensor area of the line sensor IH. An example is shown. The line sensor IH is a CCD line sensor in which a total number N (N is a positive integer) photoelectric conversion elements are arranged in a horizontal direction (left and right in the figure, horizontal direction), as shown in FIG. Pixel numbers n = 1 to N are assigned to the pixels. The reference line sensor B of the line sensor IH has the same configuration as the reference line sensor A of FIG.
前記ラインセンサIHには、それぞれの基準ラインセンサAと参照ラインセンサBに、瞳分割された一対の被写体像の一方と他方が投影され、それぞれのラインセンサ領域の画素(光電変換素子)が積分、つまり被写体像の照度に応じた電荷に光電変換して電気的な信号として蓄積する。ラインセンサIHは、積分が終了すると、積分した電荷を順番に、所定の画素信号に変換して、それぞれ一対の画像信号列として出力する。 One and the other of the pair of subject images divided into pupils are projected onto the standard line sensor A and the reference line sensor B on the line sensor IH, and the pixels (photoelectric conversion elements) in the respective line sensor regions are integrated. That is, it is photoelectrically converted into an electric charge corresponding to the illuminance of the subject image and accumulated as an electrical signal. When the integration is completed, the line sensor IH sequentially converts the integrated charges into a predetermined pixel signal, and outputs each as a pair of image signal sequences.
ボディCPU31は、AFモジュール60から画像信号列(ビデオ信号)を入力すると、ラインセンサIHからの一対の画像信号列について、像ずらし法により線形の相関関数SCO(i)を求める。相関関数SCO(i)は、ラインセンサIHの基準ラインセンサAと参照ラインセンサBの一致度を示すもので、基準ラインセンサAと参照ラインセンサBの画像信号列の画素信号値の差分(差信号値)の絶対値の総和である相関関数SCO(i)を求める演算を、基準ラインセンサAを基準として参照ラインセンサBを1画素分ずつシフトさせながら実施することで得られる。相関関数SCO(i)は、一対の画像信号列の一致度(波形の一致度)が高いほど小さくなる関数である。図4(A)は、初期状態のシフト数I=0でラインセンサIHの基準ラインセンサAと参照ラインセンサB(の画素信号列の位相)が一致している状態を示している。最大シフト数を±imaxとすれば、図4(A)の初期状態から図4(B)、(C)に示すように基準ラインセンサAに対して参照ラインセンサBを±1画素分シフトさせながら演算する処理を、特定シフト位置からシフト数I=±imaxとなるまで繰り返す。図4(D)、(E)は、シフト数I=±iの状態を示している。なお、特定シフト位置でラインセンサIHの基準ラインセンサAと参照ラインセンサB(の画素信号列の位相)が一致している状態が合焦状態である。
When the
線形の相関関数SCO(i)は、下記数1式で示すことができる。
一対の被写体像の位相差(ずれ量)は、基準ラインセンサAと参照ラインセンサBの像(画像信号列IH−AとIH−Bの波形)が一致したときの、特定シフト位置(i=0)からのシフト数(ずれ量)である。そこで、ボディCPU31は、線形相関関数SCO(i)の最も小さい極小値を検出し、この極小値をとるときの基準ラインセンサAに対する参照ラインセンサBの像のシフト数を、像ずれ量(シフト量)として検出する。なお、線形相関関数SCO(i)からはラインセンサIHの画素(光電変換素子)ピッチ単位でしか像ずれ量(シフト量)を求めることができないため、通常は、さらに、求めた線形相関関数SCO(i)について内挿演算を実施して、バラツキが小さく(精度が高く)、正確な極小値を求める。この極小値が得られたときのシフト数(シフト位置と特定シフト位置との差)から、撮影レンズ51のデフォーカス量を求める。
The phase difference (deviation amount) between the pair of subject images is a specific shift position (i = when the images of the reference line sensor A and the reference line sensor B (the waveforms of the image signal sequences IH-A and IH-B) match). The number of shifts (shift amount) from 0). Therefore, the
図5は、線形内挿法(直線補間法)の実施形態を示している。線形内挿法は、シフト位置の間に存在する場合もある相関関数の真の極小値を求める方法であって、極小値である相関関数値を含む2個の相関関数値を通る直線と、この直線と傾きが逆方向であって、他の相関関数値を通る直線の交点により相関関数の真の極小値を求める手法である。図5は、線形相関関数SCO(i)によって演算した相関関数値から、極小値である相関関数値H0及び相関関数値H0を挟む前後の相関関数値H−1とH+1を求め、これらの相関関数値H0、H−1、H+1に線形内挿法(線形内挿演算)を適用して真の像ずれ量を求める様子をグラフで示した図である。図5(A)は、図において右側の相関関数値H+1が左側の相関関数値H-1以上の場合を、図5(B)は、図において右側の相関関数値H+1が左側の相関関数値H-1未満の場合を示すグラフであって、横軸はシフト数、縦軸は相関関数値を示している。 FIG. 5 shows an embodiment of the linear interpolation method (linear interpolation method). The linear interpolation method is a method for obtaining a true minimum value of a correlation function that may exist between shift positions, and a straight line passing through two correlation function values including a correlation function value that is a minimum value; In this method, the true minimum value of the correlation function is obtained from the intersection of the straight lines passing through the other correlation function values and having the opposite direction to the straight line. FIG. 5 shows the correlation function values H −1 and H +1 before and after sandwiching the correlation function value H 0 and the correlation function value H 0 as the minimum values from the correlation function values calculated by the linear correlation function SCO (i). these correlation function value H 0, H -1, by applying a linear interpolation (linear interpolation) calculation at H +1 illustrates graphically the manner of obtaining the true image shift amount. FIG. 5 (A), the case where the correlation function value H +1 of the right is not less than the correlation function value H -1 the left in the drawing, FIG. 5 (B), the correlation function value H +1 right in figure left a graph showing a case of less than the correlation function value H -1 of the horizontal axis is the number of shifts, and the vertical axis represents the correlation function value.
H+1≧H-1 の場合は、相関関数値H0とH+1を通る直線と、該直線と傾斜方向が逆であって、相関関数値H−1を通る直線の交点のシフト位置を求める。この交点のシフト位置が、真のシフト位置または真のシフト位置により近いシフト位置である。極小値である相関関数値H0のシフト位置と前記交点のシフト位置の差をシフト誤差βとすると、シフト誤差βは、下記数2式によって求めることができる(図5(A))。
H−1>H+1 の場合は、相関関数値H−1とH0を通る直線と、該直線と傾斜方向が逆であって、相関関数値H+1を通る直線の交点のシフト位置を求める。この交点のシフト位置が、真のシフト位置または真のシフト位置により近いシフト位置である。極小値である相関関数値H0のシフト位置と前記交点のシフト位置の差をシフト誤差βとすると、シフト誤差βは、下記数3式によって求めることができる(図5(B))。
以上の線形内挿演算により、真のシフト位置または真のシフト位置により近いシフト位置である像ずれ量i0+βを求めることができる。この像ずれ量i0+βは、相関関数のみによって求めた像ずれ量i0よりも精度が高く、正確である。 By the above linear interpolation calculation, the image shift amount i 0 + β that is a true shift position or a shift position closer to the true shift position can be obtained. The image shift amount i 0 + β is more accurate and accurate than the image shift amount i 0 obtained only by the correlation function.
図6は、2次関数内挿法(放物線補間法)の実施形態を示している。この実施形態の2次関数内挿法は、極小値である相関関数値を含む3個以上の相関関数値が得られる2次関数(放物線)により、2乗相関シフト位置(ビット)間に存在する場合もある相関関数の真の極小値(極値)を求める手法である。図6は、2乗相関関数SCO2(i)によって演算した2乗相関関数値から、極小値である2乗相関関数値H0 S及び2乗相関関数値H0 Sを挟む前後の2乗相関関数値H−1 SとH+1 Sを求め、これらの2乗相関関数値H0 S、H−1 S、H+1 Sに2次関数内挿法(2次関数内挿演算)を適用して真の極小値、つまり正確な位相差(像ずれ量)を求める様子をグラフで示した図である。 FIG. 6 shows an embodiment of a quadratic function interpolation method (parabolic interpolation method). The quadratic function interpolation method of this embodiment exists between square correlation shift positions (bits) by a quadratic function (parabola) that can obtain three or more correlation function values including a correlation function value that is a minimum value. This is a technique for obtaining a true minimum value (extreme value) of a correlation function that may be performed. FIG. 6 shows the square correlation before and after sandwiching the square correlation function value H 0 S and the square correlation function value H 0 S , which are minimum values, from the square correlation function value calculated by the square correlation function SCO2 (i). The function values H −1 S and H +1 S are obtained, and a quadratic function interpolation method (quadratic function interpolation operation) is applied to these square correlation function values H 0 S , H −1 S and H +1 S. FIG. 6 is a graph showing how to obtain a true minimum value, that is, an accurate phase difference (image shift amount).
この実施形態は、基準ラインセンサAと参照ラインセンサBの画像信号列IH−AとIH−Bの一致度を求めるために、下記数4式により、2乗相関関数SCO2(i)を求める。
以上の2乗相関関数SCO2(i)において、極小値となる2乗相関関数値H0 S及びこの2乗相関関数値H0 Sを挟む前後の2乗相関関数値H−1 SとH+1 Sを求め、さらに3点の2乗相関関数値H0 S、H−1 S、H+1 Sに2次関数内挿演算を適用して、より高精度で正確な極小値が得られる2乗相関シフト位置を求める。極小値の2乗相関関数値H0 Sと真の極小値の2乗相関関数値が得られるシフト位置との差をβSとすると、シフト誤差βSは、下記数5式によって求めることができる(図6)。
2乗相関関数SCO2(i)は、数4式から明らかな通り、基準ラインセンサAと参照ラインセンサBの画像信号列の各画素信号値の差(差信号値)の2乗の和である。2乗相関関数SCO2(i)により、比較的振幅が小さいノイズ成分が抑制され、比較的振幅が大きい信号成分が強調されるので、ノイズによる像ずれ量のバラツキを低減(精度の低下を抑止)することが可能になる。
本発明の実施形態は、算出した2乗相関関数SCO2(i)について、2次関数内挿演算を行うので、精度が高く、正確な像ずれ量を検出できる。
The square correlation function SCO2 (i) is the sum of the squares of the differences (difference signal values) between the pixel signal values of the image signal sequences of the standard line sensor A and the reference line sensor B, as is apparent from Equation (4). . The square correlation function SCO2 (i) suppresses a noise component having a relatively small amplitude and emphasizes a signal component having a relatively large amplitude, thereby reducing variation in image shift amount due to noise (inhibiting a decrease in accuracy). It becomes possible to do.
In the embodiment of the present invention, a quadratic function interpolation operation is performed on the calculated square correlation function SCO2 (i), so that an accurate image shift amount can be detected with high accuracy.
図12は、複数の一般被写体について、線形相関関数と線形内挿演算の組み合わせ、及び、2乗相関関数と2次関数内挿演算の組み合わせとで、同一の被写体に対してそれぞれ位相差方式の焦点検出をしたときのデフォーカス量のバラツキ(精度)を比較した結果を示すグラフである。横軸は線形内挿演算により求めたデフォーカス量のバラツキ(a.u.)を、縦軸は2次関数内挿演算により求めたデフォーカス量のバラツキ(a.u.)を示している。なお、横軸及び縦軸は、同じスケールの任意単位(a.u.)で示してある。このグラフからも、2乗相関関数と2次関数内挿演算の組み合わせで焦点検出を行った方がデフォーカス量のバラツキが比較的小さくなり良好であることが分かる。 FIG. 12 shows a phase difference method for a plurality of general subjects with a combination of a linear correlation function and a linear interpolation operation, and a combination of a square correlation function and a quadratic function interpolation. It is a graph which shows the result of having compared the dispersion | variation (accuracy) of the defocus amount when performing focus detection. The horizontal axis represents the defocus amount variation (a.u.) obtained by the linear interpolation operation, and the vertical axis represents the defocus amount variation (a.u.) obtained by the quadratic function interpolation operation. The horizontal axis and the vertical axis are shown in arbitrary units (a.u.) of the same scale. Also from this graph, it can be seen that it is preferable to perform focus detection by a combination of a square correlation function and a quadratic function interpolation because the variation in defocus amount is relatively small.
図13は、線形相関関数SCO(i)について、線形内挿(線形補間)演算を行ったときと、2次関数内挿(2次関数補間)演算を行ったときの、極小値のシフト位置(ビット内ボトム位置)と焦点検出誤差(デフォーカス量誤差)を比較するグラフである。同グラフにおいて、菱型は線形内挿演算値、正方形は2次関数内挿演算値を示し、横軸は画素1ピッチ(画像信号列の1ビット)内における極小値のシフト位置(ビット内ボトム位置(bit))を、縦軸は焦点検出誤差(a.u.)を示している。図13から、線形相関関数SCO(i)については、線形内挿演算したときの方が2次関数内挿演算したときより焦点検出誤差が小さいことが分かる。
FIG. 13 shows the shift position of the minimum value when linear interpolation (linear interpolation) calculation is performed on the linear correlation function SCO (i) and when quadratic function interpolation (secondary function interpolation) calculation is performed. It is a graph which compares (bottom position in a bit) and a focus detection error (defocus amount error). In the graph, the rhombus indicates the linear interpolation calculation value, the square indicates the quadratic function interpolation calculation value, and the horizontal axis indicates the shift position of the minimum value within the
図14は、2乗相関関数SCO2(i)について、線形内挿(線形補間)演算を行ったときと、2次関数内挿(2次関数補間)演算を行ったときの、極小値のシフト位置(ビット内ボトム位置)と焦点検出誤差を比較するグラフである。同グラフにおいて、菱型は線形内挿演算値、正方形は2次関数内挿演算値を示し、破線は線形相関関数値、実線は2乗相関関数値であって、横軸は画素1ピッチ(画像信号列の1ビット)内における極小値のシフト位置(ビット内ボトム位置(bit))を、縦軸は焦点検出誤差(a.u.)を示している。図14から、2乗相関関数SCO2(i)については、2次関数内挿演算したときの方が線形内挿演算したときより焦点検出誤差が小さいことが分かる。
FIG. 14 shows the shift of the minimum value when linear interpolation (linear interpolation) calculation is performed on the square correlation function SCO2 (i) and when quadratic function interpolation (secondary function interpolation) calculation is performed. It is a graph which compares a position (bottom position in a bit) and a focus detection error. In the graph, the rhombus indicates the linear interpolation calculation value, the square indicates the quadratic function interpolation calculation value, the broken line indicates the linear correlation function value, the solid line indicates the square correlation function value, and the horizontal axis indicates the
以上より、線形相関関数SCO(i)については線形内挿演算する方が精度が高く正確であること、2乗相関関数SCO2(i)については2次関数内挿演算する方が高精度かつ正確であることが分かる。そこで本発明の自動焦点検出装置は、所定条件下において、線形相関関数SCO(i)については線形内挿演算を実施し、2乗相関関数SCO2(i)については2次関数内挿演算を実施する。 From the above, it is more accurate and accurate for linear correlation function SCO (i), and more accurate and accurate for quadratic function SCO2 (i). It turns out that it is. Therefore, the automatic focus detection apparatus of the present invention performs linear interpolation on the linear correlation function SCO (i) and performs quadratic function interpolation on the square correlation function SCO2 (i) under predetermined conditions. To do.
本発明の自動焦点検出動作について、図7乃至図11に示したフローチャートを参照してより詳細に説明する。図7は、本発明の自動焦点検出装置の焦点検出動作の実施形態を示すメインフローチャートである。この焦点検出メインフローチャートには、メインスイッチSWMがONされ、測光スイッチSWSがオンされたときに入る。 The automatic focus detection operation of the present invention will be described in more detail with reference to the flowcharts shown in FIGS. FIG. 7 is a main flowchart showing an embodiment of the focus detection operation of the automatic focus detection apparatus of the present invention. This focus detection main flowchart is entered when the main switch SWM is turned on and the photometric switch SWS is turned on.
自動焦点検出動作を開始し、自動焦点検出1に入ると、ラインセンサIHから取得した一対の画像信号列をローパスフィルタに通して高周波のノイズ成分を除去し(S101)、ローパスフィルタに通した画像信号列(少なくとも基準ラインセンサAの画像信号列)、についてコントラストを演算する(S103)。コントラストOKか否かチェックし(S105)、コントラストOKでないと判定した場合(S105:NO)、焦点検出動作(自動焦点検出1)を終了する(END)。
When the automatic focus detection operation is started and
次に、コントラストOKと判定した場合(S105:YES)、一対の画像信号列をハイパスフィルタに通して直流ノイズ成分を除去する(S107)。 Next, when it is determined that the contrast is OK (S105: YES), the pair of image signal sequences are passed through a high-pass filter to remove DC noise components (S107).
ハイパスフィルタに通した一対の画像信号列について、像ずらし法による線形相関演算を実施して線形相関関数値を求める(S109)。次に、求めた線形相関関数値において、極小となる相関関数値H0及びその相関関数値H0が得られたボトム位置(シフト量)i0を検出(探索)し、検出したボトム位置i0及びこのボトム位置i0を挟む3点の相関関数値H0、H−1、H+1(図5(A)、(B)参照)を記憶してステップS113に進む(S111、S113)。ステップS113では、ボトム位置i0の信頼性を演算する。ボトム位置i0の信頼性は、相関関数値H−1とH0を通る直線の傾斜角と相関関数値H+1とH0を通る直線の傾斜角、相関関数値H0の大きさをしきい値と比較するなど、公知の方法によって求める。 For the pair of image signal sequences that have passed through the high-pass filter, linear correlation calculation is performed by an image shift method to obtain a linear correlation function value (S109). Next, in the obtained linear correlation function value, a minimal correlation function value H 0 and a bottom position (shift amount) i 0 from which the correlation function value H 0 is obtained are detected (searched), and the detected bottom position i is detected. 0 and three correlation function values H 0 , H −1 , H +1 (see FIGS. 5A and 5B) sandwiching the bottom position i 0 are stored, and the process proceeds to step S113 (S111, S113). In step S113, it calculates the reliability of the bottom position i 0. The reliability of the bottom position i 0 is the magnitude of the inclination angle of the straight line passing through the correlation function values H −1 and H 0 , the inclination angle of the straight line passing through the correlation function values H +1 and H 0 , and the correlation function value H 0. It is obtained by a known method such as comparison with a threshold value.
信頼性OK(有り)と判定した場合(S115:YES)、2乗方式ビット内挿演算1を実施して自動焦点検出1を終了し(S117、END)、信頼性OK(有り)と判定しなかった場合(S115:NO)、ステップS117をスキップして自動焦点検出1を終了する(END)。
When it is determined that the reliability is OK (Yes) (S115: YES), the square method
自動焦点検出1を終了したら、図示しない別のAFレンズ駆動スレッドにより、像ずれ量に基づいてデフォーカス量を演算し、デフォーカス量に基づいて焦点調節レンズ群52を合焦位置まで移動させるのに必要なレンズ駆動量(AFモータ33の回転方向、回転量)を演算し、演算したレンズ駆動量に基づいて、モータドライブ回路32を介してAFモータ33を駆動し、ギヤブロック34、ジョイント35、55及びギヤブロック54を介して焦点調節レンズ群52を合焦位置まで移動する。
When the
ステップS117で実施する2乗方式ビット内挿演算1について、図8に示したフローチャートを参照してより詳細に説明する。2乗方式ビット内挿演算1では、先ず、ステップS111で検出した線形相関関数値のボトム位置i0及びボトム位置i0を挟む±2ビットのシフト位置、つまり、シフト位置i0−2、i0−1、i0、i0+1、i0+2の5点について2乗相関演算を実施して2乗相関関数SCO2(i)を求める(S201)。続いて、2乗相関演算で求めた2乗相関関数SCO2(i)の2乗相関ボトム位置i0 S(図6参照)を検出し(S203)、ステップS205に進む。2乗相関演算を実施するシフト範囲を5点まで絞ったので、最初から全シフト範囲について2乗相関演算して極小値を求める場合より演算時間が短縮される。
The square method
ここで、ボトム位置i0を挟む±2ビットのシフト位置で2乗相関関数値を求める理由を説明する。図15は、同一の被写体について線形相関関数SCO(i)と2乗相関関数SCO2(i)とでボトム位置(極小値のボトム位置)が異なる場合の例を示すグラフである。同グラフにおいて、菱型は線形相関関数SCO(i)、正方形は2乗相関関数SCO2(i)であり、横軸はシフト量(bit)、縦軸は線形相関関数値と2乗相関関数値である。この図の例に示すように、真のボトム位置がビットシフトの中央付近にあるような場合など、ボトム位置が変動しやすい状況においては、ノイズ等の影響によって、線形相関関数のボトム位置と2乗相関関数のボトム位置が必ずしも一致するとは限らないことがあるため、さらに1つ外側の2乗相相関関数値を求めることで2乗相関関数のボトムを見つけられるようにするためである。 Here, the reason why the square correlation function value is obtained at the shift position of ± 2 bits across the bottom position i 0 will be described. FIG. 15 is a graph showing an example in which the bottom position (minimum value bottom position) differs between the linear correlation function SCO (i) and the square correlation function SCO2 (i) for the same subject. In the graph, the rhombus is the linear correlation function SCO (i), the square is the square correlation function SCO2 (i), the horizontal axis is the shift amount (bit), and the vertical axis is the linear correlation function value and the square correlation function value. It is. As shown in the example of this figure, in a situation where the bottom position is likely to fluctuate, such as when the true bottom position is near the center of the bit shift, the bottom position of the linear correlation function is This is because the bottom position of the square correlation function may be found by finding the outermost square phase correlation function value, because the bottom position of the square correlation function may not always match.
ステップS205では、2乗相関関数のボトム(2乗相関ボトム位置i0 S)有り(検出できた)か否かチェックする。2乗相関ボトム位置i0 S有りと判定した場合(S205:YES)、3点の2乗相関関数値H−1 SとH0 SとH+1 Sを用いて2次関数内挿演算を実施し、2次相関関数の真の極小値が得られるボトム位置と2乗相関ボトム位置i0 Sとの誤差に対応するずれ量βSを算出し(S207)、さらに真のボトム位置に対応する像ずれ量i0 S+βSを算出してリターンする(S209、RET)(図6参照)。2乗相関ボトム位置i0 S有りと判定できなかった場合(S205:NO)、ステップS111で検出した線形相関関数値の3点の相関関数値H−1とH0とH+1を用いて線形内挿演算を実施し、線形相関関数値の真の極小値が得られるボトム位置とボトム位置i0とのずれ量βを算出し(S211)、さらに真のボトム位置に相当する像ずれ量i0+βを算出してリターンする(S213、RET)。 In step S205, it is checked whether or not the bottom of the square correlation function (square correlation bottom position i 0 S ) is present (detected). When it is determined that the square correlation bottom position i 0 S is present (S205: YES), quadratic function interpolation is performed using the three-point square correlation function values H −1 S , H 0 S, and H +1 S. Then, a deviation amount β S corresponding to the error between the bottom position where the true minimum value of the secondary correlation function is obtained and the square correlation bottom position i 0 S is calculated (S207), and further corresponds to the true bottom position. The image shift amount i 0 S + β S is calculated and the process returns (S209, RET) (see FIG. 6). When it is not possible to determine that the square correlation bottom position i 0 S is present (S205: NO), the linear correlation function values H −1 , H 0 and H +1 of the linear correlation function values detected in step S111 are linear. An interpolation operation is performed to calculate a shift amount β between the bottom position where the true minimum value of the linear correlation function value is obtained and the bottom position i 0 (S211), and further an image shift amount i corresponding to the true bottom position. 0 + β is calculated and the process returns (S213, RET).
本発明第1の実施形態の自動焦点検出1によれば、予め線形相関演算によって求めたボトム位置を基準とした±2ビットの範囲で2乗相関演算するので、最初から全てのシフト範囲について2乗相関演算する場合より演算時間が短縮される。2乗相関関数の2乗相関ボトム位置i0 Sを検出できた場合に2次関数内挿演算により像ずれ量i0 S+βSを求めるので、より精度の高い正確な像ずれ量i0 S+βSを、短時間で得ることができる。2乗相関関数の2乗相関ボトム位置i0 Sを検出できなかった場合、線形相関値の中から検出した相関関数値H−1とH0とH+1を用いて線形内挿演算を実施して精度の高い正確な像ずれ量i0+βを得ることができる。
According to the
なお、自動焦点検出1を終了したら、図示しない別のAFレンズ駆動スレッドにより、像ずれ量に基づいてデフォーカス量を演算し、デフォーカス量に基づいて焦点調節レンズ群52を合焦位置まで移動させるのに必要なレンズ駆動量(AFモータ33の回転方向、回転量)を演算し、演算したレンズ駆動量に基づいて、モータドライブ回路32を介してAFモータ33を駆動し、ギヤブロック34、ジョイント35、55及びギヤブロック54を介して焦点調節レンズ群52を合焦位置まで移動する。
When the
図9は、本発明の自動焦点検出動作に関する第2の実施形態(自動焦点検出2)を示したフローチャートである。自動焦点検出2は、線形相関演算と2乗相関演算を同時に実施してから、線形相関関数値のボトム位置を検出することが第1の実施形態の自動焦点検出1と相違する。自動焦点検出2に入ると、ラインセンサIHから取得した一対の画像信号列をローパスフィルタに通してから(S301)、少なくとも基準ラインセンサAの画像信号列についてコントラストを演算する(S303)。続いてコントラストOKか否かチェックし(S305)、コントラストOKでないと判定した場合(S305:NO)、自動焦点検出動作(自動焦点検出2)を終了する(END)。
FIG. 9 is a flowchart showing a second embodiment (automatic focus detection 2) regarding the automatic focus detection operation of the present invention. The
コントラストOKと判定した場合(S305:YES)、一対の画像信号列をハイパスフィルタに通してステップS309に進む(S307、S309)。 When it is determined that the contrast is OK (S305: YES), the pair of image signal sequences are passed through the high-pass filter and the process proceeds to step S309 (S307, S309).
ステップS309では、一対の画像信号列について、像ずらし法による線形相関演算及び2乗相関演算を同時に行って、線形相関関数値及び2乗相関関数を求める(S309)。求めた線形相関関数値について、極小値が得られるボトム位置i0を検出(探索)し、ボトム位置i0及びボトム位置i0を挟む計3点の相関関数値H0、H−1、H+1(図5(A)、(B)参照)を記憶して、ステップS313に進む(S311、S313)。ステップS313では、ボトム位置i0の信頼性を演算する。ボトム位置i0の信頼性は、相関関数値H−1とH0を通る直線の傾斜角と相関関数値H+1とH0を通る直線の傾斜角、あるいは相関関数値H0の大きさをしきい値と比較するなど、公知の方法によって求める。 In step S309, a linear correlation function value and a square correlation function are simultaneously performed on the pair of image signal sequences by an image shift method to obtain a linear correlation function value and a square correlation function (S309). For the obtained linear correlation function value, a bottom position i 0 where a minimum value is obtained is detected (searched), and a total of three correlation function values H 0 , H −1 , H across the bottom position i 0 and the bottom position i 0 are detected. +1 (see FIGS. 5A and 5B) is stored, and the process proceeds to step S313 (S311 and S313). In step S313, it calculates the reliability of the bottom position i 0. The reliability of the bottom position i 0 depends on the inclination angle of the straight line passing through the correlation function values H −1 and H 0 and the inclination angle of the straight line passing through the correlation function values H +1 and H 0 or the magnitude of the correlation function value H 0. It is obtained by a known method such as comparison with a threshold value.
信頼性OK(有り)と判定した場合(S315:YES)、2乗法式ビット内挿演算2を実施してリターンし(S317、RET)、信頼性OK(有り)と判定しなかった場合(S315:NO)、ステップS317をスキップしてリターンする(RET)。
When it is determined that the reliability is OK (Yes) (S315: YES), the square
図10は、ステップS317で実施する2乗方式ビット内挿演算2の詳細を示すフローチャートである。2乗方式ビット内挿演算2に入ると、先ず、ステップS309で演算した2乗相関関数値が線形相関関数値のボトム位置i0でボトムか否か(線形相関関数値のボトム位置における2乗相関関数値が極小値であるか否か)チェックする(S401、図15)。ボトムでないと判定した場合(S401:NO)、線形相関関数値のボトム位置i0を含む±2の各シフト位置i0−2、i0−1、i0、i0+1、i0+2において2乗相関演算を実施してステップS405に進む(S403、S405)。2乗相関関数値が線形相関関数値のボトム位置i0でボトムであると判定した場合(S401:YES)、ステップS403をスキップしてステップS405に進む。
FIG. 10 is a flowchart showing details of the square method
ステップS405では、2乗相関関数値の2乗相関ボトム位置i0 Sを検出し、2乗相関ボトム位置i0 Sの2乗相関関数値H0 Sを含む3点の2乗相関関数値H0 S、H−1 S、H+1 S(図6参照)を求めて記憶し、ステップS407に進む。 In step S405, a square correlation bottom position i 0 S of the square correlation function value is detected, and a three-point square correlation function value H including the square correlation function value H 0 S of the square correlation bottom position i 0 S is detected. 0 S , H −1 S , H +1 S (see FIG. 6) are obtained and stored, and the process proceeds to step S407.
ステップS407では、2乗相関ボトム位置i0 S有り(極小値となる2乗相関関数値)を検出できた)か否かチェックする。2乗相関ボトム位置i0 S有りと判定した場合(S407:YES)、3点の2乗相関関数値H−1 SとH0 SとH+1 Sを用いて2次関数内挿演算を実施し、2乗相関関数値の真の極小値が得られるボトム位置と2乗相関ボトム位置i0 Sのずれ量βSを算出し(S409)、さらに真のボトム位置に対応する像ずれ量(i0 S+βS)を演算してリターンする(S411、RET)。2乗相関ボトム位置i0 Sを検出できたと判定できなかった場合(S407:NO)、線形相関関数値の3点の相関関数値H−1とH0とH+1を用いて線形内挿演算を実施し、線形相関関数値の真の極小値が得られるボトム位置とボトム位置i0とのずれ量βを算出し(S413)、さらに真のボトム位置に対応する像ずれ量i0+βを算出してリターンする(S415、RET)。 In step S407, it is checked whether or not the square correlation bottom position i 0 S is present (a square correlation function value that is a minimum value has been detected). When it is determined that the square correlation bottom position i 0 S is present (S407: YES), quadratic function interpolation is performed using the three-point square correlation function values H −1 S , H 0 S, and H +1 S. and calculates the squared real and bottom positions minimum value is obtained squared correlation bottom position i 0 S shift amounts beta S of the correlation function value (S409), the image shift amount to further correspond to the true bottom position ( i 0 S + β S ) is calculated and the process returns (S411, RET). When it cannot be determined that the square correlation bottom position i 0 S has been detected (S407: NO), linear interpolation is performed using the three correlation function values H −1 , H 0 and H +1 of the linear correlation function values. To calculate a shift amount β between the bottom position where the true minimum value of the linear correlation function value is obtained and the bottom position i 0 (S413), and further calculate an image shift amount i 0 + β corresponding to the true bottom position. Calculate and return (S415, RET).
本発明第2の実施形態の自動焦点検出2によれば、線形相関演算と2乗相関演算を同時に行うので、1回の相関演算(シフト演算)で線形相関関数と2乗相関関数を同時に求めることができるので、演算時間を短縮することができる。
According to the
図11は、本発明の自動焦点検出動作の第3の実施形態(自動焦点検出3)を示したフローチャートである。自動焦点検出3は、2乗相関演算のみを実施して2乗相関関数値の2乗相関ボトム位置を検出することが第1、第2の実施形態の自動焦点検出1、2と相違する。
FIG. 11 is a flowchart showing a third embodiment (automatic focus detection 3) of the automatic focus detection operation of the present invention. The
自動焦点検出3に入ると、先ず、ラインセンサIHから取得した一対の画像信号列をローパスフィルタに通して(S501)、少なくとも基準ラインセンサAの画像信号列についてコントラストを演算する(S503)。続いてコントラストOKか否かチェックし(S505)、コントラストOKでないと判定した場合(S505:NO)、自動焦点検出動作(自動焦点検出3)を終了する(END)。
When the
コントラストOKと判定した場合(S505:YES)、一対の画像信号列をハイパスフィルタに通してステップS509に進む(S507、S509)。 When it is determined that the contrast is OK (S505: YES), the pair of image signal sequences is passed through the high-pass filter and the process proceeds to step S509 (S507, S509).
ステップS509では、一対の画像信号列について、像ずらし法による2乗相関演算を実施して2乗相関関数値を求める(S509)。求めた2乗相関関数値について、極小値となる2乗相関関数値H0 S及びその2乗相関関数値H0 Sが得られた2乗相関ボトム位置i0 Sを検出(探索)し、検出した2乗相関ボトム位置i0 S及びこの2乗相関ボトム位置i0 Sを挟む3点の2乗相関関数値H0 S、H−1 S、H+1 S(図6参照)を記憶してステップS513に進む(S511、S513)。ステップS513では2乗相関ボトム位置i0 Sの信頼性を演算してステップS515に進む(S513、S515)。ボトム位置i0 Sの信頼性は、2乗相関関数値H−1 SとH0 Sを通る直線の傾斜角あるいは相関関数値H+1 SとH0 Sを通る直線の傾斜角、または2乗相関関数値H0 Sの大きさをしきい値と比較するなど、公知の方法によって求める。 In step S509, a square correlation function value is calculated for the pair of image signal sequences by the image shift method to obtain a square correlation function value (S509). For the obtained square correlation function value, a square correlation function value H 0 S that is a minimum value and a square correlation bottom position i 0 S from which the square correlation function value H 0 S is obtained are detected (searched); The detected square correlation bottom position i 0 S and the three-point square correlation function values H 0 S , H −1 S and H +1 S (see FIG. 6) sandwiching the square correlation bottom position i 0 S are stored. Then, the process proceeds to step S513 (S511, S513). In step S513, the reliability of the square correlation bottom position i 0 S is calculated, and the process proceeds to step S515 (S513, S515). The reliability of the bottom position i 0 S depends on the inclination angle of the straight line passing through the square correlation function values H −1 S and H 0 S or the inclination angle of the straight line passing through the correlation function values H +1 S and H 0 S , or the square. The correlation function value H 0 S is obtained by a known method such as comparing the magnitude of the correlation function value H 0 S with a threshold value.
ステップS515では2乗相関ボトム位置i0 Sの信頼性OK(有り)か否か判定し、信頼性OK(有り)と判定した場合(S515:YES)、3点の2乗相関関数値H0 S、H−1 S、H+1 Sを用いた2次関数内挿演算によりずれ量βSを算出し(S517)、像ずれ量i0 S+βSを演算してリターンする(S519、RET)。信頼性OK(有り)と判定しなかった場合(S515:NO)、ステップS517及びS519をスキップしてリターンする(RET)。 In step S515, it is determined whether or not the reliability of the square correlation bottom position i 0 S is OK (present), and when it is determined that the reliability is OK (present) (S515: YES), the three-point square correlation function value H 0. A deviation amount β S is calculated by a quadratic function interpolation calculation using S 1 , H −1 S and H +1 S (S517), an image deviation amount i 0 S + β S is calculated, and the process returns (S519, RET). . If it is not determined that the reliability is OK (present) (S515: NO), the process skips steps S517 and S519 and returns (RET).
以上の通り、本発明の第3の実施形態としての自動焦点検出3処理によれば、線形相関演算をすることなく、2乗相関演算及び2次関数内挿演算により像ずれ量i0 S+βSを演算するので、焦点検出処理を簡素化することができる。
As described above, according to the
以上、本発明の自動焦点検出方法及び自動焦点検出装置を一眼カメラに適用した実施形態について説明したが、本発明は、瞳分割位相差方式の光学系であれば適用可能である。 As described above, the embodiment in which the automatic focus detection method and the automatic focus detection apparatus of the present invention are applied to a single-lens camera has been described. However, the present invention can be applied to any pupil division phase difference type optical system.
11 カメラボディ
31 ボディCPU(焦点検出演算手段)
32 AFモータドライバ
33 AFモータ
34 ギヤブロック
35 ジョイント
37 エンコーダ
38 フラッシュメモリ
51 撮影レンズ
52 焦点調節レンズ群
53 ギヤブロック
55 ジョイント
57 レンズCPU
60 AFモジュール
61 焦点検出素子
70 撮影画面
CC 焦点検出エリア
IH ラインセンサ
A 基準ラインセンサ(基準ラインセンサ領域、一方の領域)
B 参照ラインセンサ(参照ラインセンサ領域、他方の領域)
11
32
60
B Reference line sensor (reference line sensor area, other area)
Claims (16)
前記一対のラインセンサの対応する画素信号値の一方と他方の差信号値を求めるステップと、
前記差信号値の2乗の総和を求める2乗相関演算を実施して前記一対の画像信号列の2乗相関関数値を求めるステップと、
該2乗相関関数値から一対の画像信号列の一致度が最も高い2乗相関シフト位置を求め、該2乗相関シフト位置から前記位相差を求めるステップと、
を有することを特徴とする自動焦点検出方法。 A pair of subject images that have passed through different pupil positions of the photographic lens are projected onto a pair of line sensors having corresponding pixel rows, and the pixel signal values related to the pair of image signal rows by the pair of line sensors are relatively compared. A phase difference method for calculating a correlation amount by shifting, obtaining a phase difference between a pair of image signal sequences based on a shift position where the correlation amount is an extreme value, and obtaining a defocus amount of the photographing lens from the phase difference In the automatic focus detection method,
Obtaining a difference signal value of one and the other of the corresponding pixel signal values of the pair of line sensors;
Performing a square correlation calculation to obtain a sum of squares of the difference signal values to obtain a square correlation function value of the pair of image signal sequences;
Obtaining a square correlation shift position having the highest degree of matching between a pair of image signal sequences from the square correlation function value, and obtaining the phase difference from the square correlation shift position;
An automatic focus detection method characterized by comprising:
該一対のラインセンサによる一対の画像信号列に係る画素信号値を相対的にシフトして相関量を算出し、該相関量が極値となるシフト位置に基づいて一対の画像信号列の位相差を求め、該位相差から前記撮影レンズのデフォーカス量を求める焦点検出演算手段と、
を有する位相差方式の自動焦点検出装置において、
前記焦点検出演算手段は、前記一対のラインセンサの対応する画素信号値の一方と他方の差信号値を求め、前記差信号値の2乗の総和を求める2乗相関演算を実施して前記一対の被写体画像信号列の2乗相関関数値を求め、該2乗相関関数値から一対の画像信号列の一致度が最も高い2乗相関シフト位置を求め、該2乗相関シフト位置から前記位相差を求めることを特徴とする自動焦点検出装置。 A focus detection optical system that projects a pair of subject images that have passed through different pupil positions of the taking lens onto a pair of line sensors having corresponding pixel rows;
A correlation amount is calculated by relatively shifting pixel signal values related to a pair of image signal sequences by the pair of line sensors, and a phase difference between the pair of image signal sequences based on a shift position where the correlation amount becomes an extreme value. A focus detection calculating means for obtaining a defocus amount of the photographing lens from the phase difference;
In a phase difference type automatic focus detection device having
The focus detection calculation means obtains a difference signal value of one and the other of the corresponding pixel signal values of the pair of line sensors, performs a square correlation calculation to obtain a sum of squares of the difference signal values, and performs the pair correlation calculation. A square correlation function value of the subject image signal sequence is obtained, a square correlation shift position having the highest degree of coincidence between the pair of image signal sequences is obtained from the square correlation function value, and the phase difference is calculated from the square correlation shift position. An automatic focus detection device characterized in that
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013120012A JP6221362B2 (en) | 2013-06-06 | 2013-06-06 | Automatic focus detection method and automatic focus detection device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013120012A JP6221362B2 (en) | 2013-06-06 | 2013-06-06 | Automatic focus detection method and automatic focus detection device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014238452A true JP2014238452A (en) | 2014-12-18 |
JP6221362B2 JP6221362B2 (en) | 2017-11-01 |
Family
ID=52135656
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013120012A Active JP6221362B2 (en) | 2013-06-06 | 2013-06-06 | Automatic focus detection method and automatic focus detection device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6221362B2 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5675607A (en) * | 1979-11-26 | 1981-06-22 | Ricoh Co Ltd | Automatic focus detecting device |
JPH0527162A (en) * | 1991-07-23 | 1993-02-05 | Canon Inc | Focus detecting device |
JP2005266541A (en) * | 2004-03-19 | 2005-09-29 | Sharp Corp | Focusing device |
-
2013
- 2013-06-06 JP JP2013120012A patent/JP6221362B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5675607A (en) * | 1979-11-26 | 1981-06-22 | Ricoh Co Ltd | Automatic focus detecting device |
JPH0527162A (en) * | 1991-07-23 | 1993-02-05 | Canon Inc | Focus detecting device |
JP2005266541A (en) * | 2004-03-19 | 2005-09-29 | Sharp Corp | Focusing device |
Also Published As
Publication number | Publication date |
---|---|
JP6221362B2 (en) | 2017-11-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6405243B2 (en) | Focus detection apparatus and control method thereof | |
JP4963569B2 (en) | Imaging system and lens unit | |
JP5618712B2 (en) | Automatic focusing device and imaging device | |
JP5424708B2 (en) | Focus detection device | |
US7496290B2 (en) | Multipoint autofocus system and camera having multipoint autofocus system | |
JP5171433B2 (en) | Imaging device and lens device | |
US8417106B2 (en) | Focus detection device | |
JP6489817B2 (en) | Imaging apparatus and control method thereof | |
JP5402298B2 (en) | Focus detection device and camera | |
JP5963552B2 (en) | Imaging device | |
JP5531774B2 (en) | Automatic focusing apparatus and camera equipped with the same | |
JP2011242678A (en) | Automatic focusing device and camera equipped with the same | |
JP6299519B2 (en) | Imaging device | |
JP2016142924A (en) | Imaging apparatus, method of controlling the same, program, and storage medium | |
JP6221362B2 (en) | Automatic focus detection method and automatic focus detection device | |
JP4950634B2 (en) | Imaging apparatus and imaging system | |
JP6221361B2 (en) | Automatic focus detection device and focus detection method | |
JP6234094B2 (en) | Focus detection apparatus and imaging apparatus | |
JP2000258683A (en) | Focus detector and range-finding device | |
JP3619417B2 (en) | Camera ranging device | |
JP2016099432A (en) | Focus detection device, and method, program and storage medium | |
JP2016066015A (en) | Focus detector, control method thereof, program, and memory medium | |
JP6005955B2 (en) | Photometric device and imaging device | |
JP6486086B2 (en) | IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD | |
JP2014102298A (en) | Imaging apparatus, control program for imaging apparatus, and method for controlling imaging apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20150130 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160509 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170130 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170207 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170407 |
|
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: 20170905 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170918 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6221362 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |