JP2009251634A - Image processor, image processing method, and program - Google Patents

Image processor, image processing method, and program Download PDF

Info

Publication number
JP2009251634A
JP2009251634A JP2008094747A JP2008094747A JP2009251634A JP 2009251634 A JP2009251634 A JP 2009251634A JP 2008094747 A JP2008094747 A JP 2008094747A JP 2008094747 A JP2008094747 A JP 2008094747A JP 2009251634 A JP2009251634 A JP 2009251634A
Authority
JP
Japan
Prior art keywords
correction
face
area
image
mask
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
JP2008094747A
Other languages
Japanese (ja)
Inventor
Akio Yamazaki
明生 山▲崎▼
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 JP2008094747A priority Critical patent/JP2009251634A/en
Publication of JP2009251634A publication Critical patent/JP2009251634A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To achieve image correction for improving appearance of a face image more naturally. <P>SOLUTION: A printer 1 is a color ink jet printer conforming to printing of an image based on image data acquired from a memory card 18 or the like, which is called direct printing. A face area detection unit 21 analyzes a target image TI, input to the printer 1, to be an object for face correction process, and detects a face area FA including a face image where a face part of a person on the target image TI is photographed. A correction unit 23 performs image correction for a specified correction area FC. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像処理装置、画像処理方法、及びプログラムに関する。特に、顔画像の補
正に適用するのが好ましい画像処理装置、画像処理方法、及びプログラムに関する。
The present invention relates to an image processing apparatus, an image processing method, and a program. In particular, the present invention relates to an image processing apparatus, an image processing method, and a program that are preferably applied to face image correction.

3次元の物体と2次元の物体に対する見え方の違いから、画像上に映し出されている人
物の顔(即ち2次元上の顔)は、通常、実際の顔(即ち3次元上の顔)より大きく見える
と言われている。そこで人物が撮影された画像に対して、顔がほっそり見えるようにし、
顔画像の見栄えをよくする画像補正が開発されている。
Due to the difference in appearance between a 3D object and a 2D object, the face of a person shown on an image (ie, a 2D face) is usually more than an actual face (ie, a 3D face). It is said to look big. So make the face look slender against the image of the person,
Image correction has been developed to improve the appearance of face images.

特許文献1には、人物の画像から、人物の顔部分が写っている画像の領域を検出すると
共に、その領域の顔の輪郭部分を、頬の幅が狭くなるように変形する画像補正について開
示されている。このような画像補正を施すことにより顔の画像は、ほっそりした顔に見え
るようになる。
Patent Document 1 discloses image correction for detecting an area of an image in which a person's face portion is captured from a person's image and deforming the contour portion of the face in that area so that the width of the cheek becomes narrower. Has been. By performing such image correction, the face image appears to be a slender face.

特開平2004−318204号公報Japanese Patent Laid-Open No. 2004-318204

しかしながら、この方法では、顔の輪郭そのものが変形されることから、顔の周囲部分
にゆがみが生じ、違和感のある顔の画像となってしまうことがある。
However, in this method, since the outline of the face itself is deformed, the peripheral portion of the face may be distorted, resulting in an uncomfortable face image.

本発明は、このような状況に鑑みてなされたものであり、より自然に、顔の画像の見栄
えをよくすることができるようにするものである。
The present invention has been made in view of such a situation, and more naturally makes it possible to improve the appearance of a face image.

本発明の画像処理装置は、画像の色調を補正する画像処理装置であって、画像における
顔の画像を含む顔領域を検出する検出手段と、顔領域内の顔を構成する部位をマスキング
するための部位マスクを利用して、顔領域から、色調補正を行う補正領域を特定する特定
手段と、補正領域に対して色調補正を行う補正手段とを備える。
An image processing apparatus according to the present invention is an image processing apparatus for correcting a color tone of an image, for detecting a face area including a face image in the image, and for masking a part constituting the face in the face area. Using a part mask, specifying means for specifying a correction area for performing color tone correction from the face area, and correction means for performing color tone correction for the correction area.

特定手段は、部位マスクを顔領域の大きさに対応させた部位マスク画像を生成し、部位
マスク画像でマスキングされる顔領域FAの領域から、肌色領域を検出し、検出した肌色
領域を補正領域とすることができる。
The specifying unit generates a part mask image in which the part mask corresponds to the size of the face area, detects a skin color area from the area of the face area FA masked by the part mask image, and corrects the detected skin color area It can be.

部位マスクは、顔の向きに応じて複数設けられており、特定手段は、顔領域に基づいて
顔の向きを検出し、検出した顔の向きに対応する部位マスクを取得し、取得した部位マス
クを利用して補正領域を特定することができる。
A plurality of part masks are provided according to the face direction, and the specifying unit detects the face direction based on the face region, acquires the part mask corresponding to the detected face direction, and acquires the acquired part mask Can be used to specify the correction area.

部位マスクには、補正の重みが設定されており、補正手段は、補正の重みに基づいて、
補正領域に対して色調補正を行うことができる。
A correction weight is set for the part mask, and the correction means is based on the correction weight,
Color correction can be performed on the correction area.

本発明の画像処理方法、又はプログラムは、画像の色調を補正する画像処理装置の画像
処理方法であって、又は画像の色調を補正する画像処理をコンピュータに実行させるプロ
グラムであって、画像における顔の画像を含む顔領域を検出する検出ステップと、顔領域
内の顔を構成する部位をマスキングするための部位マスクを利用して、顔領域から、色調
補正を行う補正領域を特定する特定ステップと、補正領域に対して色調補正を行う補正ス
テップとを含む。
An image processing method or program according to the present invention is an image processing method of an image processing apparatus that corrects the color tone of an image, or a program that causes a computer to execute image processing that corrects the color tone of an image. A detection step for detecting a face area including the image of the image, and a specifying step for specifying a correction area for performing tone correction from the face area using a part mask for masking a part constituting the face in the face area; And a correction step for performing color tone correction on the correction area.

本発明の画像処理装置、画像処理方法、又はプログラムにおいては、画像における顔の
画像を含む顔領域が検出され、顔領域内の顔を構成する部位をマスキングするための部位
マスクを利用して、顔領域から、色調補正を行う補正領域が特定され、補正領域に対して
色調補正が行われる。
In the image processing device, the image processing method, or the program of the present invention, a face area including a face image in the image is detected, and a part mask for masking a part constituting the face in the face area is used, From the face area, a correction area for performing tone correction is specified, and tone correction is performed on the correction area.

本発明によれば、より自然に、顔の画像の見栄えをよくすることができるようにするも
のである。
According to the present invention, it is possible to improve the appearance of a face image more naturally.

以下、本発明の一実施の形態について、図面を参照して説明する。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

図1は、本発明を適用したプリンタ1のハードウェアの構成例を示すブロック図である
。このプリンタ1は、メモリカード18等から取得した画像データに基づき画像を印刷す
る、いわゆるダイレクトプリントに対応したカラーインクジェットプリンタである。
FIG. 1 is a block diagram illustrating a hardware configuration example of a printer 1 to which the present invention is applied. The printer 1 is a color inkjet printer that supports so-called direct printing, in which an image is printed based on image data acquired from a memory card 18 or the like.

プリンタ1は、CPU11、内部メモリ12、操作部13、表示部14、プリンタエン
ジン15、及びカードインターフェース(I/F)16を備えている。
The printer 1 includes a CPU 11, an internal memory 12, an operation unit 13, a display unit 14, a printer engine 15, and a card interface (I / F) 16.

CPU(central processing unit)11は、各部を制御して、内部メモリ12に格納
されているプログラムに応じて各種の処理を実行する。例えばCPU11は、顔の画像を
含む画像について、顔がほっそりと見えるようにする画像補正処理(以下、顔補正処理Z
1と称する)を実行する。
A CPU (central processing unit) 11 controls each unit and executes various processes according to a program stored in the internal memory 12. For example, the CPU 11 performs image correction processing (hereinafter referred to as face correction processing Z) for making a face look slender with respect to an image including a face image.
1).

内部メモリ12は、CPU11が実行する各種プログラムや各種データを格納している
ROM(Read Only Memory)、及びCPU11が実行対象とするプログラムやデータを一
時的に格納するRAM(Random Access Memory)によって構成されている。
The internal memory 12 includes a ROM (Read Only Memory) storing various programs executed by the CPU 11 and various data, and a RAM (Random Access Memory) temporarily storing programs and data to be executed by the CPU 11. Has been.

操作部13は、ボタンやタッチパネルの1つ又は複数より構成され、ユーザによる操作
内容をCPU11に通知する。
The operation unit 13 includes one or a plurality of buttons and a touch panel, and notifies the CPU 11 of the operation content by the user.

表示部14は、液晶ディスプレイ等より構成され、CPU11から供給されたデータに
対応する画像を表示する。
The display unit 14 is composed of a liquid crystal display or the like, and displays an image corresponding to data supplied from the CPU 11.

プリンタエンジン15は、CPU11から供給された印刷データに基づき印刷を行う印
刷機構である。
The printer engine 15 is a printing mechanism that performs printing based on the print data supplied from the CPU 11.

カードインターフェース(I/F)16は、カードスロット17に挿入されたメモリカ
ード18との間でデータのやり取りを行うためのインターフェースである。なお、この例
では、メモリカード18にRGBデータとしての画像データが格納されており、プリンタ
1は、カードインターフェース16を介してメモリカード18に格納された画像データの
取得を行う。
The card interface (I / F) 16 is an interface for exchanging data with the memory card 18 inserted in the card slot 17. In this example, image data as RGB data is stored in the memory card 18, and the printer 1 acquires the image data stored in the memory card 18 via the card interface 16.

プリンタ1の各構成要素は、バス19を介して互いに接続されている。   The constituent elements of the printer 1 are connected to each other via a bus 19.

なおプリンタ1は、さらに、他の機器(例えばデジタルスチルカメラ)とのデータ通信
を行うためのインターフェースを備えているとしてもよい。
The printer 1 may further include an interface for performing data communication with other devices (for example, a digital still camera).

図2は、顔補正処理Z1を実行するためのプリンタ1の機能的構成例を示す図である。
この機能は、CPU11が内部メモリ12に記憶されているプログラムを実行することよ
り実現可能となる。
FIG. 2 is a diagram illustrating a functional configuration example of the printer 1 for executing the face correction process Z1.
This function can be realized by the CPU 11 executing a program stored in the internal memory 12.

検出手段としての顔領域検出部21は、例えばメモリカード18から読み出されてプリ
ンタ1に入力された、顔補正処理Z1の対象となる画像(以下、対象画像TIと称する)
を解析し、対象画像TI上の人物の顔部分が写っている顔の画像を含む領域(以下、顔領
域FAと称する)を検出する。
The face area detection unit 21 serving as a detection unit is an image (hereinafter referred to as a target image TI) that is a target of the face correction process Z1 that is read from the memory card 18 and input to the printer 1, for example.
And an area including a face image in which the face portion of the person is reflected on the target image TI (hereinafter referred to as a face area FA) is detected.

特定手段としての補正領域特定部22は、顔領域FAの所定の部分を、補正する領域(
以下、補正領域FCと称する)として特定する。例えば、後述するように、部位マスクが
利用されて顔領域FAの部分が補正領域FCとして特定される。
The correction area specifying unit 22 as the specifying means corrects a predetermined part of the face area FA (a correction area (
Hereinafter, it is specified as a correction area FC). For example, as will be described later, the part mask is used to identify the portion of the face area FA as the correction area FC.

この例の場合、頬周りを特定するマスク(以下、頬マスクMAと称する)が利用されて
、顔領域FAの頬周りの領域が補正領域FCとして特定される。この頬マスクMAは、例
えば内部メモリ12に記憶されている。
In the case of this example, a mask (hereinafter referred to as cheek mask MA) that specifies the cheek periphery is used, and the area around the cheek of the face area FA is specified as the correction area FC. The cheek mask MA is stored in the internal memory 12, for example.

補正手段としての補正部23は、特定された補正領域FCに対する画像補正を実行する
。この例の場合、後述するように、補正領域FC(例えば頬周りの領域)の色調が補正さ
れる。
The correction unit 23 as a correction unit performs image correction on the specified correction area FC. In this example, as described later, the color tone of the correction area FC (for example, the area around the cheek) is corrected.

出力制御部24は、画像補正(この例の場合、色調補正)が施された対象画像TIの画
像データから、表示データを生成し、それを表示部14に供給して表示したり、又は印刷
データを生成し、それをプリンタエンジン15に供給して、その印刷データに基づく画像
の印刷を実行させる。
The output control unit 24 generates display data from the image data of the target image TI that has been subjected to image correction (in this example, color correction), and supplies the display data to the display unit 14 for display or printing. Data is generated and supplied to the printer engine 15 to print an image based on the print data.

図3は、顔補正処理Z1の流れを示すフローチャートである。このフローチャートを参
照して、顔補正処理Z1について説明する。
FIG. 3 is a flowchart showing the flow of the face correction process Z1. The face correction process Z1 will be described with reference to this flowchart.

ステップS1において、顔領域検出部21は、顔補正処理Z1の対象となる対象画像T
Iにおける顔部分が写っている顔の画像を含む顔領域FAの検出を行う。
In step S <b> 1, the face area detection unit 21 performs a target image T that is a target of the face correction process Z <b> 1.
A face area FA including a face image in which the face portion in I is shown is detected.

具体的には、顔領域検出部21は、対象画像TIを解析して顔の画像を含むと想定され
る矩形の領域を顔領域FAとして抽出する。この顔領域FAの検出は、例えば人物の目、
鼻、及び口等の基本的な形状を表すテンプレートを利用したパターンマッチングによる方
法(特開2006−279460号公報参照)といった公知の検出方法を用いて実行する
ことができる。
Specifically, the face area detection unit 21 analyzes the target image TI and extracts a rectangular area that is assumed to include a face image as the face area FA. The detection of the face area FA is, for example, a human eye,
The detection can be performed using a known detection method such as a pattern matching method using a template representing a basic shape such as a nose and a mouth (see Japanese Patent Application Laid-Open No. 2006-279460).

図4は、顔領域FAの検出結果の例を示す図である。このように、顔領域FAは、対象
画像TIに含まれる人物の顔の画像の、両目、鼻、口、顎の画像を含む矩形の領域となっ
ている。顔領域検出部21は、顔領域FAを、例えば顔領域FAの頂点の座標により特定
する。
FIG. 4 is a diagram illustrating an example of the detection result of the face area FA. As described above, the face area FA is a rectangular area including images of both eyes, nose, mouth, and jaw of the face image of the person included in the target image TI. The face area detection unit 21 specifies the face area FA based on, for example, the coordinates of the vertices of the face area FA.

ステップS2において、補正領域特定部22は、頬マスクMAを利用して、人物の頬周
りの部分を、補正領域FCとして特定する処理(以下、補正領域特定処理Z2と称する)
を実行する。
In step S2, the correction area specifying unit 22 uses the cheek mask MA to specify a portion around the cheek of the person as the correction area FC (hereinafter referred to as a correction area specifying process Z2).
Execute.

図5は、補正領域特定処理Z2の流れを示すフローチャートである。このフローチャー
トを参照して、補正領域特定処理Z2について説明する。
FIG. 5 is a flowchart showing the flow of the correction area specifying process Z2. The correction area specifying process Z2 will be described with reference to this flowchart.

ステップS11において、補正領域特定部22は、内部メモリ12から、頬マスクMA
を取得する。
In step S11, the correction area specifying unit 22 reads the cheek mask MA from the internal memory 12.
To get.

図6は、頬マスクMAの例を示す図である。この頬マスクMAは、画素に対応する区画
(以下、適宜、画素と称する)を1単位として、32×32区画からなるデータ構造を有
している。図中ハッチングが付されている領域の区画には、値1が設定され、ハッチング
が付されていない領域(即ち図中白色の領域)の区画には、値0が設定されている。
FIG. 6 is a diagram illustrating an example of the cheek mask MA. This cheek mask MA has a data structure composed of 32 × 32 sections, with a section corresponding to a pixel (hereinafter, appropriately referred to as a pixel) as one unit. In the drawing, a value of 1 is set in a hatched area, and a value of 0 is set in a hatched area (that is, a white area in the figure).

図7は、図6の頬マスクMAの各区画に設定されている値を立体的に示した図である。
値1が設定されている区間には、値1の大きさに対応する高さの立方体が立てられている
FIG. 7 is a diagram three-dimensionally showing the values set in each section of the cheek mask MA in FIG.
In a section in which the value 1 is set, a cube having a height corresponding to the size of the value 1 is set up.

なお頬マスクMAは、例えば、区画の座標値と、値1又は値0を表すデータが、それぞ
れ対応付けられたテーブルとして用意される。
Note that the cheek mask MA is prepared as a table in which, for example, coordinate values of sections and data representing value 1 or value 0 are associated with each other.

次に、ステップS12において、補正領域特定部22は、頬マスクMAを顔領域FAの
大きさに対応させた画像(以下、頬マスク画像FMと称する)を生成する。
Next, in step S12, the correction area specifying unit 22 generates an image (hereinafter referred to as a cheek mask image FM) in which the cheek mask MA is associated with the size of the face area FA.

具体的には、顔領域FAの大きさが頬マスクMAの大きさより大きい場合(即ち顔領域
FAの画素数が、頬マスクMAの画素数より多い場合)、頬マスクMAの画素に対して、
両者の大きさの比(即ち拡大率)に応じた画素の補完が行われて、顔領域FAと同じ大き
さの頬マスク画像FMが生成される。また顔領域FAの大きさが頬マスクMAの大きさよ
り小さい場合(即ち顔領域FAの画素数が、頬マスクMAの画素数より少ない場合)、頬
マスクMAの画素に対して、両者の大きさの比(即ち縮小率)に応じた画素の間引きが行
われて、顔領域FAと同じ大きさの頬マスク画像FMが生成される。
Specifically, when the size of the face area FA is larger than the size of the cheek mask MA (that is, when the number of pixels of the face area FA is larger than the number of pixels of the cheek mask MA),
Pixel complementation is performed according to the ratio of both sizes (that is, the enlargement ratio), and a cheek mask image FM having the same size as the face area FA is generated. Further, when the size of the face area FA is smaller than the size of the cheek mask MA (that is, when the number of pixels of the face area FA is smaller than the number of pixels of the cheek mask MA), the size of both of the faces of the cheek mask MA is larger. The pixels are thinned out according to the ratio (that is, the reduction ratio), and a cheek mask image FM having the same size as the face area FA is generated.

次にステップS13において、補正領域特定部22は、顔領域FAの、頬マスク画像F
Mでマスキングされる領域を、補正領域FCとなり得る領域(以下、補正候補領域FBと
称する)として特定する。具体的には、補正領域特定部22は、頬マスク画像FMを顔領
域FA上に重ね合わせ、顔領域FAの、頬マスク画像FMの画素値が値1である画素に対
応する位置にある画素の領域を、補正候補領域FBとして特定する。
Next, in step S <b> 13, the correction area specifying unit 22 performs the cheek mask image F of the face area FA.
The area masked with M is specified as an area that can become the correction area FC (hereinafter referred to as a correction candidate area FB). Specifically, the correction area specifying unit 22 superimposes the cheek mask image FM on the face area FA, and the pixel at the position corresponding to the pixel of the face area FA whose pixel value is 1 in the cheek mask image FM. Is identified as the correction candidate region FB.

図8は、補正候補領域FBを概念的に示す図である。図8の例では、図中、ハンチング
が付されている領域(即ち顔領域FAの、頬マスク画像FMの画素値が値1である画素に
対応する位置にある画素の領域)が、補正候補領域FBとして特定される。
FIG. 8 is a diagram conceptually showing the correction candidate area FB. In the example of FIG. 8, a region to which hunting is applied (that is, a region of a pixel in the face region FA at a position corresponding to a pixel whose pixel value of the cheek mask image FM is 1) is a correction candidate. It is specified as a region FB.

ステップS14において、補正領域特定部22は、補正候補領域FBから、補正領域F
Cを特定する。
In step S <b> 14, the correction area specifying unit 22 determines the correction area F from the correction candidate area FB.
C is specified.

具体的には、補正候補領域FBから肌色領域が特定される。ここで、補正候補領域FB
から肌色領域を特定する方法について説明する。
Specifically, the skin color area is specified from the correction candidate area FB. Here, the correction candidate area FB
A method for specifying the skin color area from the above will be described.

初めに補正領域特定部22は、補正候補領域FBの各画素のRGB表色系の階調値を、
HSB表色系の階調値に変換する。
First, the correction area specifying unit 22 calculates the RGB color system gradation value of each pixel in the correction candidate area FB,
Convert to gradation value of HSB color system.

そして補正領域特定部22は、補正候補領域FBの各画素の、HSB表色系の色相(H
)、彩度(S)、及び明度(B)のそれぞれの値に基づいて、肌色であるか否かを判定す
る。
Then, the correction area specifying unit 22 performs the HSB color system hue (H) of each pixel in the correction candidate area FB.
), Saturation (S), and lightness (B), it is determined whether the skin color.

なお色相(H)は、例えば0度から360度までの角度を表す値であり、色の種類を示
す。例えば0度は、赤色の色相(H)を示す。彩度(S)は、例えば値0から値255ま
での値であり、色の鮮やかさを示す。彩度(S)の値が大きいほど、白さが増すことを意
味する。例えばグレースケールの彩度(S)は、値0となる。明度(B)は、例えば値0
から値255までの値であり、色の明るさを示す。例えば黒色の明度(B)は、値0とな
る。
The hue (H) is a value representing an angle from 0 degrees to 360 degrees, for example, and indicates the type of color. For example, 0 degree indicates a red hue (H). The saturation (S) is a value from 0 to 255, for example, and indicates the vividness of the color. It means that whiteness increases, so that the value of saturation (S) is large. For example, the saturation (S) of the gray scale is 0. The brightness (B) is, for example, the value 0
To a value of 255, indicating the brightness of the color. For example, the brightness (B) of black is 0.

図9は、肌色であるか否かの判定基準としての、色相(H)、彩度(S)、及び明度(
B)の範囲の例を示す図である。
FIG. 9 shows hue (H), saturation (S), and brightness (
It is a figure which shows the example of the range of B).

図9の上側に示すように、色相(H)については、250度から110度の範囲(約2
20度の範囲)、彩度(S)については、値10から値90の範囲、そして明度(B)に
ついては、値10から値100の範囲が、肌色であると判定される範囲となる。例えば、
判定対象となる画素のHSBの値がいずれもこの判定範囲内にあるとき、その画素は、肌
色の画素であると判定される。
As shown in the upper side of FIG. 9, the hue (H) ranges from 250 degrees to 110 degrees (about 2 degrees).
For the range of 20 degrees), the saturation (S), the range from the value 10 to the value 90, and for the lightness (B), the range from the value 10 to the value 100 is the range determined as the skin color. For example,
When the HSB value of a pixel to be determined is within this determination range, the pixel is determined to be a skin color pixel.

なお一般的な肌色判定の範囲は、図9の下側に示すように、色相(H)については、3
50度から20度の範囲(即ち30度の範囲)、彩度(S)については、値20から値6
0の範囲、そして明度(B)については、値30から値70の範囲となっている。即ち本
実施の形態で利用する肌色判定の範囲は、一般的な肌色判定の範囲より広いものとなって
いるが、その理由については後述する。
The general skin color determination range is 3 for hue (H) as shown in the lower side of FIG.
For a range of 50 to 20 degrees (ie, a range of 30 degrees) and saturation (S), a value of 20 to a value of 6
The range of 0 and the brightness (B) are in the range of 30 to 70. That is, the skin color determination range used in the present embodiment is wider than the general skin color determination range, and the reason will be described later.

このようにして補正候補領域FBから肌色領域が検出され、補正領域FCとして特定さ
れる。
In this way, the skin color area is detected from the correction candidate area FB and specified as the correction area FC.

図10は、図8に示す補正候補領域FBから特定された補正領域FCを示す図である。
補正領域FCが特定されると、補正領域特定処理Z2は終了し、処理は、図3のステッ
プS3に進む。
FIG. 10 is a diagram showing the correction area FC identified from the correction candidate area FB shown in FIG.
When the correction area FC is specified, the correction area specifying process Z2 ends, and the process proceeds to step S3 in FIG.

ステップS3において、補正部23は、補正領域FCに対して所定の補正量に基づく色
調補正(以下、陰影補正処理Z3と称する)を行う。この例の場合、補正領域FCに属す
る各画素の明度(B)が所定の値TAだけ下げられる。このように明度(B)が値TAだ
け下げられると、表示又は印刷されたとき、その部分は暗く写り陰影ができているように
見えるようになる。
In step S3, the correction unit 23 performs color tone correction (hereinafter referred to as a shadow correction process Z3) on the correction area FC based on a predetermined correction amount. In this example, the brightness (B) of each pixel belonging to the correction area FC is lowered by a predetermined value TA. When the brightness (B) is lowered by the value TA in this way, when displayed or printed, the portion appears dark and appears to be shaded.

なお明度(B)の下げ値TAは、例えば補正領域FCや顔領域FAの明度(B)の平均
値を求め、その平均値としたり、その平均値の所定%としたりすることもできる。また補
正領域FCや顔領域FAの明度(B)の標準偏差を求め、その値とすることもできる。
Note that the lightness (B) reduction value TA can be obtained by, for example, obtaining an average value of the lightness (B) of the correction area FC and the face area FA, and setting the average value or a predetermined percentage of the average value. Further, the standard deviation of the brightness (B) of the correction area FC and the face area FA can be obtained and used as the value.

さらに顔領域FAの補正領域FC以外の領域であって補正領域FCに隣接する画素の画
素値を利用して明度(B)の下げ値TAを決定することもできる。
Further, it is also possible to determine the lightness (B) reduction value TA using the pixel values of the pixels adjacent to the correction area FC other than the correction area FC of the face area FA.

次に、ステップS4において、補正部23は、ステップS3で陰影補正処理Z3が施さ
れた補正領域FCについて、補正領域FCと他の領域との境界(以下、補正領域FCの境
界と称する)がぼけるようにする処理(以下、ぼかし処理Z4と称する)を行う。
Next, in step S4, the correction unit 23 determines the boundary between the correction region FC and another region (hereinafter referred to as the boundary of the correction region FC) for the correction region FC that has been subjected to the shadow correction processing Z3 in step S3. Processing for blurring (hereinafter referred to as blurring processing Z4) is performed.

補正領域FCの明度(B)が値TAだけ下げられると、補正領域FCと、補正領域FC
に隣接する他の領域との明度(B)の差が大きくなり、補正領域FCの境界部分が不自然
に目立ってしまうことがある。
When the brightness (B) of the correction area FC is lowered by the value TA, the correction area FC and the correction area FC
A difference in brightness (B) from other areas adjacent to the area increases, and the boundary of the correction area FC may become unnaturally conspicuous.

そこで、例えば補正領域FCの境界からの距離が所定以内にある補正領域FCの領域(
以下、境界領域と称する)に対して、所定の値TAだけ下げられた明度(B)が、例えば
値TAの半分の値だけ戻される。
Therefore, for example, the area of the correction area FC in which the distance from the boundary of the correction area FC is within a predetermined range (
Hereinafter, the brightness (B) lowered by a predetermined value TA is returned, for example, by a half value TA.

即ち補正領域FCの境界部分の明度(B)が段階的に下げられるので、補正領域FCの
境界部分が目立たなくなる。
That is, since the brightness (B) of the boundary portion of the correction area FC is lowered stepwise, the boundary portion of the correction area FC becomes inconspicuous.

なお上述したように、初めに、補正領域FCの明度(B)を一律に下げ、境界領域の画
素をある程度戻すようにして、補正領域FCの境界部分を目立たないようにしたが、頬マ
スクMAの画素値が補正の重みを表すようにして、補正領域FCの各画素を、頬マスクM
Aの対応する画素の画素値(即ち重み)に応じて補正することもできる。
As described above, first, the brightness (B) of the correction area FC is uniformly reduced so that the pixels in the boundary area are restored to some extent so that the boundary portion of the correction area FC is not noticeable. Each pixel value of the correction area FC is changed to the cheek mask M so that the pixel value of
Correction can also be made according to the pixel value (ie, weight) of the corresponding pixel of A.

図11は、各画素に補正の重みが設定されている頬マスクMAについて、各画素に設定
された重みを立体的に示した図である。
FIG. 11 is a diagram three-dimensionally showing the weights set for each pixel for the cheek mask MA in which correction weights are set for each pixel.

図11の例では、補正の重みとしての頬マスクMAの画素値が段階的に設定されている
。この頬マスクMAを用いることにより、補正領域FCの明度(B)の大きさを段階的に
下げることができる。
In the example of FIG. 11, pixel values of the cheek mask MA as correction weights are set in stages. By using this cheek mask MA, the magnitude of the brightness (B) of the correction area FC can be lowered step by step.

このように補正領域FCについて、ぼかし処理Z4が施されると、顔補正処理Z1は終
了する(図3)。顔補正処理Z1での陰影補正処理Z3が施された対象画像TIは、出力
制御部24に供給され、そこで、対象画像TIの画像データから、表示データが生成され
たり、印刷データが生成される。
As described above, when the blurring process Z4 is performed on the correction area FC, the face correction process Z1 ends (FIG. 3). The target image TI that has undergone the shadow correction process Z3 in the face correction process Z1 is supplied to the output control unit 24, where display data or print data is generated from the image data of the target image TI. .

以上のようにして顔補正処理Z1が行われる。   The face correction process Z1 is performed as described above.

図12は、上述した顔補正処理Z1での処理結果をまとめて示した図である。   FIG. 12 is a diagram collectively showing the processing results in the face correction processing Z1 described above.

図12の最上段には、対象画像TIに相当する画像が示されている。   In the uppermost part of FIG. 12, an image corresponding to the target image TI is shown.

次の段には、図8に相当する画像が示されている。図中、色が濃くなっている部分が、
補正候補領域FBである。
In the next stage, an image corresponding to FIG. 8 is shown. In the figure, the darkened part is
This is the correction candidate area FB.

さらに次の段には、図10に相当する画像が示されている。図中、色が濃くなっている
部分が、補正領域FCである。なお図12の例では、首の一部も露出しているので、その
部分も肌色領域として検出され、補正領域FCに含まれている。
Further, in the next stage, an image corresponding to FIG. 10 is shown. In the figure, the darker portion is the correction area FC. In the example of FIG. 12, a part of the neck is also exposed, so that part is also detected as a skin color area and included in the correction area FC.

図12の最下段には、陰影補正処理Z3及びぼかし処理Z4が施された画像が示されて
いる。陰影補正処理Z3により、補正領域FCが暗く写り陰影ができているように見える
ようになっていると共に、ぼかし処理Z4により、補正領域FCの境界部分が目立たない
ようになる。なお図12の各図は、顔補正処理Z1での処理結果を模式的に示したもので
ある。従って図12の最下段における陰影の濃さやぼかし具合は、実際の例えば写真画像
におけるものとは異なって描かれている。図12は、顔補正処理Z1を説明するためのも
のであって、実際の処理において図12に示した画像が表示画像として生成されるもので
はない。
The lowermost part of FIG. 12 shows an image that has been subjected to the shadow correction process Z3 and the blurring process Z4. The shadow correction process Z3 makes the correction area FC appear dark and shaded, and the blurring process Z4 makes the boundary portion of the correction area FC inconspicuous. Each diagram in FIG. 12 schematically shows the processing result in the face correction processing Z1. Accordingly, the shade density and the degree of blurring in the lowermost stage in FIG. 12 are drawn differently from those in an actual photographic image, for example. FIG. 12 is for explaining the face correction processing Z1, and the image shown in FIG. 12 is not generated as a display image in the actual processing.

以上のように、頬周りの明度を下げ、頬の部分が少し暗くなるように顔画像を補正した
ので、顔画像を、頬の部分に陰影ができ立体感のある画像に補正することができる。即ち
ほっそりとした顔に見えるように顔の画像を補正することができる。
As described above, since the face image is corrected so that the brightness around the cheek is lowered and the cheek portion is slightly darkened, the face image can be corrected to a three-dimensional image with a shadow on the cheek portion. . That is, the face image can be corrected so that it looks like a slender face.

また以上のように、補正領域FCの色調を補正するようにしたので、顔の輪郭自体は変
形されず、周囲にゆがみが生じたりすることがない。即ち、より自然な態様で、ほっそり
とした顔に見えるようにすることができる。なお陰影の濃さは、補正後の顔の画像が実際
の顔の印象と近いものとなる程度にしてもよいし、またいわゆるファン機能として、実際
の顔の印象よりもほっそりとした顔に見えるようにすることもできる。
Further, as described above, since the color tone of the correction area FC is corrected, the face outline itself is not deformed and the surroundings are not distorted. That is, it can be seen as a slim face in a more natural manner. The darkness of the shadow may be set so that the face image after correction is close to the impression of the actual face, and as a so-called fan function, the face looks more slender than the impression of the actual face. It can also be done.

また以上のように、部位マスク(例えば頬マスクMA)を用いて、補正領域FCを特定
するようにしたので、顔領域FAの検出の精度に影響されずに、容易に補正領域FCを特
定することができる。なお部位マスクは、例えば、多くの人物の顔の画像から目、口、又
は顎の部分を切り出し、それらを学習データとして用いて作成される。なお部位マスクを
用いずに、例えば頬の部分については、口の位置や輪郭の位置に基づいて所定の演算を繰
り返すことにより求めることも可能である。
Further, as described above, the correction area FC is specified using the part mask (for example, cheek mask MA), and therefore the correction area FC is easily specified without being affected by the accuracy of detection of the face area FA. be able to. The part mask is created, for example, by cutting out eyes, mouths, or chin portions from many human face images and using them as learning data. For example, the cheek portion can be obtained by repeating a predetermined calculation based on the position of the mouth and the position of the contour without using the part mask.

また以上のように、首の一部や頬越しの背景を含む、人物の顔の回りの画像を顔領域F
A(図4)とするようにし、また補正領域FCを特定する際の肌色判定範囲(図9の上側
)を、通常の肌色判定の範囲(図9の下側)より広い範囲としたので、頬部分だけでなく
顔と首の付け根部分等にも陰影を付すことができ、より効果的に顔に立体感を持たせるこ
とができる。例えば顔の輪郭内だけを顔領域FAとした場合、顔と首の付け根部分が補正
領域FCとはならない。また顔と首の付け根部分の画像の色相(H)、彩度(S)、及び
明度(B)は、通常、一般的な肌色判定の範囲(図9の下側)の値とならないので、一般
的な肌色判定の範囲で肌色判定した場合、肌色とは判定されず補正領域FCには含まれな
い。
In addition, as described above, an image around a person's face including a part of the neck and the background over the cheek is represented by the face region F.
A (FIG. 4), and the skin color determination range (upper side in FIG. 9) when specifying the correction area FC is wider than the normal skin color determination range (lower side in FIG. 9). Not only the cheeks but also the base of the face and neck can be shaded, and the face can be more effectively given a three-dimensional effect. For example, when only the face outline is set as the face area FA, the base of the face and the neck does not become the correction area FC. In addition, the hue (H), saturation (S), and brightness (B) of the image at the base of the face and neck are not usually in the range of the general skin color determination range (lower side in FIG. 9). When skin color is determined within a general skin color determination range, it is not determined as skin color and is not included in the correction area FC.

なお以上においては、頬周りについての色調補正を行ったが、他の部分について色調補
正することもできる。例えば鼻の回り部分の明度を下げて、相対的に鼻が高く見えるよう
にすることもできる。
In the above description, the tone correction for the cheek periphery is performed, but the tone correction can be performed for other portions. For example, the brightness around the nose can be lowered so that the nose looks relatively high.

また以上においては、暗く写り陰影となるようにしたが、逆に明るく見えるようにする
こともできる。例えば鼻筋部分の明度を上げるようにすれば、いわゆる鼻筋が通った顔に
見せることができる。
In the above description, the image is dark and shaded, but conversely, it can be made bright. For example, if the brightness of the nasal muscle portion is increased, the face can be shown through the so-called nasal muscle.

また以上においては、1つの頬マスクMAを利用した場合を例として説明したが、マス
キングする頬の領域の形状が異なる他の頬マスクMAをさらに用意したり、鼻周り等の頬
とは別の部位を特定するための部位マスクをさらに用意し(即ち部位毎の部位マスクを複
数用意し)、ユーザの指令に(即ち要求に)応じた部位マスクを利用して、補正領域FC
を特定することもできる。
In the above, the case where one cheek mask MA is used has been described as an example. However, another cheek mask MA having a different shape of the cheek region to be masked is prepared, or different from the cheeks around the nose. Further prepare a part mask for specifying the part (that is, prepare a plurality of part masks for each part), and use the part mask according to the user's command (that is, upon request) to correct the correction area FC.
Can also be specified.

そのようにすることにより、用途に応じたより効果的な色調補正を行うことができる。   By doing so, more effective color tone correction according to the application can be performed.

図13は、頬マスクMAの他の例を示す図である。この頬マスクMAを利用すれば、頬
のより深い部分までマスキングすることができるので、より頬の深い部分に陰影を付すこ
とができる。
FIG. 13 is a diagram showing another example of the cheek mask MA. By using this cheek mask MA, it is possible to mask up to a deeper part of the cheek, so that a shadow can be added to a deeper part of the cheek.

また以上においては、部位マスクを利用して補正領域FCを特定するようにしたが、数
学的な顔モデルを利用して、補正領域FCを特定することもできる。ここで数学的な顔モ
デルとは、例えば高いコントラストを持つ顔の輪郭及び器官(眉毛、目、鼻、口等)の輪
郭上に置かれた制御点によって表現される顔形状が、数学的に平均化されたものである。
In the above description, the correction area FC is specified using the part mask. However, the correction area FC can also be specified using a mathematical face model. Here, a mathematical face model is a mathematical expression of a face shape expressed by control points placed on the contour of a face with high contrast and the contour of an organ (eyebrows, eyes, nose, mouth, etc.). It is averaged.

また以上においては、ユーザが正面を向いている画像を例として説明したが、例えば顔
の向きに応じた頬マスクMAを用意することにより、向きを持った顔画像に対しても、上
述した場合と同様に顔補正処理Z1を行うことができる。
In the above description, the image in which the user is facing the front has been described as an example. However, for example, by preparing the cheek mask MA corresponding to the face direction, the above-described case may be applied to a face image having a direction. The face correction process Z1 can be performed in the same manner as described above.

図14は、向きを持った顔画像に対して顔補正処理Z1を実行する場合における補正領
域特定処理Z2(図3のステップS2)の流れを示すフローチャートである。このフロー
チャートを参照して補正領域特定処理Z2について説明する。なお図3におけるステップ
S2以外の処理(ステップS1,S3,S4,S5)は、上述した場合と同様にして行わ
れる。
FIG. 14 is a flowchart showing the flow of the correction area specifying process Z2 (step S2 in FIG. 3) when the face correction process Z1 is executed on a face image having a direction. The correction area specifying process Z2 will be described with reference to this flowchart. Note that the processing (steps S1, S3, S4, and S5) other than step S2 in FIG. 3 is performed in the same manner as described above.

ステップS51において、補正領域特定部22は、顔の向きを推定する。   In step S51, the correction area specifying unit 22 estimates the face orientation.

図15は、顔向き検出の方法を示す図である。図15の例では、顔領域FAにおいて、
右目、左目、又は口の画像を含むと想定される3つの矩形領域が、それぞれ右目領域EA
(r)、左目領域EA(l)、及び口領域EB(以下、個々に区別しない場合、器官領域
と称する)として検出される。この器官領域の検出は、顔領域FAの検出と同様に、例え
ばテンプレートを利用したパターンマッチングによる方法といった公知の検出方法を用い
て実行される。なお器官領域は、例えば各器官領域の頂点の座標により特定される、
FIG. 15 is a diagram illustrating a face orientation detection method. In the example of FIG. 15, in the face area FA,
Three rectangular areas that are assumed to contain images of the right eye, left eye, or mouth are respectively the right eye area EA.
(R), a left eye area EA (l), and a mouth area EB (hereinafter referred to as an organ area if not individually distinguished). Similar to the detection of the face area FA, the detection of the organ area is performed using a known detection method such as a pattern matching method using a template. The organ area is specified by, for example, the coordinates of the vertices of each organ area.

次に、右目領域EA(r)の中心点Ce(r)と左目領域EA(l)の中心点Ce(l
)とを結ぶ線分CLの長さ(以下、参照幅Wrと称する)と、口領域EBの中心点Cmと
線分CLとの距離(以下、参照高さHrと称する)とが、それぞれ算出される。
Next, the center point Ce (r) of the right eye area EA (r) and the center point Ce (l) of the left eye area EA (l)
) (Hereinafter referred to as reference width Wr) and the distance between the center point Cm of the mouth region EB and the line segment CL (hereinafter referred to as reference height Hr) are respectively calculated. Is done.

次に、参照高さHrと参照幅Wrとの比(Hr/Wr)が判定指標DIとして算出され
、判定指標DIに基づき顔向きが推定される。図15の例では、判定指標DIの値が閾値
T1以上で閾値T2未満である場合には、顔の画像の向きが正面向きであると推定される
。また、判定指標DIの値が閾値T1未満である場合には、顔の画像の向きが上振り又は
下振りであると推定され、判定指標DIの値が閾値T2以上である場合には、顔の画像の
向きが右振り又は左振りであると推定される。
Next, a ratio (Hr / Wr) between the reference height Hr and the reference width Wr is calculated as the determination index DI, and the face orientation is estimated based on the determination index DI. In the example of FIG. 15, when the value of the determination index DI is greater than or equal to the threshold T1 and less than the threshold T2, it is estimated that the orientation of the face image is the front direction. Further, when the value of the determination index DI is less than the threshold value T1, it is estimated that the orientation of the face image is upward or downward, and when the value of the determination index DI is equal to or greater than the threshold value T2, It is estimated that the orientation of the image is right-handed or left-handed.

ここで、「上振り」は、被写体の人物の顔が上を向いている画像の向きを意味し、「下
振り」は、被写体の人物の顔が下を向いている画像の向きを意味する。また、「右振り」
は、被写体の人物の顔が画像の観察者側から見て右を向いている(すなわち人物が実際に
は左を向いている)画像の向きを意味し、「左振り」は、被写体の人物の顔が画像の観察
者側から見て左を向いている(すなわち人物が実際には右を向いている)画像の向きを意
味する。なお画像の向きが上振り又は下振りであることを「上下振り」とも称し、右振り
又は左振りであることを「左右振り」とも称する。
Here, “upward swing” means the direction of the image with the face of the subject person facing up, and “downward swing” means the orientation of the image with the face of the subject person facing down. . Also, “right swing”
Means the direction of the image in which the face of the subject person is looking to the right when viewed from the viewer side of the image (ie, the person is actually facing the left). Means the orientation of the image facing the left as viewed from the viewer side of the image (that is, the person is actually facing the right). Note that the direction of the image is up or down is also referred to as “up and down”, and that of right or left is also referred to as “left and right”.

顔の画像の向きが右振り又は左振りである場合には、正面向きである場合と比較して、
参照高さHrはほとんど変わらない一方、参照幅Wrは小さいものと考えられる。従って
、顔の画像の向きが右振り又は左振りである場合には、正面向きである場合と比較して、
判定指標DI(=Hr/Wr)の値が大きくなる。反対に、顔の画像の向きが上振り又は
下振りである場合には、正面向きである場合と比較して、参照幅Wrはほとんど変わらな
い一方、参照高さHrは小さいものと考えられる。従って、顔の画像の向きが上振り又は
下振りである場合には、正面向きである場合と比較して、判定指標DI(=Hr/Wr)
の値が小さくなる。
When the orientation of the face image is right-handed or left-handed, compared to the case of face-up,
While the reference height Hr hardly changes, the reference width Wr is considered to be small. Therefore, when the orientation of the face image is right-handed or left-handed, compared to the case of face-up,
The value of the determination index DI (= Hr / Wr) increases. On the contrary, when the orientation of the face image is upside down or downside, the reference width Wr is hardly changed, but the reference height Hr is considered to be small as compared with the case of facing the front. Accordingly, the determination index DI (= Hr / Wr) is greater when the face image is in the upward or downward direction than in the front direction.
The value of becomes smaller.

閾値T1及び閾値T2は、所定数の顔のサンプル画像の判定指標DI(参照幅Wrと参
照高さHrとの比)から統計的に定められる。予め定められた閾値T1及び閾値T2は内
部メモリ12内の所定の領域に格納されており、対象画像TIの判定指標DIと閾値T1
及び閾値T2とを用いて、顔向き推定が行われる。
The threshold value T1 and the threshold value T2 are statistically determined from the determination index DI (ratio of the reference width Wr to the reference height Hr) of a predetermined number of face sample images. The predetermined threshold T1 and threshold T2 are stored in a predetermined area in the internal memory 12, and the determination index DI of the target image TI and the threshold T1 are stored.
Then, the face orientation is estimated using the threshold value T2.

なお左右のどちらに向いているのかは、例えば右目領域EA(r)の幅と左目領域EA
(l)の幅とを比較することにより検出される。即ち例えば右目領域EA(r)の幅の方
が大きければ右振りであると推定され、左目領域EA(l)の幅の方が大きければ左振り
と推定される。
Note that the left-right direction is determined by, for example, the width of the right-eye area EA (r) and the left-eye area EA.
It is detected by comparing with the width of (l). That is, for example, if the width of the right eye area EA (r) is larger, it is estimated that the camera is swung right, and if the width of the left eye area EA (l) is larger, it is estimated that it is swung left.

また上下のどちらを向いているかは、いずれか一方の目領域EAの幅に対する口領域M
Aの幅の比を算出し、その値が所定の閾値より大きければ上振りとし、所定の閾値より小
さければ下振りとすることにより推定される。
Further, the orientation of the upper and lower sides depends on the mouth area M with respect to the width of one eye area EA.
The ratio of the width of A is calculated, and if the value is larger than a predetermined threshold, it is estimated to be up, and if it is smaller than the predetermined threshold, it is estimated to be down.

このように顔の向きが推定される。   In this way, the face orientation is estimated.

次にステップS52において、補正領域特定部22は、推定した顔の向きに対応する頬
マスクMAを、内部メモリ12から取得する。左振り、右振り、上振り、及び下振り用の
頬マスクMAが、それぞれ内部メモリ12に記憶されているものとする。
Next, in step S <b> 52, the correction area specifying unit 22 acquires the cheek mask MA corresponding to the estimated face orientation from the internal memory 12. It is assumed that cheek masks MA for leftward swing, rightward swing, upward swing and downward swing are stored in the internal memory 12, respectively.

例えば図16の上側に示すような正面を向いている顔と比べ、図16の下側に示すよう
に、右振りの顔画像においては、人物の右側の頬の部分の領域が広くなり、左側の頬の部
分の領域が狭くなる。その図示は省略するが、左振りの顔画像においては、人物の左側の
頬の部分の領域が広くなり、右側の頬の部分の領域が狭くなる。
For example, as shown in the lower side of FIG. 16, the right-sided cheek area is wider and the left side of the person is compared with a face facing the front as shown in the upper side of FIG. 16. The cheek area becomes narrower. Although illustration thereof is omitted, in the left-handed face image, the region of the cheek portion on the left side of the person is widened and the region of the cheek portion on the right side is narrowed.

また図17の上側に示すように、上振りの顔画像においては、顎部分の領域が全体的に
広くなる。一方図17の下側に示すように、下振りの画像においては、顎部分の領域が全
体的に狭くなる。
Further, as shown in the upper side of FIG. 17, in the upward face image, the region of the chin portion is broadened as a whole. On the other hand, as shown in the lower side of FIG. 17, in the downward swing image, the region of the jaw portion is narrowed as a whole.

従って内部メモリ12には、右側の頬の部分の領域が広く、左側の頬の部分の領域が狭
くなっている右振り用の頬マスクMA、左側の頬の部分の領域が広く、右側の頬の部分の
領域が狭くなっている左振り用の頬マスクMA、顎部分の領域が全体的に広い上振り用の
頬マスクMA、及び、顎部分の領域が全体的に狭い下振り用の頬マスクMAがそれぞれ格
納されている。
Accordingly, the internal memory 12 has a right cheek mask MA having a wide right cheek area and a narrow left cheek area, a wide cheek mask area on the left cheek mask, and a right cheek area. Cheek mask MA for swinging left, the cheek mask MA for swinging up with a wide jaw region, and cheek for swinging down, with a narrow jaw region Each mask MA is stored.

即ち補正領域特定部22は、顔の向きが左振りである場合、左振り用頬マスクMAを、
顔の向きが右振りである場合、右振り用頬マスクMAを、顔の向きが上振りである場合、
上振り用頬マスクMAを、顔の向きが下振りである場合、下振り用頬マスクMAを、それ
ぞれ内部メモリ12から取得する。
That is, when the face orientation is left-handed, the correction area specifying unit 22 sets the left-handed cheek mask MA,
When the face orientation is right-handed, the right-handed cheek mask MA is used. When the face is face-up,
When the upward cheek mask MA is face down, the downward cheek mask MA is acquired from the internal memory 12.

ステップS53からステップS55においては、図5のステップS12からステップS
14における場合と同様の処理が行われるので、その説明は省略する。
In step S53 to step S55, step S12 to step S in FIG.
Since the same processing as in the case of 14 is performed, the description thereof is omitted.

以上のようにして、顔画像が向きを持った場合における補正領域特定処理Z2が行われ
る。
As described above, the correction area specifying process Z2 when the face image has a direction is performed.

なお以上においては、インクジェット方式のプリンタ1を例として説明したが、インク
ジェット方式以外のプリンタにも適用できると共に、画像をユーザに提示するものであれ
ば、デジタルカメラやフォトビューアーにも適用することができる。
In the above description, the inkjet printer 1 has been described as an example. However, the present invention can be applied to a printer other than the inkjet printer, and can be applied to a digital camera or a photo viewer as long as the image is presented to the user. it can.

また、以上の実施の形態では、図3、図5、及び図14に示す処理を、プリンタ1にお
いて実行するようにしたが、例えば、プリンタ1に接続されているホストコンピュータに
おいて実行することも可能である。
In the above embodiment, the processes shown in FIGS. 3, 5, and 14 are executed in the printer 1. However, for example, the processes can be executed in a host computer connected to the printer 1. It is.

なお、上記の処理機能は、コンピュータによって実現することができる。その場合、画
像処理装置が有すべき機能の処理内容を記述したプログラムが提供される。そのプログラ
ムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。
処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録してお
くことができる。コンピュータで読み取り可能な記録媒体としては、磁気記録装置、光デ
ィスク、光磁気記録媒体、半導体メモリなどがある。磁気記録装置には、ハードディスク
装置(HDD)、フレキシブルディスク(FD)、磁気テープなどがある。光ディスクに
は、DVD(Digital Versatile Disk)、DVD−RAM、CD−ROM(Compact Disk
ROM)、CD−R(Recordable)/RW(ReWritable)などがある。光磁気記録媒体には
、MO(Magneto-Optical disk)などがある。
The above processing functions can be realized by a computer. In that case, a program describing the processing contents of the functions that the image processing apparatus should have is provided. By executing the program on a computer, the above processing functions are realized on the computer.
The program describing the processing contents can be recorded on a computer-readable recording medium. Examples of the computer-readable recording medium include a magnetic recording device, an optical disk, a magneto-optical recording medium, and a semiconductor memory. Examples of the magnetic recording device include a hard disk device (HDD), a flexible disk (FD), and a magnetic tape. Optical disks include DVD (Digital Versatile Disk), DVD-RAM, CD-ROM (Compact Disk)
ROM), CD-R (Recordable) / RW (ReWritable), and the like. Magneto-optical recording media include MO (Magneto-Optical disk).

プログラムを流通させる場合には、例えば、そのプログラムが記録されたDVD、CD
−ROMなどの可搬型記録媒体が販売される。また、プログラムをサーバコンピュータの
記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュ
ータにそのプログラムを転送することもできる。
When distributing the program, for example, a DVD or CD on which the program is recorded
-Portable recording media such as ROM are sold. It is also possible to store the program in a storage device of a server computer and transfer the program from the server computer to another computer via a network.

プログラムを実行するコンピュータは、例えば、可搬型記録媒体に記録されたプログラ
ムもしくはサーバコンピュータから転送されたプログラムを、自己の記憶装置に格納する
。そして、コンピュータは、自己の記憶装置からプログラムを読み取り、プログラムに従
った処理を実行する。なお、コンピュータは、可搬型記録媒体から直接プログラムを読み
取り、そのプログラムに従った処理を実行することもできる。また、コンピュータは、サ
ーバコンピュータからプログラムが転送される毎に、逐次、受け取ったプログラムに従っ
た処理を実行することもできる。
The computer that executes the program stores, for example, the program recorded on the portable recording medium or the program transferred from the server computer in its own storage device. Then, the computer reads the program from its own storage device and executes processing according to the program. The computer can also read the program directly from the portable recording medium and execute processing according to the program. Further, each time the program is transferred from the server computer, the computer can sequentially execute processing according to the received program.

なお上記実施例において、ハードウェアによって実現されていた構成の一部をソフトウ
ェアに置き換えるようにしてもよく、逆に、ソフトウェアによって実現されていた構成の
一部をハードウェアに置き換えるようにしてもよい。
In the above embodiment, a part of the configuration realized by hardware may be replaced with software, and conversely, a part of the configuration realized by software may be replaced by hardware. .

また図3、図5、又は図14にその流れを示した処理は、各ステップが、記載された順
序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくても、
並列的あるいは個別に実行される処理を含むものである。例えば図3のステップS4の処
理は、適宜省略することもできる。
The process shown in FIG. 3, FIG. 5, or FIG. 14 is not necessarily performed in time series, as well as the process in which each step is performed in time series in the order described. ,
It includes processes that are executed in parallel or individually. For example, the process of step S4 in FIG. 3 can be omitted as appropriate.

本発明の実施の形態に係るプリンタのハードウェアの構成例を示すブロック図である。FIG. 3 is a block diagram illustrating a hardware configuration example of a printer according to an embodiment of the present invention. 図1に示すプリンタにおいて顔補正処理を実行するための機能的構成例を示す図である。FIG. 2 is a diagram illustrating a functional configuration example for executing face correction processing in the printer illustrated in FIG. 1. 図1に示すプリンタにおいて実行される顔補正処理Z1の流れを示すフローチャートである。2 is a flowchart showing a flow of face correction processing Z1 executed in the printer shown in FIG. 図1に示すプリンタにおいて実行される顔領域FAの検出結果の一例を示す図である。It is a figure which shows an example of the detection result of the face area FA performed in the printer shown in FIG. 図1に示すプリンタにおいて実行される補正領域特定処理Z2の流れを示すフローチャートである。3 is a flowchart showing a flow of correction area specifying processing Z2 executed in the printer shown in FIG. 図1に示すプリンタにおいて処理される際の頬マスクMAの例を示す図である。It is a figure which shows the example of the cheek mask MA at the time of processing in the printer shown in FIG. 図6の頬マスクMAの画素値を、設定されている値に応じて立体的に示した図である。It is the figure which showed the pixel value of cheek mask MA of FIG. 6 in three dimensions according to the set value. 図1に示すプリンタにおいて処理される際の補正候補領域FBを概念的に示す図である。FIG. 2 is a diagram conceptually showing a correction candidate area FB when processed in the printer shown in FIG. 1. 図1に示すプリンタにおいて処理される際の肌色判定の範囲の例を示す図である。It is a figure which shows the example of the range of the skin color determination at the time of processing in the printer shown in FIG. 図1に示すプリンタにおいて処理される際の補正領域FCの例を示す図である。It is a figure which shows the example of the correction | amendment area | region FC at the time of processing in the printer shown in FIG. 図1に示すプリンタにおいて処理される際の、頬マスクMAの画素値を、設定された重みに応じて立体的に示した図である。It is the figure which showed in three dimensions the pixel value of cheek mask MA at the time of processing in the printer shown in FIG. 1 according to the set weight. 図1に示すプリンタにおいて実行される画像補正処理Z1における処理段階に対応する写真画像を示す図である。It is a figure which shows the photographic image corresponding to the process step in the image correction process Z1 performed in the printer shown in FIG. 図1に示すプリンタにおいて処理される際の頬マスクMAの他の例を示す図である。It is a figure which shows the other example of cheek mask MA at the time of processing in the printer shown in FIG. 図1に示すプリンタにおいて実行される、顔画像が向きを持った場合における補正領域特定処理Z2の流れを示すフローチャートである。It is a flowchart which shows the flow of the correction area | region identification process Z2 performed in the printer shown in FIG. 1 when a face image has direction. 図1に示すプリンタにおいて実行される顔向き推定の方法を示す図である。It is a figure which shows the method of face direction estimation performed in the printer shown in FIG. 顔の向きにより顔画像の変化を示す図である。It is a figure which shows the change of a face image with the direction of a face. 顔の向きにより顔画像の変化を示す他の図である。It is another figure which shows the change of a face image with direction of a face.

