JP5564961B2 - Imaging device - Google Patents

Imaging device Download PDF

Info

Publication number
JP5564961B2
JP5564961B2 JP2010015721A JP2010015721A JP5564961B2 JP 5564961 B2 JP5564961 B2 JP 5564961B2 JP 2010015721 A JP2010015721 A JP 2010015721A JP 2010015721 A JP2010015721 A JP 2010015721A JP 5564961 B2 JP5564961 B2 JP 5564961B2
Authority
JP
Japan
Prior art keywords
area
image
edge
evaluation value
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2010015721A
Other languages
Japanese (ja)
Other versions
JP2011154194A (en
Inventor
壮一 上田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2010015721A priority Critical patent/JP5564961B2/en
Publication of JP2011154194A publication Critical patent/JP2011154194A/en
Application granted granted Critical
Publication of JP5564961B2 publication Critical patent/JP5564961B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、撮像装置に関する。   The present invention relates to an imaging apparatus.

次のような撮像装置が知られている。この撮像装置は、最至近に存在する被写体に合焦するように焦点調節を行う(例えば、特許文献1)。   The following imaging devices are known. This imaging apparatus performs focus adjustment so as to focus on a subject that is present closest (for example, Patent Document 1).

特開2007−293146号公報JP 2007-293146 A

しかしながら、従来の撮像装置では、最至近に合焦させたくない合焦不要被写体が存在する場合でもその合焦不要被写体に合焦してしまうという問題があった。また、主要被写体より無限遠側に高コントラストの合焦不要被写体が存在すると合焦不要被写体の方に合焦してしまう場合もある。   However, the conventional imaging apparatus has a problem that even when there is a focus-unnecessary subject that is not desired to be focused closest to, the focus-unnecessary subject is focused. In addition, if there is a high-contrast non-focusing subject on the infinity side of the main subject, the non-focusing subject may be focused.

本発明による撮像装置は、撮影画面内に設定された評価エリア内の画像の色相成分のエッジを検出するエッジ検出手段と、エッジ検出手段によって検出された色相成分のエッジにおける、水平方向のエッジ間の色相の差、および垂直方向のエッジのズレ量に基づいて、評価エリア内から不要被写体が含まれる範囲の画像を除外する除外手段と、除外手段により除外された後の評価エリア内の画像に基づいて、撮影条件の設定を行う撮影条件設定手段と、光学系が備える焦点調節用のレンズを移動させながら全域スキャンを行なって、各レンズ位置でコントラスト評価値を算出する全域スキャン手段と、を備え、コントラスト評価値のピークが複数検出された場合に、エッジ検出手段、除外手段、および撮影条件設定手段の処理を行い、コントラスト評価値のピークが1個しか検出されない場合にはエッジ検出手段および除外手段による処理を行わないことを特徴とする。
評価エリアは、焦点調節に用いるオートフォーカスエリアであって、撮影条件設定手段は、オートフォーカスエリア内から不要被写体が含まれる画像を除外した後の画像に基づいて焦点調節を行うようにしてもよい。
全域スキャン手段は、光学系が備える焦点調節用のレンズを至近側から無限遠側に移動させながら全域スキャンを行なって、各レンズ位置でコントラスト評価値を算出し、エッジ検出手段、除外手段、および撮影条件設定手段は、至近側から無限遠側の間でコントラスト評価値のピークが複数検出された場合に、処理を行うようにしてもよい。
An imaging apparatus according to the present invention includes an edge detection unit that detects an edge of a hue component of an image in an evaluation area set in a shooting screen, and a horizontal edge between edges of the hue component detected by the edge detection unit. On the basis of the difference in hue and the amount of deviation of the edge in the vertical direction. An imaging condition setting means for setting an imaging condition, and an entire area scanning means for calculating a contrast evaluation value at each lens position by performing a whole area scan while moving a focus adjustment lens provided in the optical system. If multiple contrast evaluation value peaks are detected, the edge detection means, the exclusion means, and the imaging condition setting means are processed and controlled. When the peak of the strike evaluation values is not detected only one is characterized by not processed by the edge detection means and excluding means.
The evaluation area is an autofocus area used for focus adjustment, and the photographing condition setting unit may perform focus adjustment based on an image after removing an image including an unnecessary subject from the autofocus area. .
The whole area scanning means performs a whole area scan while moving the focus adjustment lens provided in the optical system from the closest side to the infinity side, calculates a contrast evaluation value at each lens position, an edge detection means, an exclusion means, and The imaging condition setting unit may perform processing when a plurality of contrast evaluation value peaks are detected between the closest side and the infinity side.

本発明によれば、不要被写体に合焦することを防ぐことができる。   According to the present invention, it is possible to prevent focusing on an unnecessary subject.

カメラ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 a picked-up image. コントラスト評価値の算出例を示す図である。It is a figure which shows the example of calculation of a contrast evaluation value. コントラスト評価値の演算処理の流れを示すフローチャート図である。It is a flowchart figure which shows the flow of a calculation process of contrast evaluation value. 色相エッジ画像の具体例を示す図である。It is a figure which shows the specific example of a hue edge image.

図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は、撮像素子103から入力された画像信号に基づいて所定の画像形式、例えばJPEG形式の画像データ(以下、「本画像データ」と呼ぶ)を生成する。また、制御装置104は、生成した画像データに基づいて、表示用画像データ、例えばサムネイル画像データを生成する。制御装置104は、生成した本画像データとサムネイル画像データとを含み、さらにヘッダ情報を付加した画像ファイルを生成してメモリカードスロット105へ出力する。   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は、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は、撮影時にAF(オートフォーカス/自動焦点調節)処理を実行して焦点調節を行う。例えば、制御装置104は、使用者によってレリーズボタンが半押しされるとAF処理を実行する。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. For example, the AF method includes 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. Note that the focus adjustment by the contrast method calculates the contrast evaluation value while moving the AF lens for focus adjustment for a plurality of autofocus areas (AF areas) set in the shooting screen, and the contrast evaluation value. Is a method of performing focus adjustment by detecting the position of the AF lens where the peak is as the in-focus position. Since the focus adjustment process using the contrast method is a known process, a detailed description thereof will be omitted.

このコントラスト方式による焦点調節では、AFレンズを至近側から無限遠側に移動させながらAFエリア内の最初のコントラスト評価値のピークを合焦位置として検出するため、最至近に存在する被写体に合焦させることができる。しかしながら、AFエリア内の至近側に合焦させたくない不要被写体が存在する場合に、従来のコントラスト方式による焦点調節を行った場合には、最至近に存在する不要被写体に合焦してしまうという問題があった。   In this focus adjustment by the contrast method, the first contrast evaluation value peak in the AF area is detected as the in-focus position while moving the AF lens from the closest side to the infinity side. Can be made. However, when there is an unnecessary subject that you do not want to focus on the close side in the AF area, if you perform focus adjustment using the conventional contrast method, you will focus on the unnecessary subject that is closest to you. There was a problem.

例えば、図2に示すように、檻や柵の中にいる動物を撮影したい場合には、動物に合焦させる必要があるが、従来のコントラスト方式による焦点調節を行った場合には、最至近にある檻や柵に合焦してしまい、動物にピントを合わせることができない可能性があった。この図2に示す例では、至近側から無限遠側にAFレンズを移動させながら全域スキャンを行なった場合には、例えば図3(a)に示すようにコントラスト評価値が算出される。この場合、上述したコントラスト方式による焦点調節によれば、本来ピントを合わせたい遠方側のコントラスト評価値のピーク3bではなく、至近側に存在するコントラスト評価値のピーク3aにおけるAFレンズ位置を合焦位置として検出してしまうため、檻や柵にピントが合ってしまうことになる。本実施の形態では、このような問題点を解決するために、制御装置104は、以下のような処理を行なってコントラスト評価値を演算する。   For example, as shown in FIG. 2, when an animal in a cage or fence is to be photographed, it is necessary to focus on the animal. There was a possibility that it was impossible to focus on the animal because it focused on the fence and fence. 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 focus adjustment based on the contrast method described above, the AF lens position at the peak 3a of the contrast evaluation value existing on the near side is not the focus position, instead of the peak 3b of the contrast evaluation value on the far side which is originally desired to be focused. As a result, it will be in focus on the fence or fence. In the present embodiment, in order to solve such a problem, the control device 104 performs the following processing to calculate a contrast evaluation value.

なお、至近側に存在する不要被写体は、図2に示したような檻や柵のように、直線的であり、かつ色相が均一である可能性が高いので、本実施の形態では、このような直線的で色相が略均一な被写体を不要被写体とみなすこととする。   Note that the unnecessary subject existing on the near side is likely to be straight and have a uniform hue, such as a fence or a fence as shown in FIG. An object that is straight and has a substantially uniform hue is regarded as an unnecessary object.

図4は、本実施の形態におけるAF評価値としてのコントラスト評価値の演算処理の流れを示すフローチャートである。図4に示す処理は、例えば、制御装置104は、AF処理の開始時にAFレンズを至近側から無限遠側に全域スキャンを行ない、その結果、図3(b)に示すようにコントラスト評価値のピークが2つ検出された場合に起動するプログラムとして、制御装置104によって実行される。なお、全域スキャンの結果、コントラスト評価値のピークが1つしか検出されない場合には、そのピークにおけるAFレンズ位置を合焦位置として検出すればよいため、図4に示す処理は実行されない。   FIG. 4 is a flowchart showing a flow of processing for calculating a contrast evaluation value as an AF evaluation value in the present embodiment. In the process shown in FIG. 4, for example, the control device 104 scans the entire area of the AF lens from the closest side to the infinity side at the start of the AF process. As a result, as shown in FIG. It is executed by the control device 104 as a program that is activated when two peaks are detected. If only one peak of the contrast evaluation value is detected as a result of the whole area scan, the AF lens position at that peak may be detected as the in-focus position, and the process shown in FIG. 4 is not executed.

ステップS10において、制御装置104は、撮像素子103から入力された撮影画面内に設定された複数のAFエリア内の画像をそれぞれ取得する。そして、制御装置104は、取得したAFエリア内の画像の色空間をRGBからXYZに変換し、さらにLabに変換する。その後、制御装置104は、色空間をLabに変換した後の各AFエリア内の画像に基づいて、次式(1)により色相演算を行なって色相角を算出する。
h=tan−1(b/a) ・・・(1)
In step S <b> 10, the control device 104 acquires images in a plurality of AF areas set in the shooting screen input from the image sensor 103. The control device 104 converts the color space of the acquired image in the AF 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 area after the color space is converted to Lab.
h = tan −1 (b * / a * ) (1)

その後、ステップS20へ進み、制御装置104は、ステップS10で算出した色相角に基づいて、AFエリア内を対象として水平方向の色相成分のエッジを検出する。これによって、図5(a)に示すように、図2に示した画像から色相成分のエッジを抽出した画像(以下「色相エッジ画像」と呼ぶ)を生成することができる。なお、制御装置104は、あらかじめAFエリア内の画像に対してノイズ除去処理やガンマ補正処理等を行って、エッジ形状を判別し易いようにしておいてもよい。そして、制御装置104は、検出したエッジのうち、エッジ強度が所定の閾値以上のエッジの画像内における座標値を検出してメモリに記録する。その後、ステップS30へ進む。   Thereafter, the process proceeds to step S20, and the control device 104 detects the edge of the hue component in the horizontal direction in the AF area based on the hue angle calculated in step S10. As a result, as shown in FIG. 5A, it is possible to generate an image (hereinafter referred to as “hue edge image”) in which the edge of the hue component is extracted from the image shown in FIG. Note that the control device 104 may perform noise removal processing, gamma correction processing, or the like on the image in the AF area in advance so that the edge shape can be easily determined. And the control apparatus 104 detects the coordinate value in the image of the edge whose edge strength is more than a predetermined threshold among the detected edges, and records it in memory. Then, it progresses to step S30.

ステップS30では、制御装置104は、ステップS20で検出したエッジ座標値に基づいて、色相エッジ画像の水平方向のラインごと、例えば1画素のラインごとに、エッジ座標間の色相が所定の範囲内で均一であるエッジ範囲を抽出する。すなわち、制御装置104は、エッジ座標が隣り合う2つのエッジの色相を比較して、色相の差が所定の範囲内、例えば色相角で15度以内である場合には、それらのエッジ間の色相は略均一であると判定してグループ化し、各グループに識別番号を付加する。これによって、例えば、図5(a)に示した色相エッジ画像内の範囲5aに対しては、図5(b)に示すように、色相の差が所定の閾値以内となる範囲5b〜5fの5つのエッジ範囲が抽出され、それぞれのエッジ範囲に対して識別番号が付加される。   In step S30, the control device 104 determines that the hue between the edge coordinates is within a predetermined range for each horizontal line of the hue edge image, for example, for each pixel line, based on the edge coordinate value detected in step S20. Extract edge ranges that are uniform. 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, and an identification number is added to each group. Accordingly, for example, for the range 5a in the hue edge image shown in FIG. 5A, as shown in FIG. 5B, the range 5b to 5f in which the difference in hue is within a predetermined threshold is shown. Five edge ranges are extracted, and an identification number is added to each edge range.

その後、ステップS40へ進み、制御装置104は、色相エッジ画像の全ての水平方向のラインに対してエッジ範囲の抽出が完了したか否かを判断する。ステップS40で否定判断した場合には、ステップS20へ戻る。これに対して、ステップS40で肯定判断した場合には、ステップS50へ進む。   Thereafter, the process proceeds to step S40, and the control device 104 determines whether or not the extraction of the edge range has been completed for all the horizontal lines of the hue edge image. If a negative determination is made in step S40, the process returns to step S20. 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は、ズレ量が所定の閾値以内のエッジ範囲のそれぞれに付加されている識別番号が同一グループとなるようにグループ化を行なって、ステップS80へ進む。   In step S50, the control device 104 calculates the vertical shift amount between the upper and lower sides for each edge range of the horizontal line 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. If 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 edge ranges whose deviation amounts are within a predetermined threshold are in the same group. Then, the process proceeds to step S80.

これによって、AFエリア内に存在する水平方向の色相差が小さく、かつ垂直方向のズレ量が小さい被写体、すなわち、檻や柵のような直線的で色相が略均一な不要被写体から検出された可能性が高いエッジをグループ化することができる。なお、エッジ範囲の垂直方向のズレ量が0の場合には、そのエッジは色相が略均一な縦線を示しており、垂直方向のズレ量が0ではない微小な値の場合には、そのエッジは色相が略均一な斜線を示していることになる。このような色相が略均一な縦線や斜線は、上述した檻や柵のような不要被写体を構成する可能性が高いため、本実施の形態では、このような不要被写体を構成する可能性が高いエッジを精度高く検出することが可能である。   As a result, it is possible to detect an object having a small horizontal hue difference and a small vertical deviation existing in the AF area, that is, an unnecessary subject having a linear and substantially uniform hue such as a fence or a fence. Edges with high characteristics can be grouped. In addition, when the amount of deviation in the vertical direction of the edge range is 0, the edge indicates a vertical line with a substantially uniform hue, and when the amount of deviation in the vertical direction is a non-zero value, The edges indicate diagonal lines with substantially uniform hue. Since such vertical lines and diagonal lines having a substantially uniform hue are likely to constitute an unnecessary subject such as a fence or a fence as described above, in this embodiment, there is a possibility that such an unnecessary subject is constituted. It is possible to detect a high edge with high accuracy.

一方、ステップS60で否定判断した場合には、そのままステップS80へ進む。ステップS80では、制御装置104は、色相エッジ画像の全ての水平方向のラインを対象とした垂直方向のズレ量の判定および識別番号のグループ化が完了したか否かを判断する。ステップS80で否定判断した場合には、ステップS50へ戻る。これに対して、ステップS80で肯定判断した場合には、ステップS90へ進む。   On the other hand, if a negative determination is made in step S60, the process proceeds directly to step S80. In step S80, the control device 104 determines whether or not the vertical shift amount determination and the identification number grouping for all the horizontal lines of the hue edge image 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で識別番号をグループ化したエッジ範囲の占める割合を演算する。その後、ステップS100へ進み、制御装置104は、ステップS90で演算したエッジ範囲の占める割合が所定の閾値以内であるか否かを判断する。このときに用いる閾値は、例えばAFエリアの大きさに対して1/50〜1/4の範囲内の値とし、不要被写体とする被写体の種類(檻や柵等)や、略均一な色相のエッジ画像が持つ色相の値に応じて変更してもよい。ステップS100で肯定判断した場合には、ステップS110へ進む。ステップS110では、制御装置104は、AFエリア内の画像のうち、エッジ範囲内の画像をコントラスト評価値の算出対象から除外して、ステップS120へ進む。   In step S90, the control device 104 calculates a ratio of the edge range in which the identification numbers are grouped in step S70 in the AF area. Thereafter, the process proceeds to step S100, and the control device 104 determines whether or not the ratio of the edge range calculated in step S90 is within a predetermined threshold. The threshold used at this time is, for example, a value within a range of 1/50 to 1/4 with respect to the size of the AF area. You may change according to the value of the hue which an edge image has. If a positive determination is made in step S100, the process proceeds to step S110. In step S110, the control device 104 excludes the image in the edge range from the images in the AF area from the calculation target of the contrast evaluation value, and proceeds to step S120.

これによって、AFエリアの大きさに対して、検出されたエッジ範囲が小さい場合には、そのエッジ範囲は不要被写体から検出されたエッジに基づくエッジ範囲である可能性が高いため、このようなエッジ範囲内の画像を精度高くAF評価対象から除外することができる。一方、AFエリアの大きさに対して検出されたエッジ範囲が大きい場合には、そのエッジ範囲は、不要被写体から検出されたエッジに基づくエッジ範囲ではない可能性が高いため、このようなエッジ範囲内の画像はAF評価対象として残して、AFの精度を向上させることができる。   As a result, when the detected edge range is small relative to the size of the AF area, the edge range is likely to be an edge range based on the edge detected from the unnecessary subject. Images within the range can be excluded from the AF evaluation target with high accuracy. On the other hand, when the edge range detected with respect to the size of the AF area is large, it is highly possible that the edge range is not an edge range based on the edge detected from the unnecessary subject. The image inside can be left as an AF evaluation target, and the accuracy of AF can be improved.

これに対して、ステップ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 images outside the range excluded in step S110 among the images in the AF area. 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エリア内の画像から不要被写体が存在している可能性が高い範囲内の画像を除外して、コントラスト評価値を算出するようにしたため、AFレンズを至近側から無限遠側に移動させながら焦点調節を行った場合に、至近側に存在する不要被写体に合焦してしまうことを防ぐことができる。   As described above, since the contrast evaluation value is calculated by excluding the image in the range where there is a high possibility that the unnecessary subject is present from the image in the AF area in advance, the AF lens is moved from the closest side to the infinity side. When the focus adjustment is performed while moving to the position, it is possible to prevent focusing on an unnecessary subject existing on the near side.

以上説明した本実施の形態によれば、以下のような作用効果を得ることができる。
(1)制御装置104は、撮影画面内に設定された複数のAFエリア内の画像の色相成分のエッジを検出し、検出した色相成分のエッジに基づいて、AFエリア内から不要被写体が含まれる範囲の画像を除外するようにした。そして、制御装置104は、除外した後のAFエリア内の画像に基づいて、焦点調節を行うようにした。これによって、コントラスト方式による焦点調節を行う場合に、最至近に存在する不要被写体に合焦することを防ぐことができる。
According to the present embodiment described above, the following operational effects can be obtained.
(1) The control device 104 detects an edge of a hue component of an image in a plurality of AF areas set in the shooting screen, and an unnecessary subject is included from the AF area based on the detected edge of the hue component. The range image was excluded. The control device 104 adjusts the focus based on the image in the AF area after the exclusion. Thus, when performing focus adjustment by the contrast method, it is possible to prevent focusing on an unnecessary subject that is present closest.

(2)制御装置104は、水平方向のエッジ間の色相の差、および垂直方向のエッジのズレ量に基づいて、AFエリア内から不要被写体が含まれる範囲の画像を除外するようにした。これによって、檻や柵等の不要被写体は、色相が略均一で直線的な被写体であることが多いことを加味して、AFエリア内から精度高く不要被写体が含まれる範囲の画像を除外することができる。 (2) The control device 104 excludes an image in a range including an unnecessary subject from the AF area based on a hue difference between horizontal edges and a vertical edge shift amount. In this way, taking into account that unnecessary subjects such as fences and fences are often almost uniform and linear subjects, exclude images in a range that includes unnecessary subjects with high accuracy from the AF area. Can do.

(3)制御装置104は、AFレンズを至近側から無限遠側に移動させながら全域スキャンを行なって、各レンズ位置でコントラスト評価値を算出し、その結果、至近側から無限遠側の間でコントラスト評価値のピークが2つ検出された場合に上述した処理を行うようにした。これによって、コントラスト評価値のピークが1つしか検出されない場合に処理を実行する必要がなく、処理負荷を軽減することができる。 (3) The controller 104 scans the entire area while moving the AF lens from the close side to the infinity side, calculates a contrast evaluation value at each lens position, and as a result, between the close side and the infinity side. The above-described process is performed when two contrast evaluation value peaks are detected. Accordingly, when only one contrast evaluation value peak is detected, it is not necessary to execute the process, and the processing load can be reduced.

―変形例―
なお、上述した実施の形態のカメラは、以下のように変形することもできる。
(1)上述した実施の形態では、撮影画面内に設定されたAFエリアを焦点調節用の評価エリアとし、AFエリア内の画像から至近側に存在する不要被写体が含まれる可能性が高いエッジ範囲の画像を除外して、焦点調節を行う例について説明した。しかしながら、本発明は、AFエリア以外の他の評価エリアを評価対象から除外する場合にも適用することができる。例えば、AE(自動露出),AWB(オートホワイトバランス)を行なうための評価エリア内の画像から、至近側に存在する不要被写体が含まれる可能性が高い範囲の画像を除外する場合にも本発明を適用可能である。
-Modification-
The camera according to the above-described embodiment can be modified as follows.
(1) In the above-described embodiment, the AF area set in the shooting screen is used as an evaluation area for focus adjustment, and an edge range where there is a high possibility that an unnecessary subject existing on the near side from the image in the AF area is included. The example in which the image is excluded and the focus adjustment is performed has been described. However, the present invention can also be applied to a case where an evaluation area other than the AF area is excluded from the evaluation target. For example, the present invention is also applicable to a case where an image in a range in which there is a high possibility that an unnecessary subject existing on the near side is included is excluded from an image in an evaluation area for performing AE (automatic exposure) and AWB (auto white balance). Is applicable.

(2)上述した実施の形態では、制御装置104は、AFエリア内の色相が略均一な縦線や斜線を不要被写体を構成するエッジとして検出する例について説明した。しかしながら、横線や曲線等の他の幾何学的な模様も不要被写体を構成するエッジとして検出するようにしてもよい。 (2) In the above-described embodiment, the control device 104 has described an example in which vertical lines and diagonal lines having substantially uniform hues in the AF area are detected as edges constituting an unnecessary subject. However, other geometric patterns such as horizontal lines and curves may be detected as edges constituting the unnecessary subject.

(3)上述した実施の形態では、制御装置104は、AFエリア内から不要被写体が含まれる可能性が高い領域を自動的に除外する例について説明した。しかしながら、制御装置104は、AFエリア内の不要被写体が含まれる可能性が高い領域やエッジを画面上に強調表示して使用者に通知し、その領域やエッジを不要被写体として除外するか否かを使用者に選択させるようにしてもよい。 (3) In the above-described embodiment, the example in which the control device 104 automatically excludes an area that is likely to include an unnecessary subject from the AF area has been described. However, the control device 104 highlights on the screen an area or edge that is likely to contain an unnecessary subject in the AF area and notifies the user whether or not to exclude the area or edge as an unnecessary subject. May be selected by the user.

(4)上述した実施の形態では、制御装置104は、AFレンズを至近側から無限遠側に移動させながら全域スキャンを行なった結果、コントラスト評価値のピークが2つ検出された場合に、図4に示した処理を実行する例について説明した。しかしながら、コントラスト評価値のピークが2つ以上検出された場合にも図4に示した処理を実行するようにしてもよい。あるいは、全域スキャンを行なわずに、使用者によって図4に示す処理を行って焦点調節を行うようにカメラ100のモードが設定された場合に、図4に示した処理を実行するようにしてもよい。 (4) In the above-described embodiment, the control device 104 performs the whole area scan while moving the AF lens from the closest side to the infinity side, and as a result, two peaks of contrast evaluation values are detected. The example of executing the process shown in FIG. 4 has been described. However, the processing shown in FIG. 4 may be executed even when two or more peaks of contrast evaluation values are detected. Alternatively, the processing shown in FIG. 4 may be executed when the mode of the camera 100 is set so as to perform the focus adjustment by performing the processing shown in FIG. Good.

(5)上述した実施の形態では、最至近側に存在する不要被写体を除外する例について説明した。しかしながら、色相の略均一なエッジを持つ不要被写体が主要被写体より無限遠側に存在する場合にも図4に示した処理を実行するようにしてもよい。この場合、撮影対象である主要被写体よりも背景に合焦してしまうことを防止することができる。 (5) In the above-described embodiment, the example in which the unnecessary subject existing on the closest side is excluded has been described. However, the process shown in FIG. 4 may be executed even when an unnecessary subject having a substantially uniform edge exists on the infinity side of the main subject. In this case, it is possible to prevent focusing on the background rather than the main subject that is the subject of photographing.

(6)上述した実施の形態では、本発明をカメラ100に適用する場合について説明した。しかしながら、撮影機能を備えた他の撮像装置、例えばカメラ付き携帯電話機やビデオカメラ等にも本発明は適用可能である。 (6) 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 (3)

撮影画面内に設定された評価エリア内の画像の色相成分のエッジを検出するエッジ検出手段と、
前記エッジ検出手段によって検出された前記色相成分のエッジにおける、水平方向のエッジ間の色相の差、および垂直方向の前記エッジのズレ量に基づいて、前記評価エリア内から不要被写体が含まれる範囲の画像を除外する除外手段と、
前記除外手段により除外された後の前記評価エリア内の画像に基づいて、撮影条件の設定を行う撮影条件設定手段と、
光学系が備える焦点調節用のレンズを移動させながら全域スキャンを行なって、各レンズ位置でコントラスト評価値を算出する全域スキャン手段と、を備え、
前記コントラスト評価値のピークが複数検出された場合に、前記エッジ検出手段、前記除外手段、および前記撮影条件設定手段の処理を行い、前記コントラスト評価値のピークが1個しか検出されない場合には、前記エッジ検出手段および前記除外手段による処理を行わないことを特徴とする撮像装置。
Edge detection means for detecting the edge of the hue component of the image in the evaluation area set in the shooting screen;
Based on the difference in hue between horizontal edges and the amount of deviation of the edges in the vertical direction at the edge of the hue component detected by the edge detection means, a range of unnecessary subjects from the evaluation area is included. Exclusion means to exclude images,
Shooting condition setting means for setting shooting conditions based on an image in the evaluation area after being excluded by the exclusion means;
A whole area scan unit that performs a whole area scan while moving a focus adjustment lens provided in the optical system, and calculates a contrast evaluation value at each lens position;
When a plurality of peaks of the contrast evaluation value are detected, the edge detection unit, the exclusion unit, and the imaging condition setting unit are processed, and when only one peak of the contrast evaluation value is detected, An imaging apparatus characterized by not performing processing by the edge detection means and the exclusion means.
請求項1に記載の撮像装置において、
前記評価エリアは、焦点調節に用いるオートフォーカスエリアであって、
前記撮影条件設定手段は、前記オートフォーカスエリア内から前記不要被写体が含まれる画像を除外した後の画像に基づいて焦点調節を行うことを特徴とする撮像装置。
The imaging device according to claim 1,
The evaluation area is an autofocus area used for focus adjustment,
The imaging apparatus according to claim 1, wherein the photographing condition setting unit performs focus adjustment based on an image after removing an image including the unnecessary subject from the autofocus area.
請求項2に記載の撮像装置において、
前記全域スキャン手段は、光学系が備える焦点調節用のレンズを至近側から無限遠側に移動させながら全域スキャンを行なって、各レンズ位置でコントラスト評価値を算出し、
前記エッジ検出手段、前記除外手段、および前記撮影条件設定手段は、前記至近側から前記無限遠側の間で前記コントラスト評価値のピークが複数検出された場合に、処理を行うことを特徴とする撮像装置。
The imaging device according to claim 2,
The whole area scanning means performs a whole area scan while moving a focus adjustment lens provided in the optical system from the closest side to the infinity side, and calculates a contrast evaluation value at each lens position,
The edge detection unit, the exclusion unit, and the imaging condition setting unit perform processing when a plurality of peaks of the contrast evaluation value are detected between the close side and the infinity side. Imaging device.
JP2010015721A 2010-01-27 2010-01-27 Imaging device Expired - Fee Related JP5564961B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010015721A JP5564961B2 (en) 2010-01-27 2010-01-27 Imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010015721A JP5564961B2 (en) 2010-01-27 2010-01-27 Imaging device

Publications (2)

Publication Number Publication Date
JP2011154194A JP2011154194A (en) 2011-08-11
JP5564961B2 true JP5564961B2 (en) 2014-08-06

Family

ID=44540215

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010015721A Expired - Fee Related JP5564961B2 (en) 2010-01-27 2010-01-27 Imaging device

Country Status (1)

Country Link
JP (1) JP5564961B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8958009B2 (en) 2010-01-12 2015-02-17 Nikon Corporation Image-capturing device
JP5471521B2 (en) * 2010-01-29 2014-04-16 カシオ計算機株式会社 Image processing apparatus and method, and program
WO2013031238A1 (en) 2011-09-02 2013-03-07 株式会社ニコン Focus evaluation device, imaging device, and program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0969974A (en) * 1995-08-31 1997-03-11 Canon Inc Image pickup device
JP4661269B2 (en) * 2005-03-01 2011-03-30 カシオ計算機株式会社 Imaging apparatus and program
JP4591120B2 (en) * 2005-03-07 2010-12-01 カシオ計算機株式会社 Imaging apparatus, autofocus control method, and autofocus control program
JP2009081810A (en) * 2007-09-27 2009-04-16 Fujifilm Corp Photographing device and photographing method

Also Published As

Publication number Publication date
JP2011154194A (en) 2011-08-11

Similar Documents

Publication Publication Date Title
JP4674471B2 (en) Digital camera
JP4917509B2 (en) Autofocus control circuit, autofocus control method, and imaging apparatus
JP5771913B2 (en) Focus adjustment device and camera
CN107850753B (en) Detection apparatus, detection method, detection program, and imaging apparatus
JP2007108412A (en) Autofocus device and its program
JP5051812B2 (en) Imaging apparatus, focusing method thereof, and recording medium
JP2006019874A (en) Blur, out of focus informing method and imaging apparatus
JP5092673B2 (en) Imaging apparatus and program thereof
JP5564961B2 (en) Imaging device
JP2010171565A (en) Electronic camera
JP5720488B2 (en) Imaging apparatus and distance information acquisition method
JP2011107682A (en) Focusing device and camera
JP6482247B2 (en) FOCUS ADJUSTMENT DEVICE, IMAGING DEVICE, FOCUS ADJUSTMENT DEVICE CONTROL METHOD, AND PROGRAM
JP2010134309A (en) Autofocus device, autofocus method and imaging apparatus
JP2012220890A (en) Focus adjustment device
JP4989243B2 (en) Imaging device and subject detection method thereof
JP2011253099A (en) Focus detector
JP3628648B2 (en) Optical system controller
JP2010074415A (en) Imaging apparatus, image display method and image display program
JP2012013809A (en) Camera device, caf control method thereof, control program, readable storage medium, and electronic information apparatus
JP5024033B2 (en) Object tracking device, object tracking program, and object tracking method
JP6645690B2 (en) Automatic focus adjustment device, imaging device, and automatic focus adjustment method
JP5088380B2 (en) Imaging device
JP5003305B2 (en) Imaging device and specific image detection program
JP2010122358A (en) Autofocus device, autofocus method, and imaging apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130108

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131118

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131126

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140123

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140304

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140417

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140520

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140602

R150 Certificate of patent or registration of utility model

Ref document number: 5564961

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees