JP2019144462A - Image capturing device, control method therefor, and program - Google Patents
Image capturing device, control method therefor, and program Download PDFInfo
- 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
Links
Images
Landscapes
- Automatic Focus Adjustment (AREA)
- Studio Devices (AREA)
- Focusing (AREA)
Abstract
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
しかしながら、特許文献1は、焦点検出において、低照度環境での焦点検出信号のSN比低下という課題と、補助光を用いた場合のコントラスト低下という課題の双方を解決する方法を開示していない。高い焦点検出精度を実現する上で、補助光の照射と信号の処理に関し改善の余地があった。
However,
本発明は、補助光照射の有無にかかわらず、高い焦点検出精度を実現することを目的とする。 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.
以下、図面を参照して本発明の実施の形態を説明する。 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
レンズユニット100は、光学系(第1レンズ群101、絞り102、第2レンズ群103、フォーカスレンズ群(以下、単に「フォーカスレンズ」という。)104)及び、駆動/制御系を有する。このようにレンズユニット100は、フォーカスレンズ104を含み、被写体の光学像を形成する撮影レンズである。
The
第1レンズ群101はレンズユニット100の先端に配置され、光軸方向OAに移動可能に保持される。絞り102は、撮影時の光量を調節する機能のほか、静止画撮影時には露出時間を制御するメカニカルシャッタとしても機能する。絞り102及び第2レンズ群103は一体で光軸方向OAに移動可能であり、第1レンズ群101と連動して移動することによりズーム機能を実現する。フォーカスレンズ104も光軸方向OAに移動可能であり、フォーカスレンズ104の位置に応じてレンズユニット100が合焦する被写体距離(合焦距離)が変化する。フォーカスレンズ104の光軸方向OAにおける位置を制御することにより、レンズユニット100の合焦距離を調節する焦点調節が行われる。
The
駆動/制御系は、ズームアクチュエータ111、絞りアクチュエータ112、フォーカスアクチュエータ113、ズーム駆動回路114、絞り駆動回路115、フォーカス駆動回路116、レンズMPU117、レンズメモリ118を有する。
The drive / control system includes a
ズーム駆動回路114は、ズームアクチュエータ111を用いて第1レンズ群101や第2レンズ群103を光軸方向OAに駆動し、レンズユニット100の光学系の画角を制御する。絞り駆動回路115は、絞りアクチュエータ112を用いて絞り102を駆動し、絞り102の開口径や開閉動作を制御する。フォーカス駆動回路116はフォーカスアクチュエータ113を用いてフォーカスレンズ104を光軸方向OAに駆動し、レンズユニット100の光学系の合焦距離を制御する。また、フォーカス駆動回路116は、フォーカスアクチュエータ113を用いてフォーカスレンズ104の現在位置を検出する。
The
レンズ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
(撮像装置の構成の説明−カメラ本体)
カメラ本体120は、光学系(光学ローパスフィルタ121および撮像素子122)と、駆動/制御系とを有する。レンズユニット100の第1レンズ群101、絞り102、第2レンズ群103、フォーカスレンズ104と、カメラ本体120の光学ローパスフィルタ121は撮影光学系を構成する。
(Explanation of imaging device configuration-camera body)
The
光学ローパスフィルタ121は、撮影画像の偽色やモアレを軽減する。撮像素子122はCMOSイメージセンサと周辺回路で構成され、横方向m画素、縦方向n画素(n,mは2以上の整数)に配置された複数の画素を含む。本実施の形態の撮像素子122は、瞳分割機能を有しており、画像データを用いて位相差AFを行うことが可能である。画像処理回路124は、撮像素子122が出力する画像データから、位相差AF用のデータと、表示、記録、およびコントラストAF(TVAF)用の画像データを生成する。
The optical low-
駆動/制御系は、センサ駆動回路123、画像処理回路124、カメラMPU125、表示器126、操作スイッチ群(SW)127、メモリ128、位相差AF部129、TVAF部130、補助光発光部200を有する。
The drive / control system includes a
センサ駆動回路123は、撮像素子122の動作を制御するとともに、取得した画像信号をA/D変換して画像処理回路124及びカメラMPU125に送信する。画像処理回路124は、撮像素子122が取得した画像データに対し、例えばγ変換、ホワイトバランス調整処理、色補間処理、圧縮符号化処理など、デジタルカメラで行われる一般的な画像処理を行う。また、画像処理回路124は位相差AF用の信号も生成する。
The
カメラ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
表示器126はLCDなどから構成され、カメラの撮影モードに関する情報、撮影前のプレビュー画像と撮影後の確認用画像、焦点検出時の合焦状態表示画像などを表示する。操作スイッチ群127は、電源スイッチ、レリーズ(撮影トリガ)スイッチ、ズーム操作スイッチ、撮影モード選択スイッチ等で構成される。メモリ128は、着脱可能なフラッシュメモリであり、撮影済み画像を記録する。
The
位相差AF部129は、画像処理回路124により得られる焦点検出用データを用いて位相差検出方式で焦点検出処理を行う。より具体的には、画像処理回路124が、撮影光学系の一対の瞳領域を通過する光束で形成される一対の像データを焦点検出用データとして生成し、位相差AF部129はこの一対の像データのずれ量に基づいて焦点ずれ量を検出する。このように、位相差AF部129は、専用のAFセンサを用いず、撮像素子122の出力に基づく位相差AF(撮像面位相差AF)を行う。位相差AF部129の動作については後で詳細に説明する。
The phase
TVAF部130は、画像処理回路124が生成するTVAF用評価値(画像データのコントラスト情報)に基づいてコントラスト方式の焦点検出処理を行う。コントラスト方式の焦点検出処理は、フォーカスレンズ104を移動して評価値がピークとなるフォーカスレンズ位置を合焦位置として検出する。
The
このように、本実施の形態のデジタルカメラは、位相差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
(焦点検出動作の説明:位相差AF)
以下、位相差AF部129およびTVAF部130の動作についてさらに説明する。最初に、位相差AF部129の動作について説明する。
(Description of focus detection operation: phase difference AF)
Hereinafter, operations of the phase
図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
撮像素子122においては、すべての画素の光電変換部がX方向に2分割され、個々の光電変換部の光電変換信号と、光電変換信号の和とを独立して読み出し可能である。また、光電変換信号の和から一方の光電変換部の光電変換信号を減じることで、他方の光電変換部の光電変換信号に相当する信号を得ることもできる。個々の光電変換部における光電変換信号は位相差AF用のデータとして用いたり、3D(3-Dimensional)画像を構成する視差画像の生成に用いたりすることもできる。また、光電変換信号の和は、通常の撮影画像データとして用いることができる。
In the
ここで、位相差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
図2(b)は、撮像素子122の読み出し回路の構成例を示す図である。読み出し回路は、水平走査回路151、垂直走査回路153を含む。各画素の境界部には、水平走査ライン152a及び152bと、垂直走査ライン154a及び154bが配線され、各光電変換部はこれらの走査ラインを介して信号が外部に読み出される。
FIG. 2B is a diagram illustrating a configuration example of a readout circuit of the
なお、本デジタルカメラは、撮像素子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
図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
図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
画素211は像面中央近傍に配置されており、本実施の形態ではこれを中央画素と呼ぶ。画素211は、最下層より、光電変換部211a,211b、配線層211e〜211g、カラーフィルタ211h、及びオンチップマイクロレンズ211iの各部材で構成される。そして2つの光電変換部はオンチップマイクロレンズ211iによって撮影光学系の射出瞳面に投影される。換言すれば、撮影光学系の射出瞳が、オンチップマイクロレンズ211iを介して、光電変換部の表面に投影される。
The
図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
図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
位相差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
以上説明した様に、撮像素子122は位相差AFおよびコントラストAFの両方について、焦点検出装置の一部を構成している。
As described above, the
なお、ここでは一例として水平方向に射出瞳を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
(焦点検出動作の説明:コントラスト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
画像処理回路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
なお、カメラ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
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
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
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
領域ピーク評価値の算出方法について説明する。ガンマ補正された輝度信号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
全ライン積分評価値の算出方法について説明する。領域ピーク評価値と同様に、ラインピーク検出回路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
カメラMPU125のAF制御部150は上述したそれぞれの焦点評価値を取得し、レンズMPU117を通じてフォーカスレンズ104を光軸方向に沿って所定方向に所定量移動させる。そして、新たに得られた画像データに基づいて上述した各種の評価値を算出し、全ライン積分評価値が最大値となるフォーカスレンズ位置を検出する。
The AF control unit 150 of the
本実施の形態では、カメラMPU125は、図4に示すTVAF部130に、水平ライン毎および垂直ライン毎に入力することにより、それぞれ各種のAF用評価値を水平ライン方向および垂直ライン方向で算出する。これにより、水平、垂直の直交する2方向の被写体のコントラスト情報に対して焦点検出を行うことができる。
In the present embodiment, the
(焦点検出領域の説明)
図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
(焦点検出処理の流れの説明)
次に、図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
まず、S101で、カメラMPU125は焦点検出領域を設定する。ここでは、位相差AF用、コントラストAF用とも、図5に示したような3か所の焦点検出領域が設定される。
First, in S101, the
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
S103で、カメラMPU125は、補助光が必要な条件であるか否かを判定する。一般的に、照度が低くコントラストが低い被写体に対して、焦点検出する際に、補助光は有効である。そのためカメラMPU125は、S102で取得した位相差AF用の像信号のコントラスト(明暗差)や平均出力値などを所定の閾値と比較し、コントラストが低い、あるいは照度が低いと判定された場合に、補助光が必要であると判断する。カメラMPU125は、補助光が不要と判定された場合には処理をS106へ進め、補助光が必要と判定された場合にはS104、S105を実行してから処理をS106へ進める。
In step S103, the
S104では、カメラMPU125は、補助光発光指示を行い、補助光発光部200を発光させる。これにより、焦点検出を補助するために、被写体に光学パターンが照射される。その際、カメラMPU125は、補助光の点灯・消灯状態を判別するための補助光フラグを、発光状態を示す「1」とする。
In S104, the
次に、S105では、カメラMPU125は、S102と同様の処理を実行し、すなわち画像処理回路124による位相差AF用の像信号の生成、TVAF部130による焦点評価値の算出等を行う。ただし、S102とS105とでは、撮像光学系を通過する光束に対応する信号の加算処理に際し、撮像素子122における垂直方向(Y方向)(第1の方向)における信号の加算数が異なり、加算数はS105の方が多い。このことを含め、位相差AF用の像信号及びTVAF用の焦点評価値算出に用いる信号の生成方法について図7〜図9を用いて説明する。
Next, in S105, the
図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
図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
図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
[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
カメラMPU125は、生成した6対(AF用A像、B像の6行分)の焦点検出用信号に対して相関演算を行い、6個の相関量の波形を得て、さらにこれら6個の相関量を加算した後、デフォーカス量を算出する(S107で後述する)。
The
図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
[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
カメラMPU125は、生成した3対(AF用A像、B像の3行分)の焦点検出用信号に対して相関演算を行い、3個の相関量の波形を得て、さらに、これら3個の相関量を加算した後、デフォーカス量を算出する(S107で後述する)。
The
このようにして、カメラMPU125は、補助光の有無に応じて、撮像素子122からの出力信号の加算と相関量の加算の数の組み合わせを変えることにより、撮像素子上でほぼ等しい領域の信号を用いて焦点検出を行う。焦点検出領域を拡大し過ぎると、種々の距離の被写体に対して焦点検出を行う可能性が高くなり、いわゆる遠近競合により焦点検出精度を損ねてしまう。本実施の形態では、焦点検出領域を不必要に広げなくてよいので、高い焦点検出精度を維持することができる。
In this manner, the
図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
図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
図6のS106において、カメラMPU125は、信頼性のある焦点評価値のピーク(極大値)が検出されたか否かを判別する。信頼性のあるピークが検出された場合、カメラMPU125は、焦点検出処理を終えるために処理をS108に進める。なお、焦点評価値のピークの信頼性の算出方法に限定はないが、例えば、特開2010−78810号公報の図10から図13で説明されているような方法を用いればよい。具体的には、カメラMPU125は、検出されたピークが山の頂点かどうかを、焦点評価値の最大値と最小値の差、一定値(SlopeThr)以上の傾きで傾斜している部分の長さ、および傾斜している部分の勾配を、それぞれの閾値と比較して判断する。全ての閾値を満たしていればピークは信頼性があると判定することができる。
In S106 of FIG. 6, the
本実施の形態では、位相差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
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
数式3において、W1は、相関量を算出するウィンドウのサイズ(視野内データ数)に相当し、hmaxは、対の信号間でウィンドウの位置を変化させる回数(シフトデータ数)に相当する。
In
複数対の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
位相差AF部129は、各シフト量hについての相関量COR(h)を、相関量同士の加算により求めた後、A像とB像の相関が最も高くなるシフト量h、すなわち相関量CORが最小となるシフト量hの値を求める。なお、相関量COR(h)の算出時におけるシフト量hは整数とする。ただし、相関量COR(h)が最小となるシフト量hを求める場合には、位相差AF部129は、デフォーカス量の精度を向上させるため、適宜補間処理を行いサブピクセル単位の値(実数値)を求めてもよい。
The phase
カメラMPU125は、相関量CORの差分値の符号が変化するシフト量dhを、相関量COR(h)が最小となるシフト量hとして算出する。まず、位相差AF部129は、相関量の差分値DCORを以下の数式5に従って算出する。
[数5]
DCOR(h)=COR(h)−COR(h−1)
The
[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
[Equation 6]
dh = h1 + | DCOR (h1) | / | DCOR (h1) −DCOR (h2) |
以上のようにして位相差AF部129は、A像とB像の相関が最大となるシフト量dhをサブピクセル単位で算出する。なお、2つの1次元像信号の位相差を算出する方法は、ここで説明したものに限らず、公知の任意の方法を用いることができる。
As described above, the phase
S107では、カメラMPU125は、算出されたデフォーカス量の信頼性も判定し、所定の信頼性を有すると判定された焦点検出領域のデフォーカス量のみを、以後のAF処理で用いる。レンズ枠などによるケラレの影響により、デフォーカス量が大きくなるにつれて、一対の像信号間で検出される位相差は、より多くの誤差を含むようになる。そのため、得られたデフォーカス量が閾値より大きい場合、一対の像信号の形状の一致度が低い場合や、像信号のコントラストが低い場合には、得られたデフォーカス量は所定の信頼性を有さない(信頼性が低い)と判定することができる。以下、得られたデフォーカス量が所定の信頼性を有すると判定された場合に「デフォーカス量が算出できた」と表現する。また、デフォーカス量が何らかの理由で算出できなかった場合や、デフォーカス量の信頼性が低いと判定された場合には「デフォーカス量が算出できない」と表現する。
In S107, the
ここで、上述のように、垂直方向における像信号の加算数は、補助光有り(光学パターンの照射あり)の場合の方が補助光無しの場合よりも多い。従って、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
S109で、カメラMPU125は、レンズMPU117を通じて、フォーカスレンズ104を、選択した焦点検出領域に関して算出されたデフォーカス量に基づいて駆動する。S110で、カメラMPU125は、補助光の消灯を指示すると共に、補助光フラグを、消灯状態を示す「0」にする。なお、本実施の形態では、合焦位置へのレンズ駆動を終えた後に補助光の消灯を行うようにしたが、消灯のタイミングはこれに限らない。例えば、信頼性の高い焦点検出が得られたら消灯するようにしてもよい。これにより、発光期間を短縮でき、省電力を実現することができる。S111で、カメラMPU125は、フォーカスレンズ104の駆動に用いたデフォーカス量を算出した焦点検出領域を表す表示(AF枠表示)を、表示器126で例えばライブビュー画像に重畳表示させて、図6のAF処理を終了する。
In step S109, the
上述のとおり、出力信号の加算行数が少ない場合には、多い場合に比べて、相関量の加算数が増える。一方で、補助光の発光時には、出力信号の加算行数が増えるため、被写体に斜め方向の明暗差を有する境界がある場合、焦点検出精度が低下するリスクがある。しかし、補助光を要するのは通常、低照度や低コントラストの被写体の焦点を検出する場合が想定されるので、補助光を発光させても焦点検出精度が低下するリスクが小さい。そこで、低照度等の状況においては、補助光を発光させ、相関演算前の段階で信号加算数を多くして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
なお、本実施の形態では、位相差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
(他の実施形態)
本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)をネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(又は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
Claims (8)
前記取得手段により取得された前記信号を前記第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の方向において加算し、
さらに、前記加算手段による加算後の第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の方向における前記相関量の加算数を少なくするよう制御することを特徴とする請求項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〜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の方向において加算し、
前記加算された信号に基づいて焦点を検出し、
前記光学パターンの照射が行われることで前記第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.
A program for causing a computer to execute the control method for an imaging apparatus according to claim 7.
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) |
-
2018
- 2018-02-22 JP JP2018029908A patent/JP2019144462A/en active Pending
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 | |
JP6486288B2 (en) | Imaging apparatus, control method, program, storage medium | |
JP5947601B2 (en) | FOCUS DETECTION DEVICE, ITS CONTROL METHOD, AND IMAGING DEVICE | |
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 |