JP2010282339A - Image processor for correcting position of pupil in eye, image processing method, image processing program and printer - Google Patents

Image processor for correcting position of pupil in eye, image processing method, image processing program and printer Download PDF

Info

Publication number
JP2010282339A
JP2010282339A JP2009133993A JP2009133993A JP2010282339A JP 2010282339 A JP2010282339 A JP 2010282339A JP 2009133993 A JP2009133993 A JP 2009133993A JP 2009133993 A JP2009133993 A JP 2009133993A JP 2010282339 A JP2010282339 A JP 2010282339A
Authority
JP
Japan
Prior art keywords
eye
image
face
feature amount
pupil
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2009133993A
Other languages
Japanese (ja)
Inventor
Kenji Matsuzaka
健治 松坂
Masaya Usui
雅也 碓井
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 JP2009133993A priority Critical patent/JP2010282339A/en
Publication of JP2010282339A publication Critical patent/JP2010282339A/en
Withdrawn legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide a satisfactory direction of a line of sight in a figure image. <P>SOLUTION: An image processor is provided with: a face region detection part for detecting a face region from an image under consideration; an eye region detection part for detecting an eye region from a face image; an acquisition part for acquiring an eye model for reproducing an eye image while fluctuating the position of the pupil in the eye, based on a featured value; a featured value detection part for detecting the featured value when the eye image to be reproduced by the eye model and the eye region approximate as an approximate featured value; and a correction part for correcting the approximate featured value so that the ideal eye image in which the position of the pupil becomes ideal is reproduced by the eye model; and also for correcting the eye region by the ideal eye image in which the model is reproduced based on the corrected approximate featured value. <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 correct the position of a pupil in an eye.

人物写真において人物の目がカメラを注視していない場合(いわゆるカメラ目線でない場合)がある。このような人物写真は、印刷等を行ったとしても見映えが悪いという問題があった。なお、視線方向に基づいて撮影動作を開始する撮像装置が開示されている。(特許文献1、参照。)。   There are cases in which a person's eyes are not gazing at the camera in a portrait (in other words, not a so-called camera line of sight). Such a human photograph has a problem that it does not look good even if it is printed. Note that an imaging apparatus that starts an imaging operation based on the line-of-sight direction is disclosed. (See Patent Document 1).

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

しかしながら、すでに撮影された人物写真における人物の視線の方向を、見映えが良くなるように補正することはできないという問題があった。
本発明は、前記の課題を解決するためになされたものであり、人物画像における視線方向を良好とする画像処理装置、画像処理方法、画像処理プログラム、および、印刷装置を提供することを目的とする。
However, there has been a problem that the direction of the line of sight of a person in a human photograph that has already been taken cannot be corrected to improve the appearance.
The present invention has been made to solve the above-described problems, and an object of the present invention is to provide an image processing device, an image processing method, an image processing program, and a printing device that improve the line-of-sight direction in a human image. To do.

前記課題の少なくとも一部を解決するために本願発明は以下の態様を採る。すなわち、顔領域検出部は前記注目画像から顔領域を検出し、目領域検出部は前記顔画像から目領域を検出する。さらに、設定部は特徴量に基づいて目における瞳の位置を変動させながら目画像を再現する目モデルを取得する。特徴量検出部は、前記目モデルによって再現される目画像と前記目領域とが近似するときの特徴量を近似特徴量として検出する。さらに、補正部は、前記瞳の位置が理想的となる理想目画像を前記目モデルが再現するように前記近似特徴量を補正し、該補正した前記近似特徴量に基づいて前記モデルが再現する前記理想目画像によって前記目領域を補正する。前記瞳の位置が理想的となる前記理想目画像へと補正されるため、瞳の位置に依存する視線の方向を見映えのよいものに補正することができる。   In order to solve at least a part of the problems, the present invention adopts the following aspects. That is, the face area detection unit detects a face area from the attention image, and the eye area detection unit detects an eye area from the face image. Further, the setting unit acquires an eye model that reproduces the eye image while changing the position of the pupil in the eye based on the feature amount. The feature quantity detection unit detects a feature quantity when the eye image reproduced by the eye model approximates the eye area as an approximate feature quantity. Further, the correction unit corrects the approximate feature amount so that the eye model reproduces an ideal eye image in which the pupil position is ideal, and the model reproduces based on the corrected approximate feature amount. The eye area is corrected by the ideal eye image. Since the ideal eye image is corrected so that the position of the pupil is ideal, the direction of the line of sight depending on the position of the pupil can be corrected.

前記目モデルの好適な一例として、前記取得部が、視線方向が異なる目画像を含む複数のサンプル画像の各画素の色彩値を主成分分析することにより、各主成分の固有ベクトルを線形結合することにより目画像を再現する前記目モデルを取得するようにしてもよい。複数のサンプル画像の各画素の色彩値の主成分分析によれば、瞳の位置に応じた色彩値分布の変動を統計的に解析することができ、瞳の位置のみに強く相関する前記特徴量を得ることができる。従って、例えば瞳の色等の他の特徴を維持したまま、瞳の位置のみを補正することができる。   As a preferred example of the eye model, the acquisition unit linearly combines the eigenvectors of each principal component by performing principal component analysis on the color values of each pixel of a plurality of sample images including eye images with different line-of-sight directions. The eye model that reproduces the eye image may be acquired by the above. According to the principal component analysis of the color values of each pixel of the plurality of sample images, the variation of the color value distribution according to the pupil position can be statistically analyzed, and the feature amount strongly correlated only with the pupil position Can be obtained. Therefore, it is possible to correct only the position of the pupil while maintaining other characteristics such as the color of the pupil.

また、前記顔領域に含まれる顔の振り角度を検出し、該振り角度が所定の範囲内であるときに限り前記目領域を補正するのが望ましい。このようにすることにより、不自然な視線に補正されることが防止できる。例えば、極端に顔が側方に振っているにもかかわらず視線だけがカメラ目線となるようなことが防止できる。   Further, it is desirable to detect a swing angle of a face included in the face area and correct the eye area only when the swing angle is within a predetermined range. By doing so, it is possible to prevent correction to an unnatural line of sight. For example, it is possible to prevent only the line of sight from being a camera line of sight even though the face is extremely swaying to the side.

視線方向の補正の指針の一例として、視線方向を前記注目画像の画像面に対して直角とする補正が挙げられる。このようにすることにより、画像に対して視線方向が正面を向くように補正することができる。視線方向の補正の指針の別の一例として、視線方向を前記顔領域に含まれる顔の正面方向とする補正が挙げられる。例えば、カメラ目線をすべきでないにも拘わらずカメラ目線をしてしまった場面において、正面を見るように補正することができる。視線方向の補正の指針の別の一例として、視線方向が前記注目画像の中央に向くようにする補正が挙げられる。このようにすることにより、多くの場合、前記注目画像の中央に位置するカメラのレンズを注視するように補正することができる。   As an example of a guideline for correcting the line-of-sight direction, there is a correction in which the line-of-sight direction is perpendicular to the image plane of the target image. By doing in this way, it can correct | amend so that a gaze direction may face the front with respect to an image. As another example of the guideline for correcting the gaze direction, there is a correction in which the gaze direction is the front direction of the face included in the face area. For example, it can be corrected to look at the front in a scene where the user has not looked at the camera but has looked at the camera. Another example of the guideline for correcting the line-of-sight direction is correction that causes the line-of-sight direction to face the center of the image of interest. By doing in this way, in many cases, it can correct | amend so that the lens of the camera located in the center of the said attention image may be gazes.

なお、本発明は、種々の態様で実現することが可能であり、例えば、画像処理方法および装置、特徴部位の位置検出方法および装置、表情判定方法および装置、これらの方法または装置の機能を実現するための画像処理プログラム、その画像処理プログラムを記録した記録媒体、そのコンピュータープログラムを含み搬送波内に具現化されたデータ信号、等の形態で実現することができる。   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の構成を概略的に示す説明図である。1 is an explanatory diagram schematically illustrating a configuration of a printer 100 as an image processing apparatus according to an embodiment of the present invention. 実施例におけるAAM設定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the AAM setting process in an 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 p i, 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). 目テクスチャーモデルのためのサンプル画像SIの一例を示す説明図である。It is explanatory drawing which shows an example of sample image SI for an eye texture model. テクスチャーパラメーターと目画像との関係を示すグラフである。It is a graph which shows the relationship between a texture parameter and an eye image. 実施例における顔特徴検出処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the face feature detection process in an 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 an 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 an 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 an eye feature detection process (texture detection process). 平均形状画像から目テクスチャー画像を抽出する様子を示す説明図である。It is explanatory drawing which shows a mode that an eye texture image is extracted from an average shape image. 視線判定・補正処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a gaze determination / correction | amendment process. 角度テーブルを示す図である。It is a figure which shows an angle table. 振り角度θと相対視線角度γとを説明する模式図である。It is a schematic diagram explaining a swing angle θ and a relative line-of-sight angle γ. 瞳の位置が補正される様子を示す図である。It is a figure which shows a mode that the position of a pupil is correct | amended. 変形例にかかる視線判定・補正処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a gaze determination / correction | amendment process concerning a modification. 変形例における理想的な視線軸を説明する模式図である。It is a schematic diagram explaining the ideal visual axis in a modification. 変形例における理想的な視線軸を説明する模式図である。It is a schematic diagram explaining the ideal visual axis 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 is executed by the CPU 110 under a predetermined operating system to perform face feature detection processing, eye feature detection processing, and line-of-sight determination / correction processing. 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と、視線補正部260と、を含んでいる。特徴位置検出部220とテクスチャー検出部240は、それぞれ生成部222,242と、算出部224,244と、補正部226,246と、を含んでいる。これら各部の機能については、後述の顔特徴検出処理および視線判定・補正処理の説明において詳述する。   The image processing unit 200 includes, as program modules, a setting unit 210, a feature position detection unit 220, a face area detection unit 230, a texture detection unit 240, a line-of-sight determination unit 250, and a line-of-sight correction unit 260. Yes. 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 functions of these units will be described in detail in the description of face feature detection processing and line-of-sight determination / correction processing 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 stores AAM information AMI. The AAM information AMI is information set in advance by an AAM setting process described later, and is acquired and used in a face feature detection process and an eye 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 of setting a face shape model, a face texture model, and an eye texture model used for modeling an image called an AAM (Active Appearance Model). 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 eye texture model corresponds to an “eye model” 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 includes face images that are different from each other with respect to various attributes such as personality, race, gender, facial expression, and orientation (front, upward, downward, rightward, leftward, etc.). Prepared. According to these sample images SI, any face image can be accurately modeled by AAM, and accurate face feature detection processing (described later) for any face image can be executed. The sample image SI is also called a learning image. Further, in this specification, the left-right direction indicates the left-right direction based on the subject person.

