JP2014021151A - Focus adjustment device and focus adjustment method - Google Patents

Focus adjustment device and focus adjustment method Download PDF

Info

Publication number
JP2014021151A
JP2014021151A JP2012156569A JP2012156569A JP2014021151A JP 2014021151 A JP2014021151 A JP 2014021151A JP 2012156569 A JP2012156569 A JP 2012156569A JP 2012156569 A JP2012156569 A JP 2012156569A JP 2014021151 A JP2014021151 A JP 2014021151A
Authority
JP
Japan
Prior art keywords
evaluation value
focus
focus evaluation
increase
decrease
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
JP2012156569A
Other languages
Japanese (ja)
Inventor
Satoshi Takinoiri
聡 滝之入
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.)
Olympus Imaging Corp
Original Assignee
Olympus Imaging Corp
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 Olympus Imaging Corp filed Critical Olympus Imaging Corp
Priority to JP2012156569A priority Critical patent/JP2014021151A/en
Publication of JP2014021151A publication Critical patent/JP2014021151A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a focus adjustment device and focus adjustment method which shorten focus adjustment time by appropriately setting a decrease threshold value even after the start of focus and ensure high stability.SOLUTION: In the beginning of a focus adjustment operation, focus adjustment values are calculated from the high frequency component of an image signal obtained by an imaging element 2 and the component of a frequency lower than the high frequency component. The focus evaluation values calculated in the beginning of the focus adjustment operation are stored as reference evaluation values (S13). The focus evaluation values are calculated (S25) from the high frequency component and low frequency component each time an image signal is obtained by the imaging element 2 after the start of the focus adjustment operation. According to the magnitude relation between each reference evaluation value and the corresponding focus evaluation value, the threshold value for detecting the peak of the focus evaluation value is calculated (S29). Using the calculated threshold value for detecting the peak, the peak of the focus evaluation value is determined.

Description

本発明は、所謂、山登りサーボ方式による焦点調節装置および焦点調節方法に関する。   The present invention relates to a so-called hill-climbing servo system focus adjustment apparatus and focus adjustment method.

従来の山登りサーボ方式による自動焦点調節装置では、フォーカスレンズを実際に駆動し、焦点評価値(コントラスト値ともいう)の最大値を検出する方式であることから、最大値を越えてから焦点評価値が一定量の減少を検出する必要がある。しかし、被写体や撮影環境によって焦点評価値特性は変化するため、焦点評価値の最大値からの減少量、すなわち減少閾値を一義的に定めてしまうと、焦点評価値の最大値判定までにフォーカスレンズの最大値オーバラン量が多くなり、焦点検出までに時間を要してしまう。   In the conventional automatic focus adjustment device using the hill-climbing servo system, the focus lens is actually driven to detect the maximum focus evaluation value (also called contrast value). It is necessary to detect a certain amount of decrease. However, since the focus evaluation value characteristic changes depending on the subject and the shooting environment, if the amount of decrease from the maximum focus evaluation value, that is, the reduction threshold value is uniquely determined, the focus lens is determined before the maximum focus evaluation value is determined. The maximum overrun amount increases, and it takes time to detect the focus.

この問題を解決するために、例えば、特許文献1に開示のオートフォーカス装置では、現在焦点評価値と1つ前の焦点評価値、および1つ前の焦点評価値と2つ前の焦点評価値で、それぞれ評価値差分を算出し、この差分値が共に所定の閾値より大きい場合と、どちら一方が閾値以下の場合で、最大値からの減少閾値を切り換えるようにしている。この処理によって、評価値最大値からのフォーカスレンズオーバーラン量を減らすようにしている。   In order to solve this problem, for example, in the autofocus device disclosed in Patent Document 1, the current focus evaluation value and the previous focus evaluation value, and the previous focus evaluation value and the previous focus evaluation value. Thus, the difference between the evaluation values is calculated, and the decrease threshold value from the maximum value is switched between the case where both of the difference values are larger than the predetermined threshold value and the case where one of them is equal to or less than the threshold value. By this processing, the focus lens overrun amount from the maximum evaluation value is reduced.

特開平08−125913号公報Japanese Patent Laid-Open No. 08-125913

しかしながら、上述の特許文献1に開示の方法では、最大値近傍での評価値から減少閾値を決めているので、フォーカス開始直後での変化が含まれていない。また、評価値差分は1種類のハイパスフィルタで実施している。このため、フォーカス開始直後、すなわちレリーズ釦を押した際の振動によるブレ等の外乱が発生しているにも関わらず、閾値選択用のフィルタがこれらの外乱を検出できない場合があり、この場合には閾値の選択によっては合焦精度が悪化してしまうおそれがある。   However, in the method disclosed in Patent Document 1 described above, the decrease threshold is determined from the evaluation value in the vicinity of the maximum value, and therefore a change immediately after the start of focus is not included. The evaluation value difference is implemented by one type of high-pass filter. For this reason, there is a case where the threshold selection filter cannot detect these disturbances immediately after the focus is started, that is, even when disturbances such as blurring due to vibration occur when the release button is pressed. Depending on the selection of the threshold value, the focusing accuracy may be deteriorated.

例えば、図6、7は、無限方向から至近方向に向かってフォーカスレンズを駆動した場合の焦点評価値の変化を示している。いずれの場合も、現在のレンズ駆動方向に焦点評価値の最大値が存在するため、焦点方向は「順方向」と判断される。ここで、理想環境下では、図6に示すように、低域フィルタによって処理された画像信号の焦点評価値LLR、および高域フィルタによって処理された画像信号の焦点評価値HLRは、レンズ駆動開始位置(LA1)の焦点評価値(基準評価値HVR1、LVR1)から最大値(HVR5、LVR5)まで連続して増加している。   For example, FIGS. 6 and 7 show changes in the focus evaluation value when the focus lens is driven from the infinite direction toward the closest direction. In either case, since the maximum focus evaluation value exists in the current lens driving direction, the focus direction is determined to be the “forward direction”. Here, under an ideal environment, as shown in FIG. 6, the focus evaluation value LLR of the image signal processed by the low-pass filter and the focus evaluation value HLR of the image signal processed by the high-pass filter It continuously increases from the focus evaluation value (reference evaluation values HVR1, LVR1) at the position (LA1) to the maximum value (HVR5, LVR5).

しかし、図7に示すような例では、手ブレの影響によって、低域フィルタによって処理された画像信号の基準評価値(LV2)から次の評価値(LV1)まで減少しており、かつその後の最大値まで評価値が減少している箇所(レンズ位置LB4における評価値LV2)がある。さらに、高域フィルタによって処理された画像信号では、基準評価値(HV1)から次の評価値(HV2)までは増加しているが、手ブレの影響で最大値までに評価値が減少している箇所(レンズ位置LB4における評価値HV3)がある。ここで、図7のレンズ位置LB4で高域フィルタの評価値(HV3)が減少しているが、この時点での高域フィルタに対する減少閾値を図6の減少閾値(ThA)と同一にした場合、レンズ位置LB3をピーク位置と誤判定してしまう。   However, in the example shown in FIG. 7, the image signal processed by the low-pass filter is decreased from the reference evaluation value (LV2) to the next evaluation value (LV1) due to the influence of camera shake, and thereafter. There is a place where the evaluation value decreases to the maximum value (evaluation value LV2 at the lens position LB4). Furthermore, in the image signal processed by the high-pass filter, the reference evaluation value (HV1) increases from the next evaluation value (HV2), but the evaluation value decreases to the maximum value due to camera shake. (Evaluation value HV3 at lens position LB4). Here, although the evaluation value (HV3) of the high-pass filter is decreased at the lens position LB4 in FIG. 7, the reduction threshold for the high-pass filter at this time is the same as the reduction threshold (ThA) in FIG. The lens position LB3 is erroneously determined as the peak position.

本発明は、このような事情を鑑みてなされたものであり、フォーカス開始直後であっても、減少閾値を適切に設定することによって焦点調節節時間を短縮すると共に安定性の高い焦点調節装置および焦点調節方法を提供することを目的とする。   The present invention has been made in view of such circumstances, and even immediately after the start of focus, by appropriately setting a decrease threshold, the focus adjustment node time is shortened and a highly stable focus adjustment device and An object is to provide a focus adjustment method.

上記目的を達成するため第1の発明に係わる焦点調節装置は、光学系による光学像を撮像素子に結像させて画像信号を生成する撮像部を有し、上記光学系を移動しながら、繰り返し撮像を行って画像信号を取得し、上記画像信号に基づいて焦点調節動作を行う焦点調節装置において、上記画像信号の高周波成分を通過させる高域フィルタ部と、上記高域フィルタ部よりも画像信号のより低周波成分を通過させる低域フィルタ部と、上記低域フィルタ部または高域フィルタ部の出力に基づいて、焦点評価値を算出する焦点評価値算出部と、焦点調節動作を開始する位置にて取得した画像信号に基づいて算出される焦点評価値とその後に取得される画像信号に基づいて算出される焦点評価値との増減方向と増減率を検出する増減検出部と、焦点調節動作を開始する位置から所定の期間に取得される複数の画像信号に基づいて算出される複数の焦点評価値の連続性を検出する連続性検出部と、上記増減検出部により検出される増減方向と増減率と、上記連続性検出部により検出される連続性とに基づいて、上記焦点評価値のピークを判定する閾値を設定して焦点評価値のピークに基づく焦点調節動作を行う制御部と、を具備する。   In order to achieve the above object, a focus adjustment apparatus according to a first aspect of the present invention includes an imaging unit that generates an image signal by forming an optical image of an optical system on an imaging element, and repeatedly while moving the optical system. In a focus adjustment device that performs imaging to acquire an image signal and performs a focus adjustment operation based on the image signal, a high-pass filter unit that passes a high-frequency component of the image signal, and an image signal that is higher than the high-pass filter unit A low-pass filter that passes a lower frequency component, a focus evaluation value calculator that calculates a focus evaluation value based on the output of the low-pass filter unit or the high-pass filter unit, and a position at which a focus adjustment operation is started An increase / decrease detection unit for detecting an increase / decrease direction and an increase / decrease rate between a focus evaluation value calculated based on the image signal acquired in step 1 and a focus evaluation value calculated based on the image signal acquired thereafter; A continuity detection unit that detects continuity of a plurality of focus evaluation values calculated based on a plurality of image signals acquired from a position at which an operation is started in a predetermined period, and an increase / decrease direction detected by the increase / decrease detection unit A control unit that sets a threshold for determining the peak of the focus evaluation value based on the increase / decrease rate and the continuity detected by the continuity detection unit and performs a focus adjustment operation based on the peak of the focus evaluation value Are provided.

第2の発明に係わる焦点調節装置は、上記第1の発明において、上記増減検出部は、上記低域フィルタ部の出力に基づいて上記焦点評価値の増減方向と増減率を検出し、上記連続性検出部は、上記低域フィルタ部の出力に基づいて上記焦点評価値の連続性を検出し、上記制御部は、上記増減検出部により検出される増減方向と増減率と、上記連続性検出部により検出される連続性とに基づいて、上記高域フィルタ部の出力に基づく焦点評価値のピークを検出する閾値を設定し、該焦点評価値のピークに基づく焦点調節動作を行う。   The focus adjustment apparatus according to a second invention is the focus adjustment apparatus according to the first invention, wherein the increase / decrease detection unit detects the increase / decrease direction and the increase / decrease rate of the focus evaluation value based on the output of the low-pass filter unit. The sex detection unit detects the continuity of the focus evaluation value based on the output of the low-pass filter unit, and the control unit detects the increase / decrease direction and the rate of increase / decrease detected by the increase / decrease detection unit, and the continuity detection A threshold value for detecting a peak of the focus evaluation value based on the output of the high-pass filter unit is set based on the continuity detected by the unit, and a focus adjustment operation based on the peak of the focus evaluation value is performed.

第3の発明に係わる焦点調節装置は、上記第1の発明において、上記増減検出部は、上記高域フィルタ部の出力に基づいて上記焦点評価値の増減方向と増減率を検出し、上記連続性検出部は、上記高域フィルタ部の出力に基づいて上記焦点評価値の連続性を検出し、上記制御部は、上記増減検出部により検出される増減方向と増減率と、上記連続性検出部により検出される連続性とに基づいて、上記高域フィルタ部の出力に基づく焦点評価値のピークを判定する閾値を設定し、該焦点評価値のピークに基づく焦点調節動作を行う。   The focus adjustment apparatus according to a third invention is the focus adjustment apparatus according to the first invention, wherein the increase / decrease detection unit detects the increase / decrease direction and the increase / decrease rate of the focus evaluation value based on the output of the high-pass filter unit. The sex detection unit detects the continuity of the focus evaluation value based on the output of the high-pass filter unit, and the control unit detects the increase / decrease direction and the rate of increase / decrease detected by the increase / decrease detection unit, and the continuity detection Based on the continuity detected by the unit, a threshold for determining the peak of the focus evaluation value based on the output of the high-pass filter unit is set, and the focus adjustment operation based on the peak of the focus evaluation value is performed.

第4の発明に係わる焦点調節装置は、上記第1ないし第3の発明において、上記制御部は、上記焦点評価値の最大値からの減少量を設定し、上記焦点評価値が最大値から該減少量を越えて減少する場合に上記最大値をピークと判定する。   In the focus adjustment apparatus according to a fourth aspect of the present invention, in the first to third aspects of the invention, the control unit sets a reduction amount from the maximum value of the focus evaluation value, and the focus evaluation value is set from the maximum value. The maximum value is determined as a peak when the amount of decrease exceeds the amount of decrease.

第5の発明に係わる焦点調節方法は、焦点調節動作の開始時に、撮像素子によって取得された画像信号の高周波成分、および該高周波成分よりも低周波成分から、それぞれ焦点評価値を算出し、上記焦点調節動作の開始時に算出した上記焦点評価値を基準評価値として記憶し、上記焦点調節動作の開始以後、上記撮像素子によって画像信号を取得する毎に、上記高周波成分および低周波成分から、それぞれ焦点評価値を算出し、上記基準評価値と上記焦点評価値の大小関係と連続性に応じて、上記焦点評価値のピーク検出用の閾値を算出し、上記ピーク検出用の閾値を用いて、上記焦点評価値のピークを判定する。   According to a fifth aspect of the present invention, there is provided a focus adjustment method for calculating a focus evaluation value from a high frequency component of an image signal acquired by an image sensor and a lower frequency component than the high frequency component at the start of a focus adjustment operation, The focus evaluation value calculated at the start of the focus adjustment operation is stored as a reference evaluation value, and each time an image signal is acquired by the image sensor after the start of the focus adjustment operation, the high frequency component and the low frequency component respectively. A focus evaluation value is calculated, a threshold value for peak detection of the focus evaluation value is calculated according to the magnitude relationship and continuity between the reference evaluation value and the focus evaluation value, and the threshold value for peak detection is used. The peak of the focus evaluation value is determined.

本発明によれば、フォーカス開始直後であっても、減少閾値を適切に設定することによって焦点調節節時間を短縮すると共に安定性の高い焦点調節装置および焦点調節方法を提供することができる。   According to the present invention, it is possible to provide a focus adjustment device and a focus adjustment method that can shorten the focus adjustment node time and have high stability by setting the decrease threshold appropriately even immediately after the start of focus.

本発明の一実施形態に係わるカメラの主として電気的構成を示すブロック図である。1 is a block diagram mainly showing an electrical configuration of a camera according to an embodiment of the present invention. 本発明の一実施形態に係わるカメラの減少閾値算出に関するブロック図である。It is a block diagram regarding the reduction | decrease threshold value calculation of the camera concerning one Embodiment of this invention. 本発明の一実施形態に係わるカメラのオートフォーカス(AF)の動作を示すフローチャートである。5 is a flowchart showing an auto focus (AF) operation of the camera according to the embodiment of the present invention. 本発明の一実施形態に係わるカメラの減少閾値算出の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the reduction | decrease threshold value calculation of the camera concerning one Embodiment of this invention. 本発明の一実施形態に係わるカメラの減少閾値算出の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the reduction | decrease threshold value calculation of the camera concerning one Embodiment of this invention. 従来および本発明の一実施形態に係るカメラにおいて、理想環境下での焦点評価値の変化を示すグラフである。6 is a graph showing a change in focus evaluation value under an ideal environment in a conventional camera and a camera according to an embodiment of the present invention. 従来および本発明の一実施形態に係るカメラにおいて、手ブレ発生時の焦点評価値の変化を示すグラフである。6 is a graph showing changes in focus evaluation values when camera shake occurs in a conventional camera and a camera according to an embodiment of the present invention.

以下、図面に従って本発明を適用したカメラを用いて好ましい実施形態について説明する。本発明の好ましい一実施形態に係るカメラは、デジタルカメラであり、光学系による光学像を撮像素子に結像させて、光学像に基づく画像信号を生成する撮像部を有する撮像装置であって、光学系を移動しながら繰り返し撮像を行って画像信号を取得し、この画像信号に基づいて焦点調節を行う。すなわち、撮像部(後述する撮像素子2等が相当する)を有し、この撮像部によって被写体像を画像信号に変換する。また光学系を無限から至近側または至近から無限側に移動しながら、撮像部から画像信号を取得し、この画像信号に基づいて、山登りAF(コントラストAF)方式によって光学系の焦点調節を行う。   A preferred embodiment will be described below using a camera to which the present invention is applied according to the drawings. The camera according to a preferred embodiment of the present invention is a digital camera, and is an imaging device having an imaging unit that forms an optical image by an optical system on an imaging device and generates an image signal based on the optical image, Imaging is repeated while moving the optical system to acquire an image signal, and focus adjustment is performed based on the image signal. That is, it has an imaging unit (corresponding to an imaging element 2 and the like described later), and the imaging unit converts the subject image into an image signal. Further, while moving the optical system from infinity to the near side or from the close to the infinity side, an image signal is acquired from the imaging unit, and based on this image signal, focus adjustment of the optical system is performed by a hill-climbing AF (contrast AF) method.

また、山登りAFにおけるピーク判定用の減少閾値は、焦点評価値最大値判断方向と、低域フィルタと高域フィルタ(図2の20、21参照)のそれぞれの基準焦点評価値(図3のS13参照)と、次フレームのレンズ位置の焦点評価値(図3のS17参照)の増減方向と増減率(図2の22、24、図4のS41、S51参照)、および焦点評価値最大値判断方向と低域フィルタと高域フィルタのそれぞれの基準焦点評価値から一定期間の焦点評価値の連続性(図2の23、25、図5のS61、S71)に基づいて設定する。   Further, the decrease threshold for peak determination in hill-climbing AF includes the focus evaluation value maximum value determination direction, and the reference focus evaluation values (S13 in FIG. 3) of the low-pass filter and the high-pass filter (see 20, 21 in FIG. 2). Reference), the increase / decrease direction and increase / decrease rate of the focus evaluation value (see S17 in FIG. 3) of the lens position of the next frame (see 22, 24 in FIG. 2, S41, S51 in FIG. 4), and the maximum focus evaluation value determination The direction is set based on the continuity of the focus evaluation values for a certain period (23 and 25 in FIG. 2, S61 and S71 in FIG. 5) from the reference focus evaluation values of the low pass filter and the high pass filter.

図1は、本発明の一実施形態に係わるカメラの主として電気的構成を示すブロック図である。このカメラは、光学系1、撮像素子2、AGC/CDS3、A/D4、信号処理部5、レンズ制御部6、撮像制御部7、AE処理部8、画像処理部9、CPU10、焦点評価値生成部11、バス12等から構成される。   FIG. 1 is a block diagram mainly showing an electrical configuration of a camera according to an embodiment of the present invention. This camera includes an optical system 1, an image sensor 2, AGC / CDS3, A / D4, a signal processing unit 5, a lens control unit 6, an imaging control unit 7, an AE processing unit 8, an image processing unit 9, a CPU 10, and a focus evaluation value. It comprises a generation unit 11, a bus 12, and the like.

光学系1は、被写体像を形成するための複数の光学レンズから構成され、単焦点レンズまたはズームレンズである。光学系1は、レンズ制御部6に接続され、レンズ制御部6は、バス12を介して入力するCPU10からの制御信号に従って、光学系1のフォーカスレンズを光軸方向に駆動する。   The optical system 1 is composed of a plurality of optical lenses for forming a subject image, and is a single focus lens or a zoom lens. The optical system 1 is connected to the lens control unit 6, and the lens control unit 6 drives the focus lens of the optical system 1 in the optical axis direction in accordance with a control signal from the CPU 10 input via the bus 12.

光学系1の光軸上であって、被写体像が形成される位置に、撮像素子2が配置されている。撮像素子2は、光学系1によって形成された被写体像の撮像を行う。この撮像素子2は、各画素を構成するフォトダイオードが二次元的にマトリックス状に配置されており、各フォトダイオードは受光量に応じた光電変換電流を発生し、この光電変換電流は各フォトダイオードに接続するキャパシタによって電荷蓄積される。   The image sensor 2 is disposed on the optical axis of the optical system 1 at a position where a subject image is formed. The image sensor 2 captures a subject image formed by the optical system 1. In this imaging device 2, photodiodes constituting each pixel are two-dimensionally arranged in a matrix, and each photodiode generates a photoelectric conversion current corresponding to the amount of received light. Charges are accumulated by a capacitor connected to.

撮像素子2は、撮像制御部7に接続されており、この撮像制御部7は、バス12を介して入力するCPU10からの制御信号に従って、撮像素子2の電荷蓄積制御や画像信号の読み出し制御等を行う。撮像制御部7は、撮像素子2から画像信号を繰り返し出力させ、この出力した画像信号(画像データとも称する)は、AGC/CDS3に出力する。   The image pickup device 2 is connected to the image pickup control unit 7, and the image pickup control unit 7 performs charge accumulation control of the image pickup device 2, image signal readout control, and the like in accordance with a control signal from the CPU 10 input via the bus 12. I do. The imaging control unit 7 repeatedly outputs an image signal from the imaging element 2 and outputs the output image signal (also referred to as image data) to the AGC / CDS 3.

AGC/CDS3は、画像信号の前処理を行う回路であり、画像信号の増幅処理(自動ゲイン制御(Auto gain control))や、アンプ雑音やリセット雑音を除去するための相関二重サンプリング(Correlated Double Sampling)等の処理を行う。   The AGC / CDS3 is a circuit that performs preprocessing of an image signal. The image signal amplification processing (auto gain control) and correlated double sampling for removing amplifier noise and reset noise (Correlated Double sampling). Sampling) and the like.

AGC/CDS3によって前処理された画像信号は、A/D4に出力する。A/D4は、アナログデジタル変換器であり、画像信号をデジタルデータに変換し、信号処理部5に出力する。信号処理部5は、デジタルデータに変換された画像信号のデジタル処理を行い、バス12に出力する。   The image signal preprocessed by the AGC / CDS 3 is output to the A / D 4. A / D 4 is an analog-digital converter that converts an image signal into digital data and outputs the digital data to the signal processing unit 5. The signal processing unit 5 performs digital processing of the image signal converted into digital data, and outputs it to the bus 12.

AE処理部8は、バス12に出力された画像信号を入力し、被写体輝度に応じた被写体輝度情報を算出する。輝度情報の算出にあたっては、平均測光、中央重点測光、スポット測光、顔部のスポット測光等、CPU10からの指示に従って行う。この算出された輝度情報は、バス12を介してCPU10に出力する。CPU10は、この輝度情報等に基づいて、シャッタ速度、絞り値、ISO感度等の露出制御値を演算し、ライブビュー表示用に露出制御を行い、またレリーズ釦が全押しされた際には、シャッタや絞り(不図示)の制御を行う。   The AE processing unit 8 inputs the image signal output to the bus 12 and calculates subject luminance information corresponding to the subject luminance. The luminance information is calculated in accordance with instructions from the CPU 10 such as average photometry, center-weighted photometry, spot photometry, and face spot photometry. The calculated luminance information is output to the CPU 10 via the bus 12. The CPU 10 calculates exposure control values such as a shutter speed, an aperture value, and ISO sensitivity based on the luminance information, etc., performs exposure control for live view display, and when the release button is fully pressed, Control of the shutter and aperture (not shown) is performed.

画像処理部9は、信号処理部5によって処理された画像信号をバス12を介して入力し、画像処理を施し、この画像処理を施した画像信号をバス12に出力する。画像処理として、ノイズリダクション処理、ホワイトバランス補正、同時化処理、色変換、階調変換(ガンマ変換)、エッジ強調、YC変換を行う。また、YC変換された画像データの圧縮処理や、圧縮された画像データの伸張処理も行う。   The image processing unit 9 inputs the image signal processed by the signal processing unit 5 via the bus 12, performs image processing, and outputs the image signal subjected to the image processing to the bus 12. As image processing, noise reduction processing, white balance correction, synchronization processing, color conversion, gradation conversion (gamma conversion), edge enhancement, and YC conversion are performed. Also, compression processing of YC converted image data and decompression processing of compressed image data are performed.

焦点評価値生成部11は、信号処理部5によって処理された画像信号をバス12を介して入力し、画像信号の低周波成分および高周波成分の焦点評価値を生成し、CPU10内の合焦判定部10aに出力する。すなわち、焦点評価値生成部11は、画像信号の高周波成分を通過させる高域フィルタ部と、この高域フィルタ部よりも画像信号のより低周波成分を通過させる低域フィルタ部を有し、低域フィルタ部の出力に基づいて焦点評価値を算出し、また高域フィルタ部の出力に基づいて焦点評価値を算出する焦点評価値算出部としての機能を有する。   The focus evaluation value generation unit 11 inputs the image signal processed by the signal processing unit 5 via the bus 12, generates focus evaluation values of the low frequency component and the high frequency component of the image signal, and determines the focus in the CPU 10. To the unit 10a. That is, the focus evaluation value generation unit 11 includes a high-pass filter unit that passes a high-frequency component of the image signal, and a low-pass filter unit that passes a lower-frequency component of the image signal than the high-pass filter unit. The focus evaluation value is calculated based on the output of the high pass filter unit, and the focus evaluation value calculating unit calculates the focus evaluation value based on the output of the high pass filter unit.

バス12に接続されたCPU(Central Processing Unit)10は、フラッシュメモリ等の不揮発性メモリ(不図示)に記憶されたプログラムに従って、カメラ全体の制御を行う。   A CPU (Central Processing Unit) 10 connected to the bus 12 controls the entire camera according to a program stored in a non-volatile memory (not shown) such as a flash memory.

また、CPU10は合焦判定部10aを有し、この合焦判定部10aは焦点評価値生成部11によって算出された低域および高域の焦点評価値を入力し、焦点評価値が最大となるように光学系1のフォーカスレンズを駆動するためのレンズ駆動命令をレンズ制御部6に出力し、光学系1を光軸方向に移動させる。この合焦判定部10aは、焦点評価値が最大値から減少閾値以上、減少した場合に合焦と判断する。なお、合焦判定部10aは、ハードウエアで構成してもよいが、本実施形態においては、ソフトウエアによって実現される。   Further, the CPU 10 has a focus determination unit 10a. The focus determination unit 10a inputs the low-frequency and high-frequency focus evaluation values calculated by the focus evaluation value generation unit 11, and maximizes the focus evaluation value. Thus, a lens drive command for driving the focus lens of the optical system 1 is output to the lens control unit 6 to move the optical system 1 in the optical axis direction. The focus determination unit 10a determines that the focus is in focus when the focus evaluation value decreases from the maximum value by a decrease threshold or more. In addition, although the focus determination part 10a may be comprised with a hardware, in this embodiment, it is implement | achieved by software.

また、合焦判定部10aは、焦点調節動作を開始する位置にて取得した画像信号に基づいて算出される焦点評価値とその後に取得される画像信号に基づいて算出される焦点評価値との増減方向と増減率を検出する増減検出部として機能する(図2の低域評価値増減検出部22および高域評価値増減検出部24参照)。   Further, the focus determination unit 10a calculates a focus evaluation value calculated based on the image signal acquired at the position where the focus adjustment operation is started and a focus evaluation value calculated based on the image signal acquired thereafter. It functions as an increase / decrease detection unit that detects an increase / decrease direction and an increase / decrease rate (see the low-frequency evaluation value increase / decrease detection unit 22 and the high-frequency evaluation value increase / decrease detection unit 24 in FIG. 2).

また、焦点調節動作を開始する位置から所定の期間に取得される複数の画像信号に基づいて算出される複数の焦点評価値の連続性を検出する連続性検出部としても機能する(図2の低域評価値連続性検出部23および高域評価値連続性検出部25参照)。   Also, it functions as a continuity detection unit that detects the continuity of a plurality of focus evaluation values calculated based on a plurality of image signals acquired in a predetermined period from the position at which the focus adjustment operation is started (FIG. 2). Low frequency evaluation value continuity detection unit 23 and high frequency evaluation value continuity detection unit 25).

また、合焦判定部10aは、増減検出部により検出される増減方向と増減率と、上記連続性検出部により検出される連続性とに基づいて、上記焦点評価値のピークを判定する閾値を設定して焦点評価値のピークに基づく焦点調節動作を行う制御部としても機能する(図2の閾値演算部32、ピーク判定部33、図3のS29〜S35参照)。   Further, the focus determination unit 10a sets a threshold value for determining the peak of the focus evaluation value based on the increase / decrease direction and the increase / decrease rate detected by the increase / decrease detection unit and the continuity detected by the continuity detection unit. It also functions as a control unit that performs the focus adjustment operation based on the peak of the focus evaluation value that is set (see the threshold value calculation unit 32, the peak determination unit 33 in FIG. 2, and S29 to S35 in FIG. 3).

次に、合焦判定部10aにおける減少閾値算出制御について、図2に示すブロック図を用いて説明する。低域フィルタ評価値メモリ20は、焦点評価値生成部11の低域フィルタ部からの画像信号に基づいて算出された焦点評価値を一時記憶するためのメモリである。また、高域フィルタ評価値メモリ21は、焦点評価値生成部11の高域フィルタ部からの画像信号に基づいて算出された焦点評価値を一時記憶するためのメモリである。前述したように、撮像素子2から繰り返し、画像信号が出力される。焦点評価値生成部11は、1フレーム分の画像信号が出力されるたびに焦点評価値を算出し、この焦点評価値が算出されるたびに、この焦点評価値が評価値メモリ20、21に格納される。   Next, the decrease threshold value calculation control in the focus determination unit 10a will be described with reference to the block diagram shown in FIG. The low-pass filter evaluation value memory 20 is a memory for temporarily storing a focus evaluation value calculated based on an image signal from the low-pass filter unit of the focus evaluation value generation unit 11. The high pass filter evaluation value memory 21 is a memory for temporarily storing a focus evaluation value calculated based on an image signal from the high pass filter unit of the focus evaluation value generation unit 11. As described above, the image signal is repeatedly output from the image sensor 2. The focus evaluation value generation unit 11 calculates a focus evaluation value every time an image signal for one frame is output, and the focus evaluation value is stored in the evaluation value memories 20 and 21 each time the focus evaluation value is calculated. Stored.

低域評価値増減検出部22は、低域フィルタ評価値メモリ20に格納された評価値のうち、基準評価値と次フレームのレンズ位置の焦点評価値の増減方向と増減率を検出する。また、高域評価値増減検出部24は、高域フィルタ評価値メモリ21に格納された評価値のうち、基準評価値と次フレームのレンズ位置の焦点評価値の増減方向と増減率を検出する。増減方向は増加しているか又は減少しているかであり、増減率は基準評価値と次フレームのレンズ位置の焦点評価値の比率である。   The low-frequency evaluation value increase / decrease detection unit 22 detects the increase / decrease direction and increase / decrease rate of the reference evaluation value and the focus evaluation value at the lens position of the next frame among the evaluation values stored in the low-pass filter evaluation value memory 20. The high frequency evaluation value increase / decrease detection unit 24 detects the increase / decrease direction and rate of increase / decrease of the reference evaluation value and the focus evaluation value of the lens position of the next frame among the evaluation values stored in the high frequency filter evaluation value memory 21. . The increasing / decreasing direction is increasing or decreasing, and the increasing / decreasing rate is a ratio between the reference evaluation value and the focus evaluation value of the lens position of the next frame.

ここで、基準評価値は、レリーズ釦が操作される等により、AF動作を開始した時点での評価値であり、図6に示す例ではレンズ位置LA1における評価値HVR1、LVR1、図7に示す例ではレンズ位置LB1における評価値HV1、LV2をいう。また、次フレームのレンズ位置の焦点評価値は、基準評価値を算出した後であって、図6に示す例では、レンズ位置LA2における焦点評価値HVR2、LVR2、図7に示す例では、レンズ位置LB2における焦点評価値HV2、LV1である。   Here, the reference evaluation value is an evaluation value at the time when the AF operation is started by operating the release button or the like. In the example shown in FIG. 6, the evaluation values HVR1 and LVR1 at the lens position LA1 are shown in FIG. In the example, the evaluation values HV1 and LV2 at the lens position LB1 are referred to. Further, the focus evaluation value at the lens position of the next frame is after the reference evaluation value has been calculated. In the example shown in FIG. 6, the focus evaluation values HVR2 and LVR2 at the lens position LA2, and in the example shown in FIG. The focus evaluation values HV2 and LV1 at the position LB2.

低域評価値連続性検出部23は、低域フィルタ評価値メモリ20に格納された評価値のうち、基準評価値と所定期間の焦点評価値連続性を検出する。高域評価値連続性検出部25は、高域フィルタ評価値メモリ21に格納された評価値のうち、基準評価値と所定期間の焦点評価値連続性を検出する。前述したように、評価値メモリ20、21には、基準評価値算出以後の評価値が格納されている。そこで、連続性検出部23、25は、最新フレームの評価値と最新フレームの一つ前のフレームの評価値とを比較し、一定期間内で増加が連続している場合には連続性ありと判定し、途中で減少している場合には連続性なしと判定する。   The low-frequency evaluation value continuity detection unit 23 detects the reference evaluation value and the focus evaluation value continuity for a predetermined period among the evaluation values stored in the low-pass filter evaluation value memory 20. The high-frequency evaluation value continuity detection unit 25 detects the reference evaluation value and the focus evaluation value continuity for a predetermined period among the evaluation values stored in the high-frequency filter evaluation value memory 21. As described above, the evaluation value memories 20 and 21 store evaluation values after the calculation of the reference evaluation value. Therefore, the continuity detection units 23 and 25 compare the evaluation value of the latest frame with the evaluation value of the frame immediately before the latest frame, and if the increase is continuous within a certain period, there is continuity. It is determined, and if it decreases in the middle, it is determined that there is no continuity.

閾値係数A算出部26は、低域評価値増減検出部22で検出された増減方向と増減率に基づいて閾値係数Aを算出し、閾値演算部32に出力する。また閾値係数B算出部28は、高域評価値増減検出部24で検出された増減方向と増減率に基づいて閾値係数Bを算出し、閾値演算部32に出力する(図4のS43、S47、S53、S57参照)。閾値係数A、Bの算出は、数式に基づいて行ってもよいが、本実施形態においては、増減率に対応して閾値係数A、Bをテーブルに記憶しておき、対応する係数A、Bを読み出す。   The threshold coefficient A calculation unit 26 calculates the threshold coefficient A based on the increase / decrease direction and the increase / decrease rate detected by the low-frequency evaluation value increase / decrease detection unit 22 and outputs the threshold coefficient A to the threshold calculation unit 32. The threshold coefficient B calculation unit 28 calculates the threshold coefficient B based on the increase / decrease direction and the increase / decrease rate detected by the high-frequency evaluation value increase / decrease detection unit 24, and outputs the threshold coefficient B to the threshold calculation unit 32 (S43, S47 in FIG. 4). , S53, S57). The threshold coefficients A and B may be calculated based on mathematical formulas, but in the present embodiment, the threshold coefficients A and B are stored in a table corresponding to the increase / decrease rate, and the corresponding coefficients A and B are stored. Is read.

閾値係数C算出部27は、低域評価値連続性検出部23で検出された評価値連続性に基づいて閾値係数Cを算出し、閾値演算部32に出力する。閾値係数D算出部29は、高域評価値連続性検出部25で検出された評価値連続性に基づいて閾値係数Dを算出し、閾値演算部32に出力する(図5のS63、S67、S73、S77参照)。閾値係数C、Dの算出は、数式に基づいて行ってもよいが、本実施形態においては、評価値連続性に対応して閾値係数C、Dをテーブルに記憶しておき、対応する係数C、Dを読み出す。   The threshold coefficient C calculation unit 27 calculates a threshold coefficient C based on the evaluation value continuity detected by the low frequency evaluation value continuity detection unit 23 and outputs the threshold coefficient C to the threshold calculation unit 32. The threshold coefficient D calculation unit 29 calculates the threshold coefficient D based on the evaluation value continuity detected by the high frequency evaluation value continuity detection unit 25, and outputs the threshold coefficient D to the threshold value calculation unit 32 (S63, S67 in FIG. 5). (See S73, S77). The threshold coefficients C and D may be calculated based on mathematical formulas. In the present embodiment, the threshold coefficients C and D are stored in a table corresponding to the evaluation value continuity, and the corresponding coefficient C is calculated. , D are read out.

最大値判定部30は、高域評価値メモリ21に格納された複数の焦点評価値の中で最大値を判定する。基準閾値テーブル31には焦点評価値に応じて基準減少閾値がテーブルとして記憶されている。基準閾値テーブル31は、最大値判定部30によって判定された最大の焦点評価値に対応した基準減少閾値を閾値演算部32に出力する。   The maximum value determination unit 30 determines the maximum value among the plurality of focus evaluation values stored in the high frequency evaluation value memory 21. The reference threshold value table 31 stores a reference decrease threshold value as a table according to the focus evaluation value. The reference threshold value table 31 outputs a reference decrease threshold value corresponding to the maximum focus evaluation value determined by the maximum value determination unit 30 to the threshold value calculation unit 32.

閾値演算部32は、閾値係数A算出部26、閾値係数C算出部27、閾値係数B算出部28、および閾値係数D算出部29によって算出された閾値係数A〜D、および基準閾値テーブル31から出力された基準減少閾値とに基づいて、最終減少閾値を算出し、ピーク判定部33に出力する。   The threshold value calculation unit 32 is based on the threshold coefficient A to D calculated by the threshold coefficient A calculation unit 26, the threshold coefficient C calculation unit 27, the threshold coefficient B calculation unit 28, and the threshold coefficient D calculation unit 29, and the reference threshold value table 31. Based on the output reference decrease threshold, a final decrease threshold is calculated and output to the peak determination unit 33.

ピーク判定部33は、高域フィルタ評価値メモリ21から出力された焦点評価値の中の最大値が、閾値演算部32によって算出された最終減少閾値以上に減少したか否かを判定する。最終減少閾値以上に減少すると、そのときの最大値に対応するレンズ位置が合焦点となる。   The peak determination unit 33 determines whether or not the maximum value among the focus evaluation values output from the high-pass filter evaluation value memory 21 has decreased more than the final decrease threshold calculated by the threshold calculation unit 32. When it decreases to a value equal to or greater than the final decrease threshold, the lens position corresponding to the maximum value at that time becomes the focal point.

このように本実施形態における合焦判定部10aでは、低域評価値増減検出部22は、低域フィルタ部の出力に基づいて焦点評価値の増減方向と増減率を検出し、低域評価値連続性検出部23は、低域フィルタ部の出力に基づいて焦点評価値の連続性を検出している。そして、閾値演算部32とピーク判定部33は、低域評価値増減検出部22により検出される増減方向と増減率と、低域評価値連続性検出部23により検出される連続性とに基づいて、高域フィルタ部の出力に基づく焦点評価値のピークを検出する閾値を設定し、該焦点評価値のピークに基づく焦点調節動作を行う制御部として機能する。   As described above, in the focus determination unit 10a in the present embodiment, the low-frequency evaluation value increase / decrease detection unit 22 detects the increase / decrease direction and the increase / decrease rate of the focus evaluation value based on the output of the low-frequency filter unit, and the low-frequency evaluation value The continuity detector 23 detects the continuity of the focus evaluation value based on the output of the low-pass filter unit. The threshold calculation unit 32 and the peak determination unit 33 are based on the increase / decrease direction and the increase / decrease rate detected by the low-frequency evaluation value increase / decrease detection unit 22 and the continuity detected by the low-frequency evaluation value continuity detection unit 23. Thus, the threshold value for detecting the peak of the focus evaluation value based on the output of the high-pass filter unit is set, and functions as a control unit that performs a focus adjustment operation based on the peak of the focus evaluation value.

また、本実施形態における合焦判定部10aでは、高域評価値増減検出部24は、高域フィルタ部の出力に基づいて焦点評価値の増減方向と増減率を検出し、高域評価値連続性検出部25は、高域フィルタ部の出力に基づいて焦点評価値の連続性を検出している。そして、閾値演算部32とピーク判定部33は、高域評価値増減検出部24により検出される増減方向と増減率と、高域評価値連続性検出部25により検出される連続性とに基づいて、高域フィルタ部の出力に基づく焦点評価値のピークを検出する閾値を設定し、該焦点評価値のピークに基づく焦点調節動作を行う制御部として機能する。   Moreover, in the focus determination part 10a in this embodiment, the high-pass evaluation value increase / decrease detection part 24 detects the increase / decrease direction and increase / decrease rate of a focus evaluation value based on the output of a high-pass filter part, and continues high pass evaluation value The sex detection unit 25 detects the continuity of the focus evaluation value based on the output of the high-pass filter unit. The threshold calculation unit 32 and the peak determination unit 33 are based on the increase / decrease direction and the increase / decrease rate detected by the high frequency evaluation value increase / decrease detection unit 24 and the continuity detected by the high frequency evaluation value continuity detection unit 25. Thus, the threshold value for detecting the peak of the focus evaluation value based on the output of the high-pass filter unit is set, and functions as a control unit that performs a focus adjustment operation based on the peak of the focus evaluation value.

また、閾値演算部32とピーク判定部33は、焦点評価値の最大値からの減少量を設定し、焦点評価値が最大値から該減少量を越えて減少する場合に最大値をピークと判定する制御部として機能する。すなわち、ピーク判定部33は、高域フィルタ評価値メモリ21に格納された焦点評価値が、閾値演算部32によって算出された最終減少閾値より小さくなると、そのときの焦点評価値をピークと判定する。   Further, the threshold value calculation unit 32 and the peak determination unit 33 set a reduction amount from the maximum value of the focus evaluation value, and determine that the maximum value is a peak when the focus evaluation value decreases from the maximum value beyond the reduction amount. Functions as a control unit. That is, when the focus evaluation value stored in the high-pass filter evaluation value memory 21 is smaller than the final decrease threshold calculated by the threshold calculation unit 32, the peak determination unit 33 determines that the focus evaluation value at that time is a peak. .

次に、本実施形態における山登りサーボ方式によるAFの動作について、図3ないし図5に示すフローチャートを用いて説明する。これらのフローチャートは、CPU10がメモリ(不図示)に記憶されたプログラムに従って実行する。   Next, the AF operation by the hill-climbing servo system in this embodiment will be described with reference to the flowcharts shown in FIGS. These flowcharts are executed by the CPU 10 according to a program stored in a memory (not shown).

図3に示すAF動作のフローに入ると、まず、前処理を行う(S11)。ここでは、AE処理部8からの輝度情報等に基づいて、AF用露出設定等の前処理を行う。   When the flow of AF operation shown in FIG. 3 is entered, first, pre-processing is performed (S11). Here, based on the luminance information from the AE processing unit 8 and the like, preprocessing such as AF exposure setting is performed.

前処理を行うと、次に、基準評価値取得を行う(S13)。ここでは、AF動作に入って最初の焦点評価値の取得を行う。具体的には、撮像素子2からの画像信号に基づいて、焦点評価値生成部11が高域フィルタ部と低域フィルタ部の出力に基づいて焦点評価値を算出し、これらの値を低域フィルタ評価値メモリ20と高域フィルタ評価値メモリ21(図2参照)に格納する。基準評価値は、図6に示す例ではレンズ位置LA1における焦点評価値に対応し、図7に示す例ではレンズ位置LB1における焦点評価値に対応する。   Once the preprocessing has been performed, next, a reference evaluation value is acquired (S13). Here, the first focus evaluation value is acquired after entering the AF operation. Specifically, based on the image signal from the image sensor 2, the focus evaluation value generation unit 11 calculates the focus evaluation value based on the outputs of the high-pass filter unit and the low-pass filter unit, and these values are set in the low-frequency range. They are stored in the filter evaluation value memory 20 and the high-pass filter evaluation value memory 21 (see FIG. 2). The reference evaluation value corresponds to the focus evaluation value at the lens position LA1 in the example shown in FIG. 6, and corresponds to the focus evaluation value at the lens position LB1 in the example shown in FIG.

基準評価値を取得すると、次に、レンズ駆動を開始する(S15)。ここでは、予め決めた方向、すなわち無限方向か至近方向に、レンズ制御部6が光学系1のフォーカスレンズを駆動する。   When the reference evaluation value is acquired, lens driving is then started (S15). Here, the lens control unit 6 drives the focus lens of the optical system 1 in a predetermined direction, that is, an infinite direction or a close direction.

レンズ駆動を開始すると、次に、評価値取得を行う(S17)。ここでは、撮像素子2から1フレーム分の画像信号が出力されるたびに、焦点評価値生成部11が焦点評価値を生成し、この値を評価値メモリ20、21に格納する。   Once the lens driving is started, an evaluation value is acquired (S17). Here, every time an image signal for one frame is output from the image sensor 2, the focus evaluation value generation unit 11 generates a focus evaluation value and stores this value in the evaluation value memories 20 and 21.

評価値を取得すると、次に、方向確定か否かを判定する(S19)。ここでは、低域フィルタ部の出力に基づいて演算された焦点評価値に基づいて方向確定かを判定する。例えば、基準評価値の取得時から所定回数の間、焦点評価値が連続的に増加または減少しているかを判定する。   Once the evaluation value is acquired, it is next determined whether or not the direction is fixed (S19). Here, it is determined whether the direction is determined based on the focus evaluation value calculated based on the output of the low-pass filter unit. For example, it is determined whether the focus evaluation value continuously increases or decreases for a predetermined number of times from the acquisition of the reference evaluation value.

ステップS19における判定の結果、方向が確定していない場合には、ステップS17に戻り、前述の動作を行う。一方、方向が確定した場合には、次に、方向が順方向か否かの判定を行う(S21)。ここでは、順方向は焦点評価値が増加する方向であり、一方、逆方向は焦点評価値が減少する方向である。   If the result of determination in step S19 is that the direction has not been finalized, processing returns to step S17 and the aforementioned operation is performed. On the other hand, if the direction is fixed, it is next determined whether or not the direction is forward (S21). Here, the forward direction is a direction in which the focus evaluation value increases, while the reverse direction is a direction in which the focus evaluation value decreases.

ステップS21における判定の結果、順方向であった場合には、レンズ駆動方向を変えることなくそのまま駆動する。一方、順方向でなかった場合には、駆動方向を反転する(S23)。逆方向に駆動しているために、焦点評価値のピークから離れている。そこで、光学系1のフォーカスレンズの駆動方向を反転させるように、レンズ制御部6に対して制御命令を出力する。   If the result of determination in step S21 is forward, the lens is driven as it is without changing the lens driving direction. On the other hand, if it is not the forward direction, the drive direction is reversed (S23). Since it is driven in the opposite direction, it is far from the peak of the focus evaluation value. Therefore, a control command is output to the lens control unit 6 so as to reverse the driving direction of the focus lens of the optical system 1.

ステップS21における判定の結果、順方向であった場合、またはステップS23において駆動方向を反転させると、次に、評価値を取得する(S25)。ここでは、ステップS17と同様に、撮像素子2から1フレーム分の画像信号が出力されるたびに、焦点評価値生成部11が焦点評価値を生成するので、この値を評価値メモリ20、21に格納する。   If the result of determination in step S21 is the forward direction, or if the drive direction is reversed in step S23, then an evaluation value is acquired (S25). Here, as in step S17, every time an image signal for one frame is output from the image sensor 2, the focus evaluation value generation unit 11 generates a focus evaluation value, and this value is used as the evaluation value memory 20, 21. To store.

ステップS25において、評価値を取得すると、次に、最大値が更新したか否かの判定を行う(S27)。ここでは、高域フィルタ評価値メモリ21に記憶された高域フィルタ部の出力に基づく焦点評価値において、最大値が更新されたか否かを判定する。ここでの処理は、図2の最大値判定部30における機能に対応する。   Once the evaluation value is acquired in step S25, it is next determined whether or not the maximum value has been updated (S27). Here, it is determined whether or not the maximum value is updated in the focus evaluation value based on the output of the high-pass filter unit stored in the high-pass filter evaluation value memory 21. The processing here corresponds to the function in the maximum value determination unit 30 in FIG.

ステップS27における判定の結果、最大値が更新された場合には、減少閾値を算出する(S29)。ここでは、減少閾値の算出にあたっては、基準評価値と、焦点評価値の大小関係と連続性に応じて算出する。具体的には、閾値係数A〜D(図2の26〜29参照)、およびステップS27で判定された最大値に対応した基準減少閾値(図2の基準閾値テーブル31参照)を用いて、ピーク判定用の減少閾値を算出する。この減少閾値算出の詳しい動作については、図4および図5を用いて後述する。   If the maximum value is updated as a result of the determination in step S27, a decrease threshold is calculated (S29). Here, the reduction threshold is calculated according to the reference evaluation value, the magnitude relationship between the focus evaluation values, and the continuity. Specifically, using the threshold coefficients A to D (see 26 to 29 in FIG. 2) and the reference decrease threshold (see the reference threshold table 31 in FIG. 2) corresponding to the maximum value determined in step S27, the peak is obtained. A reduction threshold value for determination is calculated. Detailed operation of the decrease threshold calculation will be described later with reference to FIGS. 4 and 5.

ステップS29において減少閾値算出を行うと、またはステップS27における判定の結果、最大値の更新がなされていない場合には、次に、ピーク検出を行う(S31)。ここでは、直近のステップS29における減少閾値を用いて、ピーク検出できたか否かを判定する。この判定の結果、ピークを検出することができない場合には、ステップS25に戻り、再度、評価値を取得し、前述の動作を実行する。   If the decrease threshold value is calculated in step S29, or if the maximum value has not been updated as a result of the determination in step S27, then peak detection is performed (S31). Here, it is determined whether or not the peak has been detected using the decrease threshold value in the latest step S29. If the peak cannot be detected as a result of this determination, the process returns to step S25, the evaluation value is acquired again, and the above-described operation is executed.

ステップS31における判定の結果、ピーク検出できた場合には、次に、合焦位置を演算する(S33)。ピーク検出できたことを判定できるのは、ピークを通り過ぎてから減少閾値分、移動してからである。そこで、このステップでは、ピーク位置に当たる合焦位置を、前後の3点から補間演算する等により算出する。   If the peak is detected as a result of the determination in step S31, then the in-focus position is calculated (S33). It is possible to determine that the peak has been detected after moving through the decrease threshold after passing the peak. Therefore, in this step, the in-focus position corresponding to the peak position is calculated by performing an interpolation calculation from the three points before and after.

合焦位置演算を行うと、次に、合焦位置に駆動する(S35)。ここでは、ステップS33において演算した合焦位置に移動するように、レンズ制御部6に対して制御命令を出力する。この合焦位置駆動を行うと、AF動作のフローを終了する。   Once the in-focus position has been calculated, it is next driven to the in-focus position (S35). Here, a control command is output to the lens controller 6 so as to move to the in-focus position calculated in step S33. When this focus position driving is performed, the flow of the AF operation is ended.

次に、ステップS29における減少閾値算出の動作について、図4および図5を用いて説明する。このフローは、順方向判断時(評価値最大値が現在レンズ駆動方向)における高域フィルタの減少閾値を算出する。   Next, the operation for calculating the decrease threshold in step S29 will be described with reference to FIGS. In this flow, the reduction threshold of the high-pass filter at the time of forward direction determination (maximum evaluation value is the current lens driving direction) is calculated.

減少閾値算出のフローに入ると、まず、低域フィルタ基準評価値が次フレーム評価値よりも小さいか否かを判定する(S41)。ここでは、低域フィルタ評価値メモリ20に格納されている基準評価値と、次フレーム評価値(複数、格納されている焦点評価値の中で直近で得られた値)を比較し、判定する。フォーカスレンズが順方向に駆動されている場合には、基準評価値が次フレームの評価値よりも小さくなる。   If the flow for calculating the decrease threshold value is entered, it is first determined whether or not the low-pass filter reference evaluation value is smaller than the next frame evaluation value (S41). Here, the reference evaluation value stored in the low-pass filter evaluation value memory 20 is compared with the next frame evaluation value (the value obtained most recently among the plurality of stored focus evaluation values) for determination. . When the focus lens is driven in the forward direction, the reference evaluation value is smaller than the evaluation value of the next frame.

ステップS41における判定の結果、低域フィルタ基準評価値が次フレーム評価値よりも小さい場合には、次に、閾値係数A1を算出する(S43)。ここでは、低域フィルタの評価値の増減率に応じて閾値係数A1が算出される。評価値の増減率は、低域評価値増減検出部22によって算出される。閾値係数A1を算出すると、次に、閾値Hを基準閾値×A1から算出する(S45)。基準閾値は、基準となる減少閾値が評価値の最大値に応じて基準閾値テーブル31に記憶されているので、読み出された基準減少閾値に、ステップS43において算出した閾値係数A1を乗算する。   If the result of determination in step S41 is that the low-pass filter reference evaluation value is smaller than the next frame evaluation value, then a threshold coefficient A1 is calculated (S43). Here, the threshold coefficient A1 is calculated according to the increase / decrease rate of the evaluation value of the low-pass filter. The increase / decrease rate of the evaluation value is calculated by the low-frequency evaluation value increase / decrease detection unit 22. Once the threshold coefficient A1 is calculated, the threshold H is then calculated from the reference threshold × A1 (S45). As the reference threshold value, the reference decrease threshold value is stored in the reference threshold value table 31 in accordance with the maximum value of the evaluation value. Therefore, the read reference decrease threshold value is multiplied by the threshold coefficient A1 calculated in step S43.

一方、ステップS41における判定の結果、低域フィルタ基準評価値が次フレーム評価値よりも大きい場合には、次に、閾値係数A2を算出する(S47)。ここでは、ステップS43と同様に、低域フィルタの評価値の増減率に応じて閾値係数A2が算出される。閾値係数A2を算出すると、次に、閾値Hを基準閾値×A2から算出する(S49)。基準閾値テーブル31に記憶されている基準減少閾値に、ステップS47において算出した閾値係数A2を乗算する。   On the other hand, if the result of determination in step S41 is that the low-pass filter reference evaluation value is greater than the next frame evaluation value, next, a threshold coefficient A2 is calculated (S47). Here, as in step S43, the threshold coefficient A2 is calculated according to the increase / decrease rate of the evaluation value of the low-pass filter. Once the threshold coefficient A2 is calculated, the threshold H is then calculated from the reference threshold × A2 (S49). The reference decrease threshold stored in the reference threshold table 31 is multiplied by the threshold coefficient A2 calculated in step S47.

なお、閾値係数A1は、閾値係数A2よりも小さな値とする。低域フィルタ基準評価値が次フレーム評価値よりも小さい場合は、順方向に駆動されていることから、順調にピークに向かってフォーカスレンズは駆動されているといえる。この場合には、ピークより少し減少した時点で、ピークと判定することが可能である。しかし、低域フィルタ基準評価値が次フレーム評価値よりも大きい場合は、外乱の影響を受け、不安定な駆動状態であり、順調にピークに向かって駆動されているとは言い難い。そこで、ピークを越えたと判定するためには、減少閾値を大きな値に設定する。   The threshold coefficient A1 is smaller than the threshold coefficient A2. When the low-pass filter reference evaluation value is smaller than the next frame evaluation value, the focus lens is driven smoothly toward the peak because it is driven in the forward direction. In this case, it is possible to determine a peak when it is slightly reduced from the peak. However, when the low-pass filter reference evaluation value is larger than the next frame evaluation value, it is affected by disturbance and is in an unstable driving state, and it is difficult to say that the driving is smoothly proceeding toward the peak. Therefore, in order to determine that the peak has been exceeded, the decrease threshold is set to a large value.

ステップS45またはS49において閾値Hを算出すると、次に、高域フィルタ基準評価値が次フレーム評価値よりも小さいか否かを判定する(S51)。ここでは、高域フィルタ評価値メモリ21に格納されている基準評価値と、次フレーム評価値(複数、格納されている焦点評価値の中で直近で得られた値)を比較し、判定する。フォーカスレンズが順方向に駆動されている場合には、高域フィルタ部からの出力に基づく焦点評価値においても、低域フィルタの場合と同様、基準評価値が次フレームの評価値よりも小さくなる。   If the threshold value H is calculated in step S45 or S49, it is next determined whether or not the high-pass filter reference evaluation value is smaller than the next frame evaluation value (S51). Here, the reference evaluation value stored in the high-pass filter evaluation value memory 21 is compared with the next frame evaluation value (a plurality of values obtained most recently among the stored focus evaluation values) for determination. . When the focus lens is driven in the forward direction, the reference evaluation value is smaller than the evaluation value of the next frame in the focus evaluation value based on the output from the high-pass filter unit as in the case of the low-pass filter. .

ステップS51における判定の結果、高域フィルタ基準評価値が次フレーム評価値よりも小さい場合には、次に、閾値係数B1を算出する(S53)。ここでは、高域フィルタの評価値の増減率に応じて閾値係数B1が算出される。評価値の増減率は、高域評価値増減検出部24によって算出される。閾値係数B1を算出すると、次に、閾値Iを閾値H×B1から算出する(S55)。ここでは、ステップS45またはS49で算出した閾値Hに、ステップS53において算出した閾値係数B1を乗算する。   If the result of determination in step S51 is that the high-pass filter reference evaluation value is smaller than the next frame evaluation value, then a threshold coefficient B1 is calculated (S53). Here, the threshold coefficient B1 is calculated according to the increase / decrease rate of the evaluation value of the high-pass filter. The increase / decrease rate of the evaluation value is calculated by the high frequency evaluation value increase / decrease detection unit 24. Once the threshold coefficient B1 has been calculated, the threshold I is then calculated from the threshold H × B1 (S55). Here, the threshold value H calculated in step S45 or S49 is multiplied by the threshold coefficient B1 calculated in step S53.

一方、ステップS51における判定の結果、高域フィルタ基準評価値が次フレーム評価値よりも大きい場合には、次に、閾値係数B2を算出する(S57)。ここでは、ステップS53と同様に、高域フィルタの評価値の増減率に応じて閾値係数B2が算出される。閾値係数B2を算出すると、次に、閾値Iを閾値I×B2から算出する(S59)。ここでは、ステップS45またはS49で算出した閾値Hに、ステップS57において算出した閾値係数B2を乗算する。   On the other hand, if the result of determination in step S51 is that the high-pass filter reference evaluation value is greater than the next frame evaluation value, then a threshold coefficient B2 is calculated (S57). Here, as in step S53, the threshold coefficient B2 is calculated according to the increase / decrease rate of the evaluation value of the high-pass filter. Once the threshold coefficient B2 is calculated, the threshold I is then calculated from the threshold I × B2 (S59). Here, the threshold value H calculated in step S45 or S49 is multiplied by the threshold coefficient B2 calculated in step S57.

なお、閾値係数B1は、閾値係数B2よりも小さな値とする。高域フィルタの評価値の場合も低域フィルタの評価値の場合と同様に、高域フィルタの基準評価値が次フレーム評価値よりも大きい場合は、不安定な駆動状態であり、順調にピークに向かって駆動されているとは言い難い。そこで、ピークを越えたと判定するためには、減少閾値を大きな値に設定する。   Note that the threshold coefficient B1 is smaller than the threshold coefficient B2. In the case of the evaluation value of the high-pass filter, as in the case of the evaluation value of the low-pass filter, if the reference evaluation value of the high-pass filter is larger than the evaluation value of the next frame, the drive state is unstable and the peak is steadily It is hard to say that it is driven towards. Therefore, in order to determine that the peak has been exceeded, the decrease threshold is set to a large value.

ステップS55またはS59において閾値Iを算出すると、次に、低域フィルタ評価値が連続増加であるか否かを判定する(S61)。ここでは、低域フィルタ基準焦点評価値から所定期間の間、焦点評価値の連続性、例えば、順方向に駆動中には最大値までの連続性を確認する。評価値の連続性は、低域評価値連続性検出部23(図2参照)によって検出される。図6に示す例では、基準評価値であるレンズ位置LA1における焦点評価値LVR1から、最大値であるレンズ位置LA5における焦点評価値LVR5まで、一度も焦点評価値が低下することなく連続的に増加しており、このような場合には連続増加であると判定される。一方、図7に示す例では、基準評価値であるレンズ位置LB1における焦点評価値LV2から、最大値であるレンズ位置LB6における焦点評価値LV5までの間で、焦点評価値が低下することがあり(LB1とLB2の間、LB3とLB4の間)、このような場合には連続増加でないと判定される。   Once the threshold value I is calculated in step S55 or S59, it is next determined whether or not the low-pass filter evaluation value is continuously increased (S61). Here, the continuity of the focus evaluation value, for example, the continuity up to the maximum value during driving in the forward direction is confirmed for a predetermined period from the low-pass filter reference focus evaluation value. The continuity of the evaluation value is detected by the low-frequency evaluation value continuity detection unit 23 (see FIG. 2). In the example shown in FIG. 6, the focus evaluation value continuously increases from the focus evaluation value LVR1 at the lens position LA1 that is the reference evaluation value to the focus evaluation value LVR5 at the lens position LA5 that is the maximum value without decreasing the focus evaluation value. In such a case, it is determined that there is a continuous increase. On the other hand, in the example shown in FIG. 7, the focus evaluation value may decrease between the focus evaluation value LV2 at the lens position LB1 that is the reference evaluation value and the focus evaluation value LV5 at the lens position LB6 that is the maximum value. (Between LB1 and LB2, and between LB3 and LB4) In such a case, it is determined that there is no continuous increase.

ステップS61における判定の結果、低域フィルタ評価値が連続増加であった場合には、閾値係数C1を算出する(S63)。ここでは、低域フィルタの評価値の増加率に応じて閾値係数C1が算出される。閾値係数C1を算出すると、次に、閾値Jを閾値I×C1から算出する(S45)。閾値Iは、ステップS55またはS59において算出されており、この閾値IにステップS63において算出した閾値係数C1を乗算する。   If the result of determination in step S61 is that the low-pass filter evaluation value has increased continuously, a threshold coefficient C1 is calculated (S63). Here, the threshold coefficient C1 is calculated according to the increase rate of the evaluation value of the low-pass filter. Once the threshold coefficient C1 is calculated, the threshold J is then calculated from the threshold I × C1 (S45). The threshold value I is calculated in step S55 or S59, and this threshold value I is multiplied by the threshold coefficient C1 calculated in step S63.

一方、ステップS61における判定の結果、低域フィルタ評価値が連続増加でなかった場合には、閾値係数C2を算出する(S67)。この場合は、基準評価値から最大値まで評価値が連続して増加していない場合である。このステップでは、低域フィルタの評価値減少回数と減少率から閾値C2が算出される。閾値係数C2を算出すると、次に、閾値Jを閾値I×C2から算出する(S69)。ここでは、ステップS55またはS59で算出した閾値Iに、ステップS67において算出した閾値係数C2を乗算する。   On the other hand, if the result of determination in step S61 is that the low-pass filter evaluation value has not increased continuously, a threshold coefficient C2 is calculated (S67). In this case, the evaluation value does not continuously increase from the reference evaluation value to the maximum value. In this step, the threshold value C2 is calculated from the number of evaluation value reductions and the reduction rate of the low-pass filter. Once the threshold coefficient C2 is calculated, the threshold J is then calculated from the threshold I × C2 (S69). Here, the threshold value I calculated in step S55 or S59 is multiplied by the threshold coefficient C2 calculated in step S67.

なお、閾値係数A1、A2、B1、B2の場合と同様、閾値係数C1は、閾値係数C2よりも小さな値とする。低域フィルタ評価値が連続増加している場合には、順調にピークに向かってフォーカスレンズは駆動されているといえる。この場合には、ピークより少し減少した時点で、ピークと判定することが可能である。しかし、低域フィルタ評価値が連続増加していない場合は、不安定な状態であり、順調にピークに向かって駆動されているとは言い難い。そこで、ピークを越えたと判定するためには、減少閾値を大きな値に設定する。   As in the case of the threshold coefficients A1, A2, B1, and B2, the threshold coefficient C1 is smaller than the threshold coefficient C2. When the low-pass filter evaluation value continuously increases, it can be said that the focus lens is being driven smoothly toward the peak. In this case, it is possible to determine a peak when it is slightly reduced from the peak. However, when the low-pass filter evaluation value does not continuously increase, it is in an unstable state, and it is difficult to say that the low-pass filter evaluation value is being smoothly driven toward the peak. Therefore, in order to determine that the peak has been exceeded, the decrease threshold is set to a large value.

ステップS65またはS69において閾値Jを算出すると、次に、高域フィルタ評価値が連続増加であるか否かを判定する(S71)。ここでは、高域フィルタ基準焦点評価値から所定期間の間、焦点評価値の連続性、例えば、順方向に駆動中には最大値までの連続性を確認する。評価値の連続性は、高域評価値連続性検出部25(図2参照)によって検出される。図6に示す例では、基準評価値であるレンズ位置LA1における焦点評価値HVR1から、最大値であるレンズ位置LA5における焦点評価値HVR5まで、一度も焦点評価値が低下することなく連続的に増加しており、このような場合には連続増加であると判定される。一方、図7に示す例では、基準評価値であるレンズ位置LB1における焦点評価値HV1から、最大値であるレンズ位置LB6における焦点評価値HV6までの間で、焦点評価値が低下することがあり(LB3とLB4の間)、このような場合には連続増加でないと判定される。   Once the threshold value J is calculated in step S65 or S69, it is next determined whether or not the high-pass filter evaluation value is a continuous increase (S71). Here, the continuity of the focus evaluation value for a predetermined period from the high-pass filter reference focus evaluation value, for example, the continuity up to the maximum value during driving in the forward direction is confirmed. The continuity of the evaluation value is detected by the high frequency evaluation value continuity detection unit 25 (see FIG. 2). In the example shown in FIG. 6, the focus evaluation value continuously increases from the focus evaluation value HVR1 at the lens position LA1 that is the reference evaluation value to the focus evaluation value HVR5 at the lens position LA5 that is the maximum value without decreasing the focus evaluation value. In such a case, it is determined that there is a continuous increase. On the other hand, in the example shown in FIG. 7, the focus evaluation value may decrease between the focus evaluation value HV1 at the lens position LB1 that is the reference evaluation value and the focus evaluation value HV6 at the lens position LB6 that is the maximum value. (Between LB3 and LB4), in such a case, it is determined that there is no continuous increase.

ステップS71における判定の結果、高域フィルタ評価値が連続増加であった場合には、閾値係数D1を算出する(S73)。ここでは、高域フィルタの評価値の増加率に応じて閾値係数D1が算出される。閾値係数D1を算出すると、次に、閾値Kを閾値J×D1から算出する(S75)。閾値Jは、ステップS65またはS69において算出されており、この閾値JにステップS73において算出した閾値係数D1を乗算する。   If the result of determination in step S71 is that the high-pass filter evaluation value has increased continuously, a threshold coefficient D1 is calculated (S73). Here, the threshold coefficient D1 is calculated according to the increase rate of the evaluation value of the high-pass filter. Once the threshold coefficient D1 is calculated, the threshold K is then calculated from the threshold J × D1 (S75). The threshold value J is calculated in step S65 or S69, and this threshold value J is multiplied by the threshold coefficient D1 calculated in step S73.

一方、ステップS71における判定の結果、高域フィルタ評価値が連続増加でなかった場合には、閾値係数D2を算出する(S77)。この場合は、基準評価値から最大値まで評価値が連続して増加していない場合である。このステップでは、高域フィルタの評価値減少回数と減少率から閾値D2が算出される。閾値係数D2を算出すると、次に、閾値Kを閾値J×D2から算出する(S79)。ここでは、ステップS65またはS69で算出した閾値Jに、ステップS77において算出した閾値係数D2を乗算する。   On the other hand, if the result of determination in step S71 is that the high-pass filter evaluation value has not increased continuously, a threshold coefficient D2 is calculated (S77). In this case, the evaluation value does not continuously increase from the reference evaluation value to the maximum value. In this step, the threshold value D2 is calculated from the number of evaluation value reductions and the reduction rate of the high-pass filter. Once the threshold coefficient D2 has been calculated, the threshold value K is then calculated from the threshold value J × D2 (S79). Here, the threshold value J calculated in step S65 or S69 is multiplied by the threshold coefficient D2 calculated in step S77.

なお、閾値係数D1は、閾値係数D2よりも小さな値とする。高域フィルタ評価値の場合も低域フィルタ評価値の場合と同様に、高域フィルタ評価値が連続増加していない場合は、不安定な駆動状態であり、順調にピークに向かって駆動されているとは言い難い。そこで、ピークを越えたと判定するためには、減少閾値D2を大きな値に設定する。   Note that the threshold coefficient D1 is smaller than the threshold coefficient D2. In the case of the high-pass filter evaluation value, as in the case of the low-pass filter evaluation value, when the high-pass filter evaluation value does not continuously increase, the drive state is unstable and the drive is smoothly performed toward the peak. It ’s hard to say. Therefore, in order to determine that the peak has been exceeded, the decrease threshold D2 is set to a large value.

ステップS75またはS79において閾値Kを算出すると、閾値Kを確定する(S81)。ここでは、ステップS75またはS79で算出された閾値Kを確定する。閾値Kを確定すると、元のフローに戻る。元のフローに戻ると前述したように、ステップS31(図3)において、ピーク検出を行うが、この際、ステップS81において確定した閾値Kを用いてピーク検出する。この確定した閾値Kは、図6の減少閾値ThA、図7の減少閾値ThBとして用いられる。   When the threshold value K is calculated in step S75 or S79, the threshold value K is determined (S81). Here, the threshold value K calculated in step S75 or S79 is determined. When the threshold value K is determined, the process returns to the original flow. When returning to the original flow, as described above, peak detection is performed in step S31 (FIG. 3). At this time, peak detection is performed using the threshold value K determined in step S81. The determined threshold value K is used as the decrease threshold value ThA in FIG. 6 and the decrease threshold value ThB in FIG.

次に、図4および図5のフローにおける動作について、図7に示すような手ブレ等による外乱が発生する場合について説明する。図3のステップS17において、低域および高域フィルタの基準評価値が取得され、更に図3のステップS25において、1フレーム分の画像信号が出力されるたびに、低域および高域フィルタの評価値が取得される。   Next, the operation in the flow of FIGS. 4 and 5 will be described in the case where disturbance due to camera shake or the like as shown in FIG. 7 occurs. In step S17 of FIG. 3, the reference evaluation values of the low-pass and high-pass filters are acquired. Further, in step S25 of FIG. 3, the evaluation of the low-pass and high-pass filters is performed each time an image signal for one frame is output. The value is obtained.

今、図4に示す減少閾値算出のフローに入ると、まず、低域フィルタ基準評価値が次フレーム評価値より小さいか否かを判定する(S41)。図7に示す例では、低域フィルタ基準評価値LV2はレンズ位置LB2における低域フィルタ評価値LV1よりも大きいことから、判定の結果、ステップS47、S49に進み、閾値H=基準閾値×A2を算出する。   If the flow for calculating the reduction threshold shown in FIG. 4 is entered, it is first determined whether or not the low-pass filter reference evaluation value is smaller than the next frame evaluation value (S41). In the example shown in FIG. 7, since the low-pass filter reference evaluation value LV2 is larger than the low-pass filter evaluation value LV1 at the lens position LB2, the process proceeds to Steps S47 and S49 as a result of determination, and threshold H = reference threshold × A2 is set. calculate.

続いて、ステップS51における判定では、高域フィルタ基準評価値HV1は、レンズ位置LB2における高域フィルタ評価値HV2より小さいことから、ステップS53、S55に進み、閾値I=閾値H×B1を算出する。   Subsequently, in the determination in step S51, since the high-pass filter reference evaluation value HV1 is smaller than the high-pass filter evaluation value HV2 at the lens position LB2, the process proceeds to steps S53 and S55, and threshold I = threshold H × B1 is calculated. .

続いて、ステップS61における判定では、低域フィルタ評価値は、基準評価値から次の評価値(レンズ位置LB2における評価値LV1)までで減少しており、かつ、その後、最大値までに評価値が減少している箇所がある(レンズ位置LB4における評価値LV2)ために、ステップS67、S69に進み、閾値J=閾値I×C2を算出する。   Subsequently, in the determination in step S61, the low-pass filter evaluation value decreases from the reference evaluation value to the next evaluation value (evaluation value LV1 at the lens position LB2), and then reaches the maximum value. Since there is a part where the value decreases (evaluation value LV2 at the lens position LB4), the process proceeds to steps S67 and S69, and threshold value J = threshold value I × C2 is calculated.

続いて、ステップS71における判定では、高域フィルタ評価値は、基準評価値から次の評価値(レンズ位置LB2における評価値HV2)では増加しているが、その後、最大値までに評価値が減少している箇所がある(レンズ位置LB4における評価値HV3)ために、ステップS77、S79に進み、閾値K=閾値J×D2を算出する。   Subsequently, in the determination in step S71, the high-pass filter evaluation value increases from the reference evaluation value to the next evaluation value (evaluation value HV2 at the lens position LB2), but thereafter the evaluation value decreases to the maximum value. Since there is a spot (evaluation value HV3 at the lens position LB4), the process proceeds to steps S77 and S79, and threshold value K = threshold value J × D2 is calculated.

図7に示す例では、最終的な閾値K(減少閾値ThBに相当)は、閾値K=基準閾値×A2×B1×C2×D2となる。詳しく説明しないが、図6に示す例では、評価値が単調に増加していることから、閾値K=基準閾値×A1×B1×C1×D1となる。前述したように、A1<A2、B1<B2、C1<C2、D1<D2の関係があることから、閾値Kは、図7に示した例の方が、図6に示した例の場合よりも大きい値となる。この結果、図6に示した例では、ピークを過ぎて僅かに低下した時点で、ピークと判定されるのに対して、図7に示した例では、ピークを過ぎて図6に比較し大きく低下した時点でピークと判定される。   In the example illustrated in FIG. 7, the final threshold value K (corresponding to the decrease threshold value ThB) is threshold value K = reference threshold value × A2 × B1 × C2 × D2. Although not described in detail, in the example shown in FIG. 6, since the evaluation value monotonously increases, threshold value K = reference threshold value × A1 × B1 × C1 × D1. As described above, since there is a relationship of A1 <A2, B1 <B2, C1 <C2, and D1 <D2, the threshold value K is greater in the example shown in FIG. 7 than in the example shown in FIG. Is also a large value. As a result, in the example shown in FIG. 6, it is determined that the peak is slightly lowered after passing the peak, whereas in the example shown in FIG. It is determined that the peak is reached when the voltage drops.

このように、山登りAFを開始した直後であっても、焦点評価値の変化から撮影環境を判定し、撮影環境に応じた閾値を設定している。このため、ピークを通り過ぎた後のオーバラン量を最適化することができる。   As described above, even immediately after the hill-climbing AF is started, the shooting environment is determined from the change in the focus evaluation value, and the threshold corresponding to the shooting environment is set. For this reason, the amount of overrun after passing the peak can be optimized.

以上説明したように、本発明の一実施形態においては、画像信号の高周波成分を通過させる高域フィルタ部と、高域フィルタ部よりも画像信号のより低周波成分を通過させる低域フィルタ部と、低域フィルタ部または高域フィルタ部の出力に基づいて、焦点評価値を算出する焦点評価値算出部とを設け、画像信号の低周波成分と高周波成分の2種類の焦点評価値を用いて、ピーク判定を行うための閾値を設定している。低周波成分と高周波成分では、焦点評価値の変化が異なるため、2種類の焦点評価値を組み合わせて判定することにより、焦点調節動作の開始時であっても、合焦点の検出を迅速かつ安定性の高い焦点調節を行うことが可能となる。   As described above, in one embodiment of the present invention, a high-pass filter unit that passes a high-frequency component of an image signal, and a low-pass filter unit that passes a lower-frequency component of an image signal than a high-pass filter unit, A focus evaluation value calculation unit for calculating a focus evaluation value based on the output of the low-pass filter unit or the high-pass filter unit, and using two types of focus evaluation values of a low-frequency component and a high-frequency component of the image signal A threshold for performing peak determination is set. Since the change in focus evaluation value differs between the low-frequency component and the high-frequency component, it is possible to quickly and stably detect the in-focus point even at the start of the focus adjustment operation by determining by combining the two types of focus evaluation values. It becomes possible to perform highly accurate focus adjustment.

また、本発明の一実施形態においては、焦点調節動作を開始する位置にて取得した画像信号に基づいて算出される焦点評価値とその後に取得される画像信号に基づいて算出される焦点評価値との増減方向と増減率を検出する増減検出部(図2の低域評価値増減検出部22、高域評価値増減検出部24参照)を設け、増減検出部により検出される増減方向と増減率に基づいて、焦点評価値のピークを判定する閾値を設定して焦点評価値のピークに基づく焦点調節動作を行うようにしている(図2の閾値係数A算出部26、閾値係数B算出部28、図4のS45、S49、S55、S59等参照)。焦点評価値の増減方向と増減率に応じて閾値を設定しているので、焦点調節動作の開始時であっても、合焦点の検出を迅速かつ安定性の高い焦点調節を行うことが可能となる。   In one embodiment of the present invention, the focus evaluation value calculated based on the image signal acquired at the position where the focus adjustment operation is started and the focus evaluation value calculated based on the image signal acquired thereafter. Increase / decrease detection unit (see low frequency evaluation value increase / decrease detection unit 22 and high frequency evaluation value increase / decrease detection unit 24 in FIG. 2), and increase / decrease direction and increase / decrease detected by the increase / decrease detection unit. Based on the rate, a threshold for determining the peak of the focus evaluation value is set, and the focus adjustment operation based on the peak of the focus evaluation value is performed (the threshold coefficient A calculation unit 26, the threshold coefficient B calculation unit in FIG. 2). 28, see S45, S49, S55, S59, etc. in FIG. 4). Since the threshold is set according to the increase / decrease direction and the increase / decrease rate of the focus evaluation value, it is possible to perform focus adjustment quickly and with high stability even at the start of the focus adjustment operation. Become.

また、本発明の一実施形態においては、焦点調節動作を開始する位置から所定の期間に取得される複数の画像信号に基づいて算出される複数の焦点評価値の連続性を検出する連続性検出部(図2の低域評価値連続性検出部23、高域評価値連続性検出部25参照)を設け、連続性検出部により検出される連続性に基づいて、焦点評価値のピークを判定する閾値を設定して焦点評価値のピークに基づく焦点調節動作を行うようにしている(図2の閾値係数C算出部27、閾値係数D算出部29、図5のS65、S69、S75、S79等参照)。焦点評価値の連続性に応じて閾値を設定しているので、焦点調節動作の開始時であっても、合焦点の検出を迅速かつ安定性の高い焦点調節を行うことが可能となる。   In one embodiment of the present invention, continuity detection is performed to detect continuity of a plurality of focus evaluation values calculated based on a plurality of image signals acquired in a predetermined period from a position at which a focus adjustment operation is started. 2 (see low-frequency evaluation value continuity detection unit 23 and high-frequency evaluation value continuity detection unit 25 in FIG. 2), and determines the peak of the focus evaluation value based on the continuity detected by the continuity detection unit And a focus adjustment operation based on the peak of the focus evaluation value is performed (threshold coefficient C calculating unit 27, threshold coefficient D calculating unit 29 in FIG. 2, S65, S69, S75, S79 in FIG. 5). Etc.). Since the threshold value is set according to the continuity of the focus evaluation values, it is possible to perform focus adjustment quickly and with high stability even when the focus adjustment operation is started.

なお、本発明の一実施形態においては、焦点評価値の増減率と連続性の両方に基づいて閾値を設定するようにしている。しかし、多少、迅速性や安定性が低下するが、いずれか一方に基づいて閾値を設定するようにしてもよい。また、低域フィルタと高域フィルタの2種類のフィルタを用いて焦点評価値を算出しているが、いずれか一方または3種類以上のフィルタを設け、閾値を算出するようにしてもよい。   In one embodiment of the present invention, the threshold value is set based on both the increase / decrease rate of the focus evaluation value and the continuity. However, although the speed and stability are somewhat reduced, the threshold may be set based on one of them. In addition, although the focus evaluation value is calculated using two types of filters, a low-pass filter and a high-pass filter, one or three or more types of filters may be provided to calculate the threshold value.

また、本発明の一実施形態においては、焦点評価値の連続性の判定にあたっては、基準評価値の取得時から、焦点評価値が最大となるまでの間における連続性を判定していた。しかし、これに限らず、焦点評価値を予め決められた回数取得するまで等、他の基準を適用しても勿論かまわない。   In one embodiment of the present invention, in determining the continuity of the focus evaluation value, the continuity from when the reference evaluation value is acquired until the focus evaluation value becomes maximum is determined. However, the present invention is not limited to this, and other criteria may be applied, for example, until the focus evaluation value is acquired a predetermined number of times.

また、本発明の一実施形態においては、AF動作の開始直後の焦点評価値を基準評価値としていた(図3のS13)。しかし、開始直後に限らず、基準となるタイミングであっても勿論かまわない。   In one embodiment of the present invention, the focus evaluation value immediately after the start of the AF operation is used as the reference evaluation value (S13 in FIG. 3). However, the timing is not limited to immediately after the start, and may be a reference timing.

また、本実施形態においては、撮影のための機器として、デジタルカメラを用いて説明したが、カメラとしては、デジタル一眼レフカメラでもコンパクトデジタルカメラでもよく、ビデオカメラ、ムービーカメラのような動画用のカメラでもよく、さらに、携帯電話、スマートフォーンや携帯情報端末(PDA:Personal Digital Assist)、ゲーム機器等に内蔵されるカメラでも構わない。いずれにしても、焦点評価値を用いて焦点調節を行う機器であれば、本発明を適用することができる。   In the present embodiment, the digital camera is used as the photographing device. However, the camera may be a digital single-lens reflex camera or a compact digital camera, and may be used for moving images such as video cameras and movie cameras. It may be a camera, or may be a camera built into a mobile phone, a smart phone, a personal digital assistant (PDA), a game machine, or the like. In any case, the present invention can be applied to any device that performs focus adjustment using the focus evaluation value.

また、特許請求の範囲、明細書、および図面中の動作フローに関して、便宜上「まず」、「次に」等の順番を表現する言葉を用いて説明したとしても、特に説明していない箇所では、この順で実施することが必須であることを意味するものではない。   In addition, regarding the operation flow in the claims, the specification, and the drawings, even if it is described using words expressing the order such as “first”, “next”, etc. It does not mean that it is essential to implement in this order.

本発明は、上記実施形態にそのまま限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素の幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。   The present invention is not limited to the above-described embodiments as they are, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, you may delete some components of all the components shown by embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.

1・・・光学系、2・・・撮像素子、3・・・AGC/CDS、4・・・A/D、5・・・信号処理部、6・・・レンズ制御部、7・・・撮像制御部、8・・・AE処理部、9・・・画像処理部、10・・・CPU、10a・・・合焦判定部、11・・・焦点評価値生成部、12・・・バス DESCRIPTION OF SYMBOLS 1 ... Optical system, 2 ... Image sensor, 3 ... AGC / CDS, 4 ... A / D, 5 ... Signal processing part, 6 ... Lens control part, 7 ... Imaging control unit, 8 ... AE processing unit, 9 ... Image processing unit, 10 ... CPU, 10a ... Focus determination unit, 11 ... Focus evaluation value generation unit, 12 ... Bus

Claims (5)

光学系による光学像を撮像素子に結像させて画像信号を生成する撮像部を有し、上記光学系を移動しながら、繰り返し撮像を行って画像信号を取得し、上記画像信号に基づいて焦点調節動作を行う焦点調節装置において、
上記画像信号の高周波成分を通過させる高域フィルタ部と、
上記高域フィルタ部よりも画像信号のより低周波成分を通過させる低域フィルタ部と、
上記低域フィルタ部または高域フィルタ部の出力に基づいて、焦点評価値を算出する焦点評価値算出部と、
焦点調節動作を開始する位置にて取得した画像信号に基づいて算出される焦点評価値とその後に取得される画像信号に基づいて算出される焦点評価値との増減方向と増減率を検出する増減検出部と、
焦点調節動作を開始する位置から所定の期間に取得される複数の画像信号に基づいて算出される複数の焦点評価値の連続性を検出する連続性検出部と、
上記増減検出部により検出される増減方向と増減率と、上記連続性検出部により検出される連続性とに基づいて、上記焦点評価値のピークを判定する閾値を設定して焦点評価値のピークに基づく焦点調節動作を行う制御部と、
を具備することを特徴とする焦点調節装置。
An image pickup unit that generates an image signal by forming an optical image by an optical system on an image pickup device, obtains an image signal by repeatedly taking an image while moving the optical system, and focuses on the basis of the image signal. In the focus adjustment device that performs the adjustment operation,
A high-pass filter that passes high-frequency components of the image signal;
A low-pass filter that passes a lower frequency component of the image signal than the high-pass filter, and
A focus evaluation value calculation unit that calculates a focus evaluation value based on the output of the low-pass filter unit or the high-pass filter unit;
Increase / decrease for detecting the increase / decrease direction and the increase / decrease rate between the focus evaluation value calculated based on the image signal acquired at the position where the focus adjustment operation is started and the focus evaluation value calculated based on the image signal acquired thereafter. A detection unit;
A continuity detection unit that detects continuity of a plurality of focus evaluation values calculated based on a plurality of image signals acquired in a predetermined period from a position at which a focus adjustment operation is started;
Based on the increase / decrease direction and the increase / decrease rate detected by the increase / decrease detection unit and the continuity detected by the continuity detection unit, a threshold for determining the peak of the focus evaluation value is set and the peak of the focus evaluation value is set. A control unit for performing a focusing operation based on
A focus adjusting apparatus comprising:
上記増減検出部は、上記低域フィルタ部の出力に基づいて上記焦点評価値の増減方向と増減率を検出し、
上記連続性検出部は、上記低域フィルタ部の出力に基づいて上記焦点評価値の連続性を検出し、
上記制御部は、上記増減検出部により検出される増減方向と増減率と、上記連続性検出部により検出される連続性とに基づいて、上記高域フィルタ部の出力に基づく焦点評価値のピークを検出する閾値を設定し、該焦点評価値のピークに基づく焦点調節動作を行う、
ことを特徴とする請求項1に記載の焦点調節装置。
The increase / decrease detection unit detects an increase / decrease direction and an increase / decrease rate of the focus evaluation value based on the output of the low pass filter unit,
The continuity detection unit detects continuity of the focus evaluation value based on the output of the low-pass filter unit,
The control unit, based on the increase / decrease direction and the increase / decrease rate detected by the increase / decrease detection unit, and the continuity detected by the continuity detection unit, the peak of the focus evaluation value based on the output of the high-pass filter unit A threshold value for detecting the focus evaluation value and performing a focus adjustment operation based on the peak of the focus evaluation value.
The focus adjusting apparatus according to claim 1, wherein:
上記増減検出部は、上記高域フィルタ部の出力に基づいて上記焦点評価値の増減方向と増減率を検出し、
上記連続性検出部は、上記高域フィルタ部の出力に基づいて上記焦点評価値の連続性を検出し、
上記制御部は、上記増減検出部により検出される増減方向と増減率と、上記連続性検出部により検出される連続性とに基づいて、上記高域フィルタ部の出力に基づく焦点評価値のピークを判定する閾値を設定し、該焦点評価値のピークに基づく焦点調節動作を行う、
ことを特徴とする請求項2に記載の焦点調節装置。
The increase / decrease detection unit detects an increase / decrease direction and an increase / decrease rate of the focus evaluation value based on the output of the high pass filter unit,
The continuity detection unit detects continuity of the focus evaluation value based on the output of the high-pass filter unit,
The control unit, based on the increase / decrease direction and the increase / decrease rate detected by the increase / decrease detection unit, and the continuity detected by the continuity detection unit, the peak of the focus evaluation value based on the output of the high-pass filter unit A threshold value for determining the focus evaluation value, and performing a focus adjustment operation based on the peak of the focus evaluation value.
The focus adjusting apparatus according to claim 2, wherein:
上記制御部は、上記焦点評価値の最大値からの減少量を設定し、上記焦点評価値が最大値から該減少量を越えて減少する場合に上記最大値をピークと判定する、
ことを特徴とする請求項1ないし3に記載の焦点調節装置。
The control unit sets a reduction amount from the maximum value of the focus evaluation value, and determines that the maximum value is a peak when the focus evaluation value decreases from the maximum value beyond the reduction amount.
4. The focus adjusting apparatus according to claim 1, wherein
焦点調節動作の開始時に、撮像素子によって取得された画像信号の高周波成分、および該高周波成分よりも低周波成分から、それぞれ焦点評価値を算出し、上記焦点調節動作の開始時に算出した上記焦点評価値を基準評価値として記憶し、
上記焦点調節動作の開始以後、上記撮像素子によって画像信号を取得する毎に、上記高周波成分および低周波成分から、それぞれ焦点評価値を算出し、
上記基準評価値と上記焦点評価値の大小関係と連続性に応じて、上記焦点評価値のピーク検出用の閾値を算出し、
上記ピーク検出用の閾値を用いて、上記焦点評価値のピークを判定する、
ことを特徴とする焦点検出方法。
The focus evaluation value calculated at the start of the focus adjustment operation by calculating a focus evaluation value from the high frequency component of the image signal acquired by the image sensor at the start of the focus adjustment operation and the lower frequency component than the high frequency component. Store the value as the reference evaluation value,
After the start of the focus adjustment operation, each time an image signal is acquired by the image sensor, a focus evaluation value is calculated from the high frequency component and the low frequency component,
In accordance with the magnitude relationship and continuity between the reference evaluation value and the focus evaluation value, a threshold for peak detection of the focus evaluation value is calculated,
The peak of the focus evaluation value is determined using the threshold for peak detection.
A focus detection method characterized by the above.
JP2012156569A 2012-07-12 2012-07-12 Focus adjustment device and focus adjustment method Pending JP2014021151A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012156569A JP2014021151A (en) 2012-07-12 2012-07-12 Focus adjustment device and focus adjustment method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012156569A JP2014021151A (en) 2012-07-12 2012-07-12 Focus adjustment device and focus adjustment method

Publications (1)

Publication Number Publication Date
JP2014021151A true JP2014021151A (en) 2014-02-03

Family

ID=50196114

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012156569A Pending JP2014021151A (en) 2012-07-12 2012-07-12 Focus adjustment device and focus adjustment method

Country Status (1)

Country Link
JP (1) JP2014021151A (en)

Similar Documents

Publication Publication Date Title
JP5523143B2 (en) Imaging apparatus and automatic focusing method
JP4594257B2 (en) Digital imaging device
KR101625893B1 (en) Image pickup apparatus that periodically changes exposure condition, a method of controlling image pickup apparatus, and storage medium
JP5780756B2 (en) Focus adjustment apparatus and method
JP6137840B2 (en) Camera system
JP2013106124A (en) Imaging apparatus, imaging apparatus control method, and program
US9071766B2 (en) Image capturing apparatus and control method thereof
US20150358552A1 (en) Image combining apparatus, image combining system, and image combining method
US20170318208A1 (en) Imaging device, imaging method, and image display device
JP6070283B2 (en) Imaging apparatus, exposure control method, and program
US9036075B2 (en) Image pickup apparatus, method for controlling the same, and storage medium
JP2016142999A (en) Imaging device and control method of the same
US10747089B2 (en) Imaging apparatus and control method of the same
JP2006023339A (en) Imaging apparatus
US11653107B2 (en) Image pick up apparatus, image pick up method, and storage medium
US20140168467A1 (en) Focus adjustment apparatus and method, and image capturing apparatus
JP6294607B2 (en) IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2006033519A (en) Image pickup device
JP2006262221A (en) Imaging apparatus and image processing method
JP2018132748A (en) Imaging device and focus adjusting method
US10911660B2 (en) Control apparatus, imaging apparatus, control method, and storage medium
JP5345657B2 (en) Method and apparatus for automatic focusing of camera
JP2006243745A (en) Automatic focus detector
JP2014021151A (en) Focus adjustment device and focus adjustment method
JP6222904B2 (en) Imaging apparatus and control method thereof

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20150423