JP2009237614A - Setting of face area corresponding to face image in target image - Google Patents

Setting of face area corresponding to face image in target image Download PDF

Info

Publication number
JP2009237614A
JP2009237614A JP2008079228A JP2008079228A JP2009237614A JP 2009237614 A JP2009237614 A JP 2009237614A JP 2008079228 A JP2008079228 A JP 2008079228A JP 2008079228 A JP2008079228 A JP 2008079228A JP 2009237614 A JP2009237614 A JP 2009237614A
Authority
JP
Japan
Prior art keywords
face
image
area
face area
inclination
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.)
Granted
Application number
JP2008079228A
Other languages
Japanese (ja)
Other versions
JP4985510B2 (en
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 JP2008079228A priority Critical patent/JP4985510B2/en
Publication of JP2009237614A publication Critical patent/JP2009237614A/en
Application granted granted Critical
Publication of JP4985510B2 publication Critical patent/JP4985510B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To attain coordination between accuracy and processing time of face area setting process. <P>SOLUTION: An image processing apparatus includes: a face area detecting unit for detecting an area corresponding to an image of a face in a target area as an original face area on the basis of image data; an organ area detecting unit for detecting areas corresponding to facial organ images in the original face area as organ areas; and a face area determining unit for setting a determined face area corresponding to the image of the face in a target image. The face area determining unit has a first processing mode for setting the original face area as the determined face area, and a second processing mode for setting an area where the original face area is adjusted based on the detection result of the organ areas as the determined face area. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、対象画像における顔の画像に対応する顔領域の設定に関する。   The present invention relates to setting of a face area corresponding to a face image in a target image.

画像データの表す画像中から部分画像を順次切り出し、切り出した部分画像が顔に対応する画像であるか否かを判定することにより、顔の画像に対応する顔領域を設定する技術が知られている(例えば特許文献1ないし4)。   A technique for setting a face area corresponding to a face image by sequentially cutting out partial images from an image represented by image data and determining whether or not the cut out partial image is an image corresponding to a face is known. (For example, Patent Documents 1 to 4).

特開2007−241477号公報JP 2007-241477 A 特開2007−94633号公報JP 2007-94633 A 特開2007−193404号公報JP 2007-193404 A 特開2007−193740号公報JP 2007-193740 A

対象画像における顔領域の設定においては、顔領域の設定精度と処理時間との調整を図ることが望まれていた。   In setting the face area in the target image, it has been desired to adjust the setting accuracy of the face area and the processing time.

本発明は、上記の課題を解決するためになされたものであり、顔領域設定処理の精度と処理時間との調整を図ることを可能とする技術を提供することを目的とする。   SUMMARY An advantage of some aspects of the invention is that it provides a technique capable of adjusting the accuracy and processing time of face area setting processing.

上記課題の少なくとも一部を解決するために、本発明は、以下の形態または適用例として実現することが可能である。   In order to solve at least a part of the above problems, the present invention can be realized as the following forms or application examples.

[適用例1]画像処理装置であって、
画像データに基づき対象画像における顔の画像に対応する領域を原顔領域として検出する顔領域検出部と、
前記原顔領域における顔の器官の画像に対応する領域を器官領域として検出する器官領域検出部と、
前記対象画像における顔の画像に対応する決定顔領域を設定する顔領域決定部であって、前記原顔領域を前記決定顔領域として設定する第1の処理モードと、前記器官領域の検出結果に基づき前記原顔領域を調整した領域を前記決定顔領域として設定する第2の処理モードと、を有する顔領域決定部と、を備える、画像処理装置。
Application Example 1 An image processing apparatus,
A face area detection unit that detects an area corresponding to a face image in the target image based on image data as an original face area;
An organ region detection unit that detects a region corresponding to an image of a facial organ in the original face region as an organ region;
A face area determination unit that sets a determined face area corresponding to a face image in the target image, the first processing mode for setting the original face area as the determined face area, and the detection result of the organ area An image processing apparatus comprising: a face area determination unit having a second processing mode in which an area obtained by adjusting the original face area is set as the determined face area.

この画像処理装置では、第1の処理モードでは、画像データに基づき検出された原顔領域が決定顔領域として設定され、第2の処理モードでは、画像データに基づき原顔領域が検出され、原顔領域における器官領域が検出され、器官領域の検出結果に基づき原顔領域を調整した領域が決定顔領域として設定される。そのため、この画像処理装置では、顔領域設定処理の精度と処理時間との調整を図ることができる。   In this image processing apparatus, in the first processing mode, the original face area detected based on the image data is set as the determined face area, and in the second processing mode, the original face area is detected based on the image data. An organ area in the face area is detected, and an area obtained by adjusting the original face area based on the detection result of the organ area is set as the determined face area. Therefore, in this image processing apparatus, it is possible to adjust the accuracy and processing time of the face area setting process.

[適用例2]適用例1に記載の画像処理装置であって、さらに、
前記決定顔領域を設定する際の精度を設定する精度設定部を備え、
前記顔領域決定部は、前記精度が所定の範囲の場合には前記第1の処理モードで前記決定顔領域を設定し、前記精度が前記所定の範囲より高い場合には前記第2の処理モードで前記決定顔領域を設定する、画像処理装置。
Application Example 2 The image processing apparatus according to Application Example 1, further comprising:
An accuracy setting unit for setting the accuracy when setting the determined face area;
The face area determination unit sets the determined face area in the first processing mode when the accuracy is within a predetermined range, and the second processing mode when the accuracy is higher than the predetermined range. An image processing apparatus for setting the determined face area by using

この画像処理装置では、設定された精度に応じて決定顔領域を設定する際の処理モードが選択されるため、設定された精度に応じて顔領域設定処理の精度と処理時間との調整を図ることができる。   In this image processing apparatus, since the processing mode for setting the determined face area is selected according to the set accuracy, the accuracy of the face area setting process and the processing time are adjusted according to the set accuracy. be able to.

[適用例3]適用例1または適用例2に記載の画像処理装置であって、
前記精度設定部は、前記決定顔領域の用途を特定する用途情報を取得し、前記用途情報に基づき前記精度を設定する、画像処理装置。
[Application Example 3] The image processing apparatus according to Application Example 1 or Application Example 2,
The accuracy setting unit is an image processing apparatus that acquires usage information specifying a usage of the determined face area, and sets the accuracy based on the usage information.

この画像処理装置では、決定顔領域の用途に応じて顔領域設定処理の精度と処理時間との調整を図ることができる。   In this image processing apparatus, it is possible to adjust the accuracy and processing time of the face area setting process according to the use of the determined face area.

[適用例4]適用例1ないし適用例3のいずれかに記載の画像処理装置であって、
前記顔領域決定部は、前記第2のモードにおいて、検出された複数の前記器官領域間の位置関係に基づき前記原顔領域の傾きを調整することにより前記決定顔領域を設定する、画像処理装置。
[Application Example 4] The image processing apparatus according to any one of Application Examples 1 to 3,
In the second mode, the face area determination unit sets the determined face area by adjusting an inclination of the original face area based on a positional relationship between the plurality of detected organ areas. .

この画像処理装置では、顔領域設定処理の傾きに関する精度と処理時間との調整を図ることができる。   In this image processing apparatus, it is possible to adjust the accuracy and processing time related to the inclination of the face area setting process.

[適用例5]適用例1に記載の画像処理装置であって、さらに、
前記対象画像から検出すべき顔の画像の傾きを設定する検出傾き設定部と、
検出された複数の前記器官領域間の位置関係に基づき前記対象画像に表された顔の画像の傾きを推定する顔傾き推定部と、
前記検出すべき顔の画像の傾きと前記推定された顔の画像の傾きとに基づき、前記対象画像に表された顔の画像が検出すべき顔の画像であるか否かを判定する検出判定部と、を備える、画像処理装置。
Application Example 5 The image processing apparatus according to Application Example 1, further comprising:
A detection inclination setting unit for setting the inclination of the face image to be detected from the target image;
A face inclination estimator that estimates the inclination of the face image represented in the target image based on the positional relationship between the plurality of detected organ regions;
Detection determination for determining whether the face image represented in the target image is a face image to be detected based on the inclination of the face image to be detected and the estimated inclination of the face image An image processing apparatus.

この画像処理装置では、対象画像から検出すべき顔の画像の傾きが設定され、検出された複数の器官領域間の位置関係に基づき対象画像に表された顔の画像の傾きが推定され、検出すべき顔の画像の傾きと推定された顔の画像の傾きとに基づき対象画像に表された顔の画像が検出すべき顔の画像であるか否かが判定されるため、対象画像に表された顔の画像が検出すべき顔の画像であるか否かの判定を精度良く実行することができる。   In this image processing apparatus, the inclination of the face image to be detected is set from the target image, and the inclination of the face image represented in the target image is estimated and detected based on the positional relationship between the plurality of detected organ regions. It is determined whether the face image represented in the target image is the face image to be detected based on the inclination of the face image to be detected and the estimated inclination of the face image. It is possible to accurately determine whether or not the detected face image is a face image to be detected.

[適用例6]適用例1ないし適用例5のいずれかに記載の画像処理装置であって、
前記顔領域検出部は、
前記対象画像上における画像領域である判定対象画像領域を設定する判定対象設定部と、
前記判定対象画像領域が所定の複数の離散した傾きの内の1つを有する顔の画像に対応する画像領域であることの確からしさを表す評価値を算出するための評価用データを記憶する記憶部と、
前記評価用データと前記判定対象画像領域に対応する画像データとに基づき前記評価値を算出する評価値算出部と、
前記評価値に基づき、前記判定対象画像領域が顔の画像に対応する画像領域であるか否かを判定する判定部と、
顔の画像に対応する画像領域であると判定された前記判定対象画像領域の位置およびサイズに基づき前記原顔領域を設定する領域設定部と、を含む、画像処理装置。
Application Example 6 The image processing apparatus according to any one of Application Example 1 to Application Example 5,
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 memory for storing evaluation data for calculating an evaluation value indicating the probability that the determination target image area is an image area corresponding to a face image having one of a plurality of predetermined discrete slopes And
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 original 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, it is possible to adjust the accuracy and processing time related to the inclination of the face area setting process.

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

この画像処理装置では、右目と左目と口との少なくとも1つに対応する器官領域の検出を利用することにより、顔領域設定処理の精度と処理時間との調整を図ることができる。   In this image processing apparatus, it is possible to adjust the accuracy and processing time of the face area setting process by using detection of an organ area corresponding to at least one of the right eye, the left eye, and the mouth.

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

次に、本発明の実施の形態を実施例に基づいて以下の順序で説明する。
A.第1実施例:
A−1.画像処理装置の構成:
A−2.顔領域検出処理:
B.第2実施例:
C.変形例:
Next, embodiments of the present invention will be described in the following order based on examples.
A. First embodiment:
A-1. Configuration of image processing device:
A-2. Face area detection processing:
B. Second embodiment:
C. Variations:

A.第1実施例:
A−1.画像処理装置の構成:
図1は、本発明の第1実施例における画像処理装置としてのプリンタ100の構成を概略的に示す説明図である。本実施例のプリンタ100は、メモリカードMC等から取得した画像データに基づき画像を印刷する、いわゆるダイレクトプリントに対応したインクジェット式カラープリンタである。プリンタ100は、プリンタ100の各部を制御するCPU110と、ROMやRAMによって構成された内部メモリ120と、ボタンやタッチパネルにより構成された操作部140と、液晶ディスプレイにより構成された表示部150と、プリンタエンジン160と、カードインターフェース(カードI/F)170と、を備えている。プリンタ100は、さらに、他の機器(例えばデジタルスチルカメラやパーソナルコンピュータ)とのデータ通信を行うためのインターフェースを備えているとしてもよい。プリンタ100の各構成要素は、バスを介して互いに接続されている。
A. First embodiment:
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 the first 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と、顔領域決定部216と、を含んでいる。顔領域決定部216は顔傾き推定部217を含んでいる。これら各部の機能については、後述の顔領域検出処理の説明において詳述する。なお、後述するように、領域検出部210は、顔の画像に対応する原顔領域の検出および顔の器官の画像に対応する器官領域の検出を行うため、本発明における顔領域検出部および器官領域検出部として機能する。また、顔傾き推定部217および顔領域決定部216は、本発明における顔領域決定部として機能する。   The image processing unit 200 includes an area detection unit 210, an accuracy setting 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, and a face region determination unit 216. The face area determination unit 216 includes a face inclination estimation unit 217. 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 original face area corresponding to the face image and the organ area corresponding to the face organ image. It functions as an area detection unit. Further, the face inclination estimation unit 217 and the face region determination unit 216 function as a face region determination unit in the present invention.

精度設定部220は、対象画像における顔の画像に対応する顔領域を決定する際の精度を設定する。情報付加部230は、画像データを含む画像ファイルに所定の情報(例えば顔領域および器官領域の位置を示す情報)を付加する。   The accuracy setting unit 220 sets the accuracy when determining the face area corresponding to the face image in the target image. 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(f)には、顔学習データFLDまたは顔器官学習データOLDの種類と、当該種類の顔学習データFLDまたは顔器官学習データOLDを用いて検出される画像領域の例と、を示している。   The internal memory 120 also stores a plurality of preset face learning data FLD and a plurality of 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 types of face learning data FLD and face organ learning data OLD. FIGS. 2A to 2F show the types of face learning data FLD or facial organ learning data OLD and image regions detected using the type of face learning data FLD or facial organ learning data OLD. An example is shown.

顔学習データFLDの内容については後述の顔領域検出処理の説明において詳述するが、本実施例の顔学習データFLDは、顔傾きに対応付けられて設定されている。ここで、顔傾きとは、対象画像面内(インプレーン)における顔の画像の傾き(回転角度)を意味している。また、本実施例では、画像や画像領域等の傾きを、画像や画像領域等の上方向が対象画像の上方向と一致した状態を基準状態(傾き=0度)とした場合における基準状態からの時計回りの回転角度で表すものとしている。例えば、顔傾きは、対象画像の上下方向に沿って顔の画像が位置している状態(頭頂が上方向を向き顎が下方向を向いた状態)を基準状態(顔傾き=0度)とした場合における基準状態からの顔の画像の時計回りの回転角度で表される。   The contents of the face learning data FLD will be described in detail in the description of the face area detection process described later. The face learning data FLD of the present embodiment is set in association with the face inclination. Here, the face inclination means the inclination (rotation angle) of the face image in the target image plane (in-plane). Further, in this embodiment, the inclination of the image or the image area is changed from the reference state when the state in which the upward direction of the image or the image area coincides with the upward direction of the target image is set as the reference state (inclination = 0 degree). This is expressed by the clockwise rotation angle. For example, for the face inclination, a state where the face image is positioned along the vertical direction of the target image (a state where the top of the head is facing upward and the chin is facing downward) is referred to as a reference state (face inclination = 0 degrees). In this case, it is represented by the clockwise rotation angle of the face image from the reference state.

内部メモリ120には、図2(a)および図2(b)に示す2つの顔学習データFLD、すなわち、図2(a)に示す0度の顔傾きに対応する顔学習データFLDと、図2(b)に示す30度の顔傾きに対応する顔学習データFLDと、が格納されている。後述するように、ある顔傾きに対応する顔学習データFLDは、当該顔傾きを中心に顔傾きの値がプラスマイナス15度の範囲の顔の画像を検出可能なように学習によって設定されている。また、人物の顔は実質的に左右対称である。そのため、0度の顔傾きに対応する顔学習データFLD(図2(a))と30度の顔傾きに対応する顔学習データFLD(図2(b))との2つが予め準備されれば、これら2つの顔学習データFLDを90度単位で回転させることにより、あらゆる顔傾きの顔の画像を検出可能な顔学習データFLDを得ることができる。   In the internal memory 120, two face learning data FLD shown in FIGS. 2A and 2B, that is, face learning data FLD corresponding to 0 degree face inclination shown in FIG. The face learning data FLD corresponding to the face inclination of 30 degrees shown in 2 (b) is stored. As will be described later, the face learning data FLD corresponding to a certain face inclination is set by learning so that a face image having a face inclination value in a range of plus or minus 15 degrees around the face inclination can be detected. . In addition, the human face is substantially symmetrical. Therefore, if face learning data FLD corresponding to 0 degree face inclination (FIG. 2A) and face learning data FLD corresponding to 30 degree face inclination (FIG. 2B) are prepared in advance. By rotating these two face learning data FLD in units of 90 degrees, it is possible to obtain face learning data FLD that can detect face images of any face inclination.

顔器官学習データOLDは、顔の器官の種類と器官傾きとの組み合わせに対応付けられて設定されている。本実施例では、顔の器官の種類として、目(右目および左目)と口とが設定されている。また、器官傾きとは、上述の顔傾きと同様に、画像面内(インプレーン)における顔の器官の画像の傾き(回転角度)を意味している。器官傾きは、顔傾きと同様に、対象画像の上下方向に沿って顔の器官の画像が位置している状態を基準状態(器官傾き=0度)とした場合における基準状態からの顔の器官の画像の時計回りの回転角度で表される。   The facial organ learning data OLD is set in association with the combination of the facial organ type and the organ inclination. In this embodiment, eyes (right eye and left eye) and mouth are set as types of facial organs. 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 inclination, the organ inclination is the facial organ from the reference state when the state in which the facial organ image is positioned along the vertical direction of the target image is the reference state (organ inclination = 0 degrees). It is expressed by the clockwise rotation angle of the image.

内部メモリ120には、図2(c)ないし図2(f)に示す4つの顔器官学習データOLD、すなわち、図2(c)に示す目と0度の器官傾きとの組み合わせに対応する顔器官学習データOLDと、図2(d)に示す目と30度の器官傾きとの組み合わせに対応する顔器官学習データOLDと、図2(e)に示す口と0度の器官傾きとの組み合わせに対応する顔器官学習データOLDと、図2(f)に示す口と30度の器官傾きとの組み合わせに対応する顔器官学習データOLDと、が格納されている。目と口とは別の種類の被写体であるため、顔器官学習データOLDは被写体の種類と被写体の傾きとの組み合わせに対応して設定されていると表現できる。   The internal memory 120 stores the four facial organ learning data OLD shown in FIGS. 2 (c) to 2 (f), that is, the face corresponding to the combination of the eyes and the 0 ° organ inclination shown in FIG. 2 (c). The organ learning data OLD, the facial organ learning data OLD corresponding to the combination of the eyes and the 30-degree organ inclination shown in FIG. 2D, and the mouth and 0-degree organ inclination shown in FIG. 2 and the facial organ learning data OLD corresponding to the combination of the mouth and the 30-degree organ inclination shown in FIG. Since the eyes and mouth are different types of subjects, it can be expressed that the facial organ learning data OLD is set corresponding to the combination of the type of subject and the tilt of the subject.

顔学習データFLDと同様に、ある器官傾きに対応する顔器官学習データOLDは、当該器官傾きを中心に器官傾きの値がプラスマイナス15度の範囲の器官の画像を検出可能なように学習によって設定されている。また、人物の目や口は実質的に左右対称である。そのため、目については、0度の器官傾きに対応する顔器官学習データOLD(図2(c))と30度の器官傾きに対応する顔器官学習データOLD(図2(d))との2つが予め準備されれば、これら2つの顔器官学習データOLDを90度単位で回転させることにより、あらゆる器官傾きの目の画像を検出可能な顔器官学習データOLDを得ることができる。口についても同様に、0度の器官傾きに対応する顔器官学習データOLD(図2(e))と30度の器官傾きに対応する顔器官学習データOLDであることを(図2(f))との2つが予め準備されれば、あらゆる器官傾きの口の画像を検出可能な顔器官学習データOLDを得ることができる。なお、本実施例では、右目と左目とは同じ種類の被写体であるとし、右目の画像に対応する右目領域と左目の画像に対応する左目領域とを共通の顔器官学習データOLDを用いて検出するものとしているが、右目と左目とは異なる種類の被写体であるとして、右目領域検出用と左目領域検出用とにそれぞれ専用の顔器官学習データOLDを準備するものとしてもよい。   Similar to the face learning data FLD, the facial organ learning data OLD corresponding to a certain organ inclination is obtained by learning so that an image of an organ having an organ inclination value in the range of plus or minus 15 degrees around the organ inclination can be detected. Is set. The eyes and mouth of the person are substantially symmetrical. Therefore, for eyes, facial organ learning data OLD (FIG. 2 (c)) corresponding to an organ inclination of 0 degrees and facial organ learning data OLD (FIG. 2 (d)) corresponding to an organ inclination of 30 degrees. If one is prepared in advance, the face organ learning data OLD that can detect the images of the eyes of any organ inclination can be obtained by rotating these two face organ learning data OLD in units of 90 degrees. Similarly for the mouth, the facial organ learning data OLD (FIG. 2 (e)) corresponding to an organ inclination of 0 degrees and the facial organ learning data OLD corresponding to an organ inclination of 30 degrees (FIG. 2 (f)). Are prepared in advance, it is possible to obtain facial organ learning data OLD capable of detecting mouth images of any organ inclination. 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は、第1実施例における顔領域検出処理の流れを示すフローチャートである。本実施例における顔領域検出処理は、画像データの表す画像における顔の画像に対応する顔領域を決定する処理である。
A-2. Face area detection processing:
FIG. 3 is a flowchart showing the flow of face area detection processing in the first embodiment. The face area detection process in this embodiment is a process for determining a face area corresponding to a face image in an image represented by image data.

ステップS110では、精度設定部220(図1)が、対象画像における顔の画像に対応する顔領域を決定する際に要求される精度を設定する。本実施例において、顔領域を決定する際の精度とは、決定される顔領域(後述の決定顔領域FAf)の傾き(以下「顔領域傾き」とも呼ぶ)と、対象画像に表された顔の画像の実際の傾き(以下「実傾き」とも呼ぶ)と、の差異の平均値の程度を意味している。すなわち、精度が高いとは、顔領域傾きと実傾きとの差異の平均値が小さいことを意味し、精度が低いとは、顔領域傾きと実傾きとの差異の平均値が大きいことを意味する。なお、本実施例では、画像領域(例えば顔領域)や画像領域を規定するウィンドウ(後述)は方向を特定する情報を含んでおり、上述の顔領域の傾きとは、顔領域の上方向が対象画像の上方向と一致した状態を基準状態(傾き=0度)とした場合における基準状態からの時計回りの回転角度を意味している。   In step S110, the accuracy setting unit 220 (FIG. 1) sets the accuracy required when determining the face area corresponding to the face image in the target image. In the present embodiment, the accuracy in determining the face area refers to the inclination of the determined face area (determined face area FAf described later) (hereinafter also referred to as “face area inclination”) and the face represented in the target image. Means the average value of the difference between the actual inclination of the image (hereinafter also referred to as “actual inclination”). That is, high accuracy means that the average value of the difference between the face area inclination and the actual inclination is small, and low precision means that the average value of the difference between the face area inclination and the actual inclination is large. To do. In this embodiment, an image area (for example, a face area) and a window (described later) that defines the image area include information for specifying the direction, and the above-described inclination of the face area refers to the upward direction of the face area. This means a clockwise rotation angle from the reference state when the state coincident with the upper direction of the target image is set as the reference state (tilt = 0 degree).

精度設定部220は、決定される顔領域の用途を特定する用途情報を取得して、用途情報に基づき精度を設定する。図4は、決定される顔領域の用途の一例を示す説明図である。図4には、画像処理部200(図1)が提供する画像処理メニューの一覧が表示部150に表示されている様子が示されている。本実施例では、画像処理メニューとして、肌色補正と顔変形との2つが設定されており、決定される顔領域は、肌色補正と顔変形との2つの画像処理のために用いられる。   The accuracy setting unit 220 acquires usage information specifying the usage of the determined face area, and sets the accuracy based on the usage information. FIG. 4 is an explanatory diagram illustrating an example of the use of the determined face area. FIG. 4 shows a state where a list of image processing menus provided by the image processing unit 200 (FIG. 1) is displayed on the display unit 150. In this embodiment, two types of skin color correction and face deformation are set as image processing menus, and the determined face area is used for two image processes of skin color correction and face deformation.

肌色補正は、顔領域または顔領域に基づき設定される画像領域内の人物の肌の色を好ましい肌色に補正する画像処理であり、顔領域傾きと実傾きとの差異が処理結果に及ぼす影響は比較的小さい。そのため、肌色補正を行う際には、顔領域を決定する際の精度が低いこと、すなわち顔領域傾きと実傾きとの差異の平均値が大きいことは、比較的許容されやすい。従って、ユーザにより操作部140を介して肌色補正が選択された場合には、精度設定部220は顔領域の用途が肌色補正であるとの用途情報を取得し、精度として比較的低い値を設定する。   Skin color correction is an image process that corrects the skin color of a person in a face area or an image area set based on the face area to a preferred skin color, and the effect of the difference between the face area inclination and the actual inclination on the processing result is Relatively small. Therefore, when performing skin color correction, it is relatively easy to accept that the accuracy in determining the face area is low, that is, that the average value of the difference between the face area inclination and the actual inclination is large. Therefore, when skin color correction is selected by the user via the operation unit 140, the accuracy setting unit 220 acquires usage information indicating that the usage of the face area is skin color correction, and sets a relatively low value as the accuracy. To do.

一方、顔変形は、顔領域または顔領域に基づき設定される画像領域内の画像を変形する画像処理である。ここで、人物の顔は実質的に左右対称であるため、顔領域傾きと実傾きとの差異が大きいと、顔変形処理の結果が不自然なものとなる可能性がある。そのため、顔変形を行う際には、顔領域を決定する際の精度が高いこと、すなわち顔領域傾きと実傾きとの差異の平均値が小さいことが望まれる。従って、ユーザにより操作部140を介して顔変形が選択された場合には、精度設定部220は顔領域の用途が顔変形であるとの用途情報を取得し、精度として比較的高い値を設定する。   On the other hand, face deformation is image processing for deforming a face area or an image in an image area set based on the face area. Here, since the face of a person is substantially symmetrical, if the difference between the face area inclination and the actual inclination is large, the result of the face deformation process may be unnatural. Therefore, when performing face deformation, it is desired that accuracy in determining a face area is high, that is, an average value of differences between the face area inclination and the actual inclination is small. Therefore, when face deformation is selected by the user via the operation unit 140, the accuracy setting unit 220 acquires use information that the use of the face area is face deformation, and sets a relatively high value as the accuracy. To do.

ステップS120(図3)では、画像処理部200(図1)が、顔領域検出処理の対象となる画像を表す画像データを取得する。本実施例のプリンタ100では、カードスロット172にメモリカードMCが挿入されると、メモリカードMCに格納された画像ファイルのサムネイル画像が表示部150に表示される。ユーザは、表示されたサムネイル画像を参照しつつ、操作部140を介して処理の対象となる1つまたは複数の画像を選択する。画像処理部200は、選択された1つまたは複数の画像に対応する画像データを含む画像ファイルをメモリカードMCより取得して内部メモリ120の所定の領域に格納する。なお、取得された画像データを原画像データと呼び、原画像データの表す画像を原画像OImgと呼ぶものとする。   In step S120 (FIG. 3), the image processing unit 200 (FIG. 1) acquires image data representing an image to be subjected to 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.

ステップS130(図3)では、領域検出部210(図1)が、原顔領域検出処理を行う。原顔領域検出処理は、顔の画像に対応する画像領域を原顔領域FAoとして検出する処理である。図5は、原顔領域検出処理の流れを示すフローチャートである。また、図6は、原顔領域検出処理の概要を示す説明図である。図6の最上段には原画像OImgの一例を示している。   In step S130 (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. FIG. 5 is a flowchart showing the flow of the original face area detection process. FIG. 6 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.

原顔領域検出処理(図5)におけるステップS310では、領域検出部210(図1)が、原画像OImgを表す原画像データから顔検出用画像FDImgを表す顔検出用画像データを生成する。本実施例では、図6に示すように、顔検出用画像FDImgは横320画素×縦240画素のサイズの画像である。領域検出部210は、必要により原画像データの解像度変換を行うことにより、顔検出用画像FDImgを表す顔検出用画像データを生成する。なお、本実施例における顔検出用画像FDImgは本発明における対象画像に相当し、顔検出用画像データは本発明における対象画像データに相当する。   In step S310 in the original face area detection process (FIG. 5), 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. 6, the face detection image FDImg is an image having a size of 320 horizontal pixels × 240 vertical 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(図5)では、判定対象設定部211(図1)が、判定対象画像領域JIA(後述)の設定に用いるウィンドウSWのサイズを初期値に設定する。ステップS330では、判定対象設定部211が、ウィンドウSWを顔検出用画像FDImg上の初期位置に配置する。ステップS340では、判定対象設定部211が、顔検出用画像FDImg上に配置されたウィンドウSWにより規定される画像領域を、顔の画像に対応する画像領域であるか否かの判定(以下「顔判定」とも呼ぶ)の対象となる判定対象画像領域JIAに設定する。図6の中段には、顔検出用画像FDImg上に初期値のサイズのウィンドウSWが初期位置に配置され、ウィンドウSWにより規定される画像領域が判定対象画像領域JIAに設定される様子を示している。本実施例では、後述するように、正方形形状のウィンドウSWのサイズおよび位置が変更されつつ判定対象画像領域JIAの設定が順に行われるが、ウィンドウSWのサイズの初期値は最大サイズである横240画素×縦240画素であり、ウィンドウSWの初期位置はウィンドウSWの左上の頂点が顔検出用画像FDImgの左上の頂点に重なるような位置である。また、ウィンドウSWは、その傾きが0度の状態で配置される。なお、上述したように、ウィンドウSWの傾きとは、ウィンドウSWの上方向が対象画像(顔検出用画像FDImg)の上方向と一致した状態を基準状態(傾き=0度)とした場合における基準状態からの時計回りの回転角度を意味している。   In step S320 (FIG. 5), 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. 6 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. Further, the window SW is arranged with the inclination of 0 degree. Note that, as described above, the inclination of the window SW is a reference when the upper direction of the window SW coincides with the upper direction of the target image (face detection image FDImg) as a reference state (inclination = 0 degree). It means the clockwise rotation angle from the state.

ステップS350(図5)では、評価値算出部212(図1)が、判定対象画像領域JIAについて、判定対象画像領域JIAに対応する画像データ基づき、顔判定に用いる累計評価値Tvを算出する。なお、本実施例では、顔判定は予め設定された特定顔傾き毎に実行される。すなわち、特定顔傾き毎に、判定対象画像領域JIAが当該特定顔傾き分だけ傾いた顔の画像に対応する画像領域であるか否かの判定が行われる。そのため、累計評価値Tvも特定顔傾き毎に算出される。ここで、特定顔傾きとは、予め設定された顔傾きの値を意味している。本実施例では、傾きを0度から30度ずつ増加させた計12個の顔傾き(0度、30度、60度、・・・、330度)が、特定顔傾きとして設定されている。   In step S350 (FIG. 5), the evaluation value calculation unit 212 (FIG. 1) calculates a cumulative evaluation value Tv used for face determination for the determination target image area JIA based on the image data corresponding to the determination target image area JIA. In the present embodiment, face determination is executed for each specific face inclination set in advance. That is, for each specific face inclination, it is determined whether or not the determination target image area JIA is an image area corresponding to a face image inclined by the specific face inclination. Therefore, the cumulative evaluation value Tv is also calculated for each specific face inclination. Here, the specific face inclination means a preset face inclination value. In the present embodiment, a total of 12 face inclinations (0 degrees, 30 degrees, 60 degrees,..., 330 degrees) obtained by increasing the inclination from 0 degrees to 30 degrees are set as specific face inclinations.

図7は、顔判定に用いる累計評価値Tvの算出方法の概要を示す説明図である。本実施例では、累計評価値Tvの算出にN個のフィルタ(フィルタ1〜フィルタN)が用いられる。各フィルタの外形はウィンドウSWと同じアスペクト比を有しており(すなわち正方形形状であり)、各フィルタにはプラス領域paとマイナス領域maとが設定されている。評価値算出部212は、判定対象画像領域JIAにフィルタX(X=1,2,・・・,N)を順に適用して評価値vX(すなわちv1〜vN)を算出する。具体的には、評価値vXは、フィルタXのプラス領域paに対応する判定対象画像領域JIA上の領域内に位置する画素の輝度値の合計から、マイナス領域maに対応する判定対象画像領域JIA上の領域内に位置する画素の輝度値の合計を差し引いた値である。   FIG. 7 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は、上記12個の特定顔傾きのそれぞれについて、顔学習データFLD(図2(a)および図2(b)参照)として予め設定されている。本実施例における顔学習データ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 the face learning data FLD (FIG. 2A and FIG. 2) for each of the 12 specific face inclinations. b) is set in advance as a reference). 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は、サンプル画像を用いた学習によって生成される。図8は、学習に用いられるサンプル画像の一例を示す説明図である。学習には、顔の画像に対応した画像であることが予めわかっている複数の顔サンプル画像によって構成された顔サンプル画像群と、顔の画像に対応した画像ではないことが予めわかっている複数の非顔サンプル画像によって構成された非顔サンプル画像群と、が用いられる。   The face learning data FLD is generated by learning using a sample image. FIG. 8 is an explanatory diagram illustrating an example of a sample image used for learning. For learning, a face sample image group composed of a plurality of face sample images that are known in advance to be images corresponding to face images, and a plurality of information that is known in advance to be images that do not correspond to face images. A non-face sample image group composed of non-face sample images.

