JP2010160297A - Imaging apparatus, automatic focusing method, and computer program - Google Patents

Imaging apparatus, automatic focusing method, and computer program Download PDF

Info

Publication number
JP2010160297A
JP2010160297A JP2009002155A JP2009002155A JP2010160297A JP 2010160297 A JP2010160297 A JP 2010160297A JP 2009002155 A JP2009002155 A JP 2009002155A JP 2009002155 A JP2009002155 A JP 2009002155A JP 2010160297 A JP2010160297 A JP 2010160297A
Authority
JP
Japan
Prior art keywords
area
subject
effective
automatic focusing
feature amount
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.)
Withdrawn
Application number
JP2009002155A
Other languages
Japanese (ja)
Inventor
Kentaro Aoki
健太郎 青木
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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2009002155A priority Critical patent/JP2010160297A/en
Publication of JP2010160297A publication Critical patent/JP2010160297A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To detect the focusing position at a higher speed, with high accuracy by a contrast detection system for a photographic image which includes a high-luminance subject and a low-contrast subject. <P>SOLUTION: The subject is detected from the photographic image by face feature extraction processing and is specialized according to a kind of the subject, or the like, detected in advance, to decide the area which becomes an obstacle to normal arithmetic operation of an AF evaluated value, prior to performing automatic focusing operation, and the AF evaluated value is arithmetically calculated, by using an area that remains after excepting the area from respective AF areas of a multi-area AF. Thus, invalid arithmetic operation of the AF evaluated value is reduced, and a quicker high-accuracy automatic focusing operation is realized. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、撮影補助機能として、被写体に自動的に焦点を合わせる自動合焦機能を備えた撮像装置、自動合焦方法、並びにコンピューター・プログラムに係り、特に、フォーカス・レンズを動かしながら、レンズからの入力像をセンサーにより光電変換した画像中の所定の領域の鮮鋭度(コントラスト)から検知されるAF評価値に基づいてフォーカス・レンズの合焦点位置を検出するコントラスト検出方式を適用した撮像装置、自動合焦方法、並びにコンピューター・プログラムに関する。   The present invention relates to an imaging apparatus having an automatic focusing function for automatically focusing on a subject as an imaging assistance function, an automatic focusing method, and a computer program, and in particular, from a lens while moving a focus lens. An imaging apparatus to which a contrast detection method for detecting a focal point position of a focus lens based on an AF evaluation value detected from a sharpness (contrast) of a predetermined region in an image obtained by photoelectrically converting the input image of The present invention relates to an automatic focusing method and a computer program.

さらに詳しくは、本発明は、複数のAFエリアから求めた複数のAF評価値に基づいてフォーカス・レンズの合焦点位置を検出するマルチエリアAF方式の撮像装置、自動合焦方法、並びにコンピューター・プログラムに係り、特に、AFエリア内に高輝度の被写体やコントラストの低い被写体を含む場合であっても誤動作を防止してフォーカス・レンズの合焦点位置を正しく検出する撮像装置、自動合焦方法、並びにコンピューター・プログラムに関する。   More specifically, the present invention relates to a multi-area AF type imaging apparatus, an automatic focusing method, and a computer program that detect a focal position of a focus lens based on a plurality of AF evaluation values obtained from a plurality of AF areas. In particular, an imaging apparatus, an automatic focusing method, and an automatic focusing method for preventing a malfunction and correctly detecting a focal point position of a focus lens even when a high-luminance subject or a low-contrast subject is included in an AF area. Regarding computer programs.

近年、デジタルスチルカメラやカメラ一体型ビデオレコーダー(カムコーダー)が広く普及してきている。これらの製品の多くは、撮影補助機能として、被写体に自動的に焦点を合わせる機能(「自動合焦」、若しくは「オート・フォーカス(AF)」とも言う)を搭載している。カメラのユーザーは、この自動合焦機能を用いることによって、より簡単に焦点の合った写真、並びに映像を撮影することが可能になる。   In recent years, digital still cameras and camera-integrated video recorders (camcorders) have become widespread. Many of these products are equipped with a function for automatically focusing on a subject (also referred to as “autofocus” or “autofocus (AF)”) as a photographing assist function. By using this automatic focusing function, the camera user can more easily take a photograph and a video in focus.

自動合焦機能には大きく分けて2つの方式がある。1つは、「位相差検出方式」と呼ばれるもので、レンズからの入力像を2つに分割して、自動合焦用のライン・センサにより焦点のずれを求めるものである。この方式は、主に一眼レフタイプのデジタルスチルカメラに搭載されている。もう1つは、「コントラスト検出方式」と呼ばれるもので、フォーカス・レンズを動かしながら、レンズからの入力像をセンサーにより光電変換した画像中の所定の領域の鮮鋭度(コントラスト)を検知し、最も検知した値(以下、「AF評価値」とも呼ぶ)が大きいときのフォーカス・レンズの位置を合焦点とするものである。   There are roughly two types of automatic focusing functions. One is called a “phase difference detection method”, in which an input image from a lens is divided into two, and a focus shift is obtained by a line sensor for automatic focusing. This method is mainly mounted on a single-lens reflex digital still camera. The other is called a “contrast detection method”, which detects the sharpness (contrast) of a predetermined area in an image obtained by photoelectrically converting the input image from the lens while moving the focus lens. The focus lens position when the detected value (hereinafter also referred to as “AF evaluation value”) is large is used as the focal point.

後者のコントラスト検出方式は、一般的に「山登りAF制御」と呼ばれるが、比較的簡単なシステム構成とアルゴリズムで実現できることから、コンパクト・タイプのデジタルスチルカメラやカムコーダーを始めとしてさまざまな撮像装置に広く用いられており、現在の合焦方式として主流である。本明細書では、撮像画像のうちコントラストを検知するために使用する領域のことを「AFエリア」と呼ぶ。現在、撮像画像を複数のAFエリアに分割し、複数のAFエリアでAF評価値を求め、複数のAF評価値に基づいて合焦位置に焦点を合わせるという手法(以下では、「マルチエリアAF」と呼ぶ)が用いられることも多い。例えば、AF評価値が最大となるAFエリアを選択したり、ある閾値を設けて閾値以上のAF評価値を持つ1以上のAFエリアの中から選択したり、あるいはユーザーがAFエリアを選択し、選択されたAFエリアの合焦位置に焦点を合わせることができる。   The latter contrast detection method is generally called “hill-climbing AF control”, but it can be realized with a relatively simple system configuration and algorithm, so it is widely used in various imaging devices including compact digital still cameras and camcorders. It is used as the current focusing method. In this specification, an area used for detecting contrast in a captured image is referred to as an “AF area”. Currently, a method of dividing a captured image into a plurality of AF areas, obtaining AF evaluation values in the plurality of AF areas, and focusing on an in-focus position based on the plurality of AF evaluation values (hereinafter referred to as “multi-area AF”). Is often used. For example, an AF area that maximizes the AF evaluation value is selected, a threshold value is set and one or more AF areas having an AF evaluation value equal to or greater than the threshold value are selected, or the user selects an AF area, It is possible to focus on the focus position of the selected AF area.

コントラスト検出方式による自動合焦は、AFエリア内に高輝度の被写体を含む場合や、コントラストの低い被写体を含む場合は誤動作する場合がある。これらの理由は次の通りである。高輝度の被写体部分の領域では撮像素子の輝度レベルが飽和した状態にある。輝度レベルが飽和した領域は非合焦状態である方が大きくなる傾向にあり、このような領域を含むAFエリアのAF評価値が大きく出てしまう。その結果、AFエリアの選択、及び合焦位置の判断に誤りが生じる場合がある。また、コントラストの低い被写体部分を含むAFエリアのAF評価値は全体的に低く、AF評価値の山が不明瞭な特性になる傾向があり、且つ、ノイズの影響を受け易い。このため、AF評価値に複数の山が生じる場合があり、その結果、合焦位置の判断に誤りが生じる場合がある。   The automatic focusing by the contrast detection method may malfunction when a high-luminance subject is included in the AF area or a low-contrast subject is included. These reasons are as follows. The brightness level of the image sensor is saturated in the region of the high brightness subject portion. An area where the brightness level is saturated tends to be larger in the out-of-focus state, and an AF evaluation value of an AF area including such an area is large. As a result, an error may occur in AF area selection and in-focus position determination. In addition, the AF evaluation value of the AF area including the low-contrast subject portion is generally low, the peaks of the AF evaluation value tend to become unclear characteristics, and are easily affected by noise. For this reason, a plurality of peaks may occur in the AF evaluation value, and as a result, an error may occur in the determination of the in-focus position.

例えば、高輝度の被写体を含む場合には、AF評価値とは別に輝度レベルも評価し、輝度レベル評価値の振る舞いに基づいてAF評価値の信頼性を判断する方法について提案がなされている(例えば、特許文献1を参照のこと)。しかしながら、この方法によると、AF評価値とは別にAF評価値の信頼度を判断する必要があるため、合焦時間の面で不利である。   For example, when a high-luminance subject is included, a method has been proposed for evaluating the brightness level separately from the AF evaluation value and determining the reliability of the AF evaluation value based on the behavior of the brightness level evaluation value ( For example, see Patent Document 1). However, according to this method, it is necessary to determine the reliability of the AF evaluation value separately from the AF evaluation value, which is disadvantageous in terms of focusing time.

また、低コントラストの被写体を含む場合には、AF評価値を取得するAFエリアを輝度の高い方向に拡大してAF評価値のピークを検出し易くする方法について提案がなされている(例えば、特許文献2を参照のこと)。しかしながら、AFエリアを広げることでAF評価値を得るための時間が増加し、同じく合焦時間の面で不利である。   In addition, when a low-contrast subject is included, a method has been proposed for facilitating detection of an AF evaluation value peak by enlarging an AF area from which an AF evaluation value is acquired in a higher luminance direction (for example, a patent). (Ref. 2). However, widening the AF area increases the time for obtaining the AF evaluation value, which is also disadvantageous in terms of focusing time.

近年では、人物の顔検出機能を持ったデジタルスチルカメラやカムコーダーが実用化され、検出した主要な被写体となる人物の顔部分に合焦させる技術が実用化されている(例えば、特許文献3を参照のこと)。ここで、人物の顔部分、とりわけ頬の部分はコントラストが低いことから、AF評価値の山が不明瞭でノイズの影響を受け易いという問題がある。このため、人物の顔部分を第1のAFエリアとし、第1のAFエリアの輝度レベルを評価して、それより大きい部分の第2のAFエリアとAF評価用の高域通過フィルターを選択してAF評価値を取得する方法が提案されている(例えば、特許文献4を参照のこと)。しかしながら、AFエリアを広げることでAF評価値を得るための時間が増加し、同じく合焦時間の面で不利である。   In recent years, digital still cameras and camcorders having a human face detection function have been put into practical use, and a technique for focusing on the face portion of a person as a detected main subject has been put into practical use (for example, Patent Document 3). See Here, since the face portion of the person, especially the cheek portion, has a low contrast, there is a problem that the peaks of the AF evaluation values are unclear and susceptible to noise. Therefore, the face portion of the person is set as the first AF area, the luminance level of the first AF area is evaluated, and the larger second AF area and the high pass filter for AF evaluation are selected. Thus, a method for acquiring an AF evaluation value has been proposed (see, for example, Patent Document 4). However, widening the AF area increases the time for obtaining the AF evaluation value, which is also disadvantageous in terms of focusing time.

また、人物の顔部分に合焦させる際に、目や鼻、口、耳といった顔器官のように顔の中でも比較的コントラストが高い顔パーツをAFエリアとして設定してAF評価値を取得する方法が提案されている(例えば、特許文献5を参照のこと)。しかしながら、人物の顔部分の中から、目、鼻、口、耳、…と検出する部位数を増やしていくに従って処理時間が増加して、合焦時間の面で不利となる。また、人物の顔に特化した手法であることから、汎用性の面でも不利である。   In addition, when focusing on a person's face part, a method for obtaining an AF evaluation value by setting a face part having a relatively high contrast in the face as a face organ such as eyes, nose, mouth, and ear as an AF area Has been proposed (for example, see Patent Document 5). However, the processing time increases as the number of detected parts such as eyes, nose, mouth, ears,... From the face portion of a person increases, which is disadvantageous in terms of focusing time. In addition, since it is a technique specialized for human faces, it is also disadvantageous in terms of versatility.

そもそも、コントラスト検出方式による自動合焦は、一般に、位相差検出方式と比較して処理時間と精度の面で不利であることから、より高速で且つ精度の高い合焦方法が求められている。   In the first place, since the automatic focusing by the contrast detection method is generally disadvantageous in terms of processing time and accuracy as compared with the phase difference detection method, a focusing method with higher speed and higher accuracy is required.

特開2006−162943号公報JP 2006-162943 A 特開2007−133044号公報JP 2007-133304 A 特開2007−328212号公報JP 2007-328212 A 特開2008−175995号公報JP 2008-17595 A 特開2003−107335号公報JP 2003-107335 A

本発明の目的は、レンズからの入力像をセンサーにより光電変換した画像中の複数のAFエリアのコントラスト信号から検知される複数のAF評価値に基づいてフォーカス・レンズの合焦点位置を検出するコントラスト検出方式を適用した、優れた撮像装置、自動合焦方法、並びにコンピューター・プログラムを提供することにある。   An object of the present invention is to provide a contrast for detecting a focal point position of a focus lens based on a plurality of AF evaluation values detected from contrast signals of a plurality of AF areas in an image obtained by photoelectrically converting an input image from a lens by a sensor. An object is to provide an excellent imaging apparatus, an automatic focusing method, and a computer program to which a detection method is applied.

本発明のさらなる目的は、高輝度の被写体やコントラストの低い被写体を含む撮影画像に対し、コントラスト検出方式によってより高速で且つ高い精度で合焦位置を検出することができる、優れた撮像装置、自動合焦方法、並びにコンピューター・プログラムを提供することにある。   A further object of the present invention is to provide an excellent imaging apparatus capable of detecting a focusing position at high speed and with high accuracy by a contrast detection method for a captured image including a high-luminance object and a low-contrast object, and automatic To provide a focusing method and a computer program.

本願は、上記課題を参酌してなされたものであり、請求項1に記載の発明は、
撮像部と、
前記特徴量抽出部が抽出した被写体の特徴量に基づいて、前記撮像画像のうちコントラスト信号を検知するために使用するAFエリアから、コントラスト信号の検知演算に有効なAFエリアを決定する有効AFエリア決定部と、
前記有効なAFエリアにおけるコントラスト信号の検知演算に基づいて、前記撮像部の自動合焦動作を機能させる自動合焦動作部と、
を具備することを特徴とする撮像装置である。
The present application has been made in consideration of the above problems, and the invention according to claim 1
An imaging unit;
An effective AF area that determines an effective AF area for contrast signal detection calculation from an AF area used to detect a contrast signal in the captured image based on the feature amount of the subject extracted by the feature amount extraction unit. A decision unit;
An automatic focusing operation unit for functioning an automatic focusing operation of the imaging unit based on a detection calculation of a contrast signal in the effective AF area;
It is an imaging device characterized by comprising.

また、本願の請求項2によれば、請求項1に記載の撮像装置において、前記有効AFエリア決定部は、前記自動合焦動作部による自動合焦動作前に、前記特徴量抽出部が検出した被写体の種類に特化した除外領域のパラメーターを設定し、前記除外領域のパラメーターに基づいてコントラスト信号の検知演算に有効なAFエリアを決定するようになっている。   According to claim 2 of the present application, in the imaging device according to claim 1, the effective AF area determination unit is detected by the feature amount extraction unit before the automatic focusing operation by the automatic focusing operation unit. The exclusion area parameters specific to the type of the subject are set, and the AF area effective for the contrast signal detection calculation is determined based on the exclusion area parameters.

また、本願の請求項3によれば、請求項2に記載の撮像装置において、前記特徴量抽出部は、前記撮像画像から被写体を囲む被写体検出枠を検出し、前記有効AFエリア決定部は、検出した被写体の種類に応じて、高輝度又は低いコントラストとなる領域のような検知演算の妨げとなる除外領域を前記被写体検出枠の中で指定するためのパラメーターを設定するようになっている。   According to claim 3 of the present application, in the imaging device according to claim 2, the feature amount extraction unit detects a subject detection frame surrounding the subject from the captured image, and the effective AF area determination unit includes: In accordance with the type of the detected subject, a parameter for designating an exclusion region that hinders the detection calculation, such as a region having high brightness or low contrast, is set in the subject detection frame.

また、本願の請求項4によれば、請求項3に記載の撮像装置において、前記有効AFエリア決定部は、前記特徴量抽出部が被写体としてヒゲを有する小動物を検出したときに、前記被写体検出枠の中で前記ヒゲの部分を覆い隠すための3角形からなる除外領域を決定するためのパラメーターを設定するようになっている。   According to claim 4 of the present application, in the imaging device according to claim 3, the effective AF area determination unit detects the subject when the feature amount extraction unit detects a small animal having a beard as a subject. A parameter for determining an exclusion area composed of a triangle for concealing the beard portion in the frame is set.

また、本願の請求項5によれば、請求項3に記載の撮像装置において、前記有効AFエリア決定部は、前記特徴量抽出部が被写体として人物を検出したときに、前記被写体検出枠の中で前記人物の顔の頬の部分を覆い隠すための台形からなる除外領域を決定するためのパラメーターを設定するようになっている。   According to claim 5 of the present application, in the imaging device according to claim 3, the effective AF area determination unit is configured to detect a person in the subject detection frame when the feature amount extraction unit detects a person as a subject. Then, a parameter for determining an exclusion area composed of a trapezoid for covering the cheek portion of the person's face is set.

また、本願の請求項6によれば、請求項3に記載の撮像装置がマルチエリアAF方式を適用する場合において、前記有効AFエリア決定部は、前記被写体検出枠を含むAFエリアをさらに複数個の小AFエリアに分割し、前記特徴量抽出部が設定したパラメーターに基づいて決定される除外領域との重なりが大きい小AFエリアをコントラスト信号の検知演算に不要と決定して有効なAFエリアから除外するようになっている。   According to claim 6 of the present application, when the imaging apparatus according to claim 3 applies the multi-area AF method, the effective AF area determination unit further includes a plurality of AF areas including the subject detection frame. Are divided into small AF areas, and a small AF area having a large overlap with the exclusion area determined based on the parameter set by the feature amount extraction unit is determined to be unnecessary for the contrast signal detection calculation, and the effective AF area is selected. It is supposed to be excluded.

また、本願の請求項7によれば、請求項1に記載の撮像装置において、前記特徴量抽出部は、検出した被写体の種類と被写体を囲む被写体検出枠を検出し、前記有効AFエリア決定部は、前記自動合焦動作部による自動合焦動作中に、前記被写体検出枠を含むAFエリアにおけるコントラスト信号を走査し、検出した被写体の種類に特化した特徴量データがコントラスト信号に存在しないときには、前記被写体検出枠と重なる被写体検出領域を除外してコントラスト信号の検知演算に有効なAFエリアを決定するようになっている。
ことを特徴とする請求項1に記載の撮像装置。
According to claim 7 of the present application, in the imaging apparatus according to claim 1, the feature amount extraction unit detects a type of the detected subject and a subject detection frame surrounding the subject, and the effective AF area determination unit Scans the contrast signal in the AF area including the subject detection frame during the automatic focusing operation by the automatic focusing operation unit, and the feature signal specialized for the type of the detected subject does not exist in the contrast signal. The AF area effective for the contrast signal detection calculation is determined by excluding the subject detection area that overlaps the subject detection frame.
The imaging apparatus according to claim 1.

また、本願の請求項8によれば、請求項7に記載の撮像装置がマルチエリアAF方式を適用する場合に、前記有効AFエリア決定部は、検出した被写体の種類に特化した特徴量データがコントラスト信号に存在しないAFエリアをさらに複数個の小AFエリアに分割し、前記被写体検出領域との重なりが大きい小AFエリアをコントラスト信号の検知演算に不要と決定して、コントラスト信号の検知演算に有効なAFエリアを決定するようになっている。
ことを特徴とする請求項7に記載の撮像装置。
According to claim 8 of the present application, when the imaging apparatus according to claim 7 applies the multi-area AF method, the effective AF area determination unit is characterized by feature amount data specialized for the type of the detected subject. Is further divided into a plurality of small AF areas, and the small AF area having a large overlap with the subject detection area is determined to be unnecessary for the contrast signal detection calculation. An effective AF area is determined.
The imaging apparatus according to claim 7.

また、本願の請求項9に記載の発明は、撮像装置における撮像部の自動合焦動作を行なうための自動合焦方方法であって、
前記撮像部から入力された撮像画像から、被写体を検出し、該検出した被写体の特徴量を抽出する特徴量抽出ステップと、
前記特徴量抽出ステップで抽出された被写体の特徴量に基づいて、前記撮像画像のうちコントラスト信号を検知するために使用するAFエリアから、コントラスト信号の検知演算に有効なAFエリアを決定する有効AFエリア決定ステップと、
前記有効なAFエリアにおけるコントラスト信号の検知演算に基づいて、前記撮像部の自動合焦動作を機能させる自動合焦動作ステップと、
を有することを特徴とする自動合焦方法である。
The invention according to claim 9 of the present application is an automatic focusing method for performing an automatic focusing operation of an imaging unit in an imaging apparatus,
A feature amount extracting step of detecting a subject from the captured image input from the imaging unit and extracting a feature amount of the detected subject;
Effective AF for determining an AF area effective for the contrast signal detection calculation from the AF area used for detecting the contrast signal in the captured image based on the feature quantity of the subject extracted in the feature quantity extraction step. An area determination step;
Based on the detection calculation of the contrast signal in the effective AF area, the automatic focusing operation step for functioning the automatic focusing operation of the imaging unit;
It is an automatic focusing method characterized by having.

また、本願の請求項10に記載の発明は、撮像装置における撮像部の自動合焦動作を行なうための処理をコンピューター上で実行するようにコンピューター可読形式で記述されたコンピューター・プログラムであって、前記コンピューターに対し、
前記撮像部から入力された撮像画像から、被写体を検出し、該検出した被写体の特徴量を抽出する特徴量抽出手順と、
前記特徴量抽出手順を実行して抽出された被写体の特徴量に基づいて、前記撮像画像のうちコントラスト信号を検知するために使用するAFエリアから、コントラスト信号の検知演算に有効なAFエリアを決定する有効AFエリア決定手順と、
前記有効なAFエリアにおけるコントラスト信号の検知演算に基づいて、前記撮像部の自動合焦動作を機能させる自動合焦動作手順と、
を実行させることを特徴とするコンピューター・プログラムである。
The invention according to claim 10 of the present application is a computer program described in a computer-readable format so that a process for performing an automatic focusing operation of an imaging unit in an imaging device is executed on a computer. For the computer
A feature amount extraction procedure for detecting a subject from the captured image input from the imaging unit and extracting a feature amount of the detected subject;
Based on the feature amount of the subject extracted by executing the feature amount extraction procedure, an AF area effective for contrast signal detection calculation is determined from the AF area used for detecting the contrast signal in the captured image. An effective AF area determination procedure to be performed;
Based on a detection calculation of a contrast signal in the effective AF area, an automatic focusing operation procedure for functioning an automatic focusing operation of the imaging unit;
It is a computer program characterized by having executed.

本願の請求項10に係るコンピューター・プログラムは、コンピューター・システム上で所定の処理を実現するようにコンピューター可読形式で記述されたコンピューター・プログラムを定義したものである。換言すれば、本願の請求項10に係るコンピューター・プログラムをコンピューター・システムにインストールすることによって、コンピューター・システム上では協働的作用が発揮され、本願の請求項1に係る撮像装置と同様の作用効果を得ることができる。   The computer program according to claim 10 of the present application defines a computer program described in a computer-readable format so as to realize predetermined processing on a computer system. In other words, by installing the computer program according to claim 10 of the present application in the computer system, a cooperative operation is exhibited on the computer system, and the same operation as that of the imaging apparatus according to claim 1 of the present application is achieved. An effect can be obtained.

本発明によれば、レンズからの入力像をセンサーにより光電変換した画像中の複数のAFエリアのコントラスト信号から検知される複数のAF評価値に基づいてフォーカス・レンズの合焦点位置を検出するコントラスト検出方式を適用した、優れた撮像装置、自動合焦方法、並びにコンピューター・プログラムを提供することができる。   According to the present invention, the contrast for detecting the in-focus position of the focus lens based on the plurality of AF evaluation values detected from the contrast signals of the plurality of AF areas in the image obtained by photoelectrically converting the input image from the lens by the sensor. An excellent imaging apparatus, automatic focusing method, and computer program to which the detection method is applied can be provided.

また、本発明によれば、高輝度の被写体やコントラストの低い被写体を含む撮影画像に対し、コントラスト検出方式によってより高速で且つ高い精度で合焦位置を検出することができる、優れた撮像装置、自動合焦方法、並びにコンピューター・プログラムを提供することができる。   Further, according to the present invention, an excellent imaging apparatus capable of detecting a focus position at a higher speed and with a higher accuracy by a contrast detection method for a captured image including a high-luminance subject and a low-contrast subject, An automatic focusing method as well as a computer program can be provided.

本願の請求項1に記載の発明によれば、自動合焦動作において、自動合焦動作前、又は自動合焦動作中において、撮影画像から検出された被写体に特化して、AF評価値の演算の妨げとなるAFエリアの除外処理を行なうことで、より早く精度の高い自動合焦動作を実現することができる。   According to the first aspect of the present invention, in the automatic focusing operation, the AF evaluation value is calculated by specializing the subject detected from the photographed image before the automatic focusing operation or during the automatic focusing operation. By performing the exclusion process of the AF area that hinders the automatic focusing operation, it is possible to realize an automatic focusing operation with higher accuracy.

また、本願の請求項2に記載の発明によれば、自動合焦動作前に、検出した被写体の種類に特化して設定される除外領域のパラメーターに基づいて、コントラスト信号の検知演算に有効なAFエリアを決定することができる。   Further, according to the invention described in claim 2 of the present application, it is effective for the detection calculation of the contrast signal based on the parameter of the exclusion region set specifically for the detected subject type before the automatic focusing operation. An AF area can be determined.

また、本願の請求項3に記載の発明によれば、前記撮像画像から被写体を囲む被写体検出枠を検出するとともに、検出した被写体の種類に応じて、高輝度又は低いコントラストとなる領域のような検知演算の妨げとなる除外領域を前記被写体検出枠の中で指定するためのパラメーターを設定することができる。   According to the invention of claim 3 of the present application, a subject detection frame surrounding the subject is detected from the captured image, and a region with high brightness or low contrast is detected depending on the type of the detected subject. It is possible to set a parameter for designating an excluded area that hinders detection calculation in the subject detection frame.

また、本願の請求項4に記載の発明によれば、撮像画像から検出された被写体がヒゲを有する小動物である場合には、前記被写体検出枠の中で前記ヒゲの部分を覆い隠すための3角形からなる除外領域を決定するためのパラメーターを設定することができる。   According to the invention described in claim 4 of the present application, when the subject detected from the captured image is a small animal having a mustache, 3 for covering the portion of the mustache in the subject detection frame. It is possible to set a parameter for determining an exclusion area including a square.

また、本願の請求項5に記載の発明によれば、撮像画像から検出された被写体が人物である場合には、前記被写体検出枠の中で前記人物の顔の頬の部分を覆い隠すための台形からなる除外領域を決定するためのパラメーターを設定することができる。   According to the invention described in claim 5 of the present application, when the subject detected from the captured image is a person, the cheek part of the person's face is obscured in the subject detection frame. It is possible to set a parameter for determining an exclusion area including a trapezoid.

また、本願の請求項6に記載の発明によれば、撮像装置がマルチエリアAF方式の自動合焦機能を適用する場合に、前記被写体検出枠を含むAFエリアをさらに複数個の小AFエリアに分割し、前記特徴量抽出部が設定したパラメーターに基づいて決定される除外領域との重なりが大きい小AFエリアをコントラスト信号の検知演算に不要と決定して有効なAFエリアから除外することができる。   According to the invention described in claim 6 of the present application, when the imaging apparatus applies the multi-area AF type automatic focusing function, the AF area including the subject detection frame is further divided into a plurality of small AF areas. A small AF area that is divided and has a large overlap with the exclusion region determined based on the parameters set by the feature amount extraction unit can be determined as unnecessary for the contrast signal detection calculation and excluded from the effective AF area. .

本願の請求項2乃至6に記載の発明によれば、特徴量抽出処理によって撮影画像から被写体を検出し、自動合焦動作を行なう前にあらかじめ検出された被写体の種類などに応じて特化してAF評価値の正常な演算の妨げとなる領域を決定し、マルチエリアAFの各AFエリアからその領域を除外した後の残った領域を用いてAF評価値の演算を行なうことができる。これによって、無効なAF評価値の演算が削減され、より早く精度の高い自動合焦動作を実現することができる。   According to the invention described in claims 2 to 6 of the present application, the subject is detected from the photographed image by the feature amount extraction process, and specialized according to the type of the subject detected in advance before performing the automatic focusing operation. An area that hinders normal calculation of the AF evaluation value is determined, and the AF evaluation value can be calculated using the remaining area after removing the area from each AF area of the multi-area AF. As a result, the calculation of invalid AF evaluation values is reduced, and an automatic focusing operation with higher accuracy can be realized faster.

また、本願の請求項7に記載の発明によれば、検出した被写体の種類と被写体を囲む被写体検出枠を検出し、前記自動合焦動作部による自動合焦動作中に、前記被写体検出枠を含むAFエリアにおけるコントラスト信号を走査し、検出した被写体の種類に特化した特徴量データがコントラスト信号に存在しないときには、前記被写体検出枠と重なる被写体検出領域を除外してコントラスト信号の検知演算に有効なAFエリアを決定することができる。   According to the seventh aspect of the present invention, the type of the detected subject and the subject detection frame surrounding the subject are detected, and the subject detection frame is set during the automatic focusing operation by the automatic focusing operation unit. When the contrast signal in the AF area is scanned and the feature data specific to the detected subject type does not exist in the contrast signal, the subject detection area that overlaps the subject detection frame is excluded and effective for contrast signal detection calculation A correct AF area can be determined.

また、本願の請求項8に記載の発明によれば、撮像装置がマルチエリアAF方式を適用する場合に、検出した被写体の種類に特化した特徴量データがコントラスト信号に存在しないAFエリアをさらに複数個の小AFエリアに分割し、前記被写体検出領域との重なりが大きい小AFエリアをコントラスト信号の検知演算に不要と決定して、コントラスト信号の検知演算に有効なAFエリアを決定することができる。   According to the invention described in claim 8 of the present application, when the imaging apparatus applies the multi-area AF method, an AF area in which feature amount data specialized for the detected subject type does not exist in the contrast signal is further reduced. Dividing into a plurality of small AF areas, determining that a small AF area having a large overlap with the subject detection area is unnecessary for the contrast signal detection calculation, and determining an AF area effective for the contrast signal detection calculation. it can.

本願の請求項7乃至8に記載の発明によれば、被写体の特徴量から被写体を検出し、自動合焦動作中に検出された被写体に特化したコントラスト信号の特性を満たさない領域を決定し、このような領域をAFエリアから除外して、残った有効な領域を用いてAF評価値の演算を行なうようことができる。これによって、無効なAF評価値の演算が削減され、より早く精度の高い自動合焦動作を実現することができる。   According to the invention described in claims 7 to 8 of the present application, the subject is detected from the feature amount of the subject, and a region that does not satisfy the characteristics of the contrast signal specialized for the subject detected during the automatic focusing operation is determined. Such an area can be excluded from the AF area, and the AF evaluation value can be calculated using the remaining effective area. As a result, the calculation of invalid AF evaluation values is reduced, and an automatic focusing operation with higher accuracy can be realized faster.

本発明のさらに他の目的、特徴や利点は、後述する本発明の実施形態や添付する図面に基づくより詳細な説明によって明らかになるであろう。   Other objects, features, and advantages of the present invention will become apparent from more detailed description based on embodiments of the present invention described later and the accompanying drawings.

図1は、本発明の一実施形態として、コントラスト検出方式による自動合焦機能を備えた撮像装置のハードウェア構成を模式的に示した図である。FIG. 1 is a diagram schematically illustrating a hardware configuration of an imaging apparatus having an automatic focusing function based on a contrast detection method as an embodiment of the present invention. 図2は、有効画面枠内に3×3の9個のAFエリアを設けた様子を示した図である。FIG. 2 is a diagram illustrating a state in which nine AF areas of 3 × 3 are provided in the effective screen frame. 図3は、コントラスト検出方式による自動合焦処理手順の一例を示したフローチャートである。FIG. 3 is a flowchart illustrating an example of an automatic focusing process procedure using a contrast detection method. 図4は、複数のAFエリアでフォーカス・レンズ位置毎にAF評価値を演算した結果を例示した図である。FIG. 4 is a diagram illustrating a result of calculating an AF evaluation value for each focus / lens position in a plurality of AF areas. 図5Aは、被写体に応じてコントラスト検出の除外領域を特定する自動合焦処理手順の一例を示したフローチャートである。FIG. 5A is a flowchart illustrating an example of an automatic focusing process procedure for specifying an excluded area for contrast detection according to a subject. 図5Bは、被写体に応じてコントラスト検出の除外領域を特定する自動合焦処理手順の一例を示したフローチャートである。FIG. 5B is a flowchart illustrating an example of an automatic focusing process procedure for specifying an exclusion area for contrast detection according to a subject. 図5Cは、被写体に応じてコントラスト検出の除外領域を特定する自動合焦処理手順の一例を示したフローチャートである。FIG. 5C is a flowchart illustrating an example of an automatic focusing process procedure for specifying an excluded region for contrast detection according to a subject. 図6は、小動物の被写体を含んだフレームにおけるマルチエリアAFの構成例並びにコントラスト検出方式による自動合焦動作が苦手とする除外領域を示した図である。FIG. 6 is a diagram illustrating a configuration example of multi-area AF in a frame including a subject of a small animal and an excluded region that is not suitable for an automatic focusing operation using a contrast detection method. 図7は、図6に示した小動物の被写体の変形例を含んだフレームの構成例を示した図である。FIG. 7 is a diagram showing a configuration example of a frame including a modification of the subject of the small animal shown in FIG. 図8は、図6に示した被写体のフレームからAF評価値演算に不要な領域を除去処理した後の有効なAFエリアを示した図である。FIG. 8 is a diagram showing an effective AF area after removing an area unnecessary for AF evaluation value calculation from the frame of the subject shown in FIG. 図9Aは、被写体に応じてコントラスト検出の除外領域を特定する自動合焦処理手順の他の例を示したフローチャートである。FIG. 9A is a flowchart showing another example of an automatic focusing process procedure for specifying an excluded area for contrast detection according to a subject. 図9Bは、被写体に応じてコントラスト検出の除外領域を特定する自動合焦処理手順の他の例を示したフローチャートである。FIG. 9B is a flowchart illustrating another example of an automatic focusing process procedure for specifying an excluded area for contrast detection according to a subject. 図9Cは、被写体に応じてコントラスト検出の除外領域を特定する自動合焦処理手順の他の例を示したフローチャートである。FIG. 9C is a flowchart showing another example of an automatic focusing process procedure for specifying an excluded area for contrast detection according to a subject. 図10は、小動物の被写体を含んだフレームにおけるマルチエリアAFの構成例並びにコントラスト検出方式による自動合焦動作が苦手とする除外領域を示した図である。FIG. 10 is a diagram illustrating a configuration example of multi-area AF in a frame including a subject of a small animal and an excluded region that is not suitable for an automatic focusing operation using a contrast detection method. 図11Aは、AFエリア内でコントラスト信号を走査する走査順序を示した図である。FIG. 11A is a diagram showing a scanning order for scanning a contrast signal in the AF area. 図11Bは、AFエリアを図11Aに示した走査順序で走査したコントラスト信号の特性例を示した図である。FIG. 11B is a diagram showing a characteristic example of a contrast signal obtained by scanning the AF area in the scanning order shown in FIG. 11A. 図12は、図10に示した被写体のフレームからAF評価値演算に不要な領域を除去処理した後の有効なAFエリアを示した図である。FIG. 12 is a diagram showing an effective AF area after removing an area unnecessary for AF evaluation value calculation from the frame of the subject shown in FIG. 図13Aは、AF評価値演算に不要な領域を除去処理しない場合の各フォーカス・レンズ位置におけるAFエリアのAF評価値の演算結果を示した図である。FIG. 13A is a diagram illustrating the calculation result of the AF evaluation value of the AF area at each focus / lens position when the area unnecessary for the AF evaluation value calculation is not removed. 図13Bは、図9A〜図9Cに示した処理手順に従ってAF評価値演算に不要な領域を除去処理した場合の各フォーカス・レンズ位置における有効なAFエリアのAF評価値の演算結果を示した図である。FIG. 13B is a diagram showing the calculation result of the AF evaluation value of the effective AF area at each focus / lens position when an area unnecessary for the AF evaluation value calculation is removed according to the processing procedure shown in FIGS. 9A to 9C. It is. 図14は、人物の被写体を含んだフレームにおけるマルチエリアAFの構成例並びにコントラスト検出方式による自動合焦動作が苦手とする除外領域を示した図である。FIG. 14 is a diagram illustrating a configuration example of multi-area AF in a frame including a person's subject and an excluded area that is not suitable for an automatic focusing operation using a contrast detection method. 図15は、図14に示した被写体のフレームからAF評価値演算に不要な領域を除去処理した後の有効なAFエリアを示した図である。FIG. 15 is a diagram showing an effective AF area after a region unnecessary for AF evaluation value calculation is removed from the subject frame shown in FIG.

以下、図面を参照しながら本発明の実施形態について詳解する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1には、本発明の一実施形態として、コントラスト検出方式による自動合焦機能を備えた撮像装置のハードウェア構成を模式的に示している。図示の撮像装置は、デジタルスチルカメラやカムコーダーに相当する。以下、各部について説明する。   FIG. 1 schematically shows a hardware configuration of an imaging apparatus having an automatic focusing function based on a contrast detection method as an embodiment of the present invention. The illustrated imaging apparatus corresponds to a digital still camera or a camcorder. Hereinafter, each part will be described.

CPU(Central Processing Unit)101、モーター・ドライバー部102、カメラ信号処理エンジン103、解像度変換エンジン104、特徴量抽出エンジン105、記録再生処理エンジン106、表示処理エンジン107、及びDRAM(Dynamic RAM(Random Access Memory))108が、バス100を介して相互接続され、CPU101は各部に対して所定の制御を行なうものとする。   CPU (Central Processing Unit) 101, motor driver unit 102, camera signal processing engine 103, resolution conversion engine 104, feature quantity extraction engine 105, recording / playback processing engine 106, display processing engine 107, and DRAM (Dynamic RAM (Random Access) Memory)) 108 are interconnected via the bus 100, and the CPU 101 performs predetermined control on each part.

レンズ群110は、被写体からの光を撮像素子111の撮像面に集光するための1以上のレンズからなる。レンズ・モーター部109は、レンズを移動させてフォーカス合わせやズーミングを行なうための駆動機構、開閉操作により被写体からの光を所定時間だけ撮像素子111に入射させるシャッタ機構、被写体からの光線束の方向並びに範囲を限定するアイリス(絞り)機構(いずれも図示しない)を含んでいる。モーター・ドライバー部102は、CPU101からの制御信号に基づいて、レンズ・モーター部109を制御する。   The lens group 110 includes one or more lenses for condensing light from the subject on the imaging surface of the imaging element 111. The lens motor unit 109 includes a driving mechanism for moving the lens to perform focusing and zooming, a shutter mechanism for allowing light from the subject to enter the image sensor 111 for a predetermined time by an opening / closing operation, and a direction of a light bundle from the subject In addition, an iris (aperture) mechanism (both not shown) for limiting the range is included. The motor / driver unit 102 controls the lens / motor unit 109 based on a control signal from the CPU 101.

被写体からの入射光がレンズ群110に入射され、撮像素子111に送られる。撮像素子111は、CCD(Charge Coupled Device:電荷結合素子)やCMOS(Complementary Metal Oxyde Semiconductor:相補性金属酸化膜半導体)などのセンサー素子からなり、入射光を光電変換する。AD変換部112では、光電変換されたアナログ画像信号をディジタル信号に変換した後、カメラ信号処理エンジン103に送出する。   Incident light from the subject enters the lens group 110 and is sent to the image sensor 111. The image sensor 111 is composed of a sensor element such as a CCD (Charge Coupled Device) or a CMOS (Complementary Metal Oxide Semiconductor), and photoelectrically converts incident light. The AD converter 112 converts the photoelectrically converted analog image signal into a digital signal, and then sends it to the camera signal processing engine 103.

カメラ信号処理エンジン103は、ディジタル画像信号に対して、欠陥画素補正やディジタル・クランプ、デジタル・ゲイン制御などの前処理を施した後、AWBによりホワイトバランス・ゲインを掛けるとともに、シャープネス・再度コントラスト調整などの画質補正処理を施して適正な色状態を再現し、さらにデモザイク処理によりRGB画像信号からなる撮影画面を作成する。   The camera signal processing engine 103 performs preprocessing such as defective pixel correction, digital clamp, and digital gain control on the digital image signal, and then applies white balance and gain by AWB, and sharpness and contrast adjustment again. An image quality correction process such as the above is performed to reproduce an appropriate color state, and a photographing screen composed of RGB image signals is created by demosaic processing.

解像度変換エンジン104は、撮影画面を表示デバイス115にスルー画像として表示出力するか、又は、キャプチャーすなわち記録媒体114に保存するかなど、用途に応じて画像のサイズの変更を行なう。   The resolution conversion engine 104 changes the size of the image depending on the application, such as whether to display and output the shooting screen as a through image on the display device 115 or to store it in the recording medium 114.

カメラ信号処理エンジン103及び解像度変換エンジン104で所定の処理がされた被写体の映像信号は、DRAM108上に任意の解像度で展開されている。特徴量抽出エンジン105は、DRAM108上の映像信号から所定の特徴量を抽出し、CPU101へ出力する。本実施形態では、特徴量抽出エンジン105は、DRAM108上に展開されている映像信号から、例えば、既存のテンプレート・マッチングによるアルゴリズムによって、人や小動物などの被写体を検出し、被写体の種類、位置、頭部の大きさ、及び、頭部のヨー(Yaw)方向の傾き度合いなどの特徴量を抽出できるようにプログラミングされているものとする。特徴量抽出のアルゴリズムとして、例えば、本出願人に既に譲渡されている特開2007−249852号公報若しくは特開2008−305342号公報に記載されている顔検出方法を適用することができる。   The video signal of the subject that has been subjected to predetermined processing by the camera signal processing engine 103 and the resolution conversion engine 104 is developed on the DRAM 108 at an arbitrary resolution. The feature quantity extraction engine 105 extracts a predetermined feature quantity from the video signal on the DRAM 108 and outputs it to the CPU 101. In the present embodiment, the feature amount extraction engine 105 detects a subject such as a person or a small animal from an image signal developed on the DRAM 108, for example, using an algorithm based on an existing template matching, and the type, position, It is assumed that programming is performed so that feature quantities such as the size of the head and the inclination of the head in the yaw direction can be extracted. As a feature amount extraction algorithm, for example, a face detection method described in Japanese Patent Application Laid-Open No. 2007-249852 or Japanese Patent Application Laid-Open No. 2008-305342 already assigned to the present applicant can be applied.

記録再生処理エンジン106は、入出力インターフェース113を介して接続される記憶媒体114にDRAM108上の任意の解像度からなる映像(静止画及び動画)信号を所定の符号化フォーマット(例えばJPEG(Joint Photographic Experts Group)やMPEG(Moving Picture Experts Group)4など)により記録し、また、記憶媒体114に所定の符号化フォーマットで記録された信号の再生処理を行なう。   The recording / playback processing engine 106 transmits a video (still image and moving image) signal having an arbitrary resolution on the DRAM 108 to a storage medium 114 connected via the input / output interface 113 in a predetermined encoding format (for example, JPEG (Joint Photographic Experts). Group) and MPEG (Moving Picture Experts Group) 4), and the reproduction of the signal recorded in the storage medium 114 in a predetermined encoding format is performed.

表示処理エンジン107は,入出力インターフェース113を介して接続される表示デバイス115(例えば LCD(Liquid Crystal Display)やその他のモニター・ディスプレイ)にDRAM108上の任意の解像度の映像信号に所定の処理を行ない出力する。   The display processing engine 107 performs predetermined processing on a video signal of an arbitrary resolution on the DRAM 108 on a display device 115 (for example, an LCD (Liquid Crystal Display) or other monitor display) connected via the input / output interface 113. Output.

図1に示した撮像装置は、コントラスト検出方式による自動合焦機能を備えているが、同機能は主に同図中のAF処理部116により行なわれる。   The image pickup apparatus shown in FIG. 1 has an automatic focusing function based on a contrast detection method, and this function is mainly performed by the AF processing unit 116 in FIG.

レンズ群110、撮像素子111、及びAD変換部112でディジタル信号に変換された被写体映像信号は、カメラ信号処理エンジン103に入力される。カメラ信号処理エンジン103には,所定の信号処理(前述)を行なうのと同時に、コントラスト検出方式による自動合焦のために、入力信号の所定のエリアから高周波成分を検出する高域通過フィルターが実装されており、CPU101に対して入力信号の所定エリアから検出した高周波成分(コントラスト信号)を出力するようになっている。   The subject video signal converted into a digital signal by the lens group 110, the image sensor 111, and the AD converter 112 is input to the camera signal processing engine 103. The camera signal processing engine 103 is provided with a high-pass filter that detects high-frequency components from a predetermined area of the input signal for automatic focusing by a contrast detection method at the same time as performing predetermined signal processing (described above). The high frequency component (contrast signal) detected from a predetermined area of the input signal is output to the CPU 101.

映像信号中には、AF評価値を求めるAFエリアが設定されている。AFエリア内のコントラスト信号を積分することで、当該AFエリアのAF評価値が求まる。CPU101は、レンズ群110に含まれるフォーカス・レンズを移動させながら、フォーカス・レンズ位置毎にAF評価値を求めていき、AF評価値のピーク時のフォーカス・レンズ位置を記憶する。また、複数のAFエリアを用いるマルチエリアAF方式の場合には、CPU101は、各AFエリアについてAF評価値のピークを求める。図2には、有効画面枠内に、3×3の9個のAFエリアを設けた様子を示している。図示のマルチエリアAFでは、これら9個のAFエリアについてAF評価値のピークを求めることになる。   An AF area for obtaining an AF evaluation value is set in the video signal. By integrating the contrast signal in the AF area, the AF evaluation value of the AF area is obtained. The CPU 101 obtains an AF evaluation value for each focus lens position while moving the focus lens included in the lens group 110, and stores the focus lens position at the peak of the AF evaluation value. In the case of the multi-area AF method using a plurality of AF areas, the CPU 101 obtains the peak of the AF evaluation value for each AF area. FIG. 2 shows a state where nine AF areas of 3 × 3 are provided in the effective screen frame. In the illustrated multi-area AF, the peak of the AF evaluation value is obtained for these nine AF areas.

その後、CPU101は、各AFエリアのAF評価値のピーク中、例えばある閾値以上のAF評価値を持つフォーカス・レンズ位置内で最も近距離の位置へフォーカス・レンズを移動させることで、自動合焦動作を行なうことができる。   Thereafter, the CPU 101 moves the focus lens to the closest distance within the focus lens position having an AF evaluation value equal to or greater than a certain threshold during the peak of the AF evaluation value of each AF area. Operation can be performed.

以下では、AF処理部116、及びそれを制御するCPU101の処理について詳解する。   Hereinafter, the AF processing unit 116 and the processing of the CPU 101 that controls the AF processing unit 116 will be described in detail.

図3には、コントラスト検出方式による自動合焦処理手順の一例をフローチャートの形式で示している。但し、撮影画像を複数のAFエリアに分割するマルチエリアAFを用いるものとする。   FIG. 3 shows an example of an automatic focusing process procedure using a contrast detection method in the form of a flowchart. However, multi-area AF that divides a captured image into a plurality of AF areas is used.

まず、処理の前に、AF評価値の閾値THafと合焦条件を、CPU101に設定する(ステップS300)。 First, before processing, the AF evaluation value threshold TH af and the focusing condition are set in the CPU 101 (step S300).

ここで、閾値THaf は、ある一定以上のAF評価値が得られないAFエリアについては非合焦エリアと判断し、当該AFエリアを無効とするために用いる閾値である。また、合焦条件は、閾値THaf以上のAF評価値を持つAFエリアの中から、合焦を行なう(フォーカス・レンズ位置を取得する)ために用いるAFエリアを選択する条件である。例えば、最も近距離のもの、AF評価値が高いもの、中心に近いもの、及び特定の被写体の検出結果の領域を含むものなどが、合焦条件となる。 Here, the threshold TH af is a threshold used to determine that an AF area for which an AF evaluation value of a certain level or more cannot be obtained is an out-of-focus area and invalidate the AF area. Further, the focusing condition, from the AF area with the threshold value TH af or more AF evaluation value, a condition for selecting the AF area used for performing the focus (to get the focus lens position). For example, the focusing condition is the closest distance, the AF evaluation value is high, the one near the center, or the detection result area of a specific subject.

AF評価値の閾値THafと合焦条件を設定した後、CPU101は、AF評価値を得るAFエリアをまず中央のエリア#1に設定する(ステップS301)。そして、CPU101は、モーター・ドライバー部102を介してレンズ・モーター部109を駆動制御して、レンズ群110内のフォーカス・レンズを初期位置に設定する(ステップS302)。ここで、フォーカス・レンズの初期位置は、例えば無限遠とする。 After setting the AF evaluation value threshold TH af and the focusing condition, the CPU 101 first sets the AF area from which the AF evaluation value is obtained as the center area # 1 (step S301). Then, the CPU 101 drives and controls the lens motor unit 109 via the motor / driver unit 102, and sets the focus lens in the lens group 110 to the initial position (step S302). Here, the initial position of the focus lens is, for example, infinity.

続いて、CPU101がモーター・ドライバー部102を介してレンズ・モーター部109を駆動制御して、フォーカス・レンズ位置を所定のステップ分だけ無限遠から至近側へ移動させる(ステップS303)。そして、移動後のフォーカス・レンズ位置で、カメラ信号処理エンジン103は、内部の高域通過フィルター(前述)によって、現在設定中のAFエリア内における高周波成分を検出して、コントラスト信号をCPU101に出力する(ステップS304)。CPU101は、取得したコントラスト信号を積分して、当該AFエリアのAF評価値を得る(ステップS305)。   Subsequently, the CPU 101 drives and controls the lens motor unit 109 via the motor / driver unit 102 to move the focus lens position from infinity to the closest side by a predetermined step (step S303). Then, the camera signal processing engine 103 detects a high-frequency component in the currently set AF area by the internal high-pass filter (described above) at the focus lens position after movement, and outputs a contrast signal to the CPU 101. (Step S304). The CPU 101 integrates the acquired contrast signal to obtain an AF evaluation value for the AF area (step S305).

ステップS305でAF評価値を得た後に、無限遠から最至近側までフォーカス・レンズの移動が完了したかどうかをチェックする(ステップS306)。ここで、フォーカス・レンズの移動が完了していなければ(ステップS306のNo)、ステップS303に戻り、フォーカス・レンズ位置をさらに至近側へ所定のステップ分だけ移動させて、当該AFエリアにおけるAF評価値の演算(ステップS305)を繰り返し行なう。   After obtaining the AF evaluation value in step S305, it is checked whether or not the movement of the focus lens from the infinity to the closest side is completed (step S306). If the movement of the focus / lens has not been completed (No in step S306), the process returns to step S303, the focus / lens position is further moved to the closest side by a predetermined step, and the AF evaluation in the AF area is performed. The value calculation (step S305) is repeated.

一方、最至近側までのフォーカス・レンズ位置の移動が完了していれば(ステップS306のYes)、現在設定中のAFエリアにおいてAF評価値の山を検出し、AF評価値の山の値とAF評価値の閾値THafとを比較する(ステップS307)。 On the other hand, if the movement of the focus lens position to the nearest side is completed (Yes in step S306), the peak of the AF evaluation value is detected in the currently set AF area, and the peak value of the AF evaluation value is The AF evaluation value threshold TH af is compared (step S307).

ここで、AF評価値の山の値が閾値THafよりも大きければ(ステップS307のYes)、CPU101は、AF評価値の山に対応するフォーカス・レンズ位置、及びAF評価値(山の値)を記憶する(ステップS308)。また、AF評価値の山の値が閾値THafよりも小さければ(ステップS307のNo)、CPU101はこのときのフォーカス・レンズ位置とAF評価値(山の値)を記憶せず、次に進む。 Here, larger than mountain value threshold TH af the AF evaluation value (Yes in step S307), CPU 101 is a focus lens position corresponding to the peak of the AF evaluation value, and the AF evaluation value (the value of the mountain) Is stored (step S308). If the peak value of the AF evaluation value is smaller than the threshold value TH af (No in step S307), the CPU 101 does not store the focus lens position and the AF evaluation value (peak value) at this time, and proceeds to the next. .

上記のステップS302〜S308までの処理で、1つのAFエリアにおけるフォーカス・レンズ位置の探索処理が終了する。ここで、有効画面枠内でまだ処理していないAFエリアがある場合には(ステップS309のNo)、次のAFエリアを設定してから(ステップS312)、ステップS302へ戻り、S302〜S308までの処理を繰り返し行なう。   The focus / lens position search process in one AF area is completed in the above-described steps S302 to S308. If there is an AF area that has not yet been processed within the effective screen frame (No in step S309), after setting the next AF area (step S312), the process returns to step S302 and goes to steps S302 to S308. Repeat the process.

すべてのAFエリアにおいて、フォーカス・レンズ位置及びAF評価値(山の値)の検出を終了した時点で(ステップS309のYes)、ある一定以上のAF評価値の山を持つAFエリアについて、CPU101は、フォーカス・レンズの合焦位置を記憶している。CPU101は、これらのAFエリアの中で、ステップS300で設定した合焦条件に適合するAFエリアを選択する(ステップS310)。   When the detection of the focus / lens position and the AF evaluation value (crest value) is completed in all AF areas (Yes in step S309), the CPU 101 determines the AF area having a crest with a certain AF evaluation value or more. The in-focus position of the focus lens is stored. The CPU 101 selects an AF area that matches the focusing condition set in step S300 from these AF areas (step S310).

そして、CPU101は、モーター・ドライバー部102を介してレンズ・モーター部109を駆動制御して、記憶したフォーカス・レンズ位置へフォーカス・レンズを移動させることにより、合焦動作が行なわれる(ステップS311)。   Then, the CPU 101 drives and controls the lens / motor unit 109 via the motor / driver unit 102 to move the focus lens to the stored focus / lens position, thereby performing a focusing operation (step S311). .

図4には、複数のAFエリアでフォーカス・レンズ位置毎にAF評価値を演算した結果を例示している。図示の例では、AF評価値の山の値が閾値THafを超えるAFエリアと閾値THaf未満となるAFエリアがある。例えば、合焦条件として最も近距離のAFエリアとした場合には、ステップS310、S311においてCPU101は、同図中(1)で示した位置にフォーカス・レンズ位置を移動させる。また、合焦条件として最もAF評価値が高いAFエリアとした場合には、ステップS310、S311においてCPU101は、同図中(2)で示した位置にフォーカス・レンズを移動させる。 FIG. 4 illustrates the result of calculating the AF evaluation value for each focus / lens position in a plurality of AF areas. In the illustrated example, there are an AF area where the peak value of the AF evaluation value exceeds the threshold TH af and an AF area where the peak value is less than the threshold TH af . For example, when the focusing area is the shortest AF area, the CPU 101 moves the focus / lens position to the position indicated by (1) in steps S310 and S311. Further, when the AF area having the highest AF evaluation value is set as the focusing condition, the CPU 101 moves the focus lens to the position indicated by (2) in steps S310 and S311.

上述までの図3に示した動作が、撮像装置の「自動合焦動作」に相当する。なお、AF処理部116、及び、ステップS300〜312の各状態における各処理部における処理内容は、上記に限定されるものではなく、本発明を実装するリソース(すなわち、CPU101の処理能力、及び、ハードウェアの実装規模制限、動作周波数など)に応じて自由に設定できるものとする。例えば、ハードウェア(処理エンジン)による処理部分の全部又は一部をCPU101で実行するソフトウェア・プログラムによって実現することも可能である。あるいは、CPU101による処理部分を、内部又は外部の専用ハードウェア(処理エンジン)として実装することも可能である。   The operation shown in FIG. 3 described above corresponds to the “automatic focusing operation” of the imaging apparatus. In addition, the processing content in each processing unit in each state of the AF processing unit 116 and steps S300 to 312 is not limited to the above, and the resource (that is, the processing capacity of the CPU 101 and the CPU 101) is implemented. It can be set freely according to the hardware implementation scale limit, operating frequency, etc.). For example, all or part of the processing portion by hardware (processing engine) can be realized by a software program executed by the CPU 101. Alternatively, the processing portion by the CPU 101 can be implemented as internal or external dedicated hardware (processing engine).

図3に示した処理手順では、図2に示した各AFエリアについてフォーカス・レンズ位置毎のAF評価値を演算した上で、合焦条件に適合するAFエリアにおける演算結果を用いてフォーカス・レンズ位置を検出する。ところが、コントラスト検出方式による自動合焦動作は、高輝度の被写体を含む領域や、コントラストの低い被写体を含む領域など、誤動作を生じ易く合焦処理が苦手とする領域があることが当業界で知られている(前述)。そこで、本願では、コントラスト検出方式による自動合焦が苦手とする領域を被写体に応じて特定し、かかる領域を除外してAF評価値の演算を行なう方法を以下に提案する。   In the processing procedure shown in FIG. 3, after the AF evaluation value for each focus / lens position is calculated for each AF area shown in FIG. 2, the focus lens is calculated using the calculation result in the AF area suitable for the focusing condition. Detect position. However, the autofocusing operation using the contrast detection method has been known in the art to include regions that are prone to malfunctioning, such as regions that include high-luminance subjects and regions that include subjects with low contrast. (Described above). In view of this, the present application proposes a method for specifying an area that is not suitable for automatic focusing by the contrast detection method according to the subject and calculating the AF evaluation value by excluding the area.

図5A〜図5Cには、被写体に応じてコントラスト検出の除外領域を特定する自動合焦処理手順の一例をフローチャートの形式で示している。ここで、本例の名称を「動作前除外モード」と称することにする。   FIG. 5A to FIG. 5C show an example of an automatic focusing process procedure for specifying a contrast detection exclusion region according to a subject in the form of a flowchart. Here, the name of this example is referred to as “pre-operation exclusion mode”.

但し、以下では、図6に示すような小動物の被写体を含んだフレームでマルチエリアAFの自動合焦機能を使用して撮影を行なう場合を想定して、図5A〜図5Cに示す処理手順について説明することにする。また、特徴量抽出エンジン105は、被写体からレンズ群110への入射光から所定の処理を行なって、DRAM108上に展開されている映像信号から、例えば既存のテンプレート・マッチングによるアルゴリズムによって小動物を検出し、さらに小動物の種類、位置、頭部の大きさ及び頭部のヨー方向の傾き度合いの特徴量を出力できるようにプログラミングされているものする。   However, in the following, the processing procedure shown in FIGS. 5A to 5C is assumed on the assumption that shooting is performed using a multi-area AF automatic focusing function in a frame including a subject of a small animal as shown in FIG. I will explain. Further, the feature quantity extraction engine 105 performs predetermined processing from the incident light from the subject to the lens group 110, and detects small animals from the video signal developed on the DRAM 108 by using, for example, an existing template matching algorithm. Further, it is programmed to output the feature quantity of the kind of the small animal, the position, the size of the head, and the degree of inclination of the head in the yaw direction.

まず、ユーザーが、「動作前除外モード」を選択する(ステップS500)。当該選択操作は、表示デバイス115などに表示されたメニュー画面内からユーザーに選択させる方法が一般的である。   First, the user selects “pre-operation exclusion mode” (step S500). The selection operation is generally performed by a method for allowing the user to select from a menu screen displayed on the display device 115 or the like.

ユーザーからのモード選択操作が終了すると、特徴量抽出エンジン105は、図6に示したような撮影画像から被写体を検出し、さらにも被写体の種類、フレーム中の位置、頭部の大きさ及び頭部のヨー方向の傾き度合いの各特徴量を抽出して、被写体及びその特徴量に関する情報をCPU101に出力する(ステップS501)。   When the mode selection operation from the user is completed, the feature amount extraction engine 105 detects the subject from the captured image as shown in FIG. 6, and further, the type of the subject, the position in the frame, the size of the head, and the head Each feature amount of the degree of inclination in the yaw direction is extracted, and information on the subject and the feature amount is output to the CPU 101 (step S501).

CPU101は、特徴量抽出エンジン105によって特定された被写体の種類に特化した、AFエリアの除外領域のパラメーターを設定する(ステップS502)。   The CPU 101 sets parameters of the exclusion area of the AF area specialized for the type of subject specified by the feature quantity extraction engine 105 (step S502).

例えば、図6に示したようなヒゲを有する被写体の小動物の場合には、ヒゲの部分が高輝度であることから、AF評価値に及ぼす影響が大きいことが懸念される。そこで、ステップS502では、ヒゲの部分を覆い隠せるような除外領域を定義するために、被写体検出枠を拡大する係数A、拡大した検出枠上を縦方向に3分割するための比率X、Y、及びZ(但し、X+Y+Z=1とし、X=Y=Zである必要はない)の4つのパラメーターを設定する。但し、被写体検出枠は、被写体となる小動物の頭部の位置とその大きさの枠で定義されるものとする。   For example, in the case of a small animal with a beard having a beard as shown in FIG. 6, since the beard portion has high brightness, there is a concern that the influence on the AF evaluation value is large. Therefore, in step S502, in order to define an exclusion region that can cover the beard portion, a coefficient A for enlarging the subject detection frame, and ratios X, Y for dividing the expanded detection frame into three in the vertical direction, And Z (where X + Y + Z = 1 and X = Y = Z need not be set). However, the subject detection frame is defined by a frame of the position of the head of a small animal that is a subject and its size.

また、図6に示した例では、被写体の小動物は正面を向いているが、図7に示すよう被写体がヨー方向に傾いている場合には、ステップS502では、特徴量抽出エンジンか105が検出したヨー方向の回転角度α[deg]を基に、検出枠の中点の横方向の移動量Mも設定する(但し、0゜≦α≦90゜とする)。ここで、中点の移動量Mは、例えば以下の式(1)により求めることができる。   In the example shown in FIG. 6, the small animal of the subject is facing the front, but when the subject is tilted in the yaw direction as shown in FIG. 7, the feature quantity extraction engine 105 detects in step S502. Based on the rotation angle α [deg] in the yaw direction, the horizontal movement amount M of the midpoint of the detection frame is also set (provided that 0 ° ≦ α ≦ 90 °). Here, the moving amount M of the midpoint can be obtained by the following equation (1), for example.

Figure 2010160297
Figure 2010160297

CPU101は、上記のようにして除外領域のパラメーターを設定した後、横方向は必要に応じて移動した枠の中点、縦方向は拡大後の枠の下側からZ分の点の交点を基準点(O)として、図6並びに図7に示すように、左右に高さY分の3角形からなる除外領域を決定する(ステップS503)。   After the CPU 101 sets the exclusion area parameters as described above, the horizontal direction is the midpoint of the moved frame as necessary, and the vertical direction is the intersection of the Z minute points from the lower side of the enlarged frame. As the point (O), as shown in FIGS. 6 and 7, an excluded area consisting of a triangle of height Y on the left and right is determined (step S503).

次いで、決定した除外領域が1つのAFエリアに対して充分小さいかどうかを判定する(ステップS504)。   Next, it is determined whether the determined exclusion area is sufficiently small with respect to one AF area (step S504).

除外領域が1つのAFエリアに対して十分に小さいときには、除外領域がAF評価値の演算結果に及ぼす影響は小さいと考えられる。そこで、除外領域が1つのAFエリアに対して充分小さいときには(ステップS504のYes)、後続のステップS505〜S511における、除外領域をAF評価値の演算対象から除外するための処理は行なわずに、ステップS512以降の処理に進む。ステップS512以降では、AFエリア毎のAF評価値の演算、合焦条件に応じたAF評価値の選択、及び合焦処理が実施される。除外領域が1つのAFエリアに対して充分小さい場合には、ステップS512以降における処理手順は、図3に示した通常のマルチエリアAFの処理手順と同様であり、得られる結果も通常のマルチエリアAFと同様となる。   When the excluded area is sufficiently small for one AF area, it is considered that the influence of the excluded area on the calculation result of the AF evaluation value is small. Therefore, when the excluded area is sufficiently small with respect to one AF area (Yes in step S504), the processing in the subsequent steps S505 to S511 for excluding the excluded area from the calculation target of the AF evaluation value is not performed. It progresses to the process after step S512. After step S512, calculation of an AF evaluation value for each AF area, selection of an AF evaluation value according to the focusing condition, and focusing processing are performed. When the excluded area is sufficiently small for one AF area, the processing procedure after step S512 is the same as the processing procedure of the normal multi-area AF shown in FIG. 3, and the obtained result is also the normal multi-area. Similar to AF.

一方、除外領域が1つのAFエリアに対して一定以上の大きさの場合には(ステップS504のNo)、除外領域がAF評価値の演算結果に及ぼす影響は無視できない。そこで、後続のステップS505〜S511において除外領域をAF評価値の演算対象から除外するための処理が行なわれる。このような除外処理を施すことによって、ステップS512以降における処理手順は、図3に示した通常のマルチエリアAFの処理手順とは異なるものとなり、得られる結果も通常のマルチエリアAFと異なってくる。   On the other hand, when the excluded area is a certain size or larger with respect to one AF area (No in step S504), the influence of the excluded area on the calculation result of the AF evaluation value cannot be ignored. Therefore, in the subsequent steps S505 to S511, a process for excluding the excluded area from the target for calculating the AF evaluation value is performed. By performing such exclusion processing, the processing procedure after step S512 is different from the normal multi-area AF processing procedure shown in FIG. 3, and the obtained result is also different from the normal multi-area AF. .

まず、CPU101は、AFエリア#1に着目する(ステップS505)。そして、着目しているAFエリアが、ステップS503で決定した除外領域と重なり合っているかどうかを判定する(ステップS506)。   First, the CPU 101 focuses on the AF area # 1 (step S505). Then, it is determined whether or not the focused AF area overlaps the excluded area determined in step S503 (step S506).

ここで、着目しているAFエリアと除外領域に重なりがある場合には(ステップS506のYes)、CPU101は、当該AFエリアを田の字型に4等分して、さらに細かい小AFエリアに分割する(ステップS507)。但し、このときのAFエリアの分割数と方法についてはさまざまなパターンが考えられる。本明細書では説明の簡素化のために4等分割とするが、本発明の要旨はこれに限定されるものではなく、より細かい分割を行なうこともできる。一方、除外領域との重なりがない場合には(ステップS506のNo)、当該AFエリアについては除外領域との重なり部分をAF評価値演算の対象から除外するためのステップS507〜S509の処理は行なわずに、ステップS510以降の処理に進む。   Here, if there is an overlap between the focused AF area and the exclusion area (Yes in step S506), the CPU 101 divides the AF area into four squares to make a smaller AF area smaller. Divide (step S507). However, various patterns are conceivable for the number and method of AF area division at this time. In this specification, for the sake of simplification of explanation, it is divided into four equal parts. However, the gist of the present invention is not limited to this, and finer division can be performed. On the other hand, if there is no overlap with the excluded area (No in step S506), the processing of steps S507 to S509 for excluding the overlapping area with the excluded area from the target of AF evaluation value calculation is performed for the AF area. Instead, the process proceeds to step S510 and subsequent steps.

また、CPU101は、除外領域と重なりがあるAFエリアについて、ステップS506で小AFエリアに4等分した後、各小AFエリアとステップS503で決定した除外領域との重なりをそれぞれ判定する。そして、除外領域と重なりのある小AFエリアをAF評価値演算の対象から除外する(ステップS508)。このときの重なりの判定は、例えば重なり領域がある一定の閾値以上となるときに、重なっている領域と判定する。   Further, the CPU 101 divides the AF area that overlaps the excluded area into four small AF areas in step S506, and then determines the overlap between each small AF area and the excluded area determined in step S503. Then, the small AF area that overlaps the excluded area is excluded from the target of AF evaluation value calculation (step S508). The determination of the overlap at this time is, for example, determined as an overlapping area when the overlap area is equal to or greater than a certain threshold value.

そして、CPU101は、ステップS508で当該AFエリアの中からAF評価値演算の対象から除外した小AFエリアの個数をカウントし、当該AFエリアのAF評価値の演算結果に乗算する乗数を求め、記憶しておく(ステップS509)。   In step S508, the CPU 101 counts the number of small AF areas excluded from the AF evaluation value calculation target from the AF area, obtains a multiplier for multiplying the calculation result of the AF evaluation value of the AF area, and stores it. (Step S509).

ここで言う乗数とは、除外領域と重なりのある小AFエリアを除外して、元のAFエリアよりも狭い面積で求めたAF評価値を正規化するためのものであり、後続のステップS520(後述)で使用される。例えば、4分割した後のAFエリアから、AF評価値演算の対象から除外された小AFエリアの個数が1のときには、残り3個の小AFエリアで当該AFエリア全体のAF評価値を求めることから、乗数は4/3となる。また、除外された小AFエリアの個数が2のときには乗数は2となり、除外された小エリアの個数が3のときには乗数は4となる。   The multiplier referred to here is for normalizing an AF evaluation value obtained in an area smaller than the original AF area by excluding a small AF area that overlaps the excluded area, and in subsequent step S520 ( Used later). For example, when the number of small AF areas excluded from the target of AF evaluation value calculation is 1 from the AF area after being divided into four, the AF evaluation values of the entire AF area are obtained from the remaining three small AF areas. Therefore, the multiplier is 4/3. The multiplier is 2 when the number of excluded small AF areas is 2, and the multiplier is 4 when the number of excluded small areas is 3.

上記のステップS506〜S509までの処理で、1つのAFエリアにおける、除外領域と重なりのある小AFエリアをAF評価値演算から除外して、有効なAFエリアを決定する処理が終了する。まだ処理していないAFエリアがある場合には(ステップS510のNo)、次のAFエリアを設定した後(ステップS511)、ステップS506へ戻って、ステップS506〜S509までの上記処理を繰り返し行なう。   In the processes from step S506 to S509, the small AF area that overlaps the excluded area in one AF area is excluded from the AF evaluation value calculation, and the process of determining an effective AF area ends. If there is an AF area that has not yet been processed (No in step S510), after setting the next AF area (step S511), the process returns to step S506, and the above processes from steps S506 to S509 are repeated.

そして、ステップS510までの処理で、各AFエリアについて、AFエリアの中からAF評価値の演算時に除外される領域が決定されることになるとともに、AFエリア中のAF評価値の演算時に使用される有効な領域が決定されることになる。   In the processing up to step S510, for each AF area, an area to be excluded from the AF area when calculating the AF evaluation value is determined and used when calculating the AF evaluation value in the AF area. The effective area is determined.

具体例として、図6に示したような被写体のフレームの場合、ステップS510までの処理によってAF評価値演算に不要な領域を小AFエリア単位で除外した結果、有効なAFエリアは図8のようになる。図8に示す具体例では、被写体のヒゲを含む除外領域と重なりのあるAFエリア#4、#5については、田の字に4等分された小AFエリアのうち除外領域と重なりが僅かな1つの小AFエリアのみがAF評価値演算に使用される有効な領域となる。また、除外領域と重なりのあるAFエリア#1については、田の字に4等分された小AFエリアのうち除外領域と重なりが僅かとなる上半分2つの小AFエリアがAF評価値演算に使用される有効な領域となる。図8に示す例では、斜線が残された領域がAF評価値演算に使用される有効な領域である。   As a specific example, in the case of the frame of the subject as shown in FIG. 6, as a result of excluding the area unnecessary for the AF evaluation value calculation by the processing up to step S510, the effective AF area is as shown in FIG. become. In the specific example shown in FIG. 8, with respect to the AF areas # 4 and # 5 that overlap with the exclusion area including the subject's beard, there is a slight overlap with the exclusion area in the small AF area equally divided into four squares. Only one small AF area is an effective area used for AF evaluation value calculation. For the AF area # 1 that overlaps with the excluded area, the two small AF areas that overlap with the excluded area slightly out of the small AF areas that are equally divided into four squares are used for AF evaluation value calculation. It is an effective area to be used. In the example shown in FIG. 8, the area where the oblique line is left is an effective area used for the AF evaluation value calculation.

ステップS511以降の処理では、図3に示したフローチャートに類似する処理手順に従って、自動合焦処理が行なわれる。但し、AF評価値の演算の際に、ステップS510までの処理により求めた、除外領域を除外したAFエリア上で当該演算を実行するという点で図3に示したフローチャートとは相違する。   In the processing after step S511, automatic focusing processing is performed according to a processing procedure similar to the flowchart shown in FIG. However, the calculation is different from the flowchart shown in FIG. 3 in that the calculation is executed on the AF area excluding the excluded area obtained by the processing up to step S510 when calculating the AF evaluation value.

まず、AF評価値の閾値THafと合焦条件を、CPU101に設定し(ステップS512:ステップS300に相当)、AF評価値を得るAFエリアをまず中央のAFエリア#1に設定する((ステップS513:ステップS301に相当)。 First, the AF evaluation value threshold TH af and the focusing condition are set in the CPU 101 (step S512: equivalent to step S300), and the AF area from which the AF evaluation value is obtained is first set in the center AF area # 1 ((step S513: equivalent to step S301).

ここで、現在AF評価値演算の対象に設定されているAFエリア全体が除外対象となっている場合には(ステップS514のYes)、後続のステップS515〜S524までのAF評価値演算に相当する処理は行なわない。そして、まだAF評価値演算を行なっていないAFエリアがある場合には(ステップS525)、次にAF評価値演算の対象とするAFエリアを設定してから(ステップS528:ステップS312に相当)、ステップS514へ戻り、AF評価値の演算処理を繰り返し行なう。あるいは、すべてのAFエリアについてAF評価値演算処理が終了していれば(ステップS525のYes)、次ステップS526以降に進む。   If the entire AF area currently set as the target for AF evaluation value calculation is an exclusion target (Yes in step S514), this corresponds to the AF evaluation value calculation in the subsequent steps S515 to S524. No processing is performed. If there is an AF area for which AF evaluation value calculation has not yet been performed (step S525), an AF area to be subjected to AF evaluation value calculation is set next (step S528: equivalent to step S312). Returning to step S514, the AF evaluation value calculation process is repeated. Alternatively, if the AF evaluation value calculation processing has been completed for all AF areas (Yes in step S525), the process proceeds to the next step S526 and subsequent steps.

一方、現在AF評価値演算の対象に設定されているAFエリア全体が除外対象でなければ(ステップS514のNo)、図3に示した自動合焦動作の処理手順と同様に、レンズ群110内のフォーカス・レンズを初期位置に設定した後(ステップS515:ステップS302に相当)、フォーカス・レンズ位置を所定のステップ分だけ無限遠から至近側へ移動させ(ステップS516:ステップS303に相当)、AFエリア内における高周波成分を検出して、コントラスト信号をCPU101に出力する(ステップS517:ステップS304に相当)。   On the other hand, if the entire AF area that is currently set as the target for AF evaluation value calculation is not an exclusion target (No in step S514), as in the processing procedure of the automatic focusing operation shown in FIG. After the focus lens is set to the initial position (step S515: equivalent to step S302), the focus lens position is moved from infinity to the closest side by a predetermined step (step S516: equivalent to step S303), and the AF area A high frequency component is detected and a contrast signal is output to the CPU 101 (step S517: equivalent to step S304).

あるフォーカス・レンズ位置でのコントラスト信号をステップS517で取得した後、続いて、現在のAFエリアの一部が除外対象であるかを判定する(ステップS518)。   After acquiring a contrast signal at a certain focus / lens position in step S517, it is subsequently determined whether a part of the current AF area is an exclusion target (step S518).

そして、現在のAFエリアの一部が除外対象となっている場合には(ステップS518のYes)、除外対象領域以外(すなわち、有効なAFエリア)のコントラスト信号でAF評価値の演算を行ない(ステップS519)、S509で求めたAF評価値の乗数をこのAF評価値に乗算する(ステップS520)。一方、現在のAFエリア内に除外領域がない場合には、図3に示した自動合焦動作の処理手順と同様に、AFエリア内のすべてのコントラスト信号でAF評価値の演算を行なう(ステップS521)。   If a part of the current AF area is to be excluded (Yes in step S518), the AF evaluation value is calculated using a contrast signal other than the exclusion target area (that is, an effective AF area) ( In step S519), the AF evaluation value multiplied in step S509 is multiplied by the AF evaluation value (step S520). On the other hand, if there is no exclusion area in the current AF area, the AF evaluation value is calculated for all the contrast signals in the AF area in the same manner as the processing procedure of the automatic focusing operation shown in FIG. S521).

図8に示した具体例では、AFエリア#1については、ステップS508において、4分割した後の下2つの小AFエリアが演算の対象から除外されているため(前述)、ステップS519では除外されていない上半分の領域のみを使ってAF評価値の演算を行ない、ステップS520ではステップS509で記憶した乗数2をその演算結果にかけて、当該AFエリアのAF評価値として出力する。   In the specific example shown in FIG. 8, for AF area # 1, the lower two small AF areas after being divided into four in step S508 are excluded from the calculation target (described above), and thus are excluded in step S519. The AF evaluation value is calculated using only the upper half area that is not present, and in step S520, the multiplier 2 stored in step S509 is multiplied by the calculation result and output as the AF evaluation value of the AF area.

また、AFエリア#4並びに#5については、ステップS508において、4分割した後のAFエリアの3つが除外されているため(前述)、ステップS519では除外されていない1つの領域のみを使ってAF評価値の演算を行ない、ステップS520ではステップS509で記憶した乗数4をその演算結果にかけて、当該AFエリアのAF評価値として出力する。   Also, for AF areas # 4 and # 5, since three AF areas after being divided into four are excluded in step S508 (described above), only one area not excluded in step S519 is used for AF area # 4 and # 5. The evaluation value is calculated, and in step S520, the multiplier 4 stored in step S509 is multiplied by the calculation result and output as the AF evaluation value of the AF area.

その他のAFエリア#2、#3、#6、#7、#8、#9については、除外領域を含まないので、図3に示した自動合焦動作の処理手順と同様に、AFエリア内のすべてのコントラスト信号でAF評価値の演算を行なう(ステップS521)。   Since the other AF areas # 2, # 3, # 6, # 7, # 8, and # 9 do not include the excluded area, the AF area # 2, # 3, # 6, # 7, # 8, and # 9 do not include the excluded area. The AF evaluation value is calculated for all the contrast signals (step S521).

このようにしてステップS516で設定したフォーカス・レンズ位置にて、現在着目しているAFエリアについてAF評価値を得た後に、無限遠から最至近側までフォーカス・レンズの移動が完了したかどうかをチェックする(ステップS522:ステップS306に相当)。ここで、フォーカス・レンズの移動が完了していなければ(ステップS522のNo)、ステップS516に戻り、フォーカス・レンズ位置をさらに至近側へ所定のステップ分だけ移動させて、ステップS517〜S521までの当該AFエリアにおけるAF評価値の演算を繰り返し行なう。   In this way, after obtaining the AF evaluation value for the currently focused AF area at the focus / lens position set in step S516, it is checked whether the movement of the focus / lens has been completed from infinity to the nearest side. (Step S522: equivalent to Step S306). If the movement of the focus / lens has not been completed (No in step S522), the process returns to step S516, the focus / lens position is further moved to the closest side by a predetermined step, and steps S517 to S521 are performed. The calculation of the AF evaluation value in the AF area is repeated.

そして、最至近側までのフォーカス・レンズ位置の移動が完了していれば(ステップS522のYes)、現在設定中のAFエリアにおいてAF評価値の山を検出し、AF評価値の山の値とAF評価値の閾値THafとを比較する(ステップS523:ステップS307)。 If the movement of the focus / lens position to the closest side is completed (Yes in step S522), an AF evaluation value peak is detected in the currently set AF area, and the AF evaluation value peak value and The AF evaluation value threshold TH af is compared (step S523: step S307).

ここで、AF評価値の山の値が閾値THafよりも大きければ(ステップS523のYes)、CPU101は、AF評価値の山に対応するフォーカス・レンズ位置、及びAF評価値(山の値)を記憶する(ステップS524:ステップS308)。また、AF評価値の山の値が閾値THafよりも小さければ(ステップS523のNo)、CPU101はこのときのフォーカス・レンズ位置とAF評価値(山の値)を記憶せず、次に進む。 Here, larger than mountain value threshold TH af the AF evaluation value (Yes in step S523), CPU 101 is a focus lens position corresponding to the peak of the AF evaluation value, and the AF evaluation value (the value of the mountain) Is stored (step S524: step S308). If the peak value of the AF evaluation value is smaller than the threshold value TH af (No in step S523), the CPU 101 does not store the focus lens position and the AF evaluation value (peak value) at this time, and proceeds to the next. .

上記のステップS515〜S524までの処理で、1つのAFエリアにおけるフォーカス・レンズ位置の探索処理が終了する。ここで、有効画面枠内でまだ処理していないAFエリアがある場合には(ステップS525のNo:ステップS309に相当)、次のAFエリアを設定してから(ステップS528:ステップS312に相当)、ステップS514へ戻り、S514〜S524までの処理を繰り返し行なう。   The focus / lens position search process in one AF area is completed in the processes from step S515 to S524. If there is an AF area that has not yet been processed within the effective screen frame (No in step S525: equivalent to step S309), the next AF area is set (step S528: equivalent to step S312). Then, the process returns to step S514, and the processes from S514 to S524 are repeated.

すべてのAFエリアにおいて、フォーカス・レンズ位置及びAF評価値(山の値)の検出を終了した時点で(ステップS525のYes)、ある一定以上のAF評価値の山を持つAFエリアについて、CPU101は、フォーカス・レンズの合焦位置を記憶している。そして、CPU101は、これらのAFエリアの中で、ステップS512で設定した合焦条件に適合するAFエリアを選択する(ステップS526:ステップS310)。そして、CPU101は、モーター・ドライバー部102を介してレンズ・モーター部109を駆動制御して、記憶したフォーカス・レンズ位置へフォーカス・レンズを移動させることにより、合焦動作が行なわれる(ステップS527:ステップS311に相当)。   When the detection of the focus / lens position and the AF evaluation value (peak value) is completed in all AF areas (Yes in step S525), the CPU 101 determines whether the AF area has a peak with a certain AF evaluation value or more. The in-focus position of the focus lens is stored. Then, the CPU 101 selects an AF area that matches the focusing condition set in step S512 from these AF areas (step S526: step S310). Then, the CPU 101 drives and controls the lens / motor unit 109 via the motor / driver unit 102 to move the focus lens to the stored focus / lens position, thereby performing a focusing operation (step S527: Equivalent to step S311).

以上説明してきたように、図5A〜図5Cに示した自動合焦動作の処理手順によれば、顔特徴量抽出処理によって撮影画像から被写体を検出し、自動合焦動作を行なう前にあらかじめ検出された被写体の種類などに応じて特化してAF評価値の正常な演算の妨げとなる領域を決定し、マルチエリアAFの各AFエリアからその領域を除外した後の残った領域を用いてAF評価値の演算を行なうようにしている。これによって、無効なAF評価値の演算が削減され、より早く精度の高い自動合焦動作を実現することができる。   As described above, according to the processing procedure of the automatic focusing operation shown in FIGS. 5A to 5C, the subject is detected from the photographed image by the face feature amount extraction process, and is detected before the automatic focusing operation is performed. An area that hinders normal calculation of the AF evaluation value is determined depending on the type of the subject that has been processed, and the remaining area after the area is excluded from each AF area of the multi-area AF is used to perform AF. The evaluation value is calculated. As a result, the calculation of invalid AF evaluation values is reduced, and an automatic focusing operation with higher accuracy can be realized faster.

上記及び図6〜図8では、小動物の被写体を含んだフレームでマルチエリアAFの自動合焦動作を行なう場合を例にとって、マルチエリアAFの構成例、コントラスト検出方式による自動合焦動作が苦手とする除外領域、顔特徴抽出によって特定した小動物の種類、位置、頭部の大きさ及び頭部のヨー方向の傾き度合いの特徴量を基にAF評価値演算に不要な領域を除去して得られる有効なAFエリアを示した。   In the above and FIGS. 6 to 8, the multi-area AF automatic focusing operation is performed as an example in the frame including the subject of the small animal, and the configuration example of the multi-area AF and the automatic focusing operation by the contrast detection method are not good. Obtained by removing the unnecessary area for AF evaluation value calculation based on the excluded area, the feature quantity of the small animal type, position, head size and head tilt degree in the yaw direction identified by facial feature extraction An effective AF area is shown.

但し、本発明の要旨は、特定の被写体の種類に限定されるものではなく、人物やその他の動物、植物、さらにその他の特徴量抽出可能な物体を撮影する際の自動合焦処理の対象とすることができる。   However, the gist of the present invention is not limited to a specific subject type, and is a subject of automatic focusing processing when photographing a person, other animals, plants, and other objects that can be extracted with feature quantities. can do.

図14には、人物の被写体を含んだフレームにおけるマルチエリアAFの構成例並びにコントラスト検出方式による自動合焦動作が苦手とする除外領域を示している。   FIG. 14 shows a configuration example of multi-area AF in a frame including a person's subject and an excluded area that is not suitable for an automatic focusing operation using a contrast detection method.

被写体が人物の場合、ステップS501では、特徴量抽出エンジン105は、図14に示すフレームから被写体を検出し、さらに被写体の種類(人物)、フレーム中の顔の位置、顔部分の大きさ、及び、ヨー方向の傾き度合いなどの各特徴量を抽出して、CPU101に出力する。次いで、ステップS502では、CPU101は、検出された被写体の種類に特化したAFエリアの除外領域のパラメーターを設定する。図14に示すように被写体が人物の場合には、頬の部分が低コントラストであり、AF評価値のピークが不明瞭な特性になってしまうことや、コントラスト信号レベルが低いためノイズの影響を受け易いことから、AF評価値を取得する領域(AFエリア)としては適さないと考えられる。そこで、図14に示す例では、頬の部分の領域をAFエリアからの除外領域とする。   When the subject is a person, in step S501, the feature amount extraction engine 105 detects the subject from the frame shown in FIG. 14, and further, the type of the subject (person), the position of the face in the frame, the size of the face portion, and Each feature quantity such as the degree of inclination in the yaw direction is extracted and output to the CPU 101. Next, in step S502, the CPU 101 sets parameters for the excluded area of the AF area specialized for the detected subject type. As shown in FIG. 14, when the subject is a person, the cheek portion has a low contrast, the peak of the AF evaluation value becomes unclear, and the influence of noise is low because the contrast signal level is low. Since it is easy to receive, it is considered that it is not suitable as an area (AF area) for acquiring an AF evaluation value. Therefore, in the example shown in FIG. 14, the cheek portion area is excluded from the AF area.

CPU101は、頬の部分を覆い隠せるような領域を定義するために、検出した被写体枠に対する眉間幅に対応する比率M、被写体検出枠上を縦方向に4分割するための比率X、Y、Z、及びW(但し、X+Y+Z+W=1とする)の5つのパラメーターを、ステップS502で設定する。   In order to define a region that can cover the cheek portion, the CPU 101 determines a ratio M corresponding to the width between the eyebrows with respect to the detected subject frame, and ratios X, Y, and Z for dividing the subject detection frame into four in the vertical direction. , And W (where X + Y + Z + W = 1) are set in step S502.

これら5つのパラメーターにより、図14に示すように、横方向は被写体検出枠の左右端、縦方向は被写体検出枠の上端からX分の交点をA点、横方向は被写体検出枠の中点からM分、縦方向は被写体検出枠の上端からX+Y分(又は、被写体検出枠の下端からW+Z分)の交点をB点、横方向はB点と同様、縦方向は被写体検出枠の下端からW分の交点をC点、横方向はA点と同様、縦方向は被写体検出枠の下端との交点をD点とする。この場合、ステップS503では、CPU101は、台形BCDAを、被写体となる人物の頬を含む除外領域として決定する。   According to these five parameters, as shown in FIG. 14, the horizontal direction is the left and right ends of the subject detection frame, the vertical direction is the intersection A for X from the upper end of the subject detection frame, and the horizontal direction is from the middle point of the subject detection frame. The vertical direction is W from the lower end of the subject detection frame in the same manner as point B, the intersection in the vertical direction is X + Y from the upper end of the subject detection frame (or W + Z from the lower end of the subject detection frame). The crossing point of the minute is the C point, the horizontal direction is the same as the A point, and the vertical direction is the crossing point of the lower end of the subject detection frame as the D point. In this case, in step S503, the CPU 101 determines the trapezoid BCDA as an excluded area including the cheek of the person who is the subject.

そして、CPU101が、S505〜S511における、除外領域をAF評価値の演算対象から除外するための処理は行なうと、有効なAFエリアは図15に示すようになる。すなわち、人物の頬を含む除外領域との重なりの大きなAFエリア#4、#5については、田の字に4等分された小AFエリアのうち除外領域と重なりが大きな1つの小AFエリアがそれぞれ除外され、その他の3つの小AFエリアがAF評価値演算に使用される有効な領域となる。また、同様にAFエリア#1については、下半分2つの小Fエリアが除外され、その他の2つの小AFエリアがAF評価値演算に使用される有効な領域となる。   When the CPU 101 performs the process for excluding the excluded area from the AF evaluation value calculation target in S505 to S511, the effective AF area is as shown in FIG. That is, for AF areas # 4 and # 5 having a large overlap with the exclusion area including the person's cheek, one small AF area having a large overlap with the exclusion area among the small AF areas equally divided into four squares. Each of these three small AF areas is excluded and becomes an effective area used for AF evaluation value calculation. Similarly, for the AF area # 1, the lower two small F areas are excluded, and the other two small AF areas are effective areas used for AF evaluation value calculation.

なお、図5A〜図5Cに示した処理手順では、ヒゲを有する小動物や人物の被写体検出枠内で除外領域を決定する方法は固定的なものである。これに対し、自動合焦動作前又は自動合焦動作中に、特徴量抽出エンジン105から読み出される被写体の特徴量の変化量に応じて除外領域を決定する方法を変更するようにしてもよい。   In the processing procedure shown in FIGS. 5A to 5C, the method for determining the exclusion region within the subject detection frame of a small animal or a person with a beard is fixed. On the other hand, the method of determining the exclusion region may be changed according to the amount of change in the feature amount of the subject read from the feature amount extraction engine 105 before or during the automatic focusing operation.

図9A〜図9Cには、被写体に応じてコントラスト検出の除外領域を特定する自動合焦処理手順の他の例をフローチャートの形式で示している。ここで、本例の名称を「動作中除外モード」と称することにする。   FIG. 9A to FIG. 9C show other examples of the automatic focusing processing procedure for specifying the contrast detection exclusion region according to the subject in the form of a flowchart. Here, the name of this example will be referred to as “in-operation exclusion mode”.

但し、以下では、図10に示すような被写体を含んだフレームでマルチエリアAFの自動合焦機能を使用して撮影を行なう場合を想定して、図10に示す処理手順について説明することにする。図10に示す被写体は、図6と同様にヒゲを有する小動物であるが、障害物(フェンスなど)により妨害されている点で相違する。   However, in the following, the processing procedure shown in FIG. 10 will be described on the assumption that shooting is performed using a multi-area AF automatic focusing function in a frame including a subject as shown in FIG. . The subject shown in FIG. 10 is a small animal having a beard as in FIG. 6, but differs in that it is obstructed by an obstacle (such as a fence).

また、特徴量抽出エンジン105は、被写体からレンズ群110への入射光から所定の処理を行なって、DRAM108上に展開されている映像信号から、例えば既存のテンプレート・マッチングによるアルゴリズムによって小動物を検出し、さらに小動物の種類、位置、頭部の大きさ及び頭部のヨー方向の傾き度合いの特徴量を出力できるようにプログラミングされているものする。   Further, the feature quantity extraction engine 105 performs predetermined processing from the incident light from the subject to the lens group 110, and detects small animals from the video signal developed on the DRAM 108 by using, for example, an existing template matching algorithm. Further, it is programmed to output the feature quantity of the kind of the small animal, the position, the size of the head, and the degree of inclination of the head in the yaw direction.

また、特徴量抽出エンジン105は、被写体となる小動物の代表的な頭部の大きさに対して、図11Aに示すような走査順序で走査した場合の連続的なコントラスト信号を、被写体の特徴量データとしてROM(Read Only Memory)(図示しない)などからなる特徴量データ保持部(図示しない)に記憶しておくものとする。   In addition, the feature quantity extraction engine 105 outputs a continuous contrast signal when a typical head size of a small animal serving as a subject is scanned in a scanning order as shown in FIG. Assume that data is stored in a feature data holding unit (not shown) such as a ROM (Read Only Memory) (not shown).

まず、ユーザーが、「動作前除外モード」を選択する(ステップS900)。当該選択操作は、表示デバイス115などに表示されたメニュー画面内からユーザーに選択させる方法が一般的である。   First, the user selects “pre-operation exclusion mode” (step S900). The selection operation is generally performed by a method for allowing the user to select from a menu screen displayed on the display device 115 or the like.

次いで、AF評価値の閾値THafと合焦条件を、CPU101に設定し(ステップS901:ステップS300に相当)、さらに、AF評価値の判定閾値THjdを設定する(ステップS901)。ここで、AF評価値の判定閾値THjdは、AH評価値の閾値THafよりも低い値であり、AF評価値が閾値THafに達する前に処理対象とするAFエリアのAF評価値を判定し、当該AFエリア内から除外領域の判定処理を行なうかどうかを選択するために用いる閾値である。 Next, the AF evaluation value threshold TH af and the focusing condition are set in the CPU 101 (corresponding to step S901: step S300), and the AF evaluation value determination threshold TH jd is set (step S901). Here, the AF evaluation value determination threshold TH jd is lower than the AH evaluation value threshold TH af , and the AF evaluation value of the AF area to be processed is determined before the AF evaluation value reaches the threshold TH af. And a threshold value used for selecting whether or not to perform the exclusion area determination process from the AF area.

次いで、特徴量抽出エンジン105は、図10に示したような撮影画像から被写体を検出し、さらにも被写体の種類、フレーム中の位置、頭部の大きさ及び頭部のヨー方向の傾き度合いの各特徴量を抽出して、被写体及びその特徴量に関する情報をCPU101に出力する(ステップS903:ステップS501に相当)。   Next, the feature quantity extraction engine 105 detects the subject from the captured image as shown in FIG. 10, and further determines the type of subject, the position in the frame, the size of the head, and the degree of inclination of the head in the yaw direction. Each feature amount is extracted, and information on the subject and the feature amount is output to the CPU 101 (step S903: equivalent to step S501).

これ以降において、図3で示したと同様の自動合焦動作が行なわれる。但し、あるフォーカス・レンズ位置でのAF評価値を演算する際に、前回のフォーカス・レンズ位置でのAF評価値が、ステップS902で設定した判定閾値THjdよりも大きい場合には、処理対象としているAFエリア内の除外領域を決定する処理が追加される。そして、当該AFエリアに対しては、以後のフォーカス・レンズの各位置では、先に求めた除外領域を除外してAF評価値の演算が行なわれることになる。 Thereafter, the same automatic focusing operation as shown in FIG. 3 is performed. However, when calculating the AF evaluation value at a certain focus / lens position, if the AF evaluation value at the previous focus / lens position is larger than the determination threshold TH jd set in step S902, the calculation target is A process for determining an exclusion area in the AF area is added. For the AF area, the AF evaluation value is calculated by excluding the previously determined excluded area at each subsequent position of the focus lens.

AF評価値を得るAFエリアをまず中央のAFエリア#1に設定する(ステップS904:ステップS301に相当)。そして、CPU101は、モーター・ドライバー部102を介してレンズ・モーター部109を駆動制御して、レンズ群110内のフォーカス・レンズを初期位置に移動する(ステップS905:ステップS302)。ここで、フォーカス・レンズの初期位置は、例えば無限遠とする。   First, the AF area from which the AF evaluation value is obtained is set to the center AF area # 1 (step S904: equivalent to step S301). The CPU 101 drives and controls the lens motor unit 109 via the motor / driver unit 102 to move the focus lens in the lens group 110 to the initial position (step S905: step S302). Here, the initial position of the focus lens is, for example, infinity.

続いて、CPU101がモーター・ドライバー部102を介してレンズ・モーター部109を駆動制御して、フォーカス・レンズ位置を所定のステップ分だけ無限遠から至近側へ移動させる(ステップS906:ステップS303)。そして、移動後のフォーカス・レンズ位置で、カメラ信号処理エンジン103は、内部の高域通過フィルター(前述)によって、現在設定中のAFエリア内における高周波成分を検出して、コントラスト信号をCPU101に出力する(ステップS907:ステップS304)。   Subsequently, the CPU 101 drives and controls the lens motor unit 109 via the motor / driver unit 102 to move the focus lens position from infinity to the closest side by a predetermined step (step S906: step S303). Then, the camera signal processing engine 103 detects a high-frequency component in the currently set AF area by the internal high-pass filter (described above) at the focus lens position after movement, and outputs a contrast signal to the CPU 101. (Step S907: Step S304).

ここで、CPU101は、当該AFエリアにおいて、図11Aに示すような走査順序で走査して得られたコントラスト信号を、DRAM106などに記憶しておく(ステップS908)。   Here, the CPU 101 stores a contrast signal obtained by scanning in the AF area in the scanning order as shown in FIG. 11A in the DRAM 106 or the like (step S908).

当該フォーカス・レンズ位置でのAF評価値を演算する際、前回のフォーカス・レンズ位置で演算済みのAF評価値を、ステップS902で設定した判定閾値THjdと大小比較する(ステップS909)。 When calculating the AF evaluation value at the focus / lens position, the AF evaluation value calculated at the previous focus / lens position is compared with the determination threshold TH jd set in step S902 (step S909).

ここで、前回のフォーカス・レンズ位置で演算済みのAF評価値が判定閾値THjdよりも大きい場合には(ステップS909のYes)、現在のAFエリア内の除外領域を決定するための、以下の処理を試みる。 Here, when the AF evaluation value calculated at the previous focus / lens position is larger than the determination threshold TH jd (Yes in step S909), the following for determining the exclusion area in the current AF area is as follows: Attempt processing.

まず、ステップS903で特徴量抽出エンジン105によって得られた被写体の特徴量より、現在のAFエリアが被写体検出枠を含むかどうかの判定を行なう(ステップS910)。但し、被写体検出枠は、被写体となる小動物の頭部の位置とその大きさの枠で定義されるものとする。   First, it is determined whether or not the current AF area includes a subject detection frame from the feature amount of the subject obtained by the feature amount extraction engine 105 in step S903 (step S910). However, the subject detection frame is defined by a frame of the position of the head of a small animal that is a subject and its size.

現在のAFエリアが被写体検出枠を含まない場合には(ステップS910のNo)、現在のAFエリアから除外領域を決定する処理をスキップする。一方、現在のAFエリアが被写体検出枠を含む場合には(ステップS910のYes)、特徴量抽出エンジン105は、特徴量データ保持部(図示しない)に記憶しておいた特徴量データのうち現在のAFエリアに相当する部分を、図11Aに示すような走査順序で走査して、被写体検出枠と重なる被写体検出領域の部分を通過する走査ラインにおいて、その被写体に特化した特徴量データ(言い換えると、被写体検出領域に特徴的となるパターン化からなるコントラスト信号)を走査順に出力する(ステップS911)。   If the current AF area does not include the subject detection frame (No in step S910), the process of determining the excluded area from the current AF area is skipped. On the other hand, when the current AF area includes the subject detection frame (Yes in step S910), the feature amount extraction engine 105 includes the current feature amount data stored in the feature amount data holding unit (not shown). A portion corresponding to the AF area is scanned in a scanning order as shown in FIG. 11A, and in a scanning line passing through the portion of the subject detection area that overlaps the subject detection frame, feature amount data specialized for that subject (in other words, And a contrast signal formed by patterning characteristic to the subject detection area) are output in the scanning order (step S911).

続いて、CPU101は、特徴量抽出エンジン105から被写体に特化したコントラスト信号を受け取ると、ステップS908で記憶したコントラスト信号(すなわち、現在のフォーカス・レンズ位置で得られた当該AFエリア内のコントラスト信号)と、ステップS911で得られたコントラスト信号(被写体に特化したコントラスト信号)を、図11Aに示すような走査順序で走査を行なう(ステップS912)。   Subsequently, when the CPU 101 receives the contrast signal specific to the subject from the feature amount extraction engine 105, the contrast signal stored in step S908 (that is, the contrast signal in the AF area obtained at the current focus lens position). ) And the contrast signal obtained in step S911 (contrast signal specific to the subject) is scanned in the scanning order as shown in FIG. 11A (step S912).

ここで、CPU101は、ステップS912において、ステップS911で得られたコントラスト信号を走査する際には、ステップS903で特徴量抽出エンジン105により撮影画像から検出された被写体検出枠の大きさやヨー方向の傾き度合いを基に、コントラスト信号の正規化を行なう。具体的な正規化方法として、例えば、被写体検出枠の大きさより少し小さな被写体検出枠に対応するコントラスト信号をステップS911において特徴量抽出エンジン105(内の特徴量データ保持部)から出力した後、ステップS903で検出された被写体検出枠との倍率に応じて縦方向及び横方向にそれぞれ重複して走査を行なうとともに、ヨー方向の傾きについては、傾きの方向と度合いによって間引き走査を行なうなどの方法が挙げられる。   Here, when the CPU 101 scans the contrast signal obtained in step S911 in step S912, the size of the subject detection frame detected from the photographed image by the feature amount extraction engine 105 in step S903 or the inclination in the yaw direction. The contrast signal is normalized based on the degree. As a specific normalization method, for example, after outputting a contrast signal corresponding to a subject detection frame slightly smaller than the size of the subject detection frame from the feature amount extraction engine 105 (internal feature amount data holding unit) in step S911, Depending on the magnification with the subject detection frame detected in S903, scanning is performed in the vertical direction and the horizontal direction, and the inclination in the yaw direction is thinned according to the direction and degree of inclination. Can be mentioned.

CPU101は、コントラスト信号を走査した後、AFエリア内で被写体検出枠と重なる被写体検出領域において、ステップS908で記憶したコントラスト信号中に、ステップS911で得られた被写体に特化した特徴量データ(言い換えれば、被写体検出領域に期待されるコントラスト信号の特性)が存在するかどうかを判定する(ステップS913)。   The CPU 101 scans the contrast signal, and in the subject detection area that overlaps the subject detection frame in the AF area, in the contrast signal stored in step S908, the feature amount data specialized for the subject obtained in step S911 (in other words, For example, it is determined whether or not the expected contrast signal characteristic exists in the subject detection area (step S913).

例えば、CPU101は、被写体検出領域に対して、ステップS911において特徴量抽出エンジン105から出力した(被写体の特徴量データとなる)コントラスト信号との誤差を求める。そして、この誤差がある一定の範囲内であれば、現在のフォーカス・レンズ位置で得られたコントラスト信号中に被写体に特化した特徴量データが存在する(すなわち、当該走査ライン上が被写体検出領域を通過する)と判定することができる。また、この誤差が一定の範囲を逸脱するときには、現在のフォーカス・レンズ位置で得られたコントラスト信号中に被写体に特化した特徴量データは存在しないと判定することができる。   For example, the CPU 101 obtains an error from the contrast signal output from the feature amount extraction engine 105 in step S911 (which becomes subject feature amount data) for the subject detection region. If this error is within a certain range, feature data specific to the subject exists in the contrast signal obtained at the current focus / lens position (that is, the scanning line is the subject detection region). Can be determined). When this error deviates from a certain range, it can be determined that there is no feature amount data specialized for the subject in the contrast signal obtained at the current focus / lens position.

図11Bには、AFエリアを図11Aに示した走査順序で走査したコントラスト信号の特性例を示している。同図中、参照番号1103で示される曲線は、ステップS911において特徴量抽出エンジン105(内の特徴量データ保持部)から出力される特徴量データ、すなわち被写体に特化した連続的なコントラスト信号である。また、参照番号1101、1102で示される曲線は、ステップS908でCPU101が記憶した連続的なコントラスト信号(すなわち、現在のフォーカス・レンズ位置で得られた当該AFエリア内のコントラスト信号)の2例である。   FIG. 11B shows a characteristic example of the contrast signal obtained by scanning the AF area in the scanning order shown in FIG. 11A. In the figure, a curve indicated by reference numeral 1103 is feature amount data output from the feature amount extraction engine 105 (internal feature amount data holding unit) in step S911, that is, a continuous contrast signal specialized for a subject. is there. Curves indicated by reference numbers 1101 and 1102 are two examples of continuous contrast signals (that is, contrast signals in the AF area obtained at the current focus / lens position) stored by the CPU 101 in step S908. is there.

一方の連続的なコントラスト信号1101は、被写体検出領域に該当する走査ラインにおいて被写体に特化したコントラスト信号1103と同様の特性を含み、誤差が一定範囲内であることから、ステップS913では、被写体に特化した特徴量データ(期待されるコントラスト信号の特性)が存在すると判定することができる。また、他方の連続的なコントラスト信号1102は、被写体検出領域に該当する走査ラインにおいて被写体に特化したコントラスト信号1103と同様の特性を含まず、誤差が一定範囲を逸脱することから、ステップS913では、被写体に特化した特徴量データが存在しないと判定することができる。   One continuous contrast signal 1101 includes characteristics similar to the contrast signal 1103 specialized for the subject in the scanning line corresponding to the subject detection region, and the error is within a certain range. It can be determined that specialized feature data (expected contrast signal characteristics) exists. Further, the other continuous contrast signal 1102 does not include the same characteristics as the contrast signal 1103 specialized for the subject in the scanning line corresponding to the subject detection region, and the error deviates from a certain range. Therefore, it can be determined that there is no feature amount data specialized for the subject.

ステップS913で、AFエリア内の被写体検出領域で被写体に特化した特徴量データが存在しないと判定した場合には、CPU101は、走査順序を基に、AFエリア内でのその領域を記憶する。この判定は、AFエリア内の被写体検出領域に本来あるべき特徴量データが障害物などにより妨害されている場面を想定している。例えば図10に示したように、フレーム中で検出された被写体が障害物(フェンスなど)により妨害されているような場面である。   If it is determined in step S913 that there is no feature data specific to the subject in the subject detection region in the AF area, the CPU 101 stores the region in the AF area based on the scanning order. This determination assumes a scene in which feature data that should originally exist in the subject detection area in the AF area is obstructed by an obstacle or the like. For example, as shown in FIG. 10, it is a scene where the subject detected in the frame is obstructed by an obstacle (such as a fence).

ここで、ステップS913で被写体に特化した特徴量データが存在しないと判定した場合には、AFエリア内の除外領域を決定する。   If it is determined in step S913 that there is no feature amount data specialized for the subject, an excluded area in the AF area is determined.

まず、CPU101は、当該AFエリアを田の字型に4等分して、さらに細かい小AFエリアに分割する(ステップS914:ステップS507に相当)。このときの分割数と方法についてはさまざまなパターンが考えられる。以下の説明では処理の簡略化のために4等分割とするが(同上)、より細かい分割を行なうこともできる。   First, the CPU 101 divides the AF area into four squares and divides it into smaller AF areas (step S914: equivalent to step S507). Various patterns can be considered for the number of divisions and the method. In the following description, four equal divisions are used for simplification of processing (same as above), but finer divisions can also be performed.

そして、CPU101は、4等分した後の小AFエリアの各々について、AF評価値演算の対象から除外すべきかどうかを判定して、当該AFエリア内の除外領域を決定する(ステップS915)。   Then, the CPU 101 determines whether or not each small AF area that has been divided into four equal parts should be excluded from the target of AF evaluation value calculation, and determines an excluded area within the AF area (step S915).

また、CPU101は、ステップS915で当該AFエリアの中からAF評価値演算の対象から除外した小AFエリアの個数をカウントし、当該AFエリアのAF評価値の演算結果に乗算する乗数を求め、記憶しておく(ステップS916:ステップS509に相当)。   In step S915, the CPU 101 counts the number of small AF areas excluded from the AF evaluation value calculation target from the AF area, obtains a multiplier for multiplying the calculation result of the AF evaluation value of the AF area, and stores it. (Step S916: equivalent to step S509).

ステップS915では、具体的には、4等分した後の小AFエリアが、被写体に特化した特徴量データが存在しないとしてステップS913で記憶しておいた領域と重なっている場合には、その小AFエリアをAF評価値演算の対象から除外する領域と決定することができる。また、このときの重なりの判定は、例えば重なり領域がある一定の閾値以上の時に重なっている領域と判定するようにすればよい。   Specifically, in step S915, if the small AF area after being equally divided into four overlaps with the area stored in step S913 assuming that there is no feature amount data specialized for the subject, The small AF area can be determined as an area to be excluded from the target of AF evaluation value calculation. Further, the determination of the overlap at this time may be made, for example, by determining that the overlapping area is an overlapping area when the overlapping area is equal to or greater than a certain threshold value.

具体例として、図10に示したような被写体のフレームの場合、ステップS916までの処理によってAF評価値演算に不要な領域を小AFエリア単位で除外した結果、有効なAFエリアは図12のようになる。図12に示す具体例では、被写体検出枠を含むAFエリアのうち、障害物(フェンスなど)によって妨害されているために本来あるべき特徴量データが存在しないと判定されたAFエリア#1、#2、#4については、AFエリアを田の字に4等分して小AFエリアに分割し、このうち被写体に特化された特徴量データが存在しない小AFエリアを除いた部分がAF評価値演算に使用される有効な領域となる。図12に示す例では、斜線が残された領域がAF評価値演算に使用される有効な領域である。   As a specific example, in the case of the subject frame as shown in FIG. 10, the effective AF area is as shown in FIG. 12 as a result of excluding the area unnecessary for the AF evaluation value calculation by the processing up to step S916. become. In the specific example shown in FIG. 12, among AF areas including the subject detection frame, AF areas # 1, # determined that there is no feature data that should be present because they are obstructed by an obstacle (such as a fence). For # 2 and # 4, the AF area is divided into four squares and divided into small AF areas. Of these, the portion excluding the small AF area where there is no feature data specialized for the subject is AF evaluation. It is an effective area used for value calculation. In the example shown in FIG. 12, the area where the oblique line is left is an effective area used for the AF evaluation value calculation.

ステップS916までの処理で、1つのAFエリアのあるフォーカス・レンズ位置における有効なAFエリアが決定する。なお、ステップS909で前回のフォーカス・レンズ位置で演算済みのAF評価値が判定閾値THjdよりも小さいと判定された場合、ステップS910でAFエリアが被写体検出枠を含まないと判定された場合、及び、ステップS913で被写体に特化した特徴量データ(期待されるコントラスト信号)がAFエリアに存在すると判定された場合には、それ以降のステップS916までの処理(すなわち、AF評価値演算に用いるべきでない小AFエリアをAFエリアから除外する処理)を行なわない。 Through the processing up to step S916, an effective AF area at a focus / lens position with one AF area is determined. If it is determined in step S909 that the AF evaluation value calculated at the previous focus / lens position is smaller than the determination threshold TH jd , if it is determined in step S910 that the AF area does not include the subject detection frame, If it is determined in step S913 that the feature amount data (expected contrast signal) specialized for the subject exists in the AF area, the subsequent processing up to step S916 (that is, used for AF evaluation value calculation). The process of excluding small AF areas that should not be excluded from the AF area is not performed.

AFエリアの現在設定されているフォーカス・レンズ位置において、有効なAFエリアが決定したら、除外対象領域以外(すなわち、有効なAFエリア)のコントラスト信号でAF評価値の演算を行なう(ステップS917:ステップS519に相当)。また、除外領域を含むAFエリアについては、ステップS916で求めたAF評価値の乗数をこのAF評価値に乗算する(ステップS918:ステップS520に相当)。   When an effective AF area is determined at the focus / lens position currently set in the AF area, an AF evaluation value is calculated using a contrast signal other than the exclusion target area (that is, the effective AF area) (step S917: step S917). Equivalent to S519). For the AF area including the excluded region, the AF evaluation value is multiplied by the AF evaluation value obtained in step S916 (step S918: equivalent to step S520).

このようにしてステップS906で設定したフォーカス・レンズ位置にて、現在着目しているAFエリアについてAF評価値の得た後に、無限遠から最至近側までフォーカス・レンズの移動が完了したかどうかをチェックする(ステップS919:ステップS306に相当)。   In this way, after obtaining the AF evaluation value for the currently focused AF area at the focus lens position set in step S906, it is checked whether the movement of the focus lens from infinity to the closest side is completed. (Step S919: equivalent to Step S306).

フォーカス・レンズの移動が完了していなければ(ステップS919のNo)、ステップS906に戻り、フォーカス・レンズ位置をさらに至近側へ所定のステップ分だけ移動させて、上記の当該AFエリアにおけるAF評価値の演算を繰り返し行なう。ここで、同じAFエリアを処理中、既に決定された除外領域(図12中の白抜きの領域)は以後のフォーカス・レンズ位置での処理中は有効であるとする。   If the movement of the focus / lens has not been completed (No in step S919), the process returns to step S906, the focus / lens position is further moved to the closest side by a predetermined step, and the AF evaluation value in the AF area described above Repeat the above operation. Here, it is assumed that the exclusion area (the white area in FIG. 12) that has already been determined during processing of the same AF area is valid during the subsequent processing at the focus / lens position.

そして、最至近側までのフォーカス・レンズ位置の移動が完了していれば(ステップS919のYes)、現在設定中のAFエリアにおいてAF評価値の山を検出し、AF評価値の山の値とAF評価値の閾値THafとを比較する(ステップS920:ステップS307)。 If the movement of the focus / lens position to the closest side is completed (Yes in step S919), an AF evaluation value peak is detected in the currently set AF area, and the AF evaluation value peak value and The AF evaluation value threshold TH af is compared (step S920: step S307).

ここで、AF評価値の山の値が閾値THafよりも大きければ(ステップS920のYes)、CPU101は、AF評価値の山に対応するフォーカス・レンズ位置、及びAF評価値(山の値)を記憶する(ステップS921:ステップS308)。また、AF評価値の山の値が閾値THafよりも小さければ(ステップS920のNo)、CPU101はこのときのフォーカス・レンズ位置とAF評価値(山の値)を記憶せず、次に進む。 If the peak value of the AF evaluation value is larger than the threshold TH af (Yes in step S920), the CPU 101 determines the focus lens position corresponding to the peak of the AF evaluation value and the AF evaluation value (peak value). Is stored (step S921: step S308). If the peak value of the AF evaluation value is smaller than the threshold TH af (No in step S920), the CPU 101 does not store the focus lens position and the AF evaluation value (peak value) at this time, and proceeds to the next. .

上記のステップS909〜S921までの処理で、1つのAFエリアにおけるフォーカス・レンズ位置の探索処理が終了する。ここで、有効画面枠内でまだ処理していないAFエリアがある場合には(ステップS922のNo:ステップS309に相当)、次のAFエリアを設定してから(ステップS925:ステップS312に相当)、ステップ905へ戻り、S909〜S921までの処理を繰り返し行なう。   The focus / lens position search process in one AF area is completed by the processes in steps S909 to S921 described above. If there is an AF area that has not yet been processed within the effective screen frame (No in step S922: equivalent to step S309), the next AF area is set (step S925: equivalent to step S312). Returning to step 905, the processing from S909 to S921 is repeated.

すべてのAFエリアにおいて、フォーカス・レンズ位置及びAF評価値(山の値)の検出を終了した時点で(ステップS922のYes)、ある一定以上のAF評価値の山を持つAFエリアについて、CPU101は、フォーカス・レンズの合焦位置を記憶している。そして、CPU101は、これらのAFエリアの中で、ステップS901で設定した合焦条件に適合するAFエリアを選択する(ステップS923:ステップS310)。そして、CPU101は、モーター・ドライバー部102を介してレンズ・モーター部109を駆動制御して、記憶したフォーカス・レンズ位置へフォーカス・レンズを移動させることにより、合焦動作が行なわれる(ステップS924:ステップS311に相当)。   When the detection of the focus / lens position and the AF evaluation value (peak value) is finished in all AF areas (Yes in step S922), the CPU 101 determines that the AF area has a peak with a certain AF evaluation value or more. The in-focus position of the focus lens is stored. Then, the CPU 101 selects an AF area that matches the focusing condition set in step S901 from these AF areas (step S923: step S310). Then, the CPU 101 drives and controls the lens / motor unit 109 via the motor / driver unit 102 and moves the focus lens to the stored focus / lens position, thereby performing a focusing operation (step S924: Equivalent to step S311).

図13には、AFエリア#1のAF評価値の特性例を示している。図13Aには、AF評価値演算に不要な領域を除去処理しない場合の各フォーカス・レンズ位置におけるAFエリアのAF評価値の演算結果を示している。また、図13Bには、図9A〜図9Cに示した処理手順に従ってAF評価値演算に不要な領域を除去処理した場合の各フォーカス・レンズ位置における有効なAFエリアのAF評価値の演算結果を示している。   FIG. 13 shows a characteristic example of the AF evaluation value of the AF area # 1. FIG. 13A shows the calculation result of the AF evaluation value of the AF area at each focus / lens position when the area unnecessary for the AF evaluation value calculation is not removed. FIG. 13B shows the AF evaluation value calculation results of effective AF areas at the respective focus / lens positions when an area unnecessary for AF evaluation value calculation is removed according to the processing procedure shown in FIGS. 9A to 9C. Show.

図13Aに示す、AF評価値演算に不要な領域を除去処理しない場合の例では、AF評価値は、被写体でのピークと障害物でのピークの2つの山が存在している。このため、合焦条件によっては、障害物に対して合焦が行なわれる可能性がある。これに対し、図9A〜図9Cに示した処理手順に従ってAF評価値演算に不要な領域を除去処理した場合には、障害物の存在によりAF評価値が高くなってきたときには、AF評価値の閾値THafよりも小さな判定閾値THjdに達したときに、検出被写体に特化した特徴量データの特性を満たさない領域がAF評価値の演算対象領域から除外されることから、AF評価値が判定閾値THjdより大きくならないことが期待できる。この結果、このAFエリアに対しては、検出被写体に対して合焦が行なうことができるようになる。 In the example shown in FIG. 13A in which an area unnecessary for AF evaluation value calculation is not removed, the AF evaluation value has two peaks, a peak at the subject and a peak at the obstacle. For this reason, there is a possibility of focusing on an obstacle depending on the focusing condition. On the other hand, when an area unnecessary for AF evaluation value calculation is removed according to the processing procedure shown in FIGS. 9A to 9C, when the AF evaluation value becomes high due to the presence of an obstacle, the AF evaluation value When the determination threshold value TH jd smaller than the threshold value TH af is reached, an area that does not satisfy the characteristics of the feature amount data specialized for the detected subject is excluded from the AF evaluation value calculation target area. It can be expected not to be larger than the determination threshold TH jd . As a result, this AF area can be focused on the detected subject.

以上説明してきたように、図9A〜図9Cに示した処理手順に従った自動合焦動作によれば、被写体の特徴量から被写体を検出し、自動合焦動作中に検出された被写体に特化したコントラスト信号の特性を満たさない領域を決定し、このような領域をAFエリアから除外して、残った有効な領域を用いてAF評価値の演算を行なうようにしている。これによって、無効なAF評価値の演算が削減され、より早く精度の高い自動合焦動作を実現することができる。   As described above, according to the automatic focusing operation according to the processing procedure shown in FIGS. 9A to 9C, the subject is detected from the feature amount of the subject, and the subject detected during the automatic focusing operation is specially selected. An area that does not satisfy the characteristics of the contrast signal is determined, such an area is excluded from the AF area, and an AF evaluation value is calculated using the remaining effective area. As a result, the calculation of invalid AF evaluation values is reduced, and an automatic focusing operation with higher accuracy can be realized faster.

なお、図9A〜図9Cに示した処理手順では、ヒゲを有する小動物や人物の被写体検出枠内で除外領域を決定する方法は固定的なものである。これに対し、自動合焦動作中に、特徴量抽出エンジン105から読み出される被写体の特徴量の変化量に応じて除外領域を決定する方法を変更するようにしてもよい。   In the processing procedure shown in FIGS. 9A to 9C, the method for determining the exclusion region within the subject detection frame of a small animal or a person with a beard is fixed. On the other hand, during the automatic focusing operation, the method of determining the exclusion area may be changed according to the amount of change in the feature amount of the subject read from the feature amount extraction engine 105.

また、図5A〜図5Cに示した自動合焦動作の処理手順において行なわれるAF評価値演算に不要な領域の除去処理と、図9A〜図9Cに示した自動合焦動作の処理手順において行なわれるAF評価値演算に不要な領域の除去処理は互いに独立した処理である。したがって、各々の除去処理をともに実装した自動合焦動作を実現することも可能である。   5A to 5C, an area unnecessary for AF evaluation value calculation performed in the processing procedure of the automatic focusing operation shown in FIGS. 5A to 5C, and a processing procedure of the automatic focusing operation shown in FIGS. 9A to 9C. The processing for removing the area unnecessary for the AF evaluation value calculation is independent of each other. Accordingly, it is possible to realize an automatic focusing operation in which the respective removal processes are implemented together.

以上、特定の実施形態を参照しながら、本発明について詳解してきた。しかしながら、本発明の要旨を逸脱しない範囲で当業者が該実施形態の修正や代用を成し得ることは自明である。   The present invention has been described in detail above with reference to specific embodiments. However, it is obvious that those skilled in the art can make modifications and substitutions of the embodiment without departing from the gist of the present invention.

本発明の要旨は、特定の被写体の種類に限定されるものではなく、人物やその他の動物、植物、さらにその他の特徴量抽出可能な物体(生物と非生物を問わない)を撮影する際の自動合焦処理の対象とすることができる。   The gist of the present invention is not limited to the type of a specific subject, but is used when photographing a person, other animals, plants, and other objects (whether living or non-living) from which other feature quantities can be extracted. It can be the target of automatic focusing processing.

要するに、例示という形態で本発明を開示してきたのであり、本明細書の記載内容を限定的に解釈するべきではない。本発明の要旨を判断するためには、特許請求の範囲を参酌すべきである。   In short, the present invention has been disclosed in the form of exemplification, and the description of the present specification should not be interpreted in a limited manner. In order to determine the gist of the present invention, the claims should be taken into consideration.

100…バス
101…CPU
102…モーター・ドライバー部
103…カメラ信号処理エンジン
104…解像度変換エンジン
105…特徴量抽出エンジン
106…記録再生処理エンジン
107…表示処理エンジン
109…レンズ・モーター部
110…レンズ群
111…撮像素子
112…AD変換部
113…入出力インターフェース
114…記憶媒体
115…表示デバイス
116…AF処理部
100 ... Bus 101 ... CPU
DESCRIPTION OF SYMBOLS 102 ... Motor driver part 103 ... Camera signal processing engine 104 ... Resolution conversion engine 105 ... Feature-value extraction engine 106 ... Recording / reproduction processing engine 107 ... Display processing engine 109 ... Lens motor part 110 ... Lens group 111 ... Imaging element 112 ... AD conversion unit 113 ... I / O interface 114 ... Storage medium 115 ... Display device 116 ... AF processing unit

Claims (10)

撮像部と、
前記撮像部から入力された撮像画像から、被写体を検出し、該検出した被写体の特徴量を抽出する特徴量抽出部と、
前記特徴量抽出部が抽出した被写体の特徴量に基づいて、前記撮像画像のうちコントラスト信号を検知するために使用するAFエリアから、コントラスト信号の検知演算に有効なAFエリアを決定する有効AFエリア決定部と、
前記有効なAFエリアにおけるコントラスト信号の検知演算に基づいて、前記撮像部の自動合焦動作を機能させる自動合焦動作部と、
を具備することを特徴とする撮像装置。
An imaging unit;
A feature amount extraction unit that detects a subject from the captured image input from the imaging unit and extracts a feature amount of the detected subject;
An effective AF area that determines an effective AF area for contrast signal detection calculation from an AF area used to detect a contrast signal in the captured image based on the feature amount of the subject extracted by the feature amount extraction unit. A decision unit;
An automatic focusing operation unit for functioning an automatic focusing operation of the imaging unit based on a detection calculation of a contrast signal in the effective AF area;
An imaging apparatus comprising:
前記有効AFエリア決定部は、前記自動合焦動作部による自動合焦動作前に、前記特徴量抽出部が検出した被写体の種類に特化した除外領域のパラメーターを設定し、前記除外領域のパラメーターに基づいてコントラスト信号の検知演算に有効なAFエリアを決定する、
ことを特徴とする請求項1に記載の撮像装置。
The effective AF area determination unit sets an exclusion region parameter specific to the type of subject detected by the feature amount extraction unit before the automatic focusing operation by the automatic focusing operation unit, and sets the exclusion region parameter An AF area effective for contrast signal detection calculation is determined based on
The imaging apparatus according to claim 1.
前記特徴量抽出部は、前記撮像画像から被写体を囲む被写体検出枠を検出し、
前記有効AFエリア決定部は、検出した被写体の種類に応じて、前記検知演算の妨げとなる除外領域を前記被写体検出枠の中で指定するためのパラメーターを設定する、
ことを特徴とする請求項2に記載の撮像装置。
The feature amount extraction unit detects a subject detection frame surrounding the subject from the captured image,
The effective AF area determination unit sets a parameter for designating an excluded area that hinders the detection calculation in the subject detection frame according to the type of the detected subject.
The imaging apparatus according to claim 2.
前記有効AFエリア決定部は、前記特徴量抽出部が被写体としてヒゲを有する小動物を検出したときに、前記被写体検出枠の中で前記ヒゲの部分を覆い隠すための3角形からなる除外領域を決定するためのパラメーターを設定する、
ことを特徴とする請求項3に記載の撮像装置。
The effective AF area determination unit determines an exclusion area formed of a triangle for obscuring the beard portion in the subject detection frame when the feature amount extraction unit detects a small animal having a beard as a subject. Set the parameters to
The imaging apparatus according to claim 3.
前記有効AFエリア決定部は、前記特徴量抽出部が被写体として人物を検出したときに、前記被写体検出枠の中で前記人物の顔の頬の部分を覆い隠すための台形からなる除外領域を決定するためのパラメーターを設定する、
ことを特徴とする請求項3に記載の撮像装置。
The effective AF area determination unit determines an exclusion area including a trapezoid for obscuring a cheek portion of the person's face in the subject detection frame when the feature amount extraction unit detects a person as a subject. Set the parameters to
The imaging apparatus according to claim 3.
マルチエリアAF方式を適用し、
前記有効AFエリア決定部は、前記被写体検出枠を含むAFエリアをさらに複数個の小AFエリアに分割し、前記特徴量抽出部が設定したパラメーターに基づいて決定される除外領域との重なりが大きい小AFエリアをコントラスト信号の検知演算に不要と決定して有効なAFエリアから除外する、
ことを特徴とする請求項3に記載の撮像装置。
Apply multi-area AF method,
The effective AF area determination unit further divides the AF area including the subject detection frame into a plurality of small AF areas, and has a large overlap with the exclusion region determined based on the parameters set by the feature amount extraction unit. The small AF area is determined as unnecessary for the contrast signal detection calculation and excluded from the effective AF area.
The imaging apparatus according to claim 3.
前記特徴量抽出部は、検出した被写体の種類と被写体を囲む被写体検出枠を検出し、
前記有効AFエリア決定部は、前記自動合焦動作部による自動合焦動作中に、前記被写体検出枠を含むAFエリアにおけるコントラスト信号を走査し、検出した被写体の種類に特化した特徴量データがコントラスト信号に存在しないときには、前記被写体検出枠と重なる被写体検出領域を除外してコントラスト信号の検知演算に有効なAFエリアを決定する、
ことを特徴とする請求項1に記載の撮像装置。
The feature amount extraction unit detects a type of the detected subject and a subject detection frame surrounding the subject,
The effective AF area determination unit scans a contrast signal in an AF area including the subject detection frame during the automatic focusing operation by the automatic focusing operation unit, and feature amount data specialized for the type of the detected subject is obtained. When the contrast signal does not exist, an effective AF area for determining the contrast signal is determined by excluding the subject detection area that overlaps the subject detection frame.
The imaging apparatus according to claim 1.
マルチエリアAF方式を適用し、
前記有効AFエリア決定部は、検出した被写体の種類に特化した特徴量データがコントラスト信号に存在しないAFエリアをさらに複数個の小AFエリアに分割し、前記被写体検出領域との重なりが大きい小AFエリアをコントラスト信号の検知演算に不要と決定して、コントラスト信号の検知演算に有効なAFエリアを決定する、
ことを特徴とする請求項7に記載の撮像装置。
Apply multi-area AF method,
The effective AF area determination unit further divides an AF area in which feature amount data specific to the detected subject type does not exist in the contrast signal into a plurality of small AF areas, and the overlap with the subject detection area is large. The AF area is determined to be unnecessary for the contrast signal detection calculation, and an AF area effective for the contrast signal detection calculation is determined.
The imaging apparatus according to claim 7.
撮像装置における撮像部の自動合焦動作を行なうための自動合焦方方法であって、
前記撮像部から入力された撮像画像から、被写体を検出し、該検出した被写体の特徴量を抽出する特徴量抽出ステップと、
前記特徴量抽出ステップで抽出された被写体の特徴量に基づいて、前記撮像画像のうちコントラスト信号を検知するために使用するAFエリアから、コントラスト信号の検知演算に有効なAFエリアを決定する有効AFエリア決定ステップと、
前記有効なAFエリアにおけるコントラスト信号の検知演算に基づいて、前記撮像部の自動合焦動作を機能させる自動合焦動作ステップと、
を有することを特徴とする自動合焦方法。
An automatic focusing method for performing an automatic focusing operation of an imaging unit in an imaging device,
A feature amount extracting step of detecting a subject from the captured image input from the imaging unit and extracting a feature amount of the detected subject;
Effective AF for determining an AF area effective for the contrast signal detection calculation from the AF area used for detecting the contrast signal in the captured image based on the feature quantity of the subject extracted in the feature quantity extraction step. An area determination step;
Based on the detection calculation of the contrast signal in the effective AF area, the automatic focusing operation step for functioning the automatic focusing operation of the imaging unit;
An automatic focusing method characterized by comprising:
撮像装置における撮像部の自動合焦動作を行なうための処理をコンピューター上で実行するようにコンピューター可読形式で記述されたコンピューター・プログラムであって、前記コンピューターに対し、
前記撮像部から入力された撮像画像から、被写体を検出し、該検出した被写体の特徴量を抽出する特徴量抽出手順と、
前記特徴量抽出手順を実行して抽出された被写体の特徴量に基づいて、前記撮像画像のうちコントラスト信号を検知するために使用するAFエリアから、コントラスト信号の検知演算に有効なAFエリアを決定する有効AFエリア決定手順と、
前記有効なAFエリアにおけるコントラスト信号の検知演算に基づいて、前記撮像部の自動合焦動作を機能させる自動合焦動作手順と、
を実行させることを特徴とするコンピューター・プログラム。
A computer program described in a computer-readable format so as to execute a process for performing an automatic focusing operation of an imaging unit in an imaging apparatus on a computer,
A feature amount extraction procedure for detecting a subject from the captured image input from the imaging unit and extracting a feature amount of the detected subject;
Based on the feature amount of the subject extracted by executing the feature amount extraction procedure, an AF area effective for contrast signal detection calculation is determined from the AF area used for detecting the contrast signal in the captured image. An effective AF area determination procedure to be performed;
Based on a detection calculation of a contrast signal in the effective AF area, an automatic focusing operation procedure for functioning an automatic focusing operation of the imaging unit;
A computer program characterized in that it is executed.
JP2009002155A 2009-01-08 2009-01-08 Imaging apparatus, automatic focusing method, and computer program Withdrawn JP2010160297A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009002155A JP2010160297A (en) 2009-01-08 2009-01-08 Imaging apparatus, automatic focusing method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009002155A JP2010160297A (en) 2009-01-08 2009-01-08 Imaging apparatus, automatic focusing method, and computer program

Publications (1)

Publication Number Publication Date
JP2010160297A true JP2010160297A (en) 2010-07-22

Family

ID=42577499

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009002155A Withdrawn JP2010160297A (en) 2009-01-08 2009-01-08 Imaging apparatus, automatic focusing method, and computer program

Country Status (1)

Country Link
JP (1) JP2010160297A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012133049A (en) * 2010-12-20 2012-07-12 Samsung Electronics Co Ltd Imaging apparatus
JP2012133016A (en) * 2010-12-20 2012-07-12 Canon Inc Automatic focusing device, and control method and program for the same
WO2014115372A1 (en) * 2013-01-28 2014-07-31 オリンパス株式会社 Imaging device and method for controlling imaging device
JP2015064520A (en) * 2013-09-26 2015-04-09 株式会社ニコン Focus detection device and imaging apparatus
JP2016014739A (en) * 2014-07-01 2016-01-28 株式会社ソシオネクスト Surface detection method, surface detection device and imaging apparatus
JP2016090789A (en) * 2014-11-04 2016-05-23 オリンパス株式会社 Microscope system
JP2020166197A (en) * 2019-03-29 2020-10-08 キヤノン株式会社 Focus detection device, and control method of the same

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012133049A (en) * 2010-12-20 2012-07-12 Samsung Electronics Co Ltd Imaging apparatus
JP2012133016A (en) * 2010-12-20 2012-07-12 Canon Inc Automatic focusing device, and control method and program for the same
WO2014115372A1 (en) * 2013-01-28 2014-07-31 オリンパス株式会社 Imaging device and method for controlling imaging device
JP2014145808A (en) * 2013-01-28 2014-08-14 Olympus Corp Imaging apparatus and method for controlling imaging apparatus
CN104956246A (en) * 2013-01-28 2015-09-30 奥林巴斯株式会社 Imaging device and method for controlling imaging device
JP2015064520A (en) * 2013-09-26 2015-04-09 株式会社ニコン Focus detection device and imaging apparatus
JP2016014739A (en) * 2014-07-01 2016-01-28 株式会社ソシオネクスト Surface detection method, surface detection device and imaging apparatus
JP2016090789A (en) * 2014-11-04 2016-05-23 オリンパス株式会社 Microscope system
JP2020166197A (en) * 2019-03-29 2020-10-08 キヤノン株式会社 Focus detection device, and control method of the same
JP7254592B2 (en) 2019-03-29 2023-04-10 キヤノン株式会社 Focus detection device and its control method

Similar Documents

Publication Publication Date Title
JP4674471B2 (en) Digital camera
JP5206494B2 (en) Imaging device, image display device, imaging method, image display method, and focus area frame position correction method
JP5013705B2 (en) Imaging device, screen display method, focus adjustment method, exposure adjustment method, and computer program
JP4848965B2 (en) Imaging device
JP4974812B2 (en) Electronic camera
JP2008271240A (en) Imaging apparatus, image processing apparatus, imaging method, and image processing method
JP5147474B2 (en) Imaging apparatus and control method thereof
JP2010160297A (en) Imaging apparatus, automatic focusing method, and computer program
JP2011182252A (en) Imaging device, and image imaging method
JP5619124B2 (en) Image processing apparatus, imaging apparatus, image processing program, and image processing method
JP2008252711A (en) Digital camera
JP2008028747A (en) Imaging device and program thereof
JP2010279054A (en) Image pickup device, image processing device, image pickup method, and image processing method
JP5310076B2 (en) Image processing apparatus and image processing program
US8643730B2 (en) Imaging device and image capturing method
JP6024135B2 (en) Subject tracking display control device, subject tracking display control method and program
JP7319871B2 (en) Image processing device, image processing method, program, storage medium
US9710897B2 (en) Image processing apparatus, image processing method, and recording medium
JP4983479B2 (en) Imaging device
JP6200240B2 (en) Imaging apparatus, control method therefor, program, and storage medium
JP2017147498A (en) Image processing apparatus, image processing method and program
JP5229371B2 (en) Imaging device
JP5217843B2 (en) Composition selection apparatus, composition selection method and program
JP2009089083A (en) Age estimation photographing device and age estimation photographing method
JP5315019B2 (en) Autofocus device, autofocus method, and imaging device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20120403