JP2015075648A - Focus detection device, control method therefor, control program and imaging device - Google Patents

Focus detection device, control method therefor, control program and imaging device Download PDF

Info

Publication number
JP2015075648A
JP2015075648A JP2013212079A JP2013212079A JP2015075648A JP 2015075648 A JP2015075648 A JP 2015075648A JP 2013212079 A JP2013212079 A JP 2013212079A JP 2013212079 A JP2013212079 A JP 2013212079A JP 2015075648 A JP2015075648 A JP 2015075648A
Authority
JP
Japan
Prior art keywords
focus
evaluation value
area range
focus evaluation
difference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2013212079A
Other languages
Japanese (ja)
Inventor
西尾 彰宏
Teruhiro Nishio
彰宏 西尾
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 JP2013212079A priority Critical patent/JP2015075648A/en
Publication of JP2015075648A publication Critical patent/JP2015075648A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To detect an accurate focusing position by improving focus detection accuracy with respect to each of objects in a perspective conflict.SOLUTION: A range-finding area determination part 110 sets a first range-finding area range for performing focus detection with respect to an image, and a range-finding area division part 113 sets another second range-finding area range in the first range-finding area range. A focus detection evaluation part 114 allows a focus lens 103 to move along the optical axis of an imaging optical system, and calculates contrast components in images in the first and second range-finding area ranges as first and second focus evaluation values. A focus determination part 115 calculates a difference between the first and second focus evaluation values as a first difference focus evaluation value, and calculates the focusing position of the focus lens about each object in accordance with the second focus evaluation value and the first difference focus evaluation value.

Description

本発明は、焦点検出装置、その制御方法、および制御プログラム、並びに撮像装置に関し、特に、フォーカスレンズの移動に応じた被写体のコントラスト変化に基づいて焦点検出を行う焦点検出装置に関する。   The present invention relates to a focus detection device, a control method thereof, a control program, and an imaging device, and more particularly, to a focus detection device that performs focus detection based on a change in contrast of a subject according to movement of a focus lens.

一般に、デジタルカメラなどの撮影装置において焦点状態(ピント状態)を検出して自動的に焦点調整を行うオートフォーカス(AF)が知られている。AFの手法の一つとして、例えば、撮像素子に結像された被写体像(光学像)に応じて得られた画像信号において、予め指定された測距領域範囲における高周波成分の抽出を行う手法がある。この手法では、抽出した高周波成分に応じて得られたコントラスト値を焦点評価値として求め、焦点評価値に基づいて合焦位置を検出する(この焦点検出手法はコントラスト検知手法と呼ばれる)。   In general, autofocus (AF) is known, in which a focus state (focus state) is detected and a focus is automatically adjusted in a photographing apparatus such as a digital camera. As one of the AF methods, for example, there is a method of extracting a high-frequency component in a predetermined range-finding area range from an image signal obtained according to a subject image (optical image) formed on an image sensor. is there. In this method, a contrast value obtained according to the extracted high-frequency component is obtained as a focus evaluation value, and a focus position is detected based on the focus evaluation value (this focus detection method is called a contrast detection method).

ところが、上記のコントラスト検知手法では、同一の測距評価範囲に存在する遠距離および近距離の複数の被写体については、個々の被写体おけるコントラスト値が混在してしまう。このてめ、個々の被写体についてその合焦位置が不明瞭になる所謂遠近競合問題がある。   However, in the contrast detection method described above, the contrast values of individual subjects are mixed for a plurality of long-distance and short-distance subjects existing in the same distance measurement evaluation range. In addition, there is a so-called perspective conflict problem in which the in-focus position of each subject is unclear.

上記の遠近競合問題に対処するため、例えば、画像における第1領域の画像信号に基づいて第1の評価値を算出するとともに、第1領域に含まれて第1領域よりも小さい第2領域の画像信号に基づいて第2の評価値を算出するようにしたものがある。ここでは、第1の評価値に基づいて第1の合焦位置を算出するとともに、第2の評価値に基づいて第2の合焦位置を算出する。そして、第1領域の遠近競合の発生の有無を判定し、さらに、第2の合焦位置の信頼性の有無を判定して、第1の合焦位置と第2の合焦位置とのうちいずれか一方の合焦位置を選択する(特許文献1参照)。   In order to deal with the above-described perspective conflict problem, for example, the first evaluation value is calculated based on the image signal of the first area in the image, and the second area included in the first area and smaller than the first area is calculated. There is one in which the second evaluation value is calculated based on the image signal. Here, the first in-focus position is calculated based on the first evaluation value, and the second in-focus position is calculated based on the second evaluation value. Then, it is determined whether or not there is a perspective conflict in the first region, and further whether or not the second focus position is reliable is determined, and the first focus position and the second focus position are determined. Either one of the in-focus positions is selected (see Patent Document 1).

さらに、撮影画面において複数の測距領域をグループ化して設定して、主被写体と背景とに遠近競合が生じる場合には、各測距領域の焦点評価値を同一測距領域グループ内で選択的に加算して測距領域グループ全体の焦点評価値を求めるようにしたものがある(特許文献2参照)。   In addition, when multiple distance measurement areas are grouped and set on the shooting screen and there is a perspective conflict between the main subject and the background, the focus evaluation value of each distance measurement area can be selected selectively within the same distance measurement area group. In other words, the focus evaluation value of the entire distance measurement area group is obtained (see Patent Document 2).

特開2007−178480号公報JP 2007-178480 A 特開2005−141068号公報Japanese Patent Laid-Open No. 2005-141068

ところで、遠近競合にある複数の被写体に関して、例えば、第1の被写体が柵又は金網のようにエッジ成分を有し、しかも背景像を透過する物体であり、第2の被写体が単色の花弁のようにその表面はコントラストの差が少ない状態であることがある。この際、第2の被写体については、花弁の輪郭によって生成されるエッジ像をコントラストの差が大きな箇所として評価する必要がある。   By the way, for a plurality of subjects in perspective conflict, for example, the first subject has an edge component such as a fence or a wire net and is an object that transmits a background image, and the second subject is like a monochromatic petal. In addition, the surface may be in a state where there is little difference in contrast. At this time, for the second subject, it is necessary to evaluate the edge image generated by the outline of the petal as a portion having a large contrast difference.

後述するように、上述の被写体においては、特許文献1および2のように測距領域範囲をたとえ細分化したとしても、複数の被写体のエッジ像成分が混在してしまうことになる。この結果、個々の被写体に対する焦点検出評価を精度よく行うことが困難となって個々の被写体について正確に焦点位置検出を行うことができなくなってしまう。   As will be described later, in the above-described subject, even if the range of the distance measurement area is subdivided as in Patent Documents 1 and 2, the edge image components of a plurality of subjects are mixed. As a result, it is difficult to accurately perform focus detection evaluation for each subject, and it is impossible to accurately detect the focus position for each subject.

そこで、本発明の目的は複数の被写体の状態に拘わらず、遠近競合にある被写体において個々の被写体に対する焦点検出精度を向上させて正確な合焦位置を検出することができる焦点検出装置、その制御方法、および制御プログラム、並びに撮像装置を提供することにある。   Accordingly, an object of the present invention is to provide a focus detection apparatus capable of detecting an accurate in-focus position by improving the focus detection accuracy for each subject in a subject in perspective conflict regardless of the state of a plurality of subjects, and its control To provide a method, a control program, and an imaging apparatus.

上記の目的を達成するため、本発明による焦点検出装置は、フォーカスレンズを備える撮像光学系を介して少なくとも2つの被写体を撮像して得られた画像において前記被写体の各々に対する焦点検出を行って前記被写体に合焦させる焦点検出装置であって、前記画像に対して焦点検出を行うための第1の測距領域範囲を設定する第1の設定手段と、前記第1の測距領域範囲において別の第2の測距領域範囲を設定する第2の設定手段と、前記フォーカスレンズを前記撮像光学系の光軸に沿って移動させつつ前記第1の測距領域範囲および前記第2の測距領域範囲においてそれぞれ前記画像におけるコントラスト成分を第1の合焦評価値および第2の合焦評価値として求める評価値算出手段と、前記第1の合焦評価値と前記第2の合焦評価値との差分を第1の差分合焦評価値として、前記第1の合焦評価値、前記第2の合焦評価値、および前記第1の差分合焦評価値を選択的に用いて前記被写体の各々について前記フォーカスレンズの合焦位置を求める合焦位置算出手段と、を有することを特徴とする。   In order to achieve the above object, a focus detection apparatus according to the present invention performs focus detection on each of the subjects in an image obtained by imaging at least two subjects via an imaging optical system including a focus lens. A focus detection apparatus for focusing on a subject, wherein a first setting unit for setting a first distance measurement area range for performing focus detection on the image is different from the first distance measurement area range. Second setting means for setting the second distance measurement area range, and the first distance measurement area range and the second distance measurement while moving the focus lens along the optical axis of the imaging optical system. Evaluation value calculating means for obtaining a contrast component in the image as a first focus evaluation value and a second focus evaluation value in each of the region ranges; the first focus evaluation value and the second focus evaluation value; Is used as the first difference focus evaluation value, and the first focus evaluation value, the second focus evaluation value, and the first difference focus evaluation value are selectively used. Focusing position calculation means for determining the focusing position of the focus lens for each.

本発明による撮像装置は、フォーカスレンズを備える撮像光学系を介して少なくとも2つの被写体を撮像して画像を得る撮像手段と、上記の焦点検出装置と、前記合焦位置に応じて前記フォーカスレンズを前記撮像光学系の光軸に沿って駆動制御する駆動制御手段と、を有することを特徴とする。   An image pickup apparatus according to the present invention includes an image pickup unit that picks up an image by picking up at least two subjects via an image pickup optical system including a focus lens, the focus detection device, and the focus lens according to the focus position. Drive control means for controlling driving along the optical axis of the imaging optical system.

本発明による制御方法は、フォーカスレンズを備える撮像光学系を介して少なくとも2つの被写体を撮像して得られた画像において前記被写体の各々に対する焦点検出を行って前記被写体に合焦させる焦点検出装置の制御方法であって、前記画像に対して焦点検出を行うための第1の測距領域範囲を設定する第1の設定ステップと、前記第1の測距領域範囲において別の第2の測距領域範囲を設定する第2の設定ステップと、前記フォーカスレンズを前記撮像光学系の光軸に沿って移動させつつ前記第1の測距領域範囲および前記第2の測距領域範囲においてそれぞれ前記画像におけるコントラスト成分を第1の合焦評価値および第2の合焦評価値として求める評価値算出ステップと、前記第1の合焦評価値と前記第2の合焦評価値との差分を第1の差分合焦評価値として、前記第1の合焦評価値、前記第2の合焦評価値、および前記第1の差分合焦評価値を選択的に用いて前記被写体の各々について前記フォーカスレンズの合焦位置を求める合焦位置算出ステップと、を有することを特徴とする。   The control method according to the present invention includes a focus detection device that performs focus detection on each of the subjects in an image obtained by imaging at least two subjects via an imaging optical system including a focus lens and focuses the subject. In the control method, a first setting step of setting a first distance measurement area range for performing focus detection on the image, and another second distance measurement in the first distance measurement area range A second setting step for setting an area range; and the image in each of the first distance measurement area range and the second distance measurement area range while moving the focus lens along the optical axis of the imaging optical system. An evaluation value calculating step for obtaining the contrast component in the first focus evaluation value and the second focus evaluation value, and a difference between the first focus evaluation value and the second focus evaluation value As the first differential focus evaluation value, the first focus evaluation value, the second focus evaluation value, and the first differential focus evaluation value are selectively used for each of the subjects. And a focus position calculating step for obtaining a focus position of the focus lens.

本発明による制御プログラムは、フォーカスレンズを備える撮像光学系を介して少なくとも2つの被写体を撮像して得られた画像において前記被写体の各々に対する焦点検出を行って前記被写体に合焦させる焦点検出装置で用いられる制御プログラムであって、
前記焦点検出装置が備えるコンピュータに、前記画像に対して焦点検出を行うための第1の測距領域範囲を設定する第1の設定ステップと、前記第1の測距領域範囲において別の第2の測距領域範囲を設定する第2の設定ステップと、前記フォーカスレンズを前記撮像光学系の光軸に沿って移動させつつ前記第1の測距領域範囲および前記第2の測距領域範囲においてそれぞれ前記画像におけるコントラスト成分を第1の合焦評価値および第2の合焦評価値として求める評価値算出ステップと、前記第1の合焦評価値と前記第2の合焦評価値との差分を第1の差分合焦評価値として、前記第1の合焦評価値、前記第2の合焦評価値、および前記第1の差分合焦評価値を選択的に用いて前記被写体の各々について前記フォーカスレンズの合焦位置を求める合焦位置算出ステップと、を実行させることを特徴とする。
The control program according to the present invention is a focus detection device that performs focus detection on each of the subjects in an image obtained by imaging at least two subjects via an imaging optical system including a focus lens and focuses the subject. A control program used,
A first setting step of setting a first distance measurement area range for performing focus detection on the image in a computer included in the focus detection device; and another second in the first distance measurement area range A second setting step for setting the distance measuring area range, and the focus lens in the first distance measuring area range and the second distance measuring area range while moving the focus lens along the optical axis of the imaging optical system. An evaluation value calculating step for obtaining a contrast component in the image as a first focus evaluation value and a second focus evaluation value, and a difference between the first focus evaluation value and the second focus evaluation value Is used as the first difference focus evaluation value, and the first focus evaluation value, the second focus evaluation value, and the first difference focus evaluation value are selectively used for each of the subjects. Focus position of the focus lens A position calculation step focusing seeking, characterized in that for the execution.

本発明によれば、第1の合焦評価値と第2の合焦評価値との差分である第1の差分合焦評価値を求めて、第1の合焦評価値、第2の合焦評価値、および第1の差分合焦評価値に応じて被写体の各々について合焦位置を求める。これによって、遠近競合状態にある被写体においても正確な合焦を行うことができる。   According to the present invention, a first differential focus evaluation value, which is a difference between the first focus evaluation value and the second focus evaluation value, is obtained, and the first focus evaluation value and the second focus evaluation value are obtained. A focus position is obtained for each of the subjects according to the focus evaluation value and the first differential focus evaluation value. Thus, accurate focusing can be performed even on a subject that is in a perspective conflict state.

本発明の実施の形態による焦点検出装置を備える撮像装置の一例を示すブロック図である。It is a block diagram which shows an example of an imaging device provided with the focus detection apparatus by embodiment of this invention. 図1に示すカメラで撮影される被写体の配置と測距領域範囲との関係を示す図である。It is a figure which shows the relationship between the arrangement | positioning of the to-be-photographed object image | photographed with the camera shown in FIG. 1, and a ranging area range. 図1に示すカメラで撮影を行う際の撮影方向における被写体の位置関係を説明するための図である。FIG. 2 is a diagram for explaining a positional relationship of a subject in a shooting direction when shooting with the camera shown in FIG. 1. 図2に示す第1の測距領域範囲202における焦点検出の変化を説明するための図である。FIG. 3 is a diagram for explaining a change in focus detection in a first distance measurement area range 202 shown in FIG. 2. 図1に示すカメラで行われる合焦位置の決定の一例を説明するための図である。It is a figure for demonstrating an example of the determination of the focus position performed with the camera shown in FIG. 図1に示すカメラで行われる合焦位置の決定の他の例を説明するための図である。It is a figure for demonstrating the other example of the determination of the focusing position performed with the camera shown in FIG. 図1に示すカメラで行われる焦点検出処理を説明するためのフローチャートである(その1)。FIG. 3 is a flowchart for explaining a focus detection process performed by the camera shown in FIG. 1 (No. 1). 図1に示すカメラで行われる焦点検出処理を説明するためのフローチャートである(その2)。FIG. 6 is a flowchart for explaining a focus detection process performed by the camera shown in FIG. 1 (No. 2).

以下、本発明の実施の形態による焦点検出装置の一例について図面を参照して説明する。   Hereinafter, an example of a focus detection apparatus according to an embodiment of the present invention will be described with reference to the drawings.

図1は、本発明の実施の形態による焦点検出装置を備える撮像装置の一例を示すブロック図である。   FIG. 1 is a block diagram illustrating an example of an imaging apparatus including a focus detection apparatus according to an embodiment of the present invention.

図示の撮像装置100は、例えば、デジタルカメラ(以下単にカメラと呼ぶ)であり、カメラ本体と撮影光学系101とが一体となっている。そして、当該カメラ100は静止画および動画を撮影して記録することができる。   The illustrated imaging apparatus 100 is, for example, a digital camera (hereinafter simply referred to as a camera), and a camera body and a photographing optical system 101 are integrated. The camera 100 can shoot and record still images and moving images.

なお、図示のカメラ100は、所謂コントラスト検知方式によって焦点検出を行うものであり、焦点検出の際には、所謂山登り方式が用いられる。そして、ここでは、予め設定されたフォーカスレンズの位置において得られた画像信号における被写体のエッジ成分から生成される高周波成分のコントラスト値を焦点検出の際の合焦評価値とする。   The illustrated camera 100 performs focus detection by a so-called contrast detection method, and a so-called hill-climbing method is used for focus detection. Here, the contrast value of the high-frequency component generated from the edge component of the subject in the image signal obtained at the preset focus lens position is used as the focus evaluation value at the time of focus detection.

撮像光学系101は、複数の撮影レンズを備えるとともに、光彩絞り機構102およびフォーカスレンズ群103を有している。光彩絞り機構102は、その開口径を調節することによって撮影の際の光量調節を行うとともに、静止画撮影の際には露光秒時調節用シャッターとして用いられる。フォーカスレンズ群103は、光軸に沿って移動可能であり、後述するように、フォーカスレンズ群103を光軸に沿って移動させて焦点調節が行われる。   The imaging optical system 101 includes a plurality of photographing lenses, and includes a iris diaphragm mechanism 102 and a focus lens group 103. The iris diaphragm mechanism 102 adjusts the amount of light at the time of shooting by adjusting the aperture diameter, and is used as an exposure time adjustment shutter at the time of still image shooting. The focus lens group 103 is movable along the optical axis, and focus adjustment is performed by moving the focus lens group 103 along the optical axis, as will be described later.

フォーカスレンズ群103の後段には撮像素子104が配置され、この撮像素子104は、例えば、C−MOSセンサ又はCCDで構成される。撮像素子104に結像した光学像(被写体像)を光電変換して、光学像に応じたアナログ信号を出力する。撮像素子104の出力であるアナログ信号(光電変換信号)は画像信号抽出部105に与えられ、画像信号抽出部105は光電変換信号から画像信号を抽出する。つまり、画像信号抽出部105は光電変換信号に応じた画像信号(デジタル画像信号)を出力する。   An imaging element 104 is arranged at the subsequent stage of the focus lens group 103, and the imaging element 104 is constituted by, for example, a C-MOS sensor or a CCD. The optical image (subject image) formed on the image sensor 104 is photoelectrically converted, and an analog signal corresponding to the optical image is output. An analog signal (photoelectric conversion signal) that is an output of the image sensor 104 is supplied to the image signal extraction unit 105, and the image signal extraction unit 105 extracts an image signal from the photoelectric conversion signal. That is, the image signal extraction unit 105 outputs an image signal (digital image signal) corresponding to the photoelectric conversion signal.

画像信号抽出部105の出力である画像信号は、測光部106、測距領域決定部110、および記録用画像生成部111に与えられる。測光部106は画像信号において予め指定された画像領域における測光を行って測光評価値(測光結果)を得る。そして、露光量決定部107は測光評価値に基づいて撮影の際の露光量を求めて、算出した当該露光量に応じてゲイン調整部108を制御して撮像素子104における出力強度(ゲイン)を制御する。   The image signal that is the output of the image signal extraction unit 105 is given to the photometry unit 106, the distance measurement region determination unit 110, and the recording image generation unit 111. The photometric unit 106 performs photometry in an image area designated in advance in the image signal to obtain a photometric evaluation value (photometric result). Then, the exposure amount determination unit 107 obtains an exposure amount at the time of shooting based on the photometric evaluation value, and controls the gain adjustment unit 108 according to the calculated exposure amount to thereby output the output intensity (gain) in the image sensor 104. Control.

さらに、露光量決定部107は露光量に応じて絞り制御部109を制御して、絞り制御部109によって光彩絞り機構102の絞り開口径を調整する。このようにして、露光量決定部106は画像信号から得られた測光評価値に応じてゲインおよび絞り開口を調整して最適な露光量状態になるようにフィードバック制御を行って、最適な露光量(以下最適露光量と呼ぶ)を決定する。   Further, the exposure amount determining unit 107 controls the aperture control unit 109 according to the exposure amount, and the aperture control unit 109 adjusts the aperture opening diameter of the iris diaphragm mechanism 102. In this way, the exposure amount determination unit 106 adjusts the gain and aperture according to the photometric evaluation value obtained from the image signal to perform feedback control so that the optimum exposure amount state is obtained, so that the optimum exposure amount is obtained. (Hereinafter referred to as the optimum exposure amount) is determined.

制御信号線は示されていないが、最適露光量が決定されると、記録用画像生成部111は画像信号に応じて記録画像を生成する。そして、当該記録画像は画像記録部112によってフラッシュメモリー又はハードディスクなどの記録媒体に記録される。   Although the control signal line is not shown, when the optimum exposure amount is determined, the recording image generation unit 111 generates a recording image according to the image signal. The recorded image is recorded on a recording medium such as a flash memory or a hard disk by the image recording unit 112.

測距領域範囲決定部110は画像信号が示す画像において測距を行う第1の測距領域範囲を決定する。この第1の測距領域範囲は、例えば、所定のアルゴリズムに応じて決定される。なお、ユーザである撮影者が第1の測距領域範囲を操作部(図示せず)から指定するようにしてもよい。この際には、ユーザは表示部(図示せず)に表示された画像において第1の測距領域範囲を指定することになる。   The ranging area range determination unit 110 determines a first ranging area range for performing ranging in the image indicated by the image signal. The first ranging area range is determined according to a predetermined algorithm, for example. The photographer who is the user may specify the first distance measurement area range from the operation unit (not shown). At this time, the user designates the first distance measurement area range in the image displayed on the display unit (not shown).

第1の測距領域範囲を決定した後、測距領域範囲決定部110は第1の測距領域範囲における被写体の特徴に応じて第1の測距領域範囲を分割する必要があるか否かを判定する。第1の測距領域範囲を分割する必要があると判定されると、後述するようにして、測距領域分割部113は、画像において、同一又は類似する輝度値を有する背景に対する個別の被写体の輪郭成分がそれぞれ第1の測距領域範囲に存在するかを検索する。   After determining the first ranging area range, the ranging area range determination unit 110 determines whether or not the first ranging area range needs to be divided according to the characteristics of the subject in the first ranging area range. Determine. When it is determined that it is necessary to divide the first ranging area range, the ranging area dividing unit 113 determines the individual subject with respect to the background having the same or similar luminance value in the image as described later. It is searched whether the contour components exist in the first ranging area range.

個々の被写体の輪郭成分が第1の測距領域範囲に存在すると、測距領域分割部113は当該輪郭成分を分離する境界を設定して、第1の測距領域範囲において当該境界で分割される第2の測距領域範囲を設定する。このようにして、第1の測距領域範囲又は第2の測距領域範囲が合焦評価を行うための測距領域範囲(以下合焦評価値測距領域範囲と呼ぶ)として決定される。   When the contour component of each subject exists in the first ranging area range, the ranging area dividing unit 113 sets a boundary for separating the contour component, and is divided at the boundary in the first ranging area range. A second distance measurement area range is set. In this way, the first distance measurement area range or the second distance measurement area range is determined as a distance measurement area range for performing focus evaluation (hereinafter referred to as a focus evaluation value distance measurement area range).

続いて、焦点検出評価部114は合焦評価値測距領域範囲において、後述するようにして、合焦評価値を求める。なお、必要に応じて、合焦評価測距領域範囲の各々における合焦評価値に基づいて差分演算が行われて新たな合焦評価値が生成される。そして、焦点検出評価部114は得られた合焦評価値を一時メモリ(図示せず)に記憶する。   Subsequently, the focus detection evaluation unit 114 obtains a focus evaluation value in the focus evaluation value distance measurement area range as described later. If necessary, a difference calculation is performed based on the focus evaluation value in each of the focus evaluation distance measurement area ranges, and a new focus evaluation value is generated. Then, the focus detection evaluation unit 114 stores the obtained focus evaluation value in a temporary memory (not shown).

合焦判断手段115は、ピントを変化させた際(つまり、フォーカスレンズ群103を移動させた際)の一時メモリに記憶された合焦評価値の時系列的な変化を観察して、合焦評価値(つまり、コントラスト値)のピークにおけるフォーカスレンズ群103の位置を合焦位置と判定する。   The focus determination unit 115 observes the time-series change of the focus evaluation value stored in the temporary memory when the focus is changed (that is, when the focus lens group 103 is moved), and focuses. The position of the focus lens group 103 at the peak of the evaluation value (that is, the contrast value) is determined as the focus position.

なお、焦点検出評価部114では画像信号におけるノイズ成分を低減するためローパスフィルタ処理およびエッジ成分を強調するためのバンドパスフィルタ処理を行うようにしてもよい。   Note that the focus detection evaluation unit 114 may perform low-pass filter processing for reducing noise components in the image signal and band-pass filter processing for enhancing edge components.

合焦判断部115は合焦位置を判定すると、当該合焦位置に基づいてフォーカスレンズ群103の移動量および移動方向を求める。そして、フォーカス駆動部116は合焦判断部115で求められたフォーカス移動量および移動方向に応じて合焦位置レンズ群103を光軸に沿って駆動して、フォーカスレンズ群103を合焦位置に位置づける。   When the focus determination unit 115 determines the focus position, the focus determination unit 115 obtains the movement amount and the movement direction of the focus lens group 103 based on the focus position. Then, the focus drive unit 116 drives the focus position lens group 103 along the optical axis according to the focus movement amount and the movement direction obtained by the focus determination unit 115 to bring the focus lens group 103 into the focus position. Position it.

ここで、設定された撮影モードが静止画撮影モードであると、合焦判断部115において合焦位置の判定が行われると、撮影動作に移行する。そして、レリーズ操作などによって次の撮影指示が行われるまで待機状態となる。一方、動画撮影モード又はコンティニュアスな焦点検出モードが設定されている場合には、カメラ100では画像信号の取り込みを継続して上記の焦点検出から合焦までの処理を繰り返す。   Here, if the set shooting mode is the still image shooting mode, when the in-focus position is determined by the in-focus determination unit 115, the operation proceeds to the imaging operation. And it will be in a standby state until the next imaging | photography instruction | indication is performed by release operation etc. On the other hand, when the moving image shooting mode or the continuous focus detection mode is set, the camera 100 continuously captures the image signal and repeats the above-described processing from focus detection to focusing.

図2は、図1に示すカメラ100で撮影される被写体の配置と測距領域範囲との関係を示す図である。   FIG. 2 is a diagram showing the relationship between the arrangement of the subject imaged by the camera 100 shown in FIG. 1 and the distance measurement area range.

ここでは、コントラスト検出の際に行われる画像走査方向は水平方向であるものとする。そして、主に被写体の縦方向のエッジ成分を検出して、前述したようにして、コントラスト値(つまり、合焦評価値)の変化に応じて合焦判断を行うものとする。   Here, it is assumed that the image scanning direction performed in contrast detection is the horizontal direction. Then, it is assumed that the vertical edge component of the subject is mainly detected, and the focus determination is performed according to the change in the contrast value (that is, the focus evaluation value) as described above.

図2に示す被写体のフレーム像201においては、第1の測距領域範囲202および第1の測距領域範囲に位置する第2の測距領域範囲203が示されている。そして、ここでは、金網、檻、又は柵形状の背景の一部のみを部分的に隠す輪郭成分が多い第1の被写体204が表示されるとともに、単色の花弁のように表面上が平滑な状態でかつエッジ成分が乏しい第2の被写体205の輪郭部が表示されている。なお、以下の説明では、説明の便宜上、第1の被写体204は金網とし、第2の被写体205を花弁であるとする。   In the frame image 201 of the subject shown in FIG. 2, a first distance measurement area range 202 and a second distance measurement area range 203 located in the first distance measurement area range are shown. And here, the first subject 204 with many contour components that partially hide only part of the background of the wire mesh, fence, or fence shape is displayed, and the surface is smooth like a monochromatic petal In addition, the contour portion of the second subject 205 having a poor edge component is displayed. In the following description, for convenience of explanation, it is assumed that the first subject 204 is a wire mesh and the second subject 205 is a petal.

また、第3の被写体206は、第1の被写体204および第2の被写体205の輪郭部の後側に位置する背景物となる物を示しており、例えば、第1の測距領域範囲202において平滑で略均一な輝度となる空、水、又は壁などを示す。   The third subject 206 indicates a background object located behind the contours of the first subject 204 and the second subject 205. For example, in the first distance measurement area range 202, Shows sky, water, walls, etc. with smooth and substantially uniform brightness.

水平範囲A0は第1の測距領域範囲の水平範囲を示し、当該水平範囲A0について水平方向走査によってエッジ成分のコントラスト値を得る。また、水平範囲A1は第2の測距領域範囲203の水平範囲を示し、水平範囲A2は水平A0から水平範囲A1を差し引いた残りである水平範囲である。そして、水平範囲A2は第3の測距領域範囲の水平範囲を示す。   The horizontal range A0 indicates the horizontal range of the first ranging area range, and the contrast value of the edge component is obtained by scanning the horizontal range A0 in the horizontal direction. The horizontal range A1 indicates the horizontal range of the second ranging area range 203, and the horizontal range A2 is a horizontal range that is the remainder obtained by subtracting the horizontal range A1 from the horizontal A0. The horizontal range A2 indicates the horizontal range of the third ranging area range.

図3は、図1に示すカメラ100で撮影を行う際の撮影方向における被写体の位置関係を説明するための図である。   FIG. 3 is a diagram for explaining the positional relationship of the subject in the shooting direction when shooting with the camera 100 shown in FIG.

図3において、いま、撮影角度302および303で規定される撮影画角内において測距範囲角度304および305が設定されているものとする。また、第1の測距領域範囲202において第2の測距領域範囲203は境界306で規定されている。   In FIG. 3, it is assumed that distance measurement range angles 304 and 305 are set within a shooting angle of view defined by shooting angles 302 and 303. Further, in the first distance measurement area range 202, the second distance measurement area range 203 is defined by a boundary 306.

ここでは、花弁である第2の被写体205がカメラ100にもっとも近く、その背後に金網である第1の被写体204が第2の被写体205に重なるように存在している。そして、第1の被写体204と第2の被写体205とは互いに被写界深度外になるように相対的な物体距離および絞り値で撮影されるものとする。   Here, the second subject 205, which is a petal, is closest to the camera 100, and the first subject 204, which is a wire mesh, exists behind the second subject 205 so as to overlap the second subject 205. It is assumed that the first subject 204 and the second subject 205 are photographed at a relative object distance and aperture value so that they are outside the depth of field.

遠方に位置する第3の被写体206は、第1の被写体204および第2の被写体205の背景として存在するものであって、水平範囲A0においては平滑で略均一な輝度を有しているものとする。   The third subject 206 located far away exists as the background of the first subject 204 and the second subject 205, and has a smooth and substantially uniform luminance in the horizontal range A0. To do.

図4は、図2に示す第1の測距領域範囲における焦点検出の変化を説明するための図である。   FIG. 4 is a diagram for explaining a change in focus detection in the first ranging area range shown in FIG.

まず、第2の測距領域範囲を得るための第1の測距領域範囲202における境界の決定について説明する。   First, determination of the boundary in the first ranging area range 202 for obtaining the second ranging area range will be described.

図4において、水平方向の画像信号走査範囲401は任意の垂直位置における水平方向の走査範囲であり、当該水平走査によって信号強度(つまり、輝度信号)402が得られるとする。図示の例では、画像に、前述の第3の被写体206、第1の被写体204、および第2の被写体205が存在する。そして、第3の被写体206は比較的高輝度で平滑な輝度変化を有する空又は壁などの背景であり、第1の被写体204は比較的低輝度である金網である。また、第2の被写体205は第3の被写体206よりも輝度が低くて表面輝度が平滑な花弁である。   In FIG. 4, a horizontal image signal scanning range 401 is a horizontal scanning range at an arbitrary vertical position, and a signal intensity (that is, a luminance signal) 402 is obtained by the horizontal scanning. In the illustrated example, the above-described third subject 206, first subject 204, and second subject 205 exist in the image. The third subject 206 is a background such as a sky or a wall having a relatively high luminance and a smooth luminance change, and the first subject 204 is a wire net having a relatively low luminance. In addition, the second subject 205 is a petal having a lower brightness than the third subject 206 and a smooth surface brightness.

輝度信号402において、輝度信号範囲403は第1の被写体204を走査した際の輝度信号の変化であり、当該輝度信号の変化パターンでは金網の特徴である幅の狭い急勾配の谷形状が複数存在する。一方、輝度信号範囲404は花弁である第2の被写体205の輝度信号の変化を示している。前述のように、花弁の表面で得られる輝度信号は平滑であるので、輝度信号範囲404においては輝度信号の変化が少ない。   In the luminance signal 402, the luminance signal range 403 is a change in the luminance signal when the first subject 204 is scanned, and the change pattern of the luminance signal includes a plurality of narrow and steep valley shapes that are characteristic of the wire mesh. To do. On the other hand, a luminance signal range 404 indicates a change in the luminance signal of the second subject 205 that is a petal. As described above, since the luminance signal obtained on the surface of the petal is smooth, there is little change in the luminance signal in the luminance signal range 404.

図4において、第1の被写体204および第2の被写体205の合焦状態を検出するためのエッジ成分における輝度信号の変化幅はコントラスト値405および406で示されている。なお、ここでは、第1の被写体204に対して合焦された状態であって、第2の被写体205が合焦外れ状態であるとする。   In FIG. 4, the change width of the luminance signal in the edge component for detecting the in-focus state of the first subject 204 and the second subject 205 is indicated by contrast values 405 and 406. Here, it is assumed that the first subject 204 is in focus and the second subject 205 is out of focus.

このため、水平走査範囲404における輝度信号の強度は合焦状態時よりも低下した状態となる。そして、輝度信号の変化幅406が合焦状態よりも狭くなるばかりでなく、ボケに起因して信号強度の変化がほとんどなくなる。   For this reason, the intensity of the luminance signal in the horizontal scanning range 404 is lower than that in the focused state. In addition, the change width 406 of the luminance signal is narrower than that in the focused state, and the change in the signal intensity is almost eliminated due to the blur.

このように、画像信号走査範囲401において、輝度信号範囲403および輝度信号範囲404では互いにその輝度信号の変化パターンがことなるので、画像信号における特徴が変化する位置(つまり、第2の測距領域範囲203を規定する境界306)は輝度信号範囲403および404との間に設定されることになる。つまり、画像信号走査範囲401において、第1の合焦評価値が予め設定された閾値を超えて変化したことを示す判定結果に応じて第1の測距領域範囲に第2の測距領域範囲が設定されることになる。   In this manner, in the image signal scanning range 401, the luminance signal range 403 and the luminance signal range 404 have different luminance signal change patterns, and therefore the position where the feature in the image signal changes (that is, the second distance measurement area). The boundary 306) defining the range 203 is set between the luminance signal ranges 403 and 404. That is, in the image signal scanning range 401, the second ranging area range is changed to the first ranging area range according to the determination result indicating that the first focus evaluation value has changed beyond a preset threshold value. Will be set.

上述の例では、図4に示すように、第1の測距領域範囲202において第2の被写体205である花弁の輪郭が図中最も左側に位置する箇所と第1の被写体204である金網と位置との中間が境界306とされる。一方、第1の測距領域範囲202で行われる水平走査を、垂直位置を変化させて、第2の測距領域範囲203を規定する境界を探索することが望ましい。   In the above-described example, as shown in FIG. 4, in the first distance measurement area range 202, the petal outline that is the second subject 205 is located on the leftmost side in the drawing and the wire mesh that is the first subject 204. The middle of the position is a boundary 306. On the other hand, it is desirable to search the boundary that defines the second distance measurement area range 203 by changing the vertical position in the horizontal scanning performed in the first distance measurement area range 202.

さらに、精度よく境界を探索して、第2の被写体205である花弁の輪郭に沿って曲線状又は斜め方向に境界を設定するようにしてもよい。また、第2の測距領域範囲203を簡単に求める際には、予め登録されている輝度信号(つまり、コントラスト情報)と取得した輝度信号とに基づいて第2の測距領域範囲203を決定するようにしてもよい。   Furthermore, the boundary may be searched with high accuracy, and the boundary may be set in a curved or oblique direction along the outline of the petal that is the second subject 205. Further, when the second distance measurement area range 203 is easily obtained, the second distance measurement area range 203 is determined based on a previously registered luminance signal (that is, contrast information) and the acquired luminance signal. You may make it do.

この際には、例えば、輝度信号範囲403および404における輝度信号と予め登録された輝度信号および当該登録された輝度信号に応じた領域分割位置を示す情報に応じて、輝度信号範囲403および404における輝度信号と予め登録された輝度信号とが類似すれば、当該類似する登録輝度信号に係る領域分割位置情報に応じて境界を設定する。   In this case, for example, in the luminance signal ranges 403 and 404, the luminance signal in the luminance signal ranges 403 and 404 is determined according to the luminance signal registered in advance, the luminance signal registered in advance, and the information indicating the region division position corresponding to the registered luminance signal. If the luminance signal and the previously registered luminance signal are similar, a boundary is set according to the area division position information related to the similar registered luminance signal.

図5は、図1に示すカメラ100で行われる合焦位置の決定の一例を説明するための図である。   FIG. 5 is a diagram for explaining an example of determination of the in-focus position performed by the camera 100 shown in FIG.

図5では、前述の第1および第2の測距領域範囲におけるフォーカスレンズ群の位置変化(つまり、撮影光学系のピント変化)に対する合焦評価値の変化が示されており、図中縦軸は合焦評価を示し、横軸はフォーカスレンズ群103の位置を示す。そして、横軸において左側は遠距離を示し、右側は近距離を示す。   FIG. 5 shows a change in the focus evaluation value with respect to a change in the position of the focus lens group (that is, a change in the focus of the photographing optical system) in the first and second distance measurement area ranges. Indicates focus evaluation, and the horizontal axis indicates the position of the focus lens group 103. In the horizontal axis, the left side indicates a long distance, and the right side indicates a short distance.

また、合焦評価値が極大となるピーク位置P1〜P3は合焦状態を示し、ピーク位置P1〜P3に対応するフォーカスレンズ群位置が合焦位置F1およびF2で示されている。なお、合焦位置F1は図2および図3に示す金網である第1の被写体204に対する合焦位置であり、合焦位置F2は第2の被写体205である花弁に対する合焦位置であるものとする。   The peak positions P1 to P3 at which the focus evaluation value is maximized indicate the in-focus state, and the focus lens group positions corresponding to the peak positions P1 to P3 are indicated by the focus positions F1 and F2. The focus position F1 is a focus position with respect to the first subject 204, which is the wire mesh shown in FIGS. 2 and 3, and the focus position F2 is a focus position with respect to the petals that are the second subject 205. To do.

曲線501は水平範囲A0(つまり、第1の測距領域範囲202)におけるフォーカスレンズ群103の移動に応じた合焦評価値の変化を示す。以下、合焦評価値の変化を示す曲線を合焦評価値曲線と呼ぶ。また、第1の測距領域範囲202における合焦評価値を第1の合焦評価値と呼び、その変化を示す曲線を第1の合焦評価値曲線と呼ぶ。   A curve 501 indicates a change in the focus evaluation value according to the movement of the focus lens group 103 in the horizontal range A0 (that is, the first distance measurement area range 202). Hereinafter, a curve indicating a change in focus evaluation value is referred to as a focus evaluation value curve. The focus evaluation value in the first ranging area range 202 is referred to as a first focus evaluation value, and a curve indicating the change is referred to as a first focus evaluation value curve.

第1の合焦評価値曲線501は、前述のように、第1の被写体204である金網と第2の被写体205である花弁の輪郭成分とが混在する第1の測距領域範囲202で得られた合焦評価値の変化を示しており、第1の合焦評価値曲線501上に位置するピーク位置P1(第1のピーク位置)においては、第1の被写体204の輪郭成分が多いのでピークが急峻となる。そして、合焦判断部115はピーク位置P1に対応するフォーカスレンズ群103の位置を第1の被写体204に対する合焦位置F1として決定する。   As described above, the first focus evaluation value curve 501 is obtained in the first ranging area range 202 in which the wire mesh that is the first subject 204 and the contour component of the petal that is the second subject 205 are mixed. The change of the obtained focus evaluation value is shown, and at the peak position P1 (first peak position) located on the first focus evaluation value curve 501, there are many contour components of the first subject 204. The peak is steep. Then, the focus determination unit 115 determines the position of the focus lens group 103 corresponding to the peak position P1 as the focus position F1 with respect to the first subject 204.

一方、第1の合焦評価値曲線501上に位置するピーク位置P2(第2のピーク位置)においては、第2の被写体205の輪郭成分が第1の被写体204に対して相対的に弱いので、明確なピークとはならない(つまり、ピークが緩やかとなる)。このため、第1の合焦評価値曲線501を用いて所謂山登り方式による焦点位置検出を行うと、ピーク位置P1は良好に検出できるものの、ピーク位置P2の検出が困難となることがある。この結果、第2の被写体205である花弁に対して合焦が困難となってしまう。   On the other hand, at the peak position P2 (second peak position) located on the first focus evaluation value curve 501, the contour component of the second subject 205 is relatively weak with respect to the first subject 204. , It does not become a clear peak (that is, the peak becomes gentle). For this reason, when focus position detection by the so-called hill-climbing method is performed using the first focus evaluation value curve 501, the peak position P2 may be detected well, but it may be difficult to detect the peak position P2. As a result, it becomes difficult to focus on the petals that are the second subject 205.

上述したように、第2の測距領域範囲203を設定して、水平範囲A0(つまり、第1の測距領域範囲202)において境界306を決定する。そして、水平距離A1で示す第2の測距領域範囲203を設定する。   As described above, the second ranging area range 203 is set, and the boundary 306 is determined in the horizontal range A0 (that is, the first ranging area range 202). Then, a second ranging area range 203 indicated by the horizontal distance A1 is set.

曲線502は、第2の測距領域範囲203におけるフォーカスレンズ群103の移動に応じた合焦評価値の変化を示す。以下、第2の測距領域範囲203における合焦評価値を第2の合焦評価値と呼び、その変化を示す曲線を第2の合焦評価値曲線と呼ぶ。図示のように、第2の合焦評価値曲線502は第1の被写体204である金網204の輪郭成分によるコントラスト成分が多く含むことになる。   A curve 502 indicates a change in the focus evaluation value according to the movement of the focus lens group 103 in the second distance measurement area range 203. Hereinafter, the focus evaluation value in the second distance measurement area range 203 is referred to as a second focus evaluation value, and a curve indicating the change is referred to as a second focus evaluation value curve. As shown in the figure, the second focus evaluation value curve 502 includes a lot of contrast components due to the contour component of the wire mesh 204 that is the first subject 204.

合焦判断部115は、フォーカスレンズ群103の位置毎に第1の合焦評価値曲線501から第2の合焦評価値曲線502を減算して仮想的合焦評価値曲線503を求める。つまり、合焦判断部115は第1の合焦評価値と第2の合焦評価値の差分である第1の差分合焦評価値を求めることになる。   The focus determination unit 115 subtracts the second focus evaluation value curve 502 from the first focus evaluation value curve 501 for each position of the focus lens group 103 to obtain a virtual focus evaluation value curve 503. That is, the focus determination unit 115 obtains a first difference focus evaluation value that is a difference between the first focus evaluation value and the second focus evaluation value.

この仮想的合焦評価値曲線503は、第1の被写体204である金網204および第2の被写体205である花弁の輪郭成分が混在したコントラスト成分から第1の被写体204の輪郭成分のみによるコントラスト成分が除去された合焦評価値曲線となる。   This virtual focus evaluation value curve 503 is a contrast component based only on the contour component of the first subject 204 from the contrast component in which the contour components of the wire mesh 204 that is the first subject 204 and the petals that are the second subject 205 are mixed. A focus evaluation value curve from which is removed.

図示のように、仮想的合焦評価値曲線503はフォーカスレンズ群103の移動に応じた第2の被写体205の輪郭成分によるコントラスト成分の変化(合焦評価値の変化)を示しているので、合焦判断部115は図示のピーク位置P3に対応するフォーカスレンズ群103の位置を第2の被写体205に対する最良の合焦位置とする。つまり、ピーク位置P3に対応するフォーカスレンズ群103の位置が第2の被写体205に対する合焦位置F2として決定されることになる。   As shown in the figure, the virtual focus evaluation value curve 503 indicates the change in contrast component (change in focus evaluation value) due to the contour component of the second subject 205 in accordance with the movement of the focus lens group 103. The focus determination unit 115 sets the position of the focus lens group 103 corresponding to the illustrated peak position P3 as the best focus position for the second subject 205. That is, the position of the focus lens group 103 corresponding to the peak position P3 is determined as the focus position F2 with respect to the second subject 205.

このようにして、遠近競合状態にある第1の被写体204および第2の被写体205の各々の合焦位置を検出することが困難な状況であっても、上述のようにして、第1の被写体204および第2の被写体205の各々について合焦位置を決定することができる。   Thus, even in a situation where it is difficult to detect the in-focus positions of the first subject 204 and the second subject 205 that are in a perspective conflict state, the first subject is processed as described above. An in-focus position can be determined for each of 204 and the second subject 205.

図6は、図1に示すカメラ100で行われる合焦位置の決定の他の例を説明するための図である。   FIG. 6 is a diagram for explaining another example of determination of the in-focus position performed by the camera 100 shown in FIG.

図5に示す例では、第1の測距領域範囲202および第2の測距領域範囲203を用いて第1の被写体204および第2の被写体205に対する合焦位置を決定する例について説明したが、続いて、図6を参照して、水平範囲A2(つまり、第1の測距領域範囲202から第2の測距領域範囲203を除外した第3の測距領域範囲)を選択した際の合焦位置の決定について説明する。   In the example illustrated in FIG. 5, the example in which the in-focus position with respect to the first subject 204 and the second subject 205 is determined using the first distance measurement area range 202 and the second distance measurement area range 203 has been described. Subsequently, referring to FIG. 6, when the horizontal range A2 (that is, the third ranging area range excluding the second ranging area range 203 from the first ranging area range 202) is selected. The determination of the in-focus position will be described.

図6では、前述の第1および第3の測距領域範囲におけるフォーカスレンズ群の位置変化に対する合焦評価値の変化が示されている。合焦評価値が極大となるピーク位置P1、P2、およびP4は合焦状態を示し、ピーク位置P1、P2、およびP4に対応するフォーカスレンズ群位置が合焦位置F1およびF2で示されている。   FIG. 6 shows a change in the focus evaluation value with respect to a change in the position of the focus lens group in the first and third distance measurement area ranges described above. Peak positions P1, P2, and P4 at which the in-focus evaluation value is maximized indicate in-focus states, and focus lens group positions corresponding to the peak positions P1, P2, and P4 are indicated by in-focus positions F1 and F2. .

曲線601は、水平範囲A2(つまり、第3の測距領域範囲)におけるフォーカスレンズ群103の移動に応じた合焦評価値の変化を示す。以下、第3の測距領域範囲における合焦評価値を第3の合焦評価値と呼び、その変化を示す曲線を第3の合焦評価値曲線と呼ぶ。図示のように、第3の合焦評価値曲線601において、略均一輝度の背景206に対して、第1の被写体204である金網および第2の被写体205である花弁の輪郭成分がコントラスト成分の主たる要因となっている。   A curve 601 shows a change in the focus evaluation value according to the movement of the focus lens group 103 in the horizontal range A2 (that is, the third distance measurement area range). Hereinafter, the focus evaluation value in the third distance measurement area range is referred to as a third focus evaluation value, and a curve indicating the change is referred to as a third focus evaluation value curve. As shown in the figure, in the third focus evaluation value curve 601, the contour components of the wire mesh as the first subject 204 and the petals as the second subject 205 are contrast components with respect to the background 206 having a substantially uniform luminance. It is the main factor.

さらに、第1の被写体204および第2の被写体205は撮影光学系に関してその距離が異なっているので、第3の合焦評価値曲線601においては、ピーク位置P2およびP4における合焦位置F1およびF2が接近している。このため、第3の合焦評価値曲線601を用いて所謂山登り方式による焦点位置検出を行うと、合焦位置F1およびF2を精度よく切り分けて検出することが困難となることがある。   Further, since the first subject 204 and the second subject 205 have different distances with respect to the photographing optical system, in the third focus evaluation value curve 601, the focus positions F1 and F2 at the peak positions P2 and P4. Is approaching. For this reason, when focus position detection by the so-called hill-climbing method is performed using the third focus evaluation value curve 601, it may be difficult to accurately detect and detect the focus positions F1 and F2.

なお、ピーク値P2となるコントラスト成分(合焦評価値)は第2の被写体205である花弁の輪郭成分によって生じる。一方、ピーク位置P3となる合焦評価値は第1の被写体204である金網204の輪郭成分によって生じる。   Note that the contrast component (focus evaluation value) having the peak value P2 is generated by the contour component of the petal that is the second subject 205. On the other hand, the focus evaluation value at the peak position P <b> 3 is generated by the contour component of the wire mesh 204 that is the first subject 204.

合焦判断部115は、フォーカスレンズ群103の位置毎に第1の合焦評価値曲線501から第3の合焦評価値曲線601を減算して新たな合焦評価値曲線602を求める。つまり、合焦判断部115は、第1の合焦評価値と第3の合焦評価値との差分を第2の差分合焦評価値とする。   The focus determination unit 115 subtracts the third focus evaluation value curve 601 from the first focus evaluation value curve 501 for each position of the focus lens group 103 to obtain a new focus evaluation value curve 602. That is, the focus determination unit 115 sets the difference between the first focus evaluation value and the third focus evaluation value as the second difference focus evaluation value.

この新たな合焦評価値曲線602に関しては、第1の測距領域範囲202および第3の測距領域範囲においては第2の被写体205である花弁の輪郭成分が等しく含まれることになる。このため、新たな合焦評価値曲線602は、花弁の輪郭成分が要因となるコントラスト成分が除去された合焦評価値曲線となる。   With respect to this new focus evaluation value curve 602, the contour component of the petal which is the second subject 205 is equally included in the first distance measurement area range 202 and the third distance measurement area range. For this reason, the new focus evaluation value curve 602 is a focus evaluation value curve from which the contrast component caused by the contour component of the petal is removed.

さらに、第1の測距領域範囲202においては、第1の被写体204である金網が要因となるコントラスト成分(合焦評価値)が多く含まれているので、合焦判断部115は新たな合焦評価値曲線602に関して第2の測距領域範囲203における合焦評価値曲線を生成することができる。   Furthermore, since the first ranging area range 202 includes a lot of contrast components (focus evaluation values) caused by the wire mesh that is the first subject 204, the focus determination unit 115 sets a new focus. With respect to the focus evaluation value curve 602, a focus evaluation value curve in the second distance measurement area range 203 can be generated.

これによって、合焦判断部115は、新たな合焦評価値曲線602のピーク位置P4に対応するフォーカスレンズ群103の位置を第1の被写体204に対する合焦位置F1とする。   Accordingly, the focus determination unit 115 sets the position of the focus lens group 103 corresponding to the peak position P4 of the new focus evaluation value curve 602 as the focus position F1 with respect to the first subject 204.

また、合焦判断部115は第3の合焦評価値曲線601から新たな合焦評価値曲線602を減算して仮想的合焦評価値曲線603を生成する。つまり、合焦判断部115は第3の合焦評価値と第2の差分合焦評価値との差分を第3の差分合焦評価値とする。   Further, the focus determination unit 115 generates a virtual focus evaluation value curve 603 by subtracting a new focus evaluation value curve 602 from the third focus evaluation value curve 601. That is, the focus determination unit 115 sets the difference between the third focus evaluation value and the second difference focus evaluation value as the third difference focus evaluation value.

この仮想的合焦評価値曲603においては、第1の被写体204である金網204および第2の被写体205である花弁の輪郭成分によるコントラスト成分から第1の被写体のコントラスト成分が除去される結果、仮想的合焦評価値曲603は第2の被写体205の輪郭成分に対するコントラスト成分を示す合焦評価値曲線となる。   In this virtual focus evaluation value tune 603, as a result of removing the contrast component of the first subject from the contrast component due to the contour component of the metal mesh 204 as the first subject 204 and the petal as the second subject 205, The virtual focus evaluation value tune 603 is a focus evaluation value curve indicating a contrast component with respect to the contour component of the second subject 205.

これによって、合焦判断部115は、仮想的合焦評価値曲線603のピーク位置P2に対応するフォーカスレンズ群103の位置を第2の被写体205に対する合焦位置F2とする。   Accordingly, the focus determination unit 115 sets the position of the focus lens group 103 corresponding to the peak position P2 of the virtual focus evaluation value curve 603 as the focus position F2 with respect to the second subject 205.

このようにして、図6に示す例においても、遠近競合状態にある第1の被写体204および第2の被写体205の各々の合焦位置を検出することが困難な状況である場合に、第1の被写体204および第2の被写体205の各々について合焦位置を決定することができる。   In this way, even in the example shown in FIG. 6, when it is difficult to detect the in-focus positions of the first subject 204 and the second subject 205 in the perspective conflict state, The in-focus position can be determined for each of the subject 204 and the second subject 205.

図7および図8は、図1に示すカメラ100で行われる焦点検出処理を説明するためのフローチャートである。なお、ここでは、前述のようにして、遠近競合状態にある複数の被写体に関して測距領域範囲を選択および設定して、所謂ワンショット撮影と呼ばれる静止画の撮影記録を行う際に当該測距領域範囲に用いて焦点検出を行うものとする。   7 and 8 are flowcharts for explaining the focus detection process performed by the camera 100 shown in FIG. Here, as described above, when the distance measurement area range is selected and set for a plurality of subjects in a perspective conflict state, the distance measurement area is used when performing still image shooting recording called so-called one-shot shooting. It is assumed that focus detection is performed using the range.

焦点検出処理が開始されると、測距領域決定部110は輝度信号(つまり、コントラスト成分)の変化を判別するための判別パラメータ(設定条件)を設定する(ステップS101)。そして、測距領域決定部110は、設定条件に応じて測距優先度の設定を行う(ステップS102)。   When the focus detection process is started, the ranging area determination unit 110 sets a determination parameter (setting condition) for determining a change in the luminance signal (that is, the contrast component) (step S101). Then, the ranging area determination unit 110 sets ranging priority according to the setting conditions (step S102).

なお、この測距優先度は輝度信号の変化に応じて設定されるが、優先度はコントラスト値又は色情報に応じて設定するようにしてもよい。   The distance measurement priority is set according to a change in the luminance signal, but the priority may be set according to a contrast value or color information.

続いて、前述したようにして、測距領域決定部110は、画像において第1の測距領域範囲を決定する(ステップS103)。そして、測距領域決定部110は第1の測距領域範囲において輝度信号の状態変化を検査する(ステップS104)。次に、測距領域決定部110は輝度信号の変化が予め設定された範囲を超えて変化したか否かを判定する(ステップS105)。   Subsequently, as described above, the ranging area determination unit 110 determines a first ranging area range in the image (step S103). Then, the ranging area determination unit 110 inspects a change in the state of the luminance signal in the first ranging area range (step S104). Next, the ranging area determination unit 110 determines whether or not the change in the luminance signal has changed beyond a preset range (step S105).

輝度信号に変化があると判定すると(ステップS105において、YES)、測距領域決定部110は輝度信号変化判断結果フラグIFLAG=1とする(ステップS106)。一方、輝度信号に変化がないと判定すると(ステップS105において、NO)、測距領域決定部110は輝度信号変化判断結果フラグIFLAG=0とする(ステップS107)。   If it is determined that there is a change in the luminance signal (YES in step S105), the ranging area determination unit 110 sets the luminance signal change determination result flag IFLAG (= 1) (step S106). On the other hand, when it is determined that there is no change in the luminance signal (NO in step S105), the distance measurement area determination unit 110 sets the luminance signal change determination result flag IFLAG_ = 0 (step S107).

ステップS106の処理に続いて、IFLAG=1であると、測距領域分割部113は、前述したようにして、輝度信号の変化に応じて第1の測距領域範囲に境界を設定する(ステップS108)。そして、測距領域分割部113は、当該境界に応じて第1の第1の測距領域範囲において第2の測距領域範囲を設定する(ステップS109)。   Subsequent to the processing of step S106, if IFLAG = 1, the ranging area dividing unit 113 sets a boundary in the first ranging area range according to the change of the luminance signal as described above (step S106). S108). Then, the ranging area dividing unit 113 sets a second ranging area range in the first first ranging area range according to the boundary (step S109).

続いて、焦点検出評価部114は、前述のようにして、フォーカスレンズ群103の移動に応じて第1の測距領域範囲において合焦評価値を求めて、当該合焦評価値を第1の合焦評価値とする(ステップS110)。なお、第1の合焦評価値はメモリに一時記憶される。また、ステップS107の処理に続いて、ステップS110の処理が行われる。   Subsequently, as described above, the focus detection evaluation unit 114 obtains a focus evaluation value in the first distance measurement area range according to the movement of the focus lens group 103, and uses the focus evaluation value as the first focus evaluation value. The focus evaluation value is set (step S110). The first focus evaluation value is temporarily stored in the memory. Further, following step S107, step S110 is performed.

次に、焦点検出評価部114は、IFLAG=1であるか否かを判定する(ステップS111)。IFLAG=1であると(ステップS111において、YES)、焦点検出評価部114は、フォーカスレンズ群103の移動に応じて第2の測距領域範囲において合焦評価値を求めて、当該合焦評価値を第2の合焦評価値とする(ステップS112)。なお、第2の合焦評価値はメモリに一時記憶される。   Next, the focus detection evaluation unit 114 determines whether IFLAG_ = 1 (step S111). If IFLAG = 1 (YES in step S111), the focus detection evaluation unit 114 obtains a focus evaluation value in the second ranging area range according to the movement of the focus lens group 103, and performs the focus evaluation. The value is set as the second focus evaluation value (step S112). Note that the second focus evaluation value is temporarily stored in the memory.

続いて、焦点検出部114は、第1の合焦評価値と第2の合焦評価値との差分値を求めて、当該差分を第1の差分合焦評価値とする(ステップS113)。なお、第2の合焦評価値はメモリに一時記憶される。また、第1の合焦評価値、第2の合焦評価値、および第1の差分合焦評価値はフォーカスレンズ群103が移動する毎に求められる。   Subsequently, the focus detection unit 114 obtains a difference value between the first focus evaluation value and the second focus evaluation value, and sets the difference as the first difference focus evaluation value (step S113). Note that the second focus evaluation value is temporarily stored in the memory. The first focus evaluation value, the second focus evaluation value, and the first difference focus evaluation value are obtained every time the focus lens group 103 moves.

次に、合焦判断部115は、第1の合焦評価値、第2の合焦評価値、および第1の差分合焦評価値を選択的に用いて合焦状態であるか否かを判定する。ここでは、合焦判断部115は、第2の合焦評価値および第1の差分合焦評価値に応じて合焦状態であるか否かを判定する(ステップS114)。なお、IFLAG=1であると(ステップS111において、NO)、処理はステップS114に移行して、合焦判断部115は第1の合焦評価値に応じて合焦状態の確認を行う。   Next, the focus determination unit 115 selectively uses the first focus evaluation value, the second focus evaluation value, and the first difference focus evaluation value to determine whether or not the focus state is in focus. judge. Here, the focus determination unit 115 determines whether or not the focus state is in accordance with the second focus evaluation value and the first difference focus evaluation value (step S114). Note that if IFLAG = 1 (NO in step S111), the process proceeds to step S114, and the focus determination unit 115 checks the focus state according to the first focus evaluation value.

合焦状態を確認できた合焦評価値が存在すると(ステップS114において、YES)、合焦判断部115は合焦状態にある合焦評価値における被写体が最も優先度の高い被写体であるか否かを判定する(ステップS115)。   If there is a focus evaluation value for which the focus state can be confirmed (YES in step S114), the focus determination unit 115 determines whether or not the subject in the focus evaluation value in the focus state is the subject with the highest priority. Is determined (step S115).

ステップS115においては、例えば、第1の測距領域範囲において1つの箇所が合焦状態となれば、当該合焦位置を優先度が最も高いとするようにしてよい。一方、1つの測距領域範囲において合焦状態となっても、他の測距領域範囲が設定されている場合には当該他の測距領域範囲で合焦状態が得られるようにフォーカスレンズ群103を移動して複数の合焦状態が検知されると、予め設定された優先度に応じていずれかの合焦位置を選択することになる。   In step S115, for example, if one location is in focus in the first ranging area range, the focus position may have the highest priority. On the other hand, the focus lens group is configured so that, even if one focusing area range is in focus, when another ranging area range is set, the focusing condition is obtained in the other ranging area range. When a plurality of in-focus states are detected by moving 103, one of the in-focus positions is selected according to a preset priority.

なお、優先度は複数の合焦状態における各被写体の合焦評価値の大小、フォーカスレンズ群の位置、被写体色、および被写体形状を考慮するようにしてもよい。   Note that the priority may consider the focus evaluation value of each subject in a plurality of in-focus states, the position of the focus lens group, the subject color, and the subject shape.

最も優先度の高い被写体でないと(ステップS115において、NO)、つまり、最も優先度の高い合焦状態でないと、合焦判断部115は合焦状態に対応するフォーカスレンズ群103の位置をメモリに記憶する(ステップS116)。   If it is not the subject with the highest priority (NO in step S115), that is, if it is not the focus state with the highest priority, the focus determination unit 115 stores the position of the focus lens group 103 corresponding to the focus state in the memory. Store (step S116).

最も優先度の高い被写体であると(ステップS115において、YES)、つまり、最も優先度の高い合焦状態であると、合焦判断部115は当該合焦状態におけるフォーカスレンズ群103の位置を最終合焦位置とする(ステップS117)。そして、合焦判断部115は、フォーカス駆動部116によってフォーカスレンズ群103を最終合焦位置に移動して(ステップS118)、焦点検出処理を終了する。   If the subject has the highest priority (YES in step S115), that is, if the focus state has the highest priority, the focus determination unit 115 finally sets the position of the focus lens group 103 in the focus state. The in-focus position is set (step S117). Then, the focus determination unit 115 moves the focus lens group 103 to the final focus position by the focus drive unit 116 (step S118), and ends the focus detection process.

合焦状態を確認できた合焦評価値が存在しないと(ステップS114において、NO)、合焦判断部115は測距動作を打ち切るか否かを判定する(ステップS119)。ステップS119において、例えば、合焦判断部115は所定のフォーカスレンズ群103の移動範囲において合焦状態をサーチした結果に応じて合焦状態にはならないと判定した場合、又は合焦評価値が低過ぎて確実な合焦状態であると判定できない場合に、測距動作を打ち切ると判定する。   If there is no focus evaluation value with which the focus state can be confirmed (NO in step S114), focus determination section 115 determines whether or not to stop the distance measuring operation (step S119). In step S119, for example, when the focus determination unit 115 determines that the focus state is not reached according to the result of searching for the focus state in the movement range of the predetermined focus lens group 103, or the focus evaluation value is low. If it is too long to determine that the in-focus state is certain, it is determined that the distance measuring operation is to be terminated.

測距動作(つまり、焦点検出動作)を打ち切ると判定すると(ステップS119において、YES)、合焦判定部115は測距開始(焦点検出処理開始)から現在に至るまでに合焦と判断された経歴(合焦履歴と呼ぶ)が存在するか否かを確認する(ステップS120)。合焦履歴が存在すると(ステップS120において、YES)、合焦判断部115は合焦履歴において複数の合焦位置があるか否か、つまり、複数の合焦判定が行われている否かを確認する(ステップS121)。   If it is determined that the distance measurement operation (that is, the focus detection operation) is to be terminated (YES in step S119), the focus determination unit 115 is determined to be in focus from the distance measurement start (focus detection processing start) to the present. It is confirmed whether or not there is a history (referred to as an in-focus history) (step S120). When the in-focus history exists (YES in step S120), the in-focus determination unit 115 determines whether there are a plurality of in-focus positions in the in-focus history, that is, whether a plurality of in-focus determinations are performed. Confirmation (step S121).

複数の合焦判定が行われていると(ステップS121において、YES)、合焦判断部115は、設定された優先度に応じて複数の合焦位置から最終合焦位置を決定する(ステップS122)。そして、合焦判断部115はステップS118の処理を行う。なお、ピーク位置を探索するためにフォーカスレンズ群103の位置が合焦位置を越えることがある。このため、ステップS122からS118の処理において最終合焦位置にフォーカスレンズ群103を移動させる。   If a plurality of in-focus determinations are made (YES in step S121), the in-focus determination unit 115 determines the final in-focus position from the plurality of in-focus positions according to the set priority (step S122). ). Then, the focus determination unit 115 performs the process of step S118. In order to search for the peak position, the position of the focus lens group 103 may exceed the in-focus position. For this reason, the focus lens group 103 is moved to the final focus position in the processing of steps S122 to S118.

複数の合焦判定が行われていないと(ステップS121において、NO)、合焦判断部115は、現在の合焦位置を最終合焦位置と決定して(ステップS123)、ステップS118の処理に進む。合焦履歴が存在しないと(ステップS120において、NO)、合焦判断部115は合焦エラー情報を出力して、例えば、表示部(図示せず)に表示する(ステップS124)。そして、合焦判断部115は焦点検出処理を終了する。   If a plurality of in-focus determinations are not made (NO in step S121), the in-focus determination unit 115 determines the current in-focus position as the final in-focus position (step S123), and performs the process in step S118. move on. If there is no in-focus history (NO in step S120), the in-focus determining unit 115 outputs in-focus error information and displays it on a display unit (not shown), for example (step S124). Then, the focus determination unit 115 ends the focus detection process.

測距動作を打ち切らないと判定すると(ステップS119において、NO)、合焦判定部115は、次の合焦位置をサーチするため、フォーカス駆動部116によってフォーカスレンズ群103を所定の量だけ駆動する(ステップS125)。そして、処理はステップS110に戻る。なお、ステップS116の処理の後、処理はステップS110に移行する。   If it is determined that the distance measurement operation is not terminated (NO in step S119), the focus determination unit 115 drives the focus lens group 103 by a predetermined amount by the focus drive unit 116 to search for the next focus position. (Step S125). Then, the process returns to step S110. In addition, after the process of step S116, a process transfers to step S110.

上述の焦点検出処理においては、静止画を撮影して記録する場合を例に挙げたが、焦点検出処理が終了すると、再度焦点検出処理を開始して、終了から開始の間において画像記録を行うようにすれば動画の撮影記録にも対応することができる。   In the focus detection process described above, a case where a still image is captured and recorded has been described as an example, but when the focus detection process ends, the focus detection process is started again, and image recording is performed between the end and the start. By doing so, it is possible to cope with shooting and recording of moving images.

このように、本発明の実施の形態では、個々の被写体に対して正確な合焦が困難な遠近競合状態においても、測距領域範囲を分割して焦点検出を行うようにしたので遠近競合状態にある被写体毎に精度よく合焦を行うことができる。   As described above, according to the embodiment of the present invention, the focus detection is performed by dividing the distance measurement area range even in the perspective competition state in which accurate focusing is difficult for each subject. Therefore, it is possible to focus accurately on each subject.

上述の説明から明らかなように、図1に示す例においては、測距領域決定部110が第1の設定手段として機能し、測距領域決定部110および測距領域分割部113が第2の設定手段として機能する。また、焦点検出評価部114が評価値算出手段として機能し、合焦判断部115が合焦位置算出手段として機能する。撮像素子104および画像信号抽出部105は撮像手段として機能し、フォーカス駆動部116は駆動制御手段として機能する。   As is clear from the above description, in the example shown in FIG. 1, the ranging area determination unit 110 functions as the first setting unit, and the ranging area determination unit 110 and the ranging area division unit 113 are the second setting unit. Functions as setting means. In addition, the focus detection evaluation unit 114 functions as an evaluation value calculation unit, and the focus determination unit 115 functions as a focus position calculation unit. The imaging element 104 and the image signal extraction unit 105 function as an imaging unit, and the focus driving unit 116 functions as a drive control unit.

なお、図示の例では、少なくとも測距領域決定部110、測距領域分割部113、焦点検出評価部114、および合焦判断部115が焦点検出装置を構成する。   In the illustrated example, at least the ranging area determination unit 110, the ranging area division unit 113, the focus detection evaluation unit 114, and the focus determination unit 115 constitute a focus detection device.

以上、本発明について実施の形態に基づいて説明したが、本発明は、これらの実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。   As mentioned above, although this invention was demonstrated based on embodiment, this invention is not limited to these embodiment, Various forms of the range which does not deviate from the summary of this invention are also contained in this invention. .

例えば、上記の実施の形態の機能を制御方法として、この制御方法を焦点検出装置に実行させるようにすればよい。また、上述の実施の形態の機能を有するプログラムを制御プログラムとして、当該制御プログラムを焦点検出装置が備えるコンピュータに実行させるようにしてもよい。なお、制御プログラムは、例えば、コンピュータに読み取り可能な記録媒体に記録される。   For example, the function of the above embodiment may be used as a control method, and this control method may be executed by the focus detection apparatus. Further, a program having the functions of the above-described embodiments may be used as a control program, and the control program may be executed by a computer included in the focus detection apparatus. The control program is recorded on a computer-readable recording medium, for example.

上記の制御方法および制御プログラムの各々は、少なくとも第1の設定ステップ、第2の設定ステップ、評価値算出ステップ、および合焦位置算出ステップを有している。   Each of the above control method and control program has at least a first setting step, a second setting step, an evaluation value calculating step, and an in-focus position calculating step.

また、本発明は、以下の処理を実行することによっても実現される。つまり、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種の記録媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPUなど)がプログラムを読み出して実行する処理である。   The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various recording media, and the computer (or CPU, MPU, etc.) of the system or apparatus reads the program. To be executed.

101 撮影光学系
103 フォーカスレンズ群
104 撮像素子
106 測光部
107 露光量決定部
110 測距領域決定部
113 測距領域分割部
114 焦点検出評価部
115 合焦判断部
116 フォーカス駆動部
DESCRIPTION OF SYMBOLS 101 Shooting optical system 103 Focus lens group 104 Image pick-up element 106 Photometry part 107 Exposure amount determination part 110 Distance measurement area determination part 113 Distance measurement area division | segmentation part 114 Focus detection evaluation part 115 Focus determination part 116 Focus drive part

Claims (10)

フォーカスレンズを備える撮像光学系を介して少なくとも2つの被写体を撮像して得られた画像において前記被写体の各々に対する焦点検出を行って前記被写体に合焦させる焦点検出装置であって、
前記画像に対して焦点検出を行うための第1の測距領域範囲を設定する第1の設定手段と、
前記第1の測距領域範囲において別の第2の測距領域範囲を設定する第2の設定手段と、
前記フォーカスレンズを前記撮像光学系の光軸に沿って移動させつつ前記第1の測距領域範囲および前記第2の測距領域範囲においてそれぞれ前記画像におけるコントラスト成分を第1の合焦評価値および第2の合焦評価値として求める評価値算出手段と、
前記第1の合焦評価値と前記第2の合焦評価値との差分を第1の差分合焦評価値として、前記第1の合焦評価値、前記第2の合焦評価値、および前記第1の差分合焦評価値を選択的に用いて前記被写体の各々について前記フォーカスレンズの合焦位置を求める合焦位置算出手段と、
を有することを特徴とする焦点検出装置。
A focus detection device that performs focus detection on each of the subjects in an image obtained by imaging at least two subjects via an imaging optical system including a focus lens, and focuses the subject.
First setting means for setting a first ranging area range for performing focus detection on the image;
A second setting means for setting another second ranging area range in the first ranging area range;
While moving the focus lens along the optical axis of the imaging optical system, the contrast component in the image is converted into the first focus evaluation value and the first distance measurement area range and the second distance measurement area range, respectively. Evaluation value calculating means for obtaining the second focus evaluation value;
Using the difference between the first focus evaluation value and the second focus evaluation value as a first difference focus evaluation value, the first focus evaluation value, the second focus evaluation value, and A focus position calculating means for selectively using the first difference focus evaluation value to determine a focus position of the focus lens for each of the subjects;
A focus detection apparatus comprising:
前記第2の設定手段は、前記第1の合焦評価値が予め設定された閾値を超えて変化したことを示す判定結果に応じて前記第1の測距領域範囲に第2の測距領域範囲を設定することを特徴とする請求項1に記載の焦点検出装置。   The second setting means includes a second ranging area in the first ranging area according to a determination result indicating that the first focus evaluation value has changed beyond a preset threshold. The focus detection apparatus according to claim 1, wherein a range is set. 前記第2の設定手段は、前記第1の合焦評価値が前記閾値を超えて変化したことを示す判定結果に応じて得られた境界によって前記第2の測距領域範囲を設定することを特徴とする請求項2に記載の焦点検出装置。   The second setting means sets the second ranging area range by a boundary obtained according to a determination result indicating that the first focus evaluation value has changed beyond the threshold value. The focus detection apparatus according to claim 2, wherein 前記第2の設定手段は、前記第1の測距領域範囲から前記第2の測距領域範囲を除外した第3の測距領域範囲を求めて、前記第2の測距領域範囲および前記第3の測距領域範囲の各々に個別の被写体が位置するように前記第2の測距領域範囲を設定することを特徴とする請求項1〜3のいずれか1項に記載の焦点検出装置。   The second setting means obtains a third ranging area range obtained by excluding the second ranging area range from the first ranging area range, the second ranging area range and the second ranging area range. 4. The focus detection apparatus according to claim 1, wherein the second ranging area range is set so that an individual subject is positioned in each of the three ranging area ranges. 5. 前記合焦位置算出手段は、前記第2の合焦評価値および前記第1の差分合焦評価値に応じて前記合焦位置を求めることを特徴とする請求項1〜4のいずれか1項に記載の焦点検出装置。   5. The focus position calculation unit obtains the focus position according to the second focus evaluation value and the first difference focus evaluation value. 6. The focus detection apparatus described in 1. 前記評価値算出手段は、前記フォーカスレンズを前記撮像光学系の光軸に沿って移動させつつ前記第3の測距領域範囲において前記画像におけるコントラスト成分を第3の合焦評価値として求め、
前記合焦位置算出手段は、前記第1の合焦評価値と前記第3の合焦評価値との差分を第2の差分合焦評価値として、さらに前記第3の合焦評価値と前記第2の差分合焦評価値との差分を第3の差分合焦評価値として、前記第2の差分合焦評価値および前記第3の差分合焦評価値に応じて前記合焦位置を求めることを特徴とする請求項1〜4のいずれか1項に記載の焦点検出装置。
The evaluation value calculation means obtains a contrast component in the image as a third focus evaluation value in the third distance measurement area range while moving the focus lens along the optical axis of the imaging optical system,
The in-focus position calculation means uses the difference between the first in-focus evaluation value and the third in-focus evaluation value as a second difference in-focus evaluation value, and further the third in-focus evaluation value and the Using the difference from the second difference focus evaluation value as the third difference focus evaluation value, the focus position is obtained according to the second difference focus evaluation value and the third difference focus evaluation value. The focus detection apparatus according to claim 1, wherein
前記第2の設定手段は、前記フォーカスレンズの位置に応じて予め登録されたコントラスト情報と前記画像におけるコントラスト成分とに基づいて前記第2の測距領域範囲を設定することを特徴とする請求項1に記載の焦点検出装置。   The second setting means sets the second ranging area range based on contrast information registered in advance according to a position of the focus lens and a contrast component in the image. The focus detection apparatus according to 1. フォーカスレンズを備える撮像光学系を介して少なくとも2つの被写体を撮像して画像を得る撮像手段と、
請求項1〜7のいずれか1項に記載の焦点検出装置と、
前記合焦位置に応じて前記フォーカスレンズを前記撮像光学系の光軸に沿って駆動制御する駆動制御手段と、
を有することを特徴とする撮像装置。
Imaging means for obtaining an image by imaging at least two subjects via an imaging optical system including a focus lens;
The focus detection apparatus according to any one of claims 1 to 7,
Drive control means for driving and controlling the focus lens along the optical axis of the imaging optical system in accordance with the in-focus position;
An imaging device comprising:
フォーカスレンズを備える撮像光学系を介して少なくとも2つの被写体を撮像して得られた画像において前記被写体の各々に対する焦点検出を行って前記被写体に合焦させる焦点検出装置の制御方法であって、
前記画像に対して焦点検出を行うための第1の測距領域範囲を設定する第1の設定ステップと、
前記第1の測距領域範囲において別の第2の測距領域範囲を設定する第2の設定ステップと、
前記フォーカスレンズを前記撮像光学系の光軸に沿って移動させつつ前記第1の測距領域範囲および前記第2の測距領域範囲においてそれぞれ前記画像におけるコントラスト成分を第1の合焦評価値および第2の合焦評価値として求める評価値算出ステップと、
前記第1の合焦評価値と前記第2の合焦評価値との差分を第1の差分合焦評価値として、前記第1の合焦評価値、前記第2の合焦評価値、および前記第1の差分合焦評価値を選択的に用いて前記被写体の各々について前記フォーカスレンズの合焦位置を求める合焦位置算出ステップと、
を有することを特徴とする制御方法。
A method for controlling a focus detection apparatus that performs focus detection on each of the subjects in an image obtained by imaging at least two subjects via an imaging optical system including a focus lens, and focuses the subject.
A first setting step of setting a first ranging area range for performing focus detection on the image;
A second setting step of setting another second ranging area range in the first ranging area range;
While moving the focus lens along the optical axis of the imaging optical system, the contrast component in the image is converted into the first focus evaluation value and the first distance measurement area range and the second distance measurement area range, respectively. An evaluation value calculating step for obtaining the second focus evaluation value;
Using the difference between the first focus evaluation value and the second focus evaluation value as a first difference focus evaluation value, the first focus evaluation value, the second focus evaluation value, and A focus position calculating step of obtaining a focus position of the focus lens for each of the subjects by selectively using the first difference focus evaluation value;
A control method characterized by comprising:
フォーカスレンズを備える撮像光学系を介して少なくとも2つの被写体を撮像して得られた画像において前記被写体の各々に対する焦点検出を行って前記被写体に合焦させる焦点検出装置で用いられる制御プログラムであって、
前記焦点検出装置が備えるコンピュータに、
前記画像に対して焦点検出を行うための第1の測距領域範囲を設定する第1の設定ステップと、
前記第1の測距領域範囲において別の第2の測距領域範囲を設定する第2の設定ステップと、
前記フォーカスレンズを前記撮像光学系の光軸に沿って移動させつつ前記第1の測距領域範囲および前記第2の測距領域範囲においてそれぞれ前記画像におけるコントラスト成分を第1の合焦評価値および第2の合焦評価値として求める評価値算出ステップと、
前記第1の合焦評価値と前記第2の合焦評価値との差分を第1の差分合焦評価値として、前記第1の合焦評価値、前記第2の合焦評価値、および前記第1の差分合焦評価値を選択的に用いて前記被写体の各々について前記フォーカスレンズの合焦位置を求める合焦位置算出ステップと、
を実行させることを特徴とする制御プログラム。
A control program used in a focus detection device that performs focus detection on each of the subjects in an image obtained by imaging at least two subjects via an imaging optical system including a focus lens and focuses the subject. ,
A computer included in the focus detection device,
A first setting step of setting a first ranging area range for performing focus detection on the image;
A second setting step of setting another second ranging area range in the first ranging area range;
While moving the focus lens along the optical axis of the imaging optical system, the contrast component in the image is converted into the first focus evaluation value and the first distance measurement area range and the second distance measurement area range, respectively. An evaluation value calculating step for obtaining the second focus evaluation value;
Using the difference between the first focus evaluation value and the second focus evaluation value as a first difference focus evaluation value, the first focus evaluation value, the second focus evaluation value, and A focus position calculating step of obtaining a focus position of the focus lens for each of the subjects by selectively using the first difference focus evaluation value;
A control program characterized by causing
JP2013212079A 2013-10-09 2013-10-09 Focus detection device, control method therefor, control program and imaging device Pending JP2015075648A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013212079A JP2015075648A (en) 2013-10-09 2013-10-09 Focus detection device, control method therefor, control program and imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013212079A JP2015075648A (en) 2013-10-09 2013-10-09 Focus detection device, control method therefor, control program and imaging device

Publications (1)

Publication Number Publication Date
JP2015075648A true JP2015075648A (en) 2015-04-20

Family

ID=53000544

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013212079A Pending JP2015075648A (en) 2013-10-09 2013-10-09 Focus detection device, control method therefor, control program and imaging device

Country Status (1)

Country Link
JP (1) JP2015075648A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106199902A (en) * 2015-04-29 2016-12-07 冠捷投资有限公司 Twin-lens focusing method and device
CN112166374A (en) * 2019-04-24 2021-01-01 深圳市大疆创新科技有限公司 Control device, imaging device, mobile body, control method, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106199902A (en) * 2015-04-29 2016-12-07 冠捷投资有限公司 Twin-lens focusing method and device
CN106199902B (en) * 2015-04-29 2019-02-01 冠捷投资有限公司 Twin-lens focusing method and device
CN112166374A (en) * 2019-04-24 2021-01-01 深圳市大疆创新科技有限公司 Control device, imaging device, mobile body, control method, and program

Similar Documents

Publication Publication Date Title
JP5789091B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP5374119B2 (en) Distance information acquisition device, imaging device, and program
JP6151867B2 (en) Imaging device, imaging device body, and lens barrel
KR101085925B1 (en) Image pickup apparatus to perform auto focusing function by using plurality of band pass filters and auto focusing method applied the same
JP2009175528A (en) Focus-adjusting apparatus and imaging apparatus
JP5950664B2 (en) Imaging apparatus and control method thereof
JP7336330B2 (en) Control device, imaging device, control method, and program
JP2004325517A (en) Imaging unit
JP2005173269A (en) Optical equipment
JP5963552B2 (en) Imaging device
JP6577738B2 (en) FOCUS DETECTION DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2015152749A (en) Imaging device and control method of the same
JP6271911B2 (en) Imaging apparatus, control method therefor, and defocus amount calculation method
JP6122330B2 (en) Imaging apparatus and control method thereof
JP2015075648A (en) Focus detection device, control method therefor, control program and imaging device
JP6131721B2 (en) Focus detection device and focus adjustment device
JP2016156950A (en) Automatic focus adjustment device and control method of the same
JP6429724B2 (en) Imaging apparatus and control method thereof
JP5930792B2 (en) Imaging apparatus and control method thereof
JP7146474B2 (en) CONTROL DEVICE, IMAGING DEVICE, CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2005208274A (en) Autofocusing camera
JP2010072559A (en) Imaging apparatus and object area extracting method
JP5428559B2 (en) Focus detection apparatus and imaging apparatus
JP6193609B2 (en) 3D shape measuring device, 3D shape measuring method
JP2810403B2 (en) Automatic focusing device