学習による顔学習データFLDの生成は特定顔傾き毎に実行されるため、図8に示すように、顔サンプル画像群は、12個の特定顔傾きのそれぞれに対応したものが準備される。例えば0度の特定顔傾きについての顔学習データFLDの生成は、0度の特定顔傾きに対応した顔サンプル画像群と非顔サンプル画像群とを用いて実行され、30度の特定顔傾きについての顔学習データFLDの生成は、30度の特定顔傾きに対応した顔サンプル画像群と非顔サンプル画像群とを用いて実行される。   Since generation of the face learning data FLD by learning is executed for each specific face inclination, as shown in FIG. 8, a face sample image group corresponding to each of 12 specific face inclinations is prepared. For example, the generation of the face learning data FLD for the specific face inclination of 0 degree is executed using the face sample image group and the non-face sample image group corresponding to the specific face inclination of 0 degree. The face learning data FLD is generated using a face sample image group and a non-face sample image group corresponding to a specific face inclination of 30 degrees.

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

サンプル画像を用いた学習は、例えばニューラルネットワークを用いた方法や、ブースティング(例えばアダブースティング)を用いた方法、サポートベクターマシーンを用いた方法等により実行される。例えば学習がニューラルネットワークを用いた方法により実行される場合には、各フィルタX(すなわちフィルタ1〜フィルタN、図7参照)について、ある特定顔傾きに対応した顔サンプル画像群(図8参照)と非顔サンプル画像群とに含まれるすべてのサンプル画像を用いて評価値vX(すなわちv1〜vN)が算出され、所定の顔検出率を達成する閾値thX(すなわちth1〜thN)が設定される。ここで、顔検出率とは、顔サンプル画像群を構成する顔サンプル画像の総数に対する、評価値vXによる閾値判定によって顔の画像に対応する画像であると判定される顔サンプル画像の数の割合を意味している。   Learning using a sample image is executed by, for example, a method using a neural network, a method using boosting (for example, adaboost), a method using a support vector machine, or the like. For example, when learning is performed by a method using a neural network, a face sample image group corresponding to a specific face inclination (see FIG. 8) for each filter X (that is, filters 1 to N, see FIG. 7). And the evaluation value vX (that is, v1 to vN) is calculated using all the sample images included in the non-face sample image group, and a threshold thX (that is, th1 to thN) that achieves a predetermined face detection rate is set. . Here, the face detection rate is the ratio of the number of face sample images determined to be an image corresponding to a face image by threshold determination based on the evaluation value vX with respect to the total number of face sample images constituting the face sample image group. Means.

次に、各フィルタXに設定された重み係数WeX(すなわちWe1〜WeN)が初期値に設定され、顔サンプル画像群および非顔サンプル画像群の中から選択された1つのサンプル画像についての累計評価値Tvが算出される。後述するように、顔判定においては、ある画像について算出された累計評価値Tvが所定の閾値TH以上の場合には、当該画像は顔の画像に対応する画像であると判定される。学習においては、選択されたサンプル画像(顔サンプル画像または非顔サンプル画像)について算出された累計評価値Tvによる閾値判定結果の正誤に基づき、各フィルタXに設定された重み係数WeXの値が修正される。以降、サンプル画像の選択と、選択されたサンプル画像について算出された累計評価値Tvによる閾値判定、および判定結果の正誤に基づく重み係数WeXの値の修正が、顔サンプル画像群および非顔サンプル画像群に含まれるすべてのサンプル画像について繰り返し実行される。以上の処理が特定顔傾き毎に実行されることにより、特定顔傾き毎の顔学習データFLDが生成される。   Next, the weight coefficient WeX (that is, We1 to WeN) set for each filter X is set to an initial value, and cumulative evaluation is performed on one sample image selected from the face sample image group and the non-face sample image group. A value Tv is calculated. As will be described later, in the face determination, when the cumulative evaluation value Tv calculated for a certain image is equal to or greater than a predetermined threshold TH, the image is determined to be an image corresponding to the face image. In learning, the value of the weighting coefficient WeX set for each filter X is corrected based on the correctness of the threshold determination result based on the cumulative evaluation value Tv calculated for the selected sample image (face sample image or non-face sample image). Is done. Thereafter, the selection of the sample image, the threshold value determination based on the cumulative evaluation value Tv calculated for the selected sample image, and the correction of the value of the weighting coefficient WeX based on the correctness of the determination result are the face sample image group and the non-face sample image. It is repeatedly executed for all the sample images included in the group. By executing the above processing for each specific face inclination, face learning data FLD for each specific face inclination is generated.

判定対象画像領域JIAについて特定顔傾き毎に累計評価値Tvが算出されると(図5のステップS350)、判定部213(図1)は、累計評価値Tvを特定顔傾き毎に設定された閾値THと比較する(ステップS360)。ある特定顔傾きについて累計評価値Tvが閾値TH以上である場合には、領域検出部210が、判定対象画像領域JIAは当該特定顔傾き分だけ傾いた顔の画像に対応する画像領域であるとして、判定対象画像領域JIAの位置、すなわち現在設定されているウィンドウSWの座標と、当該特定顔傾きと、を記憶する(ステップS370)。一方、いずれの特定顔傾きについても累計評価値Tvが閾値THより小さい場合には、ステップS370の処理はスキップされる。   When the cumulative evaluation value Tv is calculated for each specific face inclination for the determination target image area JIA (step S350 in FIG. 5), the determination unit 213 (FIG. 1) sets the cumulative evaluation value Tv for each specific face inclination. The threshold value TH is compared (step S360). When the cumulative evaluation value Tv is greater than or equal to the threshold value TH for a specific face inclination, the area detection unit 210 determines that the determination target image area JIA is an image area corresponding to a face image inclined by the specific face inclination. The position of the determination target image area JIA, that is, the coordinates of the currently set window SW and the specific face inclination are stored (step S370). On the other hand, if the cumulative evaluation value Tv is smaller than the threshold value TH for any specific face inclination, the process of step S370 is skipped.

ステップS380(図5)では、領域検出部210(図1)が、現在設定されているサイズのウィンドウSWにより顔検出用画像FDImg全体がスキャンされたか否かを判定する。未だ顔検出用画像FDImg全体がスキャンされていないと判定された場合には、判定対象設定部211(図1)が、ウィンドウSWを所定の方向に所定の移動量だけ移動する(ステップS390)。図6の下段には、ウィンドウSWが移動した様子を示している。本実施例では、ステップS390において、ウィンドウSWがウィンドウSWの水平方向の大きさの2割分の移動量で右方向に移動するものとしている。また、ウィンドウSWがさらに右方向には移動できない位置に配置されている場合には、ステップS390において、ウィンドウSWが顔検出用画像FDImgの左端まで戻ると共に、ウィンドウSWの垂直方向の大きさの2割分の移動量で下方向に移動するものとしている。ウィンドウSWがさらに下方向には移動できない位置に配置されている場合には、顔検出用画像FDImg全体がスキャンされたこととなる。ウィンドウSWの移動(ステップS390)の後には、移動後のウィンドウSWについて、上述のステップS340以降の処理が実行される。   In step S380 (FIG. 5), 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. 6 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(図5)において現在設定されているサイズのウィンドウ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. 5) 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(図5)においてウィンドウSWの所定のサイズがすべて使用されたと判定された場合には、領域設定部214(図1)が、原顔領域設定処理を実行する(ステップS420)。図9および図10は、原顔領域設定処理の概要を示す説明図である。領域設定部214は、図5のステップS360において累計評価値Tvが閾値TH以上であると判定されステップS370において記憶されたウィンドウSWの座標(すなわちウィンドウSWの位置およびサイズ)と特定顔傾きとに基づき、原顔領域FAoを設定する。具体的には、特定顔傾きが0度である場合には、ウィンドウSWにより規定される画像領域(すなわち判定対象画像領域JIA)が、そのまま原顔領域FAoとして設定される。一方、特定顔傾きが0度以外である場合には、ウィンドウSWの傾きを特定顔傾きに一致させ(すなわちウィンドウSWを所定の点(例えばウィンドウSWの重心)を中心として特定顔傾き分だけ時計回りに回転させ)、傾きを変化させた後のウィンドウSWにより規定される画像領域が原顔領域FAoとして設定される。例えば図9(a)に示すように、30度の特定顔傾きについて累計評価値Tvが閾値TH以上であると判定された場合には、図9(b)に示すように、ウィンドウSWの傾きを30度に変化させ、傾き変化後のウィンドウSWにより規定される画像領域が原顔領域FAoとして設定される。   If it is determined in step S400 (FIG. 5) 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). 9 and 10 are explanatory diagrams 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. 5 and determines the coordinates of the window SW (that is, the position and size of the window SW) and the specific face inclination stored in step S370. Based on this, the original face area FAo is set. Specifically, when the specific face inclination is 0 degree, the image area defined by the window SW (that is, the determination target image area JIA) is set as the original face area FAo as it is. On the other hand, when the specific face inclination is other than 0 degrees, the inclination of the window SW is matched with the specific face inclination (that is, the window SW is clocked by the specific face inclination around a predetermined point (for example, the center of gravity of the window SW). The image area defined by the window SW after the inclination is changed is set as the original face area FAo. For example, as shown in FIG. 9A, when it is determined that the cumulative evaluation value Tv is greater than or equal to the threshold value TH for a specific face inclination of 30 degrees, as shown in FIG. Is changed to 30 degrees, and the image area defined by the window SW after the inclination change is set as the original face area FAo.

また、領域設定部214は、ステップS370において、ある特定顔傾きについて互いに一部が重複する複数のウィンドウSWが記憶された場合には、各ウィンドウSWにおける所定の点(例えばウィンドウSWの重心)の座標の平均の座標を重心とし、各ウィンドウSWのサイズの平均のサイズを有する1つの新たなウィンドウ(以下「平均ウィンドウAW」とも呼ぶ)を設定する。例えば図10(a)に示すように、互いに一部が重複する4つのウィンドウSW(SW1〜SW4)が記憶された場合には、図10(b)に示すように、4つのウィンドウSWのそれぞれの重心の座標の平均の座標を重心とし、4つのウィンドウSWのそれぞれのサイズの平均のサイズを有する1つの平均ウィンドウAWが定義される。このとき、上述したのと同様に、特定顔傾きが0度である場合には、平均ウィンドウAWにより規定される画像領域がそのまま原顔領域FAoとして設定される。一方、特定顔傾きが0度以外である場合には、平均ウィンドウAWの傾きを特定顔傾きに一致させ(すなわち平均ウィンドウAWを所定の点(例えば平均ウィンドウAWの重心)を中心として特定顔傾き分だけ時計回りに回転させ)、傾きを変化させた後の平均ウィンドウAWにより規定される画像領域が原顔領域FAoとして設定される(図10(c)参照)。   In step S370, when a plurality of windows SW that partially overlap each other with respect to a specific face inclination are stored, the region setting unit 214 sets a predetermined point in each window SW (for example, the center of gravity of the window SW). One new window (hereinafter also referred to as “average window AW”) having an average size of each window SW is set with the average coordinate of the coordinates as the center of gravity. For example, as shown in FIG. 10A, when four windows SW (SW1 to SW4) that partially overlap each other are stored, as shown in FIG. One 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 the four windows SW as the center of gravity. At this time, as described above, when the specific face inclination is 0 degree, the image area defined by the average window AW is set as the original face area FAo as it is. On the other hand, when the specific face inclination is other than 0 degrees, the inclination of the average window AW is made to coincide with the specific face inclination (that is, the specific face inclination is centered on a predetermined point (for example, the center of gravity of the average window AW)). The image area defined by the average window AW after the inclination is changed is set as the original face area FAo (see FIG. 10C).

なお、図9に示したように、他のウィンドウSWと重複しない1つのウィンドウSWが記憶された場合にも、図10に示した互いに一部が重複する複数のウィンドウSWが記憶された場合と同様に、1つのウィンドウSW自身が平均ウィンドウAWであると解釈することも可能である。   As shown in FIG. 9, even when one window SW not overlapping with other windows SW is stored, a plurality of windows SW partially overlapping each other shown in FIG. 10 are stored. Similarly, one window SW itself can be interpreted as the average window AW.

本実施例では、学習の際に用いられる顔サンプル画像群(図8参照)に、基本顔サンプル画像FIoを1.2倍から0.8倍までの範囲の所定の倍率で拡大および縮小した画像(例えば図8における画像FIaおよびFIb)が含まれているため、ウィンドウSWの大きさに対する顔の画像の大きさが基本顔サンプル画像FIoと比べてわずかに大きかったり小さかったりする場合にも、原顔領域FAoが検出されうる。従って、本実施例では、ウィンドウSWのサイズとして上述した15個の離散的なサイズのみが設定されているが、あらゆる大きさの顔の画像について原顔領域FAoが検出されうる。同様に、本実施例では、学習の際に用いられる顔サンプル画像群に、基本顔サンプル画像FIoの顔傾きをプラスマイナス15度の範囲で変化させた画像(例えば図8における画像FIcおよびFId)が含まれているため、ウィンドウSWに対する顔の画像の傾きが基本顔サンプル画像FIoとはわずかに異なっている場合にも、原顔領域FAoが検出されうる。従って、本実施例では、特定顔傾きとして上述した12個の離散的な傾き値のみが設定されているが、あらゆる傾きの顔の画像について原顔領域FAoが検出されうる。   In the present embodiment, an image obtained by enlarging and reducing the basic face sample image FIo to a face sample image group (see FIG. 8) used for learning at a predetermined magnification in a range from 1.2 times to 0.8 times. (For example, images FIa and FIb in FIG. 8), the face image size relative to the window SW size is slightly larger or smaller than the basic face sample image FIo. A face area 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. Similarly, in this embodiment, images obtained by changing the face inclination of the basic face sample image FIo in a range of plus or minus 15 degrees (for example, images FIc and FId in FIG. 8) are used as the face sample image group used for learning. Therefore, even when the inclination of the face image with respect to the window SW is slightly different from the basic face sample image FIo, the original face area FAo can be detected. Therefore, in the present embodiment, only the 12 discrete inclination values described above are set as the specific face inclination, but the original face area FAo can be detected for face images having any inclination.

原顔領域検出処理(図3のステップS130)において、原顔領域FAoが検出されなかった場合には(ステップS140:No)、顔領域検出処理は終了する。一方、少なくとも1つの原顔領域FAoが検出された場合には(ステップS140:Yes)、画像処理部200(図1)が、ステップS110で設定された精度に基づき、以降の実行すべき処理を判定する。すなわち、顔領域の用途が肌色補正であり、設定された精度が比較的低い値である場合には(ステップS150:No)、処理はステップS160に進む。   If the original face area FAo is not detected in the original face area detection process (step S130 in FIG. 3) (step S140: No), the face area detection process ends. On the other hand, when at least one original face area FAo is detected (step S140: Yes), the image processing unit 200 (FIG. 1) performs subsequent processing to be executed based on the accuracy set in step S110. judge. That is, when the use of the face area is skin color correction and the set accuracy is a relatively low value (step S150: No), the process proceeds to step S160.

ステップS160(図3)では、顔領域決定部216(図1)が、決定顔領域FAfを設定する。決定顔領域FAfは、顔領域検出処理の最終的な検出結果として設定される顔領域である。ステップS160においては、顔領域決定部216は、原顔領域FAoを決定顔領域FAfとして設定する。上述したように、原顔領域FAoは、平均ウィンドウAWの傾きを特定顔傾きに一致するように変化させた後の平均ウィンドウAWにより規定される画像領域である。従って、原顔領域FAoを決定顔領域FAfとして設定すると、決定顔領域FAfの傾き(顔領域傾き)は、特定顔傾きとして設定された12個の離散的な傾き(0度、30度、60度、・・・、330度)のいずれか1つとなる。そのため、決定顔領域FAfの傾き(顔領域傾き)と、対象画像に表された顔の画像の実際の傾き(実傾き)と、の差異は、プラスマイナス15度の範囲の値となる。従って、この場合には、顔領域傾きと実傾きとの差異の平均値は比較的大きくなり、顔領域を決定する際の精度は比較的低いこととなる。なお、ステップS160における決定顔領域FAfの設定方法は、本発明における第1の処理モードにおける決定顔領域FAfの設定方法に相当する。   In step S160 (FIG. 3), the face area determination unit 216 (FIG. 1) sets the determined face area FAf. The determined face area FAf is a face area set as a final detection result of the face area detection process. In step S160, the face area determination unit 216 sets the original face area FAo as the determined face area FAf. As described above, the original face area FAo is an image area defined by the average window AW after the inclination of the average window AW is changed to match the specific face inclination. Therefore, when the original face area FAo is set as the determined face area FAf, the inclination of the determined face area FAf (face area inclination) is 12 discrete inclinations (0 degrees, 30 degrees, 60 set as the specific face inclination). Degrees,..., 330 degrees). Therefore, the difference between the inclination of the determined face area FAf (face area inclination) and the actual inclination (actual inclination) of the face image represented in the target image is a value in the range of plus or minus 15 degrees. Therefore, in this case, the average value of the difference between the face area inclination and the actual inclination is relatively large, and the accuracy in determining the face area is relatively low. The method for setting the determined face area FAf in step S160 corresponds to the method for setting the determined face area FAf in the first processing mode of the present invention.

一方、顔領域の用途が顔変形であり、設定された精度が比較的高い値である場合には(図3のステップS150:Yes)、処理はステップS170に進む。ステップS170では、領域検出部210(図1)が、検出された原顔領域FAoの1つを選択する。   On the other hand, when the use of the face area is face deformation and the set accuracy is a relatively high value (step S150: Yes in FIG. 3), the process proceeds to step S170. In step S170, the area detection unit 210 (FIG. 1) selects one of the detected original face areas FAo.

ステップS180(図3)では、領域検出部210(図1)が、器官領域検出処理を行う。器官領域検出処理は、選択された原顔領域FAoにおける顔の器官の画像に対応する画像領域を器官領域として検出する処理である。上述したように、本実施例では、顔の器官の種類として、右目と左目と口との3種類が設定されており、器官領域検出処理では、右目の画像に対応する右目領域EA(r)と、左目の画像に対応する左目領域EA(l)と、口の画像に対応する口領域MAと、の検出が行われる。   In step S180 (FIG. 3), the region detection unit 210 (FIG. 1) 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, three types of the right eye, the left eye, and the mouth are set as the types of facial organs. In the organ region detection process, the right eye region EA (r) corresponding to the right eye image is set. The left eye area EA (l) corresponding to the left eye image and the mouth area MA corresponding to the mouth image are detected.

図11は、器官領域検出処理の流れを示すフローチャートである。また、図12は、器官領域検出処理の概要を示す説明図である。図12の最上段には、顔検出処理に用いられた顔検出用画像FDImg(図6参照)の一例を示している。   FIG. 11 is a flowchart showing the flow of the organ region detection process. FIG. 12 is an explanatory diagram showing an outline of the organ region detection process. An example of the face detection image FDImg (see FIG. 6) used in the face detection process is shown in the uppermost part of FIG.

顔検出用画像FDImgからの器官領域の検出は、上述した原顔領域FAoの検出と同様に行われる。すなわち、図12に示すように、矩形形状のウィンドウSWがそのサイズおよび位置が変更されつつ顔検出用画像FDImg上に配置され(図11のステップS520,S530,S580〜S610)、配置されたウィンドウSWにより規定される画像領域が顔の器官の画像に対応する器官領域であるか否かの判定(以下「器官判定」とも呼ぶ)の対象となる判定対象画像領域JIAとして設定される(図11のステップS540)。なお、ウィンドウSWの取り得るサイズおよび位置は、選択された原顔領域FAoのサイズおよび位置に基づき決定される。例えば、ウィンドウSWの横方向の長さとして取り得る値は、原顔領域FAoの横方向の長さを所定数倍して得られる最大サイズから最小サイズまでの間の所定数段階の値に設定される。また、例えば、ウィンドウSWの取り得る位置は、ウィンドウSWの中心が原顔領域FAo内に位置するような範囲に設定される。また、ウィンドウSWは、その傾きが0度の状態(ウィンドウSWの上方向が顔検出用画像FDImgの上方向と一致した基準状態)で配置される。   The detection of the organ area from the face detection image FDImg is performed in the same manner as the detection of the original face area FAo. That is, as shown in FIG. 12, a rectangular window SW is arranged on the face detection image FDImg while changing its size and position (steps S520, S530, S580 to S610 in FIG. 11), and the arranged windows An image area defined by SW is set as a determination target image area JIA that is a target of determination of whether or not the image area is an organ area corresponding to an image of a facial organ (hereinafter also referred to as “organ determination”) (FIG. 11). Step S540). Note that the possible size and position of the window SW are determined based on the size and position of the selected original face area FAo. For example, the value that can be taken as the horizontal length of the window SW is set to a predetermined number of steps between the maximum size and the minimum size obtained by multiplying the horizontal length of the original face area FAo by a predetermined number. Is done. Further, for example, the position that the window SW can take is set to a range in which the center of the window SW is located in the original face area FAo. Further, the window SW is arranged in a state where the inclination is 0 degree (a reference state in which the upper direction of the window SW coincides with the upper direction of the face detection image FDImg).

判定対象画像領域JIAが設定されると、顔器官学習データOLD(図1)を用いて、器官(右目、左目、口)毎に、器官判定に用いられる累計評価値Tvが算出される(図11のステップS550)。累計評価値Tvの算出や器官判定に用いられるフィルタXの態様や閾値thX、重み係数WeX、閾値TH(図7参照)は、顔器官学習データOLDに規定されている。なお、顔器官学習データOLDの設定のための学習は、顔学習データFLDの設定のための学習と同様に、顔の器官に対応する画像であることが予めわかっている複数の器官サンプル画像によって構成された器官サンプル画像群と、顔の器官に対応する画像ではないことが予めわかっている複数の非器官サンプル画像によって構成された非器官サンプル画像群と、を用いて実行される。   When the determination target image area JIA is set, a cumulative evaluation value Tv used for organ determination is calculated for each organ (right eye, left eye, mouth) using the facial organ learning data OLD (FIG. 1) (FIG. 1). 11 step S550). 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. 7) are defined in the facial organ learning data OLD. Note that the learning for setting the facial organ learning data OLD is performed by using a plurality of organ sample images that are known in advance to be images corresponding to the facial organs, similarly to the learning for setting the facial learning data FLD. It is executed using the constructed organ sample image group and the non-organ sample image group composed of a plurality of non-organ sample images that are known in advance not to correspond to facial organs.

なお、原顔領域検出処理(図5)においては、累計評価値Tvの算出および顔判定が、すべての特定顔傾きについて実行されるのに対し、器官領域検出処理(図11)では、累計評価値Tvの算出および器官判定が、選択された原顔領域FAoの特定顔傾きと同一の器官傾きに対応する顔器官学習データOLD(図2(c)ないし図2(f)参照)を用いて、原顔領域FAoの特定顔傾きと同一の器官傾きについてのみ実行される。ただし、器官領域検出処理においても、累計評価値Tvの算出および器官判定が、すべての特定器官傾きについて実行されるものとしてもよい。   In the original face area detection process (FIG. 5), calculation of the cumulative evaluation value Tv and face determination are executed for all specific face inclinations, whereas in the organ area detection process (FIG. 11), cumulative evaluation is performed. The calculation of the value Tv and the organ determination are performed using the facial organ learning data OLD (see FIGS. 2C to 2F) corresponding to the same organ inclination as the specific face inclination of the selected original face area FAo. This is executed only for the same organ inclination as the specific face inclination of the original face area FAo. However, also in the organ region detection process, the calculation of the cumulative evaluation value Tv and the organ determination may be executed for all the specific organ inclinations.

算出された累計評価値Tvが所定の閾値TH以上である場合には、判定対象画像領域JIAは顔の当該器官の画像に対応する画像領域であるとして、判定対象画像領域JIAの位置、すなわち現在設定されているウィンドウSWの座標が記憶される(図11のステップS570)。一方、累計評価値Tvが閾値THより小さい場合には、ステップS570の処理はスキップされる。   When 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 image of the organ of the face, that is, the position of the determination target image area JIA, that is, the current The coordinates of the set window SW are stored (step S570 in FIG. 11). On the other hand, when the cumulative evaluation value Tv is smaller than the threshold value TH, the process of step S570 is skipped.

ウィンドウSWの所定のサイズのすべてについて、ウィンドウSWの位置し得る範囲全体がスキャンされた後に、領域設定部214(図1)による器官領域設定処理が実行される(図11のステップS620)。図13は、器官領域設定処理の概要を示す説明図である。器官領域設定処理は、原顔領域設定処理(図9および10参照)と同様の処理である。領域設定部214は、図11のステップS560において累計評価値Tvが閾値TH以上であると判定され、ステップS570において記憶されたウィンドウSWの座標と、原顔領域FAoに対応する特定顔傾きと、に基づき、顔の器官の画像に対応する画像領域としての器官領域を設定する。具体的には、特定顔傾きが0度である場合には、ウィンドウSWにより規定される画像領域(すなわち判定対象画像領域JIA)が、そのまま器官領域として設定される。一方、特定顔傾きが0度以外である場合には、ウィンドウSWの傾きを特定顔傾きに一致させ(すなわちウィンドウSWを所定の点(例えばウィンドウSWの重心)を中心として特定顔傾き分だけ時計回りに回転させ)、傾きを変化させた後のウィンドウSWにより規定される画像領域が器官領域として設定される。例えば図13(a)に示すように、30度の特定顔傾きについて、右目に対応するウィンドウSW(er)と左目に対応するウィンドウSW(el)と口に対応するウィンドウSW(m)とにおいて累計評価値Tvが閾値TH以上であると判定された場合には、図13(b)に示すように、各ウィンドウSWの傾きを30度に変化させ、傾き変化後の各ウィンドウSWにより規定される画像領域が器官領域(右目領域EA(r)、左目領域EA(l)、口領域MA)として設定される。   After the entire range in which the window SW can be located is scanned for all the predetermined sizes of the window SW, an organ region setting process by the region setting unit 214 (FIG. 1) is executed (step S620 in FIG. 11). FIG. 13 is an explanatory diagram showing an outline of the organ region setting process. The organ area setting process is the same as the original face area setting process (see FIGS. 9 and 10). The area setting unit 214 determines that the cumulative evaluation value Tv is greater than or equal to the threshold value TH in step S560 of FIG. 11, and stores the coordinates of the window SW stored in step S570, the specific face inclination corresponding to the original face area FAo, Based on the above, an organ region is set as an image region corresponding to the facial organ image. Specifically, when the specific face inclination is 0 degree, the image area defined by the window SW (that is, the determination target image area JIA) is set as an organ area as it is. On the other hand, when the specific face inclination is other than 0 degrees, the inclination of the window SW is matched with the specific face inclination (that is, the window SW is clocked by the specific face inclination around a predetermined point (for example, the center of gravity of the window SW). The image region defined by the window SW after the inclination is changed is set as the organ region. For example, as shown in FIG. 13A, for a specific face inclination of 30 degrees, in a window SW (er) corresponding to the right eye, a window SW (el) corresponding to the left eye, and a window SW (m) corresponding to the mouth When it is determined that the cumulative evaluation value Tv is equal to or greater than the threshold value TH, as shown in FIG. 13B, the inclination of each window SW is changed to 30 degrees and is defined by each window SW after the inclination change. Image areas are set as organ areas (right eye area EA (r), left eye area EA (l), mouth area MA).

また、原顔領域設定処理と同様に、互いに一部が重複する複数のウィンドウSWが記憶された場合には、各ウィンドウSWにおける所定の点(例えばウィンドウSWの重心)の座標の平均の座標を重心とし、各ウィンドウSWのサイズの平均のサイズを有する1つの新たなウィンドウ(平均ウィンドウAW)が設定され、特定顔傾きが0度である場合には、平均ウィンドウAWにより規定される画像領域がそのまま器官領域として設定され、特定顔傾きが0度以外である場合には、平均ウィンドウAWの傾きを特定顔傾きに一致させ(すなわち平均ウィンドウAWを所定の点(例えば平均ウィンドウAWの重心)を中心として特定顔傾き分だけ時計回りに回転させ)、傾きを変化させた後の平均ウィンドウAWにより規定される画像領域が器官領域として設定される。   Similarly to the original face area setting process, when a plurality of windows SW that partially overlap 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 calculated. When one new window (average window AW) having the center of gravity and the average size of each window SW is set and the specific face inclination is 0 degree, the image area defined by the average window AW is When the organ area is set as it is and the specific face inclination is other than 0 degree, the inclination of the average window AW is matched with the specific face inclination (that is, the average window AW is set to a predetermined point (for example, the center of gravity of the average window AW)). The image area defined by the average window AW after changing the inclination is rotated clockwise by a specific face inclination as the center. It is set as a region.

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

器官領域検出処理(図3のステップS180)において、3種類の器官に対応する器官領域(右目領域EA(r)と左目領域EA(l)と口領域MA)がすべて検出された場合には(ステップS190:Yes)、顔領域決定部216(図1)が、決定顔領域FAfを設定する(ステップS210)。図14は、決定顔領域FAfの設定方法を示す説明図である。まず、図14(a)に示すように、顔領域決定部216の顔傾き推定部217は、右目領域EA(r)の重心と左目領域EA(l)の重心とを結ぶ直線CLの傾きを算出し、対象画像に表された顔の画像の実際の傾き(実傾き)は算出された直線CLの傾きに等しいと推定する。すなわち、実傾きは、右目領域EA(r)と左目領域EA(l)との間の位置関係に基づき推定される。次に、図14(b)に示すように、顔領域決定部216は、原顔領域FAoを規定する平均ウィンドウAWの傾きを推定された実傾きと一致するように変化させ(すなわち平均ウィンドウAWを平均ウィンドウAWの重心を中心として推定された実傾き分だけ時計回りに回転させ)、傾き変化後の平均ウィンドウAWにより規定される画像領域を決定顔領域FAfとして設定する。このとき、決定顔領域FAfは、その外周の2辺が直線CLと平行な矩形の画像領域となる。   In the organ area detection process (step S180 in FIG. 3), when all of the organ areas (right eye area EA (r), left eye area EA (l), and mouth area MA) corresponding to the three types of organs are detected ( In step S190: Yes, the face area determining unit 216 (FIG. 1) sets the determined face area FAf (step S210). FIG. 14 is an explanatory diagram showing a method for setting the determined face area FAf. First, as shown in FIG. 14A, the face inclination estimation unit 217 of the face area determination unit 216 calculates the inclination of the straight line CL connecting the center of gravity of the right eye area EA (r) and the center of gravity of the left eye area EA (l). The actual inclination (actual inclination) of the face image represented in the target image is estimated to be equal to the inclination of the calculated straight line CL. That is, the actual inclination is estimated based on the positional relationship between the right eye area EA (r) and the left eye area EA (l). Next, as shown in FIG. 14B, the face area determination unit 216 changes the inclination of the average window AW that defines the original face area FAo so as to match the estimated actual inclination (that is, the average window AW). Is rotated clockwise by the actual inclination estimated around the center of gravity of the average window AW), and the image area defined by the average window AW after the inclination change is set as the determined face area FAf. At this time, the determined face area FAf is a rectangular image area whose two outer edges are parallel to the straight line CL.

ステップS210(図3)における決定顔領域FAfの設定では、設定された決定顔領域FAfの傾き(顔領域傾き)が、対象画像に表された顔の画像の実際の傾き(実傾き)の推定値と一致する。また、実傾きの推定値として取り得る値は離散値ではなく連続値である。そのため、この場合には、顔領域傾きと実傾きとの差異の平均値は比較的小さくなり、顔領域を決定する際の精度は比較的高いこととなる。なお、ステップS210における決定顔領域FAfの設定方法は、本発明における第2の処理モードにおける決定顔領域FAfの設定方法に相当する。   In the setting of the determined face area FAf in step S210 (FIG. 3), the inclination of the determined determined face area FAf (face area inclination) is an estimate of the actual inclination (actual inclination) of the face image represented in the target image. Matches the value. In addition, the value that can be taken as the estimated value of the actual slope is not a discrete value but a continuous value. Therefore, in this case, the average value of the difference between the face area inclination and the actual inclination is relatively small, and the accuracy in determining the face area is relatively high. The method for setting the determined face area FAf in step S210 corresponds to the method for setting the determined face area FAf in the second processing mode of the present invention.

ステップS220(図3)では、領域検出部210(図1)が、ステップS170において未だ選択されていない原顔領域FAoが存在するか否かを判定する。未だ選択されていない原顔領域FAoが存在すると判定された場合には(ステップS220:No)、ステップS170に戻って未選択の原顔領域FAoの1つが選択され、ステップS180以降の処理が実行される。一方、すべての原顔領域FAoが選択されたと判定された場合には(ステップS220:Yes)、処理はステップS230に進む。   In step S220 (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 S170. When it is determined that there is an unselected original face area FAo (step S220: No), the process returns to step S170, and one of the unselected original face areas FAo is selected, and the processes after step S180 are executed. Is done. On the other hand, when it is determined that all the original face areas FAo have been selected (step S220: Yes), the process proceeds to step S230.

ステップS230(図3)では、情報付加部230(図1)が、設定された決定顔領域FAfの位置(座標)を示す情報を、原画像データを含む画像ファイルに付属情報として付加する。これにより、原画像OImgを表す原画像データと、原画像OImgにおける決定顔領域FAfの位置(座標)を示す情報と、が含まれた画像ファイルが生成される。なお、決定顔領域FAfの位置(座標)を示す情報に加えて、器官領域(右目領域EA(r)、左目領域EA(l)、口領域MA)の位置(座標)を示す情報やステップS110で設定された精度を示す情報が画像ファイルに付属情報として付加されるとしてもよい。   In step S230 (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 the 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 step S110 Information indicating the accuracy set in step 1 may be added as attached information to the image file.

以上説明したように、第1実施例のプリンタ100による顔領域検出処理では、画像データに基づき顔検出用画像FDImgにおける原顔領域FAoが検出され、ステップS110で設定された精度が比較的低い値である場合には、原顔領域FAoそのものが決定顔領域FAfとして設定される。このとき器官領域検出処理は実行されない。このときには、決定顔領域FAfの設定精度は比較的低くなるが、処理時間は比較的短くなる。一方、ステップS110で設定された精度が比較的高い値である場合には、原顔領域FAoにおける器官領域が検出され、器官領域の検出結果に基づき原顔領域FAoを調整した領域が決定顔領域FAfとして設定される。このときには、処理時間は比較的長くなるが、決定顔領域FAfの設定精度は比較的高くなる。そのため、本実施例では、決定顔領域FAfを設定する際の、設定精度と処理時間との調整を図ることができる。   As described above, in the face area detection process by the printer 100 of the first embodiment, the original face area FAo in the face detection image FDImg is detected based on the image data, and the accuracy set in step S110 is a relatively low value. In this case, the original face area FAo itself is set as the determined face area FAf. At this time, the organ region detection process is not executed. At this time, the setting accuracy of the determined face area FAf is relatively low, but the processing time is relatively short. On the other hand, if the accuracy set in step S110 is a relatively high value, an organ area in the original face area FAo is detected, and an area obtained by adjusting the original face area FAo based on the detection result of the organ area is a determined face area. Set as FAf. At this time, the processing time is relatively long, but the setting accuracy of the determined face area FAf is relatively high. For this reason, in this embodiment, it is possible to adjust the setting accuracy and the processing time when setting the determined face area FAf.

B.第2実施例:
図15は、本発明の第2実施例における画像処理装置としてのプリンタ100aの構成を概略的に示す説明図である。第2実施例のプリンタ100aは、画像処理部200の構成の点で、図1に示した第1実施例のプリンタ100と異なっている。すなわち、第2実施例のプリンタ100aは、精度設定部220(図1)を含まない代わりに、検出傾き設定部240と、検出判定部250と、を含んでいる。プリンタ100aのその他の構成は、図1に示した第1実施例のプリンタ100の構成と同じである。
B. Second embodiment:
FIG. 15 is an explanatory diagram schematically showing the configuration of a printer 100a as an image processing apparatus according to the second embodiment of the present invention. The printer 100a of the second embodiment is different from the printer 100 of the first embodiment shown in FIG. 1 in the configuration of the image processing unit 200. That is, the printer 100a of the second embodiment includes a detection inclination setting unit 240 and a detection determination unit 250 instead of including the accuracy setting unit 220 (FIG. 1). The other configuration of the printer 100a is the same as that of the printer 100 of the first embodiment shown in FIG.

検出傾き設定部240は、対象画像から検出すべき顔の画像の傾きを設定する。検出判定部250は、設定された検出すべき顔の画像の傾きと、対象画像に表された顔の画像の実際の傾き(実傾き)の推定値とに基づき、対象画像に表された顔の画像が検出すべき顔の画像であるか否かを判定する。   The detection inclination setting unit 240 sets the inclination of the face image to be detected from the target image. The detection determination unit 250 determines the face represented in the target image based on the set inclination of the face image to be detected and the estimated value of the actual inclination (actual inclination) of the face image represented in the target image. It is determined whether the image is a face image to be detected.

図16は、第2実施例における顔領域検出処理の流れを示すフローチャートである。第2実施例における顔領域検出処理は、図3に示した第1実施例における顔領域検出処理と同様に、画像データの表す画像における顔の画像に対応する顔領域を決定する処理である。   FIG. 16 is a flowchart showing the flow of face area detection processing in the second embodiment. The face area detection process in the second embodiment is a process for determining a face area corresponding to the face image in the image represented by the image data, similarly to the face area detection process in the first embodiment shown in FIG.

ステップS112(図16)では、検出傾き設定部240(図1)が、対象画像から検出すべき顔の画像の傾き(以下「検出傾き範囲」とも呼ぶ)を設定する。検出傾き設定部240は、決定される顔領域の用途を特定する用途情報を取得して、用途情報に基づき検出傾き範囲を設定する。図17は、決定される顔領域の用途の一例を示す説明図である。図17には、画像処理部200(図1)が提供する画像処理メニューの一覧が表示部150に表示されている様子が示されている。本実施例では、画像処理メニューとして、証明写真検出が設定されており、決定される顔領域は証明写真検出の画像処理のために用いられる。   In step S112 (FIG. 16), the detected tilt setting unit 240 (FIG. 1) sets the tilt of the face image to be detected from the target image (hereinafter also referred to as “detected tilt range”). The detected inclination setting unit 240 acquires application information specifying the application of the determined face area, and sets a detected inclination range based on the application information. FIG. 17 is an explanatory diagram illustrating an example of the use of the face area to be determined. FIG. 17 shows a state where a list of image processing menus provided by the image processing unit 200 (FIG. 1) is displayed on the display unit 150. In this embodiment, ID photo detection is set as the image processing menu, and the determined face area is used for image processing for ID photo detection.

証明写真検出は、証明写真に適した構図の写真画像を検出する処理である。証明写真に適した構図の写真画像とは、具体的には、対象画像における顔の画像の傾きが比較的小さい画像である。ユーザにより操作部140を介して証明写真検出が選択された場合には、検出傾き設定部240は顔領域の用途が証明写真検出であるとの用途情報を取得し、例えば0度から20度および340度から360度の傾きの範囲を検出傾き範囲として設定する。図18は、検出傾き範囲の一例を示す説明図である。   ID photo detection is processing for detecting a photo image having a composition suitable for an ID photo. Specifically, the photographic image having a composition suitable for the ID photo is an image in which the inclination of the face image in the target image is relatively small. When the ID photo detection is selected by the user via the operation unit 140, the detection inclination setting unit 240 acquires usage information that the usage of the face area is ID photo detection. An inclination range of 340 degrees to 360 degrees is set as a detected inclination range. FIG. 18 is an explanatory diagram illustrating an example of the detected inclination range.

第2実施例における顔領域検出処理(図16)のステップS120およびS130の処理内容は、第1実施例における顔領域検出処理(図3)のステップS120およびS130の処理内容と同じである。ただし、ステップS130の原顔検出処理(図5)における累計評価値Tvの算出(ステップS350)は、設定された検出傾き範囲をカバーする特定顔傾きについてのみ実行される。上述したように、特定顔傾きは、傾きを0度から30度ずつ増加させた計12個の顔傾き(0度、30度、60度、・・・、330度)であり、ある特定顔傾きに対応する顔学習データFLD(図1)は当該特定顔傾きを中心に顔傾きの値がプラスマイナス15度の範囲の顔の画像を検出可能なように設定されている。例えば、図18に示すように、0度の特定顔傾きに対応する顔学習データFLDは、0度を中心に顔傾きの値がプラスマイナス15度の範囲(図18において「R(0)」と示す)の顔の画像を検出可能である。同様に、30度の特定顔傾きに対応する顔学習データFLDは、30度を中心に顔傾きの値がプラスマイナス15度の範囲(図18において「R(30)」と示す)の顔の画像を検出可能であり、330度の特定顔傾きに対応する顔学習データFLDは、330度を中心に顔傾きの値がプラスマイナス15度の範囲(図18において「R(330)」と示す)の顔の画像を検出可能である。そのため、図18に示すように、0度から20度および340度から360度の傾きの範囲が検出傾き範囲として設定された場合には、累計評価値Tvの算出は、検出傾き範囲をカバーする特定顔傾きである0度、30度、330度の3つの特定顔傾きについてのみ実行される。   The processing contents of steps S120 and S130 of the face area detection process (FIG. 16) in the second embodiment are the same as the processing contents of steps S120 and S130 of the face area detection process (FIG. 3) in the first embodiment. However, the calculation (step S350) of the cumulative evaluation value Tv in the original face detection process (FIG. 5) in step S130 is executed only for the specific face inclination that covers the set detection inclination range. As described above, the specific face inclination is a total of 12 face inclinations (0 degrees, 30 degrees, 60 degrees,..., 330 degrees) obtained by increasing the inclination from 0 degrees to 30 degrees. The face learning data FLD corresponding to the inclination (FIG. 1) is set so that a face image having a face inclination value in the range of plus or minus 15 degrees around the specific face inclination can be detected. For example, as shown in FIG. 18, the face learning data FLD corresponding to a specific face inclination of 0 degrees has a face inclination value in the range of plus or minus 15 degrees centering on 0 degrees (“R (0)” in FIG. 18). Can be detected. Similarly, the face learning data FLD corresponding to the specific face inclination of 30 degrees has the face inclination value in the range of plus or minus 15 degrees centered on 30 degrees (shown as “R (30)” in FIG. 18). The face learning data FLD that can detect an image and corresponds to a specific face inclination of 330 degrees has a face inclination value in the range of plus or minus 15 degrees centered on 330 degrees (shown as “R (330)” in FIG. 18). ) Face image can be detected. Therefore, as shown in FIG. 18, when the inclination ranges of 0 degrees to 20 degrees and 340 degrees to 360 degrees are set as the detected inclination ranges, the calculation of the cumulative evaluation value Tv covers the detected inclination range. It is executed only for three specific face inclinations of 0 degrees, 30 degrees, and 330 degrees that are specific face inclinations.

第2実施例における顔領域検出処理(図16)では、第1実施例における顔領域検出処理(図3)と同様に、原顔領域検出処理(ステップS130)において原顔領域FAoが検出されなかった場合には(ステップS140:No)、顔領域検出処理は終了する。一方、少なくとも1つの原顔領域FAoが検出された場合には(ステップS140:Yes)、処理はステップS170に進む。ステップS170からS210までの処理内容は、第1実施例における顔領域検出処理(図3)における処理内容と同じである。   In the face area detection process (FIG. 16) in the second embodiment, the original face area FAo is not detected in the original face area detection process (step S130) as in the face area detection process (FIG. 3) in the first embodiment. If it is detected (step S140: No), the face area detection process ends. On the other hand, when at least one original face area FAo is detected (step S140: Yes), the process proceeds to step S170. The processing content from step S170 to S210 is the same as the processing content in the face area detection processing (FIG. 3) in the first embodiment.

ステップS212(図16)では、検出判定部250(図15)が、ステップS210で推定された顔の画像の実際の傾き(実傾き)(図14(a)参照)が、ステップS112で設定された検出傾き範囲内であるか否かを判定する。推定された実傾きが検出傾き範囲内であると判定された場合には(ステップS212:Yes)、検出判定部250は、対象画像に表された顔の画像が検出すべき顔の画像であると判定する。この場合には、情報付加部230(図15)が、設定された決定顔領域FAfの位置(座標)を示す情報を、原画像データを含む画像ファイルに付属情報として付加する(ステップS214)。一方、推定された実傾きが検出傾き範囲内ではないと判定された場合には(ステップS212:No)、検出判定部250は、対象画像に表された顔の画像が検出すべき顔の画像ではないと判定する。この場合には、ステップS214の処理はスキップされる。   In step S212 (FIG. 16), the detection determination unit 250 (FIG. 15) sets the actual inclination (actual inclination) (see FIG. 14A) of the face image estimated in step S210 in step S112. It is determined whether it is within the detected inclination range. When it is determined that the estimated actual inclination is within the detected inclination range (step S212: Yes), the detection determination unit 250 is the face image to be detected from the face image represented in the target image. Is determined. In this case, the information adding unit 230 (FIG. 15) 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 (step S214). On the other hand, when it is determined that the estimated actual inclination is not within the detected inclination range (step S212: No), the detection determination unit 250 detects the face image to be detected from the face image represented in the target image. It is determined that it is not. In this case, the process of step S214 is skipped.

その後、ステップS170において未だ選択されていない原顔領域FAoが存在するか否かが判定され(ステップS220)、未だ選択されていない原顔領域FAoが存在すると判定された場合には(ステップS220:No)、処理はステップS170に戻り、すべての原顔領域FAoが選択されたと判定された場合には(ステップS220:Yes)、処理は終了する。   Thereafter, in step S170, it is determined whether or not there is an unselected original face area FAo (step S220). If it is determined that there is an unselected original face area FAo (step S220: No) The process returns to step S170, and if it is determined that all the original face areas FAo have been selected (step S220: Yes), the process ends.

以上説明したように、第2実施例のプリンタ100aによる顔領域検出処理では、対象画像から検出すべき顔の画像の傾きが設定され、検出された複数の器官領域間の位置関係に基づき対象画像に表された顔の画像の傾きが推定され、検出すべき顔の画像の傾きと推定された顔の画像の傾きとに基づき、対象画像に表された顔の画像が検出すべき顔の画像であるか否かが判定される。そのため、第2実施例のプリンタ100aによる顔領域検出処理では、対象画像に表された顔の画像が検出すべき顔の画像であるか否かの判定を精度良く実行することができる。   As described above, in the face area detection processing by the printer 100a of the second embodiment, the inclination of the face image to be detected from the target image is set, and the target image is based on the detected positional relationship between the plurality of organ areas. The inclination of the face image represented in (2) is estimated, and the face image represented in the target image is to be detected based on the inclination of the face image to be detected and the inclination of the estimated face image. It is determined whether or not. Therefore, in the face area detection process by the printer 100a of the second embodiment, it is possible to accurately determine whether or not the face image represented in the target image is a face image to be detected.

C.変形例:
なお、この発明は上記の実施例や実施形態に限られるものではなく、その要旨を逸脱しない範囲において種々の態様において実施することが可能であり、例えば次のような変形も可能である。
C. 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.

C1.変形例1:
上記各実施例では、精度は、決定顔領域FAfの傾き(顔領域傾き)と対象画像に表された顔の画像の実際の傾き(実傾き)との差異の平均値の程度を意味するものとしているが、精度は、決定顔領域FAfの位置および大きさと対象画像に表された顔の画像の実際の位置および大きさとの差異の平均値の程度をも意味するものとしてもよい。この場合に、精度として高い精度が設定されたときには、決定顔領域FAfの設定(図3のステップS210)において、器官領域の検出結果に基づき原顔領域FAoの位置および大きさが調整されてもよい。原顔領域FAoの位置の調整は、例えば、右目領域EA(r)の重心と左目領域EA(l)の重心とを結ぶ線分の中点と、決定顔領域FAfの横方向および縦方向の大きさを所定の比率で分割する点と、が一致するように、原顔領域FAoを平行移動することにより行われる。また、原顔領域FAoの大きさの調整は、例えば、決定顔領域FAfの横方向の大きさが、右目領域EA(r)の重心と左目領域EA(l)の重心とを結ぶ線分の長さの所定倍となり、決定顔領域FAfの縦方向の大きさが、右目領域EA(r)の重心と左目領域EA(l)の重心とを結ぶ線分と口領域MAの重心とを結ぶ線分の長さの所定倍となるように、原顔領域FAoを拡大または縮小することにより行われる。
C1. Modification 1:
In each of the above embodiments, the accuracy means the degree of the average value of the difference between the inclination of the determined face area FAf (face area inclination) and the actual inclination (actual inclination) of the face image represented in the target image. However, the accuracy may also mean an average degree of difference between the position and size of the determined face area FAf and the actual position and size of the face image represented in the target image. In this case, when high accuracy is set as the accuracy, even if the position and size of the original face region FAo are adjusted based on the detection result of the organ region in the setting of the determined face region FAf (step S210 in FIG. 3). Good. The position of the original face area FAo is adjusted, for example, by the midpoint of the line segment connecting the center of gravity of the right eye area EA (r) and the center of gravity of the left eye area EA (l), and the horizontal and vertical directions of the determined face area FAf. This is done by translating the original face area FAo so that the points whose size is divided at a predetermined ratio coincide. The size of the original face area FAo is adjusted, for example, by determining whether the horizontal size of the determined face area FAf is a line segment connecting the center of gravity of the right eye area EA (r) and the center of gravity of the left eye area EA (l). The vertical size of the determined face area FAf is a predetermined multiple of the length, and connects the line segment connecting the center of gravity of the right eye area EA (r) and the center of gravity of the left eye area EA (l) and the center of gravity of the mouth area MA. This is performed by enlarging or reducing the original face area FAo so as to be a predetermined multiple of the length of the line segment.

C2.変形例2:
上記各実施例における顔領域の用途(図4および図17参照)は、あくまで一例であり、顔領域の用途は他にも種々設定可能である。また、上記各実施例における顔領域の用途に応じた精度や検出傾き範囲は、あくまで一例であり、顔領域の用途に応じて精度や検出傾き範囲は種々変形可能である。
C2. Modification 2:
The use of the face area (see FIGS. 4 and 17) in each of the above embodiments is merely an example, and various other uses of the face area can be set. In addition, the accuracy and the detection inclination range according to the use of the face area in each of the above embodiments are merely examples, and the accuracy and the detection inclination range can be variously modified according to the use of the face area.

また、上記第1実施例において、顔領域の用途の設定を介さずに、精度が直接設定されてもよい。また、上記第2実施例において、顔領域の用途の設定を介さずに、検出傾き範囲が直接設定されてもよい。   In the first embodiment, the accuracy may be set directly without setting the use of the face area. In the second embodiment, the detected inclination range may be directly set without setting the use of the face area.

また、上記第1実施例において、精度の設定が行われることなく、処理モードの選択、すなわち決定顔領域FAfの設定のために器官領域検出処理が実行されるか否かの選択が直接行われるとしてもよい。   In the first embodiment, the selection of the processing mode, that is, the selection of whether or not the organ area detection process is executed for setting the determined face area FAf is directly performed without setting the accuracy. It is good.

C3.変形例3:
上記各実施例では、器官領域検出処理(図3のステップS180)においていずれの器官検出用画像ODImgにおいても3種類の器官に対応する器官領域(右目領域EA(r)と左目領域EA(l)と口領域MA)の少なくとも1つが検出されなかった場合に、器官領域が検出されなかったと判定されるとしているが、3種類の器官領域の少なくとも1つが検出された場合には器官領域が検出されたと判定されるものとしてもよい。あるいは、口領域MAの検出結果に関わらず、顔傾きの推定に用いられる右目領域EA(r)と左目領域EA(l)の両者が検出された場合には器官領域が検出されたと判定され、右目領域EA(r)と左目領域EA(l)の少なくとも一方が検出されなかった場合には器官領域が検出されなかったと判定されるとしてもよい。
C3. Modification 3:
In each of the embodiments described above, in the organ region detection process (step S180 in FIG. 3), in any organ detection image ODImg, organ regions (right eye region EA (r) and left eye region EA (l) corresponding to three types of organs). And at least one of the mouth areas MA), it is determined that the organ area is not detected. However, if at least one of the three kinds of organ areas is detected, the organ area is detected. It may be determined that Alternatively, 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 estimating the face inclination are detected, it is determined that the organ area has been detected, When 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つが検出されたときには器官領域が検出されたと判定されるとした場合、顔傾きの推定に右目領域EA(r)と左目領域EA(l)との一方または両方が利用できないことが考えられる。このような場合には、器官領域が検出された器官検出用画像ODImgの傾きを顔傾きと推定すればよい。   If it is determined that an organ area has been detected when at least one of the three types of organ areas is detected, one of the right eye area EA (r) and the left eye area EA (l) or It is possible that both are not 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.

C4.変形例4:
上記各実施例では、顔学習データFLDや顔器官学習データOLDが、正面向きの画像に対応するもののみが準備されているが、右向きや左向きに対応するものが準備され、右向きや左向きの顔の画像や顔の器官の画像に対応する顔領域や器官領域の検出が行われるとしてもよい。
C4. Modification 4:
In each of the above embodiments, only the face learning data FLD and the facial organ learning data OLD corresponding to the front-facing image are prepared. Detection of a face area or an organ area corresponding to an image of the above or an image of a facial organ may be performed.

C5.変形例5:
上記各実施例における原顔領域検出処理(図5)や器官領域検出処理(図11)の態様はあくまで一例であり、種々変更可能である。例えば顔検出用画像FDImg(図6参照)のサイズは320画素×240画素に限られず、他のサイズであってもよいし、原画像OImgそのものを顔検出用画像FDImgとして用いることも可能である。また、使用されるウィンドウSWのサイズやウィンドウSWの移動方向および移動量(移動ピッチ)は上述したものに限られない。また、上記各実施例では、顔検出用画像FDImgのサイズが固定され、複数種類のサイズのウィンドウSWが顔検出用画像FDImg上に配置されることにより複数サイズの判定対象画像領域JIAが設定されているが、複数種類のサイズの顔検出用画像FDImgが生成され、固定サイズのウィンドウSWが顔検出用画像FDImg上に配置されることにより複数サイズの判定対象画像領域JIAが設定されるものとしてもよい。
C5. Modification 5:
The aspects of the original face area detection process (FIG. 5) and the organ area detection process (FIG. 11) in each of the above embodiments are merely examples, and various changes can be made. For example, the size of the face detection image FDImg (see FIG. 6) is not limited to 320 pixels × 240 pixels, and may be other sizes, or the original image OImg itself may 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. Further, in each of the embodiments described above, the size of the face detection image FDImg is fixed, and a plurality of types of sizes of window SW SW are arranged on the face detection image FDImg, thereby setting a determination target image area JIA having a plurality of sizes. However, a plurality of sizes 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. Also good.

また、上記各実施例では、累計評価値Tvを閾値THと比較することにより顔判定および器官判定を行っているが(図7参照)、顔判定および器官判定を複数の判別器を用いた判別等の他の方法によって行ってもよい。顔判定および器官判定の方法に応じて、顔学習データFLDおよび顔器官学習データOLDの設定に用いられる学習方法も変更される。また、顔判定および器官判定は、必ずしも学習を用いた判別方法により行われる必要はなく、パターンマッチング等の他の方法により行われるとしてもよい。   In each of the above embodiments, the face evaluation and the organ determination are performed by comparing the cumulative evaluation value Tv with the threshold value TH (see FIG. 7), 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 each of the above embodiments, 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 may be 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 each of the above embodiments, 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. Absent.

上記各実施例において、あるサイズのウィンドウSWにより規定される判定対象画像領域JIAについての顔判定(または器官判定)で顔の画像(または顔の器官の画像)に対応する画像領域であると判定された場合には、当該サイズより所定の比率以上小さいサイズのウィンドウSWを配置する場合には、顔の画像に対応する画像領域であると判定された判定対象画像領域JIAを避けて配置するものとしてもよい。このようにすれば、処理の高速化を図ることができる。   In each of the above embodiments, 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). If the window SW having a size smaller than the size by a predetermined ratio or more is arranged, the window SW is arranged avoiding the determination target image area JIA determined to be the image area corresponding to the face image. It is good. In this way, the processing speed can be increased.

上記各実施例では、メモリカードMCに格納された画像データが原画像データに設定されているが、原画像データはメモリカードMCに格納された画像データに限らず、例えばネットワークを介して取得された画像データであってもよい。   In each of the above embodiments, 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 each of the above embodiments, the right eye, the left eye, and the mouth are set as the types of facial organs, and detection of the right eye area EA (r), the left eye area EA (l), and the mouth area MA is performed as the 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 each of the above embodiments, 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 a shape other than a rectangle.

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

本発明の第1実施例における画像処理装置としてのプリンタ100の構成を概略的に示す説明図である。1 is an explanatory diagram schematically showing the configuration of a printer 100 as an image processing apparatus in a first embodiment of the present invention. FIG. 顔学習データFLDおよび顔器官学習データOLDの種類を示す説明図である。It is explanatory drawing which shows the kind of face learning data FLD and face organ learning data OLD. 第1実施例における顔領域検出処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the face area detection process in 1st Example. 決定される顔領域の用途の一例を示す説明図である。It is explanatory drawing which shows an example of the use of the face area determined. 原顔領域検出処理の流れを示すフローチャートである。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 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. 器官領域検出処理の概要を示す説明図である。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. 決定顔領域FAfの設定方法を示す説明図である。It is explanatory drawing which shows the setting method of the determination face area | region FAf. 本発明の第2実施例における画像処理装置としてのプリンタ100aの構成を概略的に示す説明図である。It is explanatory drawing which shows roughly the structure of the printer 100a as an image processing apparatus in 2nd Example of this invention. 第2実施例における顔領域検出処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the face area detection process in 2nd Example. 決定される顔領域の用途の一例を示す説明図である。It is explanatory drawing which shows an example of the use of the face area determined. 検出傾き範囲の一例を示す説明図である。It is explanatory drawing which shows an example of the detection inclination range.

符号の説明Explanation of symbols

100…プリンタ
110…CPU
120…内部メモリ
140…操作部
150…表示部
160…プリンタエンジン
170…カードインターフェース
172…カードスロット
200…画像処理部
210…領域検出部
211…判定対象設定部
212…評価値算出部
213…判定部
214…領域設定部
216…顔領域決定部
217…顔傾き推定部
220…精度設定部
230…情報付加部
240…検出傾き設定部
250…検出判定部
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 216 ... Face region determining unit 217 ... Face inclination estimating unit 220 ... Accuracy setting unit 230 ... Information adding unit 240 ... Detection inclination setting unit 250 ... Detection determination unit 310 ... Display processing unit 320 ... Print processing unit

Claims (9)

画像処理装置であって、
画像データに基づき対象画像における顔の画像に対応する領域を原顔領域として検出する顔領域検出部と、
前記原顔領域における顔の器官の画像に対応する領域を器官領域として検出する器官領域検出部と、
前記対象画像における顔の画像に対応する決定顔領域を設定する顔領域決定部であって、前記原顔領域を前記決定顔領域として設定する第1の処理モードと、前記器官領域の検出結果に基づき前記原顔領域を調整した領域を前記決定顔領域として設定する第2の処理モードと、を有する顔領域決定部と、を備える、画像処理装置。
An image processing apparatus,
A face area detection unit that detects an area corresponding to a face image in the target image based on image data as an original face area;
An organ region detection unit that detects a region corresponding to an image of a facial organ in the original face region as an organ region;
A face area determination unit that sets a determined face area corresponding to a face image in the target image, the first processing mode for setting the original face area as the determined face area, and the detection result of the organ area An image processing apparatus comprising: a face area determination unit including: a second processing mode that sets an area obtained by adjusting the original face area as the determined face area.
請求項1に記載の画像処理装置であって、さらに、
前記決定顔領域を設定する際の精度を設定する精度設定部を備え、
前記顔領域決定部は、前記精度が所定の範囲の場合には前記第1の処理モードで前記決定顔領域を設定し、前記精度が前記所定の範囲より高い場合には前記第2の処理モードで前記決定顔領域を設定する、画像処理装置。
The image processing apparatus according to claim 1, further comprising:
An accuracy setting unit for setting the accuracy when setting the determined face area;
The face area determination unit sets the determined face area in the first processing mode when the accuracy is within a predetermined range, and the second processing mode when the accuracy is higher than the predetermined range. An image processing apparatus for setting the determined face area by using
請求項1または請求項2に記載の画像処理装置であって、
前記精度設定部は、前記決定顔領域の用途を特定する用途情報を取得し、前記用途情報に基づき前記精度を設定する、画像処理装置。
The image processing apparatus according to claim 1 or 2,
The accuracy setting unit is an image processing apparatus that acquires usage information specifying a usage of the determined face area, and sets the accuracy based on the usage information.
請求項1ないし請求項3のいずれかに記載の画像処理装置であって、
前記顔領域決定部は、前記第2のモードにおいて、検出された複数の前記器官領域間の位置関係に基づき前記原顔領域の傾きを調整することにより前記決定顔領域を設定する、画像処理装置。
An image processing apparatus according to any one of claims 1 to 3,
In the second mode, the face area determination unit sets the determined face area by adjusting an inclination of the original face area based on a positional relationship between the plurality of detected organ areas. .
請求項1に記載の画像処理装置であって、さらに、
前記対象画像から検出すべき顔の画像の傾きを設定する検出傾き設定部と、
検出された複数の前記器官領域間の位置関係に基づき前記対象画像に表された顔の画像の傾きを推定する顔傾き推定部と、
前記検出すべき顔の画像の傾きと前記推定された顔の画像の傾きとに基づき、前記対象画像に表された顔の画像が検出すべき顔の画像であるか否かを判定する検出判定部と、を備える、画像処理装置。
The image processing apparatus according to claim 1, further comprising:
A detection inclination setting unit for setting the inclination of the face image to be detected from the target image;
A face inclination estimation unit that estimates an inclination of an image of a face represented in the target image based on a positional relationship between the plurality of organ regions detected;
Detection determination for determining whether the face image represented in the target image is a face image to be detected based on the inclination of the face image to be detected and the estimated inclination of the face image An image processing apparatus.
請求項1ないし請求項5のいずれかに記載の画像処理装置であって、
前記顔領域検出部は、
前記対象画像上における画像領域である判定対象画像領域を設定する判定対象設定部と、
前記判定対象画像領域が所定の複数の離散した傾きの内の1つを有する顔の画像に対応する画像領域であることの確からしさを表す評価値を算出するための評価用データを記憶する記憶部と、
前記評価用データと前記判定対象画像領域に対応する画像データとに基づき前記評価値を算出する評価値算出部と、
前記評価値に基づき、前記判定対象画像領域が顔の画像に対応する画像領域であるか否かを判定する判定部と、
顔の画像に対応する画像領域であると判定された前記判定対象画像領域の位置およびサイズに基づき前記原顔領域を設定する領域設定部と、を含む、画像処理装置。
An image processing apparatus according to any one of claims 1 to 5,
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 memory for storing evaluation data for calculating an evaluation value indicating the probability that the determination target image area is an image area corresponding to a face image having one of a plurality of predetermined discrete slopes And
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 original 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.
請求項1ないし請求項6のいずれかに記載の画像処理装置であって、
前記顔の器官の種類は、右目と左目と口との少なくとも1つである、画像処理装置。
An image processing apparatus according to any one of claims 1 to 6,
The type of facial organ is at least one of a right eye, a left eye, and a mouth.
画像処理方法であって、
(a)画像データに基づき対象画像における顔の画像に対応する領域を原顔領域として検出する工程と、
(b)前記原顔領域における顔の器官の画像に対応する領域を器官領域として検出する工程と、
(c)前記対象画像における顔の画像に対応する決定顔領域を設定する工程であって、前記原顔領域を前記決定顔領域として設定する第1の処理モードと、前記器官領域の検出結果に基づき前記原顔領域を調整した領域を前記決定顔領域として設定する第2の処理モードと、を有する工程と、を備える、画像処理方法。
An image processing method comprising:
(A) detecting an area corresponding to the face image in the target image based on the image data as an original face area;
(B) detecting an area corresponding to an image of a facial organ in the original face area as an organ area;
(C) a step of setting a determined face area corresponding to a face image in the target image, the first processing mode in which the original face area is set as the determined face area, and the detection result of the organ area And a second processing mode for setting, as the determined face area, an area obtained by adjusting the original face area based on the image processing method.
画像処理のためのコンピュータプログラムであって、
画像データに基づき対象画像における顔の画像に対応する領域を原顔領域として検出する顔領域検出機能と、
前記原顔領域における顔の器官の画像に対応する領域を器官領域として検出する器官領域検出機能と、
前記対象画像における顔の画像に対応する決定顔領域を設定する顔領域決定機能であって、前記原顔領域を前記決定顔領域として設定する第1の処理モードと、前記器官領域の検出結果に基づき前記原顔領域を調整した領域を前記決定顔領域として設定する第2の処理モードと、を有する顔領域決定機能と、を、コンピュータに実現させる、コンピュータプログラム。
A computer program for image processing,
A face area detection function for detecting, as an original face area, an area corresponding to a face image in a target image based on image data;
An organ area detection function for detecting an area corresponding to an image of a facial organ in the original face area as an organ area;
A face area determination function for setting a determined face area corresponding to a face image in the target image, the first processing mode for setting the original face area as the determined face area, and the detection result of the organ area A computer program that causes a computer to realize a face area determination function having a second processing mode in which an area obtained by adjusting the original face area is set as the determined face area.
JP2008079228A 2008-03-25 2008-03-25 Set the face area corresponding to the face image in the target image Expired - Fee Related JP4985510B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008079228A JP4985510B2 (en) 2008-03-25 2008-03-25 Set the face area corresponding to the face image in the target image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008079228A JP4985510B2 (en) 2008-03-25 2008-03-25 Set the face area corresponding to the face image in the target image

Publications (2)

Publication Number Publication Date
JP2009237614A true JP2009237614A (en) 2009-10-15
JP4985510B2 JP4985510B2 (en) 2012-07-25

Family

ID=41251532

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008079228A Expired - Fee Related JP4985510B2 (en) 2008-03-25 2008-03-25 Set the face area corresponding to the face image in the target image

Country Status (1)

Country Link
JP (1) JP4985510B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345743A (en) * 2013-06-18 2013-10-09 宁波成电泰克电子信息技术发展有限公司 Image segmentation method for intelligent flaw detection of cell tail end

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6222900B2 (en) 2012-07-09 2017-11-01 キヤノン株式会社 Image processing apparatus, image processing method, and program
US9317948B2 (en) * 2012-11-16 2016-04-19 Arm Limited Method of and apparatus for processing graphics

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000339476A (en) * 1999-05-28 2000-12-08 Oki Electric Ind Co Ltd Eye position and face position detection device
JP2003290533A (en) * 2002-03-29 2003-10-14 Kita Denshi Corp Method for collating game member, method for storing and displaying history image and in-game place member system
JP2005157964A (en) * 2003-11-28 2005-06-16 Victor Co Of Japan Ltd Face image sensing method
JP2005316743A (en) * 2004-04-28 2005-11-10 Toshiba Corp Image processing method and device
JP2006133941A (en) * 2004-11-04 2006-05-25 Matsushita Electric Ind Co Ltd Image processing device, image processing method, image processing program, and portable terminal
JP2006139369A (en) * 2004-11-10 2006-06-01 Fuji Photo Film Co Ltd Image processing method and apparatus, and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000339476A (en) * 1999-05-28 2000-12-08 Oki Electric Ind Co Ltd Eye position and face position detection device
JP2003290533A (en) * 2002-03-29 2003-10-14 Kita Denshi Corp Method for collating game member, method for storing and displaying history image and in-game place member system
JP2005157964A (en) * 2003-11-28 2005-06-16 Victor Co Of Japan Ltd Face image sensing method
JP2005316743A (en) * 2004-04-28 2005-11-10 Toshiba Corp Image processing method and device
JP2006133941A (en) * 2004-11-04 2006-05-25 Matsushita Electric Ind Co Ltd Image processing device, image processing method, image processing program, and portable terminal
JP2006139369A (en) * 2004-11-10 2006-06-01 Fuji Photo Film Co Ltd Image processing method and apparatus, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345743A (en) * 2013-06-18 2013-10-09 宁波成电泰克电子信息技术发展有限公司 Image segmentation method for intelligent flaw detection of cell tail end

Also Published As

Publication number Publication date
JP4985510B2 (en) 2012-07-25

Similar Documents

Publication Publication Date Title
JP2009237619A (en) Detection of face area and organ area in image
JP5239625B2 (en) Image processing apparatus, image processing method, and image processing program
US8218899B2 (en) Image processing device, image processing method, and image processing program
US8224117B2 (en) Image processing device, image processing method, and image processing program
US8249312B2 (en) Image processing device and image processing method
US20090028390A1 (en) Image Processing for Estimating Subject Distance
US20080240615A1 (en) Image processing for image deformation
US20090285457A1 (en) Detection of Organ Area Corresponding to Facial Organ Image in Image
US8781258B2 (en) Image processing apparatus and image processing method
JP2010191592A (en) Image processing apparatus for detecting coordinate position of characteristic portion of face
JP4957607B2 (en) Detection of facial regions in images
JP2009211450A (en) Image processing apparatus, image processing method, and computer program for image processing
JP2010160640A (en) Image processor, printer, image processing method and image processing program
US8031915B2 (en) Image processing device and image processing method
JP4985510B2 (en) Set the face area corresponding to the face image in the target image
JP2009282699A (en) Detection of organ area corresponding to image of organ of face in image
JP2009237857A (en) Setting of organ area corresponding to facial organ image in image
JP2009237618A (en) Detection of face area in image
JP2010244251A (en) Image processor for detecting coordinate position for characteristic site of face
JP2010186268A (en) Image processor, printer, image processing method and image processing program
JP4957608B2 (en) Detection of facial regions in images
JP2009217607A (en) Calculation for reliability in detecting face region in image
JP2009217609A (en) Processing for correcting image region set based on face region
JP2009237615A (en) Detection of image of photographic subject of specific kind in target image
JP2009230473A (en) Detection of image zone corresponding to image of specific type photographing object from target image

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110216

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 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: 20120208

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120403

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120416

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4985510

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150511

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees