JP2015087703A - Automatic focus adjustment unit, control method of automatic focus adjustment unit, control program of automatic focus adjustment unit, and storage medium - Google Patents

Automatic focus adjustment unit, control method of automatic focus adjustment unit, control program of automatic focus adjustment unit, and storage medium Download PDF

Info

Publication number
JP2015087703A
JP2015087703A JP2013228317A JP2013228317A JP2015087703A JP 2015087703 A JP2015087703 A JP 2015087703A JP 2013228317 A JP2013228317 A JP 2013228317A JP 2013228317 A JP2013228317 A JP 2013228317A JP 2015087703 A JP2015087703 A JP 2015087703A
Authority
JP
Japan
Prior art keywords
focus
detection
lens
driving
control unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2013228317A
Other languages
Japanese (ja)
Other versions
JP6338353B2 (en
Inventor
英育 本宮
Hideyasu Motomiya
英育 本宮
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 JP2013228317A priority Critical patent/JP6338353B2/en
Priority to US14/527,635 priority patent/US9794467B2/en
Publication of JP2015087703A publication Critical patent/JP2015087703A/en
Application granted granted Critical
Publication of JP6338353B2 publication Critical patent/JP6338353B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide an automatic focus adjustment unit with a system that uses both an imaging plane phase difference AF (Auto Focus) method and a contrast AF method, capable of using a detection result that is more appropriate depending on an image-capturing condition.SOLUTION: An automatic focus adjustment unit includes: image capturing means which receives a light flux entering via an image-capturing optical system including a focus lens and performs photo-electric conversion of the light flux; first detection means which detects a phase difference between paired image signals generated by the image capturing means; second detection means which detects contrast information from signals generated by the image capturing means; and control means which controls driving of the focusing lens based on at least either of a detection result obtained by the first detection means and a detection result obtained by the second detection means. When the detection result obtained by the first detection means satisfies a predetermined condition, the control means uses the detection result obtained by the first detection means to control driving of the focusing lens and modifies the predetermined condition in accordance with the contrast information.

Description

本発明は、位相差検出方式とコントラスト検出方式を備えた自動焦点調節装置等に関するものである。   The present invention relates to an automatic focus adjustment device equipped with a phase difference detection method and a contrast detection method.

近年、一眼レフカメラを代表とする撮像装置は、LV(ライブビュー)画面を見ながらの撮影方法に対するウェイトが非常に高まっている。特に、動画撮影の需要が高まっており、動画撮影ではLV画面を見ながらの撮影が快適に行えることが重要である。   In recent years, an imaging apparatus typified by a single-lens reflex camera has greatly increased the weight for a shooting method while viewing an LV (live view) screen. In particular, the demand for moving image shooting is increasing, and in moving image shooting, it is important that shooting can be performed comfortably while looking at the LV screen.

LV中の撮像装置のAF(オートフォーカス)方式として様々な手法が提案されているが、主な手法としてコントラスト検出方式がある。コントラスト検出方式は、フォーカスレンズを移動させながら、撮像素子を用いて得られる撮像信号から生成したコントラスト評価値が最大となるフォーカスレンズ位置を探索することによって合焦状態を得る。   Various methods have been proposed as an AF (autofocus) method for an imaging apparatus in LV, and a contrast detection method is a main method. In the contrast detection method, a focused state is obtained by searching for a focus lens position where a contrast evaluation value generated from an image pickup signal obtained using an image pickup element is maximized while moving the focus lens.

しかし、上記コントラスト検出方式は、被写体に合焦させるためにフォーカシングする位置および方向を容易に判断できない。そのため、上記コントラスト検出方式は、合焦させるために時間を要したり、またフォーカシングすべき方向を間違えたり合焦位置を通り過ぎてしまったりと、品位の悪い挙動をすることがある。特に動画撮影では、フォーカシング動作が全て記録されるため、品位の悪い挙動をするのは望ましくない。   However, the above contrast detection method cannot easily determine the position and direction of focusing for focusing on the subject. For this reason, the contrast detection method may behave poorly when it takes time to focus, or when the direction to be focused is wrong or the focus position is passed. In particular, in moving image shooting, since all the focusing operations are recorded, it is not desirable that the behavior be poor.

そこで、LV撮影時にも品位良くフォーカシングを行うことが可能なAF方式が提案されている。その方式の一つとして挙げられるのが、位相差検出方式を撮像素子面で行う撮像面位相差検出(撮像面位相差AF)方式である。位相差検出方式では、撮影光学系における互いに異なる射出瞳領域を通過した光束を受光して得られた一対の像信号の位相差からデフォーカス量を算出する。そして、該デフォーカス量に相当する移動量だけフォーカスレンズを移動させることで合焦状態を得る。   Therefore, an AF method has been proposed that can perform focusing with high quality even during LV shooting. One of the methods is an imaging surface phase difference detection (imaging surface phase difference AF) method in which the phase difference detection method is performed on the image sensor surface. In the phase difference detection method, the defocus amount is calculated from the phase difference between a pair of image signals obtained by receiving light beams that have passed through different exit pupil regions in the photographing optical system. Then, the in-focus state is obtained by moving the focus lens by a movement amount corresponding to the defocus amount.

撮像面位相差検出方式の1つとして、特許文献1のように、撮像素子の撮像画素において、同一マイクロレンズ下に複数の光電変換素子を設ける構成を用いたものが提案されている。この構成では、射出瞳領域の異なる領域を通過した光を複数の光電変換素子でそれぞれ受光することで、撮像を行うと同時に焦点検出を行うことが可能になる。具体的には、複数の光電変換素子の出力を比較することで、位相差検出方式のAFを行うことができる。撮像面位相差検出方式を用いることで、LV撮影でも位相差検出方式でAFすることが可能になり、高速で品位良くフォーカシングを行うことができる。   As one of imaging plane phase difference detection methods, a system using a configuration in which a plurality of photoelectric conversion elements are provided under the same microlens in an imaging pixel of an imaging element has been proposed as in Patent Document 1. In this configuration, light that has passed through different areas of the exit pupil area is received by each of the plurality of photoelectric conversion elements, so that focus detection can be performed simultaneously with imaging. Specifically, phase difference detection AF can be performed by comparing the outputs of a plurality of photoelectric conversion elements. By using the imaging surface phase difference detection method, AF can be performed using the phase difference detection method even in LV shooting, and focusing can be performed at high speed with high quality.

また、特許文献2では、撮像面位相差検出方式の1つとして、撮像素子中に焦点検出用の画素を設けて位相差検出方式のAFを行う構成が開示されている。また、当該撮像面位相差検出方式とコントラスト検出方式を組み合わせたシステムにより、コントラストAFと位相差AFの互いのデメリットを補うことで、より品位の高いAFを実現する構成が開示されている。たとえば、特許文献2では、位相差AFによる測距結果が得られない場合はウォブリング駆動を行い、位相差AFとコントラストAFのうち早く算出された結果に基づいてフォーカスレンズを駆動させている。   Patent Document 2 discloses a configuration in which focus detection pixels are provided in an image sensor to perform phase difference detection AF as one of imaging surface phase difference detection methods. In addition, a configuration is disclosed in which higher-quality AF is realized by compensating for the demerits of contrast AF and phase difference AF by a system that combines the imaging surface phase difference detection method and the contrast detection method. For example, in Patent Document 2, when a distance measurement result by phase difference AF cannot be obtained, wobbling driving is performed, and the focus lens is driven based on a result calculated earlier between phase difference AF and contrast AF.

特開2001−083407号公報JP 2001-083407 A 特開2013−025129号公報JP 2013-025129 A

しかしながら、特許文献2のように、単に早く算出された結果に基づいてフォーカスレンズを駆動させる手法では、フォーカスレンズの駆動方向を間違える可能性がある。例えば、合焦位置から離れている(大ボケ)場合、撮像面位相差AFでは像信号の対称性が崩れる傾向があり、像一致の明確なピークが特定できず誤った結果を算出する可能性が高くなる。このような場合、位相差AFの結果が早く算出されたとしても、位相差AFの結果を使用するのはリスクが高く、コントラストAFのほうがより信頼できる合焦方向を検出できる可能性が高い。しかしながら、特許文献2の手法では、位相差AFとコントラストAFのうち、撮影状況に応じて適切な検出結果を判断することはできない。   However, in the method of driving the focus lens based on the result calculated earlier as in Patent Document 2, there is a possibility that the drive direction of the focus lens is wrong. For example, when it is far from the in-focus position (large blur), the image plane phase difference AF tends to break the symmetry of the image signal, and a clear peak of image coincidence cannot be identified, and an erroneous result may be calculated. Becomes higher. In such a case, even if the result of the phase difference AF is calculated earlier, it is more risky to use the result of the phase difference AF, and the contrast AF is more likely to detect a focusing direction that is more reliable. However, with the method of Patent Document 2, it is not possible to determine an appropriate detection result depending on the shooting situation between phase difference AF and contrast AF.

そこで、本発明は、撮像面位相差AFとコントラストAFを併用するシステムにおいて、撮影状況に応じてより適切な検出結果を使用することが可能な自動焦点調節装置を提供することを目的とする。   Therefore, an object of the present invention is to provide an automatic focus adjustment apparatus that can use a more appropriate detection result in accordance with a shooting situation in a system that uses both imaging plane phase difference AF and contrast AF.

上記目的を達成するために、第1の本発明は、フォーカスレンズを含む撮影光学系を介して入射される光束を受光して光電変換する撮像手段と、前記撮像手段から出力される一対の像信号の位相差を検出する第1の検出手段と、前記撮像手段から出力される信号からコントラスト情報を検出する第2の検出手段と、前記第1の検出手段および前記第2の検出手段の少なくとも一方の検出結果に基づいて、前記フォーカスレンズの駆動を制御する制御手段とを有する自動焦点調節装置であって、前記制御手段は、前記第1の検出手段による検出結果が所定の条件を満たす場合、前記第1の検出手段による検出結果を用いて前記フォーカスレンズの駆動を制御し、前記コントラスト情報に応じて前記所定の条件を変更することを特徴とする。   In order to achieve the above object, the first aspect of the present invention is an image pickup means for receiving and photoelectrically converting a light beam incident through a photographing optical system including a focus lens, and a pair of images output from the image pickup means. At least one of a first detection unit that detects a phase difference of the signal, a second detection unit that detects contrast information from a signal output from the imaging unit, and the first detection unit and the second detection unit. An automatic focus adjustment device having a control unit for controlling the driving of the focus lens based on one detection result, wherein the control unit is configured such that the detection result by the first detection unit satisfies a predetermined condition The driving of the focus lens is controlled using the detection result of the first detection means, and the predetermined condition is changed according to the contrast information.

第2の本発明は、フォーカスレンズを含む撮影光学系を介して入射される光束を受光して光電変換する撮像手段を有する自動焦点調節装置の制御方法であって、前記撮像手段から出力される一対の像信号の位相差を検出する第1の検出ステップと、前記撮像手段から出力される信号からコントラスト情報を検出する第2の検出ステップと、前記第1の検出ステップおよび前記第2の検出ステップの少なくとも一方の検出結果に基づいて、前記フォーカスレンズの駆動を制御する制御ステップとを有し、前記制御ステップにおいて、前記第1の検出ステップによる検出結果が所定の条件を満たす場合、前記第1の検出ステップによる検出結果を用いて前記フォーカスレンズの駆動を制御し、前記コントラスト情報に応じて前記所定の条件を変更することを特徴とする。   The second aspect of the present invention is a method of controlling an automatic focus adjustment apparatus having an imaging unit that receives and photoelectrically converts a light beam incident through a photographing optical system including a focus lens, and is output from the imaging unit. A first detection step for detecting a phase difference between a pair of image signals; a second detection step for detecting contrast information from a signal output from the imaging means; the first detection step and the second detection; And a control step for controlling the driving of the focus lens based on the detection result of at least one of the steps. In the control step, when the detection result by the first detection step satisfies a predetermined condition, the first step The driving result of the focus lens is controlled using the detection result of the first detection step, and the predetermined condition is changed according to the contrast information. And wherein the Rukoto.

以上説明したように、本発明によれば、撮像面位相差AFとコントラストAFを併用するシステムにおいて、撮影状況に応じてより適切な検出結果を使用することが可能になる。   As described above, according to the present invention, it is possible to use a more appropriate detection result in accordance with the shooting situation in a system that uses both imaging plane phase difference AF and contrast AF.

本実施形態におけるカメラ及びレンズユニットの構成を示すブロック図The block diagram which shows the structure of the camera and lens unit in this embodiment. 本実施形態における撮像面位相差方式の画素構成を示す図The figure which shows the pixel structure of the imaging surface phase difference system in this embodiment. 本実施形態における撮像処理を示すフローチャートFlow chart showing imaging processing in the present embodiment 本実施形態における動画撮影処理を示すフローチャートFlowchart showing moving image shooting processing in the present embodiment 本実施形態における焦点検出処理を示すフローチャートFlowchart showing focus detection processing in this embodiment 本実施形態におけるAF再起動判定を示すフローチャートFlowchart showing AF restart determination in this embodiment 本実施形態におけるAF処理を示すフローチャートFlowchart showing AF processing in the present embodiment 第一の実施形態におけるレンズ駆動設定処理を示すフローチャートThe flowchart which shows the lens drive setting process in 1st embodiment. 第一の実施形態におけるレンズ駆動処理を示すフローチャートThe flowchart which shows the lens drive process in 1st embodiment. 本実施形態におけるサーチ駆動処理を示すフローチャートFlowchart showing search drive processing in this embodiment 第一の実施形態における第一の焦点情報および第二の焦点情報による方向判定処理を示すフローチャートThe flowchart which shows the direction determination process by 1st focus information and 2nd focus information in 1st embodiment. 本実施形態における測距領域を示す図The figure which shows the ranging area in this embodiment 本実施形態における測距領域から得られる像信号を示す図The figure which shows the image signal obtained from the ranging area in this embodiment 本実施形態における相関演算方法を説明する図The figure explaining the correlation calculation method in this embodiment 第一の実施形態における有効度判定処理を示すフローチャートThe flowchart which shows the effectiveness determination process in 1st embodiment 本実施形態における第一の焦点情報による有効エリア数算出処理を示すフローチャートThe flowchart which shows the effective area number calculation process by the 1st focus information in this embodiment. 本実施形態における簡易合焦度算出方法を示す図The figure which shows the simple focus degree calculation method in this embodiment 第一の実施形態における微小駆動処理を示すフローチャートThe flowchart which shows the micro drive process in 1st embodiment 本実施形態における微小駆動処理を表した概念図Conceptual diagram showing the minute driving process in the present embodiment 第二の実施形態におけるズーム中のレンズ駆動設定処理を示すフローチャートThe flowchart which shows the lens drive setting process during zoom in 2nd embodiment. 第二の実施形態におけるズーム中のレンズ駆動処理を示すフローチャートA flowchart showing lens driving processing during zooming in the second embodiment 第二の実施形態におけるズーム中の第一の焦点情報による方向判定処理を示すフローチャートThe flowchart which shows the direction determination process by the 1st focus information in zoom in 2nd embodiment. 第二の実施形態におけるズーム中微小駆動処理を示すフローチャートThe flowchart which shows the micro drive process during zoom in 2nd embodiment 第二の実施形態におけるズーム中の有効度判定処理を示すフローチャートThe flowchart which shows the effectiveness determination process during zoom in 2nd embodiment

以下、添付図面を参照して本発明の実施形態を詳細に説明する。なお、以下に説明する実施の形態は、本発明の実現手段としての一例であり、本発明は以下の実施の形態に限定されるものではない。   Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The embodiment described below is an example as means for realizing the present invention, and the present invention is not limited to the following embodiment.

(第一の実施形態)
図1は、本実施形態におけるレンズユニット及びカメラ本体からなるレンズ交換式カメラの構成を示すブロック図である。図1に示すように、本実施形態におけるカメラシステムは、レンズユニット10及びカメラ本体20から構成されている。レンズユニット10全体の動作を統括制御するレンズ制御部106と、カメラ全体の動作を統括するカメラ制御部207がデータを通信している。
(First embodiment)
FIG. 1 is a block diagram showing a configuration of a lens interchangeable camera including a lens unit and a camera body in the present embodiment. As shown in FIG. 1, the camera system according to this embodiment includes a lens unit 10 and a camera body 20. The lens control unit 106 that controls the overall operation of the lens unit 10 and the camera control unit 207 that controls the overall operation of the camera communicate data.

まず、レンズユニット10の構成について説明する。レンズユニット10は、固定レンズ101、ズームレンズ108、絞り102、フォーカスレンズ103を備えて構成される撮影光学系を有する。絞り102は、絞り駆動部104によって駆動され、後述する撮像素子201への入射光量を制御する。フォーカスレンズ103は、フォーカスレンズ駆動部105によって駆動され、焦点調節を行う。ズームレンズ108は、ズームレンズ駆動部109によって駆動されることにより、ズームの調節を行う。なお、本実施形態においては、ズームレンズ108およびズームレンズ駆動部109は必須の構成ではない。   First, the configuration of the lens unit 10 will be described. The lens unit 10 includes a photographing optical system that includes a fixed lens 101, a zoom lens 108, a diaphragm 102, and a focus lens 103. The diaphragm 102 is driven by the diaphragm driving unit 104 and controls the amount of light incident on the image sensor 201 described later. The focus lens 103 is driven by the focus lens driving unit 105 and performs focus adjustment. The zoom lens 108 is driven by a zoom lens driving unit 109 to adjust zoom. In the present embodiment, the zoom lens 108 and the zoom lens driving unit 109 are not essential components.

絞り駆動部104、フォーカスレンズ駆動部105、ズームレンズ駆動部109はレンズ制御部106によって制御され、絞り102の開口量や、フォーカスレンズ103およびズームレンズ108の位置が決定される。ユーザによりレンズ操作部107を介してフォーカスやズームなどの操作が行われた場合には、レンズ制御部106がユーザ操作に応じた制御を行う。レンズ制御部106は、後述するカメラ制御部207から受信した制御命令・制御情報に応じて絞り駆動部104やフォーカスレンズ駆動部105、ズームレンズ駆動部109の制御を行い、また、レンズ情報をカメラ制御部207に送信する。   The aperture driving unit 104, the focus lens driving unit 105, and the zoom lens driving unit 109 are controlled by the lens control unit 106, and the aperture amount of the aperture 102 and the positions of the focus lens 103 and the zoom lens 108 are determined. When the user performs operations such as focusing and zooming via the lens operation unit 107, the lens control unit 106 performs control according to the user operation. The lens control unit 106 controls the aperture driving unit 104, the focus lens driving unit 105, and the zoom lens driving unit 109 according to a control command / control information received from a camera control unit 207, which will be described later. It transmits to the control part 207.

次に、本実施形態に係る自動焦点調節装置を備えるカメラ本体20の構成について説明する。カメラ本体20は、レンズユニット10の撮影光学系を通過した光束から撮像信号を取得可能に構成されている。撮像素子201は、CCDやCMOSセンサにより構成される。撮影光学系を通過した光束が撮像素子201の受光面上に結像し、形成された被写体像がフォトダイオードによって入射光量に応じた電荷に変換(光電変換)される。各フォトダイオードに蓄積された電荷は、カメラ制御部207の指令に従ってタイミングジェネレータ209から与えられる駆動パルスに基づいて電荷に応じた電圧信号として撮像素子201から順次読み出される。   Next, the configuration of the camera body 20 including the automatic focus adjustment device according to the present embodiment will be described. The camera body 20 is configured to be able to acquire an imaging signal from a light beam that has passed through the imaging optical system of the lens unit 10. The image sensor 201 is configured by a CCD or CMOS sensor. The light beam that has passed through the photographing optical system forms an image on the light receiving surface of the image sensor 201, and the formed subject image is converted (photoelectric conversion) into charges corresponding to the amount of incident light by the photodiode. The electric charge accumulated in each photodiode is sequentially read out from the image sensor 201 as a voltage signal corresponding to the electric charge based on a drive pulse given from the timing generator 209 in accordance with an instruction from the camera control unit 207.

撮像面位相差方式の焦点調節(以下、撮像面位相差AF)に対応しない撮像素子の場合、例えば図2(A)に示すようなベイヤ−配列の画素構成となる。一方、本実施形態の撮像素子201は、撮像面位相差AFを行うために、図2(B)に示すように1つの画素に複数(本実施形態では2つ)のフォトダイオード(光電変換素子)を保持している。光束をマイクロレンズで分離し、この2つのフォトダイオードで結像することで、撮像用とAF用の2つの信号が取得可能になっている。2つのフォトダイオードの信号を加算した信号(A+B)が撮像信号であり、個々のフォトダイオードの信号(A、B)がAF用の2つの像信号になっている。ここでは、2つの像信号のそれぞれを読み出す構成に限らず、例えば処理負荷を考慮して、加算した信号(A+B)と一方の像信号(例えばA)を読み出し、その差分からもう一方の像信号(例えばB)を取得する構成でもよい。後述するAF信号処理部204でAF用の2つの像信号に対して相関演算を行い、像ずれ量や各種信頼性情報を算出する。   In the case of an imaging device that does not support imaging surface phase difference type focus adjustment (hereinafter referred to as imaging surface phase difference AF), for example, the pixel configuration has a Bayer array as shown in FIG. On the other hand, in order to perform imaging surface phase difference AF, the image sensor 201 of the present embodiment has a plurality of (two in this embodiment) photodiodes (photoelectric conversion elements) in one pixel as shown in FIG. ). By separating the light beam with a microlens and forming an image with these two photodiodes, two signals for imaging and AF can be acquired. A signal (A + B) obtained by adding the signals of two photodiodes is an image pickup signal, and signals (A, B) of individual photodiodes are two image signals for AF. Here, the configuration is not limited to reading each of the two image signals. For example, in consideration of a processing load, the added signal (A + B) and one image signal (for example, A) are read, and the other image signal is calculated from the difference. (For example, B) may be acquired. An AF signal processing unit 204, which will be described later, performs correlation calculation on two AF image signals to calculate an image shift amount and various reliability information.

なお、本実施形態では1つの画素に2つのフォトダイオードを有する構成としているが、フォトダイオードの数は2つに限定されず、それ以上であってもよい。また、撮像面位相差AF対応の撮像素子の構成として、本実施形態のように1つの画素に複数のフォトダイオードを設ける構成に限らず、上述した特許文献2のように、撮像素子中に焦点検出用の画素を設ける構成であってもよい。   In the present embodiment, one pixel has two photodiodes, but the number of photodiodes is not limited to two and may be more. In addition, the configuration of the imaging device corresponding to the imaging plane phase difference AF is not limited to the configuration in which a plurality of photodiodes are provided in one pixel as in the present embodiment, but a focus is formed in the imaging device as in Patent Document 2 described above. A configuration in which pixels for detection are provided may be used.

撮像素子201から読み出された撮像信号及びAF用信号は、CDS/AGCコンバータ202に入力され、リセットノイズを除去する為の相関二重サンプリング、ゲインの調節、信号のデジタル化を行う。CDS/AGCコンバータ202は、撮像信号をカメラ信号処理部203およびAF評価値生成部210に、撮像面位相差AF用の信号をAF信号処理部204に出力する。   The imaging signal and AF signal read from the imaging element 201 are input to the CDS / AGC converter 202, and correlated double sampling for removing reset noise, gain adjustment, and signal digitization are performed. The CDS / AGC converter 202 outputs the imaging signal to the camera signal processing unit 203 and the AF evaluation value generation unit 210, and outputs the imaging surface phase difference AF signal to the AF signal processing unit 204.

カメラ信号処理部203は、CDS/AGCコンバータ202から出力された撮像信号を表示部205に送信する。表示部205は、LCDや有機EL等の表示デバイスであり、撮像信号を表示する。また、撮像信号の記録を行うモードの時には、撮像信号は記録部206に記録される。   The camera signal processing unit 203 transmits the imaging signal output from the CDS / AGC converter 202 to the display unit 205. The display unit 205 is a display device such as an LCD or an organic EL, and displays an imaging signal. In the mode for recording the imaging signal, the imaging signal is recorded in the recording unit 206.

AF信号処理部204は、CDS/AGCコンバータ202から出力されたAF用の2つの像信号を基に相関演算を行い、像ずれ量と信頼性情報(二像一致度、二像急峻度、コントラスト情報、飽和情報、キズ情報等)を算出する。そして、算出した像ずれ量と信頼性情報をカメラ制御部207へ出力する。相関演算の詳細については、図12乃至図14を用いて後述する。   The AF signal processing unit 204 performs a correlation calculation based on the two image signals for AF output from the CDS / AGC converter 202, and detects image shift amount and reliability information (two-image coincidence, two-image steepness, contrast Information, saturation information, scratch information, etc.). Then, the calculated image shift amount and reliability information are output to the camera control unit 207. Details of the correlation calculation will be described later with reference to FIGS.

AF評価値生成部210は、撮像信号から高周波成分を抽出してAF評価値を生成し、カメラ制御部207に出力する。AF評価値は、撮像素子201からの出力信号に基づいて生成される画像の鮮鋭度(コントラスト状態)を表すものであり、鮮鋭度は撮影光学系の焦点状態(合焦の程度)によって変化するので、結果的に撮影光学系の焦点状態を表す信号となる。なお、AF評価値を生成するのに用いる撮像素子201上の領域は、位相差検出用の像信号を生成するのに用いる領域と対応する領域を含むものとする。   The AF evaluation value generation unit 210 extracts a high frequency component from the imaging signal, generates an AF evaluation value, and outputs the AF evaluation value to the camera control unit 207. The AF evaluation value represents the sharpness (contrast state) of an image generated based on the output signal from the image sensor 201, and the sharpness varies depending on the focus state (degree of focus) of the photographing optical system. As a result, the signal represents the focus state of the photographing optical system. Note that the area on the image sensor 201 used for generating the AF evaluation value includes an area corresponding to an area used for generating an image signal for phase difference detection.

カメラ制御部207は、カメラ本体20内の各構成と情報をやり取りして制御を行う。カメラ本体20内の処理だけでなく、カメラ操作部208からの入力に応じて、電源のON/OFF、設定の変更、記録の開始、AF制御の開始、記録画像の確認等、ユーザが操作したカメラ機能を実行する。また、先述したようにレンズユニット10内のレンズ制御部106と情報をやり取りし、撮影光学系の制御命令・制御情報を送ったり、レンズユニット内の情報を取得する。   The camera control unit 207 performs control by exchanging information with each configuration in the camera body 20. In response to input from the camera operation unit 208, not only processing within the camera body 20, but also user operation such as power ON / OFF, setting change, start of recording, start of AF control, confirmation of recorded image, etc. Perform camera functions. In addition, as described above, information is exchanged with the lens control unit 106 in the lens unit 10, and a control command / control information for the photographing optical system is transmitted, or information in the lens unit is acquired.

次に、本実施形態におけるカメラ本体20の動作について、図を用いて説明する。   Next, the operation of the camera body 20 in the present embodiment will be described with reference to the drawings.

図3は、カメラ本体20の撮影処理の手順を示すフローチャートである。まず、ステップS301〜S303で、カメラ制御部207は初期化処理を行う。ステップS301では、カメラ制御部207は、カメラの各種初期値設定を行う。ここでは、撮影処理を開始したとき、または撮影モードが変更されたときに、そのときのユーザ設定や撮影モード等の情報を基に初期値を設定する。ステップS302では、合焦停止フラグをオフにする。ステップS303では、サーチ駆動フラグをオフにして処理を終了する。   FIG. 3 is a flowchart showing the procedure of the photographing process of the camera body 20. First, in steps S301 to S303, the camera control unit 207 performs initialization processing. In step S301, the camera control unit 207 performs various initial value settings for the camera. Here, when the shooting process is started or when the shooting mode is changed, the initial value is set based on information such as the user setting and the shooting mode at that time. In step S302, the focus stop flag is turned off. In step S303, the search drive flag is turned off and the process ends.

ステップS302で初期化する合焦停止フラグは、本実施形態の特徴的な部分であり、動画撮影中に合焦したと判定してフォーカスレンズ103を停止している場合はオンに、合焦しておらずフォーカスレンズ103を駆動している状態である場合はオフにする。合焦停止フラグのオン/オフを切り替えることで、現在フォーカスレンズ103を駆動している状態なのか、停止している状態なのかを判別する。   The focus stop flag that is initialized in step S302 is a characteristic part of the present embodiment. When it is determined that the focus lens 103 is stopped during moving image shooting and the focus lens 103 is stopped, the focus stop flag is turned on. If the focus lens 103 is not being driven, it is turned off. By switching on / off of the focus stop flag, it is determined whether the focus lens 103 is currently driven or stopped.

ステップS303で初期化するサーチ駆動フラグは、フォーカスレンズ103を駆動する際、撮像面位相差検出方式で検出したデフォーカス量が信頼できる場合にはオフに、信頼できない場合にはオンにする。デフォーカス量が信頼できる場合とは、デフォーカス量の精度およびデフォーカス方向が確かである場合、すなわち信頼性がある程度より高い状態である。例えば、主被写体に対して合焦近傍にフォーカスしている状態や、すでに合焦している状態では、デフォーカス量が信頼できる可能性が高い。この場合にはデフォーカス量を信頼してフォーカスレンズ103の駆動を行う。一方、デフォーカス量が信頼できない場合とは、デフォーカス量が確かでない場合、すなわち信頼性がある程度より低い状態である。例えば、被写体に対して大きくボケている状態では、デフォーカス量が正しく算出できない可能性が高い。この場合には、算出されたデフォーカス量を信頼できないため、サーチ駆動(デフォーカス量を用いずにフォーカスレンズ103を一定方向に駆動して合焦位置を探す駆動)を行う。   The search drive flag to be initialized in step S303 is turned off when the defocus amount detected by the imaging surface phase difference detection method is reliable when driving the focus lens 103, and turned on when the focus lens 103 is not reliable. The case where the defocus amount is reliable is a case where the accuracy of the defocus amount and the defocus direction are certain, that is, a state where the reliability is higher than a certain level. For example, there is a high possibility that the defocus amount is reliable in a state where the main subject is focused in the vicinity of the in-focus state or a state where the main subject is already in focus. In this case, the focus lens 103 is driven with reliability of the defocus amount. On the other hand, the case where the defocus amount is not reliable is a case where the defocus amount is not certain, that is, a state where the reliability is lower than a certain level. For example, when the subject is largely out of focus, there is a high possibility that the defocus amount cannot be calculated correctly. In this case, since the calculated defocus amount is not reliable, search drive (drive for searching the focus position by driving the focus lens 103 in a certain direction without using the defocus amount) is performed.

ステップS304では、カメラの撮影設定が動画撮影モードか、静止画撮影モードかの判定を行う。動画撮影モードである場合はステップS305へ、静止画撮影モードである場合はステップS306へ進む。ステップS305では動画撮影処理を行い、ステップS307へ進む。ステップS305の動画撮影処理の詳細については図4で後述する。一方、ステップS306では、静止画撮影処理を行いステップS307へ進む。ステップS306の静止画撮影処理の詳細については省略する。   In step S304, it is determined whether the shooting setting of the camera is the moving image shooting mode or the still image shooting mode. If it is in the moving image shooting mode, the process proceeds to step S305. If it is in the still image shooting mode, the process proceeds to step S306. In step S305, a moving image shooting process is performed, and the process proceeds to step S307. Details of the moving image shooting processing in step S305 will be described later with reference to FIG. On the other hand, in step S306, a still image shooting process is performed and the process proceeds to step S307. Details of the still image shooting process in step S306 are omitted.

ステップS307では、撮影処理が停止されたかどうかを判断し、停止されていない場合はステップS308へ進み、停止された場合は撮影処理を終了する。撮影処理が停止された場合とは、カメラの電源が切断されたときや、カメラのユーザ設定処理、撮影画像・動画の確認のための再生処理等、撮影以外の動作が行われたときである。   In step S307, it is determined whether the shooting process has been stopped. If the shooting process has not been stopped, the process proceeds to step S308. If the shooting process has not been stopped, the shooting process is terminated. The shooting process is stopped when the camera is turned off, or when an operation other than shooting is performed, such as user setting processing for the camera, playback processing for checking captured images / movies, etc. .

ステップS308では、撮影モードが変更されたかどうかを判断し、変更されている場合はステップS301へ戻り、変更されていない場合はステップS304へ戻る。撮影モードが変更されていなければ現在の撮影モードの処理を継続して行い、撮影モードが変更された場合はステップS301〜S303で初期化処理を行った上で変更された撮影モードの処理を行う。   In step S308, it is determined whether or not the shooting mode has been changed. If changed, the process returns to step S301, and if not changed, the process returns to step S304. If the shooting mode has not been changed, the processing of the current shooting mode is continued. If the shooting mode has been changed, initialization processing is performed in steps S301 to S303 and then the changed shooting mode is processed. .

次に、図3のステップS305の動画撮影処理について図4を用いて説明する。ステップS401からS404では、動画記録に関する制御を行う。ステップS401では、カメラ制御部207は、動画記録スイッチがオンされているかどうかを判断し、オンされている場合はステップS402へ進み、オンされていない場合はステップS405へ進む。   Next, the moving image shooting process in step S305 in FIG. 3 will be described with reference to FIG. In steps S401 to S404, control relating to moving image recording is performed. In step S401, the camera control unit 207 determines whether or not the moving image recording switch is turned on. If the moving image recording switch is turned on, the process proceeds to step S402, and if not, the process proceeds to step S405.

ステップS402では、カメラ制御部207は、現在動画記録中かそうでないかを判断する。動画記録中でない場合はステップS403へ進み、動画記録を開始してステップS405へ進む。一方、動画記録中の場合はステップS404へ進み、動画記録を停止してステップS405へ進む。本実施形態においては、動画記録スイッチを押下することで動画の記録開始・停止を行うが、切り替えスイッチ等の他の方式によって記録開始・停止を行っても構わない。   In step S402, the camera control unit 207 determines whether a moving image is currently being recorded. If the moving image is not being recorded, the process proceeds to step S403, where the moving image recording is started and the process proceeds to step S405. On the other hand, if the moving image is being recorded, the process proceeds to step S404, where the moving image recording is stopped and the process proceeds to step S405. In this embodiment, the moving image recording is started / stopped by pressing the moving image recording switch. However, the recording start / stop may be performed by another method such as a changeover switch.

ステップS405では、焦点検出処理を行う。ここでは、図1のカメラ制御部207及びAF信号処理部204で行う撮像面位相差AFを行うためのデフォーカス情報及び信頼性情報を取得する処理である。詳細は図5を用いて後述する。   In step S405, focus detection processing is performed. Here, it is a process of acquiring defocus information and reliability information for performing imaging plane phase difference AF performed by the camera control unit 207 and the AF signal processing unit 204 of FIG. Details will be described later with reference to FIG.

ステップS406では、鮮鋭度情報の取得を行う。ここでは、AF評価値生成部210において、設定された測距領域の撮像信号から先鋭度情報(AF評価値)を取得する処理である。この処理に関しては、従来からの技術であるため、詳細は省略する。   In step S406, sharpness information is acquired. Here, the AF evaluation value generation unit 210 is processing for acquiring sharpness information (AF evaluation value) from the imaging signal of the set distance measurement area. Since this process is a conventional technique, details are omitted.

ステップS407では、カメラ制御部207は現在合焦停止中かどうかを判断し、合焦停止中でない場合はステップS408へ進み、合焦停止中である場合はステップS409へ進む。合焦停止中かどうかは、先述した合焦停止フラグのオン/オフによって判断する。ステップS408では、AF処理を実施し動画撮影処理を終了する。ステップS408は、ステップS405及びS406で検出した情報を基にAF制御を行うもので、詳細は図7を用いて後述する。   In step S407, the camera control unit 207 determines whether the focus is currently stopped. If the focus is not stopped, the process proceeds to step S408. If the focus is stopped, the process proceeds to step S409. Whether or not the focus is stopped is determined by turning on / off the focus stop flag described above. In step S408, AF processing is performed, and the moving image shooting processing ends. Step S408 performs AF control based on the information detected in steps S405 and S406, and details will be described later with reference to FIG.

ステップS409では、AF再起動判定を行い動画撮影処理を終了する。ステップS409は、合焦停止中から被写体が変わったとして再度AF制御を開始するかどうかの判定を行う処理である。詳細は図6を用いて後述する。   In step S409, AF restart determination is performed, and the moving image shooting process ends. Step S409 is processing for determining whether or not AF control is to be started again if the subject has changed since the in-focus state was stopped. Details will be described later with reference to FIG.

次に、図4のステップS405の焦点検出処理について、図5を用いて説明する。まず、ステップS501では、カメラ制御部207は、任意に設定した測距範囲から一対の像信号を取得する。次に、ステップS502では、カメラ制御部207はステップS501で取得した一対の像信号から相関量を算出する。   Next, the focus detection process in step S405 in FIG. 4 will be described with reference to FIG. First, in step S501, the camera control unit 207 acquires a pair of image signals from an arbitrarily set ranging range. In step S502, the camera control unit 207 calculates a correlation amount from the pair of image signals acquired in step S501.

続いて、ステップS503では、カメラ制御部207は、ステップS502で算出した相関量から相関変化量を算出する。そして、ステップS504では、カメラ制御部207は、ステップS503で算出した相関変化量からピントずれ量を算出する。   Subsequently, in step S503, the camera control unit 207 calculates a correlation change amount from the correlation amount calculated in step S502. In step S504, the camera control unit 207 calculates a focus shift amount from the correlation change amount calculated in step S503.

また、ステップS505では、カメラ制御部207は、ステップS504で算出したピントずれ量がどれだけ信頼できるのかを表す信頼性を算出する。これらの処理を測距範囲内に存在する測距領域の数だけ行う。そして、ステップS506では、カメラ制御部207は、測距領域毎にピントずれ量をデフォーカス量に変換する。最後に、ステップS507では、カメラ制御部207は、AFに使用する測距領域を決定し、焦点検出処理を終了する。   In step S505, the camera control unit 207 calculates reliability indicating how reliable the amount of focus deviation calculated in step S504 is. These processes are performed for the number of distance measurement areas existing in the distance measurement range. In step S506, the camera control unit 207 converts the focus shift amount into the defocus amount for each distance measurement area. Finally, in step S507, the camera control unit 207 determines a distance measurement area to be used for AF and ends the focus detection process.

次に、図12から図14を用いて、図5で説明した焦点検出処理を詳細に説明する。   Next, the focus detection process described in FIG. 5 will be described in detail with reference to FIGS.

図12は、焦点検出処理で取り扱う測距範囲を示す像信号を取得する領域の一例を表した図である。図12(A)は、画素アレイ1201上の測距範囲1202を示す図である。相関演算を行う為に必要な領域1204は、測距範囲1202および相関演算に必要なシフト領域1203を合わせた領域である。図12(A)中のp、q、s、tは、それぞれx軸方向の座標を表す。ここで、pからqは領域1204を表し、sからtは測距範囲1202を表す。   FIG. 12 is a diagram illustrating an example of a region in which an image signal indicating a distance measurement range handled in the focus detection process is acquired. FIG. 12A is a diagram showing a distance measurement range 1202 on the pixel array 1201. An area 1204 necessary for performing the correlation calculation is an area obtained by combining the distance measurement range 1202 and the shift area 1203 necessary for the correlation calculation. In FIG. 12A, p, q, s, and t represent coordinates in the x-axis direction, respectively. Here, p to q represent the region 1204, and s to t represent the distance measurement range 1202.

図12(B)は、測距範囲1202を5つに分割した測距領域1205〜1209を示す図である。一例として、本実施形態では、この測距領域単位でピントずれ量を算出し、焦点検出を行う。また、分割した複数の測距領域の中から最も信頼できる領域の測距結果を選び、その領域で算出したピントずれ量をAFに用いる。なお、測距範囲の分割数は上記に限定されない。   FIG. 12B is a diagram showing ranging areas 1205 to 1209 in which the ranging area 1202 is divided into five. As an example, in this embodiment, a focus shift amount is calculated for each distance measurement area unit, and focus detection is performed. Further, the distance measurement result of the most reliable area is selected from the plurality of divided distance measurement areas, and the focus shift amount calculated in the area is used for AF. Note that the number of divisions of the distance measurement range is not limited to the above.

図12(C)は、図12(B)の測距領域1205〜1209を連結した仮の測距領域1210を示す図である。実施形態の一例として、このように測距領域を連結した領域から算出したピントずれ量をAFに用いても良い。   FIG. 12C is a diagram showing a temporary distance measurement area 1210 obtained by connecting the distance measurement areas 1205 to 1209 in FIG. As an example of the embodiment, a focus shift amount calculated from an area obtained by connecting the distance measurement areas as described above may be used for AF.

また、測距エリアの制限がある場合や、焦点検出処理時間などに制限があり、複数の測距エリアを画面上に配置できない場合は、例えば図12(D)のように、長さの異なる複数のエリアで1つの測距エリアを構成する方法でも良い。図12(D)は、測距エリア配置を示した図であり、7つの測距エリア1211〜1217が存在する。同図では、撮影画面に対する水平方向の比率が25%である大きさのエリアが2エリア(1211、1217)、さらに、12.5%である大きさのエリアが5エリア(1212〜1216)、撮影画面の中央に配置されている。このように、異なる大きさの複数の測距エリアを、撮影画面に対する比率が12.5%の大きさのエリア数 > 25%の大きさのエリア数となるように配置する。そして、7つの測距エリアから得られる測距結果を組み合わせて、1つの有効デフォーカス量および有効デフォーカス方向を算出し、この有効デフォーカス量もしくは有効デフォーカス方向を用いて、フォーカスレンズ103を駆動させてピント合わせを行う。   Further, when there are restrictions on the distance measurement area, or when there is a restriction on the focus detection processing time and a plurality of distance measurement areas cannot be arranged on the screen, for example, as shown in FIG. A method in which one ranging area is configured by a plurality of areas may be used. FIG. 12D is a diagram showing the arrangement of ranging areas, and there are seven ranging areas 1211 to 1217. In the figure, two areas (1211, 1217) have a size with a horizontal ratio of 25% with respect to the shooting screen, and five areas (1212 to 1216) have a size of 12.5%. Located in the center of the shooting screen. In this way, a plurality of distance measuring areas having different sizes are arranged so that the ratio to the shooting screen is 12.5% of the number of areas> 25% of the number of areas. Then, by combining the distance measurement results obtained from the seven distance measurement areas, one effective defocus amount and effective defocus direction are calculated, and the focus lens 103 is moved using the effective defocus amount or effective defocus direction. Drive to focus.

このように、図12(D)の例では、撮影画面に対する比率が小さい測距エリアのエリア数を多く配置することで、より撮影画面の中央の被写体にピントを合わせることが可能となる。また、撮影画面に対する測距エリアの比率を小さくすることで、距離の異なる被写体によるAFへの影響を軽減する。さらに、撮影画面に対する測距エリアの比率の小さいエリアだけでなく比率の大きいエリアを配置することで、測距エリアから被写体が抜けることにより発生するピントのふらつきを軽減する。つまり、一時的に被写体が測距エリアから抜けてしまっても、撮影画面に対する比率の大きいエリアで被写体を捉えたままピントを維持することが可能となる。なお、測距領域の配置の仕方、領域の大きさ等は、本実施形態に挙げた内容に限られるものではなく、発明の要旨を逸脱しない範囲の形式であれば良い。   In this way, in the example of FIG. 12D, it is possible to focus on the subject at the center of the shooting screen by arranging a large number of distance measuring areas with a small ratio to the shooting screen. In addition, by reducing the ratio of the distance measurement area to the shooting screen, the influence on the AF due to subjects with different distances is reduced. Further, by arranging not only an area with a small ratio of the distance measuring area to the shooting screen but also an area with a large ratio, the fluctuation of the focus caused by the removal of the subject from the distance measuring area is reduced. That is, even if the subject temporarily leaves the distance measurement area, it is possible to maintain the focus while capturing the subject in an area having a large ratio to the shooting screen. In addition, the arrangement method of the distance measurement area, the size of the area, and the like are not limited to those described in the present embodiment, and may be in a form that does not depart from the gist of the invention.

図13は、図12で設定した測距領域から取得した像信号を示す図である。sからtが測距範囲を表し、pからqがシフト量を踏まえた測距演算に必要な範囲を表す。また、xからyは、分割した1つ分の測距領域を表す。   FIG. 13 is a diagram showing an image signal acquired from the distance measurement area set in FIG. From s to t represents a distance measurement range, and from p to q represents a range necessary for distance measurement calculation based on the shift amount. Further, x to y represent one divided distance measuring area.

図13(A)は、シフト前の像信号を波形で表した図である。実線1301が像信号A、破線1302が像信号Bを示している。領域1205から1209は、図12の分割した各測距領域を表す。   FIG. 13A is a diagram showing a waveform of the image signal before the shift. A solid line 1301 indicates the image signal A, and a broken line 1302 indicates the image signal B. Areas 1205 to 1209 represent the divided ranging areas in FIG.

図13(B)は、図13(A)のシフト前の像波形に対しプラス方向にシフトした図であり、図13(C)は、図13(A)のシフト前の像波形に対しマイナス方向にシフトした図である。相関量を算出する際には、それぞれ矢印の方向に像信号A1301、像信号B1302を1ビットずつシフトする。   13B is a diagram in which the image waveform before the shift in FIG. 13A is shifted in the plus direction, and FIG. 13C is a minus with respect to the image waveform before the shift in FIG. It is the figure shifted to the direction. When calculating the correlation amount, the image signal A 1301 and the image signal B 1302 are shifted bit by bit in the directions of the arrows, respectively.

続いて、相関量CORの算出法について説明する。まず、図13(B)と(C)で説明した通り、像信号Aと像信号Bを1ビットずつシフトしていき、そのときの像信号Aと像信号Bの差の絶対値の和を算出する。ここで、シフト量をiで表し、最小シフト数は図13中のp−s、最大シフト数は図16中のq−tである。また、xは測距領域の開始座標、yは測距領域の終了座標である。これらを用いて、以下の式(1)によって相関量CORを算出することができる。   Next, a method for calculating the correlation amount COR will be described. First, as described in FIGS. 13B and 13C, the image signal A and the image signal B are shifted bit by bit, and the sum of the absolute values of the differences between the image signal A and the image signal B at that time is calculated. calculate. Here, the shift amount is represented by i, the minimum shift number is ps in FIG. 13, and the maximum shift number is qt in FIG. Further, x is the start coordinate of the distance measurement area, and y is the end coordinate of the distance measurement area. Using these, the correlation amount COR can be calculated by the following equation (1).

Figure 2015087703
Figure 2015087703

図14(A)は、相関量を波形で示した図である。グラフの横軸はシフト量を示し、縦軸は相関量を示す。相関量波形1401において、1402、1403は極値周辺を示している。この中でも相関量が小さい方ほど、A像とB像の一致度が高いといえる。   FIG. 14A is a diagram showing the correlation amount as a waveform. The horizontal axis of the graph indicates the shift amount, and the vertical axis indicates the correlation amount. In the correlation amount waveform 1401, 1402 and 1403 indicate the vicinity of the extreme value. Among these, the smaller the correlation amount, the higher the coincidence between the A image and the B image.

続いて、相関変化量ΔCORの算出法について説明する。まず、図14(A)の相関量波形より、1シフト飛ばしの相関量の差から相関変化量を算出する。この時、シフト量をiで表し、最小シフト数は図13中のp−s、最大シフト数は図13中のq−tである。これらを用いて、以下の式(2)によって相関変化量ΔCORを算出することができる。   Next, a method for calculating the correlation change amount ΔCOR will be described. First, the correlation change amount is calculated from the difference in the correlation amount after skipping one shift from the correlation amount waveform shown in FIG. At this time, the shift amount is represented by i, the minimum shift number is ps in FIG. 13, and the maximum shift number is qt in FIG. Using these, the correlation change amount ΔCOR can be calculated by the following equation (2).

Figure 2015087703
Figure 2015087703

図14(B)は、相関変化量ΔCORを波形で示した図である。グラフの横軸はシフト量を示し、縦軸は相関変化量を示す。相関変化量波形1404において、1405、1406は相関変化量がプラスからマイナスになる周辺である。この1405より相関変化量が0となるときをゼロクロスと呼び、最もA像とB像の一致度が高く、そのときのシフト量がピントずれ量となる。   FIG. 14B is a diagram showing the correlation change amount ΔCOR as a waveform. The horizontal axis of the graph indicates the shift amount, and the vertical axis indicates the correlation change amount. In the correlation change amount waveform 1404, reference numerals 1405 and 1406 indicate the vicinity in which the correlation change amount changes from positive to negative. When the correlation change amount becomes 0 from 1405, this is called zero crossing, and the degree of coincidence between the A image and the B image is the highest, and the shift amount at that time is the focus shift amount.

図14(C)は、図14(B)の1405の部分を拡大したもので、1407は相関変化量波形1404の一部分である。図14(C)を用いて、ピントずれ量PRDの算出法について説明する。まず、ピントずれ量は整数部分βと小数部分αに分けられる。小数部分αは、図14(C)中の三角形ABCと三角形ADEの相似の関係から、以下の式(3)によって算出する事ができる。   FIG. 14C is an enlarged view of the portion 1405 in FIG. 14B, and 1407 is a portion of the correlation variation waveform 1404. A method of calculating the focus shift amount PRD will be described with reference to FIG. First, the focus shift amount is divided into an integer part β and a decimal part α. The decimal part α can be calculated by the following equation (3) from the similar relationship between the triangle ABC and the triangle ADE in FIG.

Figure 2015087703
Figure 2015087703

続いて小数部分βは、図14(C)中より以下の式(4)によって算出することができる。
β=k−1 (4)
Subsequently, the decimal part β can be calculated by the following equation (4) from FIG.
β = k−1 (4)

以上、αとβの和からピントずれ量PRDを算出する事ができる。   As described above, the focus shift amount PRD can be calculated from the sum of α and β.

また、図14(B)のように複数のゼロクロスが存在する場合は、ゼロクロスでの相関量変化の急峻性maxder(以下、急峻性と呼ぶ)が大きいところを第1のゼロクロスとする。この急峻性はAFのし易さを示す指標で、値が大きいほどAFし易い点であることを示す。急峻性は以下の式(5)によって算出する事ができる。   Further, when there are a plurality of zero crosses as shown in FIG. 14B, the first zero cross is defined as a point where the steepness maxder (hereinafter referred to as steepness) of the correlation amount change at the zero cross is large. This steepness is an index indicating the ease of AF. The larger the value, the easier it is to perform AF. The steepness can be calculated by the following equation (5).

Figure 2015087703
Figure 2015087703

以上のように、ゼロクロスが複数存在する場合は、急峻性によって第1のゼロクロスを決定する。   As described above, when there are a plurality of zero crosses, the first zero cross is determined based on steepness.

続いて、ピントずれ量の信頼性の算出法について説明する。信頼性は、前記急峻性や、像信号A、Bの2像の一致度fnclvl(以下、2像一致度と呼ぶ)によって定義することができる。2像一致度はピントずれ量の精度を表す指標で、値が小さいほど精度が良い。   Next, a method for calculating the reliability of the focus deviation amount will be described. Reliability can be defined by the steepness and the degree of coincidence fnclvl (hereinafter referred to as the degree of coincidence of two images) of the two images of the image signals A and B. The degree of coincidence between the two images is an index representing the accuracy of the amount of focus deviation.

図14(D)は、図14(A)の1402の部分を拡大したもので、1408が相関量波形1401の一部分である。2像一致度は以下の式(6)によって算出できる。   FIG. 14D is an enlarged view of the portion 1402 in FIG. 14A, and 1408 is a portion of the correlation amount waveform 1401. The degree of coincidence between two images can be calculated by the following equation (6).

Figure 2015087703
Figure 2015087703

次に、図4のステップS409におけるAF再起動判定について図6のフローチャートを用いて説明する。AF再起動判定は、合焦してフォーカスレンズを停止している状態から、再度フォーカスレンズを駆動するかどうかの判定をする処理である。   Next, the AF restart determination in step S409 of FIG. 4 will be described using the flowchart of FIG. The AF restart determination is a process for determining whether to drive the focus lens again from a state where the focus lens is stopped after focusing.

まず、ステップS601では、カメラ制御部207は、図5のステップS505で算出した信頼性が所定の閾値より良い値かどうかを判断する。良い値を示す場合はステップS602へ進み、悪い値を示す場合はステップS604へ進む。   First, in step S601, the camera control unit 207 determines whether or not the reliability calculated in step S505 in FIG. 5 is better than a predetermined threshold value. If the value is good, the process proceeds to step S602. If the value is bad, the process proceeds to step S604.

ステップS602では、カメラ制御部207は、算出したデフォーカス量が深度の所定倍より小さいかどうかを判断する。小さい場合はステップS603へ進み、そうでない場合はステップS604へ進む。   In step S602, the camera control unit 207 determines whether the calculated defocus amount is smaller than a predetermined multiple of the depth. If it is smaller, the process proceeds to step S603, and if not, the process proceeds to step S604.

ステップS603では、AF再起動カウンタをリセットし、ステップS605へ進む。一方、ステップS604では、AF再起動カウンタを加算しステップS605へ進む。   In step S603, the AF restart counter is reset, and the process proceeds to step S605. On the other hand, in step S604, an AF restart counter is added, and the process proceeds to step S605.

上述したように、デフォーカス量が所定より大きい、または信頼性が所定より悪い場合には、撮影している主被写体が変化している可能性があるため、ステップS604でAF再起動カウンタを加算してAFを再起動する準備を行う。検出したデフォーカス量が所定より小さく、信頼性も高い状態を維持している場合は、継続してフォーカスレンズを停止させておくためにステップS603でAF再起動カウンタをリセットする。   As described above, if the defocus amount is larger than the predetermined value or the reliability is lower than the predetermined value, the main subject being photographed may be changed, so the AF restart counter is added in step S604. To prepare for restarting AF. If the detected defocus amount is smaller than the predetermined value and the state of high reliability is maintained, the AF restart counter is reset in step S603 in order to keep the focus lens stopped.

ここで、ステップS602で設定するデフォーカス量の閾値(深度の所定倍)は、主被写体が変わったときには再起動が行いやすく、主被写体が変わっていないときには再起動が不用意にかかりにくくするのを考慮してチューニングを行う。一例として、主被写体のボケが見えるようになる深度の1倍を設定する。また、ステップS601で設定する信頼性の閾値は、例えばデフォーカス量から算出した距離が信頼できる値を設定する。このようにステップS601、S602で設定する閾値は、主被写体が変わったとする場合をどのような場合にするかによって決定する。   Here, the threshold value of the defocus amount (a predetermined multiple of the depth) set in step S602 makes it easy to restart when the main subject changes, and makes it difficult to restart unexpectedly when the main subject has not changed. Tune in consideration of the above. As an example, 1 time is set to a depth at which the blur of the main subject becomes visible. For the reliability threshold value set in step S601, for example, a value with which the distance calculated from the defocus amount can be trusted is set. As described above, the threshold value set in steps S601 and S602 is determined depending on the case where the main subject is changed.

次に、ステップS605では、AF再起動カウンタがAF再起動閾値以上かどうかを判断する。AF再起動閾値以上の場合はステップS606へ進み、AF再起動閾値未満の場合は処理を終了する。ステップS606では、合焦停止フラグをオフにしてAF再起動を行い、フォーカスレンズ駆動を再開するようにして処理を終了する。   In step S605, it is determined whether the AF restart counter is greater than or equal to the AF restart threshold. If it is greater than or equal to the AF restart threshold, the process proceeds to step S606. If it is less than the AF restart threshold, the process ends. In step S606, the focus stop flag is turned off, AF restart is performed, and the processing is ended so as to restart the focus lens drive.

次に、図4のステップS408におけるAF処理について、図7のフローチャートを用いて説明する。AF処理は、合焦停止していない状態でのフォーカスレンズの駆動及び、合焦停止の判定を行う処理である。   Next, the AF process in step S408 of FIG. 4 will be described using the flowchart of FIG. The AF processing is processing for driving the focus lens in a state where focusing is not stopped and for determining whether focusing is stopped.

ステップS701では、カメラ制御部207は、デフォーカス量が深度内であり、かつ図5のステップS505で算出した信頼性が所定より良い値を示しているかどうかを判断する。ここでの信頼性の閾値は、例えばデフォーカス量から算出した距離が信頼できる値を設定する。この条件に該当する場合はステップS702へ進み、そうでない場合はステップS703へ進む。本実施の形態では、ステップS701で用いる閾値を深度の1倍としているが、必要に応じて大きく設定したり、小さく設定したりしても構わない。   In step S701, the camera control unit 207 determines whether the defocus amount is within the depth and whether the reliability calculated in step S505 in FIG. 5 shows a value better than a predetermined value. As the reliability threshold value, for example, a value at which the distance calculated from the defocus amount is reliable is set. If this condition is met, the process proceeds to step S702; otherwise, the process proceeds to step S703. In the present embodiment, the threshold used in step S701 is set to be 1 time the depth, but may be set larger or smaller as necessary.

ステップS702では、合焦停止フラグをオンにして処理を終了する。先述したように、被写体に合焦したと判断した場合は、フォーカスレンズを駆動している状態から停止している状態に移行した後、再度フォーカスレンズを駆動するか否か、図4のステップS409で再起動判定を行う。   In step S702, the focus stop flag is turned on and the process ends. As described above, when it is determined that the subject is in focus, the process proceeds from the state in which the focus lens is driven to the stop state, and then whether or not the focus lens is to be driven again is determined in step S409 in FIG. Perform a restart judgment with.

一方、ステップS703では、カメラ制御部207は、レンズ駆動速度や駆動方法の決定を行い、ステップS704へ進む。ステップS703におけるレンズ駆動設定の詳細は、図8を用いて後述する。ステップS704では、カメラ制御部207は、レンズ駆動処理を行い、処理を終了する。ステップS704におけるレンズ駆動処理の詳細は図9を用いて後述する。   On the other hand, in step S703, the camera control unit 207 determines the lens driving speed and the driving method, and proceeds to step S704. Details of the lens drive setting in step S703 will be described later with reference to FIG. In step S704, the camera control unit 207 performs a lens driving process and ends the process. Details of the lens driving process in step S704 will be described later with reference to FIG.

以降に説明する一連の処理が本実施形態の特徴的な部分であり、概略をまず説明する。位相差AFに用いる像信号の信頼性が低く、位相差に基づくデフォーカス量が信頼できない(デフォーカス方向は信頼できる)場合、本実施形態では、フォーカスレンズを至近無限に駆動させる微小駆動を実行する。これにより、位相差AFだけでなく、コントラストAFによる合焦方向も取得することが可能になる。ここで、より信頼できるほうのAF結果を用いるため、位相差AFの信頼度(有効と判定されたエリア数)とコントラストAFによる合焦度(合焦度合い)に基づいて、どちらのAFを優先して駆動方向の設定に用いるかを判定する。この判定の処理は図15で詳細に説明する。判定結果に基づいて、駆動方向の設定に用いるAF結果を変更することで、合焦方向の判定をより確実に行うことが可能になる。   A series of processing described below is a characteristic part of the present embodiment, and an outline will be described first. In the case where the reliability of the image signal used for phase difference AF is low and the defocus amount based on the phase difference is unreliable (the defocus direction is reliable), in the present embodiment, a minute drive that drives the focus lens infinitely infinitely is executed. To do. Thereby, it is possible to acquire not only the phase difference AF but also the in-focus direction by the contrast AF. Here, in order to use the more reliable AF result, which AF is prioritized based on the reliability of the phase difference AF (the number of areas determined to be valid) and the focusing degree (focusing degree) by contrast AF. It is then determined whether to use for setting the driving direction. This determination process will be described in detail with reference to FIG. By changing the AF result used for setting the drive direction based on the determination result, it is possible to more reliably determine the in-focus direction.

次に、図7のステップS703におけるレンズ駆動設定について、図8のフローチャートを用いて説明する。ステップS801において、カメラ制御部207は、像信号の信頼性が所定値γより良い値かを判定する。ここで、所定値γ(第2のレベル)は、像信号の位相差に基づいて算出されるデフォーカス量が十分信頼できるような閾値に設定される。信頼性が所定値γより良い場合は、被写体までの距離が測距できたと判断し、ステップS802に遷移する。ステップS802では、測距した距離分のフォーカスレンズ駆動を行うので、サーチ駆動移行サーチカウンタをリセットし、処理を終了する。   Next, the lens drive setting in step S703 of FIG. 7 will be described using the flowchart of FIG. In step S801, the camera control unit 207 determines whether the reliability of the image signal is a value better than the predetermined value γ. Here, the predetermined value γ (second level) is set to a threshold value with which the defocus amount calculated based on the phase difference of the image signal is sufficiently reliable. If the reliability is better than the predetermined value γ, it is determined that the distance to the subject has been measured, and the process proceeds to step S802. In step S802, since focus lens driving is performed for the measured distance, the search drive shift search counter is reset, and the process ends.

一方、ステップS801で測距の信頼性が所定値γより悪い場合、ステップS803に進み、カメラ制御部207は、第一の焦点情報(位相差)による方向判定処理を行う。この処理に関しては、図11(A)を用いて後述する。   On the other hand, if the reliability of distance measurement is worse than the predetermined value γ in step S801, the process proceeds to step S803, and the camera control unit 207 performs direction determination processing based on the first focus information (phase difference). This process will be described later with reference to FIG.

ステップS804では、カメラ制御部207は、第二の焦点情報(コントラスト)による方向判別処理を行う。この処理に関しては、図11(B)を用いて後述することとする。   In step S804, the camera control unit 207 performs direction determination processing based on the second focus information (contrast). This process will be described later with reference to FIG.

ステップS805は、第一および第二の焦点情報の有効度を判定する処理であり、位相差AFの信頼度とコントラストAFの合焦度に応じて、どちらのAFが有効な状態であるかの判定を行う。この処理に関しては、図15を用いて後述する。   Step S805 is a process for determining the effectiveness of the first and second focus information, which AF is in an effective state according to the reliability of the phase difference AF and the focus of the contrast AF. Make a decision. This process will be described later with reference to FIG.

ステップS806では、カメラ制御部207は、ステップS805で判定された結果に基づいて、第一と第二の焦点情報のどちらが有効であるかを判定する。第一の焦点情報が有効である場合は、ステップS809に遷移し、第二の焦点情報が有効である場合は、ステップS807に遷移する。   In step S806, the camera control unit 207 determines which of the first and second focus information is valid based on the result determined in step S805. If the first focus information is valid, the process proceeds to step S809, and if the second focus information is valid, the process proceeds to step S807.

ステップS807では、カメラ制御部207は、コントラストAFでの方向判定(第二の方向判定)が完了しているかを判定する。完了している場合はステップS810に遷移し、完了していない場合はステップS808に遷移する。   In step S807, the camera control unit 207 determines whether the direction determination (second direction determination) in contrast AF is completed. If completed, the process proceeds to step S810, and if not completed, the process proceeds to step S808.

ステップS808では、カメラ制御部207は、位相差AFの結果が特定されてからの経過時間(第一の方向判定終了カウント)が閾値TH以上か否かを判定する。第一の方向判定終了カウントが閾値TH以上の場合はステップS810に遷移し、経過していない場合はステップS811に遷移する。なお、本実施形態では閾値の値は0.7秒としているが、任意の値に設定することが可能である。   In step S808, the camera control unit 207 determines whether or not an elapsed time (first direction determination end count) after the phase difference AF result is specified is greater than or equal to a threshold value TH. If the first direction determination end count is greater than or equal to the threshold value TH, the process proceeds to step S810, and if not, the process proceeds to step S811. In this embodiment, the threshold value is 0.7 seconds, but can be set to an arbitrary value.

ステップS809は、位相差AFが有効な場合であり、位相差の方向判定(第一の方向判定)が完了しているかを確認する。完了している場合はステップS810に遷移し、完了していない場合はステップS811に遷移する。   Step S809 is a case where the phase difference AF is effective, and confirms whether or not the phase difference direction determination (first direction determination) has been completed. If completed, the process proceeds to step S810, and if not completed, the process proceeds to step S811.

ステップS810では、駆動方向が決定しているので、サーチ駆動を開始するためのサーチフラグをONにして処理を終了する。一方、ステップS811では、駆動方向が未決定であるため、サーチ駆動待ち状態として処理を終了する。なお、ステップS811において、所定時間経過したらサーチ駆動に移行するようにしてもよい。   In step S810, since the drive direction has been determined, the search flag for starting the search drive is turned ON, and the process ends. On the other hand, in step S811, since the drive direction is not yet determined, the process ends in a search drive waiting state. In step S811, it may be shifted to search drive when a predetermined time has elapsed.

次に図7のステップS704におけるレンズ駆動処理について、図9のフローチャートを用いて説明する。   Next, the lens driving process in step S704 in FIG. 7 will be described with reference to the flowchart in FIG.

ステップS901では、カメラ制御部207は、サーチ駆動フラグがオフかどうかを判断する。オフの場合はステップS902へ進み、オンの場合はステップS903へ進む。   In step S901, the camera control unit 207 determines whether the search drive flag is off. If it is off, the process proceeds to step S902. If it is on, the process proceeds to step S903.

ステップS902では、像信号の位相差に基づいて算出されたデフォーカス量を基に距離駆動を行い、レンズ駆動処理を終了する。この距離駆動の処理に関しては、カメラ制御部207が算出したデフォーカス量をフォーカスレンズ103の駆動量に変換して、フォーカスレンズ駆動部105に駆動命令を与える処理である。一方、ステップS903では、サーチ(方向)駆動を行いレンズ駆動処理を終了する。   In step S902, distance driving is performed based on the defocus amount calculated based on the phase difference of the image signal, and the lens driving process is terminated. The distance driving process is a process of converting the defocus amount calculated by the camera control unit 207 into the driving amount of the focus lens 103 and giving a driving command to the focus lens driving unit 105. On the other hand, in step S903, search (direction) driving is performed and the lens driving process is terminated.

次に、図9のステップS903におけるサーチ駆動処理について、図10のフローチャートを用いて説明する。ステップS1001では、サーチ駆動が初回かどうかを判断する。初回である場合はステップS1002へ進み、初回でない場合はステップS1007へ進む。   Next, the search drive processing in step S903 in FIG. 9 will be described using the flowchart in FIG. In step S1001, it is determined whether search driving is the first time. If it is the first time, the process proceeds to step S1002, and if it is not the first time, the process proceeds to step S1007.

ステップS1002〜S1006は駆動方向を設定する処理である。サーチ駆動が初回である場合は、フォーカスレンズの駆動方向を決定する必要がある。   Steps S1002 to S1006 are processes for setting the drive direction. When search driving is the first time, it is necessary to determine the driving direction of the focus lens.

ステップS1002では、カメラ制御部207は、前述したステップS807またはステップS809で方向判定がされているか否かを判断する。方向判定されている場合はステップS1003へ進み、方向判定されていない場合はステップS1004へ進む。ステップS1003では、カメラ制御部207は、判定されている方向を駆動方向に設定する。   In step S1002, the camera control unit 207 determines whether the direction is determined in step S807 or step S809 described above. If the direction is determined, the process proceeds to step S1003. If the direction is not determined, the process proceeds to step S1004. In step S1003, the camera control unit 207 sets the determined direction as the driving direction.

一方、ステップS1004では、カメラ制御部207は、現在のレンズ位置が至近端に近いかどうかを判断する。至近端に近い場合はステップS1005へ進み、無限端に近い場合はステップS1006へ進む。   On the other hand, in step S1004, the camera control unit 207 determines whether or not the current lens position is close to the closest end. If it is close to the close end, the process proceeds to step S1005, and if close to the infinite end, the process proceeds to step S1006.

ステップS1005では、カメラ制御部207は、サーチ駆動開始時のレンズの駆動方向を至近方向に設定する。一方、ステップS1006では、サーチ駆動開始時のレンズの駆動方向を無限方向に設定する。このように駆動方向を設定することで、レンズ駆動領域全体をサーチ駆動する時間を短縮することができ、サーチ駆動によって合焦位置を発見するのに要する最長時間を短くできる。ステップS1002〜S1006の処理によりフォーカスレンズの駆動方向を設定すると、ステップS1007へ進む。   In step S1005, the camera control unit 207 sets the lens driving direction at the start of search driving to the closest direction. On the other hand, in step S1006, the lens driving direction at the start of search driving is set to an infinite direction. By setting the driving direction in this way, it is possible to shorten the time for searching and driving the entire lens driving region, and to shorten the longest time required to find the in-focus position by search driving. When the focus lens drive direction is set by the processing in steps S1002 to S1006, the process proceeds to step S1007.

ステップS1007では、カメラ制御部207は、設定したレンズ駆動方向及びレンズ駆動速度でフォーカスレンズを駆動するよう制御し、ステップS1008へ進む。ステップS1008では、カメラ制御部207は、フォーカスレンズが至近端もしくは無限端に到達したかどうかを判断する。端に到達した場合はステップS1009へ進み、到達していない場合はステップS1010へ進む。ステップS1009では、フォーカスレンズの駆動方向を反転させてステップS1010へ進む。   In step S1007, the camera control unit 207 controls to drive the focus lens with the set lens driving direction and lens driving speed, and the process proceeds to step S1008. In step S1008, the camera control unit 207 determines whether the focus lens has reached the closest end or the infinite end. If the end has been reached, the process proceeds to step S1009, and if not, the process proceeds to step S1010. In step S1009, the driving direction of the focus lens is reversed and the process proceeds to step S1010.

ステップS1010では、カメラ制御部207は、信頼性が所定値γより良いかどうかを判断し、所定値γより良い場合はステップS1012へ進み、そうでない場合はステップS1011へ進む。   In step S1010, the camera control unit 207 determines whether the reliability is better than the predetermined value γ. If the reliability is higher than the predetermined value γ, the process proceeds to step S1012. Otherwise, the process proceeds to step S1011.

ステップS1011では、フォーカスレンズの至近端、無限端の両方に到達したかどうかを判断し、到達した場合はステップS1012へ進み、到達していない場合はサーチ駆動処理を終了する。ステップS1012では、サーチ駆動フラグをオフにしてサーチ駆動処理を終了する。   In step S1011, it is determined whether or not both the near end and the infinite end of the focus lens have been reached. If so, the process proceeds to step S1012. If not, the search drive process is terminated. In step S1012, the search drive flag is turned off and the search drive process is terminated.

サーチ駆動を終了する条件は、ステップS1010で信頼性が所定値γより良くなった場合、もしくはステップS1011でフォーカスレンズの至近端、無限端の両方に到達した場合である。S1010で設定する信頼性閾値γは、図9のS901で設定した閾値γと同様に、少なくとも像信号の位相差に基づいて算出されるデフォーカス量が信頼できる値である。信頼性が閾値γより良ければ、合焦位置に近づいてきたと判断できるため、サーチ駆動をやめて再度デフォーカス量を基に距離駆動する制御に切り替える。また、ステップS1011で至近端、無限端の両方に到達したということは、フォーカス駆動領域の全域を駆動したことになり、被写体が特定できなかった場合である。この場合はサーチ駆動フラグをオフにし、最初の処理の状態に戻す。本実施形態と異なる形態で、被写体が特定できない場合にはサーチ駆動フラグをオフにせずにサーチ駆動を継続させるように制御しても良い。   The condition for terminating the search drive is when the reliability becomes better than the predetermined value γ in step S1010, or when both the near end and the infinite end of the focus lens are reached in step S1011. The reliability threshold value γ set in S1010 is a value with which the defocus amount calculated based on at least the phase difference of the image signal can be trusted, similarly to the threshold value γ set in S901 in FIG. If the reliability is better than the threshold value γ, it can be determined that the in-focus position has been approached, so the search drive is stopped and the control is switched to the distance drive based on the defocus amount again. In addition, the fact that both the near end and the infinite end have been reached in step S1011 means that the entire focus drive area has been driven and the subject could not be specified. In this case, the search drive flag is turned off to return to the initial processing state. In a different form from the present embodiment, when the subject cannot be specified, it may be controlled to continue the search drive without turning off the search drive flag.

次に、図11(A)を用いて、図8のステップS803における第一焦点情報による方向判定処理を説明する。ステップS1101は、方向検出のカウンタ(サーチ駆動移行カウンタ)を加算する処理である。カウンタを加算し、ステップS1102に遷移する。   Next, the direction determination process based on the first focus information in step S803 in FIG. 8 will be described with reference to FIG. Step S1101 is a process of adding a direction detection counter (search drive transition counter). The counter is added and the process proceeds to step S1102.

ステップS1102では、カメラ制御部207は、サーチ駆動移行カウンタが所定回数以上かを判定する。所定回数以上であればステップS1103に遷移し、そうでなければステップS1105に遷移する。   In step S1102, the camera control unit 207 determines whether the search drive transition counter is equal to or greater than a predetermined number. If it is the predetermined number of times or more, the process proceeds to step S1103, and if not, the process proceeds to step S1105.

ステップS1103では、カメラ制御部207は、第一焦点情報による方向判定の判定フラグをONにする。本実施形態では、この方向判定フラグを参照し、フォーカスレンズのサーチ駆動を開始する。   In step S1103, the camera control unit 207 turns on a determination flag for direction determination based on the first focus information. In this embodiment, the direction determination flag is referred to, and the focus lens search drive is started.

ステップS1104は、判定終了カウントを加算する処理である。この判定終了カウンタは、方向判定が完了してからの経過時間を監視するものであり、図8のステップS808にて参照される。   Step S1104 is processing to add a determination end count. This determination end counter monitors the elapsed time since the direction determination is completed, and is referred to in step S808 of FIG.

一方、ステップS1105は、判定終了カウントをクリアする処理である。この処理は、サーチ駆動移行カウンタが所定回数未満で方向を特定できていない場合であるため、カウンタをクリアする。上記の処理を行い、処理を終了する。   On the other hand, step S1105 is processing to clear the determination end count. Since this process is performed when the search drive transition counter is less than the predetermined number of times and the direction cannot be specified, the counter is cleared. The above processing is performed and the processing is terminated.

次に、図11(B)を用いて、図8のステップS804における第二焦点情報による方向判定処理を説明する。ステップS1106は、フォーカスレンズの微小駆動を行う処理である。この微小駆動処理に関しては、図18、19を用いて後述する。   Next, the direction determination process based on the second focus information in step S804 in FIG. 8 will be described with reference to FIG. Step S1106 is processing for performing minute driving of the focus lens. This minute driving process will be described later with reference to FIGS.

ステップS1107は、第二焦点情報による方向判別が完了しているかを判定する処理である。後述する処理により微小駆動の方向判別が完了している状態であればステップS1108に遷移し、そうでなければ処理を終了する。   Step S1107 is processing for determining whether or not direction determination based on the second focus information has been completed. If the direction determination for minute driving has been completed by the process described later, the process proceeds to step S1108; otherwise, the process ends.

ステップS1108は、第二焦点情報による方向判定の判定フラグをONにする。この方向判定フラグを参照し、フォーカスレンズのサーチ駆動を開始する。上記の処理を行い、処理を終了する。   In step S1108, a determination flag for determining the direction based on the second focus information is turned ON. The focus lens search drive is started with reference to this direction determination flag. The above processing is performed and the processing is terminated.

次に、図15(A)を用いて、図8のステップS805における第一と第二の焦点情報の有効度判定処理を行う。ステップS1501は、第一の焦点情報による有効エリア数算出処理である。ここでは、前述した図12(D)のように測距枠の中に複数のエリアがある場合、有効なエリアを判定してその数を算出する。この処理の詳細は、図16を用いて後述する。   Next, using FIG. 15A, the first and second focus information validity determination processing in step S805 in FIG. 8 is performed. Step S1501 is an effective area number calculation process based on the first focus information. Here, when there are a plurality of areas in the distance measurement frame as shown in FIG. 12D, the effective area is determined and the number thereof is calculated. Details of this processing will be described later with reference to FIG.

ステップS1502は、第二の焦点情報による合焦度算出処理である。ここでは、取得されたコントラスト情報から合焦度を算出する。この処理の詳細は、図17を用いて後述する。   Step S1502 is a focus degree calculation process based on the second focus information. Here, the degree of focus is calculated from the acquired contrast information. Details of this processing will be described later with reference to FIG.

ステップS1503では、カメラ制御部207は、ステップS1502で算出された合焦度に基づいて大ボケか否かを判定する。大ボケ状態とは、合焦度が低く、ピントが大きくボケている状態である。大ボケ状態であればステップS1504に遷移し、そうでなければステップS1505に遷移する。   In step S1503, the camera control unit 207 determines whether or not there is a large blur based on the degree of focus calculated in step S1502. The large blurred state is a state where the degree of focus is low and the focus is greatly blurred. If so, the process proceeds to step S1504. Otherwise, the process proceeds to step S1505.

ステップS1504では、ステップS1501で算出された有効エリア数がTH1以上であるか否かを判定する。TH1以上であればステップS1508に進み、TH1未満であればステップS1509に進む。   In step S1504, it is determined whether the number of effective areas calculated in step S1501 is greater than TH1. If it is greater than TH1, the process proceeds to step S1508, and if it is less than TH1, the process proceeds to step S1509.

一方、ステップS1505では、カメラ制御部207は、合焦度に基づいて小ボケか否かを判定する。小ボケ状態とは、合焦状態と判定される場合より合焦度が低いが、前述の大ボケ状態より合焦度が高い状態である。小ボケ状態であれば、ステップS1506に遷移し、そうでなければ合焦状態であると判定してステップS1507に遷移する。   On the other hand, in step S1505, the camera control unit 207 determines whether or not there is a small blur based on the degree of focus. The small blur state is a state in which the degree of focus is lower than that in the case where it is determined as the in-focus state, but the degree of focus is higher than the above-described large blur state. If it is a small blur state, the process proceeds to step S1506, and if not, it is determined that the focus state is achieved, and the process proceeds to step S1507.

ステップS1506では、ステップS1501で算出された有効エリア数がTH2以上であるか否かを判定する。TH2以上であればステップS1508に進み、TH2未満であればステップS1509に進む。ここで、TH2はTH1より小さい値である。   In step S1506, it is determined whether the number of effective areas calculated in step S1501 is greater than or equal to TH2. If it is greater than TH2, the process proceeds to step S1508, and if it is less than TH2, the process proceeds to step S1509. Here, TH2 is smaller than TH1.

一方、ステップS1507では、ステップS1501で算出された有効エリア数がTH3以上であるか否かを判定する。TH3以上であればステップS1508に進み、TH3未満であればステップS1509に進む。ここで、TH3はTH2より小さい値である。
ステップS1508は、第一の焦点情報の有効度が高い場合に到達する処理である。ここでは、第一の焦点情報の有効フラグを設定し、処理を終了する。このフラグは、図8のステップS806で参照される。
On the other hand, in step S1507, it is determined whether or not the number of effective areas calculated in step S1501 is greater than or equal to TH3. If it is equal to or greater than TH3, the process proceeds to step S1508, and if it is less than TH3, the process proceeds to step S1509. Here, TH3 is smaller than TH2.
Step S1508 is processing to be reached when the effectiveness of the first focus information is high. Here, the valid flag of the first focus information is set, and the process ends. This flag is referred to in step S806 in FIG.

ステップS1509は、第二の焦点情報の有効度が高い場合に到達する処理である。ここでは、第二の焦点情報の有効フラグを設定し、処理を終了する。このフラグは、図8のステップS806で参照される。   Step S1509 is processing to be reached when the effectiveness of the second focus information is high. Here, a valid flag for the second focus information is set, and the process is terminated. This flag is referred to in step S806 in FIG.

この処理を図式化したものが、図15(B)である。表中のCは第二の焦点情報(コントラストAF)が有効であることを示し、Pは第一の焦点情報(位相差AF)が有効であることを示している。本実施形態では、位相差AFにおいて、方向が検出されているエリア数(信頼度)による閾値を設定する。第二の焦点情報に基づいて合焦状態と判定された場合、位相差AF結果を有効にする閾値を、図15(B)の例では3エリアに設定している。すなわち、ステップS1501で算出された有効エリア数が3以上であれば、位相差AFの検出結果が有効であると判定する。一方、大ボケの場合、位相差AF結果を有効にする閾値を5エリアとする。つまり、コントラスト情報による合焦度が高い場合は位相差AFの結果を積極的に使用し、合焦度が低い場合はコントラストAFの結果を積極的に使うという処理である。   A schematic representation of this process is shown in FIG. C in the table indicates that the second focus information (contrast AF) is effective, and P indicates that the first focus information (phase difference AF) is effective. In the present embodiment, in the phase difference AF, a threshold is set based on the number of areas (reliability) whose directions are detected. When it is determined that the in-focus state is based on the second focus information, the threshold value for validating the phase difference AF result is set to 3 areas in the example of FIG. That is, if the number of effective areas calculated in step S1501 is 3 or more, it is determined that the detection result of phase difference AF is valid. On the other hand, in the case of large blur, the threshold value for validating the phase difference AF result is 5 areas. That is, this is a process of actively using the result of phase difference AF when the degree of focus based on contrast information is high, and actively using the result of contrast AF when the degree of focus is low.

位相差AFの有効エリアが少ないと、誤ったデフォーカス方向が判定される可能性が高くなる。特に撮像面位相差AFにおいては、合焦位置から離れている場合、一対の像信号の対称性が崩れやすく、AF結果の信頼性が低くなる傾向がある。そこで、本実施形態では、コントラスト情報を用いて簡易的に合焦度を判定し、判定結果に応じて位相差AFを有効にする閾値を変更する。具体的には、合焦度が高い状態であれば、位相差AFを有効にする閾値を低く設定し、合焦度が低い状態であれば、位相差AFを有効にする閾値を高く設定する。   If the effective area of the phase difference AF is small, there is a high possibility that an incorrect defocus direction is determined. In particular, in the imaging plane phase difference AF, the symmetry of the pair of image signals is likely to be lost when away from the in-focus position, and the reliability of the AF result tends to be low. Therefore, in this embodiment, the degree of focus is simply determined using the contrast information, and the threshold value for enabling the phase difference AF is changed according to the determination result. Specifically, if the degree of focus is high, the threshold for enabling phase difference AF is set low, and if the degree of focus is low, the threshold for enabling phase difference AF is set high. .

このように、コントラスト情報を用いて、位相差AFの結果を使用する条件を変更することが本実施形態の特徴である。特に、位相差AFの信頼性が高くない(デフォーカス量が信頼できない)状況で、合焦方向を判定してサーチ駆動を行う場合、位相差AFに基づく合焦方向が信頼できるかどうかを判定する。よって、位相差AFが信頼できる場合には、位相差AFの方向判定結果を用いて速やかにAF動作を行うことが可能になるとともに、位相差AFが信頼できない場合には、より信頼性の高いコントラストAFに基づく合焦方向を用いてAF動作を行うことができる。   As described above, the feature of the present embodiment is that the condition for using the result of the phase difference AF is changed using the contrast information. In particular, in the case where the focus direction is determined and search drive is performed in a situation where the reliability of the phase difference AF is not high (the defocus amount is not reliable), it is determined whether the focus direction based on the phase difference AF is reliable. To do. Therefore, when the phase difference AF is reliable, it is possible to quickly perform the AF operation using the direction determination result of the phase difference AF, and when the phase difference AF is not reliable, the reliability is higher. An AF operation can be performed using a focusing direction based on contrast AF.

次に、図15(A)のステップS1501における第一の焦点情報による有効エリア数の算出処理について、図16を用いて説明する。ステップS1601では、カメラ制御部207は、図12(D)に示したような測距エリアセンサの全数に対して測距結果の確認を行うにあたり、最上位のエリアから最下位のエリアまで対象となるエリア番号をインクリメントする。   Next, the calculation process of the number of effective areas based on the first focus information in step S1501 in FIG. 15A will be described with reference to FIG. In step S1601, the camera control unit 207 checks the distance measurement results for the total number of distance measurement area sensors as illustrated in FIG. The area number is incremented.

ステップS1602では、カメラ制御部207は、判定対象となっているエリア(検出領域)において、取得された像信号に基づいて、位相差AFの信頼性が所定値δよりも良いかの判断を行う。ここで、所定値δ(第1のレベル)は、像信号の位相差に基づいて少なくともデフォーカスの方向が信頼できるような閾値を設定する。信頼性が所定値δより良い場合は、被写体までの方向が特定できるエリアであると判断し、ステップS1603へと遷移する。一方、信頼性がδより悪い場合は、方向も特定できないエリアであると判断し、ステップS1604に遷移する。   In step S1602, the camera control unit 207 determines whether or not the reliability of the phase difference AF is better than the predetermined value δ based on the acquired image signal in the determination target area (detection region). . Here, the predetermined value δ (first level) is set to a threshold value at which the defocus direction is reliable based on the phase difference of the image signal. If the reliability is better than the predetermined value δ, it is determined that the area can identify the direction to the subject, and the process proceeds to step S1603. On the other hand, if the reliability is lower than δ, it is determined that the area cannot be specified, and the process proceeds to step S1604.

ステップS1603では、カメラ制御部207は、有効エリア数をカウントする。ステップS1604では、カメラ制御部207は、全エリアのチェックが終了したかの判定を行い、判定が終了している場合はステップS1605に遷移し、終了していない場合はステップS1601に遷移する。   In step S1603, the camera control unit 207 counts the number of effective areas. In step S1604, the camera control unit 207 determines whether all areas have been checked. If the determination has been completed, the process proceeds to step S1605. If not, the process proceeds to step S1601.

ステップS1605では、カメラ制御部207は、有効エリア数を保持する。保持されたエリア数は、図15(A)のステップS1504、S1506、S1507において参照される。エリアの保持処理の後、処理を終了する。   In step S1605, the camera control unit 207 holds the number of effective areas. The number of retained areas is referred to in steps S1504, S1506, and S1507 in FIG. After the area holding process, the process ends.

次に、図17を用いて、合焦度算出処理の説明を行う。図17(A)は、撮像信号から生成されるコントラスト値をグラフにしたもので、横軸にフォーカスレンズの位置、縦軸に評価値を示している。本実施形態の評価値は2種類で、輝度のコントラストのピーク値を示すMMP(1701)、及び、撮像信号から特定の周波数成分を検出したTEP(1702)である。なお、本実施形態では1.5MHzの周波数帯域を使っているが、これは一例である。TEPは合焦位置(1703)を中心に山形状になっている。これは、フォーカスレンズが大ボケの状態から合焦に近づくにつれて、被写体のエッジがくっきりとしてくることにより、低周波数成分から高周波数成分が多くなるため、合焦位置でピークとなる。一方、輝度のコントラストを示すMMPは、ピークの値であるため、画面内の被写体が変化しない限り大きさがほとんど変化しない。   Next, the focus degree calculation process will be described with reference to FIG. FIG. 17A is a graph showing the contrast value generated from the imaging signal, with the horizontal axis indicating the position of the focus lens and the vertical axis indicating the evaluation value. There are two types of evaluation values in the present embodiment: MMP (1701) indicating the peak value of luminance contrast, and TEP (1702) that detects a specific frequency component from the imaging signal. In this embodiment, a frequency band of 1.5 MHz is used, but this is an example. The TEP has a mountain shape around the in-focus position (1703). This is a peak at the in-focus position because the edge of the subject becomes clearer as the focus lens approaches the in-focus state from a large blur, and the high-frequency component increases from the low-frequency component. On the other hand, since the MMP indicating the luminance contrast is a peak value, the size hardly changes unless the subject in the screen changes.

この特性を利用して算出した簡易合焦度を示したのが、図17(B)である。簡易合焦度1704は、TEPをMMPで割ったものであり、図17(B)で示すように山形状になる。本実施形態では、この山形状を100分率で表示した場合に、55%以上を合焦、40%以上を小ボケ、それ未満を大ボケと判定する。なお、この値は一例であり、被写体や条件によって変更しても良い。   FIG. 17B shows the simple degree of focus calculated using this characteristic. The simple focus degree 1704 is obtained by dividing TEP by MMP, and has a mountain shape as shown in FIG. In this embodiment, when this mountain shape is displayed at 100%, it is determined that 55% or more is in focus, 40% or more is small blur, and less than that is large blur. This value is an example, and may be changed depending on the subject and conditions.

この簡易合焦度が低いほど、フォーカスレンズの位置が合焦位置から離れている可能性が高く、簡易合焦度が高いほど、合焦位置から近い可能性が高い。なお、ここで算出された合焦度の判定結果は、位相差AFの有効エリア数の閾値を決定するために、図15(A)のステップS1503およびS1505で参照される。   The lower the simple focus degree, the higher the possibility that the position of the focus lens is away from the focus position. The higher the simple focus degree, the higher the possibility that the focus lens is closer to the focus position. The focus degree determination result calculated here is referred to in steps S1503 and S1505 in FIG. 15A in order to determine a threshold value for the number of effective areas of phase difference AF.

次に、図11(B)のステップS1106における微小駆動処理について、図18を用いて説明する。ステップS1801では、微小駆動の動作状態を示すカウンタが現在0であるかを判別する。カウンタが0である場合はステップS1802へ、0でない場合はステップS1803へ遷移する。   Next, the minute driving process in step S1106 of FIG. 11B will be described with reference to FIG. In step S1801, it is determined whether the counter indicating the operation state of minute driving is currently zero. If the counter is 0, the process proceeds to step S1802, and if it is not 0, the process proceeds to step S1803.

ステップS1802では、フォーカスレンズが至近側にある場合の処理として、現在のAF評価値レベルを保持する。ここでのAF評価値は、後述のステップS1810でフォーカスレンズが無限側にあるときに撮像素子に蓄積された電荷から生成された撮像信号によるものである。   In step S1802, the current AF evaluation value level is held as processing when the focus lens is on the close side. The AF evaluation value here is based on an imaging signal generated from charges accumulated in the imaging element when the focus lens is on the infinite side in step S1810 described later.

一方、ステップS1803では、現在のカウンタが1であるかを判別する。カウンタが1である場合はステップS1804へ、1でない場合はステップS1809へ遷移する。   On the other hand, in step S1803, it is determined whether or not the current counter is 1. If the counter is 1, the process proceeds to step S1804. If it is not 1, the process proceeds to step S1809.

ステップS1804では、後述するステップS1808でフォーカスレンズを駆動するための振動振幅と中心移動振幅を演算する。通常、これらの振幅は焦点深度内に設定されるのが一般的である。   In step S1804, the vibration amplitude and the center movement amplitude for driving the focus lens in step S1808 described later are calculated. Usually, these amplitudes are generally set within the depth of focus.

ステップS1805では、ステップS1802で保持した無限側のAF評価値レベルと後述のステップS1810で保持した至近側のAF評価値レベルを比較する。前者が大きい場合はステップS1806へ、後者が大きい場合はステップS1807へ遷移する。   In step S1805, the infinite AF evaluation value level held in step S1802 is compared with the close AF evaluation value level held in step S1810 described later. If the former is large, the process proceeds to step S1806, and if the latter is large, the process proceeds to step S1807.

ステップS1806では、振動振幅と中心移動振幅を加算し、駆動振幅とする。一方、ステップS1807では、振動振幅を駆動振幅とする。つまり、無限側のAF評価値のほうが大きい場合に、振動の中心位置を無限側へ移動することになる。   In step S1806, the vibration amplitude and the center movement amplitude are added to obtain a drive amplitude. On the other hand, in step S1807, the vibration amplitude is set as the drive amplitude. That is, when the AF evaluation value on the infinite side is larger, the center position of the vibration is moved to the infinite side.

ステップS1808では、ステップS1806またはS1807で求めた駆動振幅に基づき、カメラ制御部207は、無限方向へフォーカスレンズを駆動するよう制御する。   In step S1808, based on the drive amplitude obtained in step S1806 or S1807, the camera control unit 207 controls to drive the focus lens in an infinite direction.

一方、ステップS1809では、現在のカウンタが2であるかを判別する。2である場合はステップS1810へ、2でない場合はステップS1811へ遷移する。   On the other hand, in step S1809, it is determined whether or not the current counter is 2. If it is 2, the process proceeds to step S1810. If it is not 2, the process proceeds to step S1811.

ステップS1810では、フォーカスレンズが無限側にある場合の処理として、現在のAF評価値レベルを保持する。ここでのAF評価値は、ステップS1802でフォーカスレンズが至近側にあるときに撮像素子に蓄積された電荷から生成された撮像信号によるものである。   In step S1810, the current AF evaluation value level is held as processing when the focus lens is on the infinity side. The AF evaluation value here is based on the imaging signal generated from the charge accumulated in the imaging device when the focus lens is on the close side in step S1802.

一方、ステップS1811では、後述のステップS1815でフォーカスレンズを駆動するための振動振幅と中心移動振幅を演算する。通常、これらの振幅は焦点深度内に設定されるのが一般的である。   On the other hand, in step S1811, the vibration amplitude and center movement amplitude for driving the focus lens in step S1815 described later are calculated. Usually, these amplitudes are generally set within the depth of focus.

ステップS1812では、ステップS1810で保持した至近側のAF評価値レベルとステップS1802で保持した無限側のAF評価値レベルを比較する。前者が大きい場合はステップS1813へ、後者が大きい場合はステップS1814へ遷移する。   In step S1812, the closest AF evaluation value level held in step S1810 is compared with the infinite AF evaluation value level held in step S1802. If the former is large, the process proceeds to step S1813. If the latter is large, the process proceeds to step S1814.

ステップS1813では、振動振幅と中心移動振幅を加算し、駆動振幅とする。一方、ステップS1814では、振動振幅を駆動振幅とする。つまり、至近側のAF評価値のほうが大きい場合に、振動の中心位置を至近側へ移動することになる。   In step S1813, the vibration amplitude and the center movement amplitude are added to obtain a drive amplitude. On the other hand, in step S1814, the vibration amplitude is set as the drive amplitude. That is, when the AF evaluation value on the near side is larger, the center position of the vibration is moved to the near side.

ステップS1815では、ステップS1813またはS1814で求めた駆動振幅に基づき、カメラ制御部207は、至近方向へフォーカスレンズを駆動する。   In step S1815, the camera control unit 207 drives the focus lens in the closest direction based on the drive amplitude obtained in step S1813 or S1814.

ステップS1816では、カメラ制御部207は、所定回数連続して同一方向に合焦点が存在しているかを判別する。存在している場合はステップS1817へ、存在していない場合はステップS1818へ遷移する。   In step S1816, the camera control unit 207 determines whether a focal point exists in the same direction continuously for a predetermined number of times. If it exists, the process proceeds to step S1817. If it does not exist, the process proceeds to step S1818.

ステップS1817では、方向判別ができたものと判断して、ステップS1818に遷移する。ステップS1818では、微小駆動の動作状態を示すカウンタが3であれば0に戻し、その他の値であればカウンタを加算する。   In step S1817, it is determined that the direction can be determined, and the process proceeds to step S1818. In step S1818, if the counter indicating the operation state of minute driving is 3, the counter is reset to 0, and if it is any other value, the counter is added.

この微小駆動におけるフォーカスレンズ動作の時間経過を図19に示す。同図上部は撮像信号の垂直同期信号であり、同図下部は、横軸が時間、縦軸がフォーカスレンズの位置を表している。ラベルAの時刻に撮像素子に蓄積された電荷に対するAF評価値EVAは、時刻TAでカメラ制御部に取り込まれる。また、ラベルBの時刻に撮像素子に蓄積された電荷に対するAF評価値EVBは、時刻TBでカメラ制御部に取り込まれる。時刻TCではAF評価値EVAとEVBを比較し、図中のEVBが大きい場合のみ振動中心を移動する。なお、ここでのフォーカスレンズの移動は焦点深度を基準とし、画面で認識できない移動量に設定する。   The time course of the focus lens operation in this minute driving is shown in FIG. The upper part of the figure shows the vertical synchronization signal of the imaging signal, and the lower part of the figure shows the time on the horizontal axis and the position of the focus lens on the vertical axis. The AF evaluation value EVA for the charge accumulated in the image sensor at the time of label A is taken into the camera control unit at time TA. Also, the AF evaluation value EVB for the charge accumulated in the image sensor at the time of label B is taken into the camera control unit at time TB. At time TC, the AF evaluation values EVA and EVB are compared, and the vibration center is moved only when EVB in the figure is large. Note that the movement of the focus lens here is set to a movement amount that cannot be recognized on the screen with reference to the depth of focus.

以上説明したように、本実施形態では、撮像面位相差AFとコントラストAFを備える撮像装置において、位相差AFの信頼性が低い(デフォーカス量が信頼できない)場合に、コントラスト情報を用いて、位相差AFを有効にするための閾値を変更する。特に、合焦位置から大きく離れた状態(大ボケ状態)で、位相差の結果を用いてAFを行うと、誤った方向にフォーカスレンズを駆動する可能性が高くなる。そこで、コントラスト情報に基づく合焦度を利用して、位相差の結果の使用頻度を変更することにより、撮影状況に応じて適切なAF方式を選択することが可能になる。   As described above, in the present embodiment, when the reliability of the phase difference AF is low (the defocus amount is unreliable) in the imaging apparatus including the imaging surface phase difference AF and the contrast AF, the contrast information is used. The threshold value for enabling the phase difference AF is changed. In particular, if AF is performed using the result of the phase difference in a state far away from the in-focus position (large blurring state), the possibility of driving the focus lens in the wrong direction increases. Thus, by using the degree of focus based on the contrast information and changing the use frequency of the result of the phase difference, it is possible to select an appropriate AF method according to the shooting situation.

(第二の実施形態)
続いて、第二の実施形態について説明する。第二の実施形態は、ズーム中か否かに応じて異なる処理を行う。なお、第二の実施形態については、第一の実施形態との差分のみを記述し、同一の内容である部分については省略することとする。
(Second embodiment)
Next, the second embodiment will be described. The second embodiment performs different processing depending on whether or not zooming is in progress. In addition, about 2nd embodiment, only the difference with 1st embodiment is described, and the part which is the same content shall be abbreviate | omitted.

本実施形態においても、図1で示されるレンズ交換式カメラの構成が適用される。なお、本実施形態では、ズームレンズ108およびズームレンズ駆動部109の構成を備える。   Also in this embodiment, the configuration of the interchangeable lens camera shown in FIG. 1 is applied. In the present embodiment, the zoom lens 108 and the zoom lens driving unit 109 are configured.

これ以降に説明する一連の処理が、本実施形態におけるズーム中の処理についての特徴的な部分であり、まず概略を説明する。ズーム中はF値や焦点距離が変化するため、位相差AFの信頼性が低くなり、位相差の結果に基づくデフォーカス量を用いてフォーカスレンズを駆動すると、ボケを発生させる可能性がある。そのため、ボケを発生させないためには、ズーム中は極力コントラストAFを用いてフォーカスレンズを駆動することが望ましい。   A series of processing described below is a characteristic part of processing during zooming in the present embodiment, and an outline will be described first. Since the F value and the focal length change during zooming, the reliability of the phase difference AF becomes low, and if the focus lens is driven using a defocus amount based on the result of the phase difference, blurring may occur. Therefore, in order to prevent blur, it is desirable to drive the focus lens using the contrast AF as much as possible during zooming.

本実施形態では、ズーム中にフォーカスレンズを至近側と無限側に駆動させる微小駆動を実行する。これにより、コントラスト情報に基づいて合焦方向の判定が可能になる。しかしながら、コントラスト情報に基づく合焦方向へのズーム駆動中に被写体状況が変わった場合などは、合焦位置を特定するのに非常に時間がかかることがある。そこで、本実施形態では、条件を満たせば位相差AFの結果を併用することとし、コントラスト情報に基づく合焦度を用いてその条件を変更する。具体的には、合焦度が比較的高い場合、つまり合焦位置にある程度近い場合は、位相差の信頼度(有効エリア数)が良ければ位相差AFの結果も併用する。一方、合焦度が低い(大ボケ)場合は、早く合焦位置付近まで駆動させることを優先し、コントラストAFと位相差AFの結果を併用することとする。これらの判定処理は図20を用いて後述する。その判定結果を基に位相差AFを併用するかを判定することで、ズーム中においてもよりスムーズなAFが可能になる。   In the present embodiment, minute driving is performed to drive the focus lens to the close side and the infinite side during zooming. This makes it possible to determine the in-focus direction based on the contrast information. However, it may take a very long time to specify the in-focus position when the subject situation changes during zoom driving in the in-focus direction based on contrast information. Therefore, in the present embodiment, if the condition is satisfied, the result of the phase difference AF is used together, and the condition is changed using the degree of focus based on the contrast information. Specifically, when the degree of focus is relatively high, that is, close to the in-focus position to some extent, the result of phase difference AF is also used together if the phase difference reliability (number of effective areas) is good. On the other hand, when the degree of focus is low (large blur), priority is given to driving to the vicinity of the in-focus position quickly, and the results of contrast AF and phase difference AF are used in combination. These determination processes will be described later with reference to FIG. By determining whether to use phase difference AF together based on the determination result, smoother AF is possible even during zooming.

本実施形態においても、第一の実施形態と同様に、前述した図4乃至図7の処理を行う。図7のステップS703における本実施形態のレンズ駆動設定について、図20を用いて説明を行う。   Also in the present embodiment, the processes of FIGS. 4 to 7 described above are performed as in the first embodiment. The lens drive setting of this embodiment in step S703 in FIG. 7 will be described with reference to FIG.

