Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7522571B2 - Imaging device, control method thereof, program, and storage medium - Google Patents
[go: Go Back, main page]

JP7522571B2 - Imaging device, control method thereof, program, and storage medium - Google Patents

Imaging device, control method thereof, program, and storage medium Download PDF

Info

Publication number
JP7522571B2
JP7522571B2 JP2020053144A JP2020053144A JP7522571B2 JP 7522571 B2 JP7522571 B2 JP 7522571B2 JP 2020053144 A JP2020053144 A JP 2020053144A JP 2020053144 A JP2020053144 A JP 2020053144A JP 7522571 B2 JP7522571 B2 JP 7522571B2
Authority
JP
Japan
Prior art keywords
subject
focus
detection
image
area
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.)
Active
Application number
JP2020053144A
Other languages
Japanese (ja)
Other versions
JP2021152600A (en
Inventor
優 稲垣
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 JP2020053144A priority Critical patent/JP7522571B2/en
Publication of JP2021152600A publication Critical patent/JP2021152600A/en
Application granted granted Critical
Publication of JP7522571B2 publication Critical patent/JP7522571B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、画像中の被写体に焦点検出を含む処理を行う技術に関する。 The present invention relates to a technology that performs processing, including focus detection, on a subject in an image.

特許文献1には、検出した被写体の位置とサイズに基づいて、焦点検出に用いる画像信号を読み出す位置と視野長を設定することで、被写体の位置とサイズに応じた適切な焦点調節を行う技術が提案されている。 Patent document 1 proposes a technology that performs appropriate focus adjustment according to the position and size of the subject by setting the position and field of view length for reading out the image signal used for focus detection based on the position and size of the detected subject.

特許文献2には、検出した被写体の部位に応じて、焦点検出信号の検出方向を決定することで、被写体に応じた最適な測距を行う技術が提案されている。 Patent document 2 proposes a technology that determines the detection direction of the focus detection signal according to the part of the detected subject, thereby performing optimal distance measurement according to the subject.

特開2015-22058号公報JP 2015-22058 A 特開2009-192774号公報JP 2009-192774 A

特許文献1において、焦点検出可能な測距点数に制限がある場合、視野長と測距領域の広さはトレードオフの関係にある。被写体に合わせて視野長を短くすると、測距領域が狭くなり、被写体が動いている場合に、タイムラグなどで被写体が測距領域から外れやすくなる。また、被写体に対して測距領域を広くすると、被写体に対する視野長が長くなり、検出対象以外の被写体(背景など)が含まれやすくなるので、正しい焦点検出結果が得られない可能性が高くなる。そのため、単に被写体のサイズに基づいて視野長を設定すると、検出対象の被写体に対して適切な焦点調節を行うことができない場合がある。 In Patent Document 1, when there is a limit to the number of ranging points capable of focus detection, there is a trade-off between the field of view length and the width of the ranging area. If the field of view length is shortened to match the subject, the ranging area becomes narrower, and if the subject is moving, the subject is more likely to fall outside the ranging area due to time lag or the like. In addition, if the ranging area is widened relative to the subject, the field of view length for the subject becomes longer, making it more likely that subjects other than the detection target (such as the background) will be included, increasing the possibility that correct focus detection results will not be obtained. For this reason, if the field of view length is simply set based on the size of the subject, it may not be possible to perform appropriate focus adjustment for the subject to be detected.

また、特許文献2では、焦点検出領域内に検出対象以外の被写体が含まれる場合、焦点検出信号の検出方向を切り替えるだけでは、検出対象の被写体に対して適切な測距を行うことができない場合がある。 Furthermore, in Patent Document 2, if a subject other than the detection target is included in the focus detection area, simply switching the detection direction of the focus detection signal may not be enough to perform appropriate distance measurement for the detection target subject.

本発明は、上記課題に鑑みてなされ、その目的は、検出対象の被写体に対して適切な処理を行うことができる技術を実現することである。 The present invention was made in consideration of the above problems, and its purpose is to realize a technology that can perform appropriate processing on the subject to be detected.

上記課題を解決し、目的を達成するために、本発明の撮像装置は、被写体像を撮像して画像信号を生成する撮像手段と、前記撮像手段により撮像された異なる視差の画像信号を用いて焦点検出を行う焦点調節手段と、前記画像信号を用いて被写体を検出する被写体検出手段と、前記焦点検出を含む処理を行う領域のサイズを設定する設定手段と、を有し、前記設定手段は、前記被写体検出手段により検出された被写体の検出結果および焦点調節動作のモードに応じた倍率で、前記焦点検出を含む処理を行う領域のサイズを設定する。 In order to solve the above problems and achieve the object, the imaging device of the present invention has an imaging means for capturing an image of a subject and generating an image signal, a focus adjustment means for performing focus detection using image signals of different parallax captured by the imaging means, a subject detection means for detecting a subject using the image signal, and a setting means for setting the size of an area where processing including focus detection is performed, wherein the setting means sets the size of the area where processing including focus detection is performed at a magnification corresponding to the detection result of the subject detected by the subject detection means and the mode of focus adjustment operation.

本発明によれば、検出対象の被写体に対して適切な処理を行うことができるようになる。 The present invention makes it possible to perform appropriate processing on the subject being detected.

実施形態1、2の撮像装置の構成を示すブロック図。FIG. 1 is a block diagram showing a configuration of an imaging apparatus according to first and second embodiments. 実施形態1、2の撮像素子の画素配列を示す図。FIG. 4 is a diagram showing a pixel array of an image sensor according to the first and second embodiments. 実施形態1、2の画素の平面図(a)と(a)のa-a断面図。1A is a plan view of a pixel according to the first and second embodiments, and FIG. 1A is a cross-sectional view taken along the line aa in FIG. 実施形態1、2の画素と瞳分割の関係を説明する図。5A and 5B are diagrams for explaining the relationship between pixels and pupil division in the first and second embodiments. 実施形態1、2の撮像素子と瞳分割の関係を説明する図。5A and 5B are diagrams for explaining the relationship between the image sensor and pupil division according to the first and second embodiments. 実施形態1、2のデフォーカス量と像ずれ量の関係を説明する図。5A and 5B are diagrams for explaining the relationship between the defocus amount and the image shift amount in the first and second embodiments. 実施形態1、2の撮影時の処理を示すフローチャート。4 is a flowchart showing processing during shooting in the first and second embodiments. 実施形態1の検出対象と検出領域の関係を示す図。5A and 5B are diagrams showing the relationship between a detection target and a detection area according to the first embodiment. 実施形態1の焦点調節処理を示すフローチャート。6 is a flowchart showing a focus adjustment process according to the first embodiment. 実施形態1の倍率に基づく測距領域の設定例を説明する図。5A to 5C are diagrams for explaining an example of setting a distance measurement area based on a magnification according to the first embodiment. 実施形態2の検出対象と検出領域の関係を示す図。13A and 13B are diagrams showing the relationship between a detection target and a detection area according to the second embodiment. 実施形態2の焦点調節処理を示すフローチャート。10 is a flowchart showing a focus adjustment process according to the second embodiment. 実施形態2の被写体奥行き倍率を説明する図。13A to 13C are diagrams for explaining subject depth magnification in the second embodiment. 実施形態2の第1領域および第2領域の説明図。FIG. 11 is an explanatory diagram of a first region and a second region according to the second embodiment. 実施形態2のホワイトバランス調整処理を示すフローチャート。10 is a flowchart showing a white balance adjustment process according to the second embodiment. 実施形態2の露光調節処理を示すフローチャート。10 is a flowchart showing an exposure adjustment process according to a second embodiment. 実施形態2のデフォーカス量算出処理を示すフローチャート。10 is a flowchart showing a defocus amount calculation process according to the second embodiment. 実施形態2の相関量の極値選択の説明図。13 is an explanatory diagram of extreme value selection of correlation amount according to the second embodiment. FIG.

以下、添付図面を参照して実施形態を詳しく説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 The following embodiments are described in detail with reference to the attached drawings. Note that the following embodiments do not limit the invention according to the claims. Although the embodiments describe multiple features, not all of these multiple features are necessarily essential to the invention, and multiple features may be combined in any manner. Furthermore, in the attached drawings, the same reference numbers are used for the same or similar configurations, and duplicate explanations are omitted.

本実施形態では、撮像装置の一例として、撮像面位相差方式の自動焦点調節(オートフォーカス:AF)機能を有するレンズ交換式の一眼レフデジタルカメラにより実現した例について説明する。しかしながら、本実施形態として適用可能な撮像装置は、レンズ交換式ではないデジタルカメラやデジタルビデオカメラ、パーソナルコンピュータやその一種であるタブレット、携帯電話やその一種であるスマートフォン、監視カメラ、車載カメラ、医療用カメラなどに適用可能である。 In this embodiment, an example of an imaging device will be described in which the imaging device is an interchangeable lens single-lens reflex digital camera with an image plane phase difference automatic focus adjustment (autofocus: AF) function. However, imaging devices applicable to this embodiment can also be applied to non-interchangeable lens digital cameras and digital video cameras, personal computers and tablets, mobile phones and smartphones, surveillance cameras, in-vehicle cameras, medical cameras, and the like.

<装置構成>まず、図1を参照して、本実施形態の撮像装置の構成および機能について説明する。 <Device configuration> First, the configuration and functions of the imaging device of this embodiment will be described with reference to FIG.

本実施形態の撮像装置10はレンズ交換式の一眼レフデジタルカメラであり、レンズユニット100とカメラ本体120とを有する。レンズユニット100は図の中央の点線で示されるマウントMを介して、カメラ本体120に対して着脱可能に接続される。 The imaging device 10 of this embodiment is a single-lens reflex digital camera with interchangeable lenses, and has a lens unit 100 and a camera body 120. The lens unit 100 is detachably connected to the camera body 120 via a mount M, which is indicated by the dotted line in the center of the figure.

被写体像を結像させるレンズユニット100は、第1レンズ群101、絞り102、第2レンズ群103、フォーカスレンズ群(以下、フォーカスレンズ)104、および後述する駆動部および制御部を有する。レンズユニット100は、フォーカスレンズ104を含み且つ被写体の像を形成する撮影光学系をなす。 The lens unit 100 that forms an image of a subject has a first lens group 101, an aperture 102, a second lens group 103, a focus lens group (hereafter referred to as a focus lens) 104, and a drive unit and a control unit that will be described later. The lens unit 100 includes the focus lens 104 and forms an image of a subject, forming an imaging optical system.

被写体像を結像させるレンズユニット100は、第1レンズ群101、絞り102、第2レンズ群103、フォーカスレンズ群(以下、フォーカスレンズ)104、および後述する駆動/制御系を有する。レンズユニット100は、フォーカスレンズ104を含み且つ被写体の光学像を形成する撮影光学系をなす。 The lens unit 100 that forms an image of a subject has a first lens group 101, an aperture 102, a second lens group 103, a focus lens group (hereafter referred to as a focus lens) 104, and a drive/control system described below. The lens unit 100 includes the focus lens 104 and constitutes an imaging optical system that forms an optical image of a subject.

第1レンズ群101は、レンズユニット100の先端に配置され、光軸方向OAに進退可能に保持される。以下では、光軸方向OAをZ方向とし、カメラから被写体側を見る方向を正方向とする。また、本実施形態において、Z方向の軸の原点0は、後述するカメラ本体120の撮像素子122の位置に対応するものとする。 The first lens group 101 is disposed at the tip of the lens unit 100 and is held so that it can move forward and backward in the optical axis direction OA. In the following, the optical axis direction OA is defined as the Z direction, and the direction in which the subject is viewed from the camera is defined as the positive direction. In this embodiment, the origin 0 of the Z direction axis corresponds to the position of the image sensor 122 of the camera body 120, which will be described later.

絞り102は、その開口径を調節することで撮影時の光量調節を行う。また、絞り102は、静止画撮影時には露出時間を制御するメカニカルシャッタとしても機能する。絞り102および第2レンズ群103は一体として光軸方向OAに進退可能であり、第1レンズ群101と連動して移動することによりズーム機能を実現する。 The aperture 102 adjusts the amount of light during shooting by adjusting its opening diameter. The aperture 102 also functions as a mechanical shutter that controls the exposure time when shooting still images. The aperture 102 and the second lens group 103 can move forward and backward as a unit in the optical axis direction OA, and move in conjunction with the first lens group 101 to achieve a zoom function.

フォーカスレンズ104は、光軸方向OAに進退可能であり、その位置に応じてレンズユニット100が合焦する被写体距離(合焦距離)が変化する。本実施形態では、フォーカスレンズ104の光軸方向OAの位置を制御することにより、被写体距離の検出(焦点検出)および合焦距離を調節するオートフォーカス機能を実現する。 The focus lens 104 can move forward and backward in the optical axis direction OA, and the subject distance (focus distance) at which the lens unit 100 focuses changes depending on its position. In this embodiment, an autofocus function that detects the subject distance (focus detection) and adjusts the focus distance is realized by controlling the position of the focus lens 104 in the optical axis direction OA.

レンズユニット100の駆動/制御系(機器、回路、プログラムコードその他のものを含む)は、駆動系としてズームアクチュエータ111、絞り/シャッターアクチュエータ112、フォーカスアクチュエータ113、ズーム駆動部114、絞り/シャッター駆動部115、フォーカス駆動部116を有する。また、駆動系を制御する制御系として、レンズMPU117とレンズメモリ118を有する。 The drive/control system (including devices, circuits, program code, and other things) of the lens unit 100 has a zoom actuator 111, an aperture/shutter actuator 112, a focus actuator 113, a zoom driver 114, an aperture/shutter driver 115, and a focus driver 116 as a drive system. It also has a lens MPU 117 and a lens memory 118 as a control system that controls the drive system.

ズームアクチュエータ111は、第1レンズ群101や第2レンズ群103を光軸方向OAに進退駆動し、撮影光学系の画角を変更するズーム制御を行う。絞り/シャッターアクチュエータ112は、絞り102の開口径を制御して撮影光量を調節すると共に、絞り102の開閉動作を制御して撮影時の露光時間制御を行う。フォーカスアクチュエータ113は、フォーカスレンズ104を光軸方向OAに進退駆動してオートフォーカス動作を行うと共に、フォーカスレンズ104の現在位置を検出する機能も有している。 The zoom actuator 111 drives the first lens group 101 and the second lens group 103 forward and backward in the optical axis direction OA, performing zoom control to change the angle of view of the photographing optical system. The aperture/shutter actuator 112 controls the aperture diameter of the aperture 102 to adjust the amount of photographing light, and controls the opening and closing operation of the aperture 102 to control the exposure time during photographing. The focus actuator 113 drives the focus lens 104 forward and backward in the optical axis direction OA to perform autofocus operation, and also has the function of detecting the current position of the focus lens 104.

ズーム駆動部114は、撮影者のズーム操作またはレンズMPU117の制御値に応じて、ズームアクチュエータ111を駆動する。絞り/シャッター駆動部115は、絞り/シャッターアクチュエータ112を駆動して絞り102の開口径または開閉動作を制御する。フォーカス駆動部116は、フォーカスアクチュエータ113を駆動し、フォーカスレンズ104を光軸方向OAに進退駆動してオートフォーカス動作(焦点調節動作)を行う。 The zoom driver 114 drives the zoom actuator 111 in response to the zoom operation of the photographer or the control value of the lens MPU 117. The aperture/shutter driver 115 drives the aperture/shutter actuator 112 to control the aperture diameter or opening/closing operation of the aperture 102. The focus driver 116 drives the focus actuator 113 to drive the focus lens 104 forward and backward in the optical axis direction OA to perform an autofocus operation (focus adjustment operation).

レンズMPU117は、撮影光学系に係る全ての演算、制御を行い、ズーム駆動部114、絞り/シャッター駆動部115、フォーカス駆動部116、レンズメモリ118を制御する。レンズMPU117は、マウントMを介してカメラMPU125との間でコマンドやデータの通信が可能に接続される。例えば、レンズMPU117は、フォーカスレンズ104の現在の位置を検出し、カメラMPU125からの要求に対してレンズ位置情報を通知する。このレンズ位置情報は、フォーカスレンズ104の光軸方向OAにおける位置、光学系が移動していない状態の射出瞳の光軸方向OAにおける位置および直径、射出瞳の光束を制限するレンズ枠の光軸方向OAにおける位置および直径などの情報を含む。また、レンズMPU117は、カメラMPU125からの要求に応じて、ズーム駆動部114、絞り/シャッター駆動部115、フォーカス駆動部116を制御する。レンズメモリ118には、本実施形態の撮像面位相差AFに必要な光学情報が予め記憶されている。また、レンズメモリ118には、例えば、フォーカスレンズ104の位置や移動量とデフォーカス量との対応関係を示すデフォーカスマップが格納されている。なお、デフォーカスマップは、後述するように第1焦点検出信号と第2焦点検出信号の各画素位置での像ずれ量を相関演算により算出し、像ずれ量をデフォーカス量に換算することで生成される。これにより、レンズMPU117は、カメラMPU125からデフォーカス量を所定量だけ変更する要求を受けた場合に、レンズメモリ118に記憶されたデフォーカスマップを参照し、所定のデフォーカス量に対応する距離だけフォーカスレンズ104を移動するようにフォーカスアクチュエータ113を制御することが可能である。カメラMPU125は、例えばROM125aやレンズメモリ118に格納されているプログラムを実行することで、レンズユニット100の動作を制御する。また、レンズメモリ118には、本実施形態の撮影光学系の光学情報なども格納されている。 The lens MPU 117 performs all calculations and controls related to the photographing optical system, and controls the zoom drive unit 114, the aperture/shutter drive unit 115, the focus drive unit 116, and the lens memory 118. The lens MPU 117 is connected to the camera MPU 125 via the mount M so that commands and data can be communicated. For example, the lens MPU 117 detects the current position of the focus lens 104 and notifies the lens position information in response to a request from the camera MPU 125. This lens position information includes information such as the position of the focus lens 104 in the optical axis direction OA, the position and diameter of the exit pupil in the optical axis direction OA when the optical system is not moving, and the position and diameter of the lens frame that limits the light beam of the exit pupil in the optical axis direction OA. In addition, the lens MPU 117 controls the zoom drive unit 114, the aperture/shutter drive unit 115, and the focus drive unit 116 in response to a request from the camera MPU 125. The lens memory 118 stores optical information necessary for the image plane phase difference AF of this embodiment in advance. In addition, the lens memory 118 stores, for example, a defocus map showing the correspondence between the position or movement amount of the focus lens 104 and the defocus amount. The defocus map is generated by calculating the image shift amount at each pixel position of the first focus detection signal and the second focus detection signal by correlation calculation and converting the image shift amount into a defocus amount, as described later. As a result, when the lens MPU 117 receives a request from the camera MPU 125 to change the defocus amount by a predetermined amount, it can refer to the defocus map stored in the lens memory 118 and control the focus actuator 113 to move the focus lens 104 by a distance corresponding to the predetermined defocus amount. The camera MPU 125 controls the operation of the lens unit 100 by executing a program stored in, for example, the ROM 125a or the lens memory 118. In addition, the lens memory 118 also stores optical information of the imaging optical system of this embodiment.

カメラ本体120は、光学的ローパスフィルタ121、撮像素子122、後述する駆動/制御系を有する。光学的ローパスフィルタ121は、撮影画像の偽色やモアレを軽減する。 The camera body 120 has an optical low-pass filter 121, an image sensor 122, and a drive/control system described below. The optical low-pass filter 121 reduces false colors and moiré in the captured image.

撮像素子122は、例えばCMOSイメージセンサとその周辺回路で構成されている。CMOSイメージセンサは、光を受光する各画素に光電変換素子が設けられており、各画素を単位画素として複数の単位画素が二次元状に配列された画素群(撮像面)を有する。撮像素子122は、撮像光学系の異なる瞳領域をそれぞれ通過する光束を受光する複数の焦点検出画素を有し、画素ごとに独立した信号出力が可能である。これにより、撮像面位相差AFによるデフォーカス量の算出が可能である。また、撮像素子122は、被写体の像を形成する撮影光学系の射出瞳の全域を通る光束を各画素で受光して被写体の画像信号を生成する複数の撮像用画素を有する。 The image sensor 122 is composed of, for example, a CMOS image sensor and its peripheral circuitry. The CMOS image sensor has a photoelectric conversion element in each pixel that receives light, and has a pixel group (imaging surface) in which multiple unit pixels are arranged two-dimensionally, with each pixel being a unit pixel. The image sensor 122 has multiple focus detection pixels that receive light beams that pass through different pupil regions of the imaging optical system, and is capable of outputting independent signals for each pixel. This makes it possible to calculate the defocus amount using imaging surface phase difference AF. The image sensor 122 also has multiple imaging pixels that receive light beams that pass through the entire area of the exit pupil of the imaging optical system that forms the image of the subject, and generate an image signal of the subject.

カメラ本体120の駆動/制御系は、撮像素子駆動部123、画像処理部124、カメラ本体120全体を制御するカメラMPU125、表示部126、操作スイッチ127、メモリ128、第1焦点検出部129、第2焦点検出部130を有する。撮像素子駆動部123は、撮像素子122の電荷蓄積動作を制御すると共に、撮像素子122から読み出した画像信号をデジタル信号に変換してカメラMPU125に送出する。画像処理部124は、撮像素子122から読み出された画像信号にガンマ変換、色補間、JPEG圧縮等の各種画像処理を行う。また、画像処理部124は、後述する撮像面位相差方式による焦点検出用の信号、露光調節用の信号、ホワイトバランス調整用の信号、および、被写体検出用の信号を生成する。なお、本実施形態では、焦点検出用(位相差AF用)の信号、露光調節用の信号、ホワイトバランス調整用の信号、および、被写体検出用の信号を生成しているが、例えば露光調節用の信号、ホワイトバランス調整用の信号、被写体検出用の信号を共通の信号として生成してもよい。また、共通とする信号の組み合わせはこの限りではない。 The drive/control system of the camera body 120 includes an image sensor drive unit 123, an image processing unit 124, a camera MPU 125 that controls the entire camera body 120, a display unit 126, an operation switch 127, a memory 128, a first focus detection unit 129, and a second focus detection unit 130. The image sensor drive unit 123 controls the charge accumulation operation of the image sensor 122, converts the image signal read from the image sensor 122 into a digital signal, and sends it to the camera MPU 125. The image processing unit 124 performs various image processing such as gamma conversion, color interpolation, and JPEG compression on the image signal read from the image sensor 122. The image processing unit 124 also generates a signal for focus detection using an image plane phase difference method, a signal for exposure adjustment, a signal for white balance adjustment, and a signal for subject detection, which will be described later. In this embodiment, a signal for focus detection (for phase difference AF), a signal for exposure adjustment, a signal for white balance adjustment, and a signal for subject detection are generated, but for example, a signal for exposure adjustment, a signal for white balance adjustment, and a signal for subject detection may be generated as a common signal. Also, the combination of common signals is not limited to this.

カメラMPU125はマイクロプロセッサを有し、カメラ本体120に係る全ての演算、制御を行う。これにより、撮像素子駆動部123、画像処理部124、表示部126、操作スイッチ127、メモリ128、第1焦点検出部129、第2焦点検出部130を制御する。カメラMPU125はマウントMに配置された信号線を介してレンズMPU117と接続されている。これにより、レンズMPU117に対して、レンズ位置を取得する要求を発行したり、所定の駆動量でのズーム駆動や絞り駆動やレンズ駆動の要求を発行したり、レンズユニット100に固有の光学情報を取得する要求を発行する。 The camera MPU 125 has a microprocessor and performs all calculations and control related to the camera body 120. This controls the image sensor drive unit 123, image processing unit 124, display unit 126, operation switch 127, memory 128, first focus detection unit 129, and second focus detection unit 130. The camera MPU 125 is connected to the lens MPU 117 via a signal line arranged in the mount M. This allows the camera MPU 125 to issue requests to the lens MPU 117 to obtain the lens position, to issue requests for zoom drive, aperture drive, and lens drive at a specified drive amount, and to issue requests to obtain optical information specific to the lens unit 100.

カメラMPU125には、カメラの動作を制御するためのプログラムを格納したROM125a、変数を記憶するRAM125b、各種パラメータを記憶するEEPROM125cが内蔵されている。カメラMPU125は、ROM125aに格納されたプログラムを読み出してRAM125bに展開して実行することで、後述する焦点検出処理、被写体検出処理、露光調節処理、ホワイトバランス調整処理を実行する。 The camera MPU 125 has built-in ROM 125a that stores programs for controlling the operation of the camera, RAM 125b that stores variables, and EEPROM 125c that stores various parameters. The camera MPU 125 reads out the programs stored in ROM 125a, expands them into RAM 125b, and executes them to perform focus detection processing, subject detection processing, exposure adjustment processing, and white balance adjustment processing, which will be described later.

表示部126はLCD(液晶)パネルや有機ELなどの表示デバイスを有し、カメラの各動作モードに関する各種の情報を表示する。カメラの動作モードは、例えば、静止画や動画を撮影する撮影モード、メモリ128に格納されている撮影済みの画像を再生する再生モードを含む。撮影モードの場合は、カメラの撮影モードに関する情報、撮影前のプレビュー画像と撮影後の確認用画像、焦点検出時の合焦状態画像などを表示する。また、撮影中の動画を逐次表示する。 The display unit 126 has a display device such as an LCD (liquid crystal) panel or an organic EL display, and displays various information related to each operation mode of the camera. The operation modes of the camera include, for example, a shooting mode for shooting still images and videos, and a playback mode for playing back captured images stored in the memory 128. In the shooting mode, information related to the shooting mode of the camera, a preview image before shooting and a confirmation image after shooting, and an in-focus state image at the time of focus detection are displayed. In addition, videos being shot are displayed one after the other.

操作スイッチ127は、シャッタースイッチ、電源スイッチ、ズームスイッチ、モード切替スイッチなどを含む。メモリ128は、カメラに着脱可能なフラッシュメモリであり、撮影済み画像を記録する。 The operation switches 127 include a shutter switch, a power switch, a zoom switch, a mode change switch, etc. The memory 128 is a flash memory that can be attached to and detached from the camera, and records captured images.

焦点調節部129は、撮像素子122および画像処理部124から得られる焦点検出用の一対の異なる視差の像信号(位相差AF用の信号)に基づいて、位相差検出方式による焦点検出処理を行う。画像処理部124は、撮像光学系の一対の瞳領域を通過する光束で形成される異なる視差の一対の像データを生成し、焦点調節部129が、一対の像データのずれ量に基づいて焦点ずれ量(デフォーカス量)を算出する。このように、焦点調節部129は、専用のAFセンサを用いることなく、撮像素子122の出力信号により位相差AF(撮像面位相差AF)を行う。 The focus adjustment unit 129 performs focus detection processing using a phase difference detection method based on a pair of different parallax image signals (signals for phase difference AF) for focus detection obtained from the image sensor 122 and the image processing unit 124. The image processing unit 124 generates a pair of image data with different parallax formed by light beams passing through a pair of pupil regions of the imaging optical system, and the focus adjustment unit 129 calculates the amount of focus shift (defocus amount) based on the amount of shift between the pair of image data. In this way, the focus adjustment unit 129 performs phase difference AF (image plane phase difference AF) using the output signal of the image sensor 122 without using a dedicated AF sensor.

焦点調節部129は、取得ブロック129aおよび算出ブロック129bを有する。これらの動作については後述する。なお、焦点調節部129の少なくとも一部(取得ブロック129aまたは算出ブロック129bの一部)を、カメラMPU125に設けてもよい。なお、焦点調節部129が実行する焦点調節動作については後述する。焦点調節部129は、焦点検出結果を用いてフォーカスレンズ104の位置を制御する自動焦点調節(AF)機能を有する。 The focus adjustment unit 129 has an acquisition block 129a and a calculation block 129b. The operation of these will be described later. At least a part of the focus adjustment unit 129 (a part of the acquisition block 129a or the calculation block 129b) may be provided in the camera MPU 125. The focus adjustment operation performed by the focus adjustment unit 129 will be described later. The focus adjustment unit 129 has an automatic focus adjustment (AF) function that controls the position of the focus lens 104 using the focus detection result.

被写体検出部130は、画像処理部124により生成される被写体検出用の信号に基づいて、被写体の種類や部位や状態(検出タイプ)、被写体の位置やサイズ(検出領域)などを検出する被写体検出処理を行う。被写体検出部130の処理については後述する。 The subject detection unit 130 performs subject detection processing to detect the type, part, and state of the subject (detection type), the position and size of the subject (detection area), and the like, based on the subject detection signal generated by the image processing unit 124. The processing of the subject detection unit 130 will be described later.

露光調節部131は、撮像素子122および画像処理部124から得られる露光調節用(AE用)の信号に基づいて測光を行うことで撮影条件を適切に制御する。露光調節部131は、露出調節用の信号に基づいて測光を行い、設定中の絞り値、シヤッタスピード、ISO感度での露光量を算出し、算出した露光量と、予め定められた適正露光量との差に基づき撮影時の適切な絞り値、シヤッタスピード、ISO感度を演算し、撮影条件として設定する。露光調節部131は、測光結果を用いて撮影時の露光条件を算出し、絞り102の絞り値、シヤッタスピード、ISO感度を制御する自動露出調節(AE)機能を有する。 The exposure adjustment unit 131 appropriately controls the shooting conditions by performing photometry based on the exposure adjustment (AE) signal obtained from the image sensor 122 and the image processing unit 124. The exposure adjustment unit 131 performs photometry based on the exposure adjustment signal, calculates the exposure amount at the currently set aperture value, shutter speed, and ISO sensitivity, calculates the appropriate aperture value, shutter speed, and ISO sensitivity at the time of shooting based on the difference between the calculated exposure amount and a predetermined appropriate exposure amount, and sets them as the shooting conditions. The exposure adjustment unit 131 has an automatic exposure adjustment (AE) function that calculates the exposure conditions at the time of shooting using the photometry results, and controls the aperture value, shutter speed, and ISO sensitivity of the aperture 102.

ホワイトバランス調整部132は、撮像素子122および画像処理部124から得られるホワイトバランス調整用の信号に基づいてホワイトバランス調整処理を行う。ホワイトバランス調整部132は、ホワイトバランス調整用の信号から取得したホワイトバランスのパラメータと予め定められた適切なホワイトバランスのパラメータとの差に基づき色の重みづけを調整する自動ホワイトバランス調整(AWB)機能を有する。 The white balance adjustment unit 132 performs white balance adjustment processing based on the white balance adjustment signal obtained from the image sensor 122 and the image processing unit 124. The white balance adjustment unit 132 has an automatic white balance adjustment (AWB) function that adjusts color weighting based on the difference between the white balance parameter obtained from the white balance adjustment signal and a predetermined appropriate white balance parameter.

本実施形態の撮像装置10は、焦点調節(AF)、露光調節(AE)、ホワイトバランス調整(AWB)と、被写体検出とを組み合わせて実行可能であり、被写体検出結果に応じて、焦点調節(AF)、露光調節(AE)、ホワイトバランス調整(AWB)を行う位置(像高範囲)を選択することができる。 The imaging device 10 of this embodiment can perform a combination of focus adjustment (AF), exposure adjustment (AE), white balance adjustment (AWB), and subject detection, and can select the position (image height range) for performing focus adjustment (AF), exposure adjustment (AE), and white balance adjustment (AWB) depending on the subject detection result.

<撮像素子の構成>次に、図2を参照して、実施形態1の撮像素子122の撮像画素(および焦点検出画素)の配列について説明する。 <Configuration of the image sensor> Next, the arrangement of the image sensing pixels (and focus detection pixels) of the image sensor 122 in embodiment 1 will be described with reference to FIG. 2.

図2は、実施形態1の2次元CMOSセンサ(撮像素子122)の画素(撮像画素)配列を4列×4行の範囲で、焦点検出画素配列を8列×4行の範囲で示している。 Figure 2 shows the pixel (imaging pixel) array of the two-dimensional CMOS sensor (image sensor 122) of embodiment 1 in an area of 4 columns x 4 rows, and the focus detection pixel array in an area of 8 columns x 4 rows.

実施形態1において、図2に示した2列×2行の画素群200は、R(赤)の分光感度を有する画素200Rが左上に、G(緑)の分光感度を有する画素200Gが右上と左下に、B(青)の分光感度を有する画素200Bが右下に配置されている。さらに、各画素は2列×1行に配列された第1焦点検出画素201と第2焦点検出画素202により構成されている。 In the first embodiment, the 2 column x 2 row pixel group 200 shown in FIG. 2 has a pixel 200R having R (red) spectral sensitivity arranged at the top left, pixels 200G having G (green) spectral sensitivity arranged at the top right and bottom left, and a pixel 200B having B (blue) spectral sensitivity arranged at the bottom right. Furthermore, each pixel is composed of a first focus detection pixel 201 and a second focus detection pixel 202 arranged in 2 columns x 1 row.

図2に示した4列×4行の画素(8列×4行の焦点検出画素)を面上に多数配置し、撮像画像(焦点検出信号)の取得を可能としている。実施形態1では、画素の周期Pが4μm、画素数Nが横5575列×縦3725行=約2075万画素、焦点検出画素の列方向周期PAFが2μm、焦点検出画素数NAFが横11150列×縦3725行=約4150万画素の撮像素子122として説明を行う。 A large number of 4 columns x 4 rows of pixels (8 columns x 4 rows of focus detection pixels) as shown in FIG. 2 are arranged on a surface, making it possible to acquire a captured image (focus detection signal). In the first embodiment, the image sensor 122 is described as having a pixel period P of 4 μm, a pixel count N of 5,575 columns horizontally x 3,725 rows vertically = approximately 20.75 million pixels, a column-direction period PAF of the focus detection pixels of 2 μm, and a focus detection pixel count NAF of 11,150 columns horizontally x 3,725 rows vertically = approximately 41.5 million pixels.

図3(a)は、図2に示した撮像素子122の1つの画素200Gを、撮像素子122の受光面側(+z側)から見た平面図であり、図3(b)は、図3(a)のa-a断面を-y側から見た断面図である。 Figure 3(a) is a plan view of one pixel 200G of the image sensor 122 shown in Figure 2, as viewed from the light receiving surface side (+z side) of the image sensor 122, and Figure 3(b) is a cross-sectional view of the a-a cross section of Figure 3(a) as viewed from the -y side.

図3に示すように、実施形態1の画素200Gは、各画素の受光側に入射光を集光するためのマイクロレンズ305が形成され、x方向にNH分割(2分割)、y方向にNV分割(1分割)された光電変換部301と光電変換部302が形成される。光電変換部301と光電変換部302が、それぞれ、第1焦点検出画素201と第2焦点検出画素202に対応する。 As shown in FIG. 3, in the pixel 200G of the first embodiment, a microlens 305 is formed on the light receiving side of each pixel to focus incident light, and a photoelectric conversion unit 301 and a photoelectric conversion unit 302 are formed that are NH-divided (2-divided) in the x direction and NV-divided (1-divided) in the y direction. The photoelectric conversion unit 301 and the photoelectric conversion unit 302 correspond to the first focus detection pixel 201 and the second focus detection pixel 202, respectively.

光電変換部301と光電変換部302は、p型層とn型層の間にイントリンシック層を挟んだpin構造フォトダイオードとしてもよいし、必要に応じて、イントリンシック層を省略し、pn接合フォトダイオードとしてもよい。各画素には、マイクロレンズ305と、光電変換部301および光電変換部302との間に、カラーフィルター306が形成される。また、必要に応じて、副画素毎にカラーフィルターの分光透過率を変えてもよいし、カラーフィルターを省略してもよい。 The photoelectric conversion units 301 and 302 may be pin-structure photodiodes with an intrinsic layer sandwiched between a p-type layer and an n-type layer, or may be pn-junction photodiodes with the intrinsic layer omitted as necessary. In each pixel, a color filter 306 is formed between the microlens 305 and the photoelectric conversion units 301 and 302. In addition, the spectral transmittance of the color filter may be changed for each subpixel, or the color filter may be omitted as necessary.

図3に示した画素200Gに入射した光は、マイクロレンズ305により集光され、カラーフィルター306で分光されたのち、光電変換部301と光電変換部302で受光される。 Light incident on pixel 200G shown in FIG. 3 is collected by microlens 305, dispersed by color filter 306, and then received by photoelectric conversion unit 301 and photoelectric conversion unit 302.

光電変換部301と光電変換部302では、受光量に応じて電子とホールが対生成され、空乏層で分離された後、負電荷の電子はn型層(不図示)に蓄積され、一方、ホールは定電圧源(不図示)に接続されたp型層を通じて撮像素子122外部へ排出される。 In the photoelectric conversion units 301 and 302, pairs of electrons and holes are generated according to the amount of light received. After being separated by a depletion layer, the negatively charged electrons are accumulated in an n-type layer (not shown), while the holes are discharged to the outside of the image sensor 122 through a p-type layer connected to a constant voltage source (not shown).

光電変換部301と光電変換部302のn型層(不図示)に蓄積された電子は、転送ゲートを介して、静電容量部(FD)に転送され、電圧信号に変換される。 The electrons stored in the n-type layers (not shown) of the photoelectric conversion units 301 and 302 are transferred to the capacitance unit (FD) via a transfer gate and converted into a voltage signal.

図4は、図3に示した実施形態1の撮像素子122の画素構造と瞳分割との対応関係を示している。図4は、図3(a)に示した撮像素子122の画素構造を+y側から見た断面図(a)と撮像素子122の瞳面(瞳距離Ds)(b)を示している。図4では、撮像素子122の瞳面の座標軸と対応を取るために、断面図(a)のx軸とy軸を図3に対して反転させている。 Figure 4 shows the correspondence between the pixel structure of the image sensor 122 of embodiment 1 shown in Figure 3 and pupil division. Figure 4 shows a cross-sectional view (a) of the pixel structure of the image sensor 122 shown in Figure 3 (a) as viewed from the +y side, and the pupil plane (pupil distance Ds) (b) of the image sensor 122. In Figure 4, the x-axis and y-axis of the cross-sectional view (a) are inverted with respect to Figure 3 in order to correspond to the coordinate axes of the pupil plane of the image sensor 122.

図4において、第1焦点検出画素201の第1瞳部分領域501は、重心が-x方向に偏心している光電変換部301の受光面と、マイクロレンズによって、概ね、共役関係になっており、第1焦点検出画素201で受光可能な瞳領域を示している。第1焦点検出画素201の第1瞳部分領域501は、瞳面上で+X側に重心が偏心している。図4において、第2焦点検出画素202の第2瞳部分領域502は、重心が+x方向に偏心している光電変換部302の受光面と、マイクロレンズによって、概ね、共役関係になっており、第2焦点検出画素202で受光可能な瞳領域を示している。第2焦点検出画素202の第2瞳部分領域502は、瞳面上で-X側に重心が偏心している。また、図4において、瞳領域500は、光電変換部301と光電変換部302(第1焦点検出画素201と第2焦点検出画素202)を全て合わせたときの画素200G全体で受光可能な瞳領域である。 In FIG. 4, the first pupil partial region 501 of the first focus detection pixel 201 is in a roughly conjugate relationship with the light receiving surface of the photoelectric conversion unit 301, whose center of gravity is decentered in the -x direction, due to the microlens, and indicates the pupil region that can receive light at the first focus detection pixel 201. The first pupil partial region 501 of the first focus detection pixel 201 has its center of gravity decentered on the +X side on the pupil plane. In FIG. 4, the second pupil partial region 502 of the second focus detection pixel 202 is in a roughly conjugate relationship with the light receiving surface of the photoelectric conversion unit 302, whose center of gravity is decentered in the +x direction, due to the microlens, and indicates the pupil region that can receive light at the second focus detection pixel 202. The second pupil partial region 502 of the second focus detection pixel 202 has its center of gravity decentered on the -X side on the pupil plane. Also, in FIG. 4, pupil region 500 is the pupil region that can receive light in the entire pixel 200G when the photoelectric conversion unit 301 and the photoelectric conversion unit 302 (the first focus detection pixel 201 and the second focus detection pixel 202) are all combined.

撮像面位相差AFでは、撮像素子122のマイクロレンズを利用して瞳分割するため回折の影響を受ける。図4において、撮像素子122の瞳面までの瞳距離が数10mmであるのに対し、マイクロレンズの直径は数μmである。そのため、マイクロレンズの絞り値が数万となり、数10mmレベルの回折ボケが生じる。よって、光電変換部の受光面の像は、明瞭な瞳領域や瞳部分領域とはならずに、受光感度特性(受光率の入射角分布)となる。 In image plane phase difference AF, the microlenses of the image sensor 122 are used to divide the pupil, and so diffraction effects occur. In FIG. 4, the pupil distance to the pupil plane of the image sensor 122 is several tens of mm, while the diameter of the microlenses is several μm. As a result, the aperture value of the microlenses is several tens of thousands, and diffraction blurring at the level of several tens of mm occurs. As a result, the image on the light receiving surface of the photoelectric conversion unit does not become a clear pupil region or pupil partial region, but becomes a light receiving sensitivity characteristic (incident angle distribution of light receiving rate).

図5は、実施形態1の撮像素子122と瞳分割との対応関係を示している。第1瞳部分領域501と第2瞳部分領域502の異なる瞳部分領域を通過した光束は、撮像素子122の各画素に、それぞれ、異なる角度で入射し、2×1分割された第1焦点検出画素201と第2焦点検出画素202で受光される。図5は、瞳領域が水平方向に2つに瞳分割されている例を示しているが、必要に応じて、垂直方向に瞳分割を行ってもよい。 Figure 5 shows the correspondence between the image sensor 122 and pupil division in the first embodiment. Light beams that pass through different pupil partial regions, the first pupil partial region 501 and the second pupil partial region 502, are incident on each pixel of the image sensor 122 at different angles, and are received by the first focus detection pixel 201 and the second focus detection pixel 202, which are divided into 2 x 1 regions. Figure 5 shows an example in which the pupil region is divided into two in the horizontal direction, but pupil division may also be performed in the vertical direction if necessary.

撮像素子122は、第1焦点検出画素201と、第2焦点検出画素202とを有する撮像画素が複数配列されている。第1焦点検出画素201は、撮影光学系の第1瞳部分領域を通過する光束を受光する。また、第2焦点検出画素202は、第1瞳部分領域と異なる撮影光学系の第2瞳部分領域を通過する光束を受光する。また、撮像画素は、撮影光学系の第1瞳部分領域と第2瞳部分領域を合わせた瞳領域を通過する光束を受光する。 The image sensor 122 has an array of imaging pixels each having a first focus detection pixel 201 and a second focus detection pixel 202. The first focus detection pixel 201 receives a light beam that passes through a first pupil partial region of the imaging optical system. The second focus detection pixel 202 receives a light beam that passes through a second pupil partial region of the imaging optical system that is different from the first pupil partial region. The imaging pixel receives a light beam that passes through a pupil region that is the combination of the first pupil partial region and the second pupil partial region of the imaging optical system.

撮像素子122は、それぞれの撮像画素が第1焦点検出画素201と第2焦点検出画素202から構成されている。必要に応じて、撮像画素と第1焦点検出画素201、第2焦点検出画素202を個別の画素構成とし、撮像画素配列の一部に、第1焦点検出画素201と第2焦点検出画素202を部分的に配置する構成としてもよい。 In the image sensor 122, each imaging pixel is composed of a first focus detection pixel 201 and a second focus detection pixel 202. If necessary, the imaging pixel, the first focus detection pixel 201, and the second focus detection pixel 202 may be configured as separate pixels, and the first focus detection pixel 201 and the second focus detection pixel 202 may be partially arranged in a portion of the imaging pixel array.

実施形態1では、撮像素子122の各画素の第1焦点検出画素201の受光信号を集めて第1焦点信号を生成し、各画素の第2焦点検出画素202の受光信号を集めて第2焦点信号を生成して焦点検出を行う。また、撮像素子122の画素ごとに、第1焦点検出画素201と第2焦点検出画素202の信号を加算することで、有効画素数Nの解像度の撮像信号(撮像画像)を生成する。各信号の生成方法は、上述した方法に限らず、例えば、第2焦点検出信号を、撮像信号と第1焦点信号の差分から生成してもよい。 In the first embodiment, focus detection is performed by collecting the light receiving signals of the first focus detection pixels 201 of each pixel of the image sensor 122 to generate a first focus signal, and collecting the light receiving signals of the second focus detection pixels 202 of each pixel to generate a second focus signal. In addition, an image signal (captured image) with a resolution of the effective pixel number N is generated by adding the signals of the first focus detection pixels 201 and the second focus detection pixels 202 for each pixel of the image sensor 122. The method of generating each signal is not limited to the above-mentioned method, and for example, the second focus detection signal may be generated from the difference between the image signal and the first focus signal.

<デフォーカス量と像ずれ量の関係>次に、図6を参照して、撮像素子122により取得される第1焦点検出信号と第2焦点検出信号のデフォーカス量と像ずれ量の関係について説明する。 <Relationship between defocus amount and image shift amount> Next, with reference to FIG. 6, the relationship between the defocus amount and image shift amount of the first focus detection signal and the second focus detection signal acquired by the image sensor 122 will be described.

図6は、第1焦点検出信号と第2焦点検出信号のデフォーカス量と第1焦点検出信号と第2焦点検出信号間の像ずれ量の関係を示している。撮像面800に撮像素子122(不図示)が配置され、図4および図5と同様に、撮像素子122の瞳面が、第1瞳部分領域501と第2瞳部分領域502に2分割される。デフォーカス量dは、被写体の結像位置から撮像面までの距離を大きさ|d|とし、被写体の結像位置が撮像面より被写体側にある前ピン状態を負符号(d<0)として定義される。また、被写体の結像位置が撮像面より被写体の反対側にある後ピン状態を正符号(d>0)として定義される。被写体の結像位置が撮像面(合焦位置)にある合焦状態はd=0である。図6において、被写体801は合焦状態(d=0)の例を示しており、被写体802は前ピン状態(d<0)の例を示している。前ピン状態(d<0)と後ピン状態(d>0)を合わせて、デフォーカス状態(|d|>0)とする。 Figure 6 shows the relationship between the defocus amount of the first focus detection signal and the second focus detection signal and the image shift amount between the first focus detection signal and the second focus detection signal. The image sensor 122 (not shown) is arranged on the image sensor 800, and the pupil surface of the image sensor 122 is divided into a first pupil partial region 501 and a second pupil partial region 502, as in Figures 4 and 5. The defocus amount d is defined as the distance from the image sensor 122 to the image sensor 800, and the front focus state in which the image sensor 122 is located on the image sensor 800 side of the image sensor 800, with the magnitude |d|. The front focus state in which the image sensor 122 is located on the image sensor 800 side of the image sensor 800 is defined as a negative sign (d<0). The back focus state in which the image sensor 122 is located on the image sensor 800 side of the image sensor 800 is defined as a positive sign (d>0). The in-focus state in which the image sensor 122 is located on the image sensor 800 side of the image sensor 800 is defined as d=0. In Figure 6, the image sensor 122 shows an example of an in-focus state (d=0), and the image sensor 122 shows an example of an in-focus state (d<0). The front focus state (d<0) and the back focus state (d>0) are combined to form the defocus state (|d|>0).

前ピン状態(d<0)では、被写体802からの光束のうち、第1瞳部分領域501(第2瞳部分領域502)を通過した光束は、一度、集光した後、光束の重心位置G1(G2)を中心として幅Γ1(Γ2)に広がり、撮像面800でボケた像となる。ボケた像は、撮像素子122に配列された各画素を構成する第1焦点検出画素201(第2焦点検出画素202)により受光され、第1焦点検出信号(第2焦点検出信号)が生成される。よって、第1焦点検出信号(第2焦点検出信号)は、撮像面800上の重心位置G1(G2)に、被写体802が幅Γ1(Γ2)にボケた被写体像として記録される。被写体像のボケ幅Γ1(Γ2)は、デフォーカス量dの大きさ|d|が増加するのに伴い、概ね、比例して増加していく。同様に、第1焦点検出信号と第2焦点検出信号間の被写体像の像ずれ量p(=光束の重心位置の差G1-G2)の大きさ|p|も、デフォーカス量dの大きさ|d|が増加するのに伴い、概ね、比例して増加していく。後ピン状態(d>0)でも、第1焦点検出信号と第2焦点検出信号間の被写体像の像ずれ方向が前ピン状態と反対となるが、同様である。 In the front focus state (d<0), the light beam from the subject 802 that passes through the first pupil partial region 501 (second pupil partial region 502) is once focused, and then spreads to a width Γ1 (Γ2) centered on the center of gravity position G1 (G2) of the light beam, forming a blurred image on the imaging surface 800. The blurred image is received by the first focus detection pixel 201 (second focus detection pixel 202) constituting each pixel arranged on the image sensor 122, and a first focus detection signal (second focus detection signal) is generated. Therefore, the first focus detection signal (second focus detection signal) is recorded as a subject image in which the subject 802 is blurred to a width Γ1 (Γ2) at the center of gravity position G1 (G2) on the imaging surface 800. The blur width Γ1 (Γ2) of the subject image increases roughly in proportion to the increase in the magnitude |d| of the defocus amount d. Similarly, the magnitude |p| of the image shift amount p (= the difference G1-G2 between the center of gravity positions of the light beams) of the subject image between the first focus detection signal and the second focus detection signal also increases roughly in proportion to the increase in the magnitude |d| of the defocus amount d. In the back focus state (d>0), the direction of the image shift of the subject image between the first focus detection signal and the second focus detection signal is the opposite to that in the front focus state, but the same is true.

第1焦点検出信号と第2焦点検出信号、もしくは、第1焦点検出信号と第2焦点検出信号を加算した撮像信号のデフォーカス量の大きさが増加するのに伴い、第1焦点検出信号と第2焦点検出信号間の像ずれ量の大きさが増加する。焦点調節部129は、撮像信号のデフォーカス量の大きさが増加するのに伴い、第1焦点検出信号と第2焦点検出信号間の像ずれ量の大きさが増加する関係性から、基線長に基づいて算出された変換係数により像ずれ量をデフォーカス量dに変換する。 As the magnitude of the defocus amount of the first focus detection signal and the second focus detection signal, or the image signal obtained by adding the first focus detection signal and the second focus detection signal, increases, the magnitude of the image shift amount between the first focus detection signal and the second focus detection signal increases. The focus adjustment unit 129 converts the image shift amount into a defocus amount d using a conversion coefficient calculated based on the baseline length, based on the relationship in which the magnitude of the image shift amount between the first focus detection signal and the second focus detection signal increases as the magnitude of the defocus amount of the image signal increases.

<撮影時の処理>次に、図7から図10を参照して、実施形態1の撮影時の処理について説明する。 <Processing during shooting> Next, the processing during shooting in embodiment 1 will be described with reference to Figures 7 to 10.

図7は、実施形態1の撮像装置10による撮影時の処理のフローチャートを示している。なお、図7の処理は、カメラMPU125およびレンズMPU117がプログラムを実行し、レンズユニット100およびカメラ本体120の各部を制御することにより実現される。 Figure 7 shows a flowchart of the processing during image capture by the imaging device 10 of embodiment 1. Note that the processing in Figure 7 is realized by the camera MPU 125 and lens MPU 117 executing a program and controlling each part of the lens unit 100 and camera body 120.

ステップS701では、カメラMPU125は、被写体検出部132を制御し被写体検出を実行する。 In step S701, the camera MPU 125 controls the subject detection unit 132 to perform subject detection.

ここで、図8を参照して、実施形態1の被写体検出部132により検出される被写体の種類、部位および状態(検出タイプ)、被写体の位置およびサイズ(検出領域)について説明する。 Now, with reference to Figure 8, we will explain the type, part and state (detection type) of the subject, and the position and size (detection area) of the subject detected by the subject detection unit 132 in embodiment 1.

図8は、被写体(検出対象)と、被写体の検出領域の関係を示している。図8の801~808は、被写体検出部132が検出した被写体の検出領域であり、各被写体801~808の検出タイプ(種類、部位、状態)と検出領域(位置、サイズ)は、表1に示す通りである。 Figure 8 shows the relationship between subjects (detection targets) and their detection areas. 801 to 808 in Figure 8 are detection areas of subjects detected by the subject detection unit 132, and the detection type (type, part, state) and detection area (position, size) of each subject 801 to 808 are as shown in Table 1.

このように、被写体検出部132は、画像処理部124により生成される被写体検出用の信号に基づいて、検出タイプと検出領域の検出を行う。 In this way, the subject detection unit 132 detects the detection type and detection area based on the subject detection signal generated by the image processing unit 124.

実施形態1では、1つの被写体検出用の信号から複数の被写体に関する検出タイプと検出領域を取得したが、最も主らしい被写体の検出タイプと検出領域のみを取得してもよい。また、検出タイプは種類、部位、状態の全てに限らず、種類、部位、状態の少なくとも1つ、種類だけ、部位だけ、状態だけでもよいし、別の指標であってもよい。
(表1)
ステップS702では、カメラMPU125は、ステップS701で検出された被写体の中から、主被写体を選択する。主被写体の選択方法は、予め定められた検出タイプ(種類、部位、状態)および検出領域(位置、サイズ)の優先順位に応じて決定される。例えば、撮影頻度の高いものほど優先順位を高く設定し、検出タイプの種類は、人、犬、鳥、車、飛行機の順、検出タイプの状態は、走り、飛行、静止の順、検出領域の位置は、中央像高ほど、検出領域のサイズは、大きいものほど優先順位を高く設定する。
In the first embodiment, the detection types and detection areas for multiple subjects are obtained from one subject detection signal, but it is also possible to obtain only the detection type and detection area of the most prominent subject. Furthermore, the detection type is not limited to all of type, part, and state, and may be at least one of type, part, and state, or only type, only part, or only state, or may be another index.
(Table 1)
In step S702, the camera MPU 125 selects a main subject from among the subjects detected in step S701. The method of selecting the main subject is determined according to the priority of the predetermined detection type (kind, part, condition) and detection area (position, size). For example, the higher the frequency of shooting, the higher the priority is set, the detection type types are set in the order of people, dogs, birds, cars, and airplanes, the detection type states are set in the order of running, flying, and stationary, the position of the detection area is set closer to the central image height, and the size of the detection area is set higher.

ステップS703では、カメラMPU125は、焦点調節部129を制御し、S702で選択された主被写体に対して焦点調節を実行する。焦点調節処理については後述する。 In step S703, the camera MPU 125 controls the focus adjustment unit 129 to perform focus adjustment on the main subject selected in S702. The focus adjustment process will be described later.

ステップS704では、カメラMPU125は、合焦判定を行う。合焦と判定された場合はステップS705へ進み、合焦でないと判定された場合はステップS701へ進める。 In step S704, the camera MPU 125 performs a focus determination. If it is determined that the focus is achieved, the process proceeds to step S705. If it is determined that the focus is not achieved, the process proceeds to step S701.

ステップS705では、カメラMPU125は、ホワイトバランス調整部132を制御し、S702で選択された主被写体に対してホワイトバランス調整処理を実行する。ホワイトバランス調整処理については後述する。 In step S705, the camera MPU 125 controls the white balance adjustment unit 132 to perform white balance adjustment processing on the main subject selected in S702. The white balance adjustment processing will be described later.

ステップS706では、カメラMPU125は、露光調節部131を制御し、S702で選択された主被写体に対して露光調節処理を実行する。露光調節処理については後述する。 In step S706, the camera MPU 125 controls the exposure adjustment unit 131 to perform exposure adjustment processing on the main subject selected in S702. The exposure adjustment processing will be described later.

ステップS707では、カメラMPU125は、撮影を実行する。ステップS707を終えると処理を終了する。 In step S707, the camera MPU 125 performs shooting. After step S707, the process ends.

<焦点調節処理>次に、図7のステップS703における焦点調節処理について説明する。 <Focus adjustment process> Next, we will explain the focus adjustment process in step S703 in Figure 7.

図9は、実施形態1の焦点調節処理のフローチャートを示している。なお、図9の処理は、焦点調節部129によって実行される。 Figure 9 shows a flowchart of the focus adjustment process in embodiment 1. Note that the process in Figure 9 is executed by the focus adjustment unit 129.

ステップS901では、焦点調節部129は、取得ブロック129aが、図7のステップS701~S702で検出した主被写体の被写体検出結果(検出タイプ、検出領域)を取得する。 In step S901, the focus adjustment unit 129 acquires the subject detection results (detection type, detection area) of the main subject detected by the acquisition block 129a in steps S701 and S702 of FIG. 7.

ステップS902では、焦点調節部129は、取得ブロック129aが、焦点調節動作のモードとしてAFモード(ワンショットAFまたはサーボAF)を取得する。ワンショットAFは、静止している被写体にピントを固定するAFモードであり、サーボAFは、動いている被写体にピントを合わせ続けるAFモードである。 In step S902, the acquisition block 129a of the focus adjustment unit 129 acquires the AF mode (one-shot AF or servo AF) as the focus adjustment operation mode. One-shot AF is an AF mode that fixes the focus on a stationary subject, and servo AF is an AF mode that keeps the focus on a moving subject.

ステップS903では、焦点調節部129は、取得ブロック129aが、ステップS901で取得した被写体検出結果と、ステップS902で取得したAFモードに応じた測距領域設定倍率を取得する。表1は、被写体検出結果の検出タイプ(被写体の種類、部位、状態(動き)、AFモード(ワンショットAF、サーボAF)ごとの測距領域設定倍率β1~β16を示している。ステップS903では、β1~β16の測距領域設定倍率を、被写体検出結果とAFモードに応じて取得する。 In step S903, the focus adjustment unit 129 acquires the subject detection result acquired by the acquisition block 129a in step S901 and the ranging area setting magnification corresponding to the AF mode acquired in step S902. Table 1 shows the ranging area setting magnifications β1 to β16 for each detection type (type of subject, part, state (movement) and AF mode (one-shot AF, servo AF)) of the subject detection result. In step S903, the ranging area setting magnifications β1 to β16 are acquired according to the subject detection result and the AF mode.

ステップS904では、焦点調節部129は、ステップS901で取得した主被写体の位置およびサイズと、ステップS903で取得した測距領域設定倍率とに基づいて測距領域を設定する。 In step S904, the focus adjustment unit 129 sets the ranging area based on the position and size of the main subject acquired in step S901 and the ranging area setting magnification acquired in step S903.

図10は、図9のステップS904で設定される測距領域を示している。図10(a)は、図8の801でAFモードがワンショットAF時に対して、測距領域を設定した様子を示している。図10(b)は、図8の803でAFモードがワンショットAF時に対して、測距領域を設定した様子を示している。図10(c)は、図8の804でAFモードがワンショットAF時に対して、測距領域を設定した様子を示している。図10(d)は、図8の804でAFモードがサーボAF時に対して、測距領域を設定した様子を示している。図10(e)は、図8の808でAFモードがサーボAF時に対して、測距領域を設定した様子を示している。 Figure 10 shows the ranging area set in step S904 in Figure 9. Figure 10(a) shows how the ranging area is set in 801 in Figure 8 when the AF mode is one-shot AF. Figure 10(b) shows how the ranging area is set in 803 in Figure 8 when the AF mode is one-shot AF. Figure 10(c) shows how the ranging area is set in 804 in Figure 8 when the AF mode is one-shot AF. Figure 10(d) shows how the ranging area is set in 804 in Figure 8 when the AF mode is servo AF. Figure 10(e) shows how the ranging area is set in 808 in Figure 8 when the AF mode is servo AF.

図10(a)は、被写体状態が静止で、AFモードがワンショットAFであるため、測距領域設定倍率β1は小さく設定されている。 In FIG. 10(a), the subject is stationary and the AF mode is one-shot AF, so the ranging area setting magnification β1 is set small.

図10(b)は、被写体種類が犬、被写体状態が静止、AFモードがワンショットAFで図10(a)と同じであるが、被写体部位が全身であるため、測距領域設定倍率β3はβ1よりさらに小さく設定されている。全身は顔よりも大きくなるため、検出サイズに対する被写体の移動量は、全身の方が小さくなる。そのため、測距領域設定倍率β3はβ1よりさらに小さく設定するのが適している。 Figure 10(b) is the same as Figure 10(a) in that the subject type is a dog, the subject state is still, and the AF mode is one-shot AF, but since the subject part is the whole body, the ranging area setting magnification β3 is set even smaller than β1. Since the whole body is larger than the face, the amount of movement of the subject relative to the detection size is smaller for the whole body. For this reason, it is appropriate to set the ranging area setting magnification β3 even smaller than β1.

図10(c)は、被写体種類が犬、被写体部位が全身、AFモードがワンショットAFで、図10(b)と同じであるが、被写体状態が走りであるため、測距領域設定倍率β4はβ3より大きく設定されている。被写体状態が走りの場合は、検出サイズに対する被写体の移動量は大きくなる。そのため、測距領域設定倍率β4はβ3より大きく設定するのが適している。 Figure 10(c) is the same as Figure 10(b), with the subject type being a dog, the subject part being the whole body, and the AF mode being one-shot AF, but since the subject state is running, the ranging area setting magnification β4 is set larger than β3. When the subject state is running, the amount of movement of the subject relative to the detection size is large. For this reason, it is appropriate to set the ranging area setting magnification β4 larger than β3.

図10(d)は、被写体種類が犬、被写体部位が全身、被写体状態が走りで、図10(c)と同じであるが、AFモードがサーボAFであるため、測距領域設定倍率β12はβ4よりさらに大きく設定されている。AFモードがサーボAFの場合は、ユーザがフレーミングのためにカメラを動かしている可能性が高く、検出サイズに対する被写体の移動量は大きくなる可能性が高い。そのため、測距領域設定倍率β12はβ4より大きく設定するのが適している。 Figure 10(d) is the same as Figure 10(c), with the subject type being a dog, the subject part being the whole body, and the subject state being running, but because the AF mode is servo AF, the ranging area setting magnification β12 is set even larger than β4. When the AF mode is servo AF, it is highly likely that the user is moving the camera for framing, and the amount of subject movement relative to the detection size is likely to be large. For this reason, it is appropriate to set the ranging area setting magnification β12 larger than β4.

図10(e)は、被写体部位が全身、AFモードがサーボAFで、図10(d)と同じであるが、被写体種類が鳥、被写体状態が飛行である点が異なる。犬が走っている場合よりも、鳥が飛行している場合の方が、検出サイズに対する被写体の移動量は大きくなりやすいため、測距領域設定倍率β16はβ12よりさらに大きく設定するのが適している。 Figure 10(e) is the same as Figure 10(d) in that the subject part is the whole body and the AF mode is servo AF, but differs in that the subject type is a bird and the subject state is flying. Since the amount of subject movement relative to the detection size is more likely to be greater when a bird is flying than when a dog is running, it is appropriate to set the ranging area setting magnification β16 even larger than β12.

このように、被写体の種類や状態(動き)に応じて測距領域設定倍率を設定する。例えば、検出領域のサイズに対する被写体の移動量が小さい場合には、測距領域設定倍率が小さくなるように設定することで、測距領域が狭くなり(視野長が短くなり)、遠近競合が低減される。また、検出領域のサイズに対する被写体の移動量が大きい場合には、測距領域設定倍率が大きくなるように設定することで、測距領域が広くなり、視野長が長くなるものの、被写体の位置ずれに対応できるようになる。 In this way, the ranging area setting magnification is set according to the type and state (movement) of the subject. For example, if the amount of movement of the subject is small relative to the size of the detection area, setting the ranging area setting magnification to a small value narrows the ranging area (shortens the field of view length) and reduces perspective conflicts. On the other hand, if the amount of movement of the subject is large relative to the size of the detection area, setting the ranging area setting magnification to a large value widens the ranging area and lengthens the field of view, but makes it possible to accommodate positional shifts of the subject.

本実施形態では、被写体検出部132が検出した被写体の状態に応じた測距領域設定倍率を取得したが、これに限定されるものではない。例えば、焦点調節部129が算出したデフォーカス量の変化から被写体の状態(動体か静止体かなど)を判定し、被写体の状態に応じた測距領域設定倍率を取得してもよい。また、不図示の動きベクトル検出部が検出した被写体位置情報の時間変化と、ジャイロセンサなどで検出した手振れ量やパンニング量から判定した被写体の状態に応じた測距領域設定倍率を取得してもよい。 In this embodiment, the subject detection unit 132 acquires a ranging area setting magnification in accordance with the state of the subject detected, but this is not limited to the above. For example, the state of the subject (e.g., whether the subject is moving or still) may be determined from the change in the defocus amount calculated by the focus adjustment unit 129, and a ranging area setting magnification in accordance with the state of the subject may be acquired. In addition, a ranging area setting magnification in accordance with the state of the subject determined from the time change in subject position information detected by a motion vector detection unit (not shown) and the amount of camera shake or panning detected by a gyro sensor or the like may be acquired.

ステップS905では、焦点調節部129は、算出ブロック129bが、ステップS904で設定された測距領域内の各測距点のデフォーカス量を算出する。 In step S905, the calculation block 129b of the focus adjustment unit 129 calculates the defocus amount for each ranging point within the ranging area set in step S904.

ステップS906では、焦点調節部129は、ステップS905で算出された各測距点のデフォーカス量に基づいて測距点を選択する。 In step S906, the focus adjustment unit 129 selects a ranging point based on the defocus amount for each ranging point calculated in step S905.

ステップS907では、焦点調節部129は、算出ブロック129bが、ステップS906で選択された測距点のデフォーカス量に基づいてフォーカスレンズ駆動量を算出する。 In step S907, the calculation block 129b of the focus adjustment unit 129 calculates the focus lens driving amount based on the defocus amount of the range-finding point selected in step S906.

ステップS908では、焦点調節部129は、ステップS907で算出されたフォーカスレンズ駆動量に基づいてフォーカスレンズを駆動する。ステップS908を終えると処理を終了する。 In step S908, the focus adjustment unit 129 drives the focus lens based on the focus lens drive amount calculated in step S907. After step S908, the process ends.

以上のように、実施形態1によれば、被写体検出結果(被写体の種類、部位、状態)および/またはAFモードに基づいて測距領域の位置およびサイズが設定される。詳しくは、被写体検出結果(被写体の種類、部位、状態)やAFモードに応じて測距領域設定倍率を取得し、測距領域設定倍率に基づいて処理(焦点調節、ホワイトバランス調整、露光調節)を行う被写体領域を設定する。これにより、検出対象の被写体に対して適切な処理を行うことが可能となる。 As described above, according to the first embodiment, the position and size of the ranging area are set based on the subject detection result (type, part, condition of the subject) and/or the AF mode. In more detail, the ranging area setting magnification is obtained according to the subject detection result (type, part, condition of the subject) and the AF mode, and the subject area for processing (focus adjustment, white balance adjustment, exposure adjustment) is set based on the ranging area setting magnification. This makes it possible to perform appropriate processing on the subject being detected.

[実施形態2]以下、実施形態2について説明する。 [Embodiment 2]Embodiment 2 will be described below.

実施形態1では、被写体検出結果やAFモードに応じて測距領域設定倍率を設定し、測距領域設定倍率に基づいて設定される測距領域内の測距点のデフォーカス量を用いて主被写体に対する焦点調節を行う構成について説明した。これに対して、実施形態2では、被写体検出性能のデフォーカス耐性から設定されるデフォーカス範囲内または被写体サイズから想定される被写体奥行き情報から設定されるデフォーカス範囲内の領域を主被写体の検出領域とそれ以外の領域に設定し、主被写体領域の測距点のデフォーカス量を用いて主被写体に対する処理(焦点調節、ホワイトバランス調整、露光調節)を行う構成について説明する。 In the first embodiment, a configuration was described in which a ranging area setting magnification is set according to the subject detection result and AF mode, and focus adjustment for the main subject is performed using the defocus amount of the ranging point within the ranging area set based on the ranging area setting magnification. In contrast, in the second embodiment, a configuration is described in which an area within a defocus range set based on the defocus resistance of the subject detection performance or a defocus range set based on subject depth information assumed from the subject size is set as the detection area for the main subject and other areas, and processing for the main subject (focus adjustment, white balance adjustment, exposure adjustment) is performed using the defocus amount of the ranging point in the main subject area.

なお、実施形態2の撮像装置10の構成、撮像素子122の構成、焦点検出方法、被写体検出方法、撮影時の処理は、実施形態1の図1から図7と同様である。 The configuration of the imaging device 10, the configuration of the image sensor 122, the focus detection method, the subject detection method, and the processing during shooting in the second embodiment are the same as those in Figs. 1 to 7 in the first embodiment.

まず、図7のS701において、実施形態2の被写体検出部132により検出される被写体の種類(検出タイプ)、被写体の位置およびサイズ(検出領域)、被写体検出が可能なデフォーカス範囲(被写体検出性能のデフォーカス耐性)や被写体の奥行き倍率について説明する。 First, in S701 of FIG. 7, the type of subject (detection type), the position and size of the subject (detection area), the defocus range in which the subject can be detected (defocus resistance of subject detection performance), and the depth magnification of the subject detected by the subject detection unit 132 of embodiment 2 will be described.

図11は、被写体(検出対象)と検出領域の関係を示している。図11の1101~1106は、被写体検出部132が検出した被写体の検出領域である。各被写体1101~1106の検出タイプ(被写体の種類)、検出領域(被写体の位置とサイズ)、被写体検出性能のデフォーカス耐性、被写体の奥行き倍率は、表2に示す通りである。 Figure 11 shows the relationship between subjects (detection targets) and detection areas. 1101 to 1106 in Figure 11 are detection areas of subjects detected by the subject detection unit 132. The detection type (type of subject), detection area (position and size of subject), defocus resistance of subject detection performance, and subject depth magnification of each subject 1101 to 1106 are as shown in Table 2.

このように、被写体検出部132は、画像処理部124により生成される被写体検出用の信号に基づいて、主被写体の検出タイプと検出領域を取得する。 In this way, the subject detection unit 132 obtains the detection type and detection area of the main subject based on the subject detection signal generated by the image processing unit 124.

実施形態2では、1つの被写体検出用の信号から複数の被写体に関する検出タイプと検出領域を取得したが、最も主らしい被写体の検出タイプと検出領域のみを取得してもよい。また、検出タイプは種類を取得したが、これに限らず、別の指標であってもよい。また、実施形態2では、犬や鳥の全身、車や飛行機の全体を検出タイプの種類として取得したが、犬や鳥の顔や瞳などの特定部位や、車や飛行機の運転者や運転者の頭部などの特定部分を取得してもよい。
(表2)
次に、図12から図18を参照して、実施形態2の焦点調節処理、ホワイトバランス調整処理、露光調節処理について説明する。
In the second embodiment, the detection type and detection area for multiple subjects are obtained from one subject detection signal, but only the detection type and detection area for the most prominent subject may be obtained. In addition, the detection type is obtained by type, but this is not limited to this and may be another index. In the second embodiment, the whole body of a dog or bird, or the whole body of a car or airplane is obtained as the detection type type, but a specific part such as the face or eyes of a dog or bird, or a specific part such as the driver or the driver's head of a car or airplane may be obtained.
(Table 2)
Next, the focus adjustment process, the white balance adjustment process, and the exposure adjustment process of the second embodiment will be described with reference to FIGS.

<焦点調節処理>図12を参照して、実施形態2の焦点調節処理(図7のステップS703)について説明する。 <Focus adjustment process> The focus adjustment process of embodiment 2 (step S703 in FIG. 7) will be described with reference to FIG. 12.

図12は、実施形態2の焦点調節処理のフローチャートを示している。なお、図12の処理は、焦点調節部129によって実行される。 Figure 12 shows a flowchart of the focus adjustment process in embodiment 2. Note that the process in Figure 12 is executed by the focus adjustment unit 129.

ステップS1201において、焦点調節部129は、取得ブロック129aが、図7のステップS701~ステップS702で検出した主被写体の被写体検出結果(検出タイプ、検出領域)を取得する。 In step S1201, the focus adjustment unit 129 acquires the subject detection results (detection type, detection area) of the main subject detected by the acquisition block 129a in steps S701 and S702 of FIG. 7.

ステップS1202では、焦点調節部129は、ステップS1201で取得した主被写体の検出領域の中心位置を基準に測距領域を設定する。主被写体位置を基準に測距領域を設定することで、同時に演算可能な測距点数が限られていた場合であっても、主被写体近傍の測距結果を高密度に得ることができる。そして、その中から最適な測距結果を選択することで、主被写体へ適切に合焦させることが可能となる。被写体が非検出の状態の場合には、中央像高を中心位置として測距領域を設定する。 In step S1202, the focus adjustment unit 129 sets a ranging area based on the center position of the detection area of the main subject acquired in step S1201. By setting the ranging area based on the main subject position, it is possible to obtain ranging results near the main subject at a high density even if the number of ranging points that can be calculated simultaneously is limited. Then, by selecting the optimal ranging result from among them, it becomes possible to properly focus on the main subject. When the subject is not detected, the ranging area is set with the central image height as the center position.

ステップS1203では、焦点調節部129は、算出ブロック129bが、ステップS1202で設定した測距領域内の各測距点のデフォーカス量を算出する。デフォーカス量算出処理については後述する。 In step S1203, the calculation block 129b of the focus adjustment unit 129 calculates the defocus amount for each ranging point within the ranging area set in step S1202. The defocus amount calculation process will be described later.

ステップS1204では、焦点調節部129は、ステップS1201で取得した被写体検出結果の検出状態が、被写体を検出した状態か非検出の状態かを判定する。非検出の状態の場合はステップS1205へ進み、ステップS1205では、画像の全範囲を対象としたデフォーカス範囲を取得する。被写体を検出した状態の場合はステップS1206へ進む。 In step S1204, the focus adjustment unit 129 determines whether the detection state of the subject detection result acquired in step S1201 is a state in which a subject has been detected or a state in which a subject has not been detected. If it is a state in which a subject has not been detected, the process proceeds to step S1205, where a defocus range that covers the entire range of the image is acquired. If it is a state in which a subject has been detected, the process proceeds to step S1206.

ステップS1206では、焦点調節部129は、AFモードがサーボAFであるか否かを判定する。サーボAFの場合は、被写体の動きに合わせてAF制御を継続するため、基本的に被写体近傍にピントが合っている状態である。サーボAFでない場合はステップS1207へ進み、ステップS1201で取得した被写体検出結果に応じたデフォーカス耐性に基づくデフォーカス範囲を取得する。被写体検出結果に応じたデフォーカス耐性に基づくデフォーカス範囲は、表2に示すように、被写体の種類、位置、サイズによって異なる。なお、実施形態2では、被写体の種類、位置、サイズによって異なるデフォーカス範囲を設定しているが、これに限らず、被写体の種類のみに基づいてデフォーカス範囲を設定してもよい。被写体の検出状態では、被写体は、被写体検出性能のデフォーカス耐性よりも大きいデフォーカス量とはならない。言い換えれば、被写体がデフォーカス耐性よりも大きいデフォーカス量であった場合、被写体検出結果は非検出状態となる。そのため、デフォーカス耐性に基づくデフォーカス範囲は、被写体の可能性が高いデフォーカス範囲であることを意味する。ステップS1206でサーボAFの場合はステップS1208に進む。 In step S1206, the focus adjustment unit 129 determines whether the AF mode is servo AF. In the case of servo AF, the AF control is continued according to the movement of the subject, so that the focus is basically on the vicinity of the subject. If not servo AF, proceed to step S1207 and acquire a defocus range based on the defocus resistance according to the subject detection result acquired in step S1201. The defocus range based on the defocus resistance according to the subject detection result differs depending on the type, position, and size of the subject, as shown in Table 2. In the second embodiment, the defocus range is set depending on the type, position, and size of the subject, but this is not limited to this, and the defocus range may be set based only on the type of subject. In the subject detection state, the subject does not have a defocus amount larger than the defocus resistance of the subject detection performance. In other words, if the defocus amount of the subject is larger than the defocus resistance, the subject detection result is a non-detection state. Therefore, the defocus range based on the defocus resistance means that the defocus range is a defocus range with a high possibility of being the subject. In the case of servo AF in step S1206, proceed to step S1208.

ステップS1208では、焦点調節部129は、取得ブロック129aが、被写体検出結果に応じた被写体奥行き倍率を取得する。被写体検出結果に応じた被写体奥行き倍率は、表2に示すように、被写体種類によって異なる。なお、実施形態2では、被写体の種類によって異なる奥行き倍率を設定しているが、これに限らず、被写体の位置やサイズによって異なる奥行き倍率を設定してもよい。被写体奥行き倍率は、被写体サイズに対する被写体の奥行きを倍率で表したものである。図13は被写体奥行き倍率の説明図であり、図11の被写体1101に対して、最大の被写体サイズ(h1、w1)に対する被写体奥行き倍率がγ1倍であることを示している。実施形態2では、最大の被写体サイズ(h1、w1)に対する倍率により被写体奥行きを表しているが、これに限らず、h1、w1のいずれかに対する倍率で表してもよいし、(h1、w1)の大きい方と同サイズ(γ1=1)としてもよい。 In step S1208, the acquisition block 129a of the focus adjustment unit 129 acquires a subject depth magnification according to the subject detection result. The subject depth magnification according to the subject detection result differs depending on the subject type, as shown in Table 2. In the second embodiment, a different depth magnification is set depending on the type of subject, but this is not limited to this, and a different depth magnification may be set depending on the position or size of the subject. The subject depth magnification represents the subject depth relative to the subject size as a magnification. FIG. 13 is an explanatory diagram of the subject depth magnification, and shows that the subject depth magnification for the maximum subject size (h1, w1) is γ1 times for the subject 1101 in FIG. 11. In the second embodiment, the subject depth is represented by a magnification for the maximum subject size (h1, w1), but this is not limited to this, and it may be represented by a magnification for either h1 or w1, or it may be the same size as the larger of (h1, w1) (γ1=1).

ステップS1209では、焦点調節部129は、取得ブロック129aが、レンズユニット100の光学情報を取得する。 In step S1209, the focus adjustment unit 129 acquires optical information of the lens unit 100 via the acquisition block 129a.

ステップS1210では、焦点調節部129は、算出ブロック129bが、ステップS1201で取得した被写体検出結果の被写体サイズ、ステップS1208で取得した被写体奥行き倍率、ステップS1209で取得した光学情報の焦点距離と現在の被写体距離から、実空間上での被写体の想定奥行きサイズを算出する。被写体サイズを(h、w)、被写体奥行き倍率をγ、焦点距離をf、被写体距離をzとすると想定被写体奥行きサイズΔzは式1で表される。
(式1)
Δz=(z/f)max(h,w)γ
ステップS1211では、焦点調節部129は、算出ブロック129bが、ステップS1210で算出した想定奥行きサイズに基づいてデフォーカス範囲を算出する。焦点調節部129は、実空間上での想定奥行きサイズΔzから、像面上での被写体内深度差Δdefを算出し、被写体内深度差Δdefをデフォーカス範囲として取得する。被写体内深度差Δdefは式2で表される。
(式2)
Δdef=(f/z)2Δz=(f/z)max(h,w)γ
ステップS1212では、焦点調節部129は、ステップS1201で取得した被写体領域のうち、ステップS1205、ステップS1207、ステップS1211のいずれかで取得したデフォーカス範囲内の検出領域を第1領域に、それ以外の検出領域を第2領域に設定する。図14は、第1領域、第2領域の説明図である。図14の1401、1402は、図11の被写体領域1102に対して、ステップS1201で取得した被写体領域、ステップS1205、ステップS1207、ステップS1211のいずれかで取得したデフォーカス範囲から設定された測距領域内の第1領域、第2領域を示している。図14の1400_nはステップS1202で設定された測距領域内の測距点である。図14(a)は、各測距点から取得した信号に対して第1領域、第2領域の設定した状態を示している。図14(b)は、ステップS1202で測距領域を設定しステップS1203で算出したデフォーカス量(def)に基づいて、測距点分布を3段階(def<Def2、-Def2≦def≦Def2、-Def2<def)で分類した状態を示している。図14(a)で花の部分は、図14(b)で、def<Def2となっており、ステップS1205、ステップS1207、ステップS1211のいずれかで取得したデフォーカス範囲よりも至近側となっている。図14(a)で背景の部分は、図14(b)で、-Def2<defとなっており、ステップS1205、ステップS1207、ステップS1211のいずれかで取得したデフォーカス範囲よりも無限遠側となっている。このように、花や背景は、ステップS1205、ステップS1207、ステップS1211のいずれかで取得したデフォーカス範囲外となっており、第2領域として設定される。
In step S1210, the calculation block 129b of the focus adjustment unit 129 calculates an estimated depth size of the subject in real space from the subject size of the subject detection result acquired in step S1201, the subject depth magnification acquired in step S1208, and the focal length and current subject distance of the optical information acquired in step S1209. If the subject size is (h, w), the subject depth magnification is γ, the focal length is f, and the subject distance is z, the estimated subject depth size Δz is expressed by Equation 1.
(Equation 1)
Δz=(z/f)max(h,w)γ
In step S1211, the focus adjustment unit 129 calculates a defocus range based on the assumed depth size calculated by the calculation block 129b in step S1210. The focus adjustment unit 129 calculates a depth difference Δdef in the subject on the image plane from the assumed depth size Δz in the real space, and acquires the depth difference Δdef in the subject as a defocus range. The depth difference Δdef in the subject is expressed by Equation 2.
(Equation 2)
Δdef=(f/z)2Δz=(f/z)max(h,w)γ
In step S1212, the focus adjustment unit 129 sets the detection area within the defocus range acquired in any one of steps S1205, S1207, and S1211 of the object area acquired in step S1201 as the first area, and the other detection areas as the second area. FIG. 14 is an explanatory diagram of the first area and the second area. 1401 and 1402 in FIG. 14 indicate the first area and the second area in the ranging area set from the object area acquired in step S1201 and the defocus range acquired in any one of steps S1205, S1207, and S1211 for the object area 1102 in FIG. 11. 1400_n in FIG. 14 is a ranging point in the ranging area set in step S1202. FIG. 14(a) shows the state in which the first area and the second area are set for the signal acquired from each ranging point. Fig. 14B shows a state in which the distribution of distance measurement points is classified into three stages (def<Def2, -Def2≦def≦Def2, -Def2<def) based on the defocus amount (def) calculated in step S1203 after setting the distance measurement area in step S1202. The flower part in Fig. 14A has def<Def2 in Fig. 14B, which is closer to the defocus range obtained in any of steps S1205, S1207, and S1211. The background part in Fig. 14A has -Def2<def in Fig. 14B, which is closer to the infinity side to the defocus range obtained in any of steps S1205, S1207, and S1211. In this way, the flowers and the background are outside the defocus range acquired in step S1205, step S1207, or step S1211, and are set as the second region.

ステップS1213では、焦点調節部129は、ステップS1212で設定した、第1領域、第2領域の優先順位に基づいて測距点を選択する。まず、最も優先順位の高い第1領域内の測距点の中で、被写体検出結果の信頼性が所定の閾値より高い測距点が存在する場合、その中で最至近のデフォーカス量を検出している測距点を選択する。次に、第1領域内に、信頼性が所定の閾値より高い測距点が存在しない場合、次に優先順位の高い第2領域の測距点の中で、信頼性が所定の閾値より高い測距点の中で最至近のデフォーカス量を検出している測距点を選択する。このように、優先順位の高い領域の中から優先して測距点を選択することで、被写体(検出対象)である領域における測距点を選択することができ、検出領域内に、検出対象以外が含まれる場合でも被写体(検出対象)に対して適切な測距を行うことが可能となる。 In step S1213, the focus adjustment unit 129 selects a ranging point based on the priority order of the first and second regions set in step S1212. First, if there is a ranging point in the first region with the highest priority order whose subject detection result has a reliability higher than a predetermined threshold, the ranging point that detects the closest defocus amount is selected. Next, if there is no ranging point in the first region with a reliability higher than a predetermined threshold, the ranging point that detects the closest defocus amount is selected from among the ranging points in the second region with the next highest priority order whose reliability is higher than a predetermined threshold. In this way, by preferentially selecting ranging points from the regions with high priority order, it is possible to select a ranging point in the region that is the subject (detection target), and it is possible to perform appropriate distance measurement for the subject (detection target) even if the detection region includes something other than the detection target.

本実施形態では、第1領域内で最至近のデフォーカス量を検出している測距点を選択したが、これに限定されるものではない。例えば、ステップS1212で設定した第1領域内のデフォーカス量のヒストグラムを算出し、ヒストグラムの最頻値のデフォーカス量を検出している測距点を選択してもよい。また、本実施形態では、ステップS1205、ステップS1207、ステップS1211のいずれかで取得したデフォーカス範囲に基づいて、第1領域を設定し、第1領域内から測距点選択を行ったが、これに限定されるものではない。例えば、第1領域を設定せずに、測距領域全体からデフォーカス量のヒストグラムを算出し、ヒストグラム算出の際に、ステップS1205、ステップS1207、ステップS1211のいずれかで取得したデフォーカス範囲外のデフォーカス量は、ヒストグラム算出から除外する(頻度カウントしない)としてもよい。 In this embodiment, the ranging point that detects the closest defocus amount in the first region is selected, but this is not limited to this. For example, a histogram of the defocus amount in the first region set in step S1212 may be calculated, and the ranging point that detects the most frequent defocus amount in the histogram may be selected. In addition, in this embodiment, the first region is set based on the defocus range acquired in any of steps S1205, S1207, and S1211, and the ranging point is selected from within the first region, but this is not limited to this. For example, the first region may not be set, and a histogram of the defocus amount may be calculated from the entire ranging region, and when the histogram is calculated, the defocus amount outside the defocus range acquired in any of steps S1205, S1207, and S1211 may be excluded from the histogram calculation (frequency counting is not performed).

ステップS1214では、焦点調節部129は、算出ブロック129bが、ステップS1213で選択した測距点のデフォーカス量に基づいてフォーカスレンズ駆動量を算出する。 In step S1214, the calculation block 129b of the focus adjustment unit 129 calculates the focus lens driving amount based on the defocus amount of the range-finding point selected in step S1213.

ステップS1215では、焦点調節部129は、ステップS1214で算出したフォーカスレンズ駆動量に基づいてフォーカスレンズを駆動する。ステップS1215を終えると処理を終了する。 In step S1215, the focus adjustment unit 129 drives the focus lens based on the focus lens drive amount calculated in step S1214. After step S1215, the process ends.

<ホワイトバランス調整処理>次に、図15を参照して、実施形態2のホワイトバランス調整処理(図7のステップS705)について説明する。 <White balance adjustment process> Next, the white balance adjustment process of the second embodiment (step S705 in FIG. 7) will be described with reference to FIG. 15.

図15は、実施形態2のホワイトバランス調整処理のフローチャートを示している。なお、図15の処理は、ホワイトバランス調整部132によって実行される。 Figure 15 shows a flowchart of the white balance adjustment process in embodiment 2. Note that the process in Figure 15 is executed by the white balance adjustment unit 132.

ステップS1501では、ホワイトバランス調整部132は、図7のステップS701~ステップS702で検出した主被写体の被写体検出結果を取得する。 In step S1501, the white balance adjustment unit 132 obtains the subject detection result of the main subject detected in steps S701 and S702 of FIG. 7.

ステップS1502では、ホワイトバランス調整部132は、図12のステップS1212で設定された第1領域をカメラMPU125から取得する。 In step S1502, the white balance adjustment unit 132 acquires the first area set in step S1212 of FIG. 12 from the camera MPU 125.

ステップS1503では、ホワイトバランス調整部132は、ステップS1502で取得した第1領域内のホワイトバランスのパラメータを算出する。本実施形態では、第1領域内のホワイトバランスのパラメータを算出したが、これに限らず、第1領域と第2領域に重みをつけてホワイトバランスのパラメータを算出してもよい。 In step S1503, the white balance adjustment unit 132 calculates the white balance parameters in the first region acquired in step S1502. In this embodiment, the white balance parameters in the first region are calculated, but this is not limited thereto, and the white balance parameters may be calculated by weighting the first region and the second region.

ステップS1504では、ホワイトバランス調整部132は、予め定められた適切なホワイトバランスのパラメータを取得する。 In step S1504, the white balance adjustment unit 132 acquires predetermined appropriate white balance parameters.

ステップS1505では、ホワイトバランス調整部132は、ステップS1503で算出したホワイトバランスのパラメータと、ステップS1504で取得したホワイトのパラメータの差に基づき、撮像信号に対するホワイトバランスを調整する。ステップS1505を終えると処理を終了する。 In step S1505, the white balance adjustment unit 132 adjusts the white balance for the imaging signal based on the difference between the white balance parameters calculated in step S1503 and the white parameters acquired in step S1504. After step S1505, the process ends.

<露光調節処理>次に、図16を参照して、実施形態2の露光調節処理(図7のS706)について説明する。 <Exposure adjustment process> Next, the exposure adjustment process (S706 in FIG. 7) of the second embodiment will be described with reference to FIG. 16.

図16は、実施形態2の露光調節処理のフローチャートを示している。なお、図16の処理は、露光調節部131によって実行される。 Figure 16 shows a flowchart of the exposure adjustment process in embodiment 2. Note that the process in Figure 16 is executed by the exposure adjustment unit 131.

ステップS1604では、露光調節部131は、図7のステップS701~ステップS702で検出した主被写体の被写体検出結果を取得する。 In step S1604, the exposure adjustment unit 131 obtains the subject detection result of the main subject detected in steps S701 and S702 of FIG. 7.

ステップS1602では、露光調節部131は、図12のステップS1212で設定した第1領域、第2領域をカメラMPU125から取得する。 In step S1602, the exposure adjustment unit 131 acquires the first and second areas set in step S1212 of FIG. 12 from the camera MPU 125.

ステップS1603では、露光調節部131は、ステップS1602で取得した第1領域、第2領域に重みづけを設定する。 In step S1603, the exposure adjustment unit 131 sets weights for the first and second regions obtained in step S1602.

ステップS1604では、露光調節部131は、ステップS1603で設定した第1領域、第2領域の重みづけに応じて、第1領域、第2領域の測光結果を重みづけして露光量を算出する。本実施形態では、第1領域、第2領域に重みづけして露光量を算出したが、これに限らず、第1領域のみから露光量を算出してもよい。 In step S1604, the exposure adjustment unit 131 calculates the amount of exposure by weighting the photometry results of the first and second regions according to the weightings for the first and second regions set in step S1603. In this embodiment, the amount of exposure is calculated by weighting the first and second regions, but this is not limiting, and the amount of exposure may be calculated only from the first region.

ステップS1605では、露光調節部131は、予め定められた適切な露光量を取得する。 In step S1605, the exposure adjustment unit 131 obtains a predetermined appropriate exposure amount.

ステップS1606では、露光調節部131は、ステップS1604で算出した露光量と、ステップS1605で取得した露光量の差を演算し、撮影時の露光条件を調整する。ステップS1606を終えると処理を終了する。 In step S1606, the exposure adjustment unit 131 calculates the difference between the exposure amount calculated in step S1604 and the exposure amount acquired in step S1605, and adjusts the exposure conditions during shooting. After step S1606, the process ends.

<デフォーカス量算出処理>次に、図17を参照して、図12のステップS1203におけるデフォーカス量算出処理について説明する。 <Defocus amount calculation process> Next, the defocus amount calculation process in step S1203 in FIG. 12 will be described with reference to FIG. 17.

図17は、実施形態2のデフォーカス量算出処理のフローチャートを示している。なお、図17の処理は、焦点調節部129によって実行される。 Figure 17 shows a flowchart of the defocus amount calculation process in embodiment 2. Note that the process in Figure 17 is executed by the focus adjustment unit 129.

ステップS1701では、焦点調節部129は、取得ブロック129aが、焦点検出信号、被写体検出結果を取得する。 In step S1701, the acquisition block 129a of the focus adjustment unit 129 acquires the focus detection signal and subject detection results.

ステップS1702では、焦点調節部129は、ステップS1701で取得した焦点検出信号に対してフィルタ処理を行う。 In step S1702, the focus adjustment unit 129 performs filter processing on the focus detection signal acquired in step S1701.

ステップS1703では、焦点調節部129は、算出ブロック129bが、ステップS1702でフィルタ処理を行った焦点検出信号に対して相関演算を行う。 In step S1703, the calculation block 129b of the focus adjustment unit 129 performs a correlation calculation on the focus detection signal that was filtered in step S1702.

ステップS1704では、焦点調節部129は、ステップS1701で取得した被写体検出結果が、被写体を検出した状態であるか、非検出の状態であるかを判定する。非検出の場合はステップ14905へ進み、ステップS1705では、画像の全範囲を対象としたデフォーカス範囲を取得する。被写体を検出した状態の場合はステップS1706に進む。 In step S1704, the focus adjustment unit 129 determines whether the subject detection result acquired in step S1701 indicates a state in which a subject has been detected or not. If a subject has not been detected, the process proceeds to step S14905, and in step S1705, a defocus range that covers the entire range of the image is acquired. If a subject has been detected, the process proceeds to step S1706.

ステップS1706では、焦点調節部129は、AFモードがサーボAFであるか否かを判定する。サーボAFでない場合はステップS1707へ進み、ステップS1701で取得した被写体検出結果に応じたデフォーカス耐性に基づくデフォーカス範囲を取得する。サーボAFの場合はステップS1708へ進む。 In step S1706, the focus adjustment unit 129 determines whether the AF mode is servo AF. If it is not servo AF, the process proceeds to step S1707, where the defocus range is obtained based on the defocus resistance according to the subject detection result obtained in step S1701. If it is servo AF, the process proceeds to step S1708.

ステップS1708では、焦点調節部129は、取得ブロック129aが、被写体検出結果に応じた被写体奥行き倍率を取得する。 In step S1708, the focus adjustment unit 129 causes the acquisition block 129a to acquire a subject depth magnification according to the subject detection result.

ステップS1709では、焦点調節部129は、取得ブロック129aが、レンズユニット100の光学情報を取得する。 In step S1709, the focus adjustment unit 129 acquires optical information of the lens unit 100 via the acquisition block 129a.

ステップS1710では、焦点調節部129は、算出ブロック129bが、ステップS1701で取得した被写体検出結果の被写体サイズ、ステップS1708で取得した被写体奥行き倍率、ステップS1709で取得した光学情報の焦点距離と現在の被写体距離から、実空間上での被写体の想定奥行きサイズを式1により算出する。 In step S1710, the calculation block 129b of the focus adjustment unit 129 calculates the estimated depth size of the subject in real space using Equation 1 from the subject size of the subject detection result obtained in step S1701, the subject depth magnification obtained in step S1708, the focal length of the optical information obtained in step S1709, and the current subject distance.

ステップS1711では、焦点調節部129は、取得ブロック129aが、ステップS1710で算出した実空間上での想定奥行きサイズから、像面上での被写体内深度差Δdefを式2により算出し、被写体内深度差Δdefをデフォーカス範囲として取得する。 In step S1711, the focus adjustment unit 129 calculates the subject depth difference Δdef on the image plane using Equation 2 from the assumed depth size in real space calculated by the acquisition block 129a in step S1710, and acquires the subject depth difference Δdef as the defocus range.

ステップS1712では、焦点調節部129は、ステップS1703の相関演算で算出された相関値の中から、ステップS1705、ステップS1707、ステップS1711のいずれかで取得したデフォーカス範囲内で、信頼性最大極値を選択する。 In step S1712, the focus adjustment unit 129 selects the maximum reliability extreme value from among the correlation values calculated by the correlation calculation in step S1703, within the defocus range obtained in any one of steps S1705, S1707, or S1711.

図18は、ステップS1712で選択される相関量の極値の説明図である。図18の1801は相関演算で算出された相関値であり、図18の1802は、ステップS1705、ステップS1707、ステップS1711のいずれかで取得したデフォーカス範囲、図18の1803、1804は相関量の極小値である。実施形態2では、図11の被写体1102が検出された場合の-Def2≦def≦Def2の例を説明する。1つの測距点内に被写体と、被写体とは距離の異なる障害物などが混在している場合、図18の1803、1804ように相関量の極小値が2つとなる場合がある。このような場合、どちらが被写体かを判別できない。そこで、実施形態2では、ステップS1705、ステップS1707、ステップS1711のいずれかで取得したデフォーカス範囲に限定して極小値を選択することで、明らかに被写体ではない極小値1804を選択から除外することが可能となる。 Figure 18 is an explanatory diagram of the extreme value of the correlation amount selected in step S1712. 1801 in Figure 18 is the correlation value calculated by the correlation calculation, 1802 in Figure 18 is the defocus range acquired in any of steps S1705, S1707, or S1711, and 1803 and 1804 in Figure 18 are the minimum values of the correlation amount. In the second embodiment, an example of -Def2 ≦ def ≦ Def2 when the subject 1102 in Figure 11 is detected will be described. If a subject and an obstacle at a different distance from the subject are mixed within one ranging point, there may be two minimum values of the correlation amount, as shown in 1803 and 1804 in Figure 18. In such a case, it is not possible to determine which is the subject. Therefore, in the second embodiment, by selecting the minimum value within the defocus range acquired in step S1705, step S1707, or step S1711, it is possible to exclude from the selection the minimum value 1804 that is clearly not the subject.

ステップS1713では、焦点調節部129は、ステップS1712で選択した極値のデフォーカス量を算出する。ステップS1713を終えると処理を終了する。 In step S1713, the focus adjustment unit 129 calculates the defocus amount of the extreme value selected in step S1712. After step S1713, the process ends.

以上のように、実施形態2によれば、被写体検出性能のデフォーカス耐性から設定されるデフォーカス範囲内または被写体サイズから想定される被写体奥行き情報からデフォーカス範囲を取得し、デフォーカス範囲内の領域とそれ以外の領域の優先順位に基づいて処理(焦点調節、ホワイトバランス調整、露光調節)を行う被写体領域を選択する。これにより、検出領域内に検出対象以外の被写体が含まれる場合であっても、検出対象の被写体に対して適切な処理を行うことが可能となる。 As described above, according to the second embodiment, the defocus range is obtained from the defocus range set based on the defocus resistance of the subject detection performance or from subject depth information assumed from the subject size, and the subject area to be processed (focus adjustment, white balance adjustment, exposure adjustment) is selected based on the priority order of the area within the defocus range and the area outside it. This makes it possible to perform appropriate processing on the subject to be detected, even if the detection area includes a subject other than the detection target.

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

発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the above-described embodiment, and various modifications and variations are possible without departing from the spirit and scope of the invention. Therefore, the following claims are appended to disclose the scope of the invention.

10…撮像装置、100…レンズユニット、117…レンズMPU、120…カメラ本体、125…カメラMPU、129…焦点調節部、130…被写体検出部、131…露光調節部、132…ホワイトバランス調整部 10: Imaging device, 100: Lens unit, 117: Lens MPU, 120: Camera body, 125: Camera MPU, 129: Focus adjustment unit, 130: Subject detection unit, 131: Exposure adjustment unit, 132: White balance adjustment unit

Claims (9)

被写体像を撮像して画像信号を生成する撮像手段と、
前記撮像手段により撮像された異なる視差の画像信号を用いて焦点検出を行う焦点調節手段と、
前記画像信号を用いて被写体を検出する被写体検出手段と、
前記焦点検出を含む処理を行う領域のサイズを設定する設定手段と、を有し、
前記設定手段は、前記被写体検出手段により検出された被写体の検出結果および焦点調節動作のモードに応じた倍率で、前記焦点検出を含む処理を行う領域のサイズを設定することを特徴とする撮像装置。
an imaging means for capturing an image of a subject and generating an image signal;
a focus adjustment means for performing focus detection using image signals of different parallaxes captured by the imaging means;
an object detection means for detecting an object using the image signal;
a setting unit for setting a size of an area in which the processing including focus detection is performed,
an imaging device characterized in that the setting means sets the size of an area in which processing including focus detection is performed at a magnification corresponding to the detection result of the subject detected by the subject detection means and the mode of focus adjustment operation.
記焦点調節動作のモードは、静止している被写体にピントを固定するワンショットAFと、動いている被写体にピントを合わせ続けるサーボAFを含み、
前記被写体の検出結果は、前記被写体の種類、部位および状態の少なくともいずれかを含む検出タイプと、前記被写体の位置およびサイズを含む検出領域とを含み、
前記被写体の状態は、前記被写体が動いている状態または静止している状態を含むことを特徴とする請求項に記載の撮像装置。
The focus adjustment operation modes include one-shot AF, which fixes the focus on a stationary subject, and servo AF, which keeps the focus on a moving subject;
the subject detection result includes a detection type including at least one of a type, a part, and a state of the subject, and a detection area including a position and a size of the subject;
2. The imaging apparatus according to claim 1 , wherein the state of the subject includes a state in which the subject is moving or a state in which the subject is stationary.
前記設定手段は、前記倍率に基づいて前記焦点検出を行う被写体の視野長を設定することを特徴とする請求項またはに記載の撮像装置。 3. The image pickup apparatus according to claim 1 , wherein the setting means sets a viewing length of the subject for which the focus detection is performed based on the magnification. 前記設定手段は、被写体の移動量が所定より小さい場合には前記倍率を小さくして前記視野長が短くなるように設定し、被写体の移動量が所定より大きい場合には前記倍率を大きくして前記視野長が長くなるように設定することを特徴とする請求項に記載の撮像装置。 4. The imaging device according to claim 3, wherein the setting means sets the magnification to be smaller so that the field of view length is shorter when the amount of movement of the subject is smaller than a predetermined value, and sets the magnification to be larger so that the field of view length is longer when the amount of movement of the subject is larger than the predetermined value . 前記焦点検出を含む処理は、ホワイトバランス調整および露光調節を含むことを特徴とする請求項1からのいずれか1項に記載の撮像装置。 5. The image pickup apparatus according to claim 1, wherein the process including focus detection includes white balance adjustment and exposure adjustment. 前記焦点調節手段は、前記撮像手段における光学系の互いに異なる瞳領域を通過する光束を受光する第1光電変換部の信号および第2光電変換部の信号に基づいて前記焦点検出を行うことを特徴とする請求項1からのいずれか1項に記載の撮像装置。 6. The imaging device according to claim 1, wherein the focus adjustment means performs the focus detection based on a signal from a first photoelectric conversion unit and a signal from a second photoelectric conversion unit that receive light beams passing through different pupil regions of an optical system in the imaging means. 被写体像を撮像して画像信号を生成する撮像手段と、前記撮像手段により撮像された異なる視差の画像信号を用いて焦点検出を行う焦点調節手段と、を有する撮像装置の制御方法であって、
前記画像信号を用いて被写体を検出する検出ステップと、
前記焦点検出を含む処理を行う領域のサイズを設定する設定ステップと、を有し、
前記設定ステップでは、前記検出ステップにより検出された被写体の検出結果および焦点調節動作のモードに応じた倍率で、前記焦点検出を含む処理を行う領域のサイズを設定することを特徴とする制御方法。
A method for controlling an imaging apparatus having an imaging means for capturing an image of a subject and generating an image signal, and a focus adjustment means for performing focus detection using image signals of different parallaxes captured by the imaging means, comprising the steps of:
a detection step of detecting a subject using the image signal;
a setting step of setting a size of an area in which the processing including focus detection is performed,
A control method characterized in that, in the setting step , the size of an area in which processing including the focus detection is performed is set at a magnification corresponding to the detection result of the subject detected in the detection step and the mode of focus adjustment operation.
コンピュータを、請求項1からのいずれか1項に記載された撮像装置として機能させるためのプログラム。 A program for causing a computer to function as the imaging device according to any one of claims 1 to 6 . コンピュータを、請求項1からのいずれか1項に記載された撮像装置として機能させるためのプログラムを記憶したコンピュータによる読み取りが可能な記憶媒体。 A computer-readable storage medium storing a program for causing a computer to function as the imaging device according to any one of claims 1 to 6 .
JP2020053144A 2020-03-24 2020-03-24 Imaging device, control method thereof, program, and storage medium Active JP7522571B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020053144A JP7522571B2 (en) 2020-03-24 2020-03-24 Imaging device, control method thereof, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020053144A JP7522571B2 (en) 2020-03-24 2020-03-24 Imaging device, control method thereof, program, and storage medium

Publications (2)

Publication Number Publication Date
JP2021152600A JP2021152600A (en) 2021-09-30
JP7522571B2 true JP7522571B2 (en) 2024-07-25

Family

ID=77886519

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020053144A Active JP7522571B2 (en) 2020-03-24 2020-03-24 Imaging device, control method thereof, program, and storage medium

Country Status (1)

Country Link
JP (1) JP7522571B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7844159B2 (en) * 2021-12-24 2026-04-13 キヤノン株式会社 Image processing apparatus and image processing method, and imaging apparatus
JP2023112383A (en) 2022-02-01 2023-08-14 キヤノン株式会社 Focus detection device and imaging device
JP7771308B1 (en) 2024-08-30 2025-11-17 アキュートロジック株式会社 Focus adjustment device and control method thereof, imaging device, and computer-readable storage medium
JP7741264B1 (en) 2024-09-02 2025-09-17 アキュートロジック株式会社 Focus adjustment device control method, focus adjustment device, and imaging device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007233032A (en) 2006-03-01 2007-09-13 Nikon Corp Focus adjustment device and imaging device
JP2008175995A (en) 2007-01-18 2008-07-31 Ricoh Co Ltd Imaging device
JP2013029803A (en) 2011-06-22 2013-02-07 Canon Inc Focus detection device
JP2015022058A (en) 2013-07-17 2015-02-02 キヤノン株式会社 Focus detection apparatus and imaging apparatus
JP2016065989A (en) 2014-09-25 2016-04-28 キヤノン株式会社 FOCUS DETECTION DEVICE, FOCUS DETECTION METHOD AND PROGRAM, AND IMAGING DEVICE
JP2018091977A (en) 2016-12-02 2018-06-14 キヤノン株式会社 Focus controller, imaging apparatus, focus control method, and focus control program
JP2019020544A (en) 2017-07-14 2019-02-07 キヤノン株式会社 Camera with touch panel

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007233032A (en) 2006-03-01 2007-09-13 Nikon Corp Focus adjustment device and imaging device
JP2008175995A (en) 2007-01-18 2008-07-31 Ricoh Co Ltd Imaging device
JP2013029803A (en) 2011-06-22 2013-02-07 Canon Inc Focus detection device
JP2015022058A (en) 2013-07-17 2015-02-02 キヤノン株式会社 Focus detection apparatus and imaging apparatus
JP2016065989A (en) 2014-09-25 2016-04-28 キヤノン株式会社 FOCUS DETECTION DEVICE, FOCUS DETECTION METHOD AND PROGRAM, AND IMAGING DEVICE
JP2018091977A (en) 2016-12-02 2018-06-14 キヤノン株式会社 Focus controller, imaging apparatus, focus control method, and focus control program
JP2019020544A (en) 2017-07-14 2019-02-07 キヤノン株式会社 Camera with touch panel

Also Published As

Publication number Publication date
JP2021152600A (en) 2021-09-30

Similar Documents

Publication Publication Date Title
JP5898501B2 (en) Image processing apparatus, imaging apparatus, control method, program, and recording medium
US8749697B2 (en) Image capturing apparatus and control method thereof
US9681037B2 (en) Imaging apparatus and its control method and program
JP7522571B2 (en) Imaging device, control method thereof, program, and storage medium
US9420261B2 (en) Image capturing apparatus, method of controlling the same and program
JP2013145314A5 (en)
US9247122B2 (en) Focus adjustment apparatus and control method therefor
WO2016139895A1 (en) Image processing apparatus, image pickup apparatus, image processing method, program, and storage medium
JP4995002B2 (en) Imaging device, focusing device, imaging method, and focusing method
JP7737237B2 (en) Subject tracking device, imaging device, subject tracking method, and program
JP2025142229A (en) Imaging device and control method therefor
JP7324160B2 (en) Shooting control device, imaging device, shooting control method, and program
JP7395326B2 (en) Lens device, imaging device, communication method, and program
JP7706929B2 (en) Imaging device and control method thereof
JP5240591B2 (en) Imaging device, focusing device, imaging method, and focusing method
US11729502B2 (en) Apparatus including focusing function and method of the same
JP7614737B2 (en) Photographing control device, imaging device, photographing control method, and program
JP2024118274A (en) Inference device, imaging device, learning device, inference method, learning method, and program
US9602701B2 (en) Image-pickup apparatus for forming a plurality of optical images of an object, control method thereof, and non-transitory computer-readable medium therefor
JP2017219786A (en) Control device, imaging device, control method, program, and storage medium
JP7753293B2 (en) Imaging device and control method thereof
JP2016071275A (en) Imaging apparatus and focus control program
JP2025170647A (en) Information processing device, imaging device, control method and program
US20260006324A1 (en) Focus detecting apparatus, image pickup apparatus, focus detecting method, and storage medium
US20240284043A1 (en) Apparatus, control method for apparatus, and storage medium

Legal Events

Date Code Title Description
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

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230317

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240119

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240315

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240712

R150 Certificate of patent or registration of utility model

Ref document number: 7522571

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150