符号の説明Explanation of symbols

1 プリンタ, 11 CPU, 12 内部メモリ, 13 操作部,14 表示部
, 15 プリンタエンジン, 16 カードI/F, 21 顔領域検出部(検出手段
), 22 補正領域特定部(特定手段), 23 補正部(補正手段), 24 出力
制御部
DESCRIPTION OF SYMBOLS 1 Printer, 11 CPU, 12 Internal memory, 13 Operation part, 14 Display part, 15 Printer engine, 16 Card I / F, 21 Face area detection part (detection means), 22 Correction area specification part (specification means), 23 Correction Part (correction means), 24 output control part

Claims (6)

画像の色調を補正する画像処理装置であって、
画像における顔の画像を含む顔領域を検出する検出手段と、
上記顔領域内の顔を構成する部位をマスキングするための部位マスクを利用して、上記
顔領域から、上記色調補正を行う補正領域を特定する特定手段と、
上記補正領域に対して上記色調補正を行う補正手段と
を備える画像処理装置。
An image processing apparatus for correcting the color tone of an image,
Detecting means for detecting a face area including a face image in the image;
Using a part mask for masking a part constituting the face in the face area, specifying means for specifying a correction area for performing the color tone correction from the face area;
An image processing apparatus comprising: correction means for performing the color tone correction on the correction area.
前記特定手段は、前記部位マスクを前記顔領域の大きさに対応させた部位マスク画像を
生成し、上記部位マスク画像でマスキングされる顔領域FAの領域から、肌色領域を検出
し、検出した肌色領域を前記補正領域とする
請求項1に記載の画像処理装置。
The specifying unit generates a part mask image in which the part mask is made to correspond to the size of the face area, detects a skin color area from the area of the face area FA masked by the part mask image, and detects the skin color The image processing apparatus according to claim 1, wherein an area is the correction area.
前記部位マスクは、顔の向きに応じて複数設けられており、
前記特定手段は、前記顔領域に基づいて顔の向きを検出し、検出した顔の向きに対応す
る前記部位マスクを取得し、取得した前記部位マスクを利用して前記補正領域を特定する
請求項1に記載の画像処理装置。
A plurality of the part masks are provided according to the orientation of the face,
The identification unit detects a face direction based on the face region, acquires the part mask corresponding to the detected face direction, and specifies the correction region using the acquired part mask. The image processing apparatus according to 1.
前記部位マスクには、補正の重みが設定されており、
前記補正手段は、上記補正の重みに基づいて、前記補正領域に対して色調補正を行う
請求項2又は請求項3のいずれか1項に記載の画像処理装置。
A correction weight is set in the part mask,
The image processing apparatus according to claim 2, wherein the correction unit performs color correction on the correction region based on the correction weight.
画像の色調を補正する画像処理装置の画像処理方法であって、
画像における顔の画像を含む顔領域を検出する検出ステップと、
上記顔領域内の顔を構成する部位をマスキングするための部位マスクを利用して、上記
顔領域から、上記色調補正を行う補正領域を特定する特定ステップと、
上記補正領域に対して上記色調補正を行う補正ステップと
を含む画像処理方法。
An image processing method of an image processing apparatus for correcting the color tone of an image, comprising:
A detecting step for detecting a face area including a face image in the image;
A specifying step of specifying a correction area for performing the color tone correction from the face area using a part mask for masking a part constituting the face in the face area;
A correction step of performing the color correction on the correction region.
画像の色調を補正する画像処理をコンピュータに実行させるプログラムであって、
画像における顔の画像を含む顔領域を検出する検出ステップと、
上記顔領域内の顔を構成する部位をマスキングするための部位マスクを利用して、上記
顔領域から、上記色調補正を行う補正領域を特定する特定ステップと、
上記補正領域に対して上記色調補正を行う補正ステップと
を含む画像処理をコンピュータに実行させるプログラム。
A program for causing a computer to execute image processing for correcting the color tone of an image,
A detecting step for detecting a face area including a face image in the image;
A specifying step of specifying a correction area for performing the color tone correction from the face area using a part mask for masking a part constituting the face in the face area;
A program that causes a computer to execute image processing including: a correction step that performs the color correction on the correction area.
JP2008094747A 2008-04-01 2008-04-01 Image processor, image processing method, and program Withdrawn JP2009251634A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008094747A JP2009251634A (en) 2008-04-01 2008-04-01 Image processor, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008094747A JP2009251634A (en) 2008-04-01 2008-04-01 Image processor, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2009251634A true JP2009251634A (en) 2009-10-29

Family

ID=41312334

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008094747A Withdrawn JP2009251634A (en) 2008-04-01 2008-04-01 Image processor, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2009251634A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011044132A (en) * 2009-07-23 2011-03-03 Casio Computer Co Ltd Image processing apparatus, image processing method and image processing program
JP2014016886A (en) * 2012-07-10 2014-01-30 Furyu Kk Image processor and image processing method
JP2017084093A (en) * 2015-10-28 2017-05-18 カシオ計算機株式会社 Image processing device, image processing method and program
KR20190139264A (en) * 2017-09-30 2019-12-17 선전 센스타임 테크놀로지 컴퍼니 리미티드 Image processing methods and devices, electronic devices and computer storage media

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011044132A (en) * 2009-07-23 2011-03-03 Casio Computer Co Ltd Image processing apparatus, image processing method and image processing program
JP2014016886A (en) * 2012-07-10 2014-01-30 Furyu Kk Image processor and image processing method
JP2017084093A (en) * 2015-10-28 2017-05-18 カシオ計算機株式会社 Image processing device, image processing method and program
KR20190139264A (en) * 2017-09-30 2019-12-17 선전 센스타임 테크놀로지 컴퍼니 리미티드 Image processing methods and devices, electronic devices and computer storage media
KR102225266B1 (en) * 2017-09-30 2021-03-10 선전 센스타임 테크놀로지 컴퍼니 리미티드 Image processing methods and devices, electronic devices and computer storage media
US10972709B2 (en) 2017-09-30 2021-04-06 Shenzhen Sensetime Technology Co., Ltd. Image processing method and apparatus, electronic device, and computer storage medium

Similar Documents

Publication Publication Date Title
KR101446975B1 (en) Automatic face and skin beautification using face detection
US9691136B2 (en) Eye beautification under inaccurate localization
US8520089B2 (en) Eye beautification
US10304164B2 (en) Image processing apparatus, image processing method, and storage medium for performing lighting processing for image data
CN107507217B (en) Method and device for making certificate photo and storage medium
US20090245655A1 (en) Detection of Face Area and Organ Area in Image
JP2005310068A (en) Method for correcting white of eye, and device for executing the method
JP2008234342A (en) Image processor and image processing method
US20140064617A1 (en) Image generation apparatus, image generation method, and recording medium
JP2004094491A (en) Face orientation estimation device and method and its program
JP2009251634A (en) Image processor, image processing method, and program
JP4957607B2 (en) Detection of facial regions in images
US8031915B2 (en) Image processing device and image processing method
JP2001209802A (en) Method and device for extracting face, and recording medium
JP2006164133A (en) Image processing method and device, and program
JP2009253324A (en) Image processing unit, image processing method, and program
US9323981B2 (en) Face component extraction apparatus, face component extraction method and recording medium in which program for face component extraction method is stored
JP2010224775A (en) Eye-catch synthesizing device and method
JP2011128676A (en) Image processing apparatus, image processing method, and image processing program
JP4831344B2 (en) Eye position detection method
US9563940B2 (en) Smart image enhancements
KR100618493B1 (en) The Apparatus and Method for Creating Three-Dimensional Image Automatically
JP2010282340A (en) Image processor, image processing method, image processing program and printer for determining state of eye included in image
WO2023276271A1 (en) Information processing device, information processing method, and recording medium
JP2009253319A (en) Image processing unit, image processing method, and program

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110607