JP2009237613A - Detection of face area corresponding to face image from target image - Google Patents

Detection of face area corresponding to face image from target image Download PDF

Info

Publication number
JP2009237613A
JP2009237613A JP2008079224A JP2008079224A JP2009237613A JP 2009237613 A JP2009237613 A JP 2009237613A JP 2008079224 A JP2008079224 A JP 2008079224A JP 2008079224 A JP2008079224 A JP 2008079224A JP 2009237613 A JP2009237613 A JP 2009237613A
Authority
JP
Japan
Prior art keywords
image
face
organ
area
region
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2008079224A
Other languages
Japanese (ja)
Inventor
Kenji Matsuzaka
健治 松坂
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2008079224A priority Critical patent/JP2009237613A/en
Publication of JP2009237613A publication Critical patent/JP2009237613A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To improve detection accuracy related to a position and an inclination of a face area while speeding up detection process of the face area. <P>SOLUTION: An image processing apparatus includes: a face area detecting unit for detecting a face area corresponding to an image of a face in a target image represented by target image data; an organ area detecting unit for detecting an organ area corresponding to a facial organ image in the detected face area; and a face inclination estimating unit for estimating an inclination in a face image plane indicated by the face area on the basis of the detection result of the organ area. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、対象画像からの顔の画像に対応する顔領域の検出に関する。   The present invention relates to detection of a face area corresponding to a face image from a target image.

画像データの表す画像中から部分画像を順次切り出し、切り出した部分画像が顔に対応する画像であるか否かを判定することにより、画像中から顔の画像に対応する顔領域を検出する技術が知られている(例えば特許文献1ないし4)。   A technique for detecting a face area corresponding to a face image from an 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. Known (for example, Patent Documents 1 to 4).

特開2003−256834号公報JP 2003-256834 A 特開2003−281539号公報JP 2003-281539 A 特開2006−065640号公報JP 2006-065640 A 特開2005−025748号公報JP 2005-025748 A

対象画像からの顔領域の検出においては、処理の高速化を図りつつ、顔領域の位置や傾きに関する検出精度を向上させることが望まれていた。   In detecting a face area from a target image, it has been desired to improve the detection accuracy regarding the position and inclination of the face area while increasing the processing speed.

本発明は、上記の課題を解決するためになされたものであり、顔領域検出処理の高速化を図りつつ、顔領域の位置や傾きに関する検出精度を向上させることを可能とする技術を提供することを目的とする。   The present invention has been made to solve the above-described problems, and provides a technique capable of improving the detection accuracy related to the position and inclination of the face area while increasing the speed of the face area detection process. For the purpose.

上記課題の少なくとも一部を解決するために、本発明は、以下の形態または適用例として実現することが可能である。   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]画像処理装置であって、
対象画像データの表す対象画像における顔の画像に対応する顔領域の検出を行う顔領域検出部と、
検出された前記顔領域における顔の器官の画像に対応する器官領域の検出を行う器官領域検出部と、
前記器官領域の検出結果に基づき、前記顔領域に表された顔の画像面内における傾きを推定する顔傾き推定部と、を備える、画像処理装置。
Application Example 1 An image processing apparatus,
A face area detection unit that detects a face area corresponding to a face image in the target image represented by the target image data;
An organ region detector for detecting an organ region corresponding to an image of a facial organ in the detected face region;
An image processing apparatus comprising: a face inclination estimation unit that estimates an inclination in an image plane of a face represented in the face area based on a detection result of the organ area.

この画像処理装置では、対象画像データの表す対象画像における顔の画像に対応する顔領域の検出が行われ、検出された顔領域における顔の器官の画像に対応する器官領域の検出が行われ、器官領域の検出結果に基づき顔領域に表された顔の画像面内における傾きが推定されるため、顔領域検出処理の高速化を図りつつ、顔領域の位置や傾きに関する検出精度を向上させることができる。   In this image processing apparatus, a face area corresponding to the face image in the target image represented by the target image data is detected, and an organ area corresponding to the facial organ image in the detected face area is detected, Since the inclination in the image plane of the face represented in the face area is estimated based on the detection result of the organ area, the detection accuracy related to the position and inclination of the face area is improved while speeding up the face area detection process. Can do.

[適用例2]適用例1に記載の画像処理装置であって、
前記顔領域検出部は、
前記対象画像上における画像領域である判定対象画像領域を設定する判定対象設定部と、
前記判定対象画像領域が顔の画像に対応する画像領域であることの確からしさを表す評価値を算出するための評価用データを記憶する記憶部と、
前記評価用データと前記判定対象画像領域に対応する画像データとに基づき前記評価値を算出する評価値算出部と、
前記評価値に基づき、前記判定対象画像領域が顔の画像に対応する画像領域であるか否かを判定する判定部と、
顔の画像に対応する画像領域であると判定された前記判定対象画像領域の位置およびサイズに基づき前記顔領域を設定する領域設定部と、を含む、画像処理装置。
[Application Example 2] The image processing apparatus according to Application Example 1,
The face area detection unit
A determination target setting unit that sets a determination target image region that is an image region on the target image;
A storage unit for storing evaluation data for calculating an evaluation value indicating the certainty that the determination target image region is an image region corresponding to a face image;
An evaluation value calculation unit that calculates the evaluation value based on the evaluation data and image data corresponding to the determination target image region;
A determination unit that determines whether or not the determination target image region is an image region corresponding to a face image based on the evaluation value;
And an area setting unit that sets the face area based on the position and size of the determination target image area determined to be an image area corresponding to a face image.

この画像処理装置では、対象画像上における画像領域である判定対象画像領域が設定され、判定対象画像領域が顔の画像に対応する画像領域であることの確からしさを表す評価値を算出するための評価用データが記憶され、評価用データと判定対象画像領域に対応する画像データとに基づき評価値が算出され、評価値に基づき判定対象画像領域が顔の画像に対応する画像領域であるか否かが判定され、顔の画像に対応する画像領域であると判定された判定対象画像領域の位置およびサイズに基づき顔領域が設定されることにより行われる顔領域検出処理の高速化を図りつつ、顔領域の位置や傾きに関する検出精度を向上させることができる。   In this image processing apparatus, a determination target image region that is an image region on the target image is set, and an evaluation value that represents the probability that the determination target image region is an image region corresponding to a face image is calculated. Evaluation data is stored, an evaluation value is calculated based on the evaluation data and image data corresponding to the determination target image area, and whether or not the determination target image area is an image area corresponding to the face image Speeding up the face area detection process performed by setting the face area based on the position and size of the determination target image area determined to be an image area corresponding to the face image, The detection accuracy regarding the position and inclination of the face area can be improved.

[適用例3]適用例2に記載の画像処理装置であって、
前記評価用データは、画像面内における互いに異なる任意の傾きを有する複数の顔の画像を含む顔画像群を用いた学習により生成される、画像処理装置。
[Application Example 3] The image processing apparatus according to Application Example 2,
The evaluation data is generated by learning using a face image group including a plurality of face images having arbitrary different inclinations in an image plane.

この画像処理装置では、顔領域の検出において、画像面内における互いに異なる任意の傾きを有する顔の画像を検出可能であり、顔領域検出処理の高速化を図りつつ、顔領域の位置や傾きに関する検出精度を向上させることができる。   With this image processing apparatus, in detecting a face area, it is possible to detect face images having arbitrary different inclinations in the image plane, and it is possible to increase the speed of the face area detection process and to improve the face area position and inclination. Detection accuracy can be improved.

[適用例4]適用例3に記載の画像処理装置であって、
前記顔画像群は、画像面内における傾きが互いに30度以上異なる複数の顔の画像を含む、画像処理装置。
[Application Example 4] The image processing apparatus according to Application Example 3,
The face image group includes an image processing apparatus including a plurality of face images whose inclinations in an image plane differ from each other by 30 degrees or more.

この画像処理装置では、顔領域の検出において、画像面内における傾きが互いに30度以上異なる顔の画像を検出可能であり、顔領域検出処理の高速化を図りつつ、顔領域の位置や傾きに関する検出精度を向上させることができる。   In this image processing apparatus, in detecting a face area, it is possible to detect face images whose inclinations in the image plane are different from each other by 30 degrees or more, and it is possible to increase the speed of the face area detection process and relate to the position and inclination of the face area. Detection accuracy can be improved.

[適用例5]適用例3または適用例4に記載の画像処理装置であって、
前記評価値は、前記判定対象画像領域が前記顔画像群に含まれる顔の画像の傾きと同一の傾きを有する顔の画像に対応する画像領域であることの確からしさを表す、画像処理装置。
[Application Example 5] The image processing apparatus according to Application Example 3 or Application Example 4,
The image processing apparatus represents the probability that the evaluation target image area is an image area corresponding to a face image having the same inclination as that of a face image included in the face image group.

この画像処理装置では、顔領域の検出において、評価値を用いて画像面内における互いに異なる任意の傾きを有する顔の画像を検出可能であり、顔領域検出処理の高速化を図りつつ、顔領域の位置や傾きに関する検出精度を向上させることができる。   In this image processing device, in the detection of the face area, it is possible to detect face images having arbitrary different inclinations in the image plane using the evaluation value, and the face area detection process can be performed at high speed. The detection accuracy related to the position and inclination of can be improved.

[適用例6]適用例1ないし適用例5のいずれかに記載の画像処理装置であって、
前記器官領域検出部は、少なくとも2種類の器官に対応する前記器官領域の検出を行い、
前記顔傾き推定部は、前記少なくとも2種類の器官に対応する前記器官領域間の位置関係に基づき、前記傾きを推定する、画像処理装置。
Application Example 6 The image processing apparatus according to any one of Application Example 1 to Application Example 5,
The organ region detection unit detects the organ region corresponding to at least two types of organs,
The image processing apparatus, wherein the face inclination estimation unit estimates the inclination based on a positional relationship between the organ regions corresponding to the at least two types of organs.

この画像処理装置では、少なくとも2種類の器官に対応する器官領域間の位置関係に基づき傾きを推定することにより、顔領域の傾きに関する検出精度を向上させることができる。   In this image processing apparatus, it is possible to improve the detection accuracy regarding the inclination of the face region by estimating the inclination based on the positional relationship between the organ regions corresponding to at least two types of organs.

[適用例7]適用例6に記載の画像処理装置であって、さらに、
前記器官領域の検出結果に基づき、検出された前記器官領域が真に顔の器官の画像に対応する画像領域であることの確からしさを表す器官領域信頼度を算出する信頼度算出部を備え、
前記顔傾き推定部は、特定の種類の器官に対応する前記器官領域が複数検出された場合には、前記器官領域信頼度に基づき、前記傾きの推定に利用する前記器官領域を選択する、画像処理装置。
Application Example 7 The image processing apparatus according to Application Example 6, further comprising:
Based on the detection result of the organ region, a reliability calculation unit that calculates an organ region reliability that represents the probability that the detected organ region is an image region that truly corresponds to an image of a facial organ,
The face inclination estimation unit selects the organ area to be used for the inclination estimation based on the organ area reliability when a plurality of the organ areas corresponding to a specific type of organ are detected. Processing equipment.

この画像処理装置では、器官領域信頼度に基づき傾きの推定に利用する器官領域を選択することにより、顔領域の傾きに関する検出精度を向上させることができる。   In this image processing apparatus, the detection accuracy related to the inclination of the face area can be improved by selecting the organ area used for the estimation of the inclination based on the organ area reliability.

[適用例8]適用例7に記載の画像処理装置であって、
前記器官領域検出部は、
前記顔領域上における画像領域である判定対象画像領域を設定する判定対象設定部と、
前記判定対象画像領域が顔の器官の画像に対応する画像領域であることの確からしさを表す評価値を算出するための評価用データを記憶する記憶部と、
前記評価用データと前記判定対象画像領域に対応する画像データとに基づき前記評価値を算出する評価値算出部と、
前記評価値に基づき、前記判定対象画像領域が顔の器官の画像に対応する画像領域であるか否かを判定する判定部と、
顔の器官の画像に対応する画像領域であると判定された1つまたは複数の互いに一部が重複する前記判定対象画像領域の位置およびサイズに基づき前記器官領域を設定する領域設定部と、を含み、
前記信頼度算出部は、前記器官領域の設定の際に参照された前記判定対象画像領域の数と前記評価値との少なくとも1つに基づき前記器官領域信頼度を算出する、画像処理装置。
[Application Example 8] The image processing apparatus according to Application Example 7,
The organ region detection unit is
A determination target setting unit that sets a determination target image region that is an image region on the face region;
A storage unit for storing evaluation data for calculating an evaluation value representing the probability that the determination target image area is an image area corresponding to an image of a facial organ;
An evaluation value calculation unit that calculates the evaluation value based on the evaluation data and image data corresponding to the determination target image region;
A determination unit that determines whether the determination target image region is an image region corresponding to an image of a facial organ based on the evaluation value;
An area setting unit configured to set the organ area based on the position and size of the determination target image area partially overlapping each other as one or a plurality of image areas determined to be image areas corresponding to facial organ images; Including
The image processing apparatus, wherein the reliability calculation unit calculates the organ area reliability based on at least one of the number of the determination target image areas and the evaluation value referred to when the organ area is set.

この画像処理装置では、検出された器官領域が真に顔の器官の画像に対応する画像領域であることの確からしさを表す器官領域信頼度を精度良く算出することができる。   In this image processing apparatus, it is possible to accurately calculate the organ region reliability indicating the certainty that the detected organ region is an image region that truly corresponds to the facial organ image.

[適用例9]適用例1ないし適用例8のいずれかに記載の画像処理装置であって、さらに、
前記推定された傾きに基づき、前記顔領域を再設定する顔領域再設定部を備える、画像処理装置。
[Application Example 9] The image processing apparatus according to any one of Application Examples 1 to 8, further comprising:
An image processing apparatus comprising: a face area resetting unit that resets the face area based on the estimated inclination.

この画像処理装置では、位置や傾きに関する精度を向上させた顔領域を再設定することができる。   In this image processing apparatus, it is possible to reset a face area with improved accuracy regarding position and inclination.

[適用例10]適用例1ないし適用例9のいずれかに記載の画像処理装置であって、
前記顔の器官の種類は、右目と左目と口との少なくとも1つである、画像処理装置。
Application Example 10 The image processing apparatus according to any one of Application Example 1 to Application Example 9,
The type of facial organ is at least one of a right eye, a left eye, and a mouth.

なお、本発明は、種々の態様で実現することが可能であり、例えば、画像処理方法および装置、顔領域検出方法および装置、顔傾き推定方法および装置、これらの方法または装置の機能を実現するためのコンピュータプログラム、そのコンピュータプログラムを記録した記録媒体、そのコンピュータプログラムを含み搬送波内に具現化されたデータ信号、等の形態で実現することができる。   Note that the present invention can be realized in various modes. For example, the image processing method and apparatus, the face area detection method and apparatus, the face inclination estimation method and apparatus, and the functions of these methods or apparatuses are realized. For example, a recording medium on which the computer program is recorded, a data signal that includes the computer program and is embodied in a carrier wave, and the like.

次に、本発明の実施の形態を実施例に基づいて以下の順序で説明する。
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. Face area 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 printer 100 as an image processing apparatus according to an embodiment of the present invention. The printer 100 of this embodiment is an ink jet color printer that supports so-called direct printing, in which an image is printed based on image data acquired from a memory card MC or the like. The printer 100 includes a CPU 110 that controls each unit of the printer 100, an internal memory 120 configured by a ROM and a RAM, an operation unit 140 configured by buttons and a touch panel, a display unit 150 configured by a liquid crystal display, and a printer. An engine 160 and a card interface (card I / F) 170 are provided. The printer 100 may further include an interface for performing data communication with other devices (for example, a digital still camera or a personal computer). Each component of the printer 100 is connected to each other via a bus.

プリンタエンジン160は、印刷データに基づき印刷を行う印刷機構である。カードインターフェース170は、カードスロット172に挿入されたメモリカードMCとの間でデータのやり取りを行うためのインターフェースである。なお、本実施例では、メモリカードMCに画像データを含む画像ファイルが格納されている。   The printer engine 160 is a printing mechanism that performs printing based on print data. The card interface 170 is an interface for exchanging data with the memory card MC inserted into the card slot 172. In this embodiment, an image file including image data is stored in the memory card MC.

内部メモリ120には、画像処理部200と、表示処理部310と、印刷処理部320と、が格納されている。画像処理部200は、所定のオペレーティングシステムの下で、後述する顔領域検出処理を実行するためのコンピュータプログラムである。表示処理部310は、表示部150を制御して、表示部150上に処理メニューやメッセージ、画像等を表示させるディスプレイドライバである。印刷処理部320は、画像データから印刷データを生成し、プリンタエンジン160を制御して、印刷データに基づく画像の印刷を実行するためのコンピュータプログラムである。CPU110は、内部メモリ120から、これらのプログラムを読み出して実行することにより、これら各部の機能を実現する。   The internal memory 120 stores an image processing unit 200, a display processing unit 310, and a print processing unit 320. The image processing unit 200 is a computer program for executing face area detection processing described later under a predetermined operating system. The display processing unit 310 is a display driver that controls the display unit 150 to display processing menus, messages, images, and the like on the display unit 150. The print processing unit 320 is a computer program for generating print data from image data, controlling the printer engine 160, and printing an image based on the print data. The CPU 110 implements the functions of these units by reading and executing these programs from the internal memory 120.

画像処理部200は、プログラムモジュールとして、領域検出部210と、信頼度算出部220と、情報付加部230と、を含んでいる。領域検出部210は、対象画像データの表す対象画像における所定の種類の被写体の画像(顔の画像および顔の器官の画像)に対応する画像領域の検出を行う。領域検出部210は、判定対象設定部211と、評価値算出部212と、判定部213と、領域設定部214と、顔傾き推定部215と、顔領域決定部216と、を含んでいる。これら各部の機能については、後述の顔領域検出処理の説明において詳述する。なお、後述するように、領域検出部210は、顔の画像に対応する顔領域の検出および顔の器官の画像に対応する器官領域の検出を行うため、本発明における顔領域検出部および器官領域検出部として機能する。   The image processing unit 200 includes an area detection unit 210, a reliability calculation unit 220, and an information addition unit 230 as program modules. The region detection unit 210 detects an image region corresponding to a predetermined type of subject image (a face image and a face organ image) in the target image represented by the target image data. The region detection unit 210 includes a determination target setting unit 211, an evaluation value calculation unit 212, a determination unit 213, a region setting unit 214, a face inclination estimation unit 215, and a face region determination unit 216. The functions of these units will be described in detail in the description of the face area detection process described later. As will be described later, the area detection unit 210 detects the face area corresponding to the face image and the organ area corresponding to the face organ image. Functions as a detection unit.

信頼度算出部220は、領域検出部210により所定の種類の被写体の画像(顔の画像および顔の器官の画像)に対応する画像領域として検出された画像領域(顔領域および器官領域)が、真に当該所定の種類の被写体の画像に対応する画像領域であることの確からしさを表す信頼度を算出する。情報付加部230は、画像データを含む画像ファイルに所定の情報(例えば顔領域および器官領域の位置を示す情報)を付加する。   The reliability calculation unit 220 includes image regions (face regions and organ regions) detected by the region detection unit 210 as image regions corresponding to predetermined types of subject images (face images and facial organ images). A reliability level is calculated that represents the probability that the image area truly corresponds to the image of the subject of the predetermined type. The information adding unit 230 adds predetermined information (for example, information indicating the positions of the face area and the organ area) to the image file including the image data.

内部メモリ120には、また、予め設定された顔学習データFLDおよび顔器官学習データOLDが格納されている。顔学習データFLDおよび顔器官学習データOLDは、領域検出部210による所定の画像領域の検出に用いられる。図2は、顔学習データFLDおよび顔器官学習データOLDを示す説明図である。図2(a)ないし図2(c)には、顔学習データFLDおよび顔器官学習データOLDの種類と、当該種類の顔学習データFLDおよび顔器官学習データOLDを用いて検出される画像領域の例と、を示している。   The internal memory 120 also stores preset face learning data FLD and face organ learning data OLD. The face learning data FLD and the facial organ learning data OLD are used for detection of a predetermined image area by the area detection unit 210. FIG. 2 is an explanatory diagram showing face learning data FLD and face organ learning data OLD. 2A to 2C show types of face learning data FLD and facial organ learning data OLD, and image regions detected using the types of face learning data FLD and face organ learning data OLD. An example is shown.

顔学習データFLDの内容については後述の顔領域検出処理の説明において詳述するが、本実施例の顔学習データFLDは、0度から360度までの顔傾きに対応している。ここで、顔傾きとは、画像面内(インプレーン)における顔の画像の傾き(回転角度)を意味している。本実施例では、顔傾きを、画像の上下方向に沿って顔の画像が位置している状態(頭頂が上方向を向き顎が下方向を向いた状態)を基準顔傾き(顔傾き=0度)とした場合における顔の画像の時計回りの角度で表す。また、ある顔傾きに対応する顔学習データFLDは、顔学習データFLDを用いた画像領域の検出において当該顔傾きを有する顔の画像を検出可能な顔学習データFLDである。従って、本実施例の顔学習データFLDは、0度から360度までの顔傾き、すなわちすべての顔傾きの顔の画像(図2(a)参照)を検出可能な顔学習データFLDである。顔学習データFLDは、0度から360度までの顔傾きに対応するように、後述する学習によって設定される。   The contents of the face learning data FLD will be described in detail in the description of the face area detection process described later, but the face learning data FLD of this embodiment corresponds to a face inclination from 0 degrees to 360 degrees. Here, the face inclination means the inclination (rotation angle) of the face image in the image plane (in-plane). In this embodiment, the face inclination is defined as a state in which the face image is positioned along the vertical direction of the image (a state in which the top of the head is facing upward and the chin is facing downward). In degrees), the angle of the face image in the clockwise direction. Also, the face learning data FLD corresponding to a certain face inclination is face learning data FLD that can detect a face image having the face inclination in the detection of an image region using the face learning data FLD. Therefore, the face learning data FLD of the present embodiment is face learning data FLD that can detect face inclinations from 0 degrees to 360 degrees, that is, face images having all face inclinations (see FIG. 2A). The face learning data FLD is set by learning to be described later so as to correspond to a face inclination from 0 degrees to 360 degrees.

顔器官学習データOLDは、顔の器官の種類毎に設定されている。本実施例では、顔の器官の種類として目(右目および左目)と口とが設定されている。内部メモリ120には、図2(b)に示す目に対応する顔器官学習データOLDと、図2(c)に示す口に対応する顔器官学習データOLDと、が格納されている。   The facial organ learning data OLD is set for each type of facial organ. In this embodiment, eyes (right eye and left eye) and mouth are set as types of facial organs. The internal memory 120 stores facial organ learning data OLD corresponding to the eyes shown in FIG. 2B and facial organ learning data OLD corresponding to the mouth shown in FIG.

目および口に対応する顔器官学習データOLDは、0度の器官傾きに対応している。ここで、器官傾きとは、上述の顔傾きと同様に、画像面内(インプレーン)における顔の器官の画像の傾き(回転角度)を意味している。器官傾きは、顔傾きと同様に、画像の上下方向に沿って顔の器官の画像が位置している状態を基準器官傾き(器官傾き=0度)とした場合における顔の器官の画像の時計回りの角度で表す。本実施例の顔器官学習データOLDは、顔器官学習データOLDを用いた画像領域の検出において、0度の器官傾きの顔の器官の画像(図2(b)および図2(c)参照)を検出可能な顔器官学習データOLDである。なお、後述するように、本実施例の顔器官学習データOLDは、0度の器官傾きの器官の画像に加えて、0度を中心に器官傾きの値がプラスマイナス15度の範囲の器官の画像をも検出可能なように、学習によって設定されている。   The facial organ learning data OLD corresponding to the eyes and mouth corresponds to an organ inclination of 0 degrees. Here, the organ inclination means the inclination (rotation angle) of the image of the facial organ in the image plane (in-plane), similar to the face inclination described above. Similar to the face tilt, the organ tilt is the clock of the facial organ image when the facial organ image is positioned along the vertical direction of the image as the reference organ tilt (organ tilt = 0 degrees). Expressed by the angle around. The facial organ learning data OLD of the present embodiment is an image of a facial organ with an inclination of 0 degrees in the detection of an image region using the facial organ learning data OLD (see FIGS. 2B and 2C). Can be detected face organ learning data OLD. As will be described later, the facial organ learning data OLD of the present embodiment includes organ images with an organ tilt value of plus or minus 15 degrees centering on 0 degrees, in addition to an image of an organ having an organ tilt of 0 degrees. It is set by learning so that an image can also be detected.

なお、本実施例では、右目と左目とは同じ種類の被写体であるとし、右目の画像に対応する右目領域と左目の画像に対応する左目領域とを共通の顔器官学習データOLDを用いて検出するものとしているが、右目と左目とは異なる種類の被写体であるとして、右目領域検出用と左目領域検出用とにそれぞれ専用の顔器官学習データOLDを準備するものとしてもよい。   In this embodiment, it is assumed that the right eye and the left eye are the same type of subject, and the right eye region corresponding to the right eye image and the left eye region corresponding to the left eye image are detected using the common facial organ learning data OLD. However, assuming that the right eye and the left eye are different types of subjects, dedicated face organ learning data OLD may be prepared for right eye region detection and left eye region detection, respectively.

A−2.顔領域検出処理:
図3は、顔領域検出処理の流れを示すフローチャートである。本実施例における顔領域検出処理は、画像データの表す画像における顔の画像に対応する顔領域を検出する処理である。
A-2. Face area detection processing:
FIG. 3 is a flowchart showing the flow of face area detection processing. The face area detection process in this embodiment is a process for detecting a face area corresponding to a face image in an image represented by image data.

ステップS110では、画像処理部200(図1)が、顔領域検出処理の対象となる画像を表す画像データを取得する。本実施例のプリンタ100では、カードスロット172にメモリカードMCが挿入されると、メモリカードMCに格納された画像ファイルのサムネイル画像が表示部150に表示される。ユーザは、表示されたサムネイル画像を参照しつつ、操作部140を介して処理の対象となる1つまたは複数の画像を選択する。画像処理部200は、選択された1つまたは複数の画像に対応する画像データを含む画像ファイルをメモリカードMCより取得して内部メモリ120の所定の領域に格納する。なお、取得された画像データを原画像データと呼び、原画像データの表す画像を原画像OImgと呼ぶものとする。   In step S110, the image processing unit 200 (FIG. 1) acquires image data representing an image to be subjected to face area detection processing. In the printer 100 of this embodiment, when the memory card MC is inserted into the card slot 172, thumbnail images of the image files stored in the memory card MC are displayed on the display unit 150. The user selects one or more images to be processed via the operation unit 140 while referring to the displayed thumbnail images. The image processing unit 200 acquires an image file including image data corresponding to one or more selected images from the memory card MC and stores it in a predetermined area of the internal memory 120. The acquired image data is referred to as original image data, and the image represented by the original image data is referred to as original image OImg.

ステップS120(図3)では、領域検出部210(図1)が、原顔領域検出処理を行う。原顔領域検出処理は、顔の画像に対応する画像領域を原顔領域FAoとして検出する処理である。原顔領域FAoは、画像面内における任意の傾きを有する顔の画像に対応する領域である。図4は、原顔領域検出処理の流れを示すフローチャートである。また、図5は、原顔領域検出処理の概要を示す説明図である。図5の最上段には原画像OImgの一例を示している。   In step S120 (FIG. 3), the area detection unit 210 (FIG. 1) performs an original face area detection process. The original face area detection process is a process for detecting an image area corresponding to the face image as the original face area FAo. The original face area FAo is an area corresponding to a face image having an arbitrary inclination in the image plane. FIG. 4 is a flowchart showing the flow of the original face area detection process. FIG. 5 is an explanatory diagram showing an outline of the original face area detection process. An example of the original image OImg is shown at the top of FIG.

原顔領域検出処理(図4)におけるステップS310では、領域検出部210(図1)が、原画像OImgを表す原画像データから顔検出用画像FDImgを表す顔検出用画像データを生成する。本実施例では、図5に示すように、顔検出用画像FDImgは横320画素×縦240画素のサイズの画像である。領域検出部210は、必要により原画像データの解像度変換を行うことにより、顔検出用画像FDImgを表す顔検出用画像データを生成する。なお、本実施例における顔検出用画像FDImgは本発明における対象画像に相当し、顔検出用画像データは本発明における対象画像データに相当する。   In step S310 in the original face area detection process (FIG. 4), the area detection unit 210 (FIG. 1) generates face detection image data representing the face detection image FDImg from the original image data representing the original image OImg. In the present embodiment, as shown in FIG. 5, the face detection image FDImg is an image having a size of horizontal 320 pixels × vertical 240 pixels. The area detection unit 210 generates face detection image data representing the face detection image FDImg by performing resolution conversion of the original image data as necessary. Note that the face detection image FDImg in this embodiment corresponds to the target image in the present invention, and the face detection image data corresponds to the target image data in the present invention.

ステップS320(図4)では、判定対象設定部211(図1)が、判定対象画像領域JIA(後述)の設定に用いるウィンドウSWのサイズを初期値に設定する。ステップS330では、判定対象設定部211が、ウィンドウSWを顔検出用画像FDImg上の初期位置に配置する。ステップS340では、判定対象設定部211が、顔検出用画像FDImg上に配置されたウィンドウSWにより規定される画像領域を、顔の画像に対応する画像領域であるか否かの判定(以下「顔判定」とも呼ぶ)の対象となる判定対象画像領域JIAに設定する。図5の中段には、顔検出用画像FDImg上に初期値のサイズのウィンドウSWが初期位置に配置され、ウィンドウSWにより規定される画像領域が判定対象画像領域JIAに設定される様子を示している。本実施例では、後述するように、正方形形状のウィンドウSWのサイズおよび位置が変更されつつ判定対象画像領域JIAの設定が順に行われるが、ウィンドウSWのサイズの初期値は最大サイズである横240画素×縦240画素であり、ウィンドウSWの初期位置はウィンドウSWの左上の頂点が顔検出用画像FDImgの左上の頂点に重なるような位置である。   In step S320 (FIG. 4), 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. 5 shows a state in which a window SW having an initial value size is arranged at an 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 horizontal size 240. The initial position of the window SW is such that the upper left vertex of the window SW overlaps the upper left vertex of the face detection image FDImg.

ステップS350(図4)では、評価値算出部212(図1)が、判定対象画像領域JIAについて、顔判定に用いる累計評価値Tvを算出する。図6は、顔判定に用いる累計評価値Tvの算出方法の概要を示す説明図である。本実施例では、累計評価値Tvの算出にN個のフィルタ(フィルタ1〜フィルタN)が用いられる。各フィルタの外形はウィンドウSWと同じアスペクト比を有しており(すなわち正方形形状であり)、各フィルタにはプラス領域paとマイナス領域maとが設定されている。評価値算出部212は、判定対象画像領域JIAにフィルタX(X=1,2,・・・,N)を順に適用して評価値vX(すなわちv1〜vN)を算出する。具体的には、評価値vXは、フィルタXのプラス領域paに対応する判定対象画像領域JIA上の領域内に位置する画素の輝度値の合計から、マイナス領域maに対応する判定対象画像領域JIA上の領域内に位置する画素の輝度値の合計を差し引いた値である。   In step S350 (FIG. 4), 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. FIG. 6 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 (filter 1 to filter N) are used to calculate the cumulative evaluation value Tv. The external shape of each filter has the same aspect ratio as that of the window SW (that is, has a square shape), and a positive region pa and a negative region ma are set for each filter. The evaluation value calculation unit 212 calculates the evaluation values vX (that is, v1 to vN) by sequentially applying the filter X (X = 1, 2,..., N) to the determination target image area JIA. Specifically, the evaluation value vX is determined from the sum of the luminance values of pixels located in the area on the determination target image area JIA corresponding to the plus area pa of the filter X, based on the determination target image area JIA corresponding to the minus area ma. This is a value obtained by subtracting the sum of the luminance values of the pixels located in the upper region.

算出された評価値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は、顔学習データFLD(図2(a)参照)として予め設定されている。本実施例における顔学習データ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 set in advance as face learning data FLD (see FIG. 2A). Since 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 the face image, the evaluation data in the present invention. It corresponds to.

顔学習データFLDは、サンプル画像を用いた学習によって生成される。図7は、学習に用いられるサンプル画像の一例を示す説明図である。学習には、顔に対応する画像であることが予めわかっている複数の顔サンプル画像によって構成された顔サンプル画像群と、顔に対応する画像ではないことが予めわかっている複数の非顔サンプル画像によって構成された非顔サンプル画像群と、が用いられる。   The face learning data FLD is generated by learning using a sample image. FIG. 7 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 faces, and a plurality of non-face samples that are known in advance to be images that do not correspond to faces And a non-face sample image group constituted by images.

図7に示すように、顔サンプル画像群は、画像面内における互いに異なる任意の傾きを有する複数の顔サンプル画像を含んでいる。具体的には、顔サンプル画像群は、特定顔傾きに対応する複数の顔サンプルサブ画像群により構成されている。ここで、特定顔傾きとは、基準顔傾き(顔傾き=0度)と基準顔傾きから顔傾きを30度ずつ順に増加させた顔傾きとの計12個の顔傾き(0度、30度、60度、・・・、330度)である。   As shown in FIG. 7, the face sample image group includes a plurality of face sample images having arbitrary different inclinations in the image plane. Specifically, the face sample image group is composed of a plurality of face sample sub-image groups corresponding to a specific face inclination. Here, the specific face inclination is a total of 12 face inclinations (0 degrees and 30 degrees) including a reference face inclination (face inclination = 0 degrees) and a face inclination obtained by sequentially increasing the face inclination from the reference face inclination by 30 degrees. , 60 degrees,..., 330 degrees).

各特定顔傾きに対応する顔サンプルサブ画像群は、画像サイズに対する顔の画像の大きさの比が所定の値の範囲内であると共に顔の画像の傾きが特定顔傾きに等しい複数の顔サンプル画像(以下、「基本顔サンプル画像」とも呼ぶ)を含む。また、各顔サンプルサブ画像群は、少なくとも1つの基本顔サンプル画像について、基本顔サンプル画像を1.2倍から0.8倍までの範囲の所定の倍率で拡大および縮小した画像(例えば図7おける画像FIaおよびFIb)や、基本顔サンプル画像の顔傾きをプラスマイナス15度の範囲で変化させた画像(例えば図7における画像FIcおよびFId)をも含む。従って、顔サンプル画像群は、特定顔傾きを有する顔の画像と、特定顔傾きではなく2つの隣接する特定顔傾き間の範囲内の任意の顔傾きを有する顔の画像と、を含むこととなる。   The face sample sub-image group corresponding to each specific face inclination includes a plurality of face samples in which the ratio of the face image size to the image size is within a predetermined value range and the face image inclination is equal to the specific face inclination. Images (hereinafter also referred to as “basic face sample images”). Each face sample sub-image group is an image obtained by enlarging and reducing the basic face sample image at a predetermined magnification in a range from 1.2 times to 0.8 times with respect to at least one basic face sample image (for example, FIG. 7). Images FIa and FIb) and images obtained by changing the face inclination of the basic face sample image in a range of plus or minus 15 degrees (for example, images FIc and FId in FIG. 7). Therefore, the face sample image group includes a face image having a specific face inclination and a face image having an arbitrary face inclination within a range between two adjacent specific face inclinations instead of the specific face inclination. Become.

サンプル画像を用いた学習は、例えばニューラルネットワークを用いた方法や、ブースティング(例えばアダブースティング)を用いた方法、サポートベクターマシーンを用いた方法等により実行される。例えば学習がニューラルネットワークを用いた方法により実行される場合には、各フィルタX(すなわちフィルタ1〜フィルタN、図6参照)について、顔サンプル画像群(図7参照)と非顔サンプル画像群とに含まれるすべてのサンプル画像を用いて評価値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 (see FIG. 7) and a non-face sample image group for each filter X (that is, filter 1 to filter N, see FIG. 6) Evaluation values vX (that is, v1 to vN) are calculated using all the sample images included in the threshold value thX (that is, th1 to thN) that achieves a predetermined face detection rate. 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. Face learning data FLD is set by such processing.

なお、上述したように、顔学習データFLDは、特定顔傾きを有する顔の画像と、特定顔傾きではなく特定顔傾き間の範囲内の任意の顔傾きを有する顔の画像と、を含む顔サンプル画像群を用いた学習により設定されるため、顔領域検出処理において0度から360度まで、すなわちすべての顔傾きの顔の画像が検出可能な顔学習データFLDとなる。また、累計評価値Tvは、判定対象画像領域JIAが顔サンプル画像群に含まれる顔サンプル画像の顔傾きと同一の顔傾きを有する顔の画像に対応する画像領域であることの確からしさを表す指標である。   As described above, the face learning data FLD includes a face image having a specific face inclination and a face image having an arbitrary face inclination within a range between the specific face inclinations instead of the specific face inclination. Since it is set by learning using the sample image group, the face learning data FLD can be detected from 0 degrees to 360 degrees in the face area detection process, that is, all face tilted face images can be detected. The cumulative evaluation value Tv represents the probability that the determination target image area JIA is an image area corresponding to a face image having the same face inclination as that of the face sample image included in the face sample image group. It is an indicator.

判定対象画像領域JIAについて累計評価値Tvが算出されると(図4のステップ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 the determination target image area JIA (step S350 in FIG. 4), the determination unit 213 (FIG. 1) compares the cumulative evaluation value Tv with a preset threshold value TH (step S360). . When the cumulative evaluation value Tv is equal to or greater than the threshold value TH, the area detection unit 210 determines that the determination target image area JIA is an image area corresponding to the face image, that is, the position of the determination target image area JIA, that is, currently set. The coordinates of the current window SW are stored (step S370). On the other hand, when the cumulative evaluation value Tv is smaller than the threshold value TH, the process of step S370 is skipped.

ステップS380(図4)では、領域検出部210(図1)が、現在設定されているサイズのウィンドウSWにより顔検出用画像FDImg全体がスキャンされたか否かを判定する。未だ顔検出用画像FDImg全体がスキャンされていないと判定された場合には、判定対象設定部211(図1)が、ウィンドウSWを所定の方向に所定の移動量だけ移動する(ステップS390)。図5の下段には、ウィンドウSWが移動した様子を示している。本実施例では、ステップS390において、ウィンドウSWがウィンドウSWの水平方向の大きさの2割分の移動量で右方向に移動するものとしている。また、ウィンドウSWがさらに右方向には移動できない位置に配置されている場合には、ステップS390において、ウィンドウSWが顔検出用画像FDImgの左端まで戻ると共に、ウィンドウSWの垂直方向の大きさの2割分の移動量で下方向に移動するものとしている。ウィンドウSWがさらに下方向には移動できない位置に配置されている場合には、顔検出用画像FDImg全体がスキャンされたこととなる。ウィンドウSWの移動(ステップS390)の後には、移動後のウィンドウSWについて、上述のステップS340以降の処理が実行される。   In step S380 (FIG. 4), the area 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. 5 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(図4)において現在設定されているサイズのウィンドウ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以降の処理が実行される。   If it is determined in step S380 (FIG. 4) 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(図4)においてウィンドウSWの所定のサイズがすべて使用されたと判定された場合には、領域設定部214(図1)が、原顔領域設定処理を実行する(ステップS420)。図8は、原顔領域設定処理の概要を示す説明図である。領域設定部214は、図4のステップS360において累計評価値Tvが閾値TH以上であると判定されステップS370において記憶されたウィンドウSWの座標に基づき、原顔領域FAoを設定する。具体的には、ステップS370において記憶されたウィンドウSWが他の記憶されたウィンドウSWの一部と重複しない場合には、ウィンドウSWにより規定される画像領域(すなわち判定対象画像領域JIA(図5参照))が、そのまま原顔領域FAoとして設定される。   If it is determined in step S400 (FIG. 4) that all of the predetermined size of the window SW has been used, the area setting unit 214 (FIG. 1) executes an original face area setting process (step S420). FIG. 8 is an explanatory diagram showing an outline of the original face area setting process. The area setting unit 214 determines that the cumulative evaluation value Tv is equal to or greater than the threshold value TH in step S360 of FIG. 4, and sets the original face area FAo based on the coordinates of the window SW stored in step S370. Specifically, when the window SW stored in step S370 does not overlap with a part of other stored windows SW, the image area defined by the window SW (that is, the determination target image area JIA (see FIG. 5). )) Is set as the original face area FAo as it is.

一方、ステップS370(図4)において、互いに一部が重複する複数のウィンドウSWが記憶された場合には、領域設定部214(図1)は、各ウィンドウSWにおける所定の点(例えばウィンドウSWの重心)の座標の平均の座標を重心とし、各ウィンドウSWのサイズの平均のサイズを有する1つの新たなウィンドウ(以下、「平均ウィンドウAW」とも呼ぶ)を設定し、平均ウィンドウAWにより規定される画像領域を原顔領域FAoとして設定する。例えば図8(a)に示すように、互いに一部が重複する4つのウィンドウSW(SW1〜SW4)が記憶された場合には、図8(b)に示すように、4つのウィンドウSWのそれぞれの重心の座標の平均の座標を重心とし、4つのウィンドウSWのそれぞれのサイズの平均のサイズを有する1つの平均ウィンドウAWが定義され、平均ウィンドウAWにより規定される画像領域が原顔領域FAoとして設定される。   On the other hand, when a plurality of windows SW that partially overlap each other are stored in step S370 (FIG. 4), the area setting unit 214 (FIG. 1) determines a predetermined point (for example, the window SW of each window SW). One new window (hereinafter also referred to as “average window AW”) having an average size of the sizes of the windows SW is set with the average coordinate of the coordinates of the center of gravity) being defined by the average window AW. The image area is set as the original face area FAo. For example, as shown in FIG. 8A, when four windows SW (SW1 to SW4) that partially overlap each other are stored, as shown in FIG. 8B, each of the four windows SW is stored. An average window AW having an average size of the sizes of the four windows SW is defined with the average coordinate of the coordinates of the center of gravity of each of the four windows SW being defined, and an image area defined by the average window AW is defined as an original face area FAo Is set.

なお、他のウィンドウSWと重複しない1つのウィンドウSWが記憶された場合にも、互いに一部が重複する複数のウィンドウSWが記憶された場合と同様に、1つのウィンドウSW自身が平均ウィンドウAWであると解釈することも可能である。   Even when one window SW that does not overlap with other windows SW is stored, one window SW itself is the average window AW, as in the case where a plurality of windows SW that partially overlap each other are stored. It can also be interpreted as being.

本実施例では、学習の際に用いられる顔サンプル画像群(図7参照)に、基本顔サンプル画像を1.2倍から0.8倍までの範囲の所定の倍率で拡大および縮小した画像(例えば図7における画像FIaおよびFIb)が含まれているため、ウィンドウSWの大きさに対する顔の画像の大きさが基本顔サンプル画像と比べてわずかに大きかったり小さかったりする場合にも、原顔領域FAoが検出されうる。従って、本実施例では、ウィンドウSWのサイズとして上述した15個の離散的なサイズのみが設定されているが、あらゆる大きさの顔の画像について原顔領域FAoが検出されうる。   In the present embodiment, an image obtained by enlarging and reducing a basic face sample image at a predetermined magnification in a range from 1.2 times to 0.8 times in a face sample image group (see FIG. 7) used for learning (see FIG. 7). For example, since the images FIa and FIb in FIG. 7 are included, the original face region is also obtained when the size of the face image relative to the size of the window SW is slightly larger or smaller than the basic face sample image. FAo 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 original face area FAo can be detected for facial images of any size.

原顔領域検出処理(図3のステップS120)において、原顔領域FAoが検出されなかった場合には(ステップS130:No)、顔領域検出処理は終了する。一方、少なくとも1つの原顔領域FAoが検出された場合には(ステップS130:Yes)、領域検出部210(図1)が、検出された原顔領域FAoの1つを選択する(ステップS140)。   If the original face area FAo is not detected in the original face area detection process (step S120 in FIG. 3) (step S130: No), the face area detection process ends. On the other hand, when at least one original face area FAo is detected (step S130: Yes), the area detection unit 210 (FIG. 1) selects one of the detected original face areas FAo (step S140). .

ステップS150では、領域検出部210が、器官領域検出処理を行う。器官領域検出処理は、選択された原顔領域FAoにおける顔の器官の画像に対応する画像領域を器官領域として検出する処理である。上述したように、本実施例では、顔の器官の種類は、右目と左目と口との3種類を意味しており、器官領域検出処理では、右目の画像に対応する右目領域EA(r)と、左目の画像に対応する左目領域EA(l)と、口の画像に対応する口領域MAと、の検出が行われる。   In step S150, the region detection unit 210 performs an organ region detection process. The organ area detection process is a process of detecting an image area corresponding to the facial organ image in the selected original face area FAo as an organ area. As described above, in this embodiment, the types of facial organs mean the right eye, the left eye, and the mouth, and in the organ area detection process, the right eye area EA (r) corresponding to the right eye image. The left eye area EA (l) corresponding to the left eye image and the mouth area MA corresponding to the mouth image are detected.

図9は、器官領域検出処理の流れを示すフローチャートである。器官領域検出処理のステップS510では、領域検出部210(図1)が、器官検出用画像ODImgを表す器官検出用画像データ生成する。図10は、器官検出用画像ODImgの一例を示す説明図である。図10(a)には、顔検出用画像FDImg上に設定された平均ウィンドウAWにより規定される原顔領域FAoを示している。器官検出用画像ODImgは、図10(b)に示すように、顔検出用画像FDImg上において、平均ウィンドウAWの重心を中心として0度から330度までの30度ピッチの12個の角度分だけ平均ウィンドウAWを時計回りに回転させ(平均ウィンドウAWの傾きを変化させ)た後の各平均ウィンドウAWにより規定される12個の画像領域を、当該角度分だけ反時計回りに回転させた画像である。図10(b)には、平均ウィンドウAWの回転角度と、当該回転角度に対応する器官検出用画像ODImgの例とを対応付けて示している。なお、本実施例では、器官検出用画像ODImgは横60画素×縦60画素のサイズの画像である。そのため、領域検出部210は、必要により顔検出用画像FDImgのトリミング、回転、解像度変換を行うことにより、12個の器官検出用画像ODImgを生成する。   FIG. 9 is a flowchart showing the flow of the organ region detection process. In step S510 of the organ region detection process, the region detection unit 210 (FIG. 1) generates organ detection image data representing the organ detection image ODImg. FIG. 10 is an explanatory diagram showing an example of the organ detection image ODImg. FIG. 10A shows the original face area FAo defined by the average window AW set on the face detection image FDImg. As shown in FIG. 10 (b), the organ detection image ODImg corresponds to 12 angles at a 30 degree pitch from 0 degree to 330 degrees centering on the center of gravity of the average window AW on the face detection image FDImg. An image obtained by rotating twelve image areas defined by each average window AW after rotating the average window AW clockwise (changing the inclination of the average window AW) counterclockwise by the angle. is there. FIG. 10B shows the rotation angle of the average window AW and an example of the organ detection image ODImg corresponding to the rotation angle. In this embodiment, the organ detection image ODImg is an image having a size of horizontal 60 pixels × vertical 60 pixels. Therefore, the region detection unit 210 generates 12 organ detection images ODImg by performing trimming, rotation, and resolution conversion of the face detection image FDImg as necessary.

ステップS520(図9)では、領域検出部210(図1)が、生成された器官検出用画像ODImgの1つを選択する。器官検出用画像ODImgの選択の後は、選択された器官検出用画像ODImgからの器官領域の検出が、上述した顔検出用画像FDImgからの原顔領域FAoの検出と同様に行われる。図11は、器官領域検出処理の概要を示す説明図である。図11の最上段には、選択された器官検出用画像ODImgの一例を示している。   In step S520 (FIG. 9), the region detection unit 210 (FIG. 1) selects one of the generated organ detection images ODImg. After the selection of the organ detection image ODImg, the detection of the organ area from the selected organ detection image ODImg is performed in the same manner as the detection of the original face area FAo from the face detection image FDImg described above. FIG. 11 is an explanatory diagram showing an outline of the organ region detection process. An example of the selected organ detection image ODImg is shown in the uppermost part of FIG.

選択された器官検出用画像ODImgからの器官領域の検出においては、図11に示すように、矩形形状のウィンドウSWがそのサイズおよび位置が変更されつつ器官検出用画像ODImg上に配置され(図9のステップS530,S540,S590〜S620)、配置されたウィンドウSWにより規定される画像領域が顔の器官の画像に対応する器官領域であるか否かの判定(以下「器官判定」とも呼ぶ)の対象となる判定対象画像領域JIAとして設定される(図9のステップS550)。設定された判定対象画像領域JIAについて、顔器官学習データOLD(図1)を用いて、器官(右目、左目、口)毎に、器官判定に用いられる累計評価値Tvが算出される(図9のステップS560)。累計評価値Tvの算出や器官判定に用いられるフィルタXの態様や閾値thX、重み係数WeX、閾値TH(図6参照)は、顔器官学習データOLDに規定されている。   In the detection of the organ region from the selected organ detection image ODImg, as shown in FIG. 11, the rectangular window SW is arranged on the organ detection image ODImg while its size and position are changed (FIG. 9). Steps S530, S540, S590 to S620) for determining whether the image area defined by the arranged window SW is an organ area corresponding to the facial organ image (hereinafter also referred to as “organ determination”). The determination target image area JIA is set (step S550 in FIG. 9). For the set determination target image area JIA, 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. 9). Step S560). The aspect of the filter X used for calculation of the cumulative evaluation value Tv and organ determination, the threshold thX, the weighting coefficient WeX, and the threshold TH (see FIG. 6) are defined in the facial organ learning data OLD.

なお、顔器官学習データOLDの設定のための学習は、顔学習データFLDの設定のための学習と同様に、顔の器官に対応する画像であることが予めわかっている複数の器官サンプル画像によって構成された器官サンプル画像群と、顔の器官に対応する画像ではないことが予めわかっている複数の非器官サンプル画像によって構成された非器官サンプル画像群と、を用いて実行される。ただし、顔学習データFLDの設定のための学習に用いられる顔サンプル画像群(図7)が、特定顔傾き(0度、30度、60度、・・・、330度)のそれぞれに対応する複数の顔サンプルサブ画像群により構成されているのに対して、顔器官学習データOLDの設定のための学習に用いられた器官サンプル画像群は、そのようには構成されていない。器官サンプル画像群は、画像サイズに対する顔の器官の画像の大きさの比が所定の値の範囲内であると共に顔の器官の画像の傾きが0度である複数の器官サンプル画像(以下、「基本器官サンプル画像」とも呼ぶ)と、少なくとも1つの基本器官サンプル画像について、基本器官サンプル画像を1.2倍から0.8倍までの範囲の所定の倍率で拡大および縮小した画像、および基本器官サンプル画像の傾きをプラスマイナス15度の範囲で変化させた画像と、から構成されている。従って、顔器官学習データOLDは、器官領域検出処理において0度を中心に器官傾きの値がプラスマイナス15度の範囲の器官の画像を検出可能なように設定される。なお、本実施例における顔器官学習データOLDは、判定対象画像領域JIAが顔の器官の画像に対応する画像領域であることの確からしさを表す評価値を算出するためのデータであるため、本発明における評価用データに相当する。   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. However, the face sample image group (FIG. 7) used for learning for setting the face learning data FLD corresponds to each of specific face inclinations (0 degrees, 30 degrees, 60 degrees,..., 330 degrees). In contrast to the plurality of face sample sub-image groups, the organ sample image group used for learning for setting the facial organ learning data OLD is not so configured. The organ sample image group includes a plurality of organ sample images (hereinafter referred to as “the organ image of face image”) in which the ratio of the size of the facial organ image to the image size is within a predetermined value range and the inclination of the facial organ image is 0 degrees. A basic organ sample image), an image obtained by enlarging and reducing the basic organ sample image at a predetermined magnification in a range from 1.2 times to 0.8 times with respect to at least one basic organ sample image; And an image in which the inclination of the sample image is changed in a range of plus or minus 15 degrees. Therefore, the facial organ learning data OLD is set so that an organ image having an organ inclination value in the range of plus or minus 15 degrees around 0 degrees can be detected in the organ region detection process. Note that the facial organ learning data OLD in the present embodiment is data for calculating an evaluation value representing the certainty that the determination target image region JIA is an image region corresponding to the facial organ image. This corresponds to the evaluation data in the invention.

算出された累計評価値Tvが所定の閾値TH以上である場合には、判定対象画像領域JIAは顔の器官の画像に対応する画像領域であるとして、判定対象画像領域JIAの位置、すなわち現在設定されているウィンドウSWの座標が記憶される(図9のステップS580)。一方、累計評価値Tvが閾値THより小さい場合には、ステップS580の処理はスキップされる。   If the calculated cumulative evaluation value Tv is equal to or greater than the predetermined threshold TH, the determination target image area JIA is regarded as an image area corresponding to the facial organ image, that is, the position of the determination target image area JIA, that is, the current setting. The coordinates of the window SW being stored are stored (step S580 in FIG. 9). On the other hand, when the cumulative evaluation value Tv is smaller than the threshold value TH, the process of step S580 is skipped.

ウィンドウSWの所定のサイズのすべてについて、ウィンドウSWにより器官検出用画像ODImg全体がスキャンされた後に、器官領域設定処理が実行される(図9のステップS630)。図12は、器官領域設定処理の概要を示す説明図である。器官領域設定処理は、顔領域設定処理(図8参照)と同様の処理である。領域設定部214は、図9のステップS570において累計評価値Tvが閾値TH以上であると判定されステップS580において記憶されたウィンドウSWの座標とに基づき、器官領域を設定する。具体的には、ステップS580において記憶されたウィンドウSWが他の記憶されたウィンドウSWの一部と重複しない場合には、ウィンドウSWにより規定される画像領域(すなわち判定対象画像領域JIA)が、そのまま器官領域として設定される。一方、互いに一部が重複する複数のウィンドウSWが記憶された場合には、各ウィンドウSWにおける所定の点(例えばウィンドウSWの重心)の座標の平均の座標を重心とし、各ウィンドウSWのサイズの平均のサイズを有する1つの新たなウィンドウ(平均ウィンドウAW)が設定され、平均ウィンドウAWにより規定される画像領域が器官領域として設定される。例えば図12(a)に示すように、互いに一部が重複する3つのウィンドウSW(SW1〜SW3)が記憶された場合には、図12(b)に示すように、3つのウィンドウSWのそれぞれの重心の座標の平均の座標を重心とし、3つのウィンドウSWのそれぞれのサイズの平均のサイズを有する1つの平均ウィンドウAWが定義され、平均ウィンドウAWにより規定される画像領域が器官領域(右目領域EA(r))として設定される。   For all the predetermined sizes of the window SW, the entire organ detection image ODImg is scanned by the window SW, and then an organ region setting process is executed (step S630 in FIG. 9). FIG. 12 is an explanatory diagram showing an outline of the organ region setting process. The organ area setting process is the same as the face area setting process (see FIG. 8). The region setting unit 214 sets an organ region based on the coordinates of the window SW determined in step S570 in FIG. 9 that the cumulative evaluation value Tv is greater than or equal to the threshold value TH and stored in step S580. Specifically, when the window SW stored in step S580 does not overlap with a part of other stored windows SW, the image area defined by the window SW (that is, the determination target image area JIA) remains as it is. Set as organ area. On the other hand, when a plurality of windows SW partially overlapping each other are stored, the average coordinates of the coordinates of a predetermined point (for example, the center of gravity of the window SW) in each window SW are used as the center of gravity, and the size of each window SW is determined. One new window (average window AW) having an average size is set, and an image area defined by the average window AW is set as an organ area. For example, as shown in FIG. 12A, when three windows SW (SW1 to SW3) that partially overlap each other are stored, as shown in FIG. An average window AW having an average size of the sizes of the three windows SW is defined with an average coordinate of the coordinates of the center of gravity of each of the three windows SW, and an image region defined by the average window AW is an organ region (right eye region) EA (r)).

ステップS640(図9)では、領域検出部210(図1)が、すべての器官検出用画像ODImgが選択されたか否かを判定する。未だ選択されていない器官検出用画像ODImgが存在すると判定された場合には(ステップS640:No)、ステップS520に戻って未選択の器官検出用画像ODImgの1つが選択され、ステップS530以降の処理が実行される。一方、すべての器官検出用画像ODImgが選択されたと判定された場合には(ステップS640:Yes)、器官領域検出処理は完了する。   In step S640 (FIG. 9), region detection unit 210 (FIG. 1) determines whether all organ detection images ODImg have been selected. If it is determined that there is an organ detection image ODImg that has not yet been selected (step S640: No), the process returns to step S520, and one of the unselected organ detection images ODImg is selected, and the processing after step S530 is performed. Is executed. On the other hand, when it is determined that all the organ detection images ODImg have been selected (step S640: Yes), the organ region detection process is completed.

以上説明した器官領域検出処理により、器官検出用画像ODImgにおいて、右目の画像に対応する画像領域である右目領域EA(r)と、左目の画像に対応する画像領域である左目領域EA(l)と、口の画像に対応する画像領域である口領域MAと、の検出が行われる。図13は、器官領域検出処理の結果の一例を示す説明図である。   By the organ area detection processing described above, in the organ detection image ODImg, the right eye area EA (r) that is an image area corresponding to the right eye image and the left eye area EA (l) that is an image area corresponding to the left eye image. And the mouth area MA which is an image area corresponding to the mouth image. FIG. 13 is an explanatory diagram illustrating an example of a result of the organ region detection process.

器官領域検出処理(図3のステップS150)において器官領域が検出されなかった場合には(ステップS160:No)、ステップS140で選択された原顔領域FAoは真に顔の画像に対応する画像領域ではない画像領域が誤って原顔領域FAoとして検出されたと判定される(ステップS170)。この場合には、選択された原顔領域FAoに基づく決定顔領域FAfの設定(後述のステップS200)は実行されない。なお、本実施例において、器官領域が検出されなかった場合とは、いずれの器官検出用画像ODImg(図10(b)参照)においても、3種類の器官に対応する器官領域(右目領域EA(r)と左目領域EA(l)と口領域MA)の少なくとも1つが検出されなかった場合を意味する。   When the organ area is not detected in the organ area detection process (step S150 in FIG. 3) (step S160: No), the original face area FAo selected in step S140 is an image area that truly corresponds to the face image. It is determined that an image area that is not is erroneously detected as the original face area FAo (step S170). In this case, setting of the determined face area FAf based on the selected original face area FAo (step S200 described later) is not executed. In this embodiment, the case where no organ area is detected means that in any organ detection image ODImg (see FIG. 10B), organ areas corresponding to three types of organs (right eye area EA ( It means that at least one of r), left eye area EA (l) and mouth area MA) is not detected.

器官領域検出処理(図3のステップS150)において、少なくとも1つの器官検出用画像ODImgにおいて3種類の器官に対応する器官領域(右目領域EA(r)と左目領域EA(l)と口領域MA)がすべて検出された場合には(ステップS160:Yes)、信頼度算出部220(図1)が、検出された各器官領域についての器官領域信頼度を算出する(ステップS180)。器官領域信頼度は、器官領域検出処理の結果に基づき算出される指標であって、器官領域検出処理により検出されたある種類の器官についての器官領域が真に当該種類の器官の画像に対応する画像領域であることの確からしさを表す指標である。器官領域検出処理では、顔の器官の画像に対応しない画像領域、すなわち、顔の器官の画像をまったく含まない画像領域や顔の器官の画像の一部を含むが顔の器官の画像に真に対応する画像領域ではない画像領域が、誤って器官領域として検出される場合がある。器官領域信頼度は、器官領域検出処理が、誤検出ではなく正しい検出であることの確からしさを表している。   In the organ region detection process (step S150 in FIG. 3), organ regions (right eye region EA (r), left eye region EA (l), and mouth region MA) corresponding to three types of organs in at least one organ detection image ODImg. Are detected (step S160: Yes), the reliability calculation unit 220 (FIG. 1) calculates the organ region reliability for each detected organ region (step S180). The organ region reliability is an index calculated based on the result of the organ region detection process, and an organ region for a certain type of organ detected by the organ region detection process truly corresponds to an image of the organ of that type. This is an index representing the certainty of being an image region. In the organ region detection process, an image region that does not correspond to the facial organ image, that is, an image region that does not include the facial organ image at all or a part of the facial organ image, is included in the facial organ image. An image area that is not a corresponding image area may be erroneously detected as an organ area. The organ region reliability represents the certainty that the organ region detection process is not a false detection but a correct detection.

本実施例では、重複ウィンドウ数を最大重複ウィンドウ数で除した値を器官領域信頼度として用いている。ここで、重複ウィンドウ数は、器官領域の設定の際に参照された判定対象画像領域JIAの数、すなわち判定対象画像領域JIAを規定するウィンドウSWの数である。例えば、図12(b)に示した右目領域EA(r)の設定の際には、図12(a)に示した互いに一部が重複する3つのウィンドウSW(SW1〜SW3)が参照されているため、重複ウィンドウ数は3となる。また、最大重複ウィンドウ数は、器官領域検出処理において器官検出用画像ODImg上に配置されたすべてのウィンドウSWの内、少なくとも一部が平均ウィンドウAW(図12(b)参照)に重複するウィンドウSWの数である。最大重複ウィンドウ数は、ウィンドウSWの移動ピッチやサイズ変更のピッチにより一義的に定まる。   In this embodiment, a value obtained by dividing the number of overlapping windows by the maximum number of overlapping windows is used as the organ region reliability. Here, the number of overlapping windows is the number of determination target image areas JIA referred to when setting the organ area, that is, the number of windows SW defining the determination target image area JIA. For example, when setting the right eye area EA (r) shown in FIG. 12B, the three windows SW (SW1 to SW3) partially overlapping each other shown in FIG. 12A are referred to. Therefore, the number of overlapping windows is 3. The maximum number of overlapping windows is the window SW in which at least a part of all the windows SW arranged on the organ detection image ODImg in the organ region detection process overlaps with the average window AW (see FIG. 12B). Is the number of The maximum number of overlapping windows is uniquely determined by the movement pitch of the window SW and the size change pitch.

検出された器官領域が真に顔の器官の画像に対応する画像領域である場合には、位置およびサイズが互いに近似する複数のウィンドウSWについて、判定対象画像領域JIAが顔の器官の画像に対応する画像領域であると判定される可能性が高い。一方、検出された器官領域が顔の器官の画像に対応する画像領域ではなく誤検出である場合には、あるウィンドウSWについては誤って判定対象画像領域JIAが顔の器官の画像に対応する画像領域であると判定されたとしても、当該ウィンドウSWに位置およびサイズが近似する別のウィンドウSWについては判定対象画像領域JIAが顔の器官の画像に対応する画像領域ではないと判定される可能性が高い。そのため、本実施例では、重複ウィンドウ数を最大重複ウィンドウ数で除した値を器官領域信頼度として用いている。   When the detected organ region is an image region that truly corresponds to the facial organ image, the determination target image region JIA corresponds to the facial organ image for a plurality of windows SW whose positions and sizes approximate each other. There is a high possibility that the image area is determined to be an image area. On the other hand, if the detected organ area is not an image area corresponding to the facial organ image but an erroneous detection, an image corresponding to the determination target image area JIA erroneously corresponds to the facial organ image for a certain window SW. Even if it is determined as an area, there is a possibility that the determination target image area JIA is not an image area corresponding to the facial organ image for another window SW whose position and size approximate to the window SW. Is expensive. Therefore, in this embodiment, a value obtained by dividing the number of overlapping windows by the maximum number of overlapping windows is used as the organ region reliability.

ステップS190(図3)では、顔傾き推定部215(図1)が、器官領域の検出結果に基づき、原顔領域FAo(図10(a))に表された顔の傾きを推定する。ステップS200では、顔領域決定部216(図1)が、推定された顔傾きに基づき、決定顔領域FAfを設定する。図14は、顔傾きの推定方法および決定顔領域FAfの設定方法を示す説明図である。図14(a)に示すように、顔傾き推定部215は、右目領域EA(r)の重心と左目領域EA(l)の重心とを結ぶ直線CLの傾きを、原顔領域FAoに表された顔の傾きであると推定する。すなわち、顔傾きは、右目領域EA(r)と左目領域EA(l)との間の位置関係に基づき推定される。   In step S190 (FIG. 3), the face inclination estimation unit 215 (FIG. 1) estimates the inclination of the face represented in the original face area FAo (FIG. 10A) based on the detection result of the organ area. In step S200, the face area determination unit 216 (FIG. 1) sets the determined face area FAf based on the estimated face inclination. FIG. 14 is an explanatory diagram showing a method for estimating the face inclination and a method for setting the determined face area FAf. As shown in FIG. 14A, the face inclination estimation unit 215 represents the inclination of the straight line CL connecting the centroid of the right eye area EA (r) and the centroid of the left eye area EA (l) in the original face area FAo. It is estimated that the face is tilted. That is, the face inclination is estimated based on the positional relationship between the right eye area EA (r) and the left eye area EA (l).

なお、器官領域検出処理(図9)において、複数の器官検出用画像ODImgから器官領域が検出された場合には、各器官領域(右目領域EA(r)、左目領域EA(l)、口領域MA)についての器官領域信頼度の合計が最も高い器官領域に基づき、顔傾きの推定が行われる。上述したように、顔器官学習データOLDは、器官領域検出処理において0度を中心に器官傾きの値がプラスマイナス15度の範囲の器官の画像を検出可能なように設定されている。一方、複数の器官検出用画像ODImg(図10(b))は、その傾きが互いに少なくとも30度異なっている。従って、本来、器官領域は1つの器官検出用画像ODImgからのみ検出されるべきであるが、誤検出等により複数の器官検出用画像ODImgから器官領域が検出される場合もあり得る。このような場合には、器官領域信頼度に基づき、顔傾きの推定に用いられる器官領域が選択される。   In the organ area detection process (FIG. 9), when an organ area is detected from a plurality of organ detection images ODImg, each organ area (right eye area EA (r), left eye area EA (l), mouth area) is detected. Face tilt is estimated based on the organ region with the highest total organ region reliability for MA). As described above, the facial organ learning data OLD is set so as to be able to detect an image of an organ whose organ inclination value is in the range of plus or minus 15 degrees around 0 degrees in the organ region detection process. On the other hand, the inclinations of the plurality of organ detection images ODImg (FIG. 10B) are different from each other by at least 30 degrees. Therefore, an organ region should be detected only from one organ detection image ODImg, but an organ region may be detected from a plurality of organ detection images ODImg due to erroneous detection or the like. In such a case, the organ region used for estimating the face inclination is selected based on the organ region reliability.

また、図14(b)に示すように、顔領域決定部216は、原顔領域FAoを規定する平均ウィンドウAWを平均ウィンドウAWの重心を中心として推定された顔傾き分だけ回転させ、回転後の平均ウィンドウAWにより規定される画像領域を決定顔領域FAfとして設定する。すなわち、決定顔領域FAfは、その外周の2辺が直線CLと平行な矩形の画像領域となる。なお、本実施例の顔領域決定部216は、本発明における顔領域再設定部に相当する。   Further, as shown in FIG. 14B, the face area determination unit 216 rotates the average window AW that defines the original face area FAo by the face inclination estimated around the center of gravity of the average window AW, and after the rotation The image area defined by the average window AW is set as the determined face area FAf. That is, the determined face area FAf is a rectangular image area whose two outer sides are parallel to the straight line CL. Note that the face area determination unit 216 of the present embodiment corresponds to a face area resetting unit in the present invention.

ステップS210(図3)では、領域検出部210(図1)が、ステップS140において未だ選択されていない原顔領域FAoが存在するか否かを判定する。未だ選択されていない原顔領域FAoが存在すると判定された場合には(ステップS210:No)、ステップS140に戻って未選択の原顔領域FAoの1つが選択され、ステップS150以降の処理が実行される。一方、すべての原顔領域FAoが選択されたと判定された場合には(ステップS210:Yes)、処理はステップS220に進む。   In step S210 (FIG. 3), area detection unit 210 (FIG. 1) determines whether or not there is an original face area FAo that has not yet been selected in step S140. If it is determined that there is an unselected original face area FAo (step S210: No), the process returns to step S140, and one of the unselected original face areas FAo is selected, and the processing from step S150 is executed. Is done. On the other hand, when it is determined that all the original face areas FAo have been selected (step S210: Yes), the process proceeds to step S220.

ステップS220(図3)では、情報付加部230(図1)が、設定された決定顔領域FAfの位置(座標)を示す情報を、原画像データを含む画像ファイルに付属情報として付加する。これにより、原画像OImgを表す原画像データと、原画像OImgにおける決定顔領域FAfの位置(座標)を示す情報と、が含まれた画像ファイルが生成される。なお、決定顔領域FAfの位置(座標)を示す情報に加えて、器官領域(右目領域EA(r)、左目領域EA(l)、口領域MA)の位置(座標)を示す情報や器官領域信頼度を示す情報が画像ファイルに付属情報として付加されるとしてもよい。   In step S220 (FIG. 3), the information adding unit 230 (FIG. 1) adds information indicating the set position (coordinates) of the determined face area FAf 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 position (coordinates) of the determined face area FAf in the original image OImg is generated. In addition to information indicating the position (coordinates) of the determined face area FAf, information indicating the position (coordinates) of the organ area (right eye area EA (r), left eye area EA (l), mouth area MA) or organ area Information indicating the reliability may be added to the image file as attached information.

生成された画像ファイルに含まれる種々の情報は、種々の用途に利用可能である。例えば、顔領域FA、あるいは顔領域FAに基づき設定された画像領域を対象画像領域として、所定の補正処理を行うことができる。所定の補正処理としては、例えば、対象画像領域内の画像の変形や肌色補正が挙げられる。   Various kinds of information included in the generated image file can be used for various purposes. For example, a predetermined correction process can be performed using the face area FA or an image area set based on the face area FA as a target image area. Examples of the predetermined correction process include image deformation and skin color correction in the target image area.

以上説明したように、本実施例のプリンタ100による顔領域検出処理では、顔検出用画像FDImgにおける原顔領域FAoの検出が行われることにより、顔検出用画像FDImgにおける顔の画像に対応する画像領域の位置が特定される。また、原顔領域FAoにおける器官領域(右目領域EA(r)、左目領域EA(l)、口領域MA)の検出が行われ、器官領域の検出結果に基づき、原顔領域FAoに表された顔の画像面内における傾き(顔傾き)が推定されることにより、顔検出用画像FDImgにおける顔の画像の傾きが特定される。ここで、器官領域の検出の際には、原顔領域FAoを対象としたウィンドウSWによる判定対象画像領域JIAの設定が行われるが、この処理に要する時間は、顔検出用画像FDImg全体を対象としたウィンドウSWによる判定対象画像領域JIAの設定に要する時間と比較して、極めて短い。そのため、本実施例のプリンタ100による顔領域検出処理では、顔領域検出処理の高速化を図りつつ、顔領域の位置や傾きに関する検出精度を向上させることができる。   As described above, in the face area detection process performed by the printer 100 according to the present embodiment, an image corresponding to the face image in the face detection image FDImg is detected by detecting the original face area FAo in the face detection image FDImg. The position of the region is specified. In addition, an organ area (right eye area EA (r), left eye area EA (l), mouth area MA) in the original face area FAo is detected, and is represented in the original face area FAo based on the detection result of the organ area. By estimating the inclination of the face in the image plane (face inclination), the inclination of the face image in the face detection image FDImg is specified. Here, when the organ area is detected, the determination target image area JIA is set by the window SW for the original face area FAo. The time required for this processing is the entire face detection image FDImg. Compared to the time required for setting the determination target image area JIA by the window SW, the time is extremely short. Therefore, in the face area detection process performed by the printer 100 according to the present embodiment, it is possible to improve the detection accuracy related to the position and inclination of the face area while increasing the speed of the face area detection process.

特に、本実施例のプリンタ100による顔領域検出処理では、顔学習データFLDが、画像面内における互いに異なる任意の傾きを有する複数の顔サンプル画像を含む顔サンプル画像群を用いた学習により生成されており、0度から360度までのすべての顔傾きの顔の画像を検出可能な学習データとなっている。そのため、原顔領域検出処理(図4)において、1つの判定対象画像領域JIAについて、累計評価値Tvの算出や閾値TH判定は1度だけ実行されればよい。そのため、本実施例のプリンタ100による顔領域検出処理では、処理の高速化を十分に図ることができる。   In particular, in the face area detection processing by the printer 100 of this embodiment, the face learning data FLD is generated by learning using a face sample image group including a plurality of face sample images having arbitrary different inclinations in the image plane. In other words, the learning data can detect all face inclination images from 0 degrees to 360 degrees. Therefore, in the original face area detection process (FIG. 4), the calculation of the cumulative evaluation value Tv and the threshold TH determination need only be executed once for one determination target image area JIA. Therefore, in the face area detection process performed by the printer 100 according to the present embodiment, the processing speed can be sufficiently increased.

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:
上記実施例では、器官領域検出処理(図3のステップS150)においていずれの器官検出用画像ODImgにおいても3種類の器官に対応する器官領域(右目領域EA(r)と左目領域EA(l)と口領域MA)の少なくとも1つが検出されなかった場合に、器官領域が検出されなかったと判定されるとしているが、3種類の器官領域の少なくとも1つが検出された場合には器官領域が検出されたと判定されるものとしてもよい。あるいは、口領域MAの検出結果に関わらず、顔傾きの推定(ステップS190)に用いられる右目領域EA(r)と左目領域EA(l)の両者が検出された場合には器官領域が検出されたと判定され、右目領域EA(r)と左目領域EA(l)の少なくとも一方が検出されなかった場合には器官領域が検出されなかったと判定されるとしてもよい。
B1. Modification 1:
In the embodiment described above, in any organ detection image ODImg in the organ region detection process (step S150 in FIG. 3), organ regions (right eye region EA (r) and left eye region EA (l)) corresponding to three types of organs. If at least one of the mouth areas MA) is not detected, it is determined that the organ area is not detected. If at least one of the three types of organ areas is detected, the organ area is detected. It may be determined. Or, regardless of the detection result of the mouth area MA, when both the right eye area EA (r) and the left eye area EA (l) used for face inclination estimation (step S190) are detected, the organ area is detected. If at least one of the right eye area EA (r) and the left eye area EA (l) is not detected, it may be determined that the organ area is not detected.

なお、3種類の器官領域の少なくとも1つが検出されたときには器官領域が検出されたと判定されるとした場合、顔傾きの推定(ステップS190)に右目領域EA(r)と左目領域EA(l)との一方または両方が利用できないことが考えられる。このような場合には、器官領域が検出された器官検出用画像ODImgの傾きを顔傾きと推定すればよい。   If it is determined that an organ region has been detected when at least one of the three types of organ regions is detected, the right-eye region EA (r) and the left-eye region EA (l) are used for face inclination estimation (step S190). Or one or both of them may not be available. In such a case, the inclination of the organ detection image ODImg in which the organ area is detected may be estimated as the face inclination.

また、上記実施例では、器官領域検出処理(図3のステップS150)において器官領域が検出された場合には、器官領域信頼度の算出(ステップS180)が行われるとしているが、器官領域が複数の器官検出用画像ODImgから検出された場合にのみ、顔傾きの推定(ステップS190)に用いる器官領域を決定するために器官領域信頼度の算出が実行され、器官領域が1つの器官検出用画像ODImgからのみ検出された場合には器官領域信頼度の算出は実行されないとしてもよい。   In the above embodiment, when an organ region is detected in the organ region detection process (step S150 in FIG. 3), the organ region reliability is calculated (step S180). Only when it is detected from the organ detection image ODImg, the organ region reliability is calculated in order to determine the organ region used for the estimation of the face inclination (step S190), and the organ region has one organ detection image. When it is detected only from ODImg, the calculation of the organ region reliability may not be executed.

また、算出された器官領域信頼度が所定の閾値より低い場合には、器官領域検出処理において器官領域が検出されなかった場合と同様に、ステップS140で選択された原顔領域FAoは真に顔の画像に対応する画像領域ではない画像領域が誤って原顔領域FAoとして検出されたと判定されるものとしてもよい。   If the calculated organ area reliability is lower than a predetermined threshold, the original face area FAo selected in step S140 is a true face as in the case where the organ area is not detected in the organ area detection process. It may be determined that an image area that is not an image area corresponding to the first image is erroneously detected as the original face area FAo.

B2.変形例2:
上記実施例では、器官領域検出処理(図9)に、30度間隔で傾きが互いに異なる12個の器官検出用画像ODImg(図10(b))が用いられているが、これは、本実施例の顔器官学習データOLDが、0度を中心に器官傾きの値がプラスマイナス15度の範囲の器官の画像を検出可能なように設定されているからである。器官検出用画像ODImgの傾きの違い(すなわち生成される器官検出用画像ODImgの個数)は、顔器官学習データOLDの検出可能な器官傾きの範囲に応じて、種々変形される。例えば、顔器官学習データOLDが、0度を中心に器官傾きの値がプラスマイナス10度の範囲の器官の画像を検出可能なように設定されている場合には、20度間隔で傾きが互いに異なる18個の器官検出用画像ODImgが器官領域検出処理に用いられる。
B2. Modification 2:
In the above embodiment, 12 organ detection images ODImg (FIG. 10B) having different inclinations at intervals of 30 degrees are used for the organ region detection process (FIG. 9). This is because the facial organ learning data OLD in the example is set so that an image of an organ having an organ inclination value in the range of plus or minus 15 degrees around 0 degrees can be detected. The difference in inclination of the organ detection image ODImg (that is, the number of generated organ detection images ODImg) is variously modified according to the range of the organ inclination that can be detected in the facial organ learning data OLD. For example, when the facial organ learning data OLD is set so as to be able to detect an image of an organ with a value of the organ inclination in the range of plus or minus 10 degrees centering on 0 degree, the inclinations are mutually spaced at intervals of 20 degrees. 18 different organ detection images ODImg are used in the organ region detection process.

B3.変形例3:
上記実施例では、顔傾きの推定(図3のステップS190)の後に、決定顔領域FAfの設定(ステップS200)が行われているが、決定顔領域FAfの設定は必ずしも行われる必要はない。すなわち、顔領域検出処理の出力は、原顔領域FAoの位置と推定顔傾きとのみであってもよい。
B3. Modification 3:
In the above embodiment, the setting of the determined face area FAf (step S200) is performed after the estimation of the face inclination (step S190 in FIG. 3). However, the setting of the determined face area FAf is not necessarily performed. That is, the output of the face area detection process may be only the position of the original face area FAo and the estimated face inclination.

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:
上述した器官領域信頼度の算出方法は種々変形可能である。例えば、器官領域検出処理(図9)のステップS560において算出された累計評価値Tvを器官領域信頼度として用いるとしてもよい。器官領域が真に顔の器官の画像に対応する画像領域である場合には累計評価値Tvは大きい値になる可能性が高いため、累計評価値Tvを器官領域信頼度として用いることが可能である。なお、器官領域設定処理(図9のステップS630)の際に複数のウィンドウSWが考慮された場合には、各ウィンドウSWに対応した判定対象画像領域JIAについて算出された累計評価値Tvの平均を信頼度として用いればよい。
B5. Modification 5:
The above-described organ region reliability calculation method can be variously modified. For example, the cumulative evaluation value Tv calculated in step S560 of the organ region detection process (FIG. 9) may be used as the organ region reliability. If the organ region is an image region that truly corresponds to an image of a facial organ, the cumulative evaluation value Tv is likely to be a large value, so the cumulative evaluation value Tv can be used as the organ region reliability. is there. When a plurality of windows SW are considered during the organ area setting process (step S630 in FIG. 9), the average of the cumulative evaluation values Tv calculated for the determination target image area JIA corresponding to each window SW is calculated. What is necessary is just to use as reliability.

また、累計評価値Tvの算出のために算出された各フィルタXについての評価値vXを用いて器官領域信頼度を算出するとしてもよい。すなわち、累計評価値Tvの算出の際には、評価値vXは、閾値thXとの比較判定によって1または0の値に変換された後に重み係数WeXを乗じられていたが、評価値vXそのものと重み係数WeXとを乗算し、その積の合計を信頼度として用いるとしてもよい。器官領域が真に顔の器官の画像に対応する画像領域である場合には上記積の合計は大きい値になる可能性が高いため、上記積の合計を信頼度として用いることが可能である。なお、器官領域の設定の際に複数のウィンドウSWが考慮された場合には、各ウィンドウSWに対応した判定対象画像領域JIAについて算出された評価値vXと重み係数WeXとの積の合計の平均を信頼度として用いればよい。   Further, the organ region reliability may be calculated using the evaluation value vX for each filter X calculated for calculating the cumulative evaluation value Tv. That is, when calculating the cumulative evaluation value Tv, the evaluation value vX has been converted to a value of 1 or 0 by comparison with the threshold thX and then multiplied by the weighting coefficient WeX. The weight coefficient WeX may be multiplied and the sum of the products may be used as the reliability. If the organ region is an image region that truly corresponds to an image of a facial organ, the sum of the products is likely to be a large value. Therefore, the sum of the products can be used as the reliability. When a plurality of windows SW are taken into account when setting the organ area, the average of the sum of products of the evaluation value vX calculated for the determination target image area JIA corresponding to each window SW and the weighting coefficient WeX. May be used as the reliability.

また、上記実施例のように、候補重複ウィンドウ数を最大重複ウィンドウ数で除した値を器官領域原信頼度として用いる場合に、候補重複ウィンドウ数が所定数以上となった場合には、信頼度は最大値であるとみなし、それ以降、重複する位置にウィンドウSWを配置しないようにしてもよい。このようにすれば、処理の高速化を図ることができる。   Further, as in the above embodiment, when a value obtained by dividing the number of candidate overlapping windows by the maximum number of overlapping windows is used as the organ region original reliability, when the number of candidate overlapping windows is a predetermined number or more, the reliability May be regarded as the maximum value, and thereafter, the window SW may not be arranged at an overlapping position. In this way, the processing speed can be increased.

また、上記実施例では、器官領域信頼度は、顔の器官の種類(右目、左目、口)毎に算出されているが、すべての顔の器官の種類に対応した1つの器官領域信頼度が算出されるとしてもよい。   In the above embodiment, the organ region reliability is calculated for each type of facial organ (right eye, left eye, mouth), but one organ region reliability corresponding to all types of facial organs is used. It may be calculated.

B6.変形例6:
上記実施例における原顔領域検出処理(図4)や器官領域検出処理(図9)の態様はあくまで一例であり、種々変更可能である。例えば顔検出用画像FDImg(図5参照)のサイズは320画素×240画素に限られず、他のサイズであってもよいし、原画像OImgそのものを顔検出用画像FDImgとして用いることも可能である。また、使用されるウィンドウSWのサイズやウィンドウSWの移動方向および移動量(移動ピッチ)は上述したものに限られない。また、上記実施例では、顔検出用画像FDImgのサイズが固定され、複数種類のサイズのウィンドウSWが顔検出用画像FDImg上に配置されることにより複数サイズの判定対象画像領域JIAが設定されているが、複数種類のサイズの顔検出用画像FDImgが生成され、固定サイズのウィンドウSWが顔検出用画像FDImg上に配置されることにより複数サイズの判定対象画像領域JIAが設定されるものとしてもよい。
B6. Modification 6:
The aspects of the original face area detection process (FIG. 4) and the organ area detection process (FIG. 9) 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. 5) 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と比較することにより顔判定および器官判定を行っているが(図6参照)、顔判定および器官判定を複数の判別器を用いた判別等の他の方法によって行ってもよい。顔判定および器官判定の方法に応じて、顔学習データFLDおよび顔器官学習データOLDの設定に用いられる学習方法も変更される。また、顔判定および器官判定は、必ずしも学習を用いた判別方法により行われる必要はなく、パターンマッチング等の他の方法により行われるとしてもよい。   In the above embodiment, the face evaluation and the organ determination are performed by comparing the cumulative evaluation value Tv with the threshold value TH (see FIG. 6), 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.

上記実施例では、原顔領域FAoおよび器官領域は矩形の領域であるが、原顔領域FAoおよび器官領域は矩形以外の形状の領域であってもよい。   In the above embodiment, the original face area FAo and the organ area are rectangular areas, but the original face area FAo and the organ area may be areas having shapes other than the rectangle.

上記実施例では、画像処理装置としてのプリンタ100による顔領域検出処理を説明したが、処理の一部または全部がパーソナルコンピュータやデジタルスチルカメラ、デジタルビデオカメラ等の他の種類の画像処理装置により実行されるものとしてもよい。また、プリンタ100はインクジェットプリンタに限らず、他の方式のプリンタ、例えばレーザプリンタや昇華型プリンタであるとしてもよい。   In the above embodiment, the face area detection process by the printer 100 as the image processing apparatus has been described. However, part or all of the process is executed by another type of image processing apparatus such as a personal computer, a digital still camera, or a digital video camera. It is good also as what is done. The printer 100 is not limited to an ink jet printer, and may be another type of printer, such as a laser printer or a sublimation printer.

上記実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部をハードウェアに置き換えるようにしてもよい。   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の構成を概略的に示す説明図である。1 is an explanatory diagram schematically illustrating a configuration of a printer 100 as an image processing apparatus according to an embodiment of the present invention. 顔学習データFLDおよび顔器官学習データOLDを示す説明図である。It is explanatory drawing which shows the face learning data FLD and the facial organ learning data OLD. 顔領域検出処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a face area | region detection process. 原顔領域検出処理の流れを示すフローチャートである。It is a flowchart which shows the flow of an original face area | region detection process. 原顔領域検出処理の概要を示す説明図である。It is explanatory drawing which shows the outline | summary of an original face area | region detection process. 顔判定に用いる累計評価値Tvの算出方法の概要を示す説明図である。It is explanatory drawing which shows the outline | summary of the calculation method of accumulated evaluation value Tv used for face determination. 学習に用いられるサンプル画像の一例を示す説明図である。It is explanatory drawing which shows an example of the sample image used for learning. 原顔領域設定処理の概要を示す説明図である。It is explanatory drawing which shows the outline | summary of an original face area | region setting process. 器官領域検出処理の流れを示すフローチャートである。It is a flowchart which shows the flow of an organ area | region detection process. 器官検出用画像ODImgの一例を示す説明図である。It is explanatory drawing which shows an example of the image ODImg for organ detection. 器官領域検出処理の概要を示す説明図である。It is explanatory drawing which shows the outline | summary of an organ area | region detection process. 器官領域設定処理の概要を示す説明図である。It is explanatory drawing which shows the outline | summary of an organ area | region setting process. 器官領域検出処理の結果の一例を示す説明図である。It is explanatory drawing which shows an example of the result of an organ area | region detection process. 顔傾きの推定方法および決定顔領域FAfの設定方法を示す説明図である。It is explanatory drawing which shows the estimation method of the face inclination, and the setting method of the determination face area | region FAf.

符号の説明Explanation of symbols

100…プリンタ
110…CPU
120…内部メモリ
140…操作部
150…表示部
160…プリンタエンジン
170…カードインターフェース
172…カードスロット
200…画像処理部
210…領域検出部
211…判定対象設定部
212…評価値算出部
213…判定部
214…領域設定部
215…顔傾き推定部
216…顔領域決定部
220…信頼度算出部
230…情報付加部
310…表示処理部
320…印刷処理部
100 ... Printer 110 ... CPU
DESCRIPTION OF SYMBOLS 120 ... Internal memory 140 ... Operation part 150 ... Display part 160 ... Printer engine 170 ... Card interface 172 ... Card slot 200 ... Image processing part 210 ... Area | region detection part 211 ... Determination object setting part 212 ... Evaluation value calculation part 213 ... Determination part 214 ... Area setting unit 215 ... Face inclination estimation unit 216 ... Face region determination unit 220 ... Reliability calculation unit 230 ... Information addition unit 310 ... Display processing unit 320 ... Print processing unit

Claims (12)

画像処理装置であって、
対象画像データの表す対象画像における顔の画像に対応する顔領域の検出を行う顔領域検出部と、
検出された前記顔領域における顔の器官の画像に対応する器官領域の検出を行う器官領域検出部と、
前記器官領域の検出結果に基づき、前記顔領域に表された顔の画像面内における傾きを推定する顔傾き推定部と、を備える、画像処理装置。
An image processing apparatus,
A face area detection unit that detects a face area corresponding to a face image in the target image represented by the target image data;
An organ region detector for detecting an organ region corresponding to an image of a facial organ in the detected face region;
An image processing apparatus comprising: a face inclination estimation unit that estimates an inclination in an image plane of a face represented in the face area based on a detection result of the organ area.
請求項1に記載の画像処理装置であって、
前記顔領域検出部は、
前記対象画像上における画像領域である判定対象画像領域を設定する判定対象設定部と、
前記判定対象画像領域が顔の画像に対応する画像領域であることの確からしさを表す評価値を算出するための評価用データを記憶する記憶部と、
前記評価用データと前記判定対象画像領域に対応する画像データとに基づき前記評価値を算出する評価値算出部と、
前記評価値に基づき、前記判定対象画像領域が顔の画像に対応する画像領域であるか否かを判定する判定部と、
顔の画像に対応する画像領域であると判定された前記判定対象画像領域の位置およびサイズに基づき前記顔領域を設定する領域設定部と、を含む、画像処理装置。
The image processing apparatus according to claim 1,
The face area detection unit
A determination target setting unit that sets a determination target image region that is an image region on the target image;
A storage unit for storing evaluation data for calculating an evaluation value indicating the certainty that the determination target image region is an image region corresponding to a face image;
An evaluation value calculation unit that calculates the evaluation value based on the evaluation data and image data corresponding to the determination target image region;
A determination unit that determines whether or not the determination target image region is an image region corresponding to a face image based on the evaluation value;
And an area setting unit that sets the face area based on the position and size of the determination target image area determined to be an image area corresponding to a face image.
請求項2に記載の画像処理装置であって、
前記評価用データは、画像面内における互いに異なる任意の傾きを有する複数の顔の画像を含む顔画像群を用いた学習により生成される、画像処理装置。
The image processing apparatus according to claim 2,
The evaluation data is generated by learning using a face image group including a plurality of face images having arbitrary different inclinations in an image plane.
請求項3に記載の画像処理装置であって、
前記顔画像群は、画像面内における傾きが互いに30度以上異なる複数の顔の画像を含む、画像処理装置。
The image processing apparatus according to claim 3,
The face image group includes an image processing apparatus including a plurality of face images whose inclinations in an image plane differ from each other by 30 degrees or more.
請求項3または請求項4に記載の画像処理装置であって、
前記評価値は、前記判定対象画像領域が前記顔画像群に含まれる顔の画像の傾きと同一の傾きを有する顔の画像に対応する画像領域であることの確からしさを表す、画像処理装置。
The image processing apparatus according to claim 3 or 4, wherein:
The image processing apparatus represents the probability that the evaluation target image area is an image area corresponding to a face image having the same inclination as that of a face image included in the face image group.
請求項1ないし請求項5のいずれかに記載の画像処理装置であって、
前記器官領域検出部は、少なくとも2種類の器官に対応する前記器官領域の検出を行い、
前記顔傾き推定部は、前記少なくとも2種類の器官に対応する前記器官領域間の位置関係に基づき、前記傾きを推定する、画像処理装置。
An image processing apparatus according to any one of claims 1 to 5,
The organ region detection unit detects the organ region corresponding to at least two types of organs,
The image processing apparatus, wherein the face inclination estimation unit estimates the inclination based on a positional relationship between the organ regions corresponding to the at least two types of organs.
請求項6に記載の画像処理装置であって、さらに、
前記器官領域の検出結果に基づき、検出された前記器官領域が真に顔の器官の画像に対応する画像領域であることの確からしさを表す器官領域信頼度を算出する信頼度算出部を備え、
前記顔傾き推定部は、特定の種類の器官に対応する前記器官領域が複数検出された場合には、前記器官領域信頼度に基づき、前記傾きの推定に利用する前記器官領域を選択する、画像処理装置。
The image processing apparatus according to claim 6, further comprising:
Based on the detection result of the organ region, a reliability calculation unit that calculates an organ region reliability that represents the probability that the detected organ region is an image region that truly corresponds to an image of a facial organ,
The face inclination estimation unit selects the organ area to be used for the inclination estimation based on the organ area reliability when a plurality of the organ areas corresponding to a specific type of organ are detected. Processing equipment.
請求項7に記載の画像処理装置であって、
前記器官領域検出部は、
前記顔領域上における画像領域である判定対象画像領域を設定する判定対象設定部と、
前記判定対象画像領域が顔の器官の画像に対応する画像領域であることの確からしさを表す評価値を算出するための評価用データを記憶する記憶部と、
前記評価用データと前記判定対象画像領域に対応する画像データとに基づき前記評価値を算出する評価値算出部と、
前記評価値に基づき、前記判定対象画像領域が顔の器官の画像に対応する画像領域であるか否かを判定する判定部と、
顔の器官の画像に対応する画像領域であると判定された1つまたは複数の互いに一部が重複する前記判定対象画像領域の位置およびサイズに基づき前記器官領域を設定する領域設定部と、を含み、
前記信頼度算出部は、前記器官領域の設定の際に参照された前記判定対象画像領域の数と前記評価値との少なくとも1つに基づき前記器官領域信頼度を算出する、画像処理装置。
The image processing apparatus according to claim 7,
The organ region detection unit is
A determination target setting unit that sets a determination target image region that is an image region on the face region;
A storage unit for storing evaluation data for calculating an evaluation value representing the probability that the determination target image region is an image region corresponding to an image of a facial organ;
An evaluation value calculation unit that calculates the evaluation value based on the evaluation data and image data corresponding to the determination target image region;
A determination unit that determines whether the determination target image region is an image region corresponding to an image of a facial organ based on the evaluation value;
An area setting unit configured to set the organ area based on the position and size of the determination target image area partially overlapping each other as one or a plurality of image areas determined to be image areas corresponding to facial organ images; Including
The image processing apparatus, wherein the reliability calculation unit calculates the organ area reliability based on at least one of the number of the determination target image areas and the evaluation value referred to when the organ area is set.
請求項1ないし請求項8のいずれかに記載の画像処理装置であって、さらに、
前記推定された傾きに基づき、前記顔領域を再設定する顔領域再設定部を備える、画像処理装置。
The image processing apparatus according to claim 1, further comprising:
An image processing apparatus comprising: a face area resetting unit that resets the face area based on the estimated inclination.
請求項1ないし請求項9のいずれかに記載の画像処理装置であって、
前記顔の器官の種類は、右目と左目と口との少なくとも1つである、画像処理装置。
An image processing apparatus according to any one of claims 1 to 9, wherein
The type of facial organ is at least one of a right eye, a left eye, and a mouth.
画像処理方法であって、
(a)対象画像データの表す対象画像における顔の画像に対応する顔領域の検出を行う工程と、
(b)検出された前記顔領域における顔の器官の画像に対応する器官領域の検出を行う工程と、
(c)前記器官領域の検出結果に基づき、前記顔領域に表された顔の画像面内における傾きを推定する工程と、を備える、画像処理方法。
An image processing method comprising:
(A) detecting a face area corresponding to a face image in the target image represented by the target image data;
(B) detecting an organ region corresponding to an image of a facial organ in the detected face region;
(C) based on the detection result of the organ region, estimating an inclination in the image plane of the face represented in the face region.
画像処理のためのコンピュータプログラムであって、
対象画像データの表す対象画像における顔の画像に対応する顔領域の検出を行う顔領域検出機能と、
検出された前記顔領域における顔の器官の画像に対応する器官領域の検出を行う器官領域検出機能と、
前記器官領域の検出結果に基づき、前記顔領域に表された顔の画像面内における傾きを推定する顔傾き推定機能と、を、コンピュータに実現させる、コンピュータプログラム。
A computer program for image processing,
A face area detection function for detecting a face area corresponding to a face image in the target image represented by the target image data;
An organ region detection function for detecting an organ region corresponding to an image of a facial organ in the detected face region;
A computer program for causing a computer to realize a face inclination estimation function for estimating an inclination in an image plane of a face represented in the face area based on a detection result of the organ area.
JP2008079224A 2008-03-25 2008-03-25 Detection of face area corresponding to face image from target image Withdrawn JP2009237613A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008079224A JP2009237613A (en) 2008-03-25 2008-03-25 Detection of face area corresponding to face image from target image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008079224A JP2009237613A (en) 2008-03-25 2008-03-25 Detection of face area corresponding to face image from target image

Publications (1)

Publication Number Publication Date
JP2009237613A true JP2009237613A (en) 2009-10-15

Family

ID=41251531

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008079224A Withdrawn JP2009237613A (en) 2008-03-25 2008-03-25 Detection of face area corresponding to face image from target image

Country Status (1)

Country Link
JP (1) JP2009237613A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10307923A (en) * 1997-05-01 1998-11-17 Mitsubishi Electric Corp Face parts extraction device and face direction detection device
JP2003236198A (en) * 2002-02-18 2003-08-26 Aruze Corp Player recognizing and responding system
JP2005311888A (en) * 2004-04-23 2005-11-04 Omron Corp Magnified display device and magnified image control apparatus
JP2006139369A (en) * 2004-11-10 2006-06-01 Fuji Photo Film Co Ltd Image processing method and apparatus, and program
JP2006228061A (en) * 2005-02-18 2006-08-31 Fujitsu Ltd Face tracing program and face tracing method
JP2007115109A (en) * 2005-10-21 2007-05-10 Sony Corp Image processor and processing method, program and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10307923A (en) * 1997-05-01 1998-11-17 Mitsubishi Electric Corp Face parts extraction device and face direction detection device
JP2003236198A (en) * 2002-02-18 2003-08-26 Aruze Corp Player recognizing and responding system
JP2005311888A (en) * 2004-04-23 2005-11-04 Omron Corp Magnified display device and magnified image control apparatus
JP2006139369A (en) * 2004-11-10 2006-06-01 Fuji Photo Film Co Ltd Image processing method and apparatus, and program
JP2006228061A (en) * 2005-02-18 2006-08-31 Fujitsu Ltd Face tracing program and face tracing method
JP2007115109A (en) * 2005-10-21 2007-05-10 Sony Corp Image processor and processing method, program and storage medium

Similar Documents

Publication Publication Date Title
JP2009237619A (en) Detection of face area and organ area in image
KR101365789B1 (en) Facial feature point position correcting device, facial feature point position correcting method, and computer readable recording medium recording facial feature point position correcting program
CN109426835B (en) Information processing apparatus, control method of information processing apparatus, and storage medium
US8249312B2 (en) Image processing device and image processing method
JP2009277027A (en) Detection of organ area corresponding to facial organ image in image
US8923610B2 (en) Image processing apparatus, image processing method, and computer readable medium
EP3093822B1 (en) Displaying a target object imaged in a moving picture
US20090028390A1 (en) Image Processing for Estimating Subject Distance
US8457365B2 (en) Device, method and computer readable recording medium containing program for evaluating image
JP4957607B2 (en) Detection of facial regions in images
US20080240516A1 (en) Image Processing Apparatus and Image Processing Method
US11244192B2 (en) Image judging system, image judging apparatus, and image judging method
JP2009282699A (en) Detection of organ area corresponding to image of organ of face in image
JP5461782B2 (en) Camera image simulator program
JP2010224681A (en) Image detection device, image detection method, and image detection program
JP7020240B2 (en) Recognition device, recognition system, program and position coordinate detection method
JP4985510B2 (en) Set the face area corresponding to the face image in the target image
CN109901716B (en) Sight point prediction model establishing method and device and sight point prediction method
JP2010244251A (en) Image processor for detecting coordinate position for characteristic site of face
JP2009237857A (en) Setting of organ area corresponding to facial organ image in image
JP2010102396A (en) Person detection device, person detection method, and program
JP2009237618A (en) Detection of face area in image
JP2010186268A (en) Image processor, printer, image processing method and image processing program
JP2009237613A (en) Detection of face area corresponding to face image from target image
CN112541506B (en) Text image correction method, device, equipment and medium

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: 20111208

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111213

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120213

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120327

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20120508