JP2019144462A - Image capturing device, control method therefor, and program - Google Patents

Image capturing device, control method therefor, and program Download PDF

Info

Publication number
JP2019144462A
JP2019144462A JP2018029908A JP2018029908A JP2019144462A JP 2019144462 A JP2019144462 A JP 2019144462A JP 2018029908 A JP2018029908 A JP 2018029908A JP 2018029908 A JP2018029908 A JP 2018029908A JP 2019144462 A JP2019144462 A JP 2019144462A
Authority
JP
Japan
Prior art keywords
signal
optical pattern
focus detection
image
focus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2018029908A
Other languages
Japanese (ja)
Inventor
英之 浜野
Hideyuki Hamano
英之 浜野
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 JP2018029908A priority Critical patent/JP2019144462A/en
Publication of JP2019144462A publication Critical patent/JP2019144462A/en
Pending legal-status Critical Current

Links

Images

Abstract

To achieve high focus detection accuracy regardless of the presence/absence of auxiliary light irradiation.SOLUTION: A camera MPU 125 provides control to increase the number of summation of AF-A images (first signals) and AF-B images (second signals) in the vertical direction when an optical pattern is being irradiated, compared with when the optical pattern is not irradiated, in a region where a contrast border caused by the optical pattern appears in the vertical direction when the optical pattern is irradiated.SELECTED DRAWING: Figure 6

Description

本発明は、焦点検出を補助する補助光照射機能を有する撮像装置及びその制御方法、プログラムに関する。   The present invention relates to an imaging apparatus having an auxiliary light irradiation function for assisting focus detection, a control method therefor, and a program.

従来、デジタルカメラ、ビデオカメラ等の撮像装置において、自動焦点検出(AF)方式として、コントラストAF方式と位相差AF方式が知られている。コントラストAF方式も位相差AF方式もビデオカメラやデジタルスチルカメラで多く用いられるAF方式であり、これらの装置には、撮像素子が焦点検出用センサとして用いられるものが存在する。これらのAF方式は光学像のコントラストを利用して焦点検出を行うため、十分なコントラストが得られる方が、高い焦点検出精度を実現することができる。一方で、低照度な環境では焦点検出信号のSN比が低下し、十分な焦点検出精度が得られない場合がある。この対策として、撮像素子上で異なる領域の信号を加算することが知られている。信号の加算によりSN比は改善するが、信号を加算する方向と、被写体のコントラストを生じる境界の方向とが平行でない場合には、コントラストが低下してしまい、焦点検出精度が低下する場合がある。   Conventionally, in an imaging apparatus such as a digital camera or a video camera, a contrast AF method and a phase difference AF method are known as automatic focus detection (AF) methods. Both the contrast AF method and the phase difference AF method are AF methods that are often used in video cameras and digital still cameras. Some of these apparatuses use an image sensor as a focus detection sensor. Since these AF methods perform focus detection using the contrast of an optical image, higher focus detection accuracy can be realized if sufficient contrast is obtained. On the other hand, in a low illuminance environment, the SN ratio of the focus detection signal is lowered, and sufficient focus detection accuracy may not be obtained. As a countermeasure, it is known to add signals of different areas on the image sensor. Although the signal-to-noise ratio is improved by adding signals, if the direction in which the signals are added and the direction of the boundary that causes the contrast of the subject are not parallel, the contrast is lowered and the focus detection accuracy may be lowered. .

また、低照度な環境で十分な焦点検出精度を得るために、焦点検出を補助することを目的としてAF補助光を照射する撮像装置が知られている。AF補助光としては、一様に撮像装置の前方を照明するものや、所定の模様(光学パターン)を有する光学像を被写体に対して投影するもの(パターンAF補助光)がある(特許文献1)。パターンAF補助光は、焦点検出信号のSNを改善しながら、焦点検出信号のコントラストを確保し、より高い焦点検出精度を実現するのに有効である。特許文献1では、種々のAF補助光パターン(横パターン、縦パターン、斜めパターン)を有し、状況によってそれらを切り替える。   In addition, in order to obtain sufficient focus detection accuracy in a low illuminance environment, an imaging device that emits AF auxiliary light for the purpose of assisting focus detection is known. As AF auxiliary light, there is one that uniformly illuminates the front of the imaging device, and one that projects an optical image having a predetermined pattern (optical pattern) onto a subject (pattern AF auxiliary light) (Patent Document 1). ). The pattern AF auxiliary light is effective in securing the contrast of the focus detection signal while improving the SN of the focus detection signal and realizing higher focus detection accuracy. In Patent Document 1, there are various AF auxiliary light patterns (horizontal pattern, vertical pattern, diagonal pattern), and they are switched depending on the situation.

特開2006−171147号公報JP 2006-171147 A

しかしながら、特許文献1は、焦点検出において、低照度環境での焦点検出信号のSN比低下という課題と、補助光を用いた場合のコントラスト低下という課題の双方を解決する方法を開示していない。高い焦点検出精度を実現する上で、補助光の照射と信号の処理に関し改善の余地があった。   However, Patent Document 1 does not disclose a method for solving both the problem of a decrease in the SN ratio of a focus detection signal in a low illumination environment and the problem of a decrease in contrast when auxiliary light is used in focus detection. In order to achieve high focus detection accuracy, there is room for improvement in terms of auxiliary light irradiation and signal processing.

本発明は、補助光照射の有無にかかわらず、高い焦点検出精度を実現することを目的とする。   An object of this invention is to implement | achieve high focus detection precision irrespective of the presence or absence of auxiliary light irradiation.

上記目的を達成するために本発明は、撮像光学系を通過する光束に対応する信号を、撮像素子上の第1の方向における異なる位置に対応して複数取得する取得手段と、前記取得手段により取得された前記信号を前記第1の方向において加算する加算手段と、前記加算手段により加算された信号に基づいて焦点を検出する検出手段と、焦点検出を補助する場合に、前記第1の方向と略平行な明暗差の境界を有する光学パターンを被写体へ照射する照射手段と、前記光学パターンの照射が行われることで前記第1の方向において前記光学パターンによる前記明暗差の境界が生じる領域においては、前記照射手段による前記光学パターンの照射が行われる場合は、前記光学パターンの照射が行われない場合に比し、前記加算手段による前記第1の方向における前記信号の加算数を多くするよう制御する制御手段と、を有することを特徴とする。   In order to achieve the above object, the present invention provides an acquisition unit that acquires a plurality of signals corresponding to light beams passing through an imaging optical system corresponding to different positions in a first direction on an image sensor, and the acquisition unit. An adding means for adding the acquired signals in the first direction, a detecting means for detecting a focus based on the signals added by the adding means, and the first direction when assisting focus detection An irradiation unit that irradiates a subject with an optical pattern having a light / dark difference boundary substantially parallel to the object, and a region where the light / dark difference boundary due to the optical pattern is generated in the first direction when the optical pattern is irradiated. When the irradiation of the optical pattern by the irradiating means is performed, the first method by the adding means is compared with the case of not irradiating the optical pattern. And having a control means for controlling so as to increase the addition number of the signal in.

本発明によれば、補助光照射の有無にかかわらず、高い焦点検出精度を実現することができる。   According to the present invention, high focus detection accuracy can be realized regardless of the presence or absence of auxiliary light irradiation.

撮像装置のブロック図である。It is a block diagram of an imaging device. 撮像素子の構成例を示す図である。It is a figure which shows the structural example of an image pick-up element. 光電変換領域と射出瞳との関係を示す図である。It is a figure which shows the relationship between a photoelectric conversion area | region and an exit pupil. TVAF部のブロック図である。It is a block diagram of a TVAF part. 焦点検出領域の例を示す図である。It is a figure which shows the example of a focus detection area | region. AF処理のフローチャートである。It is a flowchart of AF processing. 補助光の有無による信号生成の違いを説明するための図である。It is a figure for demonstrating the difference in the signal generation by the presence or absence of auxiliary light. 補助光の有無により焦点検出用信号生成の際の加算行数を変更する理由を説明する図である。It is a figure explaining the reason for changing the number of addition lines at the time of focus detection signal generation by presence or absence of auxiliary light. 補助光の有無により焦点検出用信号生成の際の加算行数を変更する理由を説明する図である。It is a figure explaining the reason for changing the number of addition lines at the time of focus detection signal generation by presence or absence of auxiliary light. 格子状の光学パターンを示す図である。It is a figure which shows a grid | lattice-like optical pattern.

以下、図面を参照して本発明の実施の形態を説明する。   Embodiments of the present invention will be described below with reference to the drawings.

本発明の理解と説明を容易にするため、実施の形態は具体的かつ特定の構成を有するが、本発明はそのような特定の構成に限定されない。例えば、以下では本発明をレンズ交換可能な一眼レフタイプのデジタルカメラに適用した実施形態について説明するが、本発明はレンズ交換できないタイプのデジタルカメラや、ビデオカメラに対しても適用可能である。また、本発明は、カメラを備えた任意の電子機器、例えば携帯電話機、パーソナルコンピュータ(ラップトップ、タブレット、デスクトップ型など)、ゲーム機などにも適用可能である。   In order to facilitate understanding and explanation of the present invention, the embodiments have specific and specific configurations, but the present invention is not limited to such specific configurations. For example, an embodiment in which the present invention is applied to a single-lens reflex digital camera capable of exchanging lenses will be described below, but the present invention can also be applied to a digital camera and video camera in which lenses cannot be interchanged. The present invention can also be applied to any electronic device equipped with a camera, such as a mobile phone, a personal computer (laptop, tablet, desktop type, etc.), a game machine, and the like.

(撮像装置の構成の説明−レンズユニット)
図1は、本発明の一実施の形態に係る撮像装置のブロック図である。この撮像装置は、一例としてレンズ交換式一眼レフデジタルカメラであり、レンズユニット100とカメラ本体120とを有する。レンズユニット100は図1中央の点線で示されるマウントMを介して、カメラ本体120に装着される。
(Description of configuration of imaging apparatus-lens unit)
FIG. 1 is a block diagram of an imaging apparatus according to an embodiment of the present invention. This imaging apparatus is, for example, a lens interchangeable single-lens reflex digital camera, and includes a lens unit 100 and a camera body 120. The lens unit 100 is attached to the camera body 120 via a mount M indicated by a dotted line in the center of FIG.

レンズユニット100は、光学系(第1レンズ群101、絞り102、第2レンズ群103、フォーカスレンズ群(以下、単に「フォーカスレンズ」という。)104)及び、駆動/制御系を有する。このようにレンズユニット100は、フォーカスレンズ104を含み、被写体の光学像を形成する撮影レンズである。   The lens unit 100 includes an optical system (a first lens group 101, a diaphragm 102, a second lens group 103, a focus lens group (hereinafter simply referred to as “focus lens”) 104), and a drive / control system. Thus, the lens unit 100 is a photographing lens that includes the focus lens 104 and forms an optical image of a subject.

第1レンズ群101はレンズユニット100の先端に配置され、光軸方向OAに移動可能に保持される。絞り102は、撮影時の光量を調節する機能のほか、静止画撮影時には露出時間を制御するメカニカルシャッタとしても機能する。絞り102及び第2レンズ群103は一体で光軸方向OAに移動可能であり、第1レンズ群101と連動して移動することによりズーム機能を実現する。フォーカスレンズ104も光軸方向OAに移動可能であり、フォーカスレンズ104の位置に応じてレンズユニット100が合焦する被写体距離(合焦距離)が変化する。フォーカスレンズ104の光軸方向OAにおける位置を制御することにより、レンズユニット100の合焦距離を調節する焦点調節が行われる。   The first lens group 101 is disposed at the tip of the lens unit 100 and is held movably in the optical axis direction OA. The aperture 102 functions as a mechanical shutter that controls the exposure time during still image shooting, in addition to the function of adjusting the amount of light during shooting. The aperture 102 and the second lens group 103 are integrally movable in the optical axis direction OA, and a zoom function is realized by moving in conjunction with the first lens group 101. The focus lens 104 is also movable in the optical axis direction OA, and the subject distance (focus distance) at which the lens unit 100 is focused changes according to the position of the focus lens 104. By controlling the position of the focus lens 104 in the optical axis direction OA, focus adjustment for adjusting the in-focus distance of the lens unit 100 is performed.

駆動/制御系は、ズームアクチュエータ111、絞りアクチュエータ112、フォーカスアクチュエータ113、ズーム駆動回路114、絞り駆動回路115、フォーカス駆動回路116、レンズMPU117、レンズメモリ118を有する。   The drive / control system includes a zoom actuator 111, an aperture actuator 112, a focus actuator 113, a zoom drive circuit 114, an aperture drive circuit 115, a focus drive circuit 116, a lens MPU 117, and a lens memory 118.

ズーム駆動回路114は、ズームアクチュエータ111を用いて第1レンズ群101や第2レンズ群103を光軸方向OAに駆動し、レンズユニット100の光学系の画角を制御する。絞り駆動回路115は、絞りアクチュエータ112を用いて絞り102を駆動し、絞り102の開口径や開閉動作を制御する。フォーカス駆動回路116はフォーカスアクチュエータ113を用いてフォーカスレンズ104を光軸方向OAに駆動し、レンズユニット100の光学系の合焦距離を制御する。また、フォーカス駆動回路116は、フォーカスアクチュエータ113を用いてフォーカスレンズ104の現在位置を検出する。   The zoom drive circuit 114 uses the zoom actuator 111 to drive the first lens group 101 and the second lens group 103 in the optical axis direction OA, and controls the angle of view of the optical system of the lens unit 100. The diaphragm drive circuit 115 drives the diaphragm 102 using the diaphragm actuator 112 and controls the aperture diameter and opening / closing operation of the diaphragm 102. The focus driving circuit 116 drives the focus lens 104 in the optical axis direction OA using the focus actuator 113, and controls the focusing distance of the optical system of the lens unit 100. The focus driving circuit 116 detects the current position of the focus lens 104 using the focus actuator 113.

レンズMPU(プロセッサ)117は、レンズユニット100に係る全ての演算、制御を行い、ズーム駆動回路114、絞り駆動回路115、フォーカス駆動回路116を制御する。また、レンズMPU117は、マウントMを通じてカメラMPU125と接続され、コマンドやデータを通信する。例えばレンズMPU117はフォーカスレンズ104の位置を検出し、カメラMPU125からの要求に対してレンズ位置情報を通知する。このレンズ位置情報は、フォーカスレンズ104の光軸方向OAにおける位置、光学系が移動していない状態の射出瞳の光軸方向OAにおける位置および直径、射出瞳の光束を制限するレンズ枠の光軸方向OAにおける位置および直径などの情報を含む。またレンズMPU117は、カメラMPU125からの要求に応じて、ズーム駆動回路114、絞り駆動回路115、フォーカス駆動回路116を制御する。レンズメモリ118には自動焦点検出に必要な光学情報が予め記憶されている。カメラMPU125は例えば内蔵する不揮発性メモリやレンズメモリ118に記憶されているプログラムを実行することで、レンズユニット100の動作を制御する。   The lens MPU (processor) 117 performs all calculations and control related to the lens unit 100 and controls the zoom drive circuit 114, the aperture drive circuit 115, and the focus drive circuit 116. The lens MPU 117 is connected to the camera MPU 125 through the mount M, and communicates commands and data. For example, the lens MPU 117 detects the position of the focus lens 104 and notifies lens position information in response to a request from the camera MPU 125. This lens position information includes 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 optical axis of the lens frame that restricts the luminous flux of the exit pupil. Contains information such as position and diameter in direction OA. The lens MPU 117 controls the zoom drive circuit 114, the aperture drive circuit 115, and the focus drive circuit 116 in response to a request from the camera MPU 125. The lens memory 118 stores optical information necessary for automatic focus detection in advance. The camera MPU 125 controls the operation of the lens unit 100 by executing a program stored in, for example, a built-in nonvolatile memory or the lens memory 118.

(撮像装置の構成の説明−カメラ本体)
カメラ本体120は、光学系(光学ローパスフィルタ121および撮像素子122)と、駆動/制御系とを有する。レンズユニット100の第1レンズ群101、絞り102、第2レンズ群103、フォーカスレンズ104と、カメラ本体120の光学ローパスフィルタ121は撮影光学系を構成する。
(Explanation of imaging device configuration-camera body)
The camera body 120 includes an optical system (optical low-pass filter 121 and image sensor 122) and a drive / control system. The first lens group 101, the aperture 102, the second lens group 103, the focus lens 104 of the lens unit 100, and the optical low-pass filter 121 of the camera body 120 constitute a photographing optical system.

光学ローパスフィルタ121は、撮影画像の偽色やモアレを軽減する。撮像素子122はCMOSイメージセンサと周辺回路で構成され、横方向m画素、縦方向n画素(n,mは2以上の整数)に配置された複数の画素を含む。本実施の形態の撮像素子122は、瞳分割機能を有しており、画像データを用いて位相差AFを行うことが可能である。画像処理回路124は、撮像素子122が出力する画像データから、位相差AF用のデータと、表示、記録、およびコントラストAF(TVAF)用の画像データを生成する。   The optical low-pass filter 121 reduces false colors and moire in the captured image. The image sensor 122 includes a CMOS image sensor and a peripheral circuit, and includes a plurality of pixels arranged in m pixels in the horizontal direction and n pixels in the vertical direction (n and m are integers of 2 or more). The image sensor 122 of the present embodiment has a pupil division function and can perform phase difference AF using image data. The image processing circuit 124 generates data for phase difference AF and image data for display, recording, and contrast AF (TVAF) from the image data output from the image sensor 122.

駆動/制御系は、センサ駆動回路123、画像処理回路124、カメラMPU125、表示器126、操作スイッチ群(SW)127、メモリ128、位相差AF部129、TVAF部130、補助光発光部200を有する。   The drive / control system includes a sensor drive circuit 123, an image processing circuit 124, a camera MPU 125, a display 126, an operation switch group (SW) 127, a memory 128, a phase difference AF unit 129, a TVAF unit 130, and an auxiliary light emitting unit 200. Have.

センサ駆動回路123は、撮像素子122の動作を制御するとともに、取得した画像信号をA/D変換して画像処理回路124及びカメラMPU125に送信する。画像処理回路124は、撮像素子122が取得した画像データに対し、例えばγ変換、ホワイトバランス調整処理、色補間処理、圧縮符号化処理など、デジタルカメラで行われる一般的な画像処理を行う。また、画像処理回路124は位相差AF用の信号も生成する。   The sensor drive circuit 123 controls the operation of the image sensor 122, A / D converts the acquired image signal, and transmits it to the image processing circuit 124 and the camera MPU 125. The image processing circuit 124 performs general image processing performed by a digital camera, such as γ conversion, white balance adjustment processing, color interpolation processing, and compression coding processing, on the image data acquired by the image sensor 122. The image processing circuit 124 also generates a signal for phase difference AF.

カメラMPU(プロセッサ)125は、カメラ本体120に係る全ての演算、制御を行い、センサ駆動回路123、画像処理回路124、表示器126、操作スイッチ群127、メモリ128、位相差AF部129、TVAF部130を制御する。カメラMPU125はマウントMの信号線を介してレンズMPU117と接続され、レンズMPU117とコマンドやデータを通信する。カメラMPU125はレンズMPU117に対し、レンズ位置の取得要求や、所定の駆動量での絞り、フォーカスレンズ、ズーム駆動要求や、レンズユニット100に固有の光学情報の取得要求などを発行する。カメラMPU125には、カメラ動作を制御するプログラムを格納したROM125a、変数を記憶するRAM125b、諸パラメータを記憶するEEPROM125cが内蔵されている。   The camera MPU (processor) 125 performs all calculations and controls related to the camera body 120, and includes a sensor drive circuit 123, an image processing circuit 124, a display 126, an operation switch group 127, a memory 128, a phase difference AF unit 129, and a TVAF. The unit 130 is controlled. The camera MPU 125 is connected to the lens MPU 117 via the signal line of the mount M, and communicates commands and data with the lens MPU 117. The camera MPU 125 issues a lens position acquisition request, a diaphragm / focus lens / zoom drive request with a predetermined driving amount, an optical information acquisition request unique to the lens unit 100, and the like to the lens MPU 117. The camera MPU 125 includes a ROM 125a that stores a program for controlling camera operations, a RAM 125b that stores variables, and an EEPROM 125c that stores various parameters.

表示器126はLCDなどから構成され、カメラの撮影モードに関する情報、撮影前のプレビュー画像と撮影後の確認用画像、焦点検出時の合焦状態表示画像などを表示する。操作スイッチ群127は、電源スイッチ、レリーズ(撮影トリガ)スイッチ、ズーム操作スイッチ、撮影モード選択スイッチ等で構成される。メモリ128は、着脱可能なフラッシュメモリであり、撮影済み画像を記録する。   The display 126 is configured by an LCD or the like, and displays information related to the shooting mode of the camera, a preview image before shooting and a confirmation image after shooting, a focus state display image at the time of focus detection, and the like. The operation switch group 127 includes a power switch, a release (shooting trigger) switch, a zoom operation switch, a shooting mode selection switch, and the like. The memory 128 is a detachable flash memory, and records captured images.

位相差AF部129は、画像処理回路124により得られる焦点検出用データを用いて位相差検出方式で焦点検出処理を行う。より具体的には、画像処理回路124が、撮影光学系の一対の瞳領域を通過する光束で形成される一対の像データを焦点検出用データとして生成し、位相差AF部129はこの一対の像データのずれ量に基づいて焦点ずれ量を検出する。このように、位相差AF部129は、専用のAFセンサを用いず、撮像素子122の出力に基づく位相差AF(撮像面位相差AF)を行う。位相差AF部129の動作については後で詳細に説明する。   The phase difference AF unit 129 performs focus detection processing by the phase difference detection method using the focus detection data obtained by the image processing circuit 124. More specifically, the image processing circuit 124 generates a pair of image data formed by a light beam passing through a pair of pupil regions of the photographing optical system as focus detection data, and the phase difference AF unit 129 The defocus amount is detected based on the image data shift amount. As described above, the phase difference AF unit 129 performs phase difference AF (imaging surface phase difference AF) based on the output of the image sensor 122 without using a dedicated AF sensor. The operation of the phase difference AF unit 129 will be described in detail later.

TVAF部130は、画像処理回路124が生成するTVAF用評価値(画像データのコントラスト情報)に基づいてコントラスト方式の焦点検出処理を行う。コントラスト方式の焦点検出処理は、フォーカスレンズ104を移動して評価値がピークとなるフォーカスレンズ位置を合焦位置として検出する。   The TVAF unit 130 performs contrast type focus detection processing based on the TVAF evaluation value (contrast information of the image data) generated by the image processing circuit 124. In contrast type focus detection processing, the focus lens 104 is moved and the focus lens position where the evaluation value reaches a peak is detected as the focus position.

このように、本実施の形態のデジタルカメラは、位相差AFとTVAFの両方を実行可能であり、状況に応じて選択的に使用したり、組み合わせて使用したりすることができる。   As described above, the digital camera according to the present embodiment can execute both phase difference AF and TVAF, and can be selectively used or used in combination depending on the situation.

照射手段としての補助光発光部200は、カメラMPU125からの発光指示及び消灯指示に従って発光(照射)、消灯を行う。焦点調節を行いたい被写体が低コントラストであったり低照度であったりする場合に、補助光を被写体に照射することにより、焦点調節可能な状況を増やすことができる。補助光発光部200は、所定の模様(光学パターン)を有する光学像を被写体に対して投影する、いわゆるパターンAF補助光を有している。補助光発光部200から放出された光学パターンを有する光は、光学系を通じて被写体上に投影される。そのため、光学パターンのコントラストが距離によって異なり、パターンが結像し、コントラストの高い像が形成される距離と、パターンがボケて、コントラストの低い像が形成される距離とがある。   The auxiliary light emitting unit 200 as an irradiating unit emits (irradiates) and turns off according to a light emission instruction and a light off instruction from the camera MPU 125. When the subject for which focus adjustment is to be performed has low contrast or low illuminance, it is possible to increase the number of situations where focus adjustment is possible by irradiating the subject with auxiliary light. The auxiliary light emitting unit 200 has so-called pattern AF auxiliary light that projects an optical image having a predetermined pattern (optical pattern) onto a subject. The light having the optical pattern emitted from the auxiliary light emitting unit 200 is projected onto the subject through the optical system. Therefore, the contrast of the optical pattern varies depending on the distance, and there is a distance at which the pattern is formed and a high-contrast image is formed, and a distance at which the pattern is blurred and a low-contrast image is formed.

(焦点検出動作の説明:位相差AF)
以下、位相差AF部129およびTVAF部130の動作についてさらに説明する。最初に、位相差AF部129の動作について説明する。
(Description of focus detection operation: phase difference AF)
Hereinafter, operations of the phase difference AF unit 129 and the TVAF unit 130 will be further described. First, the operation of the phase difference AF unit 129 will be described.

図2(a)は、撮像素子122の画素配列を示す図である。図2では、2次元CMOSエリアセンサの縦(Y方向)6行と横(X方向)8列の範囲を、レンズユニット100側から観察した状態を示している。撮像素子122にはベイヤー配列のカラーフィルタが設けられ、奇数行の画素には、左から順に緑(G)と赤(R)のカラーフィルタが交互に、偶数行の画素には、左から順に青(B)と緑(G)のカラーフィルタが交互に配置されている。画素211において、円211iはオンチップマイクロレンズを表し、オンチップマイクロレンズの内側に配置された複数の矩形211a,211bはそれぞれ光電変換部である。   FIG. 2A is a diagram illustrating a pixel array of the image sensor 122. FIG. 2 shows a state in which a range of 6 rows in the vertical direction (Y direction) and 8 columns in the horizontal direction (X direction) of the two-dimensional CMOS area sensor is observed from the lens unit 100 side. The image sensor 122 is provided with a Bayer color filter. The odd-numbered pixels have green (G) and red (R) color filters alternately from the left, and the even-numbered pixels sequentially from the left. Blue (B) and green (G) color filters are alternately arranged. In the pixel 211, a circle 211i represents an on-chip microlens, and a plurality of rectangles 211a and 211b arranged inside the on-chip microlens are photoelectric conversion units.

撮像素子122においては、すべての画素の光電変換部がX方向に2分割され、個々の光電変換部の光電変換信号と、光電変換信号の和とを独立して読み出し可能である。また、光電変換信号の和から一方の光電変換部の光電変換信号を減じることで、他方の光電変換部の光電変換信号に相当する信号を得ることもできる。個々の光電変換部における光電変換信号は位相差AF用のデータとして用いたり、3D(3-Dimensional)画像を構成する視差画像の生成に用いたりすることもできる。また、光電変換信号の和は、通常の撮影画像データとして用いることができる。   In the image sensor 122, the photoelectric conversion units of all the pixels are divided into two in the X direction, and the photoelectric conversion signals of the individual photoelectric conversion units and the sum of the photoelectric conversion signals can be read independently. Further, a signal corresponding to the photoelectric conversion signal of the other photoelectric conversion unit can be obtained by subtracting the photoelectric conversion signal of one photoelectric conversion unit from the sum of the photoelectric conversion signals. The photoelectric conversion signal in each photoelectric conversion unit can be used as data for phase difference AF, or can be used to generate a parallax image constituting a 3D (3-Dimensional) image. The sum of photoelectric conversion signals can be used as normal captured image data.

ここで、位相差AFを行う場合の画素信号について説明する。後述するように、本実施の形態においては、図2(a)に示すマイクロレンズ211iと、分割された光電変換部211a,211bとで、撮影光学系の射出光束が瞳分割される。同一画素行に配置された所定範囲内の複数の画素211について、光電変換部211aの出力をつなぎ合わせて編成したものをAF用A像、光電変換部211bの出力をつなぎ合わせて編成したものをAF用B像とする。従って、AF用A像(第1信号)、AF用B像(第2信号)は、撮像光学系の互いに異なる瞳領域を通過する光束に対応し、撮像素子上の垂直方向における異なる位置に対応して複数取得される一対の信号である。光電変換部211a、211bの出力には、カラーフィルタの単位配列に含まれる緑、赤、青、緑の出力を加算して算出した疑似的な輝度(Y)信号が用いられる。但し、赤、青、緑の色ごとに、AF用A像、B像を編成してもよい。このように生成したAF用A像とAF用B像との相対的な像ずれ量を相関演算により検出することで、所定領域の焦点ずれ量(デフォーカス量)を検出することができる。本実施の形態では、一方の光電変換部の出力と全光電変換部の出力の和を撮像素子122から読み出すものとする。例えば光電変換部211aの出力と、光電変換部211a,211bの出力の和とが読み出される。この場合、光電変換部211bの出力は、和から光電変換部211aの出力を減じることで取得される。これにより、AF用A像、B像の両方を得ることができ、位相差AFが実現できる。このような撮像素子は、特開2004−134867号公報に開示されるように公知であるため、これ以上の詳細な説明を省略する。   Here, a pixel signal when performing phase difference AF will be described. As will be described later, in this embodiment, the exit lens of the photographing optical system is pupil-divided by the micro lens 211i shown in FIG. 2A and the divided photoelectric conversion units 211a and 211b. For a plurality of pixels 211 within a predetermined range arranged in the same pixel row, a combination of the output of the photoelectric conversion unit 211a and the output of the photoelectric conversion unit 211b combined with the output of the photoelectric conversion unit 211a A B image for AF is used. Therefore, the AF A image (first signal) and the AF B image (second signal) correspond to light beams passing through different pupil regions of the imaging optical system and correspond to different positions in the vertical direction on the image sensor. Thus, a plurality of signals are acquired. As the outputs of the photoelectric conversion units 211a and 211b, pseudo luminance (Y) signals calculated by adding the outputs of green, red, blue, and green included in the unit array of the color filter are used. However, the AF A image and the B image may be knitted for each of red, blue, and green colors. By detecting the relative image shift amount between the AF A image and the AF B image generated in this way by correlation calculation, the defocus amount (defocus amount) of the predetermined region can be detected. In this embodiment, it is assumed that the sum of the output of one photoelectric conversion unit and the output of all the photoelectric conversion units is read from the image sensor 122. For example, the output of the photoelectric conversion unit 211a and the sum of the outputs of the photoelectric conversion units 211a and 211b are read out. In this case, the output of the photoelectric conversion unit 211b is obtained by subtracting the output of the photoelectric conversion unit 211a from the sum. Thereby, both an A image for AF and a B image can be obtained, and phase difference AF can be realized. Such an image pickup device is known as disclosed in Japanese Patent Application Laid-Open No. 2004-134867, and thus detailed description thereof is omitted.

図2(b)は、撮像素子122の読み出し回路の構成例を示す図である。読み出し回路は、水平走査回路151、垂直走査回路153を含む。各画素の境界部には、水平走査ライン152a及び152bと、垂直走査ライン154a及び154bが配線され、各光電変換部はこれらの走査ラインを介して信号が外部に読み出される。   FIG. 2B is a diagram illustrating a configuration example of a readout circuit of the image sensor 122. The readout circuit includes a horizontal scanning circuit 151 and a vertical scanning circuit 153. Horizontal scanning lines 152a and 152b and vertical scanning lines 154a and 154b are wired at the boundary between the pixels, and signals are read out to the photoelectric conversion units through these scanning lines.

なお、本デジタルカメラは、撮像素子122からの上述した画素内の読み出し方法に加え、以下の2種類の読み出しモードを有する。第1の読み出しモードは全画素読み出しモードと称するもので、高精細静止画を撮像するためのモードである。この場合は、全画素の信号が読み出される。第2の読み出しモードは間引き読み出しモードと称するもので、動画記録、もしくはプレビュー画像の表示のみを行うためのモードである。この場合に必要な画素数は全画素よりも少ないため、X方向及びY方向ともに所定比率に間引いた画素のみ読み出される。また、高速に読み出す必要がある場合にも、同様に間引き読み出しモードが用いられる。センサ駆動回路123は、X方向に間引く際には、信号の加算を行ってS/N比の改善を図り、Y方向に対する間引きは、間引かれる行の信号出力を無視する。位相差AFおよびコントラストAFも、通常、第2の読み出しモードで読み出された信号に基づいて行われる。   Note that this digital camera has the following two readout modes in addition to the above-described readout method in the pixel from the image sensor 122. The first readout mode is called an all-pixel readout mode and is a mode for capturing a high-definition still image. In this case, signals of all pixels are read out. The second readout mode is called a thinning readout mode, and is a mode for performing only moving image recording or preview image display. Since the number of pixels required in this case is smaller than all the pixels, only the pixels thinned out at a predetermined ratio in both the X direction and the Y direction are read out. Also, when it is necessary to read out at high speed, the thinning-out reading mode is similarly used. When thinning out in the X direction, the sensor driving circuit 123 performs signal addition to improve the S / N ratio, and thinning out in the Y direction ignores the signal output of the thinned out rows. The phase difference AF and the contrast AF are also usually performed based on the signal read in the second reading mode.

図3(a)は、撮影光学系の射出瞳面と、像高ゼロ、すなわち像面中央近傍に配置された撮像素子の光電変換部の共役関係を説明する図である。撮像素子122内の光電変換部と撮影光学系の射出瞳面は、オンチップマイクロレンズによって共役関係となるように設計される。そして撮影光学系の射出瞳は、一般的に光量調節用の虹彩絞りが置かれる面とほぼ一致する。一方、本実施の形態における撮影光学系は、変倍機能を有したズームレンズを含むが、光学タイプによっては変倍操作を行うと射出瞳の像面からの距離や大きさが変化する。図3(a)では、レンズユニット100の焦点距離が広角端と望遠端の中央にある状態を示している。この状態における射出瞳距離Zepを標準値として、オンチップマイクロレンズの形状や、像高(X,Y座標)に応じた偏心パラメータの最適設計がなされる。   FIG. 3A is a diagram for explaining the conjugate relationship between the exit pupil plane of the photographing optical system and the photoelectric conversion unit of the image sensor disposed at the image height zero, that is, near the center of the image plane. The photoelectric conversion unit in the image sensor 122 and the exit pupil plane of the photographing optical system are designed to have a conjugate relationship by an on-chip microlens. The exit pupil of the photographic optical system generally coincides with the surface on which the iris diaphragm for adjusting the amount of light is placed. On the other hand, the photographing optical system in the present embodiment includes a zoom lens having a zoom function, but depending on the optical type, the distance and the size of the exit pupil from the image plane change when the zoom operation is performed. FIG. 3A shows a state where the focal length of the lens unit 100 is at the center between the wide-angle end and the telephoto end. Using the exit pupil distance Zep in this state as a standard value, the optimum design of the eccentricity parameter according to the shape of the on-chip microlens and the image height (X, Y coordinates) is made.

図3(a)において、101は第1レンズ群、101bは第1レンズ群を保持する鏡筒部材、104はフォーカスレンズ、104bはフォーカスレンズ104を保持する鏡筒部材である。102は絞りで、102aは絞り開放時の開口径を規定する開口板、102bは絞り込み時の開口径を調節するための絞り羽根である。なお、撮影光学系を通過する光束の制限部材として作用する101b、102a、102b、及び104bは、像面から観察した場合の光学的な虚像を示している。また、絞り102の近傍における合成開口をレンズの射出瞳と定義し、前述したように像面からの距離をZepとしている。   In FIG. 3A, 101 is a first lens group, 101 b is a lens barrel member that holds the first lens group, 104 is a focus lens, and 104 b is a lens barrel member that holds the focus lens 104. Reference numeral 102 denotes an aperture, reference numeral 102a denotes an aperture plate that defines an aperture diameter when the aperture is opened, and reference numeral 102b denotes an aperture blade for adjusting the aperture diameter when the aperture is closed. Note that reference numerals 101b, 102a, 102b, and 104b that act as limiting members for the light beam passing through the photographing optical system indicate optical virtual images when observed from the image plane. Further, the synthetic aperture in the vicinity of the stop 102 is defined as the exit pupil of the lens, and the distance from the image plane is Zep as described above.

画素211は像面中央近傍に配置されており、本実施の形態ではこれを中央画素と呼ぶ。画素211は、最下層より、光電変換部211a,211b、配線層211e〜211g、カラーフィルタ211h、及びオンチップマイクロレンズ211iの各部材で構成される。そして2つの光電変換部はオンチップマイクロレンズ211iによって撮影光学系の射出瞳面に投影される。換言すれば、撮影光学系の射出瞳が、オンチップマイクロレンズ211iを介して、光電変換部の表面に投影される。   The pixel 211 is disposed in the vicinity of the center of the image plane, and is referred to as a central pixel in the present embodiment. The pixel 211 is composed of photoelectric conversion units 211a and 211b, wiring layers 211e to 211g, a color filter 211h, and an on-chip microlens 211i from the bottom layer. The two photoelectric conversion units are projected on the exit pupil plane of the photographing optical system by the on-chip microlens 211i. In other words, the exit pupil of the photographing optical system is projected onto the surface of the photoelectric conversion unit via the on-chip microlens 211i.

図3(b)は、撮影光学系の射出瞳面上における、光電変換部の投影像を示す図である。光電変換部211a及び211bに対する投影像は、投影像EP1a及びEP1bである。撮像素子122は、2つの光電変換部211aと211bのいずれか一方の出力と、両方の和の出力を得ることができる画素を有している。両方の和の出力は、撮影光学系のほぼ全瞳領域である投影像EP1a、EP1bの両方の領域を通過した光束を光電変換したものである。   FIG. 3B is a diagram illustrating a projected image of the photoelectric conversion unit on the exit pupil plane of the photographing optical system. Projected images on the photoelectric conversion units 211a and 211b are projected images EP1a and EP1b. The image sensor 122 includes a pixel that can obtain the output of either one of the two photoelectric conversion units 211a and 211b and the sum of both. The sum of both outputs is a photoelectric conversion of the light beam that has passed through both regions of the projection images EP1a and EP1b, which are almost the entire pupil region of the photographing optical system.

図3(a)で、撮影光学系を通過する光束の最外部をLで示すと、光束Lは、絞りの開口板102aで規制されており、投影像EP1a及びEP1bは撮影光学系でケラレがほぼ発生していない。図3(b)では、図3(a)の光束Lを、TLで示している。TLで示す円の内部に、光電変換部の投影像EP1a、EP1bの大部分が含まれていることからも、ケラレがほぼ発生していないことがわかる。光束Lは、絞りの開口板102aでのみ制限されているため、TLは、開口板102aと言い換えることができる。この際、像面中央では各投影像EP1aないしEP1bのケラレ状態は光軸に対して対称となり、各光電変換部211a及び211bが受光する光量は等しい。   In FIG. 3A, when the outermost part of the light beam passing through the photographing optical system is denoted by L, the light beam L is regulated by the aperture plate 102a of the diaphragm, and the projected images EP1a and EP1b are vignetted by the photographing optical system. Almost no occurrence. In FIG.3 (b), the light beam L of Fig.3 (a) is shown by TL. Since most of the projected images EP1a and EP1b of the photoelectric conversion unit are included in the circle indicated by TL, it can be seen that almost no vignetting occurs. Since the light beam L is limited only by the aperture plate 102a of the diaphragm, TL can be restated as the aperture plate 102a. At this time, the vignetting state of each of the projected images EP1a to EP1b is symmetric with respect to the optical axis at the center of the image plane, and the amount of light received by each of the photoelectric conversion units 211a and 211b is equal.

位相差AFを行う場合、カメラMPU125は撮像素子122から上述した2種類の出力を読み出すようにセンサ駆動回路123を制御する。そして、カメラMPU125は画像処理回路124に対して焦点検出領域の情報を与え、焦点検出領域内に含まれる画素の出力から、AF用A像およびB像のデータを生成して位相差AF部129に供給するよう命令する。画像処理回路124はこの命令に従ってAF用A像およびB像のデータを生成して位相差AF部129に出力する。画像処理回路124はまた、TVAF部130に対してRAW画像データを供給する。   When performing phase difference AF, the camera MPU 125 controls the sensor drive circuit 123 so as to read the above-described two types of outputs from the image sensor 122. Then, the camera MPU 125 gives information on the focus detection area to the image processing circuit 124, generates data for AF A and B images from the output of the pixels included in the focus detection area, and generates the phase difference AF unit 129. To supply to. The image processing circuit 124 generates AF A and B image data in accordance with this command and outputs it to the phase difference AF unit 129. The image processing circuit 124 also supplies RAW image data to the TVAF unit 130.

以上説明した様に、撮像素子122は位相差AFおよびコントラストAFの両方について、焦点検出装置の一部を構成している。   As described above, the image sensor 122 constitutes a part of the focus detection apparatus for both the phase difference AF and the contrast AF.

なお、ここでは一例として水平方向に射出瞳を2分割する構成を説明したが、撮像素子122の一部の画素を垂直方向に射出瞳を2分割する構成としてもよい。また、水平および垂直の両方向に射出瞳を分割する構成としてもよい。垂直方向に射出瞳を分割する画素を設けることにより、水平だけでなく垂直方向の被写体のコントラストに対応した位相差AFが可能となる。   Here, as an example, the configuration in which the exit pupil is divided into two in the horizontal direction has been described. However, a configuration in which some of the pixels of the image sensor 122 are divided in the vertical direction may be used. Further, the exit pupil may be divided in both the horizontal and vertical directions. By providing pixels that divide the exit pupil in the vertical direction, phase difference AF corresponding to the contrast of the subject in the vertical direction as well as in the horizontal direction becomes possible.

(焦点検出動作の説明:コントラストAF)
次に、図4を用いて、コントラストAF(TVAF)について説明する。図4は、TVAF部130のブロック図である。コントラストAFは、カメラMPU125とTVAF部130とが連携してフォーカスレンズ104の駆動と評価値の算出を繰り返し行うことで実現される。
(Description of focus detection operation: contrast AF)
Next, contrast AF (TVAF) will be described with reference to FIG. FIG. 4 is a block diagram of the TVAF unit 130. The contrast AF is realized by the camera MPU 125 and the TVAF unit 130 cooperating to repeatedly drive the focus lens 104 and calculate the evaluation value.

画像処理回路124からRAW画像データがTVAF部130に入力されると、AF評価用信号処理回路401で、ベイヤー配列信号からの緑(G)信号の抽出と、低輝度成分を強調して高輝度成分を抑圧するガンマ補正処理が施される。本実施の形態では、TVAFを緑(G)信号で行う場合を説明するが、赤(R)、青(B)、緑(G)の全ての信号を用いてもよい。また、RGB全色用いて輝度(Y)信号を生成してもよい。AF評価用信号処理回路401で生成される出力信号は、用いられた信号の種類によらず、以後の説明では、輝度信号Yと呼ぶ。   When the RAW image data is input from the image processing circuit 124 to the TVAF unit 130, the AF evaluation signal processing circuit 401 extracts the green (G) signal from the Bayer array signal and emphasizes the low luminance component to increase the luminance. A gamma correction process for suppressing the component is performed. In this embodiment, a case where TVAF is performed using a green (G) signal is described, but all signals of red (R), blue (B), and green (G) may be used. Further, a luminance (Y) signal may be generated using all RGB colors. The output signal generated by the AF evaluation signal processing circuit 401 is referred to as a luminance signal Y in the following description regardless of the type of signal used.

なお、カメラMPU125から、領域設定回路413に焦点検出領域が設定されているものとする。領域設定回路413は、設定された領域内の信号を選択するゲート信号を生成する。ゲート信号は、ラインピーク検出回路402、水平積分回路403、ライン最小値検出回路404、ラインピーク検出回路409、垂直積分回路406、410、垂直ピーク検出回路405、407、411の各回路に入力される。また、各焦点評価値が焦点検出領域内の輝度信号Yで生成されるように、輝度信号Yが各回路に入力するタイミングが制御される。なお、領域設定回路413には、焦点検出領域に合わせて複数の領域が設定可能である。   It is assumed that a focus detection area is set in the area setting circuit 413 from the camera MPU 125. The region setting circuit 413 generates a gate signal that selects a signal in the set region. The gate signal is input to each circuit of the line peak detection circuit 402, the horizontal integration circuit 403, the line minimum value detection circuit 404, the line peak detection circuit 409, the vertical integration circuits 406 and 410, and the vertical peak detection circuits 405, 407, and 411. The Further, the timing at which the luminance signal Y is input to each circuit is controlled so that each focus evaluation value is generated by the luminance signal Y in the focus detection region. In the area setting circuit 413, a plurality of areas can be set in accordance with the focus detection area.

Yピーク評価値の算出方法について説明する。ガンマ補正された輝度信号Yはラインピーク検出回路402へ入力され、領域設定回路413に設定された焦点検出領域内で水平ラインごとのYラインピーク値が求められる。ラインピーク検出回路402の出力は垂直ピーク検出回路405において焦点検出領域内で垂直方向にピークホールドされ、Yピーク評価値が生成される。Yピーク評価値は、高輝度被写体や低照度被写体の判定に有効な指標である。   A method for calculating the Y peak evaluation value will be described. The gamma-corrected luminance signal Y is input to the line peak detection circuit 402, and the Y line peak value for each horizontal line is obtained within the focus detection area set in the area setting circuit 413. The output of the line peak detection circuit 402 is peak-held in the vertical direction within the focus detection area by the vertical peak detection circuit 405, and a Y peak evaluation value is generated. The Y peak evaluation value is an effective index for determining a high brightness subject or a low illumination subject.

Y積分評価値の算出方法について説明する。ガンマ補正された輝度信号Yは、水平積分回路403へ入力され、焦点検出領域内で水平ラインごとにYの積分値が求められる。更に、水平積分回路403の出力は垂直積分回路406において焦点検出領域内で垂直方向に積分されて、Y積分評価値が生成される。Y積分評価値は、焦点検出領域内全体の明るさを判断する指標として用いることができる。   A method for calculating the Y integral evaluation value will be described. The gamma-corrected luminance signal Y is input to the horizontal integration circuit 403, and an integral value of Y is obtained for each horizontal line within the focus detection area. Further, the output of the horizontal integration circuit 403 is integrated in the vertical direction in the focus detection region by the vertical integration circuit 406, and a Y integration evaluation value is generated. The Y integral evaluation value can be used as an index for determining the brightness of the entire focus detection area.

Max−Min評価値の算出方法について説明する。ガンマ補正された輝度信号Yは、ラインピーク検出回路402に入力され、焦点検出領域内で水平ラインごとのYラインピーク値が求められる。また、ガンマ補正された輝度信号Yは、ライン最小値検出回路404に入力され、焦点検出領域内で水平ラインごとにYの最小値が検出される。検出された水平ラインごとのYのラインピーク値及び最小値は減算器に入力され、(ラインピーク値−最小値)が垂直ピーク検出回路407に入力される。垂直ピーク検出回路407は焦点検出領域内で垂直方向にピークホールドを行い、Max−Min評価値を生成する。Max−Min評価値は、低コントラストおよび高コントラストの判定に有効な指標である。   A method for calculating the Max-Min evaluation value will be described. The gamma-corrected luminance signal Y is input to the line peak detection circuit 402, and the Y line peak value for each horizontal line is obtained within the focus detection area. Further, the luminance signal Y subjected to gamma correction is input to the line minimum value detection circuit 404, and the minimum value of Y is detected for each horizontal line in the focus detection area. The detected Y line peak value and minimum value for each horizontal line are input to the subtractor, and (line peak value−minimum value) is input to the vertical peak detection circuit 407. The vertical peak detection circuit 407 performs peak hold in the vertical direction within the focus detection area, and generates a Max-Min evaluation value. The Max-Min evaluation value is an effective index for determining low contrast and high contrast.

領域ピーク評価値の算出方法について説明する。ガンマ補正された輝度信号YをBPF408に通すことによって、特定の周波数成分が抽出され焦点信号が生成される。この焦点信号はラインピーク検出回路409へ入力され、焦点検出領域内で水平ラインごとのラインピーク値が求められる。ラインピーク値は、垂直ピーク検出回路411によって焦点検出領域内でピークホールドされ、領域ピーク評価値が生成される。領域ピーク評価値は、焦点検出領域内で被写体が移動しても変化が少ないので、合焦状態から再度合焦点を探す処理に移行するかどうかを判定する再起動判定に有効な指標である。   A method for calculating the region peak evaluation value will be described. By passing the gamma-corrected luminance signal Y through the BPF 408, a specific frequency component is extracted and a focus signal is generated. This focus signal is input to the line peak detection circuit 409, and the line peak value for each horizontal line is obtained within the focus detection area. The line peak value is peak-held in the focus detection area by the vertical peak detection circuit 411, and an area peak evaluation value is generated. The area peak evaluation value is an effective index for restart determination that determines whether or not to shift from the in-focus state to the process of searching for the in-focus point again because the change is small even when the subject moves within the focus detection area.

全ライン積分評価値の算出方法について説明する。領域ピーク評価値と同様に、ラインピーク検出回路409は、焦点検出領域内で水平ラインごとのラインピーク値を求める。次にラインピーク検出回路409は、ラインピーク値を垂直積分回路410に入力し、焦点検出領域内で垂直方向に全水平走査ライン数について積分して全ライン積分評価値を生成する。高周波全ライン積分評価値は、積分の効果でダイナミックレンジが広く、感度が高いので、主要なAF評価値である。従って、本実施の形態では単に焦点評価値と記載した場合は全ライン積分評価値を意味する。   A method for calculating the total line integral evaluation value will be described. Similar to the area peak evaluation value, the line peak detection circuit 409 obtains a line peak value for each horizontal line in the focus detection area. Next, the line peak detection circuit 409 inputs the line peak value to the vertical integration circuit 410 and integrates the total number of horizontal scanning lines in the vertical direction within the focus detection area to generate the total line integration evaluation value. The high-frequency all-line integral evaluation value is a main AF evaluation value because it has a wide dynamic range and high sensitivity due to the integration effect. Therefore, in the present embodiment, when it is simply described as a focus evaluation value, it means an all-line integral evaluation value.

カメラMPU125のAF制御部150は上述したそれぞれの焦点評価値を取得し、レンズMPU117を通じてフォーカスレンズ104を光軸方向に沿って所定方向に所定量移動させる。そして、新たに得られた画像データに基づいて上述した各種の評価値を算出し、全ライン積分評価値が最大値となるフォーカスレンズ位置を検出する。   The AF control unit 150 of the camera MPU 125 acquires each of the above-described focus evaluation values, and moves the focus lens 104 in a predetermined direction along the optical axis direction through the lens MPU 117. Then, the various evaluation values described above are calculated based on the newly obtained image data, and the focus lens position at which the total integrated evaluation value is the maximum value is detected.

本実施の形態では、カメラMPU125は、図4に示すTVAF部130に、水平ライン毎および垂直ライン毎に入力することにより、それぞれ各種のAF用評価値を水平ライン方向および垂直ライン方向で算出する。これにより、水平、垂直の直交する2方向の被写体のコントラスト情報に対して焦点検出を行うことができる。   In the present embodiment, the camera MPU 125 inputs various AF evaluation values in the horizontal line direction and the vertical line direction by inputting each horizontal line and each vertical line to the TVAF unit 130 shown in FIG. . Thereby, focus detection can be performed on the contrast information of the subject in two directions that are orthogonal to each other in the horizontal and vertical directions.

