JP2018017876A - Imaging apparatus and control method of the same, and image processing apparatus and method - Google Patents

Imaging apparatus and control method of the same, and image processing apparatus and method Download PDF

Info

Publication number
JP2018017876A
JP2018017876A JP2016147775A JP2016147775A JP2018017876A JP 2018017876 A JP2018017876 A JP 2018017876A JP 2016147775 A JP2016147775 A JP 2016147775A JP 2016147775 A JP2016147775 A JP 2016147775A JP 2018017876 A JP2018017876 A JP 2018017876A
Authority
JP
Japan
Prior art keywords
focus detection
focus
defocus amount
subject
image
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
JP2016147775A
Other languages
Japanese (ja)
Other versions
JP6881909B2 (en
Inventor
広明 栗栖
Hiroaki Kurisu
広明 栗栖
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 JP2016147775A priority Critical patent/JP6881909B2/en
Publication of JP2018017876A publication Critical patent/JP2018017876A/en
Application granted granted Critical
Publication of JP6881909B2 publication Critical patent/JP6881909B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To efficiently detect a subject included in a scene, and improve accuracy of a focus adjustment relative to a main subject.SOLUTION: An imaging apparatus includes: focus detection means that detects a defocus amount for each of a plurality of predetermined focus detection areas from an image signal output from an imaging device; generation means that generates distance distribution information on the basis of the defocus amount; focus adjustment means that conducts focus adjustments on the basis of the distance distribution information and the defocus amount; and control means that, when generating the distance distribution information by the generation means, performs control so as to take a picture by setting an aperture to be included in an imaging optical system to a first aperture value to be a predetermined first depth of field, and when conducting the focus adjustment by the focus adjustment means, performs control so as to take the picture by setting an aperture to a second aperture value to be a second depth of filed shallower than the first depth of field.SELECTED DRAWING: Figure 1

Description

本発明は、撮像装置及びその制御方法、及び画像処理装置及び方法に関し、特に撮像面位相差AFによる焦点調節技術に関する。   The present invention relates to an imaging apparatus, a control method therefor, and an image processing apparatus and method, and more particularly to a focus adjustment technique based on imaging plane phase difference AF.

近年需要が高まっているライブビュー(LV)画面を見ながらの撮影は、AF制御として、逸早く合焦させるための応答性に加えて、フォーカシング動作の品位が求められている。最近では、LV撮影時に高速かつ品位良くフォーカシングを行うことが可能なAF方式が提案されている。その方式の一つとして挙げられるのが、位相差検出方式によるAFを、画像を撮影するための撮像素子を用いて行う撮像面位相差検出方式のAFである。   Shooting while looking at a live view (LV) screen, which has been increasing in demand in recent years, requires a quality of focusing operation in addition to the responsiveness to focus quickly as AF control. Recently, an AF method capable of focusing at high speed and high quality during LV shooting has been proposed. One of the methods is AF of the imaging plane phase difference detection method in which AF by the phase difference detection method is performed using an image sensor for taking an image.

撮像面位相差検出方式の1つとして、特許文献1では、1つのマイクロレンズで集光される1つの画素においてフォトダイオードを分割し、各々のフォトダイオードが撮像レンズの異なる瞳領域を通過した光を受光するように構成することが開示されている。そして、2つのフォトダイオードの出力を比較することで、撮像面位相差検出方式のAFが可能となる。撮像面位相差検出方式を用いることで、LV撮影時でも位相差検出方式でAF制御することが可能になり、高速で品位良くフォーカシングを行うことができる。   As one imaging plane phase difference detection method, in Patent Document 1, a photodiode is divided in one pixel condensed by one microlens, and each photodiode passes through a different pupil region of the imaging lens. Is configured to receive light. Then, by comparing the outputs of the two photodiodes, the imaging plane phase difference detection AF can be performed. By using the imaging surface phase difference detection method, AF control can be performed by the phase difference detection method even during LV shooting, and focusing can be performed at high speed with high quality.

こうして得られる合焦結果を、撮影時の合焦位置決定のためだけに使用するのではなく、複数の焦点検出領域を設定し、画面内の距離の分布情報(距離マップ)から複数の被写体の位置を取得し、撮影時の処理や画像処理時の判断に使用する場合がある。   The focus result obtained in this way is not used only for determining the focus position at the time of shooting, but a plurality of focus detection areas are set, and a plurality of subjects are determined from distance distribution information (distance map) in the screen. There are cases where the position is acquired and used for processing at the time of shooting and determination at the time of image processing.

特許文献2では、撮像範囲を複数に分割して焦点検出を行い、距離情報に基づいて取得した被写体の種類に応じて撮影モードを切り替えることが開示されている。この際の焦点検出では、位相差検出方式、コントラスト方式、また2者を組み合わせたハイブリッド方式を用いている。   Patent Document 2 discloses that focus detection is performed by dividing an imaging range into a plurality of parts, and shooting modes are switched according to the type of subject acquired based on distance information. In focus detection at this time, a phase difference detection method, a contrast method, or a hybrid method combining the two is used.

特開2001−083407号公報JP 2001-083407 A 特開2009−272799号公報JP 2009-272799 A

しかしながら、フォーカスレンズの位置によっては、一回の露光で距離マップ情報を作成できないシーンもある。そのような場合、何度もフォーカスレンズを動かして露光して焦点検出を行い、被写体を捜索する必要がある。また、コントラスト方式を用いた焦点検出はフォーカスレンズを頻繁に駆動させるため時間がかかり、LV画面の見栄えも良くない。   However, depending on the position of the focus lens, there are scenes in which distance map information cannot be created by a single exposure. In such a case, it is necessary to search the subject by moving the focus lens many times and performing exposure to perform focus detection. Further, focus detection using the contrast method takes time because the focus lens is driven frequently, and the appearance of the LV screen is not good.

本発明は上記問題点を鑑みてなされたものであり、シーンに含まれる被写体を効率的に検出するとともに、主被写体への焦点調節の精度を上げることを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to efficiently detect a subject included in a scene and improve the accuracy of focus adjustment to a main subject.

上記目的を達成するために、本発明の撮像装は、複数のマイクロレンズそれぞれに対して複数の光電変換素子を備え、撮像光学系を介して入射した被写体像を撮影して、画像信号を出力する撮像素子と、前記撮像素子から出力された画像信号から、視差を有する一対の画像を生成して、予め決められた複数の焦点検出領域それぞれについてデフォーカス量を検出する焦点検出手段と、前記デフォーカス量に基づいて、距離分布情報を作成する作成手段と、前記距離分布情報および前記デフォーカス量に基づいて、焦点調節を行う焦点調節手段と、前記作成手段により前記距離分布情報を作成する際には、前記撮像光学系に含まれる絞りを予め決められた第1の被写界深度となる第1の絞り値に設定して撮影を行い、前記焦点調節手段により焦点調節を行う際には、前記絞りを前記第1の被写界深度よりも浅い第2の被写界深度となる第2の絞り値に設定して撮影を行うように制御する制御手段とを有する。   In order to achieve the above object, the imaging apparatus of the present invention includes a plurality of photoelectric conversion elements for each of a plurality of microlenses, captures a subject image incident via an imaging optical system, and outputs an image signal. A focus detection unit that generates a pair of images having parallax from the image signal output from the image sensor and detects a defocus amount for each of a plurality of predetermined focus detection regions; Creation means for creating distance distribution information based on the defocus amount, focus adjustment means for performing focus adjustment based on the distance distribution information and the defocus amount, and creation of the distance distribution information by the creation means In this case, shooting is performed with the aperture included in the imaging optical system set to a first aperture value that is set to a predetermined first depth of field, and the focus adjustment unit performs focusing. Control means for controlling to perform shooting by setting the aperture to a second aperture value that is a second depth of field shallower than the first depth of field when performing the adjustment; Have.

本発明によれば、シーンに含まれる被写体を効率的に検出するとともに、主被写体への焦点調節の精度を上げることができる。   According to the present invention, it is possible to efficiently detect a subject included in a scene and improve the accuracy of focus adjustment to the main subject.

本発明の実施形態における撮像装置の構成を示すブロック図。1 is a block diagram illustrating a configuration of an imaging apparatus according to an embodiment of the present invention. 撮像光学系の瞳と撮像素子が受光する光の関係を示す模式図。FIG. 3 is a schematic diagram illustrating a relationship between a pupil of an imaging optical system and light received by an imaging element. 第1の実施形態における焦点検出処理を示すフローチャート。5 is a flowchart showing focus detection processing in the first embodiment. 第1の実施形態における焦点検出領域の一例を示す図。FIG. 3 is a diagram illustrating an example of a focus detection area in the first embodiment. 第1の実施形態における焦点検出領域から得られる画像信号を示す図。FIG. 5 is a diagram showing an image signal obtained from a focus detection area in the first embodiment. 第1の実施形態における相関量及び相関変化量の変化を表した図。The figure showing the change of the correlation amount and correlation change amount in 1st Embodiment. 第1の実施形態における相関変化量及び相関量の変化を表した図。The figure showing the correlation variation | change_quantity in 1st Embodiment, and the change of correlation amount. 第1の実施形態における撮影処理を示すフローチャート。6 is a flowchart illustrating imaging processing according to the first embodiment. 第1の実施形態における静止画撮影処理を示すフローチャート。5 is a flowchart illustrating still image shooting processing according to the first embodiment. 第1の実施形態における主被写体検出処理を示すフローチャート。6 is a flowchart showing main subject detection processing in the first embodiment. 第1の実施形態における被写体検出処理を示すフローチャート。6 is a flowchart illustrating subject detection processing in the first embodiment. 第1の実施形態におけるAF処理を示すフローチャート。5 is a flowchart showing AF processing in the first embodiment. 第1の実施形態における焦点検出領域と重み値の一例を示す図。FIG. 5 is a diagram illustrating an example of a focus detection area and a weight value in the first embodiment. 第1の実施形態における撮影するシーンの一例と焦点検出領域を示す図。FIG. 5 is a diagram illustrating an example of a scene to be photographed and a focus detection area in the first embodiment. 第1の実施形態における撮像装置と被写体の位置関係を模式的に示す図。FIG. 3 is a diagram schematically illustrating a positional relationship between the imaging device and a subject in the first embodiment. 被写界深度と像崩れを説明する図。The figure explaining depth of field and image collapse. 第1の実施形態における被写体の検出例を示す図。FIG. 3 is a diagram illustrating an example of subject detection in the first embodiment. 第1の実施形態における撮影するシーンの別の一例を示す図。The figure which shows another example of the scene image | photographed in 1st Embodiment. 第2の実施形態における第1の設定と第2の設定を示す図。The figure which shows the 1st setting and 2nd setting in 2nd Embodiment. 第2の実施形態における焦点検出処理シーケンスを示す図。The figure which shows the focus detection process sequence in 2nd Embodiment.

以下、添付図面を参照して本発明を実施するための形態を詳細に説明する。   DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the accompanying drawings.

<第1の実施形態>
図1を参照して、第1の実施形態における撮像装置の構成について説明する。図1は、撮像装置101の構成を示すブロック図である。撮像装置101は、被写体を撮影して得られた動画や静止画のデータを磁気テープや固体メモリ、光ディスクや磁気ディスクなどの各種メディアに記録可能なデジタルスチルカメラやビデオカメラなどであるが、これらに限定されるものではない。
<First Embodiment>
With reference to FIG. 1, the structure of the imaging device in 1st Embodiment is demonstrated. FIG. 1 is a block diagram illustrating a configuration of the imaging apparatus 101. The imaging apparatus 101 is a digital still camera or video camera that can record moving image or still image data obtained by photographing a subject on various media such as a magnetic tape, a solid-state memory, an optical disk, and a magnetic disk. It is not limited to.

撮影レンズ111(レンズユニット)は、固定レンズ112、絞り113、フォーカスレンズ114等の撮像光学系を備えて構成される。絞り制御部115は、絞り113を駆動することにより、絞り113の開口径を調整して撮影時の光量調節を行う。フォーカス制御部116は、撮影レンズ111のピント方向のずれ量に基づいてフォーカスレンズ114を駆動する駆動量を決定する。フォーカスレンズ114を駆動することにより、焦点調節状態を制御する。フォーカス制御部116によるフォーカスレンズ114の移動制御により、自動焦点調節(AF)制御が実現される。フォーカスレンズ114は、焦点調節用レンズであり、図1では1枚のレンズで簡略的に示されているが、通常は複数のレンズで構成される。絞り制御部115や、フォーカス制御部116はレンズ制御部117によって制御される。   The photographing lens 111 (lens unit) includes an imaging optical system such as a fixed lens 112, a diaphragm 113, and a focus lens 114. The diaphragm control unit 115 drives the diaphragm 113 to adjust the aperture diameter of the diaphragm 113 to adjust the light amount during photographing. The focus control unit 116 determines a drive amount for driving the focus lens 114 based on the shift amount of the photographing lens 111 in the focus direction. The focus adjustment state is controlled by driving the focus lens 114. Automatic focus adjustment (AF) control is realized by movement control of the focus lens 114 by the focus control unit 116. The focus lens 114 is a focus adjustment lens, and is simply illustrated as a single lens in FIG. 1, but is normally configured by a plurality of lenses. The aperture controller 115 and the focus controller 116 are controlled by the lens controller 117.

撮影レンズ111を介して入射した光束は撮像素子121の受光面上に結像し、撮像素子121により電気信号に変換される。撮像素子121は、CCDやCMOSセンサ等により構成され、複数の光電変換素子により被写体像(光学像)を信号電荷に光電変換する。各光電変換素子に蓄積された信号電荷は、タイミングジェネレータ122が出力する駆動パルスにより、信号電荷に応じた電圧信号(撮像信号及び焦点検出用信号)として撮像素子121から順次読みだされる。   The light beam incident through the photographing lens 111 forms an image on the light receiving surface of the image sensor 121 and is converted into an electric signal by the image sensor 121. The image sensor 121 is configured by a CCD, a CMOS sensor, or the like, and photoelectrically converts a subject image (optical image) into signal charges by a plurality of photoelectric conversion elements. The signal charge accumulated in each photoelectric conversion element is sequentially read from the image pickup element 121 as a voltage signal (an image pickup signal and a focus detection signal) corresponding to the signal charge by a driving pulse output from the timing generator 122.

ここで、図2を用いて撮像素子121について説明する。撮像素子121は、2次元的に配列されたm×n画素で構成されており、201は撮像素子121の一部の断面を示している。各画素202には、マイクロレンズ203と2つの光電変換素子204,205が配置されており、撮像面位相差検出方式による自動焦点調節に用いる像信号を生成することができる。撮影レンズ111の撮像光学系の瞳206の異なる領域207,208を通過した光束は、光軸209を中心に各画素202に配置されたマイクロレンズ203を介して、各画素202に設けられた2つの光電変換素子204、205で受光される。これにより、1つの画素202から、撮像信号と焦点検出用信号の2種類の信号を取得することができる。   Here, the image sensor 121 will be described with reference to FIG. The image sensor 121 is composed of m × n pixels that are two-dimensionally arranged, and 201 represents a partial cross section of the image sensor 121. Each pixel 202 is provided with a microlens 203 and two photoelectric conversion elements 204 and 205, and can generate an image signal used for automatic focus adjustment by an imaging surface phase difference detection method. A light beam that has passed through different regions 207 and 208 of the pupil 206 of the imaging optical system of the photographing lens 111 is provided in each pixel 202 via a microlens 203 disposed in each pixel 202 with the optical axis 209 as the center. Light is received by the two photoelectric conversion elements 204 and 205. Accordingly, two types of signals, that is, an imaging signal and a focus detection signal can be acquired from one pixel 202.

2つの光電変換素子204,205の出力を加算することで、撮像信号を取得することができ、撮像信号処理部124により画像信号(画像データ)として整えられる。また、2つの光電変換素子204,205の出力を各々扱うことにより、視差の異なる2つの画像(視差画像)を取得することができ、焦点検出用信号処理部125によって焦点検出の演算を行う。本実施形態の説明では、2つの光電変換素子204,205の出力を加算して得た画像をA+B像、2つの光電変換素子の出力を各々扱って得た画像をそれぞれA像、B像と呼称する。なお、焦点検出用信号の生成方法については本実施形態の手法に限定せず、他の方法を用いても良い。また、焦点検出処理の詳細については後述する。   By adding the outputs of the two photoelectric conversion elements 204 and 205, an imaging signal can be acquired and adjusted as an image signal (image data) by the imaging signal processing unit 124. Further, by handling the outputs of the two photoelectric conversion elements 204 and 205, two images having different parallaxes (parallax images) can be acquired, and the focus detection signal processing unit 125 performs focus detection calculation. In the description of the present embodiment, an image obtained by adding the outputs of the two photoelectric conversion elements 204 and 205 is an A + B image, and an image obtained by handling the outputs of the two photoelectric conversion elements is an A image and a B image, respectively. Call it. Note that the method of generating the focus detection signal is not limited to the method of the present embodiment, and other methods may be used. Details of the focus detection process will be described later.

図1に戻り、CDS/AGC/ADコンバータ123は、撮像素子121から読み出された撮像信号及び焦点検出用信号に対し、リセットノイズを除去する為の相関二重サンプリング、ゲインの調節、信号のデジタル化を行う。そして、CDS/AGC/ADコンバータ123は、撮像信号を撮像信号処理部124に、撮像面位相差方式の焦点検出用信号を焦点検出用信号処理部125にそれぞれ出力する。焦点検出用信号処理部125はCDS/AGC/ADコンバータ123から出力された焦点検出用の2つの像信号に対して相関演算を行い、像ずれ量、信頼性情報(二像一致度、二像急峻度等)を算出する。また、撮像画面内で焦点検出を行う焦点検出領域の設定や配置も行う。   Returning to FIG. 1, the CDS / AGC / AD converter 123 performs correlated double sampling to remove reset noise, gain adjustment, signal signal extraction for the image signal and focus detection signal read from the image sensor 121. Digitize. Then, the CDS / AGC / AD converter 123 outputs the imaging signal to the imaging signal processing unit 124 and the imaging surface phase difference type focus detection signal to the focus detection signal processing unit 125, respectively. The focus detection signal processing unit 125 performs a correlation operation on the two image signals for focus detection output from the CDS / AGC / AD converter 123 to obtain an image shift amount and reliability information (two image coincidence, two images). Steepness etc.) is calculated. In addition, a focus detection area for performing focus detection in the imaging screen is set and arranged.

撮像信号処理部124は、CDS/AGC/ADコンバータ123から出力された撮像信号をバス131を介してSDRAM136に格納する。SDRAM136に格納された画像信号は、バス131を介して表示制御部132によって読み出され、表示部133に表示される。また、撮像信号の記録を行う動作モードでは、SDRAM136に格納された画像信号は記録媒体制御部134によって記録媒体135に記録される。ROM137にはカメラ制御部140が実行する制御プログラム及び制御に必要な各種データ等が格納されており、フラッシュROM138には、ユーザ設定情報等の撮像装置101の動作に関する各種設定情報等が格納されている。   The imaging signal processing unit 124 stores the imaging signal output from the CDS / AGC / AD converter 123 in the SDRAM 136 via the bus 131. The image signal stored in the SDRAM 136 is read by the display control unit 132 via the bus 131 and displayed on the display unit 133. In the operation mode in which the imaging signal is recorded, the image signal stored in the SDRAM 136 is recorded on the recording medium 135 by the recording medium control unit 134. The ROM 137 stores a control program executed by the camera control unit 140 and various data necessary for the control, and the flash ROM 138 stores various setting information related to the operation of the imaging apparatus 101 such as user setting information. Yes.

顔検出部139では、SDRAM136に蓄積された画像データから公知の方法を使用して顔検出を行う。顔検出の公知技術は、顔に関する知識(肌色情報、目・鼻・口などのパーツ)を利用する方法と、ニューラルネットに代表される学習アルゴリズムにより顔検出のための識別器を構成する方法などがある。   The face detection unit 139 performs face detection from image data stored in the SDRAM 136 using a known method. Known techniques for face detection include methods that use knowledge about the face (skin color information, parts such as eyes, nose, mouth, etc.), a method of configuring a classifier for face detection by a learning algorithm represented by a neural network, etc. There is.

カメラ制御部140では、焦点検出用信号処理部125から出力されるデフォーカス量をレンズ駆動量に変換した後、レンズ制御部117に伝達し、フォーカス制御部116に伝えることで自動焦点調節を実現している。また、操作者からの指示、あるいは、一時的にSDRAM136に蓄積された画像データの画素信号の大きさに基づき、撮像素子121の蓄積時間、CDS/AGC/ADコンバータ123のゲインの設定値、タイミングジェネレータ122の設定値を決定する。   The camera control unit 140 converts the defocus amount output from the focus detection signal processing unit 125 into a lens drive amount, and then transmits the lens drive amount to the lens control unit 117 and transmits it to the focus control unit 116 to realize automatic focus adjustment. doing. Further, based on the instruction from the operator or the magnitude of the pixel signal of the image data temporarily accumulated in the SDRAM 136, the accumulation time of the image sensor 121, the gain setting value of the CDS / AGC / AD converter 123, the timing The set value of the generator 122 is determined.

次に、焦点検出処理について、図3のフローチャートを用いて説明する。第1の実施形態における焦点検出領域は、画面全体を2次元的に等分割して設定している。このように複数の焦点検出領域を配置することで、撮像面上における距離分布情報(距離マップ)を作成することができる。S311では2次元的に配置した焦点検出領域から1つの焦点検出領域を選択する。そして、選択した焦点検出領域に対して、S312において撮像素子121から、一対の焦点検出用信号(A像、B像)を取得する。次に、S313では、S312で取得した一対の焦点検出用信号から、所定の周波数帯域の信号成分を抽出するフィルタ処理を行う。続いて、S314では、取得した一対の焦点検出用信号間の相関量を算出する相関演算を行う。相関演算は、焦点検出領域内の各走査ラインにおいてそれぞれ行う。次に、S315で、相関量から相関変化量を算出する。そしてS315で算出した相関変化量に基づいて、S316においてA像、B像の2像の像ずれ量を算出し、続いてS317において信頼性情報(二像一致度、二像急峻度等)を算出する。   Next, focus detection processing will be described using the flowchart of FIG. The focus detection area in the first embodiment is set by equally dividing the entire screen two-dimensionally. By arranging a plurality of focus detection areas in this way, distance distribution information (distance map) on the imaging surface can be created. In S311, one focus detection area is selected from the two-dimensionally arranged focus detection areas. In step S312, a pair of focus detection signals (A image and B image) are acquired from the image sensor 121 for the selected focus detection region. Next, in S313, filter processing for extracting a signal component in a predetermined frequency band from the pair of focus detection signals acquired in S312 is performed. Subsequently, in S314, a correlation calculation for calculating a correlation amount between the acquired pair of focus detection signals is performed. The correlation calculation is performed for each scanning line in the focus detection area. Next, in S315, a correlation change amount is calculated from the correlation amount. Then, based on the correlation change amount calculated in S315, an image shift amount between the A image and the B image is calculated in S316, and then reliability information (two image coincidence, two image steepness, etc.) is calculated in S317. calculate.

S311からS317までの処理は配置されたすべての焦点検出領域に対して施し、S318ですべての焦点検出領域に対して処理を終えたと判断すると、S319に進む。最後に、S319で算出した2像の像ずれ量に所定の換算係数を乗算することでデフォーカス量を算出する。ただし、信頼性が閾値以下の場合は焦点検出の精度が低いことが想定されため、信頼性が閾値以下の焦点検出領域で算出したデフォーカス量は使用しない。この時、カメラ制御部140は、撮像装置101、または撮影レンズ111が持つ、自動焦点検出に使用するパラメータ情報を取得する。撮影パラメータとは、撮影レンズ111内の絞り113の絞り情報や、撮像装置101内の撮像素子121にかかっているセンサゲインなどをはじめとした情報であり、本実施形態の構成に依らず、撮像装置101の構成に応じて必要な情報を適宜取得すれば良い。このカメラパラメータに基づいて、焦点検出用信号処理部125での信号生成に係る処理や、焦点検出を行う領域が設定できるように、カメラ制御部140は情報を提供する。   The processing from S311 to S317 is performed on all the focus detection areas arranged, and if it is determined in S318 that the processing has been completed for all focus detection areas, the process proceeds to S319. Finally, the defocus amount is calculated by multiplying the image shift amount of the two images calculated in S319 by a predetermined conversion coefficient. However, since the accuracy of focus detection is assumed to be low when the reliability is equal to or lower than the threshold, the defocus amount calculated in the focus detection area whose reliability is equal to or lower than the threshold is not used. At this time, the camera control unit 140 acquires parameter information used for automatic focus detection possessed by the imaging apparatus 101 or the photographing lens 111. The imaging parameters are information including aperture information of the aperture 113 in the imaging lens 111 and sensor gain applied to the imaging device 121 in the imaging apparatus 101. The imaging parameters are not dependent on the configuration of the present embodiment. What is necessary is just to acquire necessary information according to the configuration of the apparatus 101 as appropriate. Based on the camera parameters, the camera control unit 140 provides information so that processing related to signal generation in the focus detection signal processing unit 125 and a region for focus detection can be set.

次に上述した焦点検出処理の詳細について、図4から図7を用いて更に説明する。図4は、焦点検出処理において撮像素子121の画素アレイ401上での焦点検出領域402の一例を示している。焦点検出領域402の両側のシフト領域403は、相関演算に必要な領域である。このため、焦点検出領域402とシフト領域403とを合わせた領域404が相関演算に必要な画素領域である。図中のp,q,s,tはそれぞれ、水平方向(x軸方向)での座標を表し、pとqはそれぞれ領域404の始点と終点のx座標を、sとtはそれぞれ焦点検出領域402の始点と終点のx座標を示している。   Next, details of the focus detection process described above will be further described with reference to FIGS. FIG. 4 shows an example of the focus detection area 402 on the pixel array 401 of the image sensor 121 in the focus detection process. The shift areas 403 on both sides of the focus detection area 402 are areas necessary for correlation calculation. For this reason, a region 404 obtained by combining the focus detection region 402 and the shift region 403 is a pixel region necessary for the correlation calculation. In the figure, p, q, s, and t represent coordinates in the horizontal direction (x-axis direction), p and q represent the x-coordinates of the start point and end point of the area 404, and s and t represent the focus detection areas The x coordinate of the start point and end point of 402 is shown.

図5は、フィルタ処理を行った焦点検出用の一対の像信号の例を示す。実線501はA像のA像信号を示し、破線502はB像のB像信号を示す。図5(a)はシフト前の像信号501,502を示し、図5(b),(c)はそれぞれ、A像信号501とB像信号502を図5(a)の状態からプラス方向およびマイナス方向にシフトした状態を示している。一対の像信号501,502の相関量を算出する際には、像信号501,502の両方を矢印の方向に1ビットずつシフトする。   FIG. 5 shows an example of a pair of image signals for focus detection subjected to filtering. A solid line 501 indicates the A image signal of the A image, and a broken line 502 indicates the B image signal of the B image. 5A shows the image signals 501 and 502 before the shift, and FIGS. 5B and 5C show the A image signal 501 and the B image signal 502 in the plus direction from the state of FIG. The state shifted in the minus direction is shown. When calculating the correlation amount between the pair of image signals 501 and 502, both the image signals 501 and 502 are shifted one bit at a time in the direction of the arrow.

次に、相関量CORの算出方法について説明する。まず、図5(b)及び(c)に示すように、A像信号501とB像信号502をそれぞれ1ビットずつシフトして、各シフト位置でのA像信号501とB像信号502との差の絶対値の和を算出する。シフト数をiとし、最小シフト量をp−sとし、最大シフト量をq−tとし、xを焦点検出領域402の開始座標、yを焦点検出領域402の終了座標とすると、相関量CORは以下の式(1)によって算出することができる。   Next, a method for calculating the correlation amount COR will be described. First, as shown in FIGS. 5B and 5C, the A image signal 501 and the B image signal 502 are each shifted by 1 bit, and the A image signal 501 and the B image signal 502 at each shift position are shifted. Calculate the sum of absolute differences. When the number of shifts is i, the minimum shift amount is p−s, the maximum shift amount is q−t, x is the start coordinate of the focus detection region 402, and y is the end coordinate of the focus detection region 402, the correlation amount COR is It can be calculated by the following equation (1).

Figure 2018017876
Figure 2018017876

図6(a)は、相関量の変化の一例を示した図であり、グラフの横軸はシフト量、縦軸は相関量を示す。相関量波形601において、602、603は極値周辺を示している。ここでは、シフト量とともに変化する相関量601における極値付近602,603のうち、より小さい相関量に対応するシフト量においてA像信号501とB像信号502の一致度が最も高くなる。   FIG. 6A is a diagram illustrating an example of a change in the correlation amount, where the horizontal axis of the graph indicates the shift amount and the vertical axis indicates the correlation amount. In the correlation amount waveform 601, reference numerals 602 and 603 indicate the vicinity of the extreme value. Here, the degree of coincidence between the A image signal 501 and the B image signal 502 becomes the highest in the shift amount corresponding to a smaller correlation amount among the extreme values 602 and 603 in the correlation amount 601 that changes with the shift amount.

次に、相関変化量ΔCORの算出方法について説明する。図6(a)に示した相関量601の波形における1シフトおきの相関量の差を相関変化量として算出する。このとき、シフト量をiとし、最小シフト量をp−s、最大シフト量をq−tとすると、相関変化量ΔCORは以下の式(2)によって算出することができる。   Next, a method for calculating the correlation change amount ΔCOR will be described. The difference in the correlation amount at every other shift in the waveform of the correlation amount 601 shown in FIG. 6A is calculated as the correlation change amount. At this time, assuming that the shift amount is i, the minimum shift amount is ps, and the maximum shift amount is qt, the correlation change amount ΔCOR can be calculated by the following equation (2).

Figure 2018017876
Figure 2018017876

図6(b)は、シフト量と相関変化量ΔCORとの関係の例を示している。グラフの横軸はシフト量を示し、縦軸は相関変化量を示す。シフト量とともに変化する相関変化量604は、605、606の周辺でプラスからマイナスになる。この605、606において相関変化量604が0となる状態をゼロクロスと呼び、A像信号501とB像信号502の一致度が最も高くなる。したがって、ゼロクロスを与えるシフト量が像ずれ量となる。   FIG. 6B shows an example of the relationship between the shift amount and the correlation change amount ΔCOR. The horizontal axis of the graph indicates the shift amount, and the vertical axis indicates the correlation change amount. The correlation change amount 604 that changes with the shift amount changes from positive to negative around 605 and 606. A state in which the correlation change amount 604 is 0 at 605 and 606 is called zero crossing, and the degree of coincidence between the A image signal 501 and the B image signal 502 is the highest. Therefore, the shift amount giving the zero cross becomes the image shift amount.

図7(a)は、図6(b)中の部分605を拡大したもので、607は相関変化量604の一部分である。この図7(a)を用いて、像ずれ量PRDの算出方法について説明する。ゼロクロスを与えるシフト量(k−1+α)は、整数部分βと小数部分αとに分けられる。小数部分αは、図7(a)の三角形ABCと三角形ADEとの相似の関係から、以下の式(3)によって算出することができる。   FIG. 7A is an enlarged view of the portion 605 in FIG. 6B, and 607 is a part of the correlation change amount 604. A method of calculating the image shift amount PRD will be described with reference to FIG. The shift amount (k−1 + α) giving the zero cross is divided into an integer part β and a decimal part α. The decimal part α can be calculated by the following equation (3) from the similar relationship between the triangle ABC and the triangle ADE in FIG.

Figure 2018017876
一方、整数部分βは、図7(a)から以下の式(4)によって算出することができる。
β=k−1 …(4)
以上のようにして得られたαとβの和から、像ずれ量PRDを算出することができる。
Figure 2018017876
On the other hand, the integer part β can be calculated by the following equation (4) from FIG.
β = k−1 (4)
The image shift amount PRD can be calculated from the sum of α and β obtained as described above.

また、図6(b)に示したように相関変化量604のゼロクロスが複数存在する場合は、その付近での相関変化量604の変化の急峻性がより大きい方を第1のゼロクロスとする。この急峻性は焦点検出の行い易さを示す指標であり、値が大きいほど精度良い焦点検出を行い易い点であることを示す。急峻性maxderは、以下の式(5)によって算出することができる。   Also, as shown in FIG. 6B, when there are a plurality of zero crossings of the correlation change amount 604, the one with the larger steepness of the change of the correlation change amount 604 in the vicinity thereof is set as the first zero cross. This steepness is an index indicating the ease of focus detection, and the larger the value, the easier the focus detection is. The steepness maxder can be calculated by the following equation (5).

Figure 2018017876
このように、第1の実施形態では、相関変化量のゼロクロスが複数存在する場合は、その急峻性によって第1のゼロクロスを決定し、この第1のゼロクロスを与えるシフト量を像ずれ量とする。
Figure 2018017876
As described above, in the first embodiment, when there are a plurality of correlation change amount zero crosses, the first zero cross is determined based on the steepness, and the shift amount giving the first zero cross is set as the image shift amount. .

次に、像ずれ量の信頼性の算出方法について説明する。像ずれ量の信頼性は、A像信号とB像信号の一致度fnclvl(以下、「2像一致度」と呼ぶ。)と上述した相関変化量の急峻性によって定義することができる。2像一致度は、像ずれ量の精度を表す指標であり、本実施形態における相関演算手法ではその値が小さいほど精度が良いことを示す。   Next, a method for calculating the reliability of the image shift amount will be described. The reliability of the image shift amount can be defined by the matching degree fnclvl (hereinafter referred to as “two-image matching degree”) of the A image signal and the B image signal and the steepness of the correlation change amount described above. The degree of coincidence of two images is an index representing the accuracy of the image shift amount. In the correlation calculation method in the present embodiment, the smaller the value, the better the accuracy.

図7(b)には、図6(a)中の602で示した部分を拡大したもので、608は相関量601の一部分である。2像一致度fnclvlは、以下の式(6)によって算出することができる。   FIG. 7B is an enlarged view of the portion indicated by 602 in FIG. 6A, and 608 is a part of the correlation amount 601. The two-image coincidence degree fnclvl can be calculated by the following equation (6).

Figure 2018017876
Figure 2018017876

次に、撮像装置101の動作について、図8から図12のフローチャートを用いて説明する。図8は、撮像装置101の撮影処理の手順を示すフローチャートである。撮影処理が開示されると、S801において初期化処理を行い、S802に進む。S802では、撮影モードが動画撮影モードか静止画撮影モードかの判定を行い、動画撮影モードである場合はS803へ進んで動画撮影処理を行い、静止画撮影モードである場合はS804へ進んで静止撮影処理を行って、S805へ進む。なお、S804で行う静止画撮影処理については、詳細に後述する。   Next, the operation of the imaging apparatus 101 will be described using the flowcharts of FIGS. FIG. 8 is a flowchart illustrating a procedure of shooting processing of the imaging apparatus 101. When the photographing process is disclosed, an initialization process is performed in S801, and the process proceeds to S802. In S802, it is determined whether the shooting mode is the movie shooting mode or the still image shooting mode. If the shooting mode is the movie shooting mode, the process proceeds to S803 to perform the movie shooting process. If the shooting mode is the still image shooting mode, the process proceeds to S804. The photographing process is performed, and the process proceeds to S805. Note that the still image shooting process performed in S804 will be described in detail later.

S805では、撮影処理が停止されていないかどうかを判断し、停止された場合は撮影処理を終了する。撮影処理が停止されたときとは、カメラの電源が切断されたときや、カメラのユーザ設定処理、撮影画像・動画の確認のための再生処理等、撮影以外の動作が行われたときである。S805で撮影処理が停止されていないと判断すると、S806に進み、撮影モードが変更されたかどうかを判断する。変更されている場合はS801へ戻り、初期化処理を行った上で、変更された撮影モードの処理を行う。変更されていない場合はS802へ戻り、現在の撮影モードでの処理を継続して行う。   In step S805, it is determined whether the shooting process has been stopped. If the shooting process has been stopped, the shooting process is terminated. The shooting process is stopped when the camera is turned off or when an operation other than shooting is performed, such as camera user setting process or playback process for checking captured images / movies. . If it is determined in step S805 that the shooting process has not been stopped, the process advances to step S806 to determine whether the shooting mode has been changed. If it has been changed, the process returns to S801, and after performing initialization processing, processing for the changed shooting mode is performed. If it has not been changed, the process returns to S802, and the processing in the current shooting mode is continued.

次に、焦点検出時の主被写体の検出処理を伴う静止画撮影処理について、図9のフローチャートを用いて説明する。S901では、現在の撮影シーンにおいて、まだ主被写体を検出していない場合はS902に進む。S902では複数の被写体の位置関係を短時間で検出できる第1の設定を行う。この第1の設定では、1垂直期間で撮影レンズ111の光軸上の広い範囲においてデフォーカス量の検出が可能だが、検出する位置の精度は低い。第1の設定を行った後、S904において主被写体検出処理を行い、少なくとも1つ以上の被写体を検出し、その中から主被写体を選択する。S904の主被写体検出処理を終えると、S906に進む。   Next, still image shooting processing accompanied by main subject detection processing at the time of focus detection will be described with reference to the flowchart of FIG. In S901, if the main subject has not yet been detected in the current shooting scene, the process proceeds to S902. In step S902, a first setting that can detect the positional relationship between a plurality of subjects in a short time is performed. In this first setting, the defocus amount can be detected in a wide range on the optical axis of the photographing lens 111 in one vertical period, but the accuracy of the position to be detected is low. After performing the first setting, in step S904, main subject detection processing is performed to detect at least one subject, and a main subject is selected therefrom. When the main subject detection process in S904 is completed, the process proceeds to S906.

一方、前回までの処理で、すでに主被写体を検出している場合はS903に進み、第2の設定を行う。この第2の設定は、撮影レンズ111の光軸上でデフォーカス量を検出できる範囲は狭いが、焦点検出の精度が高いという特徴がある。第2の設定を行った後、S905に進んで精度の高い焦点検出処理を行い、主被写体に対する焦点距離を検出する。なお、S905における焦点検出処理は、図3〜図7を用いて上述したようにして行われる。焦点検出処理を終えるとS906に進む。   On the other hand, if the main subject has already been detected in the processing up to the previous time, the process proceeds to S903 and the second setting is performed. This second setting is characterized in that the range in which the defocus amount can be detected on the optical axis of the photographing lens 111 is narrow, but the focus detection accuracy is high. After performing the second setting, the process proceeds to S905, where a highly accurate focus detection process is performed, and the focal length with respect to the main subject is detected. Note that the focus detection processing in S905 is performed as described above with reference to FIGS. When the focus detection process is completed, the process proceeds to S906.

このように、第1の実施形態では、主被写体が検出済みであるかどうかに応じて、主被写体検出時と焦点検出時とで特徴が異なる2種類の設定を切り替えて、それぞれの要件に合った設定を用いた処理を行う。第1の実施形態では、撮像光学系の露光量を制御する開口絞りを互いに異なる所定の絞り値に設定することで、第1の設定と第2の設定を切り替える。なお、第1の設定と第2の設定の具体的な設定内容については、後述する。   As described above, in the first embodiment, depending on whether or not the main subject has already been detected, two types of settings with different characteristics are switched between the main subject detection and the focus detection to meet each requirement. Process using the specified settings. In the first embodiment, the first setting and the second setting are switched by setting the aperture stop that controls the exposure amount of the imaging optical system to different predetermined aperture values. The specific setting contents of the first setting and the second setting will be described later.

S906では、AF指示スイッチの判断を行う。AF指示スイッチがオンの場合は、S907に進んでAF処理を行い、焦点検出で取得したデフォーカス量と信頼性とに応じてフォーカスレンズを駆動させる。一方、S906でAF指示スイッチがオフの場合は、S908に進んで、撮影指示スイッチを確認する。S908で撮影指示スイッチがオフと判断された場合はS911に進み、合焦停止状態を解除して静止画撮影処理フローを終了する。ここで、合焦停止状態とは主被写体に対するデフォーカス量が所定値以内にあり、主被写体に焦点を合わせて撮影処理をする準備ができている状態を指す。   In step S906, the AF instruction switch is determined. If the AF instruction switch is on, the process proceeds to S907, where AF processing is performed, and the focus lens is driven according to the defocus amount and reliability acquired by focus detection. On the other hand, if the AF instruction switch is off in S906, the process proceeds to S908 to check the shooting instruction switch. If it is determined in S908 that the shooting instruction switch is off, the process proceeds to S911, the focus stop state is canceled, and the still image shooting process flow is ended. Here, the in-focus stop state refers to a state in which the defocus amount with respect to the main subject is within a predetermined value and the camera is ready to perform a shooting process while focusing on the main subject.

S908で撮影指示スイッチがオンと判断され、次のS909で合焦停止状態でないと判断された場合は、S907に進んでAF処理を行う。また、S908で撮影指示スイッチがオンと判断され、次のS909で合焦停止状態であると判断された場合は、主被写体に焦点が合っているため、S910に進んで撮影処理を行う。S910で撮影処理を終えた後は、S911で合焦停止状態を解除して静止画撮影処理を終了する。   If it is determined in step S908 that the shooting instruction switch is on and it is determined in step S909 that the in-focus state is not stopped, the process proceeds to step S907 and AF processing is performed. If it is determined in step S908 that the shooting instruction switch is on and it is determined in step S909 that the in-focus state is stopped, the main subject is in focus, and the process advances to step S910 to perform shooting processing. After completing the shooting process in S910, the focus stop state is canceled in S911, and the still image shooting process is ended.

次に、S904で行われる主被写体検出処理について、図10のフローチャートを用いて説明する。主被写体の検出は、複数の焦点検出領域で算出したデフォーカス量に応じて少なくとも1つ以上の被写体を検出し、その少なくとも1つ以上の被写体の中から1つの主被写体を選択するというフローとなっている。   Next, the main subject detection process performed in S904 will be described with reference to the flowchart of FIG. The detection of the main subject includes a flow of detecting at least one subject according to the defocus amounts calculated in the plurality of focus detection areas, and selecting one main subject from the at least one subject. It has become.

まず、S1000において、設定したすべての焦点検出領域に対して焦点検出処理を行う。なお、S1000における焦点検出処理は、S905の焦点検出処理と同様に、図3〜図7を用いて上述した通りで、S1000では各焦点検出領域における信頼性とデフォーカス量が求められる。続いて、S1001では、S1000で求められた信頼性の値が、1つ以上の焦点検出領域において閾値以上かを判断する。ここで、信頼性とは、上述したように、一対の像信号A,Bの一致度(以下、2像一致度という)fnclvlと、相関変化量の急峻性maxderで定義される値である。また、信頼性の判定に用いる閾値は、検出したデフォーカス量が、合焦近傍の所定範囲内に収まることを保障できることを示す値で定義する。S1001において、1つ以上の焦点検出領域で信頼性が閾値以上と判断した場合は、被写体までのデフォーカス量を検出できている領域が存在するので、S1002に進む。一方、すべての焦点検出領域で信頼性が閾値以上と判断されない場合は被写体を検出することができないので、主被写体検出処理のフローを終了する。   First, in S1000, focus detection processing is performed on all the set focus detection areas. The focus detection process in S1000 is the same as the focus detection process in S905 as described above with reference to FIGS. 3 to 7. In S1000, the reliability and defocus amount in each focus detection area are obtained. Subsequently, in S1001, it is determined whether the reliability value obtained in S1000 is greater than or equal to a threshold value in one or more focus detection areas. Here, as described above, the reliability is a value defined by the matching degree (hereinafter referred to as two-image matching degree) fnclvl of the pair of image signals A and B and the steepness maxder of the correlation change amount. Further, the threshold value used for the reliability determination is defined as a value indicating that the detected defocus amount can be ensured to be within a predetermined range near the in-focus state. If it is determined in S1001 that the reliability is greater than or equal to the threshold value in one or more focus detection areas, there is an area where the defocus amount up to the subject can be detected, and the process advances to S1002. On the other hand, if the reliability is not determined to be greater than or equal to the threshold value in all focus detection areas, the subject cannot be detected, and thus the main subject detection processing flow ends.

S1002では被写体検出を行う。S1002における被写体検出処理の詳細は後述するが、S1002では検出した各被写体に対して、被写体の確からしさを示す「重み合計値」が出力される。S1003において、S1002で少なくとも一つ以上の被写体を検出できたかどうかを判断し、検出できた場合は、S1004に進んでカメラレンズの光軸方向における被写体距離をSDRAM136に記録する。被写体までの距離はS1000の焦点検出処理で算出したデフォーカス量に基づいて算出する。S1005ではS1002で検出した被写体から1つの主被写体を選択する。本第1の実施形態における主被写体の選択の方法としては、被写体の確からしさを示す「重み合計値」が最大となる被写体を主被写体として選択する。   In S1002, subject detection is performed. Details of the subject detection process in S1002 will be described later. In S1002, a “total weight value” indicating the likelihood of the subject is output for each detected subject. In S1003, it is determined whether or not at least one subject has been detected in S1002. If YES in step S1002, the process advances to step S1004 to record the subject distance in the optical axis direction of the camera lens in the SDRAM 136. The distance to the subject is calculated based on the defocus amount calculated in the focus detection process in S1000. In S1005, one main subject is selected from the subjects detected in S1002. As a method of selecting the main subject in the first embodiment, the subject having the largest “weight total value” indicating the probability of the subject is selected as the main subject.

次に、S1002で行われる被写体検出処理の詳細について、図11のフローチャートを用いて説明する。本実施形態における被写体検出処理では、各焦点検出領域のデフォーカス量を比較して同等のデフォーカス量を出力した領域をかたまり(領域群)と定義する。   Next, details of the subject detection processing performed in S1002 will be described using the flowchart of FIG. In the subject detection process according to the present embodiment, a region that compares the defocus amounts of the focus detection regions and outputs an equivalent defocus amount is defined as a group (region group).

S1101では、かたまりが存在するかどうかを確認する焦点検出領域を選択する。次に、S1102において、S1101で設定した焦点検出領域のデフォーカス量と隣接する焦点検出領域のデフォーカス量とをそれぞれ比較し、デフォーカス量の差が予め決められた閾値以内である場合は1つのかたまりと見なす。なお、かたまり検出のデフォーカス量の比較は隣接する領域の比較に限定せず、他の領域と比較してよい。また、かたまりは信頼性が閾値以上で、かつ、1つ以上の焦点検出領域であれば、かたまりと見なすことができるものとする。S1101及びS1102の処理を、確認する焦点検出領域を順に変更していくことで、すべての焦点検出領域に対して処理し終えるまで繰り返し、すべての焦点検出領域に対して処理し終えると、S1103からS1104に進む。   In step S1101, a focus detection area for confirming whether there is a clump is selected. Next, in S1102, the defocus amount of the focus detection area set in S1101 is compared with the defocus amount of the adjacent focus detection area, and if the defocus amount difference is within a predetermined threshold, 1 is set. Consider it as a lump. Note that the comparison of the defocus amount for the mass detection is not limited to the comparison of adjacent regions, but may be compared with other regions. In addition, a mass can be regarded as a mass if the reliability is equal to or higher than a threshold value and one or more focus detection regions. The processing of S1101 and S1102 is repeated until the focus detection areas to be confirmed are changed in order, so that the processing is completed for all the focus detection areas. The process proceeds to S1104.

S1104ではS1101及びS1102で検出したかたまりの数Nをカウントする。かたまりの数Nが0より大きくないとS1105で判断された場合、すなわち、固まりが検出できなかった場合は、被写体検出処理を終了する。一方、S1105で、S1104でかたまりの数Nが0よりも大きい、すなわち、1つ以上のかたまりを検出した場合は、S1106に進む。S1106では、検出したかたまりの番号を示すiを0に初期化する。次にS1107において、i番目のかたまり(以下、「かたまり(i)」と記す。)に対する重み合計値を算出する。   In S1104, the number N of clusters detected in S1101 and S1102 is counted. If it is determined in S1105 that the number N of lumps is not greater than 0, that is, if no lumps are detected, the subject detection process is terminated. On the other hand, in S1105, if the number N of chunks is larger than 0 in S1104, that is, if one or more chunks are detected, the process proceeds to S1106. In S1106, i indicating the number of the detected mass is initialized to 0. Next, in S1107, a total weight value for the i-th lump (hereinafter referred to as “chunk (i)”) is calculated.

ここで、重み合計値に関して、図13を用いて詳細に説明する。図13の1301は撮像可能領域を指し、1302は配置した焦点検出領域を示す。重み合計値は、図13に示すように配置した各焦点検出領域1302に対して、ROM137に記憶された予め像高に応じて設定された重み値(各焦点検出領域内に記載している数値)を用いて算出する。この重み値を参照して、S1102の処理で検出したかたまり(i)を構成する領域の重み値の合計を計算することで、重み合計値を算出する。なお、図13の重み値は一例であり、焦点検出領域の数や重みの値は他の設定にしても良い。この重み合計値を使用することで、撮像面上の位置と被写体の大きさに応じて被写体の確からしさを数値化することができる。例えば、中央に近い被写体ほど、また、撮像可能領域に対してかたまりの大きさが大きいほど、重み合計値は大きくなる。なお、重みの設定方法は像高や大きさに応じて決定する方法に限定されるものではなく、また、検出したデフォーカス量や焦点検出領域の信頼性の値を重みに乗算させて、重み合計値を求めてもよい。   Here, the total weight value will be described in detail with reference to FIG. Reference numeral 1301 in FIG. 13 denotes an imageable area, and reference numeral 1302 denotes the arranged focus detection area. The total weight value is a weight value set in advance according to the image height stored in the ROM 137 for each focus detection area 1302 arranged as shown in FIG. 13 (a numerical value described in each focus detection area). ) To calculate. The total weight value is calculated by referring to the weight value and calculating the sum of the weight values of the areas constituting the cluster (i) detected in the processing of S1102. Note that the weight values in FIG. 13 are examples, and the number of focus detection areas and the weight values may be set to other settings. By using this total weight value, the probability of the subject can be quantified according to the position on the imaging surface and the size of the subject. For example, the weight sum value increases as the subject is closer to the center and as the size of the mass with respect to the imageable area is larger. Note that the weight setting method is not limited to the method of determining according to the image height or size, and the weight is multiplied by the detected defocus amount or the reliability value of the focus detection area. The total value may be obtained.

S1108において、かたまり(i)の重み合計値が閾値以上と判断した場合はS1109に進み、かたまり(i)を被写体と見なす。一方、かたまり(i)の重み合計値が閾値より小さいと判断した場合はS1110に進み、かたまり(i)を被写体と見なさないものとする。重み合計値の閾値は、露光条件や各焦点検出領域の重み設定に応じた閾値をROM137に予め記憶しておく。かたまり(i)が被写体かどうか判断すると、S1111でiを1インクリメントして次のかたまり(i)の処理に進む。S1107からS1111までの処理を、かたまりの個数であるN回繰り返し、被写体判定をN回終了すると、S1112を抜けて被写体検出処理を終了する。   If it is determined in S1108 that the total weight value of the chunk (i) is equal to or greater than the threshold value, the process proceeds to S1109, and the chunk (i) is regarded as a subject. On the other hand, if it is determined that the total weight value of the chunk (i) is smaller than the threshold value, the process proceeds to S1110, and the chunk (i) is not regarded as a subject. As the threshold value of the total weight value, a threshold value corresponding to the exposure condition and the weight setting of each focus detection area is stored in the ROM 137 in advance. If it is determined whether the chunk (i) is a subject, i is incremented by 1 in S1111 and the process proceeds to the next chunk (i). When the processing from S1107 to S1111 is repeated N times, which is the number of clusters, and the subject determination is completed N times, the processing exits from S1112 and ends the subject detection processing.

次に、図9のS907で行われるAF処理に関して、図12のフローチャートを用いて詳細に説明する。S1201では、現在主被写体に対するデフォーカス量が所定値以内で合焦停止状態であるかどうかを判断する。主被写体に対するデフォーカス量が所定の範囲外で合焦停止状態ではない場合はS1201からS1202に進む。一方、主被写体に対するデフォーカス量が所定値以内で合焦停止状態と判断した場合は、S1203に進んで合焦停止状態を保持したまま、AF処理を終了する。   Next, the AF process performed in S907 of FIG. 9 will be described in detail using the flowchart of FIG. In step S1201, it is determined whether the defocus amount with respect to the current main subject is within a predetermined value and the focus is stopped. When the defocus amount with respect to the main subject is outside the predetermined range and the focus is not stopped, the process proceeds from S1201 to S1202. On the other hand, when it is determined that the in-focus state is within a predetermined value of the defocus amount with respect to the main subject, the process proceeds to S1203 and the AF process is terminated while the in-focus state is maintained.

S1202では、1つ以上の焦点検出領域で信頼性が閾値以上であるかどうかを判断する。1つ以上の焦点検出領域で信頼性が閾値以上であると判断した場合はS1204に進む。一方、S1202で、1つ以上の焦点検出領域で信頼性が閾値以上ではないと判断した場合は、S1205に進み、フォーカスレンズ114を無限遠に移動させてAF処理を終了する。無限遠にフォーカスレンズ114を移動させることでより広範囲の被写体を探し、信頼性が閾値以上のデフォーカス量を検出できる可能性を高める。なお、S1205では、信頼性が閾値より小さくても検出したデフォーカスの方向が保障できる場合は、その方向に基づいてフォーカスレンズ114を駆動させても良い。   In S1202, it is determined whether or not the reliability is greater than or equal to a threshold in one or more focus detection areas. If it is determined that the reliability is greater than or equal to the threshold in one or more focus detection areas, the process advances to step S1204. On the other hand, if it is determined in S1202 that the reliability is not greater than or equal to the threshold value in one or more focus detection areas, the process proceeds to S1205, the focus lens 114 is moved to infinity, and the AF process ends. By moving the focus lens 114 to infinity, it is possible to search for a wider range of subjects and increase the possibility of detecting a defocus amount whose reliability is equal to or greater than a threshold value. In S1205, if the detected defocus direction can be ensured even if the reliability is smaller than the threshold, the focus lens 114 may be driven based on that direction.

一方、S1204では、図11の被写体検出処理において、1つ以上の被写体を検出することができたかを判断する。1つ以上の被写体を検出できている場合は、図10のS1005で主被写体を選択しているので、S1206で主被写体のデフォーカス量を取得する。この時、主被写体のデフォーカス量として、例えば、主被写体に含まれる焦点検出領域のデフォーカス量の平均値を使用する。なお、主被写体のデフォーカス量は平均値に限定されることはなく、主被写体領域の重心位置を含む焦点検出領域のデフォーカス量を使用しても良い。S1204で1つ以上の被写体を検出できなかったと判断した場合は、S1207に進み、信頼性が閾値以上の焦点検出領域のうち、重み合計値が最も大きい焦点検出領域のデフォーカス量に応じてフォーカスレンズを駆動させて、AF処理を終了する。   On the other hand, in S1204, it is determined whether one or more subjects could be detected in the subject detection process of FIG. If one or more subjects can be detected, the main subject is selected in S1005 of FIG. 10, and thus the defocus amount of the main subject is acquired in S1206. At this time, as the defocus amount of the main subject, for example, an average value of the defocus amounts of the focus detection areas included in the main subject is used. The defocus amount of the main subject is not limited to the average value, and the defocus amount of the focus detection region including the center of gravity position of the main subject region may be used. If it is determined in S1204 that one or more subjects could not be detected, the process proceeds to S1207, and the focus is determined according to the defocus amount of the focus detection area having the largest weight total value among the focus detection areas whose reliability is equal to or greater than the threshold. The lens is driven and the AF process is terminated.

次に、S1208において、S1206で取得した主被写体のデフォーカス量の大きさが閾値以内にあるかどうかを判断する。この閾値は、主被写体に焦点が合っており、撮影できる状態にあるかどうかを判断するための閾値であり、1深度を閾値とする。なお、シーンに応じて閾値を変更してもよい。S1208で主被写体のデフォーカス量が閾値以内であると判断した場合は、S1209に進んで合焦停止状態へ移行してAF処理を終了する。一方、主被写体のデフォーカス量が閾値の範囲外にある場合は、S1210へ進み、フォーカスレンズ114の駆動速度の設定を行う。フォーカスレンズ114の駆動速度は、主被写体の重み合計値と第2の設定に応じて切り替えるが、詳細については後述する。そして、主被写体のデフォーカス量に応じて、S1211でフォーカスレンズ114を駆動し、AF処理を終了する。   Next, in S1208, it is determined whether the defocus amount of the main subject acquired in S1206 is within a threshold value. This threshold value is a threshold value for determining whether or not the main subject is in focus and is ready for photographing, and one depth is set as a threshold value. The threshold value may be changed according to the scene. If it is determined in step S1208 that the defocus amount of the main subject is within the threshold value, the process proceeds to step S1209 to shift to a focus stop state, and the AF process ends. On the other hand, if the defocus amount of the main subject is outside the threshold range, the process proceeds to S1210, and the drive speed of the focus lens 114 is set. The driving speed of the focus lens 114 is switched in accordance with the total weight of the main subject and the second setting, details of which will be described later. Then, in step S1211, the focus lens 114 is driven according to the defocus amount of the main subject, and the AF process ends.

次に、主被写体の検出からAF処理までの動作に関して、図14から図18を用いて実際のシーンを想定して説明する。ここでは、図14に示すように被写体A1401と被写体B1402の2つの被写体が存在するシーンに対して、複数の焦点検出領域1302を配置した場合の主被写体の検出方法について説明する。   Next, operations from detection of the main subject to AF processing will be described assuming an actual scene with reference to FIGS. Here, a main subject detection method in the case where a plurality of focus detection areas 1302 are arranged in a scene in which two subjects, that is, a subject A1401 and a subject B1402, as shown in FIG. 14 will be described.

最初は、主被写体を検出していない状態なので、第1の設定にする。第1の設定では、絞り113を開放絞りを除く絞り値に設定する。ここで、第1の設定の詳細について図15を用いて説明する。図15は、撮像装置101と被写体A1401と被写体B1402と被写界の合焦位置1501との光軸方向の位置関係を模式的に示したものである。1502は第1の設定でデフォーカス量を検出できる範囲、1503は第2の設定でデフォーカス量を検出できる範囲で、1504と1505はそれぞれ被写体Aと被写体Bのデフォーカス量を示している。   Since the main subject is not detected at first, the first setting is used. In the first setting, the aperture 113 is set to an aperture value excluding the wide aperture. Details of the first setting will be described with reference to FIG. FIG. 15 schematically illustrates the positional relationship in the optical axis direction among the imaging apparatus 101, the subject A1401, the subject B1402, and the in-focus position 1501 of the object scene. 1502 is a range in which the defocus amount can be detected with the first setting, 1503 is a range in which the defocus amount can be detected with the second setting, and 1504 and 1505 indicate the defocus amounts of subject A and subject B, respectively.

第1の設定の検出範囲1502は、絞り113を開放側と反対側(小絞り側)に設定することで広くすることができる。その理由を図16を用いて説明する。図16(a)は像ボケが小さい(コントラスト値が大きい)被写体のA像1601とB像1602を示し、図16(b)は像ボケが大きい被写体のA像1601とB像1602を示している。絞り113を小絞り側に設定することで被写界深度が深くなり、広範囲の被写体に対する像ボケ量を軽減することができるため、広範囲の被写体に対して図16(a)のような波形を取得することができる。そのため、相関演算の際に像一致度や急峻性が高くなり、信頼性が高いデフォーカス量を検出することができる。図16(a)に比べて図16(b)のA像とB像の形状は非対称で、かつ、エッジも立っていないため、焦点検出の処理において2像のずれ量1604を検出することが難しいことがわかる。   The detection range 1502 of the first setting can be widened by setting the diaphragm 113 on the side opposite to the open side (small diaphragm side). The reason will be described with reference to FIG. FIG. 16A shows an A image 1601 and a B image 1602 of a subject with small image blur (high contrast value), and FIG. 16B shows an A image 1601 and a B image 1602 of a subject with large image blur. Yes. By setting the aperture 113 to the small aperture side, the depth of field is deepened and the amount of image blur for a wide range of subjects can be reduced. Therefore, a waveform as shown in FIG. Can be acquired. Therefore, the degree of image coincidence and steepness are increased during correlation calculation, and a defocus amount with high reliability can be detected. Compared to FIG. 16A, the shapes of the A image and the B image in FIG. 16B are asymmetric and have no edges, so that the shift amount 1604 between the two images can be detected in the focus detection process. I find it difficult.

このように絞り113に小絞り側の絞り値を設定することで、広範囲の被写体を検出することができる。しかしながら、像ずれ量の検出誤差によるデフォーカス量の誤差が大きいというデメリットもある。このデメリットはデフォーカス量を算出する際に像ずれ量に乗算する変換係数が大きいことに起因している。これはデフォーカス量に対する像ずれ量の敏感度が大きいことを意味するので、像ずれ量1603の少量の検出誤差が大きなデフォーカス量の検出誤差となって出力される。このようなデメリットはあるが、第1の設定に対する要件は検出精度ではなく、より多くの被写体のデフォーカス量を検出できることであるため、開口絞りを小絞り側に設定する。なお、第1の設定で用いる絞り値は予めROM137に書き込んでおいても良いし、ユーザが設定できるようにしても良い。   By setting the aperture value on the small aperture side in the aperture 113 in this way, a wide range of subjects can be detected. However, there is a demerit that a defocus amount error due to an image shift amount detection error is large. This demerit is caused by a large conversion coefficient that is multiplied by the image shift amount when calculating the defocus amount. This means that the sensitivity of the image shift amount with respect to the defocus amount is large. Therefore, a small detection error of the image shift amount 1603 is output as a large defocus amount detection error. Although there is such a demerit, the requirement for the first setting is not the detection accuracy but the ability to detect the defocus amount of more subjects, so the aperture stop is set to the small stop side. The aperture value used for the first setting may be written in the ROM 137 in advance or may be set by the user.

図17は、図14のシーンにおける各焦点検出領域1302に対して、第1の設定を用いてデフォーカス量を算出した結果を示す。図17では説明の都合上、各焦点検出領域1302のデフォーカス量を各焦点検出領域1302内に文字と記号で表示している。ここで、同じ文字(A,B)が書かれている焦点検出領域1302は、図11のS1102でデフォーカス量を比較した結果、その差が閾値以内である領域である。×が書かれている焦点検出領域1302は信頼性が閾値よりも低く、デフォーカス量を検出できなかった領域である。デフォーカス量の結果から検出したかたまりが、かたまりA1701とかたまりB1702である。   FIG. 17 shows the result of calculating the defocus amount using the first setting for each focus detection region 1302 in the scene of FIG. In FIG. 17, for the convenience of explanation, the defocus amount of each focus detection area 1302 is displayed in each focus detection area 1302 with characters and symbols. Here, the focus detection area 1302 in which the same character (A, B) is written is an area where the difference is within a threshold as a result of comparing the defocus amounts in S1102 of FIG. A focus detection area 1302 in which “x” is written is an area in which the reliability is lower than the threshold and the defocus amount cannot be detected. The clusters detected from the result of the defocus amount are the cluster A1701 and the cluster B1702.

そして、検出したかたまり毎に、各かたまりに含まれる焦点検出領域1302と図13の重みを対応付け、かたまりA1701とかたまりB1702の重み合計値を算出する。その結果、かたまりA1701の重み合計値は34(=4+8+4+2+4+4+2+2+2+2)、かたまりB1702の重み合計値は12(=1+2+2+1+2+4)となる。被写体と見なすための重み合計値の閾値を、例えば8と設定していた場合、かたまりA1701とかたまりB1702をどちらも被写体と見なすことができ、被写体A1401と被写体B1402を検出することができる。また、被写体A1401の重み合計値の方が高いことから、被写体A1401を主被写体とする。   Then, for each detected cluster, the focus detection area 1302 included in each cluster is associated with the weight in FIG. 13, and the total weight value of the cluster A 1701 and the cluster B 1702 is calculated. As a result, the total weight value of the mass A1701 is 34 (= 4 + 8 + 4 + 2 + 4 + 4 + 2 + 2 + 2 + 2), and the total weight value of the mass B1702 is 12 (= 1 + 2 + 2 + 1 + 2 + 4). When the threshold value of the total weight value for considering the subject is set to 8, for example, both the chunk A1701 and the chunk B1702 can be regarded as subjects, and the subject A1401 and the subject B1402 can be detected. Since the total weight value of the subject A1401 is higher, the subject A1401 is set as the main subject.

なお、重み合計値によって検出した主被写体1401とは別に、図18のように顔検出部139で検出した顔1801が存在する場合、重み合計値によって検出した被写体1401ではなく、顔1801を主被写体としても良い。また、複数の顔を主被写体と見なして、主被写体である複数の顔が被写界深度に入るように開口絞りを設定し、合焦駆動させても良い。   When the face 1801 detected by the face detection unit 139 exists as shown in FIG. 18 apart from the main subject 1401 detected by the total weight value, the face 1801 is not the main subject 1401 detected by the total weight value. It is also good. Alternatively, the plurality of faces may be regarded as the main subject, the aperture stop may be set so that the plurality of faces as the main subject enter the depth of field, and the focus driving may be performed.

上述した処理で主被写体1401を検出できたので、次に絞り113を第2の設定にして焦点検出処理を行う。第2の設定の絞り値は第1の設定よりも開放側の絞り値を設定する。その理由は、第2の設定では、主被写体に焦点を合わせることが目的であり、デフォーカス量を検出できる範囲よりもデフォーカス量の精度が要求されるためである。開放側の絞り値を設定すると被写界深度が浅くなるため、被写界深度から外れた位置にある被写体の像ボケ量が急激に大きくなる。これにより、図16(a)に示すような波形を取得することができる被写体の範囲が狭くなるため、像ずれ量の検出誤差を小さくすることができ、デフォーカス量の検出精度を上げることができる。   Since the main subject 1401 has been detected by the processing described above, the focus detection processing is performed with the aperture 113 set to the second setting. The aperture value of the second setting is set to an aperture value that is closer to the open side than the first setting. The reason is that, in the second setting, the purpose is to focus on the main subject, and the accuracy of the defocus amount is required more than the range in which the defocus amount can be detected. When the aperture value on the open side is set, the depth of field becomes shallow, so that the amount of image blur of a subject at a position outside the depth of field increases rapidly. As a result, the range of the subject from which the waveform as shown in FIG. 16A can be acquired is narrowed, so that the detection error of the image shift amount can be reduced and the detection accuracy of the defocus amount can be increased. it can.

第2の設定の絞り値は、図15の範囲1503に示すように、主被写体1401の位置+αが被写界深度に入る絞り値に設定する。この絞り値に設定することで被写体1402の位置は検出できなくなるが、図10のS1004でSDRAM136に被写体位置を記録しているため、第2の設定では他の被写体を検出する必要は無い。   The aperture value of the second setting is set to an aperture value at which the position + α of the main subject 1401 falls within the depth of field, as indicated by a range 1503 in FIG. Setting the aperture value makes it impossible to detect the position of the subject 1402, but since the subject position is recorded in the SDRAM 136 in S1004 of FIG. 10, it is not necessary to detect another subject in the second setting.

次に、図12のAF処理に沿って主被写体1401に焦点を合わせる。この時、主被写体1401に対してAF処理を行うと、デフォーカス量は徐々に小さくなっていくのでデフォーカス量の大きさに応じて随時絞りを開放側に設定し直して、検出精度を高めても良い。この時、図12のS1210のフォーカスレンズ駆動の設定は、下記の式(7)で算出することができる評価値に応じて設定する。
評価値=主被写体の重み合計値÷第2の設定の絞り値 …(7)
この評価値が高い時は、被写体検出と検出したデフォーカス量の信頼精度が高いため、フォーカスレンズ114の駆動速度を高くし、短時間で合焦位置に移動するようにする。逆に評価値が低い時は検出したデフォーカス量よりも小さい値でフォーカスレンズ114を駆動させることで、徐々に合焦近傍に追い込み、合焦の精度を高める。
Next, the main subject 1401 is focused along the AF process of FIG. At this time, if AF processing is performed on the main subject 1401, the defocus amount gradually decreases. Therefore, the aperture is reset to the open side as needed according to the size of the defocus amount to improve detection accuracy. May be. At this time, the focus lens drive setting in S1210 of FIG. 12 is set according to the evaluation value that can be calculated by the following equation (7).
Evaluation value = Total weight of main subject / Aperture value of second setting (7)
When this evaluation value is high, the reliability of the subject detection and the detected defocus amount is high, so the drive speed of the focus lens 114 is increased and the focus lens 114 is moved to the in-focus position in a short time. On the contrary, when the evaluation value is low, the focus lens 114 is driven with a value smaller than the detected defocus amount, so that the focus lens is gradually driven close to the focus and the focus accuracy is improved.

以上のように、主被写体の他に、画面内にある複数の被写体の位置やデフォーカス量も取得し、記憶しているので、主被写体に焦点を合わせた後も、主被写体以外の被写体の情報を用いて撮影を行うことができる。例えば、任意の被写体が被写界深度に入るように開口絞りを制御したり、ユーザが選択した被写体に応じてホワイトバランスなどを変更させたりしても良い。   As described above, in addition to the main subject, the positions and defocus amounts of a plurality of subjects in the screen are also acquired and stored, so even after focusing on the main subject, Shooting can be performed using the information. For example, the aperture stop may be controlled so that an arbitrary subject enters the depth of field, or the white balance may be changed according to the subject selected by the user.

上記の通り第1の実施形態によれば、最初に第1の設定で広範囲にある複数の被写体の位置を短時間で取得して主被写体を選び、第2の設定に切り替えて主被写体に精度よく焦点を合わせることができる。   As described above, according to the first embodiment, first, the main setting is obtained by acquiring the positions of a plurality of subjects in a wide range in the first setting in a short time, and the main setting is selected by switching to the second setting. Can focus well.

<第2の実施形態>
以下、本発明の第2の実施形態について説明する。第2の実施形態と第1の実施形態とでは、図9のS902及びS903で設定される第1の設定と第2の設定で設定を変更する対象が異なる。それ以外の処理内容および撮像装置の構成は、第1の実施形態で説明したものと同様であるので、説明を省略する。
<Second Embodiment>
Hereinafter, a second embodiment of the present invention will be described. In the second embodiment and the first embodiment, the target for changing the setting is different between the first setting and the second setting set in S902 and S903 in FIG. Since other processing contents and the configuration of the imaging apparatus are the same as those described in the first embodiment, the description thereof is omitted.

第2の実施形態では、図3のS314で行われる2像の像信号間の相関量の算出におけるパラメータを、第1の設定と第2の設定において切り替える。第1の実施形態の図5で説明した通り、相関演算ではA像とB像をシフトさせて、その差を相関量として算出している。この時に1回でシフトする幅(シフト幅[ビット])及びシフトする距離(シフト範囲[ビット])を、第1の設定と第2の設定で切り替える。   In the second embodiment, the parameter for calculating the correlation amount between the two image signals performed in S314 of FIG. 3 is switched between the first setting and the second setting. As described in FIG. 5 of the first embodiment, in the correlation calculation, the A image and the B image are shifted and the difference is calculated as the correlation amount. At this time, the shift width (shift width [bit]) and the shift distance (shift range [bit]) are switched between the first setting and the second setting.

第2の実施形態における第1の設定と第2の設定について、図19を用いて詳細に説明する。まず第1の設定(S902)では、第1の実施形態で述べた通り、広範囲における多くの被写体を短時間で検出することが要件である。相関演算におけるシフト範囲の広さはデフォーカス量を検出できる範囲に比例するため、シフト範囲を広げることでより広範囲のデフォーカス量を検出することが可能となる。ただし、短時間で検出することも要件の一つであるため、シフト幅を大きくして全体の演算時間を短縮している。   The first setting and the second setting in the second embodiment will be described in detail with reference to FIG. First, in the first setting (S902), as described in the first embodiment, it is necessary to detect many subjects in a wide range in a short time. Since the width of the shift range in the correlation calculation is proportional to the range in which the defocus amount can be detected, a wider range of defocus amounts can be detected by widening the shift range. However, since it is one of the requirements to detect in a short time, the entire calculation time is shortened by increasing the shift width.

次に、第2の設定(S903)では、第1の実施形態で述べた通り、主被写体に対する焦点検出精度が求められる。したがって、第1の設定で検出した主被写体を含む焦点検出領域に対してはシフト幅を小さくすることで2像のずれ量を検出する精度を高めている。しかし、第1の設定と同様のシフト範囲をシフトさせようとするとシフト数が増え、演算に多くの時間を要するため、シフト範囲は狭くする。精度が上がる理由は、図7の相関変化量の横軸(シフト量)の分解能が上がることで、ゼロクロスを与えるシフト量の検出精度が向上するためである。このように第2の設定を行うことで、主被写体への焦点検出精度を高める。   Next, in the second setting (S903), as described in the first embodiment, focus detection accuracy for the main subject is obtained. Therefore, the accuracy of detecting the shift amount of the two images is increased by reducing the shift width for the focus detection area including the main subject detected in the first setting. However, if an attempt is made to shift the same shift range as in the first setting, the number of shifts increases and a long time is required for calculation, so the shift range is narrowed. The reason why the accuracy is increased is that the resolution of the horizontal axis (shift amount) of the correlation change amount in FIG. By performing the second setting in this way, focus detection accuracy for the main subject is increased.

また、第2の実施形態では、主被写体以外の焦点検出領域についても設定を新たにすることで、主被写体以外の被写体の焦点検出精度も高めることができる。その設定は、図19(a)に示すように、シフト幅は主被写体領域と同じように小さくして、シフト範囲は第1の設定と同じように広い範囲をシフトさせる設定である。この設定を行うことで広範囲において精度高くデフォーカス量を検出することができる。この設定のデメリットは相関演算に多くの時間を要することである。   In the second embodiment, the focus detection accuracy of a subject other than the main subject can be improved by newly setting the focus detection region other than the main subject. In this setting, as shown in FIG. 19A, the shift width is set to be as small as the main subject area, and the shift range is set to shift a wide range as in the first setting. By performing this setting, the defocus amount can be detected with high accuracy over a wide range. The disadvantage of this setting is that it takes a lot of time for the correlation calculation.

図20はそれぞれの焦点検出領域の処理時間を示している。2001は時間の経過を示す矢印で、左から右に処理時間が経過している。2002は撮像素子121の露光時間を表しており、2003は相関演算に使用する像データの取得時間(S312)、そして2004、2005がそれぞれ主被写体領域と主被写体以外の領域の焦点検出領域における焦点検出処理を行う時間である。このように主被写体領域に対してその他の領域は相関演算に多くの時間を要するが、主被写体以外の領域では焦点検出速度が要求されないため、図20のような処理シーケンスが成り立つ。   FIG. 20 shows the processing time of each focus detection area. 2001 is an arrow indicating the passage of time, and the processing time has passed from left to right. 2002 represents the exposure time of the image sensor 121, 2003 represents the acquisition time of image data used for correlation calculation (S312), and 2004 and 2005 represent the focal points in the focus detection area of the main subject area and the areas other than the main subject, respectively. This is the time for performing the detection process. As described above, the other areas with respect to the main subject area require much time for correlation calculation. However, since the focus detection speed is not required in the area other than the main subject, the processing sequence as shown in FIG. 20 is established.

なお、主被写体以外の被写体領域のデフォーカス量の精度が、第1の実施形態における精度と同等で良いのであれば、第2の設定を図19(b)に示すようにしても良い。   Note that the second setting may be as shown in FIG. 19B if the accuracy of the defocus amount in the subject area other than the main subject may be equal to the accuracy in the first embodiment.

上記の通り第2の実施形態によれば、第1の実施形態と同様の効果に加えて、さらに主被写体以外の被写体に対しても精度良くデフォーカス量を検出することができる。   As described above, according to the second embodiment, in addition to the same effects as those of the first embodiment, it is possible to detect the defocus amount with high accuracy for a subject other than the main subject.

<第3の実施形態>
以下、本発明の第3の実施形態について説明する。第3の実施形態と上述した第1及び第2の実施形態とでは、図9のS902及びS903で設定される第1の設定と第2の設定で設定を変更する対象が異なる。それ以外の処理内容および撮像装置の構成は、第1の実施形態で説明したものと同様であるので、説明を省略する。
<Third Embodiment>
Hereinafter, a third embodiment of the present invention will be described. In the third embodiment and the above-described first and second embodiments, the targets to be changed in the first setting and the second setting set in S902 and S903 in FIG. 9 are different. Since other processing contents and the configuration of the imaging apparatus are the same as those described in the first embodiment, the description thereof is omitted.

第3の実施形態と第1の実施形態とでは、第1の設定と第2の設定で設定を変更する対象が異なる。第3の実施形態では図3で説明した焦点検出用信号処理部125における像データに対するフィルタ処理(S313)のフィルタ特性を第1の設定と第2の設定で切り替える。この手法を用いることで、短時間で多くの被写体の位置を取得し、様々な被写体に対して精度高く焦点を合わせることができる。   In the third embodiment and the first embodiment, the objects whose settings are changed are different between the first setting and the second setting. In the third embodiment, the filter characteristic of the filter process (S313) for the image data in the focus detection signal processing unit 125 described in FIG. 3 is switched between the first setting and the second setting. By using this method, it is possible to acquire the positions of many subjects in a short time and to focus on various subjects with high accuracy.

第3の実施形態では、図3のS313で行われるフィルタ処理において使用するフィルタ特性を、第1の設定と第2の設定で切り替える。使用するフィルタの係数は予めROM137に記憶しておく。第1の設定(S902)では低域の画像周波数を持つ像信号を通過させるフィルタを設定する。被写体は合焦点から離れ、被写界深度から外れていくと像信号がぼけていく。像信号がぼけると、図16で説明した通り、二像の像一致度が低くなるため、信頼性が高いデフォーカス量を検出することができなくなる。このようにぼけた像信号に対して低域の像信号を通過させるフィルタを使用することで、精度は高くないが、被写界深度から大きく外れている被写体の位置を検出することができる。   In the third embodiment, the filter characteristics used in the filter processing performed in S313 of FIG. 3 are switched between the first setting and the second setting. The coefficient of the filter to be used is stored in the ROM 137 in advance. In the first setting (S902), a filter that passes an image signal having a low-frequency image frequency is set. As the subject moves away from the focal point and moves away from the depth of field, the image signal becomes blurred. If the image signal is blurred, the degree of image coincidence between the two images decreases as described with reference to FIG. 16, so that a highly reliable defocus amount cannot be detected. By using a filter that allows low-frequency image signals to pass through such a blurred image signal, it is possible to detect the position of a subject that is not highly accurate but greatly deviates from the depth of field.

次に第1の設定で被写体を検出した後、第2の設定では、高域の画像周波数を持つ像信号を通過させる特徴があるフィルタを使用する。高域のフィルタを使用することでコントラストの高い被写体に対して精度高く焦点を検出することができる。しかし、高域フィルタを使用すると、ぼけた画像に対してはノイズ成分などを検出しやすく誤検出しやすいというデメリットもある。そのため、第1の設定で検出した主被写体までのデフォーカス量が所定値よりも大きく、高域のフィルタでは主被写体のデフォーカス量を取得できないシーンも想定される。そのようなシーンに対しては、予め中域の画像周波数を通すフィルタをROM137に記憶しておき、高域フィルタでデフォーカス量を検出できるようになるまで、中域のフィルタを使用してデフォーカス量を検出してよい。また、デフォーカス量が所定よりも小さくても、元々コントラスト値が低い被写体に対しては低域のフィルタや中域のフィルタを使用しても良い。コントラスト値の判断は像データ取得時(S312)に、下記の式(8)及び(9)を用いてA像とB像でそれぞれ算出した評価値を使用する。   Next, after a subject is detected with the first setting, a filter having a feature of allowing an image signal having a high-frequency image frequency to pass is used with the second setting. By using a high-pass filter, it is possible to detect the focus with high accuracy for an object with high contrast. However, when a high-pass filter is used, there is a demerit that it is easy to detect a noise component or the like for a blurred image and to easily detect it. For this reason, a scene in which the defocus amount up to the main subject detected in the first setting is larger than a predetermined value and the defocus amount of the main subject cannot be acquired with a high-pass filter is assumed. For such scenes, a filter that passes the mid-range image frequency is stored in the ROM 137 in advance, and the de-focus amount is detected using the mid-range filter until the defocus amount can be detected by the high-pass filter. The focus amount may be detected. Even if the defocus amount is smaller than a predetermined value, a low-pass filter or a mid-pass filter may be used for a subject with a low contrast value. The determination of the contrast value uses evaluation values calculated respectively for the A image and the B image using the following equations (8) and (9) at the time of image data acquisition (S312).

Figure 2018017876
Figure 2018017876

Figure 2018017876
Figure 2018017876

なお、第2の設定では、主被写体の領域と主被写体以外の領域で設定を変更しても良い。例えば、主被写体領域では精度高くデフォーカス量を検出する必要があるので高域のフィルタを使用し、主被写体以外の領域では広範囲における被写体の位置を常に検出しておくために低域のフィルタを使用する。   In the second setting, the setting may be changed in the main subject area and the area other than the main subject. For example, since it is necessary to detect the defocus amount with high accuracy in the main subject region, a high-pass filter is used, and in a region other than the main subject, a low-pass filter is used to always detect the position of the subject in a wide range. use.

上記の通り第3の実施形態によれば、最初に第1の設定で広範囲にある複数の被写体の位置を短時間で取得して主被写体を選び、第2の設定に切り替えて主被写体に精度よく焦点を合わせることができる。   As described above, according to the third embodiment, first, the main setting is obtained by acquiring the positions of a plurality of subjects in a wide range in the first setting in a short time, and the main setting is selected by switching to the second setting. Can focus well.

<他の実施形態>
なお、本発明は、複数の機器から構成されるシステムに適用しても、一つの機器からなる装置に適用してもよい。
<Other embodiments>
Note that the present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device.

また、本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。   Further, the present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus execute the program. It can also be realized by a process of reading and executing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

101:撮像装置、102:撮影レンズ、113:絞り、114:フォーカスレンズ、115:絞り制御部、116:フォーカス制御部、117:レンズ制御部、121:撮像素子、124:撮像信号処理部、125:焦点検出用信号処理部、140:カメラ制御部、137:ROM、139:顔検出部   101: imaging device, 102: photographing lens, 113: aperture, 114: focus lens, 115: aperture control unit, 116: focus control unit, 117: lens control unit, 121: imaging device, 124: imaging signal processing unit, 125 : Focus detection signal processing unit, 140: camera control unit, 137: ROM, 139: face detection unit

Claims (29)

複数のマイクロレンズそれぞれに対して複数の光電変換素子を備え、撮像光学系を介して入射した被写体像を撮影して、画像信号を出力する撮像素子と、
前記撮像素子から出力された画像信号から、視差を有する一対の画像を生成して、予め決められた複数の焦点検出領域それぞれについてデフォーカス量を検出する焦点検出手段と、
前記デフォーカス量に基づいて、距離分布情報を作成する作成手段と、
前記距離分布情報および前記デフォーカス量に基づいて、焦点調節を行う焦点調節手段と、
前記作成手段により前記距離分布情報を作成する際には、前記撮像光学系に含まれる絞りを予め決められた第1の被写界深度となる第1の絞り値に設定して撮影を行い、前記焦点調節手段により焦点調節を行う際には、前記絞りを前記第1の被写界深度よりも浅い第2の被写界深度となる第2の絞り値に設定して撮影を行うように制御する制御手段と
を有することを特徴とする撮像装置。
An image sensor that includes a plurality of photoelectric conversion elements for each of a plurality of microlenses, captures an image of a subject that has entered through an imaging optical system, and outputs an image signal;
Focus detection means for generating a pair of images having parallax from the image signal output from the image sensor and detecting a defocus amount for each of a plurality of predetermined focus detection areas;
Creating means for creating distance distribution information based on the defocus amount;
Focus adjusting means for performing focus adjustment based on the distance distribution information and the defocus amount;
When creating the distance distribution information by the creating means, shooting is performed by setting the aperture included in the imaging optical system to a first aperture value that is a predetermined first depth of field, When performing the focus adjustment by the focus adjusting means, the aperture is set to a second aperture value that is a second depth of field shallower than the first depth of field, and shooting is performed. An imaging apparatus comprising: control means for controlling.
前記距離分布情報に基づいて被写体を検出し、該検出した被写体から主被写体を検出する画像処理手段を更に有することを特徴とする請求項1に記載の撮像装置。   The imaging apparatus according to claim 1, further comprising an image processing unit that detects a subject based on the distance distribution information and detects a main subject from the detected subject. 前記画像処理手段は、前記デフォーカス量の差が予め決められた閾値以内にある焦点検出領域をそれぞれ領域群としてまとめることで、被写体を検出することを特徴とする請求項2に記載の撮像装置。   The imaging apparatus according to claim 2, wherein the image processing unit detects a subject by grouping focus detection areas in which a difference in the defocus amount is within a predetermined threshold as a group of areas. . 前記複数の焦点検出領域それぞれに対して、予め決められた条件で決められた重み値を記憶した記憶手段を更に有し、
前記画像処理手段は、前記領域群それぞれについて、各領域群を構成する前記焦点検出領域の前記重み値の合計値が予め決められた閾値より大きい場合に、該領域群を被写体として判定することを特徴とする請求項3に記載の撮像装置。
For each of the plurality of focus detection areas, further comprising storage means for storing weight values determined under predetermined conditions,
The image processing means determines, for each of the region groups, the region group as a subject when a total value of the weight values of the focus detection regions constituting each region group is larger than a predetermined threshold value. The imaging apparatus according to claim 3.
前記画像処理手段は、前記被写体それぞれの前記重み値の合計値のうち、もっとも大きい合計値を有する被写体を主被写体として判定することを特徴とする請求項4に記載の撮像装置。   The imaging apparatus according to claim 4, wherein the image processing unit determines a subject having the largest total value among the total values of the weight values of the subjects as a main subject. 前記焦点調節手段は、前記主被写体に対応する焦点検出領域のデフォーカス量に基づいて、焦点調節を行うことを特徴とする請求項2乃至5のいずれか1項に記載の撮像装置。   The imaging apparatus according to claim 2, wherein the focus adjustment unit performs focus adjustment based on a defocus amount of a focus detection area corresponding to the main subject. 前記焦点検出手段は、更に、前記デフォーカス量の信頼性を検出し、
前記画像処理手段は、前記信頼性が予め決められた閾値以上のデフォーカス量を有する焦点検出領域を用いて、被写体を検出することを特徴とする請求項2乃至6のいずれか1項に記載の撮像装置。
The focus detection unit further detects the reliability of the defocus amount,
The said image processing means detects a to-be-photographed object using the focus detection area | region which has a defocus amount whose reliability is more than the predetermined threshold value, The object of any one of Claim 2 thru | or 6 characterized by the above-mentioned. Imaging device.
前記焦点調節手段は、前記複数の焦点検出領域の全てにおいて、前記信頼性が予め決められた閾値よりも低い場合に、前記撮像光学系に含まれるフォーカスレンズを無限遠の位置に駆動することを特徴とする請求項7に記載の撮像装置。   The focus adjustment unit drives the focus lens included in the imaging optical system to a position at infinity when the reliability is lower than a predetermined threshold in all of the plurality of focus detection regions. The imaging apparatus according to claim 7, wherein the imaging apparatus is characterized. 前記焦点調節手段は、前記重み値の合計値が前記予め決められた閾値より大きい領域群が存在しない場合、前記重みの合計値が最も高い領域群の焦点検出領域で検出したデフォーカス量に基づいて、前記撮像光学系に含まれるフォーカスレンズを駆動することを特徴とする請求項4または5に記載の撮像装置。   The focus adjustment means is based on the defocus amount detected in the focus detection area of the area group having the highest weight total value when there is no area group in which the total weight value is larger than the predetermined threshold. The imaging apparatus according to claim 4, wherein a focus lens included in the imaging optical system is driven. 前記焦点調節手段は、前記主被写体の領域における前記重み値の合計値と前記第2の絞り値とに応じて、前記撮像光学系に含まれるフォーカスレンズの駆動速度を算出することを特徴とする請求項4または5に記載の撮像装置。   The focus adjusting unit calculates a driving speed of a focus lens included in the imaging optical system according to a total value of the weight values and the second aperture value in the area of the main subject. The imaging device according to claim 4 or 5. 前記撮像素子から出力された画像信号により表される画像から、顔の領域を検出する顔検出手段を有し、
前記画像処理手段は、前記主被写体の領域と前記顔検出手段によって検出した顔の領域が一致しない場合、前記顔の領域を主被写体として判定することを特徴とする請求項2乃至10のいずれか1項に記載の撮像装置。
Face detection means for detecting a face area from an image represented by an image signal output from the image sensor;
The image processing means determines the face area as a main subject when the area of the main subject and the face area detected by the face detection means do not match. The imaging apparatus according to item 1.
撮像素子から出力された画像信号から、視差を有する一対の画像を生成して、予め決められた複数の焦点検出領域それぞれについてデフォーカス量を検出する焦点検出手段と、
前記デフォーカス量に基づいて、距離分布情報を作成する作成手段と、
前記距離分布情報および前記デフォーカス量に基づいて、フォーカスレンズの駆動量を求める焦点調節手段と、を有し、
前記焦点検出手段は、前記作成手段により前記距離分布情報を作成する際には、第1の設定を使用し、前記焦点調節手段により前記フォーカスレンズの駆動量を求める際には、第2の設定を使用して前記デフォーカス量を検出することを特徴とする画像処理装置。
A focus detection unit that generates a pair of images having parallax from an image signal output from the image sensor and detects a defocus amount for each of a plurality of predetermined focus detection regions;
Creating means for creating distance distribution information based on the defocus amount;
Focus adjusting means for obtaining a driving amount of a focus lens based on the distance distribution information and the defocus amount;
The focus detection unit uses the first setting when the distance distribution information is generated by the generation unit, and the second setting when the driving amount of the focus lens is determined by the focus adjustment unit. An image processing apparatus for detecting the defocus amount using
前記距離分布情報に基づいて被写体を検出し、該検出した被写体から主被写体を検出する画像処理手段を更に有し、
前記焦点検出手段は、前記一対の画像を互いにシフトしながら相関演算を行ってデフォーカス量を検出し、
前記第1の設定では、1回のシフト幅を第1のシフト幅にするとともに、シフト範囲を第1のシフト範囲とし、
前記第2の設定では、前記主被写体に対応する焦点検出領域について、前記シフト幅を前記第1のシフト幅より狭い第2のシフト幅にすると共に、前記シフト範囲を前記第1のシフト範囲よりも狭い第2のシフト範囲とすることを特徴とする請求項12に記載の画像処理装置。
An image processing means for detecting a subject based on the distance distribution information and detecting a main subject from the detected subject;
The focus detection unit detects a defocus amount by performing a correlation calculation while shifting the pair of images with each other,
In the first setting, one shift width is set as the first shift width, and the shift range is set as the first shift range.
In the second setting, for the focus detection area corresponding to the main subject, the shift width is set to a second shift width that is narrower than the first shift width, and the shift range is set to be smaller than the first shift range. The image processing apparatus according to claim 12, wherein the second shift range is also narrow.
前記画像信号をフィルタ処理するフィルタ手段と、
前記距離分布情報に基づいて被写体を検出し、該検出した被写体から主被写体を検出する画像処理手段と、を更に有し、
前記焦点検出手段は、前記フィルタ手段によりフィルタ処理された前記画像信号を用いて、デフォーカス量を検出し、
前記第1の設定では、前記フィルタ手段において第1のフィルタを使用し、前記第2の設定では、前記主被写体に対応する焦点検出領域について、第2のフィルタを使用し、前記第1のフィルタが抽出する周波数帯域は、前記第2のフィルタが抽出する周波数帯域よりも低いことを特徴とする請求項12に記載の画像処理装置。
Filter means for filtering the image signal;
Image processing means for detecting a subject based on the distance distribution information and detecting a main subject from the detected subject;
The focus detection unit detects a defocus amount using the image signal filtered by the filter unit,
In the first setting, the first filter is used in the filter means, and in the second setting, a second filter is used for a focus detection region corresponding to the main subject, and the first filter is used. The image processing apparatus according to claim 12, wherein a frequency band extracted by is lower than a frequency band extracted by the second filter.
前記第2の設定では、前記主被写体に対応しない焦点検出領域について、前記第2のフィルタが抽出する周波数帯域よりも低い周波数帯域の信号を抽出する第3のフィルタを使用することを特徴とする請求項14に記載の画像処理装置。   In the second setting, a third filter that extracts a signal in a frequency band lower than the frequency band extracted by the second filter is used for a focus detection region that does not correspond to the main subject. The image processing apparatus according to claim 14. 前記画像処理手段は、前記デフォーカス量の差が予め決められた閾値以内にある焦点検出領域をそれぞれ領域群としてまとめることで、被写体を検出することを特徴とする請求項13乃至15のいずれか1項に記載の画像処理装置。   16. The image processing unit according to claim 13, wherein the image processing unit detects a subject by grouping focus detection areas in which the difference in defocus amount is within a predetermined threshold as a group of areas. The image processing apparatus according to item 1. 前記複数の焦点検出領域それぞれに対して、予め決められた条件で決められた重み値を記憶した記憶手段を更に有し、
前記画像処理手段は、前記領域群それぞれについて、各領域群を構成する前記焦点検出領域の前記重み値の合計値が予め決められた閾値より大きい場合に、該領域群を被写体として判定することを特徴とする請求項16に記載の画像処理装置。
For each of the plurality of focus detection areas, further comprising storage means for storing weight values determined under predetermined conditions,
The image processing means determines, for each of the region groups, the region group as a subject when a total value of the weight values of the focus detection regions constituting each region group is larger than a predetermined threshold value. The image processing apparatus according to claim 16.
前記画像処理手段は、前記被写体それぞれの前記重み値の合計値のうち、もっとも大きい合計値を有する被写体を主被写体として判定することを特徴とする請求項17に記載の画像処理装置。   The image processing apparatus according to claim 17, wherein the image processing unit determines a subject having the largest total value among the total values of the weight values of the subjects as a main subject. 前記焦点調節手段は、前記主被写体に対応する焦点検出領域のデフォーカス量に基づいて、焦点調節を行うことを特徴とする請求項13乃至18のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 13, wherein the focus adjustment unit performs focus adjustment based on a defocus amount of a focus detection area corresponding to the main subject. 前記焦点検出手段は、更に、前記デフォーカス量の信頼性を検出し、
前記画像処理手段は、前記信頼性が予め決められた閾値以上のデフォーカス量を有する焦点検出領域を用いて、被写体を検出することを特徴とする請求項13乃至19のいずれか1項に記載の画像処理装置。
The focus detection unit further detects the reliability of the defocus amount,
20. The image processing means detects a subject using a focus detection region having a defocus amount whose reliability is equal to or greater than a predetermined threshold value. Image processing apparatus.
前記焦点調節手段は、前記複数の焦点検出領域の全てにおいて、前記信頼性が予め決められた閾値よりも低い場合に、フォーカスレンズを無限遠の位置に駆動する駆動量を求めることを特徴とする請求項20に記載の画像処理装置。   The focus adjusting unit obtains a driving amount for driving the focus lens to an infinite position when the reliability is lower than a predetermined threshold in all of the plurality of focus detection regions. The image processing apparatus according to claim 20. 前記焦点調節手段は、前記重み値の合計値が前記予め決められた閾値より大きい領域群が存在しない場合、前記重みの合計値が最も高い領域群の焦点検出領域で検出したデフォーカス量に基づいて、フォーカスレンズの駆動量を求めることを特徴とする請求項17または18に記載の画像処理装置。   The focus adjustment means is based on the defocus amount detected in the focus detection area of the area group having the highest weight total value when there is no area group in which the total weight value is larger than the predetermined threshold. The image processing apparatus according to claim 17, wherein the driving amount of the focus lens is obtained. 前記撮像素子から出力された画像信号により表される画像から、顔の領域を検出する顔検出手段を有し、
前記画像処理手段は、前記主被写体の領域と前記顔検出手段によって検出した顔の領域が一致しない場合、前記顔の領域を主被写体と定義することを特徴とする請求項13乃至22のいずれか1項に記載の画像処理装置。
Face detection means for detecting a face area from an image represented by an image signal output from the image sensor;
The image processing means defines the face area as a main subject when the area of the main subject and the face area detected by the face detection means do not coincide with each other. The image processing apparatus according to item 1.
複数のマイクロレンズそれぞれに対して複数の光電変換素子を備え、撮像光学系を介して入射した被写体像を撮影して、画像信号を出力する撮像素子と、
請求項12乃至23のいずれか1項に記載の画像処理装置と
を有することを特徴とする撮像装置。
An image sensor that includes a plurality of photoelectric conversion elements for each of a plurality of microlenses, captures an image of a subject that has entered through an imaging optical system, and outputs an image signal;
An image pickup apparatus comprising: the image processing apparatus according to any one of claims 12 to 23.
複数のマイクロレンズそれぞれに対して複数の光電変換素子を備え、撮像光学系を介して入射した被写体像を撮影して画像信号を出力する撮像素子から、前記撮像光学系に含まれる絞りを予め決められた第1の被写界深度となる絞り値に設定して撮影を行って得られた画像信号から、視差を有する一対の画像を生成して、予め決められた複数の焦点検出領域それぞれについてデフォーカス量を検出する第1の焦点検出工程と、
作成手段が、前記第1の焦点検出工程で検出された前記デフォーカス量に基づいて、距離分布情報を作成する作成工程と、
前記撮像素子から、前記撮像光学系に含まれる絞りを予め決められた第2の被写界深度となる絞り値に設定して撮影を行って得られた画像信号から、視差を有する一対の画像を生成して、予め決められた複数の焦点検出領域それぞれについてデフォーカス量を検出する第2の焦点検出工程と、
焦点調節手段が、前記距離分布情報および前記第2の焦点検出工程で検出された前記デフォーカス量に基づいて、焦点調節を行う焦点調節工程と、を有し、
前記第2の被写界深度は、前記第1の被写界深度よりも被写界深度が浅いことを特徴とする撮像装置の制御方法。
A plurality of photoelectric conversion elements are provided for each of the plurality of microlenses, and a diaphragm included in the imaging optical system is determined in advance from an imaging element that captures a subject image incident through the imaging optical system and outputs an image signal. For each of a plurality of predetermined focus detection areas, a pair of images having parallax is generated from an image signal obtained by performing shooting by setting the aperture value to be the first depth of field. A first focus detection step for detecting a defocus amount;
A creation step of creating distance distribution information based on the defocus amount detected in the first focus detection step;
A pair of images having parallax from an image signal obtained by shooting from the image pickup device by setting a stop included in the image pickup optical system to a predetermined stop value that is a predetermined second depth of field. And a second focus detection step of detecting a defocus amount for each of a plurality of predetermined focus detection regions,
A focus adjusting unit, which performs a focus adjustment based on the distance distribution information and the defocus amount detected in the second focus detection step;
The method for controlling an imaging apparatus, wherein the second depth of field is shallower than the first depth of field.
焦点検出手段が、撮像素子から出力された画像信号から、視差を有する一対の画像を生成して、予め決められた複数の焦点検出領域それぞれについて、第1の設定を用いてデフォーカス量を検出する第1の焦点検出工程と、
作成手段が、前記第1の焦点検出工程で検出された前記デフォーカス量に基づいて、距離分布情報を作成する作成工程と、
前記撮像素子から出力された画像信号から、視差を有する一対の画像を生成して、前記複数の焦点検出領域それぞれについて、第2の設定を用いてデフォーカス量を検出する第2の焦点検出工程と、
焦点調節手段が、前記距離分布情報および前記第2の焦点検出工程で検出された前記デフォーカス量に基づいて、フォーカスレンズの駆動量を求める焦点調節工程と、
を有することを特徴とする画像処理方法。
The focus detection unit generates a pair of images having parallax from the image signal output from the image sensor, and detects the defocus amount for each of a plurality of predetermined focus detection areas using the first setting. A first focus detection step,
A creation step of creating distance distribution information based on the defocus amount detected in the first focus detection step;
A second focus detection step of generating a pair of images having parallax from the image signal output from the image sensor and detecting a defocus amount using a second setting for each of the plurality of focus detection regions. When,
A focus adjusting step for obtaining a driving amount of a focus lens based on the distance distribution information and the defocus amount detected in the second focus detecting step;
An image processing method comprising:
コンピュータに、請求項25に記載の撮像装置の制御方法の各工程を実行させるためのプログラム。   A program for causing a computer to execute each step of a control method for an imaging apparatus according to claim 25. コンピュータに、請求項26に記載の画像処理方法の各工程を実行させるためのプログラム。   A program for causing a computer to execute each step of the image processing method according to claim 26. 請求項27または28に記載のプログラムを記憶したコンピュータが読み取り可能な記憶媒体。   A computer-readable storage medium storing the program according to claim 27 or 28.
JP2016147775A 2016-07-27 2016-07-27 Image pickup device and its control method, and image processing device and method Active JP6881909B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016147775A JP6881909B2 (en) 2016-07-27 2016-07-27 Image pickup device and its control method, and image processing device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016147775A JP6881909B2 (en) 2016-07-27 2016-07-27 Image pickup device and its control method, and image processing device and method

Publications (2)

Publication Number Publication Date
JP2018017876A true JP2018017876A (en) 2018-02-01
JP6881909B2 JP6881909B2 (en) 2021-06-02

Family

ID=61075877

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016147775A Active JP6881909B2 (en) 2016-07-27 2016-07-27 Image pickup device and its control method, and image processing device and method

Country Status (1)

Country Link
JP (1) JP6881909B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021068932A (en) * 2019-10-17 2021-04-30 キヤノン株式会社 Information processing device, control method thereof, and program
JP2021082949A (en) * 2019-11-19 2021-05-27 キヤノン株式会社 Imaging apparatus, control method of the same, program, and storage medium
WO2023026701A1 (en) * 2021-08-25 2023-03-02 富士フイルム株式会社 Imaging device, driving method for imaging device, and program

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0961704A (en) * 1995-08-30 1997-03-07 Minolta Co Ltd Range-finding system and autofocusing camera
JPH1125263A (en) * 1997-07-08 1999-01-29 Canon Inc Object feature point detector, focus adjusting device, exposure controller and camera
JPH1138313A (en) * 1997-07-18 1999-02-12 Canon Inc Optical device and camera
JP2011250133A (en) * 2010-05-27 2011-12-08 Canon Inc Imaging apparatus and control method of the same
JP2012083584A (en) * 2010-10-13 2012-04-26 Nikon Corp Imaging device
JP2014038288A (en) * 2012-08-20 2014-02-27 Canon Inc Focus adjustment device and control method therefor
JP2014131320A (en) * 2014-02-13 2014-07-10 Canon Inc Imaging apparatus
JP2014203050A (en) * 2013-04-09 2014-10-27 キヤノン株式会社 Image capturing device and control method therefor
JP2015072356A (en) * 2013-10-02 2015-04-16 オリンパス株式会社 Focus detection device
JP2015087704A (en) * 2013-11-01 2015-05-07 キヤノン株式会社 Automatic focus adjustment unit, control method of automatic focus adjustment unit, control program of automatic focus adjustment unit, and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0961704A (en) * 1995-08-30 1997-03-07 Minolta Co Ltd Range-finding system and autofocusing camera
JPH1125263A (en) * 1997-07-08 1999-01-29 Canon Inc Object feature point detector, focus adjusting device, exposure controller and camera
JPH1138313A (en) * 1997-07-18 1999-02-12 Canon Inc Optical device and camera
JP2011250133A (en) * 2010-05-27 2011-12-08 Canon Inc Imaging apparatus and control method of the same
JP2012083584A (en) * 2010-10-13 2012-04-26 Nikon Corp Imaging device
JP2014038288A (en) * 2012-08-20 2014-02-27 Canon Inc Focus adjustment device and control method therefor
JP2014203050A (en) * 2013-04-09 2014-10-27 キヤノン株式会社 Image capturing device and control method therefor
JP2015072356A (en) * 2013-10-02 2015-04-16 オリンパス株式会社 Focus detection device
JP2015087704A (en) * 2013-11-01 2015-05-07 キヤノン株式会社 Automatic focus adjustment unit, control method of automatic focus adjustment unit, control program of automatic focus adjustment unit, and storage medium
JP2014131320A (en) * 2014-02-13 2014-07-10 Canon Inc Imaging apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021068932A (en) * 2019-10-17 2021-04-30 キヤノン株式会社 Information processing device, control method thereof, and program
JP7358186B2 (en) 2019-10-17 2023-10-10 キヤノン株式会社 Information processing device, its control method and program
JP2021082949A (en) * 2019-11-19 2021-05-27 キヤノン株式会社 Imaging apparatus, control method of the same, program, and storage medium
JP7461732B2 (en) 2019-11-19 2024-04-04 キヤノン株式会社 Imaging device, control method thereof, program, and storage medium
WO2023026701A1 (en) * 2021-08-25 2023-03-02 富士フイルム株式会社 Imaging device, driving method for imaging device, and program

Also Published As

Publication number Publication date
JP6881909B2 (en) 2021-06-02

Similar Documents

Publication Publication Date Title
JP5898501B2 (en) Image processing apparatus, imaging apparatus, control method, program, and recording medium
US20160248967A1 (en) Distance information producing apparatus, image capturing apparatus, distance information producing method and storage medium storing distance information producing program
JP2013145314A5 (en)
US8994874B2 (en) Image capture apparatus and control method therefor
JP6685823B2 (en) Subject tracking device, control method thereof, imaging device, and program
JP6881909B2 (en) Image pickup device and its control method, and image processing device and method
JP6581333B2 (en) Image processing apparatus, imaging apparatus, and program
JP6139960B2 (en) Imaging apparatus and control method thereof
JP2017181797A (en) Focus detection device, method thereof, imaging apparatus, program, and storage medium
JP6478587B2 (en) Image processing apparatus, image processing method and program, and imaging apparatus
JP2014203050A (en) Image capturing device and control method therefor
JP2011242652A (en) Focus detector and control method thereof
JP2019168661A (en) Controller, imaging unit, method for control, program, and storage medium
JP6305016B2 (en) FOCUS CONTROL DEVICE, FOCUS CONTROL DEVICE CONTROL METHOD, AND IMAGING DEVICE
JP6210836B2 (en) IMAGING DEVICE, IMAGING CONTROL DEVICE, ITS CONTROL METHOD, AND PROGRAM
JP6071173B2 (en) Imaging apparatus, control method thereof, and program
JP5683135B2 (en) Imaging apparatus and control method thereof
JP2021033060A (en) Lens control device and control method therefor
JP6329400B2 (en) Image processing apparatus, image processing method and program, and imaging apparatus
JP2012103285A (en) Focus detecting device and method for controlling the same
US20220351395A1 (en) Subject tracking apparatus, image capturing apparatus, subject tracking method, and storage medium
JP6882016B2 (en) Imaging device, imaging system, imaging device control method, and program
JP6900228B2 (en) Imaging device, imaging system, imaging device control method, and program
JP2017134154A (en) Focus control device, imaging device, and focus control program
JP6929140B2 (en) Control device, image pickup device, control method, program, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190723

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200727

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201002

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201130

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20210103

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210113

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210506

R151 Written notification of patent or utility model registration

Ref document number: 6881909

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151