JP2014164258A - Focus detection device and amount of image deviation detection device - Google Patents

Focus detection device and amount of image deviation detection device Download PDF

Info

Publication number
JP2014164258A
JP2014164258A JP2013037614A JP2013037614A JP2014164258A JP 2014164258 A JP2014164258 A JP 2014164258A JP 2013037614 A JP2013037614 A JP 2013037614A JP 2013037614 A JP2013037614 A JP 2013037614A JP 2014164258 A JP2014164258 A JP 2014164258A
Authority
JP
Japan
Prior art keywords
image
contrast
pair
shift amount
focus detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2013037614A
Other languages
Japanese (ja)
Inventor
Yosuke Kusaka
洋介 日下
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.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2013037614A priority Critical patent/JP2014164258A/en
Priority to CN201810394107.7A priority patent/CN108401114A/en
Priority to CN201810393667.0A priority patent/CN108401113A/en
Priority to PCT/JP2013/062718 priority patent/WO2013168658A1/en
Priority to EP13786973.1A priority patent/EP2848974B1/en
Priority to US14/398,545 priority patent/US9497374B2/en
Priority to CN201380024280.3A priority patent/CN104285173B/en
Publication of JP2014164258A publication Critical patent/JP2014164258A/en
Priority to IN10373DEN2014 priority patent/IN2014DN10373A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a highly accurate focus detection device.SOLUTION: The focus detection device comprises: an image sensor; image synthesizing means for generating a synthesized image signal string by mutually adding and synthesizing a pair of relatively shifted image signal strings; contrast extraction means for generating a contrast signal string by extracting a plurality of contrast components from the synthesized image signal string; contrast evaluation means for calculating a contrast evaluation value of the synthesized image signal string on the basis of a non-linear contrast signal string having the contrast signal string converted; image deviation amount detection means for detecting the amount of a shift corresponding to an extremal value in a plurality of contrast evaluation values as the amount of an image deviation; and defocus amount calculation means for calculating the amount of a defocus of an optical system.

Description

本発明は瞳分割型位相差検出方式の焦点検出装置および像ズレ量検出装置に関する。   The present invention relates to a pupil division type phase difference detection type focus detection device and an image shift amount detection device.

いわゆる瞳分割型位相差検出方式の焦点検出装置が知られている。(例えば、特許文献1参照)。その焦点検出装置においては、光学系の射出瞳を通る一対の焦点検出光束が形成する一対の像に応じた一対の像信号を生成する。該一対の像信号を相対的にシフトして周知の相関演算を施すことにより、該相対的にシフトした一対の像信号パターンの一致度を表す相関値を算出する。該相関値に基づき相対的にシフトした一対の像信号パターンの一致度が最大となるシフト量を一対の被写体像の相対的な像ズレ量として検出する。それとともに、該像ズレ量に応じて光学系の焦点調節状態を検出する。光学系の焦点調節状態は、予定焦点面と検出された像面との差、すなわちデフォーカス量で表される。   A focus detection apparatus using a so-called pupil division type phase difference detection method is known. (For example, refer to Patent Document 1). In the focus detection apparatus, a pair of image signals corresponding to a pair of images formed by a pair of focus detection light fluxes passing through the exit pupil of the optical system is generated. A correlation value representing the degree of coincidence between the pair of relatively shifted image signal patterns is calculated by performing a known correlation operation by relatively shifting the pair of image signals. A shift amount that maximizes the degree of coincidence between the pair of image signal patterns that are relatively shifted based on the correlation value is detected as a relative image shift amount between the pair of subject images. At the same time, the focus adjustment state of the optical system is detected according to the image shift amount. The focus adjustment state of the optical system is represented by the difference between the planned focal plane and the detected image plane, that is, the defocus amount.

特開2007−233032号公報JP 2007-233302 A

上記従来の瞳分割型位相差検出方式の焦点検出装置においては、一対の像パターンの一致度に基づいて像ズレ量を検出している。そのため、光学系の収差などの影響により一対の像パターンの同一性、すなわち像の形成位置以外の像波形(像パターン)の同一性が低下した場合には像ズレ検出誤差が生じ、結果的に焦点検出精度が低下するという問題があった。   In the conventional focus detection device of the pupil division type phase difference detection method, the image shift amount is detected based on the matching degree of a pair of image patterns. Therefore, when the identity of a pair of image patterns, that is, the identity of an image waveform (image pattern) other than the image formation position is reduced due to the aberration of the optical system, an image shift detection error occurs, resulting in There was a problem that the focus detection accuracy was lowered.

(1)請求項1に記載の焦点検出装置は、光学系の射出瞳の一対の領域を通過する光束がそれぞれ形成する像を光電変換し、一対の像信号列を生成するイメージセンサと、複数のシフト量に対応して相対的にシフトされた一対の像信号列を互いに加算合成することによって、複数のシフト量の各シフト量に対応する複数の合成像信号からなる合成像信号列を生成する像合成手段と、複数の合成像信号に対する線形結合演算を通じて合成像信号列から複数のコントラスト成分を抽出することによって、各シフト量に対応する複数のコントラスト成分からなるコントラスト信号列を生成するコントラスト抽出手段と、複数のコントラスト成分を非線形関数に基づいて非線形変換することによりコントラスト信号列が変換された非線形コントラスト信号列に基づいて、合成像信号列のコントラスト評価値を、各シフト量に対応して算出するコントラスト評価手段と、コントラスト評価値が各シフト量に対応して算出されることによって得られる複数のコントラスト評価値の中の極値に対応するシフト量を、像の相対的な像ズレ量として検出する像ズレ量検出手段と、像ズレ量に基づき、光学系のデフォーカス量を算出するデフォーカス量算出手段とを備えることを特徴とする。
(2)請求項8に記載の像ズレ量検出装置は、一対の像を所定の空間ピッチで離散的にサンプリングして得られる一対の像信号列を生成する像信号列生成手段と、複数のシフト量に対応して相対的にシフトされた一対の像信号列を互いに加算合成することによって、複数のシフト量の各シフト量に対応する複数の合成像信号からなる合成像信号列を生成する像合成手段と、複数の合成像信号に対する線形結合演算を通じて合成像信号列から複数のコントラスト成分を抽出することによって、各シフト量に対応する複数のコントラスト成分からなるコントラスト信号列を生成するコントラスト抽出手段と、複数のコントラスト成分を非線形関数に基づいて非線形変換することによりコントラスト信号列が変換された非線形コントラスト信号列に基づいて、合成像信号列のコントラスト評価値を、各シフト量に対応して算出するコントラスト評価手段と、コントラスト評価値が各シフト量に対応して算出されることによって得られる複数のコントラスト評価値の中の極値に対応するシフト量を、一対の像の相対的な像ズレ量として検出する像ズレ量検出手段と備えることを特徴とする。
(1) A focus detection apparatus according to a first aspect of the present invention includes an image sensor that photoelectrically converts an image formed by each of light beams that pass through a pair of regions of an exit pupil of an optical system, and generates a pair of image signal sequences; A composite image signal sequence composed of a plurality of composite image signals corresponding to each shift amount of a plurality of shift amounts is generated by adding and synthesizing a pair of image signal sequences that are relatively shifted corresponding to each shift amount. And generating a contrast signal sequence composed of a plurality of contrast components corresponding to each shift amount by extracting a plurality of contrast components from the composite image signal sequence through a linear combination operation on the plurality of composite image signals. Extraction means and nonlinear contrast in which a contrast signal sequence is converted by nonlinear conversion of multiple contrast components based on a nonlinear function A contrast evaluation means for calculating a contrast evaluation value of the composite image signal sequence corresponding to each shift amount based on the signal sequence; and a plurality of contrast evaluation values obtained by calculating the contrast evaluation value corresponding to each shift amount Image shift amount detection means for detecting the shift amount corresponding to the extreme value in the contrast evaluation value as a relative image shift amount of the image, and defocus for calculating the defocus amount of the optical system based on the image shift amount And a quantity calculating means.
(2) An image shift amount detection device according to an eighth aspect of the present invention includes an image signal sequence generation unit that generates a pair of image signal sequences obtained by discretely sampling a pair of images at a predetermined spatial pitch, A pair of image signal sequences that are relatively shifted in accordance with the shift amount are added together to generate a composite image signal sequence composed of a plurality of composite image signals corresponding to the shift amounts of the plurality of shift amounts. Contrast extraction that generates a contrast signal sequence composed of a plurality of contrast components corresponding to each shift amount by extracting a plurality of contrast components from the combined image signal sequence through linear combination operation on the plurality of combined image signals with an image combining means And a non-linear contrast signal sequence in which the contrast signal sequence is converted by non-linear conversion of a plurality of contrast components based on a non-linear function. Accordingly, contrast evaluation means for calculating the contrast evaluation value of the composite image signal sequence corresponding to each shift amount, and a plurality of contrast evaluation values obtained by calculating the contrast evaluation value corresponding to each shift amount And an image shift amount detecting means for detecting a shift amount corresponding to the extreme value of the image as a relative image shift amount of the pair of images.

本発明によれば、高精度な焦点検出装置を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, a highly accurate focus detection apparatus can be provided.

デジタルカメラの構成を示す横断面図である。It is a cross-sectional view which shows the structure of a digital camera. 撮影画面上における焦点検出位置を示す図である。It is a figure which shows the focus detection position on an imaging | photography screen. 撮像素子の詳細な構成を示す正面図である。It is a front view which shows the detailed structure of an image pick-up element. 撮像画素が受光する撮影光束の様子を説明するための図である。It is a figure for demonstrating the mode of the imaging light beam which an imaging pixel receives. 焦点検出画素が受光する焦点検出光束の様子を説明するための図である。It is a figure for demonstrating the mode of the focus detection light beam which a focus detection pixel receives. デジタルカメラのボディ制御装置による動作を示すフローチャートである。It is a flowchart which shows the operation | movement by the body control apparatus of a digital camera. 一対の像信号列に対するコントラスト評価に基づく像ズレ検出演算処理を詳述するフローチャートである。It is a flowchart detailing an image shift detection calculation process based on contrast evaluation for a pair of image signal sequences. 撮影光束と一対の焦点検出光束とが予定焦点面近傍でどのように収束するかを模式的に示した図である。It is the figure which showed typically how an imaging light beam and a pair of focus detection light beams converge in the vicinity of a planned focal plane. 撮影光束が予定焦点面上に形成する点像の点像分布(点像分布関数)の例を示す図である。It is a figure which shows the example of the point image distribution (point image distribution function) of the point image which an imaging light beam forms on a plan focal plane. 一対の焦点検出光束が予定焦点面上に形成するの点像の一対の点像分布(点像分布関数)の例を示す図である。It is a figure which shows the example of a pair of point image distribution (point image distribution function) of the point image which a pair of focus detection light beam forms on a plan focal plane. 撮影光学系が無収差の場合において、白黒エッジの被写体を一対の焦点検出光束で最良像面に形成した時の被写体像を示す図である。FIG. 6 is a diagram illustrating a subject image when a monochrome edge subject is formed on the best image plane with a pair of focus detection light beams when the photographing optical system has no aberration. 収差の大きな撮影光学系を用いた場合に、一対の焦点検出光束により最良像面に形成される被写体像を示す図である。It is a figure which shows the to-be-photographed image formed in the best image surface by a pair of focus detection light beam when the imaging optical system with a big aberration is used. 像ズレ量だけ一対の点像分布を相対的に偏位させて重ね合わせた図である。FIG. 6 is a diagram in which a pair of point image distributions are relatively displaced and overlapped by an image shift amount. コントラスト評価に基づく像ズレ量検出の検出原理を説明するための図である。It is a figure for demonstrating the detection principle of the image shift amount detection based on contrast evaluation. 焦点検出画素ピッチに基づくサンプリング位置と合成像信号強度(合成像信号列)との関係を表す図である。It is a figure showing the relationship between the sampling position based on a focus detection pixel pitch, and a composite image signal intensity | strength (composite image signal sequence). 一対の像として段差C1のステップ状パターンの場合の一対の像信号列およびそれらの合成像信号列の像信号強度を示した図である。It is the figure which showed the image signal intensity | strength of a pair of image signal sequence in the case of the step-like pattern of level | step difference C1 as a pair of images, and those synthetic | combination image signal sequences. 一対の像として段差C1のステップ状パターンの場合の一対の像信号列およびそれらの合成像信号列の像信号強度を示した図である。It is the figure which showed the image signal intensity | strength of a pair of image signal sequence in the case of the step-like pattern of level | step difference C1 as a pair of images, and those synthetic | combination image signal sequences. シフト量kに対するコントラスト評価値C(k)を示す図である。It is a figure which shows contrast evaluation value C (k) with respect to the shift amount k. シフト量Gの内挿方法(3点内挿)を説明する図である。It is a figure explaining the interpolation method (three-point interpolation) of the shift amount G. 非線形関数H(x)の例を示す図である。It is a figure which shows the example of nonlinear function H (x). 非線形関数H(x)の例を示す図である。It is a figure which shows the example of nonlinear function H (x). 非線形関数H(x)の例を示す図である。It is a figure which shows the example of nonlinear function H (x). 非線形関数H(x)の例を示す図である。It is a figure which shows the example of nonlinear function H (x). 非線形関数H(x)の例を示す図である。It is a figure which shows the example of nonlinear function H (x). 非線形関数H(x)の例を示す図である。It is a figure which shows the example of nonlinear function H (x). 非線形関数H(x)の例を示す図である。It is a figure which shows the example of nonlinear function H (x). 非線形関数H(x)の例を示す図である。It is a figure which shows the example of nonlinear function H (x).

本発明の第1の実施の形態における焦点検出装置を含む撮像装置として、レンズ交換式のデジタルカメラを例に挙げて説明する。図1は本実施の形態のデジタルカメラ201の構成を示す横断面図である。本実施の形態のデジタルカメラ201は、交換レンズ202とカメラボディ203とから構成され、交換レンズ202がマウント部204を介してカメラボディ203に装着される。カメラボディ203にはマウント部204を介して種々の撮影光学系を有する交換レンズ202が装着可能である。   The imaging apparatus including the focus detection apparatus according to the first embodiment of the present invention will be described by taking an interchangeable lens digital camera as an example. FIG. 1 is a cross-sectional view illustrating a configuration of a digital camera 201 according to the present embodiment. A digital camera 201 according to the present embodiment includes an interchangeable lens 202 and a camera body 203, and the interchangeable lens 202 is attached to the camera body 203 via a mount unit 204. An interchangeable lens 202 having various photographing optical systems can be attached to the camera body 203 via a mount unit 204.

交換レンズ202は、レンズ209、ズーミングレンズ208、フォーカシングレンズ210、絞り211、レンズ制御装置206などを有する。レンズ制御装置206は、不図示のマイクロコンピューター、メモリ、レンズ駆動制御回路などから構成される。レンズ制御装置206は、フォーカシングレンズ210の焦点調節および絞り211の開口径調節のための駆動制御、ならびにズーミングレンズ208、フォーカシングレンズ210および絞り211の状態検出などを行う。レンズ制御装置206は、後述するボディ制御装置214との通信によりレンズ情報の送信とカメラ情報(デフォーカス量や絞り値など)の受信とを行う。絞り211は、光量およびボケ量調整のために光軸中心に開口径が可変な開口を形成する。   The interchangeable lens 202 includes a lens 209, a zooming lens 208, a focusing lens 210, a diaphragm 211, a lens control device 206, and the like. The lens control device 206 includes a microcomputer (not shown), a memory, a lens drive control circuit, and the like. The lens control device 206 performs drive control for adjusting the focus of the focusing lens 210 and adjusting the aperture diameter of the aperture 211, and detecting the states of the zooming lens 208, the focusing lens 210, and the aperture 211. The lens control device 206 transmits lens information and receives camera information (defocus amount, aperture value, etc.) through communication with a body control device 214 described later. The aperture 211 forms an aperture having a variable aperture diameter at the center of the optical axis in order to adjust the amount of light and the amount of blur.

カメラボディ203は、撮像素子212、ボディ制御装置214、液晶表示素子駆動回路215、液晶表示素子216、接眼レンズ217、メモリカード219、AD変換装置221などを有している。撮像素子212には、撮像画素が行と列とで規定される二次元状配列にしたがって配置されるとともに、焦点検出位置に対応した部分に焦点検出画素が配置されている。この撮像素子212については詳細を後述する。   The camera body 203 includes an imaging element 212, a body control device 214, a liquid crystal display element driving circuit 215, a liquid crystal display element 216, an eyepiece lens 217, a memory card 219, an AD converter 221 and the like. In the imaging device 212, imaging pixels are arranged according to a two-dimensional array defined by rows and columns, and focus detection pixels are arranged at portions corresponding to the focus detection positions. Details of the image sensor 212 will be described later.

ボディ制御装置214は、マイクロコンピューター、メモリ、ボディ駆動制御回路などから構成される。ボディ制御装置214は、撮像素子212の露光制御と、撮像素子212からの画素信号の読み出しと、焦点検出画素の画素信号に基づく焦点検出演算および交換レンズ202の焦点調節とを繰り返し行うとともに、画像信号の処理、表示および記録、ならびにカメラの動作制御などを行う。また、ボディ制御装置214は、電気接点213を介してレンズ制御装置206と通信を行い、レンズ情報の受信とカメラ情報の送信とを行う。   The body control device 214 includes a microcomputer, a memory, a body drive control circuit, and the like. The body control device 214 repeatedly performs exposure control of the image sensor 212, readout of the pixel signal from the image sensor 212, focus detection calculation based on the pixel signal of the focus detection pixel, and focus adjustment of the interchangeable lens 202, and an image. It performs signal processing, display and recording, and camera operation control. The body control device 214 communicates with the lens control device 206 via the electrical contact 213 to receive lens information and transmit camera information.

液晶表示素子216は電子ビューファインダー(EVF:Electronic View Finder)として機能する。液晶表示素子駆動回路215は撮像素子212から読み出された画像信号に基づきスルー画像を液晶表示素子216に表示し、撮影者は接眼レンズ217を介してスルー画像を観察することができる。メモリカード219は、撮像素子212により撮像された画像信号に基づいて生成される画像データを記憶する画像ストレージである。   The liquid crystal display element 216 functions as an electronic view finder (EVF). The liquid crystal display element driving circuit 215 displays a through image on the liquid crystal display element 216 based on the image signal read from the image sensor 212, and the photographer can observe the through image through the eyepiece 217. The memory card 219 is an image storage that stores image data generated based on an image signal captured by the image sensor 212.

AD変換装置221は、撮像素子212から出力される画素信号をAD変換してボディ制御装置214に送る。撮像素子212がAD変換装置221を内蔵する構成であってもよい。   The AD conversion device 221 performs AD conversion on the pixel signal output from the image sensor 212 and sends it to the body control device 214. The imaging device 212 may have a configuration in which the AD conversion device 221 is incorporated.

交換レンズ202を通過した光束により、撮像素子212の撮像面上に被写体像が形成される。この被写体像は撮像素子212により光電変換され、撮像画素および焦点検出画素の画素信号がボディ制御装置214へ送られる。   A subject image is formed on the imaging surface of the imaging element 212 by the light beam that has passed through the interchangeable lens 202. This subject image is photoelectrically converted by the image sensor 212, and the pixel signals of the imaging pixels and focus detection pixels are sent to the body control device 214.

ボディ制御装置214は、撮像素子212の焦点検出画素からの画素信号(焦点検出信号)に基づいてデフォーカス量を算出し、このデフォーカス量をレンズ制御装置206へ送る。また、ボディ制御装置214は、撮像素子212の撮像画素の画素信号(撮像信号)を処理して画像データを生成し、メモリカード219に格納するとともに、撮像素子212から読み出されたスルー画像信号を液晶表示素子駆動回路215へ送り、スルー画像を液晶表示素子216に表示させる。さらに、ボディ制御装置214は、レンズ制御装置206へ絞り制御情報を送って絞り211の開口制御を行う。   The body control device 214 calculates the defocus amount based on the pixel signal (focus detection signal) from the focus detection pixel of the image sensor 212 and sends this defocus amount to the lens control device 206. Further, the body control device 214 processes the pixel signal (imaging signal) of the imaging pixel of the imaging element 212 to generate image data, stores the image data in the memory card 219, and reads the through image signal read from the imaging element 212. Is sent to the liquid crystal display element driving circuit 215, and a through image is displayed on the liquid crystal display element 216. Further, the body control device 214 sends aperture control information to the lens control device 206 to control the aperture of the aperture 211.

レンズ制御装置206は、フォーカシング状態、ズーミング状態、絞り設定状態、絞り開放F値などに応じてレンズ情報を更新する。具体的には、ズーミングレンズ208とフォーカシングレンズ210の位置と絞り211の絞り値とを検出し、これらのレンズ位置と絞り値とに応じてレンズ情報を演算したり、あるいは予め用意されたルックアップテーブルからレンズ位置と絞り値とに応じたレンズ情報を選択する。   The lens control device 206 updates the lens information according to the focusing state, zooming state, aperture setting state, aperture opening F value, and the like. Specifically, the positions of the zooming lens 208 and the focusing lens 210 and the aperture value of the aperture 211 are detected, and lens information is calculated according to these lens positions and aperture values, or a lookup prepared in advance. Lens information corresponding to the lens position and aperture value is selected from the table.

レンズ制御装置206は、受信したデフォーカス量に基づいてレンズ駆動量を算出し、レンズ駆動量に応じてフォーカシングレンズ210を合焦位置へ駆動する。また、レンズ制御装置206は受信した絞り値に応じて絞り211を駆動する。   The lens control device 206 calculates a lens driving amount based on the received defocus amount, and drives the focusing lens 210 to the in-focus position according to the lens driving amount. In addition, the lens control device 206 drives the diaphragm 211 in accordance with the received diaphragm value.

図2は、撮影画面上における焦点検出位置を示す図であり、後述する撮像素子212上の焦点検出画素列による焦点検出の際に撮影画面上で像をサンプリングする領域(焦点検出エリア、焦点検出位置)の一例を示す。この例では、矩形の撮影画面100上の中央(光軸上)に焦点検出エリア101が配置される。長方形で示す焦点検出エリア101の長手方向(水平方向)に、焦点検出画素が直線的に配列される。   FIG. 2 is a diagram showing a focus detection position on the shooting screen, and an area for sampling an image on the shooting screen (focus detection area, focus detection) when focus detection is performed by a focus detection pixel array on the image sensor 212 described later. An example of (position) is shown. In this example, the focus detection area 101 is arranged at the center (on the optical axis) on the rectangular shooting screen 100. Focus detection pixels are linearly arranged in the longitudinal direction (horizontal direction) of the focus detection area 101 indicated by a rectangle.

図3は撮像素子212の詳細な構成を示す正面図であり、図2において水平方向に配置された焦点検出エリア101の近傍を拡大した画素配列の詳細を示す。撮像素子212には撮像画素310が二次元正方格子状に稠密に配列される。撮像画素310は赤画素(R)、緑画素(G)、青画素(B)からなり、ベイヤー配列の配置規則によって配置されている。図3においては撮像画素310と同一の画素サイズを有する水平方向焦点検出用の焦点検出画素315、316が交互に、本来緑画素と青画素とが連続的に配置されるべき水平方向の直線上に連続して配列される。   FIG. 3 is a front view showing a detailed configuration of the image sensor 212, and shows details of a pixel array in which the vicinity of the focus detection area 101 arranged in the horizontal direction in FIG. 2 is enlarged. Imaging pixels 310 are densely arranged on the imaging element 212 in a two-dimensional square lattice pattern. The imaging pixel 310 includes a red pixel (R), a green pixel (G), and a blue pixel (B), and is arranged according to a Bayer arrangement rule. In FIG. 3, focus detection pixels 315 and 316 for horizontal focus detection having the same pixel size as that of the imaging pixel 310 are alternately arranged on a straight line in the horizontal direction in which green pixels and blue pixels are supposed to be continuously arranged. Are arranged in succession.

撮像画素310ならびに焦点検出画素315および316の各々のマイクロレンズの形状は、元々画素サイズより大きな円形のマイクロレンズから画素サイズに対応した正方形の形状で切り出した形状をしている。   The shape of each microlens of the imaging pixel 310 and the focus detection pixels 315 and 316 is a shape obtained by cutting out a circular microlens originally larger than the pixel size into a square shape corresponding to the pixel size.

撮像画素310は、図3に示すように矩形のマイクロレンズ10、遮光マスクで受光領域を正方形に制限された光電変換部11、および色フィルタから構成される。色フィルタは赤(R)、緑(G)、青(B)の3種類からなり、それぞれの色に対応する分光感度特性を有している。撮像素子212には、各色フィルタを備えた撮像画素310がベイヤー配列されている。   As shown in FIG. 3, the imaging pixel 310 includes a rectangular microlens 10, a photoelectric conversion unit 11 in which a light receiving region is limited to a square by a light shielding mask, and a color filter. The color filters include three types of red (R), green (G), and blue (B), and have spectral sensitivity characteristics corresponding to the respective colors. In the image pickup device 212, image pickup pixels 310 having respective color filters are arranged in a Bayer array.

焦点検出画素315、316には全ての色に対して焦点検出を行うために全ての可視光を透過する白色フィルタが設けられている。その白色フィルタは、緑画素、赤画素および青画素の分光感度特性を加算したような分光感度特性を有し、高い感度を示す光波長領域は緑画素、赤画素および青画素の各々において各色フィルタが高い感度を示す光波長領域を包括している。   The focus detection pixels 315 and 316 are provided with white filters that transmit all visible light in order to perform focus detection for all colors. The white filter has a spectral sensitivity characteristic such that the spectral sensitivity characteristics of the green pixel, the red pixel, and the blue pixel are added, and the light wavelength region exhibiting high sensitivity is each color filter in each of the green pixel, the red pixel, and the blue pixel. Includes a light wavelength region exhibiting high sensitivity.

焦点検出画素315は、図3に示すように矩形のマイクロレンズ10と遮光マスクとで受光領域を正方形の左半分(正方形を垂直線で2等分した場合の左半分)に制限された光電変換部15、および白色フィルタ(不図示)とから構成される。   As shown in FIG. 3, the focus detection pixel 315 is a photoelectric conversion in which a light receiving region is limited to a left half of a square (a left half when a square is divided into two equal parts by a vertical line) using a rectangular microlens 10 and a light shielding mask. And a white filter (not shown).

また、焦点検出画素316は、図3に示すように矩形のマイクロレンズ10と遮光マスクとで受光領域を正方形の右半分(正方形を垂直線で2等分した場合の右半分)に制限された光電変換部16、および白色フィルタ(不図示)とから構成される。   Further, as shown in FIG. 3, the focus detection pixel 316 is limited to the right half of the square (right half when the square is divided into two equal parts by a vertical line) by the rectangular microlens 10 and the light shielding mask. It comprises a photoelectric conversion unit 16 and a white filter (not shown).

焦点検出画素315と焦点検出画素316とをマイクロレンズ10を重ね合わせて表示すると、遮光マスクで受光領域を正方形の半分に制限された光電変換部15および16が水平方向に並んでいる。   When the focus detection pixel 315 and the focus detection pixel 316 are displayed with the microlens 10 superimposed, the photoelectric conversion units 15 and 16 in which the light receiving area is limited to a half of a square by a light shielding mask are arranged in the horizontal direction.

また、上述した正方形の半分に制限された受光領域の部分に正方形を半分にした残りの部分を加えると、撮像画素310の受光領域と同じサイズの正方形となる。   Further, when the remaining portion obtained by halving the square is added to the portion of the light receiving region limited to the half of the square described above, a square having the same size as the light receiving region of the imaging pixel 310 is obtained.

以上のような撮像画素および焦点検出画素の構成においては、一般的な光源のもとでは、緑色の撮像画素の出力レベルと焦点検出画素の出力レベルとがほぼ等しくなり、赤色の撮像画素および青色の撮像画素の出力レベルはこれよりも小さくなる。   In the configuration of the imaging pixel and the focus detection pixel as described above, under a general light source, the output level of the green imaging pixel and the output level of the focus detection pixel are substantially equal, and the red imaging pixel and the blue color are detected. The output level of the image pickup pixel becomes smaller than this.

図4は、図3に示す撮像画素310が受光する撮影光束の様子を説明するための図であって、水平方向に配列した撮像画素配列の断面をとっている。撮像素子212上に配列された全ての撮像画素310の光電変換部11は、光電変換部11に近接して配置された遮光マスクの開口を通過した光束を受光する。遮光マスク開口の形状は、各撮像画素310のマイクロレンズ10により、マイクロレンズ10から測距瞳距離dだけ離間した撮影光学系の射出瞳90上の全撮像画素に共通な領域97に投影される。   FIG. 4 is a diagram for explaining the state of the imaging light beam received by the imaging pixel 310 shown in FIG. 3, and takes a cross section of the imaging pixel array arranged in the horizontal direction. The photoelectric conversion units 11 of all the imaging pixels 310 arranged on the image sensor 212 receive the light flux that has passed through the openings of the light shielding masks arranged close to the photoelectric conversion unit 11. The shape of the light-shielding mask opening is projected by the microlens 10 of each imaging pixel 310 onto a region 97 common to all imaging pixels on the exit pupil 90 of the imaging optical system that is separated from the microlens 10 by the distance measuring pupil distance d. .

従って各撮像画素の光電変換部11は、領域97と各撮像画素のマイクロレンズ10を通過する光束71を受光し、その光束71によって各マイクロレンズ10上に形成される像の強度に対応した信号を出力する。   Therefore, the photoelectric conversion unit 11 of each imaging pixel receives the light beam 71 passing through the region 97 and the microlens 10 of each imaging pixel, and a signal corresponding to the intensity of the image formed on each microlens 10 by the light beam 71. Is output.

図5は、図3に示す焦点検出画素315、316が受光する焦点検出光束の様子を、図4と比較して説明するための図であって、水平方向に配列した焦点検出画素配列の断面をとっている。   FIG. 5 is a view for explaining the state of the focus detection light beam received by the focus detection pixels 315 and 316 shown in FIG. 3 in comparison with FIG. 4, and is a cross-section of the focus detection pixel array arranged in the horizontal direction. Have taken.

撮像素子212上に配列された全ての焦点検出画素315、316の光電変換部15、16は、光電変換部15、16の各々に近接して配置された遮光マスクの開口を通過した光束を受光する。光電変換部15に近接して配置された遮光マスク開口の形状は、各焦点検出画素315のマイクロレンズ10により、マイクロレンズ10から測距瞳距離dだけ離間した射出瞳90上の、焦点検出画素315に全てに共通した領域95に投影される。同じく光電変換部16に近接して配置された遮光マスク開口の形状は、各焦点検出画素316のマイクロレンズ10により、マイクロレンズ10から測距瞳距離dだけ離間した射出瞳90上の、焦点検出画素316に全てに共通した領域96に投影される。一対の領域95、96を測距瞳と呼ぶ。   The photoelectric conversion units 15 and 16 of all the focus detection pixels 315 and 316 arranged on the image sensor 212 receive the light beam that has passed through the opening of the light shielding mask disposed in proximity to each of the photoelectric conversion units 15 and 16. To do. The shape of the light-shielding mask opening arranged close to the photoelectric conversion unit 15 is such that the focus detection pixel on the exit pupil 90 separated from the microlens 10 by the distance measurement pupil distance d by the microlens 10 of each focus detection pixel 315. 315 is projected onto a common area 95. Similarly, the shape of the light-shielding mask opening arranged close to the photoelectric conversion unit 16 is such that the focus detection on the exit pupil 90 separated from the microlens 10 by the distance measurement pupil distance d by the microlens 10 of each focus detection pixel 316. The image is projected onto an area 96 common to all the pixels 316. The pair of regions 95 and 96 is called a distance measuring pupil.

従って各焦点検出画素315の光電変換部15は、測距瞳95と各焦点検出画素315のマイクロレンズ10とを通過する光束75を受光し、その光束75によって各マイクロレンズ10上に形成される像の強度に対応した信号を出力する。また各焦点検出画素316の光電変換部16は、測距瞳96と各焦点検出画素316のマイクロレンズ16とを通過する光束76を受光し、その光束76によって各マイクロレンズ10上に形成される像の強度に対応した信号を出力する。   Accordingly, the photoelectric conversion unit 15 of each focus detection pixel 315 receives the light beam 75 passing through the distance measuring pupil 95 and the microlens 10 of each focus detection pixel 315 and is formed on each microlens 10 by the light beam 75. A signal corresponding to the intensity of the image is output. The photoelectric conversion unit 16 of each focus detection pixel 316 receives a light beam 76 passing through the distance measuring pupil 96 and the microlens 16 of each focus detection pixel 316 and is formed on each microlens 10 by the light beam 76. A signal corresponding to the intensity of the image is output.

一対の焦点検出画素315、316が受光する光束75、76が通過する射出瞳90上の測距瞳95および96を統合した領域は、撮像画素310が受光する光束71が通過する射出瞳90上の領域97と一致し、射出瞳90上において一対の光束75、76は光束71に対して相補的な関係になっている。   A region where the distance measuring pupils 95 and 96 on the exit pupil 90 through which the light beams 75 and 76 received by the pair of focus detection pixels 315 and 316 pass is integrated on the exit pupil 90 through which the light beam 71 received by the imaging pixel 310 passes. The pair of light beams 75 and 76 are complementary to the light beam 71 on the exit pupil 90.

上述の説明においては、遮光マスクにより光電変換部の受光領域が規制されているが、光電変換部自身の形状を遮光マスクの開口形状とすることも可能である。その場合は遮光マスクを排してもよい。   In the above description, the light receiving area of the photoelectric conversion unit is regulated by the light shielding mask, but the shape of the photoelectric conversion unit itself may be the opening shape of the light shielding mask. In that case, the shading mask may be eliminated.

要は光電変換部と測距瞳とはマイクロレンズにより光学的に共役な関係となっていることが重要である。   In short, it is important that the photoelectric conversion unit and the distance measuring pupil have an optically conjugate relationship by the microlens.

また測距瞳の位置(測距瞳距離)は、一般に撮影光学系の射出瞳距離と略同一になるように設定される。複数の交換レンズが装着される場合には、複数の交換レンズの平均的な射出瞳距離に測距瞳距離を設定する。   Further, the position of the distance measuring pupil (the distance measuring pupil distance) is generally set to be substantially the same as the exit pupil distance of the photographing optical system. When a plurality of interchangeable lenses are mounted, the distance measuring pupil distance is set to the average exit pupil distance of the plurality of interchangeable lenses.

上述した一対の焦点検出画素315、316を交互にかつ直線状に多数配置し、各焦点検出画素の光電変換部の出力を測距瞳95および測距瞳96に対応した一対の出力グループにまとめる。これにより、測距瞳95および測距瞳96をそれぞれ通過する一対の光束が水平方向の焦点検出画素配列上に形成する一対の像の強度分布に関する情報(一対の像信号列)が得られる。この情報(一対の像信号列)に対して後述する像ズレ検出演算処理(位相差検出処理)を施すことによって、一対の像の像ズレ量が検出される。さらに、像ズレ量に、一対の測距瞳の重心間隔と測距瞳距離との比例関係に応じた変換係数を用いての変換演算を行うことによって、焦点検出位置における予定結像面と瞳分割型位相差検出方式で検出される結像面との偏差、すなわちデフォーカス量が算出される。   A large number of the pair of focus detection pixels 315 and 316 are arranged alternately and linearly, and the output of the photoelectric conversion unit of each focus detection pixel is collected into a pair of output groups corresponding to the distance measurement pupil 95 and the distance measurement pupil 96. . As a result, information (a pair of image signal sequences) relating to the intensity distribution of the pair of images formed on the horizontal focus detection pixel array by the pair of light beams passing through the distance measuring pupil 95 and the distance measuring pupil 96 is obtained. By applying an image shift detection calculation process (phase difference detection process), which will be described later, to this information (a pair of image signal sequences), an image shift amount of the pair of images is detected. Further, by performing a conversion operation using a conversion coefficient corresponding to the proportional relationship between the distance between the center of gravity of the pair of distance measurement pupils and the distance measurement pupil distance to the image shift amount, the planned imaging plane and pupil at the focus detection position are calculated. The deviation from the image plane detected by the division type phase difference detection method, that is, the defocus amount is calculated.

なお図5においては理解しやすいように一対の測距瞳95、96を明瞭な形状で示すとともに、一対の焦点検出光束75、76をコーン形状で表現し、光軸91に対して垂直な断面で光束を切り取ったとき、該断面上で光線密度は一様であるかのように説明している。しかし、実際には焦点検出画素のマイクロレンズの収差などに応じて一対の測距瞳95、96の外形は不明瞭となる。また、光軸91に対して垂直な断面における一対の焦点検出光束75、76の光線密度は、一様ではなく、焦点検出光学系の光学特性と撮影光学系の光学特性とに応じた分布を示す。   In FIG. 5, for easy understanding, the pair of distance measuring pupils 95 and 96 are shown in a clear shape, and the pair of focus detection light beams 75 and 76 are expressed in a cone shape, and a cross section perpendicular to the optical axis 91. When the light beam is cut out, the light density is explained as if it were uniform on the cross section. However, in practice, the outer shapes of the pair of distance measuring pupils 95 and 96 are unclear depending on the aberration of the micro lens of the focus detection pixel. Further, the light density of the pair of focus detection light beams 75 and 76 in a cross section perpendicular to the optical axis 91 is not uniform, and has a distribution according to the optical characteristics of the focus detection optical system and the optical characteristics of the photographing optical system. Show.

図6は、本実施の形態のデジタルカメラ201のボディ制御装置214による動作を示すフローチャートである。ボディ制御装置214は、ステップS100でデジタルカメラ201の電源がONされるとステップS110から動作を開始する。ステップS110において、絞り変更が必要な場合は、ボディ制御装置214は、レンズ制御装置206に絞り調整指令を送って絞り調整を行わせる。それとともに、ボディ制御装置214は、撮像動作を行って撮像素子212から撮像画素310の信号を読み出し、液晶表示素子216に表示させる。続くステップS120では、ボディ制御装置214は、焦点検出画素列から一対の被写体像に対応した一対の像信号列を読み出す。   FIG. 6 is a flowchart showing an operation performed by the body control device 214 of the digital camera 201 of the present embodiment. The body control device 214 starts operation from step S110 when the power of the digital camera 201 is turned on in step S100. If it is necessary to change the aperture in step S110, the body control device 214 sends an aperture adjustment command to the lens control device 206 to cause the aperture adjustment. At the same time, the body control device 214 performs an imaging operation to read out the signal of the imaging pixel 310 from the imaging element 212 and display it on the liquid crystal display element 216. In subsequent step S120, the body control device 214 reads a pair of image signal sequences corresponding to the pair of subject images from the focus detection pixel sequence.

ステップS130では、ボディ制御装置214は、読み出した一対の像信号列に対し後述するコントラスト評価に基づく像ズレ検出演算処理を行って一対の像信号列の像ズレ量を算出するとともに、該像ズレ量をデフォーカス量に変換し、本処理はステップS140に進む。コントラスト評価に基づく像ズレ検出演算処理とは、一対の像信号列を相対的に像ずらしして加算合成して合成像信号列を生成するとともに、該合成像信号列のコントラストが最大となる像ズレ量を算出する処理である。   In step S <b> 130, the body control device 214 performs an image shift detection calculation process based on contrast evaluation described later on the read pair of image signal sequences to calculate an image shift amount of the pair of image signal sequences, and the image shift. The amount is converted into a defocus amount, and the process proceeds to step S140. The image shift detection calculation processing based on contrast evaluation is an image in which a pair of image signal sequences are relatively shifted and added and synthesized to generate a synthesized image signal sequence and the contrast of the synthesized image signal sequence is maximized. This is a process for calculating the amount of deviation.

ステップS140では、ボディ制御装置214は、撮影光学系の焦点調節状態が合焦状態か否か、すなわち算出されたデフォーカス量の絶対値が、所定値以内であるか否かを判別する。所定値は、実験により、例えば100μmと定められる。ボディ制御装置214が、撮影光学系の焦点調節状態が合焦状態でないと判別した場合、本処理はステップS150へ進む。ステップS150では、ボディ制御装置214は、算出したデフォーカス量をレンズ制御装置206へ送信し、図1に示す交換レンズ202のフォーカシングレンズ210を合焦位置に駆動させる。その後、本処理はステップS110へ戻って上述した動作を繰り返す。   In step S140, the body control device 214 determines whether or not the focus adjustment state of the photographic optical system is an in-focus state, that is, whether or not the calculated absolute value of the defocus amount is within a predetermined value. The predetermined value is determined to be 100 μm, for example, by experiment. When the body control device 214 determines that the focus adjustment state of the photographing optical system is not the in-focus state, the process proceeds to step S150. In step S150, the body control device 214 transmits the calculated defocus amount to the lens control device 206, and drives the focusing lens 210 of the interchangeable lens 202 shown in FIG. 1 to the in-focus position. Thereafter, the process returns to step S110 to repeat the above-described operation.

なお、焦点検出不能な場合も本処理はこのステップS150へ分岐し、ボディ制御装置214は、レンズ制御装置206へスキャン駆動命令を送信し、交換レンズ202のフォーカシングレンズ210を無限遠位置から至近位置までスキャン駆動させる。その後、本処理はステップS110へ戻って上述した動作が繰り返される。   Even when focus detection is impossible, the process branches to step S150, and the body control device 214 transmits a scan drive command to the lens control device 206, and moves the focusing lens 210 of the interchangeable lens 202 from the infinity position to the closest position. Drive to scan. Thereafter, the process returns to step S110 and the above-described operation is repeated.

一方、ステップS140で撮影光学系の焦点調節状態が合焦状態であると判別された場合は、本処理はステップS160へ進む。ステップS160において、ボディ制御装置214は、シャッターボタン(不図示)の操作によりシャッターレリーズがなされたか否かを判別し、なされていないと判別した場合は、本処理はステップS110へ戻って上述した動作が繰り返される。ステップS160において、ボディ制御装置214は、シャッターレリーズがなされたと判別した場合は、ステップS170で、撮像素子212に撮像動作を行わせ、撮像素子212の撮像画素およびすべての焦点検出画素から信号を読み出す。   On the other hand, if it is determined in step S140 that the focus adjustment state of the photographing optical system is the in-focus state, the process proceeds to step S160. In step S160, the body control device 214 determines whether or not a shutter release has been performed by operating a shutter button (not shown). If it is determined that the shutter release has not been performed, the process returns to step S110 and the operation described above. Is repeated. In step S160, if the body control device 214 determines that the shutter release has been performed, in step S170, the body control device 214 causes the imaging device 212 to perform an imaging operation, and reads signals from the imaging pixels of the imaging device 212 and all focus detection pixels. .

ステップS180において、ボディ制御装置214は、焦点検出画素列の各画素位置の撮像信号を焦点検出画素の周囲の撮像画素の信号に基づいて画素補間する。続くステップS190で、ボディ制御装置214は、撮像画素の信号および補間された信号からなる画像データをメモリカード219に保存し、本処理はステップS110へ戻って上述した動作が繰り返される。   In step S180, the body control device 214 performs pixel interpolation on the imaging signal at each pixel position in the focus detection pixel row based on the signals of the imaging pixels around the focus detection pixel. In subsequent step S190, the body control device 214 stores the image data composed of the image pickup pixel signal and the interpolated signal in the memory card 219, and the process returns to step S110 and the above-described operation is repeated.

図6のステップS130における一対の像信号列に対するコントラスト評価に基づく像ズレ検出演算処理(図7)を詳述する前に、従来技術の問題点を説明する。まず、一対の像信号列の一致度に基づいて像ズレ検出を行なう従来の像ズレ検出演算処理について説明する。従来の一対の像信号列の一致度に基づく像ズレ検出演算処理においては、焦点検出画素列(画素数2M)から読み出された一対の像信号列A〜A、B〜Bに対し、下記(1)式のような周知の相関演算(SAD:Sum of Absolute Difference)を行い、一対の像信号列パターンの一致度を表す相関量E(k)を演算する。
E(k)=Σ|A−Bn+k| (1)
Prior to detailed description of the image shift detection calculation process (FIG. 7) based on contrast evaluation for a pair of image signal sequences in step S130 of FIG. 6, problems of the prior art will be described. First, a conventional image shift detection calculation process that performs image shift detection based on the degree of coincidence between a pair of image signal sequences will be described. In the conventional image shift detection calculation processing based on the matching degree of a pair of image signal sequences, a pair of image signal sequences A 1 to A M and B 1 to B M read from the focus detection pixel sequence (number of pixels 2M). On the other hand, a well-known correlation calculation (SAD: Sum of Absolute Difference) as shown in the following equation (1) is performed to calculate a correlation amount E (k) representing the degree of coincidence between a pair of image signal sequence patterns.
E (k) = Σ | A n −B n + k | (1)

(1)式において、Σ演算は変数nについて累積される。変数nの範囲は、像ずらし量kに応じて像信号列A、Bn+kが存在する範囲に限定される。像ずらし量kは整数であり、一対の像信号列の信号ピッチを単位とした相対的シフト量である。(1)式の演算を一対の像信号列を相対的に所定量ずつシフトすることにより、すなわち像ずらし量kを所定範囲で変更することにより、複数のシフト量kに対する相関量E(k)を算出する。(1)式においては一対の像信号列の値は一致度が高いほど相関量E(k)の値は小さくなるので、複数のシフト量kに対して求められた相関量E(k)の最小値を与えるシフト量を像ズレ量とする。なお、一対の像信号列の一致度を検出する相関演算式は(1)式に限定されず、一対の像信号列の一致度を演算するものであれば良い。 In equation (1), the Σ operation is accumulated for variable n. The range of the variable n is limited to a range in which the image signal sequences A n and B n + k exist according to the image shift amount k. The image shift amount k is an integer and is a relative shift amount in units of the signal pitch of the pair of image signal sequences. The amount of correlation E (k) with respect to a plurality of shift amounts k is obtained by shifting the pair of image signal sequences by a predetermined amount relative to the calculation of equation (1), that is, by changing the image shift amount k within a predetermined range. Is calculated. In the expression (1), the value of the pair of image signal sequences has a smaller value of the correlation amount E (k) as the degree of coincidence is higher. Therefore, the correlation amount E (k) obtained with respect to a plurality of shift amounts k. The shift amount giving the minimum value is set as the image shift amount. The correlation calculation expression for detecting the degree of coincidence between the pair of image signal sequences is not limited to the expression (1), and any expression may be used as long as the degree of coincidence between the pair of image signal strings is calculated.

上述した従来の像ズレ検出演算により一対の像信号列の一致度を検出することができるという原理は、以下の考え方に基づく。一対の焦点検出光束が形成する一対の被写体像信号の形状や波形といったパターンは同一である、すなわち一致するという前提が成立するならば、合焦時には一対の像信号列のパターンが位置的にぴったりと重なる。従って一対の焦点検出光束が形成する一対の像信号列のパターンが一致するという前提が崩れれば、それに応じて従来の像ズレ検出演算により算出される像ズレ量に応じて検出される焦点調節状態は誤差を生じることになる。   The principle that the degree of coincidence between a pair of image signal sequences can be detected by the above-described conventional image shift detection calculation is based on the following concept. If the premise that the shape and waveform of the pair of subject image signals formed by the pair of focus detection light beams is the same, that is, if they match, the pattern of the pair of image signal trains is perfectly positioned at the time of focusing. And overlap. Therefore, if the premise that the pattern of the pair of image signal sequences formed by the pair of focus detection light beams is broken, the focus adjustment detected according to the image shift amount calculated by the conventional image shift detection calculation is made accordingly. The condition will cause an error.

図8は、予定焦点面98上に最良像面が形成された場合において、図4および図5にそれぞれ示した射出瞳の領域97を通る撮影光束と射出瞳の一対の領域95、96を通過する一対の焦点検出光束とが、予定焦点面98近傍でどのように収束するかを模式的に示した図である。最良像面は、撮影光束が形成する被写体像や、一対の焦点検出光束が形成する一対の被写体像の、鮮鋭度またはコントラストといった像品質が最高となる結像面である。例えば図8において、光軸91上に点光源があるとすると、点光源に対応して予定焦点面98の光軸91上に点像が形成されることになる。   FIG. 8 shows a case where the best image plane is formed on the planned focal plane 98 and passes through a pair of areas 95 and 96 of the imaging light flux and the exit pupil passing through the exit pupil area 97 shown in FIGS. 4 and 5, respectively. It is the figure which showed typically how a pair of focus detection light beam which converges converges in the plan focal plane 98 vicinity. The best image plane is an imaging plane that has the highest image quality, such as sharpness or contrast, of the subject image formed by the photographing light flux and the pair of subject images formed by the pair of focus detection light fluxes. For example, in FIG. 8, if there is a point light source on the optical axis 91, a point image is formed on the optical axis 91 of the planned focal plane 98 corresponding to the point light source.

理想的な無収差の撮影光学系の場合は、射出瞳の領域97を通る撮影光束が形成する点像も、射出瞳の一対の領域95、96を通過する一対の焦点検出光束が形成する一対の点像も、いずれも予定焦点面98上で空間的に広がりを持たない完全な点となるとともに、射出瞳の一対の領域95、96を通過する一対の焦点検出光束が形成する一対の点像の予定焦点面98上での空間的な位置も一致する。このような無収差の撮影光学系を使用して一般の被写体を撮影する場合には、一対の焦点検出光束により最良像面に形成される一対の被写体像の形状は完全に一致するとともに、該一対の被写体像の位置も一致するので、従来の一対の像信号列の一致度に基づく像ズレ検出演算処理により求められた一対の被写体像の像ズレ量が0の場合に合焦であるということが保証できる。   In the case of an ideal non-aberration imaging optical system, a point image formed by a photographing light beam passing through the exit pupil region 97 is also a pair formed by a pair of focus detection light beams passing through the pair of exit pupil regions 95 and 96. Each of the point images is a complete point that does not spatially spread on the planned focal plane 98, and a pair of points formed by a pair of focus detection light beams that pass through the pair of regions 95 and 96 of the exit pupil. The spatial position of the image on the planned focal plane 98 also coincides. When a general subject is photographed using such an aberration-free photographing optical system, the shape of the pair of subject images formed on the best image plane by the pair of focus detection light beams completely coincides with each other. Since the positions of the pair of subject images also coincide, it is said that the image is in focus when the image displacement amount of the pair of subject images obtained by the image displacement detection calculation process based on the degree of coincidence of the pair of conventional image signal sequences is zero. Can be guaranteed.

しかしながら撮影光学系が光学的な収差を持つ場合には、射出瞳の領域97を通る撮影光束が形成する点像も、射出瞳の一対の領域95、96を通過する一対の焦点検出光束が形成する一対の点像も、いずれも予定焦点面98上で空間的に広がりをもった点像となる。   However, when the photographing optical system has optical aberration, a point image formed by the photographing light flux passing through the exit pupil region 97 is also formed by a pair of focus detection light fluxes passing through the pair of exit pupil regions 95 and 96. Each of the pair of point images is also a point image having a spatial spread on the planned focal plane 98.

図9は、図8に示す状態、すなわち予定焦点面98上に最良像面が形成された状態において、撮影光束が予定焦点面98上に形成する点像の点像分布51(点像分布関数)の例を示しており、中心に大きなピークを持ち周辺部で対称的に裾野を引いている。一方図10は同じ状態、すなわち予定焦点面98上に最良像面が形成された状態において、一対の焦点検出光束が予定焦点面98上に形成する点像の一対の点像分布(点像分布関数)の例を示しており、実線が領域95を通過する焦点検出光束が形成する点像分布55、破線が領域96を通過する焦点検出光束が形成する点像分布56を示している。なお図9、図10において横軸は予定焦点面98における水平方向の位置であり、縦軸は像の強度である。また点像分布51、55、56のピーク位置が像面中心、すなわち光軸91が予定焦点面98と交わる位置である。   FIG. 9 shows the point image distribution 51 (point image distribution function) of the point image formed by the photographing light beam on the planned focal plane 98 in the state shown in FIG. 8, that is, in the state where the best image plane is formed on the planned focal plane 98. ), Which has a large peak at the center and a symmetric bottom at the periphery. On the other hand, FIG. 10 shows a pair of point image distributions (point image distributions) of point images formed by the pair of focus detection light beams on the planned focal plane 98 in the same state, that is, in a state where the best image plane is formed on the planned focal plane 98. The solid line represents the point image distribution 55 formed by the focus detection light beam passing through the region 95, and the broken line represents the point image distribution 56 formed by the focus detection light beam passing through the region 96. 9 and 10, the horizontal axis represents the horizontal position on the planned focal plane 98, and the vertical axis represents the image intensity. The peak positions of the point image distributions 51, 55, and 56 are the center of the image plane, that is, the position at which the optical axis 91 intersects the planned focal plane 98.

点像分布55、56は点像分布51と同様に中心に大きなピークを持ち周辺部で裾野を引いているが、裾野の引き方はともに非対称である。点像分布55の右側の裾野は大きいのに対し、左側の裾野はほとんどない。点像分布56の左側の裾野は大きいのに対し、右側の裾野はほとんどない。また一対の焦点検出光束は撮影光束に対して相補的な関係にあり、一対の焦点検出光束を統合したものが撮影光束になるので、点像分布55と点像分布56とで表される一対の被写体像信号を加算合成したものが点像分布51となる。図9および図10に示すように、点像が光軸上に形成された場合には、点像分布51の形状は左右対称であり、点像分布55と点像分布56とは一方を左右反転した時に形状が一致する。点像が光軸外の画面周辺にある場合には、光軸に対する点像の形成位置、すなわち像高に応じて点像分布51、55、56の形状は図9および図10に示す形状からさらに変形するので、点像分布51の形状は左右対称でなくなり、点像分布55と点像分布56とは一方を左右反転した時にも形状が一致しなくなる。   Similar to the point image distribution 51, the point image distributions 55 and 56 have a large peak at the center and have a base at the periphery, but the bases are both asymmetric. While the right foot of the point image distribution 55 is large, there is almost no left foot. The left foot of the point image distribution 56 is large, while the right foot is scarce. Further, the pair of focus detection light beams has a complementary relationship with the photographic light beam, and a combination of the pair of focus detection light beams becomes a photographic light beam. Therefore, a pair represented by a point image distribution 55 and a point image distribution 56 is used. A point image distribution 51 is obtained by adding and synthesizing the subject image signals. As shown in FIGS. 9 and 10, when the point image is formed on the optical axis, the shape of the point image distribution 51 is left-right symmetric, and one of the point image distribution 55 and the point image distribution 56 is left and right. The shape matches when reversed. When the point image is on the periphery of the screen outside the optical axis, the shape of the point image distributions 51, 55, and 56 depends on the position shown in FIG. 9 and FIG. Further, since the shape of the point image distribution 51 is not symmetrical, the shape of the point image distribution 55 and the point image distribution 56 do not match even when one of the point image distribution 55 and the point image distribution 56 is reversed left and right.

一般に撮影光学系の収差量が小さい場合あるいは良好な場合には、最良像面における点像分布51、55、56の形状において、ピーク部のサイズに比較して裾野部の広がりは小さく、一対の点像分布55、56はほとんど同一の形状となるとともに、一対の点像の位置もほとんど一致する。   In general, when the amount of aberration of the photographic optical system is small or good, in the shape of the point image distributions 51, 55, and 56 on the best image plane, the spread of the skirt portion is small compared to the size of the peak portion, and a pair of The point image distributions 55 and 56 have almost the same shape, and the positions of the pair of point images are almost the same.

ところで一般に収差のある撮影光学系により形成される被写体像の像信号の分布関数は、無収差の場合に形成される被写体像の像信号の分布関数に、収差のある撮影光学系により形成される点像の像信号の分布関数をコンボルーションしたものとなる。   In general, the distribution function of the image signal of the subject image formed by the imaging optical system having aberration is formed by the imaging optical system having aberration in the distribution function of the image signal of the subject image formed when there is no aberration. This is a convolution of the distribution function of the image signal of the point image.

したがって、収差量が少ない場合、あるいは良好な撮影光学系を用いて一般の被写体を撮影する場合には、一対の焦点検出光束により最良像面に形成される一対の被写体像の形状はほとんど一致するとともに、該一対の被写体像の位置も一致する。したがって、一対の被写体像の一致度が最も高い像ズレ量が0の場合に合焦であるという前提に基づいた従来の像ズレ検出演算処理により算出した像ズレ量に応じて焦点検出を行っても大きな誤差を生じない。   Therefore, when the amount of aberration is small, or when a general subject is photographed using a good photographing optical system, the shape of the pair of subject images formed on the best image plane by the pair of focus detection light beams is almost the same. At the same time, the positions of the pair of subject images also coincide. Therefore, the focus detection is performed according to the image shift amount calculated by the conventional image shift detection calculation process based on the premise that the image shift amount with the highest matching degree between the pair of subject images is 0. Does not cause a large error.

しかしながら収差量が大きい撮影光学系を用いて一般の被写体を撮影する場合には、一対の焦点検出光束により最良像面に形成される一対の被写体像の形状が一致しない。したがって、一対の被写体像の一致度が最も高い像ズレ量が0の場合に合焦であるという前提に基づいた従来の像ズレ検出演算処理により算出した焦点検出を行うと大きな誤差を生じてしまう。   However, when photographing a general subject using a photographing optical system having a large amount of aberration, the shape of the pair of subject images formed on the best image plane by the pair of focus detection light beams does not match. Therefore, if the focus detection calculated by the conventional image shift detection calculation process based on the premise that the image shift amount with the highest matching degree between the pair of subject images is 0, a large error occurs. .

図11は、撮影光学系が無収差の場合において、白黒エッジの被写体を一対の焦点検出光束で最良像面に形成した時の被写体像を示しており、図8の領域95を通過する焦点検出光束は被写体像65を形成し、領域96を通過する焦点検出光束は被写体像66を形成する。被写体像65のエッジ部45の位置と被写体像66のエッジ部46の位置とは一致しており、このような場合には一対の被写体像信号の一致度に基づく像ズレ検出演算を用いても、像ズレ量は0と算出される。   FIG. 11 shows a subject image when a black-and-white edge subject is formed on the best image plane with a pair of focus detection light beams when the photographing optical system has no aberration, and the focus detection that passes through the region 95 in FIG. The light beam forms a subject image 65, and the focus detection light beam passing through the region 96 forms a subject image 66. The position of the edge portion 45 of the subject image 65 and the position of the edge portion 46 of the subject image 66 coincide with each other. In such a case, an image shift detection calculation based on the degree of coincidence of a pair of subject image signals may be used. The image shift amount is calculated as 0.

一方図12は図11と同じ白黒エッジの被写体に対し、収差の大きな撮影光学系を用いた場合に、一対の焦点検出光束により最良像面に形成される被写体像を示している。また該撮影光学系を通過した一対の焦点検出光束が最良像面に形成する一対の点像の分布が、例えば図10に示す点像分布関数55、56で表わされたとする。被写体像67は領域95を通過する焦点検出光束により形成されるエッジ像であり、無収差の場合の被写体像65に点像分布関数55をコンボルーションした像となる。被写体像68は領域96を通過する焦点検出光束により形成されるエッジ像であり、無収差の場合の被写体像66に点像分布関数56をコンボルーションした像となる。   On the other hand, FIG. 12 shows a subject image formed on the best image plane by a pair of focus detection light beams when a photographing optical system with large aberration is used for a subject with the same black and white edge as FIG. Further, it is assumed that the distribution of a pair of point images formed on the best image plane by the pair of focus detection light beams that have passed through the photographing optical system is represented by point image distribution functions 55 and 56 shown in FIG. The subject image 67 is an edge image formed by the focus detection light beam passing through the region 95, and is an image obtained by convolving the point image distribution function 55 with the subject image 65 in the case of no aberration. The subject image 68 is an edge image formed by a focus detection light beam passing through the region 96, and is an image obtained by convolving the point image distribution function 56 with the subject image 66 in the case of no aberration.

一対の被写体像67および68はもともと同じ被写体の像であるが、一対の焦点検出光束により形成される一対の点像分布が同一でないことにより、一対の被写体像の形状、すなわち一対の被写体像信号のパターンが互いに大きく異なってきてしまう。例えば被写体像67のエッジ部47の上部41の形状と、被写体像68のエッジ部48の上部42の形状とは大きく異なる。また被写体像67のエッジ部47の下部43の形状と、被写体像68のエッジ部48の下部44の形状とは大きく異なる。最良像面が予定焦点面と一致した状態において、このように互いに形状が異なる一対の被写体像67および68に対して像ズレ検出を行っても検出される像ズレ量は0とならない。例えばこの状態において一対の被写体像信号の一致度に基づく像ズレ検出演算により像ズレ量Δ(Δ≠0)が算出された場合には、該像ズレ量Δに対応する像面は例えば図8の面99となってしまう。   The pair of subject images 67 and 68 are originally the same subject image, but the pair of point image distributions formed by the pair of focus detection light beams are not the same, so that the shape of the pair of subject images, that is, the pair of subject image signals. The patterns are greatly different from each other. For example, the shape of the upper portion 41 of the edge portion 47 of the subject image 67 and the shape of the upper portion 42 of the edge portion 48 of the subject image 68 are greatly different. The shape of the lower portion 43 of the edge portion 47 of the subject image 67 and the shape of the lower portion 44 of the edge portion 48 of the subject image 68 are greatly different. In the state where the best image plane coincides with the planned focal plane, the detected image shift amount does not become zero even when the image shift detection is performed on the pair of subject images 67 and 68 having different shapes. For example, in this state, when the image shift amount Δ (Δ ≠ 0) is calculated by the image shift detection calculation based on the matching degree of the pair of subject image signals, the image plane corresponding to the image shift amount Δ is, for example, FIG. It becomes the surface 99.

このような誤差(像ズレ量Δ)を生ずる原因は、前述したように最良像面において一対の焦点検出光束により形成される一対の点像分布が同一でないことにある。最良像面において図10の点像分布55、56のピーク位置は一致しているが、点像分布55、56に対して一対の被写体像信号パターンの一致度に基づく像ズレ検出演算処理を施して求めた像ズレ量Δは0にはならない。像ズレ量Δだけ点像分布55、56を相対的に偏位させて重ね合わせると図13のようになる。すなわち一対の被写体像信号パターンの一致度に基づく像ズレ検出演算では、図13に示す状態が点像分布55、56の一致度が最も高い状態と判断されてしまうのである。   The cause of such an error (image shift amount Δ) is that the pair of point image distributions formed by the pair of focus detection light beams on the best image plane is not the same as described above. Although the peak positions of the point image distributions 55 and 56 in FIG. 10 coincide with each other on the best image plane, image deviation detection calculation processing based on the degree of coincidence of a pair of subject image signal patterns is performed on the point image distributions 55 and 56. The image shift amount Δ thus obtained does not become zero. When the point image distributions 55 and 56 are relatively displaced by the image shift amount Δ and superimposed, the result is as shown in FIG. That is, in the image shift detection calculation based on the matching degree of the pair of subject image signal patterns, the state shown in FIG. 13 is determined to be the highest matching degree of the point image distributions 55 and 56.

上述したように、一対の被写体像信号パターンの一致度に基づく像ズレ検出演算においては、撮影光学系の収差が大きい場合には一対の被写体像の同一性が崩れるために、像ズレ量の検出に誤差が生じる。   As described above, in the image shift detection calculation based on the degree of coincidence between the pair of subject image signal patterns, since the identity of the pair of subject images is lost when the aberration of the photographing optical system is large, the image shift amount is detected. An error occurs.

このように一対の被写体像信号パターンの同一性が崩れた場合においても、精度の高い像ズレ量の検出が可能となるコントラスト評価(像品質)に基づく像ズレ量検出演算処理について説明する。   An image shift amount detection calculation process based on contrast evaluation (image quality) that enables highly accurate image shift amount detection even when the identity of a pair of subject image signal patterns is lost will be described.

図14はコントラスト評価に基づく像ズレ量検出の検出原理を説明するための図である。図14(d)、14(e)および14(f)は、一対の焦点検出光束により予定焦点面上に形成される一対の点像分布55および56の相対的な位置を変更して重ね合わせて表示している。実線で表された点像分布55は、領域95を通過する焦点検出光束によって形成され、破線で表された点像分布56は、領域96を通過する焦点検出光束によって形成される。図14(a)、14(b)および14(c)は、一対の点像分布を相対的な位置を変更して互いに重ね合わせて加算合成することによって得られる点像分布51a、51b、および51cを示している。図14(a)および14(d)における一対の点像分布の相対的な位置Paと、図14(b)および14(e)における一対の点像分布の相対的な位置Pbと、図14(c)および14(f)における一対の点像分布の相対的な位置Pcとは、互いに異なり、コントラスト評価に基づく像ズレ量検出演算処理では、一対の点像分布の相対的な位置を、例えば位置Pa、Pb、Pcの順に変化させる。すなわち、点像分布51a、51b、および51cは、それぞれ相異なる複数のシフト量kに対応する複数の合成像信号の強度分布である。   FIG. 14 is a diagram for explaining the detection principle of image shift amount detection based on contrast evaluation. 14 (d), 14 (e) and 14 (f) are superimposed by changing the relative positions of the pair of point image distributions 55 and 56 formed on the intended focal plane by the pair of focus detection light beams. Is displayed. A point image distribution 55 represented by a solid line is formed by the focus detection light beam passing through the region 95, and a point image distribution 56 represented by a broken line is formed by the focus detection light beam passing through the region 96. 14 (a), 14 (b) and 14 (c) show point image distributions 51a, 51b obtained by adding and synthesizing a pair of point image distributions by changing their relative positions and overlaying each other. 51c is shown. The relative position Pa of the pair of point image distributions in FIGS. 14 (a) and 14 (d), the relative position Pb of the pair of point image distributions in FIGS. 14 (b) and 14 (e), and FIG. The relative position Pc of the pair of point image distributions in (c) and 14 (f) is different from each other. In the image shift amount detection calculation process based on the contrast evaluation, the relative position of the pair of point image distributions is For example, the positions Pa, Pb, and Pc are changed in this order. That is, the point image distributions 51a, 51b, and 51c are intensity distributions of a plurality of composite image signals corresponding to a plurality of different shift amounts k.

図14(b)および14(e)に示すように、一対の点像分布の相対的な位置Pbにおいて、合成被写体像信号の点像分布51bのピーク値が最高値を示すので、像品質が最も高くなり、最良像面と予定焦点面とが一致した場合の撮影光束による点像分布(図9)に最も近づく。また一対の点像分布の相対的な位置Pbから位置PaまたはPcに離反するに従って合成被写体像信号の点像分布51aおよび51cのピーク値が低いので、像品質が低下する。   As shown in FIGS. 14B and 14E, the peak value of the point image distribution 51b of the composite subject image signal shows the highest value at the relative position Pb of the pair of point image distributions. It becomes the highest and is closest to the point image distribution (FIG. 9) by the photographing light flux when the best image plane coincides with the planned focal plane. Further, as the peak value of the point image distributions 51a and 51c of the composite subject image signal decreases as the distance from the relative position Pb of the pair of point image distributions to the position Pa or Pc increases, the image quality decreases.

すなわち点像の場合は、一対の点像分布の相対的な位置を順次変更しながら合成被写体像を生成するとともに、該合成被写体像の像信号のピーク値が最大となって像品質が最も高くなる相対的な位置を像ズレ量とすることにより、一対の点像分布の同一性が低い場合においても正確な像ズレ量の検出が可能になる。   That is, in the case of a point image, a composite subject image is generated while sequentially changing the relative positions of a pair of point image distributions, and the peak value of the image signal of the composite subject image is maximized, resulting in the highest image quality. By setting the relative position to be the image shift amount, it is possible to accurately detect the image shift amount even when the identity of the pair of point image distributions is low.

このような原理による像ズレ検出の一般的な被写体像への拡張も上記と同様な仕組みで行われる。一対の焦点検出光束により形成される一対の被写体像は無収差の場合の被写体像に上記のような点像分布をコンボルーションされたものとなっているので、一対の被写体像の相対的な位置を順次変更しながら合成像を生成するとともに、該合成像のコントラストが最も良好となる相対的な位置を像ズレ量とすることにより、一般的な被写体像においても正確な像ズレ量の検出が可能になる。   The image shift detection based on such a principle is extended to a general subject image by the same mechanism as described above. Since the pair of subject images formed by the pair of focus detection light beams are obtained by convolution of the point image distribution as described above with the subject image in the case of no aberration, the relative positions of the pair of subject images. By generating a composite image while sequentially changing the image, and setting the relative position where the contrast of the composite image is the best as the image shift amount, an accurate image shift amount can be detected even in a general subject image. It becomes possible.

上述したようにコントラスト評価に基づく像ズレ量検出においては、一対の焦点検出光束は撮影光束に対して相補的な関係にあること、すなわち一対の焦点検出光束を統合すると撮影光束と同等になるということを利用して、一対の焦点検出光束によって形成された一対の被写体像を相対的に変位させながら加算合成することにより、撮影光束によって形成される被写体像と同等な合成被写体像を生成し、該合成被写体像のコントラスト評価値が極値、すなわち最大値または最小値となる変位量を像ズレ量としている。   As described above, in image shift amount detection based on contrast evaluation, the pair of focus detection light beams are in a complementary relationship with the photographing light beam, that is, the pair of focus detection light beams is equivalent to the photographing light beam. By using this, by adding and synthesizing a pair of subject images formed by the pair of focus detection light beams while relatively displacing them, a composite subject image equivalent to the subject image formed by the photographing light beams is generated, The displacement amount at which the contrast evaluation value of the composite subject image is an extreme value, that is, the maximum value or the minimum value is defined as the image shift amount.

コントラスト評価に基づく像ズレ量検出における被写体像のコントラストの評価は、いわゆるコントラスト検出方式の焦点検出と同等な像品質評価を行う点で類似しているが、以下の点で異なる。すなわち、コントラスト検出方式の焦点検出においては、像品質を変化させて像品質のピークを検出するために、撮影光学系を光軸方向に走査駆動する必要があるのに対し、コントラスト評価に基づく像ズレ量検出においては、像品質を変化させるために、撮影光学系を光軸方向に走査駆動する必要は無い。コントラスト評価に基づく像ズレ量検出においては、単に一対の被写体像信号を相対的に変位させるだけで良い。コントラスト評価に基づく像ズレ量検出においては、一対の被写体像信号を相対的に変位させることが、コントラスト検出方式の焦点検出における撮影光学系の光軸方向の走査駆動と同等な役割を果たしており、焦点検出の都度撮影光学系の光軸方向の走査駆動を行う必要がないという効果が有る。   Evaluation of the contrast of the subject image in image shift amount detection based on contrast evaluation is similar in that it performs image quality evaluation equivalent to focus detection by a so-called contrast detection method, but differs in the following points. That is, in contrast detection focus detection, it is necessary to scan the photographic optical system in the direction of the optical axis in order to detect image quality peaks by changing the image quality. In detecting the amount of deviation, it is not necessary to scan the photographic optical system in the optical axis direction in order to change the image quality. In image shift amount detection based on contrast evaluation, it is only necessary to relatively displace a pair of subject image signals. In image shift amount detection based on contrast evaluation, the relative displacement of a pair of subject image signals plays a role equivalent to the scanning drive in the optical axis direction of the imaging optical system in focus detection of the contrast detection method. There is an effect that it is not necessary to perform scanning driving in the optical axis direction of the photographing optical system every time focus detection is performed.

次に、図6のステップS130における一対の像信号列に対するコントラスト評価に基づく像ズレ検出演算処理を図7のフローチャートを用いて具体的に詳述する。   Next, the image shift detection calculation process based on contrast evaluation for the pair of image signal sequences in step S130 of FIG. 6 will be described in detail with reference to the flowchart of FIG.

ステップS200では、焦点検出画素列(画素数2M)から読み出された一対の像信号列A〜A、B〜Bの相対的なシフト量kの初期値をk=−5に設定する。 In step S200, the initial value of the relative shift amount k of the pair of image signal sequences A 1 to A M and B 1 to B M read from the focus detection pixel sequence (number of pixels 2M) is set to k = −5. Set.

ステップS210では、一対の像信号列A〜A、B〜Bを相対的にシフト量kだけシフトする。即ちシフト量kにより像信号列Aの信号Aと像信号列Bの信号BN+kとが対応することになる。 In step S210, the pair of image signal sequences A 1 to A M and B 1 to B M are relatively shifted by the shift amount k. That is, the signal A N of the image signal sequence A and the signal B N + k of the image signal sequence B correspond with the shift amount k.

ステップS220では、相対的にシフト量kだけシフトされた一対の像信号列A〜A、B〜Bを(2)式により加算合成演算して、図15に示すM+1−2|k|個の合成像信号からなる合成像信号列F(n,k)を生成する(n=|k|,|k|+1,・・・,M−1−|k|,M−|k|)。
F(n,k)=A+Bn+k (2)
In step S220, a pair of image signal sequences A 1 to A M and B 1 to B M that are relatively shifted by the shift amount k are added and combined by equation (2), and M + 1−2 | shown in FIG. k | generates a composite image signal sequence F (n, k) composed of composite image signals (n = | k |, | k | +1,..., M-1- | k |, M- | k). |).
F (n, k) = A n + B n + k (2)

図15において、横軸は焦点検出画素ピッチに基づくサンプリング位置、縦軸は合成像信号強度(合成像信号列)を表す。実線1510で示す合成像信号の強度を焦点検出画素ピッチで空間的に離散サンプリングすることによりサンプリング出力して得られた合成像信号列F(n,k)を○印で表している。   In FIG. 15, the horizontal axis represents the sampling position based on the focus detection pixel pitch, and the vertical axis represents the composite image signal intensity (composite image signal sequence). A composite image signal sequence F (n, k) obtained by sampling and outputting by spatially discretely sampling the intensity of the composite image signal indicated by the solid line 1510 at the focus detection pixel pitch is indicated by a circle.

ステップS230では、合成像信号列F(n,k)に対し、線形結合演算である(3)式の1階差分処理を施し、合成像信号列F(n,k)から高周波数のコントラスト成分を抽出する。こうして得られるM−2|k|個のコントラスト成分からなるコントラスト信号列P(n,k)を生成する。
P(n,k)=F(n,k)−F(n−1,k) (3)
In step S230, the first-order difference processing of equation (3), which is a linear combination operation, is performed on the composite image signal sequence F (n, k), and a high-frequency contrast component is generated from the composite image signal sequence F (n, k). To extract. A contrast signal sequence P (n, k) composed of M−2 | k | contrast components thus obtained is generated.
P (n, k) = F (n, k) -F (n-1, k) (3)

ステップS240では、コントラスト信号列P(n,k)に対し(4)式のように非線形関数H(x)である2次関数(2乗関数:y=H(x)=x)により非線形変換を行ない、非線形コントラスト信号列Q(n,k)を生成する。
Q(n,k)=H(P(n,k))=(P(n,k)) (4)
In step S240, the contrast signal sequence P (n, k) is nonlinear by a quadratic function (square function: y = H (x) = x 2 ) that is a nonlinear function H (x) as shown in equation (4). Conversion is performed to generate a non-linear contrast signal sequence Q (n, k).
Q (n, k) = H (P (n, k)) = (P (n, k)) 2 (4)

ここでコントラスト信号列P(n,k)に対し(4)式のような非線形関数による非線形変換を行なって非線形コントラスト信号列Q(n,k)を生成する理由について説明する。   Here, the reason why the non-linear contrast signal sequence Q (n, k) is generated by performing the non-linear conversion by the non-linear function as shown in the equation (4) on the contrast signal sequence P (n, k) will be described.

図16(a)、(b)は一対の像として段差C1のステップ状パターンの場合の一対の像信号列を示したものである。一対の像信号列は相対的にシフト量k1だけシフトされた状態となり、それぞれの像信号列において段差C1の位置が異なっている。図16(c)は図16(a)、(b)の一対の像信号列を加算合成して得られる複数の合成像信号からなる合成像信号列を示したものである。2カ所において段差C1を有するステップ状パターンとなる。もしコントラスト信号列P(n,k)の絶対値を積算して合成像信号列のコントラスト評価値C(k)を算出すると(C(k)=Σ|P(n,k)|)、図16(c)の合成像信号列のコントラスト評価値C(k1)は次のようにして求められる。すなわち、図16(c)の合成像信号列のコントラスト評価値C(k1)は、合成像信号列の段差(1階差分)の絶対値を合成像信号列が存在する区間に亘って積算することにより算出されるので、C(k1)=2×|C1|となる。   FIGS. 16A and 16B show a pair of image signal sequences in the case of a stepped pattern having a step C1 as a pair of images. The pair of image signal strings are relatively shifted by the shift amount k1, and the position of the step C1 is different in each image signal string. FIG. 16C shows a composite image signal sequence composed of a plurality of composite image signals obtained by adding and synthesizing the pair of image signal sequences of FIGS. 16A and 16B. It becomes a step-like pattern having a step C1 at two places. If the contrast evaluation value C (k) of the composite image signal sequence is calculated by integrating the absolute values of the contrast signal sequence P (n, k) (C (k) = Σ | P (n, k) |), The contrast evaluation value C (k1) of the composite image signal sequence of 16 (c) is obtained as follows. That is, the contrast evaluation value C (k1) of the composite image signal sequence in FIG. 16C integrates the absolute value of the step (first-order difference) of the composite image signal sequence over the section where the composite image signal sequence exists. Therefore, C (k1) = 2 × | C1 |.

図17(a)、(b)は図16(a)、(b)と同様に一対の像が段差C1を有するステップ状パターンの場合の一対の像信号列を示したものであり、一対の像信号列は相対的にシフト量k2だけシフトされた状態において、それぞれの像信号列の段差C1の位置が一致している。図17(c)は図17(a)、(b)の一対の像信号列を加算合成した合成像信号列を示したものであり、1カ所において段差C2(=2×C1)を有するステップ状パターンとなる。図17(c)の合成像信号列のコントラスト評価値C(k2)を、合成像信号列の段差の絶対値をそのまま合成像信号列が存在する区間に亘って積算して算出すると、C(k2)=|2×C1|=2×|C1|=C(k1)となる。すなわち図18(a)に示すように、シフト量kに対するコントラスト評価値C(k)はシフト量kに依らず一定となってしまい、いくら一対の像信号列を相対的にシフトしてコントラスト評価値を算出しても、コントラスト評価値のピークやボトムが検出出来ず、従って像ズレ量の検出が出来ないことになってしまう。   17 (a) and 17 (b) show a pair of image signal sequences in the case where the pair of images is a stepped pattern having a step C1 as in FIGS. 16 (a) and 16 (b). In the state where the image signal trains are relatively shifted by the shift amount k2, the positions of the steps C1 of the respective image signal trains coincide with each other. FIG. 17C shows a combined image signal sequence obtained by adding and synthesizing the pair of image signal sequences of FIGS. 17A and 17B, and has a step C2 (= 2 × C1) at one place. Pattern. When the contrast evaluation value C (k2) of the composite image signal sequence in FIG. 17C is calculated by integrating the absolute values of the steps of the composite image signal sequence as they are over the section where the composite image signal sequence exists, C ( k2) = | 2 × C1 | = 2 × | C1 | = C (k1). That is, as shown in FIG. 18A, the contrast evaluation value C (k) with respect to the shift amount k is constant regardless of the shift amount k, and the contrast evaluation is performed by relatively shifting the pair of image signal sequences. Even if the value is calculated, the peak or bottom of the contrast evaluation value cannot be detected, and therefore the amount of image shift cannot be detected.

以上の説明ではコントラスト評価値C(k)を合成像信号列の段差の絶対値を積算して求めるとして説明したが、段差は合成像信号列のコントラスト成分のことであり、実際には(3)式の1階差分演算で算出される。また合成像信号列のコントラスト成分は一般に合成像信号列のN階差分処理(Nは正の整数)で求めることが出来るが、合成像信号列のN階差分処理によりコントラスト成分を抽出した場合においても、該コントラスト成分の絶対値をそのまま積算してコントラスト評価値C(k)を算出する場合には同様な現象が生じる。   In the above description, the contrast evaluation value C (k) has been described as being obtained by integrating the absolute values of the steps of the composite image signal sequence. However, the steps are the contrast components of the composite image signal sequence, and actually (3 ) In the first-order difference calculation of the equation. The contrast component of the composite image signal sequence can generally be obtained by N-th order difference processing (N is a positive integer) of the composite image signal sequence. However, when the contrast component is extracted by N-th order difference processing of the composite image signal sequence. However, a similar phenomenon occurs when the absolute value of the contrast component is integrated as it is to calculate the contrast evaluation value C (k).

このような結果になる数学的な理由は、合成像信号列の加算合成処理は一対の像信号列の1次線形結合(一対の像信号列の加算)となっているとともに、合成像信号列のコントラスト成分を抽出するためのN階差分処理も、合成像信号列の信号列の1次線形結合(各信号に所定係数を乗じて加算する演算)となっているためである。すなわち図16、図17に示したような像パターンに対しては、合成像信号列に対するN階差分処理で抽出したコントラスト成分の絶対値の積算によりコントラスト評価値C(k)を算出した場合には、該コントラスト評価値C(k)が一対の信号列の各々に対するコントラスト評価値を加算したもの(一対の信号列の各々に対するコントラスト評価値を1次線形結合したもの)と等しくなってしまうため、コントラスト評価値C(k)がシフト量kに依らず一定になってしまうのである。   The mathematical reason for such a result is that the addition / synthesis processing of the composite image signal sequence is a linear combination of the pair of image signal sequences (addition of a pair of image signal sequences) and the composite image signal sequence. This is because the Nth-order difference processing for extracting the contrast component is also a linear combination of the signal sequence of the composite image signal sequence (calculation for multiplying each signal by a predetermined coefficient). That is, for the image patterns as shown in FIGS. 16 and 17, when the contrast evaluation value C (k) is calculated by integrating the absolute values of the contrast components extracted by the N-th order difference process on the composite image signal sequence. Since the contrast evaluation value C (k) becomes equal to the sum of the contrast evaluation values for each of the pair of signal sequences (the linear evaluation of the contrast evaluation values for each of the pair of signal sequences). The contrast evaluation value C (k) becomes constant regardless of the shift amount k.

このような問題は、コントラスト成分を積算する前に(4)式のように一度非線形変換することにより解決することができる。すなわち(4)式のようにコントラスト信号列を2乗関数により非線形変換して得られるQ(n,k)を積算してコントラスト評価値C(k)を算出した場合には(C(k)=ΣQ(n,k)=Σ|P(n,k)|)、次のようになる。図17(c)のように一対の像の段差部が一致した時の合成像信号列に対するコントラスト評価値C(k2)=4×C1となり、図16(c)のように一対の像の段差部が一致しない時の合成像信号列に対するコントラスト評価値C(k1)=2×C1より大きくなる。従ってコントラスト評価値C(k)がシフト量kに依らず一定にならず、一対の像の段差部が一致して合成像信号列のコントラストが最も高くなるシフト量においてコントラスト評価値C(k)がピークを示すようになり、該シフト量に基づき像ズレ量の検出が可能になる。 Such a problem can be solved by performing nonlinear conversion once as shown in the equation (4) before integrating the contrast components. That is, when the contrast evaluation value C (k) is calculated by accumulating Q (n, k) obtained by nonlinearly transforming the contrast signal sequence with a square function as shown in equation (4), (C (k) = ΣQ (n, k) = Σ | P (n, k) | 2 ), which is as follows. Contrast evaluation value C (k2) = 4 × C1 2 next to the composite picture signal sequence when the step portion of the pair of image match as in FIG. 17 (c), the pair of images as shown in FIG. 16 (c) greater than the contrast evaluation value C (k1) = 2 × C1 2 for composite image signal sequence when the step portion does not match. Accordingly, the contrast evaluation value C (k) does not become constant regardless of the shift amount k, and the contrast evaluation value C (k) is obtained at the shift amount where the stepped portions of the pair of images coincide and the contrast of the composite image signal sequence becomes the highest. Becomes a peak, and the image shift amount can be detected based on the shift amount.

図16(a)および16(b)に示すような段差C1のステップパターンに対して図16(c)に示す合成像信号列のコントラスト評価値C(k)をコントラスト信号列x=P(n,k)の2乗関数y=xを積算して求める。x=C1のときはy=C1であり、図16(c)に示すように合成像信号列の段差C1は2か所なので、C(k1)=2y=2C1となる。図17(a)および17(b)に示すような段差C1のステップパターンに対して図17(c)に示す合成像信号列のコントラスト評価値C(k)をコントラスト信号列x=P(n,k)の2乗関数y=xを積算して求める。x=2C1のときはy=4C1であり、図17(c)に示すように合成像信号列の段差2C1は1か所なので、C(k2)=y=4C1となる。C(k1)=2y=2C1よりもC(k2)=y=4C1の方が大きいので、合成像信号列が図16(a)、16(b)、17(a)および17(b)のような厳密なステップパターンよりもなだらかに変化する信号パターンの場合は、図18(b)のように、コントラスト評価値C(k)はシフト量k=k2において極値(この場合はピーク)を示す曲線が得られる。 The contrast evaluation value C (k) of the composite image signal sequence shown in FIG. 16C is compared with the contrast signal sequence x = P (n) for the step pattern of the step C1 as shown in FIGS. 16A and 16B. obtained by integrating the square function y = x 2 of k). When the x = C1 is y = C1 2, the composite image signal sequence of the step C1 as shown in FIG. 16 (c) Since two, the C (k1) = 2y = 2C1 2. The contrast evaluation value C (k) of the composite image signal sequence shown in FIG. 17C is compared with the contrast signal sequence x = P (n) for the step pattern of the step C1 as shown in FIGS. 17A and 17B. obtained by integrating the square function y = x 2 of k). When the x = 2C1 is y = 4C1 2, since one point is stepped 2C1 synthetic image signal sequence as shown in FIG. 17 (c), the C (k2) = y = 4C1 2. Since C (k2) = y = 4C1 2 is larger than C (k1) = 2y = 2C1 2 , the composite image signal sequence is shown in FIGS. 16 (a), 16 (b), 17 (a) and 17 (b). ), The contrast evaluation value C (k) is an extreme value (in this case, a peak in the shift amount k = k2, as shown in FIG. 18B). ) Is obtained.

図7の説明に戻り、ステップS250では、(5)式により非線形コントラスト信号列Q(n,k)を構成する各信号を積算してコントラスト評価値C(k)を算出する。(5)式においてΣはnに関する積算を表わす。
C(k)=ΣQ(n,k) (5)
Returning to the description of FIG. 7, in step S250, the signals constituting the non-linear contrast signal sequence Q (n, k) are integrated by equation (5) to calculate the contrast evaluation value C (k). In the equation (5), Σ represents an integration with respect to n.
C (k) = ΣQ (n, k) (5)

ステップS260ではシフト量kが5に達したか否かをチェックし、達していない場合にはシフト量kをインクリメントして更新し、ステップS210に戻り、更新されたシフト量kに対してステップS210〜ステップS250の処理によりコントラスト評価値C(k)を算出する。   In step S260, it is checked whether or not the shift amount k has reached 5. If not, the shift amount k is incremented and updated. The process returns to step S210, and step S210 is performed on the updated shift amount k. The contrast evaluation value C (k) is calculated through the process of step S250.

ステップS260でシフト量kが5となった場合には、シフト量k=―5〜5の各シフト量毎のコントラスト評価値C(k)が全て算出されたことになるので、ステップS280に分岐し、整数単位のシフト量k=―5〜5に対応して離散的に求められたコントラスト評価値C(k)に基づき、連続的なシフト量を仮定した場合のコントラスト評価値が最大となるシフト量G(小数単位)を内挿して求める。   When the shift amount k becomes 5 in step S260, all the contrast evaluation values C (k) for each shift amount of shift amount k = −5 to 5 are calculated, and the process branches to step S280. Then, based on the contrast evaluation value C (k) obtained discretely corresponding to the shift amount k = −5 to 5 in integer units, the contrast evaluation value when the continuous shift amount is assumed is maximized. The shift amount G (decimal unit) is obtained by interpolation.

図19はシフト量Gの内挿方法(3点内挿)を説明する図であって、横軸がシフト量k(―5、―4、・・4、5)であり、縦軸がコントラスト評価値である。また整数のシフト量kに対応するコントラスト評価値C(k)を●で示しており、シフト量k=2においてコントラスト評価値C(2)が最大になるとしている。またシフト量k=2の1つ前のシフト量k=1と1つ後のシフト量k=3のコントラスト評価値をそれぞれC(1)、C(3)とするとともに、C(1)>C(3)となっているとする。シフト量G(小数単位)を内挿するにあたっては、コントラスト評価値C(1)、C(3)を通る直線と、該直線と反対の傾きを持ちコントラスト評価値C(2)を通る直線との交点の座標が連続的なシフト量を仮定した場合の最大のコントラスト評価値C(G)(○で示す)とシフト量Gになると仮定する。一般化するために整数のシフト量kjにおいてコントラスト評価値C(kj)が最大となり、シフト量kj−1、kj+1におけるコントラスト評価値C(kj−1)、C(kj+1)とすると、連続的なシフト量を仮定した場合の最大のコントラスト評価値C(G)が得られるシフト量Gは(6)式から(9)式の3点内挿の手法を用いて求めることができる。
G=kj−D/SLOP (6)
C(G)=C(kj)+|D| (7)
D={C(kj−1)−C(kj+1)}/2 (8)
SLOP=MAX{|C(kj+1)−C(kj)|,|C(kj−1)−C(kj)|} (9)
FIG. 19 is a diagram for explaining an interpolation method (three-point interpolation) of the shift amount G, where the horizontal axis is the shift amount k (−5, −4,..., 4, 5), and the vertical axis is the contrast. It is an evaluation value. Further, the contrast evaluation value C (k) corresponding to the integer shift amount k is indicated by ●, and the contrast evaluation value C (2) is maximized at the shift amount k = 2. Further, the contrast evaluation values of the shift amount k = 1 immediately before the shift amount k = 2 and the shift amount k = 3 immediately after the shift amount k = 2 are C (1) and C (3), respectively, and C (1)> Suppose C (3). When the shift amount G (decimal unit) is interpolated, a straight line passing through the contrast evaluation values C (1) and C (3) and a straight line having a slope opposite to the straight line and passing through the contrast evaluation value C (2) It is assumed that the coordinates of the intersections of the above are the maximum contrast evaluation value C (G) (indicated by ◯) and the shift amount G when a continuous shift amount is assumed. For generalization, the contrast evaluation value C (kj) is maximized at an integer shift amount kj, and the contrast evaluation values C (kj−1) and C (kj + 1) at shift amounts kj−1 and kj + 1 are continuous. The shift amount G with which the maximum contrast evaluation value C (G) when the shift amount is assumed can be obtained using the three-point interpolation method of equations (6) to (9).
G = kj−D / SLOP (6)
C (G) = C (kj) + | D | (7)
D = {C (kj−1) −C (kj + 1)} / 2 (8)
SLOP = MAX {| C (kj + 1) -C (kj) |, | C (kj-1) -C (kj) |} (9)

(6)式で算出されたシフト量Gの信頼性があるかどうかは、(7)式で算出されるコントラスト評価値C(G)が所定閾値を下回ること、および/または(9)式で算出されるSLOPが所定閾値を下回ること等の基準により判定される。図19においてコントラスト評価値のピークが存在しないような場合には焦点検出不能と判定する。   Whether the shift amount G calculated by the equation (6) is reliable depends on whether the contrast evaluation value C (G) calculated by the equation (7) is below a predetermined threshold and / or by the equation (9). The determination is made based on a criterion such that the calculated SLOP falls below a predetermined threshold. In FIG. 19, when no contrast evaluation value peak exists, it is determined that focus detection is impossible.

シフト量Gが算出されるとともに、シフト量Gの信頼性があると判定された場合は、ステップS290において(10)式によりシフト量Gを像ズレ量Sfに換算する。(10)式において、検出ピッチPYは、同一種類の焦点検出画素によるサンプリングピッチ、すなわち撮像画素のピッチの2倍となる。
Sf=PY×G (10)
When the shift amount G is calculated and it is determined that the shift amount G is reliable, the shift amount G is converted into the image shift amount Sf by the equation (10) in step S290. In equation (10), the detection pitch PY is twice the sampling pitch of the same kind of focus detection pixels, that is, the pitch of the imaging pixels.
Sf = PY × G (10)

さらに像ズレ量Sfに所定の変換係数Kdを乗じてデフォーカス量Dfへ変換する。
Df=Kd×Sf (11)
Further, the image shift amount Sf is multiplied by a predetermined conversion coefficient Kd to be converted into a defocus amount Df.
Df = Kd × Sf (11)

(11)式において変換係数Kdは一対の測距瞳95、96の重心間隔と測距瞳距離との比例関係に応じた変換係数であり、光学系の絞りF値に応じて変化する。   In equation (11), the conversion coefficient Kd is a conversion coefficient corresponding to the proportional relationship between the distance between the center of gravity of the pair of distance measurement pupils 95 and 96 and the distance measurement pupil distance, and changes according to the aperture F value of the optical system.

以上がコントラスト評価に基づく像ズレ検出演算処理の詳細である。本実施の形態における焦点検出装置を含むデジタルカメラ201は、撮像素子212と、ボディ制御装置214とを含む。ボディ制御装置214は、ステップS210において一対の像信号列A〜A、B〜Bを相対的にシフトする像シフト処理を行う。ボディ制御装置214は、ステップS220において一対の像信号列A〜A、B〜Bを互いに加算合成することによって合成像信号列F(n,k)を生成する像合成処理を行う。ボディ制御装置214は、ステップS230において合成像信号列F(n,k)から複数のコントラスト成分を抽出することによってコントラスト信号列P(n,k)を生成するコントラスト抽出処理を行う。ボディ制御装置214は、ステップS240においてコントラスト信号列P(n,k)を非線形コントラスト信号列Q(n,k)に変換する非線形変換処理を行う。ボディ制御装置214は、ステップS250において合成像信号列F(n,k)のコントラスト評価値C(k)を算出するコントラスト評価処理を行う。ボディ制御装置214は、ステップS280において複数のコントラスト評価値C(k)の中の極値C(G)に対応するシフト量Gを像ズレ量Sfとして検出する像ズレ量検出処理を行う。ボディ制御装置214は、ステップS290において交換レンズ202のデフォーカス量Dfを算出するデフォーカス量算出処理を行う。 The above is the details of the image shift detection calculation process based on the contrast evaluation. A digital camera 201 including a focus detection device in the present embodiment includes an image sensor 212 and a body control device 214. In step S210, the body control device 214 performs image shift processing for relatively shifting the pair of image signal sequences A 1 to A M and B 1 to B M. In step S220, the body control device 214 performs image composition processing for generating a composite image signal sequence F (n, k) by adding and synthesizing the pair of image signal sequences A 1 to A M and B 1 to B M to each other. . In step S230, the body control device 214 performs a contrast extraction process for generating a contrast signal sequence P (n, k) by extracting a plurality of contrast components from the composite image signal sequence F (n, k). In step S240, the body control device 214 performs nonlinear conversion processing for converting the contrast signal sequence P (n, k) into the nonlinear contrast signal sequence Q (n, k). In step S250, the body control device 214 performs a contrast evaluation process for calculating the contrast evaluation value C (k) of the composite image signal sequence F (n, k). In step S280, the body control device 214 performs image shift amount detection processing for detecting the shift amount G corresponding to the extreme value C (G) among the plurality of contrast evaluation values C (k) as the image shift amount Sf. The body control device 214 performs a defocus amount calculation process for calculating the defocus amount Df of the interchangeable lens 202 in step S290.

このようにコントラスト評価値に基づいて像ズレ量を検出することにより、光学的な収差により一対の像の同一性が崩れた場合においても正確な像ズレ量の検出が可能になるとともに、コントラスト評価値の算出において合成像信号列のコントラスト成分を非線形変換しているため、図16や図17に示すようなステップ状の像パターンに対しても像ズレ量を確実に検出することが可能になる。   By detecting the image shift amount based on the contrast evaluation value in this way, it is possible to detect the image shift amount accurately even when the identity of a pair of images is lost due to optical aberration, and to evaluate the contrast. Since the contrast component of the composite image signal sequence is nonlinearly converted in the value calculation, it is possible to reliably detect the image shift amount even for the stepped image pattern as shown in FIGS. .

上述したデジタルカメラ201において、一対の像信号列A〜A、B〜Bは、一対の被写体像67および68を同一種類の焦点検出画素によるサンプリングピッチである検出ピッチPYで離散的にサンプリングして得られる信号列である。複数のシフト量kは、検出ピッチPY単位の離散的な値である。ボディ制御装置214は、コントラスト評価値C(k)の中で極値を示すコントラスト評価値C(kj)と、コントラスト評価値C(G)に対応するシフト量kj及びシフト量kjに対して検出ピッチPYだけ増減した2つのシフト量kj−1およびkj+1における2つのコントラスト評価値C(kj−1)及びC(kj+1)とに基づき、像ズレ量Sfを検出ピッチPY以下の精度で検出する。これにより、より高精度に像ズレ量の検出が可能になる。 In the digital camera 201 described above, the pair of image signal sequences A 1 to A M and B 1 to B M are discrete from the pair of subject images 67 and 68 at a detection pitch PY that is a sampling pitch by the same kind of focus detection pixels. This is a signal sequence obtained by sampling. The plurality of shift amounts k are discrete values in units of detection pitch PY. The body control device 214 detects the contrast evaluation value C (kj) indicating the extreme value in the contrast evaluation value C (k), and the shift amount kj and the shift amount kj corresponding to the contrast evaluation value C (G). Based on the two contrast evaluation values C (kj−1) and C (kj + 1) at the two shift amounts kj−1 and kj + 1 increased or decreased by the pitch PY, the image shift amount Sf is detected with an accuracy equal to or less than the detection pitch PY. As a result, the amount of image shift can be detected with higher accuracy.

図7のステップS230においては、合成像信号列F(n,k)に対し(3)式の1階差分処理を施しているが、前述したように合成像信号列F(n,k)から高周波数のコントラスト成分を抽出してコントラスト信号列P(n,k)を生成する線形結合演算処理としては正の整数NについてのN階差分演算処理を用いることができる。例えば2階差分処理を用いた場合には(12)式のようになる。
P(n,k)=−F(n−1,k)+2×F(n,k)−F(n+1,k) (12)
In step S230 in FIG. 7, the first-order difference processing of equation (3) is performed on the composite image signal sequence F (n, k). As described above, from the composite image signal sequence F (n, k). As a linear combination calculation process for extracting a high-frequency contrast component and generating a contrast signal sequence P (n, k), an N-th order difference calculation process for a positive integer N can be used. For example, when the second-order difference process is used, the equation (12) is obtained.
P (n, k) = − F (n−1, k) + 2 × F (n, k) −F (n + 1, k) (12)

差分間隔が同一の場合は1階差分処理に比較して2階差分処理のほうが高周波成分を抽出する効率が高くなるので好ましい。   When the difference interval is the same, the second-order difference processing is preferable because the efficiency of extracting high-frequency components is higher than the first-order difference processing.

図7のステップS240における非線形関数H(x)は単純な2乗関数(y=H(x)=x)であるが、現実的には入力xの入力レンジに対し出力yの出力レンジを整合させるほうが便利になる場合(例えばCPUの演算ビット数に制限がある場合)がある。そのような場合には非線形関数H(x)を適宜調整することができる。例えば入力xの入力レンジを0〜100、出力yの出力レンジを0〜100とした場合には(13)式のように非線形関数H(x)を定めることができ、該非線形関数H(x)は図20のグラフで表わされる。
y=H(x)=x/100 (13)
The nonlinear function H (x) in step S240 in FIG. 7 is a simple square function (y = H (x) = x 2 ), but in reality, the output range of the output y is set to the input range of the input x. In some cases, it is more convenient to match (for example, the number of operation bits of the CPU is limited). In such a case, the nonlinear function H (x) can be adjusted as appropriate. For example, when the input range of the input x is 0 to 100 and the output range of the output y is 0 to 100, the nonlinear function H (x) can be determined as shown in the equation (13), and the nonlinear function H (x ) Is represented by the graph of FIG.
y = H (x) = x 2/100 (13)

以下入力xの入力レンジの符号がプラスであり、非線形関数H(x)は出力yの出力レンジの符号がプラスになる関数であるとして説明を行なう。   In the following description, it is assumed that the sign of the input range of the input x is plus and the nonlinear function H (x) is a function in which the sign of the output range of the output y is plus.

非線形関数H(x)は上述の2乗関数に限定されず、種々のバリエーションが考えられる。しかしながら、コントラスト評価の定常性(コントラストが高いときにコントラスト評価値が高くなるあるいは低くなるという特性がコントラスト成分の大小によらず変化しないこと)を確保するために、非線形関数H(x)による非線形変換後のコントラスト成分の大小関係は非線形変換前のコントラスト成分の値に関わらす常に一定となる必要がある。これは非線形関数H(x)の入力xの入力レンジにおける任意の入力xにおける大小関係が、出力yにおいて常に保存または反転保存される非線形関数であることと等しい。すなわち非線形関数H(x)において、任意の入力x1、x2(x1<x2)とした場合には、H(x1)<H(x2)あるいはH(x1)>H(x2)が常に成立し、H(x1)=H(x2)が成立しない。これは非線形関数H(x)が入力xの入力レンジにおいて単調増加関数あるいは単調減少関数であることを意味している。この条件を言い換えると非線形関数H(x)の1次導関数をh(x)すると、1次導関数h(x)は入力xの入力レンジにおいてh(x)>0あるいはh(x)<0となる。すなわち任意のxについてh(x)≠0である。   The nonlinear function H (x) is not limited to the above-mentioned square function, and various variations can be considered. However, in order to ensure the steadiness of the contrast evaluation (the characteristic that the contrast evaluation value increases or decreases when the contrast is high does not change regardless of the size of the contrast component), the nonlinear function H (x) The magnitude relation of the contrast component after conversion needs to be always constant with respect to the value of the contrast component before nonlinear conversion. This is equivalent to the fact that the magnitude relationship at any input x in the input range of the input x of the nonlinear function H (x) is a nonlinear function that is always preserved or inverted in the output y. That is, in the nonlinear function H (x), when arbitrary inputs x1, x2 (x1 <x2) are set, H (x1) <H (x2) or H (x1)> H (x2) always holds. H (x1) = H (x2) does not hold. This means that the nonlinear function H (x) is a monotonically increasing function or a monotonically decreasing function in the input range of the input x. In other words, when the first derivative of the nonlinear function H (x) is h (x), the first derivative h (x) is h (x)> 0 or h (x) <in the input range of the input x. 0. That is, h (x) ≠ 0 for any x.

また同様にコントラスト評価の定常性を確保するために、非線形関数H(x)の1次導関数h(x)に関しても、入力xの入力レンジにおける任意の入力xにおける大小関係が、1次導関数h(x)の値において常に保存または反転保存されることが望ましい。すなわち1次導関数h(x)において、任意の入力x1、x2(x1<x2)とした場合には、h(x1)<h(x2)あるいはh(x1)>h(x2)が常に成立し、h(x1)=h(x2)が成立しない。これは1次導関数h(x)が入力xの入力レンジにおいて単調増加関数あるいは単調減少関数であることを意味している。この条件を言い換えると非線形関数H(x)の2次導関数をr(x)すると、2次導関数r(x)は入力xの入力レンジにおいてr(x)>0あるいはr(x)<0となる。すなわち任意のxについてr(x)≠0である。   Similarly, in order to ensure the continuity of the contrast evaluation, the magnitude relationship at the arbitrary input x in the input range of the input x is also related to the first derivative with respect to the first derivative h (x) of the nonlinear function H (x). It is desirable that the value of the function h (x) is always saved or inverted. That is, in the first derivative h (x), when arbitrary inputs x1 and x2 (x1 <x2), h (x1) <h (x2) or h (x1)> h (x2) is always established. However, h (x1) = h (x2) does not hold. This means that the first derivative h (x) is a monotonically increasing function or a monotonically decreasing function in the input range of the input x. In other words, when the second derivative of the nonlinear function H (x) is r (x), the second derivative r (x) is r (x)> 0 or r (x) <in the input range of the input x. 0. That is, r (x) ≠ 0 for any x.

(13)式の非線形関数H(x)については、1次導関数h(x)=x/50>0(x=0〜100)、2次導関数r(x)=1/50>0(x=0〜100)となる。したがって、非線形関数H(x):単調増加(1次導関数h(x)>0)と1次導関数h(x):単調増加(2次導関数r(x)>0)の条件を満足する。非線形関数H(x):単調増加(1次導関数h(x)>0)と1次導関数h(x):単調増加(2次導関数r(x)>0)の条件を満足する非線形関数H(x)の場合は、コントラスト評価値C(k)のグラフは図18(b)のような合成像信号列のコントラストが最高となるシフト量においてピーク(極値)を有する特性(凸形特性)となる。   For the nonlinear function H (x) in the equation (13), the first derivative h (x) = x / 50> 0 (x = 0 to 100), the second derivative r (x) = 1/50> 0. (X = 0 to 100). Therefore, the conditions of the nonlinear function H (x): monotonically increasing (first derivative h (x)> 0) and the first derivative h (x): monotonically increasing (second derivative r (x)> 0) Satisfied. Nonlinear function H (x): monotonically increasing (first derivative h (x)> 0) and first derivative h (x): monotonically increasing (second derivative r (x)> 0) are satisfied. In the case of the nonlinear function H (x), the graph of the contrast evaluation value C (k) has a characteristic (peak value) having a peak (extreme value) at the shift amount at which the contrast of the composite image signal sequence is maximum as shown in FIG. Convex characteristics).

また非線形関数H(x):単調減少(1次導関数h(x)<0)と1次導関数h(x):単調増加(2次導関数r(x)>0)の条件を満足する非線形関数H(x)の場合は、コントラスト評価値C(k)のグラフは図18(c)のような合成像信号列のコントラストが最高となるシフト量においてボトム(極値)を有する特性(凹形特性)となる。合成像信号列が図16(a)、16(b)、17(a)および17(b)のような段差を有するステップパターンに対して、例えば後述する図25に示す非線形関数(1次導関数h(x)>0かつ2次導関数r(x)<0)による非線形変換を行う場合を例に説明する。ステップパターンの段差の値を30とすると、図16(c)に示すような合成像信号列の段差が2か所ある場合においては、図25によれば、x=30のときのyの値は約55であり、コントラスト評価値C(k1)は、そのyの値を段差の数だけ乗じた値、すなわち2倍した値である約110となる。図17(c)に示すような合成像信号列の段差の値が60である段差が1か所ある場合においては、図25によれば、コントラスト評価値C(k2)は段差の2倍にあたるx=60におけるyの値、すなわち約77となる。C(k1)>C(k2)であるため、コントラスト評価値C(k)のグラフは凹形特性を有する。   Also, the condition of nonlinear function H (x): monotonically decreasing (first derivative h (x) <0) and first derivative h (x): monotonically increasing (second derivative r (x)> 0) is satisfied. In the case of the non-linear function H (x), the graph of the contrast evaluation value C (k) has a bottom (extreme value) in the shift amount at which the contrast of the composite image signal sequence as shown in FIG. (Concave characteristic). For a step pattern in which the composite image signal sequence has steps as shown in FIGS. 16 (a), 16 (b), 17 (a) and 17 (b), for example, a nonlinear function (first-order derivative) shown in FIG. An example in which nonlinear transformation is performed using the function h (x)> 0 and the second derivative r (x) <0) will be described. Assuming that the step pattern step value is 30, in the case where there are two steps in the composite image signal sequence as shown in FIG. 16C, according to FIG. 25, the y value when x = 30. Is about 55, and the contrast evaluation value C (k1) is a value obtained by multiplying the value of y by the number of steps, that is, a value obtained by doubling the value. When there is one step having a step value of 60 in the composite image signal sequence as shown in FIG. 17C, according to FIG. 25, the contrast evaluation value C (k2) is twice the step. The value of y at x = 60, that is, about 77. Since C (k1)> C (k2), the graph of the contrast evaluation value C (k) has a concave characteristic.

非線形関数H(x):単調増加(1次導関数h(x)>0)と1次導関数h(x):単調減少(2次導関数r(x)<0)の条件を満足する非線形関数H(x)の場合、および非線形関数H(x):単調減少(1次導関数h(x)<0)と1次導関数h(x):単調減少(2次導関数r(x)<0)の条件を満足する非線形関数H(x)の場合には、コントラスト評価値C(k)のグラフは図18(c)のような合成像信号列のコントラストが最高となるシフト量においてボトム(極値)を有する特性(凹形特性)となる。上述した条件とコントラスト評価値の特性の関係を下表にまとめて示す。コントラスト評価値C(k)のグラフが凹形の特性を有する場合においても、連続的なシフト量を仮定した場合のコントラスト評価値が最小となるシフト量G(小数単位)を3点内挿の手法で求めることができる。

Figure 2014164258
Nonlinear function H (x): monotonically increasing (first derivative h (x)> 0) and first derivative h (x): monotone decreasing (second derivative r (x) <0) are satisfied. In the case of the non-linear function H (x), and the non-linear function H (x): monotonic decrease (first derivative h (x) <0) and the first derivative h (x): monotonic decrease (second derivative r ( In the case of the nonlinear function H (x) that satisfies the condition x) <0), the graph of the contrast evaluation value C (k) is a shift that maximizes the contrast of the composite image signal sequence as shown in FIG. It becomes a characteristic (concave characteristic) having a bottom (extreme value) in quantity. The following table summarizes the relationship between the above-mentioned conditions and the contrast evaluation value characteristics. Even when the graph of the contrast evaluation value C (k) has a concave characteristic, the shift amount G (decimal unit) that minimizes the contrast evaluation value when a continuous shift amount is assumed is obtained by three-point interpolation. It can be obtained by a technique.
Figure 2014164258

非線形関数H(x):単調増加(1次導関数h(x)>0)および1次導関数h(x):単調増加(2次導関数r(x)>0)の条件を満足する非線形関数H(x)の例としては、(14)式(図21)、(15)式(図22)、(16)式(図23)、(17)式(図24)がある。(15)式におけるEXP()関数はネイピア数eのベキ乗関数、(16)式におけるLOG()関数は10を底とする常用対数である。
y=H(x)=750/(15−x/10)−50 (14)
y=H(x)=100×(EXP(95+x/20)−EXP(95))/EXP(100) (15)
y=H(x)=100−50×LOG(100−99×x/100) (16)
y=H(x)=800×(1−COS(x/200)) (17)
Nonlinear function H (x): monotonically increasing (first derivative h (x)> 0) and first derivative h (x): monotonically increasing (second derivative r (x)> 0) are satisfied. Examples of the nonlinear function H (x) include formula (14) (FIG. 21), formula (15) (FIG. 22), formula (16) (FIG. 23), formula (17) (FIG. 24). The EXP () function in equation (15) is a power function of the Napier number e, and the LOG () function in equation (16) is a common logarithm with base 10.
y = H (x) = 750 / (15-x / 10) -50 (14)
y = H (x) = 100 × (EXP (95 + x / 20) −EXP (95)) / EXP (100) (15)
y = H (x) = 100-50 * LOG (100-99 * x / 100) (16)
y = H (x) = 800 * (1-COS (x / 200)) (17)

非線形関数H(x):単調増加(1次導関数h(x)>0)と1次導関数h(x):単調減少(2次導関数r(x)<0)の条件を満足する非線形関数H(x)の例としては、(18)式(図25)がある。(18)式におけるSQRT()関数はルート(平方根)関数である。
y=H(x)=10×SQRT(x) (18)
Nonlinear function H (x): monotonically increasing (first derivative h (x)> 0) and first derivative h (x): monotone decreasing (second derivative r (x) <0) are satisfied. As an example of the nonlinear function H (x), there is a formula (18) (FIG. 25). The SQRT () function in the equation (18) is a root (square root) function.
y = H (x) = 10 × SQRT (x) (18)

非線形関数H(x):単調減少(1次導関数h(x)<0)と1次導関数h(x):単調増加(2次導関数r(x)>0)の条件を満足する非線形関数H(x)の例としては、(19)式(図26)がある。
y=H(x)=100−10×SQRT(x) (19)
Nonlinear function H (x): monotonically decreasing (first derivative h (x) <0) and first derivative h (x): monotonically increasing (second derivative r (x)> 0) are satisfied. As an example of the nonlinear function H (x), there is an equation (19) (FIG. 26).
y = H (x) = 100−10 × SQRT (x) (19)

非線形関数H(x):単調減少(1次導関数h(x)<0)と1次導関数h(x):単調減少(2次導関数r(x)<0)の条件を満足する非線形関数H(x)の例としては、(20)式(図27)がある。
y=H(x)=100−x/100 (20)
Nonlinear function H (x): monotonic decrease (first derivative h (x) <0) and first derivative h (x): monotonic decrease (second derivative r (x) <0) are satisfied. As an example of the nonlinear function H (x), there is an equation (20) (FIG. 27).
y = H (x) = 100 -x 2/100 (20)

上述した非線形関数およびその一次導関数は、複数のコントラスト成分の絶対値が取り得る値の範囲ではともに単調関数である。したがって、コントラスト評価の定常性を確保することができ、的確に像ズレ量が得られる。   The above-described nonlinear function and its first derivative are both monotone functions within the range of values that can be taken by the absolute values of the plurality of contrast components. Therefore, it is possible to ensure the continuity of the contrast evaluation and to obtain an image shift amount accurately.

図7のステップS210〜ステップS250においては、本発明の本質的内容を理解しやすくするためにコントラスト評価値C(k)を算出する処理を以下のステップに分解して説明した。即ち(i)一対の像信号列A〜A、B〜Bを相対的にシフト量kだけシフトする。(ii)相対的にシフト量kだけシフトされた一対の像信号列A〜A、B〜Bを(2)式により加算合成演算して、合成像信号列F(n,k)を生成する。(iii)合成像信号列F(n,k)に対し(3)式の1階差分処理を施し、合成像信号列F(n,k)から高周波数のコントラスト成分を抽出したコントラスト信号列P(n,k)を生成する。(iv)コントラスト信号列P(n,k)に対し(4)式のように非線形関数H(x)である2次関数(2乗関数:H(x)=x)により非線形変換を行ない、非線形コントラスト信号列Q(n,k)を生成する。(v)非線形コントラスト信号列Q(n,k)を(5)式により積算してコントラスト評価値C(k)を算出する。 In steps S210 to S250 of FIG. 7, the process of calculating the contrast evaluation value C (k) has been described in the following steps in order to facilitate understanding of the essential contents of the present invention. That is, (i) the pair of image signal sequences A 1 to A M and B 1 to B M are relatively shifted by a shift amount k. (Ii) A pair of image signal sequences A 1 to A M and B 1 to B M that are relatively shifted by the shift amount k are added and synthesized by the equation (2) to obtain a synthesized image signal sequence F (n, k ) Is generated. (Iii) Contrast signal sequence P obtained by performing first-order difference processing of equation (3) on composite image signal sequence F (n, k) and extracting high-frequency contrast components from composite image signal sequence F (n, k) (N, k) is generated. (Iv) Non-linear conversion is performed on the contrast signal sequence P (n, k) by a quadratic function (square function: H (x) = x 2 ) that is a non-linear function H (x) as shown in equation (4). , A non-linear contrast signal sequence Q (n, k) is generated. (V) The contrast evaluation value C (k) is calculated by integrating the nonlinear contrast signal sequence Q (n, k) according to the equation (5).

しかしながらコントラスト評価値C(k)を算出する実際の処理においては、演算上の中間的な生成物である合成像信号列F(n,k)、コントラスト信号列P(n,k)、非線形コントラスト信号列Q(n,k)を必ずしも明示的に生成する必要はない。例えば(21)式に示すように、合成像信号列F(n,k)を明示的に生成せずに直接コントラスト信号列P(n,k)を算出することもできる。
P(n,k)=(A+Bn+k)−(An−1+Bn−1+k) (21)
However, in the actual processing for calculating the contrast evaluation value C (k), the composite image signal sequence F (n, k), the contrast signal sequence P (n, k), which are intermediate products in computation, and the nonlinear contrast It is not always necessary to explicitly generate the signal sequence Q (n, k). For example, as shown in the equation (21), the contrast signal sequence P (n, k) can be directly calculated without explicitly generating the composite image signal sequence F (n, k).
P (n, k) = (A n + B n + k ) − (A n−1 + B n−1 + k ) (21)

また例えば(22)式に示すように、コントラスト信号列P(n,k)を明示的に生成せずに直接非線形コントラスト信号列Q(n,k)を算出することもできる。
Q(n,k)=((A+Bn+k)−(An−1+Bn−1+k)) (22)
For example, as shown in the equation (22), the nonlinear contrast signal sequence Q (n, k) can be directly calculated without explicitly generating the contrast signal sequence P (n, k).
Q (n, k) = ((A n + B n + k ) − (A n−1 + B n−1 + k )) 2 (22)

あるいは(23)式に示すように、中間的な信号列を明示的に一切生成せずに一対の像信号列から直接コントラスト評価値C(k)を算出することもできる。
C(k)=Σ((A+Bn+k)−(An−1+Bn−1+k)) (23)
Alternatively, as shown in the equation (23), the contrast evaluation value C (k) can be directly calculated from a pair of image signal sequences without explicitly generating any intermediate signal sequence.
C (k) = Σ ((A n + B n + k ) − (A n−1 + B n−1 + k )) 2 (23)

すなわち本発明において、合成像信号列F(n,k)、コントラスト信号列P(n,k)、非線形コントラスト信号列Q(n,k)を明示的に生成するか否かは本質的なことではない。一対の像信号列を相対的にシフトして加算合成した情報のコントラスト成分を非線形変換して積算することによりコントラスト評価値C(k)を算出するという処理過程が本質的な点なのである。   That is, in the present invention, whether or not to explicitly generate the composite image signal sequence F (n, k), contrast signal sequence P (n, k), and nonlinear contrast signal sequence Q (n, k) is essential. is not. The essential point is the process of calculating the contrast evaluation value C (k) by nonlinearly transforming and integrating the contrast components of the information that is added and synthesized by relatively shifting the pair of image signal sequences.

上述した実施の形態では、一対の焦点検出画素315、316はそれぞれ1つの光電変換部を有し、一対の焦点検出光束75、76を個別に受光しているが、1つの焦点検出画素に一対の光電変換部を設け、該一対の光電変換部が一対の焦点検出光束75、76を個別に受光するような構成に変更することも可能である。   In the above-described embodiment, each of the pair of focus detection pixels 315 and 316 has one photoelectric conversion unit and individually receives the pair of focus detection light beams 75 and 76. It is also possible to change the configuration so that the pair of photoelectric conversion units individually receive the pair of focus detection light beams 75 and 76.

上述した実施の形態では、マイクロレンズを用いた瞳分割位相差検出方式による焦点検出動作を例にとって説明したが、本発明はこのような方式の焦点検出に限定されず、周知の再結像瞳分割位相差検出方式の焦点検出にも適用可能である。   In the embodiment described above, the focus detection operation by the pupil division phase difference detection method using the microlens has been described as an example. However, the present invention is not limited to the focus detection of such a method, and a well-known re-imaging pupil. The present invention can also be applied to focus detection using a divided phase difference detection method.

再結像瞳分割位相差検出方式においては、1次像面上に形成される被写体像を一対のセパレータレンズを用い、一対の測距瞳を通過する一対の焦点検出光束が形成する一対の被写体像として一対のイメージセンサ上に再結像し、該一対のイメージセンサの出力に基づき、上記一対の被写体像の像ズレ量を検出している。従って撮影光学系の光学特性が良好でない場合には、上記一対の被写体像の信号パターン(形状)の同一性が崩れ、一対の被写体像信号の一致度が悪化するという、マイクロレンズを用いた瞳分割位相差検出方式と同様な問題が発生するので、本発明によるコントラスト評価に基づく像ズレ検出演算処理を用いることにより正確な焦点調節を行うことができる。   In the re-imaging pupil division phase difference detection method, a pair of subjects formed by a pair of focus detection light beams that pass through a pair of distance measuring pupils using a pair of separator lenses for a subject image formed on the primary image plane An image is re-imaged on a pair of image sensors, and an image shift amount of the pair of subject images is detected based on outputs of the pair of image sensors. Accordingly, when the optical characteristics of the photographing optical system are not good, the identity of the signal patterns (shapes) of the pair of subject images is lost, and the degree of coincidence of the pair of subject image signals is deteriorated. Since problems similar to those of the divided phase difference detection method occur, accurate focus adjustment can be performed by using the image shift detection calculation processing based on contrast evaluation according to the present invention.

なお、焦点検出装置が適用される撮像装置としては、上述したようなカメラボディ203に交換レンズ202が装着される構成のデジタルカメラ201に限定されない。例えばレンズ一体型のデジタルカメラあるいはビデオカメラにも本発明を適用することができる。さらには、携帯電話などに内蔵される小型カメラモジュール、監視カメラやロボット用の視覚認識装置、車載カメラなどにも適用することができる。   Note that the imaging device to which the focus detection device is applied is not limited to the digital camera 201 having a configuration in which the interchangeable lens 202 is attached to the camera body 203 as described above. For example, the present invention can be applied to a lens-integrated digital camera or video camera. Furthermore, the present invention can be applied to a small camera module built in a mobile phone, a surveillance camera, a visual recognition device for a robot, an in-vehicle camera, and the like.

また本発明はTTL方式で撮影光学系のデフォーカス量を検出するいわゆる瞳分割位相差検出方式の焦点検出装置に限定されることはない。例えば撮影光学系とは別に一対の測距光学系を有するいわゆる外光式の位相差検出の距離測定装置にも適用することが可能である。一対の測距光学系により形成される一対の像を一対のイメージセンサが空間的に所定ピッチで離散的にサンプリングすることによって生成される一対の像信号列に対して本発明を適用することにより、一対の像信号列の像ズレ量を検出し、該像ズレ量に基づき被写体距離を算出することも可能である。このようにすれば一対の測距光学系の収差特性の違いが多少生じている場合においても高精度な像ズレ検出を達成できるので、一対の測距光学系の収差特性を高精度で互いに一致させる必要がなくなり、製造が容易になるとともにコストダウンをはかれる。   The present invention is not limited to a so-called pupil division phase difference detection type focus detection apparatus that detects the defocus amount of the photographing optical system by the TTL method. For example, the present invention can be applied to a so-called external light type phase difference detection distance measuring device having a pair of distance measuring optical systems separately from the photographing optical system. By applying the present invention to a pair of image signal sequences generated by a pair of image sensors spatially and discretely sampling a pair of images formed by a pair of ranging optical systems at a predetermined pitch. It is also possible to detect the image shift amount of the pair of image signal sequences and calculate the subject distance based on the image shift amount. In this way, even when there is a slight difference in aberration characteristics between the pair of distance measuring optical systems, highly accurate image shift detection can be achieved, so the aberration characteristics of the pair of distance measuring optical systems coincide with each other with high precision. This makes it easier to manufacture and lowers costs.

また本発明による一対の像に対する像ズレ検出は、上述の焦点検出や距離測定に限定されることはない。例えば撮影光学系と該撮影光学系により形成された像を空間的に2次元的にサンプリングするイメージセンサを備え、所定フレーム間隔で画像信号列を生成する撮像装置において、本発明による像ズレ検出を異なるフレームの2つの画像信号列(一対の像信号列)に対して2次元的に適用することにより、2つの画像信号列の像ズレ量を検出することができる。該像ズレ量を撮像装置のブレ量として認識することもできるし、フレーム間の被写体像の移動(動きベクトル)として認識することもできる。さらには全く個別に生成された2つの画像信号列(一対の像信号列)にも適用することが可能である。例えば特定のパターンを検出するため画像信号列と、観測された参照画像信号列とを照らしあわせて、参照画像信号列中における特定のパターンの位置や有無を検出するいわゆるテンプレートマッチングにも応用することができる。   Further, the image shift detection for a pair of images according to the present invention is not limited to the above-described focus detection and distance measurement. For example, in an imaging apparatus that includes an imaging optical system and an image sensor that spatially samples an image formed by the imaging optical system and generates an image signal sequence at a predetermined frame interval, image shift detection according to the present invention is performed. By applying two-dimensionally to two image signal sequences (a pair of image signal sequences) in different frames, it is possible to detect the amount of image shift between the two image signal sequences. The image shift amount can be recognized as a shake amount of the imaging apparatus, or can be recognized as a movement (motion vector) of a subject image between frames. Further, the present invention can be applied to two image signal sequences (a pair of image signal sequences) generated completely independently. For example, in order to detect a specific pattern, the image signal sequence is compared with an observed reference image signal sequence, and applied to so-called template matching that detects the position and presence of a specific pattern in the reference image signal sequence. Can do.

このような応用例としての像ズレ量検出装置は、一対の像を所定の空間ピッチで離散的にサンプリングして得られる一対の像信号列を生成するイメージセンサを有する。この像ズレ量検出装置は、複数のシフト量に対応して一対の像信号列を相対的にシフトする像シフト処理部を有する。この像ズレ量検出装置は、像シフト処理部により相対的にシフトされた一対の像信号列を互いに加算合成することによって、複数のシフト量の各シフト量毎に複数の合成像信号からなる合成像信号列を生成する像合成処理部を有する。この像ズレ量検出装置は、複数の合成像信号に対して線形結合演算を行うことにより合成像信号列から複数のコントラスト成分を抽出することによって、前記各シフト量毎に前記複数のコントラスト成分からなるコントラスト信号列を生成するコントラスト抽出処理部を有する。この像ズレ量検出装置は、複数のコントラスト成分を非線形関数に基づいて非線形変換することによりコントラスト信号列を非線形コントラスト信号列に変換する非線形変換処理部を有する。この像ズレ量検出装置は、非線形コントラスト信号列に基づいて、合成像信号列のコントラスト評価値を、各シフト量毎に算出するコントラスト評価処理部を有する。この像ズレ量検出装置は、複数のシフト量に対応して各シフト量毎のコントラスト評価値が算出されることによって得られる複数のコントラスト評価値の中の極値に対応するシフト量を、一対の像の相対的な像ズレ量として検出する像ズレ量検出処理部を有する。これらの構成が含まれるこの像ズレ量検出装置によれば、高精度に像ズレ量を検出することができる。   Such an image shift amount detection device as an application example includes an image sensor that generates a pair of image signal sequences obtained by discretely sampling a pair of images at a predetermined spatial pitch. The image shift amount detection device includes an image shift processing unit that relatively shifts a pair of image signal sequences corresponding to a plurality of shift amounts. The image shift amount detection device adds and synthesizes a pair of image signal sequences that are relatively shifted by the image shift processing unit, thereby synthesizing a plurality of combined image signals for each shift amount. It has an image composition processing part which generates an image signal sequence. The image shift amount detection device extracts a plurality of contrast components from a composite image signal sequence by performing a linear combination operation on a plurality of composite image signals, thereby extracting the plurality of contrast components from the plurality of contrast components for each shift amount. A contrast extraction processing unit for generating a contrast signal sequence. The image shift amount detection device includes a nonlinear conversion processing unit that converts a contrast signal string into a nonlinear contrast signal string by nonlinearly transforming a plurality of contrast components based on a nonlinear function. The image shift amount detection device includes a contrast evaluation processing unit that calculates the contrast evaluation value of the composite image signal sequence for each shift amount based on the nonlinear contrast signal sequence. This image shift amount detection device uses a pair of shift amounts corresponding to extreme values among a plurality of contrast evaluation values obtained by calculating a contrast evaluation value for each shift amount corresponding to a plurality of shift amounts. An image shift amount detection processing unit that detects the relative image shift amount of the first image. According to the image shift amount detection device including these configurations, the image shift amount can be detected with high accuracy.

10 マイクロレンズ、11、15、16 光電変換部、
41 上部、44 下部、45、46、47、48 エッジ部、
51、55、56 点像分布、65、66、67、68 被写体像、
71、75、76 光束、90 射出瞳、91 光軸、95、96 測距瞳、
97 全撮像画素に共通な領域、98 予定焦点面、99 面、
100 撮影画面、101 焦点検出エリア、
201 デジタルカメラ、202 交換レンズ、203 カメラボディ、
204 マウント部、206 レンズ制御装置、208 ズーミングレンズ、
209 レンズ、210 フォーカシングレンズ、211 絞り、212 撮像素子、
214 ボディ制御装置、215 液晶表示素子駆動回路、216 液晶表示素子、
217 接眼レンズ、219 メモリカード、221 AD変換装置、
310 撮像画素、315、316 焦点検出画素、
1510 実線
10 microlens, 11, 15, 16 photoelectric conversion unit,
41 Upper part, 44 Lower part, 45, 46, 47, 48 Edge part,
51, 55, 56 Point image distribution, 65, 66, 67, 68 Subject image,
71, 75, 76 Luminous flux, 90 Exit pupil, 91 Optical axis, 95, 96 Distance pupil,
97 area common to all imaging pixels, 98 planned focal plane, 99 plane,
100 shooting screen, 101 focus detection area,
201 digital camera, 202 interchangeable lens, 203 camera body,
204 mount unit, 206 lens control device, 208 zooming lens,
209 lens, 210 focusing lens, 211 aperture, 212 imaging device,
214 body control device, 215 liquid crystal display element driving circuit, 216 liquid crystal display element,
217 eyepiece, 219 memory card, 221 AD converter,
310 imaging pixels, 315, 316 focus detection pixels,
1510 Solid line

Claims (8)

光学系の射出瞳の一対の領域を通過する光束がそれぞれ形成する像を光電変換し、一対の像信号列を生成するイメージセンサと、
複数のシフト量に対応して相対的にシフトされた前記一対の像信号列を互いに加算合成することによって、前記複数のシフト量の各シフト量に対応する複数の合成像信号からなる合成像信号列を生成する像合成手段と、
前記複数の合成像信号に対する線形結合演算を通じて前記合成像信号列から複数のコントラスト成分を抽出することによって、前記各シフト量に対応する前記複数のコントラスト成分からなるコントラスト信号列を生成するコントラスト抽出手段と、
前記複数のコントラスト成分を非線形関数に基づいて非線形変換することにより前記コントラスト信号列が変換された非線形コントラスト信号列に基づいて、前記合成像信号列のコントラスト評価値を、前記各シフト量に対応して算出するコントラスト評価手段と、
前記コントラスト評価値が前記各シフト量に対応して算出されることによって得られる複数のコントラスト評価値の中の極値に対応するシフト量を、前記像の相対的な像ズレ量として検出する像ズレ量検出手段と、
前記像ズレ量に基づき、前記光学系のデフォーカス量を算出するデフォーカス量算出手段とを備えることを特徴とする焦点検出装置。
An image sensor that photoelectrically converts an image formed by each of light beams passing through a pair of regions of the exit pupil of the optical system, and generates a pair of image signal sequences;
A composite image signal composed of a plurality of composite image signals corresponding to each shift amount of the plurality of shift amounts by adding and synthesizing the pair of image signal sequences relatively shifted corresponding to the plurality of shift amounts. An image composition means for generating a sequence;
Contrast extraction means for generating a contrast signal sequence composed of the plurality of contrast components corresponding to the shift amounts by extracting a plurality of contrast components from the composite image signal sequence through a linear combination operation on the plurality of composite image signals. When,
Based on the nonlinear contrast signal sequence obtained by converting the contrast signal sequence by nonlinearly converting the plurality of contrast components based on a nonlinear function, the contrast evaluation value of the composite image signal sequence corresponds to each shift amount. Contrast evaluation means for calculating
An image in which a shift amount corresponding to an extreme value among a plurality of contrast evaluation values obtained by calculating the contrast evaluation value corresponding to each shift amount is detected as a relative image shift amount of the image. A deviation amount detecting means;
A focus detection apparatus comprising: a defocus amount calculation unit that calculates a defocus amount of the optical system based on the image shift amount.
請求項1に記載の焦点検出装置において、
前記非線形関数は、前記複数のコントラスト成分の絶対値が取り得る値の範囲では単調関数であることを特徴とする焦点検出装置。
The focus detection apparatus according to claim 1,
The focus detection apparatus according to claim 1, wherein the nonlinear function is a monotone function in a range of values that can be taken by absolute values of the plurality of contrast components.
請求項2に記載の焦点検出装置において、
前記非線形関数の一次導関数は、前記複数のコントラスト成分の絶対値が取り得る値の範囲では単調関数であることを特徴とする焦点検出装置。
The focus detection apparatus according to claim 2,
The focus detection apparatus according to claim 1, wherein the first derivative of the nonlinear function is a monotone function in a range of values that can be taken by absolute values of the plurality of contrast components.
請求項3に記載の焦点検出装置において、
前記非線形関数は、2次関数であることを特徴とする焦点検出装置。
The focus detection apparatus according to claim 3,
The focus detection apparatus, wherein the nonlinear function is a quadratic function.
請求項1〜4のいずれか1項に記載の焦点検出装置において、
前記線形結合演算は、正の整数NについてのN階差分演算であることを特徴とする焦点検出装置。
In the focus detection apparatus according to any one of claims 1 to 4,
The focus detection apparatus according to claim 1, wherein the linear combination calculation is an N-th order difference calculation for a positive integer N.
請求項1〜5のいずれか1項に記載の焦点検出装置において、
前記コントラスト評価手段は、前記非線形コントラスト信号列を構成する各信号を積算することにより前記コントラスト評価値を算出することを特徴とする焦点検出装置。
In the focus detection apparatus according to any one of claims 1 to 5,
The focus evaluation apparatus, wherein the contrast evaluation unit calculates the contrast evaluation value by integrating signals constituting the non-linear contrast signal sequence.
請求項1〜5に記載の焦点検出装置において、
前記一対の像信号列は、前記像を所定の空間ピッチで離散的にサンプリングして得られる信号列であり、
前記複数のシフト量は、前記所定の空間ピッチ単位の離散的な値であり、
前記像ズレ量検出手段は、前記複数のコントラスト評価値の中で前記極値を示すコントラスト評価値と、該コントラスト評価値に対応するシフト量及び該シフト量に対して前記所定の空間ピッチだけ増減した2つのシフト量における2つのコントラスト評価値とに基づき、前記像ズレ量を前記所定の空間ピッチ以下の精度で検出することを特徴とする焦点検出装置。
In the focus detection apparatus according to claim 1,
The pair of image signal sequences is a signal sequence obtained by discretely sampling the image at a predetermined spatial pitch,
The plurality of shift amounts are discrete values in the predetermined spatial pitch unit,
The image shift amount detection means includes a contrast evaluation value indicating the extreme value among the plurality of contrast evaluation values, a shift amount corresponding to the contrast evaluation value, and an increase / decrease by the predetermined spatial pitch with respect to the shift amount. A focus detection apparatus that detects the image shift amount with an accuracy equal to or less than the predetermined spatial pitch based on the two contrast evaluation values for the two shift amounts.
一対の像を所定の空間ピッチで離散的にサンプリングして得られる一対の像信号列を生成する像信号列生成手段と、
複数のシフト量に対応して相対的にシフトされた前記一対の像信号列を互いに加算合成することによって、前記複数のシフト量の各シフト量に対応する複数の合成像信号からなる合成像信号列を生成する像合成手段と、
前記複数の合成像信号に対する線形結合演算を通じて前記合成像信号列から複数のコントラスト成分を抽出することによって、前記各シフト量に対応する前記複数のコントラスト成分からなるコントラスト信号列を生成するコントラスト抽出手段と、
前記複数のコントラスト成分を非線形関数に基づいて非線形変換することにより前記コントラスト信号列が変換された非線形コントラスト信号列に基づいて、前記合成像信号列のコントラスト評価値を、前記各シフト量に対応して算出するコントラスト評価手段と、
前記コントラスト評価値が前記各シフト量に対応して算出されることによって得られる複数のコントラスト評価値の中の極値に対応するシフト量を、前記一対の像の相対的な像ズレ量として検出する像ズレ量検出手段とを備えることを特徴とする像ズレ量検出装置。
Image signal sequence generation means for generating a pair of image signal sequences obtained by discretely sampling a pair of images at a predetermined spatial pitch;
A composite image signal composed of a plurality of composite image signals corresponding to each shift amount of the plurality of shift amounts by adding and synthesizing the pair of image signal sequences relatively shifted corresponding to the plurality of shift amounts. An image composition means for generating a sequence;
Contrast extraction means for generating a contrast signal sequence composed of the plurality of contrast components corresponding to the shift amounts by extracting a plurality of contrast components from the composite image signal sequence through a linear combination operation on the plurality of composite image signals. When,
Based on the nonlinear contrast signal sequence obtained by converting the contrast signal sequence by nonlinearly converting the plurality of contrast components based on a nonlinear function, the contrast evaluation value of the composite image signal sequence corresponds to each shift amount. Contrast evaluation means for calculating
A shift amount corresponding to an extreme value among a plurality of contrast evaluation values obtained by calculating the contrast evaluation value corresponding to each shift amount is detected as a relative image shift amount of the pair of images. An image shift amount detecting device comprising: an image shift amount detecting means for performing the operation.
JP2013037614A 2012-05-07 2013-02-27 Focus detection device and amount of image deviation detection device Pending JP2014164258A (en)

Priority Applications (8)

Application Number Priority Date Filing Date Title
JP2013037614A JP2014164258A (en) 2013-02-27 2013-02-27 Focus detection device and amount of image deviation detection device
CN201810394107.7A CN108401114A (en) 2012-05-07 2013-05-01 Focus detection device
CN201810393667.0A CN108401113A (en) 2012-05-07 2013-05-01 Focus detection device
PCT/JP2013/062718 WO2013168658A1 (en) 2012-05-07 2013-05-01 Focus detection device
EP13786973.1A EP2848974B1 (en) 2012-05-07 2013-05-01 Focus detection device
US14/398,545 US9497374B2 (en) 2012-05-07 2013-05-01 Focus detection device
CN201380024280.3A CN104285173B (en) 2012-05-07 2013-05-01 Focus detection device
IN10373DEN2014 IN2014DN10373A (en) 2012-05-07 2014-12-04

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013037614A JP2014164258A (en) 2013-02-27 2013-02-27 Focus detection device and amount of image deviation detection device

Publications (1)

Publication Number Publication Date
JP2014164258A true JP2014164258A (en) 2014-09-08

Family

ID=51614873

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013037614A Pending JP2014164258A (en) 2012-05-07 2013-02-27 Focus detection device and amount of image deviation detection device

Country Status (1)

Country Link
JP (1) JP2014164258A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897349A (en) * 2015-11-06 2017-06-27 松下知识产权经营株式会社 Information issuing method, server unit and network system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07199052A (en) * 1993-12-28 1995-08-04 Olympus Optical Co Ltd Focus detecting method and distance measuring method
JP2008224801A (en) * 2007-03-09 2008-09-25 Nikon Corp Focus detector and imaging apparatus
JP2009159226A (en) * 2007-12-26 2009-07-16 Nikon Corp Imaging element, focus detection device, focus adjustment device and imaging apparatus
JP2011128302A (en) * 2009-12-16 2011-06-30 Nikon Corp Imaging apparatus
JP2012123317A (en) * 2010-12-10 2012-06-28 Canon Inc Imaging apparatus and control method thereof
JP2013025246A (en) * 2011-07-25 2013-02-04 Canon Inc Imaging apparatus, control method thereof and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07199052A (en) * 1993-12-28 1995-08-04 Olympus Optical Co Ltd Focus detecting method and distance measuring method
JP2008224801A (en) * 2007-03-09 2008-09-25 Nikon Corp Focus detector and imaging apparatus
JP2009159226A (en) * 2007-12-26 2009-07-16 Nikon Corp Imaging element, focus detection device, focus adjustment device and imaging apparatus
JP2011128302A (en) * 2009-12-16 2011-06-30 Nikon Corp Imaging apparatus
JP2012123317A (en) * 2010-12-10 2012-06-28 Canon Inc Imaging apparatus and control method thereof
JP2013025246A (en) * 2011-07-25 2013-02-04 Canon Inc Imaging apparatus, control method thereof and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897349A (en) * 2015-11-06 2017-06-27 松下知识产权经营株式会社 Information issuing method, server unit and network system

Similar Documents

Publication Publication Date Title
US8730374B2 (en) Focus detection apparatus
WO2013168658A1 (en) Focus detection device
JP5388544B2 (en) Imaging apparatus and focus control method thereof
JP5454223B2 (en) camera
JP2008268403A (en) Focus detection device, focus detection method, and imaging apparatus
JP5966426B2 (en) Focus detection device
JP2008209762A (en) Photoelectric detector of image forming optical system, focus detector, and imaging apparatus
JP2013235047A (en) Focus detection device
US9602716B2 (en) Focus-detection device, method for controlling the same, and image capture apparatus
JP5348258B2 (en) Imaging device
JP5600941B2 (en) Focus detection apparatus and imaging apparatus
JP5338112B2 (en) Correlation calculation device, focus detection device, and imaging device
JP5481914B2 (en) Correlation calculation method, correlation calculation device, focus detection device, and imaging device
JP5407314B2 (en) Focus detection apparatus and imaging apparatus
JP5338113B2 (en) Correlation calculation device, focus detection device, and imaging device
JP2014164258A (en) Focus detection device and amount of image deviation detection device
JP6237858B2 (en) Focus detection apparatus and imaging apparatus
JP5338119B2 (en) Correlation calculation device, focus detection device, and imaging device
JP6003198B2 (en) Focus detection device
JP5949893B2 (en) Imaging device
JP4968009B2 (en) Correlation calculation method, correlation calculation device, focus detection device, and imaging device
JP6638714B2 (en) Focus detection device
JP5338118B2 (en) Correlation calculation device, focus detection device, and imaging device
JP7235068B2 (en) Imaging device
JP4968010B2 (en) Correlation calculation method, correlation calculation device, focus detection device, and imaging device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160202

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160830

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20170307