(焦点検出領域の説明)
図5は、撮影範囲内における焦点検出領域の例を示す図である。上述の通り、位相差AFおよびコントラストAFのいずれも、焦点検出領域に含まれる画素から得られた信号に基づいて行われる。図5において、点線で示す長方形は撮像素子122の画素が形成された撮影範囲217を示す。撮影範囲217には位相差AF用の焦点検出領域218ah、218bh、218chが設定されている。本実施の形態では、位相差AF用の焦点検出領域218ah、218bh、218chを撮影範囲217の中央部と左右2箇所の計3箇所に設定している。また、TVAF用の焦点検出領域219a、219b、219cが、位相差AF用の焦点検出領域218ah、218bh、218chの1つを包含する形で設定されている。なお、図5は焦点検出領域の設定例であり、数、位置および大きさは図示したものに限定されない。
(Description of focus detection area)
FIG. 5 is a diagram illustrating an example of the focus detection area within the imaging range. As described above, both phase difference AF and contrast AF are performed based on signals obtained from pixels included in the focus detection area. In FIG. 5, a rectangle indicated by a dotted line indicates an imaging range 217 in which pixels of the image sensor 122 are formed. In the imaging range 217, focus detection areas 218ah, 218bh, and 218ch for phase difference AF are set. In the present embodiment, focus detection areas 218ah, 218bh, and 218ch for phase difference AF are set at a total of three locations, that is, the central portion of the imaging range 217 and two locations on the left and right. The focus detection areas 219a, 219b, and 219c for TVAF are set so as to include one of the focus detection areas 218ah, 218bh, and 218ch for phase difference AF. FIG. 5 is an example of setting the focus detection area, and the number, position, and size are not limited to those shown in the figure.

(焦点検出処理の流れの説明)
次に、図6を参照して、本デジタルカメラにおける自動焦点検出(AF)動作について説明する。図6は、AF処理のフローチャートである。この処理は、カメラMPU125が、ROM125aに格納されたプログラムをRAM125bに読み出して実行することにより実現される。以下のAF処理動作は、他の主体が明記されている場合を除き、カメラMPU125が主体となって実行される。また、カメラMPU125がレンズMPU117にコマンド等を送信することによってレンズユニット100の駆動や制御を行う場合、説明を簡潔にするために動作主体をカメラMPU125として記載する場合がある。実質的にカメラMPU125がレンズMPU117を介してレンズユニット100を制御するからである。図6の処理において、カメラMPU125は、本発明における取得手段、加算手段、検出手段に該当する。
(Explanation of focus detection process flow)
Next, an automatic focus detection (AF) operation in the digital camera will be described with reference to FIG. FIG. 6 is a flowchart of the AF process. This process is realized by the camera MPU 125 reading the program stored in the ROM 125a into the RAM 125b and executing it. The following AF processing operations are executed mainly by the camera MPU 125, unless other subjects are specified. When the camera MPU 125 drives and controls the lens unit 100 by transmitting a command or the like to the lens MPU 117, the operation subject may be described as the camera MPU 125 for the sake of brevity. This is because the camera MPU 125 substantially controls the lens unit 100 via the lens MPU 117. In the process of FIG. 6, the camera MPU 125 corresponds to an acquisition unit, an addition unit, and a detection unit in the present invention.

まず、S101で、カメラMPU125は焦点検出領域を設定する。ここでは、位相差AF用、コントラストAF用とも、図5に示したような3か所の焦点検出領域が設定される。   First, in S101, the camera MPU 125 sets a focus detection area. Here, three focus detection areas as shown in FIG. 5 are set for both phase difference AF and contrast AF.

S102で、カメラMPU125は、撮像素子122を露光して画像信号を読み出し、画像処理回路124に位相差AF用の焦点検出領域218ah、218bh、218ch内の画像データに基づく位相差AF用の像信号を生成させる。また、カメラMPU125は、画像処理回路124が生成したRAW画像データをTVAF部130に供給させ、TVAF部130でTVAF用の焦点検出領域219a、219b、219c内の画素データに基づく評価値を算出させる。なお、位相差AF用の像信号を生成する前に、画像処理回路124において撮影レンズのレンズ枠などによる光束のケラレによる射出瞳の非対称性を補正する処理(特開2010−117679号公報参照)を適用してもよい。TVAF部130が算出した焦点評価値は、カメラMPU125内のRAM125bに記憶される。位相差AF用の像信号の生成方法や、焦点評価値算出に用いる信号の生成方法については後述する。   In step S102, the camera MPU 125 exposes the image sensor 122 to read out an image signal, and the image processing circuit 124 reads the image signal for phase difference AF based on the image data in the focus detection areas 218ah, 218bh, and 218ch for phase difference AF. Is generated. Further, the camera MPU 125 supplies the RAW image data generated by the image processing circuit 124 to the TVAF unit 130, and causes the TVAF unit 130 to calculate an evaluation value based on the pixel data in the focus detection areas 219 a, 219 b, and 219 c for TVAF. . In addition, before generating the image signal for phase difference AF, the image processing circuit 124 corrects the asymmetry of the exit pupil due to the vignetting of the light beam by the lens frame of the photographing lens (see Japanese Patent Application Laid-Open No. 2010-117679). May be applied. The focus evaluation value calculated by the TVAF unit 130 is stored in the RAM 125b in the camera MPU 125. A method for generating an image signal for phase difference AF and a method for generating a signal used for calculating a focus evaluation value will be described later.

S103で、カメラMPU125は、補助光が必要な条件であるか否かを判定する。一般的に、照度が低くコントラストが低い被写体に対して、焦点検出する際に、補助光は有効である。そのためカメラMPU125は、S102で取得した位相差AF用の像信号のコントラスト(明暗差)や平均出力値などを所定の閾値と比較し、コントラストが低い、あるいは照度が低いと判定された場合に、補助光が必要であると判断する。カメラMPU125は、補助光が不要と判定された場合には処理をS106へ進め、補助光が必要と判定された場合にはS104、S105を実行してから処理をS106へ進める。   In step S103, the camera MPU 125 determines whether or not auxiliary light is necessary. In general, auxiliary light is effective when focus detection is performed on a subject with low illuminance and low contrast. Therefore, the camera MPU 125 compares the contrast (brightness / darkness difference) and average output value of the image signal for phase difference AF acquired in S102 with a predetermined threshold value, and if it is determined that the contrast is low or the illuminance is low, Judge that auxiliary light is necessary. If it is determined that auxiliary light is not necessary, the camera MPU 125 proceeds to S106, and if it is determined that auxiliary light is necessary, the camera MPU 125 proceeds to S106 after executing S104 and S105.

S104では、カメラMPU125は、補助光発光指示を行い、補助光発光部200を発光させる。これにより、焦点検出を補助するために、被写体に光学パターンが照射される。その際、カメラMPU125は、補助光の点灯・消灯状態を判別するための補助光フラグを、発光状態を示す「1」とする。   In S104, the camera MPU 125 issues an auxiliary light emission instruction to cause the auxiliary light emission unit 200 to emit light. Thus, the optical pattern is irradiated onto the subject to assist in focus detection. At this time, the camera MPU 125 sets “1” indicating the light emission state to the auxiliary light flag for determining whether the auxiliary light is on or off.

次に、S105では、カメラMPU125は、S102と同様の処理を実行し、すなわち画像処理回路124による位相差AF用の像信号の生成、TVAF部130による焦点評価値の算出等を行う。ただし、S102とS105とでは、撮像光学系を通過する光束に対応する信号の加算処理に際し、撮像素子122における垂直方向(Y方向)(第1の方向)における信号の加算数が異なり、加算数はS105の方が多い。このことを含め、位相差AF用の像信号及びTVAF用の焦点評価値算出に用いる信号の生成方法について図7〜図9を用いて説明する。   Next, in S105, the camera MPU 125 executes the same processing as in S102, that is, the image processing circuit 124 generates a phase difference AF image signal, the TVAF unit 130 calculates a focus evaluation value, and the like. However, in S102 and S105, when the signal corresponding to the light beam passing through the imaging optical system is added, the number of signals added in the vertical direction (Y direction) (first direction) in the image sensor 122 is different. Is more in S105. Including this, a method of generating an image signal for phase difference AF and a signal used for calculating a focus evaluation value for TVAF will be described with reference to FIGS.

図7(a)〜(c)は、補助光の有無による信号生成の違いを説明するための図である。補助光の有無による信号生成方法はカメラMPU125により制御される。カメラMPU125は、水平方向に位相差検出する信号に対して、垂直方向に信号加算を行う。   7A to 7C are diagrams for explaining a difference in signal generation depending on the presence or absence of auxiliary light. A signal generation method based on the presence or absence of auxiliary light is controlled by the camera MPU 125. The camera MPU 125 performs signal addition in the vertical direction with respect to the signal for detecting the phase difference in the horizontal direction.

図7(a)は、1つの焦点検出領域218と対応する撮像素子122内の領域から読み出された信号出力を、行単位で示している。図7(a)の例では、焦点検出領域218は、12行の信号列で構成されている。AF用A像、B像の1行目から12行目が、それぞれLa(1)〜La(12)、Lb(1)〜Lb(12)である。カメラMPU125は、TVAF用に用いる信号を、AF用A像とAF用B像の信号の和として取得する。以下では、主として位相差AF用の像信号の加算について説明するが、AF用A像、B像の一対の信号の和を、加算前のTVAF用の信号として用いることで、TVAF用の信号の加算方法についても本発明を同様に適用できる。   FIG. 7A shows the signal output read from the area in the image sensor 122 corresponding to one focus detection area 218 in units of rows. In the example of FIG. 7A, the focus detection area 218 is configured by 12 signal rows. The first to twelfth lines of the AF A image and B image are La (1) to La (12) and Lb (1) to Lb (12), respectively. The camera MPU 125 acquires a signal used for TVAF as the sum of the signals of the AF A image and the AF B image. In the following, the addition of image signals for phase difference AF will be mainly described. However, by using the sum of a pair of signals for AF A and B images as a signal for TVAF before addition, The present invention can be similarly applied to the addition method.

図7(b)は、補助光を用いない場合の焦点検出信号の生成方法の例を示している。撮像素子122の12行の信号は、上述のとおりベイヤー配列のカラーフィルタにより、偶数行と奇数行とで、含まれる信号出力の分光感度が異なる。本実施の形態では、各行の分光感度を揃えるために、カメラMPU125は、例えば2行単位で加算を行い6行の焦点検出用信号を生成する。例えばAF用A像に関し、1行目の加算後信号La_off(1)は、下記の数式1で演算される。
[数1]
La_off(1)=La(1)+La(2)
FIG. 7B shows an example of a method for generating a focus detection signal when auxiliary light is not used. As described above, the signals of the 12 rows of the image sensor 122 have different spectral sensitivities of the signal output included in the even rows and the odd rows due to the color filters in the Bayer array. In the present embodiment, in order to align the spectral sensitivities of each row, the camera MPU 125 performs addition, for example, in units of two rows to generate six rows of focus detection signals. For example, for the AF A image, the added signal La_off (1) in the first row is calculated by the following Equation 1.
[Equation 1]
La_off (1) = La (1) + La (2)

従って、例えば3行目と4行目の信号が加算され、5行目と6行目の信号が加算される。同様にして、AF用B像に関し、カメラMPU125は、例えば2行単位で加算を行い6行の焦点検出用信号を生成する。つまり、補助光を用いない場合、6行の焦点検出用信号が生成される。   Therefore, for example, the signals of the third and fourth rows are added, and the signals of the fifth and sixth rows are added. Similarly, for the AF B image, the camera MPU 125 adds, for example, in units of two rows to generate six rows of focus detection signals. That is, when the auxiliary light is not used, six rows of focus detection signals are generated.

カメラMPU125は、生成した6対(AF用A像、B像の6行分)の焦点検出用信号に対して相関演算を行い、6個の相関量の波形を得て、さらにこれら6個の相関量を加算した後、デフォーカス量を算出する(S107で後述する)。   The camera MPU 125 performs correlation calculation on the generated focus detection signals of 6 pairs (for 6 rows of AF A image and B image) to obtain six correlation amount waveforms, and further, After adding the correlation amount, the defocus amount is calculated (described later in S107).

図7(c)は、補助光を用いる場合の焦点検出信号の生成方法の例を示している。カメラMPU125は、補助光を用いる場合、焦点検出信号のSN比改善を目的としてより多くの行を用いた加算を行う。図7(c)の例では、カメラMPU125は、4行単位で加算を行い3行の焦点検出用信号を生成する。例えば1行目の加算後信号La_on(1)は、下記の数式2で計算される。
[数2]
La_on(1)=La(1)+La(2)+La(3)+La(4)
FIG. 7C shows an example of a method for generating a focus detection signal when auxiliary light is used. When the auxiliary light is used, the camera MPU 125 performs addition using more rows for the purpose of improving the SN ratio of the focus detection signal. In the example of FIG. 7C, the camera MPU 125 performs addition in units of 4 rows to generate focus detection signals for 3 rows. For example, the added signal La_on (1) in the first row is calculated by the following Equation 2.
[Equation 2]
La_on (1) = La (1) + La (2) + La (3) + La (4)

従って、例えば5〜8行目の信号が加算され、9〜12行目の信号が加算される。同様にして、AF用B像に関し、カメラMPU125は、例えば4行単位で加算を行い3行の焦点検出用信号を生成する。つまり、補助光を用いる場合、3行の焦点検出用信号が生成される。   Therefore, for example, the signals in the 5th to 8th rows are added, and the signals in the 9th to 12th rows are added. Similarly, with respect to the AF B image, the camera MPU 125 performs addition in units of, for example, four rows, and generates three rows of focus detection signals. That is, when the auxiliary light is used, three rows of focus detection signals are generated.

カメラMPU125は、生成した3対(AF用A像、B像の3行分)の焦点検出用信号に対して相関演算を行い、3個の相関量の波形を得て、さらに、これら3個の相関量を加算した後、デフォーカス量を算出する(S107で後述する)。   The camera MPU 125 performs correlation calculation on the generated three pairs of focus detection signals (for three rows of AF A image and B image) to obtain three correlation amount waveforms. Are added, and then the defocus amount is calculated (described later in S107).

このようにして、カメラMPU125は、補助光の有無に応じて、撮像素子122からの出力信号の加算と相関量の加算の数の組み合わせを変えることにより、撮像素子上でほぼ等しい領域の信号を用いて焦点検出を行う。焦点検出領域を拡大し過ぎると、種々の距離の被写体に対して焦点検出を行う可能性が高くなり、いわゆる遠近競合により焦点検出精度を損ねてしまう。本実施の形態では、焦点検出領域を不必要に広げなくてよいので、高い焦点検出精度を維持することができる。   In this manner, the camera MPU 125 changes the combination of the number of output signals from the image sensor 122 and the number of correlation amounts according to the presence / absence of auxiliary light, so that signals in substantially the same area on the image sensor can be obtained. To focus detection. If the focus detection area is enlarged too much, there is a high possibility that focus detection will be performed on subjects at various distances, and focus detection accuracy is impaired due to so-called distance competition. In the present embodiment, it is not necessary to unnecessarily widen the focus detection area, so that high focus detection accuracy can be maintained.

図8を用いて、補助光の有無により焦点検出用信号生成の際の加算行数を変更する理由について説明する。図8(a)は、補助光発光部200により投光される光学像の模様、すなわち光学パターンを示している。図8(a)において、斜線部が明るく、その他の部分が暗い光学像が投影される。つまり、この光学パターンは、信号出力の加算を行う垂直方向(第1の方向)に略平行な複数のラインから構成される。照射される被写体の距離によって、光学像の大きさ、明暗差、ボケ具合は異なる。この光学パターンは、垂直方向と略平行な明暗差(コントラスト)の境界を有する。図8(a)の例では明暗差を生じる境界が4本生じている。   The reason for changing the number of added rows when generating a focus detection signal according to the presence or absence of auxiliary light will be described with reference to FIG. FIG. 8A shows a pattern of an optical image projected by the auxiliary light emitting unit 200, that is, an optical pattern. In FIG. 8A, an optical image is projected where the shaded portion is bright and the other portions are dark. That is, this optical pattern is composed of a plurality of lines substantially parallel to the vertical direction (first direction) in which signal outputs are added. The size of the optical image, the contrast of light and darkness, and the degree of blur vary depending on the distance of the illuminated subject. This optical pattern has a boundary of contrast (contrast) substantially parallel to the vertical direction. In the example of FIG. 8A, there are four boundaries that cause a difference in brightness.

図8(b)は、光学パターンが撮像素子上に結像している様子を示している。図8(b)では、図7(c)で説明した、補助光を発光する場合の信号加算処理が施された焦点検出用信号の行が、重畳して示されている。図8(b)で、補助光の明暗差を生じる境界は垂直方向であり、また、焦点検出用信号の加算方向も垂直方向であり、両者は一致している。   FIG. 8B shows a state in which the optical pattern is imaged on the image sensor. In FIG. 8B, the rows of the focus detection signals that have been subjected to the signal addition processing in the case of emitting auxiliary light described in FIG. 7C are shown superimposed. In FIG. 8B, the boundary causing the difference in brightness of the auxiliary light is the vertical direction, and the addition direction of the focus detection signals is also the vertical direction, and they coincide with each other.

図8(c)は、図8(b)に示す1行目の信号出力を示す図である。図8(c)で、横軸は画素番号、縦軸は信号の強度を示している。上述のとおり、補助光の光学像の境界と焦点検出用信号の加算方向とが垂直方向同士で一致しているため、信号加算しても光学像のコントラストはほとんど低下することはない。一方、信号加算により焦点検出用信号の生成時SN比は改善される。従って、焦点検出用信号の生成時SN比の改善を図りながら、高い焦点検出精度を維持することができる。   FIG. 8C is a diagram showing signal output in the first row shown in FIG. In FIG. 8C, the horizontal axis indicates the pixel number, and the vertical axis indicates the signal intensity. As described above, since the boundary of the optical image of the auxiliary light and the addition direction of the focus detection signal coincide with each other in the vertical direction, the contrast of the optical image hardly decreases even when the signals are added. On the other hand, the signal-to-noise ratio at the time of generating the focus detection signal is improved by signal addition. Therefore, high focus detection accuracy can be maintained while improving the SN ratio at the time of generating the focus detection signal.

一方、補助光の光学像の境界と焦点検出用信号の加算方向とが一致しない場合は、次に説明するように焦点検出精度が高くならない。図9(a)に、補助光の光学像の境界が垂直方向に対して傾いている場合を示す。図9(b)は、図9(a)に示す1行目の信号出力を示す図である。図8(c)の例に対し、図9(b)の例では、補助光の光学像の明暗差の境界が傾いていることにより、焦点検出用信号の明暗差を示すエッジの本数が4本から2本に減っている。また、焦点検出用信号の明暗差を示すエッジの急峻さ(傾き)も緩やかになっている。これらの事象は、焦点検出用信号の情報量が減っていることを示し、焦点検出精度が低下することにつながる。   On the other hand, when the boundary of the optical image of the auxiliary light does not coincide with the addition direction of the focus detection signal, the focus detection accuracy does not increase as described below. FIG. 9A shows a case where the boundary of the optical image of the auxiliary light is inclined with respect to the vertical direction. FIG. 9B is a diagram showing the signal output of the first row shown in FIG. In contrast to the example of FIG. 8C, in the example of FIG. 9B, the number of edges indicating the brightness difference of the focus detection signal is 4 because the boundary of the brightness difference of the optical image of the auxiliary light is inclined. Reduced from two to two. In addition, the steepness (inclination) of the edge indicating the brightness difference of the focus detection signal is also gentle. These events indicate that the amount of information in the focus detection signal is decreasing, leading to a decrease in focus detection accuracy.

なお、図9(a)では、補助光の光学像として、明暗差の境界が傾いた場合を説明したが、補助光を用いない場合の被写体の境界の方向は、あらゆる方向をとりうる。一方で、補助光の光学像を投影する場合は、被写体の形状による影響はあるものの、概ね、発光したパターン形状を維持した光学像を受光することができる。そのような理由から、本実施の形態では、補助光の発光の有無により、焦点検出用信号生成の際の行加算の行数を変更している。   In FIG. 9A, the case where the boundary between the light and dark differences is inclined as the optical image of the auxiliary light has been described. However, the direction of the boundary of the subject when the auxiliary light is not used can take any direction. On the other hand, when the optical image of the auxiliary light is projected, although it is influenced by the shape of the subject, it is possible to generally receive the optical image maintaining the emitted pattern shape. For this reason, in the present embodiment, the number of rows to be added when generating a focus detection signal is changed depending on whether or not auxiliary light is emitted.

このように、カメラMPU125は、補助光の発光を行わない場合は、被写体の明暗差の境界の方向によらず高精度な焦点検出を行うため、補助光の発光を行う場合よりも少ない行数の信号加算を行う。一方、補助光の発光を行う場合は、被写体(補助光の光学像のパターン)の明暗差の境界の方向は垂直方向となる。このことを利用して、カメラMPU125は、より多い行数の加算を行い、被写体の信号(信号中のエッジ本数や急峻さ)を維持しながら、焦点検出信号のSN比の改善を実現している。これにより、補助光の発光の有無によらず、高精度な焦点検出が実現される。   As described above, when the camera MPU 125 does not emit auxiliary light, the camera MPU 125 performs focus detection with high accuracy regardless of the boundary direction of the contrast of the subject, and therefore, the number of rows is smaller than that when the auxiliary light is emitted. Signal addition. On the other hand, in the case of emitting auxiliary light, the direction of the boundary of the contrast of the subject (optical image pattern of auxiliary light) is the vertical direction. Using this, the camera MPU 125 adds a larger number of rows to improve the SN ratio of the focus detection signal while maintaining the signal of the subject (the number of edges in the signal and the steepness). Yes. Thereby, high-precision focus detection is realized regardless of whether or not auxiliary light is emitted.

図6のS106において、カメラMPU125は、信頼性のある焦点評価値のピーク(極大値)が検出されたか否かを判別する。信頼性のあるピークが検出された場合、カメラMPU125は、焦点検出処理を終えるために処理をS108に進める。なお、焦点評価値のピークの信頼性の算出方法に限定はないが、例えば、特開2010−78810号公報の図10から図13で説明されているような方法を用いればよい。具体的には、カメラMPU125は、検出されたピークが山の頂点かどうかを、焦点評価値の最大値と最小値の差、一定値(SlopeThr)以上の傾きで傾斜している部分の長さ、および傾斜している部分の勾配を、それぞれの閾値と比較して判断する。全ての閾値を満たしていればピークは信頼性があると判定することができる。   In S106 of FIG. 6, the camera MPU 125 determines whether or not a reliable peak (maximum value) of the focus evaluation value has been detected. If a reliable peak is detected, the camera MPU 125 advances the process to S108 in order to finish the focus detection process. The method for calculating the reliability of the peak of the focus evaluation value is not limited. For example, a method described in FIGS. 10 to 13 of JP 2010-78810 A may be used. Specifically, the camera MPU 125 determines whether the detected peak is the peak of a mountain, the difference between the maximum value and the minimum value of the focus evaluation value, and the length of the portion that is inclined with a slope equal to or greater than a certain value (SlopeThr). , And the slope of the sloped portion is determined by comparison with respective threshold values. If all the threshold values are satisfied, it can be determined that the peak is reliable.

本実施の形態では、位相差AFとコントラストAFを併用している。そのため、同一の焦点検出領域や他の焦点検出領域で、より至近側の被写体の存在が確認されている場合には、信頼性のある焦点評価値ピークが検出された際であっても、焦点検出を終えずに処理をS107に進めてもよい。ただし、この場合、信頼性のある焦点評価値ピークに対応するフォーカスレンズ104の位置を記憶しておき、S107以降の処理で信頼性のある焦点検出結果が得られなかった場合に、記憶したフォーカスレンズ104位置を焦点検出結果とする。つまり、位相差AFで、より信頼性のある焦点検出結果が得られなかった場合は、記憶しておいたコントラストAFの結果を採用する。   In the present embodiment, phase difference AF and contrast AF are used together. For this reason, if the presence of a closer subject is confirmed in the same focus detection area or another focus detection area, the focus evaluation value peak is detected even when a reliable focus evaluation value peak is detected. The process may be advanced to S107 without finishing the detection. However, in this case, the position of the focus lens 104 corresponding to the reliable focus evaluation value peak is stored, and the stored focus is obtained when a reliable focus detection result is not obtained in the processing after S107. The position of the lens 104 is a focus detection result. That is, when a more reliable focus detection result is not obtained by the phase difference AF, the stored contrast AF result is adopted.

S107において、位相差AF部129は、画像処理回路124から供給された一対の像信号としてのAF用A像とB像との相関量を算出する(相関演算を行う)。相関演算は、焦点検出領域218ch、218ah,218bhごとに、且つ、複数対の像信号に対して行われる(対の数に相当する回数の相関演算を行う)。その後、位相差AF部129は、予め記憶されている換算係数を用いて位相差をデフォーカス量に変換する。ここで、S107で用いられる像信号は、S105を経由している場合はS105で生成されたものであるが、S105を経由していない場合はS102で生成されたものである。AF用A像とB像の信号を、A(k)、B(k)(1≦k≦P)と表すと、相関演算で算出する相関量COR(h)は、例えば下記数式3で算出される。   In step S107, the phase difference AF unit 129 calculates a correlation amount between the AF A image and the B image as a pair of image signals supplied from the image processing circuit 124 (performs a correlation calculation). The correlation calculation is performed for each of the focus detection regions 218ch, 218ah, and 218bh and for a plurality of pairs of image signals (correlation calculation is performed a number of times corresponding to the number of pairs). Thereafter, the phase difference AF unit 129 converts the phase difference into a defocus amount using a conversion coefficient stored in advance. Here, the image signal used in S107 is generated in S105 when it passes through S105, but it is generated in S102 when it does not pass through S105. When the AF A and B image signals are expressed as A (k) and B (k) (1 ≦ k ≦ P), the correlation amount COR (h) calculated by the correlation calculation is calculated by, for example, Equation 3 below. Is done.

Figure 2019144462
Figure 2019144462

数式3において、W1は、相関量を算出するウィンドウのサイズ(視野内データ数)に相当し、hmaxは、対の信号間でウィンドウの位置を変化させる回数(シフトデータ数)に相当する。   In Formula 3, W1 corresponds to the size of the window (the number of data in the field of view) for calculating the correlation amount, and hmax corresponds to the number of times the position of the window is changed between the pair of signals (the number of shift data).

複数対のA像とB像の信号から複数個の相関量が算出された後、カメラMPU125は、下記の数式4で相関量の加算を行う。ここでは一例として、3個の相関量を加算する場合を記載する。   After a plurality of correlation amounts are calculated from a plurality of pairs of A image and B image signals, the camera MPU 125 adds the correlation amounts according to Equation 4 below. Here, a case where three correlation amounts are added is described as an example.

Figure 2019144462
Figure 2019144462

位相差AF部129は、各シフト量hについての相関量COR(h)を、相関量同士の加算により求めた後、A像とB像の相関が最も高くなるシフト量h、すなわち相関量CORが最小となるシフト量hの値を求める。なお、相関量COR(h)の算出時におけるシフト量hは整数とする。ただし、相関量COR(h)が最小となるシフト量hを求める場合には、位相差AF部129は、デフォーカス量の精度を向上させるため、適宜補間処理を行いサブピクセル単位の値(実数値)を求めてもよい。   The phase difference AF unit 129 obtains the correlation amount COR (h) for each shift amount h by adding the correlation amounts, and then the shift amount h that provides the highest correlation between the A image and the B image, that is, the correlation amount COR. Find the value of the shift amount h that minimizes. Note that the shift amount h when calculating the correlation amount COR (h) is an integer. However, when obtaining the shift amount h that minimizes the correlation amount COR (h), the phase difference AF unit 129 performs interpolation processing as appropriate to improve the accuracy of the defocus amount, and the value (actual value) in subpixel units. (Numerical value) may be obtained.

カメラMPU125は、相関量CORの差分値の符号が変化するシフト量dhを、相関量COR(h)が最小となるシフト量hとして算出する。まず、位相差AF部129は、相関量の差分値DCORを以下の数式5に従って算出する。
[数5]
DCOR(h)=COR(h)−COR(h−1)
The camera MPU 125 calculates the shift amount dh in which the sign of the difference value of the correlation amount COR changes as the shift amount h that minimizes the correlation amount COR (h). First, the phase difference AF unit 129 calculates a correlation value difference value DCOR according to the following Equation 5.
[Equation 5]
DCOR (h) = COR (h) −COR (h−1)

そして、位相差AF部129は、相関量の差分値DCORを用いて、差分量の符号が変化するシフト量dhを求める。差分量の符号が変化する直前のシフト量hの値をh1、符号が変化したシフト量hの値をh2(h2=h1+1)とすると、位相差AF部129はシフト量dhを、次の数式6に従って算出する。
[数6]
dh=h1+|DCOR(h1)|/|DCOR(h1)−DCOR(h2)|
Then, the phase difference AF unit 129 obtains the shift amount dh in which the sign of the difference amount changes using the correlation amount difference value DCOR. Assuming that the value of the shift amount h immediately before the change of the sign of the difference amount is h1, and the value of the shift amount h of which the sign has changed is h2 (h2 = h1 + 1), the phase difference AF unit 129 sets the shift amount dh to the following formula: 6 is calculated.
[Equation 6]
dh = h1 + | DCOR (h1) | / | DCOR (h1) −DCOR (h2) |

以上のようにして位相差AF部129は、A像とB像の相関が最大となるシフト量dhをサブピクセル単位で算出する。なお、2つの1次元像信号の位相差を算出する方法は、ここで説明したものに限らず、公知の任意の方法を用いることができる。   As described above, the phase difference AF unit 129 calculates the shift amount dh that maximizes the correlation between the A image and the B image in units of subpixels. The method for calculating the phase difference between the two one-dimensional image signals is not limited to that described here, and any known method can be used.

S107では、カメラMPU125は、算出されたデフォーカス量の信頼性も判定し、所定の信頼性を有すると判定された焦点検出領域のデフォーカス量のみを、以後のAF処理で用いる。レンズ枠などによるケラレの影響により、デフォーカス量が大きくなるにつれて、一対の像信号間で検出される位相差は、より多くの誤差を含むようになる。そのため、得られたデフォーカス量が閾値より大きい場合、一対の像信号の形状の一致度が低い場合や、像信号のコントラストが低い場合には、得られたデフォーカス量は所定の信頼性を有さない(信頼性が低い)と判定することができる。以下、得られたデフォーカス量が所定の信頼性を有すると判定された場合に「デフォーカス量が算出できた」と表現する。また、デフォーカス量が何らかの理由で算出できなかった場合や、デフォーカス量の信頼性が低いと判定された場合には「デフォーカス量が算出できない」と表現する。   In S107, the camera MPU 125 also determines the reliability of the calculated defocus amount, and uses only the defocus amount of the focus detection area determined to have the predetermined reliability in the subsequent AF processing. The phase difference detected between the pair of image signals includes more errors as the defocus amount increases due to the vignetting effect of the lens frame or the like. For this reason, when the obtained defocus amount is larger than the threshold, when the degree of coincidence between the shape of the pair of image signals is low, or when the contrast of the image signals is low, the obtained defocus amount has a predetermined reliability. It can be determined that it does not exist (low reliability). Hereinafter, when it is determined that the obtained defocus amount has predetermined reliability, it is expressed as “the defocus amount has been calculated”. Further, when the defocus amount cannot be calculated for some reason, or when it is determined that the reliability of the defocus amount is low, it is expressed as “the defocus amount cannot be calculated”.

ここで、上述のように、垂直方向における像信号の加算数は、補助光有り(光学パターンの照射あり)の場合の方が補助光無しの場合よりも多い。従って、S107における相関量の加算においては、像信号の加算数が多いほど、加算後信号の数が少なくなる。   Here, as described above, the number of image signals to be added in the vertical direction is larger in the case with auxiliary light (with irradiation of the optical pattern) than in the case without auxiliary light. Therefore, in the addition of the correlation amount in S107, the greater the number of added image signals, the smaller the number of signals after addition.

S108で、カメラMPU125は、焦点検出領域を選択する。本実施の形態では、より至近側に被写体が存在することを示す焦点検出領域の検出結果を採用する。これは、一般に主被写体は至近側にいる頻度が高いためである。焦点検出領域の選択方法はこれに限らない。例えば、人物の顔の検出結果や画面の中央の焦点検出領域を優先的に選択するなど、種々の方法が考えられる。   In S108, the camera MPU 125 selects a focus detection area. In the present embodiment, the detection result of the focus detection area indicating that the subject is present on the closer side is employed. This is because, in general, the main subject is frequently located on the close side. The method for selecting the focus detection area is not limited to this. For example, various methods are conceivable, such as preferentially selecting a detection result of a person's face or a focus detection area at the center of the screen.

S109で、カメラMPU125は、レンズMPU117を通じて、フォーカスレンズ104を、選択した焦点検出領域に関して算出されたデフォーカス量に基づいて駆動する。S110で、カメラMPU125は、補助光の消灯を指示すると共に、補助光フラグを、消灯状態を示す「0」にする。なお、本実施の形態では、合焦位置へのレンズ駆動を終えた後に補助光の消灯を行うようにしたが、消灯のタイミングはこれに限らない。例えば、信頼性の高い焦点検出が得られたら消灯するようにしてもよい。これにより、発光期間を短縮でき、省電力を実現することができる。S111で、カメラMPU125は、フォーカスレンズ104の駆動に用いたデフォーカス量を算出した焦点検出領域を表す表示(AF枠表示)を、表示器126で例えばライブビュー画像に重畳表示させて、図6のAF処理を終了する。   In step S109, the camera MPU 125 drives the focus lens 104 through the lens MPU 117 based on the defocus amount calculated for the selected focus detection region. In S110, the camera MPU 125 instructs the auxiliary light to be turned off, and sets the auxiliary light flag to “0” indicating the off state. In this embodiment, the auxiliary light is turned off after driving the lens to the in-focus position, but the timing of turning off the light is not limited to this. For example, the light may be turned off when highly reliable focus detection is obtained. Thereby, the light emission period can be shortened and power saving can be realized. In step S111, the camera MPU 125 superimposes and displays a display (AF frame display) representing the focus detection area in which the defocus amount used for driving the focus lens 104 is calculated, for example, on the live view image, as shown in FIG. This AF processing is finished.

上述のとおり、出力信号の加算行数が少ない場合には、多い場合に比べて、相関量の加算数が増える。一方で、補助光の発光時には、出力信号の加算行数が増えるため、被写体に斜め方向の明暗差を有する境界がある場合、焦点検出精度が低下するリスクがある。しかし、補助光を要するのは通常、低照度や低コントラストの被写体の焦点を検出する場合が想定されるので、補助光を発光させても焦点検出精度が低下するリスクが小さい。そこで、低照度等の状況においては、補助光を発光させ、相関演算前の段階で信号加算数を多くしてSN比を向上させることで、高精度な焦点検出を実現することができる。   As described above, when the number of output signal addition rows is small, the number of correlation amount additions is larger than when there are many addition rows. On the other hand, when the auxiliary light is emitted, the number of added lines of the output signal increases, so that there is a risk that the focus detection accuracy is lowered if the subject has a boundary having a contrast difference in the oblique direction. However, the auxiliary light is usually required to detect the focus of a low-illuminance or low-contrast subject, so that the risk of reducing the focus detection accuracy is small even if the auxiliary light is emitted. Therefore, in situations such as low illuminance, high-accuracy focus detection can be realized by emitting auxiliary light and increasing the signal addition number before the correlation calculation to improve the SN ratio.

ところで、光学パターンは、垂直方向に略平行な複数のラインから構成されるとし、補助光の光学像の明暗差の境界が、垂直方向にのみ有する場合を示した。しかし光学パターンの構成はこれに限らない。例えば図10に例示するように、格子状に、第1の方向(垂直方向)にも第1の方向に略直交する第2の方向(水平方向)にも明暗差の境界を有する光学パターンを採用してもよい。この場合、照射の有無以外が同一条件であれば、次のようにしてもよい。つまり、光学パターンの照射時には非照射時に比し、信号加算方向に略平行な方向(垂直方向)における信号の加算数を多くするという処理を、垂直方向における明暗差の境界が生じる領域(例えば、領域R2、R4)において適用してもよい。そして垂直方向における明暗差の境界が生じない領域(例えば、領域R1、R3)においては同処理を適用しないとすればよい。   By the way, it is assumed that the optical pattern is composed of a plurality of lines substantially parallel to the vertical direction, and the boundary of the contrast of the optical image of the auxiliary light has only the vertical direction. However, the configuration of the optical pattern is not limited to this. For example, as illustrated in FIG. 10, an optical pattern having a boundary between brightness and darkness in a lattice shape in both a first direction (vertical direction) and a second direction (horizontal direction) substantially orthogonal to the first direction. It may be adopted. In this case, if the conditions other than the presence or absence of irradiation are the same, the following may be performed. In other words, the process of increasing the number of signals added in the direction substantially parallel to the signal addition direction (vertical direction) when irradiating the optical pattern as compared to the non-irradiation direction is an area where the boundary of the light and dark difference in the vertical direction (for example, You may apply in area | region R2, R4). Then, the same process may not be applied to a region (for example, the regions R1 and R3) where the boundary between the light and dark differences in the vertical direction does not occur.

本実施の形態によれば、カメラMPU125は、光学パターンの照射が行われる場合は照射が行われない場合に比し、垂直方向における信号の加算数を多くするよう制御する。ここでいう信号には、位相差AFにおいてはAF用A像(第1信号)、AF用B像(第2信号)が該当する。TVAFにおいては、AF用A像、B像の和が該当する。また、光学パターンが格子状等の場合には、光学パターンの照射が行われることで垂直方向において光学パターンによる明暗差の境界が生じる領域において、上記制御が適用される。これにより、補助光を用いた場合のコントラスト低下の問題を回避しつつSN比を向上させることができる。よって、補助光照射の有無にかかわらず、高い焦点検出精度を実現することができる。   According to the present embodiment, the camera MPU 125 controls to increase the number of signals added in the vertical direction when the optical pattern is irradiated as compared to when the optical pattern is not irradiated. In the phase difference AF, the signal here corresponds to an AF A image (first signal) and an AF B image (second signal). In TVAF, the sum of the A and B images for AF corresponds. In the case where the optical pattern is in a lattice shape or the like, the above control is applied in a region where a boundary between light and dark differences due to the optical pattern is generated in the vertical direction by irradiation of the optical pattern. As a result, the SN ratio can be improved while avoiding the problem of a decrease in contrast when auxiliary light is used. Therefore, high focus detection accuracy can be realized regardless of the presence or absence of auxiliary light irradiation.

なお、本実施の形態では、位相差AFやTVAFのコントラスト検出方向が水平方向で、焦点検出用信号の加算を行う方向が垂直方向である場合を説明した。しかし、焦点検出を水平および垂直方向に行う、いわゆるクロス式焦点検出を行う場合にも、同様に本発明を適用できる。その場合、焦点検出方向が、水平もしくは垂直に選択された後に、焦点検出信号の加算数を決定してもよいし、焦点検出方向に対応して、水平、垂直の個別に焦点検出信号の加算数を決定してもよい。例えば、図8(a)のような垂直方向の明暗差を有する補助光の場合には、水平方向のコントラストで焦点検出を行う信号は、加算数をより多くし、垂直方向のコントラストで焦点検出を行う信号は、加算数をより少なくすることが考えられる。   In the present embodiment, the case where the contrast detection direction of phase difference AF or TVAF is the horizontal direction and the direction in which the focus detection signal is added is the vertical direction has been described. However, the present invention can be similarly applied to the case where so-called cross-type focus detection is performed in which the focus detection is performed in the horizontal and vertical directions. In this case, after the focus detection direction is selected to be horizontal or vertical, the addition number of focus detection signals may be determined, or the focus detection signals are added separately in the horizontal and vertical directions corresponding to the focus detection direction. The number may be determined. For example, in the case of auxiliary light having a vertical light / dark difference as shown in FIG. 8A, the signal for performing focus detection with the contrast in the horizontal direction increases the number of additions, and the focus detection is performed with the contrast in the vertical direction. It is conceivable that the number of additions is reduced in the signal for performing.

なお、上述のとおり、補助光により形成される光学像の明暗差は、投影される被写体の距離や反射率によって異なる。また、補助光を投光する光学系によって、被写体上で光学像が結像する距離も異なる。従って、被写体の距離や補助光の明るさに応じて、焦点検出信号の加算処理を変更してもよい。そうすることで、より高精度な焦点検出を実現することができる。また、被写体が近い、もしくは、被写体の反射率が高いなどにより、焦点検出信号の明暗差が十分である場合には、明暗差が不十分である場合に比し、行加算の数を減らすことが考えられる。   Note that, as described above, the contrast of the optical image formed by the auxiliary light varies depending on the distance of the subject to be projected and the reflectance. Further, the distance at which the optical image is formed on the subject varies depending on the optical system that projects the auxiliary light. Therefore, the focus detection signal addition process may be changed according to the distance of the subject and the brightness of the auxiliary light. By doing so, more accurate focus detection can be realized. Also, when the subject is near or the subject's reflectance is high, the number of row additions is reduced when the contrast difference of the focus detection signal is sufficient compared to when the contrast is insufficient. Can be considered.

なお、設計上の補助光の光学像の結像距離と被写体の距離とが近い場合には、光学像の明暗差の境界で、急峻なコントラスト変化を焦点検出信号として取得できると想定される。そのような場合には、焦点検出信号の行加算の数を増やすことが考えられる。被写体の距離は、焦点検出により得られるデフォーカス量と、フォーカスレンズの位置とから、カメラMPU125が算出・決定する。すなわち、カメラMPU125は、光学パターンの照射が行われる場合において、決定された被写体距離と、光学パターンの設計上の結像距離の両者が一致しない場合は、両者が一致する場合に比し、信号加算方向における信号の加算数を少なくするよう制御する。   Note that, when the imaging distance of the designed optical image of the auxiliary light is close to the distance of the subject, it is assumed that a steep contrast change can be acquired as a focus detection signal at the boundary of the contrast of the optical image. In such a case, it can be considered to increase the number of row additions of the focus detection signal. The camera MPU 125 calculates and determines the subject distance from the defocus amount obtained by focus detection and the position of the focus lens. That is, in the case where the optical pattern is irradiated, the camera MPU 125 determines that the signal distance between the determined subject distance and the image formation distance in the design of the optical pattern does not match as compared with the case where both match. Control is performed to reduce the number of signals added in the addition direction.

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

以上、本発明をその好適な実施形態に基づいて詳述してきたが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。   Although the present invention has been described in detail based on preferred embodiments thereof, the present invention is not limited to these specific embodiments, and various forms within the scope of the present invention are also included in the present invention. included.

125 カメラMPU
129 位相差AF部
200 補助光発光部
125 camera MPU
129 Phase difference AF unit 200 Auxiliary light emitting unit

Claims (8)

撮像光学系を通過する光束に対応する信号を、撮像素子上の第1の方向における異なる位置に対応して複数取得する取得手段と、
前記取得手段により取得された前記信号を前記第1の方向において加算する加算手段と、
前記加算手段により加算された信号に基づいて焦点を検出する検出手段と、
焦点検出を補助する場合に、前記第1の方向と略平行な明暗差の境界を有する光学パターンを被写体へ照射する照射手段と、
前記光学パターンの照射が行われることで前記第1の方向において前記光学パターンによる前記明暗差の境界が生じる領域においては、前記照射手段による前記光学パターンの照射が行われる場合は、前記光学パターンの照射が行われない場合に比し、前記加算手段による前記第1の方向における前記信号の加算数を多くするよう制御する制御手段と、を有することを特徴とする撮像装置。
Obtaining means for obtaining a plurality of signals corresponding to different positions in the first direction on the image sensor, corresponding to the light flux passing through the imaging optical system;
Adding means for adding the signals acquired by the acquiring means in the first direction;
Detecting means for detecting a focal point based on the signal added by the adding means;
An irradiating means for irradiating an object with an optical pattern having a boundary between light and darkness substantially parallel to the first direction when assisting focus detection;
In the region where the boundary between the light and dark differences due to the optical pattern is generated in the first direction due to the irradiation of the optical pattern, when the optical pattern is irradiated by the irradiation means, An image pickup apparatus comprising: control means for controlling to increase the number of additions of the signal in the first direction by the addition means as compared with a case where irradiation is not performed.
前記取得手段は、前記信号として、前記撮像光学系の互いに異なる瞳領域を通過する光束に対応する第1信号及び第2信号を取得し、
前記加算手段は、前記取得手段により取得された前記第1、第2信号のそれぞれを、前記第1の方向において加算し、
さらに、前記加算手段による加算後の第1信号と加算後の第2信号との相関量を演算する演算手段を有し、
前記検出手段は、前記演算手段により演算された相関量に基づいて、前記第1の方向に略直交する第2の方向の位相差を決定し、決定した位相差に基づいて焦点を検出し、
前記制御手段は、前記明暗差の境界が生じる領域においては、前記照射手段による前記光学パターンの照射が行われる場合は、前記光学パターンの照射が行われない場合に比し、前記加算手段による前記第1の方向における前記第1、第2信号の加算数を多くするよう制御することを特徴とする請求項1に記載の撮像装置。
The acquisition means acquires, as the signal, a first signal and a second signal corresponding to light beams that pass through different pupil regions of the imaging optical system,
The adding means adds the first and second signals acquired by the acquiring means in the first direction,
Furthermore, it has a calculation means for calculating a correlation amount between the first signal after addition by the addition means and the second signal after addition,
The detection means determines a phase difference in a second direction substantially orthogonal to the first direction based on the correlation amount calculated by the calculation means, detects a focus based on the determined phase difference,
In the region where the boundary between the brightness and the darkness difference occurs, the control means is more effective when the optical pattern is irradiated by the irradiation means than when the optical pattern is not irradiated. The imaging apparatus according to claim 1, wherein control is performed so as to increase the number of additions of the first and second signals in the first direction.
前記検出手段は、前記相関量を前記第1の方向において加算し、加算後の相関量に基づいて前記位相差を決定し、
前記制御手段は、前記明暗差の境界が生じる領域においては、前記照射手段による前記光学パターンの照射が行われる場合は、前記光学パターンの照射が行われない場合に比し、前記検出手段による前記第1の方向における前記相関量の加算数を少なくするよう制御することを特徴とする請求項2に記載の撮像装置。
The detection means adds the correlation amount in the first direction, determines the phase difference based on the correlation amount after the addition,
In the region where the boundary between the light and dark differences is generated, the control unit is configured such that when the irradiation of the optical pattern is performed by the irradiation unit, the detection unit performs the irradiation of the optical pattern. The imaging apparatus according to claim 2, wherein control is performed so as to reduce the number of additions of the correlation amount in the first direction.
前記制御手段は、前記照射手段による前記光学パターンの照射が行われる場合において、前記明暗差の境界が生じる領域においては、前記明暗差の境界が生じない領域に比し、前記加算手段による前記第1の方向における前記信号の加算数を多くするよう制御することを特徴とする請求項1〜3のいずれか1項に記載の撮像装置。   In the case where the optical pattern is irradiated by the irradiation unit, the control unit is configured such that, in the region where the boundary of the brightness difference is generated, compared with the region where the boundary of the brightness difference is not generated, The imaging apparatus according to claim 1, wherein control is performed so as to increase the number of additions of the signal in one direction. 前記検出手段により検出された焦点に基づき被写体距離を決定する手段を有し、
前記制御手段は、前記照射手段による前記光学パターンの照射が行われる場合において、決定された被写体距離と前記照射手段による前記光学パターンの設計上の結像距離の両者が一致しない場合は、両者が一致する場合に比し、前記加算手段による前記第1の方向における前記信号の加算数を少なくするよう制御することを特徴とする請求項1〜4のいずれか1項に記載の撮像装置。
Means for determining a subject distance based on the focus detected by the detection means;
In the case where the optical pattern is irradiated by the irradiating unit, the control unit is configured such that both of the determined subject distance and the design imaging distance of the optical pattern by the irradiating unit do not match. 5. The image pickup apparatus according to claim 1, wherein control is performed such that the number of additions of the signal in the first direction by the addition unit is reduced as compared with a case where they match.
前記光学パターンは、前記第1の方向に略平行な複数のラインから構成されることを特徴とする請求項1〜5のいずれか1項に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the optical pattern includes a plurality of lines substantially parallel to the first direction. 焦点検出を補助する場合に、第1の方向と略平行な明暗差の境界を有する光学パターンを被写体へ照射する照射装置を備える撮像装置の制御方法であって、
撮像光学系を通過する光束に対応する信号を、撮像素子上の前記第1の方向における異なる位置に対応して複数取得し、
前記取得された前記信号を前記第1の方向において加算し、
前記加算された信号に基づいて焦点を検出し、
前記光学パターンの照射が行われることで前記第1の方向において前記光学パターンによる前記明暗差の境界が生じる領域においては、前記照射装置による前記光学パターンの照射が行われる場合は、前記光学パターンの照射が行われない場合に比し、前記第1の方向における前記信号の加算数を多くするよう制御する、ことを特徴とする撮像装置の制御方法。
When assisting focus detection, a method for controlling an imaging apparatus including an irradiation device that irradiates a subject with an optical pattern having a boundary between light and darkness substantially parallel to a first direction,
Obtaining a plurality of signals corresponding to different positions in the first direction on the image sensor, corresponding to the light beam passing through the imaging optical system;
Adding the acquired signals in the first direction;
Detecting a focus based on the summed signal;
In the region where the boundary between the light and dark differences due to the optical pattern is generated in the first direction due to the irradiation of the optical pattern, when the optical pattern is irradiated by the irradiation device, the optical pattern A control method for an imaging apparatus, wherein control is performed so that the number of additions of the signal in the first direction is increased as compared with a case where irradiation is not performed.
請求項7に記載の撮像装置の制御方法をコンピュータに実行させることを特徴とするプログラム。


A program for causing a computer to execute the control method for an imaging apparatus according to claim 7.


JP2018029908A 2018-02-22 2018-02-22 Image capturing device, control method therefor, and program Pending JP2019144462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018029908A JP2019144462A (en) 2018-02-22 2018-02-22 Image capturing device, control method therefor, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018029908A JP2019144462A (en) 2018-02-22 2018-02-22 Image capturing device, control method therefor, and program

Publications (1)

Publication Number Publication Date
JP2019144462A true JP2019144462A (en) 2019-08-29

Family

ID=67773258

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018029908A Pending JP2019144462A (en) 2018-02-22 2018-02-22 Image capturing device, control method therefor, and program

Country Status (1)

Country Link
JP (1) JP2019144462A (en)

Similar Documents

Publication Publication Date Title
US11099459B2 (en) Focus adjustment device and method capable of executing automatic focus detection, and imaging optical system storing information on aberrations thereof
JP5901246B2 (en) Imaging device
US8477233B2 (en) Image capturing apparatus
JP5645846B2 (en) Focus adjustment device and focus adjustment method
JP5653035B2 (en) Imaging apparatus, focus detection method, and control method
JP5762002B2 (en) Imaging device
JP5898481B2 (en) Imaging apparatus and focus detection method
JP5947601B2 (en) FOCUS DETECTION DEVICE, ITS CONTROL METHOD, AND IMAGING DEVICE
JP6486288B2 (en) Imaging apparatus, control method, program, storage medium
US9160918B2 (en) Focus control apparatus and method for performing focus control by phase difference detection, and image capturing apparatus
JP5753371B2 (en) Imaging apparatus and control method thereof
JP2010026177A (en) Phase difference detection device, imaging apparatus, phase difference detection method, and phase difference detection program
JP2015194706A (en) Focus detection device and control method thereof
US8872963B2 (en) Imaging apparatus and imaging method
JP2014153509A (en) Imaging device and imaging method
JP6415140B2 (en) Imaging apparatus and control method thereof
JP2010026178A (en) Phase difference detection device, imaging apparatus, signal level correction method for phase difference detection device, and signal level correction program
JP6300670B2 (en) Focus adjustment apparatus, focus adjustment method and program, and imaging apparatus
JP7091053B2 (en) Imaging device and focus detection method
JP2017032646A (en) Image-capturing device and method for controlling the same
JP6890937B2 (en) Focus detector, image pickup device, and focus detection method
JP6997295B2 (en) Imaging device, imaging method, and program
JP2017223760A (en) Imaging device and focus adjustment method
JP5858683B2 (en) Focus detection apparatus and imaging apparatus
JP5735784B2 (en) Imaging device and control method thereof, lens device and control method thereof