以下、サンプル群G1に属するサンプル画像SIに対しておこなう処理を例に説明する。サンプル群G1に属するそれぞれのサンプル画像SIに含まれる顔画像に、特徴点CPを設定する(ステップS120)。図4は、サンプル画像SIにおける特徴点CPの設定方法の一例を示す説明図である。特徴点CPは、顔画像における所定の特徴部位の位置を示す点である。本実施例では、所定の特徴部位として、人物の顔における眉毛上の所定位置(例えば端点や4分割点等、以下同じ)、目の輪郭上の所定位置、鼻筋および小鼻の輪郭上の所定位置、上下唇の輪郭上の所定位置、顔の輪郭(フェイスライン)上の所定位置といった68箇所の部位が設定されている。すなわち、本実施例では、人物の顔に共通して含まれる顔の器官(眉毛、目、鼻、口)および顔の輪郭における所定位置を、特徴部位として設定する。図4に示すように、特徴点CPは、各サンプル画像SIにおいてオペレーターにより指定された68個の特徴部位を表す位置に設定(配置)される。このように設定された各特徴点CPは各特徴部位に対応しているため、顔画像における特徴点CPの配置は顔の形状を特定していると表現することができる。   Hereinafter, processing performed on the sample images SI belonging to the sample group G1 will be described as an example. A feature point CP is set to the face image included in each sample image SI belonging to the sample group G1 (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 face 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 face shape model is also referred to as a feature point CP arrangement model.

前記式(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 face 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 face shape model in this embodiment, the face shape s representing the arrangement of the feature points CP is the sum of the average shape s 0 and the linear combination of n shape vectors s i. Modeled. 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 face shape model. Further, as shown in the equation (1b), by appropriately setting the shape parameter p i in the face 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(本実施例では10個とする。)の固有ベクトルを、形状ベクトル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 (the number) selected from the eigenvector corresponding to the principal component having the larger contribution rate in the descending order of the cumulative contribution rate. eigenvectors of that.) and 10 pieces in the embodiment, used as the shape vectors 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.

なお、形状モデル設定ステップ(ステップ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 face 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のそれぞれにおける色彩値(RGB)により構成される色彩値ベクトルに対する主成分分析を行い、顔のテクスチャー(「見え」とも呼ぶ)A(x)を下記の式(2)によりモデル化する。なお、画素群xは、平均形状領域BSAに位置する画素の集合である。
Next, the computer performs a principal component analysis on a color value vector composed of color values (RGB) in each pixel group x of each sample image SIw, and performs facial texture (also referred to as “appearance”) A (x) Is modeled by the following equation (2). The pixel group x is a set of pixels located in the average shape area BSA.

前記式(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 (color 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)の特性を表すベクトルであり、具体的には、主成分分析により得られる第k主成分に対応する固有ベクトルである。すなわち、寄与率のより大きい主成分に対応する固有ベクトルから順に、累積寄与率に基づき設定された個数m(本実施例では4個とする。)の固有ベクトルが、テクスチャーベクトルak(x)として採用される。本実施例では、最も寄与率の大きい第1主成分に対応する第1テクスチャーベクトルA1(x)は、顔色の変化(性別の差とも捉えられる)にほぼ相関するベクトルとなっている。 In the equation (2) representing the face 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 is specifically an eigenvector corresponding to the k-th principal component obtained by principal component analysis. That is, the eigenvectors of the number m (four in this embodiment) set based on the cumulative contribution rate are adopted as the texture vector a k (x) in order from the eigenvector corresponding to the principal component having the larger contribution rate. Is done. 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 face texture model in the present embodiment, the face texture A (x) representing the appearance of the face includes the average face image A 0 (x) and m texture vectors a k ( x) is modeled as the sum of 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 as a weighting coefficient in the face texture model. Conversely, as shown in the equation (2b), by appropriately setting the texture parameter λ k in the face texture model, the facial texture A (x) in every image is changed to the average face image A 0 (x). Inverse transformation can be performed.

なお、テクスチャーモデル設定ステップ(図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の逆変換)をおこなうことにより、あらゆる顔画像の形状およびテクスチャーを再現することが可能である。顔形状モデルと、顔テクスチャーモデルが設定されると、同様の手法によって目モデルとしての目テクスチャーモデルを設定する。 By the processing so far, a face shape model for modeling the face shape and a face texture model for modeling the face texture are set. By combining the set face shape model and the face texture model, that is, conversion from the average shape s 0 to the shape s for the synthesized texture A (x) (inverse conversion of the warp W shown in FIG. 8) By performing the above, it is possible to reproduce the shape and texture of any face image. When the face shape model and the face texture model are set, an eye texture model as an eye model is set by the same method.

目テクスチャーモデルの設定もAAM設定処理(図2)に従って行われる。ただし、目はほぼ平面であると考えることができるため、目についての形状モデルの設定(ステップS130)は実行しない。目テクスチャーモデルを設定するにあたり、オペレーターは、人物の目画像を含んだ複数の画像をサンプル画像SIとして用意する(ステップS110)。図10は、サンプル画像SIの一例を示す説明図である。図4に示すように、サンプル画像SIは、目における瞳の位置(中央、左方向、右方向、上方向、下方向)・瞳の色・赤目(フラッシュの光が網膜にて反射したときの目のことであり、必ずしも色相が赤色であるものに限られない。)といった種々の属性に関して互いに相違する目画像が含まれるように用意される。これらの属性は、各サンプル画像SIに対応づけられている。目テクスチャーモデルのロバスト性を向上させるために、眼鏡を着用した場合のサンプル画像SIも含ませるようにしても良い。これらのサンプル画像SIによれば、AAMによってあらゆる目画像を精度良くモデル化することが可能となり、あらゆる目画像を対象とした精度の良い目特徴検出処理(後述)の実行が可能となる。なお、右目と左目は互いに左右対称にモデル化することができるため、本実施例では右目の目画像のみをモデル化する。   The eye texture model is also set according to the AAM setting process (FIG. 2). However, since the eyes can be considered to be substantially flat, the setting of the shape model for the eyes (step S130) is not executed. In setting the eye texture model, the operator prepares a plurality of images including human eye images as sample images SI (step S110). FIG. 10 is an explanatory diagram showing an example of the sample image SI. As shown in FIG. 4, the sample image SI includes the position of the pupil in the eye (center, left direction, right direction, up direction, down direction), the color of the pupil, and red eyes (when the flash light is reflected by the retina). It is prepared to include eye images that are different from each other with respect to various attributes. These attributes are associated with each sample image SI. In order to improve the robustness of the eye texture model, a sample image SI when wearing eyeglasses may be included. According to these sample images SI, all eye images can be accurately modeled by AAM, and accurate eye feature detection processing (described later) for all eye images can be executed. Since the right eye and the left eye can be modeled symmetrically with each other, only the right eye image is modeled in this embodiment.

瞳の位置や赤目の場合を含めた瞳の色をモデル化することができればよいため、サンプル画像SIにおいて目の形状(目輪郭)のばらつきは小さい方が望ましい。なお、目の形状や大きさについては目輪郭について特徴点CPを設定する顔形状モデルによって検出が可能である。目画像についてのサンプル画像SIは、顔画像についてのサンプル画像SIwから目に対応する画像領域のみを抽出することにより用意されてもよい。サンプル画像SIwは、各サンプル画像SIを、特徴点CPの設定位置が平均形状s0における特徴点CPの設定位置と等しくなるように変形したものであるため、目画像の位置と形状と大きさが一定となる。従って、サンプル画像SIwから一定の位置と形状と大きさの画像領域を抽出することにより、形状と大きさが平均化された目画像についてのサンプル画像SIを得ることができる。本実施例では、右目をモデル化するものとし、左目のサンプル画像SIについては、予め左右反転させておく。 Since it is only necessary to model the pupil color including the position of the pupil and the case of the red eye, it is desirable that the variation in the eye shape (eye contour) is small in the sample image SI. The shape and size of the eyes can be detected by a face shape model that sets feature points CP for the eye contour. The sample image SI for the eye image may be prepared by extracting only the image region corresponding to the eye from the sample image SIw for the face image. Since the sample image SIw is obtained by modifying each sample image SI so that 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 , the position, shape, and size of the eye image Is constant. Accordingly, by extracting an image region having a certain position, shape and size from the sample image SIw, it is possible to obtain a sample image SI for an eye image whose shape and size are averaged. In this embodiment, it is assumed that the right eye is modeled, and the left eye sample image SI is inverted in advance.

目画像についてのサンプル画像SIが用意できると、上述した顔テクスチャーモデルと同様のAAM設定処理をおこなうことにより目テクスチャーモデルを設定する。顔テクスチャーモデルと同様に、前記の(2)式によって目画像のテクスチャーが再現できる。なお、目テクスチャーモデルにおいては、前記の(2)式のA(x)は任意の目画像を示し、A0(x)は平均目画像を示し、ak(x)とλkは顔テクスチャーモデルと同様にテクスチャーベクトルとテクスチャーパラメーターを示す。本実施例では、最も寄与率の大きい第1主成分に対応する第1テクスチャーベクトルa1は瞳の水平方向の位置にほぼ相関するベクトルとなっており、テクスチャーパラメーターλ1を大小することにより、目における瞳の水平方向の位置が変化する。2番目に寄与率の大きい第2主成分に対応する第2テクスチャーベクトルλ2は赤目であるか否かにほぼ相関するベクトルとなっており、テクスチャーパラメーターλ2を大小することにより、赤目らしさが変化する。 When the sample image SI for the eye image can be prepared, the eye texture model is set by performing the AAM setting process similar to the above-described face texture model. Similar to the face texture model, the texture of the eye image can be reproduced by the equation (2). In the eye texture model, A (x) in the equation (2) indicates an arbitrary eye image, A 0 (x) indicates an average eye image, and a k (x) and λ k are face textures. The texture vector and texture parameters are shown as well as the model. In the present embodiment, the first texture vector a 1 corresponding to the first principal component having the largest contribution rate is a vector that is substantially correlated with the horizontal position of the pupil, and by increasing or decreasing the texture parameter λ 1 , The pupil's horizontal position in the eye changes. The second texture vector λ 2 corresponding to the second principal component having the second largest contribution rate is a vector that is substantially correlated with whether or not it is red-eye. By increasing or decreasing the texture parameter λ 2 , the redness-likeness is increased. Change.

図11(a)はテクスチャーパラメーターλ1の値と瞳の(水平)位置との相関を示し、図11(b)はテクスチャーパラメーターλ1,λ2の値と赤目であるか否かの相関を示している。図11(a)において、横軸はテクスチャーパラメーターλ1の値(−1〜1)を示し、縦軸は目における瞳の水平方向の位置を示している。同図に示すように、テクスチャーパラメーターλ1の値が大きければ大きいほど、瞳の位置は内寄り(鼻寄り:右目については左寄り)となり、テクスチャーパラメーターλ1の値が0のとき瞳の位置は内寄りでも外寄りでもない中央(視線が正面方向となるときの瞳の位置)となる。テクスチャーパラメーターλ1の値が小さければ小さいほど、瞳の位置は外寄り(輪郭寄り:右目については右寄り)となる。 FIG. 11A shows the correlation between the value of the texture parameter λ 1 and the (horizontal) position of the pupil, and FIG. 11B shows the correlation between the value of the texture parameter λ 1 and λ 2 and whether or not it is red-eye. Show. In FIG. 11A, the horizontal axis indicates the value (−1 to 1 ) of the texture parameter λ 1 , and the vertical axis indicates the horizontal position of the pupil in the eye. As shown in the figure, the larger the value of the texture parameter λ 1 , the closer the pupil position is to the inside (nose side: left side for the right eye), and when the texture parameter λ 1 value is 0, the pupil position is It is the center that is neither inward nor outward (the position of the pupil when the line of sight is in the front direction). The smaller the value of the texture parameter λ 1 is, the closer the pupil is to the outside (close to the contour: to the right for the right eye).

図11(b)において、横軸と縦軸は、テクスチャーパラメーターλ1,λ2の値(−1〜1)を示している。図11(b)においてテクスチャーパラメーターλ1,λ2をプロットしており、赤目であるものは○で示し、赤目でないものは●で示している。図11(b)に示すように、テクスチャーパラメーターλ2の値が大きくなるほど、赤目であるものが多く分布している。従って、赤目であるか否かはテクスチャーパラメーターλ2に対して正の相関を有することとなる。一方、テクスチャーパラメーターλ1に関しては、赤目であるものと、赤目でないものがほぼ均等に分布しており、相関を有していない。テクスチャーパラメーターλ2の値が大きければ大きいほど赤目らしく、テクスチャーパラメーターλ2の値が小さければ小さいほど赤目らしくなくなる(正常となる)。なお、赤目らしさとは、主として、瞳の中央の瞳孔部分の赤目色の強さ(主として赤みや金色みの強さ)を表すものであり、−1からテクスチャーパラメーターλ2を大きくすると、瞳孔部分の色が瞳本来の色→茶(λ2≒0)→赤→金色に変動する。また、テクスチャーパラメーターλ2には統計的に赤目のサンプル画像SIが有しているテクスチャーの特徴が反映されるため、テクスチャーパラメーターλ2を変化させることにより、瞳孔部分の単純な色以外の特徴も変化する。例えば、赤目になることによって変動する瞳孔部分の色の階調変化も変動することが予測される。 In FIG. 11B, the horizontal axis and the vertical axis indicate the values (−1 to 1 ) of the texture parameters λ 1 and λ 2 . In FIG. 11B, the texture parameters λ 1 and λ 2 are plotted, and those that are red-eye are indicated by ◯, and those that are not red-eye are indicated by ●. As shown in FIG. 11B, the larger the texture parameter λ 2 is, the more red eyes are distributed. Therefore, whether or not it is red-eye has a positive correlation with the texture parameter λ 2 . On the other hand, with respect to the texture parameter λ 1 , red-eye and non-red-eye are distributed almost evenly and have no correlation. Ish larger the eye the greater the value of the texture parameter lambda 2, the value of the texture parameter lambda 2 is not Rashiku smaller red (the normal). Note that the redness is mainly the intensity of the red eye color (mainly the intensity of redness or goldness) of the pupil part at the center of the pupil. When the texture parameter λ 2 is increased from −1, the pupil part Changes from the original color of the pupil to brown (λ 2 ≈0) → red to gold. In addition, the texture parameter λ 2 statistically reflects the texture characteristics of the red-eye sample image SI. Therefore, by changing the texture parameter λ 2 , characteristics other than the simple color of the pupil part can be obtained. Change. For example, it is predicted that the gradation change of the color of the pupil portion that changes due to the red eye also changes.

本実施例において、赤目のサンプル画像SIと、赤目でないサンプル画像SIの個数を同等とすることにより、テクスチャーパラメーターλ2が0となるとき、瞳孔の色は赤目であるとも正常であるとも言えない濃い茶色を示すこととなる。瞳における瞳孔の外側の虹彩部分の色については、赤目であるか否かに応じた色の変動が少なく、当該成分の変動は3,4番目に寄与率の大きい第3,4主成分に対応する第3,4テクスチャーベクトルa3,4にほぼ相関することとなる。本実施例では、第4主成分(m=4)までを使用することとするが、第5主成分以降は瞳の大きさや瞳の上下位置等に対応する成分となる。なお、第3,4テクスチャーベクトルa3,4によって変動する色彩値の色相方向が互いに異なっている。例えば、第3テクスチャーベクトルa3はR軸に沿って色彩値が変動し、第4テクスチャーベクトルaはB軸に沿って色彩値が変動する。 In the present embodiment, when the texture parameter λ 2 is 0 by equalizing the number of red-eye sample images SI and non-red-eye sample images SI, it cannot be said that the pupil color is red-eye or normal. It will show a dark brown color. As for the color of the iris part outside the pupil of the pupil, there is little color variation depending on whether it is red-eye or not, and the variation of the component corresponds to the third and fourth principal components with the third largest contribution ratio The third and fourth texture vectors a 3 and a 4 are substantially correlated. In this embodiment, the fourth principal component (m = 4) is used, but the fifth and subsequent principal components are components corresponding to the size of the pupil, the vertical position of the pupil, and the like. Note that the hue directions of the color values that vary depending on the third and fourth texture vectors a 3 and a 4 are different from each other. For example, the color value of the third texture vector a 3 varies along the R axis, and the color value of the fourth texture vector a 4 varies along the B axis.

なお、目テクスチャーモデルについてのテクスチャーモデル設定ステップ(図2のステップS140)において設定された平均目画像A0(x)およびテクスチャーベクトルak(x)は、AAM情報AMI(図1)としてプリンター100の内部メモリー120に格納される。コンピューターはAAM情報AMIをいずれかの記録媒体に記録しておき、プリンター100の製造時において該記録媒体から読み出したAAM情報AMIを記録した内部メモリー120をプリンター100に組み込むか、プリンター100に組み込むまれた内部メモリー120に対して該記録媒体から読み出したAAM情報AMIを記録させる。顔特徴検出処理と目特徴検出処理を実行するにあたり、プリンター100において、内部メモリー120から目モデルとしてのAAM情報AMIを取得するCPUは本発明の「取得部」に相当する。 The average eye image A 0 (x) and the texture vector a k (x) set in the texture model setting step (step S140 in FIG. 2) for the eye texture model are the printer 100 as AAM information AMI (FIG. 1). Stored in the internal memory 120. 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. In executing the facial feature detection process and the eye feature detection process, the CPU that acquires the AAM information AMI as the eye model from the internal memory 120 in the printer 100 corresponds to the “acquisition unit” of the present invention.

A3.顔特徴検出処理:
図12は、実施例における顔特徴検出処理の流れを示すフローチャートである。本実施例における顔特徴検出処理は、AAM(顔モデル(顔形状モデル))を利用して注目画像に含まれる顔画像における特徴点CPの配置を決定する特徴点CP設定位置補正処理(ステップS250)により、顔画像における特徴部位の位置を検出する処理である。上述したように、本実施例では、AAM設定処理(図2)において、人物の顔の器官(眉毛、目、鼻、口)および顔の輪郭における計68箇所の所定位置が、特徴部位として設定されている(図4参照)。そのため、本実施例の顔特徴検出処理では、人物の顔の器官および顔の輪郭における所定位置を示す68個の特徴点CPの配置が決定される。
A3. Face feature detection processing:
FIG. 12 is a flowchart illustrating a flow of face feature detection processing in the embodiment. The face feature detection process in the present embodiment is a feature point CP setting position correction process (step S250) that uses AAM (face model (face shape model)) to determine the arrangement of the feature points CP in the face image included in the target image. ) To detect the position of the characteristic part in the face image. 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).

図13は、注目画像OIにおける顔領域FAの検出結果の一例を示す説明図である。図13には、注目画像OIにおいて検出された顔領域FAが示されている。本実施例では、おおよそ、顔の上下方向は額から顎まで、左右方向は両耳の外側まで含む矩形の領域が顔領域FAとして検出されるような顔検出手法が用いられている。   FIG. 13 is an explanatory diagram illustrating an example of the detection result of the face area FA in the target image OI. FIG. 13 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)。図14は、本実施例における特徴点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. 14 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).

図15は、グローバルパラメーターの値を変更することによる特徴点CPの仮設定位置の一例を示す説明図である。図15(a)および図15(b)には、注目画像OIにおける特徴点CPおよび特徴点CPをつないで形成されるメッシュが示されている。設定部210は、図15(a)および図15(b)の中央に示すように、顔領域FAの中央部に平均形状s0が形成されるような特徴点CPの仮設定位置(以下、「基準仮設定位置」とも呼ぶ)を設定する。 FIG. 15 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. FIGS. 15A and 15B 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. 15 (a) and 15 (b), the setting unit 210 temporarily sets the feature points CP (hereinafter referred to as the feature points CP) such that the average shape s 0 is formed in the center of the face area FA. (Also referred to as “reference temporary setting position”).

設定部210は、また、基準仮設定位置に対して、グローバルパラメーターの値を種々変更させた複数の仮設定位置を設定する。グローバルパラメーター(大きさ、傾き、上下方向の位置および左右方向の位置)を変更することは、注目画像OIにおいて特徴点CPにより形成されるメッシュが拡大・縮小、傾きを変更、並行移動することに相当する。従って、設定部210は、図15(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. 15A, the setting unit 210 forms a temporary setting position (below the reference temporary setting position diagram and a temporary setting position that forms a mesh obtained by enlarging or reducing the mesh at the reference temporary setting position at a predetermined magnification. 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).

また、図15(b)に示すように、設定部210は、基準仮設定位置のメッシュを所定量だけ上または下に並行移動したメッシュを形成するような仮設定位置(基準仮設定位置の図の上および下に示す)や、左または右に並行移動したメッシュを形成するような仮設定位置(基準仮設定位置の図の左および右に示す)を設定する。また、設定部210は、基準仮設定位置のメッシュに対して、上下および左右の並行移動を組み合わせた変換を行ったメッシュを形成するような仮設定位置(基準仮設定位置の図の左上、左下、右上、右下に示す)も設定する。   Further, as shown in FIG. 15B, the setting unit 210 forms a temporary setting position (a reference temporary setting position diagram) that forms a mesh that is translated up or down by a predetermined amount from the mesh at the reference temporary setting position. 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は、図15(a)に示す基準仮設定位置以外の8つの仮設定位置のそれぞれにおけるメッシュに対して図15(b)に示す上下左右の並行移動が実行される仮設定位置も設定する。従って、本実施例では、4つのグローバルパラメーター(大きさ、傾き、上下方向の位置、左右方向の位置)をそれぞれ既知の3段階の値として組み合わせにより設定される80通り(=3×3×3×3−1)の仮設定位置と、基準仮設定位置の合計81通りの仮設定位置が設定される。   The setting unit 210 also has temporary setting positions at which the parallel movement shown in FIG. 15B is performed on 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)。図16は、平均形状画像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. 16 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(図15参照)によって平均形状領域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 area BSA (area surrounded by the feature points CP located on the outer periphery) is specified by the feature points CP (see FIG. 15) arranged in the attention image OI, and the average shape area in the attention image OI is specified. 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))と表される。図16には、図15(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 the color values in each of the pixel groups W (x; p) in the average shape region BSA of the target image OI, it is expressed as I (W (x; p)). FIG. 16 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 a difference image Ie between the average shape image I (W (x; p)) corresponding to each temporarily set position and the average face image A 0 (x) (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)。ノルムを算出するための画素値は色彩値であってもよいし輝度値であってもよい。以上により特徴点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 color value or a luminance 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).

特徴点CP初期位置設定処理が完了すると、特徴位置検出部220(図1)は、注目画像OIにおける特徴点CPの設定位置の補正をおこなう(ステップS250)。図17は、本実施例における特徴点CP設定位置補正処理の流れを示すフローチャートである。   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. 17 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初期位置設定処理(図14)において決定された値が設定されている。また、このときの特徴点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. 14). 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.

式(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).


補正部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.

図17のステップS410からS460までの処理が繰り返し実行されると、注目画像OIにおける各特徴部位に対応する特徴点CPの位置、実際の特徴部位の位置に全体として近づいていき、ある時点で収束判定(ステップS430)において収束したと判定される。収束判定において収束したと判定されると、顔特徴検出処理が完了する(ステップS470)。このとき設定されているグローバルパラメーターおよび形状パラメーターpiの値により特定される特徴点CPの設定位置が、最終的な注目画像OIにおける特徴点CPの設定位置として特定される。 When the processing from step S410 to step S460 in FIG. 17 is repeatedly performed, 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.

図18は、特徴点CP設定位置補正処理の結果の一例を示す説明図である。図18には、注目画像OIにおいて最終的に特定された特徴点CPの設定位置が示されている。特徴点CPの設定位置により、注目画像OIに含まれる顔の特徴部位(人物の顔の器官(眉毛、目、鼻、口)および顔の輪郭における所定位置)の位置が特定されるため、注目画像OIにおける人物の顔の器官の形状・位置や顔の輪郭形状の検出が可能となる。注目画像OIにおいて最終的に特定された特徴点CPの位置およびグローバルパラメーターおよび形状パラメーターpiは内部メモリー120に記憶しておく。 FIG. 18 is an explanatory diagram illustrating an example of a result of the feature point CP setting position correction process. FIG. 18 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. The position of the feature point CP finally specified in the target image OI, the global parameter, and the shape parameter p i are stored in the internal memory 120.

A4.目特徴検出処理:
図19は、目特徴検出処理(テクスチャー検出処理)の流れを示すフローチャートである。目特徴検出処理は、テクスチャー検出部240が目テクスチャーモデルを使用してテクスチャーパラメーターλkを補正する処理によって構成される。顔特徴検出処理では目の形状や位置が特定されるが、目特徴検出処理では目のテクスチャーが特定される。テクスチャー検出処理を実行するテクスチャー検出部240は、特許請求の範囲における「特徴量検出部」に相当する。
A4. Eye feature detection processing:
FIG. 19 is a flowchart showing the flow of eye feature detection processing (texture detection processing). The eye feature detection process includes a process in which the texture detection unit 240 corrects the texture parameter λ k using the eye texture model. In the face feature detection process, the shape and position of the eyes are specified. In the eye feature detection process, the texture of the eyes is specified. The texture detection unit 240 that executes the texture detection process corresponds to a “feature amount detection unit” in the claims.

生成部242(図1)は、注目画像OIから平均形状画像I(W(x;p))を算出する(ステップS510)。平均形状画像I(W(x;p))の算出方法は、特徴点CP初期位置設定処理におけるステップS320、および、特徴点CP設定位置補正処理におけるステップS410と同様であるが、特徴点CP設定位置補正処理完了時のグローバルパラメーターおよび形状パラメーターpiの値を使用して平均形状画像I(W(x;p))が算出される。ここで算出される平均形状画像I(W(x;p))は、ステップS430において、収束判定がなされたときの平均形状画像I(W(x;p))と同じである。次に、生成部242(図1)は、平均形状画像I(W(x;p))から右目の目領域を検出し、該目領域の画像を平均形状目画像AI(x)として抽出する(ステップS515)。右目の目領域を検出する生成部242は、特許請求の範囲における「目領域検出部」に相当する。 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. The average shape image I (W (x; p)) calculated here is the same as the average shape image I (W (x; p)) when the convergence determination is made in step S430. Next, the generating unit 242 (FIG. 1) detects the right eye region from the average shape image I (W (x; p)), and extracts the image of the eye region as the average shape eye image AI (x). (Step S515). The generating unit 242 that detects the eye region of the right eye corresponds to an “eye region detecting unit” in the claims.

図20は、平均形状画像I(W(x;p))から平均形状目画像AI(x)を抽出する様子を示している。上述したとおり、平均形状画像I(W(x;p))における目の位置および形状は、平均顔画像A0(x)における目の位置および形状と同じとなる。注目画像OIの顔画像を平均化するようなグローバルパラメーターおよび形状パラメーターpiが顔特徴検出処理によって検出されているからである。本実施例では、平均顔画像A0(x)における左右の目の領域を示す平均目領域Q1,Q2を特定する座標情報が内部メモリー120に登録してあり、該座標情報を読み出して平均形状画像I(W(x;p))から平均目領域Q1に対応する画素を抽出することにより、平均形状目画像AI(x)を抽出する。目の全体的な位置や形状は平均化されているものの、平均形状目画像AI(x)における瞳の位置や色については平均化されておらず、注目画像OIに含まれる目の個性が残存していることとなる。 FIG. 20 shows how the average shape eye image AI (x) is extracted from the average shape image I (W (x; p)). As described above, the eye position and shape in the average shape image I (W (x; p)) are the same as the eye position and shape in the average face image A 0 (x). Global parameters and shape parameters p i as averaging the facial image of the target image OI is from being detected by the face feature detection process. In this embodiment, coordinate information specifying the average eye areas Q1 and Q2 indicating the left and right eye areas in the average face image A 0 (x) is registered in the internal memory 120, and the coordinate information is read out to obtain the average shape. An average shape eye image AI (x) is extracted by extracting pixels corresponding to the average eye region Q1 from the image I (W (x; p)). Although the overall position and shape of the eyes are averaged, the positions and colors of the pupils in the average shape eye image AI (x) are not averaged, and the individuality of the eyes included in the target image OI remains. Will be doing.

次に、平均形状目画像AI(x)を構成する各画素の色彩値を目テクスチャーモデル(下記の式(6))によって変化させた目テクスチャー画像J(T(x;λ))を算出する(ステップS517)。

前記の式(6)の右辺は、前記の式(2b)の右辺におけるテクスチャーA(x)に平均形状目画像AI(x)を代入したものであり、テクスチャーパラメーターλkが適切に設定されれば前記の式(2b)の左辺が示すように、右辺が平均目画像A0(x)と等しくなる。ここでは、前記の式(6)の右辺によって得られる画像を、目テクスチャー画像J(T(x;λ))と表記する。最初の段階では、テクスチャーパラメーターλkの値を適当な値(例えば、すべて0とする。)に設定する。
Next, an eye texture image J (T (x; λ)) in which the color value of each pixel constituting the average shape eye image AI (x) is changed by an eye texture model (the following equation (6)) is calculated. (Step S517).

The right side of the equation (6) is obtained by substituting the average shape eye image AI (x) for the texture A (x) on the right side of the equation (2b), and the texture parameter λ k is appropriately set. For example, as indicated by the left side of Equation (2b), the right side is equal to the average eye image A 0 (x). Here, an image obtained by the right side of the above equation (6) is represented as an eye texture image J (T (x; λ)). In the first stage, the value of the texture parameter λ k is set to an appropriate value (for example, all 0).

次に、算出部244は、目テクスチャー画像J(T(x;λ))と平均目画像A0(x)との差分画像Ieを算出する(ステップS520)。テクスチャー検出部240は、差分画像Ieに基づき、テクスチャー検出処理が収束したか否かを判定する(ステップS530)。すなわち、目テクスチャー画像J(T(x;λ))と平均目画像A0(x)とが十分に近似したか否かを判定する。テクスチャー検出部240は、差分画像Ieのノルムを算出し、ノルムの値が予め設定された閾値より小さい場合には収束したと判定し、ノルムの値が閾値以上の場合には未だ収束していないと判定する。なお、テクスチャー検出部240は、算出された差分画像Ieのノルムの値が前回のステップS530において算出された値よりも小さい場合には収束したと判定し、前回値以上である場合には未だ収束していないと判定するものとしてもよい。ここにおける収束の判定は、特徴点CP設定位置補正処理におけるステップS430と同様の手法によりおこなうことができる。 Next, the calculation unit 244 calculates a difference image Ie between the eye texture image J (T (x; λ)) and the average eye 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). That is, it is determined whether or not the eye texture image J (T (x; λ)) and the average eye image A 0 (x) are sufficiently approximated. 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個(m=4)のテクスチャーパラメーターλ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 the amount of change in the value of m (m = 4) texture parameters λ k (k = 1 to an integer of m) that are feature amounts. 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.

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

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 of the update matrix U is equal to the texture parameter λ k (m), and the number of columns N is equal to the number of pixels in the average eye areas Q1 and Q2. The update matrix U is calculated by the following formulas (8) and (9).

