JP2009237615A - Detection of image of photographic subject of specific kind in target image - Google Patents
Detection of image of photographic subject of specific kind in target image Download PDFInfo
- Publication number
- JP2009237615A JP2009237615A JP2008079231A JP2008079231A JP2009237615A JP 2009237615 A JP2009237615 A JP 2009237615A JP 2008079231 A JP2008079231 A JP 2008079231A JP 2008079231 A JP2008079231 A JP 2008079231A JP 2009237615 A JP2009237615 A JP 2009237615A
- Authority
- JP
- Japan
- Prior art keywords
- image
- face
- image data
- detection
- size
- 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
Links
Images
Abstract
Description
本発明は、対象画像における特定の種類の被写体の画像の検出に関する。 The present invention relates to detection of an image of a specific type of subject in a target image.
画像データの表す画像中から部分画像を順次切り出し、切り出した部分画像が顔に対応する画像であるか否かを判定することにより、顔の画像に対応する顔領域を検出する技術が知られている(例えば特許文献1ないし4)。
A technique for detecting a face region corresponding to a face image by sequentially cutting out partial images from an image represented by image data and determining whether or not the cut-out partial image is an image corresponding to a face is known. (For example,
対象画像における顔領域の検出においては、検出精度と処理時間との調和を図ることが望まれていた。なお、このような問題は、顔領域の検出に限らず、対象画像における特定の種類の被写体に対応する画像を検出する場合に共通の問題であった。 In the detection of the face area in the target image, it has been desired to achieve harmony between detection accuracy and processing time. Such a problem is not limited to the detection of the face area, but is a common problem when detecting an image corresponding to a specific type of subject in the target image.
本発明は、上記の課題を解決するためになされたものであり、対象画像における特定の種類の被写体に対応する画像の検出処理の精度と処理時間との調和を図ることを可能とする技術を提供することを目的とする。 The present invention has been made in order to solve the above-described problem, and provides a technique that makes it possible to harmonize the accuracy and processing time of image detection processing corresponding to a specific type of subject in a target image. The purpose is to provide.
上記課題の少なくとも一部を解決するために、本発明は、以下の形態または適用例として実現することが可能である。 In order to solve at least a part of the above problems, the present invention can be realized as the following forms or application examples.
[適用例1]画像処理装置であって、
対象画像から検出すべき被写体の種類である検出被写体を設定する検出被写体設定部と、
前記対象画像を表す複数の互いにサイズの異なる画像データを含む画像データ群を取得する画像データ群取得部と、
設定された前記検出被写体に基づき、前記画像データ群に含まれる1つの前記画像データを選択する画像選択部と、
選択された前記画像データを用いて、設定された前記検出被写体に対応する画像を検出する画像検出部と、を備える、画像処理装置。
Application Example 1 An image processing apparatus,
A detection subject setting unit that sets a detection subject that is a type of subject to be detected from the target image;
An image data group acquisition unit for acquiring an image data group including a plurality of image data of different sizes representing the target image;
An image selection unit that selects one of the image data included in the image data group based on the set detection subject;
An image detection apparatus comprising: an image detection unit that detects an image corresponding to the set detection subject using the selected image data.
この画像処理装置では、対象画像から検出すべき被写体の種類である検出被写体が設定され、対象画像を表す複数の互いにサイズの異なる画像データを含む画像データ群が取得され、設定された検出被写体に基づき画像データ群に含まれる1つの画像データが選択され、選択された画像データを用いて設定された検出被写体に対応する画像が検出されるため、対象画像における特定の種類の被写体に対応する画像の検出処理の精度と処理時間との調和を図ることができる。 In this image processing device, a detection subject that is a type of subject to be detected from the target image is set, and a plurality of image data groups including image data having different sizes representing the target image are acquired, and the set detection subject Since one image data included in the image data group is selected and an image corresponding to the detected subject set using the selected image data is detected, an image corresponding to a specific type of subject in the target image The accuracy of the detection process and the processing time can be harmonized.
[適用例2]適用例1に記載の画像処理装置であって、
前記検出被写体は、人物の顔と人物の顔の構成要素とを含み、
前記画像検出部は、前記対象画像上における検出された人物の顔に対応する画像領域である顔領域を対象に、人物の顔の構成要素に対応する画像の検出を行い、
前記画像選択部は、人物の顔の構成要素と、人物の顔の構成要素に対応する画像を検出するために必要な前記顔領域のサイズである必要顔領域サイズと、を対応付けるサイズ規定情報を有すると共に、前記サイズ規定情報に基づき人物の顔の構成要素に対応する画像の検出に用いられる前記画像データを選択する、画像処理装置。
[Application Example 2] The image processing apparatus according to Application Example 1,
The detected subject includes a human face and a human face component;
The image detection unit detects an image corresponding to a constituent element of a person's face for a face area that is an image area corresponding to the detected person's face on the target image;
The image selection unit includes size defining information that associates a component of a person's face with a necessary face region size that is a size of the face region necessary for detecting an image corresponding to the component of the person's face. And an image processing device that selects the image data used for detecting an image corresponding to a constituent element of a person's face based on the size defining information.
この画像処理装置では、対象画像上における検出された人物の顔に対応する画像領域である顔領域を対象に人物の顔の構成要素に対応する画像の検出が行われ、人物の顔の構成要素と人物の顔の構成要素に対応する画像を検出するために必要な顔領域のサイズである必要顔領域サイズとを対応付けるサイズ規定情報に基づき人物の顔の構成要素に対応する画像の検出に用いられる画像データが選択されるため、対象画像における特定の種類の被写体に対応する画像の検出処理の精度と処理時間との調和を図ることができる。 In this image processing apparatus, an image corresponding to a human face component is detected for a face area which is an image area corresponding to a detected human face on the target image, and the human face component is detected. Is used to detect the image corresponding to the component of the human face based on the size regulation information that associates the required face region size that is the size of the face region necessary for detecting the image corresponding to the component of the human face Since the image data to be selected is selected, it is possible to achieve harmony between the accuracy of the detection processing of the image corresponding to a specific type of subject in the target image and the processing time.
[適用例3]適用例2に記載の画像処理装置であって、
前記画像選択部は、人物の顔に対応する画像の検出に用いられる前記画像データとして第1のサイズの前記画像データが選択され、前記第1のサイズの前記画像データの表す前記対象画像上の前記顔領域のサイズが、人物の顔の構成要素に対応付けられた前記必要顔領域サイズより小さい場合には、人物の顔の構成要素に対応する画像の検出に用いられる前記画像データとして前記第1のサイズよりも大きい第2のサイズの前記画像データを選択する、画像処理装置。
[Application Example 3] The image processing apparatus according to Application Example 2,
The image selection unit selects the image data having a first size as the image data used for detecting an image corresponding to a person's face, and on the target image represented by the image data having the first size. When the size of the face area is smaller than the required face area size associated with a human face component, the image data used for detection of an image corresponding to the human face component is the first image data. An image processing apparatus that selects the image data having a second size larger than the size of one.
この画像処理装置では、人物の顔に対応する画像の検出に用いられる画像データとして第1のサイズの画像データが選択され、第1のサイズの画像データの表す対象画像上の顔領域のサイズが人物の顔の構成要素に対応付けられた必要顔領域サイズより小さい場合に、人物の顔の構成要素に対応する画像の検出に用いられる画像データとして第1のサイズよりも大きい第2のサイズの画像データが選択されるため、対象画像における特定の種類の被写体に対応する画像の検出処理の精度と処理時間との調和を図ることができる。 In this image processing apparatus, image data of the first size is selected as image data used for detection of an image corresponding to a human face, and the size of the face area on the target image represented by the image data of the first size is set. When the face size is smaller than the required face area size associated with the human face component, the image data used for detecting the image corresponding to the human face component has a second size larger than the first size. Since the image data is selected, it is possible to achieve harmony between the accuracy of the detection processing of the image corresponding to a specific type of subject in the target image and the processing time.
[適用例4]適用例1に記載の画像処理装置であって、
前記検出被写体は、人物の顔と人物の顔の構成要素とを含み、
前記画像選択部は、人物の顔に対応する画像の検出に用いられる前記画像データとして第1のサイズの前記画像データを選択し、人物の顔の構成要素に対応する画像の検出に用いられる前記画像データとして前記第1のサイズよりも大きい第2のサイズの前記画像データを選択する、画像処理装置。
[Application Example 4] The image processing apparatus according to Application Example 1,
The detected subject includes a human face and a human face component;
The image selection unit selects the image data having a first size as the image data used for detecting an image corresponding to a person's face, and is used for detecting an image corresponding to a constituent element of the person's face. An image processing apparatus that selects the image data having a second size larger than the first size as image data.
この画像処理装置では、人物の顔に対応する画像の検出に用いられる画像データとして第1のサイズの画像データが選択され、人物の顔の構成要素に対応する画像の検出に用いられる画像データとして第1のサイズよりも大きい第2のサイズの画像データが選択されるため、対象画像における特定の種類の被写体に対応する画像の検出処理の精度と処理時間との調和を図ることができる。 In this image processing apparatus, image data of the first size is selected as image data used for detecting an image corresponding to a person's face, and image data used for detecting an image corresponding to a constituent element of the person's face. Since image data having a second size larger than the first size is selected, it is possible to achieve harmony between the accuracy and processing time of image detection processing corresponding to a specific type of subject in the target image.
[適用例5]適用例2ないし適用例4のいずれかに記載の画像処理装置であって、
前記人物の顔の構成要素は、顔の器官と、顔の輪郭と、顔の表情と、の少なくとも1つである、画像処理装置。
Application Example 5 The image processing apparatus according to any one of Application Example 2 to Application Example 4,
The human face component is at least one of a facial organ, a facial contour, and a facial expression.
この画像処理装置では、対象画像における顔の器官と、顔の輪郭と、顔の表情と、の少なくとも1つに対応する画像の検出処理の精度と処理時間との調和を図ることができる。 With this image processing apparatus, it is possible to achieve harmony between the accuracy and processing time of image detection processing corresponding to at least one of facial organs, facial contours, and facial expressions in the target image.
[適用例6]適用例5に記載の画像処理装置であって、
前記顔の器官は、右目と左目と口との少なくとも1つである、画像処理装置。
[Application Example 6] The image processing apparatus according to Application Example 5,
The image processing apparatus, wherein the facial organ is at least one of a right eye, a left eye, and a mouth.
この画像処理装置では、右目と左目と口との少なくとも1つに対応する画像の検出処理の精度と処理時間との調和を図ることができる。 In this image processing apparatus, it is possible to achieve harmony between the accuracy and processing time of the detection processing of the image corresponding to at least one of the right eye, the left eye, and the mouth.
なお、本発明は、種々の態様で実現することが可能であり、例えば、画像処理方法および装置、画像検出方法および装置、これらの方法または装置の機能を実現するためのコンピュータプログラム、そのコンピュータプログラムを記録した記録媒体、そのコンピュータプログラムを含み搬送波内に具現化されたデータ信号、等の形態で実現することができる。 The present invention can be realized in various modes. For example, an image processing method and apparatus, an image detection method and apparatus, a computer program for realizing the functions of these methods or apparatuses, and the computer program Can be realized in the form of, for example, a recording medium on which data is recorded, a data signal including the computer program and embodied in a carrier wave.
次に、本発明の実施の形態を実施例に基づいて以下の順序で説明する。
A.実施例:
A−1.画像処理装置の構成:
A−2.被写体検出処理:
B.変形例:
Next, embodiments of the present invention will be described in the following order based on examples.
A. Example:
A-1. Configuration of image processing device:
A-2. Subject detection processing:
B. Variations:
A.実施例:
A−1.画像処理装置の構成:
図1は、本発明の実施例における画像処理装置としてのプリンタ100の構成を概略的に示す説明図である。本実施例のプリンタ100は、メモリカードMC等から取得した画像データに基づき画像を印刷する、いわゆるダイレクトプリントに対応したインクジェット式カラープリンタである。プリンタ100は、プリンタ100の各部を制御するCPU110と、ROMやRAMによって構成された内部メモリ120と、ボタンやタッチパネルにより構成された操作部140と、液晶ディスプレイにより構成された表示部150と、プリンタエンジン160と、カードインターフェース(カードI/F)170と、を備えている。プリンタ100は、さらに、他の機器(例えばデジタルスチルカメラやパーソナルコンピュータ)とのデータ通信を行うためのインターフェースを備えているとしてもよい。プリンタ100の各構成要素は、バスを介して互いに接続されている。
A. Example:
A-1. Configuration of image processing device:
FIG. 1 is an explanatory diagram schematically showing the configuration of a
プリンタエンジン160は、印刷データに基づき印刷を行う印刷機構である。カードインターフェース170は、カードスロット172に挿入されたメモリカードMCとの間でデータのやり取りを行うためのインターフェースである。なお、本実施例では、メモリカードMCに画像データを含む画像ファイルが格納されている。
The
内部メモリ120には、画像処理部200と、表示処理部310と、印刷処理部320と、が格納されている。画像処理部200は、所定のオペレーティングシステムの下で、後述する被写体検出処理を実行するためのコンピュータプログラムである。表示処理部310は、表示部150を制御して、表示部150上に処理メニューやメッセージ、画像等を表示させるディスプレイドライバである。印刷処理部320は、画像データから印刷データを生成し、プリンタエンジン160を制御して、印刷データに基づく画像の印刷を実行するためのコンピュータプログラムである。CPU110は、内部メモリ120から、これらのプログラムを読み出して実行することにより、これら各部の機能を実現する。
The
画像処理部200は、プログラムモジュールとして、画像検出部210と、検出被写体設定部220と、検出用画像データ群生成部230と、画像選択部240と、情報付加部250と、を含んでいる。画像検出部210は、画像データの表す画像における特定の種類の被写体に対応する画像の検出を行う。画像検出部210は、判定対象設定部211と、評価値算出部212と、判定部213と、領域設定部214と、を含んでいる。これら各部の機能については、後述の被写体検出処理の説明において詳述する。
The
検出被写体設定部220は、対象画像データの表す対象画像から検出すべき被写体の種類である検出被写体を設定する。検出用画像データ群生成部230は、対象画像を表す複数の互いにサイズの異なる画像データを含む検出用画像データ群を生成する。検出用画像データ群生成部230は、検出用画像データ群を生成して取得することから、本発明における画像データ群取得部に相当する。画像選択部240は、設定された検出被写体に基づき、検出被写体に対応する画像の検出に用いられる画像データとして、検出用画像データ群に含まれる1つの画像データを選択する。情報付加部250は、画像データを含む画像ファイルに所定の情報(例えば顔領域の位置を示す情報)を付加する。
The detected subject setting unit 220 sets a detected subject that is the type of subject to be detected from the target image represented by the target image data. The detection image data
内部メモリ120には、また、サイズ規定テーブルSPTが格納されている。図2は、サイズ規定テーブルSPTの内容の一例を示す説明図である。図2に示すように、サイズ規定テーブルSPTは、対象画像から検出すべき検出対象(検出被写体)と必要顔領域サイズSnとを対応付ける情報(以下「サイズ規定情報」とも呼ぶ)を含んでいる。ここで、本実施例のサイズ規定テーブルSPTに規定された検出被写体は、人物の顔および人物の顔の構成要素(人物の顔の器官(例えば目や口)、人物の顔の輪郭(例えば頬の輪郭や口の輪郭)、人物の顔の表情(例えば笑顔を表す顔の部分))である。また、後述するように、対象画像における人物の顔の構成要素の画像の検出は、検出された人物の顔に対応する画像領域(以下「顔領域」と呼ぶ)を対象として実行される。必要顔領域サイズSnは、人物の顔の構成要素に対応する画像を検出するために必要な顔領域のサイズを意味している。一般に、顔領域のサイズが大きいほど、検出被写体としての人物の顔の構成要素に対応する画像の検出精度は向上するが、検出に要する処理時間は増加する。反対に、顔領域のサイズが小さいほど、検出に要する処理時間は減少するが、検出精度は下降する。必要顔領域サイズSnは、検出被写体としての人物の顔の構成要素に対応する画像の検出処理において所定の検出率を達成するために最低限必要な顔領域のサイズとして実験的に設定され、サイズ規定テーブルSPTに規定される。
The
なお、本実施例では、顔領域は正方形形状の画像領域として検出される。サイズ規定テーブルSPTには、必要顔領域サイズSnとして、顔領域の1辺の長さが画素数を単位として定められている。例えば、本実施例では、顔器官に対応する画像の検出は、60画素×60画素以上のサイズの顔領域を対象として行われることが必要である。 In the present embodiment, the face area is detected as a square-shaped image area. In the size defining table SPT, as the required face area size Sn, the length of one side of the face area is defined in units of the number of pixels. For example, in this embodiment, detection of an image corresponding to a facial organ needs to be performed on a face area having a size of 60 pixels × 60 pixels or more.
内部メモリ120には、また、顔学習データFLDと、顔器官学習データOLDと、表情データEDと、が格納されている。顔学習データFLD、顔器官学習データOLD、表情データEDは、画像検出部210による検出被写体の検出に用いられる。これらのデータの内容については、後述の被写体検出処理の説明において詳述する。
The
A−2.被写体検出処理:
図3は、本実施例における被写体検出処理の流れを示すフローチャートである。本実施例における被写体検出処理は、対象画像データの表す対象画像から検出すべき被写体の種類として設定された検出被写体に対応する画像を検出する処理である。
A-2. Subject detection processing:
FIG. 3 is a flowchart showing the flow of subject detection processing in the present embodiment. The subject detection processing in the present embodiment is processing for detecting an image corresponding to a detected subject set as the type of subject to be detected from the target image represented by the target image data.
ステップS110(図3)では、検出被写体設定部220(図1)が、検出被写体を設定する。検出被写体設定部220は、画像処理部200により実行される画像処理の種類に基づき、検出被写体を設定する。図4は、画像処理部200により実行される画像処理の種類の一例を示す説明図である。図4には、画像処理部200が提供する画像処理メニューの一覧が表示部150に表示されている様子を示している。本実施例では、画像処理部200により実行される画像処理の種類として、肌色補正と顔変形と笑顔検出との3つが設定されている。
In step S110 (FIG. 3), the detected subject setting unit 220 (FIG. 1) sets the detected subject. The detected subject setting unit 220 sets a detected subject based on the type of image processing executed by the
肌色補正は、顔領域または顔領域に基づき設定される画像領域内の人物の肌の色を好ましい肌色に補正する画像処理である。本実施例では、肌色補正が実行される場合の検出被写体は人物の顔であると設定されており、ユーザにより操作部140を介して肌色補正の画像処理が選択されると、検出被写体設定部220は検出被写体として人物の顔を設定する。
Skin color correction is image processing for correcting the skin color of a person in a face region or an image region set based on the face region to a preferable skin color. In this embodiment, it is set that the detected subject when the skin color correction is executed is a human face, and when the user selects the skin color correction image processing via the
顔変形は、顔領域または顔領域に基づき設定される画像領域内の画像を変形する画像処理である。顔領域の検出精度が悪い(すなわち、検出された顔領域と実際の顔の画像との位置、大きさ、傾きに関するずれが大きい)と、顔変形処理の結果が不自然なものとなる可能性がある。そのため、本実施例では、顔変形が実行される場合には、顔の器官に対応する画像を検出し、検出された器官に対応する器官領域に基づき顔領域を調整することにより顔領域の精度を向上させるものとしている。従って、顔変形が実行される場合の検出被写体は人物の顔と顔の器官であると設定されており、ユーザにより操作部140を介して顔変形の画像処理が選択されると、検出被写体設定部220は検出被写体として人物の顔と顔の器官とを設定する。
Face deformation is image processing for deforming an image in a face area or an image area set based on the face area. If the detection accuracy of the face area is poor (that is, there is a large shift in the position, size, and tilt between the detected face area and the actual face image), the result of the face deformation process may be unnatural. There is. Therefore, in this embodiment, when face deformation is executed, an image corresponding to a facial organ is detected, and the facial area is adjusted based on the organ area corresponding to the detected organ, thereby improving the accuracy of the facial area. To improve. Accordingly, the detection subject when the face deformation is executed is set to be a human face and a face organ, and when the user selects face deformation image processing via the
笑顔検出は、顔領域または顔領域に基づき設定される画像領域内において顔や顔の器官の輪郭を検出し、笑顔の画像を検出する画像処理である。本実施例では、笑顔検出が実行される場合の検出被写体は人物の顔と顔の器官と顔の輪郭と表情であると設定されており、ユーザにより操作部140を介して笑顔検出の画像処理が選択されると、検出被写体設定部220は検出被写体として人物の顔と顔の器官と顔の輪郭と表情を設定する。
Smile detection is image processing for detecting a smile image by detecting the outline of a face or facial organ within a face area or an image area set based on the face area. In this embodiment, the detection subject when smile detection is executed is set to be a human face, facial organs, facial contour and facial expression, and image processing for smile detection by the user via the
以下では、画像処理部200により実行される画像処理として顔変形が選択され、検出被写体として人物の顔と顔の器官とが設定されたものとして説明する。
In the following description, it is assumed that face deformation is selected as image processing executed by the
ステップS120(図3)では、画像処理部200(図1)が、被写体検出処理の対象となる画像を表す画像データを取得する。本実施例のプリンタ100では、カードスロット172にメモリカードMCが挿入されると、メモリカードMCに格納された画像ファイルのサムネイル画像が表示部150に表示される。ユーザは、表示されたサムネイル画像を参照しつつ、操作部140を介して処理の対象となる1つまたは複数の画像を選択する。画像処理部200は、選択された1つまたは複数の画像に対応する画像データを含む画像ファイルをメモリカードMCより取得して内部メモリ120の所定の領域に格納する。なお、取得された画像データを原画像データと呼び、原画像データの表す画像を原画像OImgと呼ぶものとする。
In step S120 (FIG. 3), the image processing unit 200 (FIG. 1) acquires image data representing an image to be subjected to subject detection processing. In the
ステップS130(図3)では、検出用画像データ群生成部230(図1)が、検出用画像データ群を生成する。図5は、検出用画像データ群の一例を示す説明図である。図5に示すように、検出用画像データ群は、後述の顔領域検出(図3のステップS140)に用いられる顔検出用画像FDImgを表す画像データと、顔検出用画像FDImgより解像度の高い(すなわちサイズの大きい)2つの高解像度画像IvおよびIxを表す画像データと、を含んでいる。本実施例では、顔検出用画像FDImgのサイズはQVGA(横320画素×縦240画素)であり、高解像度画像IvのサイズはVGA(横640画素×縦480画素)であり、高解像度画像IxのサイズはXGA(横1024画素×縦768画素)である。検出用画像データ群生成部230は、原画像OImgを表す画像データの解像度変換を行うことにより、検出用画像データ群を構成する各画像データ生成する。なお、原画像OImgと顔検出用画像FDImgと高解像度画像Ivと高解像度画像Ixとは、解像度(サイズ)を除けばすべて同じ画像であり、本発明における対象画像に相当する。
In step S130 (FIG. 3), the detection image data group generation unit 230 (FIG. 1) generates a detection image data group. FIG. 5 is an explanatory diagram illustrating an example of a detection image data group. As shown in FIG. 5, the detection image data group has higher resolution than the image data representing the face detection image FDImg used for face area detection (step S140 in FIG. 3) described later and the face detection image FDImg ( Image data representing two high-resolution images Iv and Ix). In this embodiment, the size of the face detection image FDImg is QVGA (horizontal 320 pixels × vertical 240 pixels), and the size of the high resolution image Iv is VGA (horizontal 640 pixels × vertical 480 pixels). The size of XGA is XGA (1024 horizontal pixels × 768 vertical pixels). The detection image data
ステップS140(図3)では、画像検出部210(図1)が、顔領域検出処理を行う。顔領域検出処理は、対象画像における顔の画像に対応する顔領域FAを検出する処理である。上述したように、本実施例では、検出被写体として人物の顔と顔の器官とが設定されており、画像検出部210は、まず顔領域検出処理を実行する。図6は、顔領域検出処理の流れを示すフローチャートである。また、図7は、顔領域検出処理の概要を示す説明図である。図7の最上段には顔検出用画像FDImgの一例を示している。 In step S140 (FIG. 3), the image detection unit 210 (FIG. 1) performs face area detection processing. The face area detection process is a process for detecting a face area FA corresponding to a face image in the target image. As described above, in this embodiment, a human face and a facial organ are set as detection subjects, and the image detection unit 210 first performs a face area detection process. FIG. 6 is a flowchart showing the flow of face area detection processing. FIG. 7 is an explanatory diagram showing an outline of the face area detection process. An example of the face detection image FDImg is shown at the top of FIG.
顔領域検出処理(図6)のステップS320では、判定対象設定部211(図1)が、判定対象画像領域JIA(後述)の設定に用いるウィンドウSWのサイズを初期値に設定する。ステップS330では、判定対象設定部211が、ウィンドウSWを顔検出用画像FDImg上の初期位置に配置する。ステップS340では、判定対象設定部211が、顔検出用画像FDImg上に配置されたウィンドウSWにより規定される画像領域を、顔の画像に対応する画像領域であるか否かの判定(以下「顔判定」とも呼ぶ)の対象となる判定対象画像領域JIAに設定する。図7の中段には、顔検出用画像FDImg上に初期値のサイズのウィンドウSWが初期位置に配置され、ウィンドウSWにより規定される画像領域が判定対象画像領域JIAに設定される様子を示している。本実施例では、後述するように、正方形形状のウィンドウSWのサイズおよび位置が変更されつつ判定対象画像領域JIAの設定が順に行われるが、ウィンドウSWのサイズの初期値は最大サイズである横240画素×縦240画素であり、ウィンドウSWの初期位置はウィンドウSWの左上の頂点が顔検出用画像FDImgの左上の頂点に重なるような位置である。また、ウィンドウSWは、その傾きが0度の状態で配置される。なお、ウィンドウSWの傾きとは、ウィンドウSWの上方向が対象画像(顔検出用画像FDImg)の上方向と一致した状態を基準状態(傾き=0度)とした場合における基準状態からの時計回りの回転角度を意味している。
In step S320 of the face area detection process (FIG. 6), the determination target setting unit 211 (FIG. 1) sets the size of the window SW used for setting the determination target image area JIA (described later) to an initial value. In step S330, the determination target setting unit 211 places the window SW at an initial position on the face detection image FDImg. In step S340, the determination target setting unit 211 determines whether the image area defined by the window SW arranged on the face detection image FDImg is an image area corresponding to the face image (hereinafter referred to as “face”). It is also set in a determination target image area JIA that is a target of determination. The middle part of FIG. 7 shows a state in which a window SW having an initial value size is arranged at the initial position on the face detection image FDImg, and an image area defined by the window SW is set as the determination target image area JIA. Yes. In this embodiment, as will be described later, the determination target image area JIA is sequentially set while changing the size and position of the square-shaped window SW, but the initial value of the size of the window SW is the
ステップS350(図6)では、評価値算出部212(図1)が、判定対象画像領域JIAについて、判定対象画像領域JIAに対応する画像データ基づき、顔判定に用いる累計評価値Tvを算出する。なお、本実施例では、顔判定は予め設定された特定顔傾き毎に実行される。すなわち、特定顔傾き毎に、判定対象画像領域JIAが当該特定顔傾き分だけ傾いた顔の画像に対応する画像領域であるか否かの判定が行われる。そのため、累計評価値Tvも特定顔傾き毎に算出される。ここで、特定顔傾きとは、予め設定された顔傾きの値を意味している。また、顔傾きとは、対象画像面内(インプレーン)における顔の画像の傾き(回転角度)を意味している。本実施例では、画像や画像領域等の傾きを、画像や画像領域等の上方向が対象画像の上方向と一致した状態を基準状態(傾き=0度)とした場合における基準状態からの時計回りの回転角度で表すものとしている。例えば、顔傾きは、対象画像の上下方向に沿って顔の画像が位置している状態(頭頂が上方向を向き顎が下方向を向いた状態)を基準状態(顔傾き=0度)とした場合における基準状態からの顔の画像の時計回りの回転角度で表される。本実施例では、傾きを0度から30度ずつ増加させた計12個の顔傾き(0度、30度、60度、・・・、330度)が、特定顔傾きとして設定されている。 In step S350 (FIG. 6), the evaluation value calculation unit 212 (FIG. 1) calculates a cumulative evaluation value Tv used for face determination for the determination target image area JIA based on the image data corresponding to the determination target image area JIA. In the present embodiment, face determination is executed for each specific face inclination set in advance. That is, for each specific face inclination, it is determined whether or not the determination target image area JIA is an image area corresponding to a face image inclined by the specific face inclination. Therefore, the cumulative evaluation value Tv is also calculated for each specific face inclination. Here, the specific face inclination means a preset face inclination value. The face inclination means the inclination (rotation angle) of the face image in the target image plane (in-plane). In the present embodiment, the clock from the reference state in the case where the inclination of the image or the image area is the reference state (inclination = 0 degree) when the upward direction of the image or image area coincides with the upward direction of the target image. It is assumed to be expressed by the rotation angle around. For example, for the face inclination, a state where the face image is positioned along the vertical direction of the target image (a state where the top of the head is facing upward and the chin is facing downward) is referred to as a reference state (face inclination = 0 degrees). In this case, it is represented by the clockwise rotation angle of the face image from the reference state. In the present embodiment, a total of 12 face inclinations (0 degrees, 30 degrees, 60 degrees,..., 330 degrees) obtained by increasing the inclination from 0 degrees to 30 degrees are set as specific face inclinations.
図8は、顔判定に用いる累計評価値Tvの算出方法の概要を示す説明図である。本実施例では、累計評価値Tvの算出にN個のフィルタ(フィルタ1〜フィルタN)が用いられる。各フィルタの外形はウィンドウSWと同じアスペクト比を有しており(すなわち正方形形状であり)、各フィルタにはプラス領域paとマイナス領域maとが設定されている。評価値算出部212は、判定対象画像領域JIAにフィルタX(X=1,2,・・・,N)を順に適用して評価値vX(すなわちv1〜vN)を算出する。具体的には、評価値vXは、フィルタXのプラス領域paに対応する判定対象画像領域JIA上の領域内に位置する画素の輝度値の合計から、マイナス領域maに対応する判定対象画像領域JIA上の領域内に位置する画素の輝度値の合計を差し引いた値である。
FIG. 8 is an explanatory diagram showing an outline of a method of calculating the cumulative evaluation value Tv used for face determination. In this embodiment, N filters (
算出された評価値vXは、各評価値vXに対応して設定された閾値thX(すなわちth1〜thN)と比較される。本実施例では、評価値vXが閾値thX以上である場合には、フィルタXに関しては判定対象画像領域JIAが顔の画像に対応する画像領域であると判定され、フィルタXの出力値として値「1」が設定される。一方、評価値vXが閾値thXより小さい場合には、フィルタXに関しては判定対象画像領域JIAが顔の画像に対応する画像領域ではないと判定され、フィルタXの出力値として値「0」が設定される。各フィルタXには重み係数WeX(すなわちWe1〜WeN)が設定されており、すべてのフィルタについての出力値と重み係数WeXとの積の合計が、累計評価値Tvとして算出される。 The calculated evaluation value vX is compared with a threshold thX (that is, th1 to thN) set corresponding to each evaluation value vX. In this embodiment, when the evaluation value vX is equal to or greater than the threshold thX, it is determined that the determination target image area JIA is an image area corresponding to the face image for the filter X, and the value “ 1 "is set. On the other hand, if the evaluation value vX is smaller than the threshold thX, it is determined that the determination target image area JIA is not an image area corresponding to the face image with respect to the filter X, and the value “0” is set as the output value of the filter X Is done. Weight coefficients WeX (that is, We1 to WeN) are set for each filter X, and the sum of products of output values and weight coefficients WeX for all filters is calculated as a cumulative evaluation value Tv.
なお、顔判定に用いられるフィルタXの態様や閾値thX、重み係数WeX、後述の閾値THは、上記12個の特定顔傾きのそれぞれについて、顔学習データFLD(図1)として予め設定されている。本実施例における顔学習データFLDは、判定対象画像領域JIAが顔の画像に対応する画像領域であることの確からしさを表す評価値を算出するためのデータである。 Note that the aspect of the filter X used for face determination, the threshold thX, the weighting coefficient WeX, and the threshold TH described later are preset as face learning data FLD (FIG. 1) for each of the 12 specific face inclinations. . The face learning data FLD in the present embodiment is data for calculating an evaluation value indicating the certainty that the determination target image area JIA is an image area corresponding to a face image.
顔学習データFLDは、サンプル画像を用いた学習によって生成される。図9は、学習に用いられるサンプル画像の一例を示す説明図である。学習には、顔の画像に対応した画像であることが予めわかっている複数の顔サンプル画像によって構成された顔サンプル画像群と、顔の画像に対応した画像ではないことが予めわかっている複数の非顔サンプル画像によって構成された非顔サンプル画像群と、が用いられる。 The face learning data FLD is generated by learning using a sample image. FIG. 9 is an explanatory diagram illustrating an example of a sample image used for learning. For learning, a face sample image group composed of a plurality of face sample images that are known in advance to be images corresponding to face images, and a plurality of information that is known in advance to be images that do not correspond to face images. A non-face sample image group composed of non-face sample images.
学習による顔学習データFLDの生成は特定顔傾き毎に実行されるため、図9に示すように、顔サンプル画像群は、12個の特定顔傾きのそれぞれに対応したものが準備される。例えば0度の特定顔傾きについての顔学習データFLDの生成は、0度の特定顔傾きに対応した顔サンプル画像群と非顔サンプル画像群とを用いて実行され、30度の特定顔傾きについての顔学習データFLDの生成は、30度の特定顔傾きに対応した顔サンプル画像群と非顔サンプル画像群とを用いて実行される。 Since generation of the face learning data FLD by learning is executed for each specific face inclination, as shown in FIG. 9, a face sample image group corresponding to each of 12 specific face inclinations is prepared. For example, the generation of the face learning data FLD for the specific face inclination of 0 degree is executed using the face sample image group and the non-face sample image group corresponding to the specific face inclination of 0 degree. The face learning data FLD is generated using a face sample image group and a non-face sample image group corresponding to a specific face inclination of 30 degrees.
各特定顔傾きに対応する顔サンプル画像群は、画像サイズに対する顔の画像の大きさの比が所定の値の範囲内であると共に顔の画像の傾きが特定顔傾きに等しい複数の顔サンプル画像(以下「基本顔サンプル画像FIo」とも呼ぶ)を含む。また、顔サンプル画像群は、少なくとも1つの基本顔サンプル画像FIoについて、基本顔サンプル画像FIoを1.2倍から0.8倍までの範囲の所定の倍率で拡大および縮小した画像(例えば図9における画像FIaおよびFIb)や、基本顔サンプル画像FIoの顔傾きをプラスマイナス15度の範囲で変化させた画像(例えば図9における画像FIcおよびFId)をも含む。 The face sample image group corresponding to each specific face inclination includes a plurality of face sample images in which the ratio of the size of the face image to the image size is within a predetermined value range and the inclination of the face image is equal to the specific face inclination. (Hereinafter also referred to as “basic face sample image FIo”). The face sample image group is an image obtained by enlarging and reducing the basic face sample image FIo with a predetermined magnification in a range from 1.2 times to 0.8 times with respect to at least one basic face sample image FIo (for example, FIG. 9). And images obtained by changing the face inclination of the basic face sample image FIo within a range of plus or minus 15 degrees (for example, the images FIc and FId in FIG. 9).
サンプル画像を用いた学習は、例えばニューラルネットワークを用いた方法や、ブースティング(例えばアダブースティング)を用いた方法、サポートベクターマシーンを用いた方法等により実行される。例えば学習がニューラルネットワークを用いた方法により実行される場合には、各フィルタX(すなわちフィルタ1〜フィルタN、図8参照)について、ある特定顔傾きに対応した顔サンプル画像群(図9参照)と非顔サンプル画像群とに含まれるすべてのサンプル画像を用いて評価値vX(すなわちv1〜vN)が算出され、所定の顔検出率を達成する閾値thX(すなわちth1〜thN)が設定される。ここで、顔検出率とは、顔サンプル画像群を構成する顔サンプル画像の総数に対する、評価値vXによる閾値判定によって顔の画像に対応する画像であると判定される顔サンプル画像の数の割合を意味している。 Learning using a sample image is executed by, for example, a method using a neural network, a method using boosting (for example, adaboost), a method using a support vector machine, or the like. For example, when learning is performed by a method using a neural network, a face sample image group corresponding to a specific face inclination (see FIG. 9) for each filter X (that is, filters 1 to N, see FIG. 8). And the evaluation value vX (that is, v1 to vN) is calculated using all the sample images included in the non-face sample image group, and a threshold thX (that is, th1 to thN) that achieves a predetermined face detection rate is set. . Here, the face detection rate is the ratio of the number of face sample images determined to be an image corresponding to a face image by threshold determination based on the evaluation value vX with respect to the total number of face sample images constituting the face sample image group. Means.
次に、各フィルタXに設定された重み係数WeX(すなわちWe1〜WeN)が初期値に設定され、顔サンプル画像群および非顔サンプル画像群の中から選択された1つのサンプル画像についての累計評価値Tvが算出される。後述するように、顔判定においては、ある画像について算出された累計評価値Tvが所定の閾値TH以上の場合には、当該画像は顔の画像に対応する画像であると判定される。学習においては、選択されたサンプル画像(顔サンプル画像または非顔サンプル画像)について算出された累計評価値Tvによる閾値判定結果の正誤に基づき、各フィルタXに設定された重み係数WeXの値が修正される。以降、サンプル画像の選択と、選択されたサンプル画像について算出された累計評価値Tvによる閾値判定、および判定結果の正誤に基づく重み係数WeXの値の修正が、顔サンプル画像群および非顔サンプル画像群に含まれるすべてのサンプル画像について繰り返し実行される。以上の処理が特定顔傾き毎に実行されることにより、特定顔傾き毎の顔学習データFLDが生成される。 Next, the weight coefficient WeX (that is, We1 to WeN) set for each filter X is set to an initial value, and cumulative evaluation is performed on one sample image selected from the face sample image group and the non-face sample image group. A value Tv is calculated. As will be described later, in the face determination, when the cumulative evaluation value Tv calculated for a certain image is equal to or greater than a predetermined threshold TH, the image is determined to be an image corresponding to the face image. In learning, the value of the weighting coefficient WeX set for each filter X is corrected based on the correctness of the threshold determination result based on the cumulative evaluation value Tv calculated for the selected sample image (face sample image or non-face sample image). Is done. Thereafter, the selection of the sample image, the threshold value determination based on the cumulative evaluation value Tv calculated for the selected sample image, and the correction of the value of the weighting coefficient WeX based on the correctness of the determination result are the face sample image group and the non-face sample image. It is repeatedly executed for all the sample images included in the group. By executing the above processing for each specific face inclination, face learning data FLD for each specific face inclination is generated.
判定対象画像領域JIAについて特定顔傾き毎に累計評価値Tvが算出されると(図6のステップS350)、判定部213(図1)は、累計評価値Tvを特定顔傾き毎に設定された閾値THと比較する(ステップS360)。ある特定顔傾きについて累計評価値Tvが閾値TH以上である場合には、画像検出部210が、判定対象画像領域JIAは当該特定顔傾き分だけ傾いた顔の画像に対応する画像領域であるとして、判定対象画像領域JIAの位置、すなわち現在設定されているウィンドウSWの座標と、当該特定顔傾きと、を記憶する(ステップS370)。一方、いずれの特定顔傾きについても累計評価値Tvが閾値THより小さい場合には、ステップS370の処理はスキップされる。 When the cumulative evaluation value Tv is calculated for each specific face inclination for the determination target image area JIA (step S350 in FIG. 6), the determination unit 213 (FIG. 1) sets the cumulative evaluation value Tv for each specific face inclination. The threshold value TH is compared (step S360). When the cumulative evaluation value Tv is greater than or equal to the threshold value TH for a specific face inclination, the image detection unit 210 determines that the determination target image area JIA is an image area corresponding to a face image inclined by the specific face inclination. The position of the determination target image area JIA, that is, the coordinates of the currently set window SW and the specific face inclination are stored (step S370). On the other hand, if the cumulative evaluation value Tv is smaller than the threshold value TH for any specific face inclination, the process of step S370 is skipped.
ステップS380(図6)では、画像検出部210(図1)が、現在設定されているサイズのウィンドウSWにより顔検出用画像FDImg全体がスキャンされたか否かを判定する。未だ顔検出用画像FDImg全体がスキャンされていないと判定された場合には、判定対象設定部211(図1)が、ウィンドウSWを所定の方向に所定の移動量だけ移動する(ステップS390)。図7の下段には、ウィンドウSWが移動した様子を示している。本実施例では、ステップS390において、ウィンドウSWがウィンドウSWの水平方向の大きさの2割分の移動量で右方向に移動するものとしている。また、ウィンドウSWがさらに右方向には移動できない位置に配置されている場合には、ステップS390において、ウィンドウSWが顔検出用画像FDImgの左端まで戻ると共に、ウィンドウSWの垂直方向の大きさの2割分の移動量で下方向に移動するものとしている。ウィンドウSWがさらに下方向には移動できない位置に配置されている場合には、顔検出用画像FDImg全体がスキャンされたこととなる。ウィンドウSWの移動(ステップS390)の後には、移動後のウィンドウSWについて、上述のステップS340以降の処理が実行される。 In step S380 (FIG. 6), the image detection unit 210 (FIG. 1) determines whether or not the entire face detection image FDImg has been scanned by the window SW having the currently set size. If it is determined that the entire face detection image FDImg has not been scanned yet, the determination target setting unit 211 (FIG. 1) moves the window SW in a predetermined direction by a predetermined movement amount (step S390). The lower part of FIG. 7 shows how the window SW has moved. In this embodiment, in step S390, the window SW is moved to the right by a movement amount corresponding to 20% of the horizontal size of the window SW. If the window SW is arranged at a position where it cannot move further to the right, the window SW returns to the left end of the face detection image FDImg in step S390, and the window SW has a size of 2 in the vertical direction. It is assumed that it moves downwards by the amount of movement of the percentage. When the window SW is arranged at a position where it cannot move further downward, the entire face detection image FDImg is scanned. After the movement of the window SW (step S390), the processes after the above-described step S340 are executed for the moved window SW.
ステップS380(図6)において現在設定されているサイズのウィンドウSWにより顔検出用画像FDImg全体がスキャンされたと判定された場合には、ウィンドウSWの所定のサイズがすべて使用されたか否かが判定される(ステップS400)。本実施例では、ウィンドウSWのサイズとして、初期値(最大サイズ)である横240画素×縦240画素の他に、横213画素×縦213画素、横178画素×縦178画素、横149画素×縦149画素、横124画素×縦124画素、横103画素×縦103画素、横86画素×縦86画素、横72画素×縦72画素、横60画素×縦60画素、横50画素×縦50画素、横41画素×縦41画素、横35画素×縦35画素、横29画素×縦29画素、横24画素×縦24画素、横20画素×縦20画素(最小サイズ)、の合計15個のサイズが設定されている。未だ使用されていないウィンドウSWのサイズがあると判定された場合には、判定対象設定部211(図1)が、ウィンドウSWのサイズを現在設定されているサイズの次に小さいサイズに変更する(ステップS410)。すなわち、ウィンドウSWのサイズは、最初に最大サイズに設定され、その後、順に小さいサイズに変更されていく。ウィンドウSWのサイズの変更(ステップS410)の後には、変更後のサイズのウィンドウSWについて、上述のステップS330以降の処理が実行される。 When it is determined in step S380 (FIG. 6) that the entire face detection image FDImg has been scanned by the window SW having the currently set size, it is determined whether or not all the predetermined sizes of the window SW have been used. (Step S400). In this embodiment, as the size of the window SW, in addition to the initial value (maximum size) of 240 horizontal pixels × vertical 240 pixels, horizontal 213 pixels × vertical 213 pixels, horizontal 178 pixels × vertical 178 pixels, horizontal 149 pixels × 149 pixels vertically, 124 pixels horizontally × 124 pixels vertically, 103 pixels horizontally × 103 pixels vertically, 86 pixels wide × 86 pixels high, 72 pixels wide × 72 pixels high, 60 pixels wide × 60 pixels high, 50 pixels wide × 50 vertical Total of 15 pixels: 41 pixels wide x 41 pixels wide, 35 pixels wide x 35 pixels wide, 29 pixels wide x 29 pixels wide, 24 pixels wide x 24 pixels high, 20 pixels wide x 20 pixels high (minimum size) The size of is set. If it is determined that there is a size of the window SW that is not yet used, the determination target setting unit 211 (FIG. 1) changes the size of the window SW to the next smaller size than the currently set size ( Step S410). That is, the size of the window SW is first set to the maximum size, and then changed to a smaller size in order. After the change of the size of the window SW (step S410), the processing after step S330 described above is executed for the window SW having the changed size.
ステップS400(図6)においてウィンドウSWの所定のサイズがすべて使用されたと判定された場合には、領域設定部214(図1)が、顔領域設定処理を実行する(ステップS420)。図10および図11は、顔領域設定処理の概要を示す説明図である。領域設定部214は、図6のステップS360において累計評価値Tvが閾値TH以上であると判定されステップS370において記憶されたウィンドウSWの座標(すなわちウィンドウSWの位置およびサイズ)と特定顔傾きとに基づき、顔領域FAを設定する。具体的には、特定顔傾きが0度である場合には、ウィンドウSWにより規定される画像領域(すなわち判定対象画像領域JIA)が、そのまま顔領域FAとして設定される。一方、特定顔傾きが0度以外である場合には、ウィンドウSWの傾きを特定顔傾きに一致させ(すなわちウィンドウSWを所定の点(例えばウィンドウSWの重心)を中心として特定顔傾き分だけ時計回りに回転させ)、傾きを変化させた後のウィンドウSWにより規定される画像領域が顔領域FAとして設定される。例えば図10(a)に示すように、30度の特定顔傾きについて累計評価値Tvが閾値TH以上であると判定された場合には、図10(b)に示すように、ウィンドウSWの傾きを30度に変化させ、傾き変化後のウィンドウSWにより規定される画像領域が顔領域FAとして設定される。
If it is determined in step S400 (FIG. 6) that all of the predetermined size of the window SW has been used, the region setting unit 214 (FIG. 1) executes a face region setting process (step S420). 10 and 11 are explanatory diagrams showing an outline of the face area setting process. The
また、領域設定部214は、ステップS370において、ある特定顔傾きについて互いに一部が重複する複数のウィンドウSWが記憶された場合には、各ウィンドウSWにおける所定の点(例えばウィンドウSWの重心)の座標の平均の座標を重心とし、各ウィンドウSWのサイズの平均のサイズを有する1つの新たなウィンドウ(以下「平均ウィンドウAW」とも呼ぶ)を設定する。例えば図11(a)に示すように、互いに一部が重複する4つのウィンドウSW(SW1〜SW4)が記憶された場合には、図11(b)に示すように、4つのウィンドウSWのそれぞれの重心の座標の平均の座標を重心とし、4つのウィンドウSWのそれぞれのサイズの平均のサイズを有する1つの平均ウィンドウAWが定義される。このとき、上述したのと同様に、特定顔傾きが0度である場合には、平均ウィンドウAWにより規定される画像領域がそのまま顔領域FAとして設定される。一方、特定顔傾きが0度以外である場合には、平均ウィンドウAWの傾きを特定顔傾きに一致させ(すなわち平均ウィンドウAWを所定の点(例えば平均ウィンドウAWの重心)を中心として特定顔傾き分だけ時計回りに回転させ)、傾きを変化させた後の平均ウィンドウAWにより規定される画像領域が顔領域FAとして設定される(図11(c)参照)。
In step S370, when a plurality of windows SW that partially overlap each other with respect to a specific face inclination are stored, the
なお、図10に示したように、他のウィンドウSWと重複しない1つのウィンドウSWが記憶された場合にも、図11に示した互いに一部が重複する複数のウィンドウSWが記憶された場合と同様に、1つのウィンドウSW自身が平均ウィンドウAWであると解釈することも可能である。 As shown in FIG. 10, even when one window SW not overlapping with other windows SW is stored, a plurality of windows SW partially overlapping each other shown in FIG. 11 are stored. Similarly, one window SW itself can be interpreted as the average window AW.
本実施例では、学習の際に用いられる顔サンプル画像群(図9参照)に、基本顔サンプル画像FIoを1.2倍から0.8倍までの範囲の所定の倍率で拡大および縮小した画像(例えば図9における画像FIaおよびFIb)が含まれているため、ウィンドウSWの大きさに対する顔の画像の大きさが基本顔サンプル画像FIoと比べてわずかに大きかったり小さかったりする場合にも、顔領域FAが検出されうる。従って、本実施例では、ウィンドウSWのサイズとして上述した15個の離散的なサイズのみが設定されているが、あらゆる大きさの顔の画像について顔領域FAが検出されうる。同様に、本実施例では、学習の際に用いられる顔サンプル画像群に、基本顔サンプル画像FIoの顔傾きをプラスマイナス15度の範囲で変化させた画像(例えば図9における画像FIcおよびFId)が含まれているため、ウィンドウSWに対する顔の画像の傾きが基本顔サンプル画像FIoとはわずかに異なっている場合にも、顔領域FAが検出されうる。従って、本実施例では、特定顔傾きとして上述した12個の離散的な傾き値のみが設定されているが、あらゆる傾きの顔の画像について顔領域FAが検出されうる。 In this embodiment, an image obtained by enlarging and reducing the basic face sample image FIo at a predetermined magnification in the range from 1.2 times to 0.8 times in the face sample image group (see FIG. 9) used for learning. (For example, the images FIa and FIb in FIG. 9), the face image size is slightly larger or smaller than the basic face sample image FIo relative to the window SW size. The area FA can be detected. Therefore, in the present embodiment, only the 15 discrete sizes described above are set as the size of the window SW, but the face area FA can be detected for face images of any size. Similarly, in this embodiment, images obtained by changing the face inclination of the basic face sample image FIo within a range of plus or minus 15 degrees (for example, images FIc and FId in FIG. 9) are included in the face sample image group used for learning. Therefore, the face area FA can be detected even when the inclination of the face image with respect to the window SW is slightly different from the basic face sample image FIo. Therefore, in the present embodiment, only the 12 discrete inclination values described above are set as the specific face inclination, but the face area FA can be detected for face images having any inclination.
顔領域検出処理(図3のステップS140)において、顔領域FAが検出されなかった場合には(ステップS150:No)、被写体検出処理は終了する。一方、少なくとも1つの顔領域FAが検出された場合には(ステップS150:Yes)、検出された顔領域FAを対象に、ステップS110で検出被写体として設定され、かつ、同じく検出被写体として設定された人物の顔の構成要素である顔の器官について、顔の器官に対応する器官領域の検出(後述のステップS200)が行われる。画像処理部200(図1)は、器官領域検出の対象として、顔領域FAを1つ選択する(ステップS160)。 If the face area FA is not detected in the face area detection process (step S140 in FIG. 3) (step S150: No), the subject detection process ends. On the other hand, when at least one face area FA is detected (step S150: Yes), the detected face area FA is set as the detection subject in step S110 and is also set as the detection subject. For a facial organ that is a constituent element of a person's face, an organ region corresponding to the facial organ is detected (step S200 described later). The image processing unit 200 (FIG. 1) selects one face area FA as an organ area detection target (step S160).
ステップS170(図3)では、画像選択部240(図1)が、選択された顔領域FAのサイズ(以下「顔領域サイズSd」とも呼ぶ)と、サイズ規定テーブルSPT(図2)によって顔の器官に対応付けられた必要顔領域サイズSnと、を比較する。顔領域サイズSdは、図10(b)および図11(c)に示すように、顔領域FAを規定する正方形形状のウィンドウSWの1辺の長さである。また、図2に示すように、顔の器官に対応付けられた必要顔領域サイズSnは60画素である。画像選択部240は、顔領域サイズSdが必要顔領域サイズSn以上である場合には(ステップS170:Yes)、顔検出用画像FDImg上の顔領域FAにおいて顔の器官の画像の検出を行うことが可能であるとして、器官領域検出に使用される画像として顔検出用画像FDImgを選択する(ステップS180)。
In step S170 (FIG. 3), the image selection unit 240 (FIG. 1) uses the size of the selected face area FA (hereinafter also referred to as “face area size Sd”) and the size definition table SPT (FIG. 2) to determine the face shape. The required face area size Sn associated with the organ is compared. As shown in FIGS. 10B and 11C, the face area size Sd is the length of one side of a square-shaped window SW that defines the face area FA. Further, as shown in FIG. 2, the necessary face area size Sn associated with the facial organ is 60 pixels. When the face area size Sd is equal to or larger than the necessary face area size Sn (step S170: Yes), the
一方、顔領域サイズSdが必要顔領域サイズSnより小さい場合には(ステップS170:No)、画像選択部240は、顔検出用画像FDImg上の顔領域FAにおいて顔の器官の画像の検出を行うことは不可能であるとして、器官領域検出に使用される画像として、顔検出用画像FDImgよりもサイズの大きい高解像画像の1つを選択する(ステップS190)。具体的には、画像選択部240は、検出用画像データ群(図5)に含まれる高解像度画像の内、顔検出用画像FDImg上の顔領域FAに対応する高解像度画像上の領域(以下「対応顔領域FAc」とも呼ぶ)のサイズ(以下「対応顔領域サイズSdc」とも呼ぶ)が必要顔領域サイズSn以上となる限りにおいて最小サイズの高解像度画像を選択する。例えば、図5に示すQVGAのサイズを有する顔検出用画像FDImg上の顔領域サイズSdが40画素である場合には、顔領域サイズSdは顔の器官に対応付けられた必要顔領域サイズSn(=60画素、図2参照)より小さいと判定される。このとき、VGAのサイズを有する高解像度画像Iv(図5)上の対応顔領域FAcのサイズ(対応顔領域サイズSdc)は80画素であり、必要顔領域サイズSn以上となる。そのため、この場合には、画像選択部240は、器官領域検出に使用される画像として、VGAのサイズを有する高解像度画像Ivを選択する。
On the other hand, when the face area size Sd is smaller than the required face area size Sn (step S170: No), the
ステップS200(図3)では、画像検出部210(図1)が、器官領域検出処理を行う。器官領域検出処理は、顔領域FAまたは対応顔領域FAcにおける顔の器官に対応する画像領域を器官領域として検出する処理である。上述したように、本実施例では、顔の器官の種類として、右目と左目と口との3種類が設定されており、器官領域検出処理では、右目に対応する右目領域EA(r)と、左目に対応する左目領域EA(l)と、口に対応する口領域MAと、の検出が行われる。 In step S200 (FIG. 3), the image detection unit 210 (FIG. 1) performs an organ region detection process. The organ area detection process is a process for detecting an image area corresponding to a facial organ in the face area FA or the corresponding face area FAc as an organ area. As described above, in this embodiment, three types of the right eye, the left eye, and the mouth are set as the types of facial organs. In the organ region detection process, the right eye region EA (r) corresponding to the right eye, The left eye area EA (l) corresponding to the left eye and the mouth area MA corresponding to the mouth are detected.
図12は、器官領域検出処理の流れを示すフローチャートである。また、図13は、器官領域検出処理の概要を示す説明図である。図13の最上段には、図3のステップS180で選択された顔検出用画像FDImgの一例と、図3のステップS190で選択された高解像度画像Ivの一例と、を示している。 FIG. 12 is a flowchart showing the flow of the organ region detection process. FIG. 13 is an explanatory diagram showing an outline of the organ region detection process. 13 shows an example of the face detection image FDImg selected in step S180 of FIG. 3 and an example of the high resolution image Iv selected in step S190 of FIG.
器官領域検出処理(図12)のステップS510では、画像検出部210(図1)が、器官検出用画像ODImgを生成する。図13に示すように、ステップS180で顔検出用画像FDImgが選択された場合には、画像検出部210は、顔検出用画像FDImgの画像データのトリミング、アフィン変換を行うことにより、顔領域FAの傾きを0度に設定した画像を器官検出用画像ODImgとして生成する。また、ステップS190で高解像度画像Ivが選択された場合には、画像検出部210は、高解像度画像Ivの画像データのトリミング、アフィン変換を行うことにより、対応顔領域FAcの傾きを0度に設定した画像を器官検出用画像ODImgとして生成する。器官検出用画像ODImgはこのように生成されるため、器官検出用画像ODImgのサイズ(画像の1辺の長さ)は、サイズ規定テーブルSPT(図2)に規定された顔の器官に対応付けられた必要顔領域サイズSn以上となる。 In step S510 of the organ region detection process (FIG. 12), the image detection unit 210 (FIG. 1) generates an organ detection image ODImg. As illustrated in FIG. 13, when the face detection image FDImg is selected in step S180, the image detection unit 210 performs trimming and affine transformation of the image data of the face detection image FDImg, thereby performing the face area FA. An image with the inclination of 0 set to 0 degree is generated as an organ detection image ODImg. When the high-resolution image Iv is selected in step S190, the image detection unit 210 performs the trimming and affine transformation of the image data of the high-resolution image Iv, thereby setting the inclination of the corresponding face area FAc to 0 degrees. The set image is generated as an organ detection image ODImg. Since the organ detection image ODImg is generated in this way, the size (length of one side of the image) of the organ detection image ODImg is associated with the facial organ defined in the size definition table SPT (FIG. 2). The required face area size Sn or larger is obtained.
器官検出用画像ODImgからの器官領域の検出は、上述した顔検出用画像FDImgからの顔領域FAの検出と同様に行われる。すなわち、図13に示すように、矩形形状のウィンドウSWがそのサイズおよび位置が変更されつつ器官検出用画像ODImg上に配置され(図12のステップS520,S530,S580〜S610)、配置されたウィンドウSWにより規定される画像領域が顔の器官に対応する器官領域であるか否かの判定(以下「器官判定」とも呼ぶ)の対象となる判定対象画像領域JIAとして設定される(図12のステップS540)。なお、ウィンドウSWの取り得るサイズおよび位置は、器官検出用画像ODImgのサイズに基づき決定される。例えば、ウィンドウSWの横方向の長さとして取り得る値は、器官検出用画像ODImgの横方向の長さを所定数倍して得られる最大サイズから最小サイズまでの間の所定数段階の値に設定される。 The detection of the organ area from the organ detection image ODImg is performed in the same manner as the detection of the face area FA from the face detection image FDImg described above. That is, as shown in FIG. 13, a rectangular window SW is arranged on the organ detection image ODImg while changing its size and position (steps S520, S530, S580 to S610 in FIG. 12), and the arranged windows An image area defined by SW is set as a determination target image area JIA that is a target of determination as to whether or not it is an organ area corresponding to a facial organ (hereinafter also referred to as “organ determination”) (step of FIG. 12). S540). Note that the possible size and position of the window SW are determined based on the size of the organ detection image ODImg. For example, the value that can be taken as the horizontal length of the window SW is a value in a predetermined number of steps from the maximum size to the minimum size obtained by multiplying the horizontal length of the organ detection image ODImg by a predetermined number. Is set.
判定対象画像領域JIAが設定されると、顔器官学習データOLD(図1)を用いて、器官(右目、左目、口)毎に、器官判定に用いられる累計評価値Tvが算出される(図12のステップS550)。累計評価値Tvの算出や器官判定に用いられるフィルタXの態様や閾値thX、重み係数WeX、閾値TH(図8参照)は、顔器官学習データOLDに規定されている。なお、顔器官学習データOLDの設定のための学習は、顔学習データFLDの設定のための学習と同様に、顔の器官に対応する画像であることが予めわかっている複数の器官サンプル画像によって構成された器官サンプル画像群と、顔の器官に対応する画像ではないことが予めわかっている複数の非器官サンプル画像によって構成された非器官サンプル画像群と、を用いて実行される。 When the determination target image area JIA is set, a cumulative evaluation value Tv used for organ determination is calculated for each organ (right eye, left eye, mouth) using the facial organ learning data OLD (FIG. 1) (FIG. 1). 12 step S550). The aspect of the filter X, the threshold thX, the weighting coefficient WeX, and the threshold TH (see FIG. 8) used for calculation of the cumulative evaluation value Tv and organ determination are defined in the facial organ learning data OLD. Note that the learning for setting the facial organ learning data OLD is performed by using a plurality of organ sample images that are known in advance to be images corresponding to the facial organs, similarly to the learning for setting the facial learning data FLD. It is executed using the constructed organ sample image group and the non-organ sample image group composed of a plurality of non-organ sample images that are known in advance not to correspond to facial organs.
なお、顔領域検出処理(図6)においては、累計評価値Tvの算出および顔判定が、すべての特定顔傾きについて実行されるのに対し、器官領域検出処理(図12)では、累計評価値Tvの算出および器官判定が、0度の器官傾きに対応する顔器官学習データOLDを用いて、0度の器官傾きについてのみ実行される。これは、顔の器官の傾きは、顔全体の傾きに概ね一致するものと考えられるからである。ただし、器官領域の検出においても、所定の傾き毎に累計評価値Tvが算出され、所定の傾き毎に器官判定が行われるものとしてもよい。 In the face area detection process (FIG. 6), calculation of the cumulative evaluation value Tv and face determination are executed for all specific face inclinations, whereas in the organ area detection process (FIG. 12), the cumulative evaluation value The calculation of Tv and the organ determination are performed only for the 0 degree organ inclination using the facial organ learning data OLD corresponding to the 0 degree organ inclination. This is because the inclination of the organ of the face is considered to substantially match the inclination of the entire face. However, in the detection of the organ region, the cumulative evaluation value Tv may be calculated for each predetermined inclination, and the organ determination may be performed for each predetermined inclination.
器官毎に算出された累計評価値Tvが所定の閾値TH以上である場合には、判定対象画像領域JIAは顔の当該器官の画像に対応する画像領域であるとして、判定対象画像領域JIAの位置、すなわち現在設定されているウィンドウSWの座標が記憶される(図12のステップS570)。一方、累計評価値Tvが閾値THより小さい場合には、ステップS570の処理はスキップされる。ウィンドウSWの所定のサイズのすべてについて、ウィンドウSWにより器官検出用画像ODImg全体がスキャンされた後に、領域設定部214(図1)による器官領域設定処理(図12のステップS620)が実行される。器官領域設定処理は、顔領域設定処理(図11)と同様に、互いに一部が重複する複数のウィンドウSWが記憶された場合に、各ウィンドウSWにおける所定の点の座標の平均の座標を重心とし、各ウィンドウSWのサイズの平均のサイズを有する1つの新たなウィンドウ(平均ウィンドウAW)を設定し、平均ウィンドウAWにより規定される画像領域を器官領域として設定する処理である。 When the cumulative evaluation value Tv calculated for each organ is equal to or greater than a predetermined threshold TH, the determination target image area JIA is determined to be an image area corresponding to the image of the organ of the face, and the position of the determination target image area JIA That is, the coordinates of the currently set window SW are stored (step S570 in FIG. 12). On the other hand, when the cumulative evaluation value Tv is smaller than the threshold value TH, the process of step S570 is skipped. After the entire organ detection image ODImg is scanned by the window SW for all the predetermined sizes of the window SW, the organ region setting process (step S620 in FIG. 12) by the region setting unit 214 (FIG. 1) is executed. Similar to the face area setting process (FIG. 11), the organ area setting process uses the average coordinates of the coordinates of predetermined points in each window SW when a plurality of windows SW that partially overlap each other are stored. In this process, one new window (average window AW) having an average size of each window SW is set, and an image area defined by the average window AW is set as an organ area.
以上の処理により、器官検出用画像ODImgにおいて、右目に対応する画像領域である右目領域EA(r)と、左目に対応する画像領域である左目領域EA(l)と、口に対応する画像領域である口領域MAと、が検出される。 Through the above processing, in the organ detection image ODImg, the right eye area EA (r) that is an image area corresponding to the right eye, the left eye area EA (l) that is an image area corresponding to the left eye, and an image area corresponding to the mouth , Which is a mouth area MA.
ステップS210(図3)では、画像検出部210(図1)が、ステップS160において未だ選択されていない顔領域FAが存在するか否かを判定する。未だ選択されていない顔領域FAが存在すると判定された場合には(ステップS210:No)、ステップS160に戻って未選択の顔領域FAの1つが選択され、ステップS170以降の処理が実行される。一方、すべての顔領域FAが選択されたと判定された場合には(ステップS210:Yes)、処理はステップS220に進む。 In step S210 (FIG. 3), the image detection unit 210 (FIG. 1) determines whether there is a face area FA that has not yet been selected in step S160. If it is determined that there is an unselected face area FA (step S210: No), the process returns to step S160, and one of the unselected face areas FA is selected, and the processes after step S170 are executed. . On the other hand, if it is determined that all the face areas FA have been selected (step S210: Yes), the process proceeds to step S220.
ステップS220(図3)では、情報付加部250(図1)が、検出された顔領域FAおよび器官領域(右目領域EA(r)、左目領域EA(l)、口領域MA)の位置(座標)を示す情報を、原画像データを含む画像ファイルに付属情報として付加する。これにより、原画像OImgを表す原画像データと、原画像OImgにおける顔領域FAおよび器官領域の位置(座標)を示す情報と、が含まれた画像ファイルが生成される。 In step S220 (FIG. 3), the information adding unit 250 (FIG. 1) determines the position (coordinates) of the detected face area FA and organ area (right eye area EA (r), left eye area EA (l), mouth area MA). ) Is added as attached information to the image file including the original image data. Thereby, an image file including original image data representing the original image OImg and information indicating the positions (coordinates) of the face area FA and the organ area in the original image OImg is generated.
なお、上記説明においては、画像処理部200により実行される画像処理として顔変形が選択され、検出被写体として人物の顔と顔の器官とが設定されたものと想定したが、画像処理として他の処理(例えば笑顔検出)が選択された場合の被写体検出処理も同様に実行される。すなわち、画像処理として笑顔検出が選択された場合には、検出被写体として人物の顔と顔の器官と顔の輪郭と表情とが設定される。この場合にも、検出された顔領域FAについての顔領域サイズSdと各検出被写体に対応付けられた必要顔領域サイズSn(図2)とが比較され、検出用画像データ群の中から検出被写体の検出に用いられる画像データが選択される。
In the above description, it is assumed that face deformation is selected as the image processing executed by the
なお、笑顔検出は、顔領域FAから顔器官学習データOLD(図1)を用いて器官領域の検出を行うと共に、顔および顔の器官の輪郭検出を行い、表情データED(図1)を利用して口角の開き具合、鼻唇溝の有無、目尻の下がり具合等を総合的に評価することにより実行可能である。なお、笑顔検出の実行に必要な技術は、特開2004−178593号公報や、副島義貴著「場景変動を考慮した移動物体の追跡に関する研究」1998年2月15日等に記載されている。 Smile detection uses facial organ learning data OLD (FIG. 1) from facial area FA to detect the organ area, and also detects facial and facial organ contours and uses facial expression data ED (FIG. 1). Then, it can be performed by comprehensively evaluating the degree of opening of the mouth corner, the presence or absence of the nasal lip, the degree of lowering of the corners of the eyes, and the like. Techniques necessary for executing smile detection are described in Japanese Patent Application Laid-Open No. 2004-178593 and Yoshiki Soejima's “Research on Tracking of Moving Objects Considering Scene Change” February 15, 1998, and the like.
以上説明したように、本実施例のプリンタ100による被写体検出処理では、対象画像から検出すべき被写体の種類である検出被写体が設定され、対象画像を表す複数の互いにサイズの異なる画像データを含む検出用画像データ群が生成され、設定された検出被写体に基づき検出用画像データ群に含まれる1つの画像データが選択され、選択された画像データを用いた検出被写体に対応する画像の検出が実行される。そのため、本実施例のプリンタ100による被写体検出処理では、検出被写体の検出に適した画像データを選択して検出処理を実行することができるため、対象画像における特定の種類の被写体に対応する画像の検出処理の精度と処理時間との調和を図ることができる。
As described above, in the subject detection process by the
より具体的には、本実施例のプリンタ100による被写体検出処理では、人物の顔の構成要素である顔の器官に対応する器官領域の検出は顔領域FAを対象に実行され、検出被写体(顔の器官)と検出被写体に対応する画像を検出するために必要な顔領域のサイズである必要顔領域サイズSnとを対応付けるサイズ規定テーブルSPTに基づき、器官領域の検出に用いられる画像データが選択される。例えば、顔領域FAの検出に顔検出用画像FDImgの画像データが用いられ、顔検出用画像FDImg上の顔領域FAのサイズが顔の器官に対応付けられた必要顔領域サイズSnより小さい場合には、顔検出用画像FDImgのサイズよりも大きいサイズの高解像度画像(図5のIvまたはIx)の画像データが器官領域の検出に用いられる。そのため、本実施例のプリンタ100による被写体検出処理では、検出被写体の検出に適した画像データを選択して検出処理を実行することができるため、対象画像における特定の種類の被写体に対応する画像の検出処理の精度と処理時間との調和を図ることができる。
More specifically, in subject detection processing by the
B.変形例:
なお、この発明は上記の実施例や実施形態に限られるものではなく、その要旨を逸脱しない範囲において種々の態様において実施することが可能であり、例えば次のような変形も可能である。
B. Variations:
The present invention is not limited to the above-described examples and embodiments, and can be implemented in various modes without departing from the gist thereof. For example, the following modifications are possible.
B1.変形例1:
上記実施例におけるサイズ規定テーブルSPTの態様はあくまで一例であり、サイズ規定テーブルSPTの態様は種々変形可能である。図14は、サイズ規定テーブルの変形例を示す説明図である。図14に示したサイズ規定テーブルSPTaは、検出被写体(検出対象)と、検出被写体の検出に用いられる画像データのサイズと、を対応付けている。このようなサイズ規定テーブルSPTaを用いても、検出被写体の検出に適した画像データを選択して検出処理を実行することができるため、対象画像における特定の種類の被写体に対応する画像の検出処理の精度と処理時間との調和を図ることができる。
B1. Modification 1:
The aspect of the size defining table SPT in the above embodiment is merely an example, and the aspect of the size defining table SPT can be variously modified. FIG. 14 is an explanatory diagram showing a modification of the size defining table. The size defining table SPTa shown in FIG. 14 associates the detected subject (detection target) with the size of the image data used for detecting the detected subject. Even when such a size defining table SPTa is used, it is possible to select image data suitable for detection of the detected subject and execute the detection processing. Therefore, detection processing of an image corresponding to a specific type of subject in the target image The accuracy and the processing time can be harmonized.
B2.変形例2:
上記実施例における検出被写体の例や必要顔領域サイズSn(図2参照)はあくまで一例であり、検出被写体として他の被写体の種類(例えば動物や植物、建物や乗り物)が設定されるとしてもよいし、必要顔領域サイズSnとして他の値が設定されてもよい。また、検出被写体は、必ずしも実行される画像処理に基づき設定される必要はなく、例えばユーザからの直接の指示に応じて検出被写体が設定されるとしてもよい。また、上記実施例において説明した画像処理と検出被写体との関係はあくまで一例であり、種々変形可能である。例えば、実行される画像処理として顔変形が選択された場合に、人物の顔と顔の器官とに加え、顔および顔の器官の輪郭が検出被写体として設定されるものとしてもよい。
B2. Modification 2:
The example of the detected subject and the necessary face area size Sn (see FIG. 2) in the above embodiment are merely examples, and other types of subjects (for example, animals, plants, buildings, and vehicles) may be set as the detected subject. However, other values may be set as the necessary face area size Sn. Further, the detected subject is not necessarily set based on the image processing to be executed, and the detected subject may be set according to a direct instruction from the user, for example. Further, the relationship between the image processing and the detected subject described in the above embodiments is merely an example, and various modifications can be made. For example, when face deformation is selected as the image processing to be executed, in addition to the human face and the facial organ, the face and the contour of the facial organ may be set as the detection subject.
B3.変形例3:
上記実施例における検出用画像データ群の構成はあくまで一例であり、検出用画像データ群が4種類以上のサイズの画像データを含むとしてもよいし、2種類のみのサイズの画像データを含むとしてもよい。また、検出用画像データ群に含まれる画像データのサイズは、図5に示した例に限られず、種々変形可能である。
B3. Modification 3:
The configuration of the detection image data group in the above embodiment is merely an example, and the detection image data group may include image data of four or more sizes, or may include image data of only two types of sizes. Good. The size of the image data included in the detection image data group is not limited to the example shown in FIG. 5 and can be variously modified.
B4.変形例4:
上記実施例では、顔学習データFLDや顔器官学習データOLDが、正面向きの画像に対応するもののみが準備されているが、右向きや左向きに対応するものが準備され、右向きや左向きの顔の画像や顔の器官の画像に対応する顔領域や器官領域の検出が行われるとしてもよい。
B4. Modification 4:
In the above embodiment, only the face learning data FLD and the facial organ learning data OLD corresponding to the front-facing image are prepared, but those corresponding to the right and left directions are prepared, and the face learning data FLD and the face organ learning data OLD are prepared. Detection of a face area or an organ area corresponding to an image or an image of a facial organ may be performed.
B5.変形例5:
上記実施例における顔領域検出処理(図6)や器官領域検出処理(図12)の態様はあくまで一例であり、種々変更可能である。例えば顔検出用画像FDImg(図7参照)のサイズは320画素×240画素に限られず、他のサイズであってもよいし、原画像OImgそのものを顔検出用画像FDImgとして用いることも可能である。また、使用されるウィンドウSWのサイズやウィンドウSWの移動方向および移動量(移動ピッチ)は上述したものに限られない。また、上記実施例では、顔検出用画像FDImgのサイズが固定され、複数種類のサイズのウィンドウSWが顔検出用画像FDImg上に配置されることにより複数サイズの判定対象画像領域JIAが設定されているが、複数種類のサイズの顔検出用画像FDImgが生成され、固定サイズのウィンドウSWが顔検出用画像FDImg上に配置されることにより複数サイズの判定対象画像領域JIAが設定されるものとしてもよい。
B5. Modification 5:
The aspects of the face area detection process (FIG. 6) and the organ area detection process (FIG. 12) in the above embodiment are merely examples, and various changes can be made. For example, the size of the face detection image FDImg (see FIG. 7) is not limited to 320 pixels × 240 pixels, and may be other sizes, or the original image OImg itself can be used as the face detection image FDImg. . Further, the size of the window SW used, the moving direction and the moving amount (moving pitch) of the window SW are not limited to those described above. In the above-described embodiment, the size of the face detection image FDImg is fixed, and a plurality of sizes of window SW are arranged on the face detection image FDImg, so that the determination target image area JIA having a plurality of sizes is set. However, a plurality of types of face detection images FDImg are generated, and a fixed-size window SW is arranged on the face detection image FDImg so that a determination target image area JIA having a plurality of sizes is set. Good.
また、上記実施例では、累計評価値Tvを閾値THと比較することにより顔判定および器官判定を行っているが(図8参照)、顔判定および器官判定を複数の判別器を用いた判別等の他の方法によって行ってもよい。顔判定および器官判定の方法に応じて、顔学習データFLDおよび顔器官学習データOLDの設定に用いられる学習方法も変更される。また、顔判定および器官判定は、必ずしも学習を用いた判別方法により行われる必要はなく、パターンマッチング等の他の方法により行われるとしてもよい。 In the above-described embodiment, the face evaluation and the organ determination are performed by comparing the cumulative evaluation value Tv with the threshold value TH (see FIG. 8), but the face determination and the organ determination are performed using a plurality of discriminators. Other methods may be used. The learning method used for setting the face learning data FLD and the facial organ learning data OLD is also changed according to the face determination and organ determination methods. Further, the face determination and the organ determination are not necessarily performed by a determination method using learning, and may be performed by other methods such as pattern matching.
また、上記実施例では、30度刻みの12種類の特定顔傾きが設定されているが、より多くの種類の特定顔傾きが設定されてもよいし、より少ない種類の特定顔傾きが設定されてもよい。また、必ずしも特定顔傾きが設定される必要はなく、0度の顔傾きについての顔判定が行われるとしてもよい。また、上記実施例では、顔サンプル画像群に基本顔サンプル画像を拡大・縮小した画像や回転させた画像が含まれるとしているが、顔サンプル画像群に必ずしもこのような画像が含まれる必要はない。 In the above embodiment, 12 types of specific face inclinations in increments of 30 degrees are set. However, more types of specific face inclinations may be set, or fewer types of specific face inclinations are set. May be. In addition, the specific face inclination does not necessarily need to be set, and face determination may be performed for a 0 degree face inclination. In the above embodiment, the face sample image group includes an image obtained by enlarging or reducing the basic face sample image or a rotated image. However, the face sample image group does not necessarily include such an image. .
上記実施例において、あるサイズのウィンドウSWにより規定される判定対象画像領域JIAについての顔判定(または器官判定)で顔の画像(または顔の器官の画像)に対応する画像領域であると判定された場合には、当該サイズより所定の比率以上小さいサイズのウィンドウSWを配置する場合には、顔の画像に対応する画像領域であると判定された判定対象画像領域JIAを避けて配置するものとしてもよい。このようにすれば、処理の高速化を図ることができる。 In the above embodiment, the face determination (or organ determination) for the determination target image area JIA defined by the window SW of a certain size is determined to be an image area corresponding to the face image (or facial organ image). In the case where the window SW having a size smaller than the size by a predetermined ratio or more is arranged, it is assumed that the window SW is arranged avoiding the determination target image area JIA determined to be the image area corresponding to the face image. Also good. In this way, the processing speed can be increased.
上記実施例では、メモリカードMCに格納された画像データが原画像データに設定されているが、原画像データはメモリカードMCに格納された画像データに限らず、例えばネットワークを介して取得された画像データであってもよい。 In the above embodiment, the image data stored in the memory card MC is set as the original image data. However, the original image data is not limited to the image data stored in the memory card MC, and is acquired via a network, for example. It may be image data.
上記実施例では、顔の器官の種類として、右目と左目と口とが設定されており、器官領域として、右目領域EA(r)と左目領域EA(l)と口領域MAとの検出が行われるが、顔の器官の種類として顔のどの器官を設定するかは変更可能である。例えば、顔の器官の種類として、右目と左目と口とのいずれか1つまたは2つのみが設定されるとしてもよい。また、顔の器官の種類として、右目と左目と口とに加えて、または右目と左目と口との少なくとも1つに代わり、顔のその他の器官の種類(例えば鼻や眉)が設定され、器官領域としてこのような器官の画像に対応する領域が検出されるとしてもよい。 In the above embodiment, the right eye, the left eye, and the mouth are set as the types of facial organs, and the right eye area EA (r), the left eye area EA (l), and the mouth area MA are detected as organ areas. However, it is possible to change which organ of the face is set as the type of facial organ. For example, only one or two of the right eye, the left eye, and the mouth may be set as the types of facial organs. In addition to the right eye, left eye, and mouth, or instead of at least one of the right eye, left eye, and mouth, other organ types of the face (for example, nose or eyebrows) are set as the facial organ types, An area corresponding to such an organ image may be detected as the organ area.
上記実施例では、顔領域FAおよび器官領域は矩形の領域であるが、顔領域FAおよび器官領域は矩形以外の形状の領域であってもよい。 In the above embodiment, the face area FA and the organ area are rectangular areas, but the face area FA and the organ area may be areas having shapes other than the rectangle.
上記実施例では、画像処理装置としてのプリンタ100による被写体検出処理を説明したが、処理の一部または全部がパーソナルコンピュータやデジタルスチルカメラ、デジタルビデオカメラ等の他の種類の画像処理装置により実行されるものとしてもよい。また、プリンタ100はインクジェットプリンタに限らず、他の方式のプリンタ、例えばレーザプリンタや昇華型プリンタであるとしてもよい。
In the above embodiment, the subject detection process by the
上記実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部をハードウェアに置き換えるようにしてもよい。 In the above embodiment, a part of the configuration realized by hardware may be replaced with software, and conversely, a part of the configuration realized by software may be replaced by hardware.
また、本発明の機能の一部または全部がソフトウェアで実現される場合には、そのソフトウェア(コンピュータプログラム)は、コンピュータ読み取り可能な記録媒体に格納された形で提供することができる。この発明において、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスクやCD−ROMのような携帯型の記録媒体に限らず、各種のRAMやROM等のコンピュータ内の内部記憶装置や、ハードディスク等のコンピュータに固定されている外部記憶装置も含んでいる。 In addition, when part or all of the functions of the present invention are realized by software, the software (computer program) can be provided in a form stored in a computer-readable recording medium. In the present invention, the “computer-readable recording medium” is not limited to a portable recording medium such as a flexible disk or a CD-ROM, but an internal storage device in a computer such as various RAMs and ROMs, a hard disk, and the like. An external storage device fixed to the computer is also included.
100…プリンタ
110…CPU
120…内部メモリ
140…操作部
150…表示部
160…プリンタエンジン
170…カードインターフェース
172…カードスロット
200…画像処理部
210…画像検出部
211…判定対象設定部
212…評価値算出部
213…判定部
214…領域設定部
220…検出被写体設定部
230…検出用画像データ群生成部
240…画像選択部
250…情報付加部
310…表示処理部
320…印刷処理部
100 ...
DESCRIPTION OF
Claims (8)
対象画像から検出すべき被写体の種類である検出被写体を設定する検出被写体設定部と、
前記対象画像を表す複数の互いにサイズの異なる画像データを含む画像データ群を取得する画像データ群取得部と、
設定された前記検出被写体に基づき、前記画像データ群に含まれる1つの前記画像データを選択する画像選択部と、
選択された前記画像データを用いて、設定された前記検出被写体に対応する画像を検出する画像検出部と、を備える、画像処理装置。 An image processing apparatus,
A detection subject setting unit that sets a detection subject that is a type of subject to be detected from the target image;
An image data group acquisition unit for acquiring an image data group including a plurality of image data of different sizes representing the target image;
An image selection unit that selects one of the image data included in the image data group based on the set detection subject;
An image detection apparatus comprising: an image detection unit that detects an image corresponding to the set detection subject using the selected image data.
前記検出被写体は、人物の顔と人物の顔の構成要素とを含み、
前記画像検出部は、前記対象画像上における検出された人物の顔に対応する画像領域である顔領域を対象に、人物の顔の構成要素に対応する画像の検出を行い、
前記画像選択部は、人物の顔の構成要素と、人物の顔の構成要素に対応する画像を検出するために必要な前記顔領域のサイズである必要顔領域サイズと、を対応付けるサイズ規定情報を有すると共に、前記サイズ規定情報に基づき人物の顔の構成要素に対応する画像の検出に用いられる前記画像データを選択する、画像処理装置。 The image processing apparatus according to claim 1,
The detected subject includes a human face and a human face component;
The image detection unit detects an image corresponding to a constituent element of a person's face for a face area that is an image area corresponding to the detected person's face on the target image;
The image selection unit includes size defining information that associates a component of a person's face with a necessary face region size that is a size of the face region necessary for detecting an image corresponding to the component of the person's face. And an image processing device that selects the image data used for detecting an image corresponding to a constituent element of a person's face based on the size defining information.
前記画像選択部は、人物の顔に対応する画像の検出に用いられる前記画像データとして第1のサイズの前記画像データが選択され、前記第1のサイズの前記画像データの表す前記対象画像上の前記顔領域のサイズが、人物の顔の構成要素に対応付けられた前記必要顔領域サイズより小さい場合には、人物の顔の構成要素に対応する画像の検出に用いられる前記画像データとして前記第1のサイズよりも大きい第2のサイズの前記画像データを選択する、画像処理装置。 The image processing apparatus according to claim 2,
The image selection unit selects the image data having a first size as the image data used for detecting an image corresponding to a person's face, and on the target image represented by the image data having the first size. When the size of the face area is smaller than the required face area size associated with a human face component, the image data used for detection of an image corresponding to the human face component is the first image data. An image processing apparatus that selects the image data having a second size larger than the size of one.
前記検出被写体は、人物の顔と人物の顔の構成要素とを含み、
前記画像選択部は、人物の顔に対応する画像の検出に用いられる前記画像データとして第1のサイズの前記画像データを選択し、人物の顔の構成要素に対応する画像の検出に用いられる前記画像データとして前記第1のサイズよりも大きい第2のサイズの前記画像データを選択する、画像処理装置。 The image processing apparatus according to claim 1,
The detected subject includes a human face and a human face component;
The image selection unit selects the image data having a first size as the image data used for detecting an image corresponding to a person's face, and is used for detecting an image corresponding to a constituent element of the person's face. An image processing apparatus that selects the image data having a second size larger than the first size as image data.
前記人物の顔の構成要素は、顔の器官と、顔の輪郭と、顔の表情と、の少なくとも1つである、画像処理装置。 An image processing apparatus according to any one of claims 2 to 4,
The human face component is at least one of a facial organ, a facial contour, and a facial expression.
前記顔の器官は、右目と左目と口との少なくとも1つである、画像処理装置。 The image processing apparatus according to claim 5,
The image processing apparatus, wherein the facial organ is at least one of a right eye, a left eye, and a mouth.
(a)対象画像から検出すべき被写体の種類である検出被写体を設定する工程と、
(b)前記対象画像を表す複数の互いにサイズの異なる画像データを含む画像データ群を取得する工程と、
(c)設定された前記検出被写体に基づき、前記画像データ群に含まれる1つの前記画像データを選択する工程と、
(d)選択された前記画像データを用いて、設定された前記検出被写体に対応する画像を検出する工程と、を備える、画像処理方法。 An image processing method comprising:
(A) setting a detected subject that is a type of subject to be detected from the target image;
(B) obtaining a group of image data including a plurality of image data having different sizes representing the target image;
(C) selecting one of the image data included in the image data group based on the set detected subject;
(D) using the selected image data, detecting an image corresponding to the set detection subject, and an image processing method.
対象画像から検出すべき被写体の種類である検出被写体を設定する検出被写体設定機能と、
前記対象画像を表す複数の互いにサイズの異なる画像データを含む画像データ群を取得する画像データ群取得機能と、
設定された前記検出被写体に基づき、前記画像データ群に含まれる1つの前記画像データを選択する画像選択機能と、
選択された前記画像データを用いて、設定された前記検出被写体に対応する画像を検出する画像検出機能と、を、コンピュータに実現させる、コンピュータプログラム。 A computer program for image processing,
A detection subject setting function for setting a detection subject that is a type of subject to be detected from the target image;
An image data group acquisition function for acquiring an image data group including a plurality of image data of different sizes representing the target image;
An image selection function for selecting one of the image data included in the image data group based on the set detection subject;
The computer program which makes a computer implement | achieve the image detection function which detects the image corresponding to the set said to-be-detected object using the selected said image data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008079231A JP2009237615A (en) | 2008-03-25 | 2008-03-25 | Detection of image of photographic subject of specific kind in target image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008079231A JP2009237615A (en) | 2008-03-25 | 2008-03-25 | Detection of image of photographic subject of specific kind in target image |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009237615A true JP2009237615A (en) | 2009-10-15 |
Family
ID=41251533
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008079231A Withdrawn JP2009237615A (en) | 2008-03-25 | 2008-03-25 | Detection of image of photographic subject of specific kind in target image |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009237615A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004240622A (en) * | 2003-02-05 | 2004-08-26 | Konica Minolta Holdings Inc | Image processing method, image processor and image processing program |
JP2005149217A (en) * | 2003-11-17 | 2005-06-09 | Noritsu Koki Co Ltd | Method and device for image processing, and photo processing device |
JP2007087346A (en) * | 2005-09-26 | 2007-04-05 | Canon Inc | Information processing device, control method therefor, computer program, and memory medium |
-
2008
- 2008-03-25 JP JP2008079231A patent/JP2009237615A/en not_active Withdrawn
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004240622A (en) * | 2003-02-05 | 2004-08-26 | Konica Minolta Holdings Inc | Image processing method, image processor and image processing program |
JP2005149217A (en) * | 2003-11-17 | 2005-06-09 | Noritsu Koki Co Ltd | Method and device for image processing, and photo processing device |
JP2007087346A (en) * | 2005-09-26 | 2007-04-05 | Canon Inc | Information processing device, control method therefor, computer program, and memory medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2009237619A (en) | Detection of face area and organ area in image | |
JP5239625B2 (en) | Image processing apparatus, image processing method, and image processing program | |
US20100202696A1 (en) | Image processing apparatus for detecting coordinate position of characteristic portion of face | |
US8249312B2 (en) | Image processing device and image processing method | |
JP2010191592A (en) | Image processing apparatus for detecting coordinate position of characteristic portion of face | |
US20090028390A1 (en) | Image Processing for Estimating Subject Distance | |
US8781258B2 (en) | Image processing apparatus and image processing method | |
JP2009211450A (en) | Image processing apparatus, image processing method, and computer program for image processing | |
US20090285457A1 (en) | Detection of Organ Area Corresponding to Facial Organ Image in Image | |
JP4957607B2 (en) | Detection of facial regions in images | |
JP2011053942A (en) | Apparatus, method and program for processing image | |
US8031915B2 (en) | Image processing device and image processing method | |
JP2010282339A (en) | Image processor for correcting position of pupil in eye, image processing method, image processing program and printer | |
JP2010244251A (en) | Image processor for detecting coordinate position for characteristic site of face | |
JP2010170184A (en) | Specifying position of characteristic portion of face image | |
JP2010176314A (en) | Image processor for detecting coordinate position of characteristic site of face | |
JP4985510B2 (en) | Set the face area corresponding to the face image in the target image | |
JP2009282699A (en) | Detection of organ area corresponding to image of organ of face in image | |
JP2010271955A (en) | Image processing apparatus, image processing method, image processing program, and printer | |
JP2009237857A (en) | Setting of organ area corresponding to facial organ image in image | |
JP2009237618A (en) | Detection of face area in image | |
JP2009237615A (en) | Detection of image of photographic subject of specific kind in target image | |
JP4957608B2 (en) | Detection of facial regions in images | |
JP2010245721A (en) | Face image processing | |
JP2009217607A (en) | Calculation for reliability in detecting face region in image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110216 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20111201 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20111206 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120127 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120221 |
|
A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20120330 |