JP2011253099A - Focus detector - Google Patents

Focus detector Download PDF

Info

Publication number
JP2011253099A
JP2011253099A JP2010127826A JP2010127826A JP2011253099A JP 2011253099 A JP2011253099 A JP 2011253099A JP 2010127826 A JP2010127826 A JP 2010127826A JP 2010127826 A JP2010127826 A JP 2010127826A JP 2011253099 A JP2011253099 A JP 2011253099A
Authority
JP
Japan
Prior art keywords
area
image
evaluation
evaluation area
control device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010127826A
Other languages
Japanese (ja)
Inventor
Soichi Ueda
壮一 上田
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.)
Nikon Corp
Original Assignee
Nikon 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 Nikon Corp filed Critical Nikon Corp
Priority to JP2010127826A priority Critical patent/JP2011253099A/en
Publication of JP2011253099A publication Critical patent/JP2011253099A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To perform an autofocus control.SOLUTION: A focus detector includes: extraction means which extracts a high luminance region from an image in an evaluation area set in an imaging screen; excluding means which excludes the image in the high luminance region extracted from the image in the evaluation area by the extraction means; and focus detection means which performs a focus detection based on the image in the evaluation area after the image in the high luminance region is excluded by the exclusion means. The extraction means specifies a high luminance pixel of the image in the evaluation area and groups the specified high luminance pixel by adding hue, or adds a ratio of the area of the high luminance region, to extract the high luminance region from the image in the evaluation area.

Description

本発明は、焦点検出装置に関する。   The present invention relates to a focus detection apparatus.

次のようなオートフォーカス制御装置が知られている。このオートフォーカス制御装置は、コントラスト評価値による山登り制御によって自動焦点調節を行う(例えば、特許文献1)。   The following autofocus control devices are known. This autofocus control device performs automatic focus adjustment by hill-climbing control based on contrast evaluation values (for example, Patent Document 1).

特許第3697745号公報Japanese Patent No. 3697745

しかしながら、コントラスト評価値による山登り制御では、なるべく前側被写体に合焦するよう制御することが多い。このため、主要被写体の周辺(主に後方)に高輝度被写体が存在する場合には、この高輝度被写体に対するコントラスト評価値が大きくなってしまい、使用者の意図しない焦点距離に合焦してしまう可能性がある。   However, in hill-climbing control using the contrast evaluation value, control is often performed so that the front subject is focused as much as possible. For this reason, when a high-luminance subject exists around (mainly behind) the main subject, the contrast evaluation value for the high-luminance subject becomes large, and the focal length unintended by the user is focused. there is a possibility.

本発明による焦点検出装置は、撮影画面内に設定された評価エリア内の画像から高輝度領域を抽出する抽出手段と、評価エリア内の画像から抽出手段によって抽出された高輝度領域内の画像を除外する除外手段と、除外手段により除外された後の評価エリア内の画像に基づいて、焦点検出を行う焦点検出手段とを備えることを特徴とする。   A focus detection apparatus according to the present invention includes an extraction unit that extracts a high luminance area from an image in an evaluation area set in a shooting screen, and an image in the high luminance area that is extracted from the image in the evaluation area by the extraction unit. An exclusion means to be excluded and a focus detection means for performing focus detection based on an image in the evaluation area after being excluded by the exclusion means.

本発明によれば、使用者が意図した焦点距離に合焦させることができる。   According to the present invention, it is possible to focus on the focal length intended by the user.

カメラ100の一実施の形態の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an embodiment of a camera 100. FIG. 画像の具体例を示す図である。It is a figure which shows the specific example of an image. コントラスト評価値の算出例を示す第1の図である。It is a 1st figure which shows the example of calculation of a contrast evaluation value. AF制御の流れを示すフローチャート図である。It is a flowchart figure which shows the flow of AF control. 水平ライン内の輝度の変化の具体例を示した図である。It is the figure which showed the specific example of the change of the brightness | luminance in a horizontal line. コントラスト評価値の算出例を示す第2の図である。It is a 2nd figure which shows the example of calculation of a contrast evaluation value. AF評価エリア内を複数の詳細エリアに分割した場合の具体例を示す図である。It is a figure which shows the specific example at the time of dividing | segmenting the AF evaluation area into several detailed area.

図1は、本実施の形態におけるカメラの一実施の形態の構成を示すブロック図である。カメラ100は、操作部材101と、レンズ102と、撮像素子103と、制御装置104と、メモリカードスロット105と、モニタ106とを備えている。操作部材101は、使用者によって操作される種々の入力部材、例えば電源ボタン、レリーズボタン、ズームボタン、十字キー、決定ボタン、再生ボタン、削除ボタンなどを含んでいる。   FIG. 1 is a block diagram illustrating a configuration of an embodiment of a camera according to the present embodiment. The camera 100 includes an operation member 101, a lens 102, an image sensor 103, a control device 104, a memory card slot 105, and a monitor 106. The operation member 101 includes various input members operated by the user, such as a power button, a release button, a zoom button, a cross key, an enter button, a play button, and a delete button.

レンズ102は、複数の光学レンズから構成されるが、図1では代表して1枚のレンズで表している。また、レンズ102を構成するレンズには、後述するAF(Auto Focus/自動焦点調整)のためのAFレンズ(焦点調節用レンズ)が含まれる。撮像素子103は、例えばCCDやCMOSなどのイメージセンサーであり、レンズ102により結像した被写体像を撮像する。そして、撮像によって得られた画像信号を制御装置104へ出力する。   The lens 102 is composed of a plurality of optical lenses, but is representatively represented by one lens in FIG. The lenses constituting the lens 102 include an AF lens (focus adjustment lens) for AF (Auto Focus / automatic focus adjustment) described later. The image sensor 103 is an image sensor such as a CCD or a CMOS, for example, and captures a subject image formed by the lens 102. Then, an image signal obtained by imaging is output to the control device 104.

制御装置104は、CPU、メモリ、およびその他の周辺回路により構成され、カメラ100を制御する。なお、制御装置104を構成するメモリには、SDRAMやフラッシュメモリが含まれる。SDRAMは、揮発性のメモリであって、CPUがプログラム実行時にプログラムを展開するためのワークメモリとして使用されたり、データを一時的に記録するためのバッファメモリとして使用される。また、フラッシュメモリは、不揮発性のメモリであって、制御装置104が実行するプログラムのデータや、プログラム実行時に読み込まれる種々のパラメータなどが記録されている。   The control device 104 includes a CPU, a memory, and other peripheral circuits, and controls the camera 100. Note that the memory constituting the control device 104 includes SDRAM and flash memory. The SDRAM is a volatile memory, and is used as a work memory for the CPU to develop a program when the program is executed or as a buffer memory for temporarily recording data. The flash memory is a non-volatile memory in which data of a program executed by the control device 104, various parameters read during program execution, and the like are recorded.

本実施の形態では、制御装置104は、撮像素子103から入力された画像信号に基づいて所定の画像形式、例えばJPEG形式の画像データ(以下、「本画像データ」と呼ぶ)を生成する。また、制御装置104は、生成した画像データに基づいて、表示用画像データ、例えばサムネイル画像データを生成する。制御装置104は、生成した本画像データとサムネイル画像データとを含み、さらにヘッダ情報を付加した画像ファイルを生成してメモリカードスロット105へ出力する。   In the present embodiment, the control device 104 generates image data in a predetermined image format, for example, JPEG format (hereinafter referred to as “main image data”) based on the image signal input from the image sensor 103. Further, the control device 104 generates display image data, for example, thumbnail image data, based on the generated image data. The control device 104 generates an image file that includes the generated main image data and thumbnail image data, and further includes header information, and outputs the image file to the memory card slot 105.

メモリカードスロット105は、記憶媒体としてのメモリカードを挿入するためのスロットであり、制御装置104から出力された画像ファイルをメモリカードに書き込んで記録する。また、メモリカードスロット105は、制御装置104からの指示に基づいて、メモリカード内に記憶されている画像ファイルを読み込む。   The memory card slot 105 is a slot for inserting a memory card as a storage medium, and the image file output from the control device 104 is written and recorded on the memory card. The memory card slot 105 reads an image file stored in the memory card based on an instruction from the control device 104.

モニタ106は、カメラ100の背面に搭載された液晶モニタ(背面モニタ)であり、当該モニタ106には、メモリカードに記憶されている画像やカメラ100を設定するための設定メニューなどが表示される。また、制御装置104は、使用者によってカメラ100のモードが撮影モードに設定されると、撮像素子103から時系列で取得した画像の表示用画像データをモニタ106に出力する。これによってモニタ106にはスルー画が表示される。   The monitor 106 is a liquid crystal monitor (rear monitor) mounted on the back surface of the camera 100, and the monitor 106 displays an image stored in a memory card, a setting menu for setting the camera 100, and the like. . Further, when the user sets the mode of the camera 100 to the shooting mode, the control device 104 outputs image data for display of images acquired from the image sensor 103 in time series to the monitor 106. As a result, a through image is displayed on the monitor 106.

本実施の形態では、制御装置104は、撮影時にAF(オートフォーカス/自動焦点調節)処理を実行して焦点調節を行う。例えば、制御装置104は、使用者によってレリーズボタンが半押しされるとAF処理を実行して、単写時のAF制御を行なう。この他にも、スルー画撮影時の常時AF制御、被写体追尾動作時のAF制御、動画撮影時のAF制御等を行うことも可能である。   In the present embodiment, the control device 104 performs focus adjustment by executing AF (autofocus / automatic focus adjustment) processing during shooting. For example, the control device 104 executes AF processing when the release button is half-pressed by the user, and performs AF control during single shooting. In addition, it is possible to perform continuous AF control during live view shooting, AF control during subject tracking operation, AF control during moving image shooting, and the like.

ここでAFの方式には、例えばコントラスト方式や位相差方式があるが、本実施の形態では、コントラスト方式によってAF処理を行う場合について説明する。なお、コントラスト方式による焦点調節とは、撮影画面内に設定された複数のオートフォーカスエリア(AF評価エリア)を対象として、焦点調節用のAFレンズを移動させながらコントラスト評価値を演算し、コントラスト評価値がピークとなるAFレンズの位置を合焦位置として検出することによって焦点調節を行う方法である。このコントラスト方式による焦点調節処理は公知の処理のため、詳細な説明は省略する。   Here, the AF method includes, for example, a contrast method and a phase difference method. In this embodiment, a case where AF processing is performed by the contrast method will be described. In contrast, the focus adjustment by the contrast method calculates a contrast evaluation value while moving the focus adjustment AF lens for a plurality of autofocus areas (AF evaluation areas) set in the shooting screen, and evaluates the contrast. This is a method of performing focus adjustment by detecting the position of the AF lens having a peak value as the focus position. Since the focus adjustment process using the contrast method is a known process, a detailed description thereof will be omitted.

このコントラスト方式による焦点調節では、AFレンズを至近側から無限遠側に移動させながらAF評価エリア内の最初のコントラスト評価値のピークを合焦位置として検出することにより、なるべく至近側に存在する被写体に合焦させるように制御を行なうことが多い。これは、主要被写体より後方に合焦することを避けるためである。しかし、主要被写体の周辺(主に後方)に光源等の高輝度被写体が存在する場合には、高輝度被写体からコントラスト評価値のピークが算出されて高輝度被写体に合焦してしまう可能性があり、使用者が意図しない焦点距離に合焦する場合がある。なお、高輝度被写体としては、スポットライト等の光源や窓ガラス等の反射物体等が挙げられる。   In this focus adjustment by the contrast method, the first contrast evaluation value peak in the AF evaluation area is detected as an in-focus position while moving the AF lens from the closest side to the infinity side, so that an object that is present as close as possible In many cases, control is performed so as to focus on. This is to avoid focusing behind the main subject. However, if there is a high-brightness subject such as a light source around the main subject (mainly behind), the peak of the contrast evaluation value may be calculated from the high-brightness subject and focus on the high-brightness subject. In some cases, the user may focus on a focal length that is not intended by the user. Note that examples of the high brightness subject include a light source such as a spotlight and a reflective object such as a window glass.

例えば、図2に示すように、後方の高輝度光源2bで照明された至近側にいる主要被写体2aを撮影したい場合には、主要被写体2aに合焦させる必要があるが、従来のコントラスト方式による焦点調節を行った場合には、後方にある高輝度光源2bに合焦してしまい、主要被写体2aにピントを合わせることができない可能性があった。この図2に示す例では、至近側から無限遠側にAFレンズを移動させながら全域スキャンを行なった場合には、例えば図3に示すようにコントラスト評価値が算出される。この場合、上述したコントラスト方式による焦点調節によれば、本来合焦させたい主要被写体2aから算出される評価値3aよりも高輝度光源2bから算出される評価値3bの方が大きいため、後方にある高輝度光源2bにピントが合ってしまうことになる。本実施の形態では、このような問題点を解決するために、制御装置104は、以下のようにAF制御を行なう。   For example, as shown in FIG. 2, when it is desired to photograph the main subject 2a on the close side illuminated by the rear high-intensity light source 2b, it is necessary to focus on the main subject 2a. When focus adjustment is performed, there is a possibility that the high-intensity light source 2b located behind is in focus and the main subject 2a cannot be focused. In the example shown in FIG. 2, when the entire area scan is performed while moving the AF lens from the closest side to the infinity side, for example, a contrast evaluation value is calculated as shown in FIG. In this case, according to the above-described focus adjustment by the contrast method, the evaluation value 3b calculated from the high-intensity light source 2b is larger than the evaluation value 3a calculated from the main subject 2a that is originally intended to be focused, so The high-intensity light source 2b is in focus. In the present embodiment, in order to solve such a problem, the control device 104 performs AF control as follows.

図4は、本実施の形態におけるAF制御の流れを示すフローチャートである。図4に示す処理は、上述した単写時のAF制御、スルー画撮影時の常時AF制御、被写体追尾動作時のAF制御、動画撮影時のAF制御等のAF制御が開始されると起動するプログラムとして、制御装置104によって実行される。   FIG. 4 is a flowchart showing the flow of AF control in the present embodiment. The process shown in FIG. 4 is started when the above-described AF control such as AF control during single shooting, continuous AF control during through image shooting, AF control during subject tracking operation, AF control during movie shooting, or the like is started. The program is executed by the control device 104 as a program.

ステップS10において、制御装置104は、撮像素子103から電子シャッターモードで取り込まれた画像のAF評価エリア内の水平ライン、例えば1画素の水平ラインの画像の輝度を対象として、所定の値(例えば200(8bit))以上の画素を検出し、検出した画素によって構成される検出領域の座標値を特定する。例えば、図2に示す例では、AF評価エリア2c内に水平ライン2dを設定し、該水平ライン2dを対象として検出領域の座標値を特定する。また図5は、図2に示した画像内に設定された水平ライン2d内の輝度の変化を示した図である。この図5では、横軸が水平ライン2d内の水平方向の画素位置を示し、縦軸が輝度値を示している。そして、該水平ライン2d内では、図5に示すように輝度値が変化しており、水平エッジ間領域として領域5aと領域5bと領域5cとが検出された例を示している。なお、制御装置104は、AF評価エリア2c内で水平ライン2dを上方または下方に1画素ずつ移動させながら検出領域の座標値を特定していき、AF評価エリア2cの全体に対して検出領域の座標値を特定する。その後、ステップS20へ進む。   In step S10, the control device 104 sets a predetermined value (for example, 200) for the luminance of the image of the horizontal line in the AF evaluation area of the image captured from the image sensor 103 in the electronic shutter mode, for example, the horizontal line of one pixel. (8 bits)) The above pixels are detected, and the coordinate value of the detection area constituted by the detected pixels is specified. For example, in the example shown in FIG. 2, the horizontal line 2d is set in the AF evaluation area 2c, and the coordinate value of the detection area is specified for the horizontal line 2d. FIG. 5 is a diagram showing a change in luminance in the horizontal line 2d set in the image shown in FIG. In FIG. 5, the horizontal axis indicates the horizontal pixel position in the horizontal line 2d, and the vertical axis indicates the luminance value. In the horizontal line 2d, the luminance value is changed as shown in FIG. 5, and an example in which the region 5a, the region 5b, and the region 5c are detected as the regions between the horizontal edges is shown. The control device 104 specifies the coordinate value of the detection area while moving the horizontal line 2d upward or downward one pixel at a time within the AF evaluation area 2c, and the detection area of the entire AF evaluation area 2c is identified. Specify coordinate values. Then, it progresses to step S20.

ステップS20では、制御装置104は、AF評価エリア内の画像を取得し、取得したAF評価エリア内の画像の色空間をRGBからXYZに変換し、さらにLabに変換する。その後、制御装置104は、色空間をLabに変換した後の各AF評価エリア内の画像に基づいて、次式(1)により色相演算を行なって色相角を算出する。
h=tan−1(b/a) ・・・(1)
In step S20, the control device 104 acquires an image in the AF evaluation area, converts the color space of the acquired image in the AF evaluation area from RGB to XYZ, and further converts it to Lab. Thereafter, the control device 104 calculates a hue angle by performing a hue calculation according to the following equation (1) based on the image in each AF evaluation area after the color space is converted to Lab.
h = tan −1 (b * / a * ) (1)

その後、ステップS30へ進み、制御装置104は、ステップS20で算出した色相角に基づいて、ステップS10で検出した検出領域内を対象として水平方向の色相成分のエッジを検出して、検出したエッジの座標を登録する。そして、制御装置104は、検出したエッジ間の色相が所定の範囲内で均一である場合、水平エッジ間領域として識別番号を付加し、上述したエッジの座標に関連付けて登録する。すなわち、制御装置104は、エッジ座標が隣り合う2つのエッジの色相を比較して、色相の差が所定の範囲内、例えば色相角で15度以内である場合には、それらのエッジ間の色相は略均一であると判定してこれらを水平エッジ間領域としてグループ化し、各水平エッジ間領域に識別番号を付加する。   Thereafter, the process proceeds to step S30, and the control device 104 detects the edge of the hue component in the horizontal direction in the detection region detected in step S10 based on the hue angle calculated in step S20, and detects the detected edge. Register coordinates. Then, when the detected hue between the edges is uniform within a predetermined range, the control device 104 adds an identification number as the horizontal inter-edge region and registers it in association with the above-described edge coordinates. That is, the control device 104 compares the hues of two edges whose edge coordinates are adjacent to each other, and if the difference in hue is within a predetermined range, for example, the hue angle is within 15 degrees, the hue between the edges is determined. Are determined to be substantially uniform and are grouped as regions between horizontal edges, and an identification number is added to each region between horizontal edges.

その後、ステップS40へ進み、制御装置104は、AF評価エリア内の画像の全ての水平方向のラインに対してステップS10〜ステップS30の処理が完了したか否かを判断する。ステップS40で否定判断した場合には、ステップS10へ戻って処理を繰り返す。これに対して、ステップS40で肯定判断した場合には、ステップS50へ進む。   Thereafter, the process proceeds to step S40, and the control device 104 determines whether or not the processes in steps S10 to S30 have been completed for all horizontal lines of the image in the AF evaluation area. If a negative determination is made in step S40, the process returns to step S10 and is repeated. On the other hand, if a positive determination is made in step S40, the process proceeds to step S50.

ステップS50では、制御装置104は、ステップS30で抽出した水平エッジ間領域ごとに、上下間での垂直方向のズレ量を演算する。その後、ステップS60へ進み、制御装置104は、ステップS50で算出した垂直方向のズレ量が所定の閾値以内、例えば5画素以内か否かを判断する。ステップS60で肯定判断した場合には、ステップS70へ進み、制御装置104は、ズレ量が所定の閾値以内の水平エッジ間領域のそれぞれに付加されている識別番号が同一グループとなるようにグループ化を行なう。これによって、AF評価エリア内に存在する水平方向の色相差が小さく、かつ垂直方向のズレ量が小さい高輝度被写体をグループ化することができる。その後、ステップS80へ進む。一方、ステップS60で否定判断した場合には、ステップS80へ進む。   In step S50, the control device 104 calculates a vertical shift amount between the upper and lower sides for each horizontal edge region extracted in step S30. Thereafter, the process proceeds to step S60, and the control device 104 determines whether or not the vertical shift amount calculated in step S50 is within a predetermined threshold, for example, within 5 pixels. When an affirmative determination is made in step S60, the process proceeds to step S70, and the control device 104 performs grouping so that the identification numbers added to the regions between the horizontal edges whose deviation amount is within a predetermined threshold value are in the same group. To do. This makes it possible to group high-luminance subjects that have a small hue difference in the horizontal direction and a small amount of deviation in the vertical direction existing in the AF evaluation area. Thereafter, the process proceeds to step S80. On the other hand, if a negative determination is made in step S60, the process proceeds to step S80.

ステップS80では、制御装置104は、AF評価エリア内の全ての水平方向のラインを対象とした垂直方向のズレ量の判定および識別番号のグループ化が完了したか否かを判断する。ステップS80で否定判断した場合には、ステップS50へ戻る。これに対して、ステップS80で肯定判断した場合には、ステップS90へ進む。   In step S80, the control device 104 determines whether or not the vertical shift amount determination and the identification number grouping for all horizontal lines in the AF evaluation area have been completed. If a negative determination is made in step S80, the process returns to step S50. On the other hand, if a positive determination is made in step S80, the process proceeds to step S90.

ステップS90では、制御装置104は、AF評価エリア内におけるステップS70でグループ化したグループ領域の占める割合、すなわちAF評価エリアの面積に対するグループ領域の面積が占める割合を演算する。その後、ステップS100へ進み、制御装置104は、ステップS90で演算したグループ領域の占める割合が所定の閾値以内であるか否かを判断する。このときに用いる閾値は、例えばAF評価エリアの大きさに対して1/50〜1/4の範囲内の値とし、高輝度被写体の種類に応じて変更してもよい。ステップS100で肯定判断した場合には、ステップS110へ進む。ステップS110では、制御装置104は、AF評価エリア内の画像のうち、グループ領域内の画像をコントラスト評価値の算出対象から除外して、ステップS120へ進む。   In step S90, the control device 104 calculates the ratio of the group area grouped in step S70 in the AF evaluation area, that is, the ratio of the area of the group area to the area of the AF evaluation area. Thereafter, the process proceeds to step S100, and the control device 104 determines whether or not the proportion of the group area calculated in step S90 is within a predetermined threshold. The threshold value used at this time may be a value within a range of 1/50 to 1/4 with respect to the size of the AF evaluation area, for example, and may be changed according to the type of the high brightness subject. If a positive determination is made in step S100, the process proceeds to step S110. In step S110, the control apparatus 104 excludes the image in the group area from the images in the AF evaluation area, and proceeds to step S120.

これによって、AF評価エリアの大きさに対して、グループ化されたグループ領域が小さい場合には、そのグループ領域は、主要被写体以外の高輝度被写体から検出されたエッジに基づく高輝度領域である可能性が高いため、このようなグループ領域内の画像を精度高くAF評価対象から除外することができる。一方、AF評価エリアの大きさに対して検出されたグループ領域が大きい場合には、そのグループ領域は、主要被写体以外の高輝度被写体から検出されたエッジに基づく領域ではない可能性が高いため、このようなグループ領域内の画像はAF評価対象として残して、AFの精度を向上させることができる。   Thereby, when the grouped group area is small with respect to the size of the AF evaluation area, the group area may be a high-luminance area based on edges detected from high-luminance subjects other than the main subject. Therefore, the images in such a group area can be excluded from the AF evaluation target with high accuracy. On the other hand, when the group area detected with respect to the size of the AF evaluation area is large, the group area is not likely to be an area based on edges detected from high-luminance subjects other than the main subject. Such an image in the group area can be left as an AF evaluation target to improve AF accuracy.

一方、ステップS100で否定判断した場合には、ステップS120へ進む。ステップS120では、制御装置104は、AF評価エリア内の画像のうち、ステップS110で除外したグループ領域以外の画像を対象としてコントラスト評価値を算出する。その後、ステップS130へ進み、制御装置104は、AFレンズを次の焦点距離に移動させてステップS10へ戻る。制御装置104は、AFレンズが無限遠端に到達するまで、上述したステップS10からステップS130の処理を繰り返すことにより、各焦点距離におけるAF評価値、すなわちコントラスト評価値を算出し、AF評価値が最大となるAFレンズの位置を合焦位置として特定する。   On the other hand, if a negative determination is made in step S100, the process proceeds to step S120. In step S120, the control device 104 calculates a contrast evaluation value for an image in the AF evaluation area other than the group area excluded in step S110. Thereafter, the process proceeds to step S130, and the control device 104 moves the AF lens to the next focal length and returns to step S10. The control device 104 calculates the AF evaluation value at each focal length, that is, the contrast evaluation value by repeating the above-described processing from step S10 to step S130 until the AF lens reaches the infinity end. The position of the AF lens that becomes the maximum is specified as the in-focus position.

このように、あらかじめAF評価エリア内の画像から高輝度被写体が存在している可能性が高い範囲(高輝度領域)内の画像を除外して、コントラスト評価値を算出することにより、図3に示したコントラスト評価値算出例は、図6に示すように変化する。すなわち、この図6に示すように、図3で検出されていた高輝度光源2bから算出される評価値3bは除去され、主要被写体2aから算出された評価値6aがコントラスト評価値のピークとして算出されることになる。これにより、AFレンズを至近側から無限遠側に移動させながら焦点調節を行った場合に、使用者が予期しない高輝度被写体に合焦してしまうことを防ぐことができる。   As described above, the contrast evaluation value is calculated by excluding the image in the range (high luminance area) in which the possibility that the high luminance subject exists is high from the image in the AF evaluation area in advance, as shown in FIG. The illustrated contrast evaluation value calculation example changes as shown in FIG. That is, as shown in FIG. 6, the evaluation value 3b calculated from the high-intensity light source 2b detected in FIG. 3 is removed, and the evaluation value 6a calculated from the main subject 2a is calculated as the peak of the contrast evaluation value. Will be. Thereby, when the focus adjustment is performed while the AF lens is moved from the closest side to the infinity side, it is possible to prevent the user from focusing on an unexpected high-brightness subject.

以上説明した本実施の形態によれば、以下のような作用効果を得ることができる。
(1)制御装置104は、AF評価エリア内から高輝度被写体が存在している可能性が高い範囲(高輝度領域)内の画像を除外してコントラスト評価値を算出し、AF処理を行なうようにした。これによって、使用者が予期しない高輝度被写体に合焦してしまうことを防ぐことができる。
According to the present embodiment described above, the following operational effects can be obtained.
(1) The control device 104 calculates contrast evaluation values by excluding images in a range (high luminance region) where there is a high possibility that a high luminance subject exists from within the AF evaluation area, and performs AF processing. I made it. Thus, it is possible to prevent the user from focusing on an unexpected high brightness subject.

(2)制御装置104は、AF評価エリア内の水平ラインごとに検出領域を特定し、これを垂直方向のズレ量に基づいてグループ化することにより、高輝度被写体が存在している可能性が高い範囲を特定するようにした。これによって、高輝度被写体が存在している可能性が高い範囲を精度高く特定することができる。 (2) The control device 104 identifies a detection area for each horizontal line in the AF evaluation area, and groups the detection areas based on the amount of deviation in the vertical direction, so that there is a possibility that a high-luminance subject exists. The high range was specified. As a result, it is possible to specify with high accuracy a range in which a high-luminance subject is highly likely to exist.

(3)制御装置104は、図4のステップS90で演算したグループ領域の占める割合が所定の閾値以内である場合に、該グループ領域内の画像をAF評価エリア内の画像から除外するようにした。これによって、AF評価エリアの大きさに対して、グループ化されたグループ領域が小さい場合には、そのグループ領域は、主要被写体以外の高輝度被写体から検出されたエッジに基づく領域である可能性が高いことを加味して、高輝度被写体が存在している可能性が高い範囲を精度高く除外することができる。 (3) When the ratio of the group area calculated in step S90 in FIG. 4 is within a predetermined threshold, the control device 104 excludes the image in the group area from the image in the AF evaluation area. . Accordingly, when the grouped group area is small with respect to the size of the AF evaluation area, the group area may be an area based on an edge detected from a high-intensity subject other than the main subject. In consideration of the high level, it is possible to accurately exclude a range in which a high-luminance subject is highly likely to exist.

―変形例―
なお、上述した実施の形態のカメラは、以下のように変形することもできる。
(1)上述した実施の形態では、制御装置104は、図4のステップS120において、AF評価エリア内の画像のうち、ステップS110で除外したグループ領域以外の画像を対象としてコントラスト評価値を算出することにより、AF評価エリア内の画像から高輝度被写体が存在している可能性が高い範囲内の画像を除外してコントラスト評価値を算出する例について説明した。しかしながら、制御装置104は、AF評価エリア内から多数の高輝度領域を検出した場合は、AF評価エリア内を細分化した詳細な評価エリアにおいて孤立した領域をコントラスト評価値の算出対象から除外するようにしてもよい。
-Modification-
The camera according to the above-described embodiment can be modified as follows.
(1) In the above-described embodiment, the control device 104 calculates a contrast evaluation value for an image in the AF evaluation area other than the group area excluded in step S110 in step S120 of FIG. Thus, an example has been described in which the contrast evaluation value is calculated by excluding an image in a range where a high-luminance subject is highly likely to exist from an image in the AF evaluation area. However, when a large number of high-luminance areas are detected from the AF evaluation area, the control device 104 excludes an isolated area from a detailed evaluation area obtained by subdividing the AF evaluation area from the target for calculating the contrast evaluation value. It may be.

具体的には、制御装置104は、図7(a)に示す画像内のAF評価エリア7a内を、図7(b)に示すように複数の詳細エリアに分割することにより、AF評価エリア7a内を細分化する。そして、制御装置104は、AF評価エリア7a内に設定した詳細エリアの中から、孤立した高輝度な詳細エリアを孤立点として特定し、該孤立点をコントラスト評価値の算出対象から除外する。ここでは、詳細エリアk0が孤立点であるか否かを判定する方法について説明する。   Specifically, the control device 104 divides the AF evaluation area 7a in the image shown in FIG. 7A into a plurality of detailed areas as shown in FIG. Subdivide the inside. Then, the control device 104 specifies an isolated high-brightness detailed area as an isolated point from the detailed areas set in the AF evaluation area 7a, and excludes the isolated point from the contrast evaluation value calculation target. Here, a method for determining whether or not the detailed area k0 is an isolated point will be described.

制御装置104は、詳細エリアk0〜k8のコントラスト評価値に基づいて、詳細エリアk0が、周囲の詳細エリアk1〜k8から孤立しているかどうかを判定する。具体的には、制御装置104は、詳細エリアk0のコントラスト評価値が、次式(2)に示す条件を満たす場合には、該詳細エリアk0は周囲の詳細エリアk1〜k8に対して孤立している、すなわち詳細エリアk0は孤立点であると判定し、この場合は、詳細エリアk0はコントラスト評価値の算出対象から除外される。なお、次式(2)におけるaは1以上の値をとり、これらは固定値であってもよいし、画像全体の輝度レベルによって変化する変数であってもよい。
詳細エリアk0のコントラスト評価値 > max(詳細エリアk1のコントラスト評価値〜詳細エリアk9のコントラスト評価値)×a ・・・(2)
Based on the contrast evaluation values of the detailed areas k0 to k8, the control device 104 determines whether or not the detailed area k0 is isolated from the surrounding detailed areas k1 to k8. Specifically, when the contrast evaluation value of the detailed area k0 satisfies the condition expressed by the following equation (2), the control device 104 is isolated from the surrounding detailed areas k1 to k8. That is, it is determined that the detailed area k0 is an isolated point. In this case, the detailed area k0 is excluded from the contrast evaluation value calculation target. Note that a in the following equation (2) takes a value of 1 or more, and may be a fixed value or a variable that varies depending on the luminance level of the entire image.
Contrast evaluation value of detailed area k0> max (contrast evaluation value of detailed area k1 to contrast evaluation value of detailed area k9) × a (2)

制御装置104は、上記処理をAF評価エリア7a内の全ての詳細エリアを対象として実行することによって孤立点を特定し、該孤立点をAF評価エリア7a内から除外して、残りの詳細エリアのコントラスト評価値の総和をAF評価エリア7aのコントラスト評価値として算出する。これによって、AF評価エリア7a内に複数の高輝度領域が存在する場合に、光源等の高輝度被写体である可能性が高い領域を精度高く検出して、その領域をコントラスト評価値の算出対象から除外することができる。   The control device 104 performs the above processing for all the detailed areas in the AF evaluation area 7a to identify isolated points, excludes the isolated points from the AF evaluation area 7a, and sets the remaining detailed areas. The sum of the contrast evaluation values is calculated as the contrast evaluation value of the AF evaluation area 7a. As a result, when there are a plurality of high-luminance areas in the AF evaluation area 7a, an area that is highly likely to be a high-luminance subject such as a light source is detected with high accuracy, and the area is detected from the calculation target of the contrast evaluation value. Can be excluded.

なお、AF評価エリア7a内から孤立点として特定された詳細エリアを除外し、残りの詳細エリアのコントラスト評価値の総和をAF評価エリア7aのコントラスト評価値として算出すると、コントラスト評価値の算出に用いる詳細エリアの数が焦点距離ごとに変化してしまう。すなわち、焦点距離ごとの基準(母数)が変化してしまう。よって、制御装置104は、孤立点を除外した後の有効な詳細エリアの個数を考慮し、単位エリア基準でコントラスト評価値を算出することが望ましい。   If the detailed area specified as an isolated point is excluded from the AF evaluation area 7a and the sum of the contrast evaluation values of the remaining detailed areas is calculated as the contrast evaluation value of the AF evaluation area 7a, it is used for calculating the contrast evaluation value. The number of detail areas changes for each focal length. That is, the reference (parameter) for each focal length changes. Therefore, it is desirable that the control device 104 calculates the contrast evaluation value on the basis of the unit area in consideration of the number of effective detailed areas after the isolated points are excluded.

(2)上述した実施の形態では、撮影画面内に設定されたAF評価エリアを焦点調節用の評価エリアとし、AF評価エリア内の画像から高輝度被写体が含まれる可能性が高い範囲内の画像を除外して、焦点調節を行う例について説明した。しかしながら、本発明は、AF評価エリア以外の他の評価エリアを評価対象から除外する場合にも適用することができる。例えば、AE(自動露出),AWB(オートホワイトバランス)を行なうための評価エリア内の画像から、高輝度被写体が含まれる可能性が高い範囲の画像を除外する場合にも本発明を適用可能である。 (2) In the above-described embodiment, the AF evaluation area set in the shooting screen is used as an evaluation area for focus adjustment, and an image within a range in which there is a high possibility that a high-luminance subject is included from the image in the AF evaluation area. An example in which the focus adjustment is performed without the above has been described. However, the present invention can also be applied to a case where an evaluation area other than the AF evaluation area is excluded from the evaluation target. For example, the present invention can be applied to a case where an image in a range where a high-luminance subject is likely to be included is excluded from images in an evaluation area for performing AE (automatic exposure) and AWB (auto white balance). is there.

(3)上述した実施の形態では、制御装置104は、高輝度被写体が含まれる可能性が高い範囲内の画像を自動的に除外する例について説明した。しかしながら、制御装置104は、AF評価エリア内の高輝度被写体が含まれる可能性が高い範囲を画面上に強調表示して使用者に通知し、その範囲をコントラスト評価値の算出対象から除外するか否かを使用者に選択させるようにしてもよい。 (3) In the above-described embodiment, the example in which the control device 104 automatically excludes an image within a range that is likely to include a high-luminance subject has been described. However, the control device 104 highlights on the screen a range that is likely to include a high-luminance subject in the AF evaluation area, notifies the user, and excludes the range from the calculation target of the contrast evaluation value. The user may select whether or not.

(4)上述した実施の形態では、本発明をカメラ100に適用する場合について説明した。しかしながら、撮影機能を備えた他の撮像装置、例えばカメラ付き携帯電話機やビデオカメラ等にも本発明は適用可能である。 (4) In the above-described embodiment, the case where the present invention is applied to the camera 100 has been described. However, the present invention can also be applied to other imaging devices having a photographing function, such as a mobile phone with a camera and a video camera.

なお、本発明の特徴的な機能を損なわない限り、本発明は、上述した実施の形態における構成に何ら限定されない。また、上述の実施の形態と複数の変形例を組み合わせた構成としてもよい。   Note that the present invention is not limited to the configurations in the above-described embodiments as long as the characteristic functions of the present invention are not impaired. Moreover, it is good also as a structure which combined the above-mentioned embodiment and a some modification.

100 カメラ、101 操作部材、102 レンズ、103 撮像素子、104 制御装置、105 メモリカードスロット、106 モニタ 100 Camera, 101 Operation member, 102 Lens, 103 Image sensor, 104 Control device, 105 Memory card slot, 106 Monitor

Claims (4)

撮影画面内に設定された評価エリア内の画像から高輝度領域を抽出する抽出手段と、
前記評価エリア内の画像から前記抽出手段によって抽出された前記高輝度領域内の画像を除外する除外手段と、
前記除外手段により除外された後の前記評価エリア内の画像に基づいて、焦点検出を行う焦点検出手段とを備えることを特徴とする焦点検出装置。
An extraction means for extracting a high brightness area from an image in the evaluation area set in the shooting screen;
Excluding means for excluding images in the high brightness area extracted by the extracting means from images in the evaluation area;
A focus detection apparatus comprising: focus detection means for performing focus detection based on an image in the evaluation area after being excluded by the exclusion means.
請求項1に記載の焦点検出装置において、
前記抽出手段は、前記評価エリア内の画像の高輝度画素を特定し、特定した前記高輝度画素を色相を加味してグループ化することによって、前記評価エリア内の画像から前記高輝度領域を抽出することを特徴とする焦点検出装置。
The focus detection apparatus according to claim 1,
The extraction unit extracts the high-brightness region from the image in the evaluation area by specifying the high-brightness pixel of the image in the evaluation area and grouping the specified high-brightness pixel in consideration of the hue. A focus detection device.
請求項1または2に記載の焦点検出装置において、
前記除外手段は、前記評価エリアの面積に対する前記高輝度領域の面積の割合を加味して、前記評価エリア内の画像から前記高輝度領域内の画像を除外することを特徴とする焦点検出装置。
The focus detection apparatus according to claim 1 or 2,
The focus detection apparatus, wherein the excluding unit excludes the image in the high luminance area from the image in the evaluation area, taking into account the ratio of the area of the high luminance area to the area of the evaluation area.
請求項1〜3のいずれか一項に記載の焦点検出装置において、
前記除外手段は、前記評価エリア内を複数の詳細エリアに分割し、前記複数の詳細エリアの中から周囲の詳細エリアに対して孤立している詳細エリアを除外することを特徴とする焦点検出装置。
In the focus detection apparatus according to any one of claims 1 to 3,
The exclusion means divides the evaluation area into a plurality of detailed areas, and excludes a detailed area isolated from the surrounding detailed areas from the plurality of detailed areas. .
JP2010127826A 2010-06-03 2010-06-03 Focus detector Pending JP2011253099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010127826A JP2011253099A (en) 2010-06-03 2010-06-03 Focus detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010127826A JP2011253099A (en) 2010-06-03 2010-06-03 Focus detector

Publications (1)

Publication Number Publication Date
JP2011253099A true JP2011253099A (en) 2011-12-15

Family

ID=45417059

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010127826A Pending JP2011253099A (en) 2010-06-03 2010-06-03 Focus detector

Country Status (1)

Country Link
JP (1) JP2011253099A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140016020A1 (en) * 2012-01-06 2014-01-16 Hitachi, Ltd. Video signal processing apparatus
JP2015011216A (en) * 2013-06-28 2015-01-19 キヤノン株式会社 Imaging device, and control method and control program of the same

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140016020A1 (en) * 2012-01-06 2014-01-16 Hitachi, Ltd. Video signal processing apparatus
US9172863B2 (en) * 2012-01-06 2015-10-27 Hitachi Industry & Control Solutions, Ltd. Video signal processing apparatus
JP2015011216A (en) * 2013-06-28 2015-01-19 キヤノン株式会社 Imaging device, and control method and control program of the same

Similar Documents

Publication Publication Date Title
US7791668B2 (en) Digital camera
US8797423B2 (en) System for and method of controlling a parameter used for detecting an objective body in an image and computer program
JP2007108412A (en) Autofocus device and its program
US8675089B2 (en) Apparatus and method for assisting composition of photographic image
WO2017037978A1 (en) Detection device, detection method, detection program, and imaging device
JP2010045625A (en) Imaging apparatus
JP4645413B2 (en) Imaging device
JP2008004996A (en) Imaging apparatus and program thereof
JP2019121860A (en) Image processing apparatus and control method therefor
JP5720488B2 (en) Imaging apparatus and distance information acquisition method
JP5564961B2 (en) Imaging device
US20120075495A1 (en) Electronic camera
JP2011253099A (en) Focus detector
JP2012220890A (en) Focus adjustment device
JP6351255B2 (en) Imaging apparatus, imaging method, program, and storage medium
KR101940481B1 (en) Camera module and method for driving the same
JP2010074415A (en) Imaging apparatus, image display method and image display program
JP2008219367A (en) Imaging apparatus and imaging method
JP2015118274A (en) Imaging device, imaging device control method, and program
JP7020387B2 (en) Imaging control device, imaging device and imaging control program
JP2009159356A (en) Subject tracing apparatus, subject tracing program and subject tracing method
JP2009130840A (en) Imaging apparatus, control method thereof ,and program
JP2009077175A (en) Electronic camera
JP5981898B2 (en) Imaging apparatus and control method thereof
JP2016114811A (en) Focus controller, imaging apparatus, and method for controlling focus