JP2013254114A - Imaging device, control method and program - Google Patents

Imaging device, control method and program Download PDF

Info

Publication number
JP2013254114A
JP2013254114A JP2012130189A JP2012130189A JP2013254114A JP 2013254114 A JP2013254114 A JP 2013254114A JP 2012130189 A JP2012130189 A JP 2012130189A JP 2012130189 A JP2012130189 A JP 2012130189A JP 2013254114 A JP2013254114 A JP 2013254114A
Authority
JP
Japan
Prior art keywords
pixels
image
pixel
reconstructed image
generated
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
JP2012130189A
Other languages
Japanese (ja)
Other versions
JP2013254114A5 (en
JP6046922B2 (en
Inventor
Tomomi Watanabe
友美 渡邉
Masashi Kimura
正史 木村
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2012130189A priority Critical patent/JP6046922B2/en
Publication of JP2013254114A publication Critical patent/JP2013254114A/en
Publication of JP2013254114A5 publication Critical patent/JP2013254114A5/en
Application granted granted Critical
Publication of JP6046922B2 publication Critical patent/JP6046922B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To speed up an autofocus operation in an imaging device capable of generation of an image focused at any focus distance after imaged.SOLUTION: An imaging device is configured to: set the number of pixels of a generation reconstruction image for focus evaluation; determine pixels of a reconstruction image capable of generation to be used in generation of each pixel of a generation reconstruction image from the set number of pixels and the upper limit number of pixels of a reconstruction image capable of generation from pixels of an image signal; and as to each pixel of the generation reconstruction image, of the pixels of the image signal corresponding to pixels of the reconstruction image capable of generation to be used in generation, select a predetermined number of pixels as pixels to be used in generation. Then, when the set number of pixels of the generation reconstruction image is smaller than the upper limit number of pixels, the imaging device selects pixel of at least one corresponding image signal as to each pixel of the generation reconstruction image capable of generation to be used in generation.

Description

本発明は、撮像装置、制御方法、及びプログラムに関し、特に撮影後に任意の焦点距離に合焦した画像を生成する技術に関する。   The present invention relates to an imaging apparatus, a control method, and a program, and more particularly to a technique for generating an image focused on an arbitrary focal length after shooting.

デジタルカメラ等の撮像装置では、撮影対象である被写体に応じて、焦点調整を行なって撮影が行われる。近年の一般的な撮像装置は、このような焦点調整を自動で行う、所謂オートフォーカス(AF)機能を有する。AFに用いられる焦点検出方式には、例えば位相差検出方式とコントラスト検出方式とがあり、前者は主にデジタル一眼レフカメラ、後者は主にコンパクトデジタルカメラに用いられている。   In an imaging apparatus such as a digital camera, shooting is performed by adjusting the focus according to a subject to be shot. A general imaging apparatus in recent years has a so-called autofocus (AF) function for automatically performing such focus adjustment. Focus detection methods used for AF include, for example, a phase difference detection method and a contrast detection method. The former is mainly used for a digital single-lens reflex camera, and the latter is mainly used for a compact digital camera.

コントラスト検出方式は、得られる撮像信号の信号強度等により合焦状態を検出するため、異なる光軸について得られた画像間の像のずれを検出する位相差検出方式に比べ、合焦する焦点距離を厳密に検出することができる。一方で、コントラスト検出方式を用いた合焦焦点距離の検出では、焦点距離を異ならせながら撮像した複数の画像について合焦評価を行う必要がある。このため、コントラスト検出方式を用いた合焦焦点距離の検出には複数の画像についての評価時間及びフォーカスレンズの駆動時間が必要であり、位相差検出方式に比べて検出に時間を要する。   The contrast detection method detects the in-focus state based on the signal strength of the obtained image signal, etc., so the focal length is in focus compared to the phase difference detection method that detects image displacement between images obtained for different optical axes. Can be detected strictly. On the other hand, in focus focal length detection using a contrast detection method, it is necessary to perform focus evaluation on a plurality of images taken with different focal lengths. For this reason, the detection of the focal focal length using the contrast detection method requires an evaluation time for a plurality of images and the drive time of the focus lens, and the detection requires more time than the phase difference detection method.

これに対し特許文献1には、コントラスト検出方式を用いた合焦焦点距離の検出において、撮像した画像信号について読み出す画素数を低減して得られた画像信号を合焦評価に用いることで、合焦評価処理に要する時間を低減する撮像装置が開示されている。   On the other hand, in Patent Document 1, in the focus focal length detection using the contrast detection method, an image signal obtained by reducing the number of pixels read out for the captured image signal is used for focusing evaluation. An imaging apparatus that reduces the time required for the focus evaluation process is disclosed.

一方、近年では撮影後に任意の焦点距離に合焦した画像を生成可能な撮像装置がある。このような撮像装置では、撮像素子内の複数の光電変換素子に対してマイクロレンズが割り当てられ、1つのマイクロレンズに対応付けられた光電変換素子の各々に対して、撮影光学系の異なる瞳領域を通過した光束が結像される。該撮像装置により得られた撮像素子の各画素の出力信号を並べ替えて瞳分割数分の画素値を加算することで、任意の焦点距離に合焦した画像の各画素は生成される。   On the other hand, in recent years, there is an imaging apparatus that can generate an image focused on an arbitrary focal length after shooting. In such an imaging apparatus, microlenses are assigned to a plurality of photoelectric conversion elements in the imaging element, and different pupil regions of the imaging optical system are assigned to each of the photoelectric conversion elements associated with one microlens. The light beam that has passed through is imaged. By rearranging the output signals of the pixels of the image sensor obtained by the imaging device and adding the pixel values for the number of pupil divisions, the pixels of the image focused on an arbitrary focal length are generated.

特許文献2には、撮影後に任意の焦点距離に合焦した画像を生成可能な撮像装置において、1回の撮像で得られた出力信号から複数の焦点距離に合焦した焦点検出用の画像を生成することで、撮影対象の被写体に合焦する焦点距離を検出する方法が開示されている。   Patent Document 2 discloses an image for focus detection focused on a plurality of focal lengths from an output signal obtained by one imaging in an imaging apparatus capable of generating an image focused on an arbitrary focal length after shooting. A method of detecting a focal length that is focused on a subject to be imaged by generating is disclosed.

特開2008−199477号公報JP 2008-199477 A 特開2009−258610号公報JP 2009-258610 A

しかしながら、特許文献2ような撮像装置における合焦焦点距離を検出する方法は、焦点距離に応じて1回の撮像で得られた出力信号の画素の並べ替えを行い、並べ替え後の出力信号から焦点検出用の画像を生成する。このため、1つの焦点距離に合焦する焦点検出用の画像の生成には、画素の生成や該画像についての合焦評価に時間を要するため、コントラスト検出方式を用いた合焦焦点距離の検出に要する時間の短縮は十分ではなかった。   However, the method of detecting the focal length in the imaging apparatus as in Patent Document 2 rearranges the pixels of the output signal obtained by one imaging in accordance with the focal length, and uses the rearranged output signal. An image for focus detection is generated. For this reason, since it takes time to generate a pixel for focus detection and focus evaluation on the image to generate an image for focus detection that focuses on one focal length, detection of the focal length using a contrast detection method The shortening of the time required for this was not sufficient.

これに対し、特許文献1のように撮像素子から読み出す画素を間引きして合焦評価を行うことで、1つの焦点検出用の画像の生成及び合焦評価に要する時間を低減することが考えられる。しかしながら、撮影後に任意の焦点距離に合焦した画像を生成可能な撮像装置について、焦点検出用に好適な間引き画像を生成する方法は、これまで提案されていなかった。   On the other hand, it is conceivable to reduce the time required for generating and focusing evaluation of one focus detection image by thinning out pixels read out from the image sensor as in Patent Document 1 and performing focus evaluation. . However, a method for generating a thinned image suitable for focus detection has not been proposed so far for an imaging apparatus capable of generating an image focused on an arbitrary focal length after shooting.

本発明は、上述の問題点に鑑みてなされたものであり、撮影後に任意の焦点距離に合焦した画像を生成可能な撮像装置における、オートフォーカス動作を高速化する撮像装置、制御方法、及びプログラムを提供することを目的とする。   The present invention has been made in view of the above-described problems, and an imaging apparatus, a control method, and an imaging apparatus that speed up an autofocus operation in an imaging apparatus capable of generating an image focused at an arbitrary focal length after shooting. The purpose is to provide a program.

前述の目的を達成するために、本発明の撮像装置は、以下の構成を備える。
被写体を撮像し、得られた画像信号を出力する撮像手段であって、該画像信号の画素の各々が、通過した撮像光学系の瞳領域及び入射方向の組み合わせが異なる光束に対応する撮像手段と、撮像手段により出力された画像信号から生成する生成再構成画像について設定する、該生成再構成画像内で合焦する被写体の焦点距離を決定する決定手段と、決定手段により決定された焦点距離に応じて、生成再構成画像の各画素に対応する所定数の画像信号の画素の画素値を合算することで、焦点距離に合焦した生成再構成画像を生成する生成手段と、生成手段により生成された生成再構成画像について合焦評価を行う評価手段と、を有する撮像装置であって、生成手段により生成される生成再構成画像の画素数を設定する設定手段と、設定手段により設定された生成再構成画像の画素数と、画像信号の画素から生成可能な再構成画像の上限画素数とから生成再構成画像の各画素の生成に用いる生成可能な再構成画像の画素を決定し、生成再構成画像の各画素について、生成に用いる生成可能な再構成画像の画素に対応する画像信号の画素のうち、所定数の画素を選択する選択手段と、を有し、選択手段は、設定手段により設定された生成再構成画像の画素数が上限画素数よりも少ない場合に、生成に用いる生成可能な再構成画像の画素のそれぞれについて少なくとも1つの対応する画像信号の画素を選択することを特徴とする。
In order to achieve the above object, an imaging apparatus of the present invention has the following configuration.
An imaging unit that images a subject and outputs the obtained image signal, each of the pixels of the image signal corresponding to a light flux in which a combination of a pupil region and an incident direction of the imaging optical system that has passed is different Determining a focal length of a subject to be focused in the generated reconstructed image, set for a generated reconstructed image generated from the image signal output by the imaging means, and a focal length determined by the determining means Accordingly, a generation unit that generates a generated reconstructed image focused on a focal length by adding pixel values of pixels of a predetermined number of image signals corresponding to each pixel of the generated reconstructed image, and generated by the generation unit An imaging device comprising: an evaluation unit that performs focusing evaluation on the generated generated reconstructed image; and a setting unit that sets the number of pixels of the generated reconstructed image generated by the generating unit, and a setting unit The reconfigurable image pixels that can be used to generate each pixel of the generated reconstructed image are determined from the set number of pixels of the generated reconstructed image and the upper limit number of reconstructed images that can be generated from the pixels of the image signal. And selecting means for selecting a predetermined number of pixels among the pixels of the image signal corresponding to the pixels of the reconfigurable reconfigurable image used for generation for each pixel of the generated reconstructed image, When the number of pixels of the generated reconstructed image set by the setting means is smaller than the upper limit number of pixels, at least one corresponding image signal pixel is selected for each of the reconfigurable image pixels used for generation It is characterized by that.

このような構成により本発明によれば、撮影後に任意の焦点距離に合焦した画像を生成可能な撮像装置における、オートフォーカス動作を高速化することが可能となる。   With such a configuration, according to the present invention, it is possible to speed up the autofocus operation in the imaging apparatus capable of generating an image focused at an arbitrary focal length after shooting.

本発明の実施形態に係るカメラシステムの機能構成を示したブロック図The block diagram which showed the function structure of the camera system which concerns on embodiment of this invention 本発明の実施形態に係るマイクロレンズアレイ108と撮像素子との対応関係を説明するための図The figure for demonstrating the correspondence of the micro lens array which concerns on embodiment of this invention, and an image pick-up element. 本発明の実施形態に係るデジタルカメラ100で実行される、AF処理を例示したフローチャートThe flowchart which illustrated AF process performed with the digital camera 100 which concerns on embodiment of this invention 本発明の実施形態に係るデジタルカメラ100で実行される各種処理を例示したフローチャート6 is a flowchart illustrating various processes executed by the digital camera 100 according to the embodiment of the invention. 本発明の実施形態に係る再構成画像の生成方法を説明するための図The figure for demonstrating the production | generation method of the reconstruction image which concerns on embodiment of this invention. 本発明の実施形態に係る間引き再構成画像の生成方法を説明するための図The figure for demonstrating the production | generation method of the thinning | reconstruction reconstructed image which concerns on embodiment of this invention. 本発明の実施形態を適用可能な光学系の構成例を示した図The figure which showed the structural example of the optical system which can apply embodiment of this invention レンズ駆動を伴う、従来のコントラスト検出型のAF検出動作を説明するための図The figure for demonstrating the AF detection operation of the conventional contrast detection type accompanying a lens drive

[実施形態]
以下、本発明の例示的な実施形態について、図面を参照して詳細に説明する。なお、以下に説明する一実施形態は、撮像装置の一例としての、撮影後に任意の焦点距離に合焦した画像を生成可能なカメラシステムに、本発明を適用した例を説明する。しかし、本発明は、任意の焦点距離に合焦した画像を生成して焦点検出動作を行うことが可能な任意の機器に適用可能である。
[Embodiment]
Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. In addition, one embodiment described below describes an example in which the present invention is applied to a camera system that can generate an image focused on an arbitrary focal length after shooting as an example of an imaging apparatus. However, the present invention can be applied to any device capable of generating an image focused on an arbitrary focal length and performing a focus detection operation.

また、本明細書において、以下の用語を定義して説明する。
・「ライトフィールド(LF:Light Field)データ」
本実施形態のデジタルカメラ100が有する撮像部102から出力される画像信号。画像信号の画素の各々は、通過した撮像光学系202の瞳領域及び入射方向の組み合わせが異なる光束に対応した信号強度を示している。LFデータは、光線空間情報とも呼ばれる。
・「再構成画像」
LFデータから生成される、任意の焦点距離に合焦した画像。具体的には生成する焦点距離に対応する焦点面(再構成面)での画素配置に従ってLFデータの画素を並び替え、再構成画像の1画素に対応する画素の画素値を合算することで該画素の画素値を得る。通常画素値を合算する画素数は、瞳分割数になる。
In this specification, the following terms are defined and described.
・ "Light Field (LF) data"
The image signal output from the imaging part 102 which the digital camera 100 of this embodiment has. Each pixel of the image signal indicates a signal intensity corresponding to a light beam having a different combination of the pupil region and the incident direction of the imaging optical system 202 that has passed. The LF data is also called ray space information.
・ "Reconstructed image"
An image generated from LF data and focused at an arbitrary focal length. Specifically, the pixels of the LF data are rearranged according to the pixel arrangement on the focal plane (reconstruction plane) corresponding to the focal length to be generated, and the pixel values of the pixels corresponding to one pixel of the reconstructed image are summed up. Get the pixel value of the pixel. The number of pixels to which the normal pixel values are added is the pupil division number.

《カメラシステムの構成》
図1は、本発明の実施形態に係るカメラシステムに含まれる、デジタルカメラ100及びレンズ200の機能構成を示すブロック図である。
《Camera system configuration》
FIG. 1 is a block diagram showing functional configurations of a digital camera 100 and a lens 200 included in a camera system according to an embodiment of the present invention.

〈デジタルカメラ100の構成〉
カメラ制御部101は、例えばCPUであり、不図示のROM及びRAMを内蔵する。カメラ制御部101は、ROMに格納されている後述のオートフォーカス(AF)処理の動作プログラムを読み出し、RAMに展開して実行することにより、デジタルカメラ100が有する各ブロックの動作制御を行う。またカメラ制御部101は、撮像部102から出力される画像信号の解析により決定した焦点位置の情報や、決定した露出設定に対応する絞り値等の情報を、電気接点107を介してレンズ200に送信する。
<Configuration of digital camera 100>
The camera control unit 101 is a CPU, for example, and includes a ROM and a RAM (not shown). The camera control unit 101 controls the operation of each block of the digital camera 100 by reading an operation program for auto focus (AF) processing, which will be described later, stored in the ROM, developing it in the RAM, and executing it. In addition, the camera control unit 101 sends information on the focal position determined by analysis of the image signal output from the imaging unit 102 and information on the aperture value corresponding to the determined exposure setting to the lens 200 via the electrical contact 107. Send.

撮像部102は、例えばCCDやCMOSセンサ等の撮像素子である。撮像部102は、設定された露出設定に基づいて、カメラ制御部101により生成されたタイミング信号に基づいて撮像素子が有する各光電変換素子の露光及び読み出しを行い、得られたLFデータのアナログ画像信号を画像処理部103に出力する。具体的には撮像部102は、レンズ200の撮像光学系202により撮像素子の受光面に結像された光学像を光電変換し、アナログ画像信号を出力する。   The imaging unit 102 is an imaging element such as a CCD or a CMOS sensor. The imaging unit 102 performs exposure and readout of each photoelectric conversion element included in the imaging device based on the timing signal generated by the camera control unit 101 based on the set exposure setting, and an analog image of the obtained LF data The signal is output to the image processing unit 103. Specifically, the imaging unit 102 photoelectrically converts an optical image formed on the light receiving surface of the imaging element by the imaging optical system 202 of the lens 200, and outputs an analog image signal.

また本実施形態のデジタルカメラ100では、撮像素子109109の表面には、図2(a)に示されるようにマイクロレンズ20が格子状に配列されたマイクロレンズアレイ108が配設される。マイクロレンズアレイ108の1つのマイクロレンズ20は、図2(b)に示されるように撮像素子109の複数の光電変換素子(画素)に対応付けられる。レンズ200の撮像光学系202を介して入射した光束は、各マイクロレンズ20により、対応付けられた撮像素子109の画素に結像されることで瞳分割される。即ち、対応付けられた撮像素子109の各画素には、対応付けられた画素位置に対応する撮像光学系202の瞳領域を通過した光束が結像される。図2(b)の例では、1つのマイクロレンズ20には4×4=16個の画素が対応付けられており、撮像光学系202の瞳分割数は16となる。   Further, in the digital camera 100 of the present embodiment, the microlens array 108 in which the microlenses 20 are arranged in a lattice shape as shown in FIG. One microlens 20 of the microlens array 108 is associated with a plurality of photoelectric conversion elements (pixels) of the image sensor 109 as shown in FIG. The light beam that has entered through the imaging optical system 202 of the lens 200 is divided into pupils by being imaged by the microlenses 20 on the pixels of the associated image sensor 109. That is, the light flux that has passed through the pupil region of the imaging optical system 202 corresponding to the associated pixel position is imaged on each pixel of the associated image sensor 109. In the example of FIG. 2B, 4 × 4 = 16 pixels are associated with one microlens 20, and the number of pupil divisions of the imaging optical system 202 is 16.

図2(c)は、1つのマイクロレンズに対応付けられた画素と、各画素に結像される光束が通過する撮像光学系202の射出瞳の瞳領域の対応関係を示した図である。なお、図2(c)の例では簡単のため、1つのマイクロレンズ20に対して水平方向4つの画素21乃至24がマイクロレンズ20の中心を通る水平線上に並んで配置されているものとする。このとき、マイクロレンズ20により各画素は、射出瞳面上における瞳領域31乃至34と共役関係になるように設計される。図2(c)の例では、画素21は瞳領域31、画素22は瞳領域32、画素23は瞳領域33、そして画素24は瞳領域34に共役関係にある。   FIG. 2C is a diagram illustrating a correspondence relationship between a pixel associated with one microlens and a pupil region of an exit pupil of the imaging optical system 202 through which a light beam formed on each pixel passes. 2C, for the sake of simplicity, it is assumed that four pixels 21 to 24 in the horizontal direction with respect to one microlens 20 are arranged side by side on a horizontal line passing through the center of the microlens 20. . At this time, each pixel is designed by the microlens 20 so as to be conjugate with the pupil regions 31 to 34 on the exit pupil plane. In the example of FIG. 2C, the pixel 21 has a pupil region 31, the pixel 22 has a pupil region 32, the pixel 23 has a pupil region 33, and the pixel 24 has a conjugate relationship with the pupil region 34.

画像処理部103は、撮像部102から出力されたLFデータの画像信号に対して、所定の画像処理を実行する。具体的には画像処理部103は、入力されたアナログ画像信号に対するA/D変換処理、ホワイトバランス調整処理、ガンマ補正処理、補間演算処理等を行い、記録用の画像(LFデータ)を生成する。なお、本実施形態では画像処理部103は、得られたLFデータから再構成画像を生成する処理も行う。また画像処理部103は、予め定められた符号化方式に応じて、画像、動画、音声等のデータの圧縮処理を実行する。各種画像処理は、専用回路等により実現されてよい。   The image processing unit 103 performs predetermined image processing on the image signal of the LF data output from the imaging unit 102. Specifically, the image processing unit 103 performs A / D conversion processing, white balance adjustment processing, gamma correction processing, interpolation calculation processing, and the like on the input analog image signal, and generates a recording image (LF data). . In the present embodiment, the image processing unit 103 also performs processing for generating a reconstructed image from the obtained LF data. Further, the image processing unit 103 executes compression processing of data such as an image, a moving image, and sound according to a predetermined encoding method. Various image processes may be realized by a dedicated circuit or the like.

メモリ104は、記憶素子及び該記憶素子への読み書きを行う処理回路を有する。メモリ104は、記憶素子への出力を行うとともに、表示部105に出力する画像を保存する。またメモリ104は、符号化された画像、動画、音声データ等を保存する。   The memory 104 includes a memory element and a processing circuit that reads from and writes to the memory element. The memory 104 outputs to the storage element and stores an image to be output to the display unit 105. The memory 104 stores encoded images, moving images, audio data, and the like.

表示部105は、例えばLCD等のデジタルカメラ100が備える表示装置である。表示部105には、撮像により得られたLFデータから生成された再構成画像等が表示される。   The display unit 105 is a display device provided in the digital camera 100 such as an LCD. The display unit 105 displays a reconstructed image or the like generated from LF data obtained by imaging.

操作検出部106は、デジタルカメラ100が有するレリーズボタン等のユーザインタフェースになされた操作を検出する。具体的には操作検出部106は、ユーザにより例えばレリーズボタンが操作されたことを検出すると、該操作に対応する制御信号をカメラ制御部101に出力する。   The operation detection unit 106 detects an operation performed on a user interface such as a release button of the digital camera 100. Specifically, when the operation detection unit 106 detects that the user has operated, for example, a release button, the operation detection unit 106 outputs a control signal corresponding to the operation to the camera control unit 101.

〈レンズ200の構成〉
レンズ制御部201は、例えばCPUであり、不図示のROM及びRAMを内蔵する。レンズ制御部201は、ROMに格納されているレンズ200が有する各ブロックの動作プログラムを読み出し、RAMに展開して実行することにより、各ブロックの動作を制御する。レンズ制御部201は、電気接点107を介してカメラ制御部101より焦点位置や絞り値の情報を受信すると、該情報をレンズ駆動部203に伝送し、撮像光学系202の対応する光学部材を駆動させる。
<Configuration of lens 200>
The lens control unit 201 is a CPU, for example, and incorporates a ROM and a RAM (not shown). The lens control unit 201 controls the operation of each block by reading the operation program of each block included in the lens 200 stored in the ROM, developing the program in the RAM, and executing the program. When the lens control unit 201 receives information on the focal position and the aperture value from the camera control unit 101 via the electrical contact 107, the lens control unit 201 transmits the information to the lens driving unit 203 and drives the corresponding optical member of the imaging optical system 202. Let

撮像光学系202は、レンズ200が有するレンズ群や絞り等で構成される。本実施形態では撮像光学系202は、少なくともフォーカスレンズ、シフトレンズ、及び絞りを含む。レンズ駆動部203は、レンズ制御部201から入力された情報に従い、撮像光学系202のフォーカスレンズ、シフトレンズ、及び絞りの駆動制御を行う。なお、本実施形態のレンズ制御部201には不図示の手振れ検出センサが接続されており、レンズ駆動部203はレンズ制御部201より入力された該センサの出力に応じてシフトレンズを駆動する。   The imaging optical system 202 includes a lens group, a diaphragm, and the like that the lens 200 has. In the present embodiment, the imaging optical system 202 includes at least a focus lens, a shift lens, and a diaphragm. The lens driving unit 203 performs drive control of the focus lens, the shift lens, and the diaphragm of the imaging optical system 202 according to the information input from the lens control unit 201. Note that a camera shake detection sensor (not shown) is connected to the lens control unit 201 of this embodiment, and the lens driving unit 203 drives the shift lens according to the output of the sensor input from the lens control unit 201.

《AF処理》
このような構成をもつ本実施形態のデジタルカメラ100のAF処理について、図3のフローチャートを用いて具体的な処理を説明する。該フローチャートに対応する処理は、カメラ制御部101が、例えばROMに記憶されている対応する処理プログラムを読み出し、RAMに展開して実行することにより実現することができる。なお、本AF処理は、例えばデジタルカメラ100が撮影モードで起動中にレリーズボタンの半押し操作がなされたことを、カメラ制御部101が操作検出部106からの制御信号により検出された際に開始されるものとして説明する。
<AF processing>
A specific process of the AF process of the digital camera 100 of the present embodiment having such a configuration will be described with reference to the flowchart of FIG. The process corresponding to the flowchart can be realized by the camera control unit 101 reading, for example, a corresponding processing program stored in the ROM, developing it in the RAM, and executing it. This AF processing is started when the camera control unit 101 detects that the release button is half-pressed while the digital camera 100 is activated in the shooting mode, for example, based on a control signal from the operation detection unit 106. It will be described as being done.

S301で、カメラ制御部101は、撮像部102に被写体を撮像させ、LFデータを取得する。具体的にはカメラ制御部101は、所定の露出設定で撮像部102が出力したLFデータに係るアナログ画像信号に対して、画像処理部103にA/D変換処理を適用させ、LFデータを取得する。   In step S <b> 301, the camera control unit 101 causes the imaging unit 102 to image a subject and acquires LF data. Specifically, the camera control unit 101 acquires the LF data by causing the image processing unit 103 to apply A / D conversion processing to the analog image signal related to the LF data output from the imaging unit 102 with a predetermined exposure setting. To do.

S302で、カメラ制御部101は、合焦評価の評価対象である焦点距離を決定する評価距離決定処理を実行する。即ち、カメラ制御部101は、合焦評価のために生成する再構成画像(生成再構成画像)について、該生成再構成画像内で合焦する被写体の焦点距離を決定する。   In step S <b> 302, the camera control unit 101 executes an evaluation distance determination process for determining a focal distance that is an evaluation target for focus evaluation. That is, the camera control unit 101 determines the focal length of the subject to be focused in the generated reconstructed image for the reconstructed image (generated reconstructed image) generated for the focus evaluation.

〈評価距離決定処理〉
ここで、本実施形態の評価距離決定処理について、図4(a)のフローチャートを用いて詳細を説明する。
<Evaluation distance determination process>
Here, the details of the evaluation distance determination process of the present embodiment will be described using the flowchart of FIG.

S401で、カメラ制御部101は、合焦評価に係る最初の焦点距離決定であるか否かを判断する。即ち、カメラ制御部101は、AF処理が実行された際に最初に合焦評価を行う焦点距離を決定するために本評価距離決定処理を実行したか否かを判断する。つまり、カメラ制御部101は、取得したLFデータについて合焦評価を行う初めて再構成画像の生成を行うか否かを判断する。カメラ制御部101は、合焦評価にかかる最初の焦点距離決定であると判断した場合は処理をS402に移し、2回目以降であると判断した場合は処理をS405に移す。   In step S401, the camera control unit 101 determines whether it is the first focal length determination related to the focus evaluation. That is, when the AF process is executed, the camera control unit 101 determines whether or not the evaluation distance determination process has been executed in order to determine the focal distance for which the focus evaluation is performed first. That is, the camera control unit 101 determines whether or not to generate a reconstructed image for the first time after performing focus evaluation on the acquired LF data. If the camera control unit 101 determines that it is the first determination of the focal length for the focus evaluation, it moves the process to S402, and if it determines that it is the second time or later, it moves the process to S405.

S402で、カメラ制御部101は、前回の撮影時に設定された焦点距離の情報が取得可能か否かを判断する。前回の撮影時に設定された焦点距離の情報は、例えばメモリ104内に記憶されているLFデータから取得されてもよいし、RAM内に格納されていてもよい。なお、前回の撮影時に設定された焦点距離の情報は、前回のAF処理の実行により決定された被写体に合焦する焦点距離であってもよい。カメラ制御部101は、前回の撮影時に設定された焦点距離の情報が取得可能であると判断した場合は処理をS403に移し、取得できないと判断した場合は処理をS404に移す。   In step S <b> 402, the camera control unit 101 determines whether it is possible to acquire information on the focal length set at the previous shooting. The focal length information set at the time of the previous shooting may be acquired from, for example, LF data stored in the memory 104 or may be stored in the RAM. Note that the focal length information set at the time of the previous shooting may be the focal length at which the subject determined by the previous AF process is focused. If the camera control unit 101 determines that the information on the focal length set at the previous photographing can be acquired, the process proceeds to S403. If the camera control unit 101 determines that the information cannot be acquired, the process proceeds to S404.

S403で、カメラ制御部101は、前回の撮影時に設定された焦点距離に基づき、予め決められたルールに従って評価対象の焦点距離(初期値)を設定して本焦点距離決定処理を完了する。   In step S <b> 403, the camera control unit 101 sets the focal length (initial value) to be evaluated according to a predetermined rule based on the focal length set at the previous shooting, and completes the focal length determination process.

S404で、カメラ制御部101は、評価対象の焦点距離を撮像面の焦点距離、即ちAF処理のS301で取得したLFデータを前回の撮影時の焦点距離(初期値)に設定して本焦点距離決定処理を完了する。   In step S404, the camera control unit 101 sets the focal length of the evaluation target as the focal length of the imaging surface, that is, the LF data acquired in step S301 of the AF process, as the focal length (initial value) at the time of the previous shooting. Complete the decision process.

S401において合焦評価に係る2回目以降の焦点距離決定であると判断した場合、カメラ制御部101はS405で、現在の焦点探索が、評価対象の焦点距離を変更する間隔を粗くして行う粗調探索であるか、細かくして行う微調探索であるかを判断する。本実施形態ではカメラ制御部101は焦点距離について、まず粗調探索で大まかなコントラスト値の変化挙動を探索し、その結果を受けて適切な合焦位置が存在すると思われる焦点距離の範囲に対して微調探索を行うことでAF処理に要する処理時間を短縮する。これは、図8に示されるようなレンズ駆動を行なって被写体に合焦する焦点距離を検出する方法と同様であり、本実施形態のカメラシステムではこれをレンズ駆動なしに実現する。カメラ制御部101は、現在の焦点探索が粗調探索であると判断した場合は処理をS406に移し、微調探索であると判断した場合は処理をS407に移す。   If it is determined in S401 that it is the second or later focal length determination related to the focus evaluation, in S405, the camera control unit 101 performs a rough focus search in which the current focal point search is performed with a rough interval for changing the focal length of the evaluation target. It is determined whether the search is a key search or a fine search performed in detail. In this embodiment, the camera control unit 101 first searches for a change behavior of a rough contrast value in a coarse tone search for the focal length, and receives the result for a focal length range in which an appropriate in-focus position is considered to exist. By performing the fine adjustment search, the processing time required for the AF processing is shortened. This is the same as the method of detecting the focal length at which the subject is focused by performing lens driving as shown in FIG. 8, and this is realized without lens driving in the camera system of this embodiment. If the camera control unit 101 determines that the current focus search is a coarse search, the process proceeds to S406. If the camera control unit 101 determines that the current focus search is a fine search, the process proceeds to S407.

S406で、カメラ制御部101は、現在設定されている評価対象の焦点距離に対して、探索方向に応じて粗調探索用の焦点距離の設定間隔の値を加算あるいは減算して、得られた焦点距離を評価対象の焦点距離に設定して本焦点距離決定処理を完了する。なお、粗調探索用の焦点距離の設定間隔は、例えば10〜25FΔ(F:Fナンバー、Δ:20μm)程度が好ましい。   In step S <b> 406, the camera control unit 101 obtains the currently set evaluation target focal length by adding or subtracting the coarse interval search focal length setting interval value according to the search direction. The focal length is set to the evaluation target focal length and the focal length determination process is completed. Note that the setting interval of the focal length for coarse tone search is preferably about 10 to 25 FΔ (F: F number, Δ: 20 μm), for example.

S407で、カメラ制御部101は、現在設定されている評価対象の焦点距離に対して、探索方向に応じて微調探索用の焦点距離の設定間隔の値を加算あるいは減算して、得られた焦点距離を評価対象の焦点距離に設定して本焦点距離決定処理を完了する。なお、微調探索用の焦点距離の設定間隔は、例えば1〜5FΔ程度が好ましい。   In step S <b> 407, the camera control unit 101 adds or subtracts the value of the setting interval of the focal length for fine tuning search to the currently set focal length of the evaluation target in accordance with the search direction, and obtains the obtained focus. The distance is set to the focal length of the evaluation target, and the focal length determination process is completed. Note that the setting interval of the focal length for fine tuning search is preferably about 1 to 5 FΔ, for example.

なお、本実施形態では粗調探索であるか微調探索であるかの判断は、例えばRAM上に現在の探索方法の情報が格納されており、カメラ制御部101が該情報を参照することで行うものとして説明するが、これに限られない。例えばAF処理の開始時には焦点距離の設定間隔の値として粗調探索用の値が初期値で設定され、カメラ制御部101が微調探索に移行してもよいことを判断した場合に、該値を予め定められた微調探索用の値に変更するものであってもよい。この場合、カメラ制御部101は現在の焦点探索が粗調探索であるか微調探索であるかを、焦点距離の設定間隔の値が閾値以上であるか否かにより判断すればよい。   In the present embodiment, whether the search is a coarse search or a fine search is determined by, for example, storing information on the current search method in the RAM and referring to the information by the camera control unit 101. Although described as a thing, it is not restricted to this. For example, when the AF processing is started, the coarse tuning search value is set as an initial value as the focal length setting interval value, and the camera control unit 101 determines that the fine tuning search may be shifted to the value. The value may be changed to a predetermined fine tuning search value. In this case, the camera control unit 101 may determine whether the current focus search is a coarse search or a fine search based on whether the value of the focal distance setting interval is equal to or greater than a threshold value.

このようにして合焦評価の評価対象である焦点距離を決定した後、カメラ制御部101はAF処理をS303に移す。   After determining the focal length that is the evaluation target of the focus evaluation in this way, the camera control unit 101 moves the AF process to S303.

S303で、カメラ制御部101は、合焦評価を行う再構成画像の生成に用いるLFデータの画素を決定する画素選択処理を実行する。即ち、本ステップにおいてカメラ制御部101は、合焦評価を行う再構成画像の生成において使用しない画素、つまり間引く画素を決定し、それ以外の画素を再構成画像の生成に用いる画素として決定する。   In step S <b> 303, the camera control unit 101 executes a pixel selection process for determining pixels of LF data used for generating a reconstructed image for performing focus evaluation. In other words, in this step, the camera control unit 101 determines pixels that are not used in the generation of the reconstructed image for which the focus evaluation is performed, that is, pixels to be thinned out, and determines other pixels as pixels that are used for generating the reconstructed image.

〈画素選択処理〉
ここで、本実施形態の画素選択処理について、図4(b)のフローチャートを用いて詳細を説明する。
<Pixel selection processing>
Here, the pixel selection processing of the present embodiment will be described in detail using the flowchart of FIG.

S411で、カメラ制御部101は、合焦評価を行う焦点距離に対応する再構成面におけるLFデータの画素配置の情報を取得する。   In step S <b> 411, the camera control unit 101 acquires pixel arrangement information of LF data on the reconstruction plane corresponding to the focal length for which focus evaluation is performed.

例えば図5(a)に示されるように、マイクロレンズアレイ108の1つのマイクロレンズに対して、射出瞳の1乃至4の領域を通過した光束が撮像素子109の対応する光電変換素子に結像される場合を考える。なお、本実施形態では再構成画像から現像処理を行なってカラー画像を生成するため、マイクロレンズアレイ108のマイクロレンズには複数のカラーフィルタのいずれかが特定の配列に従って適用される。図5(a)の例では、マイクロレンズアレイ108のうち、1つの水平ライン上に配置されたRあるいはGのカラーフィルタが適用されたマイクロレンズと、撮像素子109の画素との関係が示されている。図では、ハッチングされた画素がRに対応する色信号、ハッチングのない画素がGに対応する色信号に対応している。   For example, as shown in FIG. 5A, the light beam that has passed through the areas 1 to 4 of the exit pupil forms an image on the corresponding photoelectric conversion element of the imaging element 109 with respect to one microlens of the microlens array 108. Consider the case. In this embodiment, since a color image is generated by performing development processing from the reconstructed image, any of a plurality of color filters is applied to the microlens of the microlens array 108 according to a specific arrangement. In the example of FIG. 5A, the relationship between the microlens to which the R or G color filter arranged on one horizontal line in the microlens array 108 is applied and the pixel of the image sensor 109 is shown. ing. In the figure, the hatched pixel corresponds to the color signal corresponding to R, and the non-hatched pixel corresponds to the color signal corresponding to G.

図5(b)に示されるように、例えば撮像面501に対応する焦点距離について再構成画像が生成される場合、該再構成画像の各画素は1つのマイクロレンズを通過する光束の総和に対応する。即ち、撮像光学系202の射出瞳の各瞳領域(図の例では瞳領域1乃至4)を通過して1つマイクロレンズに至る光束が、該マイクロレンズに対応する画素を形成することになる。このため、撮像面501に対応する焦点距離の再構成画像の各画素は、各マイクロレンズに対応付けられた画素の画素値を合算することで得られる。   As shown in FIG. 5B, for example, when a reconstructed image is generated for the focal length corresponding to the imaging surface 501, each pixel of the reconstructed image corresponds to the sum of light fluxes passing through one microlens. To do. That is, a light beam that passes through each pupil region (pupil regions 1 to 4 in the illustrated example) of the imaging optical system 202 and reaches one microlens forms a pixel corresponding to the microlens. . For this reason, each pixel of the reconstructed image having the focal length corresponding to the imaging surface 501 is obtained by adding the pixel values of the pixels associated with each microlens.

これに対し、例えば撮像面501よりも長い焦点距離に相当する再構成面502について考える。図5(b)において撮像面501と再構成面502とを結ぶ線分で示されるように、再構成面502に撮像素子109があった場合の各画素に結像される光束は、入射方向に応じて撮像面で得られたLFデータの画素配置を変更することにより再現することができる。つまり、再構成面502について生成する再構成画像の各画素については、変更後の画素配置において、撮像面における再構成画像の各画素と同様の位置に存在する画素について各瞳領域を通過した光束の画素値を合算することで画素値が得られる。   In contrast, for example, a reconstruction surface 502 corresponding to a focal length longer than the imaging surface 501 is considered. As shown by the line segment connecting the imaging surface 501 and the reconstruction surface 502 in FIG. 5B, the light beam formed on each pixel when the imaging element 109 is on the reconstruction surface 502 is incident in the incident direction. Accordingly, it can be reproduced by changing the pixel arrangement of the LF data obtained on the imaging surface. That is, for each pixel of the reconstructed image generated for the reconstruction plane 502, the light flux that has passed through each pupil region for a pixel that exists at the same position as each pixel of the reconstructed image on the imaging surface in the changed pixel arrangement The pixel value is obtained by summing the pixel values.

本ステップではカメラ制御部101は、このように焦点距離に応じて変更される、再構成画像の生成に係るLFデータの画素配置の情報を取得する。   In this step, the camera control unit 101 acquires information on the pixel arrangement of the LF data related to the generation of the reconstructed image, which is changed according to the focal length in this way.

S412で、カメラ制御部101は、現在の焦点探索が粗調探索であるか微調探索であるかを判断する。カメラ制御部101は、現在の焦点探索が粗調探索であると判断した場合は処理をS413に移し、微調探索であると判断した場合は処理をS414に移す。   In step S412, the camera control unit 101 determines whether the current focus search is a coarse search or a fine search. If the camera control unit 101 determines that the current focus search is a coarse adjustment search, the process proceeds to S413. If the camera control unit 101 determines that the current focus search is a fine adjustment search, the process proceeds to S414.

S413で、カメラ制御部101は、粗調探索における、合焦評価を行う再構成画像の生成に用いるLFデータの画素を決定する。本実施形態では粗調探索に要する処理時間を低減するために、粗調探索時の合焦評価を行う再構成画像について、微調探索時の再構成画像よりも少ない画素数(第1の画素数)の再構成画像を用いる。このため本ステップにおいてカメラ制御部101は、再構成画像の生成において使用するLFデータの画素を間引く処理を行う。   In step S413, the camera control unit 101 determines pixels of LF data used for generating a reconstructed image for performing focus evaluation in the coarse tone search. In this embodiment, in order to reduce the processing time required for the coarse search, the reconstructed image for performing the focus evaluation at the coarse search is smaller in number of pixels (the first pixel number) than the reconstructed image at the fine search. ) Is used. Therefore, in this step, the camera control unit 101 performs a process of thinning out the pixels of the LF data used for generating the reconstructed image.

例えば図6(a)に示されるように、撮像面601のLFデータの画素配置について離散的な間引きを行なった場合を考える。図では、マイクロレンズアレイ108のマイクロレンズに対して、R及びGの2種類のカラーフィルタが適用されており、間引き率1/nが1/2である例を示している。なお、図では、間引かれた画素は対応する瞳領域の数字が反転表示された黒塗りの画素である。   For example, as shown in FIG. 6A, a case where discrete thinning is performed on the pixel arrangement of the LF data on the imaging surface 601 is considered. In the drawing, two types of R and G color filters are applied to the microlenses of the microlens array 108, and the thinning rate 1 / n is 1/2. In the figure, the thinned pixels are black pixels in which the numbers of the corresponding pupil regions are highlighted.

図4(b)で示したような間引かれていない状態(n=1)では、撮像面401における再構成画像は、隣接するR及びGのカラーフィルタが適用された1組のマイクロレンズについて現像後の1画素が生成される。即ち、図4(b)の例では瞳分割数Nが4であり、カラーフィルタ数sが2であるから、
N×s×n=4×2×1=8
となり、LFデータの8画素が、再構成画像の現像処理により得られる現像画像の1画素に対応する。つまり、Rのカラーフィルタが適用されたマイクロレンズに対応付けられた画素1乃至4の累計画素値を有する画素と、Gのカラーフィルタが適用されたマイクロレンズに対応付けられた画素1乃至4の累計画素値を有する画素により、現像画像の1画素が生成される。
In a state (n = 1) where thinning is not performed as shown in FIG. 4B, the reconstructed image on the imaging surface 401 is for a set of microlenses to which adjacent R and G color filters are applied. One pixel after development is generated. That is, in the example of FIG. 4B, the pupil division number N is 4, and the color filter number s is 2.
N × s × n = 4 × 2 × 1 = 8
Thus, 8 pixels of the LF data correspond to 1 pixel of the developed image obtained by developing the reconstructed image. That is, the pixel having the cumulative pixel value of the pixels 1 to 4 associated with the microlens to which the R color filter is applied and the pixels 1 to 4 associated with the microlens to which the G color filter is applied. One pixel of the developed image is generated by the pixel having the cumulative pixel value.

これに対し、図6(a)のように間引きが行われる場合、再構成画像の現像処理により得られる現像画像の1画素は、間引く画素も含めて
N×s×n=4×2×2=16
となり、図6(a)において枠で示したLFデータの16画素が生成の対象となる。即ち、LFデータから生成可能な再構成画像の画素のうちの4画素(現像画像における2画素)が、生成する間引いた再構成画像の2画素(現像画像における1画素)の生成に参照される。つまり、図示されるような1次元のLFデータから1/2の間引きを行なって得られる再構成画像(間引き再構成画像)の画素数は、間引きを行わずに得られる再構成画像の画素数、即ち上限画素数に対して1/2になる。
On the other hand, when thinning is performed as shown in FIG. 6A, one pixel of the developed image obtained by developing the reconstructed image includes N × s × n = 4 × 2 × 2 = 16
Thus, 16 pixels of the LF data indicated by a frame in FIG. That is, four of the pixels of the reconstructed image that can be generated from the LF data (two pixels in the developed image) are referred to for generating two pixels of the reconstructed image that has been thinned out (one pixel in the developed image). . In other words, the number of pixels of a reconstructed image (decimated reconstructed image) obtained by performing 1/2 decimation from the one-dimensional LF data as illustrated is the number of pixels of the reconstructed image obtained without performing decimation. That is, it becomes 1/2 with respect to the upper limit number of pixels.

なお、図6(a)は1次元の画素配列について間引きを行う例について説明しているため、間引き率と間引き再構成画像の画素数/上限画素数とは同一になっている。しかしながら、2次元配置されたLFデータの水平方向及び垂直方向の各々について間引きを行う場合は、水平方向間引き率×垂直方向間引き率が間引き再構成画像の画素数/上限画素数となることは容易に理解されよう。   Since FIG. 6A illustrates an example of performing thinning for a one-dimensional pixel array, the thinning rate and the number of pixels of the thinned reconstructed image / the maximum number of pixels are the same. However, when thinning is performed for each of the horizontal direction and the vertical direction of the two-dimensionally arranged LF data, it is easy that the horizontal thinning rate × the vertical thinning rate becomes the number of pixels of the thinned reconstructed image / the maximum number of pixels. Will be understood.

ところで、LFデータを使用し、任意の焦点距離に合焦する再構成画像を生成する場合、撮像部102から出力された状態のLFデータを単純に間引く方法では、次のような問題が生じる。   By the way, when a reconstructed image that is focused on an arbitrary focal length is generated using LF data, the following problem occurs in the method of simply thinning out the LF data output from the imaging unit 102.

撮像部102から出力された状態のLFデータ、即ち撮像面601におけるLFデータの画素配列に対して間引き率1/2の離散的な間引きを行ない、再構成面602における間引き再構成画像を生成する場合を考える。このとき、再構成面602における画素配列において、間引き画素の分布は偏ることになる。このような場合、再構成面602について生成される間引き再構成画像の1画素には、間引き画素に対応する入射方向の光束が考慮されないことになるため、例えば該間引き画素の領域に結像される細線等が間引き再構成画像に反映されないことになる。即ち、例えば主被写体が細線を有している場合であっても、間引き再構成画像では該細線のコントラストを考慮できないため、検出された焦点距離が主被写体について厳密に合焦する焦点距離とはならない可能性がある。   Discrete decimation is performed at a decimation rate of 1/2 on the LF data output from the imaging unit 102, that is, the pixel array of the LF data on the imaging surface 601, and a thinned reconstructed image on the reconstruction surface 602 is generated. Think about the case. At this time, in the pixel array on the reconstruction plane 602, the distribution of thinned pixels is biased. In such a case, the light beam in the incident direction corresponding to the thinned pixel is not considered in one pixel of the thinned reconstructed image generated with respect to the reconstructed surface 602. For example, the image is formed in the thinned pixel region. The thin line or the like is not reflected in the thinned reconstructed image. That is, for example, even when the main subject has a thin line, the thinned-out reconstructed image cannot take into account the contrast of the thin line, so the detected focal length is the focal length at which the main subject is strictly in focus. It may not be possible.

このため本実施形態のデジタルカメラ100では、LFデータの特性を利用し、図6(b)のように再構成面602におけるLFデータの画素配置について離散的な間引き画素を決定するとともに、再構成画像の生成に使用する画素を決定する。このようにすることで、従来のように間引き画素が固定的なパターンで決定されることで反映されない領域の光学像についても、画素数の少ない合焦評価用の再構成画像で考慮することができる。   For this reason, in the digital camera 100 of the present embodiment, the characteristics of the LF data are used to determine discrete thinned pixels for the pixel arrangement of the LF data on the reconstruction plane 602 as shown in FIG. Determine the pixels used to generate the image. By doing so, an optical image of a region that is not reflected by the thinned-out pixels being determined in a fixed pattern as in the past can be considered in the reconstructed image for focus evaluation with a small number of pixels. it can.

また、上述のような合焦評価用の再構成画像の画素数を低減することで細線が反映されなくなる状況は、間引き画素の選択方法によっても生じうる。再構成画像を生成する再構成面において、間引き画素を例えば瞳領域2及び3に対応する画素と決めている場合等も、特定の方向の光束が再構成画像に反映されないことになる。このため、本実施形態のデジタルカメラ100では、次のようなルールで再構成画像の生成に用いるLFデータの画素を決定する。
1.間引き再構成画像の1画素の生成に参照される、LFデータから生成可能な上限画素数を有する再構成画像の複数の画素のそれぞれについて、各画素に対応するLFデータの画素を少なくとも1つ選択(再構成面において離散的にし、被写体像の周波数情報をより多く反映するため)
2.間引き再構成画像の1画素の生成に参照される、上限画素数を有する再構成画像の複数の画素のうち、少なくとも2つの画素間で異なる瞳領域を通過した光束に対応するLFデータの画素を含むように選択
In addition, a situation in which a thin line is not reflected by reducing the number of pixels of the reconstructed image for focusing evaluation as described above may also occur depending on the method of selecting the thinned pixels. Even when the thinned pixels are determined as pixels corresponding to the pupil regions 2 and 3 on the reconstruction plane for generating the reconstructed image, the light flux in a specific direction is not reflected in the reconstructed image. For this reason, in the digital camera 100 of this embodiment, the pixel of LF data used for the production | generation of a reconstructed image is determined according to the following rules.
1. Select at least one pixel of LF data corresponding to each pixel for each of a plurality of pixels of the reconstructed image having an upper limit number of pixels that can be generated from LF data, which is referred to for generating one pixel of the thinned reconstructed image (To make the reconstruction surface discrete and reflect more frequency information of the subject image)
2. Among the plurality of pixels of the reconstructed image having the upper limit number of pixels, which are referred to for generation of one pixel of the thinned reconstructed image, pixels of LF data corresponding to the light fluxes that have passed through different pupil regions between at least two pixels. Select to include

このようにすることで、上述の間引き再構成画像に細線が考慮されない状況を回避することができる。なお、本実施形態のようにカラーフィルタがマイクロレンズに適用される場合は、次のようなルールを用いてもよい。
3.間引き再構成画像の1画素の生成に参照される、上限画素数を有する再構成画像の複数の画素のうち、少なくとも異なるカラーフィルタに対応する画素で、異なる瞳領域を通過した光束に対応するLFデータの画素を含むように選択
By doing in this way, the situation where a thin line is not considered in the thinning-out reconstructed image mentioned above can be avoided. In addition, when a color filter is applied to a microlens like this embodiment, you may use the following rules.
3. LF corresponding to a light beam that has passed through a different pupil region at a pixel corresponding to at least a different color filter among a plurality of pixels of the reconstructed image having the upper limit number of pixels, which is referred to for generation of one pixel of the thinned reconstructed image Select to include data pixels

なお、再構成画像の生成に用いるLFデータの画素は、このようなルールに従って、粗調探索時と微調探索時のそれぞれについて、再構成面ごとにテーブルデータとしてROMに格納されていればよい。即ち、カメラ制御部101は、ROMに格納された該テーブルを参照することで、合焦評価を行う再構成画像の生成に用いるLFデータの画素を決定する。   Note that the pixels of the LF data used for generating the reconstructed image may be stored in the ROM as table data for each reconstruction plane for each of the coarse search and fine search according to such rules. That is, the camera control unit 101 refers to the table stored in the ROM, and determines a pixel of LF data used for generating a reconstructed image for performing focus evaluation.

S414で、カメラ制御部101は、微調探索における、合焦評価を行う再構成画像の生成に用いるLFデータの画素を決定する。本実施形態のデジタルカメラ100では、微調探索時にはLFデータの画素の間引きを行わず、上限画素数を有する再構成画像を、合焦評価用の再構成画像として用いるものとする。なお、本実施形態では微調探索時に上限画素数を有する再構成画像を合焦評価に用いるものとして説明するが、微調探索時に生成する再構成画像の画素数は、粗調探索時の画素数よりも多く、かつ上限画素数以下の画素数(第2の画素数)であればよい。即ち、粗調探索時に比べ、より細部の情報を参照して合焦評価が行える画素数を有する画像であればよい。   In step S414, the camera control unit 101 determines a pixel of LF data used for generating a reconstructed image for performing focus evaluation in fine adjustment search. In the digital camera 100 according to the present embodiment, it is assumed that the reconstructed image having the upper limit number of pixels is used as a reconstructed image for focus evaluation without thinning out the pixels of the LF data during fine adjustment search. In this embodiment, the reconstructed image having the upper limit number of pixels at the time of fine adjustment search is described as being used for focus evaluation. However, the number of pixels of the reconstructed image generated at the time of fine adjustment search is larger than the number of pixels at the time of coarse search. And the number of pixels (second pixel number) equal to or less than the upper limit number of pixels. That is, it is sufficient if the image has the number of pixels that can be evaluated for focusing with reference to more detailed information than in the coarse tone search.

このようにして、予め定められたルールに従って再構成画像の生成に用いるLFデータの画素を選択した後、カメラ制御部101はAF処理をS304に移す。   In this way, after selecting the pixels of the LF data used for generating the reconstructed image according to a predetermined rule, the camera control unit 101 moves the AF process to S304.

S304で、カメラ制御部101は、合焦評価を行う焦点距離に対応する再構成面におけるLFデータの画素配置の情報を画像処理部103に伝送し、該情報に従ってLFデータの画素を再構成画像の生成用の画素配置にシフトさせる。   In step S304, the camera control unit 101 transmits information about the pixel arrangement of the LF data on the reconstruction plane corresponding to the focal length for which the focus evaluation is performed to the image processing unit 103, and reconstructs the LF data pixels according to the information. Shift to the pixel arrangement for generation of.

S305で、カメラ制御部101は、画像処理部103に再構成画像を生成させる再構成画像生成処理を実行する。   In step S <b> 305, the camera control unit 101 executes reconstructed image generation processing that causes the image processing unit 103 to generate a reconstructed image.

〈再構成画像生成処理〉
ここで、本実施形態の再構成画像生成処理について、図4(c)のフローチャートを用いて詳細を説明する。
<Reconstructed image generation processing>
Here, the details of the reconstructed image generation process of this embodiment will be described with reference to the flowchart of FIG.

S421で、画像処理部103は、生成する再構成画像の各画素の画素値を格納する領域をメモリ104に確保し、該領域のデータを初期化(0で埋める)する。このとき、データ領域の容量はマイクロレンズアレイ108を構成するマイクロレンズの数に対応した容量であればよい。なお、再構成画像の各画素の画素値のデータ諧調は、LFデータにおける各画素のデータ諧調と瞳分割数の積を格納できるだあることが好ましい。例えばLFデータの1画素のデータが8bitで、射出瞳が16分割されている場合、12bit(=8bit+log16)あればデータの桁あふれを考慮する必要がなくなる。 In S421, the image processing unit 103 secures an area for storing the pixel value of each pixel of the reconstructed image to be generated in the memory 104, and initializes (fills with 0) the data in the area. At this time, the capacity of the data area may be a capacity corresponding to the number of microlenses constituting the microlens array 108. It is preferable that the data gradation of the pixel value of each pixel of the reconstructed image can store the product of the data gradation of each pixel in the LF data and the number of pupil divisions. For example, if the data of one pixel of LF data is 8 bits and the exit pupil is divided into 16, if there are 12 bits (= 8 bits + log 2 16), it is not necessary to consider data overflow.

そして画像処理部103は、S422乃至S427のループ処理を、マイクロレンズアレイ108を構成するマイクロレンズの数と同じ回数実行することで、合焦評価に用いる再構成画像を生成する。なお、マイクロレンズアレイ108のマイクロレンズには例えば左上から始まる水平走査順に整理番号が割り当てられており、ループ処理の実行回数に対応するマイクロレンズが、処理対象となる。   Then, the image processing unit 103 generates a reconstructed image used for focusing evaluation by executing the loop processing of S422 to S427 as many times as the number of microlenses constituting the microlens array 108. Note that reference numbers are assigned to the microlenses of the microlens array 108 in the order of horizontal scanning starting from the upper left, for example, and the microlens corresponding to the number of execution times of the loop processing is the processing target.

S422で、画像処理部103は、S422乃至S427のループ処理の実行回数が、マイクロレンズの数と同じ回数実行されたか否かを判断する。画像処理部103は、マイクロレンズの数と同じ回数実行されていない場合は処理をS423に移し、実行されている場合は本再構成画像生成処理を完了する。なお、マイクロレンズの数は、予めROMに格納される情報であってもよいし、撮像素子109の画素数を瞳分割数で割ることで取得してもよい。   In step S422, the image processing unit 103 determines whether the number of executions of the loop processing in steps S422 to S427 has been executed the same number of times as the number of microlenses. If the same number of times as the number of microlenses has not been executed, the image processing unit 103 moves the process to S423, and if it has been executed, completes the reconstructed image generation process. Note that the number of microlenses may be information stored in the ROM in advance, or may be obtained by dividing the number of pixels of the image sensor 109 by the number of pupil divisions.

また画像処理部103は、S423乃至S426のループ処理を撮像光学系202の射出瞳の瞳分割数と同じ回数実行することで、1つのマイクロレンズに対応付けられた位置に存在するLFデータの画素について画素値を合算する。なお、1つのマイクロレンズアレイに対応付けられた位置に存在するLFデータの画素については、例えば左上から始まる水平走査順に整理番号が割り当てられており、ループ処理の実行回数に対応する整理番号を有するLFデータの画素が、処理対象となる。   In addition, the image processing unit 103 executes the loop processing of S423 to S426 the same number of times as the number of pupil divisions of the exit pupil of the imaging optical system 202, so that the pixels of the LF data existing at the position associated with one microlens. Add pixel values for. Note that the LF data pixels present at the position associated with one microlens array are assigned with reference numbers in the order of horizontal scanning starting from the upper left, for example, and have reference numbers corresponding to the number of loop processing executions. A pixel of LF data is a processing target.

S423で、画像処理部103は、S423乃至S426のループ処理の実行回数が、瞳分割数と同じ回数実行されたか否かを判断する。実行されていない場合は処理をS424に移し、実行されている場合はループ処理を抜け、処理をS422に戻す。   In step S423, the image processing unit 103 determines whether the number of executions of the loop processing in steps S423 to S426 has been executed the same number of times as the number of pupil divisions. If it is not executed, the process proceeds to S424. If it is executed, the loop process is exited, and the process returns to S422.

S424で、画像処理部103は、処理対象のLFデータの画素が間引き画素であるか否かを判断する。具体的には画像処理部103は、カメラ制御部101より画素選択処理の結果として得られた再構成画像の生成に用いる画素の情報を受信し、該情報に従って処理対象の画素が間引き画素であるか否かを判断する。画像処理部103は、処理対象の画素が間引き画素であると判断した場合は処理をループ端S426に移し、再構成画像の生成に使用する画素であると判断した場合は処理をS425に移す。   In step S424, the image processing unit 103 determines whether the pixel of the LF data to be processed is a thinned pixel. Specifically, the image processing unit 103 receives pixel information used to generate a reconstructed image obtained as a result of the pixel selection process from the camera control unit 101, and the pixel to be processed is a thinned pixel according to the information. Determine whether or not. If the image processing unit 103 determines that the pixel to be processed is a thinned pixel, the process proceeds to the loop end S426. If the image processing unit 103 determines that the pixel to be used for generating a reconstructed image, the process proceeds to S425.

S425で、画像処理部103は、処理対象のLFデータの画素の画素値を、対応する再構成画像の画素についてのメモリ104の格納領域の値に加算する。なお、対応する再構成画像の画素は、間引きを行う場合は図6を用いて説明したような間引き再構成画像の各画素の生成に用いられるLFデータの画素は全て同じ領域の値に加算されるものとする。このとき、異なるカラーフィルタに対応するLFデータの画素は、異なる領域に格納されることは言うまでもない。また、例えば設定された焦点距離により、LFデータの画素位置のシフト量が整数値ではない場合は、本ステップにおいて複数の画素値が内分されて、対応する再構成画像の画素についての格納領域の値に加算すればよい。   In step S425, the image processing unit 103 adds the pixel value of the pixel of the LF data to be processed to the value in the storage area of the memory 104 for the corresponding pixel of the reconstructed image. In addition, when performing thinning, the corresponding reconstructed image pixels are all added to the value of the same region as the LF data pixels used for generating each pixel of the thinned reconstructed image as described with reference to FIG. Shall be. At this time, it goes without saying that pixels of LF data corresponding to different color filters are stored in different regions. Further, for example, when the shift amount of the pixel position of the LF data is not an integer value due to the set focal length, a plurality of pixel values are internally divided in this step, and a storage area for the pixel of the corresponding reconstructed image Add to the value of.

このように本再構成画像生成処理を実行することにより、画像処理部103は再構成面に対応した、合焦評価を行う再構成画像を生成することができる。カメラ制御部101は、再構成画像生成処理が完了した後、AF処理をS306に移す。   By executing the reconstructed image generation process in this way, the image processing unit 103 can generate a reconstructed image for performing focus evaluation corresponding to the reconstructed surface. After completing the reconstructed image generation process, the camera control unit 101 moves the AF process to S306.

S306で、カメラ制御部101は、S305において生成した再構成画像の合焦度合い示すコントラスト評価値を取得するコントラスト評価処理を画像処理部103に実行させる。   In step S <b> 306, the camera control unit 101 causes the image processing unit 103 to execute a contrast evaluation process for acquiring a contrast evaluation value indicating the degree of focus of the reconstructed image generated in step S <b> 305.

〈コントラスト評価処理〉
ここで、本実施形態のコントラスト評価処理について、図4(d)のフローチャートを用いて詳細を説明する。
<Contrast evaluation processing>
Here, the contrast evaluation processing of the present embodiment will be described in detail with reference to the flowchart of FIG.

S431で、画像処理部103は、コントラスト評価を行う評価点の数及び評価枠の大きさを設定する。なお、評価点数や評価枠の大きさは、例えばユーザにより予め設定されていればよい。評価点数が多くなると、より再構成画像の広範囲を評価対象としてカバーすることが可能になるが、コントラスト評価に要する時間は長くなる。また評価枠の大きさが大きくなると、局所的にはパターンを有していないテクスチャであってもコントラスト評価を行うことが可能になるが、距離の異なる被写体の像を同時に評価する所謂遠近競合の発生確立が増加する。本実施形態では、このような問題を考慮した評価点数や評価枠の大きさが設定されているものとする。   In step S431, the image processing unit 103 sets the number of evaluation points to be subjected to contrast evaluation and the size of the evaluation frame. Note that the evaluation score and the size of the evaluation frame may be set in advance by the user, for example. As the number of evaluation points increases, it becomes possible to cover a wider range of the reconstructed image as an evaluation target, but the time required for contrast evaluation becomes longer. In addition, when the size of the evaluation frame increases, it is possible to perform contrast evaluation even for textures that do not have a pattern locally, but it is a so-called perspective conflict that simultaneously evaluates images of subjects with different distances. Incidence increases. In the present embodiment, it is assumed that the number of evaluation points and the size of the evaluation frame are set in consideration of such problems.

S432で、画像処理部103は、再構成画像の画素値についてフィルタ処理を適用する。該フィルタ処理では、粗調探索時にはより低周波成分に着目したフィルタリングを行い、微調探索時には粗調探索時に比べて高周波に着目したフィルタリングを行うとよい。このようにすることで、ローカルミニマムを避けつつ、最終的にコントラスト評価値から判断される被写体に合焦する焦点距離の合焦精度を向上することができる。   In step S432, the image processing unit 103 applies filter processing to the pixel values of the reconstructed image. In the filter processing, it is preferable to perform filtering focusing on a lower frequency component during the coarse search, and performing filtering focusing on the high frequency compared with the coarse search during the fine search. By doing so, it is possible to improve the focusing accuracy of the focal length for focusing on the subject finally determined from the contrast evaluation value while avoiding the local minimum.

画像処理部103は、S433乃至436のループ処理を、評価点数分実行することで、評価点数文の評価枠の各々についてコントラスト評価値を得ることができる。なお、本ループ処理では画像処理部103は、評価を行う評価枠を、予め設定された評価順に従って選択して以下の演算を行う。   The image processing unit 103 can obtain a contrast evaluation value for each evaluation frame of the evaluation score sentence by executing the loop processing of S433 to 436 for the evaluation score. In this loop process, the image processing unit 103 selects an evaluation frame for evaluation in accordance with a preset evaluation order and performs the following calculation.

S433で、画像処理部103は、S433乃至S436のループ処理の実行回数が、評価点数に達したか否かを判断する。画像処理部103は、ループ処理の実行回数が評価点数に達したと判断した場合は処理をS437に移し、達していないと判断した場合は処理をS434に移す。   In step S433, the image processing unit 103 determines whether the number of executions of the loop processing in steps S433 to S436 has reached the evaluation score. If the image processing unit 103 determines that the number of executions of the loop processing has reached the evaluation score, it moves the process to S437, and if it determines that the number has not reached, it moves the process to S434.

S434で、画像処理部103は、評価枠内の再構成画像の全ての水平ラインについて、画素値の最大値をピークホールドする。   In S434, the image processing unit 103 peaks and holds the maximum pixel value for all horizontal lines of the reconstructed image in the evaluation frame.

S435で、画像処理部103は、全ての水平ラインについてピークホールドした最大値を合算することで、コントラスト評価値を算出する。   In step S435, the image processing unit 103 calculates a contrast evaluation value by adding the maximum values peak-held for all horizontal lines.

S437で、画像処理部103は、各評価枠について算出したコントラスト評価値をカメラ制御部101に出力して、本コントラスト評価処理を完了する。   In step S437, the image processing unit 103 outputs the contrast evaluation value calculated for each evaluation frame to the camera control unit 101, and completes the contrast evaluation process.

本実施形態では、このように評価枠内の全ての水平ラインについての最大画素値値の合計値をコントラスト評価値として出力するものとして説明するが、焦点距離の変動に伴うコントラスト評価値の算出については他の計算方法を用いてもよい。例えば、隣接画素出力差の二乗和である二次コントラスト評価値を、隣接画素出力差の絶対和である一次コントラストの二乗で除すことで得られる、輝度値を無次元化した評価値を用いる方法が使用可能である。   In the present embodiment, it is assumed that the total value of the maximum pixel value values for all horizontal lines in the evaluation frame is output as the contrast evaluation value as described above, but the calculation of the contrast evaluation value accompanying the change in the focal length is described. May use other calculation methods. For example, a non-dimensional evaluation value obtained by dividing the secondary contrast evaluation value, which is the sum of squares of adjacent pixel output differences, by the square of the primary contrast, which is the absolute sum of adjacent pixel output differences, is used. The method can be used.

このようにして合焦評価を行う再構成画像についてのコントラスト評価値を受信した後、カメラ制御部101は該評価値をS302において決定した焦点距離の情報に関連付けてRAMに蓄積し、AF処理をS307に移す。   After receiving the contrast evaluation value for the reconstructed image for which the focus evaluation is performed in this way, the camera control unit 101 stores the evaluation value in the RAM in association with the focal length information determined in S302, and performs AF processing. Move to S307.

S307で、カメラ制御部101は、RAMに蓄積された各焦点距離についてのコントラスト評価値の変動に基づいて、被写体に合焦する最良の焦点距離を検出したか否かを判断する。具体的にはカメラ制御部101は、粗調探索及び微調探索の結果、コントラスト評価値が最も高くなる焦点距離のピーク値が得られたか否かを判断する。カメラ制御部101は、被写体に合焦する最良の焦点距離を検出したと判断した場合は処理をS309に移し、検出していないと判断した場合は処理をS308に移す。   In step S <b> 307, the camera control unit 101 determines whether the best focal length for focusing on the subject has been detected based on the change in the contrast evaluation value for each focal length accumulated in the RAM. Specifically, the camera control unit 101 determines whether or not the peak value of the focal length that gives the highest contrast evaluation value is obtained as a result of the coarse adjustment search and the fine adjustment search. If the camera control unit 101 determines that the best focal length for focusing on the subject has been detected, it moves the process to S309. If it determines that it has not detected it, it moves the process to S308.

S308で、カメラ制御部101は、RAMに蓄積された各焦点距離についてのコントラスト評価値の変動(評価結果)に基づいて、粗調探索から微調探索に移行するか否か、及び探索方向をいずれにするか、の少なくともいずれかを決定し、処理をS302に戻す。即ち、本ステップにおいてカメラ制御部101は、次に合焦評価する焦点距離の決定に必要な情報を更新する。   In S <b> 308, the camera control unit 101 determines whether to shift from the coarse search to the fine search based on the change (evaluation result) of the contrast evaluation value for each focal length accumulated in the RAM, and the search direction. Is determined, and the process returns to S302. That is, in this step, the camera control unit 101 updates information necessary for determining the focal length for the next focus evaluation.

S309で、カメラ制御部101は、S307において検出を判断した焦点距離の情報を電気接点107を介してレンズ200のレンズ制御部201に送信し、該焦点距離にフォーカスレンズを駆動させる。レンズ制御部201は、受信した焦点距離の情報をレンズ駆動部203に伝送し、フォーカスレンズを焦点距離に対応する位置に駆動させる。   In step S309, the camera control unit 101 transmits information on the focal length determined to be detected in step S307 to the lens control unit 201 of the lens 200 via the electrical contact 107, and drives the focus lens to the focal length. The lens control unit 201 transmits the received focal length information to the lens driving unit 203, and drives the focus lens to a position corresponding to the focal length.

このようにすることで、1回の撮像により得られたLFデータから、レンズ駆動を行わずに被写体に合焦する焦点距離を検出することができる。また、粗調探索時及び微調探索時に、合焦評価に係る再構成画像の画素数を適切に低減することで、再構成画像の生成やコントラスト評価に要する時間を短縮することができる。   In this way, it is possible to detect the focal length that focuses on the subject without driving the lens from the LF data obtained by one imaging. In addition, the time required for generation of a reconstructed image and contrast evaluation can be shortened by appropriately reducing the number of pixels of the reconstructed image related to the focus evaluation during the coarse search and the fine search.

なお、本実施形態では合焦評価を行う再構成画像の各画素の画素値について、瞳分割数分のLFデータの画素の画素値を合算するものとして説明したが、本発明の実施はこれに限られるものではない。例えば再構成画像の各画素の画素値は、瞳分割数以上の所定数であってもよく、この場合、合算した画素値を瞳分割数分の画素値と同レベルの値になるように、加算した画素数に応じて調整を行なってもよい。   In the present embodiment, the pixel value of each pixel of the reconstructed image to be evaluated for focusing is described as the sum of the pixel values of the LF data pixels corresponding to the number of pupil divisions. It is not limited. For example, the pixel value of each pixel of the reconstructed image may be a predetermined number that is equal to or greater than the number of pupil divisions.In this case, the total pixel value is the same level as the pixel value for the number of pupil divisions. Adjustment may be performed according to the number of added pixels.

次に図7を用いて本実施形態に適用可能な別の光学系の例について説明する。図7は物体(被写体)からの光束が撮像素子109上に結像する状態を模式的に示した図である。図7(a)は図2で説明した光学系と対応しており、撮像光学系202の結像面近傍にマイクロレンズアレイ108を配置した例である。図7(b)は撮像光学系202の結像面よりも物体寄りにマイクロレンズアレイ108を配置した例である。図7(c)は撮像光学系202の結像面よりも物体から遠い側にマイクロレンズアレイ108を配置した例である。   Next, another example of an optical system applicable to this embodiment will be described with reference to FIG. FIG. 7 is a diagram schematically illustrating a state in which a light beam from an object (subject) forms an image on the image sensor 109. FIG. 7A corresponds to the optical system described with reference to FIG. 2, and is an example in which the microlens array 108 is disposed in the vicinity of the imaging surface of the imaging optical system 202. FIG. 7B shows an example in which the microlens array 108 is arranged closer to the object than the imaging plane of the imaging optical system 202. FIG. 7C shows an example in which the microlens array 108 is arranged on the side farther from the object than the imaging plane of the imaging optical system 202.

図7において、図3と共通する構成については同じ参照数字を付し、重複する説明を省略する。51は物体平面であり、51a,51bは物体平面上の任意の点である。52は撮像光学系202の瞳平面を、61,62,71,72,73,81,82,83,84はマイクロレンズアレイ108上の特定のマイクロレンズをそれぞれ示している。   In FIG. 7, the same reference numerals are assigned to configurations common to those in FIG. 3, and redundant description is omitted. Reference numeral 51 denotes an object plane, and 51a and 51b are arbitrary points on the object plane. Reference numeral 52 denotes a pupil plane of the imaging optical system 202, and 61, 62, 71, 72, 73, 81, 82, 83, and 84 denote specific microlenses on the microlens array 108, respectively.

また、図7(b)および(c)においては、図7(a)との対応関係を明確にするために、仮想的な撮像素子109a及び仮想的なマイクロレンズアレイ108aを示した。また、物体平面上の点51aから瞳平面52の瞳領域31および33を通過する光束を実線で、物体平面上の点51bから瞳平面52の瞳領域31および33を通過する光束を破線で図示した。   7B and 7C, the virtual image sensor 109a and the virtual microlens array 108a are shown to clarify the correspondence with FIG. 7A. Also, a light beam passing from the point 51a on the object plane through the pupil regions 31 and 33 on the pupil plane 52 is indicated by a solid line, and a light beam passing from the point 51b on the object plane to the pupil regions 31 and 33 on the pupil plane 52 is indicated by a broken line. did.

図7(a)の例では、図3でも説明したように、撮像光学系202の結像面近傍にマイクロレンズアレイ108を配置することで、撮像素子109と撮影光学系の瞳平面52が共役の関係にある。さらに、物体平面51とマイクロレンズアレイ108が共役の関係にある。このため物体平面51上の点51aからの光束はマイクロレンズ61に、点51bからの光束はマイクロレンズ62に到達し、瞳領域31から35それぞれを通過した光束はマイクロレンズに対応するように設けられた画素に到達する。   In the example of FIG. 7A, as described with reference to FIG. 3, the microlens array 108 is disposed in the vicinity of the imaging surface of the imaging optical system 202, so that the imaging device 109 and the pupil plane 52 of the imaging optical system are conjugated. Are in a relationship. Further, the object plane 51 and the microlens array 108 are in a conjugate relationship. For this reason, the light beam from the point 51a on the object plane 51 reaches the microlens 61, the light beam from the point 51b reaches the microlens 62, and the light beams that have passed through the pupil regions 31 to 35 correspond to the microlens. Reach the selected pixel.

図7(b)の例では、マイクロレンズアレイ108によって撮像光学系202からの光束を結像させ、その結像面に撮像素子109を設けている。このように配置することで、物体平面51と撮像素子109とは共役の関係になる。物体平面51上の点51aから瞳平面52の瞳領域31を通過した光束はマイクロレンズ71に到達し、点51aから瞳平面上の瞳領域33を通過した光束はマイクロレンズ72に到達する。また、物体平面51上の点51bから瞳平面52の瞳領域31を通過した光束はマイクロレンズ72に到達し、点51bから瞳平面52の瞳領域33を通過した光束はマイクロレンズ73に到達する。各マイクロレンズを通過した光束は、マイクロレンズに対応するように設けられた画素に到達する。このように、物体平面からの光束は、その出射位置と、通過する瞳領域に応じて撮像素子109の撮像面における異なる位置に結像する。これらを、仮想的な撮像素子109aの撮像面における位置に並べなおせば、図7(a)の撮像面で得られる情報と同様の情報を得ることができる。即ち、通過した瞳領域(入射角度)と撮像素子109上の位置の情報を得ることができる。   In the example of FIG. 7B, the light beam from the imaging optical system 202 is imaged by the microlens array 108, and the imaging element 109 is provided on the imaging surface. By arranging in this way, the object plane 51 and the image sensor 109 have a conjugate relationship. The light beam that has passed through the pupil region 31 of the pupil plane 52 from the point 51a on the object plane 51 reaches the micro lens 71, and the light beam that has passed through the pupil region 33 on the pupil plane from the point 51a reaches the micro lens 72. Further, the light beam that has passed through the pupil region 31 of the pupil plane 52 from the point 51b on the object plane 51 reaches the micro lens 72, and the light beam that has passed through the pupil region 33 of the pupil plane 52 from the point 51b reaches the micro lens 73. . The light beam that has passed through each microlens reaches a pixel provided so as to correspond to the microlens. Thus, the light beam from the object plane forms an image at different positions on the imaging surface of the image sensor 109 according to the emission position and the passing pupil region. If these are rearranged at the positions on the imaging surface of the virtual imaging element 109a, the same information as the information obtained on the imaging surface of FIG. 7A can be obtained. That is, information on the pupil region (incident angle) that has passed and the position on the image sensor 109 can be obtained.

図7(c)の例では、マイクロレンズアレイ108で撮像光学系202からの光束を再結像させ(一度結像した光束が拡散する状態にあるものを結像させるので再結像と呼ぶ)、その再結像面に撮像素子109の撮像面を配置する。このように配置することで、物体平面51と撮像素子109は共役の関係となる。物体平面51上の点51aから瞳平面52の瞳領域31を通過した光束はマイクロレンズ82に到達し、点51aから瞳平面52の瞳領域33を通過した光束はマイクロレンズ81に到達する。また、物体平面51の点51bから瞳平面52の瞳領域31を通過した光束はマイクロレンズ84に到達し、点51bから瞳平面52の瞳領域33を通過した光束はマイクロレンズ83に到達する。各マイクロレンズを通過した光束は、マイクロレンズに対応するように設けられた画素に到達する。   In the example of FIG. 7C, the microlens array 108 re-images the light beam from the imaging optical system 202 (referred to as re-image because a light beam once formed is diffused). The imaging surface of the image sensor 109 is disposed on the re-imaging plane. By arranging in this way, the object plane 51 and the image sensor 109 have a conjugate relationship. The light beam that has passed through the pupil region 31 of the pupil plane 52 from the point 51a on the object plane 51 reaches the micro lens 82, and the light beam that has passed through the pupil region 33 of the pupil plane 52 from the point 51a reaches the micro lens 81. Further, the light beam that has passed through the pupil region 31 of the pupil plane 52 from the point 51b on the object plane 51 reaches the micro lens 84, and the light beam that has passed through the pupil region 33 of the pupil plane 52 from the point 51b reaches the micro lens 83. The light beam that has passed through each microlens reaches a pixel provided so as to correspond to the microlens.

図7(b)の場合と同様に、撮像素子109で得られた画素の信号を、仮想的な撮像素子109aの撮像面における位置に並び替えれば、図7(a)の撮像面で得られる情報と同様の情報を得ることができる。即ち、通過した瞳領域(入射角度)と撮像素子109上の位置の情報を得ることができる。   Similarly to the case of FIG. 7B, if the pixel signals obtained by the image sensor 109 are rearranged to the positions on the image plane of the virtual image sensor 109a, they can be obtained on the image plane of FIG. 7A. Information similar to information can be obtained. That is, information on the pupil region (incident angle) that has passed and the position on the image sensor 109 can be obtained.

なお、図7ではマイクロレンズアレイ108(位相変調素子)を用いて瞳分割を行い、光束の位置情報と角度情報を取得する構成例を示したが、位置情報と角度情報(瞳の通過領域を制限することと等価)を取得可能なものであれば他の構成も利用可能である。例えば、基本パターンの繰り返しから構成されるパターンマスク(ゲイン変調素子)をマイクロレンズアレイ108の代わりに用いる構成であってもよい。   FIG. 7 shows a configuration example in which pupil division is performed using the microlens array 108 (phase modulation element) to acquire position information and angle information of a light beam. Other configurations can be used as long as they can acquire (equivalent to limiting). For example, a configuration in which a pattern mask (gain modulation element) configured by repeating basic patterns is used instead of the microlens array 108 may be used.

以上説明したように、本実施形態の撮像装置は、撮影後に任意の焦点距離に合焦した画像を生成可能な撮像装置における、オートフォーカス動作を高速化することができる。具体的には撮像装置は、合焦評価用の生成再構成画像の画素数を設定し、該画素数と画像信号の画素から生成可能な再構成画像の上限画素数とから生成再構成画像の各画素の生成に用いる生成可能な再構成画像の画素を決定する。そして、生成再構成画像の各画素について、生成に用いる生成可能な再構成画像の画素に対応する画像信号の画素のうち、所定数の画素を、生成再構成画像の生成に用いる画素として選択する。このとき撮像装置は、設定された生成再構成画像の画素数が上限画素数よりも少ない場合は、生成に用いる生成可能な再構成画像の画素のそれぞれについて少なくとも1つの対応する画像信号の画素を選択する。   As described above, the imaging apparatus of the present embodiment can speed up the autofocus operation in the imaging apparatus that can generate an image focused on an arbitrary focal length after shooting. Specifically, the imaging apparatus sets the number of pixels of the generated reconstructed image for focus evaluation, and determines the generated reconstructed image from the number of pixels and the upper limit number of pixels of the reconstructed image that can be generated from the pixels of the image signal. A reconstructable image pixel that can be used for generating each pixel is determined. Then, for each pixel of the generated reconstructed image, a predetermined number of pixels are selected as pixels used for generating the generated reconstructed image among the pixels of the image signal corresponding to the pixels of the reconfigurable reconfigurable image used for generation. . At this time, if the set number of pixels of the generated reconstructed image is smaller than the upper limit number of pixels, the imaging apparatus determines at least one corresponding image signal pixel for each of the reproducible reconstructed image pixels used for generation. select.

[その他の実施形態]
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
[Other Embodiments]
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (7)

被写体を撮像し、得られた画像信号を出力する撮像手段であって、該画像信号の画素の各々が、通過した撮像光学系の瞳領域及び入射方向の組み合わせが異なる光束に対応する撮像手段と、
前記撮像手段により出力された前記画像信号から生成する生成再構成画像について設定する、該生成再構成画像内で合焦する被写体の焦点距離を決定する決定手段と、
前記決定手段により決定された前記焦点距離に応じて、前記生成再構成画像の各画素に対応する所定数の前記画像信号の画素の画素値を合算することで、前記焦点距離に合焦した前記生成再構成画像を生成する生成手段と、
前記生成手段により生成された前記生成再構成画像について合焦評価を行う評価手段と、を有する撮像装置であって、
前記生成手段により生成される前記生成再構成画像の画素数を設定する設定手段と、
前記設定手段により設定された前記生成再構成画像の画素数と、前記画像信号の画素から生成可能な再構成画像の上限画素数とから前記生成再構成画像の各画素の生成に用いる前記生成可能な再構成画像の画素を決定し、前記生成再構成画像の各画素について、生成に用いる前記生成可能な再構成画像の画素に対応する前記画像信号の画素のうち、前記所定数の画素を選択する選択手段と、を有し、
前記選択手段は、前記設定手段により設定された前記生成再構成画像の画素数が前記上限画素数よりも少ない場合に、前記生成に用いる生成可能な再構成画像の画素のそれぞれについて少なくとも1つの対応する前記画像信号の画素を選択する
ことを特徴とする撮像装置。
An imaging unit that images a subject and outputs the obtained image signal, each of the pixels of the image signal corresponding to a light flux in which a combination of a pupil region and an incident direction of the imaging optical system that has passed is different ,
A determination unit configured to set a generated reconstructed image generated from the image signal output by the imaging unit, and to determine a focal length of a subject to be focused in the generated reconstructed image;
In accordance with the focal length determined by the determining means, the pixel values of the pixels of the predetermined number of the image signals corresponding to the pixels of the generated reconstructed image are added together, thereby focusing on the focal length. Generating means for generating a generated reconstructed image;
An evaluation unit that performs a focus evaluation on the generated reconstructed image generated by the generation unit,
Setting means for setting the number of pixels of the generated reconstructed image generated by the generating means;
The generation possibility used for generating each pixel of the generated reconstructed image from the number of pixels of the generated reconstructed image set by the setting means and the upper limit number of pixels of the reconstructed image that can be generated from the pixels of the image signal A pixel of the reconstructed image is determined, and for each pixel of the generated reconstructed image, the predetermined number of pixels are selected from the pixels of the image signal corresponding to the pixels of the reconfigurable reconstructable image used for generation And a selection means to
The selection means has at least one correspondence for each pixel of the reconfigurable reconfigurable image used for the generation when the number of pixels of the generated reconstructed image set by the setting means is smaller than the upper limit number of pixels. An image pickup apparatus that selects pixels of the image signal.
前記選択手段は、前記生成再構成画像の画素数が前記上限画素数よりも少ない場合に、前記生成に用いる生成可能な再構成画像の画素のうちの少なくとも2つの画素間で、異なる瞳領域を通過した対応する前記画像信号の画素を含むように、前記所定数の前記画像信号の画素を選択することを特徴とする請求項1に記載の撮像装置。   When the number of pixels of the generated reconstructed image is smaller than the upper limit number of pixels, the selection unit selects different pupil regions between at least two pixels of the reconfigurable image that can be used for generation. 2. The imaging apparatus according to claim 1, wherein the predetermined number of pixels of the image signal are selected so as to include the corresponding pixels of the image signal that have passed. 前記撮像手段は複数のカラーフィルタを有し、前記画像信号の画素は前記複数のカラーフィルタのいずれかに対応した色信号であり、
前記生成手段は、前記生成再構成画像の各画素を、前記複数のカラーフィルタの各々に対応する前記画像信号の画素を用いて生成し、
前記選択手段は、前記生成再構成画像の画素数が前記上限画素数よりも少ない場合に、前記生成に用いる生成可能な再構成画像の各画素に対応する前記画像信号の画素について、前記複数のカラーフィルタの各々に対応する画素で異なる瞳領域を通過した画素を選択することを特徴とする請求項1または2に記載の撮像装置。
The imaging means has a plurality of color filters, and the pixels of the image signal are color signals corresponding to any of the plurality of color filters,
The generation unit generates each pixel of the generated reconstructed image using a pixel of the image signal corresponding to each of the plurality of color filters,
When the number of pixels of the generated reconstructed image is smaller than the upper limit number of pixels, the selection unit is configured to select the plurality of pixels of the image signal corresponding to each pixel of the reconfigurable reconfigurable image used for the generation. The imaging apparatus according to claim 1, wherein a pixel that passes through a different pupil region among pixels corresponding to each of the color filters is selected.
前記決定手段は、前記評価手段による評価結果に応じて、現在設定している前記焦点距離と次に設定する前記焦点距離との間隔を変更し、
前記設定手段は、前記間隔が閾値より大きい場合に、前記生成再構成画像の画素数を前記上限画素数よりも少ない第1の画素数に設定し、前記間隔が前記閾値より小さい場合に、前記生成再構成画像の画素数を前記第1の画素数よりも多く、かつ前記上限画素数以下の第2の画素数に決定する
ことを特徴とする請求項1乃至3のいずれか1項に記載の撮像装置。
The determining unit changes an interval between the focal length currently set and the focal length to be set next, according to an evaluation result by the evaluation unit,
The setting means sets the number of pixels of the generated reconstructed image to a first number of pixels smaller than the upper limit number of pixels when the interval is larger than a threshold, and when the interval is smaller than the threshold, The number of pixels of the generated reconstructed image is determined to be a second number of pixels that is larger than the first number of pixels and equal to or less than the upper limit number of pixels. Imaging device.
前記所定数は瞳分割数であることを特徴とする請求項1乃至4のいずれか1項に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the predetermined number is a pupil division number. 被写体を撮像し、得られた画像信号を出力する撮像手段であって、該画像信号の画素の各々が、通過した撮像光学系の瞳領域及び入射方向の組み合わせが異なる光束に対応する撮像手段と、
前記撮像手段により出力された前記画像信号から生成する生成再構成画像について設定する、該生成再構成画像内で合焦する被写体の焦点距離を決定する決定手段と、
前記決定手段により決定された前記焦点距離に応じて、前記生成再構成画像の各画素に対応する所定数の前記画像信号の画素の画素値を合算することで、前記焦点距離に合焦した前記生成再構成画像を生成する生成手段と、
前記生成手段により生成された前記生成再構成画像について合焦評価を行う評価手段と、を有する撮像装置の制御方法であって、
前記撮像装置の設定手段が、前記生成手段により生成される前記生成再構成画像の画素数を設定する設定工程と、
前記撮像装置の選択手段が、前記設定工程において設定された前記生成再構成画像の画素数と、前記画像信号の画素から生成可能な再構成画像の上限画素数とから前記生成再構成画像の各画素の生成に用いる前記生成可能な再構成画像の画素を決定し、前記生成再構成画像の各画素について、生成に用いる前記生成可能な再構成画像の画素に対応する前記画像信号の画素のうち、前記所定数の画素を選択する選択工程と、を有し、
前記選択手段は前記選択工程において、前記設定工程において設定された前記生成再構成画像の画素数が前記上限画素数よりも少ない場合に、前記生成に用いる生成可能な再構成画像の画素のそれぞれについて少なくとも1つの対応する前記画像信号の画素を選択する
ことを特徴とする撮像装置の制御方法。
An imaging unit that images a subject and outputs the obtained image signal, each of the pixels of the image signal corresponding to a light flux in which a combination of a pupil region and an incident direction of the imaging optical system that has passed is different ,
A determination unit configured to set a generated reconstructed image generated from the image signal output by the imaging unit, and to determine a focal length of a subject to be focused in the generated reconstructed image;
In accordance with the focal length determined by the determining means, the pixel values of the pixels of the predetermined number of the image signals corresponding to the pixels of the generated reconstructed image are added together, thereby focusing on the focal length. Generating means for generating a generated reconstructed image;
An evaluation unit that performs focusing evaluation on the generated reconstructed image generated by the generation unit;
A setting step in which the setting unit of the imaging apparatus sets the number of pixels of the generated reconstructed image generated by the generating unit;
Each of the generated reconstructed images is selected from the number of pixels of the generated reconstructed image set in the setting step and the upper limit number of pixels of the reconstructed image that can be generated from the pixels of the image signal. A pixel of the reconstructable image that can be generated used for generating a pixel is determined, and for each pixel of the generated reconstructed image, among the pixels of the image signal corresponding to the pixel of the reconfigurable image that can be generated that is used for generation And a selection step of selecting the predetermined number of pixels,
In the selection step, when the number of pixels of the generated reconstructed image set in the setting step is smaller than the upper limit number of pixels, the selection unit is configured to generate pixels that can be generated for the generation. A control method for an imaging apparatus, wherein at least one corresponding pixel of the image signal is selected.
コンピュータを、請求項1乃至5のいずれか1項に記載の撮像装置の撮像手段を除く各手段として機能させるためのプログラム。   The program for functioning a computer as each means except the imaging means of the imaging device of any one of Claims 1 thru | or 5.
JP2012130189A 2012-06-07 2012-06-07 FOCUS DETECTION DEVICE, IMAGING DEVICE, CONTROL METHOD, PROGRAM, AND RECORDING MEDIUM Expired - Fee Related JP6046922B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012130189A JP6046922B2 (en) 2012-06-07 2012-06-07 FOCUS DETECTION DEVICE, IMAGING DEVICE, CONTROL METHOD, PROGRAM, AND RECORDING MEDIUM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012130189A JP6046922B2 (en) 2012-06-07 2012-06-07 FOCUS DETECTION DEVICE, IMAGING DEVICE, CONTROL METHOD, PROGRAM, AND RECORDING MEDIUM

Publications (3)

Publication Number Publication Date
JP2013254114A true JP2013254114A (en) 2013-12-19
JP2013254114A5 JP2013254114A5 (en) 2015-07-23
JP6046922B2 JP6046922B2 (en) 2016-12-21

Family

ID=49951639

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012130189A Expired - Fee Related JP6046922B2 (en) 2012-06-07 2012-06-07 FOCUS DETECTION DEVICE, IMAGING DEVICE, CONTROL METHOD, PROGRAM, AND RECORDING MEDIUM

Country Status (1)

Country Link
JP (1) JP6046922B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015200826A (en) * 2014-04-09 2015-11-12 キヤノン株式会社 Focus adjustment device, image-capturing device, and focus adjustment method
JP2015207815A (en) * 2014-04-17 2015-11-19 キヤノン株式会社 Image pickup element and imaging device having the same

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007004471A (en) * 2005-06-23 2007-01-11 Nikon Corp Image synthesis method and image pickup apparatus
JP2008199477A (en) * 2007-02-15 2008-08-28 Matsushita Electric Ind Co Ltd Imaging apparatus
JP2009258610A (en) * 2008-03-17 2009-11-05 Ricoh Co Ltd Focal length detecting device, imaging apparatus, imaging method, camera, focusing device, and focusing method
WO2011081187A1 (en) * 2009-12-28 2011-07-07 株式会社ニコン Image capture element, and image capture device
JP2011135170A (en) * 2009-12-22 2011-07-07 Samsung Electronics Co Ltd Imaging apparatus and imaging method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007004471A (en) * 2005-06-23 2007-01-11 Nikon Corp Image synthesis method and image pickup apparatus
JP2008199477A (en) * 2007-02-15 2008-08-28 Matsushita Electric Ind Co Ltd Imaging apparatus
JP2009258610A (en) * 2008-03-17 2009-11-05 Ricoh Co Ltd Focal length detecting device, imaging apparatus, imaging method, camera, focusing device, and focusing method
JP2011135170A (en) * 2009-12-22 2011-07-07 Samsung Electronics Co Ltd Imaging apparatus and imaging method
WO2011081187A1 (en) * 2009-12-28 2011-07-07 株式会社ニコン Image capture element, and image capture device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015200826A (en) * 2014-04-09 2015-11-12 キヤノン株式会社 Focus adjustment device, image-capturing device, and focus adjustment method
JP2015207815A (en) * 2014-04-17 2015-11-19 キヤノン株式会社 Image pickup element and imaging device having the same

Also Published As

Publication number Publication date
JP6046922B2 (en) 2016-12-21

Similar Documents

Publication Publication Date Title
JP5264131B2 (en) Imaging device
US9279955B2 (en) Image pickup apparatus, control method thereof, and program
JP5000413B2 (en) Imaging system and image signal processing program
JP2009115893A (en) Image-pickup apparatus
US10009533B2 (en) Image pickup apparatus and control method thereof with contrast focus evaluation
JP2011081271A (en) Image capturing apparatus
JPWO2013027488A1 (en) Imaging device
JP4823167B2 (en) Imaging device
JP2012113171A (en) Imaging device and control method therefor
JP2007240877A (en) Imaging apparatus and control method therefor
JP6046922B2 (en) FOCUS DETECTION DEVICE, IMAGING DEVICE, CONTROL METHOD, PROGRAM, AND RECORDING MEDIUM
JP4823169B2 (en) Imaging device
JP2017032646A (en) Image-capturing device and method for controlling the same
JP6624834B2 (en) Imaging device and control method thereof
JP6039958B2 (en) Image processing apparatus, imaging apparatus, control method, and program
JP2014155071A (en) Image processing system, imaging apparatus, control method, and program
JP5893412B2 (en) Imaging apparatus and control method thereof
JP5973784B2 (en) Imaging apparatus, control method therefor, program, and storage medium
JP2014142497A (en) Imaging apparatus and method for controlling the same
JP2013254114A5 (en) FOCUS DETECTION DEVICE, IMAGING DEVICE, CONTROL METHOD, PROGRAM, AND RECORDING MEDIUM
JP2011197690A (en) Imaging device and control method therefor
JP5968081B2 (en) Imaging apparatus and control method thereof
JP5207893B2 (en) Imaging apparatus and control method thereof
JP2016071275A (en) Image-capturing device and focus control program
JP2020057017A (en) Image-capturing device and method for controlling the same

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150608

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150608

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160307

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160311

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160510

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: 20161021

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161118

R151 Written notification of patent or utility model registration

Ref document number: 6046922

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees