JP2009092961A - Focusing position control device, focusing position control method, and focusing position control program - Google Patents

Focusing position control device, focusing position control method, and focusing position control program Download PDF

Info

Publication number
JP2009092961A
JP2009092961A JP2007263855A JP2007263855A JP2009092961A JP 2009092961 A JP2009092961 A JP 2009092961A JP 2007263855 A JP2007263855 A JP 2007263855A JP 2007263855 A JP2007263855 A JP 2007263855A JP 2009092961 A JP2009092961 A JP 2009092961A
Authority
JP
Japan
Prior art keywords
detection
focus
predetermined
focus position
detection condition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2007263855A
Other languages
Japanese (ja)
Other versions
JP5257969B2 (en
Inventor
Koki Nakamura
光喜 中村
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2007263855A priority Critical patent/JP5257969B2/en
Publication of JP2009092961A publication Critical patent/JP2009092961A/en
Application granted granted Critical
Publication of JP5257969B2 publication Critical patent/JP5257969B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To achieve high speed focusing by exerting focus control based on image information. <P>SOLUTION: In order to exert AF control by a contrast detection system, the moving range of a focus lens is limited to a range from a position corresponding to the shortest photographing distance to a position corresponding to a specific photographing distance L meeting a zooming magnification or a diaphragm value at the time. The specific photographing distance L is a limiting position that is obtained when the focus lens is moved to a predetermined position and that is on a front side of a permissible focusing range d that includes infinity capable of obtaining a specific focusing distance wide at a depth D of field or on the front side and on a back side thereof. If focusing condition by the AF control is not obtained with the moving range limited, the focus lens is moved to a position in which the permissible focusing range including infinity can be obtained. Then, all subjects from the photographing distance L to the infinity are brought into focus. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、例えばオートフォーカス機能を備えたデジタルカメラに用いて好適な合焦位置制御装置、及び合焦位置制御方法、合焦位置制御プログラムに関するものである。   The present invention relates to an in-focus position control device, an in-focus position control method, and an in-focus position control program suitable for use in, for example, a digital camera having an autofocus function.

従来、被写体をCCDやMOS型の固体撮像素子を用いて撮像するデジタルカメラやデジタルビデオカメラ等の撮像装置においては、通常オートフォーカス機能が設けられており、オートフォーカス方式としてはコントラスト検出方式が一般的である。また、例えば下記特許文献1には、オートフォーカス制御(AF制御)に際して、逐次撮像されるフレーム画像において人物の眼を検出するとともに、検出した位置にフォーカス枠、つまりフォーカス検出エリアを設定する技術が記載されている。
特開2005−128156号公報
Conventionally, an image pickup apparatus such as a digital camera or a digital video camera that picks up an object using a CCD or MOS type solid-state image pickup device is usually provided with an autofocus function, and a contrast detection method is generally used as an autofocus method. Is. Further, for example, Patent Document 1 below discloses a technique for detecting a human eye in a sequentially captured frame image and setting a focus frame, that is, a focus detection area, at a detected position in autofocus control (AF control). Are listed.
JP 2005-128156 A

しかしながら、コントラスト検出方式によるAF制御では、周知のように、画角内に所定のフォーカス枠を設定し、フォーカスレンズを所定のステップ幅で光軸方向に移動させながら、上記フォーカス枠内の画像情報に基づき位置毎にAF評価値(高周波数成分の積分値等)を取得するといった繰り返し処理が必要である。   However, in AF control using the contrast detection method, as is well known, a predetermined focus frame is set within the angle of view, and the image information in the focus frame is moved while moving the focus lens in the optical axis direction with a predetermined step width. It is necessary to perform an iterative process such as obtaining an AF evaluation value (such as an integrated value of a high-frequency component) for each position based on.

また、前述したようにフォーカス枠の設定を目的として、フレーム画像において人物の眼等の特定の対象物を検出する際にも、検出すべき対象物の数や大きさが決まっていないため、対象物のサイズを小さなサイズから徐々に大きなサイズへ変化させながら、かつフレーム画像内におけるサーチ位置を変化させながら対象物を検出するといった繰り返し処理が必要である。   Further, as described above, when detecting a specific target object such as a human eye in a frame image for the purpose of setting a focus frame, the number and size of the target objects to be detected are not determined. It is necessary to perform an iterative process of detecting an object while changing the search position in the frame image while gradually changing the size from a small size to a large size.

係ることから画像情報に基づいたフォーカス制御によるピント合わせには時間が係るという問題があった。   Therefore, there is a problem that it takes time to focus by focus control based on image information.

本発明は、かかる従来の課題に鑑みてなされたものであり、画像情報に基づいたフォーカス制御によるピント合わせの高速化を図ることが可能な合焦位置制御装置、及び合焦位置制御方法、合焦位置制御プログラムを提供することを目的とする。   The present invention has been made in view of such a conventional problem, and an in-focus position control device, an in-focus position control method, an in-focus position control apparatus, and an in-focus position control method capable of achieving high-speed focusing by focus control based on image information. An object is to provide a focal position control program.

前記課題を解決するため請求項1記載の発明に係る合焦位置制御装置にあっては、被写体を撮像し画像情報を取得する撮像手段と、この撮像手段により取得される画像情報に基づき、合焦位置の制御に要する所定情報を、所定のパラメータの値を変化させながら繰り返し検出する検出手段と、この検出手段により検出された所定情報に基づき合焦位置を自動調整する調整手段と、前記検出手段が所定情報を検出する際の検出条件として、前記所定のパラメータの値の変化範囲を、光学特性を決める現在の撮影条件に応じた範囲とする検出条件を設定する検出条件設定手段とを備えたことを特徴とする。   In order to solve the above-mentioned problem, the in-focus position control apparatus according to the first aspect of the present invention is based on an image capturing unit that captures an image of a subject and acquires image information, and an image information acquired by the image capturing unit. Detection means for repeatedly detecting predetermined information required for controlling the focal position while changing the value of a predetermined parameter, adjustment means for automatically adjusting the in-focus position based on the predetermined information detected by the detection means, and the detection As a detection condition when the means detects the predetermined information, a detection condition setting means is provided for setting a detection condition in which a change range of the value of the predetermined parameter is a range corresponding to a current photographing condition for determining optical characteristics. It is characterized by that.

また、請求項2記載の発明に係る合焦位置制御装置にあっては、前記検出条件設定手段は、前記検出条件として、撮影条件により変化する被写界深度が深くなるほど前記所定のパラメータの値の変化範囲が狭くなる検出条件を設定することを特徴とする。   In the in-focus position control apparatus according to the second aspect of the invention, the detection condition setting means may be configured such that, as the detection condition, the value of the predetermined parameter increases as the depth of field that changes according to the shooting condition increases. A detection condition for narrowing the change range is set.

また、請求項3記載の発明に係る合焦位置制御装置にあっては、前記検出条件設定手段により設定された検出条件に従った前記検出手段による検出動作で前記所定情報が検出されなかった場合、前記調整手段に、所定の合焦精度が得られる無限遠を含む撮影距離範囲を前記撮影条件において確保する所定位置へフォーカスレンズを移動させる調整動作を行わせる制御手段を備えたことを特徴とする。   In the in-focus position control device according to the third aspect of the invention, when the predetermined information is not detected by the detection operation by the detection unit in accordance with the detection condition set by the detection condition setting unit. The adjustment means includes control means for performing an adjustment operation of moving the focus lens to a predetermined position that secures a shooting distance range including infinity at which the predetermined focusing accuracy is obtained under the shooting conditions. To do.

また、請求項4記載の発明に係る合焦位置制御装置にあっては、前記検出手段が、前記検出条件設定手段により設定された検出条件に従い前記所定情報を検出した時点で設定していた所定のパラメータの値に基づき被写体距離を特定する特定手段を更に備え、前記制御手段は、前記検出条件設定手段により設定された検出条件に従った前記検出手段による検出動作で前記所定情報が検出された場合、前記特定手段により特定される被写体距離に応じた位置へフォーカスレンズを移動させる合焦位置の調整動作を前記調整手段に行わせることを特徴とする。   Further, in the in-focus position control apparatus according to the invention of claim 4, the predetermined setting set when the detection means detects the predetermined information according to the detection condition set by the detection condition setting means. A specifying unit that specifies a subject distance based on a parameter value of the parameter, and the control unit detects the predetermined information by a detection operation by the detection unit according to a detection condition set by the detection condition setting unit. In this case, the adjusting unit causes the adjusting unit to perform an adjustment operation of the in-focus position for moving the focus lens to a position corresponding to the subject distance specified by the specifying unit.

また、請求項5記載の発明に係る合焦位置制御装置にあっては、前記撮影条件にはズーム倍率が含まれることを特徴とする。   In the in-focus position control apparatus according to the fifth aspect of the invention, the photographing condition includes a zoom magnification.

また、請求項6記載の発明に係る合焦位置制御装置にあっては、前記撮影条件には絞り値が含まれることを特徴とする。   In the in-focus position control apparatus according to the sixth aspect of the invention, the photographing condition includes an aperture value.

また、請求項7記載の発明に係る合焦位置制御装置にあっては、前記検出条件設定手段は、前記撮影条件においてフォーカスレンズを所定位置へ移動することにより確保可能な、所定の合焦精度が得られる無限遠を含む撮影距離範囲に基づいて、前記検出手段が所定情報を検出する際の検出条件を設定することを特徴とする。   In the in-focus position control device according to claim 7, the detection condition setting means has a predetermined focus accuracy that can be secured by moving a focus lens to a predetermined position under the photographing condition. On the basis of an imaging distance range including infinity that provides the detection condition, the detection unit sets a detection condition for detecting predetermined information.

また、請求項8記載の発明に係る合焦位置制御装置にあっては、前記検出手段は、前記撮像手段により取得された画像情報に基づいて画像内における人物の顔部分に対応する領域を示す領域情報を前記所定情報として検出し、前記調整手段は、前記検出手段により検出された前記領域情報により示される顔部分に対応する領域をフォーカス検出エリアとして合焦位置を自動調整し、前記検出条件設定手段は、前記検出手段が前記領域情報を検出する際の検出条件として、画角内において検出すべき顔部分に対応する領域の大きさの範囲を設定することを特徴とする。 また、請求項9記載の発明に係る合焦位置制御装置にあっては、前記検出手段は、フォーカスレンズを移動させながら、前記撮像手段により取得された画像情報に基づくAF評価値を前記所定情報として検出し、前記調整手段は、前記フォーカスレンズの位置を前記検出手段により検出されたAF評価値がピークとなる特定位置に制御することにより合焦位置を自動調整し、前記検出条件設定手段は、前記検出手段が前記AF評価値を検出する際の検出条件として、前記フォーカスレンズの移動範囲を設定することを特徴とする。   In the in-focus position control apparatus according to the eighth aspect of the invention, the detection means indicates an area corresponding to a human face portion in the image based on the image information acquired by the imaging means. The area information is detected as the predetermined information, and the adjustment means automatically adjusts the in-focus position using the area corresponding to the face portion indicated by the area information detected by the detection means as a focus detection area, and the detection condition The setting means sets a size range of an area corresponding to a face portion to be detected within an angle of view as a detection condition when the detection means detects the area information. In the in-focus position control apparatus according to the ninth aspect of the present invention, the detection means uses the AF evaluation value based on the image information acquired by the imaging means while moving the focus lens as the predetermined information. The adjustment means automatically adjusts the in-focus position by controlling the position of the focus lens to a specific position where the AF evaluation value detected by the detection means reaches a peak, and the detection condition setting means The moving range of the focus lens is set as a detection condition when the detection unit detects the AF evaluation value.

また、請求項10記載の発明に係る合焦位置制御装置にあっては、前記検出条件設定手段は、前記フォーカスレンズの移動範囲の遠点側の限界位置を、前記撮影条件において前記フォーカスレンズを所定位置へ移動することにより確保可能な、所定の合焦精度が得られる無限遠を含む撮影距離範囲の近距離側の限界位置以遠の所定の撮影距離に対応する位置に設定することを特徴とする。   In the in-focus position control apparatus according to claim 10, the detection condition setting means sets the limit position on the far point side of the movement range of the focus lens to the focus lens in the photographing condition. It is characterized by being set to a position corresponding to a predetermined shooting distance beyond a limit position on the near side of a shooting distance range including infinity that can be secured by moving to a predetermined position and that can obtain a predetermined focusing accuracy. To do.

また、請求項11記載の発明に係る合焦位置制御方法にあっては、光学特性を決める現在の撮影条件に応じて検出条件を設定する工程と、設定した検出条件に従って、撮像手段により取得された画像情報に基づき合焦位置の制御に要する所定情報を、所定のパラメータの値を変化させながら繰り返し検出する工程と、検出した所定情報に基づき合焦位置を自動調整する工程とを備えたことを特徴とする。   In the in-focus position control method according to the eleventh aspect of the present invention, the step of setting the detection condition in accordance with the current photographing condition for determining the optical characteristic and the image pickup means are obtained according to the set detection condition. A step of repeatedly detecting predetermined information required for controlling the in-focus position based on the image information while changing a value of a predetermined parameter, and a step of automatically adjusting the in-focus position based on the detected predetermined information. It is characterized by.

また、請求項12記載の発明にあっては、コンピュータを、撮像手段により取得された画像情報に基づき、合焦位置の制御に要する所定情報を、所定のパラメータの値を変化させながら繰り返し検出する検出手段と、この検出手段により検出された所定情報に基づき合焦位置を自動調整する調整手段と、前記検出手段が所定情報を検出する際の検出条件を、光学特性を決める現在の撮影条件に応じて設定する検出条件設定手段として機能させるための合焦位置制御プログラムとした。   In the twelfth aspect of the invention, the computer repeatedly detects the predetermined information required for controlling the in-focus position while changing the value of the predetermined parameter based on the image information acquired by the imaging means. Detection means, adjustment means for automatically adjusting the in-focus position based on the predetermined information detected by the detection means, and detection conditions when the detection means detects the predetermined information as current imaging conditions for determining optical characteristics An in-focus position control program for functioning as detection condition setting means that is set accordingly is provided.

本発明によれば、画像情報に基づいたフォーカス制御によるピント合わせの高速化を図ることが可能となる。   According to the present invention, it is possible to increase the speed of focusing by focus control based on image information.

以下、本発明の一実施の形態を図にしたがって説明する。図1は、本発明に係るデジタルカメラの構成を示すブロック図である。本実施形態のデジタルカメラはコントラスト検出方式によるオートフォーカス(AF)機能、自動露出(AE)機能、顔検出機能とを備えたものであって、以下の構成を有している。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a digital camera according to the present invention. The digital camera of this embodiment includes an autofocus (AF) function, an automatic exposure (AE) function, and a face detection function based on a contrast detection method, and has the following configuration.

すなわちレンズブロック1には、カメラ本体の鏡筒2内に設けられたシャッター3、絞り4、ズームレンズ5及びフォーカスレンズ6を含むレンズ群からなる光学系が設けられている。ズームレンズ5及びフォーカスレンズ6は、鏡筒2内の図示しない駆動機構により機械的に光軸方向に移動可能となっている。   That is, the lens block 1 is provided with an optical system including a lens group including a shutter 3, a diaphragm 4, a zoom lens 5, and a focus lens 6 provided in a lens barrel 2 of the camera body. The zoom lens 5 and the focus lens 6 can be mechanically moved in the optical axis direction by a drive mechanism (not shown) in the lens barrel 2.

レンズブロック1には、シャッター3を開閉駆動するシャッター用アクチュエータ7と、絞り4を駆動する絞り用アクチュエータ8、前記駆動機構によりズームレンズ5及びフォーカスレンズ6を駆動するズームモータ9及びフォーカスモータ10、ズームレンズ5及びフォーカスレンズ6の移動位置をそれぞれ検出するためのズーム位置検出センサ11及びフォーカス位置検出センサ12が設けられている。   The lens block 1 includes a shutter actuator 7 for opening and closing the shutter 3, a diaphragm actuator 8 for driving the diaphragm 4, a zoom motor 9 and a focus motor 10 for driving the zoom lens 5 and the focus lens 6 by the driving mechanism, A zoom position detection sensor 11 and a focus position detection sensor 12 are provided for detecting the movement positions of the zoom lens 5 and the focus lens 6, respectively.

上記の各アクチュエータ7,8及び各モータ9,10は、ドライバーブロック13に設けられた絞り用(Iris)、シャッター用(Shutter)、ズーム用(ZOOM)、フォーカス用(Focus)の各ドライバー14〜17によって駆動される。   The actuators 7 and 8 and the motors 9 and 10 are provided on the driver block 13 for the iris (Iris), shutter (Shutter), zoom (ZOOM), and focus (Focus) drivers 14 to 14, respectively. 17 is driven.

また、デジタルカメラは、前述した光学系の光軸後方に配置された撮像手段であるCCD19と、CDS(Correlated Double Sampling)/ADブロック20、TG(Timing Generator)21とからなるCCD撮像系ブロック18を有している。   The digital camera has a CCD imaging system block 18 comprising a CCD 19, which is an imaging means arranged behind the optical axis of the optical system, a CDS (Correlated Double Sampling) / AD block 20, and a TG (Timing Generator) 21. have.

CCD19は、動作モードが記録モードに設定されているとき、光学系により結像された被写体の光像を光電変換するとともに、TG21によって走査駆動され所定のフレームレートで1画面分の光電変換出力を出力する。CDS/ADブロック20は、CCD19から出力された後、RGBの色成分毎に適宜ゲイン調整されたアナログの出力信号に対する相関二重サンプリングによるノイズ除去、及びデジタル信号への変換を行い、カラープロセス回路22に出力する。   When the operation mode is set to the recording mode, the CCD 19 photoelectrically converts the light image of the subject imaged by the optical system and scan-driven by the TG 21 to output a photoelectric conversion output for one screen at a predetermined frame rate. Output. The CDS / AD block 20 performs noise removal by correlated double sampling and conversion to a digital signal with respect to an analog output signal that has been appropriately gain-adjusted for each RGB color component after being output from the CCD 19, and is a color process circuit 22 for output.

カラープロセス回路22は、入力した撮像信号に対し画素補間処理を含むカラープロセス処理を施し、デジタル値の輝度信号(Y)及び色差信号(Cb,Cr)を生成し、デジタルカメラ全体を制御するCPU23へ出力する。なお、CPU23は、実際には内部メモリや各種の演算処理回路、データの入出力インターフェース等を備えたマイクロプロセッサーである。   The color process circuit 22 performs color process processing including pixel interpolation processing on the input image pickup signal, generates a digital luminance signal (Y) and color difference signals (Cb, Cr), and controls the entire digital camera. Output to. The CPU 23 is actually a microprocessor having an internal memory, various arithmetic processing circuits, a data input / output interface, and the like.

CPU23に送られたデジタル信号(画像信号)は、画像データとしてDRAM24に一時保存された後、画像表示部25に送られる。画像表示部25はビデオエンコーダー、VRAM、液晶モニタ及びその駆動回路を含み、CPU23を介して送られたデジタル信号に基づき前記ビデオエンコーダーによりビデオ信号が生成され、それに基づく表示画像、すなわちCCD19に撮像されるとともに所定の画素数に間引きされた後の被写体のスルー画像が前記液晶モニタに表示される。   The digital signal (image signal) sent to the CPU 23 is temporarily stored in the DRAM 24 as image data and then sent to the image display unit 25. The image display unit 25 includes a video encoder, a VRAM, a liquid crystal monitor, and a drive circuit thereof. A video signal is generated by the video encoder based on a digital signal sent via the CPU 23 and is displayed on the display image based on the video signal, that is, captured on the CCD 19. In addition, a through image of the subject after being thinned to a predetermined number of pixels is displayed on the liquid crystal monitor.

キー入力部26は電源キー、記録/再生のモード切替スイッチ、シャッターキー、ズームキー、メニューキー等の各種キーにより構成され、ユーザーによるキー操作に応じた操作信号をCPU23に送る。例えば記録モードでシャッターキーが押された撮影操作時には、それを示すトリガー信号をCPU23に出力する。なお、シャッターキーは、半押し操作と全押し操作との2段階操作が可能な所謂ハーフシャッター機能を備えたものであり、半押し操作はAFロックやAEロックに使用され、全押し操作は実際の撮影指示に使用される一般的な構成である。   The key input unit 26 includes various keys such as a power key, a recording / playback mode changeover switch, a shutter key, a zoom key, and a menu key, and sends an operation signal to the CPU 23 according to the key operation by the user. For example, at the time of shooting operation in which the shutter key is pressed in the recording mode, a trigger signal indicating that is output to the CPU 23. The shutter key has a so-called half shutter function that can be operated in two steps, half-press and full-press. The half-press is used for AF lock and AE lock. This is a general configuration used for shooting instructions.

CPU23はトリガー信号が入力すると、それに応じてCCD19から取り込んだ1画面分の画像データをY,Cb,Crのコンポーネント毎に縦8画素×横8画素の基本ブロックと称する基本単位毎にDRAM24から読み出してJPEG回路27に送り、JPEG回路27によりDCT(離散拡散変換)、符号化によって圧縮された1画像分の圧縮データを画像記録部28に記憶する。   When the trigger signal is input, the CPU 23 reads out the image data for one screen captured from the CCD 19 in accordance with the trigger signal from the DRAM 24 for each basic unit called a basic block of 8 vertical pixels × 8 horizontal pixels for each of Y, Cb, and Cr components. The compressed data for one image compressed by DCT (Discrete Diffusion Transform) and encoding by the JPEG circuit 27 is stored in the image recording unit 28.

画像記録部28は、具体的にはカードインターフェース、及びそれを介してCPU23に接続され、かつカメラ本体に着脱自在に装着される不揮発性の各種メモリカードから構成される。画像記録部28に記録された画像データは、再生モードにおいてはCPU23により読み出され、JPEG回路27によって伸張された後、画像表示部25の液晶表示モニタに表示される。   Specifically, the image recording unit 28 includes a card interface and various nonvolatile memory cards that are connected to the CPU 23 via the card interface and are detachably attached to the camera body. The image data recorded in the image recording unit 28 is read by the CPU 23 in the reproduction mode, expanded by the JPEG circuit 27, and then displayed on the liquid crystal display monitor of the image display unit 25.

また、CPU23は、記録モードにおいては、レンズコントロールブロック29に、前述したドライバーブロック13の各ドライバー14〜17へ送る駆動信号を生成させ、それにより絞り4の開度やズームレンズ5及びフォーカスレンズ6の位置、シャッター3の開閉動作を制御する。また、フォーカスモードとしてオートフォーカス・モードが設定されているときには、コントラスト検出方式によりフォーカスレンズ6を合焦位置へ制御する。また、CPU23には、ズーム位置検出センサ11及びフォーカス位置検出センサ12によって検出された各レンズ5,6の位置検出情報がレンズコントロールブロック29を介して逐次入力する。   Further, in the recording mode, the CPU 23 causes the lens control block 29 to generate drive signals to be sent to the drivers 14 to 17 of the driver block 13 described above, whereby the aperture of the diaphragm 4, the zoom lens 5 and the focus lens 6. And the opening / closing operation of the shutter 3 are controlled. When the autofocus mode is set as the focus mode, the focus lens 6 is controlled to the in-focus position by the contrast detection method. Further, the position detection information of the lenses 5 and 6 detected by the zoom position detection sensor 11 and the focus position detection sensor 12 is sequentially input to the CPU 23 via the lens control block 29.

顔検出部30は、記録モードにおいて一定周期で撮像された画像において任意の人物の顔部分を検出し、検出した顔部分に対応する領域(顔領域)の座標情報を取得し、それをCPU23へ出力する。すなわち顔検出部30は本発明の検出手段であり、具体的には画像データの一時記憶メモリや、画像処理回路、顔検出動作に際して使用するパラメータを記憶する複数のレジスタ等から構成されている。なお、本実施形態において顔部分の検出方法は、予め用意(記憶)されている人物の顔に関する輪郭や色等のモデルパターンと特徴が近い顔部分を検出するパターンマッチングによる公知の方法である。   The face detection unit 30 detects a face portion of an arbitrary person in an image captured at a constant period in the recording mode, acquires coordinate information of a region (face region) corresponding to the detected face portion, and sends it to the CPU 23. Output. That is, the face detection unit 30 is a detection unit of the present invention, and specifically includes a temporary storage memory for image data, an image processing circuit, and a plurality of registers for storing parameters used in the face detection operation. In the present embodiment, the face part detection method is a known method based on pattern matching that detects a face part having features similar to a model pattern such as an outline and a color relating to a human face prepared (stored) in advance.

フラッシュメモリ31は、記憶内容の書き換えが可能な不揮発性のメモリであり、フラッシュメモリ31には、CPU23に上述した各部を制御させるとともに、記録モードで後述する処理を行わせることによりCPU23を本発明の検出手段、調整手段、検出条件設定手段、制御手段として機能させるための合焦位置制御プログラムや各種データ、さらにユーザーにより設定されたデジタルカメラの各種機能に関する設定情報等も記憶されている。   The flash memory 31 is a non-volatile memory in which stored contents can be rewritten. The flash memory 31 causes the CPU 23 to control the above-described units and perform the processing described later in the recording mode. A focusing position control program and various data for functioning as detection means, adjustment means, detection condition setting means, and control means, and setting information related to various functions of the digital camera set by the user are also stored.

次に、以上の構成からなるデジタルカメラにおいて、記録モードの下位モードとして予め用意されている人物撮影用のモード(以下、人物撮影モード)が設定されている場合の動作を説明する。   Next, in the digital camera having the above-described configuration, an operation in a case where a human photographing mode (hereinafter, human photographing mode) prepared in advance as a lower mode of the recording mode is set will be described.

図2及び図3は、人物撮影モードが設定された場合におけるCPU23の処理内容を示すフローチャートであって、図2に示したように、CPU23は、人物撮影モードが設定されると、まず予めユーザーにより設定されている被写界深度レベルをフラッシュメモリ31から読み出す(ステップS1)。この被写界深度レベルについては後述する。その後、シャッターが半押しされたら(ステップS2でYES)、現在のズーム倍率、絞り値、許容する被写界深度レベルに応じた、無限遠を含む許容合焦範囲の近点を取得する(ステップS3)。   2 and 3 are flowcharts showing the processing contents of the CPU 23 when the person shooting mode is set. As shown in FIG. 2, the CPU 23 first sets the user shooting mode in advance when the person shooting mode is set. The depth-of-field level set by is read from the flash memory 31 (step S1). This depth of field will be described later. Thereafter, when the shutter button is half-pressed (YES in step S2), the near point of the allowable focus range including infinity according to the current zoom magnification, aperture value, and allowable depth of field is acquired (step). S3).

ここで、上記の被写界深度レベル、及び許容合焦範囲について説明する。すなわち図4(a)は、デジタルカメラにおけるズーム倍率と被写界深度Dとの関係を示した図である。周知のように被写界深度Dはズーム倍率が小さく広角になるほど深く、任意の撮影距離にある特定の被写体Aにピントが合った状態においては被写体Aの手前に浅く、かつ奥に深い特性がある。また、被写界深度Dは撮影距離が長くなるに従い深くなり、さらに絞りの開度を小さくするほど深くなる特性がある。   Here, the depth-of-field level and the allowable focus range will be described. That is, FIG. 4A is a diagram showing the relationship between the zoom magnification and the depth of field D in the digital camera. As is well known, the depth of field D becomes deeper as the zoom magnification becomes smaller and the wide angle is increased. In a state where a specific subject A at an arbitrary shooting distance is in focus, the depth of field D is shallow in front of the subject A and deep in the back. is there. In addition, the depth of field D has a characteristic that it becomes deeper as the shooting distance becomes longer, and becomes deeper as the aperture of the diaphragm becomes smaller.

したがって、被写界深度Dよりも手前、または奥にずれた範囲の被写体ではピントが合わずボケが生じることとなるが、その度合は被写界深度Dの手前側、及び奥側の限界位置からの距離に依存しており、限界位置に近いほど小さくなる。つまり限界位置からある程度の範囲内であれば、ピントが完全に合わなくとも(合焦精度が低くとも)、撮影された画像の使用目的によっては何ら問題は生じることがない。   Accordingly, the subject in the range shifted to the front or back of the depth of field D will be out of focus and blur will occur. However, the extent of this is the limit position on the near side and the far side of the depth of field D. Depends on the distance from, and the closer to the limit position, the smaller. In other words, as long as it is within a certain range from the limit position, no problem occurs depending on the purpose of use of the photographed image even if the focus is not completely achieved (even if the focusing accuracy is low).

前述した被写界深度レベルは、上記観点に基づき撮影画像の主要被写体(人物)部分に最低限確保すべき合焦精度を示すものであって、例えば記録する画像サイズに応じて自動的に設定しておいたり、設定可能な複数のレベルの中からユーザーに撮影画像の使用目的に応じて選択させておいたりする。許容合焦範囲dは、上記の被写界深度レベルに応じた撮影距離範囲であり、図4(b)に示したように被写界深度Dよりも深い範囲である。   The depth-of-field level described above indicates the focusing accuracy that should be ensured at the minimum in the main subject (person) portion of the photographed image based on the above viewpoint, and is automatically set according to the size of the image to be recorded, for example. The user can select from a plurality of levels that can be set according to the purpose of use of the photographed image. The allowable focus range d is a shooting distance range corresponding to the above-mentioned depth of field, and is a range deeper than the depth of field D as shown in FIG.

そして、ステップS3では、現在のズーム倍率、絞り値、許容する被写界深度レベルに対応するとともに、撮影距離を近距離から遠距離に変化させたとき、その奥側の限界位置が図示したように無限遠となる許容合焦範囲dの手前側の限界位置に相当する撮影距離である近点Lを所定の演算式を用いて演算により取得する。   In step S3, the current zoom magnification, aperture value, and allowable depth of field level, as well as the limit position on the far side when the shooting distance is changed from a short distance to a long distance, are illustrated. The near point L, which is the photographing distance corresponding to the limit position on the near side of the allowable focusing range d at infinity, is obtained by calculation using a predetermined calculation formula.

引き続き、ステップS4では、現在のズーム倍率と許容合焦範囲dの近点Lとに基づき、フレーム毎に撮像される画像(以下、フレーム画像)から前記顔検出部30によって検出すべき顔の最小サイズ、つまり顔部分に対応する領域の最小サイズを決定する。ここで決定する最小サイズは、撮影対象である人物までの距離が許容合焦範囲dの近点Lであると仮定したときのフレーム画像内における顔の最小サイズであり、具体的には以下のようにして決定する。   Subsequently, in step S4, based on the current zoom magnification and the near point L of the allowable focusing range d, the minimum face to be detected by the face detection unit 30 from an image captured for each frame (hereinafter referred to as a frame image). The size, that is, the minimum size of the area corresponding to the face portion is determined. The minimum size determined here is the minimum size of the face in the frame image when it is assumed that the distance to the person to be imaged is the near point L of the allowable focus range d. In this way.

すなわち一般的な人物の顔の大きさの最小サイズは既知である一方、フレーム画像内における顔のサイズは、ズーム倍率が大きいほど、また撮影距離が短い(近い)ほど大きくなり、逆にズーム倍率が小さいほど、また撮影距離が長い(遠い)ほど小さくなる。図5はそれを示した図であって、ズーム倍率が最大(図の例では5倍)で、かつ撮影距離が最短(最短撮影距離、図の例では1m)のときのフレーム画像内における顔のサイズを基準(100%)とした場合における、任意のズーム倍率と撮影距離との組合せに応じたフレーム画像内における顔のサイズの変化を示した図である。   That is, while the minimum size of a general human face is known, the face size in a frame image increases as the zoom magnification increases and the shooting distance decreases (closer), and conversely the zoom magnification. Is smaller and the shooting distance is longer (far). FIG. 5 shows this, and the face in the frame image when the zoom magnification is the maximum (5 in the example in the figure) and the shooting distance is the shortest (the shortest shooting distance, 1 m in the example in the figure). FIG. 6 is a diagram showing a change in the size of a face in a frame image according to a combination of an arbitrary zoom magnification and a shooting distance when the size of the image is used as a reference (100%).

そして、ステップS4では、上記の関係に基づき用意されている、一般的な人物の顔の大きさの最小サイズを固定値とし、かつ現在のズーム倍率と許容合焦範囲dの近点Lを変数とする所定の関数式を用いて前述した顔の最小サイズを決定(演算)する。   In step S4, the minimum size of the general human face size prepared based on the above relationship is set as a fixed value, and the current zoom magnification and the near point L of the allowable focusing range d are set as variables. The minimum face size described above is determined (calculated) using a predetermined function formula.

その後、CPU23は、逐次取得されるフレーム画像から検出すべき顔のカレントサイズを設定可能な最大サイズに設定した後(ステップS5)、前述したパターンマッチングによる顔検出を行わせる。すなわち、前記顔検出部30にフレーム画像の各部を対象とし、顔パターン情報との特徴点の一致度を取得させる(ステップS6)。そして、上記一致度が基準以上でなければ(ステップS7でNO)、検出すべき顔のカレントサイズを減少させるとともに(ステップS8)、カレントサイズがステップS4で決定した最小サイズ以上であれば(ステップS9でNO)、そのカレントサイズで前記一致度を再び取得する。   Thereafter, the CPU 23 sets the current size of the face to be detected from the sequentially acquired frame images to a settable maximum size (step S5), and then performs face detection by the above-described pattern matching. That is, the face detection unit 30 targets each part of the frame image and acquires the degree of coincidence of feature points with the face pattern information (step S6). If the degree of coincidence is not greater than the reference (NO in step S7), the current size of the face to be detected is reduced (step S8), and if the current size is greater than or equal to the minimum size determined in step S4 (step S8). NO in S9), the degree of coincidence is acquired again with the current size.

これ以後、顔検出部30に、検出すべき顔のカレントサイズの減少、及び特徴点の一致度の取得を繰り返し行わせるとともに(ステップS6〜S8)、その間に検出すべき顔のカレントサイズを減少させたとき、それがステップS4で決定した最小サイズよりも小さくなった場合には(ステップS9でYES)、その時点で直ちに顔検出動作を打ち切り、図3のステップS18へ進む。   Thereafter, the face detection unit 30 is caused to repeatedly reduce the current size of the face to be detected and acquire the feature point coincidence (steps S6 to S8), and reduce the current size of the face to be detected in the meantime. If it is smaller than the minimum size determined in step S4 (YES in step S9), the face detection operation is immediately stopped at that time, and the process proceeds to step S18 in FIG.

ステップS18では、フォーカスレンズ6を、前述した現在のズーム倍率、絞り値、許容する被写界深度レベルに対応するとともに、奥側の限界位置が無限遠となる許容合焦範囲dが得られる位置、つまり許容合焦範囲dの近点Lから無限遠までの範囲内の全ての被写体にピントが合うようになる位置へ移動する。   In step S18, the focus lens 6 corresponds to the above-described current zoom magnification, aperture value, and allowable depth of field, and a position where an allowable in-focus range d where the limit position on the back side is infinite is obtained. That is, the lens moves to a position where all the subjects in the range from the near point L to infinity of the allowable focusing range d are in focus.

その後、シャッターキーが全押しされることなく、その半押し状態が解除された場合には(ステップS19がNO、ステップS20でYES)、前述したステップS2へ戻り、前述した処理を繰り返す。また、シャッターキーが全押しされたら(ステップS19でYES)、それに応答して撮影及び、撮影画像の記録処理を行い(ステップS21)、人物撮影モードによる1回の撮影動作を完了する。   Thereafter, when the half-pressed state is released without fully pressing the shutter key (NO in step S19, YES in step S20), the process returns to the above-described step S2 and the above-described processing is repeated. If the shutter key is fully pressed (YES in step S19), in response to this, shooting and shooting image recording processing are performed (step S21), and one shooting operation in the person shooting mode is completed.

一方、検出すべき顔のカレントサイズがステップS4で決定した最小サイズよりも小さくなる以前の段階で前記一致度が基準以上となったら(ステップS7でYES)、つまりフレーム画像内のいずれかの位置に、その時点で設定されているカレントサイズの顔部分が検出できたら、その顔部分に、後述するAF動作に際してコントラスト情報に基づくAF評価値の取得対象となるフォーカス枠、つまりフォーカス検出エリアを設定する(ステップS10)。なお、このときには、フォーカス枠を前記液晶モニタに表示中のスルー画像上にも表示させる。   On the other hand, if the degree of coincidence exceeds a reference level before the current size of the face to be detected becomes smaller than the minimum size determined in step S4 (YES in step S7), that is, any position in the frame image If a face portion of the current size set at that time can be detected, a focus frame, that is, a focus detection area, for which an AF evaluation value based on contrast information is acquired in the AF operation described later is set for the face portion. (Step S10). At this time, the focus frame is also displayed on the through image being displayed on the liquid crystal monitor.

引き続き、図3に示したようにCPU23は、まず、フォーカスサーチ範囲(フォーカスレンズ6の移動範囲)の遠点側の限界位置を、前述した許容合焦範囲dの近点Lに応じた位置に設定する(ステップS11)。次に、フォーカスレンズ6をフォーカスサーチ範囲の近点側の初期位置へ移動し(ステップS12)、前述した顔部分に設定したフォーカス枠、または画面中央部に設定したフォーカス枠を対象としてAF評価値を取得する(ステップS13)。   Subsequently, as shown in FIG. 3, the CPU 23 first sets the far limit side limit position of the focus search range (the movement range of the focus lens 6) to a position corresponding to the near point L of the allowable focusing range d described above. Set (step S11). Next, the focus lens 6 is moved to the initial position on the near side of the focus search range (step S12), and the AF evaluation value for the focus frame set in the above-described face portion or the focus frame set in the center of the screen is targeted. Is acquired (step S13).

そして、AF評価値のピークが確認できなければ(ステップS14でNO)、フォーカスレンズ6を遠点側へ1ステップ分移動させるとともに(ステップS15)、移動後の位置がステップS12で設定した限界位置を超えていなければ(ステップS16でNO)、AF評価値を再び取得する(ステップS13)。   If the AF evaluation value peak cannot be confirmed (NO in step S14), the focus lens 6 is moved to the far point side by one step (step S15), and the moved position is the limit position set in step S12. If it does not exceed (NO in step S16), the AF evaluation value is acquired again (step S13).

これ以後は、フォーカスレンズ6の移動、及びAF評価値の取得、AF評価値のピーク確認を繰り返し(ステップS13〜S15)、その間にAF評価値のピークが確認できたら(ステップS14でYES)、つまり検出した人物の顔部分にピントがあったと判断できたら、フォーカスレンズ6をその位置に固定する(ステップS17)。   Thereafter, the movement of the focus lens 6, the acquisition of the AF evaluation value, and the peak check of the AF evaluation value are repeated (steps S13 to S15), and if the peak of the AF evaluation value can be confirmed during that time (YES in step S14), In other words, if it can be determined that the detected face portion of the person is in focus, the focus lens 6 is fixed at that position (step S17).

また、フォーカスレンズ6を遠点側へ1ステップ分移動させたとき、その位置がステップS12で設定した遠点側の限界位置を超える場合には(ステップS16でYES)、その時点で直ちに通常のAF処理を打ち切り、フォーカスレンズ6を、前述した現在のズーム倍率、絞り値、許容する被写界深度レベルに対応するとともに、奥側の限界位置が無限遠となる許容合焦範囲dが得られる位置へ移動し、許容合焦範囲dの近点Lから無限遠までの範囲内の全ての被写体にピントが合う状態とする(ステップS18)。   When the focus lens 6 is moved to the far point side by one step and the position exceeds the limit position on the far point side set in step S12 (YES in step S16), a normal operation is immediately performed at that time. The AF process is terminated, and the focus lens 6 corresponds to the above-described current zoom magnification, aperture value, and allowable depth of field, and an allowable in-focus range d where the limit position on the back side is infinite is obtained. The lens is moved to the position, and all the subjects in the range from the near point L to the infinity of the allowable focusing range d are brought into focus (step S18).

その後は、前述したようにシャッターキーが全押しされることなく、その半押し状態が解除された場合には(ステップS19がNO、ステップS20でYES)、前述したステップS2へ戻り、前述した処理を繰り返す。また、シャッターキーが全押しされたら(ステップS19でYES)、それに応答して撮影及び、撮影画像の記録処理を行い(ステップS21)、人物撮影モードによる1回の撮影動作を完了する。   Thereafter, as described above, when the shutter key is not fully pressed and the half-pressed state is released (step S19 is NO, step S20 is YES), the process returns to the above-described step S2, and the processing described above is performed. repeat. If the shutter key is fully pressed (YES in step S19), in response to this, shooting and shooting image recording processing are performed (step S21), and one shooting operation in the person shooting mode is completed.

以上のように人物撮影モードでは、逐次撮像されるフレーム画像において任意の人物の顔を検出し、検出した顔部分にフォーカス枠を設定してコントラスト検出方式によるAF処理を行うことにより、人物の顔部分に自動的にピント合わせを行うことができる。   As described above, in the human photographing mode, a human face is detected by detecting an arbitrary human face in sequentially captured frame images, setting a focus frame on the detected face portion, and performing AF processing using a contrast detection method. You can focus automatically on the part.

その際、顔検出処理においては、前述したようにフレーム画像において検出すべき顔の最小サイズを、撮影対象である人物までの距離が無限遠を含む許容合焦範囲dの近点Lであると仮定したときの、フレーム画像内におけるズーム倍率に応じた顔の最小サイズに設定するようにした。つまり検出すべき顔の最小サイズをそのときの撮影条件に応じた光学特性に基づき決めたサイズに制限するようにした。よって、フレーム画像から必要以上に小さな顔を検出するための処理を削減することにより、顔検出に要する処理時間を短縮することができ、その結果、ピント合わせを高速に行うことができる。   At that time, in the face detection process, as described above, the minimum size of the face to be detected in the frame image is the near point L of the allowable in-focus range d including the infinite distance to the person to be photographed. The minimum face size is set according to the zoom magnification in the frame image. In other words, the minimum size of the face to be detected is limited to a size determined based on the optical characteristics according to the photographing conditions at that time. Therefore, by reducing the processing for detecting a face smaller than necessary from the frame image, the processing time required for face detection can be shortened, and as a result, focusing can be performed at high speed.

また、フォーカス枠を設定した後のAF処理においては、前述したようにフォーカスサーチ範囲(フォーカスレンズ6の移動範囲)の遠点側の限界位置を、奥側の限界位置が無限遠となる許容合焦範囲dの近点Lに応じた位置に設定して通常のAF制御を実施し、つまりフォーカスサーチ範囲の遠点側の限界位置をそのときの撮影条件に応じた光学特性に基づき決めた制限した状態でピント合わせを行う一方、ピントが合った状態が確認できない場合(AF評価値のピークが確認できない場合)には、フォーカスレンズ6を、奥側の限界位置が無限遠となる許容合焦範囲dが得られる位置へ移動することにより、許容合焦範囲dの近点Lから無限遠までの範囲の被写体の全てにピントが合った状態を確保するようにした。よって、AF処理時におけるフォーカスサーチ範囲を削減することにより、AF処理それ自体に要する時間を短縮することができ、これによってもピント合わせを高速に行うことができる。   Further, in the AF processing after setting the focus frame, as described above, the limit position on the far point side of the focus search range (the movement range of the focus lens 6) is set as the allowable limit at which the limit position on the far side becomes infinity. A normal AF control is performed by setting the position in accordance with the near point L of the focus range d, that is, the limit position determined based on the optical characteristics according to the shooting conditions at that time in the far point side of the focus search range. While focusing is performed in the focused state, if the focused state cannot be confirmed (when the peak of the AF evaluation value cannot be confirmed), the focus lens 6 is allowed to be in focus so that the limit position on the far side becomes infinity. By moving to a position where the range d can be obtained, a state where all the subjects in the range from the near point L to the infinity of the allowable focusing range d are in focus is ensured. Therefore, by reducing the focus search range at the time of AF processing, the time required for AF processing itself can be shortened, and focusing can also be performed at high speed.

ここで、本実施形態においては、前述したフォーカスサーチ範囲の遠点側の限界位置を、奥側の限界位置が無限遠となる許容合焦範囲dの近点Lに応じた位置に設定したが、これに限らず、上記近点Lよりも無限遠側の撮影距離であれば任意の撮影距離に対応する位置に設定してもよい。ただし、その場合には、AF処理それ自体に要する時間の短縮効果は、本実施形態に比べて低下することとなる。   Here, in the present embodiment, the limit position on the far point side of the focus search range described above is set to a position corresponding to the near point L of the allowable focusing range d where the limit position on the back side is infinity. However, the present invention is not limited to this, and a position corresponding to an arbitrary shooting distance may be set as long as the shooting distance is at infinity from the near point L. In this case, however, the effect of shortening the time required for the AF process itself is reduced as compared with the present embodiment.

また、本実施形態においては、顔検出処理において検出すべき顔の最小サイズや、通常のAF制御時におけるフォーカスサーチ範囲の遠点側の限界位置を、奥側の限界位置が無限遠となる許容合焦範囲dであって、現在のズーム倍率と絞り値と許容する被写界深度レベルに応じた撮影処理範囲の近点Lに基づいて設定するようにしたが、許容合焦範囲dについては、それに代えて現在のズーム倍率と絞り値とに応じた被写界深度Dを用いることもできる。つまり許容する被写界深度レベルを最大レベルとしてもよい。   In the present embodiment, the minimum size of the face to be detected in the face detection process, the limit position on the far point side of the focus search range during normal AF control, and the limit position on the far side are allowed to be infinite. The in-focus range d is set based on the near point L of the imaging processing range in accordance with the current zoom magnification, aperture value, and allowable depth of field. Alternatively, the depth of field D according to the current zoom magnification and aperture value can be used. That is, the allowable depth of field may be set to the maximum level.

ただし本実施形態のように許容合焦範囲dを用いた方が、顔検出処理において検出すべき顔のサイズ幅をより狭くすることができ、また通常のAF制御時におけるフォーカスサーチ範囲をより狭くすることができるため、ピント合わせをより高速に行うことができる。   However, using the allowable focus range d as in this embodiment can narrow the face size width to be detected in the face detection process, and the focus search range during normal AF control is narrower. Therefore, focusing can be performed at a higher speed.

また、本実施形態においては、顔検出処理と、顔検出処理により検出した顔部分をフォーカス枠とするAF処理との双方に本発明を適用した場合について説明したが、本発明は、顔検出を伴わないコントラスト検出方式によるAF処理のみを行う場合にも適用することができ、その場合であっても、AF処理それ自体に要する時間を短縮することができ、任意の主要被写体に対するピント合わせを高速に行うことが可能となる。   In the present embodiment, the case where the present invention is applied to both the face detection process and the AF process using the face portion detected by the face detection process as a focus frame has been described. The present invention can also be applied to the case where only AF processing using a contrast detection method that is not accompanied is performed, and even in such a case, the time required for AF processing itself can be reduced, and focusing on an arbitrary main subject can be performed at high speed. Can be performed.

また、顔検出処理を行い、検出した顔部分をフォーカス枠とするAF処理を行う場合については以下のようにしてもよい。すなわち顔検出処理のみを本実施形態と同様に行い、AF処理についてはフォーカスサーチ範囲を制限しない通常のAF処理を行うようにしたり、顔検出処理については検出すべき顔の最小サイズを特に制限しない通常の処理を行うものとし、AF処理のみを本実施形態と同様の処理とするようにしたりしても構わない。すなわち前者の場合には顔検出処理の高速化によってピント合わせを高速に行うことができ、後者の場合にはAF処理それ自体の高速化によってピント合わせを高速に行うことができる。   In addition, the face detection process may be performed and the AF process using the detected face portion as a focus frame may be performed as follows. That is, only face detection processing is performed in the same manner as in the present embodiment, and normal AF processing that does not limit the focus search range is performed for AF processing, and the minimum size of the face to be detected is not particularly limited for face detection processing. Ordinary processing may be performed, and only AF processing may be the same processing as in the present embodiment. That is, in the former case, focusing can be performed at high speed by increasing the speed of the face detection process, and in the latter case, focusing can be performed at high speed by increasing the speed of the AF process itself.

また、本実施形態においては、顔検出処理において検出すべき顔のサイズを変化させる繰り返し処理と、AF処理においてフォーカスレンズの位置を変化させる繰り返し処理とを別々のタイミングで実行し、顔検出処理により顔部分をいったん検出した後、検出した顔部分をフォーカス検出エリアに設定してAF動作を行うものについて説明したが、これとは別に以下のようにしてもよい。   In this embodiment, the iterative process for changing the size of the face to be detected in the face detection process and the iterative process for changing the position of the focus lens in the AF process are executed at different timings. In the above description, the face portion is detected once, and then the detected face portion is set as a focus detection area and the AF operation is performed. Alternatively, the following may be performed.

すなわち、AF処理と顔検出処理とを同時に実行し、AF処理においてフォーカスレンズの位置を変化させる繰り返し処理の中において、フォーカスレンズを各位置に移動する毎に、検出すべき顔のサイズを指定された全範囲で変化させる顔検出処理を行い、その間、AF評価値がピークとなる以前であっても顔検出に成功したら、その時点における顔のカレントサイズとズーム倍率とに基づいて撮影距離(被写体距離)を特定し、特定した撮影距離に対応する位置にフォーカスレンズ6を直ちに移動させ、その位置にフォーカスレンズ6を固定させるようにしてもよい。その場合、予め任意のズーム倍率と任意の顔サイズとに対応する撮影距離を示す距離取得テーブルを用意しておくとともに、CPU23を本発明の特定手段として機能させ、CPU23に上記距離取得テーブルから撮影距離を特定させるようにすればよい。   That is, the AF process and the face detection process are executed at the same time, and in the repetitive process of changing the position of the focus lens in the AF process, the face size to be detected is designated each time the focus lens is moved to each position. In the meantime, if face detection is successfully performed even before the AF evaluation value reaches its peak, the shooting distance (subject) is determined based on the current face size and zoom magnification. Distance) is specified, the focus lens 6 may be immediately moved to a position corresponding to the specified shooting distance, and the focus lens 6 may be fixed at that position. In such a case, a distance acquisition table indicating the shooting distance corresponding to an arbitrary zoom magnification and an arbitrary face size is prepared in advance, and the CPU 23 is caused to function as the specifying unit of the present invention, and the CPU 23 performs shooting from the distance acquisition table. The distance may be specified.

また、本実施形態では、シャッターキーが半押しされたことに応答し顔検出処理を行う場合について説明したが、顔検出処理はシャッターキーが半押しされる以前から繰り返し行うようにしても構わない。   In the present embodiment, the case where the face detection process is performed in response to the shutter key being half-pressed has been described. However, the face detection process may be repeatedly performed before the shutter key is half-pressed. .

また、本実施形態においては、フォーカス枠の設定に先立つ顔検出処理において任意の人物の顔部分を検出するようにしたが、これに限らず、予め特定人物の顔画像を記憶しておき、フォーカス枠の設定に先立つ顔検出処理では上記顔画像とのパターンマッチングによる個体識別を含む顔検出を行うようにしてもよい。   In the present embodiment, the face portion of an arbitrary person is detected in the face detection process prior to the setting of the focus frame. However, the present invention is not limited to this. In face detection processing prior to frame setting, face detection including individual identification by pattern matching with the face image may be performed.

また、ここでは本発明を一般的な構成を有するデジタルカメラに適用する場合について説明したが、これに限らず、本発明はコントラスト検出方式のように画像情報に基づいたフォーカス制御が可能であれば、例えば携帯電話端末等の他の情報機器に内蔵されたデジタルカメラや、デジタルビデオカメラ等の他のカメラ装置にも適用することができる。   Although the present invention has been described with reference to a case where the present invention is applied to a digital camera having a general configuration, the present invention is not limited thereto, and the present invention is not limited to this as long as focus control based on image information is possible as in a contrast detection method. For example, the present invention can also be applied to other camera devices such as a digital camera built in another information device such as a mobile phone terminal or a digital video camera.

本発明に係るデジタルカメラのブロック図である。1 is a block diagram of a digital camera according to the present invention. 人物撮影モードが設定された場合におけるCPUの処理内容を示すフローチャートである。It is a flowchart which shows the processing content of CPU when a person photography mode is set. 図2に続くフローチャートである。It is a flowchart following FIG. (a)はズーム倍率と被写界深度との関係、(b)はズーム倍率と許容合焦範囲との関係をそれぞれ示した図である。(A) is a diagram showing the relationship between the zoom magnification and the depth of field, and (b) is a diagram showing the relationship between the zoom magnification and the allowable focus range. ズーム倍率と撮影距離との組合せに応じたフレーム画像内における顔のサイズの変化を示した図である。It is the figure which showed the change of the size of the face in the frame image according to the combination of zoom magnification and imaging distance.

符号の説明Explanation of symbols

1 レンズブロック
5 ズームレンズ
6 フォーカスレンズ
19 CCD
23 CPU
28 画像記録部
29 レンズコントロールブロック
30 顔検出部
31 フラッシュメモリ
A 被写体
D 被写界深度
d 許容合焦範囲
L 近点
1 Lens Block 5 Zoom Lens 6 Focus Lens 19 CCD
23 CPU
28 Image recording unit 29 Lens control block 30 Face detection unit 31 Flash memory A Subject D Depth of field d Permissible focus range L Near point

Claims (12)

被写体を撮像し画像情報を取得する撮像手段と、
この撮像手段により取得される画像情報に基づき、合焦位置の制御に要する所定情報を、所定のパラメータの値を変化させながら繰り返し検出する検出手段と、
この検出手段により検出された所定情報に基づき合焦位置を自動調整する調整手段と、
前記検出手段が所定情報を検出する際の検出条件として、前記所定のパラメータの値の変化範囲を、光学特性を決める現在の撮影条件に応じた範囲とする検出条件を設定する検出条件設定手段と
を備えたことを特徴とする合焦位置制御装置。
Imaging means for imaging a subject and acquiring image information;
Detection means for repeatedly detecting predetermined information required for controlling the in-focus position while changing the value of a predetermined parameter based on image information acquired by the imaging means;
Adjusting means for automatically adjusting the in-focus position based on the predetermined information detected by the detecting means;
A detection condition setting means for setting a detection condition in which the change range of the value of the predetermined parameter is set to a range according to a current photographing condition for determining optical characteristics as a detection condition when the detection means detects the predetermined information; An in-focus position control device comprising:
前記検出条件設定手段は、前記検出条件として、撮影条件により変化する被写界深度が深くなるほど前記所定のパラメータの値の変化範囲が狭くなる検出条件を設定することを特徴とする請求項1記載の合焦位置制御装置。   2. The detection condition setting unit, as the detection condition, sets a detection condition in which a change range of the value of the predetermined parameter becomes narrower as a depth of field that changes according to a shooting condition becomes deeper. In-focus position control device. 前記検出条件設定手段により設定された検出条件に従った前記検出手段による検出動作で前記所定情報が検出されなかった場合、前記調整手段に、所定の合焦精度が得られる無限遠を含む撮影距離範囲を前記撮影条件において確保する所定位置へフォーカスレンズを移動させる調整動作を行わせる制御手段を備えたことを特徴とする請求項1又は2記載の合焦位置制御装置。   When the predetermined information is not detected by the detection operation by the detection unit according to the detection condition set by the detection condition setting unit, the adjustment unit has an imaging distance including infinity at which a predetermined focusing accuracy can be obtained. The in-focus position control apparatus according to claim 1, further comprising a control unit that performs an adjustment operation of moving the focus lens to a predetermined position that secures a range in the photographing condition. 前記検出手段が、前記検出条件設定手段により設定された検出条件に従い前記所定情報を検出した時点で設定していた所定のパラメータの値に基づき被写体距離を特定する特定手段を更に備え、
前記制御手段は、前記検出条件設定手段により設定された検出条件に従った前記検出手段による検出動作で前記所定情報が検出された場合、前記特定手段により特定される被写体距離に応じた位置へフォーカスレンズを移動させる合焦位置の調整動作を前記調整手段に行わせることを特徴とする請求項3記載の合焦位置制御装置。
The detecting means further comprises a specifying means for specifying a subject distance based on a value of a predetermined parameter set when the predetermined information is detected according to the detection condition set by the detection condition setting means;
When the predetermined information is detected by the detection operation by the detection unit according to the detection condition set by the detection condition setting unit, the control unit focuses on a position corresponding to the subject distance specified by the specifying unit. The in-focus position control apparatus according to claim 3, wherein the adjusting means performs an adjustment operation of an in-focus position for moving the lens.
前記撮影条件にはズーム倍率が含まれることを特徴とする請求項1乃至4いずれか記載の合焦位置制御装置。   The in-focus position control apparatus according to claim 1, wherein the photographing condition includes a zoom magnification. 前記撮影条件には絞り値が含まれることを特徴とする請求項1乃至5いずれか記載の合焦位置制御装置。   The in-focus position control apparatus according to claim 1, wherein the photographing condition includes an aperture value. 前記検出条件設定手段は、前記撮影条件においてフォーカスレンズを所定位置へ移動することにより確保可能な、所定の合焦精度が得られる無限遠を含む撮影距離範囲に基づいて、前記検出手段が所定情報を検出する際の検出条件を設定することを特徴とする請求項1乃至6いずれか記載の合焦位置制御装置。   The detection condition setting means is configured to detect the predetermined information based on an imaging distance range including infinity that can be obtained by moving a focus lens to a predetermined position under the imaging conditions and that can obtain a predetermined focusing accuracy. The in-focus position control apparatus according to claim 1, wherein a detection condition for detecting a focus is set. 前記検出手段は、前記撮像手段により取得された画像情報に基づいて画像内における人物の顔部分に対応する領域を示す領域情報を前記所定情報として検出し、
前記調整手段は、前記検出手段により検出された前記領域情報により示される顔部分に対応する領域をフォーカス検出エリアとして合焦位置を自動調整し、
前記検出条件設定手段は、前記検出手段が前記領域情報を検出する際の検出条件として、画角内において検出すべき顔部分に対応する領域の大きさの範囲を設定する
ことを特徴とする請求項1乃至7いずれか記載の合焦位置制御装置。
The detection means detects, as the predetermined information, area information indicating an area corresponding to a human face part in an image based on the image information acquired by the imaging means,
The adjustment means automatically adjusts the in-focus position using a region corresponding to the face portion indicated by the region information detected by the detection unit as a focus detection area,
The detection condition setting means sets a size range of an area corresponding to a face portion to be detected within an angle of view as a detection condition when the detection means detects the area information. Item 8. The focusing position control device according to any one of Items 1 to 7.
前記検出手段は、フォーカスレンズを移動させながら、前記撮像手段により取得された画像情報に基づくAF評価値を前記所定情報として検出し、
前記調整手段は、前記フォーカスレンズの位置を前記検出手段により検出されたAF評価値がピークとなる特定位置に制御することにより合焦位置を自動調整し、
前記検出条件設定手段は、前記検出手段が前記AF評価値を検出する際の検出条件として、前記フォーカスレンズの移動範囲を設定する
ことを特徴とする請求項2乃至7いずれか記載の合焦位置制御装置。
The detection means detects an AF evaluation value based on image information acquired by the imaging means as the predetermined information while moving a focus lens,
The adjusting means automatically adjusts the in-focus position by controlling the position of the focus lens to a specific position where the AF evaluation value detected by the detecting means reaches a peak,
The in-focus position according to any one of claims 2 to 7, wherein the detection condition setting unit sets a moving range of the focus lens as a detection condition when the detection unit detects the AF evaluation value. Control device.
前記検出条件設定手段は、前記フォーカスレンズの移動範囲の遠点側の限界位置を、前記撮影条件において前記フォーカスレンズを所定位置へ移動することにより確保可能な、所定の合焦精度が得られる無限遠を含む撮影距離範囲の近距離側の限界位置以遠の所定の撮影距離に対応する位置に設定することを特徴とする請求項9記載の合焦位置制御装置。   The detection condition setting means is capable of securing a limit position on the far point side of the movement range of the focus lens by moving the focus lens to a predetermined position under the photographing condition, and providing an infinite range with a predetermined focusing accuracy. The in-focus position control apparatus according to claim 9, wherein the in-focus position control device is set to a position corresponding to a predetermined shooting distance beyond a limit position on a short distance side of a shooting distance range including far. 光学特性を決める現在の撮影条件に応じて検出条件を設定する工程と、
設定した検出条件に従って、撮像手段により取得された画像情報に基づき合焦位置の制御に要する所定情報を、所定のパラメータの値を変化させながら繰り返し検出する工程と、
検出した所定情報に基づき合焦位置を自動調整する工程と
を備えたことを特徴とする合焦位置制御方法。
A step of setting detection conditions according to the current shooting conditions for determining optical characteristics;
A step of repeatedly detecting predetermined information required for controlling the in-focus position based on the image information acquired by the imaging means according to the set detection condition while changing the value of the predetermined parameter;
And a step of automatically adjusting the in-focus position based on the detected predetermined information.
コンピュータを、
撮像手段により取得された画像情報に基づき、合焦位置の制御に要する所定情報を、所定のパラメータの値を変化させながら繰り返し検出する検出手段と、
この検出手段により検出された所定情報に基づき合焦位置を自動調整する調整手段と、
前記検出手段が所定情報を検出する際の検出条件を、光学特性を決める現在の撮影条件に応じて設定する検出条件設定手段と
して機能させるための合焦位置制御プログラム。
Computer
Detecting means for repeatedly detecting predetermined information required for controlling the in-focus position based on image information acquired by the imaging means while changing a value of a predetermined parameter;
Adjusting means for automatically adjusting the in-focus position based on the predetermined information detected by the detecting means;
An in-focus position control program for causing detection conditions when the detection means detects predetermined information to function as detection condition setting means for setting the detection conditions according to the current shooting conditions that determine optical characteristics.
JP2007263855A 2007-10-10 2007-10-10 Focus position control device, focus position control method, focus position control program Expired - Fee Related JP5257969B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007263855A JP5257969B2 (en) 2007-10-10 2007-10-10 Focus position control device, focus position control method, focus position control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007263855A JP5257969B2 (en) 2007-10-10 2007-10-10 Focus position control device, focus position control method, focus position control program

Publications (2)

Publication Number Publication Date
JP2009092961A true JP2009092961A (en) 2009-04-30
JP5257969B2 JP5257969B2 (en) 2013-08-07

Family

ID=40665004

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007263855A Expired - Fee Related JP5257969B2 (en) 2007-10-10 2007-10-10 Focus position control device, focus position control method, focus position control program

Country Status (1)

Country Link
JP (1) JP5257969B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015014672A (en) * 2013-07-04 2015-01-22 住友電気工業株式会社 Camera control device, camera system, camera control method and program
JP2015142181A (en) * 2014-01-27 2015-08-03 キヤノン株式会社 Control apparatus and control method
JP2015143815A (en) * 2013-12-27 2015-08-06 キヤノン株式会社 Imaging device, control method of the same, program thereof and recording medium thereof
JP2016009877A (en) * 2014-06-20 2016-01-18 キヤノン株式会社 Control apparatus, control method, and program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002122776A (en) * 2000-10-17 2002-04-26 Sharp Corp Autofocus controller, digital still camera and digital video camera equipped with the same, autofocus control method and recording medium having autofocus control program recorded thereon
JP2006018246A (en) * 2004-06-03 2006-01-19 Canon Inc Imaging apparatus and imaging method
JP2006047645A (en) * 2004-08-04 2006-02-16 Canon Inc Focus adjusting device and method
JP2006208443A (en) * 2005-01-25 2006-08-10 Pentax Corp Automatic focusing apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002122776A (en) * 2000-10-17 2002-04-26 Sharp Corp Autofocus controller, digital still camera and digital video camera equipped with the same, autofocus control method and recording medium having autofocus control program recorded thereon
JP2006018246A (en) * 2004-06-03 2006-01-19 Canon Inc Imaging apparatus and imaging method
JP2006047645A (en) * 2004-08-04 2006-02-16 Canon Inc Focus adjusting device and method
JP2006208443A (en) * 2005-01-25 2006-08-10 Pentax Corp Automatic focusing apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015014672A (en) * 2013-07-04 2015-01-22 住友電気工業株式会社 Camera control device, camera system, camera control method and program
JP2015143815A (en) * 2013-12-27 2015-08-06 キヤノン株式会社 Imaging device, control method of the same, program thereof and recording medium thereof
JP2015142181A (en) * 2014-01-27 2015-08-03 キヤノン株式会社 Control apparatus and control method
US10075647B2 (en) 2014-01-27 2018-09-11 Canon Kabushiki Kaisha Control apparatus, control method, and storage medium
JP2016009877A (en) * 2014-06-20 2016-01-18 キヤノン株式会社 Control apparatus, control method, and program

Also Published As

Publication number Publication date
JP5257969B2 (en) 2013-08-07

Similar Documents

Publication Publication Date Title
JP4674471B2 (en) Digital camera
JP4761146B2 (en) Imaging apparatus and program thereof
JP3823921B2 (en) Imaging device
JP2007108412A (en) Autofocus device and its program
JP5380784B2 (en) Autofocus device, imaging device, and autofocus method
JP2006259688A (en) Image capture device and program
JP2007215091A (en) Imaging apparatus and program therefor
JP2008288911A (en) Imaging apparatus, face area detection program, and face area detection method
JP2006025238A (en) Imaging device
JP2015216485A (en) Imaging device, control method of imaging device, program, and storage medium
JP4775644B2 (en) Imaging apparatus and program thereof
JP4645413B2 (en) Imaging device
JP2006162990A (en) Stereoscopic image photographing apparatus
JP2003307669A (en) Camera
JP2006091915A (en) Imaging apparatus
JP2012194568A (en) Imaging apparatus and program
JP5257969B2 (en) Focus position control device, focus position control method, focus position control program
JP2007225897A (en) Focusing position determination device and method
JP2006349744A (en) Imaging apparatus
JP2008263478A (en) Imaging apparatus
JP2006276683A (en) Imaging apparatus and program
JP5105298B2 (en) Imaging apparatus and program thereof
JP6200240B2 (en) Imaging apparatus, control method therefor, program, and storage medium
JP2013210572A (en) Imaging device and control program of the same
JP4239954B2 (en) Camera device and focusing area control program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100915

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111110

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111122

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120120

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120515

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120809

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20120816

A912 Re-examination (zenchi) completed and case transferred to appeal board

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20120907

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130418

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160502

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5257969

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees