JP5904781B2 - Automatic focus adjustment device, control method thereof, and program - Google Patents

Automatic focus adjustment device, control method thereof, and program Download PDF

Info

Publication number
JP5904781B2
JP5904781B2 JP2011281850A JP2011281850A JP5904781B2 JP 5904781 B2 JP5904781 B2 JP 5904781B2 JP 2011281850 A JP2011281850 A JP 2011281850A JP 2011281850 A JP2011281850 A JP 2011281850A JP 5904781 B2 JP5904781 B2 JP 5904781B2
Authority
JP
Japan
Prior art keywords
focus
focus lens
signal
condition
process proceeds
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.)
Expired - Fee Related
Application number
JP2011281850A
Other languages
Japanese (ja)
Other versions
JP2013130818A5 (en
JP2013130818A (en
Inventor
直樹 岩▲崎▼
直樹 岩▲崎▼
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 JP2011281850A priority Critical patent/JP5904781B2/en
Publication of JP2013130818A publication Critical patent/JP2013130818A/en
Publication of JP2013130818A5 publication Critical patent/JP2013130818A5/en
Application granted granted Critical
Publication of JP5904781B2 publication Critical patent/JP5904781B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、自動焦点調節装置、その制御方法及びプログラムに関し、より詳しくは電子スチルカメラやビデオ等に利用されるオートフォーカスに関する技術である。 The present invention relates to an automatic focus adjustment device, a control method therefor, and a program, and more particularly, to a technology related to autofocus used for an electronic still camera, a video, and the like.

従来より、電子スチルカメラ等において、フォーカスレンズ位置を動かして被写体に焦点を合わせる方法として、CCD等の撮像素子から得られる画像信号を用いて自動的に合焦動作を行うオートフォーカス(AF)方式が用いられている。このAF方式において、AFスキャン動作中に被写体ピーク位置から離れているところにおいて、焦点評価値のグラフ形状より被写体ピーク位置を判断し、フォーカス速度を可変させることで高速化する技術がある。
例えば、所定時間内における焦点評価値の変化量とレンズ位置の変化量の比を評価値変化率として算出し、評価値変化率が増加状態にあるか減少状態にあるかに応じてレンズ位置の変更速度を可変するものがある(特許文献1を参照)。
また、焦点評価値の増加中の3点からピーク位置を予測し、予測結果のばらつきが所定範囲内で駆動し、その前に増加が0近傍になったらフォーカス停止し、予測したピーク位置が遠い場合は、高速に移動させ、その後、低速にして再予測するものがある(特許文献2を参照)。
2. Description of the Related Art Conventionally, in an electronic still camera or the like, as a method of moving a focus lens position to focus on a subject, an autofocus (AF) method that automatically performs a focusing operation using an image signal obtained from an image sensor such as a CCD Is used. In this AF method, there is a technique for increasing the speed by determining the subject peak position from the graph shape of the focus evaluation value and changing the focus speed at a position away from the subject peak position during the AF scan operation.
For example, a ratio between the change amount of the focus evaluation value and the change amount of the lens position within a predetermined time is calculated as an evaluation value change rate, and the lens position is changed depending on whether the evaluation value change rate is in an increasing state or a decreasing state. Some change the speed of change (see Patent Document 1).
In addition, the peak position is predicted from three points where the focus evaluation value is increasing, and the variation of the prediction result is driven within a predetermined range. When the increase becomes near 0 before that, the focus is stopped, and the predicted peak position is far away. In some cases, it is moved at a high speed, and then re-predicted at a low speed (see Patent Document 2).

特開平7−7650号公報Japanese Patent Laid-Open No. 7-7650 特開平8−29667号公報JP-A-8-29667

フォーカスレンズを駆動しながら焦点評価値を取得するようなAFスキャン方法を適用した場合には、被写体ピーク位置近傍であることを判断してから速度制御をするまでにタイムラグが生じてしまう。
また、被写体のコントラストや周波数、絞りや露出等のカメラ設定が異なっていると、焦点評価値のグラフ形状が異なる。これより、焦点評価値のグラフ形状に基づいて被写体ピーク位置を判断する場合に、被写体によっては、被写体ピーク位置付近までにAF精度が確保できるサンプリング間隔となる所定の速度まで減速するのが間に合わなくなってしまうという問題がある。
特許文献1や特許文献2では、焦点評価値のグラフ形状を判断してから速度制御するまでのタイムラグについて考慮されていない。また、被写体やカメラの設定に応じて、焦点評価値のピーク形状の判断の仕方を変えることは行っていない。そのため、被写体やカメラの設定によっては、被写体ピーク位置までに速度制御が間に合わなくなり、ピント精度が悪くなってしまう。
When an AF scan method that acquires a focus evaluation value while driving the focus lens is applied, there is a time lag between the determination of being near the subject peak position and the speed control.
Further, when the camera settings such as the contrast, frequency, aperture, and exposure of the subject are different, the graph shape of the focus evaluation value is different. As a result, when determining the subject peak position based on the graph shape of the focus evaluation value, depending on the subject, it is not enough to decelerate to a predetermined speed that is a sampling interval that can secure AF accuracy near the subject peak position. There is a problem that it ends up.
In Patent Document 1 and Patent Document 2, the time lag from the determination of the graph shape of the focus evaluation value to the speed control is not considered. Also, the method of determining the peak shape of the focus evaluation value is not changed according to the setting of the subject or camera. For this reason, depending on the setting of the subject and the camera, the speed control may not be in time for the subject peak position, resulting in poor focus accuracy.

本発明は上記のような点に鑑みてなされたものであり、被写体やカメラの設定によらず、精度良く高速にAFを行えるようにすることを目的とする。   The present invention has been made in view of the above points, and an object of the present invention is to enable AF to be performed with high accuracy and high speed regardless of the setting of the subject and the camera.

本発明の自動焦点調節装置は、フォーカスレンズを含む撮影光学系を通過した光を光電変換して撮像信号を生成する撮像手段と、前記撮像信号から被写体のコントラストを示す焦点信号を生成する生成手段と、当該焦点信号に基づいて前記フォーカスレンズの位置を制御する制御手段とを有する自動焦点調節装置であって、前記制御手段は、前記フォーカスレンズを一方向に駆動する第一のスキャン動作中に前記焦点信号を順次取得し、前記フォーカスレンズの位置に対する前記焦点信号の勾配に応じて、前記フォーカスレンズの駆動速度を変更し、前記制御手段は、第一の条件を満たした場合に、前記第一のスキャン動作において取得された前記焦点信号がピークとなる第一のフォーカスレンズ位置を検出した後で、前記フォーカスレンズを一方向に駆動する第二のスキャン動作を行い、当該第二のスキャン動作において取得された前記焦点信号がピークとなる第二のフォーカスレンズ位置に基づいて前記フォーカスレンズの位置を制御し、前記第一の条件とは、前記第一のフォーカスレンズ位置とその前後の焦点信号に対応する前記フォーカスレンズの位置との差分が所定値を超えた場合であることを特徴とする。 An automatic focusing apparatus according to the present invention includes an imaging unit that photoelectrically converts light that has passed through an imaging optical system including a focus lens to generate an imaging signal, and a generation unit that generates a focus signal indicating the contrast of a subject from the imaging signal. And a control means for controlling the position of the focus lens based on the focus signal, the control means during the first scan operation for driving the focus lens in one direction. The focus signal is sequentially acquired, and the drive speed of the focus lens is changed according to the gradient of the focus signal with respect to the position of the focus lens. After detecting the first focus lens position at which the focus signal acquired in one scan operation reaches a peak, the focus lens Perform a second scan operation of driving in one direction, to control the position of the focus lens based on the second focus lens position where the said focal signal obtained in the second scanning operation reaches a peak, the first One condition is that the difference between the first focus lens position and the position of the focus lens corresponding to the focus signal before and after the first focus lens position exceeds a predetermined value .

本発明によれば、フォーカスレンズの駆動速度を可変として焦点評価値のピーク位置を算出するとともに、一定の条件下では、その後に再度フォーカスレンズを駆動させながら焦点評価値のピーク位置を算出するようにしたので、被写体やカメラの設定によらず、精度良く高速にAFを行うことができる。   According to the present invention, the peak position of the focus evaluation value is calculated by changing the driving speed of the focus lens, and the peak position of the focus evaluation value is calculated while driving the focus lens again under a certain condition. Therefore, AF can be performed with high accuracy and high speed regardless of the subject and camera settings.

実施形態に係る撮像装置の構成を示すブロック図である。It is a block diagram which shows the structure of the imaging device which concerns on embodiment. 実施形態に係る撮像装置の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the imaging device which concerns on embodiment. 図2おけるAF動作を説明するフローチャートである。It is a flowchart explaining AF operation | movement in FIG. 図3における初期フォーカス駆動を説明するフローチャートである。4 is a flowchart for explaining initial focus driving in FIG. 3. 図4におけるピーク検出チェックを説明するフローチャートである。It is a flowchart explaining the peak detection check in FIG. 図3におけるフォーカス速度の設定を説明するフローチャートである。It is a flowchart explaining the setting of the focus speed in FIG. 図3、図5における焦点評価値の勾配検出を説明するフローチャートである。FIG. 6 is a flowchart illustrating focus detection value gradient detection in FIGS. 3 and 5. FIG. 図3、図4、図5における焦点評価値の勾配閾値SlopeThrの算出を説明するフローチャートである。6 is a flowchart illustrating calculation of a focus evaluation value gradient threshold value SlopeThr in FIGS. 3, 4, and 5.

以下、添付図面を参照して、本発明の好適な実施形態について説明する。
図1は、本発明を適用した実施形態に係る撮像装置(電子カメラ)の構成を示すブロック図である。101はズーム機構を含む撮影レンズである。102は光量を制御する絞り及びシャッターである。103はAE(自動露出)処理を行うAE処理部である。104は後述する撮像素子107上に焦点を合わせるためのフォーカスレンズである。105はフォーカスレンズ104を駆動するモータである。106はAF(自動合焦)処理を行うAF処理部である。
Preferred embodiments of the present invention will be described below with reference to the accompanying drawings.
FIG. 1 is a block diagram showing a configuration of an imaging apparatus (electronic camera) according to an embodiment to which the present invention is applied. Reference numeral 101 denotes a photographing lens including a zoom mechanism. Reference numeral 102 denotes an aperture and a shutter that control the amount of light. Reference numeral 103 denotes an AE processing unit that performs AE (automatic exposure) processing. Reference numeral 104 denotes a focus lens for focusing on an image sensor 107 described later. A motor 105 drives the focus lens 104. An AF processing unit 106 performs AF (automatic focusing) processing.

107は被写体からの反射光を電気信号に変換する受光手段又は光電変換手段としての撮像素子である。108はA/D変換部であり、撮像素子107の出力ノイズを除去するCDS回路やA/D変換前に行う非線形増幅回路を含む。109は画像処理部である。110はフォーマット変換部である。111は高速な内蔵メモリ(例えばランダムアクセスメモリ等(以下、DRAMと記す))であり、一時的な画像記憶手段としての高速バッファとして、或いは画像の圧縮伸張における作業用メモリ等に使用される。112は画像記録部であり、メモリーカード等の記録媒体とそのインターフェースからなる。   Reference numeral 107 denotes an image sensor as light receiving means or photoelectric conversion means for converting reflected light from the subject into an electrical signal. Reference numeral 108 denotes an A / D converter, which includes a CDS circuit that removes output noise from the image sensor 107 and a non-linear amplifier circuit that is performed before A / D conversion. Reference numeral 109 denotes an image processing unit. Reference numeral 110 denotes a format conversion unit. Reference numeral 111 denotes a high-speed built-in memory (for example, a random access memory or the like (hereinafter referred to as DRAM)), which is used as a high-speed buffer as temporary image storage means or a working memory or the like in image compression / decompression. An image recording unit 112 includes a recording medium such as a memory card and its interface.

113はシステム制御部(以下、CPUと記す)であり、撮影シーケンス等システムを制御する。114は画像表示用メモリ(以下、VRAMと記す)である。115は画像表示部であり、画像表示の他、操作補助のための表示やカメラ状態の表示の他、撮影時には撮影画面と、測距領域を表示する。   Reference numeral 113 denotes a system control unit (hereinafter referred to as CPU), which controls the system such as a shooting sequence. Reference numeral 114 denotes an image display memory (hereinafter referred to as VRAM). Reference numeral 115 denotes an image display unit. In addition to image display, in addition to display for operation assistance and camera status display, a shooting screen and a distance measurement area are displayed during shooting.

116はカメラを外部から操作するための操作部である。操作部116には、例えば次のようなものが含まれる。撮像装置の撮影機能や画像再生時の設定等の各種設定を行うメニュースイッチ、撮影レンズのズーム動作を指示するズームレバー、撮影モードと再生モードの動作モード切換えスイッチ等である。117はマクロモード、遠景モード、スポーツモード等の撮影モードを選択するための撮影モードスイッチである。撮影モードスイッチ117は、ユーザが選択した撮影モードに応じて測距距離範囲やAF動作等を変更するようになっている。118はシステムに電源を投入するためのメインスイッチである。119はAFやAE等の撮影スタンバイ動作を行うためのスイッチ(以下、SW1と記す)である。120はSW1(119)の操作後、撮影を行う撮影スイッチ(以下、SW2と記す)である。   Reference numeral 116 denotes an operation unit for operating the camera from the outside. The operation unit 116 includes the following, for example. These include a menu switch for performing various settings such as a shooting function of the imaging apparatus and settings for image playback, a zoom lever for instructing a zoom operation of the shooting lens, and an operation mode switching switch between the shooting mode and the playback mode. Reference numeral 117 denotes a shooting mode switch for selecting a shooting mode such as a macro mode, a distant view mode, or a sports mode. The shooting mode switch 117 changes the distance measurement distance range, the AF operation, and the like according to the shooting mode selected by the user. Reference numeral 118 denotes a main switch for turning on the system. Reference numeral 119 denotes a switch (hereinafter referred to as SW1) for performing a shooting standby operation such as AF or AE. Reference numeral 120 denotes a photographing switch (hereinafter referred to as SW2) that performs photographing after the operation of SW1 (119).

121は手ぶれやパン等のよるカメラの動きを検知するための角速度センサ部である。122は画面内の輝度情報より動体を検出する動体検出部である。   Reference numeral 121 denotes an angular velocity sensor for detecting camera movement caused by camera shake or panning. Reference numeral 122 denotes a moving object detection unit that detects a moving object from luminance information in the screen.

本実施形態では、上述した構成を備えた撮像装置が、フォーカスレンズ104を含む撮影光学系及び撮像素子107を介して得られた映像出力信号に基づいて焦点評価値を求め、フォーカスレンズ104の位置を調節する自動合焦装置として機能する。   In the present embodiment, the imaging apparatus having the above-described configuration obtains a focus evaluation value based on a video output signal obtained via the imaging optical system including the focus lens 104 and the imaging element 107, and the position of the focus lens 104. It functions as an automatic focusing device that adjusts.

以下、図2〜図8を参照して、本実施形態に係る撮像装置の動作について説明する。以下に説明する各処理は、システム制御部113の制御下において実現される。
図2は、本実施形態に係る撮像装置の動作を説明するフローチャートである。
ステップS201で、AE処理部103で画像処理部109の出力からAE処理を行って、ステップS202へ進む。ステップS202で、SW1(119)の状態を調べ、ONであればステップS203へ進み、そうでなければステップS201へ進む。ステップS203で、後述するAF動作(図3を参照)を行って、ステップS204へ進む。ここで、AF動作中の露出条件(シャッター速度、絞り、感度)は、直前のステップS201のAE処理で決定する。ステップS204で、SW1(119)の状態を調べ、ONであればステップS205へ進み、そうでなければステップS201へ進む。ステップS205で、SW2(120)の状態を調べ、ONであればステップS206へ進み、そうでなければステップS204へ進む。ステップS206で、撮影動作を行った後、ステップS201へ進む。
Hereinafter, the operation of the imaging apparatus according to the present embodiment will be described with reference to FIGS. Each process described below is realized under the control of the system control unit 113.
FIG. 2 is a flowchart for explaining the operation of the imaging apparatus according to the present embodiment.
In step S201, the AE processing unit 103 performs AE processing from the output of the image processing unit 109, and proceeds to step S202. In step S202, the state of SW1 (119) is checked. If ON, the process proceeds to step S203, and if not, the process proceeds to step S201. In step S203, an AF operation described later (see FIG. 3) is performed, and the process proceeds to step S204. Here, the exposure conditions (shutter speed, aperture, sensitivity) during the AF operation are determined by the AE process in the immediately preceding step S201. In step S204, the state of SW1 (119) is checked. If ON, the process proceeds to step S205, and if not, the process proceeds to step S201. In step S205, the state of SW2 (120) is checked. If ON, the process proceeds to step S206, and if not, the process proceeds to step S204. After performing a photographing operation in step S206, the process proceeds to step S201.

図3は、図2のステップS203のAF動作を説明するフローチャートである。ステップS301で、画面内の所定の領域に測距領域を設定して、ステップS302へ進む。ステップS302で、撮影モードや焦点距離に応じたスキャン範囲を設定して、ステップS303へ進む。ステップS303で、後述する初期フォーカス駆動(図4を参照)を行って、ステップS304へ進む。この初期フォーカス駆動では、AFスキャンの開始位置への駆動を行う。   FIG. 3 is a flowchart for explaining the AF operation in step S203 of FIG. In step S301, a distance measurement area is set as a predetermined area in the screen, and the process proceeds to step S302. In step S302, a scan range corresponding to the shooting mode and focal length is set, and the process proceeds to step S303. In step S303, an initial focus drive (see FIG. 4) described later is performed, and the process proceeds to step S304. In this initial focus driving, driving to the start position of the AF scan is performed.

ステップS304で、後述するフォーカス速度(フォーカスレンズ104の駆動速度)の設定(図6を参照)を行った後、ステップS305へ進む。ステップS305で、ステップS304において設定したフォーカス速度で所定方向にフォーカス駆動を開始して、ステップS306へ進む。ここで、所定方向は、ステップS303の初期フォーカス駆動とは反対方向に設定する。   In step S304, after setting a focus speed (drive speed of the focus lens 104) described later (see FIG. 6), the process proceeds to step S305. In step S305, focus driving is started in a predetermined direction at the focus speed set in step S304, and the process proceeds to step S306. Here, the predetermined direction is set to a direction opposite to the initial focus drive in step S303.

ステップS306で、ステップS301において設定した測距領域内の焦点評価値を取得して、ステップS307へ進む。ステップS307で、現在のフォーカスレンズ104の位置を取得して、ステップS308へ進む。ステップS308で、後述する焦点評価値の勾配検出(図7を参照)を行って、ステップS309へ進む。ステップS309で、後述する焦点評価値の勾配閾値SlopeThrの算出(図8を参照)を行った後、ステップS310へ進む。   In step S306, the focus evaluation value in the distance measurement area set in step S301 is acquired, and the process proceeds to step S307. In step S307, the current position of the focus lens 104 is acquired, and the process proceeds to step S308. In step S308, a gradient evaluation value gradient detection (see FIG. 7) described later is performed, and the flow proceeds to step S309. In step S309, a focus evaluation value gradient threshold SlopeThr (described later) is calculated (see FIG. 8), and the process proceeds to step S310.

ステップS310で、ステップS308において検出した焦点評価値の勾配が、ステップS309において算出した勾配閾値SlopeThr以上で、かつステップS304又は後述するステップS311で設定されるフォーカス速度が高速に設定されているか否かを調べる。その結果、そうであればステップS311へ進み、そうでなければステップS313へ進む。ステップS311で、フォーカス速度を低速に変更して、ステップS312へ進む。ステップS312で、ステップS311において変更したフォーカス速度でフォーカス駆動を行って、ステップS313へ進む。これにより、AFスキャン開始時に高速でフォーカス駆動を開始している場合に、ピント位置近傍が判断できた時点でフォーカスレンズ104の減速制御することができる。   In step S310, whether or not the gradient of the focus evaluation value detected in step S308 is greater than or equal to the gradient threshold SlopeThr calculated in step S309, and whether or not the focus speed set in step S304 or step S311 described later is set to a high speed. Check out. As a result, if so, the process proceeds to step S311; otherwise, the process proceeds to step S313. In step S311, the focus speed is changed to a low speed, and the process proceeds to step S312. In step S312, focus drive is performed at the focus speed changed in step S311 and the process proceeds to step S313. Thus, when focus driving is started at high speed when AF scanning starts, deceleration control of the focus lens 104 can be performed when the vicinity of the focus position can be determined.

ステップS313で、ステップS307において取得した現在のフォーカスレンズ104の位置が、ステップS302において設定したスキャン範囲内にあるか否かを調べる。その結果、スキャン範囲内にあればステップS306へ進み、そうでなければステップS314へ進む。ここで、ステップS306〜S313の一連の動作は、現在のフレームレートの1フレーム分の時間で行われる。また、ステップS306において取得した焦点評価値とステップS307で取得したレンズ位置とを対応付け、後述するステップS315の焦点評価値のピーク位置の算出で用いる。その際、焦点評価値を取得中にフォーカスレンズ104は駆動しているため、露光時間の中心のタイミングでのフォーカスレンズ位置を算出して焦点評価値と対応付ける。   In step S313, it is checked whether or not the current position of the focus lens 104 acquired in step S307 is within the scan range set in step S302. As a result, if it is within the scan range, the process proceeds to step S306; otherwise, the process proceeds to step S314. Here, a series of operations in steps S306 to S313 are performed for a time corresponding to one frame at the current frame rate. Further, the focus evaluation value acquired in step S306 and the lens position acquired in step S307 are associated with each other and used for calculation of the peak position of the focus evaluation value in step S315 described later. At this time, since the focus lens 104 is driven during the acquisition of the focus evaluation value, the focus lens position at the center timing of the exposure time is calculated and associated with the focus evaluation value.

ステップS314で、フォーカスレンズ104の駆動を停止して、ステップS315へ進む。ステップS315で、ステップS306において取得した焦点評価値と、それに対応するフォーカスレンズ104の位置(ステップS307において取得)とを用いて、焦点評価値のピーク位置を算出して、ステップS316へ進む。ステップS316で、合焦判定を行って、ステップS317へ進む。ここまでの処理が、本発明でいう第一の制御手段、第一の制御手順、第一の制御処理の例である。   In step S314, the driving of the focus lens 104 is stopped, and the process proceeds to step S315. In step S315, using the focus evaluation value acquired in step S306 and the position of the focus lens 104 corresponding to the focus evaluation value (obtained in step S307), the peak position of the focus evaluation value is calculated, and the process proceeds to step S316. In step S316, an in-focus determination is made, and the process proceeds to step S317. The processing so far is an example of the first control means, the first control procedure, and the first control processing in the present invention.

ステップS317で、スキャンのやり直し(以下、再スキャンと称する)を行う条件を判別する。ここでは、ステップS315において算出した焦点評価値のピーク位置とその前後の焦点評価値を取得したフォーカス位置との差分が所定値を超えているか否かを判定する(第一の条件)。その結果、超えていれば再スキャンを行うとしてステップS318へ進み、超えていなければステップS326へ進む。この所定値は、合焦位置の算出に関して精度が保てる値とする。   In step S317, a condition for performing the scan again (hereinafter referred to as rescan) is determined. Here, it is determined whether or not a difference between the peak position of the focus evaluation value calculated in step S315 and the focus position from which the focus evaluation values before and after the focus evaluation value have exceeded a predetermined value (first condition). As a result, if it exceeds, the rescan is performed and the process proceeds to step S318. If not, the process proceeds to step S326. The predetermined value is a value that can maintain accuracy with respect to the calculation of the in-focus position.

ただし、第一の条件を満たした場合でも、第二の条件を満たした場合は、再スキャンを行わず、ステップS326へ進む。例えば、ステップS316において非合焦であった場合は再スキャンを行わない。また、絞りを所定量以上絞っていた場合、画像サイズが所定サイズよりも小さい場合、画像の圧縮率が所定値以上大きい場合等、撮影時に所定値以上深度が深くなる場合は再スキャンを行わない。また、撮影速度優先の撮影モードが選択されていた場合、シャッターボタンを一気押しした場合等、撮影までのタイムラグをできるだけ少なくしたい場合は再スキャンを行わない。また、被写体が所定量以上動いていた場合等、再スキャンを行ったときに合焦精度が低下する場合は再スキャンを行わない。   However, even if the first condition is satisfied, if the second condition is satisfied, the process proceeds to step S326 without performing rescanning. For example, if it is out of focus in step S316, rescanning is not performed. Also, if the aperture is reduced by a predetermined amount or more, if the image size is smaller than the predetermined size, or if the compression rate of the image is larger than a predetermined value, the rescan is not performed if the depth becomes deeper than the predetermined value at the time of shooting. . In addition, when a shooting mode with priority on shooting speed is selected, or when a time lag until shooting is desired to be reduced as much as possible, such as when the shutter button is pressed at once, rescanning is not performed. In addition, when the subject moves more than a predetermined amount or the like, the rescan is not performed when the focusing accuracy is reduced when the rescan is performed.

ステップS318で、ステップS315において算出した焦点評価値のピーク位置を中心とした測距範囲を設定する。ここで設定される測距範囲は、焦点評価値の勾配又は勾配の変化率が大きければより狭く設定し、焦点評価値の勾配又は勾配の変化率が小さければ広く設定する。また、絞りを所定量以上絞っていた場合等、深度が深くなることにより焦点評価値のピークを算出しにくい場合等は測距範囲を広げる設定とする。ステップS319で、スキャン開始位置へフォーカスレンズ104を移動させる。ステップS320で、ステップS318において設定した測距範囲内の焦点評価値を取得して、ステップS321へ進む。ステップS321で、現在のフォーカスレンズ104の位置を取得して、ステップS322へ進む。この場合のフォーカス速度は、ステップS311において設定される低速で固定したものとする。   In step S318, a distance measurement range centered on the peak position of the focus evaluation value calculated in step S315 is set. The distance measurement range set here is set narrower if the gradient of the focus evaluation value or the change rate of the gradient is large, and is set wider if the gradient of the focus evaluation value or the change rate of the gradient is small. In addition, when the aperture is reduced by a predetermined amount or more, or when it is difficult to calculate the peak of the focus evaluation value due to a deep depth, the range of distance measurement is set to be widened. In step S319, the focus lens 104 is moved to the scan start position. In step S320, the focus evaluation value within the distance measurement range set in step S318 is acquired, and the process proceeds to step S321. In step S321, the current position of the focus lens 104 is acquired, and the process proceeds to step S322. In this case, the focus speed is fixed at the low speed set in step S311.

ステップS322で、ステップS321において取得した現在のフォーカスレンズ104の位置が、ステップS318において設定した測距範囲内にあるか否かを調べる。その結果、測距範囲内にあればステップS320へ進み、そうでなければステップS323へ進む。ステップS323で、フォーカスレンズ104の駆動を停止して、ステップS324へ進む。ステップS324で、ステップS320において取得した焦点評価値と、それに対応するフォーカスレンズ104の位置(ステップS321において取得)とを用いて、焦点評価値のピーク位置を算出して、ステップS325へ進む。ステップS325で、合焦判定を行って、ステップS326へ進む。ここまでの処理が、本発明でいう第二の制御手段、第二の制御手順、第二の制御処理の例である。   In step S322, it is checked whether or not the current position of the focus lens 104 acquired in step S321 is within the distance measuring range set in step S318. As a result, if it is within the distance measurement range, the process proceeds to step S320, and if not, the process proceeds to step S323. In step S323, the driving of the focus lens 104 is stopped, and the process proceeds to step S324. In step S324, using the focus evaluation value acquired in step S320 and the corresponding position of the focus lens 104 (obtained in step S321), the peak position of the focus evaluation value is calculated, and the process proceeds to step S325. In step S325, an in-focus determination is made, and the process proceeds to step S326. The processing so far is an example of the second control means, the second control procedure, and the second control processing in the present invention.

ステップS322で、再スキャンを行った場合はステップS324において求めた焦点評価値のピーク位置へ、再スキャンを行わなかった場合はステップS315において求めた焦点評価値のピーク位置へフォーカスレンズ104を駆動して、AF動作を終了する。   If re-scanning is performed in step S322, the focus lens 104 is driven to the peak position of the focus evaluation value obtained in step S324, and if re-scanning is not performed, the focus lens 104 is driven to the peak position of the focus evaluation value obtained in step S315. Then, the AF operation ends.

図4は、図3のステップS303の初期フォーカス駆動を説明するフローチャートである。ステップS401で、フォーカス速度を低速にして、ステップS402へ進む。ここで、初期フォーカス駆動における低速は、例えば後述する焦点評価値の勾配を判断できる最低速で設定する。ステップS402で、ステップS401において設定したフォーカス速度で所定方向にフォーカス駆動を開始して、ステップS403へ進む。ここで、所定方向は、例えば被写体の存在確率が高いと考えられる方向や、現在のフォーカスレンズ位置に対して遠端と近端のいずれか近い側への方向等に設定する。   FIG. 4 is a flowchart for explaining the initial focus drive in step S303 of FIG. In step S401, the focus speed is decreased and the process proceeds to step S402. Here, the low speed in the initial focus drive is set at a minimum speed at which, for example, a gradient of a focus evaluation value described later can be determined. In step S402, focus drive is started in a predetermined direction at the focus speed set in step S401, and the process proceeds to step S403. Here, the predetermined direction is set to, for example, a direction in which the existence probability of the subject is considered high, a direction toward either the far end or the near end with respect to the current focus lens position.

ステップS403で、ステップS301において設定した測距領域内の焦点評価値を取得して、ステップS404へ進む。ステップS404で、現在のフォーカスレンズ104の位置を取得して、ステップS405へ進む。ステップS405で、後述するピーク検出チェック(図5を参照)を行って、ステップS406へ進む。ステップS406で、ステップS405においてチェックしたピーク検出結果がOKか否かを調べ、そうであればステップS409へ進み、そうでなければステップS407へ進む。ステップS407で、ステップS405においてチェックしたピーク検出結果が減少で、かつ減少回数が減少回数閾値よりも多いか否かを調べ、そうであればステップS409へ進み、そうでなければステップS408へ進む。ステップS408で、現在のフォーカスレンズ104の位置が進行方向の端まで到達したか否かを調べ、そうであればステップS409へ進み、そうでなければステップS403へ進む。   In step S403, the focus evaluation value in the distance measurement area set in step S301 is acquired, and the process proceeds to step S404. In step S404, the current position of the focus lens 104 is acquired, and the process proceeds to step S405. In step S405, a peak detection check (see FIG. 5) described later is performed, and the process proceeds to step S406. In step S406, it is checked whether or not the peak detection result checked in step S405 is OK. If so, the process proceeds to step S409, and if not, the process proceeds to step S407. In step S407, it is checked whether or not the peak detection result checked in step S405 is a decrease, and the number of times of decrease is larger than the decrease frequency threshold value. In step S408, it is checked whether or not the current position of the focus lens 104 has reached the end in the traveling direction. If so, the process proceeds to step S409, and if not, the process proceeds to step S403.

ステップS409で、後述する焦点評価値の勾配閾値SlopeThrの算出(図8を参照)を行った後、ステップS410へ進む。ステップS410で、後述するステップS503の焦点評価値の勾配検出において検出した焦点評価値の勾配がステップS409において算出したSlopeThr以上か否かを調べる。その結果、そうであればステップS411へ進み、そうでなければステップS412へ進む。ステップS411で、FASTAF判定をNGとして、ステップS413へ進む。ここで、FASTAF判定は、AFスキャン動作開始タイミングであるステップS305において、フォーカスレンズ104の現在位置がピント位置の近傍か否かを判断することで高速にフォーカス駆動を開始するかを決定する指標の一つとなる。FASTAF判定は、次のステップS304のフォーカス速度の設定で用いる。ステップS412で、FASTAF判定をOKとして、ステップS413へ進む。ステップS413で、フォーカスレンズ104を停止して、ステップS304へ進む。   In step S409, the gradient threshold value SlopeThr of the focus evaluation value described later is calculated (see FIG. 8), and the process proceeds to step S410. In step S410, it is checked whether or not the gradient of the focus evaluation value detected in the gradient detection of the focus evaluation value in step S503, which will be described later, is greater than or equal to SlopeThr calculated in step S409. As a result, if so, the process proceeds to step S411, otherwise proceeds to step S412. In step S411, FASTAF determination is NG, and the process proceeds to step S413. Here, FASTAF determination is an index for determining whether to start focus driving at high speed by determining whether or not the current position of the focus lens 104 is in the vicinity of the focus position in step S305 which is the AF scan operation start timing. Become one. The FASTAF determination is used for setting the focus speed in the next step S304. In step S412, the FASTAF determination is OK, and the flow advances to step S413. In step S413, the focus lens 104 is stopped and the process proceeds to step S304.

図5は、図4のステップS405のピーク検出チェックを説明するフローチャートである。ステップS501で、現在までにステップS403において取得した焦点評価値の最大値、最小値を求めて記憶して、ステップS502へ進む。ステップS502で、後述する焦点評価値の勾配閾値SlopeThrの算出(図7を参照)を行った後、ステップS503へ進む。ステップS503で、後述する焦点評価値の勾配検出(図8を参照)を行った後、ステップS504へ進む。   FIG. 5 is a flowchart for explaining the peak detection check in step S405 of FIG. In step S501, the maximum and minimum values of the focus evaluation values acquired in step S403 so far are obtained and stored, and the process proceeds to step S502. After calculating a focus evaluation value gradient threshold SlopeThr (see FIG. 7), which will be described later, in step S502, the process proceeds to step S503. In step S503, after focus detection value gradient detection (see FIG. 8) described later is performed, the process proceeds to step S504.

ステップS504で、今回取得した焦点評価値が、前回取得した焦点評価値に対して所定量以上増加しているか否かを調べ、そうであればステップS505へ進み、そうでなければステップS514へ進む。ステップS505で、減少回数を0にクリアして、ステップS506へ進む。ステップS506で、増加回数をインクリメントして、ステップS507へ進む。ステップS507で、増加回数が加減速判定閾値よりも多いか否かを調べ、そうであればステップS508へ進み、そうでなければステップS511へ進む。ステップS508で、焦点評価値の勾配がステップS502において算出したSlopeThr以上か否かを調べ、そうであればステップS509へ進み、そうでなければステップS510へ進む。ステップS509で、フォーカス速度を低速に変更して、ステップS512へ進む。ステップS510で、フォーカス速度を高速に変更して、ステップS512へ進む。ステップS511で、FASTAF判定をOKにして、ステップS513へ進む。ステップS512で、FASTAF判定をNGにして、ステップS513へ進む。ステップS513で、ピーク検出結果を増加として、ステップS525へ進む。   In step S504, it is checked whether or not the focus evaluation value acquired this time has increased by a predetermined amount or more with respect to the focus evaluation value acquired last time. If so, the process proceeds to step S505. If not, the process proceeds to step S514. . In step S505, the number of reductions is cleared to 0, and the process proceeds to step S506. In step S506, the number of increases is incremented, and the process proceeds to step S507. In step S507, it is checked whether or not the increase count is greater than the acceleration / deceleration determination threshold value. If so, the process proceeds to step S508, and if not, the process proceeds to step S511. In step S508, it is checked whether or not the gradient of the focus evaluation value is greater than or equal to SlopeThr calculated in step S502. If so, the process proceeds to step S509, and if not, the process proceeds to step S510. In step S509, the focus speed is changed to a low speed, and the process proceeds to step S512. In step S510, the focus speed is changed to a high speed, and the process proceeds to step S512. In step S511, FASTAF determination is OK, and the process proceeds to step S513. In step S512, the FASTAF determination is set to NG, and the process proceeds to step S513. In step S513, the peak detection result is increased, and the process proceeds to step S525.

ステップS514で、今回の焦点評価値が、前回の焦点評価値に対して所定量減少しているか否かを調べ、そうであればステップS515へ進み、そうでなければステップS521へ進む。ステップS515で、増加回数が1以上、かつ今回の焦点評価値がステップS501において記憶している焦点評価値の最大値よりも所定割合以上減少している、かつステップS501で記憶している最大値と最小値の差が所定量以上、かつピーク位置が今回までに取得している焦点評価値データの端ではないか否かを調べる。その結果、全て満たしていればステップS520へ進み、そうでなければステップS516へ進む。ステップS516で、増加回数を0にクリアして、ステップS517へ進む。ステップS517で、減少回数をインクリメントして、ステップS518へ進む。ステップS518で、FASTAF判定をOKにして、ステップS519へ進む。ステップS519で、ピーク検出結果を減少として、ステップS525へ進む。ステップS520で、ピーク検出結果をOKにして、ステップS525へ進む。   In step S514, it is checked whether or not the current focus evaluation value has decreased by a predetermined amount with respect to the previous focus evaluation value. If so, the process proceeds to step S515, and if not, the process proceeds to step S521. In step S515, the number of increases is 1 or more, and the current focus evaluation value is decreased by a predetermined percentage or more than the maximum focus evaluation value stored in step S501, and the maximum value stored in step S501. And whether the difference between the minimum value and the minimum value is a predetermined amount or more and the peak position is not the end of the focus evaluation value data acquired so far. As a result, if all the conditions are satisfied, the process proceeds to step S520, and if not, the process proceeds to step S516. In step S516, the increase count is cleared to 0, and the process proceeds to step S517. In step S517, the decrease count is incremented, and the process proceeds to step S518. In step S518, the FASTAF determination is OK, and the flow advances to step S519. In step S519, the peak detection result is decreased, and the process proceeds to step S525. In step S520, the peak detection result is OK, and the process proceeds to step S525.

ステップS521で、焦点評価値の変化がない回数が加減速判定閾値よりも多いか否かを調べ、そうであればステップS522へ進み、そうでなければステップS523へ進む。ステップS522で、フォーカス速度を高速に変更して、ステップS523へ進む。ステップS523で、FASTAF判定をOKとして、ステップS524へ進む。ステップS524で、ピーク検出結果を変化なしとして、ステップS525へ進む。   In step S521, it is determined whether or not the number of times the focus evaluation value has not changed is greater than the acceleration / deceleration determination threshold value. If so, the process proceeds to step S522, and if not, the process proceeds to step S523. In step S522, the focus speed is changed to high speed, and the flow advances to step S523. In step S523, FASTAF determination is OK, and the flow advances to step S524. In step S524, the peak detection result is regarded as no change, and the process proceeds to step S525.

ステップS525で、フォーカス速度でフォーカスレンズ104を駆動して、ステップS406へ進む。
これにより、AFスキャン開始位置までフォーカスレンズ104を駆動するまでの焦点評価値のグラフ形状により、ピント位置が近傍にあるかどうかを判断することができる。また、このフォーカス駆動の間においても、ピント位置から離れている場合は、フォーカスレンズを高速に駆動し、ピント位置近傍では、低速に駆動することで、無駄なフォーカス駆動時間を短縮することができる。
In step S525, the focus lens 104 is driven at the focus speed, and the process proceeds to step S406.
Thereby, it is possible to determine whether or not the focus position is in the vicinity based on the graph shape of the focus evaluation value until the focus lens 104 is driven to the AF scan start position. Further, even during the focus drive, when the focus lens is away from the focus position, the focus lens is driven at a high speed, and in the vicinity of the focus position, the focus drive time can be shortened by driving at a low speed. .

図6は、図3のステップS304のフォーカス速度の設定を説明するフローチャートである。ステップS601で、FASTAF判定がOKか否かを調べ、そうであればステップS602へ進み、そうでなければステップS608へ進む。ステップS602で、加速度センサ部121で検出したカメラの動き量が所定量以下か否かを調べ、そうであればステップS603へ進み、そうでなければステップS608へ進む。これにより、ステップS308、S503の焦点評価値の勾配検出において、手ぶれにより焦点評価値が変動したことによる誤検出の影響を低減することができる。ステップS603で、動体検出部122で検出した画角の変動が所定量よりも小さいか否かを調べ、そうであればステップS604へ進み、そうでなければステップS608へ進む。ステップS604で、輝度が所定範囲内であるか否かを調べ、そうであればステップS605へ進み、そうでなければステップS608へ進む。ステップS605で、現在のカメラ設定において焦点距離が所定距離よりも長いか否かを調べ、そうであればステップS606へ進み、そうでなければステップS608へ進む。ステップS606で、現在のカメラ設定において測距距離範囲が所定距離よりも長いか否かを調べ、そうであればステップS607へ進み、そうでなければステップS608へ進む。ステップS607で、フォーカス速度を高速に変更して、ステップS305へ進む。ステップS608で、フォーカス速度を低速に変更して、ステップS305へ進む。   FIG. 6 is a flowchart for explaining setting of the focus speed in step S304 of FIG. In step S601, it is checked whether the FASTAF determination is OK. If so, the process proceeds to step S602, and if not, the process proceeds to step S608. In step S602, it is checked whether or not the amount of camera motion detected by the acceleration sensor unit 121 is equal to or smaller than a predetermined amount. If so, the process proceeds to step S603, and if not, the process proceeds to step S608. Thereby, in the focus evaluation value gradient detection in steps S308 and S503, it is possible to reduce the influence of erroneous detection due to the fluctuation of the focus evaluation value due to camera shake. In step S603, it is checked whether or not the variation in the angle of view detected by the moving object detection unit 122 is smaller than a predetermined amount. If so, the process proceeds to step S604, and if not, the process proceeds to step S608. In step S604, it is checked whether or not the luminance is within a predetermined range. If so, the process proceeds to step S605, and if not, the process proceeds to step S608. In step S605, it is checked whether or not the focal length is longer than the predetermined distance in the current camera setting. If so, the process proceeds to step S606, and if not, the process proceeds to step S608. In step S606, it is checked whether or not the distance measurement distance range is longer than the predetermined distance in the current camera setting. If so, the process proceeds to step S607, and if not, the process proceeds to step S608. In step S607, the focus speed is changed to a high speed, and the process proceeds to step S305. In step S608, the focus speed is changed to a low speed, and the process proceeds to step S305.

図7は、図3のステップS308、及び図5のステップS503の焦点評価値の勾配検出を説明するフローチャート図である。ステップS701で、ステップS307又はステップS404において取得した今回のレンズ位置をPos1として、ステップS702へ進む。ステップS702で、ステップS306又はステップS403において取得した今回の焦点評価値をT1として、ステップS703へ進む。ステップS703で、ステップS307又はステップS404において取得した前回のレンズ位置をPos2として、ステップS704へ進む。ステップS704で、ステップS306又はステップS403において取得した前回の焦点評価値をT2として、ステップS705へ進む。ステップS705で、(T1−T2)/(Pos1−Pos2)を焦点評価値の勾配として、ステップS309又はステップS504へ進む。   FIG. 7 is a flowchart illustrating focus detection value gradient detection in step S308 of FIG. 3 and step S503 of FIG. In step S701, the current lens position acquired in step S307 or step S404 is set as Pos1, and the process proceeds to step S702. In step S702, the current focus evaluation value acquired in step S306 or step S403 is set as T1, and the process proceeds to step S703. In step S703, the previous lens position acquired in step S307 or step S404 is set to Pos2, and the process proceeds to step S704. In step S704, the previous focus evaluation value acquired in step S306 or step S403 is set as T2, and the process proceeds to step S705. In step S705, using (T1-T2) / (Pos1-Pos2) as the gradient of the focus evaluation value, the process proceeds to step S309 or step S504.

図8は、図3のステップS309、図4のステップS409、図5のステップS502の焦点評価値の勾配閾値SlopeThrの算出を説明するフローチャート図である。ステップS801で、現在の絞り及びシャッター102の状態を調べて現在の絞り値を取得して、ステップS802へ進む。ステップS802で、ステップS301において設定した測距領域のサイズを取得して、ステップS803へ進む。ステップS803で、ステップS301において設定した測距領域内のコントラスト値を取得して、ステップS804へ進む。ここで、測距領域内のコントラスト値は、ステップS301において設定した測距領域内の輝度値の最大値と最小値の差分とする。これにより、被写体にピントが合っていなくても、測距領域内の被写体のコントラストをある程度把握することができる。ステップS804で、ステップS301において設定した測距領域内の周波数を取得して、ステップS805へ進む。ここで、測距領域内の周波数の取得の仕方については、本発明の主眼点ではないため詳細な説明は省略する。ステップS805で、現在のレンズ速度を取得して、ステップS806へ進む。   FIG. 8 is a flowchart illustrating the calculation of the focus evaluation value gradient threshold value SlopeThr in step S309 in FIG. 3, step S409 in FIG. 4, and step S502 in FIG. In step S801, the current aperture and the state of the shutter 102 are checked to acquire the current aperture value, and the process proceeds to step S802. In step S802, the size of the ranging area set in step S301 is acquired, and the process proceeds to step S803. In step S803, the contrast value in the distance measurement area set in step S301 is acquired, and the process proceeds to step S804. Here, the contrast value in the distance measurement area is a difference between the maximum value and the minimum value of the luminance values in the distance measurement area set in step S301. Thereby, even if the subject is not in focus, the contrast of the subject in the distance measurement area can be grasped to some extent. In step S804, the frequency in the ranging area set in step S301 is acquired, and the process proceeds to step S805. Here, the method of acquiring the frequency within the distance measurement area is not the main point of the present invention, and thus detailed description thereof is omitted. In step S805, the current lens speed is acquired, and the process proceeds to step S806.

ステップS806で、次のステップS807で勾配閾値SlopeThrを算出するための基準となるSlopeThr0を決定して、ステップS807へ進む。ここで、SlopeThr0は、基準となる被写体やカメラの設定において決定する。また、用途によってSlopeThr0の決定の仕方を変えてもよい。例えば、図3のステップS303の初期フォーカス駆動では、後に行うAFスキャン動作時に被写体ピークを検出できるように、被写体ピークを越えた位置で減速されればよい。これに対して、AFスキャン動作時には、被写体ピーク位置を越える前にAF精度を確保するために必要なフォーカスレンズ速度まで減速しなければならない。よって、AFスキャン前の初期フォーカス駆動中であるステップS409又はステップS502と、AFスキャン動作中のステップS309でSlopeThr0を変えるようにする。   In step S806, SlopeThr0 serving as a reference for calculating the gradient threshold value SlopeThr is determined in the next step S807, and the process proceeds to step S807. Here, SlopeThr0 is determined in the setting of the reference subject and camera. Further, the method of determining SlopeThr0 may be changed depending on the application. For example, in the initial focus drive in step S303 in FIG. 3, it is only necessary to decelerate at a position exceeding the subject peak so that the subject peak can be detected during the AF scan operation performed later. On the other hand, during the AF scan operation, the focus lens speed must be decelerated to ensure the AF accuracy before exceeding the subject peak position. Therefore, SlopeThr0 is changed in step S409 or S502 during initial focus driving before AF scan and in step S309 during AF scan operation.

ステップS807で、焦点評価値の勾配閾値SlopeThrを算出して、ステップS310、S410、S503へ進む。ここで、勾配閾値SlopeThrは、例えば以下の計算式によって算出する。
SlopeThr = SlopeThr0 × MMP × WinSize × Freq / Speed / FNum
FNum:絞り値によって決まる係数
MMP:測距領域内のコントラストによって決まる係数
Freq:測距領域内の周波数によって決まる係数
WinSize:測距領域サイズによって決まる係数
Speed:フォーカスレンズ速度によって決まる係数
これにより、被写体やカメラの設定によって焦点評価値のグラフ形状が異なっていた場合でも、被写体ピーク位置の判断を適切に行うことができる。
In step S807, the gradient threshold value SlopeThr of the focus evaluation value is calculated, and the process proceeds to steps S310, S410, and S503. Here, the gradient threshold value SlopeThr is calculated by the following calculation formula, for example.
SlopeThr = SlopeThr0 × MMP × WinSize × Freq / Speed / FNum
FNum: Coefficient determined by the aperture value
MMP: Coefficient determined by the contrast in the distance measurement area
Freq: Coefficient determined by the frequency within the distance measurement area
WinSize: Coefficient determined by ranging area size
Speed: a coefficient determined by the focus lens speed Thereby, even when the graph shape of the focus evaluation value differs depending on the subject or camera setting, the subject peak position can be appropriately determined.

本実施形態では、焦点評価値の勾配が所定の閾値より大きいか否かを判断することにより、低速又は高速の2値でフォーカスレンズ速度の調節を行っているが、焦点評価値の勾配によりフォーカス速度を細かく可変させてもよい。   In this embodiment, the focus lens speed is adjusted at a low speed or a high speed by determining whether or not the gradient of the focus evaluation value is larger than a predetermined threshold value. The speed may be finely varied.

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

(その他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。すなわち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(又はCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other embodiments)
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 storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program. It is a process to be executed.

101:撮影レンズ 102:絞り及びシャッター 103:AE処理部 104:フォーカスレンズ 105:モータ 106:AF処理部 107:撮像素子 108:A/D変換部 109:画像処理部 110:フォーマット変換部 111:DRAM 112:画像記録部 113:システム制御部 114:VRAM 115:画像表示部 116:操作部 117:撮影モードスイッチ 118:メインスイッチ 119:撮影スタンバイスイッチ 120:撮影スイッチ 121:角速度センサ部 122:動体検出部 DESCRIPTION OF SYMBOLS 101: Shooting lens 102: Aperture and shutter 103: AE processing unit 104: Focus lens 105: Motor 106: AF processing unit 107: Image sensor 108: A / D conversion unit 109: Image processing unit 110: Format conversion unit 111: DRAM 112: Image recording unit 113: System control unit 114: VRAM 115: Image display unit 116: Operation unit 117: Shooting mode switch 118: Main switch 119: Shooting standby switch 120: Shooting switch 121: Angular velocity sensor unit 122: Moving object detection unit

Claims (16)

フォーカスレンズを含む撮影光学系を通過した光を光電変換して撮像信号を生成する撮像手段と、
前記撮像信号から被写体のコントラストを示す焦点信号を生成する生成手段と、
当該焦点信号に基づいて前記フォーカスレンズの位置を制御する制御手段とを有する自動焦点調節装置であって、
前記制御手段は、前記フォーカスレンズを一方向に駆動する第一のスキャン動作中に前記焦点信号を順次取得し、前記フォーカスレンズの位置に対する前記焦点信号の勾配に応じて、前記フォーカスレンズの駆動速度を変更し、
前記制御手段は、第一の条件を満たした場合に、前記第一のスキャン動作において取得された前記焦点信号がピークとなる第一のフォーカスレンズ位置を検出した後で、前記フォーカスレンズを一方向に駆動する第二のスキャン動作を行い、当該第二のスキャン動作において取得された前記焦点信号がピークとなる第二のフォーカスレンズ位置に基づいて前記フォーカスレンズの位置を制御し、
前記第一の条件とは、前記第一のフォーカスレンズ位置とその前後の焦点信号に対応する前記フォーカスレンズの位置との差分が所定値を超えた場合であることを特徴とする自動焦点調節装置。
Imaging means for photoelectrically converting light that has passed through a photographing optical system including a focus lens to generate an imaging signal;
Generating means for generating a focus signal indicating the contrast of a subject from the imaging signal;
An automatic focus adjustment device having control means for controlling the position of the focus lens based on the focus signal,
The control means sequentially acquires the focus signal during a first scan operation for driving the focus lens in one direction, and drives the focus lens according to a gradient of the focus signal with respect to the position of the focus lens. Change
The control means detects the first focus lens position at which the focus signal acquired in the first scanning operation reaches a peak when the first condition is satisfied, and then moves the focus lens in one direction. A second scan operation is performed, and the position of the focus lens is controlled based on the second focus lens position at which the focus signal acquired in the second scan operation peaks .
The first condition is when the difference between the position of the first focus lens and the position of the focus lens corresponding to the focus signal before and after the first focus lens position exceeds a predetermined value. .
前記制御手段は、前記第一のフォーカスレンズ位置を含むように、前記第二のスキャン動作において前記フォーカスレンズを駆動する範囲を設定することを特徴とする請求項1記載の自動焦点調節装置。 Said control means, said to include a first focus lens position, auto-focusing device according to claim 1, characterized in that to set the range for driving the focus lens in the second scanning operation. 前記制御手段は、前記第二のスキャン動作において前記フォーカスレンズを駆動する範囲を、前記第一のフォーカスレンズ位置を検出したときの前記フォーカスレンズの位置に対する前記焦点信号の勾配に応じて変更することを特徴とする請求項に記載の自動焦点調節装置。 The control unit changes a range in which the focus lens is driven in the second scanning operation according to a gradient of the focus signal with respect to the position of the focus lens when the first focus lens position is detected. The automatic focusing apparatus according to claim 2 , wherein: 前記制御手段は、前記第二のスキャン動作において前記フォーカスレンズを駆動する範囲を、絞りの値に応じて変更することを特徴とする請求項又はに記載の自動焦点調節装置。 The control means, automatic focusing device according to claim 2 or 3 ranges for driving the focus lens in the second scanning operation, and changes depending on the aperture value. 前記制御手段は、前記第二のスキャン動作において、固定された速度で前記フォーカスレンズを駆動することを特徴とする請求項1乃至のいずれか1項に記載の自動焦点調節装置。 Wherein, in the second scanning operation, an automatic focusing device according to any one of claims 1 to 4, characterized in that to drive the focus lens at a fixed speed. 第二の条件を満たした場合、前記制御手段は、前記第一の条件を満たした場合であっても、前記第二のスキャン動作を行わないことを特徴とする請求項1乃至のいずれか1項に記載の自動焦点調節装置。 If it meets the second condition, said control means, even if satisfying the first condition, any one of claims 1 to 5, characterized in that does not perform the second scanning operation 2. The automatic focusing apparatus according to item 1. 前記第二の条件を満たした場合、前記制御手段は、前記第一のフォーカスレンズ位置に基づいて前記フォーカスレンズの位置を制御することを特徴とする請求項に記載の自動焦点調節装置。 The automatic focus adjustment apparatus according to claim 6 , wherein when the second condition is satisfied, the control unit controls the position of the focus lens based on the position of the first focus lens. 前記第二の条件とは、前記第一のフォーカスレンズ位置の検出の結果が非合焦の場合であることを特徴とする請求項又はに記載の自動焦点調節装置。 The automatic focus adjustment apparatus according to claim 6 or 7 , wherein the second condition is a case where a result of detection of the first focus lens position is out of focus. 前記第二の条件とは、絞りを所定量以上絞っていた場合であることを特徴とする請求項乃至のいずれか1項に記載の自動焦点調節装置。 The automatic focus adjustment apparatus according to any one of claims 6 to 8 , wherein the second condition is a case where the diaphragm is stopped by a predetermined amount or more. 前記第二の条件とは、画像サイズが所定サイズよりも小さい場合であることを特徴とする請求項乃至のいずれか1項に記載の自動焦点調節装置。 Wherein the second condition, the automatic focusing device according to any one of claims 6 to 9 image size is equal to or is smaller than a predetermined size. 前記第二の条件とは、画像の圧縮率が所定値以上大きい場合であることを特徴とする請求項乃至10のいずれか1項に記載の自動焦点調節装置。 Wherein the second condition, the automatic focusing device according to any one of claims 6 to 10 compression ratio of the image is characterized in that when more than a predetermined value larger. 前記第二の条件とは、撮影速度優先の撮影モードが選択されていた場合であることを特徴とする請求項乃至11のいずれか1項に記載の自動焦点調節装置。 The automatic focus adjustment apparatus according to any one of claims 6 to 11 , wherein the second condition is a case where a photographing mode with priority on photographing speed is selected. 前記第二の条件とは、被写体が所定量以上動いていた場合であることを特徴とする請求項乃至12のいずれか1項に記載の自動焦点調節装置。 The automatic focus adjustment apparatus according to any one of claims 6 to 12 , wherein the second condition is a case where the subject has moved a predetermined amount or more. 前記第二の条件とは、シャッターボタンを一気押しした場合であることを特徴とする請求項乃至13のいずれか1項に記載の自動焦点調節装置。 Wherein the second condition, the automatic focusing device according to any one of claims 6 to 13, characterized in that when you press one stroke of the shutter button. フォーカスレンズを含む撮影光学系を通過した光を光電変換して撮像信号を生成する撮像手段を備える自動焦点調節装置の制御方法であって、
前記撮像信号から被写体のコントラストを示す焦点信号を生成するステップと、
当該焦点信号に基づいて前記フォーカスレンズの位置を制御するステップとを有し、
前記フォーカスレンズを一方向に駆動する第一のスキャン動作中に前記焦点信号を順次取得し、前記フォーカスレンズの位置に対する前記焦点信号の勾配に応じて、前記フォーカスレンズの駆動速度を変更し、
第一の条件を満たした場合に、前記第一のスキャン動作において取得された前記焦点信号がピークとなる第一のフォーカスレンズ位置を検出した後で、前記フォーカスレンズを一方向に駆動する第二のスキャン動作を行い、当該第二のスキャン動作において取得された前記焦点信号がピークとなる第二のフォーカスレンズ位置に基づいて前記フォーカスレンズの位置を制御し、
前記第一の条件とは、前記第一のフォーカスレンズ位置とその前後の焦点信号に対応する前記フォーカスレンズの位置との差分が所定値を超えた場合であることを特徴とする自動焦点調節装置の制御方法。
A method for controlling an automatic focus adjustment apparatus including an imaging unit that photoelectrically converts light that has passed through a photographing optical system including a focus lens to generate an imaging signal,
Generating a focus signal indicating the contrast of the subject from the imaging signal;
Controlling the position of the focus lens based on the focus signal,
The focus signal is sequentially acquired during a first scan operation for driving the focus lens in one direction, and the drive speed of the focus lens is changed according to the gradient of the focus signal with respect to the position of the focus lens.
A second driving unit configured to drive the focus lens in one direction after detecting a first focus lens position at which the focus signal obtained in the first scan operation reaches a peak when the first condition is satisfied; The position of the focus lens is controlled based on the position of the second focus lens at which the focus signal obtained in the second scan operation peaks .
The first condition is when the difference between the position of the first focus lens and the position of the focus lens corresponding to the focus signal before and after the first focus lens position exceeds a predetermined value. Control method.
フォーカスレンズを含む撮影光学系を通過した光を光電変換して撮像信号を生成する撮像手段を備える自動焦点調節装置の制御をコンピュータに実行させるプログラムであって、
前記撮像信号から被写体のコントラストを示す焦点信号を生成するステップと、
当該焦点信号に基づいて前記フォーカスレンズの位置を制御するステップとを有し、
前記フォーカスレンズを一方向に駆動する第一のスキャン動作中に前記焦点信号を順次取得し、前記フォーカスレンズの位置に対する前記焦点信号の勾配に応じて、前記フォーカスレンズの駆動速度を変更し、
第一の条件を満たした場合に、前記第一のスキャン動作において取得された前記焦点信号がピークとなる第一のフォーカスレンズ位置を検出した後で、前記フォーカスレンズを一方向に駆動する第二のスキャン動作を行い、当該第二のスキャン動作において取得された前記焦点信号がピークとなる第二のフォーカスレンズ位置に基づいて前記フォーカスレンズの位置を制御し、
前記第一の条件とは、前記第一のフォーカスレンズ位置とその前後の焦点信号に対応する前記フォーカスレンズの位置との差分が所定値を超えた場合であることを特徴とするプログラム。
A program that causes a computer to execute control of an automatic focus adjustment device including an imaging unit that photoelectrically converts light that has passed through a photographing optical system including a focus lens to generate an imaging signal,
Generating a focus signal indicating the contrast of the subject from the imaging signal;
Controlling the position of the focus lens based on the focus signal,
The focus signal is sequentially acquired during a first scan operation for driving the focus lens in one direction, and the drive speed of the focus lens is changed according to the gradient of the focus signal with respect to the position of the focus lens.
A second driving unit configured to drive the focus lens in one direction after detecting a first focus lens position at which the focus signal obtained in the first scan operation reaches a peak when the first condition is satisfied; The position of the focus lens is controlled based on the position of the second focus lens at which the focus signal obtained in the second scan operation peaks .
The program according to claim 1, wherein the first condition is a case where a difference between the first focus lens position and the position of the focus lens corresponding to the focus signals before and after the first focus lens position exceeds a predetermined value .
JP2011281850A 2011-12-22 2011-12-22 Automatic focus adjustment device, control method thereof, and program Expired - Fee Related JP5904781B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011281850A JP5904781B2 (en) 2011-12-22 2011-12-22 Automatic focus adjustment device, control method thereof, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011281850A JP5904781B2 (en) 2011-12-22 2011-12-22 Automatic focus adjustment device, control method thereof, and program

Publications (3)

Publication Number Publication Date
JP2013130818A JP2013130818A (en) 2013-07-04
JP2013130818A5 JP2013130818A5 (en) 2015-02-05
JP5904781B2 true JP5904781B2 (en) 2016-04-20

Family

ID=48908386

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011281850A Expired - Fee Related JP5904781B2 (en) 2011-12-22 2011-12-22 Automatic focus adjustment device, control method thereof, and program

Country Status (1)

Country Link
JP (1) JP5904781B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6579755B2 (en) * 2015-02-04 2019-09-25 キヤノン株式会社 FOCUS DETECTION DEVICE, ITS CONTROL METHOD, CONTROL PROGRAM, AND IMAGING DEVICE

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06233173A (en) * 1992-11-30 1994-08-19 Gold Star Co Ltd Automatic focusing device of video tape recorder with camera and its method
JP2004325517A (en) * 2003-04-21 2004-11-18 Nikon Corp Imaging unit
JP5020643B2 (en) * 2007-01-17 2012-09-05 キヤノン株式会社 Imaging apparatus and control method thereof

Also Published As

Publication number Publication date
JP2013130818A (en) 2013-07-04

Similar Documents

Publication Publication Date Title
JP4429328B2 (en) Automatic focusing device, control method therefor, and imaging device
JP5408936B2 (en) Automatic focus adjustment device, control method of automatic focus adjustment device, and focus adjustment control program
US8300137B2 (en) Image sensing apparatus providing driving direction of focus lens for attaining in-focus state and control method therefor
JP5213813B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2011248159A (en) Imaging apparatus, imaging system, imaging apparatus control method and program
JP2015094925A (en) Focus adjustment device, focus adjustment method and program, and imaging device having focus adjustment device
JP5641836B2 (en) Automatic focusing device, imaging device, focusing control method and program
US10708503B2 (en) Image capture system, image capturing apparatus, lens unit, control methods therefor, and storage medium
US20130293768A1 (en) Imaging apparatus, imaging method, imaging program and computer readable information recording medium
US9036075B2 (en) Image pickup apparatus, method for controlling the same, and storage medium
JP5030308B2 (en) Automatic focusing device, control method therefor, and imaging device
JP6234016B2 (en) Focus adjustment device, imaging device, and control method thereof
JP6300550B2 (en) Automatic focusing device and automatic focusing method
JP5868163B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, PROGRAM
JP5904781B2 (en) Automatic focus adjustment device, control method thereof, and program
US9277114B2 (en) Image pickup apparatus to which a lens unit with a focus lens is attachable and capable of performing accurate and fast focus detection, method of controlling image pickup apparatus, and non-transitory computer-readable storage medium
JP6105917B2 (en) Focus adjustment apparatus and method, and imaging apparatus
JP2012123339A (en) Focusing device, and control method and program for the same
JP6032884B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, PROGRAM
JP4769667B2 (en) Imaging device
JP6087538B2 (en) Automatic focus detection apparatus, control method therefor, and imaging apparatus
JP6521649B2 (en) Image pickup apparatus, control method thereof and program
JP6202880B2 (en) IMAGING DEVICE, IMAGING SYSTEM, IMAGING DEVICE CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2017146559A (en) Imaging apparatus, control method therefor, program and storage medium
JP6624789B2 (en) Focus control device, control method thereof, control program, and imaging device

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141212

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141212

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150828

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150908

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151102

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160216

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160315

R151 Written notification of patent or utility model registration

Ref document number: 5904781

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees