JP2014238452A - Automatic focus detection method and automatic focus detection device - Google Patents

Automatic focus detection method and automatic focus detection device Download PDF

Info

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
Application number
JP2013120012A
Other languages
Japanese (ja)
Other versions
JP6221362B2 (en
Inventor
佐藤 公一
Koichi Sato
公一 佐藤
幸介 福成
Kosuke Fukunari
幸介 福成
和夫 杉谷
Kazuo Sugitani
和夫 杉谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Imaging Co Ltd
Original Assignee
Ricoh Imaging Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Imaging Co Ltd filed Critical Ricoh Imaging Co Ltd
Priority to JP2013120012A priority Critical patent/JP6221362B2/en
Publication of JP2014238452A publication Critical patent/JP2014238452A/en
Application granted granted Critical
Publication of JP6221362B2 publication Critical patent/JP6221362B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide an automatic focus detection device and automatic focus detection method capable of reducing an effect of a noise component on focus detection accuracy.SOLUTION: An automatic focus detection method includes the steps of determining a difference signal value between one image signal value and the other corresponding to a pair of line sensors, performing square correlation operation determining the total sum of the square of the difference signal value to determine a square correlation function value of a pair of image signal strings, and determining a square correlation shift position having the highest similarity of the pair of image signal strings from the square correlation function value and determining a phase difference from the square correlation shift position.

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 Patent Document 1. Alternatively, the amount of image shift at which the correlation amount is maximized is obtained with an accuracy equal to or less than the data sampling pitch (line sensor pixel pitch). As another method of three-point interpolation, a method of three-point interpolation (interpolation) with a quadratic function (hereinafter referred to as “second-order function interpolation method” or “second-order function interpolation operation”) is disclosed. (Paragraphs [0101] to [0104] of Patent Document 1). In the latter quadratic function interpolation operation, the case of performing the former linear interpolation operation (FIG. 5) becomes unnecessary.

特開平05−027162号公報JP 05-027162 A

しかしながら、相関関数として基準側出力と参照側出力の差信号値の絶対値の総和(線形相関関数値)を用いているため、比較的振幅の小さなノイズ成分も、比較的振幅の大きな信号成分と同じように相関関数に影響を及ぼすため、像ずれ量算出バラツキ(精度)に対するノイズ成分の影響が比較的大きかった。また、線形相関関数値を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.

本発明の自動焦点検出装置を搭載した一眼レフカメラの主要構成を示すブロック図である。It is a block diagram which shows the main structures of the single-lens reflex camera carrying the automatic focus detection apparatus of this invention. 同自動焦点検出装置のAFモジュールの焦点検出エリアを示す模式平面図である。It is a schematic plan view which shows the focus detection area of AF module of the automatic focus detection apparatus. 同自動焦点検出装置のAFモジュールのラインセンサの構成を示す模式平面図である。It is a model top view which shows the structure of the line sensor of AF module of the automatic focus detection apparatus. 同AFモジュールのラインセンサを使用した相関演算について説明する図である。It is a figure explaining the correlation calculation using the line sensor of the same AF module. (A)、(B)は線形相関関数および線形内挿法を説明するグラフである。(A), (B) is a graph explaining a linear correlation function and a linear interpolation method. 2乗相関関数および2次関数内挿法を説明するグラフである。It is a graph explaining a square correlation function and a quadratic function interpolation method. 本発明の自動焦点検出動作の第1の実施形態の基本フローチャートである。It is a basic flow chart of a 1st embodiment of automatic focus detection operation of the present invention. 本発明の2乗相関関数値を使用した2次関数内挿法による2乗方式内挿演算の第1の実施例のフローチャートである。It is a flowchart of the 1st Example of the square system interpolation calculation by the quadratic function interpolation method using the square correlation function value of this invention. 本発明の自動焦点検出動作の第2の実施形態の基本フローチャートである。It is a basic flow chart of a 2nd embodiment of automatic focus detection operation of the present invention. 本発明の2乗相関関数値を使用した2次関数内挿法による2乗方式内挿演算の第2の実施例のフローチャートである。It is a flowchart of the 2nd Example of the square system interpolation calculation by the quadratic function interpolation method using the square correlation function value of this invention. 本発明の2乗相関関数値を使用した2次関数内挿法による2乗方式内挿演算の第3の実施例のフローチャートである。It is a flowchart of the 3rd Example of the square system interpolation calculation by the quadratic function interpolation method using the square correlation function value of this invention. 本発明と従来技術のデフォーカス量のバラツキを比較するグラフである。It is a graph which compares the dispersion | variation in the defocus amount of this invention and a prior art. 線形相関関数と内挿法の適合性を比較するグラフである。It is a graph which compares the suitability of a linear correlation function and an interpolation method. 2乗相関関数と内挿法の適合性を比較するグラフである。It is a graph which compares the suitability of a square correlation function and an interpolation method. 線形相関関数と2乗相関関数のボトム位置(極小値のシフト位置)が異なる場合の一例を示すグラフである。It is a graph which shows an example in case the bottom position (shift position of a minimum value) of a linear correlation function and a square correlation function differs.

図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 camera body 11 incorporating an AF module (automatic focus detection module) 60 as an automatic focus detection device, and an AF compatible photographing lens 51 that can be attached to and detached from the camera body 11.

カメラボディ11は、カメラボディ11及び撮影レンズ51を総括的に制御し、相関演算手段、繰り返しパターン判定手段、コントラスト検出手段及び選択手段としても動作するボディCPU31を備えている。   The camera body 11 includes a body CPU 31 that comprehensively controls the camera body 11 and the photographing lens 51 and also operates as a correlation calculation unit, a repeated pattern determination unit, a contrast detection unit, and a selection unit.

一方、撮影レンズ51は、レンズ機能を制御するレンズCPU57と、焦点調節用レンズ52を光軸方向に駆動するギヤブロック53と、撮影レンズ51のマウント部に設けられた、カメラボディ11のジョイント35と着脱自在に連結するジョイント55を備えている。レンズCPU57は、電気接点群56、36の接続を介してカメラボディ11の周辺制御回路21と接続されていて、この周辺制御回路21を介してボディCPU31との間で、開放、最大F値情報、焦点距離情報、レンズ位置(距離)情報などを通信する所定のデータ通信を行う。   On the other hand, the photographing lens 51 includes a lens CPU 57 that controls the lens function, a gear block 53 that drives the focus adjustment lens 52 in the optical axis direction, and a joint 35 of the camera body 11 that is provided in the mount portion of the photographing lens 51. And a joint 55 that is detachably connected. The lens CPU 57 is connected to the peripheral control circuit 21 of the camera body 11 via the connection of the electrical contact groups 56 and 36, and the open and maximum F value information is connected to the body CPU 31 via the peripheral control circuit 21. Predetermined data communication for communicating focal length information, lens position (distance) information, and the like is performed.

撮影レンズ51からカメラボディ11内に入射した被写体光束は、大部分がメインミラー13により、ファインダ光学系を構成するペンタプリズム17に向かって反射され、ペンタプリズム17で反射されてアイピースから射出する。ペンタプリズム17から射出された被写体光束の一部は測光IC18の受光素子に入射する。一方、メインミラー13の中央部に形成されたハーフミラー部14に入射した光束の一部はハーフミラー部14を透過し、メインミラー13の背面に設けられたサブミラー15により下方に反射され、AFモジュール60に入射する。   Most of the subject luminous flux that has entered the camera body 11 from the photographic lens 51 is reflected by the main mirror 13 toward the pentaprism 17 constituting the finder optical system, is reflected by the pentaprism 17 and exits from the eyepiece. Part of the subject light beam emitted from the pentaprism 17 is incident on the light receiving element of the photometry IC 18. On the other hand, a part of the light beam incident on the half mirror portion 14 formed at the center portion of the main mirror 13 is transmitted through the half mirror portion 14 and reflected downward by the sub mirror 15 provided on the back surface of the main mirror 13, and AF The light enters the module 60.

測光IC18は、受光量に応じて光電変換した電気信号を、周辺制御回路21を介してボディCPU31に測光信号として出力する。ボディCPU31は、測光信号等に基づいて所定の露出演算を実施し、露出用の適正シャッタ速度及び絞り値を算出する。そして、撮影処理の際に周辺制御回路21は、ミラーモータドライバ24を介してミラーモータ25を駆動してメインミラー13をアップするとともに、絞り機構22を駆動して撮影レンズ51の絞り(図示せず)を算出した絞り値に設定し、算出したシャッタ速度に基づいて露光機構23を駆動して露光する。さらに露光終了後、周辺制御回路21は、ミラーモータドライバ24を介してミラーモータ25を駆動してメインミラー13をダウンする。   The photometry IC 18 outputs an electrical signal photoelectrically converted according to the amount of received light as a photometry signal to the body CPU 31 via the peripheral control circuit 21. The body CPU 31 performs a predetermined exposure calculation based on a photometric signal or the like, and calculates an appropriate shutter speed and aperture value for exposure. During the photographing process, the peripheral control circuit 21 drives the mirror motor 25 via the mirror motor driver 24 to raise the main mirror 13 and also drives the diaphragm mechanism 22 to stop the diaphragm (not shown). Z) is set to the calculated aperture value, and exposure is performed by driving the exposure mechanism 23 based on the calculated shutter speed. Further, after the exposure is completed, the peripheral control circuit 21 drives the mirror motor 25 via the mirror motor driver 24 to lower the main mirror 13.

ボディCPU31は、制御プログラム等をメモリしたROM31a、演算用、制御用の所定のデータ、変数を一時的にメモリするRAM31b、計時用のタイマ31c、カウンタ31d、AFモジュール60から入力した出力VOUT信号(ビデオ信号)をA/D変換するA/D変換器31e、AFモジュール60の積分終了を設定するモニタ基準VMS信号をD/A変換してAFモジュール60へ出力するD/A変換器31fを内蔵している。   The body CPU 31 includes a ROM 31a that stores a control program, a predetermined data for calculation and control, a RAM 31b that temporarily stores variables, a timer 31c for timing, a counter 31d, and an output VOUT signal ( A / D converter 31e for A / D conversion of the video signal) and a D / A converter 31f for D / A converting the monitor reference VMS signal for setting the end of integration of the AF module 60 and outputting it to the AF module 60 doing.

AFモジュール60は、いわゆる瞳分割位相差方式であって、CCDラインセンサと積分終了タイミングをモニタするモニタセンサを備えた焦点検出素子61と、図示していないが撮像面と等価な焦点検出面において、被写体像を形成する被写体光束を二分割に瞳分割して、対応するCCDラインセンサ上に投影するAF光学系とを備えている。   The AF module 60 is a so-called pupil division phase difference method, and includes a focus detection element 61 having a CCD line sensor and a monitor sensor for monitoring the integration end timing, and a focus detection surface (not shown) equivalent to an imaging surface. And an AF optical system that divides the subject luminous flux forming the subject image into two and divides it into a corresponding CCD line sensor.

この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 AF module 60 detects the focus state of the subject and outputs a pixel-unit video signal (a pair of image signal sequences) to the body CPU 31. The body CPU 31 converts the video signal input from the AF module 60 into a digital signal by the built-in A / D converter 31e, performs a predetermined calculation based on the digital signal corresponding to the focus detection area, and calculates the defocus amount. To do. Further, the body CPU 35 determines the rotation direction of the AF motor 33 based on the calculated defocus amount, calculates the rotation number as the number of AF pulses output from the encoder 37 that detects the rotation number of the AF motor 33, and is built-in. Set to the counter 31d. The body CPU 31 drives the AF motor 33 via the AF motor driver 32 based on the rotation direction and the number of pulses. During this driving, the body CPU 31 counts down the pulses output from the encoder 37 in conjunction with the rotation of the AF motor 33 by the built-in counter 31d, and stops the AF motor 33 when the count value becomes zero. The rotation of the AF motor 33 is decelerated by the gear block 34, and the gear of the photographic lens 51 is connected via a connection between a joint 35 provided on the mount portion of the camera body 11 and a joint 55 provided on the mount portion of the photographic lens 51. The focus adjustment lens 52 is transmitted to the block 54 and moved forward and backward in the optical axis direction via the gear block 54.

ボディCPU31には、フォーカスモードをマニュアルモード、AF(ワンショット/コンティニュアスAF)モードの間で切り換えるフォーカススイッチSWAF、図示しないマニュアルレリーズ釦の半押しでオンする測光スイッチSWS及び全押しでオンするレリーズスイッチSWR、周辺制御回路21等への電源をオン/オフするメインスイッチSWMが接続されている。   The body CPU 31 has a focus switch SWAF for switching the focus mode between a manual mode and an AF (one-shot / continuous AF) mode, a photometry switch SWS that is turned on by half-pressing a manual release button (not shown), and a full-press. A main switch SWM for turning on / off the power to the release switch SWR and the peripheral control circuit 21 is connected.

ボディCPU31には、設定されたAF、露出、撮影などのモード、シャッタ速度、絞り値などの各種撮影情報を表示する表示パネル39と、外部不揮発性メモリ手段としてカメラボディ11特有の各種定数などがメモリされたフラッシュメモリ38が接続されている。表示パネル39は、カメラボディ11の外面及びファインダ視野内の2ヶ所に設けられた表示器を含む。   The body CPU 31 has a display panel 39 for displaying various shooting information such as a set AF, exposure, shooting mode, shutter speed, aperture value, and various constants specific to the camera body 11 as external nonvolatile memory means. A stored flash memory 38 is connected. The display panel 39 includes displays provided at two locations within the outer surface of the camera body 11 and the viewfinder field.

カメラボディ11には、撮像手段としてのイメージセンサ45が設けられている。イメージセンサ45による撮像面とAFモジュール60による焦点検出面は等価に設定されている。イメージセンサ45の出力信号は、AFE(アナログフロントエンド)46でデジタル化され、DSP41でディスプレイ(LCD)42に表示可能なビデオ信号に加工される。DSP41は、ボディCPU31との間で撮影に関する情報を授受する。   The camera body 11 is provided with an image sensor 45 as imaging means. The imaging surface by the image sensor 45 and the focus detection surface by the AF module 60 are set to be equivalent. The output signal of the image sensor 45 is digitized by an AFE (analog front end) 46 and processed into a video signal that can be displayed on a display (LCD) 42 by a DSP 41. The DSP 41 exchanges information regarding photographing with the body CPU 31.

図2は、焦点検出素子61の焦点検出エリアを説明する模式平面図である。焦点検出素子61は、瞳分割された一対の被写体像光が投影されるラインセンサIHを有するCCD焦点検出素子である。本実施形態では、撮影画面70内の中央に焦点検出エリアCCを設定し、この交差焦点検出エリアCC内の被写体像のうち、撮影レンズの異なる瞳位置を通過した一対の被写体像に瞳分割されて、それぞれ対応するラインセンサIHの異なる一方と他方の領域に投影される。   FIG. 2 is a schematic plan view for explaining a focus detection area of the focus detection element 61. The focus detection element 61 is a CCD focus detection element having a line sensor IH onto which a pair of subject image light divided into pupils is projected. In the present embodiment, a focus detection area CC is set in the center of the shooting screen 70, and the subject image in the cross focus detection area CC is divided into a pair of subject images that pass through different pupil positions of the shooting lens. Thus, the image is projected onto different one and other regions of the corresponding line sensor IH.

前記ラインセンサ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 body CPU 31 receives an image signal sequence (video signal) from the AF module 60, the body CPU 31 obtains a linear correlation function SCO (i) for the pair of image signal sequences from the line sensor IH by an image shift method. The correlation function SCO (i) indicates the degree of coincidence between the reference line sensor A and the reference line sensor B of the line sensor IH, and the difference (difference) between the pixel signal values of the image signal sequences of the reference line sensor A and the reference line sensor B. The correlation function SCO (i), which is the sum of the absolute values of the signal values), is obtained by shifting the reference line sensor B by one pixel from the reference line sensor A as a reference. The correlation function SCO (i) is a function that becomes smaller as the coincidence degree (waveform coincidence degree) between a pair of image signal sequences is higher. FIG. 4A shows a state in which the reference line sensor A of the line sensor IH and the reference line sensor B (the phase of the pixel signal sequence thereof) match with the shift number I = 0 in the initial state. If the maximum shift number is ± imax, the reference line sensor B is shifted by ± 1 pixel with respect to the reference line sensor A from the initial state of FIG. 4A as shown in FIGS. 4B and 4C. However, the calculation is repeated until the shift number I = ± imax from the specific shift position. 4D and 4E show the state where the shift number I = ± i. A state where the reference line sensor A of the line sensor IH and the reference line sensor B (the phase of the pixel signal sequence thereof) coincide with each other at the specific shift position is a focused state.

線形の相関関数SCO(i)は、下記数1式で示すことができる。

Figure 2014238452
は基準ラインセンサAの画素番号に対応する画像信号、Bn+iは参照ラインセンサBの画素番号に対応する画像信号である。 The linear correlation function SCO (i) can be expressed by the following equation (1).
Figure 2014238452
An is an image signal corresponding to the pixel number of the reference line sensor A, and B n + i is an image signal corresponding to the pixel number of the reference line sensor B.

一対の被写体像の位相差(ずれ量)は、基準ラインセンサ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 body CPU 31 detects the smallest minimum value of the linear correlation function SCO (i), and determines the shift number of the image of the reference line sensor B with respect to the reference line sensor A when the minimum value is taken as the image shift amount (shifted). Detect as quantity). Note that the image correlation amount (shift amount) can be obtained only from the linear correlation function SCO (i) in units of the pixel (photoelectric conversion element) pitch of the line sensor IH. An interpolation operation is performed on (i) to obtain an accurate minimum value with small variations (high accuracy). The defocus amount of the photographing lens 51 is obtained from the number of shifts (difference between the shift position and the specific shift position) when the minimum value is obtained.

図5は、線形内挿法(直線補間法)の実施形態を示している。線形内挿法は、シフト位置の間に存在する場合もある相関関数の真の極小値を求める方法であって、極小値である相関関数値を含む2個の相関関数値を通る直線と、この直線と傾きが逆方向であって、他の相関関数値を通る直線の交点により相関関数の真の極小値を求める手法である。図5は、線形相関関数SCO(i)によって演算した相関関数値から、極小値である相関関数値H及び相関関数値Hを挟む前後の相関関数値H−1とH+1を求め、これらの相関関数値H、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.

+1≧H-1 の場合は、相関関数値HとH+1を通る直線と、該直線と傾斜方向が逆であって、相関関数値H−1を通る直線の交点のシフト位置を求める。この交点のシフト位置が、真のシフト位置または真のシフト位置により近いシフト位置である。極小値である相関関数値Hのシフト位置と前記交点のシフト位置の差をシフト誤差βとすると、シフト誤差βは、下記数2式によって求めることができる(図5(A))。

Figure 2014238452
In the case of H + 1 ≧ H− 1 , the shift position of the straight line passing through the correlation function values H 0 and H +1 and the intersection of the straight line passing through the correlation function value H −1 and the straight line passing through the correlation function value H −1 are reversed. Ask. The shift position of this intersection is a true shift position or a shift position closer to the true shift position. Assuming that the difference between the shift position of the correlation function value H 0 , which is the minimum value, and the shift position of the intersection point is the shift error β, the shift error β can be obtained by the following equation (2) (FIG. 5A).
Figure 2014238452

−1>H+1 の場合は、相関関数値H−1とHを通る直線と、該直線と傾斜方向が逆であって、相関関数値H+1を通る直線の交点のシフト位置を求める。この交点のシフト位置が、真のシフト位置または真のシフト位置により近いシフト位置である。極小値である相関関数値Hのシフト位置と前記交点のシフト位置の差をシフト誤差βとすると、シフト誤差βは、下記数3式によって求めることができる(図5(B))。

Figure 2014238452
In the case of H −1 > H +1 , the shift position of the intersection of the straight line passing through the correlation function values H −1 and H 0 and the straight line passing through the correlation function value H +1 in which the straight line and the inclination direction are opposite is obtained. . The shift position of this intersection is a true shift position or a shift position closer to the true shift position. Assuming that the difference between the shift position of the correlation function value H 0 that is the minimum value and the shift position of the intersection is the shift error β, the shift error β can be obtained by the following equation (3) (FIG. 5B).
Figure 2014238452

以上の線形内挿演算により、真のシフト位置または真のシフト位置により近いシフト位置である像ずれ量i+βを求めることができる。この像ずれ量i+βは、相関関数のみによって求めた像ずれ量iよりも精度が高く、正確である。 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乗相関関数値H 及び2乗相関関数値H を挟む前後の2乗相関関数値H−1 とH+1 を求め、これらの2乗相関関数値H 、H−1 、H+1 に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)を求める。

Figure 2014238452
In this embodiment, in order to obtain the degree of coincidence between the image signal sequences IH-A and IH-B of the standard line sensor A and the reference line sensor B, the square correlation function SCO2 (i) is obtained by the following equation (4).
Figure 2014238452

以上の2乗相関関数SCO2(i)において、極小値となる2乗相関関数値H 及びこの2乗相関関数値H を挟む前後の2乗相関関数値H−1 とH+1 を求め、さらに3点の2乗相関関数値H 、H−1 、H+1 に2次関数内挿演算を適用して、より高精度で正確な極小値が得られる2乗相関シフト位置を求める。極小値の2乗相関関数値H と真の極小値の2乗相関関数値が得られるシフト位置との差をβとすると、シフト誤差βは、下記数5式によって求めることができる(図6)。

Figure 2014238452
In the above-described square correlation function SCO2 (i), the square correlation function value H 0 S that is the minimum value and the square correlation function values H −1 S and H +1 before and after the square correlation function value H 0 S are sandwiched. A square that obtains S and further applies a quadratic function interpolation operation to the three-point square correlation function values H 0 S , H −1 S , and H +1 S to obtain a more accurate and accurate minimum value The correlation shift position is obtained. If the difference between the minimum square correlation function value H 0 S and the shift position at which the true minimum square correlation function value is obtained is β S , the shift error β S can be obtained by the following equation (5). Yes (Fig. 6).
Figure 2014238452

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 pixel 1 pitch (1 bit of the image signal sequence) (bottom in bit). Position (bit)), and the vertical axis indicates the focus detection error (au). From FIG. 13, it can be seen that for the linear correlation function SCO (i), the focus detection error is smaller when the linear interpolation is calculated than when the quadratic function is calculated.

図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 pixel 1 pitch ( The shift position (bottom position (bit) in the bit) of the minimum value in one bit of the image signal sequence, and the vertical axis indicates the focus detection error (au). As can be seen from FIG. 14, for the square correlation function SCO2 (i), the focus detection error is smaller when the quadratic function interpolation is performed than when the linear interpolation is performed.

以上より、線形相関関数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 automatic focus detection 1 is entered, a pair of image signal sequences acquired from the line sensor IH is passed through a low-pass filter to remove high-frequency noise components (S101), and the image passed through the low-pass filter. The contrast is calculated for the signal sequence (at least the image signal sequence of the reference line sensor A) (S103). It is checked whether or not the contrast is OK (S105). If it is determined that the contrast is not OK (S105: NO), the focus detection operation (automatic focus detection 1) is terminated (END).

次に、コントラスト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)。次に、求めた線形相関関数値において、極小となる相関関数値H及びその相関関数値Hが得られたボトム位置(シフト量)iを検出(探索)し、検出したボトム位置i及びこのボトム位置iを挟む3点の相関関数値H、H−1、H+1(図5(A)、(B)参照)を記憶してステップS113に進む(S111、S113)。ステップS113では、ボトム位置iの信頼性を演算する。ボトム位置iの信頼性は、相関関数値H−1とHを通る直線の傾斜角と相関関数値H+1とHを通る直線の傾斜角、相関関数値Hの大きさをしきい値と比較するなど、公知の方法によって求める。 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 bit interpolation operation 1 is performed to finish the automatic focus detection 1 (S117, END), and it is determined that the reliability is OK (Yes). If not (S115: NO), step S117 is skipped and the automatic focus detection 1 is terminated (END).

自動焦点検出1を終了したら、図示しない別のAFレンズ駆動スレッドにより、像ずれ量に基づいてデフォーカス量を演算し、デフォーカス量に基づいて焦点調節レンズ群52を合焦位置まで移動させるのに必要なレンズ駆動量(AFモータ33の回転方向、回転量)を演算し、演算したレンズ駆動量に基づいて、モータドライブ回路32を介してAFモータ33を駆動し、ギヤブロック34、ジョイント35、55及びギヤブロック54を介して焦点調節レンズ群52を合焦位置まで移動する。   When the automatic focus detection 1 is completed, the defocus amount is calculated based on the image shift amount by another AF lens driving thread (not shown), and the focus adjustment lens group 52 is moved to the in-focus position based on the defocus amount. The lens drive amount (rotation direction and rotation amount of the AF motor 33) necessary for the operation is calculated, and the AF motor 33 is driven via the motor drive circuit 32 based on the calculated lens drive amount, and the gear block 34 and the joint 35 are driven. , 55 and the gear block 54, the focus adjustment lens group 52 is moved to the in-focus position.

ステップS117で実施する2乗方式ビット内挿演算1について、図8に示したフローチャートを参照してより詳細に説明する。2乗方式ビット内挿演算1では、先ず、ステップS111で検出した線形相関関数値のボトム位置i及びボトム位置iを挟む±2ビットのシフト位置、つまり、シフト位置i−2、i−1、i、i+1、i+2の5点について2乗相関演算を実施して2乗相関関数SCO2(i)を求める(S201)。続いて、2乗相関演算で求めた2乗相関関数SCO2(i)の2乗相関ボトム位置i (図6参照)を検出し(S203)、ステップS205に進む。2乗相関演算を実施するシフト範囲を5点まで絞ったので、最初から全シフト範囲について2乗相関演算して極小値を求める場合より演算時間が短縮される。 The square method bit interpolation calculation 1 performed in step S117 will be described in more detail with reference to the flowchart shown in FIG. In the square method bit interpolation operation 1, first, a shift position of ± 2 bits sandwiching the bottom position i 0 and the bottom position i 0 of the linear correlation function value detected in step S111, that is, the shift position i 0 -2, i 0 -1, i 0, i 0 + 1, i 0 for 5 points +2 conducted square correlation operation finds square correlation function SCO2 (i) (S201). Subsequently, the square correlation bottom position i 0 S (see FIG. 6) of the square correlation function SCO2 (i) obtained by the square correlation calculation is detected (S203), and the process proceeds to step S205. Since the shift range in which the square correlation calculation is performed is narrowed down to five points, the calculation time is shortened compared with the case where the minimum value is obtained by calculating the square correlation for the entire shift range from the beginning.

ここで、ボトム位置iを挟む±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乗相関ボトム位置i )有り(検出できた)か否かチェックする。2乗相関ボトム位置i 有りと判定した場合(S205:YES)、3点の2乗相関関数値H−1 とH とH+1 を用いて2次関数内挿演算を実施し、2次相関関数の真の極小値が得られるボトム位置と2乗相関ボトム位置i との誤差に対応するずれ量βを算出し(S207)、さらに真のボトム位置に対応する像ずれ量i +βを算出してリターンする(S209、RET)(図6参照)。2乗相関ボトム位置i 有りと判定できなかった場合(S205:NO)、ステップS111で検出した線形相関関数値の3点の相関関数値H−1とHとH+1を用いて線形内挿演算を実施し、線形相関関数値の真の極小値が得られるボトム位置とボトム位置iとのずれ量βを算出し(S211)、さらに真のボトム位置に相当する像ずれ量i+βを算出してリターンする(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乗相関ボトム位置i を検出できた場合に2次関数内挿演算により像ずれ量i +βを求めるので、より精度の高い正確な像ずれ量i +βを、短時間で得ることができる。2乗相関関数の2乗相関ボトム位置i を検出できなかった場合、線形相関値の中から検出した相関関数値H−1とHとH+1を用いて線形内挿演算を実施して精度の高い正確な像ずれ量i+βを得ることができる。 According to the automatic focus detection 1 of the first embodiment of the present invention, the square correlation calculation is performed in a range of ± 2 bits with respect to the bottom position obtained in advance by the linear correlation calculation. The calculation time is shortened compared with the case where the power correlation calculation is performed. When the square correlation bottom position i 0 S of the square correlation function can be detected, the image shift amount i 0 S + β S is obtained by quadratic function interpolation, so that the more accurate and accurate image shift amount i 0 S can be obtained. the + beta S, can be obtained in a short time. When the square correlation bottom position i 0 S of the square correlation function cannot be detected, linear interpolation is performed using the correlation function values H −1 , H 0 and H +1 detected from the linear correlation values. Thus, it is possible to obtain an accurate image shift amount i 0 + β with high accuracy.

なお、自動焦点検出1を終了したら、図示しない別のAFレンズ駆動スレッドにより、像ずれ量に基づいてデフォーカス量を演算し、デフォーカス量に基づいて焦点調節レンズ群52を合焦位置まで移動させるのに必要なレンズ駆動量(AFモータ33の回転方向、回転量)を演算し、演算したレンズ駆動量に基づいて、モータドライブ回路32を介してAFモータ33を駆動し、ギヤブロック34、ジョイント35、55及びギヤブロック54を介して焦点調節レンズ群52を合焦位置まで移動する。   When the automatic focus detection 1 is completed, the defocus amount is calculated based on the image shift amount by another AF lens driving thread (not shown), and the focus adjustment lens group 52 is moved to the in-focus position based on the defocus amount. The lens driving amount (rotation direction and amount of rotation of the AF motor 33) necessary for the calculation is calculated, and the AF motor 33 is driven via the motor drive circuit 32 based on the calculated lens driving amount, and the gear block 34, The focus adjustment lens group 52 is moved to the in-focus position via the joints 35 and 55 and the gear block 54.

図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 automatic focus detection 2 is different from the automatic focus detection 1 of the first embodiment in that the linear correlation calculation and the square correlation calculation are simultaneously performed and then the bottom position of the linear correlation function value is detected. When automatic focus detection 2 is entered, a pair of image signal sequences acquired from the line sensor IH is passed through a low-pass filter (S301), and then contrast is calculated for at least the image signal sequence of the reference line sensor A (S303). Subsequently, it is checked whether or not the contrast is OK (S305). If it is determined that the contrast is not OK (S305: NO), the automatic focus detection operation (auto focus detection 2) is ended (END).

コントラスト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)。求めた線形相関関数値について、極小値が得られるボトム位置iを検出(探索)し、ボトム位置i及びボトム位置iを挟む計3点の相関関数値H、H−1、H+1(図5(A)、(B)参照)を記憶して、ステップS313に進む(S311、S313)。ステップS313では、ボトム位置iの信頼性を演算する。ボトム位置iの信頼性は、相関関数値H−1とHを通る直線の傾斜角と相関関数値H+1とHを通る直線の傾斜角、あるいは相関関数値Hの大きさをしきい値と比較するなど、公知の方法によって求める。 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 bit interpolation operation 2 is executed and the process returns (S317, RET), and when the reliability is not OK (Yes) (S315). : NO), skipping step S317 and returning (RET).

図10は、ステップS317で実施する2乗方式ビット内挿演算2の詳細を示すフローチャートである。2乗方式ビット内挿演算2に入ると、先ず、ステップS309で演算した2乗相関関数値が線形相関関数値のボトム位置iでボトムか否か(線形相関関数値のボトム位置における2乗相関関数値が極小値であるか否か)チェックする(S401、図15)。ボトムでないと判定した場合(S401:NO)、線形相関関数値のボトム位置iを含む±2の各シフト位置i−2、i−1、i、i+1、i+2において2乗相関演算を実施してステップS405に進む(S403、S405)。2乗相関関数値が線形相関関数値のボトム位置iでボトムであると判定した場合(S401:YES)、ステップS403をスキップしてステップS405に進む。 FIG. 10 is a flowchart showing details of the square method bit interpolation operation 2 performed in step S317. When the square method bit interpolation operation 2 is entered, first, whether or not the square correlation function value calculated in step S309 is the bottom at the bottom position i 0 of the linear correlation function value (the square at the bottom position of the linear correlation function value). Whether or not the correlation function value is a minimum value is checked (S401, FIG. 15). When it is determined that it is not the bottom (S401: NO), in each of ± 2 shift positions i 0 -2, i 0 -1, i 0 , i 0 +1, i 0 +2 including the bottom position i 0 of the linear correlation function value A square correlation calculation is performed and the process proceeds to step S405 (S403, S405). When it is determined that the square correlation function value is the bottom at the bottom position i 0 of the linear correlation function value (S401: YES), step S403 is skipped and the process proceeds to step S405.

ステップS405では、2乗相関関数値の2乗相関ボトム位置i を検出し、2乗相関ボトム位置i の2乗相関関数値H を含む3点の2乗相関関数値H 、H−1 、H+1 (図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乗相関ボトム位置i 有り(極小値となる2乗相関関数値)を検出できた)か否かチェックする。2乗相関ボトム位置i 有りと判定した場合(S407:YES)、3点の2乗相関関数値H−1 とH とH+1 を用いて2次関数内挿演算を実施し、2乗相関関数値の真の極小値が得られるボトム位置と2乗相関ボトム位置i のずれ量βを算出し(S409)、さらに真のボトム位置に対応する像ずれ量(i +β)を演算してリターンする(S411、RET)。2乗相関ボトム位置i を検出できたと判定できなかった場合(S407:NO)、線形相関関数値の3点の相関関数値H−1とHとH+1を用いて線形内挿演算を実施し、線形相関関数値の真の極小値が得られるボトム位置とボトム位置iとのずれ量βを算出し(S413)、さらに真のボトム位置に対応する像ずれ量i+βを算出してリターンする(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 automatic focus detection 2 of the second embodiment of the present invention, the linear correlation calculation and the square correlation calculation are simultaneously performed. Therefore, the linear correlation function and the square correlation function are simultaneously obtained by one correlation calculation (shift calculation). Therefore, the calculation time can be shortened.

図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 automatic focus detection 3 is different from the automatic focus detections 1 and 2 of the first and second embodiments in that only the square correlation calculation is performed to detect the square correlation bottom position of the square correlation function value.

自動焦点検出3に入ると、先ず、ラインセンサIHから取得した一対の画像信号列をローパスフィルタに通して(S501)、少なくとも基準ラインセンサAの画像信号列についてコントラストを演算する(S503)。続いてコントラストOKか否かチェックし(S505)、コントラストOKでないと判定した場合(S505:NO)、自動焦点検出動作(自動焦点検出3)を終了する(END)。   When the automatic focus detection 3 is entered, first, a pair of image signal sequences acquired from the line sensor IH is passed through a low-pass filter (S501), and contrast is calculated at least for the image signal sequence of the reference line sensor A (S503). Subsequently, it is checked whether or not the contrast is OK (S505). If it is determined that the contrast is not OK (S505: NO), the automatic focus detection operation (automatic focus detection 3) is terminated (END).

コントラスト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乗相関関数値H 及びその2乗相関関数値H が得られた2乗相関ボトム位置i を検出(探索)し、検出した2乗相関ボトム位置i 及びこの2乗相関ボトム位置i を挟む3点の2乗相関関数値H 、H−1 、H+1 (図6参照)を記憶してステップS513に進む(S511、S513)。ステップS513では2乗相関ボトム位置i の信頼性を演算してステップS515に進む(S513、S515)。ボトム位置i の信頼性は、2乗相関関数値H−1 とH を通る直線の傾斜角あるいは相関関数値H+1 とH を通る直線の傾斜角、または2乗相関関数値H の大きさをしきい値と比較するなど、公知の方法によって求める。 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乗相関ボトム位置i の信頼性OK(有り)か否か判定し、信頼性OK(有り)と判定した場合(S515:YES)、3点の2乗相関関数値H 、H−1 、H+1 を用いた2次関数内挿演算によりずれ量βを算出し(S517)、像ずれ量i +βを演算してリターンする(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次関数内挿演算により像ずれ量i +βを演算するので、焦点検出処理を簡素化することができる。 As described above, according to the automatic focus detection 3 process as the third embodiment of the present invention, the image shift amount i 0 S + β is obtained by the square correlation calculation and the quadratic function interpolation calculation without performing the linear correlation calculation. Since S is calculated, the focus detection process can be simplified.

以上、本発明の自動焦点検出方法及び自動焦点検出装置を一眼カメラに適用した実施形態について説明したが、本発明は、瞳分割位相差方式の光学系であれば適用可能である。   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 camera body 31 body CPU (focus detection calculation means)
32 AF motor driver 33 AF motor 34 Gear block 35 Joint 37 Encoder 38 Flash memory 51 Shooting lens 52 Focus adjustment lens group 53 Gear block 55 Joint 57 Lens CPU
60 AF module 61 Focus detection element 70 Shooting screen CC Focus detection area IH Line sensor A Reference line sensor (reference line sensor area, one area)
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:
請求項1記載の自動焦点検出方法において、前記2乗相関関数は、前記一対の画像信号列の一方と他方の差信号値の2乗の総和からなる2乗相関関数値を一対の画像信号列の一方に対して他方を初期位置から逐次シフトさせて複数のシフト位置で求める関数であって、2乗相関関数値が小さいほど前記一対の画像信号列の一致度が高いと判定する自動焦点検出方法。 2. The automatic focus detection method according to claim 1, wherein the square correlation function is a square correlation function value formed by a sum of squares of difference signal values of one of the pair of image signal strings and the other of the pair of image signal strings. Automatic focus detection that sequentially shifts one of the other from the initial position and obtains a plurality of shift positions and determines that the degree of coincidence of the pair of image signal sequences is higher as the square correlation function value is smaller Method. 請求項2記載の自動焦点検出方法において、前記2乗相関シフト位置は、前記2乗相関関数値の極小値を含む複数の2乗相関関数値を用いて2次関数内挿演算を実施し、2乗相関関数値の真の極小値が得られるシフト位置によって求められる自動焦点検出方法。 3. The automatic focus detection method according to claim 2, wherein the square correlation shift position performs a quadratic function interpolation operation using a plurality of square correlation function values including a minimum value of the square correlation function value, An automatic focus detection method obtained by a shift position at which a true minimum value of a square correlation function value is obtained. 請求項2記載の自動焦点検出方法はさらに、前記2乗相関関数値を求めるステップの前に、前記一対の画像信号列の一方と他方の差信号値の総和からなる線形相関関数値を一対の画像信号列の一方に対して他方を逐次シフトさせて複数のシフト位置で求める線形相関演算を実施するステップと、複数のシフト位置で求めた線形相関関数値の中から極小値を検出するステップとを有し、前記2乗相関演算するステップでは、前記極小値が得られたシフト位置を含む所定数のシフト位置において前記2乗相関演算を実施して2乗相関関数値を求める自動焦点検出方法。 The automatic focus detection method according to claim 2, further comprising: before the step of obtaining the square correlation function value, a linear correlation function value comprising a sum of difference signal values of one of the pair of image signal sequences and the other of the pair of image signal sequences. Performing a linear correlation operation obtained by sequentially shifting the other of the image signal sequence with respect to one of the plurality of shift positions, and detecting a minimum value from the linear correlation function values obtained at the plurality of shift positions; And in the step of calculating the square correlation, an automatic focus detection method for obtaining a square correlation function value by performing the square correlation calculation at a predetermined number of shift positions including the shift position at which the minimum value is obtained. . 請求項2記載の自動焦点検出方法において、前記2乗相関関数値を求めるステップは、前記一対の画像信号列の一方と他方の差信号値の総和からなる線形相関関数値を一対の画像信号列の一方に対して他方を逐次シフトさせて複数のシフト位置で求める線形相関演算を実施するステップであって、このステップの後、複数のシフト位置で求めた線形相関関数値の中から極小値を検出するステップと、前記線形相関演算により求めた線形相関関数値の極小値が得られたシフト位置で前記2乗相関関数値が極小値であるか否か判定するステップと、極小値であると判定した場合、前記2乗相関関数値の極小値が得られる2乗関数シフト位置を求めるステップと、極小値であると判定しなかった場合(、前記線形相関関数値の極小値が得られたシフト位置を含む所定数のシフト位置について再度2乗相関演算を実施するステップと、この2乗相関関数値の極小値が得られる2乗関数シフト位置を求めるステップを有する自動焦点検出方法。 3. The automatic focus detection method according to claim 2, wherein the step of obtaining the square correlation function value includes calculating 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 of the pair of image signal sequences. A step of performing a linear correlation operation for sequentially obtaining one of the plurality of shift positions and obtaining a linear correlation function obtained at a plurality of shift positions. After this step, a minimum value is obtained from the linear correlation function values obtained at the plurality of shift positions. A step of detecting, a step of determining whether or not the square correlation function value is a minimum value at a shift position where the minimum value of the linear correlation function value obtained by the linear correlation calculation is obtained, and a minimum value If it is determined, a step of obtaining a square function shift position at which a minimum value of the square correlation function value is obtained, and a case where the minimum value is not determined (when the minimum value of the linear correlation function value is obtained) Schiff Step a, automatic focus detection method comprising the steps of obtaining a square function shift position minimum value is obtained for the square correlation function values to implement the re-squaring the correlation operation on the shift position of a predetermined number including the position. 請求項4または5記載の自動焦点検出方法において、前記検出した線形相関関数値の極小値が得られたシフト位置を含む所定数のシフト位置において2乗相関関数値を求める場合の所定数は、前記2次関数内挿演算または線形相関内挿演算に用いる複数のシフト位置の数より多数である自動焦点検出方法。 6. The automatic focus detection method according to claim 4, wherein the predetermined number when the square correlation function value is obtained at a predetermined number of shift positions including the shift position at which the minimum value of the detected linear correlation function value is obtained is: An automatic focus detection method in which the number is larger than the number of shift positions used in the quadratic function interpolation calculation or linear correlation interpolation calculation. 請求項4または5記載の自動焦点検出方法はさらに、前記2乗相関関数値を求めるステップの後、前記2乗相関関数値の極小値を検出するステップと、前記検出した2乗相関関数値の極小値を含む所定数の2乗相関関数値を用いて2次関数内挿演算を実施し、2乗相関関数値の真の極小値が得られるシフト位置を求めるステップを有する自動焦点検出方法。 6. The automatic focus detection method according to claim 4, further comprising: after the step of obtaining the square correlation function value, detecting a minimum value of the square correlation function value; and detecting the detected square correlation function value. An automatic focus detection method comprising a step of performing a quadratic function interpolation operation using a predetermined number of square correlation function values including a local minimum value to obtain a shift position at which a true local minimum value of the square correlation function value is obtained. 請求項4または5記載の自動焦点検出方法はさらに、前記2乗相関関数値を求めるステップの後、前記2乗相関演算により求めた2乗相関関数値の極小値を検出するステップと、極小値を検出できたか否か判定するステップと、極小値を検出できたと判定した場合、検出した2乗相関関数値の極小値を含む所定数の2乗相関関数値を用いて2次関数内挿演算を実施し、2乗相関関数値の真の極小値が得られるシフト位置を求めるステップと、2乗相関関数値の極小値を検出できなかったと判定した場合、前記線形相関関数値の極小値を含む所定数の線形相関関数値を用いて線形内挿演算を実施し、線形相関関数値の真の極小値が得られるシフト位置を求めるステップを有する自動焦点検出方法。 6. The automatic focus detection method according to claim 4, further comprising 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 a minimum value. And 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 when it is determined that the minimum value has been detected. And determining the shift position at which a true minimum value of the square correlation function value is obtained, and determining that the minimum value of the square correlation function value could not be detected, the minimum value of the linear correlation function value is An automatic focus detection method comprising a step of performing a linear interpolation operation using a predetermined number of linear correlation function values including a shift position for obtaining a true minimum value of the linear correlation function value. 撮影レンズの異なる瞳位置を通過した一対の被写体像を、対応する画素列を有する一対のラインセンサ上に投影する焦点検出光学系と、
該一対のラインセンサによる一対の画像信号列に係る画素信号値を相対的にシフトして相関量を算出し、該相関量が極値となるシフト位置に基づいて一対の画像信号列の位相差を求め、該位相差から前記撮影レンズのデフォーカス量を求める焦点検出演算手段と、
を有する位相差方式の自動焦点検出装置において、
前記焦点検出演算手段は、前記一対のラインセンサの対応する画素信号値の一方と他方の差信号値を求め、前記差信号値の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
請求項9記載の自動焦点検出方装置において、前記2乗相関関数は、前記一対の画像信号列の一方と他方の差信号値の2乗の総和からなる2乗相関関数値を一対の画像信号列の一方に対して他方を初期位置から逐次シフトさせて複数のシフト位置で求める関数であって、2乗相関関数値が小さいほど前記一対の画像信号列の一致度が高い自動焦点検出装置。 10. The automatic focus detection method device according to claim 9, wherein the square correlation function is a square correlation function value formed by a sum of squares of difference signal values of one of the pair of image signal sequences and the other of the pair of image signals. An automatic focus detection apparatus, which is a function for sequentially shifting one of the columns from the initial position to obtain a plurality of shift positions, and the degree of coincidence between the pair of image signal sequences increases as the square correlation function value decreases. 請求項10記載の自動焦点検出装置において、前記2乗相関シフト位置は、前記2乗相関関数値の極小値を含む複数の2乗相関関数値を用いて2次関数内挿演算を実施し、2乗相関関数値の真の極小値が得られるシフト位置によって求められる自動焦点検出装置。 The automatic focus detection apparatus according to claim 10, wherein the square correlation shift position performs a quadratic function interpolation operation using a plurality of square correlation function values including a minimum value of the square correlation function value, An automatic focus detection apparatus which is obtained by a shift position where a true minimum value of a square correlation function value is obtained. 請求項10記載の自動焦点検出装置において、前記焦点検出演算手段はさらに、前記2乗相関関数値を求める前に、前記一対の画像信号列の一方と他方の差信号値の総和からなる線形相関関数値を一対の画像信号列の一方に対して他方を逐次シフトさせて複数のシフト位置で求める線形相関演算を実施し、複数のシフト位置で求めた線形相関関数値の中から極小値を検出すること、及び前記2乗相関演算では、前記極小値が得られたシフト位置を含む所定数のシフト位置において前記2乗相関演算を実施して2乗相関関数値を求める自動焦点検出装置。 11. The automatic focus detection apparatus according to claim 10, wherein the focus detection calculation means further includes a linear correlation composed 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. Performs linear correlation operation to obtain function values at multiple shift positions by sequentially shifting the function value of one of a pair of image signal sequences, and detects the minimum value from the linear correlation function values obtained at multiple shift positions And in the square correlation calculation, an automatic focus detection apparatus that calculates the square correlation function value by performing the square correlation calculation at a predetermined number of shift positions including the shift position at which the minimum value is obtained. 請求項10記載の自動焦点検出装置において、前記焦点検出演算手段はさらに、前記2乗相関関数値を求めるとともに、前記一対の画像信号列の一方と他方の差信号値の総和からなる線形相関関数値を一対の画像信号列の一方に対して他方を逐次シフトさせて複数のシフト位置で求める線形相関演算を実施し、この後、複数のシフト位置で求めた線形相関関数値の中から極小値を検出し、前記線形相関演算により求めた線形相関関数値の極小値が得られたシフト位置で前記2乗相関関数値が極小値である場合、前記2乗相関関数値の極小値が得られる2乗関数シフト位置を求め、極小値でなかった場合、前記線形相関関数値の極小値が得られたシフト位置を含む所定数のシフト位置について再度2乗相関演算を実施し、この2乗相関関数値の極小値が得られる2乗関数シフト位置を求める自動焦点検出装置。 11. The automatic focus detection apparatus according to claim 10, wherein the focus detection calculation means further obtains the square correlation function value and comprises a linear correlation function consisting of a sum of difference signal values of one and the other of the pair of image signal sequences. A linear correlation calculation is performed at a plurality of shift positions by sequentially shifting one of a pair of image signal sequences with respect to the other, and then a minimum value is obtained from the linear correlation function values obtained at a plurality of 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 minimum value of the square correlation function value is obtained. If the square 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. Function value Automatic focus detection device for determining the square function shift position where the small value is obtained. 請求項12または13記載の自動焦点検出装置において、前記検出した線形相関関数値の極小値が得られたシフト位置を含む所定数のシフト位置において2乗相関関数値を求める場合の所定数は、前記2次関数内挿演算または線形相関内挿演算に用いる複数のシフト位置の数より多数である自動焦点検出装置。 The automatic focus detection apparatus according to claim 12 or 13, wherein the predetermined number when the square correlation function value is obtained at a predetermined number of shift positions including the shift position at which the detected minimum value of the linear correlation function value is obtained is: An automatic focus detection apparatus having a larger number than a plurality of shift positions used for the quadratic function interpolation calculation or linear correlation interpolation calculation. 請求項12または13記載の自動焦点検出装置において、前記焦点検出演算手段はさらに、前記2乗相関関数値を求めた後、前記2乗相関関数値の極小値を検出し、該検出した2乗相関関数値の極小値を含む所定数の2乗相関関数値を用いて2次関数内挿演算を実施し、2乗相関関数値の真の極小値が得られるシフト位置を求める自動焦点検出装置。 14. The automatic focus detection apparatus according to claim 12, wherein the focus detection calculation means further detects a minimum value of the square correlation function value after obtaining the square correlation function value, and detects the detected square. Automatic focus detection apparatus for performing a quadratic function interpolation operation using a predetermined number of square correlation function values including the minimum value of the correlation function value to obtain a shift position at which a true minimum value of the square correlation function value is obtained. . 請求項12または13記載の自動焦点検出装置において、前記焦点検出演算手段はさらに、前記2乗相関関数値を求めた後、前記2乗相関演算により求めた2乗相関関数値の極小値を検出できた場合、検出した2乗相関関数値の極小値を含む所定数の2乗相関関数値を用いて2次関数内挿演算を実施して2乗相関関数値の真の極小値が得られるシフト位置を求め、2乗相関関数値の極小値を検出できなかった場合、前記線形相関関数値の極小値を含む所定数の線形相関関数値を用いて線形内挿演算を実施し、線形相関関数値の真の極小値が得られるシフト位置を求める自動焦点検出装置。 14. The automatic focus detection apparatus according to claim 12, wherein the focus detection calculation means further detects a minimum value of the square correlation function value obtained by the square correlation calculation after obtaining the square correlation function value. If it is possible, a true minimum value of the square correlation function value is obtained by performing a quadratic function interpolation using a predetermined number of square correlation function values including the detected minimum value of the square correlation function value. When the shift position is obtained and 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 linear correlation is performed. An automatic focus detection device for obtaining a shift position at which a true minimum value of a function value can be obtained.
JP2013120012A 2013-06-06 2013-06-06 Automatic focus detection method and automatic focus detection device Active JP6221362B2 (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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