補正部246(図1)は、算出されたパラメーター更新量ΔΛに基づきテクスチャーパラメーターλkを更新する(ステップS560)。これにより、目のテクスチャーA(x)が補正される。すなわち、補正部246は、差分画像Ieのノルムが小さくなるように補正する。パラメーターの更新の後には、再度、補正されたテクスチャーパラメーターλkに基づいて目テクスチャー画像J(T(x;λ))の算出(ステップS517)、差分画像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 texture A (x) of the eye 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 eye texture image J (T (x; λ)) is calculated again based on the corrected texture parameter λ k (step S517), 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). .

図19のステップS520からS560までの処理が繰り返し実行されると、補正されたテクスチャーパラメーターλkを前記の(2a)式に適用したときの目のテクスチャーA(x)の各画素の色彩値が、実際の目画像の色彩値に全体として近づいていき、ある時点で収束判定(ステップS530)において収束したと判定される。収束判定において収束したと判定されると、右目のテクスチャー検出処理が完了し、このとき設定されているテクスチャーパラメーターλkの値により特定される目のテクスチャーA(x)が最終的な右目の見えとして特定される。次に、両目についてのテクスチャー検出処理が完了したか否かを判定する(ステップS570)。 When the processing from steps S520 to S560 in FIG. 19 is repeatedly performed, the color value of each pixel of the texture A (x) of the eye when the corrected texture parameter λ k is applied to the equation (2a) is obtained. Then, it approaches the color value of the actual eye image as a whole, and it is determined at a certain point in time that the convergence is determined in the convergence determination (step S530). When it is determined in the convergence determination that the right eye has been converged, the right eye texture detection process is completed, and the eye texture A (x) specified by the value of the texture parameter λ k set at this time is the final right eye appearance. Identified as Next, it is determined whether or not the texture detection process for both eyes has been completed (step S570).

完了していない場合には、生成部242が平均形状画像I(W(x;p))から平均目領域Q2に対応する画素を抽出し、左右反転させた上で、目テクスチャー画像J(T(x;λ))として抽出する(ステップS580)。そして、ステップS520に戻り、左目についてのテクスチャー検出処理(ステップS520からS560)を実行する。なお、目テクスチャー画像J(T(x;λ))を反転させておくことにより、右目についての目テクスチャーモデルを使用することができる。収束判定(ステップS530)において収束したと判定されると、左目のテクスチャー検出処理が完了し、このとき設定されているテクスチャーパラメーターλkの値により特定される目のテクスチャーA(x)が最終的な左目の見えとして特定される。以上のようにして右目と左目のテクスチャーパラメーターλkが得られると、目特徴検出処理が完了し、次に視線判定・補正処理を実行する。なお、最終的に得られた右目と左目のテクスチャーパラメーターλkは、特許請求の範囲の「近似特徴量」に相当する。 If not completed, the generation unit 242 extracts pixels corresponding to the average eye area Q2 from the average shape image I (W (x; p)), and performs left-right inversion, and then the eye texture image J (T (X; λ)) is extracted (step S580). Then, the process returns to step S520, and the texture detection process (steps S520 to S560) for the left eye is executed. Note that the eye texture model for the right eye can be used by inverting the eye texture image J (T (x; λ)). If it is determined in the convergence determination (step S530) that the left eye has been converged, the left eye texture detection process is completed, and the eye texture A (x) specified by the value of the texture parameter λ k set at this time is finally obtained. Identified as a left eye appearance. When the texture parameters λ k of the right eye and the left eye are obtained as described above, the eye feature detection process is completed, and then the gaze determination / correction process is executed. The finally obtained right-eye and left-eye texture parameters λ k correspond to “approximate feature amounts” in the claims.

A5.視線判定・補正処理:
図21は、視線判定・補正処理の流れを示すフローチャートである。まず、視線判定部250が右目の瞳の位置に相関するテクスチャーパラメーターλ1と、顔の振りに相関する形状パラメーターp1を取得する(ステップS610)。視線判定部250は、内部メモリー120に記憶された角度テーブルT(図1)を読み出す(ステップS615)。
A5. Eye gaze determination / correction processing:
FIG. 21 is a flowchart showing the flow of the line-of-sight determination / correction process. First, the line-of-sight determination unit 250 acquires a texture parameter λ 1 that correlates with the position of the pupil of the right eye and a shape parameter p 1 that correlates with face swing (step S610). The line-of-sight determination unit 250 reads the angle table T (FIG. 1) stored in the internal memory 120 (step S615).

図22は、角度テーブルTを示している。角度テーブルTにおいては、形状パラメーターp1の値と顔の振り角度θとの対応関係と、テクスチャーパラメーターλ1の値と相対視線角度γとの対応関係とが規定されている。このような角度テーブルTを参照して、視線判定部250は、注目画像OIに存在する顔の振り角度θと目の相対視線角度γとを取得することができる。 FIG. 22 shows the angle table T. In the angle table T, a correspondence relationship between the value of the shape parameter p 1 and the face swing angle θ and a correspondence relationship between the value of the texture parameter λ 1 and the relative line-of-sight angle γ are defined. With reference to such an angle table T, the line-of-sight determination unit 250 can acquire the face swing angle θ and the eye relative line-of-sight angle γ existing in the target image OI.

図23は、振り角度θと相対視線角度γとを説明する模式図である。同図においては、注目画像OIがデジタルスチルカメラDSCによって人物を撮影する様子を、人物の頭上から見た状態を示している。デジタルスチルカメラDSCの中央光軸CAに直交する方向に注目画像OIの画像面IPが形成されることとなる。振り角度θは、中央光軸CAに対して顔の正面軸FAがなす角度(大きさが0〜90度)であり、右振りを正とし、左振りを負とするように定義される。なお、顔の振りが大きくなる顔検出が正常に行われないため、振り角度θの絶対値の最大値は90度よりも小さい値となる。一方、相対視線角度γは、顔の正面軸FAに対して視線軸VAがなす角度であり、右振りを正とし、左振りを負とするように定義される。テクスチャーパラメーターλ1は、グローバルパラメーターおよび形状パラメーターpiの値を使用して正面を向くように平均化された平均形状画像I(W(x;p))に基づいて検出されているため、正面軸FAを基準とした相対視線角度γに対応することとなる。なお、右目の視線軸VAと左目の視線軸VAの方向は一致すると考えることができる。従って、本実施例では左目についての相対視線角度γの特定はおこなわないこととしている。 FIG. 23 is a schematic diagram illustrating the swing angle θ and the relative line-of-sight angle γ. In the figure, the state in which the target image OI is photographed by the digital still camera DSC is viewed from the head of the person. An image plane IP of the target image OI is formed in a direction orthogonal to the central optical axis CA of the digital still camera DSC. The swing angle θ is an angle formed by the face front axis FA with respect to the central optical axis CA (size is 0 to 90 degrees), and is defined such that right swing is positive and left swing is negative. In addition, since the face detection in which the face shake becomes large is not normally performed, the maximum absolute value of the swing angle θ is a value smaller than 90 degrees. On the other hand, the relative line-of-sight angle γ is an angle formed by the line-of-sight axis VA with respect to the face front axis FA, and is defined such that right-handed swing is positive and left-handed swing is negative. Since the texture parameter λ 1 is detected based on the average shape image I (W (x; p)) averaged to face the front using the values of the global parameter and the shape parameter p i , This corresponds to the relative viewing angle γ with respect to the axis FA. Note that it can be considered that the directions of the right eye axis VA and the left eye axis VA coincide. Therefore, in this embodiment, the relative line-of-sight angle γ for the left eye is not specified.

振り角度θと相対視線角度γとが得られたら、視線判定部250は振り角度θと相対視線角度γとを足し合わせることにより、中央光軸CAに対する視線軸VAの角度を意味する絶対視線角度φを算出する(ステップS620)。次に、視線判定部250は、絶対視線角度φが所定の閾値(本実施例では10度)よりも大きいか否かを判定し(ステップS630)、絶対視線角度φが閾値よりも大きい場合には、視線補正部260は、絶対視線角度φを0とするような相対視線角度γに補正する補正角度ηを算出する(ステップS635)。具体的には、振り角度θと相対視線角度γと補正角度ηとを足し合わせた値が0となるような補正角度η(=0−θ−γ)を算出すればよい。次に、視線補正部260は、もとの相対視線角度γと補正角度ηとの和を理想視線角度ε(=γ+η)として算出し(ステップS638)、角度テーブルTを参照して相対視線角度γの値が理想視線角度εと対応するテクスチャーパラメーターλ1を取得する(ステップS640)。 When the swing angle θ and the relative line-of-sight angle γ are obtained, the line-of-sight determination unit 250 adds the swing angle θ and the relative line-of-sight angle γ to obtain an absolute line-of-sight angle that means the angle of the line of sight axis VA with respect to the central optical axis CA. φ is calculated (step S620). Next, the line-of-sight determination unit 250 determines whether or not the absolute line-of-sight angle φ is larger than a predetermined threshold (10 degrees in the present embodiment) (step S630), and when the absolute line-of-sight angle φ is larger than the threshold. The line-of-sight correction unit 260 calculates a correction angle η that corrects the relative line-of-sight angle γ so that the absolute line-of-sight angle φ is 0 (step S635). Specifically, a correction angle η (= 0−θ−γ) may be calculated such that a value obtained by adding the swing angle θ, the relative line-of-sight angle γ, and the correction angle η is zero. Next, the line-of-sight correction unit 260 calculates the sum of the original relative line-of-sight angle γ and the correction angle η as an ideal line-of-sight angle ε (= γ + η) (step S638), and refers to the angle table T to determine the relative line-of-sight angle. The texture parameter λ 1 corresponding to the value of γ and the ideal viewing angle ε is acquired (step S640).