まず、ステップS2001において、カメラ制御部207は、ズームレンズが駆動しているか否かの判定を行う。ズームレンズが駆動している場合はステップS2002に遷移し、駆動していない場合はステップS2003に遷移する。ステップS2002では、ズーム駆動中でないので、第一の実施形態と同様のレンズ駆動設定(図8)を行う。   First, in step S2001, the camera control unit 207 determines whether the zoom lens is driven. If the zoom lens is driven, the process proceeds to step S2002. If the zoom lens is not driven, the process proceeds to step S2003. In step S2002, since the zoom drive is not being performed, the same lens drive setting (FIG. 8) as in the first embodiment is performed.

一方、ステップS2003では、カメラ制御部207は、ズーム中の第一の焦点情報(位相差)による方向判定処理を行う。この処理については図22を用いて後述する。第一の焦点情報により方向を判定すると、ステップS2004に遷移する。   On the other hand, in step S2003, the camera control unit 207 performs direction determination processing based on first focus information (phase difference) during zooming. This process will be described later with reference to FIG. When the direction is determined based on the first focus information, the process proceeds to step S2004.

ステップS2004では、カメラ制御部207は、第一と第二の焦点情報の有効度を判定する。この処理については図24を用いて後述する。有効度を判定すると、ステップS2005に遷移する。   In step S2004, the camera control unit 207 determines the effectiveness of the first and second focus information. This process will be described later with reference to FIG. When the effectiveness is determined, the process proceeds to step S2005.

ステップS2005では、カメラ制御部207は、後述する図24のステップS2402で算出される合焦度に応じた判定処理を行う。判定された合焦状態が大ボケである場合はステップS2006に遷移し、大ボケでない場合はステップS2007に遷移する。   In step S2005, the camera control unit 207 performs a determination process according to the degree of focus calculated in step S2402 of FIG. When the determined in-focus state is large blur, the process proceeds to step S2006, and when it is not large blur, the process proceeds to step S2007.

ステップS2006では、カメラ制御部207は、第一の焦点情報による方向判定フラグがONかを判定する。ONである場合はステップS2008に遷移し、第一の焦点情報による中心移動フラグをONにする。ONでない場合はステップS2009に遷移し、第一の焦点情報による中心移動フラグをOFFにする。   In step S2006, the camera control unit 207 determines whether the direction determination flag based on the first focus information is ON. If it is ON, the process proceeds to step S2008, and the center movement flag based on the first focus information is set to ON. If it is not ON, the process proceeds to step S2009, and the center movement flag based on the first focus information is turned OFF.

一方、ステップS2007に進んだ場合、カメラ制御部207は、ステップS2004で算出される有効度の判定を参照し、第一の焦点情報が有効かを判定する。第一の焦点情報が有効の場合はステップS2006に遷移し、有効でない場合はステップS2009に遷移する。   On the other hand, when the process proceeds to step S2007, the camera control unit 207 refers to the determination of the validity calculated in step S2004 and determines whether the first focus information is valid. If the first focus information is valid, the process proceeds to step S2006. If the first focus information is not valid, the process proceeds to step S2009.

次に、図7のステップS704における本実施形態のレンズ駆動処理について、図21を用いて説明を行う。まず、ステップS2101において、カメラ制御部207は、ズームレンズが駆動しているか否かの判定を行う。ズームレンズが駆動している場合はステップS2103に遷移し、ズームレンズが駆動していない場合はステップS2102に遷移する。ステップS2102では、ズームレンズが駆動中でないので、第一の実施形態と同様のレンズ駆動処理(図9)を行う。   Next, the lens driving process of the present embodiment in step S704 in FIG. 7 will be described with reference to FIG. First, in step S2101, the camera control unit 207 determines whether the zoom lens is driven. When the zoom lens is driven, the process proceeds to step S2103, and when the zoom lens is not driven, the process proceeds to step S2102. In step S2102, since the zoom lens is not being driven, a lens driving process (FIG. 9) similar to that of the first embodiment is performed.

ステップS2103では、カメラ制御部207は、第二の焦点情報による微小駆動を実行する。この処理については、図23を用いて後述する。   In step S2103, the camera control unit 207 performs minute driving based on the second focus information. This process will be described later with reference to FIG.

続いて、図20のステップS2003における、ズーム中の第一の焦点情報(位相差)による方向判定処理について、図22を用いて説明する。ステップS2201では、カメラ制御部207は、第一の焦点情報の信頼性が所定値δより良い値かを判定する。ここで、所定値δは位相差結果に基づくデフォーカス方向が信頼できるような閾値が設定される。信頼性が所定値δより良い場合はステップS2202に遷移する。   Next, the direction determination process based on the first focus information (phase difference) during zooming in step S2003 in FIG. 20 will be described with reference to FIG. In step S2201, the camera control unit 207 determines whether the reliability of the first focus information is better than the predetermined value δ. Here, a threshold value is set for the predetermined value δ so that the defocus direction based on the phase difference result is reliable. If the reliability is better than the predetermined value δ, the process proceeds to step S2202.

ステップS2202では、第一の焦点情報に基づいて合焦方向を特定し、ステップS2203に遷移する。なお、所定値δは、デフォーカス方向が信頼できるような閾値に設定される。ステップS2203では、カメラ制御部207は、第一の焦点情報の方向判定フラグをONにする処理を行い、その後、処理を終了する。   In step S2202, the in-focus direction is specified based on the first focus information, and the process proceeds to step S2203. The predetermined value δ is set to a threshold value with which the defocus direction is reliable. In step S2203, the camera control unit 207 performs a process of turning on the direction determination flag of the first focus information, and then ends the process.

一方、信頼性が所定値δよりも悪い場合は、ステップS2204に遷移する。ステップS2204では、カメラ制御部207は、第一の焦点情報の方向判定フラグをOFFにする処理を行い、その後、処理を終了する。   On the other hand, if the reliability is worse than the predetermined value δ, the process proceeds to step S2204. In step S2204, the camera control unit 207 performs processing for turning off the direction determination flag of the first focus information, and then ends the processing.

続いて、図21のステップS2103にて実行される第二の焦点情報の微小駆動処理について、図23を用いて説明する。なお、この処理は第一の実施形態で説明した図18のフローチャートと同様の流れであるため、差異がある部分のみを説明することとする。なお、本フローチャートに示してある番号の下位2桁の番号が図18と同じものは、対応する処理であることを意味している。   Next, the second focus information fine driving process executed in step S2103 of FIG. 21 will be described with reference to FIG. Since this process is the same flow as the flowchart of FIG. 18 described in the first embodiment, only the differences will be described. Note that the lower two digits of the numbers shown in this flowchart are the same as those in FIG.

ステップS2319では、カメラ制御部207は、前述した中心移動フラグを参照して、振動中心位置を移動するかを判断する。第一の実施形態のようにAF評価値に基づいて中心移動を判断した結果、中心移動が不要となった場合でも、ステップS2008で第一の焦点情報による中心移動フラグがONに設定された場合は中心移動を行う。よって、中心移動フラグがONである場合はステップS2306に遷移し、OFFの場合はステップS2307に遷移する。ステップS2306に進んだ場合は無限側へ振動中心位置を移動するようにフォーカスレンズの駆動振幅を設定し、ステップS2307に進んだ場合は振動中心位置を移動せずにフォーカスレンズの駆動振幅を設定する。   In step S2319, the camera control unit 207 refers to the above-described center movement flag to determine whether to move the vibration center position. Even when the center movement is unnecessary as a result of determining the center movement based on the AF evaluation value as in the first embodiment, the center movement flag based on the first focus information is set to ON in step S2008. Moves the center. Therefore, when the center movement flag is ON, the process proceeds to step S2306, and when it is OFF, the process proceeds to step S2307. When the process proceeds to step S2306, the drive amplitude of the focus lens is set so that the vibration center position is moved to the infinity side, and when the process proceeds to step S2307, the drive amplitude of the focus lens is set without moving the vibration center position. .

同様に、ステップS2320でも、カメラ制御部207は、中心移動フラグを参照して、振動中心位置を移動するかの判断を行う。中心移動フラグがONである場合はステップS2313に遷移し、OFFの場合はステップS2314に遷移する。ステップS2313に進んだ場合は至近側へ振動中心位置を移動するようにフォーカスレンズの駆動振幅を設定し、ステップS2314に進んだ場合は振動中心位置を移動せずにフォーカスレンズの駆動振幅を設定する。   Similarly, in step S2320, the camera control unit 207 determines whether to move the vibration center position with reference to the center movement flag. When the center movement flag is ON, the process proceeds to step S2313, and when it is OFF, the process proceeds to step S2314. If the process proceeds to step S2313, the focus lens drive amplitude is set so as to move the vibration center position to the closest side, and if the process proceeds to step S2314, the focus lens drive amplitude is set without moving the vibration center position. .

次に、図20のステップS2004におけるズーム中の有効度判定処理について、図24(A)を用いて説明する。まず、ステップS2401では、カメラ制御部207は、第一の焦点情報の有効エリア数算出処理を行う。この処理は、図15のステップS1501と同じ処理であるため、説明は省略する。   Next, the effectiveness determination process during zooming in step S2004 of FIG. 20 will be described with reference to FIG. First, in step S2401, the camera control unit 207 performs the effective area number calculation process of the first focus information. This process is the same as step S1501 in FIG.

次に、ステップS2402では、カメラ制御部207は、第二焦点情報による合焦度算出処理を行う。この処理は、図15のステップS1502と同じ処理であるため、説明は省略する。   Next, in step S2402, the camera control unit 207 performs a focus degree calculation process based on the second focus information. This process is the same as step S1502 in FIG.

次に、ステップS2403では、カメラ制御部207は、ステップS2402で算出された合焦度が大ボケか否かの判定をする。大ボケである場合はステップS2407に遷移し、そうでない場合はステップS2404に遷移する。   Next, in step S2403, the camera control unit 207 determines whether or not the degree of focus calculated in step S2402 is large blur. If so, the process proceeds to step S2407. If not, the process proceeds to step S2404.

ステップS2407では、大ボケ状態であるため、カメラ制御部207は、第一の焦点情報の有効フラグを設定する。さらに、ステップS2408では、第二の焦点情報の有効フラグを設定して、処理を終了する。   In step S2407, the camera control unit 207 sets a valid flag for the first focus information because it is in a large-blur state. In step S2408, the second focus information valid flag is set, and the process ends.

一方、ステップS2404では、カメラ制御部は、小ボケか否かの判定をする。小ボケの場合はステップS2405に遷移し、小ボケでない(合焦の)場合はステップS2406に遷移する。   On the other hand, in step S2404, the camera control unit determines whether the blur is small. If it is small blur, the process proceeds to step S2405. If it is not small blur (in-focus), the process proceeds to step S2406.

ステップS2405では、カメラ制御部207は、ステップS2401で算出された有効エリア数が閾値TH4以上かの判定を行う。TH4以上であればステップS2409に遷移し、TH4未満であればステップS2410に遷移する。   In step S2405, the camera control unit 207 determines whether the number of effective areas calculated in step S2401 is greater than or equal to the threshold value TH4. If it is greater than TH4, the process proceeds to step S2409, and if it is less than TH4, the process proceeds to step S2410.

一方、ステップS2406では、ステップS2401で算出された有効エリア数が閾値TH5以上かの判定を行う。TH5以上であればステップS2409に遷移し、TH5未満であればステップS2410に遷移する。ここで、TH5はTH4より大きい値である。なお、本実施形態における閾値TH4およびTH5は、第一の実施形態における閾値TH1乃至TH3より高い値に設定している。これは、ズーム中はF値や焦点距離が変化するため、第一の焦点情報を用いてフォーカスレンズを駆動すると、ズーム中でない場合と比較してボケが発生する可能性が高いためである。   On the other hand, in step S2406, it is determined whether the number of effective areas calculated in step S2401 is greater than or equal to the threshold value TH5. If it is greater than TH5, the process proceeds to step S2409, and if it is less than TH5, the process proceeds to step S2410. Here, TH5 is a value larger than TH4. Note that the thresholds TH4 and TH5 in this embodiment are set higher than the thresholds TH1 to TH3 in the first embodiment. This is because the F value and focal length change during zooming, and therefore, when the focus lens is driven using the first focus information, there is a higher possibility of blurring compared to when the zoom lens is not zooming.

ステップS2409は、第一の焦点情報が有効な条件であると判断された場合の処理であり、カメラ制御部207は、第一の焦点情報の有効フラグを設定して処理を終了する。   Step S2409 is processing when it is determined that the first focus information is a valid condition, and the camera control unit 207 sets the first focus information valid flag and ends the processing.

一方、ステップS2410は、第二の焦点情報が有効な条件であると判断された場合の処理であり、カメラ制御部207は、第二の焦点情報の有効フラグを設定して処理を終了する。   On the other hand, step S2410 is processing when it is determined that the second focus information is a valid condition, and the camera control unit 207 sets the second focus information valid flag and ends the processing.

この処理を図式化したものが、図24(B)である。表中のCは、第二の焦点情報(コントラストAF)が有効であることを示し、Pは、第一の焦点情報(位相差AF)が有効であることを示している。まず、本実施形態では、位相差AFにおいて、方向が検出されているエリア数(信頼度)による閾値を設定する。第二の焦点情報に基づいて合焦状態と判定された場合、位相差AF結果を有効にする閾値は、図24(B)の例では7エリアに設定している。また、小ボケの場合、位相差AF結果を有効にする閾値を6エリアに設定している。これは、ズーム中はF値や焦点距離の変化により位相差AFの信頼性が下がるので、第一の焦点情報の信頼度が十分高い場合のみ位相差AFを併用するためである。よって、第一の焦点情報の信頼度が低い場合には、第二の焦点情報のみを用いてAFを行う。   A schematic diagram of this process is shown in FIG. C in the table indicates that the second focus information (contrast AF) is effective, and P indicates that the first focus information (phase difference AF) is effective. First, in the present embodiment, a threshold value based on the number of areas (reliability) in which directions are detected is set in the phase difference AF. In the example of FIG. 24B, when the focus state is determined based on the second focus information, the threshold value for validating the phase difference AF result is set to 7 areas. In the case of small blur, the threshold value for validating the phase difference AF result is set to 6 areas. This is because, during zooming, the reliability of the phase difference AF decreases due to changes in the F value and the focal length, and therefore the phase difference AF is used together only when the reliability of the first focus information is sufficiently high. Therefore, when the reliability of the first focus information is low, AF is performed using only the second focus information.

一方、大ボケの場合、方向が検出されているエリア数(信頼度)に依らず、第一の焦点情報および第二の焦点情報を用いてAFを行う。これは、合焦度が低く大ボケの場合には、できるだけ早く合焦位置に駆動させるために、コントラストAFと位相差AF両方の結果を用いてAFするほうが効率的であるからである。なお、第一の焦点情報により判定された合焦方向と第二の焦点情報により判定された合焦方向が逆であった場合は、第二の焦点情報の結果を優先することとする。これは、撮像面位相差AFにおいて、大ボケの場合に像信号の対称性が崩れることにより、測距性能が低くなる可能性が高いからである。なお、図24(B)に示した値は任意の値に設定することができ、この値に限定されるものではない。   On the other hand, in the case of large blurring, AF is performed using the first focus information and the second focus information regardless of the number of areas in which the direction is detected (reliability). This is because in the case where the degree of focus is low and the blur is large, it is more efficient to perform AF using both the contrast AF and the phase difference AF in order to drive the focus position as soon as possible. Note that if the in-focus direction determined by the first focus information is opposite to the in-focus direction determined by the second focus information, the result of the second focus information is given priority. This is because in the imaging plane phase difference AF, there is a high possibility that the distance measurement performance is lowered due to the symmetry of the image signal being lost in the case of large blurring. Note that the value shown in FIG. 24B can be set to an arbitrary value, and is not limited to this value.

以上説明したように、本実施形態では、ズーム中において、基本的には第二の焦点情報(コントラストAF)による結果を積極的に使い、合焦度が低く合焦位置まで早く駆動したい場合は第一の焦点情報(位相差AF)の結果も併用する。このような制御とすることで、ズーム中においても、ボケの少ない品位の高いAF動作が可能になる。   As described above, in the present embodiment, during zooming, basically, the result of the second focus information (contrast AF) is used positively, and when the focus level is low and it is desired to drive quickly to the focus position. The result of the first focus information (phase difference AF) is also used. With such control, a high-quality AF operation with less blur can be performed even during zooming.

(他の実施形態)
本発明の目的は以下のようにしても達成できる。すなわち、前述した実施形態の機能を実現するための手順が記述されたソフトウェアのプログラムコードを記憶した記憶媒体を、システムまたは装置に供給する。そしてそのシステムまたは装置のコンピュータ(またはCPU、MPU等)が記憶媒体に格納されたプログラムコードを読み出して実行する。この場合、記憶媒体から読み出されたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記憶媒体および制御プログラムは本発明を構成することになる。
(Other embodiments)
The object of the present invention can also be achieved as follows. That is, a storage medium storing a program code of software in which a procedure for realizing the functions of the above-described embodiments is stored is supplied to the system or apparatus. A computer (or CPU, MPU, etc.) of the system or apparatus reads out and executes the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the novel function of the present invention, and the storage medium storing the program code and the control program constitute the present invention.

また、プログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスクなどが挙げられる。また、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−RAM、DVD−RW、DVD−R、磁気テープ、不揮発性のメモリカード、ROM等も用いることができる。   Examples of the storage medium for supplying the program code include a flexible disk, a hard disk, an optical disk, and a magneto-optical disk. Further, a CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-R, magnetic tape, nonvolatile memory card, ROM, or the like can also be used.

また、コンピュータが読み出したプログラムコードを実行可能とすることにより、前述した各実施形態の機能が実現される。さらに、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理によって前述した各実施形態の機能が実現される場合も含まれる。   Further, by making the program code read by the computer executable, the functions of the above-described embodiments are realized. Furthermore, when the OS (operating system) running on the computer performs part or all of the actual processing based on the instruction of the program code, the functions of the above-described embodiments are realized by the processing. Is also included.

更に、以下の場合も含まれる。まず記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれる。その後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行う。   Furthermore, the following cases are also included. First, the program code read from the storage medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. Thereafter, based on the instruction of the program code, the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing.

以上、本発明をその好適な実施形態に基づいて詳述したが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。   Although the present invention has been described in detail based on the 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. It is.

20 カメラ本体
103 フォーカスレンズ
105 フォーカスレンズ駆動部
106 レンズ制御部
201 撮像素子
204 AF信号処理部
207 カメラ制御部
210 AF評価値生成部
DESCRIPTION OF SYMBOLS 20 Camera main body 103 Focus lens 105 Focus lens drive part 106 Lens control part 201 Image pick-up element 204 AF signal processing part 207 Camera control part 210 AF evaluation value generation part

Claims (15)

フォーカスレンズを含む撮影光学系を介して入射される光束を受光して光電変換する撮像手段と、
前記撮像手段から出力される一対の像信号の位相差を検出する第1の検出手段と、
前記撮像手段から出力される信号からコントラスト情報を検出する第2の検出手段と、
前記第1の検出手段および前記第2の検出手段の少なくとも一方の検出結果に基づいて、前記フォーカスレンズの駆動を制御する制御手段とを有し、
前記制御手段は、前記第1の検出手段による検出結果が所定の条件を満たす場合、前記第1の検出手段による検出結果を用いて前記フォーカスレンズの駆動を制御し、前記コントラスト情報に応じて前記所定の条件を変更することを特徴とする自動焦点調節装置。
Imaging means for receiving and photoelectrically converting a light beam incident through a photographing optical system including a focus lens;
First detection means for detecting a phase difference between a pair of image signals output from the imaging means;
Second detection means for detecting contrast information from a signal output from the imaging means;
Control means for controlling the driving of the focus lens based on a detection result of at least one of the first detection means and the second detection means;
When the detection result by the first detection unit satisfies a predetermined condition, the control unit controls the driving of the focus lens using the detection result by the first detection unit, and the control unit controls the driving of the focus lens according to the contrast information. An automatic focusing apparatus characterized by changing a predetermined condition.
前記コントラスト情報に基づいて判定される合焦度合いが高いほど、前記制御手段は、前記第1の検出手段による検出結果を前記フォーカスレンズの駆動に用いやすくするように前記所定の条件を変更することを特徴とする請求項1に記載の自動焦点調節装置。   As the degree of focus determined based on the contrast information is higher, the control unit changes the predetermined condition so that the detection result by the first detection unit can be easily used for driving the focus lens. The automatic focusing apparatus according to claim 1. 前記制御手段は、前記第1の検出手段による検出結果が所定の条件を満たさない場合、前記第1の検出手段による検出結果を用いずに、前記第2の検出手段による検出結果を用いて前記フォーカスレンズの駆動を制御することを特徴とする請求項1又は2に記載の自動焦点調節装置。   When the detection result by the first detection means does not satisfy a predetermined condition, the control means does not use the detection result by the first detection means but uses the detection result by the second detection means. 3. The automatic focus adjusting apparatus according to claim 1, wherein the driving of the focus lens is controlled. 前記撮像手段において複数の検出領域を備え、
前記第1の検出手段は、各検出領域から出力される前記像信号の位相差をそれぞれ検出し、
検出結果の信頼性が第1のレベルより高い検出領域の数が閾値以上である場合、前記所定の条件を満たすことを特徴とする請求項1乃至3のいずれか1項に記載の自動焦点調節装置。
The imaging means comprises a plurality of detection areas,
The first detection means detects a phase difference of the image signal output from each detection region,
The automatic focus adjustment according to any one of claims 1 to 3, wherein the predetermined condition is satisfied when the number of detection regions whose detection result reliability is higher than the first level is equal to or greater than a threshold value. apparatus.
前記コントラスト情報に基づいて判定される合焦度合いが高いほど、前記制御手段は、前記閾値を小さく設定することを特徴とする請求項4に記載の自動焦点調節装置。   The automatic focus adjustment apparatus according to claim 4, wherein the control unit sets the threshold smaller as the degree of focus determined based on the contrast information is higher. 前記フォーカスレンズの駆動に用いる前記検出領域において、前記第1の検出手段による検出結果の信頼性が第2のレベルより低い場合、前記制御手段は、当該検出結果が前記所定の条件を満たすか否かを判定し、
前記第2のレベルは、前記第1のレベルより高い信頼性を示すことを特徴とする請求項4又は5に記載の自動焦点調節装置。
In the detection region used for driving the focus lens, when the reliability of the detection result by the first detection unit is lower than the second level, the control unit determines whether the detection result satisfies the predetermined condition. Determine whether
6. The automatic focusing apparatus according to claim 4, wherein the second level shows higher reliability than the first level.
前記制御手段は、前記第1の検出手段による前記複数の検出領域からの検出結果に基づいて、デフォーカス量および合焦方向を検出し、
前記第2のレベルは、前記デフォーカス量が信頼できる値に設定され、前記第1のレベルは、少なくとも前記合焦方向が信頼できる値に設定されることを特徴とする請求項6に記載の自動焦点調節装置。
The control means detects a defocus amount and a focus direction based on detection results from the plurality of detection areas by the first detection means,
7. The second level according to claim 6, wherein the defocus amount is set to a reliable value, and the first level is set to a value at which the in-focus direction is reliable. Automatic focusing device.
前記撮影光学系は、さらにズームレンズを備え、
前記ズームレンズが駆動している場合、前記制御手段は、前記ズームレンズが停止している場合と比較して、前記閾値を大きく設定することを特徴とする請求項4乃至7のいずれか1項に記載の自動焦点調節装置。
The photographing optical system further includes a zoom lens,
8. The control unit according to claim 4, wherein when the zoom lens is driven, the control unit sets the threshold value to be larger than that when the zoom lens is stopped. The automatic focusing device described in 1.
前記ズームレンズが駆動している場合、前記制御手段は、前記コントラスト情報に基づいて判定される合焦度合いが高いほど、前記制御手段は、前記閾値を大きく設定することを特徴とする請求項8に記載の自動焦点調節装置。   9. The control means, when the zoom lens is driven, the control means sets the threshold value larger as the degree of focus determined based on the contrast information is higher. The automatic focusing device described in 1. 前記ズームレンズが駆動している場合において、前記第1の検出手段による検出結果が前記所定の条件を満たす場合、前記制御手段は、前記第1の検出手段および前記第2の検出手段の検出結果に基づいて、前記フォーカスレンズの駆動を制御することを特徴とする請求項8又は9に記載の自動焦点調節装置。   When the zoom lens is driven and the detection result by the first detection means satisfies the predetermined condition, the control means detects the detection results of the first detection means and the second detection means. 10. The automatic focus adjustment apparatus according to claim 8, wherein the driving of the focus lens is controlled based on the above. 前記ズームレンズが駆動している場合において、前記コントラスト情報に基づいて判定される合焦度合いが所定の度合いより低い場合、前記制御手段は、前記第1の検出手段および前記第2の検出手段の検出結果に基づいて、前記フォーカスレンズの駆動を制御することを特徴とする請求項8乃至10のいずれか1項に記載の自動焦点調節装置。   In the case where the zoom lens is driven, when the degree of focus determined based on the contrast information is lower than a predetermined degree, the control unit is configured to control the first detection unit and the second detection unit. The automatic focus adjustment apparatus according to claim 8, wherein the driving of the focus lens is controlled based on a detection result. 前記撮像手段において第2の検出手段により前記コントラスト情報を検出する領域は、前記検出領域と対応する領域を含むことを特徴とする請求項1乃至11のいずれか1項に記載の自動焦点調節装置。   The automatic focus adjustment apparatus according to any one of claims 1 to 11, wherein a region in which the contrast information is detected by the second detection unit in the imaging unit includes a region corresponding to the detection region. . フォーカスレンズを含む撮影光学系を介して入射される光束を受光して光電変換する撮像手段を有する自動焦点調節装置の制御方法であって、
前記撮像手段から出力される一対の像信号の位相差を検出する第1の検出ステップと、
前記撮像手段から出力される信号からコントラスト情報を検出する第2の検出ステップと、
前記第1の検出ステップおよび前記第2の検出ステップの少なくとも一方の検出結果に基づいて、前記フォーカスレンズの駆動を制御する制御ステップとを有し、
前記制御ステップにおいて、前記第1の検出ステップによる検出結果が所定の条件を満たす場合、前記第1の検出ステップによる検出結果を用いて前記フォーカスレンズの駆動を制御し、前記コントラスト情報に応じて前記所定の条件を変更することを特徴とする自動焦点調節装置の制御方法。
A method for controlling an automatic focus adjustment apparatus having an imaging means for receiving and photoelectrically converting a light beam incident through a photographing optical system including a focus lens,
A first detection step of detecting a phase difference between a pair of image signals output from the imaging means;
A second detection step of detecting contrast information from a signal output from the imaging means;
A control step for controlling the driving of the focus lens based on a detection result of at least one of the first detection step and the second detection step;
In the control step, when the detection result of the first detection step satisfies a predetermined condition, the driving of the focus lens is controlled using the detection result of the first detection step, and the detection is performed according to the contrast information. A control method for an automatic focusing apparatus, wherein a predetermined condition is changed.
請求項13に記載の自動焦点調節装置の制御方法をコンピュータに実行させるように構成されていることを特徴とする自動焦点調節装置の制御プログラム。   A control program for an automatic focus adjustment device, characterized in that the computer is configured to cause a computer to execute the control method for an automatic focus adjustment device according to claim 13. 請求項14に記載の自動焦点調節装置の制御プログラムを記憶していることを特徴とする記憶媒体。   15. A storage medium storing a control program for the automatic focusing apparatus according to claim 14.
JP2013228317A 2013-11-01 2013-11-01 Automatic focusing device, control method for automatic focusing device, control program for automatic focusing device, and storage medium Active JP6338353B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2013228317A JP6338353B2 (en) 2013-11-01 2013-11-01 Automatic focusing device, control method for automatic focusing device, control program for automatic focusing device, and storage medium
US14/527,635 US9794467B2 (en) 2013-11-01 2014-10-29 Focus adjustment apparatus, method for controlling focus adjustment apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013228317A JP6338353B2 (en) 2013-11-01 2013-11-01 Automatic focusing device, control method for automatic focusing device, control program for automatic focusing device, and storage medium

Publications (2)

Publication Number Publication Date
JP2015087703A true JP2015087703A (en) 2015-05-07
JP6338353B2 JP6338353B2 (en) 2018-06-06

Family

ID=53050519

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013228317A Active JP6338353B2 (en) 2013-11-01 2013-11-01 Automatic focusing device, control method for automatic focusing device, control program for automatic focusing device, and storage medium

Country Status (1)

Country Link
JP (1) JP6338353B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017223741A (en) * 2016-06-13 2017-12-21 キヤノン株式会社 Imaging device and control method thereof

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11893668B2 (en) 2021-03-31 2024-02-06 Leica Camera Ag Imaging system and method for generating a final digital image via applying a profile to image information

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001083407A (en) * 1999-09-13 2001-03-30 Canon Inc Image pickup device
JP2009109838A (en) * 2007-10-31 2009-05-21 Nikon Corp Focus detecting device and camera
JP2010015023A (en) * 2008-07-04 2010-01-21 Canon Inc Image pickup apparatus, automatic focusing detection method and program
JP2010139942A (en) * 2008-12-15 2010-06-24 Sony Corp Image pickup apparatus and focus control method
WO2012133413A1 (en) * 2011-03-31 2012-10-04 富士フイルム株式会社 Imaging device, method for controlling imaging device, and program
JP2013003486A (en) * 2011-06-21 2013-01-07 Nikon Corp Focus detector and imaging apparatus
JP2013008018A (en) * 2011-05-25 2013-01-10 Canon Inc Imaging device and control method thereof
US20130021519A1 (en) * 2011-07-21 2013-01-24 Samsung Electronics Co., Ltd. Apparatus and method for adjusting focal point by using imaging device for outputting phase difference signal
JP2013025129A (en) * 2011-07-22 2013-02-04 Nikon Corp Focus detection device and imaging apparatus
JP2013029803A (en) * 2011-06-22 2013-02-07 Canon Inc Focus detection device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001083407A (en) * 1999-09-13 2001-03-30 Canon Inc Image pickup device
JP2009109838A (en) * 2007-10-31 2009-05-21 Nikon Corp Focus detecting device and camera
JP2010015023A (en) * 2008-07-04 2010-01-21 Canon Inc Image pickup apparatus, automatic focusing detection method and program
JP2010139942A (en) * 2008-12-15 2010-06-24 Sony Corp Image pickup apparatus and focus control method
WO2012133413A1 (en) * 2011-03-31 2012-10-04 富士フイルム株式会社 Imaging device, method for controlling imaging device, and program
JP2013008018A (en) * 2011-05-25 2013-01-10 Canon Inc Imaging device and control method thereof
JP2013003486A (en) * 2011-06-21 2013-01-07 Nikon Corp Focus detector and imaging apparatus
JP2013029803A (en) * 2011-06-22 2013-02-07 Canon Inc Focus detection device
US20130021519A1 (en) * 2011-07-21 2013-01-24 Samsung Electronics Co., Ltd. Apparatus and method for adjusting focal point by using imaging device for outputting phase difference signal
JP2013025129A (en) * 2011-07-22 2013-02-04 Nikon Corp Focus detection device and imaging apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017223741A (en) * 2016-06-13 2017-12-21 キヤノン株式会社 Imaging device and control method thereof

Also Published As

Publication number Publication date
JP6338353B2 (en) 2018-06-06

Similar Documents

Publication Publication Date Title
JP6351234B2 (en) Automatic focusing device, control method for automatic focusing device, control program for automatic focusing device, and storage medium
US9742980B2 (en) Focus control apparatus and control method therefor
JP5322995B2 (en) Imaging apparatus and control method thereof
JP5213813B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
US9794467B2 (en) Focus adjustment apparatus, method for controlling focus adjustment apparatus, and storage medium
JP6614783B2 (en) Automatic focusing apparatus and control method thereof
US9843728B2 (en) Focus control apparatus, control method therefor, storage medium therefor, and image capturing apparatus
US10542202B2 (en) Control apparatus that performs focusing by imaging-plane phase difference AF, image capturing apparatus, control method, and non-transitory computer-readable storage medium
JP6139960B2 (en) Imaging apparatus and control method thereof
JP6087714B2 (en) Imaging apparatus and control method thereof
JP6338353B2 (en) Automatic focusing device, control method for automatic focusing device, control program for automatic focusing device, and storage medium
JP6220144B2 (en) Focus adjustment apparatus and control method thereof
JP6833405B2 (en) Focus detection device, focus adjustment device, imaging device and focus detection method
JP6238547B2 (en) Focus adjustment apparatus and control method thereof
JP2015232604A (en) Focus adjustment device, focus adjustment method and program, and imaging device
JP6305017B2 (en) Focus control device and control method thereof
JP2016156950A (en) Automatic focus adjustment device and control method of the same
JP2020181147A (en) Focusing apparatus, image pickup apparatus, focusing method, and program
JP2012133112A (en) Imaging apparatus and imaging method
JP6305016B2 (en) FOCUS CONTROL DEVICE, FOCUS CONTROL DEVICE CONTROL METHOD, AND IMAGING DEVICE
JP7179509B2 (en) Imaging device and imaging device control method
JP2012141436A (en) Focus detector and control method therefor
JP6366374B2 (en) Focus detection apparatus and control method thereof
JP2018004916A (en) Focus detecting device
JP6581362B2 (en) AUTOFOCUS DEVICE, ITS CONTROL METHOD, PROGRAM, AND RECORDING MEDIUM

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161028

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170614

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170808

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171006

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180410

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180508

R151 Written notification of patent or utility model registration

Ref document number: 6338353

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151