JP2010271956A - Image processing apparatus, image processing method, image processing program, and printer - Google Patents

Image processing apparatus, image processing method, image processing program, and printer Download PDF

Info

Publication number
JP2010271956A
JP2010271956A JP2009123611A JP2009123611A JP2010271956A JP 2010271956 A JP2010271956 A JP 2010271956A JP 2009123611 A JP2009123611 A JP 2009123611A JP 2009123611 A JP2009123611 A JP 2009123611A JP 2010271956 A JP2010271956 A JP 2010271956A
Authority
JP
Japan
Prior art keywords
face
image
feature
facial expression
expression
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2009123611A
Other languages
Japanese (ja)
Inventor
Masaya Usui
雅也 碓井
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 JP2009123611A priority Critical patent/JP2010271956A/en
Publication of JP2010271956A publication Critical patent/JP2010271956A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To determine a plurality of expressions with high accuracy. <P>SOLUTION: An image processing apparatus is configured to detect an image region including at least part of a face image from an image under consideration as a face region in the case of determining the expression of the face included in the image under consideration, to set a face model for reproducing at least the position of the feature site of the face on the basis of a plurality of feature values, to correct the feature values so that the position of the feature site reproduced by the face model can approximate the face region, to calculate a decision value for each of the plurality of expressions on the basis of the corrected feature values, and to determine the expression of the face by integrating the decision values of the respective expressions. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、画像に含まれる顔の表情を判定する画像処理装置、画像処理方法、画像処理プログラム、および、印刷装置に関する。   The present invention relates to an image processing apparatus, an image processing method, an image processing program, and a printing apparatus that determine facial expressions included in an image.

顔画像の表情を目や鼻や口や髪型や色彩などについての位置や大きさや比率などの顔特徴情報に基づいて推定する印刷装置が開示されている(特許文献1、段落0031、参照。)。   A printing apparatus that estimates facial expression based on facial feature information such as position, size, and ratio of eyes, nose, mouth, hairstyle, color, etc. is disclosed (see Patent Document 1, paragraph 0031). .

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

しかし、単一の顔画像に複数の表情が混在するような場合(例えば、驚いている笑顔等。)には、いずれの表情であるかを判定するのが困難であった。
本発明は、前記の課題を解決するためになされたものであり、複数の表情を精度よく判別することが可能な画像処理装置、画像処理方法、画像処理プログラム、および、印刷装置を提供することを目的とする。
However, when a plurality of facial expressions are mixed in a single face image (for example, a surprised smile), it is difficult to determine which facial expression.
The present invention has been made to solve the above problems, and provides an image processing apparatus, an image processing method, an image processing program, and a printing apparatus capable of accurately discriminating a plurality of facial expressions. With the goal.

前記課題の少なくとも一部を解決するために本願発明は以下の態様を採る。すなわち、顔領域検出部を備え、該顔領域検出部は前記注目画像から顔画像の少なくとも一部を含む画像領域を顔領域として検出する。設定部は、複数の特徴量に基づいて顔の特徴部位の位置を再現する顔モデルを設定する。さらに、補正部は、前記顔モデルによって再現される前記特徴部位の位置が、前記顔領域に近似するように前記特徴量を補正する。そして、判定部は、前記補正された前記特徴量に基づいて複数の表情ごとにその表情らしさを示す判定値を算出し、各表情についての判定値を総合して顔の表情を判定する。   In order to solve at least a part of the problems, the present invention adopts the following aspects. That is, a face area detecting unit is provided, and the face area detecting unit detects an image area including at least a part of the face image as the face area from the attention image. The setting unit sets a face model that reproduces the position of the feature portion of the face based on a plurality of feature amounts. Further, the correction unit corrects the feature amount so that the position of the feature part reproduced by the face model approximates the face region. Then, the determination unit calculates a determination value indicating the likelihood of the expression for each of a plurality of expressions based on the corrected feature amount, and determines a facial expression by combining the determination values for each expression.

このように、複数の表情のそれぞれについて、表情らしさを示す判定値を算出することにより、各表情の表情らしさを精度よく評価することができる。また、各表情についての判定値を総合的に判断することにより、いずれの表情を有するかを判定するため、複数の表情が混在するような場合でも、最も適切な表情を判定することができる。例えば、表情らしさを最も強く示す前記判定値に対応する表情を前記顔領域が有すると判定することにより、複数の表情が混在する場合でも、もっともそれらしい表情だけを判定することができる。なお、本発明は、単一の表情を有すると判定するものに限られず、例えば複数の表情の判定値が所定の閾値を超えた場合に、複数の表情を有する旨を判定するようにしてもよい。また、前記補正された前記特徴量の少なくとも2つを線形結合した前記判定値と閾値との比較することより表情の判定をしてもよい。このようにすることにより、複数の前記特徴量を総合的に考慮して判定値を算出することができる。   Thus, by calculating the determination value indicating the expression-likeness for each of a plurality of facial expressions, the expression-likeness of each expression can be accurately evaluated. Further, since the determination value for each expression is comprehensively determined to determine which expression is present, the most appropriate expression can be determined even when a plurality of expressions are mixed. For example, by determining that the face area has an expression corresponding to the determination value that most strongly indicates the likelihood of expression, only the most appropriate expression can be determined even when a plurality of expressions are mixed. Note that the present invention is not limited to determining that a single facial expression is present. For example, when a determination value of a plurality of facial expressions exceeds a predetermined threshold, it is determined that the facial expression has a plurality of facial expressions. Good. The facial expression may be determined by comparing the determination value obtained by linearly combining at least two of the corrected feature quantities with a threshold value. By doing so, it is possible to calculate the determination value in consideration of a plurality of the feature amounts.

別の態様に係る画像処理装置では、前記特徴量の少なくとも一つを、複数のサンプル画像の特徴部位の位置を主成分分析して得られる各主成分の固有ベクトルの係数とする。すなわち、顔モデルを主成分分析を利用して用意するとともに、前記特徴量を各主成分の固有ベクトルの係数とする。さらに、前記特徴量の少なくとも一つを、複数のサンプル画像の画素の色彩値を主成分分析して得られる各主成分の固有ベクトルの係数とすることにより、顔の見えをモデル化することができる。   In an image processing apparatus according to another aspect, at least one of the feature amounts is a coefficient of an eigenvector of each principal component obtained by performing principal component analysis on the positions of feature portions of a plurality of sample images. That is, a face model is prepared using principal component analysis, and the feature amount is set as a coefficient of an eigenvector of each principal component. Furthermore, the appearance of the face can be modeled by using at least one of the feature values as a coefficient of an eigenvector of each principal component obtained by principal component analysis of the color values of pixels of a plurality of sample images. .

別の態様に係る画像処理装置では、異なる時刻に対応付けられた複数の前記注目画像に含まれる顔の複数の表情を順次判定していくにあたり、前記注目画像について、ある表情を有すると判定された場合、それより後の時刻に対応付けられた前記注目画素に含まれる当該顔について、当該表情であると判定されなくなるまで、他の表情についての前記判定値の算出および該判定値に基づく判定を行わないこととする。このようにすることにより、異なる時刻に対応付けられた動画等の各フレームに対する表情判定を効率よく実行させることができる。   In the image processing device according to another aspect, when sequentially determining a plurality of facial expressions included in the plurality of attention images associated with different times, the attention image is determined to have a certain expression. If the face included in the pixel of interest associated with a later time is not determined to be the facial expression, the calculation of the determination value for the other facial expression and the determination based on the determination value are performed. Will not be performed. By doing in this way, the facial expression determination with respect to each frame, such as a moving image matched with different time, can be performed efficiently.

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

本発明の前記実施例における画像処理装置としてのプリンター100の構成を概略的に示す説明図である。FIG. 2 is an explanatory diagram schematically showing a configuration of a printer 100 as an image processing apparatus in the embodiment of the present invention. 前記実施例におけるAAM設定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the AAM setting process in the said Example. サンプル画像SIの一例を示す説明図である。It is explanatory drawing which shows an example of sample image SI. サンプル画像SIにおける特徴点CPの設定方法の一例を示す説明図である。It is explanatory drawing which shows an example of the setting method of the feature point CP in the sample image SI. サンプル画像SIに設定された特徴点CPの座標の一例を示す説明図である。It is explanatory drawing which shows an example of the coordinate of the feature point CP set to sample image SI. 平均形状s0の一例を示す説明図である。It is explanatory drawing which shows an example of average shape s0. 形状ベクトルsiおよび形状パラメーターpiと顔の形状sとの関係を例示した説明図である。It is explanatory drawing which illustrated the relationship between shape vector s i and shape parameter pi, and face shape s. サンプル画像SIのワープWの方法の一例を示す説明図である。It is explanatory drawing which shows an example of the method of the warp W of the sample image SI. 平均顔画像A0(x)の一例を示す説明図である。It is explanatory drawing which shows an example of average face image A0 (x). 前記実施例における顔特徴検出処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the face feature detection process in the said Example. 注目画像OIにおける顔領域FAの検出結果の一例を示す説明図である。It is explanatory drawing which shows an example of the detection result of the face area FA in the attention image OI. 前記実施例における特徴点CPの初期位置設定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the initial position setting process of the feature point CP in the said Example. グローバルパラメーターの値を変更することによる特徴点CPの仮設定位置の一例を示す説明図である。It is explanatory drawing which shows an example of the temporary setting position of the feature point CP by changing the value of a global parameter. 平均形状画像I(W(x;p))の一例を示す説明図である。It is explanatory drawing which shows an example of the average shape image I (W (x; p)). 前記実施例における特徴点CP設定位置補正処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the feature point CP setting position correction process in the said Example. CP設定位置補正処理の結果の一例を示す説明図である。It is explanatory drawing which shows an example of the result of CP setting position correction processing. テクスチャー検出処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a texture detection process. 表情判定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a facial expression determination process. 判定値を示すグラフである。It is a graph which shows a judgment value. 判定値設定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a judgment value setting process. 特徴量と喜顔であるか否かの相関を説明するグラフである。It is a graph explaining the correlation of whether it is a feature amount and a happy face. 変形例にかかる表情判定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the facial expression determination process concerning a modification. 変形例にかかる表情判定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the facial expression determination process concerning a modification. 変形例において表情パラメーターを設定する処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process which sets a facial expression parameter in a modification.

以下、本発明に係る画像処理装置の一態様であるプリンターについて、図面を参照しつつ、実施例に基づいて説明する。   Hereinafter, a printer which is an aspect of an image processing apparatus according to the present invention will be described based on examples with reference to the drawings.

A.本実施例:
A1.画像処理装置の構成:
図1は、本発明の本実施例における画像処理装置としてのプリンター100の構成を概略的に示す説明図である。本実施例のプリンター100は、メモリーカードMC等から取得した画像データに基づき画像を印刷する、いわゆるダイレクトプリントに対応したインクジェット式カラープリンターである。プリンター100は、プリンター100の各部を制御するCPU110と、ROMやRAMによって構成された内部メモリー120と、ボタンやタッチパネルにより構成された操作部140と、液晶ディスプレイにより構成された表示部150と、印刷機構160と、カードインターフェース(カードI/F)170と、を備えている。プリンター100は、さらに、他の機器(例えばデジタルスチルカメラやパーソナルコンピューター)とのデータ通信をおこなうためのインターフェースを備えていてもよい。プリンター100の各構成要素は、バスを介して双方向通信可能に接続されている。
A. Example:
A1. Configuration of image processing device:
FIG. 1 is an explanatory diagram schematically showing a configuration of a printer 100 as an image processing apparatus in the present 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 printing. A mechanism 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 via a bus so that bidirectional communication is possible.

印刷機構160は、印刷データに基づき印刷をおこなう。カードインターフェース170は、カードスロット172に挿入されたメモリーカードMCとの間でデータのやり取りをおこなうためのインターフェースである。なお、本実施例では、メモリーカードMCに画像データを含む画像ファイルが格納されている。   The printing mechanism 160 performs printing based on the 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は、コンピュータープログラムであり、所定のオペレーティングシステムの下で、CPU110により実行されることで顔特徴検出処理や表情判定処理をおこなう。顔特徴検出処理は、顔画像における所定の特徴部位(例えば目尻や鼻頭やフェイスライン)の位置を検出する処理である。顔特徴検出処理については、後に詳述する。表示処理部310、および、印刷処理部320についてもCPU110により実行されることでぞれぞれの機能を実現する。   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, and performs facial feature detection processing and facial expression determination processing by being executed by the CPU 110 under a predetermined operating system. The face feature detection process is a process of detecting the position of a predetermined feature part (for example, the corner of the eye, the nose head, or the face line) in the face image. The face feature detection process will be described in detail later. The display processing unit 310 and the print processing unit 320 are also executed by the CPU 110 to realize the respective functions.

画像処理部200は、プログラムモジュールとして、設定部210と、特徴位置検出部220と、顔領域検出部230と、テクスチャー検出部240と、表情判定部250と、を含んでいる。特徴位置検出部220とテクスチャー検出部240は、それぞれ生成部222,242と、算出部224,244と、補正部226,246と、を含んでいる。表情判定部250は、選択部252と、判定値算出部254と、判定部256と、を含んでいる。これら各部の機能については、後述の顔特徴検出処理の説明において詳述する。   The image processing unit 200 includes a setting unit 210, a feature position detection unit 220, a face area detection unit 230, a texture detection unit 240, and an expression determination unit 250 as program modules. The feature position detection unit 220 and the texture detection unit 240 include generation units 222 and 242, calculation units 224 and 244, and correction units 226 and 246, respectively. The facial expression determination unit 250 includes a selection unit 252, a determination value calculation unit 254, and a determination unit 256. The functions of these units will be described in detail in the description of the face feature detection process described later.

表示処理部310は、表示部150を制御して、表示部150上に処理メニューやメッセージ、画像等を表示させるディスプレイドライバーである。印刷処理部320は、画像データから印刷データを生成し、印刷機構160を制御して、印刷データに基づく画像の印刷を実行するためのコンピュータープログラムである。CPU110は、内部メモリー120から、これらのプログラム(画像処理部200、表示処理部310、印刷処理部320)を読み出して実行することにより、これら各部の機能を実現する。   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 printing mechanism 160, and printing an image based on the print data. The CPU 110 reads out and executes these programs (the image processing unit 200, the display processing unit 310, and the print processing unit 320) from the internal memory 120, thereby realizing the functions of these units.

内部メモリー120には、また、AAM情報AMIが格納されている。AAM情報AMIは、後述のAAM設定処理によって予め設定される情報であり、後述の顔特徴検出処理において参照される。AAM情報AMIの内容については、後述のAAM設定処理の説明において詳述する。   The internal memory 120 also stores AAM information AMI. The AAM information AMI is information set in advance by an AAM setting process described later, and is referred to in a face feature detection process described later. The contents of the AAM information AMI will be described in detail in the description of AAM setting processing described later.

A2.AAM設定処理:
図2は、本実施例におけるAAM設定処理の流れを示すフローチャートである。AAM設定処理は、AAM(アクティブアピアランスモデル(Active Appearance Model))と呼ばれる画像のモデル化に用いられる形状モデルおよびテクスチャーモデルを設定する処理である。形状モデルおよびテクスチャーモデルは、特許請求の範囲の「顔モデル」に相当する。本実施例において、AAM設定処理は、オペレーターがコンピューターを使用することによりおこなわれる。コンピューターは、CPUとRAMとROMとHDDとディスプレイと入力装置等を有しており、これらがバスによって接続されている。CPUはHDDに記録されたプログラムを読み出し、該プログラムにしたがった演算処理を実行することにより、コンピューターが後述する各処理を実行させる。なお、形状モデルおよびテクスチャーモデルを設定するコンピューターは特許請求の範囲の「設定部」に相当する。
A2. AAM setting process:
FIG. 2 is a flowchart showing the flow of AAM setting processing in this embodiment. The AAM setting process is a process for setting a shape model and a texture model used for modeling an image called AAM (Active Appearance Model). The shape model and the texture model correspond to a “face model” in the claims. In the present embodiment, the AAM setting process is performed by an operator using a computer. The computer has a CPU, a RAM, a ROM, an HDD, a display, an input device, and the like, which are connected by a bus. The CPU reads out a program recorded in the HDD and executes arithmetic processing according to the program, thereby causing the computer to execute each process described later. The computer that sets the shape model and the texture model corresponds to a “setting unit” in the claims.

はじめに、オペレーターは、人物の顔を含んだ複数の画像をサンプル画像SIとして用意する(ステップS110)。図3は、サンプル画像SIの一例を示す説明図である。図3に示すように、サンプル画像SIは、個性・人種・性別、表情(喜顔、悲顔、驚顔、怒顔)、向き(正面向き、上向き、下向き、右向き、左向き等)といった種々の属性に関して互いに相違する顔画像が含まれるように用意される。サンプル画像SIがそのように用意されれば、AAMによってあらゆる顔画像を精度良くモデル化することが可能となり、あらゆる顔画像を対象とした精度の良い顔特徴検出処理(後述)の実行が可能となる。なお、サンプル画像SIは、学習用画像とも呼ばれる。   First, the operator prepares a plurality of images including a person's face as a sample image SI (step S110). FIG. 3 is an explanatory diagram showing an example of the sample image SI. As shown in FIG. 3, the sample image SI has various characteristics such as personality / race / gender, facial expression (happy face, sad face, surprised face, angry face), direction (front direction, upward direction, downward direction, right direction, left direction, etc.). Are prepared so as to include face images that are different from each other with respect to the attributes of. If the sample image SI is prepared in such a manner, any face image can be accurately modeled by AAM, and accurate face feature detection processing (described later) for any face image can be executed. Become. The sample image SI is also called a learning image.

それぞれのサンプル画像SIに含まれる顔画像に、特徴点CPを設定する(ステップS120)。図4は、サンプル画像SIにおける特徴点CPの設定方法の一例を示す説明図である。特徴点CPは、顔画像における所定の特徴部位の位置を示す点である。本実施例では、所定の特徴部位として、人物の顔における眉毛上の所定位置(例えば端点や4分割点等、以下同じ)、目の輪郭上の所定位置、鼻筋および小鼻の輪郭上の所定位置、上下唇の輪郭上の所定位置、顔の輪郭(フェイスライン)上の所定位置といった68箇所の部位が設定されている。すなわち、本実施例では、人物の顔に共通して含まれる顔の器官(眉毛、目、鼻、口)および顔の輪郭における所定位置を、特徴部位として設定する。図4に示すように、特徴点CPは、各サンプル画像SIにおいてオペレーターにより指定された68個の特徴部位を表す位置に設定(配置)される。このように設定された各特徴点CPは各特徴部位に対応しているため、顔画像における特徴点CPの配置は顔の形状を特定していると表現することができる。   A feature point CP is set to the face image included in each sample image SI (step S120). FIG. 4 is an explanatory diagram showing an example of a method for setting the feature point CP in the sample image SI. The feature point CP is a point indicating the position of a predetermined feature part in the face image. In this embodiment, as predetermined feature parts, a predetermined position on the eyebrows in a person's face (for example, an end point or a four-divided point, the same applies hereinafter), a predetermined position on the eye contour, and a predetermined position on the nose and nose contours 68 parts such as a predetermined position on the contour of the upper and lower lips and a predetermined position on the contour of the face (face line) are set. That is, in the present embodiment, a predetermined position in the facial organs (eyebrows, eyes, nose, mouth) and facial contour that are commonly included in the human face are set as the characteristic parts. As shown in FIG. 4, the feature points CP are set (arranged) at positions representing 68 feature parts designated by the operator in each sample image SI. Since each feature point CP set in this way corresponds to each feature part, the arrangement of the feature points CP in the face image can be expressed as specifying the shape of the face.

サンプル画像SIにおける特徴点CPの位置は、座標により特定される。図5は、サンプル画像SIに設定された特徴点CPの座標の一例を示す説明図である。図5において、SI(g)(g=1,2,3・・・)は各サンプル画像SIを示しており、CP(k)(k=0,1,・・・,67)は各特徴点CPを示している。また、CP(k)−Xは、特徴点CP(k)のX座標を示しており、CP(k)−Yは、特徴点CP(k)のY座標を示している。特徴点CPの座標としては、顔の大きさと顔の傾き(画像面内の傾き)と顔のX方向およびY方向の位置とのそれぞれについて正規化されたサンプル画像SIにおける所定の基準点(例えば画像の左下の点)を原点とした座標が用いられる。また、本実施例では、1つのサンプル画像SIに複数の人物の顔画像が含まれる場合が許容されており(例えばサンプル画像SI(2)には2人の顔画像が含まれている)、1つのサンプル画像SIにおける各人物は人物IDによって特定される。各サンプル画像SIと、各特徴点CPの座標と、人物IDとは、コンピューターに入力される。   The position of the feature point CP in the sample image SI is specified by coordinates. FIG. 5 is an explanatory diagram showing an example of the coordinates of the feature point CP set in the sample image SI. In FIG. 5, SI (g) (g = 1, 2, 3...) Indicates each sample image SI, and CP (k) (k = 0, 1,..., 67) indicates each feature. Point CP is shown. CP (k) -X represents the X coordinate of the feature point CP (k), and CP (k) -Y represents the Y coordinate of the feature point CP (k). The coordinates of the feature point CP include predetermined reference points (for example, in the sample image SI normalized with respect to the size of the face, the inclination of the face (inclination in the image plane), and the position of the face in the X direction and the Y direction) The coordinates with the origin at the lower left point of the image are used. Further, in the present embodiment, a case where a plurality of human face images are included in one sample image SI is allowed (for example, two sample face images are included in the sample image SI (2)). Each person in one sample image SI is specified by a person ID. Each sample image SI, the coordinates of each feature point CP, and the person ID are input to the computer.

つづいて、オペレーターは、AAMの形状モデルの設定をおこなう(ステップS130)。具体的には、各サンプル画像SIにおける68個の特徴点CPの座標(X座標およびY座標)により構成される座標ベクトル(図5参照)に対する主成分分析をコンピューターがおこない、さらにコンピューターが特徴点CPの位置により特定される顔の形状sを下記の式(1)によりモデル化する。なお、形状モデルは、特徴点CPの配置モデルとも呼ぶ。   Subsequently, the operator sets the AAM shape model (step S130). Specifically, the computer performs principal component analysis on a coordinate vector (see FIG. 5) composed of the coordinates (X coordinate and Y coordinate) of 68 feature points CP in each sample image SI, and the computer further uses the feature points. The face shape s specified by the position of the CP is modeled by the following equation (1). The shape model is also referred to as a feature point CP arrangement model.

Figure 2010271956
Figure 2010271956

前記式(1)において、s0は平均形状である。図6は、平均形状s0の一例を示す説明図である。図6(a)および(b)に示すように、平均形状s0は、サンプル画像SIの各特徴点CPについての平均位置(平均座標)により特定される平均的な顔の形状を表すモデルである。なお、本実施例では、平均形状s0において、外周に位置する特徴点CP(フェイスラインおよび眉毛、眉間に対応する特徴点CP、図4参照)を結ぶ直線により囲まれた領域(図6(b)においてハッチングを付して示す)を「平均形状領域BSA」と呼ぶ。コンピューターは、平均形状s0に対して、図6(a)に示すように、特徴点CPを頂点とする複数の三角形領域TAを、平均形状領域BSAをメッシュ状に分割するように設定する。 In the formula (1), s 0 is an average shape. FIG. 6 is an explanatory diagram showing an example of the average shape s 0 . As shown in FIGS. 6A and 6B, the average shape s 0 is a model representing the average face shape specified by the average position (average coordinate) for each feature point CP of the sample image SI. is there. In the present embodiment, in the average shape s 0 , a region surrounded by a straight line connecting feature points CP (face lines, eyebrows, feature points CP corresponding to the eyebrows, see FIG. 4) located on the outer periphery (FIG. 6 ( b) is indicated by hatching) and is referred to as “average shape region BSA”. As shown in FIG. 6A, the computer sets a plurality of triangular areas TA having the feature points CP as vertices so as to divide the average shape area BSA into a mesh shape with respect to the average shape s 0 .

形状モデルを表す前記式(1)において、siは形状ベクトルであり、piは形状ベクトルsiの重みを表す形状パラメーターである。形状ベクトルsiは、顔の形状sの特性を表すベクトルであり、主成分分析により得られる第i主成分に対応する固有ベクトルである。前記式(1)に示すように、本実施例における形状モデルでは、特徴点CPの配置を表す顔形状sが、平均形状s0とn個の形状ベクトルsiの線形結合との和としてモデル化される。前記式(1a)が示すように、形状モデルにおいて形状パラメーターpiを適切に設定することにより、あらゆる画像における顔の形状sを再現することが可能である。また、前記式(1b)が示すように、形状モデルにおいて形状パラメーターpiを適切に設定することにより、あらゆる形状sから平均形状s0へと逆変換することができる。 In the equation (1) representing the shape model, s i is a shape vector, and p i is a shape parameter representing the weight of the shape vector s i . The shape vector s i is a vector representing the characteristics of the face shape s and is an eigenvector corresponding to the i-th principal component obtained by principal component analysis. As shown in the equation (1), in the shape model in the present embodiment, the face shape s representing the arrangement of the feature points CP is the model as the sum of the average shape s 0 and the linear combination of the n shape vectors s i. It becomes. As shown in the equation (1a), it is possible to reproduce the face shape s in any image by appropriately setting the shape parameter p i in the shape model. Further, as shown in the equation (1b), by appropriately setting the shape parameter p i in the shape model, it is possible to reversely convert from any shape s to the average shape s 0 .

図7は、形状ベクトルsiおよび形状パラメーターpiと、顔の形状sとの関係を例示した説明図である。図7(a)に示すように、コンピューターは、顔の形状sを特定するために、寄与率のより大きい主成分に対応する固有ベクトルから順に、累積寄与率の高い順に選択された個数n(図7ではn個の主成分のうち累積寄与率が上位4個を図示。)の固有ベクトルを、形状ベクトルsiとして採用する。形状ベクトルsiのそれぞれは、図7(a)の矢印に示すように、各特徴点CPの移動方向・移動量と対応している。本実施例では、最も寄与率の大きい第1主成分に対応する第1形状ベクトルs1は顔の左右振りにほぼ相関するベクトルとなっており、形状パラメーターp1を大小することにより、図7(b)に示すように、顔の形状sの横方向の顔向きが変化する。2番目に寄与率の大きい第2主成分に対応する第2形状ベクトルs2は顔の上下振りにほぼ相関するベクトルとなっており、形状パラメーターp2を大小することにより、図7(c)に示すように、顔の形状sの縦方向の顔向きが変化する。また、3番目に寄与率の大きい第3主成分に対応する第3形状ベクトルs3は顔の形状の縦横比にほぼ相関するベクトルとなっており、4番目に寄与率の大きい第4主成分に対応する第4形状ベクトルs4は口の開きの程度にほぼ相関するベクトルとなっている。このように、形状パラメーターの値は、顔の表情や、顔向きなど顔画像の特徴を表す。本実施例における「形状パラメーター」は特許請求の範囲における「特徴量」に該当する。 FIG. 7 is an explanatory diagram illustrating the relationship between the shape vector s i, the shape parameter p i, and the face shape s. As shown in FIG. 7 (a), in order to identify the face shape s, the computer selects the number n (shown in the order from the highest cumulative contribution ratio in order from the eigenvector corresponding to the principal component having the larger contribution ratio. 7, the eigenvector of the top four of the n principal components is shown as the shape vector s i . Each of the shape vectors s i corresponds to the movement direction / movement amount of each feature point CP, as indicated by the arrows in FIG. In this embodiment, most first shape vector s 1 corresponding to the first principal component having a large contribution rate is a vector that is approximately correlated with the left and right appearance of a face, by the magnitude of the shape parameter p 1, 7 As shown in (b), the horizontal face direction of the face shape s changes. Second shape vector s 2 corresponding to the large second principal component of the contribution rate to the second is a vector that is approximately correlated with the vertical appearance of a face, by the magnitude of the shape parameter p 2, FIG. 7 (c) As shown in FIG. 4, the vertical face direction of the face shape s changes. The third shape vector s 3 corresponding to the third principal component having the third largest contribution ratio is a vector that is substantially correlated with the aspect ratio of the face shape, and the fourth principal component having the fourth largest contribution ratio. The fourth shape vector s 4 corresponding to is a vector that is substantially correlated with the degree of mouth opening. As described above, the value of the shape parameter represents the feature of the face image such as facial expression and face orientation. The “shape parameter” in this embodiment corresponds to the “feature amount” in the claims.

なお、形状モデル設定ステップ(ステップS130)においてコンピューターが設定した平均形状s0および形状ベクトルsiは、AAM情報AMI(図1)としてプリンター100の内部メモリー120に格納される。つづいて、コンピューターはAAMのテクスチャーモデルの設定をおこなう(ステップS140)。具体的には、まず、各サンプル画像SIに対して、サンプル画像SIにおける特徴点CPの設定位置が平均形状s0における特徴点CPの設定位置と等しくなるように、画像変換(以下、「ワープW」とも呼ぶ)をおこなう。 The average shape s 0 and the shape vector s i set by the computer in the shape model setting step (step S130) are stored in the internal memory 120 of the printer 100 as AAM information AMI (FIG. 1). Subsequently, the computer sets an AAM texture model (step S140). Specifically, first, for each sample image SI, image conversion (hereinafter referred to as “warp”) is performed so that the setting position of the feature point CP in the sample image SI is equal to the setting position of the feature point CP in the average shape s 0 . Also called “W”).

図8は、サンプル画像SIのワープWの方法の一例を示す説明図である。コンピューターは、各サンプル画像SIにおいて、平均形状s0と同様に、外周に位置する特徴点CPにより囲まれた領域をメッシュ状に分割する複数の三角形領域TAを設定する。ワープWは、複数の三角形領域TAのそれぞれについてのアフィン変換の集合である。すなわち、ワープWにおいては、サンプル画像SIにおけるある三角形領域TAの画像は、平均形状s0における対応する三角形領域TAの画像へとアフィン変換される。コンピューターは、ワープWにより、特徴点CPの設定位置が平均形状s0における特徴点CPの設定位置と等しいサンプル画像SI(以下「サンプル画像SIw」と表す)を生成する。 FIG. 8 is an explanatory diagram showing an example of a method of warping W of the sample image SI. In each sample image SI, similarly to the average shape s 0 , the computer sets a plurality of triangular regions TA that divide the region surrounded by the feature points CP located on the outer periphery into a mesh shape. The warp W is a set of affine transformations for each of the plurality of triangular areas TA. That is, in the warp W, an image of a certain triangular area TA in the sample image SI is affine transformed into an image of the corresponding triangular area TA in the average shape s 0 . The computer generates a sample image SI (hereinafter referred to as “sample image SIw”) in which the setting position of the feature point CP is equal to the setting position of the feature point CP in the average shape s 0 by the warp W.

なお、各サンプル画像SIwは、平均形状領域BSA(図8においてハッチングを付して示す)を内包する矩形枠を外周とし、平均形状領域BSA以外の領域(以下「マスク領域MA」とも呼ぶ)がマスクされた画像として生成される。平均形状領域BSAとマスク領域MAとを併せた画像領域を基準領域BAと呼ぶ。また、コンピューターは、各サンプル画像SIwを、例えば56画素×56画素のサイズの画像として正規化する。   Each sample image SIw has a rectangular frame containing an average shape area BSA (shown with hatching in FIG. 8) as an outer periphery, and an area other than the average shape area BSA (hereinafter also referred to as “mask area MA”). Generated as a masked image. An image area in which the average shape area BSA and the mask area MA are combined is referred to as a reference area BA. In addition, the computer normalizes each sample image SIw as an image having a size of, for example, 56 pixels × 56 pixels.

次に、コンピューターは、各サンプル画像SIwの画素群xのそれぞれにおける輝度値により構成される輝度値ベクトルに対する主成分分析を行い、顔のテクスチャー(「見え」とも呼ぶ)A(x)を下記の式(2)によりモデル化する。なお、画素群xは、平均形状領域BSAに位置する画素の集合である。

Figure 2010271956
Next, the computer performs a principal component analysis on a luminance value vector composed of luminance values in each pixel group x of each sample image SIw, and a facial texture (also referred to as “appearance”) A (x) is expressed as follows: Modeled by equation (2). The pixel group x is a set of pixels located in the average shape area BSA.
Figure 2010271956

前記式(2)において、A0(x)は平均顔画像である。図9は、平均顔画像A0(x)の一例を示す説明図である。平均顔画像A0(x)は、ワープWの後のサンプル画像SIw(図8参照)の平均の顔が表された画像である。すなわち、平均顔画像A0(x)は、サンプル画像SIwの平均形状領域BSA内の画素群xの画素値(輝度値)の平均をとることにより算出される画像である。従って、平均顔画像A0(x)は、平均的な顔の形状における平均的な顔のテクスチャー(見え)を表すモデルである。なお、平均顔画像A0(x)は、サンプル画像SIwと同様に、平均形状領域BSAとマスク領域MAとで構成され、例えば56画素×56画素のサイズの画像として算出される。 In the formula (2), A 0 (x) is an average face image. FIG. 9 is an explanatory diagram showing an example of the average face image A 0 (x). The average face image A 0 (x) is an image representing the average face of the sample image SIw (see FIG. 8) after the warp W. That is, the average face image A 0 (x) is an image calculated by taking the average of the pixel values (luminance values) of the pixel group x in the average shape area BSA of the sample image SIw. Therefore, the average face image A 0 (x) is a model representing the average face texture (appearance) in the average face shape. Note that the average face image A 0 (x) is composed of the average shape area BSA and the mask area MA, similarly to the sample image SIw, and is calculated as an image having a size of 56 pixels × 56 pixels, for example.

テクスチャーモデルを表す前記式(2)において、ak(x)はテクスチャーベクトルであり、λkはテクスチャーベクトルak(x)の重みを表すテクスチャーパラメーターである。テクスチャーベクトルak(x)は、顔のテクスチャーA(x)の特性を表すベクトルであり、具体的には、主成分分析により得られる第j主成分に対応する固有ベクトルである。すなわち、寄与率のより大きい主成分に対応する固有ベクトルから順に、累積寄与率に基づき設定された個数mの固有ベクトルが、テクスチャーベクトルak(x)として採用される。本実施例では、最も寄与率の大きい第1主成分に対応する第1テクスチャーベクトルA1(x)は、顔色の変化(性別の差とも捉えられる)にほぼ相関するベクトルとなっている。 In the equation (2) representing the texture model, a k (x) is a texture vector, and λ k is a texture parameter representing the weight of the texture vector a k (x). The texture vector a k (x) is a vector representing the characteristics of the facial texture A (x), and specifically, is an eigenvector corresponding to the j-th principal component obtained by principal component analysis. That is, the number m of eigenvectors set based on the cumulative contribution rate is adopted as the texture vector a k (x) in order from the eigenvector corresponding to the principal component having the larger contribution rate. In the present embodiment, the first texture vector A 1 (x) corresponding to the first principal component having the largest contribution rate is a vector that is substantially correlated with a change in face color (also regarded as a gender difference).

前記式(2)に示すように、本実施例におけるテクスチャーモデルでは、顔の見えを表す顔のテクスチャーA(x)が、平均顔画像A0(x)とm個のテクスチャーベクトルak(x)の線形結合との和としてモデル化される。前記式(2a)に示すように、テクスチャーモデルにおいてテクスチャーパラメーターλkを適切に設定することにより、あらゆる画像における顔のテクスチャーA(x)を再現することが可能である。逆に、前記式(2b)に示すように、テクスチャーモデルにおいてテクスチャーパラメーターλkを適切に設定することにより、あらゆる画像における顔のテクスチャーA(x)から平均顔画像A0(x)へと逆変換することができる。 As shown in the equation (2), in the texture model in the present embodiment, the facial texture A (x) representing the appearance of the face is the average face image A 0 (x) and m texture vectors a k (x ) And the linear combination. As shown in the equation (2a), it is possible to reproduce the facial texture A (x) in any image by appropriately setting the texture parameter λ k in the texture model. On the contrary, as shown in the equation (2b), by appropriately setting the texture parameter λ k in the texture model, the face texture A (x) in every image is reversed to the average face image A 0 (x). Can be converted.

なお、テクスチャーモデル設定ステップ(図2のステップS140)において設定された平均顔画像A0(x)およびテクスチャーベクトルak(x)は、AAM情報AMI(図1)としてプリンター100の内部メモリー120に格納される。コンピューターはAAM情報AMIをいずれかの記録媒体に記録しておき、プリンター100の製造時において該記録媒体から読み出したAAM情報AMIを記録した内部メモリー120をプリンター100に組み込むか、プリンター100に組み込むまれた内部メモリー120に対して該記録媒体から読み出したAAM情報AMIを記録させる。 The average face image A 0 (x) and the texture vector a k (x) set in the texture model setting step (step S140 in FIG. 2) are stored in the internal memory 120 of the printer 100 as AAM information AMI (FIG. 1). Stored. The computer records the AAM information AMI on any recording medium, and when the printer 100 is manufactured, the internal memory 120 that records the AAM information AMI read from the recording medium is incorporated in the printer 100 or rarely incorporated in the printer 100. The AAM information AMI read from the recording medium is recorded in the internal memory 120.

ここまでの処理により、顔の形状をモデル化する形状モデルと、顔のテクスチャーをモデル化するテクスチャーモデルが設定される。設定された形状モデルとテクスチャーモデルとを組み合わせることにより、すなわち合成されたテクスチャーA(x)に対して平均形状s0から形状sへの変換(図8に示したワープWの逆変換)をおこなうことにより、あらゆる顔画像の形状およびテクスチャーを再現することが可能である。 Through the processing so far, a shape model for modeling the shape of the face and a texture model for modeling the texture of the face are set. By combining the set shape model and the texture model, that is, the synthesized texture A (x) is converted from the average shape s 0 to the shape s (inverse conversion of the warp W shown in FIG. 8). Thus, it is possible to reproduce the shape and texture of any face image.

A3.顔特徴検出処理:
図10は、実施例における顔特徴検出処理の流れを示すフローチャートである。本実施例における顔特徴検出処理は、AAMを利用して注目画像に含まれる顔画像における特徴点CPの配置を決定する特徴点CP設定位置補正処理(ステップS250)により、顔画像における特徴部位の位置を検出し、さらにテクスチャー検出処理(ステップS260)により顔のテクスチャーを検出する処理である。上述したように、本実施例では、AAM設定処理(図2)において、人物の顔の器官(眉毛、目、鼻、口)および顔の輪郭における計68箇所の所定位置が、特徴部位として設定されている(図4参照)。そのため、本実施例の顔特徴検出処理では、人物の顔の器官および顔の輪郭における所定位置を示す68個の特徴点CPの配置が決定される。
A3. Face feature detection processing:
FIG. 10 is a flowchart illustrating a flow of face feature detection processing in the embodiment. In the face feature detection processing in this embodiment, the feature point CP setting position correction processing (step S250) for determining the arrangement of the feature points CP in the face image included in the target image using AAM is performed. In this process, the position is detected, and the texture of the face is further detected by the texture detection process (step S260). As described above, in the present embodiment, in the AAM setting process (FIG. 2), a total of 68 predetermined positions in the human facial organs (eyebrows, eyes, nose, mouth) and facial contour are set as the characteristic parts. (See FIG. 4). Therefore, in the face feature detection process of the present embodiment, the arrangement of 68 feature points CP indicating predetermined positions in the human face organ and face contour is determined.

なお、顔特徴検出処理によって顔画像における特徴点CPの配置が決定されると、顔画像についての形状パラメーターpiの値が特定される。従って、顔特徴検出処理の処理結果は特定の向き(例えば右向きや下向き)の顔画像を検出するための顔向き判定、顔の形状を変形する顔変形、顔の陰影補正等に利用可能である。 When the arrangement of the feature points CP in the face image is determined by the face feature detection process, the value of the shape parameter p i for the face image is specified. Accordingly, the processing result of the face feature detection process can be used for face orientation determination for detecting a face image in a specific direction (for example, rightward or downward), face deformation for deforming the face shape, face shading correction, and the like. .

はじめに、画像処理部200(図1)は、顔特徴検出処理の対象となる注目画像を表す画像データを取得する(ステップS210)。本実施例のプリンター100では、カードスロット172にメモリーカードMCが挿入されると、メモリーカードMCに格納された画像ファイルのサムネイル画像が表示部150に表示される。処理の対象となる1つまたは複数の画像は、操作部140を介してユーザーにより選択される。画像処理部200は、選択された1つまたは複数の画像に対応する画像データを含む画像ファイルをメモリーカードMCより取得して内部メモリー120の所定の領域に格納する。なお、取得された画像データを注目画像データと呼び、注目画像データの表す画像を注目画像OIと呼ぶものとする。   First, the image processing unit 200 (FIG. 1) acquires image data representing an attention image that is a target of face feature detection processing (step S210). In the printer 100 of the present embodiment, when the memory card MC is inserted into the card slot 172, thumbnail images of image files stored in the memory card MC are displayed on the display unit 150. One or more images to be processed are selected by the user via the operation unit 140. 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. Note that the acquired image data is referred to as attention image data, and an image represented by the attention image data is referred to as attention image OI.

顔領域検出部230(図1)は、注目画像OIに含まれる顔画像の少なくとも一部を含む画像領域を顔領域FAとして検出する(ステップS230)。顔領域FAの検出は、公知の顔検出手法を用いておこなうことができる。公知の顔検出手法としては、例えば、パターンマッチングによる手法や肌色領域抽出による手法、サンプル画像を用いた学習(例えばニューラルネットワークを用いた学習や、ブースティングを用いた学習、サポートベクターマシーンを用いた学習等)により設定される学習データを用いる手法等がある。   The face area detection unit 230 (FIG. 1) detects an image area including at least a part of the face image included in the target image OI as the face area FA (step S230). The detection of the face area FA can be performed using a known face detection method. Known face detection methods include, for example, pattern matching methods, skin color region extraction methods, learning using sample images (for example, learning using neural networks, learning using boosting, and support vector machines). For example, a method using learning data set by learning).

図11は、注目画像OIにおける顔領域FAの検出結果の一例を示す説明図である。図11には、注目画像OIにおいて検出された顔領域FAが示されている。本実施例では、おおよそ、顔の上下方向は額から顎まで、左右方向は両耳の外側まで含む矩形の領域が顔領域FAとして検出されるような顔検出手法が用いられている。   FIG. 11 is an explanatory diagram illustrating an example of a detection result of the face area FA in the target image OI. FIG. 11 shows the face area FA detected in the target image OI. In the present embodiment, a face detection method is used in which a rectangular area including the vertical direction of the face from the forehead to the chin and the horizontal direction from the outside of both ears is detected as the face area FA.

設定部210(図1)は、注目画像OIにおける特徴点CPの初期位置を設定する(ステップS240)。図12は、本実施例における特徴点CPの初期位置設定処理の流れを示すフローチャートである。本実施例では、設定部210は、顔領域FAに対する顔画像の大きさ、傾き、位置(上下方向の位置および左右方向の位置)を表すグローバルパラメーターの値を種々変更して、特徴点CPを注目画像OI上の仮設定位置に設定する(ステップS310)。   The setting unit 210 (FIG. 1) sets the initial position of the feature point CP in the target image OI (Step S240). FIG. 12 is a flowchart showing a flow of initial position setting processing of the feature point CP in the present embodiment. In the present embodiment, the setting unit 210 changes the values of global parameters representing the size, inclination, and position (vertical position and horizontal position) of the face image with respect to the face area FA to change the feature point CP. The temporary setting position on the attention image OI is set (step S310).

図13は、グローバルパラメーターの値を変更することによる特徴点CPの仮設定位置の一例を示す説明図である。図13(a)および図13(b)には、注目画像OIにおける特徴点CPおよび特徴点CPをつないで形成されるメッシュが示されている。設定部210は、図13(a)および図13(b)の中央に示すように、顔領域FAの中央部に平均形状s0が形成されるような特徴点CPの仮設定位置(以下、「基準仮設定位置」とも呼ぶ)を設定する。 FIG. 13 is an explanatory diagram showing an example of a temporary setting position of the feature point CP by changing the value of the global parameter. 13A and 13B show a mesh formed by connecting feature points CP and feature points CP in the target image OI. As shown in the center of FIGS. 13A and 13B, the setting unit 210 temporarily sets the feature point CP (hereinafter, referred to as an average shape s 0) at which the average shape s 0 is formed at the center of the face area FA. (Also referred to as “reference temporary setting position”).

設定部210は、また、基準仮設定位置に対して、グローバルパラメーターの値を種々変更させた複数の仮設定位置を設定する。グローバルパラメーター(大きさ、傾き、上下方向の位置および左右方向の位置)を変更することは、注目画像OIにおいて特徴点CPにより形成されるメッシュが拡大・縮小、傾きを変更、並行移動することに相当する。従って、設定部210は、図13(a)に示すように、基準仮設定位置のメッシュを所定倍率で拡大または縮小したメッシュを形成するような仮設定位置(基準仮設定位置の図の下および上に示す)や、所定角度だけ時計回りまたは半時計回りに傾きを変更したメッシュを形成するような仮設定位置(基準仮設定位置の図の右および左に示す)を設定する。また、設定部210は、基準仮設定位置のメッシュに対して、拡大・縮小および傾きの変更を組み合わせた変換を行ったメッシュを形成するような仮設定位置(基準仮設定位置の図の左上、左下、右上、右下に示す)も設定する。   The setting unit 210 also sets a plurality of temporary setting positions obtained by changing various global parameter values with respect to the reference temporary setting position. Changing the global parameters (size, inclination, vertical position and horizontal position) means that the mesh formed by the feature point CP in the target image OI is enlarged / reduced, the inclination is changed, and the parallel movement is performed. Equivalent to. Accordingly, as shown in FIG. 13 (a), the setting unit 210 forms a temporary setting position that forms a mesh obtained by enlarging or reducing the reference temporary setting position mesh at a predetermined magnification (below the reference temporary setting position diagram and Or a temporary setting position (shown on the right and left in the drawing of the reference temporary setting position) that forms a mesh whose inclination is changed clockwise or counterclockwise by a predetermined angle. Further, the setting unit 210 forms a temporary setting position (upper left of the figure of the reference temporary setting position, which forms a mesh obtained by performing a combination of enlargement / reduction and change in inclination with respect to the mesh of the reference temporary setting position. Also set in the lower left, upper right, and lower right).

また、図13(b)に示すように、設定部210は、基準仮設定位置のメッシュを所定量だけ上または下に並行移動したメッシュを形成するような仮設定位置(基準仮設定位置の図の上および下に示す)や、左または右に並行移動したメッシュを形成するような仮設定位置(基準仮設定位置の図の左および右に示す)を設定する。また、設定部210は、基準仮設定位置のメッシュに対して、上下および左右の並行移動を組み合わせた変換を行ったメッシュを形成するような仮設定位置(基準仮設定位置の図の左上、左下、右上、右下に示す)も設定する。   Also, as shown in FIG. 13B, the setting unit 210 forms a temporary setting position (a reference temporary setting position diagram) that forms a mesh that has been translated upward or downward by a predetermined amount from the reference temporary setting position mesh. And a temporary setting position (shown on the left and right in the drawing of the reference temporary setting position) that forms a mesh moved in parallel to the left or right. Further, the setting unit 210 forms a temporary setting position (upper left and lower left in the figure of the reference temporary setting position) that forms a mesh obtained by performing a combination of vertical and horizontal parallel movements on the mesh of the reference temporary setting position. , Shown in the upper right and lower right).

設定部210は、図13(a)に示す基準仮設定位置以外の8つの仮設定位置のそれぞれにおけるメッシュに対して図13(b)に示す上下左右の並行移動が実行される仮設定位置も設定する。従って、本実施例では、4つのグローバルパラメーター(大きさ、傾き、上下方向の位置、左右方向の位置)をそれぞれ既知の3段階の値として組み合わせにより設定される80通り(=3×3×3×3−1)の仮設定位置と、基準仮設定位置の合計81通りの仮設定位置が設定される。   The setting unit 210 also has temporary setting positions at which parallel movement in the vertical and horizontal directions shown in FIG. 13B is executed with respect to the mesh at each of the eight temporary setting positions other than the reference temporary setting position shown in FIG. Set. Therefore, in the present embodiment, the four global parameters (size, inclination, vertical position, horizontal position) are set in 80 ways (= 3 × 3 × 3) that are set as known three-level values. A total of 81 temporary setting positions of (3-1) temporary setting positions and reference temporary setting positions are set.

生成部222(図1)は、設定された各仮設定位置に対応する平均形状画像I(W(x;p))を生成する(ステップS320)。図14は、平均形状画像I(W(x;p))の一例を示す説明図である。平均形状画像I(W(x;p))は、入力画像における特徴点CPの配置が平均形状s0における特徴点CPの配置と等しくなるような変換によって算出される。 The generation unit 222 (FIG. 1) generates an average shape image I (W (x; p)) corresponding to each set temporary setting position (step S320). FIG. 14 is an explanatory diagram showing an example of the average shape image I (W (x; p)). The average shape image I (W (x; p)) is calculated by conversion such that the arrangement of the feature points CP in the input image is equal to the arrangement of the feature points CP in the average shape s 0 .

平均形状画像I(W(x;p))を算出するための変換は、サンプル画像SIw算出のための変換(図8参照)と同様に、三角形領域TA毎のアフィン変換の集合であるワープWにより行われる。具体的には、注目画像OIに配置された特徴点CP(図13参照)によって平均形状領域BSA(外周に位置する特徴点CPにより囲まれた領域)が特定され、注目画像OIにおける平均形状領域BSAに対して三角形領域TA毎のアフィン変換が行われることにより、平均形状画像I(W(x;p))が算出される。本実施例では、平均形状画像I(W(x;p))は、平均顔画像A0(x)と同様に平均形状領域BSAおよびマスク領域MAにより構成され、平均顔画像A0(x)と同サイズの画像として算出される。 The transformation for calculating the average shape image I (W (x; p)) is a warp W that is a set of affine transformations for each triangular area TA, similarly to the transformation for calculating the sample image SIw (see FIG. 8). Is done. Specifically, the average shape region BSA (region surrounded by the feature points CP located on the outer periphery) is specified by the feature points CP (see FIG. 13) arranged in the attention image OI, and the average shape region in the attention image OI. An average shape image I (W (x; p)) is calculated by performing affine transformation for each triangular area TA on the BSA. In this embodiment, the average shape image I (W (x; p) ) is composed of an average face image A 0 (x) and an average shape area BSA and a mask area MA, average face image A 0 (x) And is calculated as an image of the same size.

なお、上述したように、画素群xは、平均形状s0における平均形状領域BSAに位置する画素の集合である。ワープW実行後の画像(平均形状s0を有する顔画像)における画素群xに対応するワープW実行前の画像(注目画像OIの平均形状領域BSA)における画素群をW(x;p)と表す。平均形状画像は、注目画像OIの平均形状領域BSAにおける画素群W(x;p)のそれぞれにおける輝度値により構成される画像であるため、I(W(x;p))と表される。図14には、図13(a)に示した9個の仮設定位置に対応する9個の平均形状画像I(W(x;p))を示している。 As described above, the pixel group x is a set of pixels located in the average shape region BSA in the average shape s 0 . The pixel group in the image (average shape area BSA of the target image OI) before execution of the warp W corresponding to the pixel group x in the image after execution of the warp W (face image having the average shape s 0 ) is expressed as W (x; p). To express. Since the average shape image is an image composed of luminance values in each of the pixel groups W (x; p) in the average shape region BSA of the target image OI, it is represented as I (W (x; p)). FIG. 14 shows nine average shape images I (W (x; p)) corresponding to the nine temporarily set positions shown in FIG.

算出部224(図1)は、各仮設定位置に対応する平均形状画像I(W(x;p))と、特許請求の範囲の「比較顔画像」としての平均顔画像A0(x)との差分画像Ieを算出する(ステップS330)。特徴点CPの仮設定位置は81種類設定されているため、算出部224(図1)は、81個の差分画像Ieを算出することとなる。 The calculation unit 224 (FIG. 1) calculates an average shape image I (W (x; p)) corresponding to each temporarily set position and an average face image A 0 (x) as a “comparison face image” in the claims. The difference image Ie is calculated (step S330). Since 81 types of temporary setting positions of the feature points CP are set, the calculation unit 224 (FIG. 1) calculates 81 difference images Ie.

設定部210は、各差分画像Ieの画素値からノルムを算出し、ノルムの値が最も小さい差分画像Ieに対応する仮設置位置(以下「ノルム最小仮設定位置」とも呼ぶ)を、注目画像OIにおける特徴点CPの初期位置として設定する(ステップS340)。ノルムを算出するための画素値は輝度値であってもよいしRGB値であってもよい。以上により特徴点CP初期位置設定処理が完了する。なお、ノルムの値が小さいほど平均形状画像I(W(x;p))と、平均顔画像A0(x)との差が小さくなる(両者が近似する)。 The setting unit 210 calculates a norm from the pixel values of each difference image Ie, and sets a temporary installation position corresponding to the difference image Ie having the smallest norm value (hereinafter also referred to as “norm minimum temporary setting position”) as the target image OI. Is set as the initial position of the feature point CP at (step S340). The pixel value for calculating the norm may be a luminance value or an RGB value. Thus, the feature point CP initial position setting process is completed. Note that the smaller the norm value, the smaller the difference between the average shape image I (W (x; p)) and the average face image A 0 (x) (both approximate).

A3−1.特徴点CP設定位置補正処理:
特徴点CP初期位置設定処理が完了すると、特徴位置検出部220(図1)は、注目画像OIにおける特徴点CPの設定位置の補正をおこなう(ステップS250)。図15は、本実施例における特徴点CP設定位置補正処理の流れを示すフローチャートである。
A3-1. Feature point CP setting position correction processing:
When the feature point CP initial position setting process is completed, the feature position detector 220 (FIG. 1) corrects the set position of the feature point CP in the target image OI (step S250). FIG. 15 is a flowchart showing the flow of the feature point CP setting position correction process in the present embodiment.

生成部222(図1)は、注目画像OIから平均形状画像I(W(x;p))を算出する(ステップS410)。平均形状画像I(W(x;p))の算出方法は、特徴点CP初期位置設定処理におけるステップS320と同様である。   The generation unit 222 (FIG. 1) calculates an average shape image I (W (x; p)) from the attention image OI (step S410). The calculation method of the average shape image I (W (x; p)) is the same as that in step S320 in the feature point CP initial position setting process.

特徴位置検出部220は、平均形状画像I(W(x;p))と平均顔画像A0(x)との差分画像Ieを算出する(ステップS420)。特徴位置検出部220は、差分画像Ieに基づき、特徴点CPの設定位置補正処理が収束したか否かを判定する(ステップS430)。特徴位置検出部220は、差分画像Ieのノルムを算出し、ノルムの値が予め設定された閾値より小さい場合には収束したと判定し、ノルムの値が閾値以上の場合には未だ収束していないと判定する。なお、特徴位置検出部220は、算出された差分画像Ieのノルムの値が前回のステップS430において算出された値よりも小さい場合には収束したと判定し、前回値以上である場合には未だ収束していないと判定するものとしてもよい。あるいは、特徴位置検出部220は、閾値による判定と前回値との比較による判定とを組み合わせて収束判定をおこなうものとしてもよい。例えば、特徴位置検出部220は、算出されたノルムの値が、閾値より小さく、かつ、前回値より小さい場合にのみ収束したと判定し、それ以外の場合には未だ収束していないと判定するものとしてもよい。 The feature position detection unit 220 calculates a difference image Ie between the average shape image I (W (x; p)) and the average face image A 0 (x) (step S420). The feature position detection unit 220 determines whether or not the feature point CP setting position correction process has converged based on the difference image Ie (step S430). The feature position detection unit 220 calculates the norm of the difference image Ie, determines that it has converged if the norm value is smaller than a preset threshold value, and still converges if the norm value is greater than or equal to the threshold value. Judge that there is no. The feature position detection unit 220 determines that the calculated norm value of the difference image Ie has converged when the value is smaller than the value calculated in the previous step S430, and still determines that the value is equal to or greater than the previous value. It is good also as what determines with not having converged. Alternatively, the feature position detection unit 220 may perform the convergence determination by combining the determination based on the threshold and the determination based on comparison with the previous value. For example, the feature position detection unit 220 determines that the calculated norm value has converged only when the calculated norm value is smaller than the threshold value and smaller than the previous value, and otherwise determines that it has not yet converged. It may be a thing.

前記のステップS430の収束判定において未だ収束していないと判定された場合には、補正部226(図1)がパラメーター更新量ΔPを算出する(ステップS450)。パラメーター更新量ΔPは、4個のグローバルパラメーター(全体としての大きさ、傾き、X方向位置、Y方向位置)、および、特徴量であるn個の形状パラメーターpi(i=1〜nの整数。)の値の変更量を意味している。なお、特徴点CPを初期位置に設定した直後においては、グローバルパラメーターは、特徴点CP初期位置設定処理(図12)において決定された値が設定されている。また、このときの特徴点CPの初期位置と平均形状s0の特徴点CPの設定位置との相違は、全体としての大きさ、傾き、位置の相違に限られるため、形状モデルにおける形状パラメーターpiの値およびテクスチャーモデルにおけるテクスチャーパラメーターλkはすべてゼロである。 If it is determined in step S430 that the convergence is not yet completed, the correction unit 226 (FIG. 1) calculates the parameter update amount ΔP (step S450). The parameter update amount ΔP includes four global parameters (total size, inclination, X direction position, Y direction position), and n shape parameters p i (i = 1 to n) as feature amounts. .) Means the change amount of the value. Immediately after setting the feature point CP to the initial position, the global parameter is set to the value determined in the feature point CP initial position setting process (FIG. 12). Further, difference between the initial position of the characteristic point CP and sets the position of the characteristic points CP of the average shape s 0 in this case, the overall size, the tilt, because it is limited to the difference in position, shape parameters in the shape model p The value of i and the texture parameter λ k in the texture model are all zero.

パラメーター更新量ΔPは、下記の式(3)により算出される。すなわち、パラメーター更新量ΔPは、アップデートマトリックスRと差分画像Ieとの積である。   The parameter update amount ΔP is calculated by the following equation (3). That is, the parameter update amount ΔP is a product of the update matrix R and the difference image Ie.

Figure 2010271956
Figure 2010271956

式(3)におけるアップデートマトリックスRは、差分画像Ieに基づきパラメーター更新量ΔPを算出するために予め学習により設定されたM行N列のマトリックスであり、
AAM情報AMI(図1)として内部メモリー120に格納されている。本実施例では、アップデートマトリックスRの行数Mは、グローバルパラメーターの数(4個)と、形状パラメーターpiの数(n個)との和((4+n)個)に等しく、列数Nは、平均顔画像A0(x)の平均形状領域BSA内の画素数(56画素×56画素−マスク領域MAの画素数)に等しい。アップデートマトリックスRは、下記の式(4)および(5)により算出される。
The update matrix R in the equation (3) is a matrix of M rows and N columns set in advance by learning in order to calculate the parameter update amount ΔP based on the difference image Ie.
It is stored in the internal memory 120 as AAM information AMI (FIG. 1). In this embodiment, the number of rows M in the update matrix R is equal to the sum ((4 + n)) of the number of global parameters (4) and the number of shape parameters p i (n), and the number of columns N is , average face image a 0 average number of pixels in the shape area BSA of (x) - is equal to (56 pixels × 56 pixels the number of pixels in the mask area MA). The update matrix R is calculated by the following formulas (4) and (5).

Figure 2010271956
Figure 2010271956

Figure 2010271956
Figure 2010271956

補正部226(図1)は、算出されたパラメーター更新量ΔPに基づきパラメーター(4個のグローバルパラメーターとn個の形状パラメーターpi)を更新する(ステップS460)。これにより、注目画像OIにおける特徴点CPの設定位置が補正される。補正部226は、差分画像Ieのノルムが小さくなるように補正する。パラメーターの更新の後には、再度、特徴点CPの設置位置が補正された注目画像OIからの平均形状画像I(W(x;p))の算出(ステップS410)、差分画像Ieの算出(ステップS420)、差分画像Ieに基づく収束判定(ステップS430)が行われる。なお、平均形状画像I(W(x;p))は、形状パラメーターpiの更新(変化)に応じて変化するものであり、特許請求の範囲の「顔領域」に相当する。再度の収束判定においても収束していないと判定された場合には、さらに、差分画像Ieに基づくパラメーター更新量ΔPの算出(ステップS450)、パラメーターの更新による特徴点CPの設定位置補正(ステップS460)が行われる。 The correction unit 226 (FIG. 1) updates the parameters (four global parameters and n shape parameters p i ) based on the calculated parameter update amount ΔP (step S460). Thereby, the setting position of the feature point CP in the target image OI is corrected. The correcting unit 226 corrects so that the norm of the difference image Ie is reduced. After the parameter update, the average shape image I (W (x; p)) is calculated again from the target image OI in which the installation position of the feature point CP is corrected (step S410), and the difference image Ie is calculated (step S420), a convergence determination based on the difference image Ie (step S430) is performed. The average shape image I (W (x; p)) changes according to the update (change) of the shape parameter p i and corresponds to a “face region” in the claims. If it is determined that the convergence has not occurred in the convergence determination again, the parameter update amount ΔP based on the difference image Ie is calculated (step S450), and the setting position correction of the feature point CP by the parameter update (step S460). ) Is performed.

図15のステップS410からS460までの処理が繰り返し実行されると、注目画像OIにおける各特徴部位に対応する特徴点CPの位置、実際の特徴部位の位置に全体として近づいていき、ある時点で収束判定(ステップS430)において収束したと判定される。収束判定において収束したと判定されると、顔特徴検出処理が完了する(ステップS470)。このとき設定されているグローバルパラメーターおよび形状パラメーターpiの値により特定される特徴点CPの設定位置が、最終的な注目画像OIにおける特徴点CPの設定位置として特定される。 When the processing from step S410 to step S460 in FIG. 15 is repeatedly executed, the position of the feature point CP corresponding to each feature part in the target image OI and the position of the actual feature part approach as a whole and converge at a certain time. In the determination (step S430), it is determined that convergence has occurred. If it is determined in the convergence determination that convergence has been achieved, the face feature detection process is completed (step S470). The setting position of the feature point CP specified by the global parameter and the shape parameter p i set at this time is specified as the setting position of the feature point CP in the final target image OI.

図16は、特徴点CP設定位置補正処理の結果の一例を示す説明図である。図16には、注目画像OIにおいて最終的に特定された特徴点CPの設定位置が示されている。特徴点CPの設定位置により、注目画像OIに含まれる顔の特徴部位(人物の顔の器官(眉毛、目、鼻、口)および顔の輪郭における所定位置)の位置が特定されるため、注目画像OIにおける人物の顔の器官の形状・位置や顔の輪郭形状の検出が可能となる。   FIG. 16 is an explanatory diagram illustrating an example of a result of the feature point CP setting position correction process. FIG. 16 shows the setting positions of the feature points CP finally specified in the target image OI. Since the position of the feature point CP specifies the position of the facial feature part (predetermined position in the facial organs (eyebrows, eyes, nose, mouth) and facial contour) included in the attention image OI. It is possible to detect the shape and position of the human face organ and the face contour shape in the image OI.

特徴点CP設定位置補正処理が完了すると、テクスチャー検出部240(図1)は、注目画像OIにおいて設定される平均形状画像I(W(x;p))のテクスチャー(見え)の補正(検出)をおこなう(ステップS260)。   When the feature point CP setting position correction processing is completed, the texture detection unit 240 (FIG. 1) corrects (detects) the texture (appearance) of the average shape image I (W (x; p)) set in the target image OI. Is performed (step S260).

A3−2.テクスチャー検出処理:
図17は、テクスチャー検出処理の流れを示すフローチャートである。生成部242(図1)は、注目画像OIから平均形状画像I(W(x;p))を算出する(ステップS510)。平均形状画像I(W(x;p))の算出方法は、特徴点CP初期位置設定処理におけるステップS320、および、特徴点CP設定位置補正処理におけるステップS410と同様であるが、特徴点CP設定位置補正処理完了時のグローバルパラメーターおよび形状パラメーターpiの値を使用して平均形状画像I(W(x;p))が算出される。
A3-2. Texture detection processing:
FIG. 17 is a flowchart showing the flow of texture detection processing. The generation unit 242 (FIG. 1) calculates an average shape image I (W (x; p)) from the attention image OI (step S510). The calculation method of the average shape image I (W (x; p)) is the same as that in step S320 in the feature point CP initial position setting process and step S410 in the feature point CP setting position correction process. position correction processing completion time using the values of the global parameters and the shape parameters p i of the average shape image I (W (x; p) ) is calculated.

さらに、テクスチャー検出部240の生成部242は、平均形状画像I(W(x;p))に基づく平均テクスチャー画像J(T(x;λ))を算出する(ステップS515)。平均テクスチャー画像J(T(x;λ))は、以下の(6)式によって算出される。

Figure 2010271956

前記式(6)は、前記式(2b)における顔のテクスチャーA(x)にW(x;p)を代入したものであり、テクスチャーパラメーターλkが適切に設定されれば、T(x;λ)が平均顔画像A0(x)と等しくなる。 Further, the generation unit 242 of the texture detection unit 240 calculates an average texture image J (T (x; λ)) based on the average shape image I (W (x; p)) (step S515). The average texture image J (T (x; λ)) is calculated by the following equation (6).
Figure 2010271956

The equation (6) is obtained by substituting W (x; p) into the facial texture A (x) in the equation (2b). If the texture parameter λ k is appropriately set, T (x; λ) is equal to the average face image A 0 (x).

そして、算出部244は、平均テクスチャー画像J(T(x;λ))と平均顔画像A0(x)との差分画像Ieを算出する(ステップS520)。テクスチャー検出部240は、差分画像Ieに基づき、テクスチャー検出処理が収束したか否かを判定する(ステップS530)。テクスチャー検出部240は、差分画像Ieのノルムを算出し、ノルムの値が予め設定された閾値より小さい場合には収束したと判定し、ノルムの値が閾値以上の場合には未だ収束していないと判定する。なお、テクスチャー検出部240は、算出された差分画像Ieのノルムの値が前回のステップS530において算出された値よりも小さい場合には収束したと判定し、前回値以上である場合には未だ収束していないと判定するものとしてもよい。ここにおける収束の判定は、特徴点CP設定位置補正処理におけるステップS430と同様の手法によりおこなうことができる。 Then, the calculation unit 244 calculates a difference image Ie between the average texture image J (T (x; λ)) and the average face image A 0 (x) (step S520). The texture detection unit 240 determines whether the texture detection process has converged based on the difference image Ie (step S530). The texture detection unit 240 calculates the norm of the difference image Ie, determines that it has converged if the norm value is smaller than a preset threshold value, and has not yet converged if the norm value is greater than or equal to the threshold value. Is determined. Note that the texture detection unit 240 determines that the calculated norm value of the difference image Ie has converged if it is smaller than the value calculated in the previous step S530, and still converges if it is greater than or equal to the previous value. It is good also as what determines with not doing. The convergence determination can be performed by the same method as in step S430 in the feature point CP setting position correction process.

前記のステップS530の収束判定において未だ収束していないと判定された場合には、補正部246(図1)がパラメーター更新量Δλを算出する(ステップS550)。パラメーター更新量ΔΛは、特徴量であるm個のテクスチャーパラメーターλk(k=1〜mの整数。)の値の変更量を意味している。パラメーター更新量ΔΛは、下記の式(7)により算出される。すなわち、パラメーター更新量ΔΛは、アップデートマトリックスUと差分画像Ieとの積である。 If it is determined in step S530 that the convergence has not yet been completed, the correction unit 246 (FIG. 1) calculates the parameter update amount Δλ (step S550). The parameter update amount ΔΛ means a change amount of the value of m texture parameters λ k (k = 1 to m), which is a feature amount. The parameter update amount ΔΛ is calculated by the following equation (7). That is, the parameter update amount ΔΛ is a product of the update matrix U and the difference image Ie.

Figure 2010271956
Figure 2010271956

式(7)におけるアップデートマトリックスUは、差分画像Ieに基づきパラメーター更新量ΔΛを算出するために予め学習により設定されたM行N列のマトリックスであり、
AAM情報AMI(図1)として内部メモリー120に格納されている。本実施例では、アップデートマトリックスUの行数Mは、テクスチャーパラメーターλk(m個)に等しく、列数Nは、平均形状領域BSA内の画素数(56画素×56画素−マスク領域MAの画素数)に等しい。アップデートマトリックスUは、下記の式(8),(9)により算出される。

Figure 2010271956

Figure 2010271956
The update matrix U in Equation (7) is a matrix of M rows and N columns set in advance by learning in order to calculate the parameter update amount ΔΛ based on the difference image Ie.
It is stored in the internal memory 120 as AAM information AMI (FIG. 1). In this embodiment, the number M of rows in the update matrix U is equal to the texture parameter λ k (m), and the number N of columns is the number of pixels in the average shape area BSA (56 pixels × 56 pixels−pixels in the mask area MA). Number). The update matrix U is calculated by the following formulas (8) and (9).
Figure 2010271956

Figure 2010271956

補正部246(図1)は、算出されたパラメーター更新量ΔΛに基づきテクスチャーパラメーターλkを更新する(ステップS560)。これにより、顔のテクスチャーA(x)が補正される。すなわち、補正部246は、差分画像Ieのノルムが小さくなるように補正する。パラメーターの更新の後には、再度、補正されたテクスチャーパラメーターλkに基づいて平均テクスチャー画像J(T(x;λ))の算出(ステップS515)、差分画像Ieの算出(ステップS520)、差分画像Ieに基づく収束判定(ステップS530)が行われる。再度の収束判定においても収束していないと判定された場合には、さらに、差分画像Ieに基づくパラメーター更新量ΔΛの算出(ステップS550)、パラメーターの更新によるテクスチャーの補正(ステップS560)が行われる。 The correction unit 246 (FIG. 1) updates the texture parameter λ k based on the calculated parameter update amount ΔΛ (step S560). Thereby, the facial texture A (x) is corrected. That is, the correction unit 246 corrects so that the norm of the difference image Ie is reduced. After the parameter update, the average texture image J (T (x; λ)) is calculated again based on the corrected texture parameter λ k (step S515), the difference image Ie is calculated (step S520), and the difference image. A convergence determination (step S530) based on Ie is performed. If it is determined that the convergence has not been made in the convergence determination again, the parameter update amount ΔΛ based on the difference image Ie is calculated (step S550), and the texture is corrected by updating the parameter (step S560). .

図17のステップS510からS560までの処理が繰り返し実行されると、顔のテクスチャーA(x)の各画素の輝度値(色彩値)が、実際の顔画像の輝度値に全体として近づいていき、ある時点で収束判定(ステップS530)において収束したと判定される。収束判定において収束したと判定されると、テクスチャー検出処理が完了する(ステップS570)。このとき設定されているテクスチャーパラメーターλkの値により特定される顔のテクスチャーA(x)が最終的な顔の見えとして特定される。顔のテクスチャーA(x)に基づいて、顔色補正等をおこなうことができる。以上のようにして、注目画像OIにおける顔領域FAについての形状パラメーターpiとテクスチャーパラメーターλkが特定できると、次に表情判定処理を実行する。 When the processing from step S510 to S560 in FIG. 17 is repeatedly executed, the luminance value (color value) of each pixel of the facial texture A (x) approaches the luminance value of the actual face image as a whole, At a certain point in time, it is determined that convergence has been made in the convergence determination (step S530). If it is determined in the convergence determination that the image has converged, the texture detection process is completed (step S570). The facial texture A (x) specified by the value of the texture parameter λ k set at this time is specified as the final facial appearance. Based on the facial texture A (x), facial color correction and the like can be performed. When the shape parameter p i and the texture parameter λ k for the face area FA in the target image OI can be specified as described above, the facial expression determination process is executed next.

A4.表情判定処理:
図18は、表情判定処理の流れを示すフローチャートである。表情判定部250は、判定対象の表情を選択する(ステップS610)。本実施例では、4種類の表情(喜顔、悲顔、驚顔、怒顔)を判定対象とし、喜顔→悲顔→驚顔→怒顔の順で判定対象を選択することとする。選択部252は、n個の形状パラメーターpiとm個のテクスチャーパラメーターλkのなかから、選択した表情の表情らしさを示す判定値Eを算出するために使用するh個の表情パラメーターql(l=1〜hの整数。)を選択する(ステップS620)。判定値算出部254は、表情パラメーターqlを下記式(10)に代入することにより、判定値Eを算出する(ステップS630)。

Figure 2010271956
A4. Facial expression determination processing:
FIG. 18 is a flowchart showing the flow of facial expression determination processing. The facial expression determination unit 250 selects a facial expression to be determined (step S610). In this embodiment, four types of facial expressions (a happy face, a sad face, a surprised face, and an angry face) are set as determination targets, and a determination target is selected in the order of a happy face → a sad face → a surprise face → an angry face. The selection unit 252 selects the h facial expression parameters q l (used to calculate a judgment value E indicating the facial expression of the selected facial expression from the n shape parameters p i and the m texture parameters λ k. 1 is an integer from 1 to h.) (Step S620). Determination value calculation unit 254 calculates determination value E by substituting facial expression parameter q l into the following equation (10) (step S630).
Figure 2010271956

前記式(10)において、αlは各表情パラメーターqlについて設定された重み係数を示し、knは正規化のための係数を示している。すなわち、判定値Eは、表情パラメーターqlを重み係数αlに基づく重みによって線形結合した値である。判定値Eが算出されると、表情判定部250はすべての表情の選択を完了したか否かを判定し(ステップS640)、完了していない場合にはステップS610に戻り次の表情を選択する。これにより、喜顔の判定値Eと、悲顔の判定値Eと、驚顔の判定値Eと、怒顔の判定値Eを順に算出していくことができる。なお、各表情にごとに、n個の形状パラメーターpiとm個のテクスチャーパラメーターλkのなかから選択されるh個の表情パラメーターqlは異なっており、表情パラメーターqlに対応する重み係数αlも各表情に対応して用意されている。例えば、口角が上がる傾向にある喜顔と、口角が下がる傾向にある悲顔とでは、口角に関する表情パラメーターqlに対する重み係数αlの符号が反転することとなる。従って、各表情ごとに異なる計算式に基づいて判定値Eが算出されることとなる。このように、形状パラメーターpiとテクスチャーパラメーターλkのうち各表情と相関の高いh個の表情パラメーターqlを使用して判定値Eを算出するため、形状的および色彩(輝度)的な観点に基づいて表情を精度よく判定することができる。 In the equation (10), α l represents a weighting coefficient set for each facial expression parameter q l , and kn represents a coefficient for normalization. That is, the determination value E is a value obtained by linearly combining the facial expression parameter q l with a weight based on the weight coefficient α l . When the determination value E is calculated, the facial expression determination unit 250 determines whether or not selection of all facial expressions has been completed (step S640). If not, the process returns to step S610 to select the next facial expression. . As a result, the determination value E for the happy face, the determination value E for the sad face, the determination value E for the surprised face, and the determination value E for the angry face can be calculated in order. For each facial expression, the h facial expression parameters q l selected from the n shape parameters p i and the m texture parameters λ k are different, and the weighting coefficient corresponding to the facial expression parameter q l α l is also prepared for each facial expression. For example, the sign of the weight coefficient α l for the facial expression parameter q l related to the mouth angle is inverted between a happy face that tends to increase the mouth angle and a sad face that tends to decrease the mouth angle. Therefore, the determination value E is calculated based on a different calculation formula for each facial expression. As described above, since the judgment value E is calculated using the h facial expression parameters q l having a high correlation with each facial expression among the geometric parameters pi and the texture parameters λ k , the geometrical and color (luminance) viewpoints are obtained. The facial expression can be accurately determined based on the above.

各表情に対応して選択される表情パラメーターqlは、形状パラメーターpiとテクスチャーパラメーターλkのうち各表情と相関の高いベクトル要素であり、後述する判定値設定処理によって設定され、予め表情判定情報EMI(図1)として内部メモリー120に格納されている。各表情について判定値Eが算出できると、各表情について判定値Eを総合して判定部256が表情の判定を行う。具体的には、判定部256が最も判定値Eの大きい表情を検出する(ステップS650)。次に、判定部256は、最も大きい判定値Eが所定の閾値よりも大きいか否かを判定し(ステップS660)、閾値よりも大きければ当該判定値Eの表情を有していると判定する(ステップS670)。一方、最も大きい判定値E以下であれば、いずれの表情も有していないと判定する(ステップS680)。本実施例では、注目画像OIに各表情を識別するタグ情報を添付した後、注目画像OIに喜顔が含まれる場合には、印刷機構160に注目画像OIを出力し、印刷を実行させる(ステップS690)。 The facial expression parameter q l selected corresponding to each facial expression is a vector element having a high correlation with each facial expression out of the shape parameter p i and the texture parameter λ k and is set by a judgment value setting process to be described later. It is stored in the internal memory 120 as information EMI (FIG. 1). When the determination value E can be calculated for each facial expression, the determination unit 256 determines the facial expression by combining the determination values E for each facial expression. Specifically, the determination unit 256 detects a facial expression with the largest determination value E (step S650). Next, the determination unit 256 determines whether or not the largest determination value E is greater than a predetermined threshold (step S660), and determines that the expression has the expression of the determination value E if greater than the threshold. (Step S670). On the other hand, if it is equal to or less than the largest determination value E, it is determined that no facial expression is present (step S680). In this embodiment, after tag information for identifying each expression is attached to the attention image OI, if the attention image OI includes a happy face, the attention image OI is output to the printing mechanism 160 and printing is performed ( Step S690).

図19(a)〜(d)は、各表情の判定値Eを比較するグラフである。図19(a)のようにいずれの表情の判定値Eも閾値を超えていない場合には、いずれの表情も有していないと判定する(ステップS680)。図19(b)のように、いずれか1つの表情の判定値Eが閾値を超えている場合には、判定値Eが閾値を超えている表情であると判定する。図19(c),(d)のように、いずれか2以上の表情の判定値Eが閾値を超えている場合には、判定値Eが閾値を超えている表情のうち判定値Eが最大の表情であると判定する。このように、各表情ごとに判定値Eを算出することにより、各表情であるか否かを精度よく判定することができる。また、もっとも大きい判定値Eに対応する表情を有していると判定するため、もっともそれらしい表情を特定することができる。   FIGS. 19A to 19D are graphs for comparing the determination values E of the facial expressions. If the determination value E for any facial expression does not exceed the threshold value as shown in FIG. 19A, it is determined that no facial expression is present (step S680). As shown in FIG. 19B, when the determination value E of any one facial expression exceeds the threshold value, it is determined that the facial expression value exceeds the threshold value. As shown in FIGS. 19C and 19D, when the determination value E of any two or more facial expressions exceeds the threshold value, the determination value E is the maximum among the facial expressions whose determination value E exceeds the threshold value. It is determined that it is a facial expression. Thus, by calculating the determination value E for each facial expression, it is possible to accurately determine whether each facial expression is present. Further, since it is determined that the expression corresponding to the largest determination value E is present, the most appropriate expression can be specified.

A5.判定値設定処理:
図20は、判定値設定処理の流れを示すフローチャートである。判定値設定処理もAAM設定処理と同様にプリンター100の製造に先立って、コンピューターによって実行される処理である。まず、喜顔であるか否か、悲顔であるか否か、驚顔であるか否か、怒顔であるか否かが既知のサンプル画像SIを用意する(ステップS710)。例えば、各サンプル画像SIがどの表情を有するかをオペレーターが判断し、その結果を各サンプル画像SIに対応付け、コンピューターに入力させておく。次に、コンピューターは、各サンプル画像SIを注目画像OIとして、上述した特徴点CP初期位置設定処理と特徴点CP設定位置補正処理とテクスチャー検出処理と同様の処理を順次実行することにより、各サンプル画像SIについて形状パラメーターpiとテクスチャーパラメーターλkを算出する(ステップS720)。形状パラメーターpiとテクスチャーパラメーターλkとが得られたら、コンピューターは、表情パラメーターqlの設定対象とする表情を選択する(ステップS730)。ここでも、喜顔→悲顔→驚顔→怒顔の順で判定対象を選択することとする。表情が選択できたら、コンピューターは、形状パラメーターpiとテクスチャーパラメーターλkのそれぞれの要素について、選択した表情であるか否かとの相関係数を算出する(ステップS740)。
A5. Judgment value setting processing:
FIG. 20 is a flowchart showing the flow of the determination value setting process. Similar to the AAM setting process, the determination value setting process is a process executed by the computer prior to manufacturing the printer 100. First, a known sample image SI is prepared for whether it is a happy face, a sad face, a surprised face, or an angry face (step S710). For example, the operator determines which facial expression each sample image SI has, and the result is associated with each sample image SI and input to the computer. Next, the computer uses each sample image SI as the target image OI, and sequentially executes the same processing as the above-described feature point CP initial position setting processing, feature point CP setting position correction processing, and texture detection processing, thereby each sample image SI. the image SI and calculates a shape parameter p i and texture parameter lambda k (step S720). When the shape parameter p i and the texture parameter λ k are obtained, the computer selects a facial expression for which the facial expression parameter q l is to be set (step S730). Again, the determination target is selected in the order of happy face → sad face → surprise face → angry face. If the facial expression can be selected, the computer calculates a correlation coefficient between each element of the shape parameter p i and the texture parameter λ k with respect to whether or not it is the selected facial expression (step S740).

図21は、喜顔であるか否かの相関を説明するグラフである。同図の横軸と縦軸は、形状パラメーターpiの例として、形状パラメーターp8,p9の値(0〜100%)を示している。グラフにおいて、各サンプル画像SIの形状パラメーターp8,p9をプロットしており、喜顔であるものは○で示し、喜顔でないものは●で示している。図に示すように、形状パラメーターp8の値が小さくなるほど、喜顔であるものの多く分布している。従って、喜顔であるか否かは形状パラメーターp8に対して負の相関を有することとなる。一方、形状パラメーターp9に関しては、喜顔であるものと、喜顔でないものがほぼ均等に分布しており、相関を有していない。なお、一例として、形状パラメーターp8,p9を挙げているに過ぎず、他のすべての形状パラメーターpiとテクスチャーパラメーターλkについても同様に表情との相関性の調査を行う。 FIG. 21 is a graph for explaining the correlation of whether or not the face is a happy face. The horizontal axis and the vertical axis in the figure indicate the values (0 to 100%) of the shape parameters p 8 and p 9 as examples of the shape parameter p i . In the graph, which plots the shape parameter p 8, p 9 of each sample image SI, what is Hee face indicated by ○, those that are not Hee face is indicated by ●. As shown in the figure, the smaller the value of the shape parameter p 8 , the greater the distribution of the happy faces. Therefore, whether or not it is a happy face has a negative correlation with the shape parameter p 8 . On the other hand, with respect to the shape parameters p 9, as is Hee face, has been substantially uniformly distributed not comply with Hee face, does not have a correlation. As an example, only the shape parameters p 8 and p 9 are listed, and all other shape parameters p i and texture parameters λ k are similarly investigated for correlation with facial expressions.

ここでは、コンピューターは、公知の計算式により、相関係数を算出し、その絶対値が所定の閾値(例えば、0.5等。)を超えている形状パラメーターpiとテクスチャーパラメーターλkを表情パラメーターqlとする(ステップS750)。従って、表情パラメーターqlの要素の個数(h個)は、各表情によって同じとなるとは限らない。むろん、表情パラメーターqlの要素の個数(h個)を予め設定しておき、相関係数の絶対値が上位h個の形状パラメーターpiとテクスチャーパラメーターλkを表情パラメーターqlとして設定するようにしてもよい。さらに、表情パラメーターqlの要素の個数(h個)のうち、形状パラメーターpiとテクスチャーパラメーターλkの要素の個数の比率が規定されてもよい。例えば、形状パラメーターpiとテクスチャーパラメーターλkの要素の個数が1:1となるように制限を加えれば、形状的および色彩(輝度)的な観点をバランスよく評価することができる。ここでは、相関係数が高い形状パラメーターpiとテクスチャーパラメーターλkが表情パラメーターqlとして設定されるが、例えば喜顔の場合には目尻の角度や口角に関する形状パラメーターpiや笑いじわに関するテクスチャーパラメーターλkが表情パラメーターqlとして設定されことが予測される。 Here, the computer calculates the correlation coefficient by a known calculation formula, and expresses the shape parameter p i and the texture parameter λ k whose absolute value exceeds a predetermined threshold (for example, 0.5, etc.) The parameter is q l (step S750). Therefore, the number (h) of elements of the facial expression parameter q l is not necessarily the same for each facial expression. Of course, the number (h) of elements of the facial expression parameter q l is set in advance, and the shape parameter p i and the texture parameter λ k having the highest absolute value of the correlation coefficient are set as the facial expression parameter q l. It may be. Furthermore, the ratio of the number of elements of the shape parameter p i and the texture parameter λ k among the number (h) of elements of the facial expression parameter q l may be defined. For example, the number of elements of the shape parameter p i and texture parameter lambda k is 1: be added to 1 and so as to limit, it is possible to evaluate a balanced shape and color (luminance) point of view. Here, the shape parameter p i and the texture parameter λ k having a high correlation coefficient are set as the expression parameter q l . For example, in the case of a happy face, the shape parameter p i related to the angle of the corner of the eye or the mouth angle is related to laughter. It is predicted that the texture parameter λ k is set as the facial expression parameter q l .

次に、コンピューターは、算出された相関係数に比例する値を重み係数αlとして設定する(ステップS760)。従って、正の相関を有する表情パラメーターqlについては正の重み係数αlが設定され、負の相関を有する表情パラメーターqlについては負の重み係数αlが設定されることとなる。選択した表情についての重み係数αlが設定できると、コンピューターは、すべての表情の選択が完了したか否かを判定し(ステップS770)、完了していない場合にはステップS730に戻る。以上のようにして、すべての表情について、表情パラメーターqlと重み係数αlが設定できると、コンピューターは、前記式(10)によって算出される判定値Eの値の最大値が各表情間で一致するように、各表情についての係数knを設定する(ステップS780)。以上により前記式(10)で使用される情報はすべて設定されたこととなり、これらの情報を表情判定情報EMIとしてプリンター100の製造時において内部メモリー120に格納する(ステップS790)。 Next, the computer sets a value proportional to the calculated correlation coefficient as the weighting coefficient α 1 (step S760). Accordingly, the facial expression parameters q l having a positive correlation is set to a positive weight coefficient alpha l, negative weight factor alpha l is to be set for the expression parameter q l having a negative correlation. If the weighting factor α l for the selected facial expression can be set, the computer determines whether or not selection of all facial expressions has been completed (step S770), and returns to step S730 if not complete. As described above, when the facial expression parameter q l and the weighting coefficient α l can be set for all facial expressions, the computer determines that the maximum value of the judgment value E calculated by the equation (10) is between each facial expression. A coefficient kn for each facial expression is set so as to match (step S780). Thus, all the information used in the equation (10) has been set, and these pieces of information are stored in the internal memory 120 as the facial expression determination information EMI when the printer 100 is manufactured (step S790).

B.変形例:
なお、この発明は前記の実施例や実施形態に限られるものではなく、その要旨を逸脱しない範囲において種々の態様において実施することが可能であり、例えば次のような変形も可能である。
B. Variation:
The present invention is not limited to the above-described examples and embodiments, and can be implemented in various modes without departing from the gist thereof. For example, the following modifications are possible.

B1.変形例1:
前記実施例では、サンプル画像SIを、個性・人種・性別、表情(喜顔、悲顔、驚顔、怒顔)、向きといった種々の属性に関して互いに相違する顔画像が含まれるように用意したが、表情(喜顔、悲顔、驚顔、怒顔)の属性が相違するサンプル画像SIの構成比率を高めるようにしてもよい。表情の属性が相違するサンプル画像SIの構成比率を高めることにより、喜顔、悲顔、驚顔、怒顔の属性の寄与率が、他の個性・人種・性別・向きといった他の属性に対して相対的に高くなるため、主成分分析において喜顔、悲顔、驚顔、怒顔である程度を示す主成分が表れることとなる。すなわち、形状パラメーターpiまたはテクスチャーパラメーターλkのいずれかの要素が、そのまま喜顔であるか否か、悲顔であるか否か、驚顔であるか否か、怒顔であるか否かの程度を示すようにすることができる。
B1. Modification 1:
In the above-described embodiment, the sample images SI are prepared so as to include different face images with respect to various attributes such as personality / race / gender, facial expression (happy face, sad face, surprised face, angry face), and orientation. However, the composition ratio of the sample images SI having different attributes of expression (happy face, sad face, surprise face, angry face) may be increased. By increasing the composition ratio of the sample image SI with different facial expression attributes, the contribution ratio of the happy face, sad face, surprise face, and angry face attributes to other attributes such as personality, race, gender, and orientation On the other hand, since it becomes relatively high, in the principal component analysis, a principal component showing a certain degree appears as a happy face, a sad face, a surprised face, and an angry face. That is, any element of shape parameter p i or texture parameter lambda k is whether it Hee face, whether悲顔, whether Odorokikao, whether Okokao The degree can be shown.

前記実施例と同様に判定値設定処理を行った場合には、表情の属性が相違するサンプル画像SIの構成比率を高めるほど、形状パラメーターpiまたはテクスチャーパラメーターλkのいずれかの要素と、各表情との相関係数が高くなる。形状パラメーターpiまたはテクスチャーパラメーターλkのいずれかの要素と、各表情との相関係数が1または−1に極めて近いとき(例えば、絶対値が0.9以上となるとき等。)には、当該要素の値を閾値と比較することにより、各表情の判定をおこなうことができる。例えば、第1主成分に対応する形状パラメーターp1と閾値を比較することにより喜顔であるか否かを判定し、一方、第2主成分に対応する形状パラメーターp2と閾値を比較することにより悲顔であるか否かを判定することができる。なお、種々の顔について特徴点の検出をする必要があるため、ある程度は個性・人種・性別・向きの属性が相違するサンプル画像SIも含めておくことが望ましい。また、特徴点の検出の検出を別途おこなうのであれば、表情(喜顔、悲顔、驚顔、怒顔)の属性が相違するサンプル画像SIのみを使用してAAM情報AMIを設定することも可能である。 When the determination value setting process is performed in the same manner as in the embodiment, as the component ratio of the sample image SI having different facial expression attributes is increased, either the shape parameter pi or the texture parameter λ k Correlation coefficient with facial expression increases. When the correlation coefficient between any element of the shape parameter p i or the texture parameter λ k and each facial expression is very close to 1 or −1 (for example, when the absolute value is 0.9 or more). Each facial expression can be determined by comparing the value of the element with a threshold value. For example, by comparing the shape parameter p 1 corresponding to the first principal component with a threshold value, it is determined whether or not the face is a happy face, while comparing the shape parameter p 2 corresponding to the second principal component with the threshold value. Thus, it can be determined whether or not it is a sad face. In addition, since it is necessary to detect feature points for various faces, it is desirable to include sample images SI having different personality, race, gender, and orientation attributes to some extent. In addition, if the detection of feature points is performed separately, the AAM information AMI may be set using only sample images SI having different facial expression attributes (happy face, sad face, surprise face, angry face). Is possible.

B2.変形例2:
前記実施例では、単一の静止画像を注目画像OIとするものを例示したが、時系列的に連続して画像入力された動画やデジタルスチルカメラの連写機能によって撮影した一連の静止画像を、順次、注目画像OIとするようにしてもよい。例えば、動画の各フレームのなかから各表情が顕著なフレームを検出し、該フレームを印刷機構160において印刷するようにしてもよい。各フレームについて、前記実施例と同様の顔特徴検出処理と表情判定処理を実行するようにしてもよいが、本変形例では以下に説明する表情判定処理を実行する。
B2. Modification 2:
In the above embodiment, a single still image is set as the target image OI. However, a series of still images taken by a continuous shooting function of a moving image or a digital still camera in which images are continuously input in time series are illustrated. The target image OI may be sequentially set. For example, a frame with a significant expression can be detected from each frame of the moving image and the frame can be printed by the printing mechanism 160. For each frame, the same facial feature detection processing and facial expression determination processing as in the above embodiment may be executed, but in this modification, facial expression determination processing described below is executed.

図22は、本変形例にかかる表情判定処理の流れを示すフローチャートである。表情判定部250は、判定対象の表情を選択するにあたり、直前のフレームに存在する顔がいずれかの表情であると判定されたか否かを判定する(ステップS602)。なお、各フレームには単一の顔のみが存在するものとして説明する。直前のフレームに存在する顔がいずれの表情であるとも判定されていなかった場合には、前記実施例と同様に、喜顔→悲顔→驚顔→怒顔の順で選択し、判定値Eが最も大きく、かつ、閾値よりも大きい表情を判定する(前記実施例と同様のステップS610〜S690)。一方、直前のフレームに存在する顔がいずれかの表情であると判定されていた場合には、該表情を選択する(ステップS604)。   FIG. 22 is a flowchart showing the flow of facial expression determination processing according to the present modification. When selecting the facial expression to be determined, the facial expression determination unit 250 determines whether or not the face existing in the immediately preceding frame has been determined to be any facial expression (step S602). In the following description, it is assumed that each frame has only a single face. If it is not determined that the face existing in the immediately preceding frame is any facial expression, in the same manner as in the above embodiment, selection is made in the order of happy face → sad face → surprise face → angry face, and determination value E The facial expression having the largest value and larger than the threshold value is determined (steps S610 to S690 similar to the above embodiment). On the other hand, when it is determined that the face existing in the immediately preceding frame is any facial expression, the facial expression is selected (step S604).

そして、該表情について、h個の表情パラメーターqlを選択し(ステップS622)。表情パラメーターqlを上記式(10)に代入することにより、判定値Eを算出する(ステップS632)。該判定値Eが閾値(前記実施例と同じもの)より大きい場合には(ステップS662)、ステップS604にて選択した表情であると判定する(ステップS672)。一方、該判定値Eが閾値以下の場合には、ステップS610を実行し、前記実施例と同様のステップS610〜S680を順次実行する。ただし、直前のフレームの表情についてはすでに判定値Eの判定が完了しているため、ステップS610では直前のフレームの表情は選択しないこととする。 Then, h facial expression parameters q l are selected for the facial expression (step S622). The determination value E is calculated by substituting the facial expression parameter q l into the above equation (10) (step S632). If the determination value E is larger than the threshold value (the same as in the above embodiment) (step S662), it is determined that the facial expression is selected in step S604 (step S672). On the other hand, if the determination value E is less than or equal to the threshold value, step S610 is executed, and steps S610 to S680 similar to those in the above embodiment are sequentially executed. However, since the determination of the determination value E has already been completed for the expression in the immediately preceding frame, the expression in the immediately preceding frame is not selected in step S610.

極めて短時間の間に画像入力された動画の各フレームでは、直前のフレームと同じ表情の顔が存在する可能性が高いと考えることができる。本変形例のフローとすることにより、同じ表情が継続している限り、その表情についての判定値Eの算出と、閾値の判定のみが行われることとなる。直前の表情であると判定されなくなった時点で、すべての表情についての判定値Eの算出が行われるため、効率的な表情判定を動画に対しておこなうことができる。むろん、連写機能によって極めて短時間の間に撮影された静止画像であっても同様の効果を得ることができる。さらに、単一の注目画像OIにおいて複数の顔が含まれる場合には、それぞれが同一の表情を有していると推定することができる。従って、先に表情判定をおこなった顔について判定された表情に関する判定を、次の顔に対して最初に行うようにしてもよい。   It can be considered that each frame of a moving image input in an extremely short time is highly likely to have a face with the same expression as the previous frame. By using the flow of this modification, as long as the same facial expression continues, only the calculation of the judgment value E and the threshold value are determined for that facial expression. Since the determination value E is calculated for all facial expressions when it is no longer determined that the previous facial expression is determined, efficient facial expression determination can be performed on the moving image. Of course, the same effect can be obtained even with a still image taken in a very short time by the continuous shooting function. Furthermore, when a plurality of faces are included in a single target image OI, it can be estimated that each has the same expression. Therefore, the determination regarding the facial expression determined for the face for which the facial expression determination has been performed first may be performed first for the next face.

B3.変形例3:
前記実施例においては、形状パラメーターpiとテクスチャーパラメーターλkのいずれの要素も各表情との相関が高ければ判定値Eを算出に使用するようにしたが、例えば形状パラメーターpiのみを使用して判定値Eを算出するようにしてもよい。さらに、状況に応じて、形状パラメーターpiのみを使用して判定値Eを算出するのか、形状パラメーターpiとテクスチャーパラメーターλkの双方を使用して判定値Eを算出するのか切り換えるようにしてもよい。
B3. Modification 3:
In the above embodiment, the determination value E is used for calculation if any element of the shape parameter p i and the texture parameter λ k has a high correlation with each facial expression. For example, only the shape parameter p i is used. Thus, the determination value E may be calculated. Furthermore, depending on circumstances, whether to calculate the judgment value E using only the shape parameters p i, and to switch whether to calculate a decision value E using both shape parameters p i and texture parameter lambda k Also good.

図23は、本変形例にかかる表情判定処理の流れを示すフローチャートである。本変形例においては、肌色補正を実行する肌色補正モードがユーザーによって指定可能(不図示)である。肌色補正モードにおいて注目画像OIに存在する顔の肌色画素の色彩値を予め指定された肌色の記憶色の色彩値に補正する処理が印刷の際に実行される。前記実施例と同様に判定対象の表情を選択すると(ステップS610)、肌色補正モードが選択されているか否かを判定する(ステップS615)。肌色補正モードが選択されていない場合には、前記実施例と同様にステップS620〜S680を順次実行する。すなわち、形状パラメーターpiとテクスチャーパラメーターλkの双方を使用して判定値Eを算出し、各表情の判定を行っていく。 FIG. 23 is a flowchart showing the flow of facial expression determination processing according to this modification. In the present modification, a skin color correction mode for performing skin color correction can be specified by a user (not shown). In the skin color correction mode, processing for correcting the color value of the skin color pixel of the face existing in the target image OI to the color value of the memory color of the skin color specified in advance is executed at the time of printing. When a facial expression to be determined is selected as in the above embodiment (step S610), it is determined whether the skin color correction mode is selected (step S615). If the skin color correction mode is not selected, steps S620 to S680 are sequentially executed as in the above embodiment. That is, the determination value E is calculated using both the shape parameter p i and the texture parameter λ k , and each facial expression is determined.

一方、肌色補正モードが選択されている場合には、形状パラメーターpiのみを選択する(ステップS625)。そして、前記実施例と同様にステップS630〜S680を順次実行する。すなわち、形状パラメーターpiのみを使用して判定値Eを算出し、各表情の判定を行っていく。形状パラメーターpiのみを使用して判定値Eすることができるように、判定値設定処理においては形状パラメーターpiのみから表情パラメーターqlを選択するようにしておけばよい。相関係数の絶対値が所定の閾値よりも大きい形状パラメーターpiのみを選択する場合には、形状パラメーターpiとテクスチャーパラメーターλkの双方から表情パラメーターqlを選択する場合よりも表情パラメーターqlの要素数は減少することとなる。そして、前記実施例と同様に形状パラメーターpiとテクスチャーパラメーターλkの双方を使用して前記式(10)の計算をおこなうために必要な情報と、形状パラメーターpiのみを使用して前記式(10)の計算をおこなうために必要な情報とを表情判定情報EMIとして内部メモリー120に格納しておけばよい。 On the other hand, when the skin color correction mode is selected, only the shape parameter p i is selected (step S625). Then, Steps S630 to S680 are sequentially executed as in the above embodiment. That is, the determination value E is calculated using only the shape parameter p i , and each facial expression is determined. As it can be determined value E using only the shape parameter p i, in the determination value setting process it is sufficient to choose a facial expression parameters q l only shape parameter p i. If the absolute value of the correlation coefficient is to select only large shape parameter p i than a predetermined threshold value, the facial expression parameters q than when selecting both from expression parameter q l shape parameters p i and texture parameter lambda k The number of elements of l will decrease. As in the above embodiment, the information necessary for calculating the equation (10) using both the shape parameter p i and the texture parameter λ k and the equation using only the shape parameter p i are used. Information necessary for performing the calculation of (10) may be stored in the internal memory 120 as facial expression determination information EMI.

本変形例で肌色補正モードが指定されている場合には、テクスチャーパラメーターλkを使用することなく表情の判定が行われることとなる。肌色補正モードにおいては、補正前の顔の画素の色彩値が理想的な肌色に補正されるため、補正前の顔の画素の色彩値が表情に相関する色を有していても、印刷結果における表情の印象に与える影響は少ないと考えることができる。そのため、テクスチャーパラメーターλkを使用することなく表情判定を行っても、印刷結果における表情の印象と、判定された表情との相違が生じる可能性は低い。上述したように、テクスチャーパラメーターλkを使用することなく表情判定をおこなう場合、表情パラメーターqlの要素数は減少するため前記式(10)の計算を高速化することができる。 When the skin color correction mode is specified in this modification, the facial expression is determined without using the texture parameter λ k . In the skin color correction mode, the color value of the face pixel before correction is corrected to the ideal skin color, so even if the color value of the face pixel before correction has a color that correlates with the facial expression, the print result It can be considered that there is little influence on the impression of facial expression. Therefore, even if facial expression determination is performed without using the texture parameter λ k , there is a low possibility that a difference between the impression of the facial expression in the print result and the determined facial expression will occur. As described above, when facial expression determination is performed without using the texture parameter λ k , the number of elements of the facial expression parameter q l is reduced, so that the calculation of the equation (10) can be speeded up.

B4.変形例4:
前記実施例においては、判定値Eと比較する閾値を一定としたが、該閾値を状況に応じて変動させるようにしてもよい。例えば、ある形状パラメーターpiやテクスチャーパラメーターλkの値が所定の基準値よりも大きいか否かによって、判定値Eと比較する閾値を切り換えるようにしてもよい。例えば、第1形状ベクトルs1が顔を大きく左または右に振っていることを示している場合には、顔を大きく左または右に振っていない場合よりも判定値Eを下方修正するようにしてもよい。顔を大きく左または右に振っている場合には、各表情の特徴が通常よりも顕著でなくなる場合(例えば表情の変動による口角の変動が、顔振りによって曖昧になる等)には、判定値Eを緩和することが望ましい。
B4. Modification 4:
In the embodiment, the threshold value to be compared with the determination value E is constant, but the threshold value may be varied according to the situation. For example, the threshold value to be compared with the determination value E may be switched depending on whether the value of a certain shape parameter p i or the texture parameter λ k is larger than a predetermined reference value. For example, when the first shape vector s 1 indicates that the face is greatly shaken to the left or right, the determination value E is corrected downward as compared with the case where the face is not greatly shaken to the left or right. May be. When the face is greatly shaken to the left or right, if the characteristics of each facial expression are less noticeable than usual (for example, the variation of the mouth angle due to the facial expression is ambiguous due to the facial swing), the judgment value It is desirable to reduce E.

B5.変形例5:
前記実施例の判定値設定処理においては、各表情との相関係数が上位の形状パラメーターpiとテクスチャーパラメーターλkの要素を表情パラメーターqlの要素として設定することとしたが、見た目の感覚に基づいて表情パラメーターqlの要素を選択するようにしてもよい。
B5. Modification 5:
In the determination value setting process of the embodiment, the elements of the shape parameter p i and the texture parameter λ k having higher correlation coefficients with each expression are set as the elements of the expression parameter q l , but The element of the expression parameter q l may be selected based on the above.

図24は、本変形例において表情パラメーターqlを選択する処理の流れを示すフローチャートである。まず、コンピューターは、形状パラメーターpiとテクスチャーパラメーターλkのうちいずれか1つを選択する(ステップS810)。ここでは、形状パラメーターp1が選択されたものとして以下説明する。次に、コンピューターは、選択した形状パラメーターp1をレンジにおける下限値に設定する(ステップS820)。次に、コンピューターは、選択されなかった形状パラメーターpiとテクスチャーパラメーターλkの各値を0とする(ステップS830)。以上のように設定された形状パラメーターpiとテクスチャーパラメーターλkを、前記式(1a),(2a)に適用しつつアフィン変換を行うことにより、コンピューターは、顔のテクスチャーA(x)を算出する(ステップS840)。 FIG. 24 is a flowchart showing a flow of processing for selecting the facial expression parameter q l in the present modification. First, the computer selects one of the shape parameter p i and the texture parameter λ k (step S810). Here, the following description will be made assuming that the shape parameter p 1 is selected. Next, the computer sets the selected shape parameter p 1 to the lower limit value in the range (step S820). Next, the computer sets each value of the shape parameter p i and the texture parameter λ k not selected to 0 (step S830). The computer calculates the facial texture A (x) by performing the affine transformation while applying the shape parameter p i and the texture parameter λ k set as described above to the equations (1a) and (2a). (Step S840).

そして、コンピューターは、テクスチャーA(x)をディスプレイに表示させる(ステップS850)。次に、コンピューターは、選択した形状パラメーターp1がレンジにおける上限値に達していているか否かを判定し(ステップS860)、達していない場合には選択した形状パラメーターp1の現在の値にレンジの幅の5%を加算して(ステップS865)、ステップS840に戻る。このような処理を繰り返して実行することにより、選択した形状パラメーターp1をレンジの下限値から5%ずつ増加させ、それに応じて変動する顔のテクスチャーA(x)を順次ディスプレイに表示させていくことができる。選択した形状パラメーターp1は顔の振りに対応する特徴量であるため、形状パラメーターp1の変動とともに表示部150に表示される顔の振り角度が変動することとなる。 Then, the computer displays the texture A (x) on the display (step S850). Next, the computer determines whether the shape parameters p 1 selected has been reached the upper limit value in the range (step S860), the current value of the shape parameter p 1 selected. If it is judged range Is added (step S865), and the process returns to step S840. By repeatedly executing such processing, the selected shape parameter p 1 is increased by 5% from the lower limit value of the range, and the facial texture A (x) that fluctuates accordingly is sequentially displayed on the display. be able to. Since the selected shape parameter p 1 is a feature amount corresponding to the swing of the face, the swing angle of the face displayed on the display unit 150 varies with the variation of the shape parameter p 1 .

選択した形状パラメーターp1がレンジにおける上限値に達していている場合には、コンピューターは、選択した形状パラメーターp1を表情パラメーターqlとして採用するか否かを問い合わせる表示をディスプレイにて表示させ、入力装置にてオペレーターの操作を受け付ける(ステップS870)。ここで、採用する旨の操作が受け付けられた場合には、選択した形状パラメーターp1が表情パラメーターqlとして採用される(S880)。次に、すべての形状パラメーターpiとテクスチャーパラメーターλkを選択したか否かを判定し(ステップS890)、すべて選択していない場合には、ステップS810にて次の形状パラメーターpiまたはテクスチャーパラメーターλkを選択する。 If the selected shape parameters p 1 has not reached the upper limit value in the range, the computer may display the display for inquiring whether or not to adopt the shape parameter p 1 selected as the expression parameter q l at the display, The operator's operation is accepted by the input device (step S870). Here, when the operation to adopt is accepted, the selected shape parameter p 1 is adopted as the facial expression parameter q l (S880). Next, it is determined whether or not all shape parameters p i and texture parameters λ k have been selected (step S890). If not all are selected, the next shape parameter p i or texture parameter is determined in step S810. to select the λ k.

以上の処理を実行することにより、オペレーターは形状パラメーターpiとテクスチャーパラメーターλkのそれぞれを個別に変動させた場合の、顔のテクスチャーA(x)の変動をディスプレイにて観察することができ、どれが表情と相関しているかを把握することができる。そして、相関していると感じれば、現在選択されている形状パラメーターpiまたはテクスチャーパラメーターλkの一を表情パラメーターqlとして採用することができる。さらに、オペレーターが相関すると感じた程度を指定する操作を入力装置にて受け付けるようにし、該程度に基づいて重み係数αlを設定するようにしてもよい。 By executing the above processing, the operator can observe the change in the facial texture A (x) on the display when the shape parameter p i and the texture parameter λ k are individually changed. It is possible to grasp which correlates with facial expressions. If it is felt that there is a correlation, one of the currently selected shape parameter p i or texture parameter λ k can be adopted as the expression parameter q l . Further, an operation for designating the degree that the operator feels to be correlated may be accepted by the input device, and the weighting coefficient α l may be set based on the degree.

B6.変形例6:
前記実施例においては、もっとも大きい判定値Eに対応する表情を有していると判定するようにしたが、図19(c)のように喜顔と驚顔の判定値Eが双方とも閾値を超え、かつ、双方の判定値Eが近い値である場合には、双方の表情を有していると判定するようにしてもよい。すなわち、図19(c)のように、2番目に大きい判定値Eと、最大の判定値Eとの差が所定の基準範囲(例えば、最大の判定値Eの10%等。)内であれば、2つの表情が混在していると判定するようにしてもよい。
B6. Modification 6:
In the above embodiment, it is determined that the expression corresponding to the largest determination value E is present. However, as shown in FIG. If both of the determination values E are close to each other, it may be determined that both expressions are present. That is, as shown in FIG. 19C, the difference between the second largest determination value E and the maximum determination value E is within a predetermined reference range (for example, 10% of the maximum determination value E). For example, it may be determined that two facial expressions are mixed.

B7.変形例7:
前記実施例では、特徴点CP初期位置設定処理において、4つのグローバルパラメーター(大きさ、傾き、上下方向の位置、左右方向の位置)のそれぞれについての3段階の値の組み合わせに対応する合計80種類(=3×3×3×3−1)の仮設定位置が予め設定されているが、仮設定位置の設定に用いるパラメーターの種類および数やパラメーター値の段階数は変更可能である。例えば、4つのグローバルパラメーターの内の一部のみが仮設定位置の設定に用いられるとしてもよいし、用いられるパラメーターのそれぞれについて、5段階の値の組み合わせにより仮設置位置が設定されるものとしてもよい。
B7. Modification 7:
In the embodiment, in the feature point CP initial position setting process, a total of 80 types corresponding to combinations of values in three stages for each of the four global parameters (size, inclination, vertical position, and horizontal position). A temporary setting position (= 3 × 3 × 3 × 3-1) is preset, but the type and number of parameters used for setting the temporary setting position and the number of parameter values can be changed. For example, only a part of the four global parameters may be used for setting the temporary setting position, or the temporary setting position may be set by combining five values for each parameter used. Good.

B8.変形例8:
前記実施例の特徴点CP設定位置補正処理では、注目画像OIに基づき平均形状画像I(W(x;p))を算出することにより注目画像OIの特徴点CPの設置位置を平均顔画像A0(x)の特徴点CPの設置位置に整合させているが、平均顔画像A0(x)に対して画像変換をおこなうことにより両者の特徴点CPの配置を整合させるものとしてもよい。すなわち、前記実施例では、「顔領域」としての平均形状画像I(W(x;p))を変化させることとしたが、平均顔画像A0(x)を形状パラメーターpiやテクスチャーパラメーターλkの変化に応じて変化させてもよい。いずれにしても、注目画像OIに含まれる「顔領域」と、顔モデルによって再現される顔の画像との差を小さくさせる形状パラメーターpiやテクスチャーパラメーターλkに補正されることとなる。
B8. Modification 8:
In the feature point CP setting position correction process of the above embodiment, the average shape image I (W (x; p)) is calculated based on the target image OI to determine the installation position of the feature point CP of the target image OI as the average face image A. Although it is matched with the installation position of the feature point CP of 0 (x), the arrangement of both feature points CP may be matched by performing image conversion on the average face image A 0 (x). That is, in the above embodiment, the average shape image I (W (x; p)) as the “face region” is changed, but the average face image A 0 (x) is changed to the shape parameter p i and the texture parameter λ. You may change according to the change of k . In any case, the shape parameter p i and the texture parameter λ k that reduce the difference between the “face region” included in the target image OI and the face image reproduced by the face model are corrected.

B9.変形例9:
前記実施例におけるサンプル画像SI(図3)はあくまで一例であり、サンプル画像SIとして採用する画像の数、種類は任意に設定可能である。また、前記実施例において、特徴点CPの位置で示される顔の所定の特徴部位(図4参照)はあくまで一例であり、実施例において設定されている特徴部位の一部を省略したり、特徴部位として他の部位を採用したりしてもよい。
B9. Modification 9:
The sample image SI (FIG. 3) in the above embodiment is merely an example, and the number and type of images employed as the sample image SI can be arbitrarily set. In the embodiment, the predetermined feature portion (see FIG. 4) of the face indicated by the position of the feature point CP is merely an example, and a part of the feature portion set in the embodiment may be omitted, Other parts may be adopted as the part.

また、前記実施例では、サンプル画像SIwの画素群xのそれぞれにおける輝度値により構成される輝度値ベクトルに対する主成分分析によってテクスチャーモデルが設定されているが、顔画像のテクスチャー(見え)を表す輝度値以外の指標値(例えばRGB値)に対する主成分分析によってテクスチャーモデルが設定されるものとしてもよい。   In the embodiment, the texture model is set by the principal component analysis for the brightness value vector formed by the brightness value in each of the pixel groups x of the sample image SIw, but the brightness representing the texture (appearance) of the face image. The texture model may be set by principal component analysis for index values other than the values (for example, RGB values).

また、前記実施例において、平均顔画像A0(x)のサイズは56画素×56画素に限られず他のサイズであってもよい。また、平均顔画像A0(x)は、マスク領域MA(図8)を含む必要はなく、平均形状領域BSAのみによって構成されるとしてもよい。また、平均顔画像A0(x)の代わりに、サンプル画像SIの統計的分析に基づき設定される他の基準顔画像が用いられるとしてもよい。 In the embodiment, the size of the average face image A 0 (x) is not limited to 56 pixels × 56 pixels, and may be other sizes. Further, the average face image A 0 (x) does not need to include the mask area MA (FIG. 8), and may be configured only by the average shape area BSA. Further, instead of the average face image A 0 (x), another reference face image set based on the statistical analysis of the sample image SI may be used.

また、判定対象の表情は、喜顔と悲顔と驚顔と怒顔に限られるものではなく、困顔や寝顔や焦顔等の表情を判定するようにしてもよい。むろん、前記実施例や変形例において、喜顔と悲顔と驚顔と怒顔のすべてを判定するのではなく、例えば喜顔であるか否かのみを判定するようにしてもよい。   Moreover, the facial expression to be determined is not limited to a happy face, a sad face, a surprised face, and an angry face, and expressions such as a troubled face, a sleeping face, and a dark face may be determined. Of course, in the embodiment and the modified example, it is possible to determine not only all of a happy face, a sad face, a surprised face, and an angry face, but, for example, whether or not it is a happy face.

また、前記実施例では、AAMを用いた形状モデルおよびテクスチャーモデルの設定が行われているが、他のモデル化手法(例えばMorphable Modelと呼ばれる手法やActive Blobと呼ばれる手法)を用いて形状モデルおよびテクスチャーモデルの設定が行われるとしてもよい。   In the embodiment, the shape model and the texture model are set using AAM. However, the shape model and texture model using other modeling methods (for example, a method called Morphable Model or a method called Active Blob) are used. A texture model may be set.

また、前記実施例では、メモリーカードMCに格納された画像が注目画像OIに設定されているが、注目画像OIは例えばネットワークを介して取得された画像であってもよい。また、前記実施例では、画像処理装置としてのプリンター100による画像処理を説明したが、処理の一部または全部がパーソナルコンピューターやデジタルスチルカメラ、デジタルビデオカメラ等の他の種類の画像処理装置により実行されるものとしてもよい。また、プリンター100はインクジェットプリンターに限らず、他の方式のプリンター、例えばレーザプリンターや昇華型プリンターであるとしてもよい。   In the embodiment, the image stored in the memory card MC is set as the attention image OI. However, the attention image OI may be an image acquired via a network, for example. In the above embodiment, image processing by the printer 100 as an image processing apparatus has been described. However, part or all of the processing is executed by another type of image processing apparatus such as a personal computer, a digital still camera, or a digital video camera. It is good also as what is done. The printer 100 is not limited to an ink jet printer, and may be another type of printer such as a laser printer or a sublimation printer.

前記実施例において、ハードウェアによって実現されていた構成の一部をソフトウェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の一部をハードウェアに置き換えるようにしてもよい。   In the embodiment, a part of the configuration realized by hardware may be replaced by 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, etc. It also includes an external storage device fixed to the computer.

100…プリンター、110…CPU、120…内部メモリー、140…操作部、150…表示部、160…印刷機構、170…カードインターフェース、172…カードスロット、200…画像処理部、210…設定部、220…特徴位置検出部、222,242…生成部、224,244…算出部、226,246…補正部、230…顔領域検出部、240…テクスチャー検出部、250…表情判定部、310…表示処理部、320…印刷処理部。   DESCRIPTION OF SYMBOLS 100 ... Printer, 110 ... CPU, 120 ... Internal memory, 140 ... Operation part, 150 ... Display part, 160 ... Printing mechanism, 170 ... Card interface, 172 ... Card slot, 200 ... Image processing part, 210 ... Setting part, 220 ... feature position detection unit, 222, 242 ... generation unit, 224, 244 ... calculation unit, 226, 246 ... correction unit, 230 ... face area detection unit, 240 ... texture detection unit, 250 ... facial expression determination unit, 310 ... display process Part, 320... Print processing part.

Claims (9)

注目画像に含まれる顔の表情を判定する画像処理装置であって、
前記注目画像から顔画像の少なくとも一部を含む画像領域を顔領域として検出する顔領域検出部と、
複数の特徴量に基づいて少なくとも顔の特徴部位の位置を再現する顔モデルを設定する設定部と、
前記顔モデルによって再現される前記特徴部位の位置が、前記顔領域に近似するように前記特徴量を補正する補正部と、
前記補正された前記特徴量に基づいて複数の表情ごとにその表情らしさを示す判定値を算出し、各表情についての判定値を総合して顔の表情を判定する判定部と、を備える画像処理装置。
An image processing apparatus for determining facial expressions included in a noticed image,
A face area detection unit that detects an image area including at least a part of a face image from the attention image as a face area;
A setting unit that sets a face model that reproduces at least the position of a feature part of the face based on a plurality of feature amounts;
A correction unit that corrects the feature amount so that the position of the feature part reproduced by the face model approximates the face region;
A determination unit that calculates a determination value indicating the likelihood of the expression for each of a plurality of facial expressions based on the corrected feature amount, and determines a facial expression by combining the determination values for each expression; apparatus.
前記判定部は、表情らしさを最も強く示す前記判定値に対応する表情を前記顔領域が有すると判定する請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the determination unit determines that the face region has an expression corresponding to the determination value that most strongly indicates the likelihood of expression. 前記特徴量の少なくとも一つは、複数のサンプル画像の前記特徴部位の位置を主成分分析して得られる各主成分の固有ベクトルの係数である請求項1または請求項2のいずれかに記載の画像処理装置。   3. The image according to claim 1, wherein at least one of the feature amounts is a coefficient of an eigenvector of each principal component obtained by principal component analysis of the position of the feature portion of a plurality of sample images. Processing equipment. 前記特徴量の少なくとも一つは、複数のサンプル画像の画素の色彩値を主成分分析して得られる各主成分の固有ベクトルの係数を含む請求項1から請求項3のいずれか一項に記載の画像処理装置。   The at least one of the feature amounts includes a coefficient of an eigenvector of each principal component obtained by principal component analysis of color values of pixels of a plurality of sample images. Image processing device. 異なる時刻に対応付けられた複数の前記注目画像に含まれる顔の複数の表情を順次判定していくにあたり、
前記注目画像について、ある表情を有すると判定された場合、
それより後の時刻に対応付けられた前記注目画素に含まれる当該顔について、当該表情であると判定されなくなるまで、他の表情についての前記判定値の算出および該判定値に基づく判定を行わない請求項1から請求項4のいずれか一項に記載の画像処理装置。
In sequentially determining a plurality of facial expressions included in the plurality of images of interest associated with different times,
When it is determined that the attention image has a certain expression,
Until the face included in the pixel of interest associated with a later time is determined not to be the facial expression, calculation of the determination value for other facial expressions and determination based on the determination value are not performed. The image processing apparatus according to any one of claims 1 to 4.
前記判定部は、前記補正された前記特徴量の少なくとも2つを線形結合した前記判定値と閾値とを比較することにより表情の判定をする請求項1から請求項5のいずれか一項に記載の画像処理装置。   6. The expression according to claim 1, wherein the determination unit determines a facial expression by comparing the determination value obtained by linearly combining at least two of the corrected feature quantities with a threshold value. Image processing apparatus. 注目画像に含まれる顔の表情を判定する画像処理方法であって、
前記注目画像から顔画像の少なくとも一部を含む画像領域を顔領域として検出し、
複数の特徴量に基づいて少なくとも顔の特徴部位の位置を再現する顔モデルを設定し、
前記顔モデルによって再現される前記特徴部位の位置が、前記顔領域に近似するように前記特徴量を補正し、
前記補正された前記特徴量に基づいて複数の表情ごとに判定値を算出し、各表情についての判定値を総合して顔の表情を判定する画像処理方法。
An image processing method for determining a facial expression included in an image of interest,
An image area including at least a part of a face image is detected as a face area from the attention image,
Set a face model that reproduces at least the position of the facial feature based on multiple feature quantities,
Correcting the feature amount so that the position of the feature part reproduced by the face model approximates the face region;
An image processing method for calculating a determination value for each of a plurality of facial expressions based on the corrected feature amount, and determining a facial expression by combining the determination values for each facial expression.
注目画像に含まれる顔の表情を判定する画像処理のための画像処理プログラムであって、
前記注目画像から顔画像の少なくとも一部を含む画像領域を顔領域として検出する顔領域検出機能と、
複数の特徴量に基づいて少なくとも顔の特徴部位の位置を再現する顔モデルを設定する設定機能と、
前記顔モデルによって再現される前記特徴部位の位置が、前記顔領域に近似するように前記特徴量を補正する補正機能と、
前記補正された前記特徴量に基づいて複数の表情ごとに判定値を算出し、各表情についての判定値を総合して顔の表情を判定する判定機能と、をコンピューターに実現させる画像処理プログラム。
An image processing program for image processing for determining a facial expression included in an image of interest,
A face area detection function for detecting, as a face area, an image area including at least a part of a face image from the attention image;
A setting function for setting a face model that reproduces at least the position of a facial feature part based on a plurality of feature amounts;
A correction function for correcting the feature amount so that the position of the feature part reproduced by the face model approximates the face region;
An image processing program for causing a computer to realize a determination function for calculating a determination value for each of a plurality of facial expressions based on the corrected feature amount and determining a facial expression by combining the determination values for each facial expression.
注目画像から顔画像の少なくとも一部を含む画像領域を顔領域として検出する顔領域検出部と、
複数の特徴量に基づいて少なくとも顔の特徴部位の位置を再現する顔モデルを設定する設定部と、
前記顔モデルによって再現される前記特徴部位の位置が、前記顔領域に近似するように前記特徴量を補正する補正部と、
前記補正された前記特徴量に基づいて複数の表情ごとに判定値を算出し、各表情についての判定値を総合して顔の表情を判定する判定部と、
前記注目画像のうち所定の表情であると判定された顔画像を含む前記注目画像を印刷する印刷部とを備える印刷装置。
A face area detection unit that detects an image area including at least a part of a face image from the attention image as a face area;
A setting unit that sets a face model that reproduces at least the position of a feature part of the face based on a plurality of feature amounts;
A correction unit that corrects the feature amount so that the position of the feature part reproduced by the face model approximates the face region;
A determination unit that calculates a determination value for each of a plurality of facial expressions based on the corrected feature amount, and determines a facial expression by combining the determination values for each expression;
A printing apparatus comprising: a printing unit that prints the attention image including a face image determined to have a predetermined facial expression among the attention images.
JP2009123611A 2009-05-21 2009-05-21 Image processing apparatus, image processing method, image processing program, and printer Pending JP2010271956A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009123611A JP2010271956A (en) 2009-05-21 2009-05-21 Image processing apparatus, image processing method, image processing program, and printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009123611A JP2010271956A (en) 2009-05-21 2009-05-21 Image processing apparatus, image processing method, image processing program, and printer

Publications (1)

Publication Number Publication Date
JP2010271956A true JP2010271956A (en) 2010-12-02

Family

ID=43419921

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009123611A Pending JP2010271956A (en) 2009-05-21 2009-05-21 Image processing apparatus, image processing method, image processing program, and printer

Country Status (1)

Country Link
JP (1) JP2010271956A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012155631A (en) * 2011-01-27 2012-08-16 Fujitsu Ltd Facial expression determining program and facial expression determining device
JP2013228847A (en) * 2012-04-25 2013-11-07 Nippon Hoso Kyokai <Nhk> Facial expression analyzing device and facial expression analyzing program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012155631A (en) * 2011-01-27 2012-08-16 Fujitsu Ltd Facial expression determining program and facial expression determining device
JP2013228847A (en) * 2012-04-25 2013-11-07 Nippon Hoso Kyokai <Nhk> Facial expression analyzing device and facial expression analyzing program

Similar Documents

Publication Publication Date Title
JP2010182150A (en) Image processing apparatus for detecting coordinate position of characteristic part of face
JP2010186288A (en) Image processing for changing predetermined texture characteristic amount of face image
JP4799104B2 (en) Information processing apparatus and control method therefor, computer program, and storage medium
JP4799105B2 (en) Information processing apparatus and control method therefor, computer program, and storage medium
US8290278B2 (en) Specifying position of characteristic portion of face image
JP4957463B2 (en) Image processing device
JP2010191592A (en) Image processing apparatus for detecting coordinate position of characteristic portion of face
JP2011053942A (en) Apparatus, method and program for processing image
JP2011060038A (en) Image processing apparatus
JP2010250420A (en) Image processing apparatus for detecting coordinate position of characteristic part of face
JP2010282339A (en) Image processor for correcting position of pupil in eye, image processing method, image processing program and printer
US8781258B2 (en) Image processing apparatus and image processing method
JP2010170184A (en) Specifying position of characteristic portion of face image
US20090285457A1 (en) Detection of Organ Area Corresponding to Facial Organ Image in Image
JP2010244321A (en) Image processing for setting face model showing face image
JP2010271955A (en) Image processing apparatus, image processing method, image processing program, and printer
JP2010176314A (en) Image processor for detecting coordinate position of characteristic site of face
JP2010250419A (en) Image processing device for detecting eye condition
US8031915B2 (en) Image processing device and image processing method
JP4957607B2 (en) Detection of facial regions in images
JP2010244251A (en) Image processor for detecting coordinate position for characteristic site of face
JP2010271956A (en) Image processing apparatus, image processing method, image processing program, and printer
JP2010245721A (en) Face image processing
JP5338887B2 (en) Image processing device
JP2010282340A (en) Image processor, image processing method, image processing program and printer for determining state of eye included in image