理想視線角度εとなるテクスチャーパラメーターλ1が取得できると、視線補正部260は、目特徴検出処理によって最終的に得られた右目についてのテクスチャーパラメーターλkのうちテクスチャーパラメーターλ1のみを該取得したテクスチャーパラメーターλ1へと補正する(ステップS645)。そして、視線補正部260は、他のテクスチャーパラメーターλkの値は変更することなく、目テクスチャーモデル((2b)式)にテクスチャーパラメーターλkを代入し、右目のテクスチャーA(x)を算出する(ステップS650)。算出された右目のテクスチャーA(x)においては、補正されたテクスチャーパラメーターλ1に応じて瞳の位置が補正されることとなる。 When the texture parameter λ 1 having the ideal line-of-sight angle ε can be acquired, the line-of-sight correction unit 260 acquires only the texture parameter λ 1 from the texture parameter λ k for the right eye finally obtained by the eye feature detection process. The texture parameter λ 1 is corrected (step S645). Then, the line-of-sight correction unit 260 calculates the texture A (x) of the right eye by substituting the texture parameter λ k into the eye texture model (formula (2b)) without changing the values of the other texture parameters λ k. (Step S650). In the calculated texture A (x) of the right eye, the position of the pupil is corrected according to the corrected texture parameter λ 1 .

図24は、本実施例において目の瞳の位置が補正される様子(ステップS645〜S690)を示している。ステップS650にて算出される右目のテクスチャーA(x)は、特許請求の範囲の「理想目画像」に相当する。次に、視線補正部260は、算出された右目のテクスチャーA(x)によって、平均形状画像I(W(x;p))における平均目領域Q1に対応する領域を置き換える(S655)。以上の処理により、平均形状画像I(W(x;p))の右目の視線軸VAが画像面IPに直交するように補正されたこととなる。   FIG. 24 shows how the eye pupil position is corrected in this embodiment (steps S645 to S690). The texture A (x) of the right eye calculated in step S650 corresponds to an “ideal eye image” in the claims. Next, the line-of-sight correction unit 260 replaces the area corresponding to the average eye area Q1 in the average shape image I (W (x; p)) with the calculated texture A (x) of the right eye (S655). Through the above processing, the visual axis VA of the right eye of the average shape image I (W (x; p)) is corrected so as to be orthogonal to the image plane IP.

引き続き、視線補正部260は左目について同様の処理を行う。視線補正部260は、右目についての補正角度ηの符号を反転させることにより、左目についての補正角度−ηを取得する(ステップS660)。右目の視線軸VAと左目の視線軸VAの方向は一致させる必要があるため、右目について補正角度ηだけ補正した場合には、左目については補正角度−ηだけ補正する必要があるからである。例えば、右目について補正角度ηに対応する量だけ内寄り(鼻寄り)に瞳の位置を補正した場合には、同時に左目については補正角度ηに対応する量だけ外寄り(顔の輪郭寄り)に瞳の位置を補正する必要がある。次に、視線補正部260は、相対視線角度γと補正角度−ηとの和を理想視線角度ε(=γ−η)として算出し(ステップS663)、角度テーブルTを参照して相対視線角度γの値が理想視線角度εに対応するテクスチャーパラメーターλ1を取得する(ステップS665)。このようにしてテクスチャーパラメーターλ1が取得できると、視線補正部260は、目特徴検出処理によって最終的に得られた左目についてのテクスチャーパラメーターλkのうち瞳の位置に相関するテクスチャーパラメーターλ1を該取得したテクスチャーパラメーターλ1に補正する(ステップS670)。 Subsequently, the line-of-sight correction unit 260 performs the same process on the left eye. The line-of-sight correction unit 260 obtains the correction angle −η for the left eye by inverting the sign of the correction angle η for the right eye (step S660). This is because the directions of the right-eye viewing axis VA and the left-eye viewing axis VA need to coincide with each other, and when the right eye is corrected by the correction angle η, the left eye needs to be corrected by the correction angle −η. For example, when the pupil position is corrected inward (nose) by an amount corresponding to the correction angle η for the right eye, at the same time, the left eye is outward (close to the face contour) by an amount corresponding to the correction angle η. It is necessary to correct the pupil position. Next, the line-of-sight correction unit 260 calculates the sum of the relative line-of-sight angle γ and the correction angle −η as an ideal line-of-sight angle ε (= γ−η) (step S663), and refers to the angle table T to determine the relative line-of-sight angle. The texture parameter λ 1 corresponding to the value of γ corresponding to the ideal viewing angle ε is acquired (step S665). When the texture parameter λ 1 can be acquired in this manner, the line-of-sight correction unit 260 determines the texture parameter λ 1 correlated with the pupil position among the texture parameters λ k for the left eye finally obtained by the eye feature detection process. The acquired texture parameter λ 1 is corrected (step S670).

そして、視線補正部260は、他のテクスチャーパラメーターλkの値は変更することなく、目テクスチャーモデル((2b)式)にテクスチャーパラメーターλkを代入し、左目のテクスチャーA(x)を算出する(ステップS675)。目テクスチャーモデルでは右目のテクスチャーA(x)が再現されるため、ステップS670ではテクスチャーA(x)の算出後、画像を左右反転させることとする。算出された左目のテクスチャーA(x)によって、平均形状画像I(W(x;p))における平均目領域Q2に対応する領域を置き換える(ステップS680)。以上の処理により、平均形状画像I(W(x;p))の左目の瞳の位置を右目に対する視線補正に追従させることができる。 Then, the line-of-sight correction unit 260 calculates the texture A (x) of the left eye by substituting the texture parameter λ k into the eye texture model (formula (2b)) without changing the values of the other texture parameters λ k. (Step S675). Since the texture A (x) of the right eye is reproduced in the eye texture model, in step S670, after the texture A (x) is calculated, the image is reversed left and right. The area corresponding to the average eye area Q2 in the average shape image I (W (x; p)) is replaced with the calculated texture A (x) of the left eye (step S680). With the above processing, the position of the pupil of the left eye of the average shape image I (W (x; p)) can be made to follow the line-of-sight correction for the right eye.

次に、平均形状画像I(W(x;p))を、もとの顔領域FAにおける顔画像に復元する(ステップS685)。具体的には、顔特徴検出処理で得られたグローバルパラメーターと形状パラメーターpiを顔形状モデル((1a)式)に適用することにより、もとの顔の形状を再現する。さらに、復元した顔の形状sにおける特徴点CPの位置に基づいて平均形状画像I(W(x;p))の各画素をワープ処理することにより、もとの顔画像に復元する。基本的には、もとの顔画像へと復元されるが、目については瞳の位置が補正されているため、該補正が反映されることとなる。顔形状モデルにおける特徴点CPの相対的な位置関係も、顔特徴検出処理において特定された特徴点CP(図18)の相対的な位置関係と一致するように復元されている。各特徴点CPの位置を一致させるように、復元した顔画像の各画素の色彩値によって、注目画像OIにおける対応画素の色彩値を置換する(ステップS690)。これにより、図24の下段に示すように、視線軸VAが画像面IPに直交するように補正された顔画像を有する注目画像OIを得ることができる。最後に、注目画像OIを印刷処理部320に出力し、赤目が補正された注目画像OIを印刷する(ステップS695)。 Next, the average shape image I (W (x; p)) is restored to the face image in the original face area FA (step S685). Specifically, the original face shape is reproduced by applying the global parameter and the shape parameter p i obtained by the face feature detection process to the face shape model (formula (1a)). Further, each pixel of the average shape image I (W (x; p)) is warped based on the position of the feature point CP in the restored face shape s to restore the original face image. Basically, the original face image is restored. However, since the pupil position is corrected for the eyes, the correction is reflected. The relative positional relationship of the feature points CP in the face shape model is also restored so as to coincide with the relative positional relationship of the feature points CP (FIG. 18) specified in the face feature detection process. The color value of the corresponding pixel in the target image OI is replaced with the color value of each pixel of the restored face image so that the positions of the feature points CP are matched (step S690). As a result, as shown in the lower part of FIG. 24, it is possible to obtain an attention image OI having a face image that has been corrected so that the visual axis VA is orthogonal to the image plane IP. Finally, the target image OI is output to the print processing unit 320, and the target image OI with the corrected red-eye is printed (step S695).

以上説明したように、本実施例では、視線軸VAが画像面IPに直交するように補正を行うことができ、被写体の人物が撮影時に正面を見ていなかった場合でも、いわゆるカメラ目線に補正することができる。目テクスチャーモデルにおいて瞳の位置に相関するテクスチャーパラメーターλ1のみを補正するため、瞳の位置以外の特徴(瞳の色等。)は維持したまま理想的な視線方向へと補正することができる。 As described above, in this embodiment, correction can be performed so that the line-of-sight axis VA is orthogonal to the image plane IP, and even when the subject person is not looking at the front at the time of shooting, correction is made to the so-called camera line of sight. can do. Since only the texture parameter λ 1 that correlates with the pupil position is corrected in the eye texture model, it is possible to correct the ideal line-of-sight direction while maintaining characteristics (such as the pupil color) other than the pupil position.

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:
図25は、本変形例にかかる視線判定・補正処理の流れを示すフローチャートである。本変形例は、前実施例の視線判定・補正処理とほぼ同様であるが、前実施例のステップS615とステップS620の間にステップS617を実行する点で前実施例とは相違している。視線判定部250は、角度テーブルT(図1)を参照して、形状パラメーターp1顔の振り角度θを取得し、該振り角度θの絶対値が25度よりも大きいか否かを判定する(ステップS617)。振り角度θの絶対値が25度よりも大きい場合には、そのまま瞳の位置の補正を行うことなく処理を終了させる。すなわち、振り角度θの絶対値が25度以下の場合に限り、瞳の位置の補正を行う。顔の振り角度θの絶対値が25度よりも大きい場合には、視線軸VAが画像面IPに直交するように瞳の位置を補正すると、不自然となるからである。本変形例によれば、自然な補正のみを行うことができる。
B1. Modification 1:
FIG. 25 is a flowchart showing the flow of the line-of-sight determination / correction processing according to this modification. This modification is substantially the same as the line-of-sight determination / correction process of the previous embodiment, but differs from the previous embodiment in that step S617 is executed between step S615 and step S620 of the previous embodiment. The line-of-sight determination unit 250 refers to the angle table T (FIG. 1), acquires the shape parameter p 1 face swing angle θ, and determines whether the absolute value of the swing angle θ is greater than 25 degrees. (Step S617). If the absolute value of the swing angle θ is greater than 25 degrees, the process is terminated without correcting the pupil position. That is, the pupil position is corrected only when the absolute value of the swing angle θ is 25 degrees or less. This is because when the absolute value of the face swing angle θ is larger than 25 degrees, it becomes unnatural if the pupil position is corrected so that the visual axis VA is orthogonal to the image plane IP. According to this modification, only natural correction can be performed.

B2.変形例2:
図26は、本変形例における理想的な視線軸VAの方向を説明する模式図である。本変形例では、視線軸VAが顔の正面軸FAと一致するように瞳の位置を補正する。この場合、顔の振り角度θがどのような値であっても、相対視線角度γが0となるように補正することができればよい。図11(a)において説明したように、テクスチャーパラメーターλ1が0となるとき、瞳の位置が内寄りでも外寄りでもなく視線が正面を向くため、テクスチャーパラメーターλ1を0に補正した上で、前実施例と同様に右目および左目のテクスチャーA(x)を理想目画像として算出すればよい。
B2. Modification 2:
FIG. 26 is a schematic diagram for explaining an ideal direction of the visual axis VA in the present modification. In this modification, the position of the pupil is corrected so that the visual axis VA coincides with the face front axis FA. In this case, it suffices that the relative gaze angle γ can be corrected to 0 regardless of the value of the face swing angle θ. As described in FIG. 11A, when the texture parameter λ 1 is 0, the eyes are not inward or outward, and the line of sight is directed to the front, so the texture parameter λ 1 is corrected to 0. Similarly to the previous embodiment, the right eye and left eye texture A (x) may be calculated as the ideal eye image.

B3.変形例3:
図27は、本変形例における理想的な視線軸VAの方向を説明する模式図である。本変形例では、デジタルスチルカメラDSCによって注目画像OIに被写体距離Lとレンズ焦点距離とセンサ幅と水平画素数とが添付して記録されている。被写体距離Lは被写体の顔の位置に形成される画像面IPとデジタルスチルカメラDSCとの距離であると考えることができる。本実施例では、理想的な視線軸VAを画像面IPに垂直とするのではなく、顔検出によって特定された顔領域FAの左右中央位置(注目画像OIの左右中央の位置を(B=0)として位置Bと表す。)とデジタルスチルカメラDSCとを結んだ直線LLに沿った理想角度κを理想的な視線軸VAの角度とする。
B3. Modification 3:
FIG. 27 is a schematic diagram for explaining an ideal direction of the visual axis VA in the present modification. In this modified example, the subject distance L, the lens focal length, the sensor width, and the number of horizontal pixels are attached and recorded on the target image OI by the digital still camera DSC. The subject distance L can be considered as a distance between the image plane IP formed at the face position of the subject and the digital still camera DSC. In this embodiment, the ideal line-of-sight axis VA is not perpendicular to the image plane IP, but the left and right center position of the face area FA specified by face detection (the position of the left and right center of the target image OI is (B = 0). ) And the ideal angle κ along the straight line LL connecting the digital still camera DSC to the ideal viewing axis VA.

なお、レンズの歪みを考慮しない場合、被写体距離Lとレンズ焦点距離とセンサ幅と水平画素数とに基づいて顔が存在する画像面IPにおける顔領域FAの実体的な位置Bを特定することができる。前実施例において、視線補正部260は、絶対視線角度φを0とするような相対視線角度γである補正角度ηを算出する(ステップS635)ようにしたが、本実施例では絶対視線角度φを理想角度κとするような相対視線角度γである補正角度ηを算出すればよい。すなわち、補正角度を(η=κ−θ−γ)によって算出すればよい。なお、理想角度κは、tanκ=B/Lを満足する角度である。そして、ステップS640以降は、補正角度ηに基づいて前実施例と同様の処理を実行すればよい。   If lens distortion is not taken into account, the substantial position B of the face area FA in the image plane IP where the face exists can be specified based on the subject distance L, the lens focal length, the sensor width, and the number of horizontal pixels. it can. In the previous embodiment, the line-of-sight correction unit 260 calculates the correction angle η, which is a relative line-of-sight angle γ such that the absolute line-of-sight angle φ is 0 (step S635). It is only necessary to calculate a correction angle η that is a relative line-of-sight angle γ such that is an ideal angle κ. That is, the correction angle may be calculated by (η = κ−θ−γ). The ideal angle κ is an angle that satisfies tan κ = B / L. Then, after step S640, the same processing as in the previous embodiment may be executed based on the correction angle η.

B4.変形例4:
前記実施例の特徴点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に補正されることとなる。同様に、前記実施例の目特徴検出処理では、注目画像OIに基づき目テクスチャー画像J(T(x;λ))を算出することにより注目画像OIの目画像を平均目画像A0(x)に整合させているが、平均目画像A0(x)に対して画像変換をおこなうことにより両者を整合させるものとしてもよい。
B4. Modification 4:
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. Similarly, in the eye feature detection process of the above-described embodiment, the eye texture image J (T (x; λ)) is calculated based on the attention image OI, thereby converting the eye image of the attention image OI into the average eye image A 0 (x). However, they may be matched by performing image conversion on the average eye image A 0 (x).

B5.変形例5:
前記実施例におけるサンプル画像SI(図3)はあくまで一例であり、サンプル画像SIとして採用する画像の数、種類は任意に設定可能である。また、前記実施例において、特徴点CPの位置で示される顔の所定の特徴部位(図4参照)はあくまで一例であり、実施例において設定されている特徴部位の一部を省略したり、特徴部位として他の部位を採用したりしてもよい。
B5. Modification 5:
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.

また、前記実施例において、平均顔画像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.

また、前記実施例では、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…視線判定部、260…視線補正部、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 ... gaze determination unit, 260 ... gaze correction , 310... Display processing unit, 320... Print processing unit.

Claims (10)

注目画像に含まれる目における瞳の位置を補正する画像処理装置であって、
前記注目画像から顔領域を検出する顔領域検出部と、
前記顔画像から目領域を検出する目領域検出部と、
特徴量に基づいて目における瞳の位置を変動させながら目画像を再現する目モデルを取得する取得部と、
前記目モデルによって再現される目画像と前記目領域とが近似するときの特徴量を近似特徴量として検出する特徴量検出部と、
前記瞳の位置が理想的となる理想目画像を前記目モデルが再現するように前記近似特徴量を補正し、該補正した前記近似特徴量に基づいて前記モデルが再現する前記理想目画像によって前記目領域を補正する補正部と、を備える画像処理装置。
An image processing device that corrects the position of a pupil in an eye included in an image of interest,
A face area detection unit for detecting a face area from the attention image;
An eye area detector for detecting an eye area from the face image;
An acquisition unit that acquires an eye model that reproduces an eye image while changing the position of a pupil in the eye based on a feature amount;
A feature amount detection unit that detects a feature amount when the eye image reproduced by the eye model approximates the eye region as an approximate feature amount;
The approximate feature amount is corrected so that the eye model reproduces an ideal eye image in which the position of the pupil is ideal, and the ideal eye image is reproduced by the model based on the corrected approximate feature amount. An image processing apparatus comprising: a correction unit that corrects an eye area.
前記取得部は、視線方向が異なる目画像を含む複数のサンプル画像の各画素の色彩値を主成分分析することにより、各主成分の固有ベクトルを線形結合することにより目画像を再現する前記目モデルを取得するとともに、
前記特徴量は、各固有ベクトルを線形結合する際の各主成分に関する重み係数である請求項1に記載の画像処理装置。
The acquisition unit performs principal component analysis on color values of each pixel of a plurality of sample images including eye images having different line-of-sight directions, and reproduces the eye image by linearly combining eigenvectors of the principal components. And get
The image processing apparatus according to claim 1, wherein the feature amount is a weighting coefficient related to each principal component when linearly combining the eigenvectors.
前記顔領域に含まれる顔の振り角度を検出し、該振り角度が所定の範囲内であるときに限り前記目領域を補正する請求項1または請求項2のいずれかに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein a face swing angle included in the face area is detected, and the eye area is corrected only when the swing angle is within a predetermined range. 前記理想目画像においては、視線方向が前記注目画像の画像面に対して直角となる瞳の位置が再現される請求項1から請求項3のいずれか一項に記載の画像処理装置。   4. The image processing apparatus according to claim 1, wherein, in the ideal eye image, a pupil position whose line-of-sight direction is perpendicular to the image plane of the target image is reproduced. 5. 前記理想目画像においては、視線方向が前記顔領域に含まれる顔の正面方向となる瞳の位置が再現される請求項1から請求項3のいずれか一項に記載の画像処理装置。   4. The image processing apparatus according to claim 1, wherein, in the ideal eye image, a position of a pupil whose line-of-sight direction is a front direction of a face included in the face region is reproduced. 前記理想目画像においては、視線方向が前記注目画像の中央に向く瞳の位置が再現される請求項1から請求項3のいずれか一項に記載の画像処理装置。   4. The image processing apparatus according to claim 1, wherein in the ideal eye image, a position of a pupil whose line-of-sight direction is toward the center of the target image is reproduced. 注目画像に含まれる目における瞳の位置を補正する画像処理方法であって、
前記注目画像から顔領域を検出し、
前記顔画像から目領域を検出し、
特徴量に基づいて目における瞳の位置を変動させながら目画像を再現する目モデルを取得し、
前記目モデルによって再現される目画像と前記目領域とが近似するときの特徴量を近似特徴量として検出し、
前記瞳の位置が理想的となる理想目画像を前記目モデルが再現するように前記近似特徴量を補正し、該補正した前記近似特徴量に基づいて前記モデルが再現する前記理想目画像によって前記目領域を補正する画像処理装置。
An image processing method for correcting the position of a pupil in an eye included in a target image,
Detecting a face area from the attention image;
An eye area is detected from the face image;
Obtain an eye model that reproduces the eye image while changing the position of the pupil in the eye based on the feature amount,
Detecting the feature amount when the eye image reproduced by the eye model approximates the eye region as an approximate feature amount;
The approximate feature amount is corrected so that the eye model reproduces an ideal eye image in which the position of the pupil is ideal, and the ideal eye image is reproduced by the model based on the corrected approximate feature amount. An image processing device for correcting an eye area.
注目画像に含まれる目における瞳の位置を補正する画像処理方法であって、
前記注目画像から顔領域を検出し、
前記顔画像から目領域を検出し、
特徴量に基づいて目における瞳の位置を変動させながら目画像を再現する目モデルを取得し、
前記目モデルによって再現される目画像と前記目領域とが近似するときの特徴量を近似特徴量として検出し、
前記瞳の位置が理想的となる理想目画像を前記目モデルが再現するように前記近似特徴量を補正し、該補正した前記近似特徴量に基づいて前記モデルが再現する前記理想目画像によって前記目領域を補正する、画像処理方法。
An image processing method for correcting the position of a pupil in an eye included in a target image,
Detecting a face area from the attention image;
An eye area is detected from the face image;
Obtain an eye model that reproduces the eye image while changing the position of the pupil in the eye based on the feature amount,
Detecting the feature amount when the eye image reproduced by the eye model approximates the eye region as an approximate feature amount;
The approximate feature amount is corrected so that the eye model reproduces an ideal eye image in which the position of the pupil is ideal, and the ideal eye image is reproduced by the model based on the corrected approximate feature amount. An image processing method for correcting an eye area.
注目画像に含まれる目における瞳の位置を補正する機能をコンピューターに実現させる画像処理プログラムであって、
前記注目画像から顔領域を検出する顔領域検出機能と、
前記顔画像から目領域を検出する目領域検出機能と、
特徴量に基づいて目における瞳の位置を変動させながら目画像を再現する目モデルを取得する取得機能と、
前記目モデルによって再現される目画像と前記目領域とが近似するときの特徴量を近似特徴量として検出する特徴量検出機能と、
前記瞳の位置が理想的となる理想目画像を前記目モデルが再現するように前記近似特徴量を補正し、該補正した前記近似特徴量に基づいて前記モデルが再現する前記理想目画像によって前記目領域を補正する補正機能と、をコンピューターに実現させる画像処理プログラム。
An image processing program for causing a computer to realize a function of correcting the position of a pupil in an eye included in an image of interest,
A face area detection function for detecting a face area from the attention image;
An eye area detection function for detecting an eye area from the face image;
An acquisition function for acquiring an eye model that reproduces an eye image while changing the position of the pupil in the eye based on the feature amount;
A feature amount detection function for detecting, as an approximate feature amount, a feature amount when the eye image reproduced by the eye model approximates the eye region;
The approximate feature amount is corrected so that the eye model reproduces an ideal eye image in which the position of the pupil is ideal, and the ideal eye image is reproduced by the model based on the corrected approximate feature amount. An image processing program that causes a computer to realize a correction function for correcting an eye area.
注目画像を印刷する印刷装置であって、
前記注目画像から顔領域を検出する顔領域検出部と、
前記顔画像から目領域を検出する目領域検出部と、
特徴量に基づいて目における瞳の位置を変動させながら目画像を再現する目モデルを取得する取得部と、
前記目モデルによって再現される目画像と前記目領域とが近似するときの特徴量を近似特徴量として検出する特徴量検出部と、
前記瞳の位置が理想的となる理想目画像を前記目モデルが再現するように前記近似特徴量を補正し、該補正した前記近似特徴量に基づいて前記モデルが再現する前記理想目画像によって前記目領域を補正する補正部と、
前記目領域が補正された前記注目画像を印刷する印刷部と、を備える印刷装置。
A printing device that prints an image of interest,
A face area detection unit for detecting a face area from the attention image;
An eye area detector for detecting an eye area from the face image;
An acquisition unit that acquires an eye model that reproduces an eye image while changing the position of a pupil in the eye based on a feature amount;
A feature amount detection unit that detects a feature amount when the eye image reproduced by the eye model approximates the eye region as an approximate feature amount;
The approximate feature amount is corrected so that the eye model reproduces an ideal eye image in which the position of the pupil is ideal, and the ideal eye image is reproduced by the model based on the corrected approximate feature amount. A correction unit for correcting the eye area;
And a printing unit that prints the attention image in which the eye area is corrected.
JP2009133993A 2009-06-03 2009-06-03 Image processor for correcting position of pupil in eye, image processing method, image processing program and printer Withdrawn JP2010282339A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009133993A JP2010282339A (en) 2009-06-03 2009-06-03 Image processor for correcting position of pupil in eye, image processing method, image processing program and printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009133993A JP2010282339A (en) 2009-06-03 2009-06-03 Image processor for correcting position of pupil in eye, image processing method, image processing program and printer

Publications (1)

Publication Number Publication Date
JP2010282339A true JP2010282339A (en) 2010-12-16

Family

ID=43539025

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009133993A Withdrawn JP2010282339A (en) 2009-06-03 2009-06-03 Image processor for correcting position of pupil in eye, image processing method, image processing program and printer

Country Status (1)

Country Link
JP (1) JP2010282339A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012231237A (en) * 2011-04-25 2012-11-22 Olympus Imaging Corp Image recording apparatus and imaging apparatus
JP2013235562A (en) * 2012-05-04 2013-11-21 Commonwealth Scientific & Industrial Research Organization System and method for eye position on video
JP2015159550A (en) * 2015-03-19 2015-09-03 オリンパス株式会社 Imaging apparatus, imaging method, and program
CN111462156A (en) * 2020-03-30 2020-07-28 温州医科大学 Image processing method for acquiring corneal vertex
CN112541433A (en) * 2020-12-11 2021-03-23 中国电子技术标准化研究院 Two-stage human eye pupil accurate positioning method based on attention mechanism
CN113052064A (en) * 2021-03-23 2021-06-29 北京思图场景数据科技服务有限公司 Attention detection method based on face orientation, facial expression and pupil tracking
JP2022161690A (en) * 2021-04-09 2022-10-21 本田技研工業株式会社 Information processing apparatus, information processing method, learning method, and program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06266497A (en) * 1993-03-11 1994-09-22 Toshiba Corp Man-machine interface device
JP2002015311A (en) * 2000-06-30 2002-01-18 Ntt Data Corp Image recognizing device, shadow removing device, shadow removing method, and storage medium
JP2002077592A (en) * 2000-04-13 2002-03-15 Fuji Photo Film Co Ltd Image processing method
JP2002282210A (en) * 2001-03-27 2002-10-02 Japan Science & Technology Corp Method and apparatus for detecting visual axis
JP2007293587A (en) * 2006-04-25 2007-11-08 Toyohashi Univ Of Technology Method for early detecting change of vigilance and sensing device
JP2009104524A (en) * 2007-10-25 2009-05-14 Hitachi Ltd Gaze direction measuring method and gaze direction measuring device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06266497A (en) * 1993-03-11 1994-09-22 Toshiba Corp Man-machine interface device
JP2002077592A (en) * 2000-04-13 2002-03-15 Fuji Photo Film Co Ltd Image processing method
JP2002015311A (en) * 2000-06-30 2002-01-18 Ntt Data Corp Image recognizing device, shadow removing device, shadow removing method, and storage medium
JP2002282210A (en) * 2001-03-27 2002-10-02 Japan Science & Technology Corp Method and apparatus for detecting visual axis
JP2007293587A (en) * 2006-04-25 2007-11-08 Toyohashi Univ Of Technology Method for early detecting change of vigilance and sensing device
JP2009104524A (en) * 2007-10-25 2009-05-14 Hitachi Ltd Gaze direction measuring method and gaze direction measuring device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012231237A (en) * 2011-04-25 2012-11-22 Olympus Imaging Corp Image recording apparatus and imaging apparatus
JP2013235562A (en) * 2012-05-04 2013-11-21 Commonwealth Scientific & Industrial Research Organization System and method for eye position on video
JP2015159550A (en) * 2015-03-19 2015-09-03 オリンパス株式会社 Imaging apparatus, imaging method, and program
CN111462156A (en) * 2020-03-30 2020-07-28 温州医科大学 Image processing method for acquiring corneal vertex
CN111462156B (en) * 2020-03-30 2023-03-31 温州医科大学 Image processing method for acquiring corneal vertex
CN112541433A (en) * 2020-12-11 2021-03-23 中国电子技术标准化研究院 Two-stage human eye pupil accurate positioning method based on attention mechanism
CN112541433B (en) * 2020-12-11 2024-04-19 中国电子技术标准化研究院 Two-stage human eye pupil accurate positioning method based on attention mechanism
CN113052064A (en) * 2021-03-23 2021-06-29 北京思图场景数据科技服务有限公司 Attention detection method based on face orientation, facial expression and pupil tracking
CN113052064B (en) * 2021-03-23 2024-04-02 北京思图场景数据科技服务有限公司 Attention detection method based on face orientation, facial expression and pupil tracking
JP2022161690A (en) * 2021-04-09 2022-10-21 本田技研工業株式会社 Information processing apparatus, information processing method, learning method, and program
JP7219788B2 (en) 2021-04-09 2023-02-08 本田技研工業株式会社 Information processing device, information processing method, learning method, and program

Similar Documents

Publication Publication Date Title
JP5239625B2 (en) Image processing apparatus, image processing method, and image processing program
JP2010186288A (en) Image processing for changing predetermined texture characteristic amount of face image
US20100202696A1 (en) Image processing apparatus for detecting coordinate position of characteristic portion of face
JP4795718B2 (en) Image processing apparatus and method, and program
JP2009237619A (en) Detection of face area and organ area in image
JP2010282339A (en) Image processor for correcting position of pupil in eye, image processing method, image processing program and printer
JP2010191592A (en) Image processing apparatus for detecting coordinate position of characteristic portion of face
JP2011060038A (en) Image processing apparatus
JP2011053942A (en) Apparatus, method and program for processing image
JP2010250420A (en) Image processing apparatus for detecting coordinate position of characteristic part of face
US8290278B2 (en) Specifying position of characteristic portion of face image
US20090028390A1 (en) Image Processing for Estimating Subject Distance
JP2010250419A (en) Image processing device for detecting eye condition
JP4957607B2 (en) Detection of facial regions in images
JP2010244321A (en) Image processing for setting face model showing face image
US8031915B2 (en) Image processing device and image processing method
JP2010176314A (en) Image processor for detecting coordinate position of characteristic site of face
JP2010170184A (en) Specifying position of characteristic portion of face image
JP2010271955A (en) Image processing apparatus, image processing method, image processing program, and printer
JP2010244251A (en) Image processor for detecting coordinate position for characteristic site of face
JP2010282340A (en) Image processor, image processing method, image processing program and printer for determining state of eye included in image
JP2010245721A (en) Face image processing
JP2009251634A (en) Image processor, image processing method, and program
JP2010271956A (en) Image processing apparatus, image processing method, image processing program, and printer
JP2009237857A (en) Setting of organ area corresponding to facial organ image in image

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120404

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130312

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20130320