JP2014038191A - Correlation calculation device and focus detection device - Google Patents

Correlation calculation device and focus detection device Download PDF

Info

Publication number
JP2014038191A
JP2014038191A JP2012180162A JP2012180162A JP2014038191A JP 2014038191 A JP2014038191 A JP 2014038191A JP 2012180162 A JP2012180162 A JP 2012180162A JP 2012180162 A JP2012180162 A JP 2012180162A JP 2014038191 A JP2014038191 A JP 2014038191A
Authority
JP
Japan
Prior art keywords
signal data
data
correlation
value
array
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012180162A
Other languages
Japanese (ja)
Other versions
JP6102119B2 (en
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 JP2012180162A priority Critical patent/JP6102119B2/en
Publication of JP2014038191A publication Critical patent/JP2014038191A/en
Application granted granted Critical
Publication of JP6102119B2 publication Critical patent/JP6102119B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To shorten a correlation calculation time to the extent that correlation calculation accuracy can be secured.SOLUTION: A correlation calculation device according to the present invention comprises: first correlation calculation means that calculates a first local correlation value by multiplication between a plurality of pieces of first signal data and a plurality of pieces of second signal data, integrates the first local correlation value and thereby calculates a first integrated correlation value; logarithmic conversion means that generates a plurality of pieces of third signal data and a plurality of pieces of fourth signal data by logarithmically converting the plurality of pieces of first signal data and the plurality of pieces of second signal data; and second correlation calculation means that calculates a second local correlation value by addition between the plurality of pieces of third signal data and the plurality of pieces of fourth signal data, integrates the second local correlation value and thereby calculates a second integrated correlation value.

Description

本発明は相関演算装置および焦点検出装置に関する。   The present invention relates to a correlation calculation device and a focus detection device.

相関演算装置を含む装置の1つとして、瞳分割型位相差検出方式の焦点検出装置が知られている。その焦点検出装置では、光学系の射出瞳を通る一対の焦点検出光束が形成する一対の像に対応する一対の信号データ列が生成され、該一対の信号データ列を相対的にシフトしながら相関演算を施すことにより該一対の信号データ列間の相関値が算出される。その相関値が極値となるシフト量が前記一対の像の相対的な像ズレ量として検出されるとともに、その像ズレ量に応じて光学系の焦点調節状態が検出される。光学系の焦点調節状態は、予定焦点面と検出された像面との差、すなわちデフォーカス量として表される。   As one of devices including a correlation calculation device, a pupil detection type phase difference detection type focus detection device is known. In the focus detection device, a pair of signal data sequences corresponding to a pair of images formed by a pair of focus detection light beams passing through the exit pupil of the optical system is generated, and correlation is performed while relatively shifting the pair of signal data sequences. By performing the operation, a correlation value between the pair of signal data strings is calculated. A shift amount at which the correlation value is an extreme value is detected as a relative image shift amount of the pair of images, and a focus adjustment state of the optical system is detected according to the image shift amount. The focus adjustment state of the optical system is expressed as a difference between the planned focal plane and the detected image plane, that is, a defocus amount.

このような瞳分割型位相差検出方式の焦点検出装置においては、一対の焦点検出光束が不均一な口径蝕を受ける場合には、受光量の差に応じて一対の信号データ間に信号レベルのアンバランスが生ずる。このような信号レベルのアンバランスが生じた場合にも、高精度にデフォーカス値を検出するための相関演算方法が開示されている(例えば、特許文献1参照)。   In such a pupil division type phase difference detection type focus detection apparatus, when a pair of focus detection light beams undergo non-uniform vignetting, a signal level between a pair of signal data is determined according to the difference in the amount of received light. An imbalance occurs. A correlation calculation method for detecting a defocus value with high accuracy even when such signal level imbalance occurs is disclosed (for example, see Patent Document 1).

例えば特許文献1の(8)式および(9)式においては、一対の信号データ列の局所的なデータのペア(第1データおよびその近傍に位置する第2データ)と、もう一方の信号データ列の局所的なデータのペア(第3データおよびその近傍の第4データ)との間で、第1データと第4データとを乗じた第1乗算データと、第2データと第3データとを乗じた第2乗算データとが算出される。それとともに、第1乗算データと第2乗算データとの差の絶対値を取ることにより局所相関値が算出され、さらに該局所相関値が信号データ列の所定区間に亘って積算されることにより得られる積算相関値を一対の信号データ列間の相関値としている。   For example, in Equations (8) and (9) of Patent Document 1, a local data pair (first data and second data located in the vicinity thereof) of a pair of signal data strings and the other signal data. First multiplication data obtained by multiplying the first data and the fourth data between the pair of local data in the column (third data and fourth data in the vicinity thereof), second data and third data, And the second multiplication data multiplied by. At the same time, the local correlation value is calculated by taking the absolute value of the difference between the first multiplication data and the second multiplication data, and further obtained by integrating the local correlation value over a predetermined section of the signal data string. The integrated correlation value obtained is used as a correlation value between a pair of signal data strings.

特開2007−333720号公報JP 2007-333720 A

しかしながら従来の相関演算装置においては、演算時間が大きいという問題があった。   However, the conventional correlation calculation device has a problem that the calculation time is long.

(1) 本発明に係る相関演算装置は、複数の第1信号データからなる第1信号データ配列において局所的な部分配列をなす複数の第1信号データと、複数の第2信号データからなる第2信号データ配列において局所的な部分配列をなす複数の第1信号データに対応して局所的な部分配列をなす複数の第2信号データとの間で乗算を行ない第1局所相関値を算出するとともに、複数の第1信号データおよび複数の第2信号データを変更する毎に算出した第1局所相関値を積算することにより、第1信号データ配列と第2信号データ配列との間の相関度を表わす第1積算相関値を算出する第1相関演算手段と、複数の第1信号データおよび複数の第2信号データをそれぞれ対数変換することにより、複数の第3信号データからなる第3信号データ配列および複数の第4信号データからなる第4信号データ配列を生成する対数変換手段と、第3信号データ配列において局所的な部分配列をなす複数の第3信号データと、第4信号データ配列において局所的な部分配列をなす複数の第3信号データに対応して局所的な部分配列をなす複数の第4信号データとの間で加算を行ない第2局所相関値を算出するとともに、複数の第3信号データおよび複数の第4信号データを変更する毎に算出した第2局所相関値を積算することにより、第3信号データ配列と第4信号データ配列との間の相関度を表わす第2積算相関値を算出する第2相関演算手段とを備えることを特徴とする。
(2) 本発明に係る相関演算装置は、第1画像の空間強度分布を所定間隔で配置された複数の空間座標点でサンプリングして得られる複数の第1信号データからなる第1信号データ配列において、複数の空間座標点のうちの第1空間座標点の近傍にて第1位置関係にある複数の空間座標点で得られる複数の第1信号データと、第2画像の空間強度分布を所定間隔で配置された複数の空間座標点でサンプリングして得られる複数の第2信号データからなる第2信号データ配列において、複数の空間座標点のうちの第1空間座標点に対し第2位置関係にある第2空間座標点の近傍にて第1位置関係にある複数の空間座標点で得られる複数の第2信号データとの間で乗算を行なうことにより第1積データと第2積データとを算出し、第1積データと第2積データとの減算を行なって第1差分データを算出し、第1差分データを非線形変換して同一符号化を行なうことにより、第1空間座標点の近傍の複数の第1信号データと第2空間座標点の近傍の複数の第2信号データとの間の第1局所相関値を算出し、第1空間座標点を所定の空間座標領域に亘って移動させて第1局所相関値を積算することにより、第1信号データ配列と第2信号データ配列との間の第2位置関係における第1積算相関値を算出する第1相関演算手段と、複数の第1信号データおよび複数の第2信号データをそれぞれ対数変換して複数の第3信号データおよび複数の第4信号データを算出し、複数の第3信号データからなる第3信号データ配列および複数の第4信号データからなる第4信号データ配列を生成する対数変換手段と、第3信号データ配列において、第1空間座標点の近傍にて第1位置関係にある複数の空間座標点で得られる複数の第3信号データと、第4信号データ配列において、第1空間座標点に対し第2位置関係にある第2空間座標点の近傍にて第1位置関係にある複数の空間座標点で得られる複数の第4信号データとの間で加算を行なうことにより第1和データと第2和データとを算出し、さらに第1和データと第2和データとの減算を行なって第2差分データを算出し、第2差分データを非線形変換して同一符号化を行なうことにより、第1空間座標点の近傍の複数の第3信号データと第2空間座標点の近傍の複数の第4信号データとの間の第2局所相関値を算出し、第1空間座標点を所定の空間座標領域に亘って移動させて第2局所相関値を積算することにより、第3信号データ配列と第4信号データ配列との間の第2位置関係における第2積算相関値を算出する第2相関演算手段と、所定条件が満たされるか否かに応じて、第1相関演算手段による第1積算相関値の算出および第2相関演算手段による第2積算相関値の算出のいずれか一方を選択する選択手段と、選択手段により第1相関演算手段による第1積算相関値の算出が選択されたときは、第2位置関係を所定範囲に亘って変更する毎に第2位置関係に対応する第1積算相関値を算出し、第1積算相関値が極値を示すときの第2位置関係に基づき、第1信号データ配列と第2信号データ配列との空間的な相対変位量を算出し、選択手段により第2相関演算手段による第2積算相関値の算出が選択されたときは、第2位置関係を所定範囲に亘って変更する毎に第2位置関係に対応する第2積算相関値を算出し、第2積算相関値が極値を示すときの第2位置関係に基づき、第1信号データ配列と第2信号データ配列との空間的な相対変位量を算出する相対変位量検出手段とを備えることを特徴とする。
(3) 本発明に係る相関演算装置は、複数の第1信号データからなる第1信号データ配列において局所的な部分配列をなす複数の第1信号データと、複数の第2信号データからなる第2信号データ配列において局所的な部分配列をなす複数の第1信号データに対応して局所的な部分配列をなす複数の第2信号データとの間で乗算を行なうことにより、局所的な部分配列をなす複数の第1信号データと局所的な部分配列をなす複数の第2信号データとの間の第1局所相関値を算出するとともに、第1信号データ配列中および第2信号データ配列中において局所的な部分配列をなす複数の第1信号データおよび局所的な部分配列をなす複数の第2信号データを変更する毎に算出した第1局所相関値を積算することにより、第1信号データ配列と第2信号データ配列との間の相関度を表わす第1積算相関値を算出する第1相関演算手段と、複数の第1信号データおよび複数の第2信号データをそれぞれ対数変換することにより、複数の第3信号データからなる第3信号データ配列および複数の第4信号データからなる第4信号データ配列を生成する対数変換手段と、第3信号データ配列において局所的な部分配列をなす複数の第3信号データと、第4信号データ配列において局所的な部分配列をなす複数の第3信号データに対応して局所的な部分配列をなす複数の第4信号データとの間で加算を行なうことにより、局所的な部分配列をなす複数の第3信号データと局所的な部分配列をなす複数の第4信号データとの間の第2局所相関値を算出するとともに、第3信号データ配列中および第4信号データ配列中において局所的な部分配列をなす複数の第3信号データおよび局所的な部分配列をなす複数の第4信号データを変更する毎に算出した第2局所相関値を積算することにより、第3信号データ配列と第4信号データ配列との間の相関度を表わす第2積算相関値を算出する第2相関演算手段とを備えることを特徴とする。
(1) The correlation calculation device according to the present invention includes a plurality of first signal data forming a local partial array in a first signal data array including a plurality of first signal data and a first signal data including a plurality of second signal data. A first local correlation value is calculated by multiplying a plurality of second signal data having a local partial arrangement corresponding to a plurality of first signal data having a local partial arrangement in the two-signal data arrangement. In addition, the degree of correlation between the first signal data array and the second signal data array is obtained by integrating the first local correlation values calculated each time the plurality of first signal data and the plurality of second signal data are changed. First correlation calculating means for calculating a first integrated correlation value representing the third signal data, and third signal data comprising a plurality of third signal data by logarithmically converting the plurality of first signal data and the plurality of second signal data, respectively. Logarithm conversion means for generating a fourth signal data array comprising an array and a plurality of fourth signal data, a plurality of third signal data forming a partial partial array in the third signal data array, and a fourth signal data array A second local correlation value is calculated by performing addition with a plurality of fourth signal data forming a local partial arrangement corresponding to a plurality of third signal data forming a local partial arrangement, The second integration representing the degree of correlation between the third signal data array and the fourth signal data array by integrating the second local correlation value calculated each time the three signal data and the plurality of fourth signal data are changed. And a second correlation calculation means for calculating a correlation value.
(2) The correlation calculation device according to the present invention includes a first signal data array composed of a plurality of first signal data obtained by sampling the spatial intensity distribution of the first image at a plurality of spatial coordinate points arranged at predetermined intervals. , A plurality of first signal data obtained at a plurality of spatial coordinate points having a first positional relationship in the vicinity of the first spatial coordinate point among the plurality of spatial coordinate points and a spatial intensity distribution of the second image are predetermined. In a second signal data array composed of a plurality of second signal data obtained by sampling at a plurality of spatial coordinate points arranged at intervals, a second positional relationship with respect to a first spatial coordinate point among the plurality of spatial coordinate points The first product data and the second product data are obtained by multiplying a plurality of second signal data obtained at a plurality of spatial coordinate points in the first positional relationship in the vicinity of the second spatial coordinate point at And the first product data and The first difference data is calculated by performing subtraction with the second product data, and the first difference data is subjected to non-linear transformation and the same encoding to obtain a plurality of first signal data in the vicinity of the first spatial coordinate point A first local correlation value between a plurality of second signal data in the vicinity of the second spatial coordinate point is calculated, and the first local correlation value is calculated by moving the first spatial coordinate point over a predetermined spatial coordinate area. First correlation calculation means for calculating a first integrated correlation value in the second positional relationship between the first signal data array and the second signal data array by integrating, a plurality of first signal data, and a plurality of first signal data The second signal data is logarithmically converted to calculate a plurality of third signal data and a plurality of fourth signal data, and a third signal data array including a plurality of third signal data and a fourth signal data including a plurality of fourth signal data are calculated. Logarithm to generate signal data array In the third signal data array, a plurality of third signal data obtained at a plurality of spatial coordinate points in the first positional relationship in the vicinity of the first spatial coordinate point, and a fourth signal data array, By performing addition with a plurality of fourth signal data obtained at a plurality of spatial coordinate points having the first positional relationship in the vicinity of the second spatial coordinate point having the second positional relationship with respect to the one spatial coordinate point The first sum data and the second sum data are calculated, and the second difference data is calculated by further subtracting the first sum data and the second sum data. To calculate a second local correlation value between the plurality of third signal data in the vicinity of the first space coordinate point and the plurality of fourth signal data in the vicinity of the second space coordinate point. Move the coordinate point over a predetermined spatial coordinate area A second correlation calculating means for calculating a second integrated correlation value in the second positional relationship between the third signal data array and the fourth signal data array by integrating the function values; and whether a predetermined condition is satisfied Accordingly, the selection means for selecting one of the calculation of the first integrated correlation value by the first correlation calculation means and the calculation of the second integration correlation value by the second correlation calculation means, and the first correlation calculation by the selection means When the calculation of the first integrated correlation value by the means is selected, the first integrated correlation value corresponding to the second positional relationship is calculated every time the second positional relationship is changed over a predetermined range, and the first integrated correlation value is calculated. A spatial relative displacement amount between the first signal data array and the second signal data array is calculated based on the second positional relationship when the value indicates an extreme value, and the second integration by the second correlation calculation unit is performed by the selection unit. When the calculation of the correlation value is selected, the second Each time the positional relationship is changed over a predetermined range, a second integrated correlation value corresponding to the second positional relationship is calculated, and the first signal is based on the second positional relationship when the second integrated correlation value shows an extreme value. Relative displacement amount detection means for calculating a spatial relative displacement amount between the data array and the second signal data array is provided.
(3) The correlation calculation device according to the present invention includes a plurality of first signal data forming a local partial array in a first signal data array including a plurality of first signal data, and a second signal data including a plurality of second signal data. A local partial array is obtained by multiplying a plurality of second signal data forming a local partial array corresponding to a plurality of first signal data forming a local partial array in the two-signal data array. In the first signal data array and the second signal data array, a first local correlation value is calculated between the plurality of first signal data forming the plurality of first signal data and the plurality of second signal data forming the local partial array. The first signal data array is obtained by accumulating the first local correlation values calculated each time the plurality of first signal data forming the local partial array and the plurality of second signal data forming the local partial array are changed. And second A first correlation calculation means for calculating a first integrated correlation value representing a degree of correlation between the two signal data arrays, and a plurality of first signal data and a plurality of second signal data by logarithmically converting each of the plurality Logarithmic conversion means for generating a third signal data array composed of third signal data and a fourth signal data array composed of a plurality of fourth signal data, and a plurality of third signals forming a local partial array in the third signal data array By performing addition between the signal data and a plurality of fourth signal data forming a local partial array corresponding to a plurality of third signal data forming a local partial array in the fourth signal data array, Calculating a second local correlation value between the plurality of third signal data forming the local partial array and the plurality of fourth signal data forming the local partial array, and in the third signal data array and By integrating a plurality of third signal data forming a local partial array and a plurality of fourth signal data forming a local partial array in the signal data array, each time the second local correlation value calculated is integrated, And a second correlation calculation means for calculating a second integrated correlation value representing a degree of correlation between the third signal data array and the fourth signal data array.

本発明に係る相関演算装置によれば、相関演算精度が確保される範囲で、相関演算時間を短縮することができる。   According to the correlation calculation device of the present invention, the correlation calculation time can be shortened within a range in which the correlation calculation accuracy is ensured.

ディジタルスチルカメラの構成を示す図である。It is a figure which shows the structure of a digital still camera. 撮像画面上の焦点検出位置を示す図である。It is a figure which shows the focus detection position on an imaging screen. 撮像素子の詳細な構成を示す正面図である。It is a front view which shows the detailed structure of an image pick-up element. 瞳分割方式による焦点検出方法を説明する図である。It is a figure explaining the focus detection method by a pupil division system. 射出瞳面における投影関係を示す正面図である。It is a front view which shows the projection relationship in an exit pupil plane. 焦点検出位置における像信号の強度分布(光量)を縦軸に、焦点検出位置内の位置偏差を横軸にとって示した図である。It is the figure which showed the intensity distribution (light quantity) of the image signal in a focus detection position on the vertical axis, and the position deviation in the focus detection position on the horizontal axis. ディジタルスチルカメラ210の撮像動作を示すフローチャートである。5 is a flowchart showing an imaging operation of the digital still camera 210. 相関演算のデータフローを示す図である。It is a figure which shows the data flow of correlation calculation. 相関演算のデータフローを示す図である。It is a figure which shows the data flow of correlation calculation. 相関演算のデータフローを示す図である。It is a figure which shows the data flow of correlation calculation. 横軸を入力x、縦軸を出力yとした場合の対数変換の関係を示したグラフである。It is the graph which showed the relationship of logarithmic transformation when a horizontal axis is input x and a vertical axis | shaft is output y. 対数変換T1を用いて入力データ列Xiの信号波形I0を出力データ列Yiの信号波形I1に変換した場合のグラフである。It is a graph at the time of converting signal waveform I0 of input data sequence Xi into signal waveform I1 of output data sequence Yi using logarithmic conversion T1. 対数変換T2を用いて入力データ列Xiの信号波形I0を出力データ列Yiの信号波形I2に変換した場合のグラフである。It is a graph at the time of converting the signal waveform I0 of the input data sequence Xi into the signal waveform I2 of the output data sequence Yi using logarithmic conversion T2. 対数変換T3を用いて入力データ列Xiの信号波形I3を出力データ列Yiの信号波形I4に変換した場合のグラフである。It is a graph at the time of converting the signal waveform I3 of the input data sequence Xi into the signal waveform I4 of the output data sequence Yi using logarithmic conversion T3. 一対の入力信号波形および相関演算の演算結果を示したグラフである。It is the graph which showed a pair of input signal waveform and the calculation result of correlation calculation. 焦点検出動作の詳細を示すフローチャートである。It is a flowchart which shows the detail of a focus detection operation | movement. 第2相関演算処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of a 2nd correlation calculation process. 第2相関演算処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of a 2nd correlation calculation process. 焦点検出動作の詳細を示すフローチャートである。It is a flowchart which shows the detail of a focus detection operation | movement. 相関演算のデータフローを示す図である。It is a figure which shows the data flow of correlation calculation. 基本画像中の顔画像近傍を拡大した画像を示す図である。It is a figure which shows the image which expanded the face image vicinity in a basic image. 基本ローパス画像の顔画像近傍を拡大した画像を示す図である。It is a figure which shows the image which expanded the face image vicinity of the basic low-pass image. 比較対象画像中のある部分画像の領域近傍を拡大した画像を示す図である。It is a figure which shows the image which expanded the area | region vicinity of the partial image in a comparison object image. 比較対象ローパス画像における部分画像近傍を拡大した画像を示す図である。It is a figure which shows the image which expanded the partial image vicinity in the comparison object low pass image. 局所相関値の算出式と、その式による計算に使用される各画素データとの対応関係を示す図である。It is a figure which shows the correspondence of the calculation formula of a local correlation value, and each pixel data used for the calculation by the formula. 相関画素位置23における局所相関値の演算を模式的に示した図である。It is the figure which showed typically the calculation of the local correlation value in the correlation pixel position. 撮像素子の詳細な構成を示す正面図である。It is a front view which shows the detailed structure of an image pick-up element. 再結像瞳分割方式の焦点検出装置を示す図である。It is a figure which shows the focus detection apparatus of a re-imaging pupil division system. 外光三角測距方式の測距装置を示す図である。It is a figure which shows the ranging device of an external light triangulation system.

本願発明に係る一実施の形態における相関演算装置を含む焦点検出装置を有する撮像装置としてのディジタルスチルカメラ201を説明する。図1はディジタルスチルカメラ201の構成を示す図である。ディジタルスチルカメラ201は交換レンズ202とカメラボディ203とから構成される。交換レンズ202はカメラボディ203のマウント部204に装着される。   A digital still camera 201 will be described as an imaging apparatus having a focus detection device including a correlation calculation device according to an embodiment of the present invention. FIG. 1 is a diagram illustrating a configuration of a digital still camera 201. The digital still camera 201 includes an interchangeable lens 202 and a camera body 203. The interchangeable lens 202 is attached to the mount portion 204 of the camera body 203.

交換レンズ202は、レンズ205、206および207、絞り208、レンズ駆動制御装置209などを有している。レンズ206はズーミング用レンズ、レンズ207はフォーカシング用レンズである。レンズ駆動制御装置209は、CPUとその周辺部品を含み、フォーカシング用レンズ207および絞り208の駆動制御、ズーミング用レンズ206、フォーカシング用レンズ207および絞り208の位置検出、ならびにカメラボディ203のカメラ駆動制御装置212との通信によるレンズ情報の送信およびカメラ情報の受信などを行う。   The interchangeable lens 202 includes lenses 205, 206, and 207, a diaphragm 208, a lens drive control device 209, and the like. A lens 206 is a zooming lens, and a lens 207 is a focusing lens. The lens drive control device 209 includes a CPU and its peripheral components, and controls driving of the focusing lens 207 and the aperture 208, position detection of the zooming lens 206, focusing lens 207 and the aperture 208, and camera drive control of the camera body 203. Transmission of lens information and reception of camera information by communication with the apparatus 212 are performed.

カメラボディ203は、撮像素子211、カメラ駆動制御装置212、メモリカード213、LCDドライバー214、LCD215、および接眼レンズ216などを有している。撮像素子211は、交換レンズ202の予定結像面(予定焦点面)に配置され、交換レンズ202により結像された被写体像を撮像して画像信号を出力する。撮像素子211には撮像用画素(以下、単に撮像画素という)が二次元状に配置されており、その内の焦点検出位置に対応した部分には撮像画素に代えて焦点検出用画素(以下、単に焦点検出画素という)が組み込まれている。複数の焦点検出画素が直線状に配列されて、焦点検出画素列が形成されている。   The camera body 203 includes an image sensor 211, a camera drive control device 212, a memory card 213, an LCD driver 214, an LCD 215, an eyepiece lens 216, and the like. The image sensor 211 is disposed on the planned image plane (planned focal plane) of the interchangeable lens 202, captures the subject image formed by the interchangeable lens 202, and outputs an image signal. An imaging pixel (hereinafter simply referred to as an imaging pixel) is two-dimensionally arranged in the imaging element 211, and a focus detection pixel (hereinafter, referred to as a focus detection position) is replaced with an imaging pixel in a portion corresponding to the focus detection position. Simply referred to as a focus detection pixel). A plurality of focus detection pixels are linearly arranged to form a focus detection pixel row.

カメラ駆動制御装置212は、CPUおよびメモリなどの周辺部品を含む。カメラ駆動制御装置212は、撮像素子211の駆動制御、撮像画像の処理、交換レンズ202の焦点検出および焦点調節、絞り208の制御、LCD215の表示制御、レンズ駆動制御装置209との通信、ならびにカメラ全体のシーケンス制御などを行う。カメラ駆動制御装置212は、マウント部204に設けられた電気接点217を介してレンズ駆動制御装置209と通信を行う。   The camera drive control device 212 includes peripheral components such as a CPU and a memory. The camera drive control device 212 controls drive of the image sensor 211, processing of the captured image, focus detection and focus adjustment of the interchangeable lens 202, control of the aperture 208, display control of the LCD 215, communication with the lens drive control device 209, and camera Performs overall sequence control. The camera drive control device 212 communicates with the lens drive control device 209 via an electrical contact 217 provided on the mount unit 204.

カメラ駆動制御装置212は、相関演算装置、像ズレ検出装置および焦点検出装置を構成する。カメラ駆動制御装置212は、後述する対数ルックアップテーブルを含み、対数変換処理、局所相関値演算処理、相関値積算処理、データ値分布検出処理、中間処理演算処理、像ズレ検出処理、およびデフォーカス量検出処理などを行う。   The camera drive control device 212 constitutes a correlation calculation device, an image shift detection device, and a focus detection device. The camera drive control device 212 includes a logarithmic lookup table to be described later, and includes logarithmic conversion processing, local correlation value calculation processing, correlation value integration processing, data value distribution detection processing, intermediate processing calculation processing, image shift detection processing, and defocusing. Perform quantity detection processing.

メモリカード213は、撮像画像を記憶する画像ストレージである。LCD215は液晶ビューファインダー(EVF:電子ビューファインダー)の表示器として用いられる。撮影者は、接眼レンズ216を介してLCD215に表示された撮像画像を視認することができる。   The memory card 213 is an image storage that stores captured images. The LCD 215 is used as a display for a liquid crystal viewfinder (EVF: electronic viewfinder). The photographer can visually recognize the captured image displayed on the LCD 215 via the eyepiece lens 216.

交換レンズ202を通過して撮像素子211上に結像された被写体像は撮像素子211により光電変換され、画像出力される。画像出力がカメラ駆動制御装置212へ送られる。カメラ駆動制御装置212は、焦点検出画素の出力に基づいて焦点検出位置におけるデフォーカス量を演算し、このデフォーカス量をレンズ駆動制御装置209へ送る。カメラ駆動制御装置212は、撮像画素の出力に基づいて生成した画像信号をLCDドライバー214へ送る。カメラ駆動制御装置212は、その画像信号に基づき、LCD215に画像を表示させる。それとともに、カメラ駆動制御装置212は、その画像信号をメモリカード213に記憶させる。   The subject image that has passed through the interchangeable lens 202 and formed on the image sensor 211 is photoelectrically converted by the image sensor 211 and output as an image. The image output is sent to the camera drive control device 212. The camera drive control device 212 calculates the defocus amount at the focus detection position based on the output of the focus detection pixel, and sends this defocus amount to the lens drive control device 209. The camera drive control device 212 sends an image signal generated based on the output of the imaging pixel to the LCD driver 214. The camera drive control device 212 displays an image on the LCD 215 based on the image signal. At the same time, the camera drive control device 212 stores the image signal in the memory card 213.

レンズ駆動制御装置209は、ズーミング用レンズ206、フォーカシング用レンズ207および絞り208の位置を検出し、それらの検出位置に基づいてレンズ情報を演算するか、あるいは予め用意されたルックアップテーブルから検出位置に応じたレンズ情報を選択する。レンズ駆動制御装置209は、そのレンズ情報をカメラ駆動制御装置212へ送る。レンズ駆動制御装置209は、カメラ駆動制御装置212から受信したデフォーカス量に基づいてレンズ駆動量を演算し、レンズ駆動量に基づいてフォーカシング用レンズ207を駆動制御する。   The lens drive control device 209 detects the positions of the zooming lens 206, the focusing lens 207, and the diaphragm 208, and calculates lens information based on these detection positions, or detects a position from a lookup table prepared in advance. Select lens information according to. The lens drive control device 209 sends the lens information to the camera drive control device 212. The lens drive control device 209 calculates a lens drive amount based on the defocus amount received from the camera drive control device 212, and drives and controls the focusing lens 207 based on the lens drive amount.

図2は、交換レンズ202の予定結像面に設定した撮像画面G上の焦点検出位置(焦点検出エリア、焦点検出領域)を示す。撮像画面G上に焦点検出位置G1〜G5を設定し、撮像素子211の焦点検出画素を撮像画面G上の各焦点検出位置G1〜G5の長手方向に直線状に配列する。つまり、撮像素子211上の焦点検出画素列は、撮影画面G上に結像された被写体像の内の焦点検出位置G1〜G5における像をサンプリングする。撮影者は撮影構図に応じて焦点検出位置G1〜G5の中から任意の焦点検出位置を手動で選択する。   FIG. 2 shows a focus detection position (focus detection area, focus detection area) on the imaging screen G set on the planned imaging plane of the interchangeable lens 202. Focus detection positions G1 to G5 are set on the imaging screen G, and focus detection pixels of the imaging element 211 are linearly arranged in the longitudinal direction of the focus detection positions G1 to G5 on the imaging screen G. That is, the focus detection pixel row on the image sensor 211 samples an image at the focus detection positions G1 to G5 in the subject image formed on the shooting screen G. The photographer manually selects an arbitrary focus detection position from the focus detection positions G1 to G5 according to the shooting composition.

図3は撮像素子211の詳細な構成を示す正面図であり、撮像素子211上のひとつの焦点検出位置G1の周囲を拡大した部分拡大図である。撮像素子211は撮像画素310と焦点検出用の焦点検出画素311とから構成される。   FIG. 3 is a front view showing a detailed configuration of the image sensor 211, and is a partially enlarged view in which the periphery of one focus detection position G1 on the image sensor 211 is enlarged. The image sensor 211 includes an imaging pixel 310 and a focus detection pixel 311 for focus detection.

撮像画素310は、マイクロレンズ10、光電変換部11、不図示の色フィルターから構成される。焦点検出画素311は、マイクロレンズ10、一対の光電変換部12および13から構成される。撮像画素310の光電変換部11は、マイクロレンズ10によって明るい交換レンズ202の射出瞳(たとえばF1.0)を通過する光束をすべて受光するような形状に設計される。焦点検出画素311の一対の光電変換部12および13は、マイクロレンズ10によって交換レンズの特定の射出瞳(たとえばF2.8)を通過する光束をすべて受光するような形状に設計される。   The imaging pixel 310 includes the microlens 10, the photoelectric conversion unit 11, and a color filter (not shown). The focus detection pixel 311 includes a microlens 10 and a pair of photoelectric conversion units 12 and 13. The photoelectric conversion unit 11 of the imaging pixel 310 is designed in such a shape that the microlens 10 receives all the light beams that pass through the exit pupil (for example, F1.0) of the bright interchangeable lens 202. The pair of photoelectric conversion units 12 and 13 of the focus detection pixel 311 are designed in such a shape that the microlens 10 receives all the light beams passing through a specific exit pupil (for example, F2.8) of the interchangeable lens.

撮像素子211上に2次元状に配置された撮像画素310は、赤(R)、緑(G)、青(B)のいずれかの色フィルターを含む。各色フィルターは互いに異なる分光感度特性を有している。R、GおよびBのいずれか1つの色フィルターを含む撮像画素310は、図3に示すようにベイヤー配列される。   The imaging pixel 310 arranged two-dimensionally on the imaging element 211 includes a color filter of any one of red (R), green (G), and blue (B). Each color filter has different spectral sensitivity characteristics. The imaging pixels 310 including any one of R, G, and B color filters are arranged in a Bayer array as shown in FIG.

焦点検出画素311には、光量をかせぐために色フィルターは設けられておらず、その分光感度特性は光電変換を行うフォトダイオードの分光感度と、赤外カットフィルター(不図示)の分光感度とを総合した分光感度特性を有している。焦点検出画素311の分光感度は、撮像画素310の内の緑画素G、赤画素R、青画素Bの分光感度を加算したような分光感度特性となり、その感度の光波長領域は緑画素G、赤画素R、青画素Bの感度の光波長領域を包含している。   The focus detection pixel 311 is not provided with a color filter in order to increase the amount of light, and its spectral sensitivity characteristic is a total of the spectral sensitivity of a photodiode that performs photoelectric conversion and the spectral sensitivity of an infrared cut filter (not shown). Spectral sensitivity characteristics. The spectral sensitivity of the focus detection pixel 311 has a spectral sensitivity characteristic that is obtained by adding the spectral sensitivities of the green pixel G, red pixel R, and blue pixel B of the imaging pixel 310. The light wavelength region of the sensitivity is the green pixel G, The light wavelength region of the sensitivity of the red pixel R and the blue pixel B is included.

焦点検出画素311は、図2に示す焦点検出位置G1〜G5の撮像画素310のBフィルターおよびGフィルターが配置されるべき行または列に、直線状に隙間なしに密に配置される。こうすることによって、画素補間により焦点検出画素311の位置の画素信号を算出する場合に、多少誤差が生じても人間の眼には目立たなくすることができる。この理由は、人間の目は青より赤に敏感であることと、緑画素の密度が青画素および赤画素より高いので、緑画素の1画素の欠陥に対する画像劣化への寄与が小さいことである。   The focus detection pixels 311 are arranged densely in a straight line without gaps in the rows or columns where the B filters and G filters of the imaging pixels 310 at the focus detection positions G1 to G5 shown in FIG. In this way, when the pixel signal at the position of the focus detection pixel 311 is calculated by pixel interpolation, it can be made inconspicuous to the human eye even if a slight error occurs. This is because the human eye is more sensitive to red than blue, and the density of green pixels is higher than that of blue and red pixels, so the contribution to image degradation for a single pixel defect in green pixels is small. .

補色フィルターの撮像画素を二次元状に展開した撮像素子では、出力誤差が比較的目立たない青成分を含むシアンおよびマゼンダが配置されるべき画素位置に焦点検出画素311が配置される。   In an image sensor in which the image pickup pixels of the complementary color filter are developed two-dimensionally, the focus detection pixels 311 are arranged at pixel positions where cyan and magenta including a blue component whose output error is relatively inconspicuous should be arranged.

撮像画素310において、撮像用の光電変換部11の前方(光学系が位置する方向)にマイクロレンズ10が配置され、マイクロレンズ10により光電変換部11が前方に投影される。光電変換部11は撮像素子211上の不図示の半導体回路基板上に形成され、不図示の色フィルターはマイクロレンズ10と光電変換部11との中間に配置される。   In the imaging pixel 310, the microlens 10 is disposed in front of the photoelectric conversion unit 11 for imaging (the direction in which the optical system is located), and the photoelectric conversion unit 11 is projected forward by the microlens 10. The photoelectric conversion unit 11 is formed on a semiconductor circuit substrate (not shown) on the image sensor 211, and a color filter (not shown) is disposed between the microlens 10 and the photoelectric conversion unit 11.

焦点検出画素311において、焦点検出用の光電変換部12および13の前方(光学系が位置する方向)にマイクロレンズ10が配置され、マイクロレンズ10により光電変換部12およぶ13が前方に投影される。光電変換部12および13は撮像素子211上の不図示の半導体回路基板上に形成される。   In the focus detection pixel 311, the microlens 10 is disposed in front of the focus detection photoelectric conversion units 12 and 13 (the direction in which the optical system is located), and the photoelectric conversion units 12 and 13 are projected forward by the microlens 10. . The photoelectric conversion units 12 and 13 are formed on a semiconductor circuit substrate (not shown) on the image sensor 211.

図4により瞳分割方式による焦点検出方法を説明する。図4において、交換レンズ202の光軸91上に配置される焦点検出画素311のマイクロレンズ50と、そのマイクロレンズ50の後方に配置される一対の光電変換部52および53と、交換レンズ202の光軸91外に配置される焦点検出画素311のマイクロレンズ60と、そのマイクロレンズ60の後方に配置される一対の光電変換部62および63とを例にあげて、焦点検出方法を説明する。交換レンズ202の予定結像面に配置したマイクロレンズ50および60の前方の距離d4の位置に、交換レンズ202の射出瞳90を設定する。距離d4は、マイクロレンズ50および60の曲率、屈折率、マイクロレンズ50および60と光電変換部52、53、62および63との間の距離などに応じて決まる値であって、この明細書では測距瞳距離と呼ぶ。   A focus detection method based on the pupil division method will be described with reference to FIG. In FIG. 4, the microlens 50 of the focus detection pixel 311 disposed on the optical axis 91 of the interchangeable lens 202, a pair of photoelectric conversion units 52 and 53 disposed behind the microlens 50, and the interchangeable lens 202 The focus detection method will be described by taking the micro lens 60 of the focus detection pixel 311 arranged outside the optical axis 91 and the pair of photoelectric conversion units 62 and 63 arranged behind the micro lens 60 as an example. The exit pupil 90 of the interchangeable lens 202 is set at a position of a distance d4 in front of the microlenses 50 and 60 arranged on the planned imaging plane of the interchangeable lens 202. The distance d4 is a value determined according to the curvature and refractive index of the microlenses 50 and 60, the distance between the microlenses 50 and 60 and the photoelectric conversion units 52, 53, 62 and 63, and the like in this specification. This is called the distance measurement pupil distance.

マイクロレンズ50および60は交換レンズ202の予定結像面に配置されており、光軸91上のマイクロレンズ50によって、一対の光電変換部52および53の形状が、マイクロレンズ50から投影距離d4だけ離間した射出瞳90上に投影され、その投影形状は測距瞳92および93を形成する。光軸91外のマイクロレンズ60によって、一対の光電変換部62および63の形状が、投影距離d4だけ離間した射出瞳90上に投影され、その投影形状は測距瞳92および93を形成する。すなわち、投影距離d4にある射出瞳90上で各焦点検出画素の光電変換部の投影形状(測距瞳92および93)が一致するように、各画素の投影方向が決定される。   The microlenses 50 and 60 are arranged on the planned image plane of the interchangeable lens 202, and the microlens 50 on the optical axis 91 causes the pair of photoelectric conversion units 52 and 53 to be shaped from the microlens 50 by a projection distance d4. Projected onto the spaced exit pupil 90, the projection shape forms distance measuring pupils 92 and 93. The microlenses 60 outside the optical axis 91 project the shapes of the pair of photoelectric conversion units 62 and 63 onto the exit pupil 90 separated by the projection distance d4, and the projection shapes form distance measuring pupils 92 and 93. That is, the projection direction of each pixel is determined so that the projection shape (ranging pupils 92 and 93) of the photoelectric conversion unit of each focus detection pixel matches on the exit pupil 90 at the projection distance d4.

光電変換部52は、測距瞳92を通過しマイクロレンズ50へ向う焦点検出光束72によってマイクロレンズ50上に形成される像の強度に対応した信号を出力する。光電変換部53は、測距瞳93を通過しマイクロレンズ50へ向う焦点検出光束73によってマイクロレンズ50上に形成される像の強度に対応した信号を出力する。光電変換部62は、測距瞳92を通過しマイクロレンズ60へ向う焦点検出光束82によってマイクロレンズ60上に形成される像の強度に対応した信号を出力する。光電変換部63は、測距瞳93を通過しマイクロレンズ60へ向う焦点検出光束83によってマイクロレンズ60上に形成される像の強度に対応した信号を出力する。焦点検出画素311の配列方向は一対の瞳距離の分割方向と一致させる。   The photoelectric conversion unit 52 outputs a signal corresponding to the intensity of the image formed on the microlens 50 by the focus detection light beam 72 passing through the distance measuring pupil 92 and traveling toward the microlens 50. The photoelectric conversion unit 53 outputs a signal corresponding to the intensity of the image formed on the microlens 50 by the focus detection light beam 73 passing through the distance measuring pupil 93 and traveling toward the microlens 50. The photoelectric conversion unit 62 outputs a signal corresponding to the intensity of the image formed on the microlens 60 by the focus detection light beam 82 passing through the distance measuring pupil 92 and traveling toward the microlens 60. The photoelectric conversion unit 63 outputs a signal corresponding to the intensity of the image formed on the microlens 60 by the focus detection light beam 83 passing through the distance measuring pupil 93 and traveling toward the microlens 60. The arrangement direction of the focus detection pixels 311 is made to coincide with the division direction of the pair of pupil distances.

このような焦点検出画素を直線状に多数配列し、各画素の一対の光電変換部の出力を測距瞳92および93に対応した出力グループにまとめることによって、一対の測距瞳92および93を各々通過する焦点検出光束が焦点検出画素列上に形成する一対の像の強度分布に関する情報を得ることができる。さらに、この情報に対して後述する像ズレ検出演算処理(相関処理、位相差検出処理)を施すことによって、いわゆる瞳分割方式における一対の像の像ズレ量を検出することができる。この像ズレ量に所定の変換係数を乗ずることによって、予定結像面に対する現在の結像面(予定結像面上のマイクロレンズアレイの位置に対応した焦点検出位置における結像面)の偏差(デフォーカス量)を算出することができる。   A large number of such focus detection pixels are arranged in a straight line, and the output of the pair of photoelectric conversion units of each pixel is grouped into an output group corresponding to the distance measurement pupils 92 and 93, whereby the pair of distance measurement pupils 92 and 93 is formed. Information regarding the intensity distribution of a pair of images formed on the focus detection pixel row by the focus detection light fluxes that pass through each can be obtained. Further, by performing image shift detection calculation processing (correlation processing, phase difference detection processing) described later on this information, it is possible to detect the image shift amounts of a pair of images in the so-called pupil division method. By multiplying this image shift amount by a predetermined conversion coefficient, the deviation of the current imaging plane (imaging plane at the focus detection position corresponding to the position of the microlens array on the planned imaging plane) with respect to the planned imaging plane ( Defocus amount) can be calculated.

図4では、光軸91上にある第1焦点検出画素(マイクロレンズ50および一対の光電変換部52および53を含む)と、これに隣接する第1焦点検出画素(マイクロレンズ60および一対の光電変換部62および63を含む)を模式的に例示したが、その他の焦点検出画素においても同様に、一対の光電変換部がそれぞれ一対の測距瞳から各マイクロレンズに到来する光束を受光する。   In FIG. 4, the first focus detection pixel (including the microlens 50 and the pair of photoelectric conversion units 52 and 53) on the optical axis 91 and the first focus detection pixel (the microlens 60 and the pair of photoelectric conversions) adjacent to the first focus detection pixel. In the other focus detection pixels, similarly, a pair of photoelectric conversion units receive light beams coming from the pair of distance measurement pupils to the respective microlenses.

図5は射出瞳面における投影関係を示す正面図である。図4において、焦点検出画素311から一対の光電変換部12および13をマイクロレンズ10により射出瞳面90に投影した測距瞳92および93の外接円は、結像面から見た場合に所定の開口F値(以下、測距瞳F値と呼ぶ)となる。所定の開口F値とは、例えばF2.8である。撮像画素310の光電変換部11をマイクロレンズ10により射出瞳面90に投影すると、図5に示す領域94となり、領域94は測距瞳92および93を包含した広い領域となっている。   FIG. 5 is a front view showing a projection relationship on the exit pupil plane. In FIG. 4, the circumscribed circles of the distance measuring pupils 92 and 93 obtained by projecting the pair of photoelectric conversion units 12 and 13 from the focus detection pixel 311 onto the exit pupil plane 90 by the microlens 10 are predetermined when viewed from the imaging plane. An aperture F value (hereinafter referred to as a distance measuring pupil F value). The predetermined aperture F value is, for example, F2.8. When the photoelectric conversion unit 11 of the imaging pixel 310 is projected onto the exit pupil plane 90 by the microlens 10, a region 94 shown in FIG. 5 is obtained, and the region 94 is a wide region including the distance measuring pupils 92 and 93.

図5において、破線で示す交換レンズ202の絞り開口に対応した領域95の中心と、測距瞳92および93の外接円の中心との位置関係については、交換レンズ202固有の射出瞳の位置と焦点検出画素311の撮像画面G上の位置、すなわち光軸からの距離とに応じて変化し、必ずしも一致しない。交換レンズ202の射出瞳の大きさが測距瞳92および93の外接円の大きさよりも小さく、かつ射出瞳および外接円の中心が一致しない場合には、一対の測距瞳92および93を通過する光束がアンバランスに“ケラレ”ることになり、これらの光束により形成される一対の像の光量が一致せず、歪みが生じる。   In FIG. 5, the positional relationship between the center of the region 95 corresponding to the aperture opening of the interchangeable lens 202 indicated by the broken line and the center of the circumscribed circle of the distance measuring pupils 92 and 93 is the position of the exit pupil unique to the interchangeable lens 202. It changes depending on the position of the focus detection pixel 311 on the imaging screen G, that is, the distance from the optical axis, and does not necessarily match. When the size of the exit pupil of the interchangeable lens 202 is smaller than the size of the circumscribed circle of the distance measuring pupils 92 and 93 and the centers of the exit pupil and the circumscribed circle do not coincide with each other, the pair of distance measuring pupils 92 and 93 are passed. Therefore, the light flux of the pair of images formed by these light fluxes does not match, resulting in distortion.

図6は、1つの焦点検出位置における像信号の強度分布(光量)を縦軸に、焦点検出位置内の位置偏差を横軸にとって示したものである。焦点検出位置内の位置偏差とは、例えば図3に示す撮像素子211上の1つの焦点検出位置に属する複数の焦点検出画素の位置に相当する。焦点検出光束にケラレが生じていない場合の一対の像信号400および401は、図6(a)に示すように、同一の像信号関数が単に互いに横にシフトしたものとなっている。焦点検出光束にケラレが生ずると、測距瞳を通る焦点検出用光束の量が焦点検出位置および焦点検出位置内での位置偏差によって変化する。そのため、一対の像信号402および403は図6(b)のようになり、同一の信号を相対的にシフトしたものにはならない。   FIG. 6 shows the intensity distribution (light quantity) of the image signal at one focus detection position on the vertical axis and the position deviation within the focus detection position on the horizontal axis. The position deviation within the focus detection position corresponds to the positions of a plurality of focus detection pixels belonging to one focus detection position on the image sensor 211 shown in FIG. 3, for example. A pair of image signals 400 and 401 in the case where vignetting is not generated in the focus detection light beam are obtained by simply shifting the same image signal function horizontally to each other as shown in FIG. When vignetting occurs in the focus detection light beam, the amount of the focus detection light beam passing through the distance measuring pupil changes depending on the focus detection position and the position deviation within the focus detection position. For this reason, the pair of image signals 402 and 403 are as shown in FIG. 6B, and the same signals are not relatively shifted.

<撮像動作>
図7は、ディジタルスチルカメラ210の撮像動作を示すフローチャートである。カメラ駆動制御装置212は、ステップS100でカメラの電源が投入されるとこの撮像動作を繰り返し実行する。ステップS110において、カメラ駆動制御装置212は、撮像素子211から撮像画素310のデータを間引き読み出しし、電子ビューファインダーLCD215に表示させる。撮像画素310のデータを間引き読み出しする際には、焦点検出画素311がなるべく含まれないような設定で間引き読み出しをすることによって、表示品質を向上させることができる。逆に、焦点検出画素311を含むように間引き読み出しを行い、電子ビューファインダーLCD215上に焦点検出画素出力を補正せずに表示させることによって、焦点検出位置をユーザーに認識可能に表示することもできる。
<Imaging operation>
FIG. 7 is a flowchart showing the imaging operation of the digital still camera 210. The camera drive control device 212 repeatedly executes this imaging operation when the camera is turned on in step S100. In step S <b> 110, the camera drive control device 212 thins out and reads out the data of the imaging pixel 310 from the imaging device 211 and displays it on the electronic viewfinder LCD 215. When the data of the imaging pixel 310 is thinned and read out, the display quality can be improved by performing the thinning out reading with a setting that does not include the focus detection pixel 311 as much as possible. Conversely, by performing thinning readout so as to include the focus detection pixel 311 and displaying it on the electronic viewfinder LCD 215 without correcting the focus detection pixel output, the focus detection position can be displayed recognizable to the user. .

ステップS120では、カメラ駆動制御装置212は、焦点検出画素列からデータを読み出す。なお、図2に示す焦点検出位置G1〜G5の中から予め焦点検出位置選択操作部材(不図示)により任意の焦点検出位置が選択されている場合、選択された焦点検出位置に対応する焦点検出画素列からデータを読み出す。続くステップS130において、カメラ駆動制御装置212は、焦点検出画素列に対応した一対の像データに基づいて、後述する像ズレ検出演算処理すなわち相関演算処理を行い、像ズレ量を演算し、さらにデフォーカス量を算出する。ステップS140では、カメラ駆動制御装置212は、合焦近傍か否か、つまり算出したデフォーカス量の絶対値が合焦判定基準値以内であるか否かを調べる。   In step S120, the camera drive control device 212 reads data from the focus detection pixel array. When an arbitrary focus detection position is selected in advance from the focus detection positions G1 to G5 shown in FIG. 2 by a focus detection position selection operation member (not shown), focus detection corresponding to the selected focus detection position is performed. Data is read from the pixel column. In the subsequent step S130, the camera drive control device 212 performs an image shift detection calculation process, that is, a correlation calculation process, which will be described later, based on a pair of image data corresponding to the focus detection pixel column, calculates an image shift amount, Calculate the focus amount. In step S140, the camera drive control device 212 checks whether or not the focus is close, that is, whether or not the calculated absolute value of the defocus amount is within the focus determination reference value.

ステップS140において、カメラ駆動制御装置212が合焦近傍でないと判定した場合、本処理はステップS150へ進む。ステップS150において、カメラ駆動制御装置212は、算出したデフォーカス量をレンズ駆動制御装置209へ送信し、レンズ駆動制御装置209を介して交換レンズ202のフォーカシング用レンズ207を合焦位置に駆動させ、本処理はステップS110へ戻って上記動作が繰り返される。なお、焦点検出不能な場合も、本処理はこのステップS150へ分岐し、カメラ駆動制御装置212は、レンズ駆動制御装置209へスキャン駆動命令を送信し、レンズ駆動制御装置209を介して交換レンズ202のフォーカシング用レンズ207を無限位置と至近位置との間でスキャン駆動させ、本処理はステップS110へ戻って上記動作が繰り返される。   If it is determined in step S140 that the camera drive control device 212 is not near the focus, the process proceeds to step S150. In step S150, the camera drive control device 212 transmits the calculated defocus amount to the lens drive control device 209, and drives the focusing lens 207 of the interchangeable lens 202 to the in-focus position via the lens drive control device 209. This process returns to step S110 and the above operation is repeated. Even when the focus cannot be detected, this process branches to step S150, and the camera drive control device 212 transmits a scan drive command to the lens drive control device 209, and the interchangeable lens 202 is transmitted via the lens drive control device 209. The focusing lens 207 is scan-driven between the infinite position and the closest position, and the process returns to step S110 and the above operation is repeated.

ステップS140において、カメラ駆動制御装置212が合焦近傍であると判定した場合は、本処理はステップS160へ進む。ステップS160において、カメラ駆動制御装置212は、レリーズボタン(不図示)の操作によりシャッターレリーズがなされたか否かを判定し、なされていない場合、本処理はステップS110へ戻って上記動作が繰り返される。シャッターレリーズがなされた場合、本処理はステップS170へ進み、カメラ駆動制御装置212は、レンズ駆動制御装置209へ絞り調整命令を送信し、レンズ駆動制御装置209を介して交換レンズ202の絞り208を、カメラ駆動制御装置212で露出演算により決定した制御F値、またはユーザーが手動で設定したF値に設定させる。絞り制御が終了した時点で、カメラ駆動制御装置212は、撮像素子211に撮像動作を行わせ、撮像素子211の撮像画素310およびすべての焦点検出画素311から画像データを読み出す。   If it is determined in step S140 that the camera drive control device 212 is near the in-focus state, the process proceeds to step S160. In step S160, the camera drive control device 212 determines whether or not a shutter release has been performed by operating a release button (not shown). If not, the process returns to step S110 and the above operation is repeated. When the shutter release is performed, the process proceeds to step S170, and the camera drive control device 212 transmits an aperture adjustment command to the lens drive control device 209, and the aperture 208 of the interchangeable lens 202 is set via the lens drive control device 209. Then, the control F value determined by the exposure calculation by the camera drive control device 212 or the F value manually set by the user is set. When the aperture control is finished, the camera drive control device 212 causes the imaging device 211 to perform an imaging operation, and reads image data from the imaging pixel 310 and all the focus detection pixels 311 of the imaging device 211.

ステップS180において、カメラ駆動制御装置212は、焦点検出画素列の各画素位置における画素データを、焦点検出画素311のデータおよび周囲の撮像画素310のデータに基づいて補間する。ステップS190では、カメラ駆動制御装置212は、撮像画素310のデータおよび補間された焦点検出画素位置のデータからなる画像データをメモリカード213に保存し、本処理はステップS110へ戻って上記動作が繰り返される。   In step S <b> 180, the camera drive control device 212 interpolates the pixel data at each pixel position in the focus detection pixel row based on the data of the focus detection pixel 311 and the data of the surrounding imaging pixels 310. In step S190, the camera drive control device 212 stores the image data including the data of the imaging pixel 310 and the interpolated focus detection pixel position data in the memory card 213, and the process returns to step S110 and the above operation is repeated. It is.

<焦点検出動作>
図7のステップS130における焦点検出動作の詳細の説明に先立って、一対の像信号の同一性が図6(b)のように崩れた場合に、先行技術においてどのような相関演算を用いて一対の像信号の像ズレ量が正確に検出されるかについて、特開2007−333720号公報に開示されている技術を例に、簡単に説明する。
<Focus detection operation>
Prior to the detailed description of the focus detection operation in step S130 of FIG. 7, when the identity of a pair of image signals is broken as shown in FIG. Whether the image shift amount of the image signal is accurately detected will be briefly described by taking the technique disclosed in Japanese Patent Application Laid-Open No. 2007-333720 as an example.

異なる歪みを受けて同一性が崩れた一対の像信号を、第1信号データ列A(データA〜A、Nはデータ個数)と第2信号データ列B(データB〜B)とすると、特開2007−333720号公報の明細書の(8)式に開示されているように、先行技術においては、ずらし量kにおける積算相関値C(k)を次式(1)により求めている。データA〜Aは、所定の画素ピッチで配置された一対の焦点検出画素列のうちの一方に含まれるN個の焦点検出画素がそれぞれ出力する信号値に対応し、データB〜Bは、一対の焦点検出画素列のうちの他方に含まれるN個の焦点検出画素がそれぞれ出力する画像信号の信号値に対応する。
C(k)=Σ|(A×Bn+1+k)−(Bn+k×An+1)| ・・・(1)
A pair of image signals whose identity is lost due to different distortions are divided into a first signal data string A (data A 1 to A N , N is the number of data) and a second signal data string B (data B 1 to B N ). Then, as disclosed in equation (8) of the specification of Japanese Patent Application Laid-Open No. 2007-333720, in the prior art, the integrated correlation value C (k) at the shift amount k is obtained by the following equation (1). ing. Data A 1 to A N correspond to signal values output from N focus detection pixels included in one of a pair of focus detection pixel arrays arranged at a predetermined pixel pitch, and data B 1 to B N corresponds to the signal value of the image signal output from each of the N focus detection pixels included in the other of the pair of focus detection pixel columns.
C (k) = Σ | (A n × B n + 1 + k ) − (B n + k × A n + 1 ) | (1)

(1)式において、Σ演算はnについての積算を表わし、積算においてnのとる範囲はずらし量kに応じてデータA、An+1、Bn+k、Bn+1+kが存在する範囲に限定される。データAおよびAn+1は、上述した一対の焦点検出画素列のうちの一方に含まれるN個の焦点検出画素311のうちのn番目および(n+1)番目の互いに隣接する焦点検出画素311によってそれぞれ出力された画像信号の信号値に対応する。データBn+kおよびBn+1+kは、上述した一対の焦点検出画素列のうちの他方に含まれるN個の焦点検出画素311のうちの、n番目の焦点検出画素311からずらし量kだけ離間した位置関係にある(n+k)番目および(n+1+k)番目の互いに隣接する焦点検出画素311によってそれぞれ出力された画像信号の信号値に対応する。 In equation (1), the Σ operation represents the integration for n, and the range that n takes in the integration is limited to the range in which the data A n , A n + 1 , B n + k , B n + 1 + k exist according to the shift amount k. The data An and A n + 1 are respectively obtained by the nth and (n + 1) th adjacent focus detection pixels 311 out of the N focus detection pixels 311 included in one of the pair of focus detection pixel columns described above. This corresponds to the signal value of the output image signal. The data B n + k and B n + 1 + k are in a positional relationship of the N focus detection pixels 311 included in the other of the above-described pair of focus detection pixel columns and separated from the nth focus detection pixel 311 by the shift amount k. Corresponds to the signal values of the image signals respectively output by the (n + k) th and (n + 1 + k) th adjacent focus detection pixels 311.

図8に(1)式の相関演算のデータフローを示す。第1信号データ列Aおよび第2信号データ列Bはそれぞれ1次元データ配列である。第1信号データ列Aの中の注目データAと、ずらし量kだけずれた第2信号データ列Bの中の、注目データAに対応するデータBn+kに対しデータ位置が1つずれたデータBn+1+kとを乗じて、第1演算データ(An×Bn+1+k)、すなわち第1積データを求める。それとともに、第2信号データ列BのデータBn+kと、第1信号データ列Aの注目データAに対しデータ位置が1つずれたデータAn+1とを乗じて第2演算データ(Bn+k×An+1)、すなわち第2積データを求める。第1演算データと第2演算データとの差の絶対値の総和により第1信号データ列Aと第2信号データ列Bとの積算相関値C(k)を演算する。すなわち(1)式においてはnおよびkに対応した局所相関値を、AとBn+1+kとの乗算値と、Bn+kとAn+1との乗算値との減算による差分データ((A×Bn+1+k)−(Bn+k×An+1))の絶対値として算出し、こうして算出された局所相関値をnについて積算することにより積算相関値C(k)を算出している。 FIG. 8 shows a data flow of the correlation calculation of equation (1). Each of the first signal data string A and the second signal data string B is a one-dimensional data array. And the attention data A n in the first signal data string A, in the second signal data string B which the amount of shift k, data position is shifted one with respect to data B n + k corresponding to the target data A n and multiplying the data B n + 1 + k, the first operation data (an × B n + 1 + k), i.e., obtaining a first product data. At the same time, the data B n + k of the second signal data string B, with respect to the attention data A n of the first signal data string A is multiplied by the data A n + 1 that data position is shifted one second operation data (B n + k × A n + 1 ), that is, second product data is obtained. An integrated correlation value C (k) between the first signal data string A and the second signal data string B is calculated based on the sum of absolute values of differences between the first calculation data and the second calculation data. That is, in the equation (1), the local correlation value corresponding to n and k is obtained by subtracting the difference data ((A n × B) by multiplying the product of A n and B n + 1 + k and the product of B n + k and A n + 1. n + 1 + k ) − (B n + k × A n + 1 )) is calculated as an absolute value, and the integrated correlation value C (k) is calculated by integrating the local correlation values thus calculated for n.

なお上述した(1)式における局所相関値は、第1信号データ列Aにおける部分配列(A、An+1)と第2信号データ列Bにおける部分配列(Bn+k、Bn+1+k)との間の局所的な相関値と考えることができる。部分配列の要素AとAn+1との互いに隣接した位置関係は、部分配列の要素Bn+kとBn+1+kとの互いに隣接した位置関係に等しく、その位置関係は、データ間隔で表すと1データ分となる。また部分配列の要素Aと部分配列の要素Bn+kとの位置関係は、データ間隔で表すとkデータ分となる。 The local correlation value in the above-described equation (1) is between the partial array (A n , A n + 1 ) in the first signal data string A and the partial array (B n + k , B n + 1 + k ) in the second signal data string B. It can be considered as a local correlation value. The positional relationship between the elements A n and A n + 1 of the partial array adjacent to each other is equal to the positional relationship of the elements B n + k and B n + 1 + k of the partial array adjacent to each other. It becomes. Further, the positional relationship between the element A n of the partial array and the element B n + k of the partial array is k data in terms of the data interval.

(1)式のような相関演算を行なうことにより、一対の像信号が異なる歪曲変化を受けている場合においても、歪曲変化を受ける前の正確な一対の像信号の像ズレ量を算出することが可能になる。   By performing the correlation calculation as in equation (1), even when the pair of image signals are subjected to different distortion changes, the accurate image shift amount of the pair of image signals before being subjected to the distortion change is calculated. Is possible.

しかしながら(1)式のような相関演算においては一対の像信号データの乗算を用いているため、次のような問題がある。
1.一般的に加減演算に比較して乗算演算は計算時間が長くなるので、焦点検出の応答性が低下してしまう。
2.2つのデータの乗算演算により演算結果のデータビット長が元のデータの倍となってしまうので、演算結果の処理系が複雑になるとともに、処理時間が長くなってしまう。
However, in the correlation calculation as in equation (1), since multiplication of a pair of image signal data is used, there are the following problems.
1. In general, the calculation time of the multiplication operation is longer than that of the addition / subtraction operation, so that the focus detection response is lowered.
2. Since the data bit length of the operation result is double that of the original data due to the multiplication operation of the two data, the processing system of the operation result becomes complicated and the processing time becomes longer.

本発明によれば、一対の像信号が異なる歪曲変化を受けている場合においても、歪曲変化を受ける前の正確な一対の像信号の像ズレ量を算出することが可能という先行技術の利点を維持したまま、上述した問題点を解決することができる。以下本発明に用いられる対数変換を用いた相関演算の説明に移る。   According to the present invention, even when a pair of image signals have undergone different distortion changes, the advantage of the prior art that it is possible to calculate an accurate image shift amount of a pair of image signals before undergoing the distortion change. The above-mentioned problems can be solved while maintaining. Hereinafter, the description will proceed to the correlation calculation using the logarithmic transformation used in the present invention.

(1)式では、第1演算データ(A×Bn+k)と第2演算データ(Bn+k×An+1)とが等しい場合に相関が高い、すなわち第1演算データと第2演算データとの差分が0になることとして、局所相関値を算出している。従って第1演算データと第2演算データとに対し同じ関数変換を行なってから変換後の第1演算データと第2演算データとが等しい場合に相関が高いとして局所相関値を算出してもよいことになる。この関数変換を行なうことにより、乗算演算を加減演算に変更することができれば、演算時間の短縮およびビット長の短縮が可能になる。このような特性の変換を行なう関数として対数関数を考えることができる。すなわち複数のデータの乗算を対数変換すると、各データの対数変換の和となるので、(1)式に対応する対数変換を用いた相関演算式は次式(2)となる。(2)式においてLog()は自然対数を表わすが、対数の底はネイピア数に限られない。
C(k)=Σ|Log(A×Bn+1+k)−Log(Bn+k×An+1)|
=Σ|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))| ・・・(2)
In the equation (1), when the first calculation data (A n × B n + k ) and the second calculation data (B n + k × A n + 1 ) are equal, the correlation is high, that is, the first calculation data and the second calculation data Assuming that the difference is 0, a local correlation value is calculated. Therefore, after the same function conversion is performed on the first calculation data and the second calculation data, the local correlation value may be calculated assuming that the correlation is high when the converted first calculation data and the second calculation data are equal. It will be. By performing this function conversion, if the multiplication operation can be changed to the addition / subtraction operation, the operation time and the bit length can be shortened. A logarithmic function can be considered as a function for performing such characteristic conversion. That is, when logarithmic conversion of multiplication of a plurality of data is performed, the sum of logarithmic conversions of each data is obtained, and therefore, a correlation operation expression using logarithmic conversion corresponding to the expression (1) is expressed by the following expression (2). In the equation (2), Log () represents a natural logarithm, but the base of the logarithm is not limited to the Napier number.
C (k) = Σ | Log (A n × B n + 1 + k ) −Log (B n + k × A n + 1 ) |
= Σ | (Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) + Log (A n + 1 )) | (2)

(2)式のような対数変換により乗算を加減算に変換することが可能となる。すなわち(2)式において局所相関値|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))|は、第3信号データ列LAを構成する対数変換データLog(A)〜Log(A)のうちの局所的な部分配列(Log(A),Log(An+1))と、第4信号データ列LBを構成する対数変換データLog(B)〜Log(B)のうちの、局所的な部分配列(Log(A),Log(An+1))に対応する局所的な部分配列(Log(Bn+k),Log(Bn+1+k))との間の加減演算のみで算出することができる。この加減演算により、第1和データ(Log(A)+Log(Bn+1+k))と第2和データ(Log(Bn+k)+Log(An+1))とが算出され、第1和データ(Log(A)+Log(Bn+1+k))と第2和データ(Log(Bn+k)+Log(An+1))との減算により、差分データ((Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1)))が算出される。差分データ((Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1)))の絶対値をとることで局所相関値が算出され、算出された局所相関値をnについて積算することにより積算相関値C(k)を算出している。 (2) Multiplication can be converted into addition and subtraction by logarithmic transformation as shown in equation (2). That is, in the equation (2), the local correlation value | (Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) + Log (A n + 1 )) | is the logarithmic transformation data constituting the third signal data sequence LA. Log (A 1 ) to Log (A N ), local partial arrays (Log (A n ), Log (A n + 1 )) and logarithmically transformed data Log (B 1 ) constituting the fourth signal data sequence LB ) To Log (B N ), local partial sequences (Log (B n + k ), Log (B n + 1 + k )) corresponding to the local partial sequences (Log (A n ), Log (A n + 1 )) It can be calculated only by the addition / subtraction operation between. By this addition / subtraction operation, the first sum data (Log (A n ) + Log (B n + 1 + k )) and the second sum data (Log (B n + k ) + Log (A n + 1 )) are calculated, and the first sum data (Log ( A n ) + Log (B n + 1 + k )) and the second sum data (Log (B n + k ) + Log (A n + 1 )) are subtracted from the difference data ((Log (A n ) + Log (B n + 1 + k )) − (Log ( B n + k ) + Log (A n + 1 ))) is calculated. The local correlation value is calculated by taking the absolute value of the difference data ((Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) + Log (A n + 1 ))), and the calculated local correlation value is calculated. An integrated correlation value C (k) is calculated by integrating n.

(2)式において用いる対数変換データLog(A)、Log(Bn+1+k)、Log(Bn+k)、Log(An+1)は局所相関値の算出時にその都度対数変換を行なって算出する必要はない。(2)式の演算を行なう前、例えば一対の像信号である第1信号データ列Aおよび第2信号データ列Bに対応する画像データが撮像素子211から読み出された際に、予め第1信号データ列Aと第2信号データ列Bとに対して対数変換を行なった対数化データ列として用意しておくことができる。これにより(1)式に比較して(2)式の演算量を大幅に減少し、演算時間の短縮を図ることができる。 The logarithmic transformation data Log (A n ), Log (B n + 1 + k ), Log (B n + k ), and Log (A n + 1 ) used in the equation (2) need to be calculated by performing logarithmic transformation each time when calculating the local correlation value. Absent. Before the calculation of the expression (2), for example, when image data corresponding to the first signal data sequence A and the second signal data sequence B, which are a pair of image signals, is read from the image sensor 211, the first A logarithmic data string obtained by logarithmically converting the signal data string A and the second signal data string B can be prepared. As a result, the calculation amount of the equation (2) can be greatly reduced compared to the equation (1), and the calculation time can be shortened.

例えば像ずらしを100回(k=0〜100)、第1信号データ列Aのデータ数を101(n=1〜100、n+1=2〜101)、第2信号データ列Bのデータ数を201(1≦n+k≦200、2≦n+1+k≦201)として、ずらし量kが0〜100の各値を取る毎に(1)式を用いて積算相関値の演算を行なった場合の演算量と(2)式を用いて積算相関値の演算を行なった場合の演算量とを比較すると以下のようになる。以下の比較において、(1)式には2回の乗算が含まれている点、および(2)式には3回の加減算が含まれている点がそれぞれ考慮されている。乗算に比較して加減算は大幅に演算時間が短いので、(1)式による積算相関値の演算に比較して(2)式による積算相関値の演算は20000×(乗算時間−加減算時間)−302×対数変換時間だけ演算時間は短縮される。
(1)式:乗算回数 2×100×100=20000回
減算回数 100×100=10000回
(2)式:対数変換回数 101+201=302回
加減算回数 3×100×100=30000回
For example, image shifting is performed 100 times (k = 0 to 100), the number of data of the first signal data string A is 101 (n = 1 to 100, n + 1 = 2 to 101), and the number of data of the second signal data string B is 201. As (1 ≦ n + k ≦ 200, 2 ≦ n + 1 + k ≦ 201), every time the shift amount k takes each value from 0 to 100, the calculation amount when the integrated correlation value is calculated using the equation (1) and ( 2) When the calculation amount of the integrated correlation value is calculated using the equation, the calculation amount is compared as follows. In the following comparison, it is considered that the expression (1) includes two multiplications and the expression (2) includes three additions / subtractions. Compared with multiplication, addition / subtraction has a significantly shorter calculation time. Therefore, compared with calculation of the integrated correlation value according to equation (1), calculation of the integrated correlation value according to equation (2) is 20000 × (multiplication time−addition / subtraction time) − The calculation time is shortened by 302 × logarithmic conversion time.
(1) Formula: Number of multiplications 2 × 100 × 100 = 20000 times
Number of subtractions 100 × 100 = 10000 times (2) Formula: Logarithmic conversion times 101 + 201 = 302 times
Number of additions / subtractions 3 × 100 × 100 = 30000 times

図9に(2)式の相関演算のデータフローを示す。上述したように、(2)式の演算を行なう前に予め第1信号データ列Aの各データAを対数変換した変換データLAからなる第3信号データ列LAと、第2信号データ列Bの各データBを対数変換した変換データLBからなる第4信号データ列LBとを用意する。 FIG. 9 shows a data flow of the correlation calculation of equation (2). As described above, (2) and the third signal data string LA consisting of converting data LA n for each data A n log transformed in advance the first signal data string A before performing the calculation of equation, the second signal data string A fourth signal data string LB composed of converted data LB n obtained by logarithmically converting each data B n of B is prepared.

第3信号データ列LAの中の注目データLAと、ずらし量kだけずれた第4信号データ列LBの中の注目データLAに対応するデータLBn+kに対しデータ位置が1つずれたデータLBn+1+kとを加算する。その加算結果から、第4信号データ列LBのデータLBn+kと第3信号データ列LAの注目データLAに対しデータ位置が1つずれたデータLAn+1との和を減算する。その減算結果の絶対値をnについて総和することにより、第3信号データ列LAと第4信号データ列LBとのずらし量kにおける積算相関値C(k)を演算する。すなわち(2)式においてはnおよびkに対応した局所相関値を、対数変換データであるLAとLBn+1+kとLBn+kとLAn+1との間の加減算結果の絶対値として算出し、算出した局所相関値をnについて積算することにより積算相関値C(k)を算出している。 Third signal data and the attention data LA n in the column LA, the shift amount k shifted by the fourth signal data string data data position is shifted one for data LB n + k corresponding to the target data LA n in LB Add LB n + 1 + k . From the addition result, the sum of the data LB n + k of the fourth signal data sequence LB and the data LA n + 1 whose data position is shifted by one from the data of interest LA n of the third signal data sequence LA is subtracted. By summing up the absolute values of the subtraction results for n, the integrated correlation value C (k) in the shift amount k between the third signal data string LA and the fourth signal data string LB is calculated. That is, in equation (2), the local correlation value corresponding to n and k is calculated as the absolute value of the addition / subtraction result between LA n and LB n + 1 + k , LB n + k and LA n + 1 which are logarithmic transformation data, The accumulated correlation value C (k) is calculated by accumulating the correlation values for n.

(2)式において対数変換を関数演算により行なう代わりに、対数変換ルックアップテーブルを用いて行なうことにより、さらに対数変換時間の高速化を図ることができ、その場合には演算時間はさらに短縮される。   In the equation (2), instead of performing logarithmic conversion by function calculation, logarithmic conversion lookup table is used to further increase the logarithmic conversion time. In this case, the calculation time is further shortened. The

また(2)式は以下のように変形することができる。
C(k)=Σ|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))|
=Σ|(Log(A)−Log(An+1))−(Log(Bn+k)−Log(Bn+1+k))| ・・・(3)
Further, the expression (2) can be modified as follows.
C (k) = Σ | (Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) + Log (A n + 1 )) |
= Σ | (Log (A n ) −Log (A n + 1 )) − (Log (B n + k ) −Log (B n + 1 + k )) | (3)

(3)式において絶対値演算の中の第1項(Log(A)−Log(An+1))は第1信号データ列Aのみからなる演算データであり、第2項(Log(Bn+k)−Log(Bn+1+k)は第2信号データ列Bのみからなる演算データである。(3)式の演算に先立ってnを順次変更して (Log(A)−Log(An+1))のデータ列および(Log(B)−Log(Bn+1))のデータ列を、中間処理データとして予め計算しておけば、以下のようにさらに演算量を削減し、演算時間を短縮することができる。すなわち、(1)式に比較して(3)式は、20000×乗算時間−302×対数変換時間−300×加減算時間だけ演算時間を短縮することができる。
(3)式:対数変換回数 101+201=302回
中間処理回数(加減算回数) 100+200=300回
加減算回数 100×100=10000回
In the expression (3), the first term (Log (A n ) −Log (A n + 1 )) in the absolute value calculation is calculation data consisting only of the first signal data string A, and the second term (Log (B n + k). ) −Log (B n + 1 + k ) is operation data consisting only of the second signal data string B. Prior to the operation of the expression (3), n is sequentially changed (Log (A n ) −Log (A n + 1 )). If the data sequence of ( 1 ) and the data sequence of (Log (B n ) −Log (B n + 1 )) are calculated in advance as intermediate processing data, the amount of computation can be further reduced and the computation time can be shortened as follows. That is, compared with the equation (1), the equation (3) can shorten the calculation time by 20000 × multiplication time−302 × logarithmic conversion time−300 × addition / subtraction time.
(3) Formula: Logarithmic conversion count 101 + 201 = 302 times
Intermediate processing count (addition / subtraction count) 100 + 200 = 300 times
Number of additions / subtractions 100 × 100 = 10000 times

図10に(3)式の相関演算のデータフローを示す。予め第3信号データ列LAの各データLAに対して中間処理データRA(=LA−LAn+1)からなる第5信号データ列RAと、第4信号データ列LBの各データLBに対する中間処理データRB(=LB−LBn+1)からなる第6信号データ列RBとを用意する。 FIG. 10 shows a data flow of the correlation calculation of equation (3). For each data LA n of the third signal data string LA in advance, a fifth signal data string RA consisting of intermediate processing data RA n (= LA n −LA n + 1 ) and each data LB n of the fourth signal data string LB A sixth signal data string RB including intermediate processing data RB n (= LB n −LB n + 1 ) is prepared.

第5信号データ列RAの中の注目データRAから、ずらし量kだけずれた第6信号データ列RBの中の注目データRAに対応するデータRBn+kを減算する。その演算結果の絶対値をnについて総和することにより、第5信号データ列RAと第6信号データ列RBとのずらし量kにおける積算相関値C(k)を演算する。すなわち(3)式においてはnおよびkに対応した局所相関値を、中間処理データRAとRBn+kとの差分の絶対値として算出し、算出した局所相関値をnについて積算することにより積算相関値C(k)を算出している。 Data RB n + k corresponding to the attention data RA n in the sixth signal data string RB shifted by the shift amount k is subtracted from the attention data RA n in the fifth signal data string RA. The integrated correlation value C (k) in the shift amount k between the fifth signal data string RA and the sixth signal data string RB is calculated by summing up the absolute values of the calculation results for n. That is, in equation (3), the local correlation value corresponding to n and k is calculated as the absolute value of the difference between the intermediate processing data RA n and RB n + k, and the calculated local correlation value is integrated over n to calculate the integrated correlation. A value C (k) is calculated.

図11は、横軸を入力x(0〜255)、縦軸を出力y(〜255)とした場合の対数変換の関係を示したグラフであって、最も単純な対数変換である対数変換T0=255×Log(x)/Log(255)の場合を示している。このような対数変換T0の場合には、入力xのデータ値が小さくなるほど、対数変換T0の入力xについての1次微分係数が大きくなる。イメージセンサのデータはショットノイズのためデータ値が小さいほどSN比が悪化するので、対数変換T0を行なうとデータ値が小さい領域のノイズが拡大してしまう場合がある。したがって、入力データ値が小さい範囲では1次微分係数を小さくすることが好ましい。像ズレ検出の入力データ値域が、データ値が中〜大の値領域に該当すると、上述した1次微分係数が小さい場合がある。1次微分係数を大きくすることにより、分解能を向上して、演算精度を向上させることが好ましい。対数変換T0の場合には、入力データが0に対して出力データが無限大に発散してしまうので、これを防止することが好ましい。   FIG. 11 is a graph showing the relationship of logarithmic transformation when the horizontal axis is input x (0 to 255) and the vertical axis is output y (up to 255), and is the logarithmic transformation T0 that is the simplest logarithmic transformation. = 255 × Log (x) / Log (255). In the case of such logarithmic transformation T0, the smaller the data value of the input x, the larger the first derivative for the input x of the logarithmic transformation T0. Since the image sensor data is shot noise, the smaller the data value, the worse the S / N ratio. Therefore, when logarithmic transformation T0 is performed, noise in a region where the data value is small may increase. Therefore, it is preferable to reduce the primary differential coefficient in a range where the input data value is small. When the input data value range for image shift detection corresponds to a value range where the data value is medium to large, the above-described primary differential coefficient may be small. It is preferable that the resolution is improved and the calculation accuracy is improved by increasing the primary differential coefficient. In the case of logarithmic transformation T0, it is preferable to prevent this because the output data diverges infinitely when the input data is 0.

入力データ値が小さくなる部分の1次微分係数を小さくするためには、図11に示す対数変換T1=255×(Log(x)−Log(10))/(Log(255)−Log(10))を行なうこととしてもよい。   In order to reduce the primary differential coefficient in the portion where the input data value is small, the logarithmic transformation T1 = 255 × (Log (x) −Log (10)) / (Log (255) −Log (10) shown in FIG. )) May be performed.

入力データのSN比が所定値以上となる最小入力データ値をx0、例えば10とし、入力データの値域の最大値が出力データの値域の最大値となるように対数変換するとともに、x0以下の入力データに対する出力データを無効データとして0にクリップすることとしてもよい。この場合、対数変換T1とは異なって、入力データ値が10より小さい場合は出力データがマイナス符号の大きな値になることなく、0である。したがって、入力データのビット長と出力データのビット長とを揃えることが困難ということは無い。入力データが0に対して出力データが無限大に発散してしまうということも無い。   The minimum input data value at which the S / N ratio of the input data is greater than or equal to a predetermined value is x0, for example 10, and logarithm conversion is performed so that the maximum value of the input data range becomes the maximum value of the output data range. The output data corresponding to the data may be clipped to 0 as invalid data. In this case, unlike the logarithmic transformation T1, when the input data value is smaller than 10, the output data is 0 without becoming a large value with a minus sign. Therefore, it is not difficult to match the bit length of the input data and the bit length of the output data. There is no possibility that the output data diverges infinitely when the input data is 0.

例えば入力データxを8ビット(0〜255)、出力データyを8ビット(0〜255)とした場合、入力データxと出力データyの対数変換の関係は以下の式になる。
x>x0の場合:y=255×(Log(x) −Log(x0))/(Log(255) −Log(x0)) 有効データ
x≦x0の場合:y=0 無効データ
・・・(4)
For example, when the input data x is 8 bits (0 to 255) and the output data y is 8 bits (0 to 255), the logarithmic conversion relationship between the input data x and the output data y is as follows.
When x> x0: y = 255 × (Log (x) −Log (x0)) / (Log (255) −Log (x0)) When valid data x ≦ x0: y = 0 invalid data
... (4)

(4)式において例えばx0=10とすれば、対数変換T1を0クリップした対数変換T1’が得られる。図12は対数変換T1を用いて入力データ列Xi(40>最小値>10、最大値≦255)の信号波形I0を出力データ列Yiの信号波形I1に変換した場合のグラフであり、入力データの値域と出力データの値域はほぼ揃っており、出力データにおいて0クリップは発生していない。   If, for example, x0 = 10 in the equation (4), a logarithmic transformation T1 'obtained by clipping the logarithmic transformation T1 by 0 is obtained. FIG. 12 is a graph when the signal waveform I0 of the input data string Xi (40> minimum value> 10, maximum value ≦ 255) is converted into the signal waveform I1 of the output data string Yi using the logarithmic transformation T1, and the input data The value range of the output data and the value range of the output data are almost the same, and no 0 clip occurs in the output data.

また例えば入力データの値が40以下においてノイズ量が多い場合には、(4)式においてx0=40とすることにより、入力データが40以下で出力データを0クリップした対数変換T2(図11)を用いて対数変換を行なう。図13は対数変換T2を用いて図12と同じ入力データ列Xiの信号波形I0を出力データ列Yiの信号波形I2に変換した場合のグラフであり、入力データの値が40以下の場合には出力データは0クリップされる(図13の信号波形I2の一部S2を参照)。   For example, when the value of input data is 40 or less and the amount of noise is large, x0 = 40 in equation (4), so that logarithmic transformation T2 in which the input data is 40 or less and the output data is clipped 0 (FIG. 11). Logarithmic conversion is performed using. FIG. 13 is a graph when the signal waveform I0 of the same input data string Xi as that of FIG. 12 is converted into the signal waveform I2 of the output data string Yi using logarithmic conversion T2, and when the value of the input data is 40 or less. The output data is clipped by 0 (see a part S2 of the signal waveform I2 in FIG. 13).

(4)式の代わりに(5)式の対数変換を採用することにより、入力データの値域が狭い場合には出力データの値域を拡大して、対数変換の際の誤差を小さくすることもできる。
x>x0の場合:y=M×(Log(x) −Log(x0))/(Log(M) −Log(x0)) 有効データ
x≦x0の場合:y=0 無効データ
・・・(5)
By adopting the logarithmic transformation of the formula (5) instead of the formula (4), when the range of the input data is narrow, the range of the output data can be expanded to reduce the error in the logarithmic transformation. .
When x> x0: y = M × (Log (x) −Log (x0)) / (Log (M) −Log (x0)) When valid data x ≦ x0: y = 0 invalid data
... (5)

(5)式において例えばx0=40、M=400とすれば、図11の対数変換T3が得られる。図14は対数変換T3を用いて入力データ列Xi(最小値>50>x0、最大値<180<255、値域の幅約100)の信号波形I3を出力データ列Yiの信号波形I4に変換した場合のグラフである。図14に示すように、信号波形I3の値域の幅約100に対して、信号波形I4の値域の幅は150を超えた値に拡大している。   For example, if x0 = 40 and M = 400 in the equation (5), the logarithmic transformation T3 of FIG. 11 is obtained. In FIG. 14, the signal waveform I3 of the input data string Xi (minimum value> 50> x0, maximum value <180 <255, range width about 100) is converted into the signal waveform I4 of the output data string Yi using logarithmic transformation T3. It is a graph of the case. As shown in FIG. 14, the width of the value range of the signal waveform I4 is expanded to a value exceeding 150, while the width of the value range of the signal waveform I3 is about 100.

上述したように特性の異なる対数変換(クリップ値、入出力の値範囲)を用意しておき、入力データの特性(最小値、最大値、データ値ヒストグラムなど)に応じて適切な対数変換を選択して用いることは有用である。   As described above, logarithmic transformations (clip values, input / output value ranges) with different characteristics are prepared, and appropriate logarithmic transformations are selected according to the characteristics of input data (minimum value, maximum value, data value histogram, etc.) It is useful to use as

またイメージセンサの電荷蓄積時間に応じて熱雑音による入力データのSN比が変化したり、イメージセンサの感度設定に応じてショットノイズによる入力データのSN比が変化するので、電荷蓄積時間または感度設定に応じて適切な対数変換を選択して用いるようにしてもよい。電荷蓄積時間が長い場合や感度設定が高い場合はx0を大きくするなど、電荷蓄積時間または感度設定に応じてクリップを異ならせる。   In addition, the SN ratio of input data due to thermal noise changes according to the charge accumulation time of the image sensor, or the SN ratio of input data due to shot noise changes according to the sensitivity setting of the image sensor. An appropriate logarithmic transformation may be selected and used according to the above. When the charge accumulation time is long or the sensitivity setting is high, x0 is increased, for example, the clip is made different according to the charge accumulation time or sensitivity setting.

例えば(4)式のような一部のデータを無効データ化して対数変換を行なう場合には以下のような点を考慮することが好ましい。すなわち、第1信号データ列Aおよび第2信号データ列Bに対してこのような対数変換を行なって生成した第1信号データ列LAおよび第2信号データ列LBに対して、(2)式のような局所得相関値の積算を行なって積算相関値C(k)を求める際、局所相関値の演算に用いるデータの中に無効データが含まれている場合には、以下に示す無効化処理を行なうことによって、積算相関値C(k)の値に誤差が生じ、像ズレ検出演算精度が低下してしまう可能性を無くしておくのが好ましい。   For example, the following points are preferably taken into account when logarithmic conversion is performed by converting some data as shown in equation (4) to invalid data. That is, with respect to the first signal data sequence LA and the second signal data sequence LB generated by performing such logarithmic conversion on the first signal data sequence A and the second signal data sequence B, When the integration value of local correlation values is calculated to obtain the integrated correlation value C (k), if invalid data is included in the data used for the calculation of the local correlation value, the following invalidation processing is performed. It is preferable to eliminate the possibility that an error will occur in the value of the integrated correlation value C (k) and the accuracy of the image shift detection will be reduced.

図15(b)および(d)は、相関演算が施される一対の入力信号波形を示したグラフであり、縦軸はデータ値、横軸はデータ位置を示す。また図15(a)、(c)および(e)は相関演算の演算結果を示したグラフであり、縦軸は積算相関値C(k)、横軸はずらし量kである。図15(b)において、一対の入力信号波形Ia1およびIb1は、ケラレ等により、ずらし量k=0の信号波形に対し異なるゲインを乗じた信号波形となっており、相関演算結果はずらし量k=0において最高相関となること、すなわち積算相関値c(k)が極小値をとることが期待される。図15(b)の一対の入力信号波形Ia1およびIb1に対して、(1)式に示す従来の相関演算を行なった場合、図15(a)に示す積算相関値C(k)のグラフが得られ、積算相関値C(k)はずらし量k=0において極小値となる。   FIGS. 15B and 15D are graphs showing a pair of input signal waveforms on which correlation calculation is performed. The vertical axis indicates the data value, and the horizontal axis indicates the data position. FIGS. 15A, 15C, and 15E are graphs showing the calculation results of the correlation calculation. The vertical axis represents the integrated correlation value C (k), and the horizontal axis represents the shift amount k. In FIG. 15B, the pair of input signal waveforms Ia1 and Ib1 are signal waveforms obtained by multiplying the signal waveform with the shift amount k = 0 by a different gain due to vignetting or the like, and the correlation calculation result is the shift amount k. It is expected that the highest correlation is obtained at = 0, that is, the integrated correlation value c (k) takes a minimum value. When the conventional correlation calculation shown in Equation (1) is performed on the pair of input signal waveforms Ia1 and Ib1 shown in FIG. 15B, the graph of the integrated correlation value C (k) shown in FIG. The integrated correlation value C (k) obtained is a minimum value when the shift amount k = 0.

図15(b)の一対の入力波形Ia1およびIb1に対して図11の対数変換T2を用いて対数変換を行なった場合、図15(d)の一対の入力信号波形Ia2およびIb2が得られ、入力信号波形Ia1の一部のデータ(データ値が40以下)は入力信号波形Ia2において無効データ(データ値0)となる。図15(d)の無効データを含む入力信号波形Ia2と無効データを含まないIb2とに対して、(2)式に示す相関演算を行なった場合、図15(C)に示す積算相関値C(k)のグラフが得られ、積算相関値C(k)がずらし量kの一点で極小値とならずブロードになってしまう。そのため最高相関を示すずらし量kを無理矢理決定したとしても、ノイズの影響により決定したずらし量は誤差が大きいとともに大幅な揺らぎを持ってしまう場合がある。このような場合、すなわち(2)式における局所相関値の積算の際に、局所相関値の算出に用いるデータの中に無効データが含まれている場合には、その局所相関値の値を0として無効化することが有効である。   When logarithmic transformation is performed on the pair of input waveforms Ia1 and Ib1 in FIG. 15B using the logarithmic transformation T2 in FIG. 11, the pair of input signal waveforms Ia2 and Ib2 in FIG. A part of the data (data value is 40 or less) of the input signal waveform Ia1 becomes invalid data (data value 0) in the input signal waveform Ia2. When the correlation calculation shown in the equation (2) is performed on the input signal waveform Ia2 including invalid data and Ib2 not including invalid data in FIG. 15D, the integrated correlation value C shown in FIG. The graph of (k) is obtained, and the integrated correlation value C (k) is not a minimum value at one point of the shift amount k but becomes broad. Therefore, even if the shift amount k indicating the maximum correlation is forcibly determined, the shift amount determined by the influence of noise may have a large error and a large fluctuation. In such a case, that is, when invalid data is included in the data used for calculating the local correlation value in the integration of the local correlation value in the expression (2), the value of the local correlation value is set to 0. It is effective to invalidate as.

例えば第1信号データ列Aの各データAと第2信号データ列Bの各データBとを(4)式で示す対数変換T2(x0=40)で対数変換して、変換データLAからなる第3信号データ列LAと変換データLBからなる第4信号データ列LBとを生成する。次に以下の式で局所相関値E(n)を算出する。
LA、LBn+1+k、LBn+k、LAn+1のいずれかが無効データ(0)の場合
E(n)=0
その他の場合
E(n)=|(LA+LBn+1+k)−(LBn+k)+LAn+1)|
・・・(6)
For example, each data An of the first signal data string A and each data B n of the second signal data string B are logarithmically converted by logarithmic conversion T2 (x0 = 40) expressed by the equation (4), and converted data LA n is obtained. generating a fourth signal data string LB to the third signal data string LA made consisting of converted data LB n from. Next, the local correlation value E (n) is calculated by the following formula.
When any of LA n , LB n + 1 + k , LB n + k , and LA n + 1 is invalid data (0) E (n) = 0
In other cases, E (n) = | (LA n + LB n + 1 + k ) − (LB n + k ) + LA n + 1 ) |
... (6)

さらに以下のように局所相関値E(n)をnについて積算して積算相関値C(k)を求める。
C(k)=ΣE(n) ・・・(7)
Further, the integrated correlation value C (k) is obtained by integrating the local correlation value E (n) with respect to n as follows.
C (k) = ΣE (n) (7)

(7)式において、局所相関値C(k)の積算の際には無効化された局所相関値E(n)の値は0なので積算されないことになる。このようにすれば積算相関値C(k)は有効データのみを用いて演算した局所相関値を積算した値となるので、無効データによる影響を受けない高精度な演算が可能になる。   In equation (7), when the local correlation value C (k) is integrated, the invalidated local correlation value E (n) is 0, so that it is not integrated. In this way, since the integrated correlation value C (k) is a value obtained by integrating the local correlation values calculated using only valid data, highly accurate calculation that is not affected by invalid data becomes possible.

一対の入力波形Ia1とIb1(図15(B))に対して対数変換T2((4)式)を用いて対数変換を行なって生成した無効データを含む入力信号波形Ia2と無効データを含まないIb2(図15(D))に対して、(6)式、(7)式により積算相関値C(k)を行なった場合、図15(E)に示す積算相関値C(k)のグラフが得られ、積算相関値C(k)はずらし量k=0において極小値となる。   The input signal waveform Ia2 including invalid data generated by performing logarithmic conversion on the pair of input waveforms Ia1 and Ib1 (FIG. 15B) using the logarithmic conversion T2 (Equation (4)) does not include invalid data. When the integrated correlation value C (k) is performed with respect to Ib2 (FIG. 15D) by the expressions (6) and (7), the graph of the integrated correlation value C (k) shown in FIG. And the integrated correlation value C (k) becomes a minimum value when the shift amount k = 0.

上述した局所相関値の算出に用いるデータの中に無効データが含まれている場合に、該局所相関値の値を0として無効化する手法は、図10に示すような中間処理データを用いた積算相関値の算出の際にも用いることができる。   When invalid data is included in the data used to calculate the local correlation value described above, the method of invalidating the local correlation value as 0 uses intermediate processing data as shown in FIG. It can also be used when calculating the integrated correlation value.

例えば図10において第3信号データ列LAの各データLAに対して中間処理データRA(=LA−LAn+1)からなる第5信号データ列RAを算出する際に、LAまたはLAn+1のいずれかが無効データ(0)の場合には、中間処理データRAを無効データ(0)とする。また第4信号データ列LBの各データLBnに対する中間処理データRB(=LB−LBn+1)からなる第6信号データ列RBを算出する際に、LBまたはLBn+1のいずれかが無効データ(0)の場合には、中間処理データRBを無効データ(0)とする。 For example, in FIG. 10, when calculating the fifth signal data sequence RA including the intermediate processing data RA n (= LA n −LA n + 1 ) for each data LA n of the third signal data sequence LA, LA n or LA n + 1 Is invalid data (0), the intermediate processing data RA n is set to invalid data (0). The intermediate processing data RB n for each data LBn fourth signal data string LB (= LB n -LB n + 1) when calculating the sixth signal data string RB consisting of, LB n or LB n + 1 of any invalid data In the case of (0), the intermediate process data RB n is set as invalid data (0).

次に以下の式で局所相関値F(n)を算出する。
RA、RBn+kのいずれかが無効データ(0)の場合
F(n)=0
その他の場合
F(n)=|RA−RBn+k
・・・(8)
Next, the local correlation value F (n) is calculated by the following equation.
When either RA n or RB n + k is invalid data (0) F (n) = 0
In other cases, F (n) = | RA n −RB n + k |
... (8)

さらに以下のように局所相関値F(n)をnについて積算して積算相関値C(k)を求める。
C(k)=ΣF(n) ・・・(9)
Further, the integrated correlation value C (k) is obtained by integrating the local correlation value F (n) with respect to n as follows.
C (k) = ΣF (n) (9)

(9)式において局所相関値C(k)の積算の際には無効化された局所相関値F(n)の値は0なので積算されないことになる。このようにすれば積算相関値C(k)は有効な中間処理データのみを用いて演算した局所相関値を積算した値となるので、無効な中間処理データによる影響を受けない高精度な演算が可能になる。   In the expression (9), when the local correlation value C (k) is integrated, the invalidated local correlation value F (n) is 0, so that it is not integrated. In this way, since the integrated correlation value C (k) is a value obtained by integrating the local correlation values calculated using only valid intermediate processing data, high-precision calculation that is not affected by invalid intermediate processing data can be performed. It becomes possible.

(6)式および(7)式、または(8)式および(9)式を用いて局所相関値を積算して積算相関値を求める際に無効化された局所相関値の数が多い場合には、積算相関値の値が相対的に小さくなり、あたかも相関度が高くなったかのように振る舞うので、誤差を生ずる可能性がある。積算相関値を算出する際に用いられた有効な局所積算値の積算回数に応じて積算相関値を正規化することにより、そのような誤差を防止することができる。   When there are a large number of invalid local correlation values when the integrated correlation values are obtained by integrating the local correlation values using the expressions (6) and (7) or (8) and (9). Since the integrated correlation value becomes relatively small and the behavior is as if the degree of correlation is high, an error may occur. Such an error can be prevented by normalizing the integrated correlation value in accordance with the number of integrations of the effective local integrated value used in calculating the integrated correlation value.

例えば(7)式において全積算回数をNaとし、無効な局所相関値の積算回数をNbとした場合には、有効な局所積算値の積算回数は(Na−Nb)であるから、(7)式で求めた積算相関値C(k)を次式(10)のように積算相関値D(k)に正規化する。
D(k)=C(K)×Na/(Na−Nb) ・・・(10)
For example, in equation (7), when the total number of integrations is Na and the number of invalid local correlation values is Nb, the effective number of local integration values is (Na−Nb). The accumulated correlation value C (k) obtained by the equation is normalized to the accumulated correlation value D (k) as in the following equation (10).
D (k) = C (K) × Na / (Na−Nb) (10)

(10)式においては、無効な局所相関値の積算回数が多いほど、すなわち有効な局所相関値の積算回数が少ないほど、積算相関値C(k)が正規化されて増大するので、上述のような誤差を防止することができる。   In the equation (10), the integrated correlation value C (k) is normalized and increased as the number of invalid local correlation value integrations increases, that is, as the number of effective local correlation value integrations decreases. Such an error can be prevented.

本実施の形態における相関演算装置においては、上述した対数変換を用いる相関演算処理が行なわれる。対数変換を用いる相関演算処理は、乗算を用いる相関演算処理に比較して演算時間を短縮できるという利点を有する。またデータ値が適切なレベルに入っていれば演算精度の維持も可能である。データ値が適切なレベルになく対数変換の際に一部データが無効データ化された場合には、全データ数に対する無効データ数の割合に応じて演算精度が劣化しないよう、この相関演算装置において行なわれる相関演算処理には、乗算を用いた第1の相関演算と、その乗算に対応する加算を含む対数変換を用いた第2の相関演算とが含まれることが好ましい。さらには第1および第2の相関演算が状況に応じて適切に選択して用いられることが好ましい。   In the correlation calculation device according to the present embodiment, the correlation calculation process using the logarithmic transformation described above is performed. The correlation calculation process using logarithmic transformation has an advantage that the calculation time can be shortened compared to the correlation calculation process using multiplication. If the data value is within an appropriate level, the calculation accuracy can be maintained. In this correlation calculation device, if the data value is not at an appropriate level and some data is invalidated during logarithmic conversion, the calculation accuracy does not deteriorate according to the ratio of the number of invalid data to the total number of data. The correlation calculation processing to be performed preferably includes a first correlation calculation using multiplication and a second correlation calculation using logarithmic transformation including addition corresponding to the multiplication. Furthermore, it is preferable that the first and second correlation calculations are appropriately selected and used according to the situation.

図16は、図7に示す撮像動作の中のステップS130の焦点検出動作の詳細を示すフローチャートである。   FIG. 16 is a flowchart showing details of the focus detection operation in step S130 in the imaging operation shown in FIG.

ステップS300において、カメラ駆動制御装置212により焦点検出演算処理が開始される。、ステップS301で、カメラ駆動制御装置212は、焦点検出画素列から出力される一対の信号データ列(α〜α、β〜β:Mはデータの個数)に対して下記(11)式に示すような高周波カットフィルター処理を施す。こうして、カメラ駆動制御装置212は、第1信号データ列A(データA〜A:Nはデータ個数)および第2信号データ列B(データB〜B)を生成し、信号データ列から相関処理に悪影響を及ぼすノイズ成分や高周波成分を除去する。(11)式において、n=1〜Nである。
An=α+2×αn+1+αn+2
Bn=β+2×βn+1+βn+2
・・・(11)
In step S300, the camera drive control device 212 starts focus detection calculation processing. In step S301, the camera drive control device 212 performs the following (11) with respect to a pair of signal data sequences (α 1 to α M , β 1 to β M : M is the number of data) output from the focus detection pixel sequence. ) Apply high frequency cut filter treatment as shown in the equation. Thus, the camera drive control device 212 generates the first signal data string A (data A 1 to A N : N is the number of data) and the second signal data string B (data B 1 to B N ), and the signal data string Noise components and high-frequency components that adversely affect correlation processing are removed. In the formula (11), n = 1 to N.
An = α n + 2 × α n + 1 + α n + 2 ,
Bn = β n + 2 × β n + 1 + β n + 2
(11)

なお、演算時間の短縮を図る場合や、すでに大きくデフォーカスしていて高周波成分が少ないことがわかっている場合には、ステップS301の高周波カットフィルター処理を省略することができる。   Note that the high-frequency cut filter processing in step S301 can be omitted if the calculation time is to be shortened or if it has already been greatly defocused and it is known that there are few high-frequency components.

ステップS302において、カメラ駆動制御装置212は、第1信号データ列Aの平均値および第2信号データ列Bの平均値が両方とも所定閾値を越えているかチェックする。所定閾値を越えている場合には、本処理はステップS303の第2相関演算に分岐し、対数変換による相関演算で演算時間短縮が図られる。所定閾値を越えていない場合には、本処理はステップS304の第1相関演算に分岐し、乗算による相関演算で演算精度が維持される。上述した所定閾値は、例えば第1信号データ列Aおよび第2信号データ列Bの両方を合わせたデータ範囲を0〜MaxDとした場合に、0.1×MaxDとすることができる。   In step S302, the camera drive control device 212 checks whether both the average value of the first signal data string A and the average value of the second signal data string B exceed a predetermined threshold. If the predetermined threshold value is exceeded, the process branches to the second correlation calculation in step S303, and the calculation time is shortened by the correlation calculation by logarithmic transformation. If the predetermined threshold value is not exceeded, the process branches to the first correlation calculation in step S304, and the calculation accuracy is maintained by the correlation calculation by multiplication. The predetermined threshold described above can be set to 0.1 × MaxD, for example, when the data range of both the first signal data string A and the second signal data string B is 0 to MaxD.

なおステップS302の分岐判定処理における判定条件は、上記のような平均値に基づく判定条件に限定されず、他の判定条件であってもよい。第1信号データ列Aおよび第2信号データ列Bのデータ特性やノイズ特性に影響を与える要因に応じて、第2相関演算処理による演算精度が確保できる状況であれば、第2相関演算処理を選択することにより演算時間の短縮をはかり、第2相関演算処理による演算精度の確保が困難な状況であれば、第1相関演算処理を選択することにより演算精度の確保をはかることができればよい。例えば所定閾値を下回るデータの個数をカウントし、そのカウントしたデータの個数の全データ数に対する割合が所定値を越えた場合に、第1相関演算処理に分岐し、越えない場合に第2相関演算処理に分岐するようにしてもよい。また測光センサー(不図示)により被写界輝度を測定し、測定した輝度値が所定値を越えた場合に第2相関演算処理に分岐し、越えない場合に第1相関演算処理に分岐するようにしてもよい。あるいは撮像素子の感度設定に応じて、感度が所定値を越える場合には場合に第1相関演算処理に分岐し、越えない場合に第2相関演算処理に分岐するようにしてもよい。   Note that the determination condition in the branch determination process in step S302 is not limited to the determination condition based on the average value as described above, and may be another determination condition. If the calculation accuracy by the second correlation calculation process can be ensured according to the factors affecting the data characteristics and noise characteristics of the first signal data string A and the second signal data string B, the second correlation calculation process is performed. If the selection is intended to shorten the calculation time and it is difficult to ensure the calculation accuracy by the second correlation calculation process, it is sufficient that the calculation accuracy can be ensured by selecting the first correlation calculation process. For example, the number of data that falls below a predetermined threshold is counted, and if the ratio of the counted number of data to the total number of data exceeds a predetermined value, the process branches to the first correlation calculation process. You may make it branch to a process. Further, the field luminance is measured by a photometric sensor (not shown), and if the measured luminance value exceeds a predetermined value, the process branches to the second correlation calculation process, and if not, the process branches to the first correlation calculation process. It may be. Alternatively, depending on the sensitivity setting of the image sensor, if the sensitivity exceeds a predetermined value, the process may branch to the first correlation calculation process, and if not, the process may branch to the second correlation calculation process.

ステップS303において、カメラ駆動制御装置212は、第1信号データ列Aおよび第2信号データ列Bに対し後述の図17のステップS310〜ステップS399に示す第2相関演算(対数変換による相関演算処理)を行なって焦点検出位置のデフォーカス量を算出し、本処理はステップS305に進む。   In step S303, the camera drive control device 212 performs second correlation calculation (correlation calculation processing by logarithmic transformation) shown in steps S310 to S399 of FIG. 17 described later on the first signal data string A and the second signal data string B. To calculate the defocus amount at the focus detection position, and the process proceeds to step S305.

ステップS304において、カメラ駆動制御装置212は、第1信号データ列Aおよび第2信号データ列Bに対し第1相関演算((1)式の相関演算)を行なって焦点検出位置のデフォーカス量を算出し、本処理はステップS305に進む。   In step S304, the camera drive control device 212 performs a first correlation calculation (correlation calculation of equation (1)) on the first signal data string A and the second signal data string B to determine the defocus amount at the focus detection position. Then, the process proceeds to step S305.

ステップS305において、カメラ駆動制御装置212は、焦点検出演算処理(相関演算処理)を終了してリターンする。   In step S305, the camera drive control device 212 ends the focus detection calculation process (correlation calculation process) and returns.

図17は、図16のステップS303の第2相関演算処理(対数変換による相関演算処理)の詳細を示すフローチャートである。ステップS310において、カメラ駆動制御装置212は第2相関演算処理を開始し、ステップS320において、カメラ駆動制御装置212は、第1信号データ列AのデータA〜Aおよび第2信号データ列BのデータB〜Bのデータ値分布を検出する。具体的には最小値、最大値、ヒストグラム最頻値などを検出する。 FIG. 17 is a flowchart showing details of the second correlation calculation process (correlation calculation process by logarithmic transformation) in step S303 of FIG. In step S310, the camera drive control device 212 starts the second correlation calculation process. In step S320, the camera drive control device 212 performs the data A 1 to A N of the first signal data sequence A and the second signal data sequence B. The data value distribution of the data B 1 to B N is detected. Specifically, the minimum value, maximum value, histogram mode value, etc. are detected.

ステップS330において、カメラ駆動制御装置212は、検出されたデータ値分布に応じて、ノイズによる影響が少ないとともに入力データ値範囲に対して出力データ値範囲がなるべく広い対数変換を、複数の対数ルックアップテーブルLUTの中から選択する。複数の対数ルックアップテーブルとは、例えば前述のT1’、T2、T3に対応したルックアップテーブルLUTであって、カメラ駆動制御装置212内部に記憶されている。所定値以下の入力データに対する出力データは無効データとされている。   In step S330, the camera drive control device 212 performs logarithmic conversion with a plurality of logarithmic lookups that are less affected by noise and have a wider output data value range than the input data value range in accordance with the detected data value distribution. Select from the table LUT. The plurality of logarithmic lookup tables are, for example, lookup tables LUT corresponding to the above-described T1 ', T2, and T3, and are stored in the camera drive control device 212. Output data for input data below a predetermined value is invalid data.

ステップS340において、ステップS330において選択された対数ルックアップテーブルLUTを用いて、カメラ駆動制御装置212は、第1信号データ列AのデータA〜Aおよび第2信号データ列BのデータB〜Bを、第3信号データ列LAの各データLAおよび第4信号データ列LBの各データLBに変換する。 In step S340, using the logarithmic lookup table LUT selected in step S330, the camera drive control device 212 uses the data A 1 to A N of the first signal data sequence A and the data B 1 of the second signal data sequence B. ˜B N are converted into each data LA n of the third signal data string LA and each data LB n of the fourth signal data string LB.

ステップS350において、カメラ駆動制御装置212は、ずらし量k(整数)における第3信号データ列LAと第4信号データ列LBとの相関量を演算するために、まず第3信号データ列LAのデータLAに対して第4信号データ列LBのデータLBを相対的に所定ずらし量kだけずらす。 In step S350, the camera drive control device 212 first calculates data of the third signal data sequence LA in order to calculate the correlation amount between the third signal data sequence LA and the fourth signal data sequence LB at the shift amount k (integer). The data LB n of the fourth signal data string LB is shifted relative to LA n by a predetermined shift amount k.

ステップS360にて、カメラ駆動制御装置212は、第3信号データ列LAのデータと相対的にずらし量kだけずらされた第4信号データ列LBのデータとの間において、第2相関演算、すなわち(6)式による局所相関値の算出、および(7)式による局所相関値の積算を行ない、所定ずらし量kにおける積算相関値C(k)を算出する。   In step S360, the camera drive control device 212 performs the second correlation calculation between the data of the third signal data sequence LA and the data of the fourth signal data sequence LB shifted by the shift amount k, that is, The calculation of the local correlation value by the equation (6) and the integration of the local correlation value by the equation (7) are performed to calculate the integrated correlation value C (k) at the predetermined shift amount k.

ステップS370において、カメラ駆動制御装置212は、相対的なずらし量kを所定の範囲で変更しながら、ステップS350およびステップS360の処理を繰り返し、各ずらし量kに対応する積算相関値C(k)を算出する。   In step S370, the camera drive control device 212 repeats the processing of steps S350 and S360 while changing the relative shift amount k within a predetermined range, and the integrated correlation value C (k) corresponding to each shift amount k. Is calculated.

ステップS380において、カメラ駆動制御装置212は、各ずらし量kに対応して算出された積算相関値C(k)に基づき、積算相関値C(k)が最小となるずらし量k0を算出する。カメラ駆動制御装置212は、ずらし量k0とその前後のずらし量(k0−1)および(k0+1)との積算相関値C(k0−1)、C(k0)、およびC(k0+1)を用い、周知の3点内挿演算に基づく補間により、最高相関を与えるずらし量kmを求める。また最小となるずらし量k0が見つからない場合や、積算相関値C(k0)の値が所定閾値より大きい場合には、焦点検出不能と判定する。   In step S380, the camera drive control device 212 calculates a shift amount k0 that minimizes the integrated correlation value C (k) based on the integrated correlation value C (k) calculated corresponding to each shift amount k. The camera drive control device 212 uses the accumulated correlation values C (k0-1), C (k0), and C (k0 + 1) of the shift amount k0 and the shift amounts (k0-1) and (k0 + 1) before and after the shift amount k0, A shift amount km giving the highest correlation is obtained by interpolation based on a known three-point interpolation operation. If the minimum shift amount k0 is not found, or if the integrated correlation value C (k0) is larger than a predetermined threshold value, it is determined that focus detection is impossible.

ステップS390において、カメラ駆動制御装置212は、ずらし量kmと焦点検出画素のピッチである検出ピッチPとの積で表される像ズレ量を、次式(12)により被写体像面の予定結像面に対するデフォーカス量DEFに変換する。 (12)式において、デフォーカス量DEFは、像ズレ量(P×km)と、一対の測距瞳の重心の開き角の大きさによって決まる変換係数Gとに基づいて算出される。
DEF=G×P×km ・・・(12)
In step S <b> 390, the camera drive control device 212 calculates the image shift amount represented by the product of the shift amount km and the detection pitch P, which is the pitch of the focus detection pixels, from the planned image formation on the subject image plane according to the following equation (12). It is converted into a defocus amount DEF for the surface. In equation (12), the defocus amount DEF is calculated based on the image shift amount (P × km) and the conversion coefficient G determined by the size of the opening angle of the center of gravity of the pair of distance measuring pupils.
DEF = G × P × km (12)

ステップS399において、焦点検出演算処理(相関演算処理)は終了してリターンする。   In step S399, the focus detection calculation process (correlation calculation process) ends and returns.

上述した図17は、図9に示したデータフローおよび(6)式および(7)式に対応した演算処理に対応するフローチャートであったが、中間処理データを用いる図10に示したデータフローならびに(8)式および(9)式に対応した演算処理に対応するように変更されることも可能である。図17のステップS350〜ステップS370に対しこのような変更を行なったフローチャートを図18に示す。   FIG. 17 described above is a flowchart corresponding to the data flow shown in FIG. 9 and the arithmetic processing corresponding to the equations (6) and (7). However, the data flow shown in FIG. It can be changed so as to correspond to the arithmetic processing corresponding to the equations (8) and (9). FIG. 18 shows a flowchart in which such changes are made to steps S350 to S370 in FIG.

図18のステップS341において、カメラ駆動制御装置212は、第3信号データ列LAの各データLA間の加減算により算出した中間処理データRAからなる第5信号データ列RAを生成し、第4信号データ列LBの各データLBの加減算により算出した中間処理データRBからなる第6信号データ列RBを生成する。ただし中間処理データの算出に用いられるいずれかのデータに無効データが含まれる場合には、中間処理データは無効データ(0)とされる。 In step S341 in FIG. 18, the camera drive control device 212 generates a fifth signal data sequence RA including the intermediate processing data RA n calculated by addition / subtraction between the data LA n of the third signal data sequence LA, A sixth signal data string RB composed of intermediate processing data RB n calculated by addition / subtraction of each data LB n of the signal data string LB is generated. However, when invalid data is included in any of the data used for calculating the intermediate process data, the intermediate process data is invalid data (0).

ステップS351において、カメラ駆動制御装置212は、ずらし量k(整数)における第5信号データ列RAと第6信号データ列RBとの相関量を演算するために、まず第5信号データ列RAのデータRAに対して第6信号データ列RBのデータRBを相対的に所定ずらし量kだけずらす。 In step S351, the camera drive control device 212 first calculates data of the fifth signal data sequence RA in order to calculate the correlation amount between the fifth signal data sequence RA and the sixth signal data sequence RB at the shift amount k (integer). The data RB n of the sixth signal data string RB is shifted relative to RA n by a predetermined shift amount k.

ステップS361において、カメラ駆動制御装置212は、第5信号データ列RAのデータと相対的にずらし量kだけずらされた第6信号データ列RBのデータとの間において第2相関演算、すなわち(8)式による局所相関値の算出および(9)式による局所相関値の積算を行ない、所定ずらし量kにおける積算相関値C(k)を算出する。   In step S361, the camera drive control device 212 performs the second correlation calculation between the data of the fifth signal data sequence RA and the data of the sixth signal data sequence RB shifted by the shift amount k, that is, (8 The local correlation value is calculated by the equation (9) and the local correlation value is integrated by the equation (9), and the integrated correlation value C (k) at the predetermined shift amount k is calculated.

ステップS371において、カメラ駆動制御装置212は、相対的なずらし量kを所定の範囲で変更しながら、ステップS351およびステップS361の処理を繰り返し、各ずらし量kに対応する積算相関値C(k)を算出する。   In step S371, the camera drive control device 212 repeats the processing in steps S351 and S361 while changing the relative shift amount k within a predetermined range, and the integrated correlation value C (k) corresponding to each shift amount k. Is calculated.

図16は、選択された焦点検出位置においてのみ焦点検出演算を行なう場合の動作フローチャートであった。上述した対数変換データを用いた相関演算は演算精度を維持したまま相関演算時間を短縮することができるので、複数の焦点検出位置において焦点検出を行なう場合にさらに効果を発揮する。例えば図2の撮像画面G上の5つの焦点検出位置G1〜G5の全てにおいて焦点検出を行なって各焦点検出位置のデフォーカス量を算出するとともに、5つの焦点検出位置G1〜G5のそれぞれにおける算出により取得した複数のデフォーカス量を平均したデフォーカス量を算出するようにしてもよい。   FIG. 16 is an operation flowchart in the case where the focus detection calculation is performed only at the selected focus detection position. Since the correlation calculation using the logarithmic conversion data described above can reduce the correlation calculation time while maintaining the calculation accuracy, it is more effective when performing focus detection at a plurality of focus detection positions. For example, focus detection is performed at all five focus detection positions G1 to G5 on the imaging screen G in FIG. 2 to calculate the defocus amount at each focus detection position, and calculation at each of the five focus detection positions G1 to G5. The defocus amount obtained by averaging the plurality of defocus amounts acquired by the above may be calculated.

図19は、上述した焦点検出動作を、図7に示す撮像動作の中のステップS130の焦点検出動作として示すフローチャートである。ステップS400において焦点検出演算処理すなわち相関演算処理が開始される。ステップS410では、カメラ駆動制御装置212は、図16のステップS301と同じように焦点検出画素列から出力される一対の信号データ列に対して高周波カットフィルター処理を施し、第1信号データ列Aと第2信号データ列Bとを生成する。   FIG. 19 is a flowchart showing the focus detection operation described above as the focus detection operation in step S130 in the imaging operation shown in FIG. In step S400, focus detection calculation processing, that is, correlation calculation processing is started. In step S410, the camera drive control device 212 performs high-frequency cut filter processing on the pair of signal data sequences output from the focus detection pixel sequence in the same manner as in step S301 in FIG. A second signal data string B is generated.

ステップS420において、カメラ駆動制御装置212は、処理対象の焦点検出位置が選択された焦点検出位置であるか否かをチェックする。焦点検出位置が選択された焦点検出位置である場合には、本処理はステップS440に分岐し、処理対象の焦点検出位置が選択された焦点検出位置でない場合には、本処理はステップS430に分岐する。処理対象の焦点検出位置が選択された焦点検出位置であるか否かは、例えばその処理対象の焦点検出位置が、ユーザーによって不図示のユーザー入力装置を介して指定された焦点検出位置であるか否かに応じて決定される。あるいは、図2の撮像画面G上の5つの焦点検出位置G1〜G5のうち、中央に配置された焦点検出位置G1に被写体像が含まれているとの推定に基づき、処理対象の焦点検出位置が焦点検出位置G1であるか否かに応じて決定されることとしてもよい。   In step S420, the camera drive control device 212 checks whether or not the focus detection position to be processed is the selected focus detection position. If the focus detection position is the selected focus detection position, the process branches to step S440. If the focus detection position to be processed is not the selected focus detection position, the process branches to step S430. To do. Whether the focus detection position to be processed is the selected focus detection position is, for example, whether the focus detection position to be processed is a focus detection position designated by the user via a user input device (not shown). It is decided according to whether or not. Alternatively, based on the estimation that the subject image is included in the focus detection position G1 arranged at the center among the five focus detection positions G1 to G5 on the imaging screen G in FIG. May be determined according to whether or not the focus detection position G1.

ステップS430において、カメラ駆動制御装置212は、第1信号データ列Aおよび第2信号データ列Bに対し、図17のステップS310〜ステップS399に示す第2相関演算(対数化による相関演算処理)を行なって焦点検出位置のデフォーカス量を算出し、本処理はステップS450に進む。   In step S430, the camera drive control device 212 performs the second correlation calculation (correlation calculation process by logarithmization) shown in steps S310 to S399 of FIG. 17 on the first signal data string A and the second signal data string B. The defocus amount at the focus detection position is calculated, and the process proceeds to step S450.

ステップS440において、カメラ駆動制御装置212は、第1信号データ列Aおよび第2信号データ列Bに対し、第1相関演算((1)式の相関演算)を行なって焦点検出位置のデフォーカス量を算出し、本処理はステップS450に進む。   In step S440, the camera drive control device 212 performs a first correlation calculation (correlation calculation of equation (1)) on the first signal data string A and the second signal data string B, thereby defocusing the focus detection position. And the process proceeds to step S450.

ステップS450において、カメラ駆動制御装置212は、図2の5つの焦点検出位置について、ステップS420〜ステップS440の処理を繰り返す。   In step S450, the camera drive control device 212 repeats the processes in steps S420 to S440 for the five focus detection positions in FIG.

ステップS460において、カメラ駆動制御装置212は、5つの焦点検出位置のデフォーカス量に重み付け平均処理を行なって最終的なデフォーカス量を算出する。重み付け平均処理においては、選択された焦点検出位置のデフォーカス量に対して他の焦点検出位置のデフォーカス量よりも比較的大きな重みを付けることにより、選択された焦点検出位置のデフォーカス量結果を優遇する。   In step S460, the camera drive control device 212 performs a weighted average process on the defocus amounts of the five focus detection positions to calculate a final defocus amount. In the weighted averaging process, the defocus amount result at the selected focus detection position is obtained by applying a relatively larger weight to the defocus amount at the selected focus detection position than the defocus amount at the other focus detection position. Preferential treatment.

ステップS470において、焦点検出演算処理(相関演算処理)は終了してリターンする。   In step S470, the focus detection calculation process (correlation calculation process) ends and returns.

このようにすれば、選択された焦点検出位置については、演算精度が確保された第1相関演算により確実に焦点検出を行なうことが可能になるとともに、他の複数の焦点検出位置においては演算時間が短縮された第2相関演算を行なうことができるので、焦点検出動作全体としての演算時間を短縮することができる。   In this way, the selected focus detection position can be reliably detected by the first correlation calculation in which the calculation accuracy is ensured, and at the other plurality of focus detection positions, the calculation time is calculated. Since the second correlation calculation can be performed, the calculation time for the entire focus detection operation can be shortened.

図16〜図19に示す焦点検出動作においては、確実に焦点検出が行えるが演算時間が長い第1相関演算と、所定条件下では演算精度を確保しながら演算時間が短い第2相関演算とが、状況に応じて適切に選択される。そのため、本実施の形態の相関演算装置を有する焦点検出装置においては、焦点検出動作全体としてのパフォーマンスを高めることができる。   In the focus detection operation shown in FIGS. 16 to 19, there are a first correlation calculation that can reliably detect a focus but has a long calculation time, and a second correlation calculation that has a short calculation time while ensuring calculation accuracy under a predetermined condition. It is selected appropriately according to the situation. Therefore, in the focus detection apparatus having the correlation calculation apparatus of the present embodiment, the performance as the entire focus detection operation can be improved.

本実施の形態における相関演算装置を含むディジタルスチルカメラ201が有するカメラ駆動制御装置212は、データA〜Aからなる第1信号データ列Aにおいて局所的な部分配列(A、An+1)をなす複数のデータA、An+1と、複数のデータB〜Bからなる第2信号データ列Bにおいて局所的な部分配列(A、An+1)をなす複数の第1信号データA、An+1に対応して局所的な部分配列(Bn+k、Bn+1+k)をなす複数のデータBn+k、Bn+1+kとの間で乗算を行なうことにより、局所的な部分配列(A、An+1)をなす複数のデータA、An+1と局所的な部分配列(Bn+k、Bn+1+k)をなす複数のデータBn+k、Bn+1+kとの間の局所相関値|(A×Bn+1+k)−(Bn+k×An+1)|を算出する。 The camera drive control device 212 included in the digital still camera 201 including the correlation operation device according to the present embodiment has a local partial arrangement (A n , A n + 1 ) in the first signal data sequence A composed of data A 1 to A N. A plurality of first signal data A forming a local partial array (A n , A n + 1 ) in a second signal data sequence B composed of a plurality of data A n and A n + 1 and a plurality of data B 1 to B N By multiplying a plurality of data B n + k and B n + 1 + k forming a local partial array (B n + k , B n + 1 + k ) corresponding to n 1 and A n + 1 , a local partial array (A n , A n n + 1) forming a plurality of data a n, a n + 1 and the local partial sequence (B n + k, a plurality of data B n + k forming the B n + 1 + k), the local between B n + 1 + k Sekichi | (A n × B n + 1 + k) - (B n + k × A n + 1) | is calculated.

それとともに、カメラ駆動制御装置212は、第1信号データ列A中および第2信号データ列B中において局所的な部分配列(A、An+1)をなす複数のデータA、An+1および局所的な部分配列(Bn+k、Bn+1+k)をなす複数のデータBn+k、Bn+1+kを変更する毎に算出した局所相関値|(A×Bn+1+k)−(Bn+k×An+1)|を積算することにより、第1信号データ列Aと第2信号データ列Bとの間の相関度を表わす積算相関値C(k)=Σ|(A×Bn+1+k)−(Bn+k×An+1)|を算出する。 At the same time, the camera drive control device 212 includes a plurality of data A n , A n + 1, and a local partial array (A n , A n + 1 ) in the first signal data sequence A and the second signal data sequence B. The local correlation value | (A n × B n + 1 + k ) − (B n + k × A n + 1 ) | calculated each time a plurality of data B n + k and B n + 1 + k forming a general partial array (B n + k , B n + 1 + k ) are changed As a result, the integrated correlation value C (k) = Σ | (A n × B n + 1 + k ) − (B n + k × A n + 1 ) representing the degree of correlation between the first signal data sequence A and the second signal data sequence B. | Is calculated.

カメラ駆動制御装置212は、複数のデータA〜Aおよび複数のデータB〜Bをそれぞれ対数変換することにより、複数の対数変換データLog(A)〜Log(A)からなる第3信号データ列LAおよび複数の対数変換データLog(B)〜Log(B)からなる第4信号データ列LBを生成する。 The camera drive control device 212 includes a plurality of logarithmic conversion data Log (A 1 ) to Log (A N ) by logarithmically converting the plurality of data A 1 to A N and the plurality of data B 1 to B N respectively. A fourth signal data string LB composed of the third signal data string LA and a plurality of logarithmic conversion data Log (B 1 ) to Log (B N ) is generated.

カメラ駆動制御装置212は、第3信号データ列LAにおいて局所的な部分配列(Log(A),Log(An+1))をなす複数の対数変換データLog(A),Log(An+1)と、第4信号データ列LBにおいて局所的な部分配列(Log(A),Log(An+1))をなす複数の対数変換データLog(A),Log(An+1)に対応して局所的な部分配列(Log(Bn+k),Log(Bn+1+k))をなす複数の対数変換データLog(Bn+k),Log(Bn+1+k)との間で加算を行なうことにより、局所的な部分配列(Log(A),Log(An+1))をなす複数の対数変換データLog(A),Log(An+1)と局所的な部分配列(Log(Bn+k),Log(Bn+1+k))をなす複数の対数変換データLog(Bn+k),Log(Bn+1+k)との間の局所相関値|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))|を算出する。 The camera drive control device 212 has a plurality of logarithmic transformation data Log (A n ), Log (A n + 1 ) forming a local partial array (Log (A n ), Log (A n + 1 )) in the third signal data sequence LA. Corresponding to a plurality of logarithmic transformation data Log (A n ), Log (A n + 1 ) forming a local partial array (Log (A n ), Log (A n + 1 )) in the fourth signal data string LB. Local partial array by performing addition between a plurality of logarithmic transformation data Log (B n + k ) and Log (B n + 1 + k ) forming a partial array (Log (B n + k ), Log (B n + 1 + k )) (Log (A n ), Log (A n + 1 )) and a plurality of logarithmic transformation data Log (A n ), Log (A n + 1 ) and local partial arrays (Log (B n + k ), L local correlation value | (Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) between a plurality of logarithmic transformation data Log (B n + k ) and Log (B n + 1 + k ) forming og (B n + 1 + k )) ) + Log (A n + 1 )) |

それとともに、カメラ駆動制御装置212は、第3信号データ列LA中および第4信号データ列LB中において局所的な部分配列(Log(A),Log(An+1))をなす複数の対数変換データLog(A),Log(An+1)および局所的な部分配列(Log(Bn+k),Log(Bn+1+k))をなす複数の対数変換データLog(Bn+k),Log(Bn+1+k)を変更する毎に算出した局所相関値|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))|を積算することにより、第3信号データ列LAと第4信号データ列LBとの間の相関度を表わす積算相関値C(k)=Σ|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))|を算出する。 At the same time, the camera drive control device 212 performs a plurality of logarithmic transformations forming a local partial array (Log (A n ), Log (A n + 1 )) in the third signal data sequence LA and the fourth signal data sequence LB. A plurality of logarithmic transformation data Log (B n + k ) and Log (B n + 1 + k ) forming data Log (A n ), Log (A n + 1 ), and local partial array (Log (B n + k ), Log (B n + 1 + k )) By integrating the local correlation value | (Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) + Log (A n + 1 )) | calculated each time the change is made, the third signal data string LA and the third signal data LA integrated correlation value representing the correlation between the 4 signal data string LB C (k) = Σ | (Log (a n) + Log (B n + 1 + k)) - (Log (B n + k) Log (A n + 1)) | is calculated.

本実施の形態における相関演算装置を含むディジタルスチルカメラ201は、このようなカメラ駆動制御装置212を有することにより、焦点検出のための相関演算の際、演算精度が確保される範囲で、演算時間を短縮することができるという作用効果がある。   The digital still camera 201 including the correlation calculation device according to the present embodiment includes such a camera drive control device 212, so that the calculation time is within a range in which the calculation accuracy is ensured in the correlation calculation for focus detection. There is an effect that can be shortened.

本実施の形態における相関演算装置を含むディジタルスチルカメラ201が有するカメラ駆動制御装置212は、一対の像のうちの一方の強度を所定の画素ピッチで配置された複数の焦点検出画素311でサンプリングして得られる複数のデータA〜Aからなる第1信号データ列Aにおいて、複数の焦点検出画素311のうちのn番目の焦点検出画素311の近傍にて1データ分の隣接関係にある複数の焦点検出画素311で得られる複数のデータA、An+1と、一対の像のうちの他方の強度を所定の画素ピッチで配置された複数の焦点検出画素311でサンプリングして得られる複数のデータB〜Bからなる第2信号データ列Bにおいて、複数の焦点検出画素311のうちのn番目の焦点検出画素311に対しずらし量kだけ離間した位置関係にある(n+k)番目の焦点検出画素311の近傍にて1データ分の隣接関係にある複数の焦点検出画素311で得られる複数のデータBn+k、Bn+1+kとの間で乗算を行なうことにより第1積データ(A×Bn+1+k)と第2積データ(Bn+k×An+1)とを算出する。 The camera drive control device 212 included in the digital still camera 201 including the correlation calculation device according to the present embodiment samples one intensity of a pair of images by a plurality of focus detection pixels 311 arranged at a predetermined pixel pitch. In the first signal data string A composed of a plurality of data A 1 to A N obtained in this manner, a plurality of adjacent data for one data in the vicinity of the nth focus detection pixel 311 among the plurality of focus detection pixels 311. A plurality of data A n , A n + 1 obtained by the focus detection pixel 311 and a plurality of data obtained by sampling the other intensity of the pair of images with the plurality of focus detection pixels 311 arranged at a predetermined pixel pitch. in the second signal data string B including data B 1 .about.B n, a shift amount with respect to the n-th focus detection pixels 311 among the plurality of focus detection pixels 311 Only at a position spaced relationship (n + k) th multiple data B n + k obtained at a plurality of focus detection pixels 311 in one data adjacencies in the vicinity of the focus detection pixels 311, multiplied with the B n + 1 + k To calculate the first product data (A n × B n + 1 + k ) and the second product data (B n + k × A n + 1 ).

カメラ駆動制御装置212は、第1積データ(A×Bn+1+k)と第2積データ(Bn+k×An+1)との減算を行なって差分データ((A×Bn+1+k)−(Bn+k×An+1))を算出し、その差分データの絶対値をとることにより、n番目の焦点検出画素311の近傍の複数のデータA、An+1と(n+k)番目の焦点検出画素311の近傍の複数のデータBn+k、Bn+1+kとの間の局所相関値|(A×Bn+1+k)−(Bn+k×An+1)|を算出する。 The camera drive control device 212 subtracts the first product data (A n × B n + 1 + k ) and the second product data (B n + k × A n + 1 ) to obtain difference data ((A n × B n + 1 + k ) − (B n + k). × A n + 1 )) is calculated and the absolute value of the difference data is calculated to obtain a plurality of data A n , A n + 1 in the vicinity of the nth focus detection pixel 311 and the vicinity of the (n + k) th focus detection pixel 311. The local correlation value | (A n × B n + 1 + k ) − (B n + k × A n + 1 ) | between the plurality of data B n + k and B n + 1 + k is calculated.

カメラ駆動制御装置212は、n番目の焦点検出画素311の変数nをn=1〜Nに亘って移動させて局所相関値|(A×Bn+1+k)−(Bn+k×An+1)|を積算することにより、第1信号データ列Aと第2信号データ列Bとの間のずらし量kだけ離間した位置関係における積算相関値C(k)=Σ|(A×Bn+1+k)−(Bn+k×An+1)|を算出する。 The camera drive control device 212 moves the variable n of the nth focus detection pixel 311 from n = 1 to N to obtain the local correlation value | (A n × B n + 1 + k ) − (B n + k × A n + 1 ) | By integrating, the integrated correlation value C (k) = Σ | (A n × B n + 1 + k ) − () in the positional relationship separated by the shift amount k between the first signal data sequence A and the second signal data sequence B. Bn + k * An + 1 ) | is calculated.

カメラ駆動制御装置212は、データA〜Aおよび複数のデータB〜Bをそれぞれ対数変換して複数の対数変換データLog(A)〜Log(A)および複数の対数変換データLog(B)〜Log(B)を算出し、複数の対数変換データLog(A)〜Log(A)からなる第3信号データ列LAおよび複数の対数変換データLog(B)〜Log(B)からなる第4信号データ列LBを生成する。 The camera drive control device 212 performs logarithmic conversion on the data A 1 to A N and the plurality of data B 1 to B N , respectively, to generate a plurality of log conversion data Log (A 1 ) to Log (A N ) and a plurality of log conversion data. Log (B 1) ~Log (B N) is calculated, and a plurality of log-transformed data Log (a 1) ~Log (a N) and a third signal data string LA and a plurality of log-transformed data Log (B 1) A fourth signal data string LB composed of ~ Log (B N ) is generated.

カメラ駆動制御装置212は、第3信号データ列LAにおいて、n番目の焦点検出画素311の近傍にて1データ分の隣接関係にある複数の焦点検出画素311で得られる複数の対数変換データLog(A),Log(An+1)と、第4信号データ列LBにおいて、n番目の焦点検出画素311に対しずらし量kだけ離間した位置関係にある(n+k)番目の焦点検出画素311の近傍にて1データ分の隣接関係にある複数の焦点検出画素311で得られる複数の対数変換データLog(Bn+k),Log(Bn+1+k)との間で加算を行なうことにより第1和データ(Log(A)+Log(Bn+1+k))と第2和データ(Log(Bn+k)+Log(An+1))とを算出する。 In the third signal data array LA, the camera drive control device 212 has a plurality of logarithmic conversion data Log () obtained by a plurality of focus detection pixels 311 adjacent to one data in the vicinity of the nth focus detection pixel 311. A n ), Log (A n + 1 ), and the fourth signal data string LB, in the vicinity of the (n + k) th focus detection pixel 311 that is in a positional relationship separated from the nth focus detection pixel 311 by the shift amount k. The first sum data (Log (B ( n + k )) is added to a plurality of logarithm conversion data Log (B n + k ) and Log (B n + 1 + k ) obtained by a plurality of focus detection pixels 311 that are adjacent to each other. A n ) + Log (B n + 1 + k )) and second sum data (Log (B n + k ) + Log (A n + 1 )) are calculated.

カメラ駆動制御装置212は、さらに第1和データ(Log(A)+Log(Bn+1+k))と第2和データ(Log(Bn+k)+Log(An+1))との減算を行なって差分データ((Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1)))を算出する。 The camera drive control device 212 further subtracts the first sum data (Log (A n ) + Log (B n + 1 + k )) and the second sum data (Log (B n + k ) + Log (A n + 1 )) to obtain difference data ( (Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) + Log (A n + 1 ))) is calculated.

カメラ駆動制御装置212は、算出した第2差分データ((Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1)))の絶対値をとることにより、n番目の焦点検出画素311の近傍の複数の対数変換データLog(A),Log(An+1)と(n+k)番目の焦点検出画素311の近傍の複数の対数変換データLog(Bn+k),Log(Bn+1+k)との間の局所相関値|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))|を算出する。 The camera drive control device 212 takes the absolute value of the calculated second difference data ((Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) + Log (A n + 1 ))) to obtain the n th Logarithm conversion data Log (A n ), Log (A n + 1 ) in the vicinity of the focus detection pixel 311, and logarithm conversion data Log (B n + k ), Log (in the vicinity of the (n + k) th focus detection pixel 311. B n + 1 + k) local correlation value between | (Log (a n) + Log (B n + 1 + k)) - (Log (B n + k) + Log (a n + 1)) | is calculated.

カメラ駆動制御装置212は、n番目の焦点検出画素311の変数nをn=1〜Nに亘って移動させて局所相関値|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))|を積算することにより、第3信号データ列LAと第4信号データ列LBとの間のずらし量kだけ離間した位置関係における積算相関値C(k)=Σ|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))|を算出する。 The camera drive control device 212 moves the variable n of the n-th focus detection pixel 311 over n = 1 to N to obtain a local correlation value | (Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) + Log (A n + 1 )) | by integrating the accumulated correlation value C (k) = Σ in the positional relationship separated by the shift amount k between the third signal data sequence LA and the fourth signal data sequence LB. | (Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) + Log (A n + 1 )) | is calculated.

カメラ駆動制御装置212は、第1信号データ列Aの平均値および第2信号データ列Bの平均値が両方とも所定閾値を越えているか否かに応じて、積算相関値C(k)=Σ|(A×Bn+1+k)−(Bn+k×An+1)|の算出および積算相関値C(k)=Σ|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))|の算出のいずれか一方を選択する。 The camera drive control device 212 determines that the integrated correlation value C (k) = Σ depending on whether the average value of the first signal data string A and the average value of the second signal data string B both exceed a predetermined threshold value. | (A n × B n + 1 + k ) − (B n + k × A n + 1 ) | and the integrated correlation value C (k) = Σ | (Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) + Log Either one of (A n + 1 )) | is calculated.

カメラ駆動制御装置212は、積算相関値C(k)=Σ|(A×Bn+1+k)−(Bn+k×An+1)|の算出が選択されたときは、ずらし量kを所定範囲に亘って変更する毎にずらし量kに対応する積算相関値C(k)=Σ|(A×Bn+1+k)−(Bn+k×An+1)|を算出する。カメラ駆動制御装置212は、積算相関値C(k)=Σ|(A×Bn+1+k)−(Bn+k×An+1)|が極値を示すときのずらし量kの値k0に基づき、第1信号データ列Aと第2信号データ列Bとの像ズレ量(P×km)を算出する。 When the calculation of the integrated correlation value C (k) = Σ | (A n × B n + 1 + k ) − (B n + k × A n + 1 ) | is selected, the camera drive control device 212 sets the shift amount k over a predetermined range. Every time the change is made, the integrated correlation value C (k) = Σ | (A n × B n + 1 + k ) − (B n + k × A n + 1 ) | corresponding to the shift amount k is calculated. The camera drive control device 212 calculates the first correlation value C (k) = Σ | (A n × B n + 1 + k ) − (B n + k × A n + 1 ) | An image shift amount (P × km) between the 1 signal data string A and the second signal data string B is calculated.

カメラ駆動制御装置212は、積算相関値C(k)=Σ|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))|の算出が選択されたときは、ずらし量kを所定範囲に亘って変更する毎にずらし量kに対応する積算相関値C(k)=Σ|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))|を算出する。カメラ駆動制御装置212は、積算相関値C(k)=Σ|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))|が極値を示すときのずらし量kの値k0に基づき、第1信号データ列Aと第2信号データ列Bとの像ズレ量(P×km)を算出する。 When the calculation of the integrated correlation value C (k) = Σ | (Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) + Log (A n + 1 )) | Is an integrated correlation value C (k) = Σ | (Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) corresponding to the shift amount k every time the shift amount k is changed over a predetermined range. + Log (A n + 1 )) | The camera drive control device 212 uses the integrated correlation value C (k) = Σ | (Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) + Log (A n + 1 )) | Based on the value k0 of the shift amount k, an image shift amount (P × km) between the first signal data string A and the second signal data string B is calculated.

本実施の形態における相関演算装置を含むディジタルスチルカメラ201は、このようなカメラ駆動制御装置212を有することにより、焦点検出のための相関演算の際、積算相関値C(k)=Σ|(A×Bn+1+k)−(Bn+k×An+1)|の算出および積算相関値C(k)=Σ|(Log(A)+Log(Bn+1+k))−(Log(Bn+k)+Log(An+1))|の算出が、状況に応じて適切に選択され、相関演算時間の短縮と相関演算精度の維持とがバランスされるという作用効果がある。 The digital still camera 201 including the correlation calculation device according to the present embodiment includes such a camera drive control device 212, so that the integrated correlation value C (k) = Σ | ( A n × B n + 1 + k ) − (B n + k × A n + 1 ) | and the integrated correlation value C (k) = Σ | (Log (A n ) + Log (B n + 1 + k )) − (Log (B n + k ) + Log (A) The calculation of n + 1 )) | is appropriately selected depending on the situation, and there is an effect that the reduction of the correlation calculation time and the maintenance of the correlation calculation accuracy are balanced.

<相関演算の変形例>
上述した実施の形態における相関演算装置で行なわれる、対数変換を用いる第2相関演算は、(1)式に対応した(2)式や(3)式に限定されるものではなく、乗算結果の差分を含む局所相関値を積算した積算相関値を算出するタイプの相関演算であればどのような相関演算であってもよい。乗算を対数変換することにより加算に分解することにより高速演算を実現する。それとともに、対数変換時に所定値以下の入力データに対して出力データを無効化することにより対数化によるノイズの増大などの問題を解決する。さらに、積算相関値の算出には無効化データを含む局所相関値を用いないことにより、対数化データの中に無効データが含まれる事による相関演算精度の低下を防止することができる。
<Modification of correlation calculation>
The second correlation calculation using the logarithmic transformation performed by the correlation calculation apparatus in the above-described embodiment is not limited to the expressions (2) and (3) corresponding to the expression (1). Any correlation calculation may be used as long as it is a type of correlation calculation that calculates an integrated correlation value obtained by integrating local correlation values including differences. High-speed arithmetic is realized by decomposing the multiplication into addition by logarithmic transformation. At the same time, problems such as an increase in noise due to logarithmization are solved by invalidating output data for input data that is equal to or smaller than a predetermined value during logarithmic conversion. Further, by not using local correlation values including invalidation data in the calculation of the integrated correlation value, it is possible to prevent a decrease in correlation calculation accuracy due to invalid data being included in logarithmic data.

以下に、乗算を用いた第1相関演算に対応する対数変換を用いた第2相関演算の変形例を挙げる。ただし簡潔にするため、無効化処理(0クリップ処理)および出力データ値域の調整演算部分は省略する。   Below, the modification of the 2nd correlation calculation using the logarithmic transformation corresponding to the 1st correlation calculation using multiplication is given. However, for the sake of brevity, the invalidation process (0 clip process) and the adjustment calculation part of the output data value range are omitted.

(変形例1) (1)式において添え字の数値1を整数sに一般化した相関演算式を第1相関演算式として(12)式に示し、これに対応する第2相関演算式を(13)式に示す。
C(k)=Σ|(A×Bn+s+k)−(Bn+k×An+s)| ・・・(12)
C(k)=Σ|(Log(A)+Log(Bn+s+k))−(Log(Bn+k)+Log(An+s))| ・・・(13)
(Variation 1) A correlation calculation expression obtained by generalizing the subscript number 1 to an integer s in expression (1) is shown as expression (12) as a first correlation calculation expression, and a second correlation calculation expression corresponding to this is expressed as ( 13)
C (k) = Σ | (A n × B n + s + k ) − (B n + k × A n + s ) | (12)
C (k) = Σ | (Log (A n ) + Log (B n + s + k )) − (Log (B n + k ) + Log (A n + s )) | (13)

(変形例2) 特開2007−333720号公報の明細書の(14)式における添え字の数値1を整数sに一般化した相関演算式を第1相関演算式として(14)式に示し、これに対応する第2相関演算式を(15)式に示す。
C(k)=Σ|(A ×Bn−s+k×Bn+s+k)−(Bn+k ×An−s×An+s)|
・・・(14)
C(k)=Σ|(2×Log(A)+Log(Bn−s+k)+Log(Bn+s+k))−(2×Log(Bn+k)+Log(An−s)+Log(An+s))|
・・・(15)
(Modification 2) A correlation operation expression obtained by generalizing the numerical value 1 of the subscript in the expression (14) of the specification of JP-A-2007-333720 to an integer s is shown as an expression (14) as a first correlation operation expression, A second correlation calculation expression corresponding to this is shown in Expression (15).
C (k) = Σ | (A n 2 × B n−s + k × B n + s + k ) − (B n + k 2 × A n−s × A n + s ) |
(14)
C (k) = Σ | (2 × Log (A n ) + Log (B n−s + k ) + Log (B n + s + k )) − (2 × Log (B n + k ) + Log (A n−s ) + Log (A n + s )) |
... (15)

(変形例3) 特開2009−258231号公報の明細書の(5)式に開示された第1相関演算式を第1相関演算式として(16)式に示し、これに対応する第2相関演算式を(17)式に示す。
C(k)=Σ|(A×An+s+t×Bn+t+k×Bn+s+k)−(An+s×An+t×Bn+k×Bn+k+s+t)| ・・・(16)
C(k)=Σ|(Log(A)+Log(An+s+t)+Log(Bn+t+k)+Log(Bn+s+k))−(Log(An+s)+Log(An+t)+Log(Bn+k)+Log(Bn+k+s+t))| ・・・(17)
(Modification 3) The first correlation calculation formula disclosed in formula (5) of the specification of Japanese Patent Application Laid-Open No. 2009-258231 is shown as formula (16) as the first correlation calculation formula, and the second correlation corresponding to this formula The arithmetic expression is shown in Expression (17).
C (k) = Σ | (A n × An + s + t × Bn + t + k × Bn + s + k) − (An + s × A n + t × B n + k × B n + k + s + t ) | (16)
C (k) = Σ | (Log (A n ) + Log (A n + s + t ) + Log (B n + t + k ) + Log (B n + s + k ))-(Log (An + s) + Log (An + t) + Log (Bn + k) + Log + B + k + B + k + B + k + B + ... (17)

(変形例4) 上述した相関演算は、1次元空間に配列されたデータに対する相関演算であった。しかし、本発明に係る相関演算装置で行なわれる相関演算は、1次元空間に配列されたデータに対する相関演算に限定されない。 (Modification 4) The above-described correlation calculation is a correlation calculation for data arranged in a one-dimensional space. However, the correlation calculation performed by the correlation calculation apparatus according to the present invention is not limited to the correlation calculation for data arranged in a one-dimensional space.

例えば2次元空間の座標を表わすインデックスiおよびjを用いて、2次元画像データAi,jおよびBi,jを表し、次式(18)のような乗算の差分の絶対値を積算する第1相関演算を行なうことにより、相対的な2次元の像ズレ量(k,h)における2次元画像データAi,jおよびBi,jの相関値C(k,h)を算出することも可能である。これに対応する、2次元画像データに対する第2相関演算式を(19)式に示す。
C(k,h)=ΣΣ|(Ai,j×Ai+s,j+s×Bi+s+k,j+h×Bi+k,j+s+h)−(Ai+s,j×Ai,j+s×Bi+k, j+h×Bi+s+k,j+s+h)| ・・・(18)
C(k)=ΣΣ|(Log(Ai,j)+Log(Ai+s,j+s)+Log(Bi+s+k,j+h)+Log(Bi+k,j+s+h))−(Log(Ai+s,j)+Log(Ai,j+s)+Log(Bi+k, j+h)+Log(Bi+s+k,j+s+h))|
=ΣΣ|(Log(Ai,j)+Log(Ai+s,j+s)−Log(Ai+s,j)−Log(Ai,j+s))−(Log(Bi+k, j+h)+Log(Bi+s+k,j+s+h)−Log(Bi+s+k, j+h)−Log(Bi+k, j+s+h))| ・・・(19)
For example, two-dimensional image data A i, j and B i, j are represented using indices i and j representing coordinates in a two-dimensional space, and an absolute value of a difference of multiplication as in the following equation (18) is integrated. It is also possible to calculate the correlation value C (k, h) of the two-dimensional image data A i, j and B i, j in the relative two-dimensional image shift amount (k, h) by performing one correlation calculation. Is possible. A second correlation calculation formula for the two-dimensional image data corresponding to this is shown in Formula (19).
C (k, h) = ΣΣ | (A i, j × A i + s, j + s × B i + s + k, j + h × B i + k, j + s + h ) − (A i + s, j × A i, j + s × B i + k, j + h × B i + s + k, j + s + h ) | (18)
C (k) = ΣΣ | (Log (A i, j ) + Log (A i + s, j + s ) + Log (B i + s + k, j + h ) + Log (B i + k, j + s + h )) − (Log (A i + s, j ) + Log (A i , j + s ) + Log (B i + k, j + h ) + Log (B i + s + k, j + s + h )) |
= ΣΣ | (Log (A i, j ) + Log (A i + s, j + s ) −Log (A i + s, j ) −Log (A i, j + s )) − (Log (B i + k, j + h ) + Log (B i + s + k, j + s + ) −Log (B i + s + k, j + h ) −Log (B i + k, j + s + h )) | (19)

図26は上式(19)においてs=1としLog演算をLとして簡略記載した場合の、第2相関演算のデータフローを示したものである。   FIG. 26 shows the data flow of the second correlation calculation when s = 1 in the above equation (19) and the Log calculation is simply described as L.

(変形例5) 上述した相関演算は焦点検出の像ズレ検出に用いるものであった。しかし、本発明に係る相関演算装置で行なわれる相関演算は、焦点検出演算の像ズレ検出演算の用途に限定されず、例えば2次元空間に配列された画像データである基本画像と比較対象画像とのテンプレートマッチングにおける相関値Cの算出に適用されることとしてもよい。相関演算装置の制御装置による基本画像中の顔画像と比較対象画像に部分画像とのテンプレートマッチングにおける積算相関値Cの算出について、図21〜25を用いて説明する。 (Modification 5) The above-described correlation calculation is used for image shift detection for focus detection. However, the correlation calculation performed by the correlation calculation apparatus according to the present invention is not limited to the use of the image shift detection calculation of the focus detection calculation. For example, the basic image and the comparison target image which are image data arranged in a two-dimensional space It may be applied to the calculation of the correlation value C in the template matching. Calculation of the integrated correlation value C in template matching between the face image in the basic image and the comparison target image and the partial image by the control device of the correlation calculation device will be described with reference to FIGS.

4つの2次元画像、すなわち基本画像20中の顔画像21と、比較対象画像30の部分画像33と、基本画像20にローパスフィルタ処理を施して得られた基本ローパス画像20aの顔画像41と、比較対象画像30にローパスフィルタ処理を施して得られた比較対象ローパス画像30aの部分画像43とを、積算相関値Cの算出に使用する。   Four two-dimensional images, that is, a face image 21 in the basic image 20, a partial image 33 of the comparison target image 30, a face image 41 of the basic low-pass image 20a obtained by subjecting the basic image 20 to low-pass filter processing, The partial image 43 of the comparison target low-pass image 30a obtained by performing the low-pass filter process on the comparison target image 30 is used for calculating the integrated correlation value C.

図21は、基本画像20中の顔画像21近傍を拡大した画像であって、正方格子のマスで示す2次元画素配置に重畳して顔画像21を示す。この顔画像21近傍に対してローパスフィルタを画素単位で2次元的に走査することにより、この画像の画素データに対してローパスフィルタ処理が施される。   FIG. 21 is an image obtained by enlarging the vicinity of the face image 21 in the basic image 20, and shows the face image 21 superimposed on a two-dimensional pixel arrangement indicated by square grids. The low-pass filter is applied to the pixel data of this image by two-dimensionally scanning the vicinity of the face image 21 in units of pixels.

図22は、以上のようなローパスフィルタ処理の結果生成される基本ローパス画像の顔画像近傍を拡大した画像であって、高周波成分が失われてぼけた顔画像41が生成される。図22において、顔画像41のうちの口を含む領域1110の中心部および両眼を含む領域1120の中心部は最も濃度が高い領域であり、領域1110の中心部および領域1120の中心部から遠ざかるにつれて濃度が徐々に低くなる。両眼周辺の領域1130の濃度は領域1120の濃度よりも低く、顔の中央部分を含む領域1140の濃度は領域1130の濃度よりも低く、領域1140の外側の、顔の輪郭付近の領域1150の濃度は領域1140の濃度よりも低い。作図の都合上、図22の顔画像41を領域1110〜1150に区分して上記説明を行ったが、上述したような口および両目から顔の輪郭へ向かう方向における濃度の低下は、実際には連続的である。   FIG. 22 is an enlarged image of the vicinity of the face image of the basic low-pass image generated as a result of the low-pass filter processing as described above, and a face image 41 with a high-frequency component lost and generated. In FIG. 22, the central portion of the region 1110 including the mouth and the central portion of the region 1120 including both eyes in the face image 41 are regions having the highest density, and are away from the central portion of the region 1110 and the central portion of the region 1120. As the concentration gradually decreases. The density of the area 1130 around both eyes is lower than the density of the area 1120, the density of the area 1140 including the central part of the face is lower than the density of the area 1130, and the density of the area 1150 near the face outline outside the area 1140. The density is lower than the density in region 1140. For convenience of drawing, the face image 41 of FIG. 22 is divided into regions 1110 to 1150 and the above description has been made. However, the decrease in density in the direction from the mouth and both eyes toward the face contour is actually Is continuous.

図23は、比較対象画像30中のある部分画像33の領域近傍を拡大した画像である。図23では、正方格子のマスで示す2次元画素配置に重畳して部分画像33が示されている。この部分画像33に対して、ローパスフィルタを画素単位で2次元的に走査することにより、この画像の画素データに対してローパスフィルタ処理が施される。   FIG. 23 is an image obtained by enlarging the vicinity of a partial image 33 in the comparison target image 30. In FIG. 23, a partial image 33 is shown superimposed on a two-dimensional pixel arrangement indicated by square grids. By scanning the partial image 33 two-dimensionally with a low-pass filter in units of pixels, low-pass filter processing is performed on the pixel data of this image.

図24は、以上のようなローパスフィルタ処理の結果として生成される比較対象ローパス画像における部分画像33近傍を拡大した画像であって、高周波成分が失われてぼけた部分画像43が生成される。図24において、部分画像43のうち、領域1410の中心部および領域1430の中心部は最も濃度が高い領域であり、領域1410の中心部および領域1430の中心部から遠ざかるにつれて濃度が徐々に低くなる。領域1410周辺の領域1420の濃度は領域1410の濃度よりも低く、領域1430周辺の領域1440の濃度は領域1430の濃度よりも低く、領域1420および1440の外側の領域1450の濃度は領域1420の濃度および領域1440の濃度よりも低く、領域1450の外側の領域1460の濃度は領域1450の濃度よりも低い。作図の都合上、図24の部分画像43を領域1410〜1460に区分して上記説明を行ったが、上述したような領域1410の中心部および領域1430の中心部から部分画像43の外周付近へ向かう方向における濃度の低下は、実際には連続的である。   FIG. 24 is an enlarged image of the vicinity of the partial image 33 in the comparison target low-pass image generated as a result of the low-pass filter processing as described above, and a partial image 43 in which a high-frequency component is lost and blurred is generated. In FIG. 24, in the partial image 43, the central portion of the region 1410 and the central portion of the region 1430 are regions having the highest density, and the concentration gradually decreases as the distance from the central portion of the region 1410 and the central portion of the region 1430 increases. . The density of the area 1420 around the area 1410 is lower than the density of the area 1410, the density of the area 1440 around the area 1430 is lower than the density of the area 1430, and the density of the area 1450 outside the areas 1420 and 1440 is the density of the area 1420. And the density of the area 1460 outside the area 1450 is lower than the density of the area 1450. For the convenience of drawing, the partial image 43 in FIG. 24 is divided into regions 1410 to 1460, and the above description has been made. However, from the central portion of the region 1410 and the central portion of the region 1430 to the vicinity of the outer periphery of the partial image 43 as described above. The decrease in concentration in the direction toward is actually continuous.

4つの2次元画像、すなわち基本画像20中の顔画像21と、比較対象画像30の部分画像33と、基本画像20にローパスフィルタ処理を施して得られた基本ローパス画像20aの顔画像41と、比較対象画像30にローパスフィルタ処理を施して得られた比較対象ローパス画像30aの部分画像43とにおいて、2次元画像上の画素位置は、水平方向および垂直方向の2次元の位置変数で表される。基準となる画素位置を画素原点という。画素原点は、画素アドレス(0,0)の画素位置に設定される。図21に示すように、顔画像21では基準画素位置22を画素原点とする。図23に示すように、部分画像33では顔画像21の基準画素位置22に対応した基準画素位置32を画素原点とする。図22に示すように、基本ローパス画像20aの顔画像41では、顔画像21と同様の基準画素位置22aを画素原点とする。比較対象ローパス画像30aの部分画像43では、図24に示すように、部分画像33と同様の基準画素位置32aを画素原点とする。   Four two-dimensional images, that is, a face image 21 in the basic image 20, a partial image 33 of the comparison target image 30, a face image 41 of the basic low-pass image 20a obtained by subjecting the basic image 20 to low-pass filter processing, In the partial image 43 of the comparison target low-pass image 30a obtained by performing the low-pass filter process on the comparison target image 30, the pixel position on the two-dimensional image is represented by a two-dimensional position variable in the horizontal direction and the vertical direction. . A reference pixel position is referred to as a pixel origin. The pixel origin is set at the pixel position of the pixel address (0, 0). As shown in FIG. 21, in the face image 21, the reference pixel position 22 is set as the pixel origin. As shown in FIG. 23, in the partial image 33, the reference pixel position 32 corresponding to the reference pixel position 22 of the face image 21 is set as the pixel origin. As shown in FIG. 22, in the face image 41 of the basic low-pass image 20a, the reference pixel position 22a similar to that of the face image 21 is set as the pixel origin. In the partial image 43 of the comparison low-pass image 30a, the reference pixel position 32a similar to that of the partial image 33 is set as the pixel origin, as shown in FIG.

このように画素原点を定めた場合の顔画像21、部分画像33、基本ローパス画像20aの顔画像41、および比較対象ローパス画像30aの部分画像43の2次元的な画素データを、図25に示すようにそれぞれAxy、Bxy、Exy、およびFxyとする。画素アドレス(x,y)は、顔画像21、部分画像33、顔画像41および部分画像43の各画像内における、上述した画素原点に対する水平方向および垂直方向の画素位置を表す。図21〜24において、顔画像21、部分画像33、顔画像41および部分画像43は矩形画像ではないが、説明を簡便にするため、図25においては、顔画像21、部分画像33、顔画像41および部分画像43が矩形画像であるものとする。画素アドレス(x,y)が所定値(i,j)をとるときの特定の相関画素位置23における局所相関値D(i,j)は、(20)式で与えられる。
D(i,j)=|Aij× Fij−Bij × Eij| ・・・(20)
FIG. 25 shows two-dimensional pixel data of the face image 21, the partial image 33, the face image 41 of the basic low-pass image 20a, and the partial image 43 of the comparison target low-pass image 30a when the pixel origin is determined in this way. As shown, A xy , B xy , E xy , and F xy respectively. The pixel address (x, y) represents the pixel position in the horizontal direction and the vertical direction with respect to the pixel origin described above in each of the face image 21, the partial image 33, the face image 41, and the partial image 43. 21 to 24, the face image 21, the partial image 33, the face image 41, and the partial image 43 are not rectangular images. However, in order to simplify the description, the face image 21, the partial image 33, and the face image are illustrated in FIG. 41 and the partial image 43 are rectangular images. A local correlation value D (i, j) at a specific correlation pixel position 23 when the pixel address (x, y) takes a predetermined value (i, j) is given by the equation (20).
D (i, j) = | A ij × F ij −B ij × E ij | (20)

(20)式に表されるように、局所相関値D(i,j)は、特定の相関画素位置23における顔画像21の画素データと部分画像43の画素データとを乗じて得られる積データと、同じ相関画素位置23における部分画像33の画素データと顔画像41の画素データとを乗じて得られる積データとの差分に基づいて算出される値であり、それらの2つの積データの相関値である。図25は、局所相関値D(i,j)の算出式である(20)式と、その(20)式による計算に使用される各画素データとの対応関係を示す。相関画素位置23の画素アドレス(x,y)=(i,j)は、上述した画素原点と顔画像21、部分画像33、顔画像41および部分画像43の各画像の大きさとで定まる定義域の範囲の値をとる位置変数である。ここで、顔画像21の大きさと部分画像33の大きさとは互いに等しいとする。顔画像21の大きさとローパスフィルタ処理後の顔画像41の大きさとが互いに等しく、かつ部分画像33の大きさとローパスフィルタ処理後の部分画像43の大きさとが互いに等しいとすれば、上述した定義域は全て一致する。   As expressed in the equation (20), the local correlation value D (i, j) is product data obtained by multiplying the pixel data of the face image 21 and the pixel data of the partial image 43 at a specific correlation pixel position 23. And the value calculated based on the difference between the product data obtained by multiplying the pixel data of the partial image 33 and the pixel data of the face image 41 at the same correlation pixel position 23, and the correlation between the two product data Value. FIG. 25 shows the correspondence between the expression (20), which is a calculation formula for the local correlation value D (i, j), and each pixel data used for the calculation according to the expression (20). The pixel address (x, y) = (i, j) of the correlation pixel position 23 is defined by the above-described pixel origin and the size of each of the face image 21, the partial image 33, the face image 41, and the partial image 43. It is a position variable that takes a value in the range. Here, it is assumed that the size of the face image 21 and the size of the partial image 33 are equal to each other. If the size of the face image 21 and the size of the face image 41 after the low-pass filter processing are equal to each other, and the size of the partial image 33 and the size of the partial image 43 after the low-pass filter processing are equal to each other, All match.

図26は、画素アドレス(i,j)の相関画素位置23における(20)式による局所相関値D(i,j)の演算を模式的に示した図であって、縦軸は画素データ値、横軸は画素位置である。顔画像21の画素データ値Axyで表される顔が、部分画像33の画素データ値Bxyで表される顔と同じ場合であっても、光源変動等によりそれぞれの画素データ値AxyおよびBxyの間には、局所的に変動するレベル差(倍率変動)が生じている。図26において、画素アドレス(i,j)の相関画素位置23における顔画像21の画素データ値Aijに対し、画素アドレス(i,j)の相関画素位置23における顔画像41の画素データ値Eijは、画素アドレス(i,j)の相関画素位置23の周囲Wの画素データ値の局所的な平均値となっている。図26において、相関画素位置23と同じ画素アドレス(i,j)の画素位置における部分画像33の画素データ値Bijに対し、画素アドレス(i,j)の画素位置における部分画像43の画素データ値Fijは、画素アドレス(i,j)の画素位置の周囲Wの画素データ値の局所的な平均値となっている。 FIG. 26 is a diagram schematically showing the calculation of the local correlation value D (i, j) by the equation (20) at the correlation pixel position 23 of the pixel address (i, j), and the vertical axis indicates the pixel data value. The horizontal axis is the pixel position. Even when the face represented by the pixel data value A xy of the face image 21 is the same as the face represented by the pixel data value B xy of the partial image 33, each pixel data value A xy and There is a level difference (magnification fluctuation) that varies locally between Bxy . In FIG. 26, the pixel data value E of the face image 41 at the correlation pixel position 23 of the pixel address (i, j) is different from the pixel data value A ij of the face image 21 at the correlation pixel position 23 of the pixel address (i, j). ij is a local average value of pixel data values around W around the correlated pixel position 23 of the pixel address (i, j). In FIG. 26, the pixel data of the partial image 43 at the pixel position of the pixel address (i, j) with respect to the pixel data value B ij of the partial image 33 at the pixel position of the same pixel address (i, j) as the correlation pixel position 23. The value F ij is a local average value of pixel data values around W around the pixel position of the pixel address (i, j).

従って顔画像21の画素データ値Aijに部分画像43の画素データ値Fijを乗じてレベル補正を行うとともに、部分画像33の画素データ値Bijに顔画像41の画素データ値Eijを乗じてレベル補正を行う。こうしたレベル補正を行うことにより、補正された顔画像データ(Aij× Fij)の値と、補正された部分画像データ(Bij × Eij)の値とは、互いにレベルが揃うことになる。補正された顔画像データ(Aij× Fij)の値と部分画像データ(Bij × Eij)の値との差分演算を行うことにより、2つの画像(顔画像21および部分画像33)間に照明変動などによるレベル差が生じていた場合においても、正確な局所相関値を算出することが可能になる。 Accordingly performs multiplying and level correction pixel data values F ij of the partial image 43 in the pixel data values A ij of the face image 21, multiplied by the pixel data values E ij of the face image 41 to the pixel data value B ij of the partial image 33 Level correction. By performing such level correction, the level of the corrected face image data (A ij × F ij ) and the value of the corrected partial image data (B ij × E ij ) are equal to each other. . By performing a difference calculation between the corrected face image data (A ij × F ij ) value and the partial image data (B ij × E ij ) value, the two images (the face image 21 and the partial image 33) are calculated. Even when there is a level difference due to illumination fluctuation or the like, an accurate local correlation value can be calculated.

従来の差分総和演算においては、基本画像中の顔画像の画素データと比較対象画像中の部分画像の画素データとの間の差分を計算していた。本変形例においては、(20)式にて、基本画像中の顔画像の画素データと比較対象ローパス画像中の部分画像の画素データとの積と、比較対象画像中の部分画像の画素データと基本ローパス画像中の顔画像の画素データとの積との間の差分を算出している。比較対象ローパス画像中の部分画像の各画素位置の画素データレベルは、比較対象画像中の部分画像の各画素位置周辺の平均的な画素データレベルに相当する。基本ローパス画像中の顔画像の各画素位置の画素データレベルは、基本画像中の顔画像の各画素位置周辺の平均的な画素データレベルに相当する。本変形例における相関演算装置の制御装置によるテンプレートマッチングでは、局所相関値D(i,j)の算出の際に、顔画像と部分画像との間に一律な照度差や比較的低周波な照明ムラが存在した場合においても、画素毎にデータレベル差が補正されていることになる。従って、一律な照度差や比較的低周波な照明ムラに対してロバスト性の高い相関値を算出することができる。   In the conventional difference sum calculation, the difference between the pixel data of the face image in the basic image and the pixel data of the partial image in the comparison target image is calculated. In the present modification, the product of the pixel data of the face image in the basic image and the pixel data of the partial image in the comparison target low-pass image, and the pixel data of the partial image in the comparison target image in Expression (20) The difference between the product of the basic low-pass image and the pixel data of the face image is calculated. The pixel data level at each pixel position of the partial image in the comparison target low-pass image corresponds to an average pixel data level around each pixel position of the partial image in the comparison target image. The pixel data level at each pixel position of the face image in the basic low-pass image corresponds to an average pixel data level around each pixel position of the face image in the basic image. In the template matching by the control device of the correlation calculation device in the present modification, a uniform illuminance difference or relatively low frequency illumination between the face image and the partial image is calculated when the local correlation value D (i, j) is calculated. Even when there is unevenness, the data level difference is corrected for each pixel. Therefore, it is possible to calculate a correlation value having high robustness with respect to a uniform illuminance difference or relatively low frequency illumination unevenness.

本変形例における相関演算装置の制御装置は、顔画像21内における相関画素位置23の走査が終了したか否かをチェックし、走査が終了していない場合には、相関画素位置23の走査が終了するまで、走査により相関画素位置23が変化する毎に順次算出された局所相関値が積算される。   The control device of the correlation calculation device in the present modification checks whether or not the scanning of the correlation pixel position 23 in the face image 21 is completed, and if the scanning is not completed, the scanning of the correlation pixel position 23 is performed. Until the process is completed, the local correlation values sequentially calculated are accumulated each time the correlation pixel position 23 is changed by scanning.

顔画像21内における相関画素位置23の走査が終了した時点で、比較対象画像30の走査により指定された画素アドレス(N,M)で表される基準画素位置32での相関値の積算値の算出が終了することになる。本変形例においては、この相関値の積算値がそのまま、基本画像中の顔画像21と比較対象画像30との積算相関値C(N,M)として用いられる。すなわち、積算相関値C(N,M)は、(21)式で表される第1相関演算式によって得られる。ただし、積算演算ΣΣは位置変数iおよびjについての積算を表す。位置変数iおよびjのとりうる値の範囲は、上述した定義域の範囲と一致するので、すなわち顔画像の存在する画素の範囲に制限される。積算相関値C(N,M)の値が小さいとき、基本画像中の顔画像21と比較対象画像30との相関度は高い。
C(N,M)=ΣΣ|Ai,j×Fi,j−Bi,j×Ei,j| ・・・(21)
When the scanning of the correlation pixel position 23 in the face image 21 is completed, the integrated value of the correlation value at the reference pixel position 32 represented by the pixel address (N, M) designated by the scanning of the comparison target image 30 is obtained. The calculation ends. In the present modification, the integrated value of the correlation values is used as it is as the integrated correlation value C (N, M) between the face image 21 and the comparison target image 30 in the basic image. That is, the integrated correlation value C (N, M) is obtained by the first correlation calculation expression expressed by the expression (21). However, the integration calculation ΣΣ represents the integration for the position variables i and j. Since the range of possible values of the position variables i and j coincides with the above-described range of the definition area, that is, the range of pixels in which the face image exists is limited. When the integrated correlation value C (N, M) is small, the degree of correlation between the face image 21 in the basic image and the comparison target image 30 is high.
C (N, M) = ΣΣ | A i, j × F i, j −B i, j × E i, j | (21)

上述したように、位置変数iおよびjは2次元空間の座標を表わすインデックスであり、基本ローパス画像20aの顔画像41の2次元画像データEi,j、および比較対象ローパス画像30aの部分画像43の2次元画像データFi,jは、基本画像20中の顔画像21の2次元画像データAi,j、および基本画像20中の比較対象画像の2次元画像データBi,jに対して、それぞれローパスフィルタ処理を施すことによって得られる。積算相関値C(N,M)を算出するための第1相関演算式(21)に対応する第2相関演算式は、(22)式で表される。
C=ΣΣ|(Log(Ai,j)+Log(Fi,j))−(Log(Bi,j)+Log(Ei,j))| ・・・(22)
As described above, the position variables i and j are indices representing the coordinates of the two-dimensional space, the two-dimensional image data E i, j of the face image 41 of the basic low-pass image 20a, and the partial image 43 of the comparison low-pass image 30a. 2-dimensional image data F i of, j is 2-dimensional image data a i of the face image 21 in the basic image 20, j, and the two-dimensional image data B i of the comparison image in the basic image 20, with respect to j , Respectively, by applying a low-pass filter process. A second correlation calculation expression corresponding to the first correlation calculation expression (21) for calculating the integrated correlation value C (N, M) is represented by the expression (22).
C = ΣΣ | (Log (A i, j ) + Log (F i, j )) − (Log (B i, j ) + Log (E i, j )) | (22)

2次元データの相関値の算出に乗算を用いた場合、乗算の演算回数はほぼデータ数の自乗に比例して増加するので演算時間は大幅に増大するが、対数変換を用いる第2相関演算を用いれば演算時間を大幅に短縮することができ、本発明の2次元データへの適用は極めて有効である。所定条件が満たされるとき、積算相関値C(N,M)の際に第2相関演算式(22)が用いられ、その所定条件が満たされないとき、積算相関値C(N,M)の際に第1相関演算式(21)が用いられる。例えば、基本画像20中の顔画像21の2次元画像データAi,jのデータ値の平均値、または基本画像20中の顔画像21の2次元画像データAi,jのデータ値および基本画像20中の比較対象画像の2次元画像データBi,jのデータ値の平均値が所定値以上であるとき、上述した所定条件が満たされる。 When multiplication is used to calculate the correlation value of two-dimensional data, the number of multiplication operations increases approximately in proportion to the square of the number of data, so the calculation time increases significantly. However, the second correlation operation using logarithmic transformation is performed. If used, the calculation time can be greatly shortened, and the application of the present invention to two-dimensional data is extremely effective. When the predetermined condition is satisfied, the second correlation calculation formula (22) is used in the case of the integrated correlation value C (N, M), and when the predetermined condition is not satisfied, in the case of the integrated correlation value C (N, M). The first correlation calculation formula (21) is used. For example, the average value of the two-dimensional image data A i, j of the face image 21 in the basic image 20, or the data value of the two-dimensional image data A i, j of the face image 21 in the basic image 20 and the basic image When the average value of the two-dimensional image data B i, j of the comparison target images in 20 is equal to or greater than a predetermined value, the above-described predetermined condition is satisfied.

(変形例6) さらに上述の2次元空間データの相関度検出と同様な考え方を用いて3次元空間データの相関度検出にも本発明を適用することが可能である。 (Modification 6) Furthermore, the present invention can be applied to the detection of the degree of correlation of three-dimensional spatial data using the same concept as the above-described detection of the degree of correlation of two-dimensional spatial data.

(変形例7) また上述の相関演算において、局所相関値を2つの演算データの差分の絶対値として算出しているが、絶対値に限定されるものではない。局所相関値の符号を同一化するための非線形演算であればよく、例えば局所相関値を2つの演算データの差分の自乗演算値とすることも可能である。 (Modification 7) In the above-described correlation calculation, the local correlation value is calculated as the absolute value of the difference between the two calculation data, but is not limited to the absolute value. Any non-linear calculation for unifying the signs of the local correlation values may be used. For example, the local correlation value may be a square calculation value of a difference between two calculation data.

(変形例8) 図3に示す撮像素子211では、焦点検出画素311ごとに一対の光電変換部12および13を備えた例を示した。図27に、ひとつの画素内にひとつの光電変換部を備えた焦点検出画素313および314を示す。焦点検出画素313は、マイクロレンズ10および光電変換部16を有している。焦点検出画素314は、マイクロレンズ10および光電変換部17を有している。光電変換部16および17はマイクロレンズ10により交換レンズの射出瞳に投影され、図4に示す測距瞳92および93が形成される。したがって、焦点検出画素313および314により、焦点検出に用いる一対の像の出力を得ることができる。図27は、焦点検出画素313および314を交互に一列に配置した撮像素子211Bの例を示す。隣接する焦点検出画素313および314は、一対の焦点検出画素を形成し、図3に示す撮像素子211の焦点検出画素311に相当する。 (Modification 8) In the imaging device 211 illustrated in FIG. 3, an example in which a pair of photoelectric conversion units 12 and 13 is provided for each focus detection pixel 311 is shown. FIG. 27 shows focus detection pixels 313 and 314 having one photoelectric conversion unit in one pixel. The focus detection pixel 313 includes the microlens 10 and the photoelectric conversion unit 16. The focus detection pixel 314 includes the microlens 10 and the photoelectric conversion unit 17. The photoelectric conversion units 16 and 17 are projected onto the exit pupil of the interchangeable lens by the microlens 10 to form distance measurement pupils 92 and 93 shown in FIG. Therefore, the focus detection pixels 313 and 314 can obtain a pair of image outputs used for focus detection. FIG. 27 shows an example of an image sensor 211B in which focus detection pixels 313 and 314 are alternately arranged in a line. The adjacent focus detection pixels 313 and 314 form a pair of focus detection pixels, and correspond to the focus detection pixels 311 of the image sensor 211 shown in FIG.

(変形例9) 上述した実施の形態および変形例では、マイクロレンズを用いた瞳分割方式による焦点検出装置を例に挙げて本発明に係る相関演算装置を説明した。本発明に係る相関演算装置は、上述した方式の焦点検出装置に限定されず、再結像瞳分割方式の焦点検出装置にも適用することができ、上述したような効果を奏することができる。 (Modification 9) In the embodiment and the modification described above, the correlation calculation device according to the present invention has been described by taking a pupil detection method using a microlens as an example. The correlation calculation device according to the present invention is not limited to the focus detection device of the above-described type, but can also be applied to a focus detection device of a re-imaging pupil division method, and the effects as described above can be achieved.

図28において、本変形例における相関演算装置を適用した再結像瞳分割方式の焦点検出装置は、交換レンズの光軸191、コンデンサーレンズ110および120、絞りマスク111および121、絞り開口112、113、122および123、再結像レンズ114、115、124および125、ならびに焦点検出用のイメージセンサ(CCD)116および126を含む。焦点検出光束132、133、142および143は、交換レンズの予定結像面から前方へ距離d5の位置に設定された射出瞳190を通過する。距離d5は、コンデンサーレンズ110および120の焦点距離や、コンデンサーレンズ110および120と、絞り開口112、113、122および123との間の距離などに応じて決まる測距瞳距離である。コンデンサーレンズ110および120により絞り開口112および122が投影されることにより、領域(測距瞳)192が形成され、コンデンサーレンズ110および120により絞り開口113および123が投影されることにより、領域(測距瞳)193が形成される。   In FIG. 28, the focus detection device of the re-imaging pupil division method to which the correlation calculation device according to the present modification is applied has an optical axis 191 of an interchangeable lens, condenser lenses 110 and 120, aperture masks 111 and 121, aperture apertures 112 and 113. , 122 and 123, re-imaging lenses 114, 115, 124 and 125, and image sensors (CCD) 116 and 126 for focus detection. The focus detection light beams 132, 133, 142, and 143 pass through an exit pupil 190 that is set at a position of a distance d5 forward from the scheduled imaging surface of the interchangeable lens. The distance d5 is a distance measurement pupil distance determined according to the focal length of the condenser lenses 110 and 120, the distance between the condenser lenses 110 and 120, and the aperture openings 112, 113, 122, and 123, and the like. The apertures 112 and 122 are projected by the condenser lenses 110 and 120 to form a region (ranging pupil) 192, and the apertures 113 and 123 are projected by the condenser lenses 110 and 120 to thereby produce a region (measurement). Distance pupil) 193 is formed.

コンデンサーレンズ110、絞りマスク111、絞り開口112および113、再結像レンズ114および115、ならびにイメージセンサ116が、一つの位置で焦点検出を行う再結像方式の瞳分割型位相差検出方式の焦点検出装置を構成する。図28では、光軸191上にある焦点検出装置と光軸外にある焦点検出装置を模式的に例示する。複数の焦点検出装置を組み合わせることによって、図2に示す5箇所の焦点検出位置G1〜G5において再結像方式の瞳分割型位相差検出で焦点検出を行う焦点検出専用センサーを実現することができる。   Condenser lens 110, stop mask 111, stop apertures 112 and 113, re-imaging lenses 114 and 115, and image sensor 116 focus on a re-imaging type pupil division type phase difference detection method in which focus detection is performed at one position. Configure the detector. FIG. 28 schematically illustrates a focus detection device on the optical axis 191 and a focus detection device outside the optical axis. By combining a plurality of focus detection devices, it is possible to realize a focus detection dedicated sensor that performs focus detection by the re-imaging type pupil division type phase difference detection at the five focus detection positions G1 to G5 shown in FIG. .

コンデンサーレンズ110からなる焦点検出装置は、交換レンズの予定結像面近傍に配置されたコンデンサーレンズ110、その背後に配置されたイメージセンサ116、コンデンサーレンズ110とイメージセンサ116との間に配置され、予定結像面近傍に結像された1次像をイメージセンサ116上に再結像する一対の再結像レンズ114および115、一対の再結像レンズの近傍(図28では前面)に配置された一対の絞り開口112および113を有する絞りマスク111から構成される。イメージセンサ116は複数の光電変換部が直線に沿って密に配置されたラインセンサーであって、光電変換部の配置方向は一対の測距瞳の分割方向、すなわち絞り開口の並び方向と一致する。   The focus detection apparatus including the condenser lens 110 is disposed between the condenser lens 110 disposed in the vicinity of the planned imaging surface of the interchangeable lens, the image sensor 116 disposed behind the condenser lens 110, and between the condenser lens 110 and the image sensor 116. A pair of re-imaging lenses 114 and 115 for re-imaging the primary image formed in the vicinity of the planned imaging surface on the image sensor 116, and the vicinity of the pair of re-imaging lenses (front surface in FIG. 28). The aperture mask 111 has a pair of aperture openings 112 and 113. The image sensor 116 is a line sensor in which a plurality of photoelectric conversion units are densely arranged along a straight line, and the arrangement direction of the photoelectric conversion units matches the dividing direction of the pair of distance measuring pupils, that is, the arrangement direction of the aperture openings. .

イメージセンサ116上に再結像された一対の像の強度分布に対応した情報がイメージセンサ116から出力され、この情報に対して像ズレ検出演算処理(相関処理、位相差検出処理)を施すことによって、いわゆる瞳分割型位相差検出方式(再結像方式)で一対の像の像ズレ量が検出される。像ズレ量に所定の変換係数を乗ずることによって、予定結像面に対する現在の結像面の偏差(デフォーカス量)が算出される。この場合における像ズレ量検出演算処理の際に、イメージセンサ116上に再結像された一対の像の強度分布に対応した情報を対数変換することによって、得られる一対の対数化データ列に基づき、積算相関値Cを求めることができる。すなわち、本発明に係る相関演算装置は、再結像瞳分割方式の焦点検出装置にも適用することができる。   Information corresponding to the intensity distribution of the pair of images re-imaged on the image sensor 116 is output from the image sensor 116, and image shift detection calculation processing (correlation processing, phase difference detection processing) is performed on this information. Thus, an image shift amount of the pair of images is detected by a so-called pupil division type phase difference detection method (re-imaging method). By multiplying the image shift amount by a predetermined conversion coefficient, the deviation (defocus amount) of the current image plane with respect to the planned image plane is calculated. In the case of the image shift amount detection calculation processing in this case, the information corresponding to the intensity distribution of the pair of images re-imaged on the image sensor 116 is logarithmically converted to obtain a pair of logarithmic data strings. The integrated correlation value C can be obtained. That is, the correlation calculation device according to the present invention can be applied to a re-imaging pupil division type focus detection device.

イメージセンサ116は再結像レンズ114および115により予定結像面上に投影されており、デフォーカス量(像ズレ量)の検出精度は、像ズレ量の検出ピッチ、特に再結像方式の場合は予定結像面上に投影された光電変換部の配列ピッチにより決まる。   The image sensor 116 is projected on the planned imaging plane by the re-imaging lenses 114 and 115, and the detection accuracy of the defocus amount (image deviation amount) is the detection pitch of the image deviation amount, particularly in the case of the re-imaging method. Is determined by the arrangement pitch of the photoelectric conversion units projected on the planned imaging plane.

コンデンサーレンズ110は絞りマスク111の絞り開口112および113を射出瞳190上に領域192および193として投影している。これらの領域192および193を測距瞳と呼ぶ。すなわち、イメージセンサ116上に再結像される一対の像は射出瞳190上の一対の測距瞳192および193をそれぞれ通過する焦点検出光束132および133によって形成される。   The condenser lens 110 projects the aperture openings 112 and 113 of the aperture mask 111 as areas 192 and 193 on the exit pupil 190. These regions 192 and 193 are called distance measurement pupils. That is, a pair of images re-imaged on the image sensor 116 is formed by the focus detection light beams 132 and 133 passing through the pair of distance measuring pupils 192 and 193 on the exit pupil 190, respectively.

(変形例10) また、本発明は、撮影光学系を通過する光束を瞳分割する方式の焦点検出に限定されず、外光三角測距方式による距離測定にも適用することができ、上述したような効果を奏することができる。図29により、本変形例における相関演算装置を適用した外光三角測距方式の測距装置について説明する。レンズ320とその結像面に配置されたイメージセンサ326とからなる第1ユニットと、レンズ330とその結像面に配置されたイメージセンサ336とからなる第2ユニットとが、基線長を隔てて配置される。これらの第1ユニットおよび第2ユニットで構成される一対のユニットが測距装置347を構成する。測距対象350の像が、レンズ320および330により、イメージセンサ326および336上にそれぞれ形成される。 (Modification 10) In addition, the present invention is not limited to focus detection using a method in which the light beam passing through the photographing optical system is divided into pupils, and can be applied to distance measurement using an external light triangulation method. Such effects can be achieved. With reference to FIG. 29, a description will be given of an external light triangulation distance measuring device to which the correlation calculation device according to this modification is applied. A first unit composed of a lens 320 and an image sensor 326 disposed on the imaging surface thereof, and a second unit composed of the lens 330 and an image sensor 336 disposed on the imaging surface thereof are separated from each other by a base line length. Be placed. A pair of units composed of the first unit and the second unit constitute a distance measuring device 347. An image of the distance measuring object 350 is formed on the image sensors 326 and 336 by the lenses 320 and 330, respectively.

イメージセンサ326および336上に形成される2つの像の位置関係は、測距装置347から測距対象350までの距離に応じて変化する。したがって、イメージセンサ326および336から出力される2セットの信号データに対して像ズレ量検出演算処理を行うことによって、イメージセンサ326および336上に形成される2つの像の相対的位置関係を検出し、この検出した相対的位置関係に基づいて測距対象350までの距離を測定することができる。この場合における像ズレ量検出演算処理の際に、イメージセンサ326および336から出力される2セットの信号データを対数変換することによって、得られる2セットの対数化データ列に基づき、積算相関値Cを求めることができる。すなわち、本発明に係る相関演算装置は、外光三角測距方式の測距装置にも適用することができる。   The positional relationship between the two images formed on the image sensors 326 and 336 changes according to the distance from the distance measuring device 347 to the distance measuring object 350. Therefore, the relative positional relationship between the two images formed on the image sensors 326 and 336 is detected by performing an image shift amount detection calculation process on the two sets of signal data output from the image sensors 326 and 336. Then, the distance to the distance measuring object 350 can be measured based on the detected relative positional relationship. In the image shift amount detection calculation process in this case, the two sets of signal data output from the image sensors 326 and 336 are logarithmically converted to obtain an integrated correlation value C based on two sets of logarithmic data strings obtained. Can be requested. That is, the correlation calculation device according to the present invention can also be applied to a distance measuring device of the external light triangulation method.

(変形例11) 本発明に係る相関演算装置を含む焦点検出装置を有する撮像装置は、交換レンズとカメラボディとから構成されるディジタルスチルカメラに限定されず、レンズ一体型のディジタルスチルカメラ、あるいはビデオカメラにも適用することができる。また、本発明に係る相関演算装置は、携帯電話などに内蔵される小型カメラモジュールや監視カメラなどにも適用することができる。さらに、本発明に係る相関演算装置は、カメラ以外の焦点検出装置や測距装置、あるいはステレオ測距装置にも適用することができる。 (Modification 11) An imaging device having a focus detection device including a correlation calculation device according to the present invention is not limited to a digital still camera composed of an interchangeable lens and a camera body. It can also be applied to video cameras. The correlation calculation device according to the present invention can also be applied to a small camera module, a surveillance camera, or the like built in a mobile phone. Furthermore, the correlation calculation device according to the present invention can be applied to a focus detection device, a distance measuring device, or a stereo distance measuring device other than the camera.

(変形例12) 本発明に係る相関演算装置は、時間が異なるイメージセンサの信号間の相関を検出して被写体像の動きやカメラのブレを検出する装置にも適用することができる。また、本発明に係る相関演算装置は、イメージセンサの画像信号と特定の画像信号とのパターンマッチングにも適用することができる。さらに、本発明に係る相関演算装置は、画像信号データの相関を検出する装置に限定されず、音に関するデータの相関やその他一般に2つの信号の相関を検出するあらゆる相関演算装置にも適用することができ、上述した効果を奏することができる。 (Modification 12) The correlation calculation apparatus according to the present invention can also be applied to an apparatus that detects the correlation between the signals of the image sensors with different times and detects the movement of the subject image and camera shake. The correlation calculation device according to the present invention can also be applied to pattern matching between an image signal of an image sensor and a specific image signal. Furthermore, the correlation calculation device according to the present invention is not limited to a device that detects the correlation of image signal data, but can also be applied to any correlation calculation device that detects the correlation of data related to sound and generally the correlation of two signals. And the effects described above can be achieved.

10、50、60 マイクロレンズ、
11、12、13、16、17、52、53、62、63 光電変換部、
20 基本画像、21、41 顔画像、22、32 基準画素位置、
23 相関画素位置、30 比較対象画像、33、43 部分画像、
72、73、82、83 焦点検出光束、
90 射出瞳、91 光軸、92、93 測距瞳、94、95 領域、
110、120 コンデンサーレンズ、111、121 絞りマスク、
112、113、122、123 絞り開口、
114、115、124、125 再結像レンズ、
116、126 イメージセンサ、
132、133、142、143 焦点検出光束、
190 射出瞳、191 光軸、192、193 測距瞳、
201 ディジタルスチルカメラ、202 交換レンズ、203 カメラボディ、
204 マウント部、205、206、207 レンズ、208 絞り、
209 レンズ駆動制御装置、211 撮像素子、212 カメラ駆動制御装置、
213 メモリカード、214 LCDドライバー、215 LCD、
216 接眼レンズ、217 電気接点、
310 撮像画素、311、313、314 焦点検出画素、
320、330 レンズ、326、336 イメージセンサ、
347 測距装置、350 測距対象、
400、401、402、403 像信号、
1110、1120、1130、1140、1150 領域、
1410、1420、1430、1440、1450、1460 領域
10, 50, 60 micro lens,
11, 12, 13, 16, 17, 52, 53, 62, 63 photoelectric conversion unit,
20 Basic image, 21, 41 Face image, 22, 32 Reference pixel position,
23 correlation pixel position, 30 comparison target image, 33, 43 partial image,
72, 73, 82, 83 Focus detection luminous flux,
90 Exit pupil, 91 Optical axis, 92, 93 Distance pupil, 94, 95 area,
110, 120 condenser lens, 111, 121 aperture mask,
112, 113, 122, 123 Aperture aperture,
114, 115, 124, 125 Re-imaging lens,
116, 126 Image sensor,
132, 133, 142, 143 Focus detection light flux,
190 Exit pupil, 191 Optical axis, 192, 193 Distance pupil,
201 digital still camera, 202 interchangeable lens, 203 camera body,
204 Mount part, 205, 206, 207 Lens, 208 Aperture,
209 lens drive control device, 211 imaging device, 212 camera drive control device,
213 Memory card, 214 LCD driver, 215 LCD,
216 eyepieces, 217 electrical contacts,
310 imaging pixels, 311, 313, 314 focus detection pixels,
320, 330 lens, 326, 336 image sensor,
347 Distance measuring device, 350 Distance measuring object,
400, 401, 402, 403 image signal,
1110, 1120, 1130, 1140, 1150 region,
1410, 1420, 1430, 1440, 1450, 1460 region

Claims (15)

複数の第1信号データからなる第1信号データ配列において局所的な部分配列をなす複数の第1信号データと、複数の第2信号データからなる第2信号データ配列において前記局所的な部分配列をなす複数の第1信号データに対応して局所的な部分配列をなす複数の第2信号データとの間で乗算を行ない第1局所相関値を算出するとともに、前記複数の第1信号データおよび前記複数の第2信号データを変更する毎に算出した前記第1局所相関値を積算することにより、前記第1信号データ配列と前記第2信号データ配列との間の相関度を表わす第1積算相関値を算出する第1相関演算手段と、
前記複数の第1信号データおよび前記複数の第2信号データをそれぞれ対数変換することにより、複数の第3信号データからなる第3信号データ配列および複数の第4信号データからなる第4信号データ配列を生成する対数変換手段と、
前記第3信号データ配列において局所的な部分配列をなす複数の第3信号データと、前記第4信号データ配列において前記局所的な部分配列をなす複数の第3信号データに対応して局所的な部分配列をなす複数の第4信号データとの間で加算を行ない第2局所相関値を算出するとともに、前記複数の第3信号データおよび前記複数の第4信号データを変更する毎に算出した前記第2局所相関値を積算することにより、前記第3信号データ配列と前記第4信号データ配列との間の相関度を表わす第2積算相関値を算出する第2相関演算手段とを備えることを特徴とする相関演算装置。
A plurality of first signal data forming a local partial array in a first signal data array including a plurality of first signal data, and a local partial array in a second signal data array including a plurality of second signal data. A plurality of second signal data having a local partial arrangement corresponding to the plurality of first signal data formed to calculate a first local correlation value, and the plurality of first signal data and the plurality of first signal data A first integrated correlation representing a degree of correlation between the first signal data array and the second signal data array by integrating the first local correlation values calculated each time a plurality of second signal data is changed. First correlation calculating means for calculating a value;
A third signal data array comprising a plurality of third signal data and a fourth signal data array comprising a plurality of fourth signal data by logarithmically converting the plurality of first signal data and the plurality of second signal data, respectively. Logarithmic conversion means for generating
A plurality of third signal data forming a local partial array in the third signal data array and a plurality of third signal data forming a local partial array in the fourth signal data array The second local correlation value is calculated by performing addition with a plurality of fourth signal data forming a partial array, and the calculation is performed each time the plurality of third signal data and the plurality of fourth signal data are changed. A second correlation calculating means for calculating a second integrated correlation value representing a degree of correlation between the third signal data array and the fourth signal data array by integrating the second local correlation values; A characteristic correlation calculation device.
請求項1に記載の相関演算装置において、
所定条件が満たされるとき、前記第2相関演算手段が前記第2積算相関値を算出し、
前記所定条件が満たされないとき、前記第1相関演算手段が前記第1積算相関値を算出することを特徴とする相関演算装置。
The correlation calculation device according to claim 1,
When the predetermined condition is satisfied, the second correlation calculating means calculates the second integrated correlation value,
When the predetermined condition is not satisfied, the first correlation calculation means calculates the first integrated correlation value.
請求項2に記載の相関演算装置において、
前記所定条件が満たされているか否かを判定する判定手段と、
前記判定手段による判定結果に応じて、前記第1相関演算手段による前記第1積算相関値の算出と前記第2相関演算手段による前記第2積算相関値の算出のいずれか一方を選択する選択する選択手段と、
前記選択手段による選択に応じて算出された前記第1積算相関値および前記第2積算相関値のいずれか一方に基づき、前記第1信号データ配列と前記第2信号データ配列との間の前記相関度を検出する相関度検出手段とをさらに備えることを特徴とする相関演算装置。
The correlation calculation device according to claim 2,
Determination means for determining whether or not the predetermined condition is satisfied;
According to the determination result by the determination means, select one of the calculation of the first integrated correlation value by the first correlation calculating means and the calculation of the second integrated correlation value by the second correlation calculating means is selected. A selection means;
The correlation between the first signal data array and the second signal data array based on one of the first integrated correlation value and the second integrated correlation value calculated according to the selection by the selection unit A correlation calculation device further comprising correlation degree detection means for detecting the degree.
請求項2または3に記載の相関演算装置において、
前記所定条件は、前記複数の第1信号データの平均値と前記複数の第2信号データの平均値とがともに所定値以上であることを特徴とする相関演算装置。
In the correlation calculation device according to claim 2 or 3,
The predetermined condition is that the average value of the plurality of first signal data and the average value of the plurality of second signal data are both equal to or greater than a predetermined value.
第1画像の空間強度分布を所定間隔で配置された複数の空間座標点でサンプリングして得られる複数の第1信号データからなる第1信号データ配列において、前記複数の空間座標点のうちの第1空間座標点の近傍にて第1位置関係にある複数の空間座標点で得られる複数の第1信号データと、第2画像の空間強度分布を前記所定間隔で配置された前記複数の空間座標点でサンプリングして得られる複数の第2信号データからなる第2信号データ配列において、前記複数の空間座標点のうちの前記第1空間座標点に対し第2位置関係にある第2空間座標点の近傍にて前記第1位置関係にある複数の空間座標点で得られる複数の第2信号データとの間で乗算を行なうことにより第1積データと第2積データとを算出し、前記第1積データと前記第2積データとの減算を行なって第1差分データを算出し、前記第1差分データを非線形変換して同一符号化を行なうことにより、前記第1空間座標点の近傍の前記複数の第1信号データと前記第2空間座標点の近傍の前記複数の第2信号データとの間の第1局所相関値を算出し、前記第1空間座標点を所定の空間座標領域に亘って移動させて前記第1局所相関値を積算することにより、前記第1信号データ配列と前記第2信号データ配列との間の前記第2位置関係における第1積算相関値を算出する第1相関演算手段と、
前記複数の第1信号データおよび前記複数の第2信号データをそれぞれ対数変換して複数の第3信号データおよび複数の第4信号データを算出し、前記複数の第3信号データからなる第3信号データ配列および前記複数の第4信号データからなる第4信号データ配列を生成する対数変換手段と、
前記第3信号データ配列において、前記第1空間座標点の近傍にて前記第1位置関係にある複数の空間座標点で得られる複数の第3信号データと、前記第4信号データ配列において、前記第1空間座標点に対し前記第2位置関係にある前記第2空間座標点の近傍にて前記第1位置関係にある複数の空間座標点で得られる複数の第4信号データとの間で加算を行なうことにより第1和データと第2和データとを算出し、さらに前記第1和データと前記第2和データとの減算を行なって第2差分データを算出し、前記第2差分データを非線形変換して同一符号化を行なうことにより、前記第1空間座標点の近傍の前記複数の第3信号データと前記第2空間座標点の近傍の前記複数の第4信号データとの間の第2局所相関値を算出し、前記第1空間座標点を前記所定の空間座標領域に亘って移動させて前記第2局所相関値を積算することにより、前記第3信号データ配列と前記第4信号データ配列との間の前記第2位置関係における第2積算相関値を算出する第2相関演算手段と、
所定条件が満たされるか否かに応じて、前記第1相関演算手段による前記第1積算相関値の算出および前記第2相関演算手段による前記第2積算相関値の算出のいずれか一方を選択する選択手段と、
前記選択手段により前記第1相関演算手段による前記第1積算相関値の算出が選択されたときは、前記第2位置関係を所定範囲に亘って変更する毎に前記第2位置関係に対応する前記第1積算相関値を算出し、前記第1積算相関値が極値を示すときの前記第2位置関係に基づき、前記第1信号データ配列と前記第2信号データ配列との空間的な相対変位量を算出し、前記選択手段により前記第2相関演算手段による前記第2積算相関値の算出が選択されたときは、前記第2位置関係を前記所定範囲に亘って変更する毎に前記第2位置関係に対応する前記第2積算相関値を算出し、前記第2積算相関値が極値を示すときの前記第2位置関係に基づき、前記第1信号データ配列と前記第2信号データ配列との空間的な相対変位量を算出する相対変位量検出手段とを備えることを特徴とする相関演算装置。
In the first signal data array composed of a plurality of first signal data obtained by sampling the spatial intensity distribution of the first image at a plurality of spatial coordinate points arranged at predetermined intervals, the first of the plurality of spatial coordinate points. The plurality of spatial coordinates in which a plurality of first signal data obtained at a plurality of spatial coordinate points having a first positional relationship in the vicinity of one spatial coordinate point and the spatial intensity distribution of the second image are arranged at the predetermined interval. A second spatial coordinate point having a second positional relationship with respect to the first spatial coordinate point among the plurality of spatial coordinate points in a second signal data array comprising a plurality of second signal data obtained by sampling at a point; The first product data and the second product data are calculated by performing multiplication with a plurality of second signal data obtained at a plurality of spatial coordinate points in the first positional relationship in the vicinity of 1 product data and the above A plurality of first signal data in the vicinity of the first spatial coordinate point is obtained by performing subtraction with the product data to calculate first difference data, performing non-linear transformation on the first difference data and performing the same encoding. And a plurality of second signal data in the vicinity of the second spatial coordinate point, a first local correlation value is calculated, and the first spatial coordinate point is moved over a predetermined spatial coordinate area to First correlation calculating means for calculating a first integrated correlation value in the second positional relationship between the first signal data array and the second signal data array by integrating one local correlation value;
A plurality of third signal data and a plurality of fourth signal data are calculated by logarithmically converting the plurality of first signal data and the plurality of second signal data, respectively, and a third signal composed of the plurality of third signal data Logarithmic conversion means for generating a fourth signal data array comprising a data array and the plurality of fourth signal data;
In the third signal data array, in the fourth signal data array, a plurality of third signal data obtained at a plurality of spatial coordinate points in the first positional relationship in the vicinity of the first spatial coordinate point, Addition to a plurality of fourth signal data obtained at a plurality of spatial coordinate points having the first positional relationship in the vicinity of the second spatial coordinate point having the second positional relationship with respect to the first spatial coordinate point To calculate first sum data and second sum data, further subtract the first sum data from the second sum data to calculate second difference data, and calculate the second difference data By performing non-linear transformation and performing the same encoding, a plurality of third signal data in the vicinity of the first spatial coordinate point and a plurality of fourth signal data in the vicinity of the second spatial coordinate point are obtained. Two local correlation values are calculated, and the first space In the second positional relationship between the third signal data array and the fourth signal data array, the standard point is moved over the predetermined spatial coordinate area and the second local correlation value is integrated. Second correlation calculating means for calculating a second integrated correlation value;
One of calculation of the first integrated correlation value by the first correlation calculating means and calculation of the second integrated correlation value by the second correlation calculating means is selected according to whether or not a predetermined condition is satisfied. A selection means;
When the calculation of the first integrated correlation value by the first correlation calculation unit is selected by the selection unit, the second positional relationship corresponding to the second positional relationship every time the second positional relationship is changed over a predetermined range. A spatial relative displacement between the first signal data array and the second signal data array based on the second positional relationship when the first integrated correlation value is calculated and the first integrated correlation value shows an extreme value. When the calculation of the second integrated correlation value by the second correlation calculation unit is selected by the selection unit, the second positional relationship is changed every time the second positional relationship is changed over the predetermined range. Calculating the second integrated correlation value corresponding to the positional relationship, and based on the second positional relationship when the second integrated correlation value indicates an extreme value, the first signal data array and the second signal data array; Relative variation to calculate the spatial relative displacement of Correlation calculation apparatus characterized by comprising a quantity detecting means.
請求項5に記載の相関演算装置において、
前記対数変換手段は、前記複数の第1信号データおよび前記複数の第2信号データのうち、所定値以下のデータ値を示す信号データを無効データに変換し、前記複数の第3信号データおよび前記複数の第4信号データの中に前記無効データが含まれている場合は、前記無効データに対応する前記第2局所相関値を無効化し、
前記第2相関演算手段は、無効化されていない前記第2局所相関値を積算することにより、前記第2積算相関値を算出することを特徴とする相関演算装置。
The correlation calculation device according to claim 5,
The logarithmic conversion means converts signal data indicating a data value equal to or less than a predetermined value out of the plurality of first signal data and the plurality of second signal data into invalid data, and the plurality of third signal data and the plurality of third signal data and the plurality of second signal data When the invalid data is included in a plurality of fourth signal data, invalidate the second local correlation value corresponding to the invalid data,
The second correlation calculation means calculates the second integrated correlation value by integrating the second local correlation values that have not been invalidated.
請求項6に記載の相関演算装置において、
前記複数の第1信号データおよび前記複数の第2信号データのデータ値分布を検出するデータ値分布検出手段をさらに備え、
前記対数変換手段は、前記データ値分布検出手段により検出された前記データ値分布に応じて前記所定値を決定することを特徴とする相関演算装置。
The correlation calculation device according to claim 6,
Data value distribution detecting means for detecting data value distributions of the plurality of first signal data and the plurality of second signal data;
The logarithmic conversion means determines the predetermined value according to the data value distribution detected by the data value distribution detection means.
請求項6に記載の相関演算装置において、
前記対数変換手段は、前記複数の第1信号データおよび前記複数の第2信号データのノイズレベルに応じて前記所定値を決定することを特徴とする相関演算装置。
The correlation calculation device according to claim 6,
The logarithmic conversion means determines the predetermined value according to a noise level of the plurality of first signal data and the plurality of second signal data.
請求項6に記載の相関演算装置において、
入力データ値と、前記入力データ値を対数変換して得られる出力データ値との対応関係が定められた対数ルックアップテーブルをさらに備え、
前記対数変換手段は、前記複数の第1信号データおよび前記複数の第2信号データのうち、前記所定値よりも大きいデータ値を前記入力データ値として、前記対数ルックアップテーブルを参照して前記出力データ値を取得することにより、前記複数の第3信号データおよび前記複数の第4信号データを算出することを特徴とする相関演算装置。
The correlation calculation device according to claim 6,
A logarithmic lookup table in which a correspondence relationship between an input data value and an output data value obtained by logarithmically converting the input data value is defined;
The logarithmic conversion means refers to the logarithmic look-up table with the data value larger than the predetermined value as the input data value among the plurality of first signal data and the plurality of second signal data. The correlation calculation device, wherein the plurality of third signal data and the plurality of fourth signal data are calculated by acquiring data values.
請求項9に記載の相関演算装置において、
前記複数の第1信号データおよび前記複数の第2信号データのデータ値分布を検出するデータ値分布検出手段をさらに備え、
前記対数ルックアップテーブルは、前記対応関係が異なる複数の対数ルックアップテーブルを含み、
前記対数変換手段は、前記データ値分布検出手段により検出された前記データ値分布に応じて前記複数の対数ルックアップテーブルのうちの1つの対数ルックアップテーブルを参照して前記出力データ値を取得することにより、前記複数の第3信号データおよび前記複数の第4信号データを算出することを特徴とする相関演算装置。
The correlation calculation device according to claim 9,
Data value distribution detecting means for detecting data value distributions of the plurality of first signal data and the plurality of second signal data;
The logarithmic lookup table includes a plurality of logarithmic lookup tables having different correspondence relationships;
The logarithmic conversion means acquires the output data value by referring to one logarithmic lookup table of the plurality of logarithmic lookup tables according to the data value distribution detected by the data value distribution detection means. Thus, the plurality of third signal data and the plurality of fourth signal data are calculated.
請求項6に記載の相関演算装置において、
前記第2相関演算手段は、無効化されていない前記第2局所相関値の数に応じて前記第2積算相関値を正規化することを特徴とする相関演算装置。
The correlation calculation device according to claim 6,
The second correlation calculation means normalizes the second cumulative correlation value according to the number of the second local correlation values that are not invalidated.
請求項6に記載の相関演算装置において、
前記第1位置関係にある前記複数の空間座標点で得られる前記複数の第3信号データ同士の減算、および前記第1位置関係にある前記複数の空間座標点で得られる前記複数の第4信号データ同士の減算を、前記第1空間座標点を前記所定の空間座標領域に亘って移動させて行なうことにより、前記複数の空間座標点に対応する複数の第1中間処理データおよび複数の第2中間処理データを算出し、前記複数の第1中間処理データからなる第1中間処理データ配列と前記複数の第2中間処理データからなる第2中間処理データ配列とを生成する中間処理演算手段をさらに備え、
前記中間処理演算手段は、前記複数の第1中間処理データおよび前記複数の第2中間処理データの算出に用いられる前記複数の第3信号データおよび前記複数の第4信号データの中に前記無効データが含まれている場合は、前記複数の第1中間処理データおよび前記複数の第2中間処理データの中の、前記無効データに対応する中間処理データを無効化し、
前記第2相関演算手段は、前記第1和データと前記第2和データとの減算を行なって算出する前記第2差分データを、前記第1空間座標点の近傍にて前記第1位置関係にある前記複数の空間座標点で得られる前記複数の第1中間処理データの各々と、前記第2空間座標点の近傍にて前記第1位置関係にある前記複数の空間座標点で得られる前記第2中間処理データの各々との減算を行なうことによって算出し、前記第2差分データを非線形変換して同一符号化を行なうことにより前記第2局所相関値を算出する際に、前記中間処理演算手段によって無効化された前記中間処理データに応じた前記第2局所相関値を無効化することを特徴とする相関演算装置。
The correlation calculation device according to claim 6,
Subtraction of the plurality of third signal data obtained at the plurality of spatial coordinate points in the first positional relationship, and the plurality of fourth signals obtained at the plurality of spatial coordinate points in the first positional relationship. By subtracting the data by moving the first spatial coordinate point over the predetermined spatial coordinate region, a plurality of first intermediate processing data and a plurality of second second data corresponding to the plurality of spatial coordinate points are performed. Intermediate processing operation means for calculating intermediate processing data and generating a first intermediate processing data array composed of the plurality of first intermediate processing data and a second intermediate processing data array composed of the plurality of second intermediate processing data; Prepared,
The intermediate processing calculation means includes the invalid data among the plurality of third signal data and the plurality of fourth signal data used for calculating the plurality of first intermediate processing data and the plurality of second intermediate processing data. Is included, the intermediate processing data corresponding to the invalid data in the plurality of first intermediate processing data and the plurality of second intermediate processing data is invalidated,
The second correlation calculation means sets the second difference data calculated by subtracting the first sum data and the second sum data to the first positional relationship in the vicinity of the first spatial coordinate point. Each of the plurality of first intermediate processing data obtained at the plurality of spatial coordinate points and the first spatial data obtained at the plurality of spatial coordinate points in the first positional relationship in the vicinity of the second spatial coordinate point. When the second local correlation value is calculated by performing subtraction with each of the two intermediate processing data and performing the same encoding by nonlinearly converting the second difference data, the intermediate processing calculating means A correlation calculation device that invalidates the second local correlation value according to the intermediate processing data invalidated by.
請求項6に記載の相関演算装置と、
光学系の射出瞳の異なる領域を通過し、前記光学系の予定焦点面上に一対の画像を形成する一対の光束を、空間的配列にしたがって配置された複数の焦点検出画素がそれぞれ有する複数の光電変換部が受光することにより、前記一対の画像に対応した一対の画像データ配列を、前記第1信号データ配列および前記第2信号データ配列として生成するイメージセンサと、
前記相関演算装置相対変位量算出手段によって算出される前記空間的な相対変位量を前記一対の画像の像ズレ量として取得するとともに、前記像ズレ量に所定の変換係数を乗じて前記予定焦点面と前記光学系の結像面との間のデフォーカス量を算出するデフォーカス量算出手段とを備えることを特徴とする焦点検出装置。
A correlation calculation device according to claim 6;
A plurality of focus detection pixels each having a pair of light fluxes that pass through different regions of the exit pupil of the optical system and form a pair of images on the planned focal plane of the optical system, respectively, arranged according to a spatial arrangement An image sensor that generates a pair of image data arrays corresponding to the pair of images as the first signal data array and the second signal data array when the photoelectric conversion unit receives light;
The spatial relative displacement amount calculated by the correlation calculation device relative displacement amount calculating means is acquired as an image displacement amount of the pair of images, and the predetermined focal plane is multiplied by a predetermined conversion coefficient. And a defocus amount calculating means for calculating a defocus amount between the optical system and the imaging plane of the optical system.
請求項13に記載の焦点検出装置において、
前記イメージセンサによって前記第1信号データデータ配列および前記第2信号データ配列が生成されると、前記選択手段によって前記第1相関演算手段による前記第1積算相関値の前記算出および前記第2相関演算手段による前記第2積算相関値の前記算出のいずれか一方が選択される前に、予め、前記対数変換手段は、前記第3信号データ配列と前記第4信号データ配列とを生成することを特徴とする焦点検出装置。
The focus detection apparatus according to claim 13.
When the first signal data array and the second signal data array are generated by the image sensor, the selection unit calculates the first integrated correlation value and the second correlation operation by the selection unit. The logarithmic conversion unit generates the third signal data array and the fourth signal data array in advance before any one of the calculation of the second integrated correlation value by the unit is selected. Focus detection device.
複数の第1信号データからなる第1信号データ配列において局所的な部分配列をなす複数の第1信号データと、複数の第2信号データからなる第2信号データ配列において前記局所的な部分配列をなす複数の第1信号データに対応して局所的な部分配列をなす複数の第2信号データとの間で乗算を行なうことにより、前記局所的な部分配列をなす複数の第1信号データと前記局所的な部分配列をなす複数の第2信号データとの間の第1局所相関値を算出するとともに、前記第1信号データ配列中および前記第2信号データ配列中において前記局所的な部分配列をなす複数の第1信号データおよび前記局所的な部分配列をなす複数の第2信号データを変更する毎に算出した前記第1局所相関値を積算することにより、前記第1信号データ配列と前記第2信号データ配列との間の相関度を表わす第1積算相関値を算出する第1相関演算手段と、
前記複数の第1信号データおよび前記複数の第2信号データをそれぞれ対数変換することにより、複数の第3信号データからなる第3信号データ配列および複数の第4信号データからなる第4信号データ配列を生成する対数変換手段と、
前記第3信号データ配列において局所的な部分配列をなす複数の第3信号データと、前記第4信号データ配列において前記局所的な部分配列をなす複数の第3信号データに対応して局所的な部分配列をなす複数の第4信号データとの間で加算を行なうことにより、前記局所的な部分配列をなす複数の第3信号データと前記局所的な部分配列をなす複数の第4信号データとの間の第2局所相関値を算出するとともに、前記第3信号データ配列中および前記第4信号データ配列中において前記局所的な部分配列をなす複数の第3信号データおよび前記局所的な部分配列をなす複数の第4信号データを変更する毎に算出した前記第2局所相関値を積算することにより、前記第3信号データ配列と前記第4信号データ配列との間の相関度を表わす第2積算相関値を算出する第2相関演算手段とを備えることを特徴とする相関演算装置。
A plurality of first signal data forming a local partial array in a first signal data array including a plurality of first signal data, and a local partial array in a second signal data array including a plurality of second signal data. Multiplying a plurality of second signal data forming a local partial array corresponding to the plurality of first signal data forming the plurality of first signal data forming the local partial array, A first local correlation value between a plurality of second signal data forming a local partial array is calculated, and the local partial array in the first signal data array and the second signal data array is calculated. By integrating the first local correlation value calculated each time the plurality of first signal data formed and the plurality of second signal data forming the local partial array are changed, A first correlation calculating means for calculating a first cumulative correlation value representing a correlation between the serial second signal data sequences,
A third signal data array comprising a plurality of third signal data and a fourth signal data array comprising a plurality of fourth signal data by logarithmically converting the plurality of first signal data and the plurality of second signal data, respectively. Logarithmic conversion means for generating
A plurality of third signal data forming a local partial array in the third signal data array and a plurality of third signal data forming a local partial array in the fourth signal data array By performing addition between a plurality of fourth signal data forming a partial array, a plurality of third signal data forming the local partial array and a plurality of fourth signal data forming the local partial array; A plurality of third signal data forming the local partial array and the local partial array in the third signal data array and the fourth signal data array The second local correlation value calculated each time the plurality of fourth signal data forming the first is changed is integrated to obtain a second degree of correlation between the third signal data array and the fourth signal data array. Correlation calculation apparatus characterized by comprising a second correlation calculating means for calculating a calculated correlation value.
JP2012180162A 2012-08-15 2012-08-15 Correlation calculation device, focus detection device, and electronic camera Active JP6102119B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012180162A JP6102119B2 (en) 2012-08-15 2012-08-15 Correlation calculation device, focus detection device, and electronic camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012180162A JP6102119B2 (en) 2012-08-15 2012-08-15 Correlation calculation device, focus detection device, and electronic camera

Publications (2)

Publication Number Publication Date
JP2014038191A true JP2014038191A (en) 2014-02-27
JP6102119B2 JP6102119B2 (en) 2017-03-29

Family

ID=50286384

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012180162A Active JP6102119B2 (en) 2012-08-15 2012-08-15 Correlation calculation device, focus detection device, and electronic camera

Country Status (1)

Country Link
JP (1) JP6102119B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017215578A (en) * 2016-05-12 2017-12-07 キヤノン株式会社 Focus detection device and control method of the same

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60243619A (en) * 1984-05-18 1985-12-03 Nippon Kogaku Kk <Nikon> Focus detecting device
JPS61105520A (en) * 1984-10-29 1986-05-23 Nippon Kogaku Kk <Nikon> Focus detector
JPH0853705A (en) * 1994-08-10 1996-02-27 Kobe Steel Ltd Steelmaking method
JP2001133254A (en) * 1999-08-24 2001-05-18 Asahi Optical Co Ltd Distance measuring instrument
JP2003230051A (en) * 2002-02-01 2003-08-15 Nikon Corp Electronic camera
JP2005270291A (en) * 2004-03-24 2005-10-06 Toshiba Corp Ultrasonic diagnostic apparatus
JP2007333720A (en) * 2006-05-17 2007-12-27 Nikon Corp Correlation calculation method, correlation calculation device, focus detecting device, and imaging device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60243619A (en) * 1984-05-18 1985-12-03 Nippon Kogaku Kk <Nikon> Focus detecting device
JPS61105520A (en) * 1984-10-29 1986-05-23 Nippon Kogaku Kk <Nikon> Focus detector
JPH0853705A (en) * 1994-08-10 1996-02-27 Kobe Steel Ltd Steelmaking method
JP2001133254A (en) * 1999-08-24 2001-05-18 Asahi Optical Co Ltd Distance measuring instrument
JP2003230051A (en) * 2002-02-01 2003-08-15 Nikon Corp Electronic camera
JP2005270291A (en) * 2004-03-24 2005-10-06 Toshiba Corp Ultrasonic diagnostic apparatus
JP2007333720A (en) * 2006-05-17 2007-12-27 Nikon Corp Correlation calculation method, correlation calculation device, focus detecting device, and imaging device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017215578A (en) * 2016-05-12 2017-12-07 キヤノン株式会社 Focus detection device and control method of the same

Also Published As

Publication number Publication date
JP6102119B2 (en) 2017-03-29

Similar Documents

Publication Publication Date Title
JP5066893B2 (en) Correlation calculation method, correlation calculation device, focus detection device, and imaging device
JP4770560B2 (en) Imaging apparatus, camera, and image processing method
JP4802993B2 (en) Correlation calculation method, correlation calculation device, focus detection device, and imaging device
JP4935162B2 (en) Imaging apparatus, camera, and image processing method
JP4858008B2 (en) FOCUS DETECTION DEVICE, FOCUS DETECTION METHOD, AND IMAGING DEVICE
JP2007279597A (en) Imaging apparatus, camera and image processing method
JP5000413B2 (en) Imaging system and image signal processing program
JP5157084B2 (en) Correlation calculation device, focus detection device, and imaging device
JP2016038414A (en) Focus detection device, control method thereof, and imaging apparatus
JP2014138290A (en) Imaging device and imaging method
JP6381274B2 (en) Imaging device, control method thereof, and control program
JP5423111B2 (en) Focus detection apparatus and imaging apparatus
JP6353233B2 (en) Image processing apparatus, imaging apparatus, and image processing method
US10362214B2 (en) Control apparatus, image capturing apparatus, control method, and non-transitory computer-readable storage medium
JP6700818B2 (en) Image processing device, imaging device, and image processing method
JP6873729B2 (en) Focus detector and image pickup device
JP6974599B2 (en) Image pickup device, distance measurement method, distance measurement program and recording medium
JP5338112B2 (en) Correlation calculation device, focus detection device, and imaging device
JP6102119B2 (en) Correlation calculation device, focus detection device, and electronic camera
JP2020030569A (en) Image processing method, image processing device, imaging device, lens device, program, and storage medium
JP4817552B2 (en) Phase difference detection method, phase difference detection device, distance measuring device, and imaging device
JP2018010245A (en) Signal processor and control method therefor
JP2009047735A (en) Imaging apparatus and image processing program
JP5942755B2 (en) Image processing circuit, image processing method, and imaging apparatus
JP2012226088A (en) Imaging apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151201

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160705

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160831

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170131

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170213

R150 Certificate of patent or registration of utility model

Ref document number: 6102119

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250